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
src/agent/ovs/ofctl_manager.py
SSICLOPS/interconnection-agent
0
173057
""" BSD 3-Clause License Copyright (c) 2018, <NAME>, Aalto University, Finland All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ import logging import utils from helpers_n_wrappers import utils3 TABLE_START = 0 TABLE_IN_MPTCP = 10 TABLE_VNI_SPLIT = 20 TABLE_VLAN_CHECK = 21 TABLE_LEARNING = 22 TABLE_TYPE_SPLIT = 30 TABLE_UNICAST_LEARNT = 31 TABLE_UNICAST_APPLY = 32 TABLE_MULTICAST = 35 TABLE_SPLIT_MPTCP = 40 TABLE_APPLY_MPTCP = 41 TABLE_ROUTING = 42 TABLE_MPTCP_VLAN = 2 TABLE_MPTCP_LEARN = 1 TABLE_MPTCP_LEARNT = 3 TABLE_MPTCP_FORWARD = 4 def add_flow(switch, *args, strict=True): apply(switch, "mod-flows", *args, strict=strict) def del_flow(switch, *args, strict=True): apply(switch, "del-flows", *args, strict=strict) def apply(switch, action, *args, strict=True): cmd = ["ovs-ofctl"] cmd.append(action) if strict: cmd.append("--strict") cmd.append(switch) if args: cmd.append(" ".join(args)) utils.execute_list(cmd) class Ofctl_manager(object): def __init__(self, **kwargs): utils3.set_attributes(self, override = True, **kwargs) def init_flows(self): self.init_tun() self.init_in() self.init_out() def init_tun(self): del_flow(self.dp_tun, strict=False) add_flow(self.dp_tun, "table={}, priority=0, actions=drop".format(TABLE_START) ) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_START), "in_port={},".format(self.patch_tun_id), "actions=goto_table:{}".format(TABLE_TYPE_SPLIT) ) add_flow(self.dp_tun,"table={}, priority=0,".format(TABLE_VNI_SPLIT), "actions=goto_table:{}".format(TABLE_ROUTING) ) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_VNI_SPLIT), "tun_id={}/0xfff,".format(self.self_vni), "actions=goto_table:{}".format(TABLE_VLAN_CHECK) ) add_flow(self.dp_tun,"table={}, priority=0,".format(TABLE_VLAN_CHECK), "actions=drop" ) add_flow(self.dp_tun, "table={}, priority=0, actions=learn(".format(TABLE_LEARNING), "table={}, hard_timeout=300,".format(TABLE_UNICAST_LEARNT), "priority=10, NXM_OF_VLAN_TCI[0..11]", "NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],", "load:NXM_NX_REG0[]->NXM_NX_REG0[],", "load:NXM_NX_TUN_ID[0..11]->NXM_NX_REG2[12..23],", "load:NXM_NX_TUN_ID[12..23]->NXM_NX_REG2[0..11]),", "output:{}".format(self.patch_tun_id) ) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_TYPE_SPLIT), "dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,", "actions=resubmit(,{}),resubmit(,{})".format( TABLE_UNICAST_LEARNT, TABLE_UNICAST_APPLY ) ) add_flow(self.dp_tun,"table={}, priority=10,".format(TABLE_TYPE_SPLIT), "dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,", "actions=goto_table:{}".format(TABLE_MULTICAST) ) add_flow(self.dp_tun, "table={},".format(TABLE_UNICAST_LEARNT), "priority=0, actions=drop" ) add_flow(self.dp_tun, "table={},".format(TABLE_UNICAST_APPLY), "priority=20, reg0=0, actions=goto_table:{}".format(TABLE_MULTICAST) ) add_flow(self.dp_tun, "table={},".format(TABLE_UNICAST_APPLY), "priority=10,", "actions=move:NXM_NX_REG0[0..11]->NXM_OF_VLAN_TCI[0..11],", "move:NXM_NX_REG2[0..23]->NXM_NX_TUN_ID[0..23],", "goto_table:{}".format(TABLE_SPLIT_MPTCP) ) add_flow(self.dp_tun, "table={}, priority=0,".format(TABLE_MULTICAST), "actions=drop" ) add_flow(self.dp_tun, "table={}, priority=0,".format(TABLE_SPLIT_MPTCP), "actions=goto_table:{}".format(TABLE_ROUTING) ) add_flow(self.dp_tun, "table={}, priority=0,".format(TABLE_APPLY_MPTCP), "actions=goto_table:{}".format(TABLE_ROUTING) ) add_flow(self.dp_tun, "table={}, priority=0,".format(TABLE_ROUTING), "actions=drop" ) def init_in(self): del_flow(self.dp_in, strict=False) add_flow(self.dp_in, "table={}, priority=0,".format(TABLE_START), "actions=normal" ) def init_out(self): del_flow(self.dp_out, strict=False) add_flow(self.dp_out, "table={}, priority=0,".format(TABLE_START), "actions=normal" ) def init_mptcp(self, **kwargs): utils3.set_attributes(self, override=True, **kwargs) del_flow(self.dp_mptcp, strict=False) add_flow(self.dp_mptcp, "table={}, priority=0,".format(TABLE_START), "actions=goto_table:{}".format(TABLE_MPTCP_VLAN) ) add_flow(self.dp_mptcp, "table={}, priority=10,".format(TABLE_START), "in_port={},".format(self.patch_mptcp_port), "actions=goto_table:{}".format(TABLE_MPTCP_LEARN) ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_LEARN), "priority=10, tcp,", "actions=goto_table:{}".format(TABLE_MPTCP_FORWARD) ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_LEARN), "priority=10, arp,", "actions=learn(table={}, priority=10,".format(TABLE_MPTCP_LEARNT), "eth_src=E1:8E:36:8C:F6:0D, eth_type=0x0800,", "NXM_OF_IP_DST[]=NXM_OF_ARP_SPA[],", "load:NXM_NX_ARP_SHA[]->NXM_OF_ETH_DST[],", "output:NXM_OF_IN_PORT[])" ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_LEARN), "priority=0, actions=drop" ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_VLAN), "priority=0, actions=drop" ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_LEARNT), "priority=0, actions=drop" ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_FORWARD), "priority=0, actions=drop" ) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_START), "in_port={},".format(self.patch_tun_port_mptcp), "actions=goto_table:{}".format(TABLE_IN_MPTCP) ) add_flow(self.dp_tun, "table={}, priority=0,".format(TABLE_IN_MPTCP), "actions=drop" ) def add_proxy(self, port, vni, eth_addr): add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_VLAN), "priority=10, in_port={}".format(port), "actions=mod_vlan_vid:{},".format(vni), "goto_table:{}".format(TABLE_MPTCP_LEARNT) ) add_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_FORWARD), "priority=10, vlan_vid=0x1{:03x}".format(vni), "actions=set_field:{}->eth_dst,strip_vlan,".format(eth_addr), "output:{}".format(port) ) add_flow(self.dp_tun,"table={}, priority=10,".format(TABLE_APPLY_MPTCP), "tcp, tun_id=0x{:x}/0xfff".format(vni), "actions=move:NXM_OF_VLAN_TCI[0..11]->NXM_NX_PKT_MARK[0..11]", "move:NXM_NX_TUN_ID[0..11]->NXM_OF_VLAN_TCI[0..11]", "output:{}".format(self.patch_tun_port_mptcp) ) add_flow(self.dp_tun,"table={}, priority=10,".format(TABLE_APPLY_MPTCP), "arp, tun_id=0x{:x}/0xfff".format(vni), "actions=resubmit(,{}),".format(TABLE_ROUTING), "move:NXM_OF_VLAN_TCI[0..11]->NXM_NX_PKT_MARK[0..11]", "move:NXM_NX_TUN_ID[0..11]->NXM_OF_VLAN_TCI[0..11]", "output:{}".format(self.patch_tun_port_mptcp) ) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_IN_MPTCP), "vlan_vid=0x1{:03x}/0x1fff".format(vni), "actions=move:NXM_OF_VLAN_TCI[0..11]->NXM_NX_TUN_ID[12..23]", "move:NXM_NX_PKT_MARK[0..11]->NXM_OF_VLAN_TCI[0..11]", "load:{}->NXM_NX_TUN_ID[0..11]".format(self.self_vni), "goto_table:{}".format(TABLE_VLAN_CHECK) ) def del_proxy(self, port, vni): del_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_VLAN), "priority=10, in_port={}".format(port) ) del_flow(self.dp_mptcp, "table={},".format(TABLE_MPTCP_FORWARD), "priority=10, vlan_vid=0x1{:03x}".format(vni) ) del_flow(self.dp_tun,"table={}, priority=10,".format(TABLE_APPLY_MPTCP), "tcp, tun_id=0x{:x}/0xfff".format(vni) ) del_flow(self.dp_tun,"table={}, priority=10,".format(TABLE_APPLY_MPTCP), "arp, tun_id=0x{:x}/0xfff".format(vni), ) del_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_IN_MPTCP), "vlan_vid=0x1{:03x}/0x1fff".format(vni), ) def add_tunnel(self, port_id): add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_START), "in_port={}, actions=goto_table:{}".format(port_id, TABLE_VNI_SPLIT) ) def del_tunnel(self, port_id): del_flow(self.dp_tun, "table={},".format(TABLE_START), "priority=10, in_port={}".format(port_id) ) def add_route(self, vni, port_id): add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_ROUTING), "tun_id={}/0xfff, actions=output:{}".format(vni, port_id) ) def del_route(self, vni): del_flow(self.dp_tun, "table={},".format(TABLE_ROUTING), "priority=10, tun_id={}/0xfff".format(vni) ) def add_expansion(self, expansion, expansions_list, local_vlan): add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_VLAN_CHECK), "tun_id=0x{:03x}{:03x},".format(expansion["peer_vni"],self.self_vni), "vlan_vid=0x1{:03x}/0x1fff, ".format(expansion["intercloud_id"]), "actions=mod_vlan_vid:{},".format(local_vlan), "load:{}->NXM_NX_REG0[],".format(hex(expansion["intercloud_id"])), "goto_table:{}".format(TABLE_LEARNING) ) if expansion["mptcp"]: add_flow(self.dp_tun, "table={},".format(TABLE_SPLIT_MPTCP), "priority=10, tun_id=0x{:03x}{:03x},".format(self.self_vni, expansion["peer_vni"] ), "vlan_vid=0x1{:03x}/0x1fff,".format(expansion["intercloud_id"]), "actions=goto_table:{}".format(TABLE_APPLY_MPTCP) ) actions=[] for expansion_mult in expansions_list: actions.append("mod_vlan_vid:{}".format(expansion_mult["intercloud_id"])) actions.append("set_field:0x{:03x}{:03x}->tun_id".format(self.self_vni, expansion_mult["peer_vni"] )) actions.append("resubmit(,{})".format(TABLE_SPLIT_MPTCP)) actions_str = ",".join(actions) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_MULTICAST), "vlan_vid=0x1{:03x}/0x1fff,".format(local_vlan), "actions={}".format(actions_str) ) def del_expansion(self, expansion, expansions_list, local_vlan): del_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_VLAN_CHECK), "tun_id=0x{:03x}{:03x},".format(expansion["peer_vni"],self.self_vni), "vlan_vid=0x1{:03x}/0x1fff, ".format(expansion["intercloud_id"]), ) if expansion["mptcp"]: del_flow(self.dp_tun, "table={},".format(TABLE_SPLIT_MPTCP), "priority=10, tun_id=0x{:03x}{:03x},".format(self.self_vni, expansion["peer_vni"] ), "vlan_vid=0x1{:03x}/0x1fff,".format(expansion["intercloud_id"]), ) actions=[] for expansion_mult in expansions_list: actions.append("mod_vlan_vid:{}".format(expansion_mult["intercloud_id"])) actions.append("set_field:0x{:03x}{:03x}->tun_id".format(self.self_vni, expansion_mult["peer_vni"] )) actions.append("resubmit(,{})".format(TABLE_SPLIT_MPTCP)) actions_str = ",".join(actions) add_flow(self.dp_tun, "table={}, priority=10,".format(TABLE_MULTICAST), "vlan_vid=0x1{:03x}/0x1fff,".format(local_vlan), "actions={}".format(actions_str) )
[ 1, 9995, 13, 29933, 7230, 29871, 29941, 29899, 20216, 1509, 19245, 13, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 29892, 529, 5813, 10202, 319, 284, 517, 3014, 29892, 18312, 13, 3596, 10462, 21676, 29889, 13, 13, 9039, 391, 3224, 322, 671, 297, 2752, 322, 7581, 7190, 29892, 411, 470, 1728, 13, 1545, 2450, 29892, 526, 21905, 4944, 393, 278, 1494, 5855, 526, 1539, 29901, 13, 13, 29930, 4367, 391, 3224, 29879, 310, 2752, 775, 1818, 11551, 278, 2038, 3509, 1266, 8369, 29892, 445, 13, 29871, 1051, 310, 5855, 322, 278, 1494, 2313, 433, 4193, 29889, 13, 13, 29930, 4367, 391, 3224, 29879, 297, 7581, 883, 1818, 18532, 278, 2038, 3509, 1266, 8369, 29892, 13, 29871, 445, 1051, 310, 5855, 322, 278, 1494, 2313, 433, 4193, 297, 278, 5106, 13, 29871, 322, 29914, 272, 916, 17279, 4944, 411, 278, 4978, 29889, 13, 13, 29930, 2448, 2121, 278, 1024, 310, 278, 3509, 1266, 19464, 3643, 278, 2983, 310, 967, 13, 29871, 17737, 29560, 1122, 367, 1304, 304, 1095, 272, 344, 470, 27391, 9316, 10723, 515, 13, 29871, 445, 7047, 1728, 2702, 7536, 3971, 10751, 29889, 13, 13, 4690, 3235, 7791, 7818, 12982, 1525, 8519, 13756, 13044, 3352, 6770, 6093, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 29903, 5300, 8707, 29911, 3960, 29933, 2692, 24125, 376, 3289, 8519, 29908, 13, 9468, 13764, 29979, 8528, 15094, 1799, 6323, 306, 3580, 5265, 3352, 399, 1718, 29934, 13566, 29059, 29892, 2672, 6154, 15789, 4214, 29892, 350, 2692, 6058, 27848, 3352, 7495, 29892, 6093, 13, 29902, 3580, 5265, 3352, 399, 1718, 29934, 13566, 29059, 8079, 341, 1001, 3210, 13566, 2882, 6227, 11937, 5300, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 319, 1525, 13, 23711, 13875, 8890, 29928, 29889, 2672, 11698, 382, 29963, 3919, 24972, 9818, 6093, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 6323, 8707, 29911, 3960, 29933, 2692, 24125, 20700, 17705, 6181, 13, 22051, 13764, 29979, 22471, 26282, 29892, 2672, 4571, 26282, 29892, 2672, 29907, 1367, 3919, 1964, 29892, 317, 4162, 8426, 1964, 29892, 8528, 29923, 3580, 29931, 19926, 29892, 6323, 8707, 1660, 13356, 3919, 25758, 13, 7698, 1529, 1692, 29903, 313, 1177, 6154, 15789, 4214, 29892, 350, 2692, 6058, 27848, 3352, 7495, 29892, 13756, 29907, 11499, 13780, 8079, 27092, 1254, 1806, 26027, 21947, 29949, 8452, 6323, 13, 6304, 29963, 2965, 2890, 29936, 11247, 1799, 8079, 501, 1660, 29892, 360, 8254, 29892, 6323, 13756, 29943, 1806, 29903, 29936, 6323, 350, 3308, 8895, 1799, 2672, 4945, 29934, 4897, 29911, 2725, 29897, 29832, 8851, 5348, 13, 5454, 17171, 29928, 5300, 6732, 13764, 29979, 6093, 18929, 8079, 17705, 2882, 6227, 11937, 29892, 12317, 2544, 4448, 2672, 8707, 29911, 4717, 1783, 29892, 6850, 3960, 1783, 17705, 2882, 6227, 11937, 29892, 13, 1955, 323, 8476, 313, 1177, 6154, 15789, 4214, 405, 11787, 5265, 24647, 4741, 6323, 438, 29911, 4448, 22119, 1660, 29897, 9033, 3235, 4214, 2672, 13764, 29979, 399, 29909, 29979, 19474, 8079, 6093, 501, 1660, 13, 9800, 3446, 3235, 7791, 7818, 12982, 1525, 29892, 382, 29963, 1430, 10762, 11033, 18118, 1660, 29928, 8079, 6093, 21521, 1799, 8979, 6227, 11937, 8079, 20134, 3210, 21330, 1529, 1692, 29889, 13, 15945, 29908, 13, 13, 5215, 12183, 13, 13, 5215, 3667, 29879, 13, 3166, 1371, 414, 29918, 29876, 29918, 29893, 336, 22437, 1053, 3667, 29879, 29941, 13, 13, 21009, 29918, 25826, 353, 29871, 29900, 13, 21009, 29918, 1177, 29918, 3580, 29911, 6271, 353, 29871, 29896, 29900, 13, 21009, 29918, 29963, 12916, 29918, 5550, 29931, 1806, 353, 29871, 29906, 29900, 13, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 353, 29871, 29906, 29896, 13, 21009, 29918, 1307, 25614, 353, 29871, 29906, 29906, 13, 21009, 29918, 11116, 29918, 5550, 29931, 1806, 353, 29871, 29941, 29900, 13, 21009, 29918, 3904, 2965, 28938, 29918, 1307, 15249, 29911, 353, 29871, 29941, 29896, 13, 21009, 29918, 3904, 2965, 28938, 29918, 3301, 7390, 29979, 353, 29871, 29941, 29906, 13, 21009, 29918, 29924, 8647, 2965, 28938, 353, 29871, 29941, 29945, 13, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 353, 29871, 29946, 29900, 13, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 353, 29871, 29946, 29896, 13, 21009, 29918, 1672, 2692, 4214, 353, 29871, 29946, 29906, 13, 13, 21009, 29918, 3580, 29911, 6271, 29918, 29963, 29931, 2190, 353, 29871, 29906, 13, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 353, 29871, 29896, 13, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 29911, 353, 29871, 29941, 13, 21009, 29918, 3580, 29911, 6271, 29918, 22051, 29956, 17011, 353, 29871, 29946, 13, 13, 1753, 788, 29918, 1731, 29898, 15123, 29892, 334, 5085, 29892, 9406, 29922, 5574, 1125, 13, 1678, 3394, 29898, 15123, 29892, 376, 1545, 29899, 1731, 29879, 613, 334, 5085, 29892, 9406, 29922, 710, 919, 29897, 13, 13, 1753, 628, 29918, 1731, 29898, 15123, 29892, 334, 5085, 29892, 9406, 29922, 5574, 1125, 13, 1678, 3394, 29898, 15123, 29892, 376, 6144, 29899, 1731, 29879, 613, 334, 5085, 29892, 9406, 29922, 710, 919, 29897, 13, 13, 1753, 3394, 29898, 15123, 29892, 3158, 29892, 334, 5085, 29892, 9406, 29922, 5574, 1125, 13, 1678, 9920, 353, 6796, 586, 29879, 29899, 974, 16948, 3108, 13, 1678, 9920, 29889, 4397, 29898, 2467, 29897, 13, 1678, 565, 9406, 29901, 13, 4706, 9920, 29889, 4397, 703, 489, 710, 919, 1159, 13, 1678, 9920, 29889, 4397, 29898, 15123, 29897, 13, 1678, 565, 6389, 29901, 13, 4706, 9920, 29889, 4397, 703, 11393, 7122, 29898, 5085, 876, 13, 1678, 3667, 29879, 29889, 7978, 29918, 1761, 29898, 9006, 29897, 13, 13, 13, 1990, 4587, 16948, 29918, 12847, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 3667, 29879, 29941, 29889, 842, 29918, 15697, 29898, 1311, 29892, 5712, 353, 5852, 29892, 3579, 19290, 29897, 13, 13, 1678, 822, 2069, 29918, 1731, 29879, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2344, 29918, 29873, 348, 580, 13, 4706, 1583, 29889, 2344, 29918, 262, 580, 13, 4706, 1583, 29889, 2344, 29918, 449, 580, 13, 13, 13, 1678, 822, 2069, 29918, 29873, 348, 29898, 1311, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 9406, 29922, 8824, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 13, 9651, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 8820, 29922, 8865, 1642, 4830, 29898, 21009, 29918, 25826, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 262, 29918, 637, 3790, 1118, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29873, 348, 29918, 333, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 11116, 29918, 5550, 29931, 1806, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29963, 12916, 29918, 5550, 29931, 1806, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29963, 12916, 29918, 5550, 29931, 1806, 511, 13, 9651, 376, 29873, 348, 29918, 333, 3790, 6822, 29900, 29916, 18725, 29892, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 511, 13, 9651, 376, 7387, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 13, 9651, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 8820, 29922, 19668, 17350, 4830, 29898, 21009, 29918, 1307, 25614, 511, 13, 9651, 376, 2371, 3790, 1118, 2898, 29918, 15619, 29922, 29941, 29900, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3904, 2965, 28938, 29918, 1307, 15249, 29911, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 405, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 29940, 29990, 29924, 29918, 9800, 29918, 2544, 29950, 29918, 29928, 1254, 2636, 29922, 29940, 29990, 29924, 29918, 9800, 29918, 2544, 29950, 29918, 29903, 10363, 29961, 1402, 613, 13, 9651, 376, 1359, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29900, 2636, 976, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29900, 29961, 1402, 613, 13, 9651, 376, 1359, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29906, 29961, 29896, 29906, 636, 29906, 29941, 1402, 613, 13, 9651, 376, 1359, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29896, 29906, 636, 29906, 29941, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29906, 29961, 29900, 636, 29896, 29896, 11724, 613, 13, 9651, 376, 4905, 29901, 8875, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29873, 348, 29918, 333, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 11116, 29918, 5550, 29931, 1806, 511, 13, 9651, 376, 11671, 29918, 22992, 29922, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29914, 29900, 29896, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29892, 613, 13, 9651, 376, 7387, 29922, 690, 431, 2415, 29898, 29892, 8875, 511, 690, 431, 2415, 29898, 29892, 29912, 1800, 1642, 4830, 29898, 13, 18884, 10911, 29918, 3904, 2965, 28938, 29918, 1307, 15249, 29911, 29892, 10911, 29918, 3904, 2965, 28938, 29918, 3301, 7390, 29979, 13, 18884, 1723, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 11116, 29918, 5550, 29931, 1806, 511, 13, 9651, 376, 11671, 29918, 22992, 29922, 29900, 29896, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29914, 29900, 29896, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29901, 29900, 29900, 29892, 613, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 29924, 8647, 2965, 28938, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3904, 2965, 28938, 29918, 1307, 15249, 29911, 511, 13, 9651, 376, 29886, 21766, 29922, 29900, 29892, 8820, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3904, 2965, 28938, 29918, 3301, 7390, 29979, 511, 13, 9651, 376, 29886, 21766, 29922, 29906, 29900, 29892, 1072, 29900, 29922, 29900, 29892, 8820, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 29924, 8647, 2965, 28938, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3904, 2965, 28938, 29918, 3301, 7390, 29979, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 613, 13, 9651, 376, 7387, 29922, 11631, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29900, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 1402, 613, 13, 9651, 376, 11631, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29906, 29961, 29900, 636, 29906, 29941, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29900, 636, 29906, 29941, 1402, 613, 13, 9651, 376, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29924, 8647, 2965, 28938, 511, 13, 9651, 376, 7387, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 511, 13, 9651, 376, 7387, 29922, 8865, 29908, 13, 9651, 1723, 13, 13, 1678, 822, 2069, 29918, 262, 29898, 1311, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 262, 29892, 9406, 29922, 8824, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 262, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 7387, 29922, 8945, 29908, 13, 9651, 1723, 13, 13, 1678, 822, 2069, 29918, 449, 29898, 1311, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 449, 29892, 9406, 29922, 8824, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 449, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 7387, 29922, 8945, 29908, 13, 9651, 1723, 13, 13, 1678, 822, 2069, 29918, 29885, 415, 6814, 29898, 1311, 29892, 3579, 19290, 1125, 13, 4706, 3667, 29879, 29941, 29889, 842, 29918, 15697, 29898, 1311, 29892, 5712, 29922, 5574, 29892, 3579, 19290, 29897, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 9406, 29922, 8824, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 29963, 29931, 2190, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 262, 29918, 637, 3790, 1118, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29885, 415, 6814, 29918, 637, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 22729, 29892, 613, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 22051, 29956, 17011, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 564, 29886, 29892, 613, 13, 9651, 376, 7387, 29922, 19668, 29898, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 29911, 511, 13, 9651, 376, 621, 29918, 4351, 29922, 29923, 29896, 29901, 29947, 29923, 29901, 29941, 29953, 29901, 29947, 29907, 29901, 29943, 29953, 29901, 29900, 29928, 29892, 11314, 29918, 1853, 29922, 29900, 29916, 29900, 29947, 29900, 29900, 29892, 613, 13, 9651, 376, 29940, 29990, 29924, 29918, 9800, 29918, 5690, 29918, 29928, 1254, 2636, 29922, 29940, 29990, 29924, 29918, 9800, 29918, 1718, 29925, 29918, 5550, 29909, 29961, 1402, 613, 13, 9651, 376, 1359, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 1718, 29925, 29918, 23498, 2636, 976, 29940, 29990, 29924, 29918, 9800, 29918, 2544, 29950, 29918, 29928, 1254, 29961, 1402, 613, 13, 9651, 376, 4905, 29901, 29940, 29990, 29924, 29918, 9800, 29918, 1177, 29918, 15082, 23076, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 511, 13, 9651, 376, 29886, 21766, 29922, 29900, 29892, 8820, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 29963, 29931, 2190, 511, 13, 9651, 376, 29886, 21766, 29922, 29900, 29892, 8820, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 29911, 511, 13, 9651, 376, 29886, 21766, 29922, 29900, 29892, 8820, 29922, 8865, 29908, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 22051, 29956, 17011, 511, 13, 9651, 376, 29886, 21766, 29922, 29900, 29892, 8820, 29922, 8865, 29908, 13, 9651, 1723, 13, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 262, 29918, 637, 3790, 1118, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29873, 348, 29918, 637, 29918, 29885, 415, 6814, 511, 13, 9651, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 1177, 29918, 3580, 29911, 6271, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 1177, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 7387, 29922, 8865, 29908, 13, 9651, 1723, 13, 13, 13, 1678, 822, 788, 29918, 14701, 29898, 1311, 29892, 2011, 29892, 325, 1240, 29892, 11314, 29918, 10030, 1125, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 29963, 29931, 2190, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 297, 29918, 637, 3790, 29913, 1642, 4830, 29898, 637, 511, 13, 9651, 376, 7387, 29922, 1545, 29918, 29894, 6468, 29918, 8590, 26254, 1118, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 376, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 1307, 15249, 29911, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 22051, 29956, 17011, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 325, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 29913, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 376, 7387, 29922, 842, 29918, 2671, 29901, 8875, 976, 621, 29918, 22992, 29892, 17010, 29918, 29894, 6468, 29892, 1642, 4830, 29898, 621, 29918, 10030, 511, 13, 9651, 376, 4905, 29901, 8875, 1642, 4830, 29898, 637, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 23981, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29916, 6822, 29900, 29916, 18725, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 376, 7387, 29922, 11631, 29901, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 21738, 29911, 29918, 1529, 29934, 29968, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 11631, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 4905, 29901, 8875, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29873, 348, 29918, 637, 29918, 29885, 415, 6814, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 6834, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29916, 6822, 29900, 29916, 18725, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 376, 7387, 29922, 690, 431, 2415, 29898, 29892, 8875, 511, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 511, 13, 9651, 376, 11631, 29901, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 21738, 29911, 29918, 1529, 29934, 29968, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 11631, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 4905, 29901, 8875, 1642, 4830, 29898, 1311, 29889, 5041, 29918, 29873, 348, 29918, 637, 29918, 29885, 415, 6814, 29897, 13, 9651, 1723, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 1177, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 376, 7387, 29922, 11631, 29901, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29896, 29906, 636, 29906, 29941, 29962, 613, 13, 9651, 376, 11631, 29901, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 21738, 29911, 29918, 1529, 29934, 29968, 29961, 29900, 636, 29896, 29896, 28895, 29940, 29990, 29924, 29918, 9800, 29918, 29963, 29931, 2190, 29918, 29911, 8426, 29961, 29900, 636, 29896, 29896, 29962, 613, 13, 9651, 376, 1359, 29901, 8875, 976, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 29911, 3904, 29918, 1367, 29961, 29900, 636, 29896, 29896, 29962, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 511, 13, 9651, 376, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 29897, 13, 9651, 1723, 13, 13, 13, 1678, 822, 628, 29918, 14701, 29898, 1311, 29892, 2011, 29892, 325, 1240, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 29963, 29931, 2190, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 297, 29918, 637, 3790, 29913, 1642, 4830, 29898, 637, 29897, 13, 9651, 1723, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29885, 415, 6814, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 3580, 29911, 6271, 29918, 22051, 29956, 17011, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 325, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 29913, 1642, 4830, 29898, 29894, 1240, 29897, 13, 9651, 1723, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 23981, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29916, 6822, 29900, 29916, 18725, 1642, 4830, 29898, 29894, 1240, 29897, 13, 9651, 1723, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 1699, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 6834, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29916, 6822, 29900, 29916, 18725, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 1723, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 1177, 29918, 3580, 29911, 6271, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 1642, 4830, 29898, 29894, 1240, 511, 13, 9651, 1723, 13, 13, 13, 13, 1678, 822, 788, 29918, 29873, 16163, 29898, 1311, 29892, 2011, 29918, 333, 1125, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 262, 29918, 637, 3790, 1118, 8820, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 637, 29918, 333, 29892, 10911, 29918, 29963, 12916, 29918, 5550, 29931, 1806, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 628, 29918, 29873, 16163, 29898, 1311, 29892, 2011, 29918, 333, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 25826, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 297, 29918, 637, 3790, 29913, 1642, 4830, 29898, 637, 29918, 333, 29897, 13, 9651, 1723, 13, 13, 13, 1678, 822, 788, 29918, 13134, 29898, 1311, 29892, 325, 1240, 29892, 2011, 29918, 333, 1125, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 511, 13, 9651, 376, 29873, 348, 29918, 333, 3790, 6822, 29900, 29916, 18725, 29892, 8820, 29922, 4905, 29901, 8875, 1642, 4830, 29898, 29894, 1240, 29892, 2011, 29918, 333, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 628, 29918, 13134, 29898, 1311, 29892, 325, 1240, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 1672, 2692, 4214, 511, 13, 9651, 376, 29886, 21766, 29922, 29896, 29900, 29892, 18515, 29918, 333, 3790, 6822, 29900, 29916, 18725, 1642, 4830, 29898, 29894, 1240, 29897, 13, 9651, 1723, 13, 13, 13, 13, 1678, 822, 788, 29918, 4548, 9454, 29898, 1311, 29892, 13184, 29892, 1518, 550, 1080, 29918, 1761, 29892, 1887, 29918, 29894, 6468, 1125, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 511, 13, 9651, 376, 29873, 348, 29918, 333, 29922, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 1118, 1642, 4830, 29898, 4548, 9454, 3366, 412, 261, 29918, 29894, 1240, 12436, 1311, 29889, 1311, 29918, 29894, 1240, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 11393, 4830, 29898, 4548, 9454, 3366, 1639, 9274, 29918, 333, 3108, 511, 13, 9651, 376, 7387, 29922, 1545, 29918, 29894, 6468, 29918, 8590, 26254, 1118, 1642, 4830, 29898, 2997, 29918, 29894, 6468, 511, 13, 9651, 376, 1359, 29901, 8875, 976, 29940, 29990, 29924, 29918, 29940, 29990, 29918, 18166, 29900, 29961, 1402, 1642, 4830, 29898, 20970, 29898, 4548, 9454, 3366, 1639, 9274, 29918, 333, 20068, 511, 13, 9651, 376, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 1307, 25614, 29897, 13, 9651, 1723, 13, 4706, 565, 13184, 3366, 29885, 415, 6814, 3108, 29901, 13, 9651, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 511, 13, 18884, 376, 29886, 21766, 29922, 29896, 29900, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 1118, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 29892, 13, 462, 1678, 13184, 3366, 412, 261, 29918, 29894, 1240, 3108, 13, 462, 1678, 10353, 13, 18884, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 1642, 4830, 29898, 4548, 9454, 3366, 1639, 9274, 29918, 333, 3108, 511, 13, 18884, 376, 7387, 29922, 27102, 29918, 2371, 29901, 8875, 1642, 4830, 29898, 21009, 29918, 3301, 7390, 29979, 29918, 3580, 29911, 6271, 29897, 13, 18884, 1723, 13, 4706, 8820, 29922, 2636, 13, 4706, 363, 13184, 29918, 4713, 297, 1518, 550, 1080, 29918, 1761, 29901, 13, 9651, 8820, 29889, 4397, 703, 1545, 29918, 29894, 6468, 29918, 8590, 29901, 8875, 1642, 4830, 29898, 4548, 9454, 29918, 4713, 3366, 1639, 9274, 29918, 333, 3108, 876, 13, 9651, 8820, 29889, 4397, 703, 842, 29918, 2671, 29901, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 29913, 976, 29873, 348, 29918, 333, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 29892, 13, 18884, 13184, 29918, 4713, 3366, 412, 261, 29918, 29894, 1240, 3108, 13, 462, 876, 13, 9651, 8820, 29889, 4397, 703, 690, 431, 2415, 29898, 29892, 29912, 1800, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 876, 13, 4706, 8820, 29918, 710, 353, 9162, 1642, 7122, 29898, 7387, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29924, 8647, 2965, 28938, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 1642, 4830, 29898, 2997, 29918, 29894, 6468, 511, 13, 9651, 376, 7387, 3790, 29913, 1642, 4830, 29898, 7387, 29918, 710, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 628, 29918, 4548, 9454, 29898, 1311, 29892, 13184, 29892, 1518, 550, 1080, 29918, 1761, 29892, 1887, 29918, 29894, 6468, 1125, 13, 4706, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29963, 29931, 2190, 29918, 3210, 16658, 511, 13, 9651, 376, 29873, 348, 29918, 333, 29922, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 1118, 1642, 4830, 29898, 4548, 9454, 3366, 412, 261, 29918, 29894, 1240, 12436, 1311, 29889, 1311, 29918, 29894, 1240, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 11393, 4830, 29898, 4548, 9454, 3366, 1639, 9274, 29918, 333, 3108, 511, 13, 9651, 1723, 13, 4706, 565, 13184, 3366, 29885, 415, 6814, 3108, 29901, 13, 9651, 628, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 511, 13, 18884, 376, 29886, 21766, 29922, 29896, 29900, 29892, 18515, 29918, 333, 29922, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 1118, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 29892, 13, 462, 1678, 13184, 3366, 412, 261, 29918, 29894, 1240, 3108, 13, 462, 1678, 10353, 13, 18884, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 1642, 4830, 29898, 4548, 9454, 3366, 1639, 9274, 29918, 333, 3108, 511, 13, 18884, 1723, 13, 4706, 8820, 29922, 2636, 13, 4706, 363, 13184, 29918, 4713, 297, 1518, 550, 1080, 29918, 1761, 29901, 13, 9651, 8820, 29889, 4397, 703, 1545, 29918, 29894, 6468, 29918, 8590, 29901, 8875, 1642, 4830, 29898, 4548, 9454, 29918, 4713, 3366, 1639, 9274, 29918, 333, 3108, 876, 13, 9651, 8820, 29889, 4397, 703, 842, 29918, 2671, 29901, 29900, 29916, 25641, 29900, 29941, 29916, 1157, 29901, 29900, 29941, 29916, 29913, 976, 29873, 348, 29918, 333, 1642, 4830, 29898, 1311, 29889, 1311, 29918, 29894, 1240, 29892, 13, 18884, 13184, 29918, 4713, 3366, 412, 261, 29918, 29894, 1240, 3108, 13, 462, 876, 13, 9651, 8820, 29889, 4397, 703, 690, 431, 2415, 29898, 29892, 29912, 1800, 1642, 4830, 29898, 21009, 29918, 5550, 29931, 1806, 29918, 3580, 29911, 6271, 876, 13, 4706, 8820, 29918, 710, 353, 9162, 1642, 7122, 29898, 7387, 29897, 13, 4706, 788, 29918, 1731, 29898, 1311, 29889, 6099, 29918, 29873, 348, 29892, 376, 2371, 3790, 1118, 20136, 29922, 29896, 29900, 29892, 1642, 4830, 29898, 21009, 29918, 29924, 8647, 2965, 28938, 511, 13, 9651, 376, 29894, 6468, 29918, 8590, 29922, 29900, 29916, 29896, 25641, 29900, 29941, 29916, 6822, 29900, 29916, 29896, 18725, 29892, 1642, 4830, 29898, 2997, 29918, 29894, 6468, 511, 13, 9651, 376, 7387, 3790, 29913, 1642, 4830, 29898, 7387, 29918, 710, 29897, 13, 9651, 1723, 2 ]
arrowhead/decorators.py
zyga/arrowhead
2
82707
import functools import inspect import types from arrowhead.core import ErrorArrow from arrowhead.core import NormalArrow from arrowhead.core import Step from arrowhead.core import ValueArrow def step(func_or_label=None, **kwargs): """ Decorator for converting functions to steps. This decorator can be applied in a number of ways:: @step def do_stuff(self): pass @step def do_other_stuff(self): pass Without any arguments it just creates a step that when executed, will call the decorated function. Typically steps will also need to be decorated with the @arrow decorator to form a sensible graph but in very simple cases one can rely on the top-to-bottom implicit arrows. With arguments, one can specify several additional details. The most important are the initial and accepting flags:: @step(initial=True) def start(self): pass @step(accepting=True) def stop(self): pass Within one flow exactly one step must be initial. A ProgrammingError exception is raised if that is not the case. All exceptions of this type carry additional information to help diagnose the problem. All steps have a label. By default, if you don't provide one and the decorated function doesn't have a docstring then function name is used as a label. Labels are very important as they can be used to 'address' steps throughout the graph. Labels can obviously be specified explicitly:: @step(label="Start your engines!") def start_engines(self): pass As a convention, the first line of the docstring becomes the implicit label of any step, unless overridden with an explicit label. This encourages documentation and improves the readability of the built-in flow debugger. @step def load_all_data(self): ''' load all data from the disk This long description is not a part of the label. Luckily! ''' .. note:: The order of @step and @arrow calls is irrelevant. """ if func_or_label is None or isinstance(func_or_label, str): if func_or_label is not None: kwargs['label'] = func_or_label @functools.wraps(func_or_label) def step(func): return _convert_to_step(func, **kwargs) return step else: return _convert_to_step(func_or_label) def arrow(to, **kwargs): """ Decorator for attaching arrows between steps. :param to: step to go to :param value: (optional) value to associate the arrow with :param value: (optional) error to associate the arrow with In the most basic mode the arrow connects two steps together. In the example below the two steps would create an infinite loop going from the first step to the second step and back:: @arrow('second') @step def first(self): print("First") @arrow(to='first') @step def second(self): print("Second") Arrows can carry a value condition, such arrows are only followed if the ``value`` argument is equal to ``step.value``. This can be used to create typical flow control structures. In the example below the step will either go left or right, depending on the outcome of a coin toss:: @arrow('go_left', value='heads') @arrow('go_right', value='tails') @step def fork_in_the_road(self): self.value = toss_a_coin() Lastly arrows can carry an error condition. This is useful to structure abnormal exits so that the program won't crash but instead do something sensible for the user. Such arrows are followed if the runtime error instance is a subclass of the ``error`` argument. For a contrived example let's pretend that the coin can someties land on the side and in that case we want to just try again:: @arrow('go_left', value='heads') @arrow('go_right', value='tails') @arrow('fork_in_the_road', error=CoinLandedOnTheSide) @step def fork_in_the_road(self): self.value = toss_a_coin() """ target = _resolve_arrow_target(to) if 'value' in kwargs: value = kwargs.pop('value') arrow = ValueArrow(target, value) elif 'error' in kwargs: error = kwargs.pop('error') arrow = ErrorArrow(target, error) else: arrow = NormalArrow(target) if kwargs: raise TypeError("stray arguments: {!r}".format(kwargs)) def decorator(decoratee): if isinstance(decoratee, Step): step = decoratee step.Meta.arrows.append(arrow) elif isinstance(decoratee, types.FunctionType): func = decoratee if not hasattr(func, 'arrows'): func.arrows = [] func.arrows.append(arrow) else: raise TypeError( "unsupported decorated type {}".format(type(decoratee))) return decoratee return decorator def _resolve_arrow_target(target): """ Convert arrow target specification to a step name :param target: arrow target specification :returns: name of the target step :raises TypeError: if the target specification is incorrect The target specification can be one of three things: a Step class, a string or a function. Step classes use cls.Meta.label, functions use func.__name__ and strings are used as-is. """ if isinstance(target, type) and issubclass(target, Step): return target.Meta.label elif isinstance(target, types.FunctionType): return target.__name__ elif isinstance(target, str): return target else: raise TypeError("unsupported target type: {0}".format(type(target))) def _convert_to_step(func, label=None, initial=None, accepting=False, level=None): """ Convert a step function to a subclass of :class:`Step` :param func: Function to work with :param goto: The default step to take next :param initial: if True, this step will be the initial step of the flow :param accepting: if True, this step will be an accepting step :param level: explicit level number for graph layout """ if label is None: if func.__doc__: label = func.__doc__.lstrip().splitlines()[0] else: label = func.__name__ ns = { 'name': func.__name__, 'label': label, 'initial': initial, 'accepting': accepting, 'arrows': func.arrows if hasattr(func, 'arrows') else [], 'needs_flow': 'flow' in inspect.getargspec(func)[0], 'level': level, '__call__': func, } return type(func.__name__, (Step,), ns)
[ 1, 1053, 2090, 312, 8789, 13, 5215, 16096, 13, 5215, 4072, 13, 13, 3166, 16578, 2813, 29889, 3221, 1053, 4829, 1433, 798, 13, 3166, 16578, 2813, 29889, 3221, 1053, 21981, 1433, 798, 13, 3166, 16578, 2813, 29889, 3221, 1053, 16696, 13, 3166, 16578, 2813, 29889, 3221, 1053, 7865, 1433, 798, 13, 13, 13, 1753, 4331, 29898, 9891, 29918, 272, 29918, 1643, 29922, 8516, 29892, 3579, 19290, 1125, 13, 1678, 9995, 13, 1678, 3826, 272, 1061, 363, 17415, 3168, 304, 6576, 29889, 13, 13, 1678, 910, 10200, 1061, 508, 367, 7436, 297, 263, 1353, 310, 5837, 1057, 13, 13, 4706, 732, 10568, 13, 4706, 822, 437, 29918, 303, 3096, 29898, 1311, 1125, 13, 9651, 1209, 13, 13, 4706, 732, 10568, 13, 4706, 822, 437, 29918, 1228, 29918, 303, 3096, 29898, 1311, 1125, 13, 9651, 1209, 13, 13, 1678, 13932, 738, 6273, 372, 925, 10017, 263, 4331, 393, 746, 8283, 29892, 674, 1246, 13, 1678, 278, 10200, 630, 740, 29889, 14213, 1711, 6576, 674, 884, 817, 304, 367, 10200, 630, 411, 13, 1678, 278, 732, 2936, 10200, 1061, 304, 883, 263, 25182, 3983, 541, 297, 1407, 2560, 4251, 697, 13, 1678, 508, 19104, 373, 278, 2246, 29899, 517, 29899, 8968, 12235, 564, 5727, 29889, 13, 13, 1678, 2973, 6273, 29892, 697, 508, 6084, 3196, 5684, 4902, 29889, 450, 1556, 13, 1678, 4100, 526, 278, 2847, 322, 25967, 13449, 1057, 13, 13, 4706, 732, 10568, 29898, 11228, 29922, 5574, 29897, 13, 4706, 822, 1369, 29898, 1311, 1125, 13, 9651, 1209, 13, 13, 4706, 732, 10568, 29898, 16044, 292, 29922, 5574, 29897, 13, 4706, 822, 5040, 29898, 1311, 1125, 13, 9651, 1209, 13, 13, 1678, 23732, 697, 4972, 3721, 697, 4331, 1818, 367, 2847, 29889, 319, 7835, 4056, 2392, 13, 1678, 3682, 338, 10425, 565, 393, 338, 451, 278, 1206, 29889, 2178, 15283, 310, 445, 1134, 13, 1678, 8677, 5684, 2472, 304, 1371, 24876, 852, 278, 1108, 29889, 13, 13, 1678, 2178, 6576, 505, 263, 3858, 29889, 2648, 2322, 29892, 565, 366, 1016, 29915, 29873, 3867, 697, 322, 278, 13, 1678, 10200, 630, 740, 1838, 29915, 29873, 505, 263, 1574, 1807, 769, 740, 1024, 338, 1304, 408, 263, 13, 1678, 3858, 29889, 15796, 29879, 526, 1407, 4100, 408, 896, 508, 367, 1304, 304, 525, 7328, 29915, 6576, 13, 1678, 10106, 278, 3983, 29889, 15796, 29879, 508, 12879, 367, 6790, 9479, 1057, 13, 13, 4706, 732, 10568, 29898, 1643, 543, 4763, 596, 24000, 29991, 1159, 13, 4706, 822, 1369, 29918, 996, 1475, 29898, 1311, 1125, 13, 9651, 1209, 13, 13, 1678, 1094, 263, 15687, 29892, 278, 937, 1196, 310, 278, 1574, 1807, 7415, 278, 12235, 3858, 13, 1678, 310, 738, 4331, 29892, 6521, 20831, 1145, 411, 385, 6261, 3858, 29889, 910, 18443, 267, 13, 1678, 5106, 322, 4857, 1960, 278, 1303, 3097, 310, 278, 4240, 29899, 262, 4972, 18297, 29889, 13, 13, 4706, 732, 10568, 13, 4706, 822, 2254, 29918, 497, 29918, 1272, 29898, 1311, 1125, 13, 9651, 14550, 13, 9651, 2254, 599, 848, 515, 278, 8086, 13, 13, 9651, 910, 1472, 6139, 338, 451, 263, 760, 310, 278, 3858, 29889, 365, 2707, 2354, 29991, 13, 9651, 14550, 13, 13, 1678, 6317, 4443, 1057, 13, 4706, 450, 1797, 310, 732, 10568, 322, 732, 2936, 5717, 338, 28190, 29889, 13, 1678, 9995, 13, 1678, 565, 3653, 29918, 272, 29918, 1643, 338, 6213, 470, 338, 8758, 29898, 9891, 29918, 272, 29918, 1643, 29892, 851, 1125, 13, 4706, 565, 3653, 29918, 272, 29918, 1643, 338, 451, 6213, 29901, 13, 9651, 9049, 5085, 1839, 1643, 2033, 353, 3653, 29918, 272, 29918, 1643, 13, 13, 4706, 732, 7692, 312, 8789, 29889, 29893, 336, 567, 29898, 9891, 29918, 272, 29918, 1643, 29897, 13, 4706, 822, 4331, 29898, 9891, 1125, 13, 9651, 736, 903, 13441, 29918, 517, 29918, 10568, 29898, 9891, 29892, 3579, 19290, 29897, 13, 4706, 736, 4331, 13, 1678, 1683, 29901, 13, 4706, 736, 903, 13441, 29918, 517, 29918, 10568, 29898, 9891, 29918, 272, 29918, 1643, 29897, 13, 13, 13, 1753, 16578, 29898, 517, 29892, 3579, 19290, 1125, 13, 1678, 9995, 13, 1678, 3826, 272, 1061, 363, 1098, 9733, 564, 5727, 1546, 6576, 29889, 13, 13, 1678, 584, 3207, 304, 29901, 13, 4706, 4331, 304, 748, 304, 13, 1678, 584, 3207, 995, 29901, 13, 4706, 313, 25253, 29897, 995, 304, 25836, 278, 16578, 411, 13, 1678, 584, 3207, 995, 29901, 13, 4706, 313, 25253, 29897, 1059, 304, 25836, 278, 16578, 411, 13, 13, 1678, 512, 278, 1556, 6996, 4464, 278, 16578, 4511, 29879, 1023, 6576, 4208, 29889, 29871, 512, 278, 13, 1678, 1342, 2400, 278, 1023, 6576, 723, 1653, 385, 10362, 2425, 2675, 515, 278, 13, 1678, 937, 4331, 304, 278, 1473, 4331, 322, 1250, 1057, 13, 13, 4706, 732, 2936, 877, 7496, 1495, 13, 4706, 732, 10568, 13, 4706, 822, 937, 29898, 1311, 1125, 13, 9651, 1596, 703, 6730, 1159, 13, 13, 4706, 732, 2936, 29898, 517, 2433, 4102, 1495, 13, 4706, 732, 10568, 13, 4706, 822, 1473, 29898, 1311, 1125, 13, 9651, 1596, 703, 11863, 1159, 13, 13, 1678, 826, 5727, 508, 8677, 263, 995, 4195, 29892, 1316, 564, 5727, 526, 871, 5643, 565, 278, 13, 1678, 4954, 1767, 16159, 2980, 338, 5186, 304, 4954, 10568, 29889, 1767, 29952, 1412, 910, 508, 367, 1304, 304, 1653, 13, 1678, 15662, 4972, 2761, 12286, 29889, 512, 278, 1342, 2400, 278, 4331, 674, 13, 1678, 2845, 748, 2175, 470, 1492, 29892, 8679, 373, 278, 21957, 310, 263, 19480, 28189, 1057, 13, 13, 4706, 732, 2936, 877, 1484, 29918, 1563, 742, 995, 2433, 2813, 29879, 1495, 13, 4706, 732, 2936, 877, 1484, 29918, 1266, 742, 995, 2433, 29873, 2234, 1495, 13, 4706, 732, 10568, 13, 4706, 822, 27350, 29918, 262, 29918, 1552, 29918, 9972, 29898, 1311, 1125, 13, 9651, 1583, 29889, 1767, 353, 28189, 29918, 29874, 29918, 1111, 262, 580, 13, 13, 1678, 9208, 368, 564, 5727, 508, 8677, 385, 1059, 4195, 29889, 910, 338, 5407, 304, 3829, 13, 1678, 633, 8945, 429, 1169, 577, 393, 278, 1824, 2113, 29915, 29873, 8095, 541, 2012, 437, 1554, 13, 1678, 25182, 363, 278, 1404, 29889, 10506, 564, 5727, 526, 5643, 565, 278, 10073, 1059, 13, 1678, 2777, 338, 263, 19481, 310, 278, 4954, 2704, 16159, 2980, 29889, 1152, 263, 640, 1150, 287, 1342, 13, 1678, 1235, 29915, 29879, 14794, 355, 393, 278, 19480, 508, 5895, 583, 2982, 373, 278, 2625, 322, 297, 393, 13, 1678, 1206, 591, 864, 304, 925, 1018, 1449, 1057, 13, 13, 4706, 732, 2936, 877, 1484, 29918, 1563, 742, 995, 2433, 2813, 29879, 1495, 13, 4706, 732, 2936, 877, 1484, 29918, 1266, 742, 995, 2433, 29873, 2234, 1495, 13, 4706, 732, 2936, 877, 29888, 548, 29918, 262, 29918, 1552, 29918, 9972, 742, 1059, 29922, 7967, 262, 22677, 287, 2951, 1576, 23908, 29897, 13, 4706, 732, 10568, 13, 4706, 822, 27350, 29918, 262, 29918, 1552, 29918, 9972, 29898, 1311, 1125, 13, 9651, 1583, 29889, 1767, 353, 28189, 29918, 29874, 29918, 1111, 262, 580, 13, 1678, 9995, 13, 1678, 3646, 353, 903, 17863, 29918, 2936, 29918, 5182, 29898, 517, 29897, 13, 1678, 565, 525, 1767, 29915, 297, 9049, 5085, 29901, 13, 4706, 995, 353, 9049, 5085, 29889, 7323, 877, 1767, 1495, 13, 4706, 16578, 353, 7865, 1433, 798, 29898, 5182, 29892, 995, 29897, 13, 1678, 25342, 525, 2704, 29915, 297, 9049, 5085, 29901, 13, 4706, 1059, 353, 9049, 5085, 29889, 7323, 877, 2704, 1495, 13, 4706, 16578, 353, 4829, 1433, 798, 29898, 5182, 29892, 1059, 29897, 13, 1678, 1683, 29901, 13, 4706, 16578, 353, 21981, 1433, 798, 29898, 5182, 29897, 13, 1678, 565, 9049, 5085, 29901, 13, 4706, 12020, 20948, 703, 303, 764, 6273, 29901, 426, 29991, 29878, 29913, 1642, 4830, 29898, 19290, 876, 13, 13, 1678, 822, 10200, 1061, 29898, 19557, 403, 29872, 1125, 13, 4706, 565, 338, 8758, 29898, 19557, 403, 29872, 29892, 16696, 1125, 13, 9651, 4331, 353, 10200, 403, 29872, 13, 9651, 4331, 29889, 19346, 29889, 2936, 29879, 29889, 4397, 29898, 2936, 29897, 13, 4706, 25342, 338, 8758, 29898, 19557, 403, 29872, 29892, 4072, 29889, 6678, 1542, 1125, 13, 9651, 3653, 353, 10200, 403, 29872, 13, 9651, 565, 451, 756, 5552, 29898, 9891, 29892, 525, 2936, 29879, 29374, 13, 18884, 3653, 29889, 2936, 29879, 353, 5159, 13, 9651, 3653, 29889, 2936, 29879, 29889, 4397, 29898, 2936, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 20948, 29898, 13, 18884, 376, 348, 23765, 10200, 630, 1134, 6571, 1642, 4830, 29898, 1853, 29898, 19557, 403, 29872, 4961, 13, 4706, 736, 10200, 403, 29872, 13, 1678, 736, 10200, 1061, 13, 13, 13, 1753, 903, 17863, 29918, 2936, 29918, 5182, 29898, 5182, 1125, 13, 1678, 9995, 13, 1678, 14806, 16578, 3646, 21992, 304, 263, 4331, 1024, 13, 13, 1678, 584, 3207, 3646, 29901, 13, 4706, 16578, 3646, 21992, 13, 1678, 584, 18280, 29901, 13, 4706, 1024, 310, 278, 3646, 4331, 13, 1678, 584, 336, 4637, 20948, 29901, 13, 4706, 565, 278, 3646, 21992, 338, 10240, 13, 13, 1678, 450, 3646, 21992, 508, 367, 697, 310, 2211, 2712, 29901, 263, 16696, 770, 29892, 263, 13, 1678, 1347, 470, 263, 740, 29889, 16696, 4413, 671, 1067, 29879, 29889, 19346, 29889, 1643, 29892, 3168, 671, 13, 1678, 3653, 17255, 978, 1649, 322, 6031, 526, 1304, 408, 29899, 275, 29889, 13, 1678, 9995, 13, 1678, 565, 338, 8758, 29898, 5182, 29892, 1134, 29897, 322, 338, 1491, 1990, 29898, 5182, 29892, 16696, 1125, 13, 4706, 736, 3646, 29889, 19346, 29889, 1643, 13, 1678, 25342, 338, 8758, 29898, 5182, 29892, 4072, 29889, 6678, 1542, 1125, 13, 4706, 736, 3646, 17255, 978, 1649, 13, 1678, 25342, 338, 8758, 29898, 5182, 29892, 851, 1125, 13, 4706, 736, 3646, 13, 1678, 1683, 29901, 13, 4706, 12020, 20948, 703, 348, 23765, 3646, 1134, 29901, 426, 29900, 29913, 1642, 4830, 29898, 1853, 29898, 5182, 4961, 13, 13, 13, 1753, 903, 13441, 29918, 517, 29918, 10568, 29898, 9891, 29892, 3858, 29922, 8516, 29892, 2847, 29922, 8516, 29892, 25967, 29922, 8824, 29892, 13, 462, 268, 3233, 29922, 8516, 1125, 13, 1678, 9995, 13, 1678, 14806, 263, 4331, 740, 304, 263, 19481, 310, 584, 1990, 18078, 14448, 29952, 13, 13, 1678, 584, 3207, 3653, 29901, 13, 4706, 6680, 304, 664, 411, 13, 1678, 584, 3207, 2355, 29877, 29901, 13, 4706, 450, 2322, 4331, 304, 2125, 2446, 13, 1678, 584, 3207, 2847, 29901, 13, 4706, 565, 5852, 29892, 445, 4331, 674, 367, 278, 2847, 4331, 310, 278, 4972, 13, 1678, 584, 3207, 25967, 29901, 13, 4706, 565, 5852, 29892, 445, 4331, 674, 367, 385, 25967, 4331, 13, 1678, 584, 3207, 3233, 29901, 13, 4706, 6261, 3233, 1353, 363, 3983, 5912, 13, 1678, 9995, 13, 1678, 565, 3858, 338, 6213, 29901, 13, 4706, 565, 3653, 17255, 1514, 1649, 29901, 13, 9651, 3858, 353, 3653, 17255, 1514, 26914, 29880, 17010, 2141, 5451, 9012, 580, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 3858, 353, 3653, 17255, 978, 1649, 13, 1678, 17534, 353, 426, 13, 4706, 525, 978, 2396, 3653, 17255, 978, 1649, 29892, 13, 4706, 525, 1643, 2396, 3858, 29892, 13, 4706, 525, 11228, 2396, 2847, 29892, 13, 4706, 525, 16044, 292, 2396, 25967, 29892, 13, 4706, 525, 2936, 29879, 2396, 3653, 29889, 2936, 29879, 565, 756, 5552, 29898, 9891, 29892, 525, 2936, 29879, 1495, 1683, 19997, 13, 4706, 525, 484, 5779, 29918, 1731, 2396, 525, 1731, 29915, 297, 16096, 29889, 657, 5085, 3135, 29898, 9891, 9601, 29900, 1402, 13, 4706, 525, 5563, 2396, 3233, 29892, 13, 4706, 525, 1649, 4804, 1649, 2396, 3653, 29892, 13, 1678, 500, 13, 1678, 736, 1134, 29898, 9891, 17255, 978, 1649, 29892, 313, 14448, 29892, 511, 17534, 29897, 13, 2 ]
setup.py
c-rainbow/twitch-chat-analyzer-py
0
184916
<filename>setup.py import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="twitch-chat-analyzer", # Replace with your own username version="0.0.5", author="Rainbow", author_email="<EMAIL>", description="Twitch chat analyzer from past broadcasts, designed for Jupyter notebook", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/c-rainbow/twitch-chat-analyzer-py", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3.5", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.5', )
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 5215, 731, 21245, 8789, 13, 13, 2541, 1722, 703, 16310, 2303, 29889, 3487, 613, 376, 29878, 613, 8025, 543, 9420, 29899, 29947, 1159, 408, 285, 29882, 29901, 13, 1678, 1472, 29918, 8216, 353, 285, 29882, 29889, 949, 580, 13, 13, 842, 21245, 8789, 29889, 14669, 29898, 13, 1678, 1024, 543, 7516, 2335, 29899, 13496, 29899, 24209, 3298, 613, 396, 22108, 411, 596, 1914, 8952, 13, 1678, 1873, 543, 29900, 29889, 29900, 29889, 29945, 613, 13, 1678, 4148, 543, 29934, 475, 17729, 613, 13, 1678, 4148, 29918, 5269, 543, 29966, 26862, 6227, 28341, 13, 1678, 6139, 543, 27418, 2335, 13563, 16455, 3298, 515, 4940, 12672, 29879, 29892, 8688, 363, 27441, 25547, 451, 19273, 613, 13, 1678, 1472, 29918, 8216, 29922, 5426, 29918, 8216, 29892, 13, 1678, 1472, 29918, 8216, 29918, 3051, 29918, 1853, 543, 726, 29914, 3502, 3204, 613, 13, 1678, 3142, 543, 991, 597, 3292, 29889, 510, 29914, 29883, 29899, 6038, 17729, 29914, 7516, 2335, 29899, 13496, 29899, 24209, 3298, 29899, 2272, 613, 13, 1678, 9741, 29922, 842, 21245, 8789, 29889, 2886, 29918, 8318, 3285, 13, 1678, 770, 14903, 11759, 13, 4706, 376, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29941, 29889, 29945, 613, 13, 4706, 376, 29931, 293, 1947, 4761, 438, 5425, 28268, 1490, 4761, 341, 1806, 19245, 613, 13, 4706, 376, 7094, 1218, 2184, 4761, 6570, 25266, 613, 13, 1678, 21251, 13, 1678, 3017, 29918, 276, 339, 2658, 2433, 18572, 29941, 29889, 29945, 742, 13, 29897, 13, 2 ]
src/pretix/api/serializers/organizer.py
NicsTr/pretix
0
1616795
<gh_stars>0 from decimal import Decimal from django.db.models import Q from django.utils.translation import get_language, gettext_lazy as _ from rest_framework import serializers from rest_framework.exceptions import ValidationError from pretix.api.serializers.i18n import I18nAwareModelSerializer from pretix.api.serializers.order import CompatibleJSONField from pretix.base.auth import get_auth_backends from pretix.base.models import ( Device, GiftCard, Organizer, SeatingPlan, Team, TeamAPIToken, TeamInvite, User, ) from pretix.base.models.seating import SeatingPlanLayoutValidator from pretix.base.services.mail import SendMailException, mail from pretix.helpers.urls import build_absolute_uri class OrganizerSerializer(I18nAwareModelSerializer): class Meta: model = Organizer fields = ('name', 'slug') class SeatingPlanSerializer(I18nAwareModelSerializer): layout = CompatibleJSONField( validators=[SeatingPlanLayoutValidator()] ) class Meta: model = SeatingPlan fields = ('id', 'name', 'layout') class GiftCardSerializer(I18nAwareModelSerializer): value = serializers.DecimalField(max_digits=10, decimal_places=2, min_value=Decimal('0.00')) def validate(self, data): data = super().validate(data) s = data['secret'] qs = GiftCard.objects.filter( secret=s ).filter( Q(issuer=self.context["organizer"]) | Q( issuer__gift_card_collector_acceptance__collector=self.context["organizer"]) ) if self.instance: qs = qs.exclude(pk=self.instance.pk) if qs.exists(): raise ValidationError( {'secret': _( 'A gift card with the same secret already exists in your or an affiliated organizer account.')} ) return data class Meta: model = GiftCard fields = ('id', 'secret', 'issuance', 'value', 'currency', 'testmode', 'expires', 'conditions') class EventSlugField(serializers.SlugRelatedField): def get_queryset(self): return self.context['organizer'].events.all() class TeamSerializer(serializers.ModelSerializer): limit_events = EventSlugField(slug_field='slug', many=True) class Meta: model = Team fields = ( 'id', 'name', 'all_events', 'limit_events', 'can_create_events', 'can_change_teams', 'can_change_organizer_settings', 'can_manage_gift_cards', 'can_change_event_settings', 'can_change_items', 'can_view_orders', 'can_change_orders', 'can_view_vouchers', 'can_change_vouchers' ) def validate(self, data): full_data = self.to_internal_value(self.to_representation(self.instance)) if self.instance else {} full_data.update(data) if full_data.get('limit_events') and full_data.get('all_events'): raise ValidationError('Do not set both limit_events and all_events.') return data class DeviceSerializer(serializers.ModelSerializer): limit_events = EventSlugField(slug_field='slug', many=True) device_id = serializers.IntegerField(read_only=True) unique_serial = serializers.CharField(read_only=True) hardware_brand = serializers.CharField(read_only=True) hardware_model = serializers.CharField(read_only=True) software_brand = serializers.CharField(read_only=True) software_version = serializers.CharField(read_only=True) created = serializers.DateTimeField(read_only=True) revoked = serializers.BooleanField(read_only=True) initialized = serializers.DateTimeField(read_only=True) initialization_token = serializers.DateTimeField(read_only=True) class Meta: model = Device fields = ( 'device_id', 'unique_serial', 'initialization_token', 'all_events', 'limit_events', 'revoked', 'name', 'created', 'initialized', 'hardware_brand', 'hardware_model', 'software_brand', 'software_version', 'security_profile' ) class TeamInviteSerializer(serializers.ModelSerializer): class Meta: model = TeamInvite fields = ( 'id', 'email' ) def _send_invite(self, instance): try: mail( instance.email, _('pretix account invitation'), 'pretixcontrol/email/invitation.txt', { 'user': self, 'organizer': self.context['organizer'].name, 'team': instance.team.name, 'url': build_absolute_uri('control:auth.invite', kwargs={ 'token': instance.token }) }, event=None, locale=get_language() # TODO: expose? ) except SendMailException: pass # Already logged def create(self, validated_data): if 'email' in validated_data: try: user = User.objects.get(email__iexact=validated_data['email']) except User.DoesNotExist: if self.context['team'].invites.filter(email__iexact=validated_data['email']).exists(): raise ValidationError(_('This user already has been invited for this team.')) if 'native' not in get_auth_backends(): raise ValidationError('Users need to have a pretix account before they can be invited.') invite = self.context['team'].invites.create(email=validated_data['email']) self._send_invite(invite) invite.team.log_action( 'pretix.team.invite.created', data={ 'email': validated_data['email'] }, **self.context['log_kwargs'] ) return invite else: if self.context['team'].members.filter(pk=user.pk).exists(): raise ValidationError(_('This user already has permissions for this team.')) self.context['team'].members.add(user) self.context['team'].log_action( 'pretix.team.member.added', data={ 'email': user.email, 'user': user.pk, }, **self.context['log_kwargs'] ) return TeamInvite(email=user.email) else: raise ValidationError('No email address given.') class TeamAPITokenSerializer(serializers.ModelSerializer): active = serializers.BooleanField(default=True, read_only=True) class Meta: model = TeamAPIToken fields = ( 'id', 'name', 'active' ) class TeamMemberSerializer(serializers.ModelSerializer): class Meta: model = User fields = ( 'id', 'email', 'fullname', 'require_2fa' )
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 13677, 1053, 3826, 3039, 13, 13, 3166, 9557, 29889, 2585, 29889, 9794, 1053, 660, 13, 3166, 9557, 29889, 13239, 29889, 3286, 18411, 1053, 679, 29918, 11675, 29892, 679, 726, 29918, 433, 1537, 408, 903, 13, 3166, 1791, 29918, 4468, 1053, 7797, 19427, 13, 3166, 1791, 29918, 4468, 29889, 11739, 29879, 1053, 15758, 362, 2392, 13, 13, 3166, 14794, 861, 29889, 2754, 29889, 15550, 19427, 29889, 29875, 29896, 29947, 29876, 1053, 306, 29896, 29947, 29876, 29909, 2519, 3195, 17679, 13, 3166, 14794, 861, 29889, 2754, 29889, 15550, 19427, 29889, 2098, 1053, 3831, 271, 1821, 7249, 3073, 13, 3166, 14794, 861, 29889, 3188, 29889, 5150, 1053, 679, 29918, 5150, 29918, 1627, 1975, 13, 3166, 14794, 861, 29889, 3188, 29889, 9794, 1053, 313, 13, 1678, 21830, 29892, 402, 2027, 13200, 29892, 9205, 3950, 29892, 922, 1218, 20334, 29892, 8583, 29892, 8583, 3301, 1806, 4476, 29892, 8583, 12165, 568, 29892, 13, 1678, 4911, 29892, 13, 29897, 13, 3166, 14794, 861, 29889, 3188, 29889, 9794, 29889, 344, 1218, 1053, 922, 1218, 20334, 3453, 24204, 13, 3166, 14794, 861, 29889, 3188, 29889, 9916, 29889, 2549, 1053, 15076, 14925, 2451, 29892, 10524, 13, 3166, 14794, 861, 29889, 3952, 6774, 29889, 26045, 1053, 2048, 29918, 23552, 29918, 5338, 13, 13, 13, 1990, 9205, 3950, 17679, 29898, 29902, 29896, 29947, 29876, 29909, 2519, 3195, 17679, 1125, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 9205, 3950, 13, 4706, 4235, 353, 6702, 978, 742, 525, 29517, 1495, 13, 13, 13, 1990, 922, 1218, 20334, 17679, 29898, 29902, 29896, 29947, 29876, 29909, 2519, 3195, 17679, 1125, 13, 1678, 5912, 353, 3831, 271, 1821, 7249, 3073, 29898, 13, 4706, 2854, 4097, 11759, 2008, 1218, 20334, 3453, 24204, 580, 29962, 13, 1678, 1723, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 922, 1218, 20334, 13, 4706, 4235, 353, 6702, 333, 742, 525, 978, 742, 525, 2680, 1495, 13, 13, 13, 1990, 402, 2027, 13200, 17679, 29898, 29902, 29896, 29947, 29876, 29909, 2519, 3195, 17679, 1125, 13, 1678, 995, 353, 7797, 19427, 29889, 23307, 3073, 29898, 3317, 29918, 7501, 1169, 29922, 29896, 29900, 29892, 13677, 29918, 29886, 6048, 29922, 29906, 29892, 1375, 29918, 1767, 29922, 23307, 877, 29900, 29889, 29900, 29900, 8785, 13, 13, 1678, 822, 12725, 29898, 1311, 29892, 848, 1125, 13, 4706, 848, 353, 2428, 2141, 15480, 29898, 1272, 29897, 13, 4706, 269, 353, 848, 1839, 19024, 2033, 13, 4706, 3855, 29879, 353, 402, 2027, 13200, 29889, 12650, 29889, 4572, 29898, 13, 9651, 7035, 29922, 29879, 13, 4706, 13742, 4572, 29898, 13, 9651, 660, 29898, 790, 2853, 29922, 1311, 29889, 4703, 3366, 6388, 3950, 20068, 891, 660, 29898, 13, 18884, 1721, 2853, 1649, 29887, 2027, 29918, 7543, 29918, 15914, 272, 29918, 16044, 749, 1649, 15914, 272, 29922, 1311, 29889, 4703, 3366, 6388, 3950, 20068, 13, 4706, 1723, 13, 4706, 565, 1583, 29889, 8758, 29901, 13, 9651, 3855, 29879, 353, 3855, 29879, 29889, 735, 2325, 29898, 20571, 29922, 1311, 29889, 8758, 29889, 20571, 29897, 13, 4706, 565, 3855, 29879, 29889, 9933, 7295, 13, 9651, 12020, 15758, 362, 2392, 29898, 13, 18884, 11117, 19024, 2396, 903, 29898, 13, 462, 1678, 525, 29909, 19797, 5881, 411, 278, 1021, 7035, 2307, 4864, 297, 596, 470, 385, 23736, 630, 2894, 3950, 3633, 29889, 1495, 29913, 13, 9651, 1723, 13, 4706, 736, 848, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 402, 2027, 13200, 13, 4706, 4235, 353, 6702, 333, 742, 525, 19024, 742, 525, 790, 29884, 749, 742, 525, 1767, 742, 525, 26095, 742, 525, 1688, 8513, 742, 525, 4548, 2658, 742, 525, 1116, 2187, 1495, 13, 13, 13, 1990, 6864, 16973, 688, 3073, 29898, 15550, 19427, 29889, 16973, 688, 9662, 630, 3073, 1125, 13, 1678, 822, 679, 29918, 1972, 842, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 4703, 1839, 6388, 3950, 13359, 13604, 29889, 497, 580, 13, 13, 13, 1990, 8583, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 4046, 29918, 13604, 353, 6864, 16973, 688, 3073, 29898, 29517, 29918, 2671, 2433, 29517, 742, 1784, 29922, 5574, 29897, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 8583, 13, 4706, 4235, 353, 313, 13, 9651, 525, 333, 742, 525, 978, 742, 525, 497, 29918, 13604, 742, 525, 13400, 29918, 13604, 742, 525, 3068, 29918, 3258, 29918, 13604, 742, 525, 3068, 29918, 3167, 29918, 371, 2232, 742, 13, 9651, 525, 3068, 29918, 3167, 29918, 6388, 3950, 29918, 11027, 742, 525, 3068, 29918, 1171, 482, 29918, 29887, 2027, 29918, 28160, 742, 525, 3068, 29918, 3167, 29918, 3696, 29918, 11027, 742, 13, 9651, 525, 3068, 29918, 3167, 29918, 7076, 742, 525, 3068, 29918, 1493, 29918, 20488, 742, 525, 3068, 29918, 3167, 29918, 20488, 742, 525, 3068, 29918, 1493, 29918, 29894, 3222, 414, 742, 13, 9651, 525, 3068, 29918, 3167, 29918, 29894, 3222, 414, 29915, 13, 4706, 1723, 13, 13, 1678, 822, 12725, 29898, 1311, 29892, 848, 1125, 13, 4706, 2989, 29918, 1272, 353, 1583, 29889, 517, 29918, 7564, 29918, 1767, 29898, 1311, 29889, 517, 29918, 276, 26081, 29898, 1311, 29889, 8758, 876, 565, 1583, 29889, 8758, 1683, 6571, 13, 4706, 2989, 29918, 1272, 29889, 5504, 29898, 1272, 29897, 13, 4706, 565, 2989, 29918, 1272, 29889, 657, 877, 13400, 29918, 13604, 1495, 322, 2989, 29918, 1272, 29889, 657, 877, 497, 29918, 13604, 29374, 13, 9651, 12020, 15758, 362, 2392, 877, 6132, 451, 731, 1716, 4046, 29918, 13604, 322, 599, 29918, 13604, 29889, 1495, 13, 4706, 736, 848, 13, 13, 13, 1990, 21830, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 4046, 29918, 13604, 353, 6864, 16973, 688, 3073, 29898, 29517, 29918, 2671, 2433, 29517, 742, 1784, 29922, 5574, 29897, 13, 1678, 4742, 29918, 333, 353, 7797, 19427, 29889, 7798, 3073, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 5412, 29918, 15550, 353, 7797, 19427, 29889, 27890, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 12837, 29918, 16472, 353, 7797, 19427, 29889, 27890, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 12837, 29918, 4299, 353, 7797, 19427, 29889, 27890, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 7047, 29918, 16472, 353, 7797, 19427, 29889, 27890, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 7047, 29918, 3259, 353, 7797, 19427, 29889, 27890, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 2825, 353, 7797, 19427, 29889, 11384, 3073, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 6664, 12504, 353, 7797, 19427, 29889, 18146, 3073, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 16601, 353, 7797, 19427, 29889, 11384, 3073, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 1678, 17865, 29918, 6979, 353, 7797, 19427, 29889, 11384, 3073, 29898, 949, 29918, 6194, 29922, 5574, 29897, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 21830, 13, 4706, 4235, 353, 313, 13, 9651, 525, 10141, 29918, 333, 742, 525, 13092, 29918, 15550, 742, 525, 11228, 2133, 29918, 6979, 742, 525, 497, 29918, 13604, 742, 525, 13400, 29918, 13604, 742, 13, 9651, 525, 13478, 12504, 742, 525, 978, 742, 525, 11600, 742, 525, 11228, 1891, 742, 525, 6800, 2519, 29918, 16472, 742, 525, 6800, 2519, 29918, 4299, 742, 13, 9651, 525, 20415, 29918, 16472, 742, 525, 20415, 29918, 3259, 742, 525, 8926, 29918, 10185, 29915, 13, 4706, 1723, 13, 13, 13, 1990, 8583, 12165, 568, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 8583, 12165, 568, 13, 4706, 4235, 353, 313, 13, 9651, 525, 333, 742, 525, 5269, 29915, 13, 4706, 1723, 13, 13, 1678, 822, 903, 6717, 29918, 11569, 568, 29898, 1311, 29892, 2777, 1125, 13, 4706, 1018, 29901, 13, 9651, 10524, 29898, 13, 18884, 2777, 29889, 5269, 29892, 13, 18884, 903, 877, 19819, 861, 3633, 2437, 7018, 5477, 13, 18884, 525, 19819, 861, 6451, 29914, 5269, 29914, 11569, 7018, 29889, 3945, 742, 13, 18884, 426, 13, 462, 1678, 525, 1792, 2396, 1583, 29892, 13, 462, 1678, 525, 6388, 3950, 2396, 1583, 29889, 4703, 1839, 6388, 3950, 13359, 978, 29892, 13, 462, 1678, 525, 14318, 2396, 2777, 29889, 14318, 29889, 978, 29892, 13, 462, 1678, 525, 2271, 2396, 2048, 29918, 23552, 29918, 5338, 877, 6451, 29901, 5150, 29889, 11569, 568, 742, 9049, 5085, 3790, 13, 462, 4706, 525, 6979, 2396, 2777, 29889, 6979, 13, 462, 1678, 5615, 13, 18884, 2981, 13, 18884, 1741, 29922, 8516, 29892, 13, 18884, 15068, 29922, 657, 29918, 11675, 580, 29871, 396, 14402, 29901, 24396, 29973, 13, 9651, 1723, 13, 4706, 5174, 15076, 14925, 2451, 29901, 13, 9651, 1209, 29871, 396, 838, 2040, 13817, 13, 13, 1678, 822, 1653, 29898, 1311, 29892, 2854, 630, 29918, 1272, 1125, 13, 4706, 565, 525, 5269, 29915, 297, 2854, 630, 29918, 1272, 29901, 13, 9651, 1018, 29901, 13, 18884, 1404, 353, 4911, 29889, 12650, 29889, 657, 29898, 5269, 1649, 347, 29916, 627, 29922, 3084, 630, 29918, 1272, 1839, 5269, 11287, 13, 9651, 5174, 4911, 29889, 25125, 3664, 1252, 391, 29901, 13, 18884, 565, 1583, 29889, 4703, 1839, 14318, 13359, 11569, 3246, 29889, 4572, 29898, 5269, 1649, 347, 29916, 627, 29922, 3084, 630, 29918, 1272, 1839, 5269, 2033, 467, 9933, 7295, 13, 462, 1678, 12020, 15758, 362, 2392, 7373, 877, 4013, 1404, 2307, 756, 1063, 23610, 363, 445, 3815, 6169, 876, 13, 18884, 565, 525, 11487, 29915, 451, 297, 679, 29918, 5150, 29918, 1627, 1975, 7295, 13, 462, 1678, 12020, 15758, 362, 2392, 877, 5959, 817, 304, 505, 263, 14794, 861, 3633, 1434, 896, 508, 367, 23610, 29889, 1495, 13, 13, 18884, 2437, 568, 353, 1583, 29889, 4703, 1839, 14318, 13359, 11569, 3246, 29889, 3258, 29898, 5269, 29922, 3084, 630, 29918, 1272, 1839, 5269, 11287, 13, 18884, 1583, 3032, 6717, 29918, 11569, 568, 29898, 11569, 568, 29897, 13, 18884, 2437, 568, 29889, 14318, 29889, 1188, 29918, 2467, 29898, 13, 462, 1678, 525, 19819, 861, 29889, 14318, 29889, 11569, 568, 29889, 11600, 742, 13, 462, 1678, 848, 3790, 13, 462, 4706, 525, 5269, 2396, 2854, 630, 29918, 1272, 1839, 5269, 2033, 13, 462, 1678, 2981, 13, 462, 1678, 3579, 1311, 29889, 4703, 1839, 1188, 29918, 19290, 2033, 13, 18884, 1723, 13, 18884, 736, 2437, 568, 13, 9651, 1683, 29901, 13, 18884, 565, 1583, 29889, 4703, 1839, 14318, 13359, 28109, 29889, 4572, 29898, 20571, 29922, 1792, 29889, 20571, 467, 9933, 7295, 13, 462, 1678, 12020, 15758, 362, 2392, 7373, 877, 4013, 1404, 2307, 756, 11239, 363, 445, 3815, 6169, 876, 13, 13, 18884, 1583, 29889, 4703, 1839, 14318, 13359, 28109, 29889, 1202, 29898, 1792, 29897, 13, 18884, 1583, 29889, 4703, 1839, 14318, 13359, 1188, 29918, 2467, 29898, 13, 462, 1678, 525, 19819, 861, 29889, 14318, 29889, 14242, 29889, 23959, 742, 13, 462, 1678, 848, 3790, 13, 462, 4706, 525, 5269, 2396, 1404, 29889, 5269, 29892, 13, 462, 4706, 525, 1792, 2396, 1404, 29889, 20571, 29892, 13, 462, 1678, 2981, 13, 462, 1678, 3579, 1311, 29889, 4703, 1839, 1188, 29918, 19290, 2033, 13, 18884, 1723, 13, 18884, 736, 8583, 12165, 568, 29898, 5269, 29922, 1792, 29889, 5269, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 15758, 362, 2392, 877, 3782, 4876, 3211, 2183, 29889, 1495, 13, 13, 13, 1990, 8583, 3301, 1806, 4476, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 6136, 353, 7797, 19427, 29889, 18146, 3073, 29898, 4381, 29922, 5574, 29892, 1303, 29918, 6194, 29922, 5574, 29897, 13, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 8583, 3301, 1806, 4476, 13, 4706, 4235, 353, 313, 13, 9651, 525, 333, 742, 525, 978, 742, 525, 4925, 29915, 13, 4706, 1723, 13, 13, 13, 1990, 8583, 13404, 17679, 29898, 15550, 19427, 29889, 3195, 17679, 1125, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 4911, 13, 4706, 4235, 353, 313, 13, 9651, 525, 333, 742, 525, 5269, 742, 525, 8159, 978, 742, 525, 12277, 29918, 29906, 5444, 29915, 13, 4706, 1723, 13, 2 ]
cli/loc.py
deb17/moneycare
0
63775
import os def file_len(filename, comment): line_count = 0 with open(filename) as f: for line in f: if line.strip().startswith(comment): continue if line.strip(): line_count += 1 return line_count def walk(path='.'): loc = 0 for root, dirs, files in os.walk(path): if '.git' in root or 'venv' in root: continue for file in files: filepath = os.path.join(root, file) if file.endswith('.py'): loc += file_len(filepath, '#') elif file.endswith('.html'): if file in ('privacy_policy.html', 'tac.html'): continue loc += file_len(filepath, '<!--') elif file.endswith('.css'): if file == 'jquery.tagsinput-revisited.css': continue loc += file_len(filepath, '/*') elif file.endswith('.js'): if file == 'jquery.tagsinput-revisited.js': continue loc += file_len(filepath, '//') return loc
[ 1, 1053, 2897, 13, 13, 13, 1753, 934, 29918, 2435, 29898, 9507, 29892, 3440, 1125, 13, 13, 1678, 1196, 29918, 2798, 353, 29871, 29900, 13, 1678, 411, 1722, 29898, 9507, 29897, 408, 285, 29901, 13, 4706, 363, 1196, 297, 285, 29901, 13, 9651, 565, 1196, 29889, 17010, 2141, 27382, 2541, 29898, 9342, 1125, 13, 18884, 6773, 13, 9651, 565, 1196, 29889, 17010, 7295, 13, 18884, 1196, 29918, 2798, 4619, 29871, 29896, 13, 13, 1678, 736, 1196, 29918, 2798, 13, 13, 13, 1753, 6686, 29898, 2084, 2433, 6169, 1125, 13, 13, 1678, 1180, 353, 29871, 29900, 13, 1678, 363, 3876, 29892, 4516, 29879, 29892, 2066, 297, 2897, 29889, 20919, 29898, 2084, 1125, 13, 4706, 565, 15300, 5559, 29915, 297, 3876, 470, 525, 854, 29894, 29915, 297, 3876, 29901, 13, 9651, 6773, 13, 4706, 363, 934, 297, 2066, 29901, 13, 9651, 934, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 4632, 29892, 934, 29897, 13, 9651, 565, 934, 29889, 1975, 2541, 12839, 2272, 29374, 13, 18884, 1180, 4619, 934, 29918, 2435, 29898, 1445, 2084, 29892, 16321, 1495, 13, 9651, 25342, 934, 29889, 1975, 2541, 12839, 1420, 29374, 13, 18884, 565, 934, 297, 6702, 22534, 4135, 29918, 22197, 29889, 1420, 742, 525, 21229, 29889, 1420, 29374, 13, 462, 1678, 6773, 13, 18884, 1180, 4619, 934, 29918, 2435, 29898, 1445, 2084, 29892, 12801, 6172, 1495, 13, 9651, 25342, 934, 29889, 1975, 2541, 12839, 4268, 29374, 13, 18884, 565, 934, 1275, 525, 5880, 29889, 11338, 2080, 29899, 276, 1730, 1573, 29889, 4268, 2396, 13, 462, 1678, 6773, 13, 18884, 1180, 4619, 934, 29918, 2435, 29898, 1445, 2084, 29892, 525, 5515, 1495, 13, 9651, 25342, 934, 29889, 1975, 2541, 12839, 1315, 29374, 13, 18884, 565, 934, 1275, 525, 5880, 29889, 11338, 2080, 29899, 276, 1730, 1573, 29889, 1315, 2396, 13, 462, 1678, 6773, 13, 18884, 1180, 4619, 934, 29918, 2435, 29898, 1445, 2084, 29892, 525, 458, 1495, 13, 13, 1678, 736, 1180, 13, 2 ]
package.py
srini009/ascent
0
46731
<gh_stars>0 #!/bin/env python ############################################################################### # Copyright (c) Lawrence Livermore National Security, LLC and other Ascent # Project developers. See top-level LICENSE AND COPYRIGHT files for dates and # other details. No copyright assignment is required to contribute to Ascent. ############################################################################### ############################################################################### # # file: package.py # ############################################################################### import subprocess import sys import datetime import os from os.path import join as pjoin def create_package(output_file=None): scripts_dir = pjoin(os.path.abspath(os.path.split(__file__)[0]),"scripts") pkg_script = pjoin(scripts_dir,"git_archive_all.py"); repo_name = os.path.basename(os.path.dirname(os.path.abspath(__file__))) if output_file is None: suffix = "tar" t = datetime.datetime.now() output_file = "%s.%04d.%02d.%02d.%s" % (repo_name,t.year,t.month,t.day,suffix) cmd = "python " + pkg_script + " --prefix=ascent " + output_file print("[exe: {}]".format(cmd)) subprocess.call(cmd,shell=True) if __name__ == "__main__": ofile = None if len(sys.argv) > 1: ofile = sys.argv[1] create_package(ofile)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 2109, 29914, 6272, 3017, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 19520, 22469, 5514, 3086, 14223, 29892, 365, 12182, 322, 916, 1094, 1760, 13, 29937, 8010, 18777, 29889, 2823, 2246, 29899, 5563, 365, 2965, 1430, 1660, 5300, 315, 4590, 29979, 22789, 3912, 2066, 363, 10116, 322, 13, 29937, 916, 4902, 29889, 1939, 3509, 1266, 12827, 338, 3734, 304, 29126, 304, 1094, 1760, 29889, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 13, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 29937, 13, 29937, 934, 29901, 3577, 29889, 2272, 13, 29937, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 13, 5215, 1014, 5014, 13, 5215, 10876, 13, 5215, 12865, 13, 5215, 2897, 13, 13, 3166, 2897, 29889, 2084, 1053, 5988, 408, 282, 7122, 13, 13, 1753, 1653, 29918, 5113, 29898, 4905, 29918, 1445, 29922, 8516, 1125, 13, 1678, 12078, 29918, 3972, 353, 282, 7122, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 5451, 22168, 1445, 1649, 9601, 29900, 11724, 29908, 16713, 1159, 13, 1678, 282, 9415, 29918, 2154, 353, 282, 7122, 29898, 16713, 29918, 3972, 1699, 5559, 29918, 10867, 29918, 497, 29889, 2272, 1496, 13, 1678, 13761, 29918, 978, 353, 2897, 29889, 2084, 29889, 6500, 3871, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 4961, 13, 1678, 565, 1962, 29918, 1445, 338, 6213, 29901, 13, 308, 25557, 353, 376, 12637, 29908, 13, 308, 260, 353, 12865, 29889, 12673, 29889, 3707, 580, 13, 308, 1962, 29918, 1445, 353, 11860, 29879, 29889, 29995, 29900, 29946, 29881, 29889, 29995, 29900, 29906, 29881, 29889, 29995, 29900, 29906, 29881, 29889, 29995, 29879, 29908, 1273, 313, 20095, 29918, 978, 29892, 29873, 29889, 6360, 29892, 29873, 29889, 10874, 29892, 29873, 29889, 3250, 29892, 2146, 600, 861, 29897, 13, 1678, 9920, 353, 376, 4691, 376, 718, 282, 9415, 29918, 2154, 718, 376, 1192, 13506, 29922, 294, 1760, 376, 718, 1962, 29918, 1445, 13, 1678, 1596, 703, 29961, 8097, 29901, 426, 6525, 1642, 4830, 29898, 9006, 876, 13, 1678, 1014, 5014, 29889, 4804, 29898, 9006, 29892, 15903, 29922, 5574, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 310, 488, 29871, 353, 6213, 13, 1678, 565, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29896, 29901, 13, 4706, 310, 488, 29871, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 1678, 1653, 29918, 5113, 29898, 974, 488, 29897, 13, 13, 13, 2 ]
nova/pci/stats.py
10088/nova
0
718
# Copyright (c) 2013 Intel, Inc. # Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import copy import typing as ty from oslo_config import cfg from oslo_log import log as logging from oslo_utils import strutils from nova import exception from nova import objects from nova.objects import fields from nova.objects import pci_device_pool from nova.pci.request import PCI_REMOTE_MANAGED_TAG from nova.pci import utils from nova.pci import whitelist CONF = cfg.CONF LOG = logging.getLogger(__name__) # TODO(stephenfin): We might want to use TypedDict here. Refer to # https://mypy.readthedocs.io/en/latest/kinds_of_types.html#typeddict for # more information. Pool = ty.Dict[str, ty.Any] class PciDeviceStats(object): """PCI devices summary information. According to the PCI SR-IOV spec, a PCI physical function can have up to 256 PCI virtual functions, thus the number of assignable PCI functions in a cloud can be big. The scheduler needs to know all device availability information in order to determine which compute hosts can support a PCI request. Passing individual virtual device information to the scheduler does not scale, so we provide summary information. Usually the virtual functions provided by a host PCI device have the same value for most properties, like vendor_id, product_id and class type. The PCI stats class summarizes this information for the scheduler. The pci stats information is maintained exclusively by compute node resource tracker and updated to database. The scheduler fetches the information and selects the compute node accordingly. If a compute node is selected, the resource tracker allocates the devices to the instance and updates the pci stats information. This summary information will be helpful for cloud management also. """ pool_keys = ['product_id', 'vendor_id', 'numa_node', 'dev_type'] def __init__( self, numa_topology: 'objects.NUMATopology', stats: 'objects.PCIDevicePoolList' = None, dev_filter: whitelist.Whitelist = None, ) -> None: self.numa_topology = numa_topology self.pools = ( [pci_pool.to_dict() for pci_pool in stats] if stats else [] ) self.pools.sort(key=lambda item: len(item)) self.dev_filter = dev_filter or whitelist.Whitelist( CONF.pci.passthrough_whitelist) def _equal_properties( self, dev: Pool, entry: Pool, matching_keys: ty.List[str], ) -> bool: return all(dev.get(prop) == entry.get(prop) for prop in matching_keys) def _find_pool(self, dev_pool: Pool) -> ty.Optional[Pool]: """Return the first pool that matches dev.""" for pool in self.pools: pool_keys = pool.copy() del pool_keys['count'] del pool_keys['devices'] if (len(pool_keys.keys()) == len(dev_pool.keys()) and self._equal_properties(dev_pool, pool_keys, list(dev_pool))): return pool return None @staticmethod def _ensure_remote_managed_tag( dev: 'objects.PciDevice', pool: Pool): """Add a remote_managed tag depending on a device type if needed. Network devices may be managed remotely, e.g. by a SmartNIC DPU. If a tag has not been explicitly provided, populate it by assuming that a device is not remote managed by default. """ if dev.dev_type not in (fields.PciDeviceType.SRIOV_VF, fields.PciDeviceType.SRIOV_PF, fields.PciDeviceType.VDPA): return # A tag is added here rather than at the client side to avoid an # issue with having objects without this tag specified during an # upgrade to the first version that supports handling this tag. if pool.get(PCI_REMOTE_MANAGED_TAG) is None: # NOTE: tags are compared as strings case-insensitively, see # pci_device_prop_match in nova/pci/utils.py. pool[PCI_REMOTE_MANAGED_TAG] = 'false' def _create_pool_keys_from_dev( self, dev: 'objects.PciDevice', ) -> ty.Optional[Pool]: """Create a stats pool dict that this dev is supposed to be part of Note that this pool dict contains the stats pool's keys and their values. 'count' and 'devices' are not included. """ # Don't add a device that doesn't have a matching device spec. # This can happen during initial sync up with the controller devspec = self.dev_filter.get_devspec(dev) if not devspec: return None tags = devspec.get_tags() pool = {k: getattr(dev, k) for k in self.pool_keys} if tags: pool.update(tags) # NOTE(gibi): parent_ifname acts like a tag during pci claim but # not provided as part of the whitelist spec as it is auto detected # by the virt driver. # This key is used for match InstancePciRequest backed by neutron ports # that has resource_request and therefore that has resource allocation # already in placement. if dev.extra_info.get('parent_ifname'): pool['parent_ifname'] = dev.extra_info['parent_ifname'] self._ensure_remote_managed_tag(dev, pool) return pool def _get_pool_with_device_type_mismatch( self, dev: 'objects.PciDevice', ) -> ty.Optional[ty.Tuple[Pool, 'objects.PciDevice']]: """Check for device type mismatch in the pools for a given device. Return (pool, device) if device type does not match or a single None if the device type matches. """ for pool in self.pools: for device in pool['devices']: if device.address == dev.address: if dev.dev_type != pool["dev_type"]: return pool, device return None return None def update_device(self, dev: 'objects.PciDevice') -> None: """Update a device to its matching pool.""" pool_device_info = self._get_pool_with_device_type_mismatch(dev) if pool_device_info is None: return None pool, device = pool_device_info pool['devices'].remove(device) self._decrease_pool_count(self.pools, pool) self.add_device(dev) def add_device(self, dev: 'objects.PciDevice') -> None: """Add a device to its matching pool.""" dev_pool = self._create_pool_keys_from_dev(dev) if dev_pool: pool = self._find_pool(dev_pool) if not pool: dev_pool['count'] = 0 dev_pool['devices'] = [] self.pools.append(dev_pool) self.pools.sort(key=lambda item: len(item)) pool = dev_pool pool['count'] += 1 pool['devices'].append(dev) @staticmethod def _decrease_pool_count( pool_list: ty.List[Pool], pool: Pool, count: int = 1, ) -> int: """Decrement pool's size by count. If pool becomes empty, remove pool from pool_list. """ if pool['count'] > count: pool['count'] -= count count = 0 else: count -= pool['count'] pool_list.remove(pool) return count def remove_device(self, dev: 'objects.PciDevice') -> None: """Remove one device from the first pool that it matches.""" dev_pool = self._create_pool_keys_from_dev(dev) if dev_pool: pool = self._find_pool(dev_pool) if not pool: raise exception.PciDevicePoolEmpty( compute_node_id=dev.compute_node_id, address=dev.address) pool['devices'].remove(dev) self._decrease_pool_count(self.pools, pool) def get_free_devs(self) -> ty.List['objects.PciDevice']: free_devs: ty.List[objects.PciDevice] = [] for pool in self.pools: free_devs.extend(pool['devices']) return free_devs def consume_requests( self, pci_requests: 'objects.InstancePCIRequests', numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']] = None, ) -> ty.Optional[ty.List['objects.PciDevice']]: alloc_devices: ty.List[objects.PciDevice] = [] for request in pci_requests: count = request.count pools = self._filter_pools(self.pools, request, numa_cells) # Failed to allocate the required number of devices. Return the # devices already allocated during previous iterations back to # their pools if not pools: LOG.error("Failed to allocate PCI devices for instance. " "Unassigning devices back to pools. " "This should not happen, since the scheduler " "should have accurate information, and allocation " "during claims is controlled via a hold " "on the compute node semaphore.") for d in range(len(alloc_devices)): self.add_device(alloc_devices.pop()) return None for pool in pools: if pool['count'] >= count: num_alloc = count else: num_alloc = pool['count'] count -= num_alloc pool['count'] -= num_alloc for d in range(num_alloc): pci_dev = pool['devices'].pop() self._handle_device_dependents(pci_dev) pci_dev.request_id = request.request_id alloc_devices.append(pci_dev) if count == 0: break return alloc_devices def _handle_device_dependents(self, pci_dev: 'objects.PciDevice') -> None: """Remove device dependents or a parent from pools. In case the device is a PF, all of it's dependent VFs should be removed from pools count, if these are present. When the device is a VF, or a VDPA device, it's parent PF pool count should be decreased, unless it is no longer in a pool. """ if pci_dev.dev_type == fields.PciDeviceType.SRIOV_PF: vfs_list = pci_dev.child_devices if vfs_list: free_devs = self.get_free_devs() for vf in vfs_list: # NOTE(gibi): do not try to remove a device that are # already removed if vf in free_devs: self.remove_device(vf) elif pci_dev.dev_type in ( fields.PciDeviceType.SRIOV_VF, fields.PciDeviceType.VDPA, ): try: parent = pci_dev.parent_device # Make sure not to decrease PF pool count if this parent has # been already removed from pools if parent in self.get_free_devs(): self.remove_device(parent) except exception.PciDeviceNotFound: return def _filter_pools_for_spec( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', ) -> ty.List[Pool]: """Filter out pools that don't match the request's device spec. Exclude pools that do not match the specified ``vendor_id``, ``product_id`` and/or ``device_type`` field, or any of the other arbitrary tags such as ``physical_network``, specified in the request. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :returns: A list of pools that can be used to support the request if this is possible. """ request_specs = request.spec return [ pool for pool in pools if utils.pci_device_prop_match(pool, request_specs) ] def _filter_pools_for_numa_cells( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']], ) -> ty.List[Pool]: """Filter out pools with the wrong NUMA affinity, if required. Exclude pools that do not have *suitable* PCI NUMA affinity. ``numa_policy`` determines what *suitable* means, being one of PREFERRED (nice-to-have), LEGACY (must-have-if-available) and REQUIRED (must-have). We iterate through the various policies in order of strictness. This means that even if we only *prefer* PCI-NUMA affinity, we will still attempt to provide it if possible. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :param numa_cells: A list of InstanceNUMACell objects whose ``id`` corresponds to the ``id`` of host NUMACells. :returns: A list of pools that can, together, provide at least ``requested_count`` PCI devices with the level of NUMA affinity required by ``numa_policy``, else all pools that can satisfy this policy even if it's not enough. """ if not numa_cells: return pools # we default to the 'legacy' policy for...of course...legacy reasons requested_policy = fields.PCINUMAAffinityPolicy.LEGACY if 'numa_policy' in request: requested_policy = request.numa_policy or requested_policy requested_count = request.count numa_cell_ids = [cell.id for cell in numa_cells] # filter out pools which numa_node is not included in numa_cell_ids filtered_pools = [ pool for pool in pools if any(utils.pci_device_prop_match( pool, [{'numa_node': cell}]) for cell in numa_cell_ids)] # we can't apply a less strict policy than the one requested, so we # need to return if we've demanded a NUMA affinity of REQUIRED. # However, NUMA affinity is a good thing. If we can get enough devices # with the stricter policy then we will use them. if requested_policy == fields.PCINUMAAffinityPolicy.REQUIRED or sum( pool['count'] for pool in filtered_pools) >= requested_count: return filtered_pools # the SOCKET policy is a bit of a special case. It's less strict than # REQUIRED (so REQUIRED will automatically fulfil SOCKET, at least # with our assumption of never having multiple sockets per NUMA node), # but not always more strict than LEGACY: a PCI device with no NUMA # affinity will fulfil LEGACY but not SOCKET. If we have SOCKET, # process it here and don't continue. if requested_policy == fields.PCINUMAAffinityPolicy.SOCKET: return self._filter_pools_for_socket_affinity(pools, numa_cells) # some systems don't report NUMA node info for PCI devices, in which # case None is reported in 'pci_device.numa_node'. The LEGACY policy # allows us to use these devices so we include None in the list of # suitable NUMA cells. numa_cell_ids.append(None) # filter out pools which numa_node is not included in numa_cell_ids filtered_pools = [ pool for pool in pools if any(utils.pci_device_prop_match( pool, [{'numa_node': cell}]) for cell in numa_cell_ids)] # once again, we can't apply a less strict policy than the one # requested, so we need to return if we've demanded a NUMA affinity of # LEGACY. Similarly, we will also return if we have enough devices to # satisfy this somewhat strict policy. if requested_policy == fields.PCINUMAAffinityPolicy.LEGACY or sum( pool['count'] for pool in filtered_pools) >= requested_count: return filtered_pools # if we've got here, we're using the PREFERRED policy and weren't able # to provide anything with stricter affinity. Use whatever devices you # can, folks. return sorted( pools, key=lambda pool: pool.get('numa_node') not in numa_cell_ids) def _filter_pools_for_socket_affinity( self, pools: ty.List[Pool], numa_cells: ty.List['objects.InstanceNUMACell'], ) -> ty.List[Pool]: host_cells = self.numa_topology.cells # bail early if we don't have socket information for all host_cells. # This could happen if we're running on an weird older system with # multiple sockets per NUMA node, which is a configuration that we # explicitly chose not to support. if any(cell.socket is None for cell in host_cells): LOG.debug('No socket information in host NUMA cell(s).') return [] # get a set of host sockets that the guest cells are in. Since guest # cell IDs map to host cell IDs, we can just lookup the latter's # socket. socket_ids = set() for guest_cell in numa_cells: for host_cell in host_cells: if guest_cell.id == host_cell.id: socket_ids.add(host_cell.socket) # now get a set of host NUMA nodes that are in the above sockets allowed_numa_nodes = set() for host_cell in host_cells: if host_cell.socket in socket_ids: allowed_numa_nodes.add(host_cell.id) # filter out pools that are not in one of the correct host NUMA nodes. return [ pool for pool in pools if any( utils.pci_device_prop_match(pool, [{'numa_node': numa_node}]) for numa_node in allowed_numa_nodes ) ] def _filter_pools_for_unrequested_pfs( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', ) -> ty.List[Pool]: """Filter out pools with PFs, unless these are required. This is necessary in cases where PFs and VFs have the same product_id and generally useful elsewhere. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :returns: A list of pools that can be used to support the request if this is possible. """ if all( spec.get('dev_type') != fields.PciDeviceType.SRIOV_PF for spec in request.spec ): pools = [ pool for pool in pools if not pool.get('dev_type') == fields.PciDeviceType.SRIOV_PF ] return pools def _filter_pools_for_unrequested_vdpa_devices( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', ) -> ty.List[Pool]: """Filter out pools with VDPA devices, unless these are required. This is necessary as vdpa devices require special handling and should not be allocated to generic pci device requests. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :returns: A list of pools that can be used to support the request if this is possible. """ if all( spec.get('dev_type') != fields.PciDeviceType.VDPA for spec in request.spec ): pools = [ pool for pool in pools if not pool.get('dev_type') == fields.PciDeviceType.VDPA ] return pools def _filter_pools_for_unrequested_remote_managed_devices( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', ) -> ty.List[Pool]: """Filter out pools with remote_managed devices, unless requested. Remote-managed devices are not usable for legacy SR-IOV or hardware offload scenarios and must be excluded from allocation. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :returns: A list of pools that can be used to support the request if this is possible. """ if all(not strutils.bool_from_string(spec.get(PCI_REMOTE_MANAGED_TAG)) for spec in request.spec): pools = [pool for pool in pools if not strutils.bool_from_string( pool.get(PCI_REMOTE_MANAGED_TAG))] return pools def _filter_pools( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']], ) -> ty.Optional[ty.List[Pool]]: """Determine if an individual PCI request can be met. Filter pools, which are collections of devices with similar traits, to identify those that can support the provided PCI request. If ``numa_cells`` is provided then NUMA locality may be taken into account, depending on the value of ``request.numa_policy``. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :param numa_cells: A list of InstanceNUMACell objects whose ``id`` corresponds to the ``id`` of host NUMACell objects. :returns: A list of pools that can be used to support the request if this is possible, else None. """ # NOTE(vladikr): This code may be open to race conditions. # Two concurrent requests may succeed when called support_requests # because this method does not remove related devices from the pools # Firstly, let's exclude all devices that don't match our spec (e.g. # they've got different PCI IDs or something) before_count = sum([pool['count'] for pool in pools]) pools = self._filter_pools_for_spec(pools, request) after_count = sum([pool['count'] for pool in pools]) if after_count < before_count: LOG.debug( 'Dropped %d device(s) due to mismatched PCI attribute(s)', before_count - after_count ) if after_count < request.count: LOG.debug('Not enough PCI devices left to satisfy request') return None # Next, let's exclude all devices that aren't on the correct NUMA node # or socket, *assuming* we have devices and care about that, as # determined by policy before_count = after_count pools = self._filter_pools_for_numa_cells(pools, request, numa_cells) after_count = sum([pool['count'] for pool in pools]) if after_count < before_count: LOG.debug( 'Dropped %d device(s) as they are on the wrong NUMA node(s)', before_count - after_count ) if after_count < request.count: LOG.debug('Not enough PCI devices left to satisfy request') return None # If we're not requesting PFs then we should not use these. # Exclude them. before_count = after_count pools = self._filter_pools_for_unrequested_pfs(pools, request) after_count = sum([pool['count'] for pool in pools]) if after_count < before_count: LOG.debug( 'Dropped %d device(s) as they are PFs which we have not ' 'requested', before_count - after_count ) if after_count < request.count: LOG.debug('Not enough PCI devices left to satisfy request') return None # If we're not requesting VDPA devices then we should not use these # either. Exclude them. before_count = after_count pools = self._filter_pools_for_unrequested_vdpa_devices(pools, request) after_count = sum([pool['count'] for pool in pools]) if after_count < before_count: LOG.debug( 'Dropped %d device(s) as they are VDPA devices which we have ' 'not requested', before_count - after_count ) # If we're not requesting remote_managed devices then we should not # use these either. Exclude them. before_count = after_count pools = self._filter_pools_for_unrequested_remote_managed_devices( pools, request) after_count = sum([pool['count'] for pool in pools]) if after_count < before_count: LOG.debug( 'Dropped %d device(s) as they are remote-managed devices which' 'we have not requested', before_count - after_count ) if after_count < request.count: LOG.debug('Not enough PCI devices left to satisfy request') return None return pools def support_requests( self, requests: ty.List['objects.InstancePCIRequest'], numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']] = None, ) -> bool: """Determine if the PCI requests can be met. Determine, based on a compute node's PCI stats, if an instance can be scheduled on the node. **Support does not mean real allocation**. If ``numa_cells`` is provided then NUMA locality may be taken into account, depending on the value of ``numa_policy``. :param requests: A list of InstancePCIRequest object describing the types, quantities and required NUMA affinities of devices we want. :type requests: nova.objects.InstancePCIRequests :param numa_cells: A list of InstanceNUMACell objects whose ``id`` corresponds to the ``id`` of host NUMACells, or None. :returns: Whether this compute node can satisfy the given request. """ # NOTE(yjiang5): this function has high possibility to fail, # so no exception should be triggered for performance reason. return all( self._filter_pools(self.pools, r, numa_cells) for r in requests ) def _apply_request( self, pools: ty.List[Pool], request: 'objects.InstancePCIRequest', numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']] = None, ) -> bool: """Apply an individual PCI request. Apply a PCI request against a given set of PCI device pools, which are collections of devices with similar traits. If ``numa_cells`` is provided then NUMA locality may be taken into account, depending on the value of ``request.numa_policy``. :param pools: A list of PCI device pool dicts :param request: An InstancePCIRequest object describing the type, quantity and required NUMA affinity of device(s) we want. :param numa_cells: A list of InstanceNUMACell objects whose ``id`` corresponds to the ``id`` of host NUMACell objects. :returns: True if the request was applied against the provided pools successfully, else False. """ # NOTE(vladikr): This code maybe open to race conditions. # Two concurrent requests may succeed when called support_requests # because this method does not remove related devices from the pools filtered_pools = self._filter_pools(pools, request, numa_cells) if not filtered_pools: return False count = request.count for pool in filtered_pools: count = self._decrease_pool_count(pools, pool, count) if not count: break return True def apply_requests( self, requests: ty.List['objects.InstancePCIRequest'], numa_cells: ty.Optional[ty.List['objects.InstanceNUMACell']] = None, ) -> None: """Apply PCI requests to the PCI stats. This is used in multiple instance creation, when the scheduler has to maintain how the resources are consumed by the instances. If ``numa_cells`` is provided then NUMA locality may be taken into account, depending on the value of ``numa_policy``. :param requests: A list of InstancePCIRequest object describing the types, quantities and required NUMA affinities of devices we want. :type requests: nova.objects.InstancePCIRequests :param numa_cells: A list of InstanceNUMACell objects whose ``id`` corresponds to the ``id`` of host NUMACells, or None. :raises: exception.PciDeviceRequestFailed if this compute node cannot satisfy the given request. """ if not all( self._apply_request(self.pools, r, numa_cells) for r in requests ): raise exception.PciDeviceRequestFailed(requests=requests) def __iter__(self) -> ty.Iterator[Pool]: pools: ty.List[Pool] = [] for pool in self.pools: pool = copy.deepcopy(pool) # 'devices' shouldn't be part of stats if 'devices' in pool: del pool['devices'] pools.append(pool) return iter(pools) def clear(self) -> None: """Clear all the stats maintained.""" self.pools = [] def __eq__(self, other: object) -> bool: if not isinstance(other, PciDeviceStats): return NotImplemented return self.pools == other.pools def to_device_pools_obj(self) -> 'objects.PciDevicePoolList': """Return the contents of the pools as a PciDevicePoolList object.""" stats = [x for x in self] return pci_device_pool.from_pci_stats(stats) def has_remote_managed_device_pools(self) -> bool: """Determine whether remote managed device pools are present on a host. The check is pool-based, not free device-based and is NUMA cell agnostic. """ dummy_req = objects.InstancePCIRequest( count=0, spec=[{'remote_managed': True}] ) pools = self._filter_pools_for_spec(self.pools, dummy_req) return bool(pools)
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29941, 18555, 29892, 9266, 29889, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29941, 4673, 7264, 10606, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 1678, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 887, 1122, 4017, 13, 29937, 1678, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 308, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 1678, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 1678, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 399, 1806, 8187, 2692, 13, 29937, 1678, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 2823, 278, 13, 29937, 1678, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 27028, 13, 29937, 1678, 1090, 278, 19245, 29889, 13, 13, 5215, 3509, 13, 5215, 19229, 408, 7911, 13, 13, 3166, 2897, 417, 29918, 2917, 1053, 274, 16434, 13, 3166, 2897, 417, 29918, 1188, 1053, 1480, 408, 12183, 13, 3166, 2897, 417, 29918, 13239, 1053, 851, 13239, 13, 13, 3166, 26121, 1053, 3682, 13, 3166, 26121, 1053, 3618, 13, 3166, 26121, 29889, 12650, 1053, 4235, 13, 3166, 26121, 29889, 12650, 1053, 282, 455, 29918, 10141, 29918, 10109, 13, 3166, 26121, 29889, 29886, 455, 29889, 3827, 1053, 349, 8426, 29918, 1525, 29924, 2891, 29923, 29918, 1529, 3521, 1692, 29928, 29918, 16881, 13, 3166, 26121, 29889, 29886, 455, 1053, 3667, 29879, 13, 3166, 26121, 29889, 29886, 455, 1053, 377, 7454, 391, 13, 13, 6007, 29943, 353, 274, 16434, 29889, 6007, 29943, 13, 14480, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 29937, 14402, 29898, 1655, 9789, 4951, 1125, 1334, 1795, 864, 304, 671, 14213, 287, 21533, 1244, 29889, 4118, 304, 13, 29937, 2045, 597, 1357, 2272, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 29895, 12772, 29918, 974, 29918, 8768, 29889, 1420, 29937, 1017, 9795, 8977, 363, 13, 29937, 901, 2472, 29889, 13, 11426, 353, 7911, 29889, 21533, 29961, 710, 29892, 7911, 29889, 10773, 29962, 13, 13, 13, 1990, 349, 455, 11501, 25060, 29898, 3318, 1125, 13, 13, 1678, 9995, 29925, 8426, 9224, 15837, 2472, 29889, 13, 13, 1678, 7579, 304, 278, 349, 8426, 21020, 29899, 5971, 29963, 1580, 29892, 263, 349, 8426, 9128, 740, 508, 505, 701, 304, 13, 268, 29906, 29945, 29953, 349, 8426, 6901, 3168, 29892, 4550, 278, 1353, 310, 3566, 519, 349, 8426, 3168, 297, 13, 1678, 263, 9570, 508, 367, 4802, 29889, 450, 1364, 14952, 4225, 304, 1073, 599, 4742, 20847, 3097, 13, 1678, 2472, 297, 1797, 304, 8161, 607, 10272, 18982, 508, 2304, 263, 349, 8426, 13, 1678, 2009, 29889, 6978, 292, 5375, 6901, 4742, 2472, 304, 278, 1364, 14952, 13, 1678, 947, 451, 6287, 29892, 577, 591, 3867, 15837, 2472, 29889, 13, 13, 1678, 26991, 278, 6901, 3168, 4944, 491, 263, 3495, 349, 8426, 4742, 505, 278, 1021, 13, 1678, 995, 363, 1556, 4426, 29892, 763, 27042, 29918, 333, 29892, 3234, 29918, 333, 322, 770, 1134, 29889, 13, 1678, 450, 349, 8426, 22663, 770, 19138, 7093, 445, 2472, 363, 278, 1364, 14952, 29889, 13, 13, 1678, 450, 282, 455, 22663, 2472, 338, 19949, 13489, 3598, 491, 10272, 2943, 13, 1678, 6503, 1020, 4937, 322, 4784, 304, 2566, 29889, 450, 1364, 14952, 6699, 267, 278, 13, 1678, 2472, 322, 27778, 278, 10272, 2943, 16205, 29889, 960, 263, 10272, 13, 1678, 2943, 338, 4629, 29892, 278, 6503, 1020, 4937, 6643, 1078, 278, 9224, 304, 278, 13, 1678, 2777, 322, 11217, 278, 282, 455, 22663, 2472, 29889, 13, 13, 1678, 910, 15837, 2472, 674, 367, 8444, 363, 9570, 10643, 884, 29889, 13, 1678, 9995, 13, 13, 1678, 11565, 29918, 8149, 353, 6024, 4704, 29918, 333, 742, 525, 19167, 29918, 333, 742, 525, 1949, 29874, 29918, 3177, 742, 525, 3359, 29918, 1853, 2033, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 13, 4706, 954, 29874, 29918, 3332, 3002, 29901, 525, 12650, 29889, 13967, 1299, 459, 3002, 742, 13, 4706, 22663, 29901, 525, 12650, 29889, 9026, 1367, 29872, 1087, 11426, 1293, 29915, 353, 6213, 29892, 13, 4706, 2906, 29918, 4572, 29901, 377, 7454, 391, 29889, 8809, 7454, 391, 353, 6213, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 1583, 29889, 1949, 29874, 29918, 3332, 3002, 353, 954, 29874, 29918, 3332, 3002, 13, 4706, 1583, 29889, 1129, 3775, 353, 313, 13, 9651, 518, 29886, 455, 29918, 10109, 29889, 517, 29918, 8977, 580, 363, 282, 455, 29918, 10109, 297, 22663, 29962, 565, 22663, 1683, 5159, 13, 4706, 1723, 13, 4706, 1583, 29889, 1129, 3775, 29889, 6605, 29898, 1989, 29922, 2892, 2944, 29901, 7431, 29898, 667, 876, 13, 4706, 1583, 29889, 3359, 29918, 4572, 353, 2906, 29918, 4572, 470, 377, 7454, 391, 29889, 8809, 7454, 391, 29898, 13, 9651, 8707, 29943, 29889, 29886, 455, 29889, 18182, 303, 1092, 820, 29918, 1332, 7454, 391, 29897, 13, 13, 1678, 822, 903, 11745, 29918, 11330, 29898, 13, 4706, 1583, 29892, 2906, 29901, 28625, 29892, 6251, 29901, 28625, 29892, 9686, 29918, 8149, 29901, 7911, 29889, 1293, 29961, 710, 1402, 13, 1678, 1723, 1599, 6120, 29901, 13, 4706, 736, 599, 29898, 3359, 29889, 657, 29898, 7728, 29897, 1275, 6251, 29889, 657, 29898, 7728, 29897, 13, 462, 259, 363, 3107, 297, 9686, 29918, 8149, 29897, 13, 13, 1678, 822, 903, 2886, 29918, 10109, 29898, 1311, 29892, 2906, 29918, 10109, 29901, 28625, 29897, 1599, 7911, 29889, 27636, 29961, 11426, 5387, 13, 4706, 9995, 11609, 278, 937, 11565, 393, 7087, 2906, 1213, 15945, 13, 4706, 363, 11565, 297, 1583, 29889, 1129, 3775, 29901, 13, 9651, 11565, 29918, 8149, 353, 11565, 29889, 8552, 580, 13, 9651, 628, 11565, 29918, 8149, 1839, 2798, 2033, 13, 9651, 628, 11565, 29918, 8149, 1839, 3359, 1575, 2033, 13, 9651, 565, 313, 2435, 29898, 10109, 29918, 8149, 29889, 8149, 3101, 1275, 7431, 29898, 3359, 29918, 10109, 29889, 8149, 3101, 322, 13, 18884, 1583, 3032, 11745, 29918, 11330, 29898, 3359, 29918, 10109, 29892, 11565, 29918, 8149, 29892, 1051, 29898, 3359, 29918, 10109, 876, 1125, 13, 18884, 736, 11565, 13, 13, 4706, 736, 6213, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 7469, 29918, 16674, 29918, 25240, 29918, 4039, 29898, 13, 9651, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 742, 11565, 29901, 28625, 1125, 13, 4706, 9995, 2528, 263, 7592, 29918, 25240, 4055, 8679, 373, 263, 4742, 1134, 565, 4312, 29889, 13, 13, 4706, 8527, 9224, 1122, 367, 8745, 1083, 327, 873, 29892, 321, 29889, 29887, 29889, 491, 263, 4116, 442, 29940, 2965, 360, 7056, 29889, 960, 13, 4706, 263, 4055, 756, 451, 1063, 9479, 4944, 29892, 19450, 372, 491, 10241, 393, 13, 4706, 263, 4742, 338, 451, 7592, 8745, 491, 2322, 29889, 13, 4706, 9995, 13, 4706, 565, 2906, 29889, 3359, 29918, 1853, 451, 297, 313, 9621, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 24460, 29892, 13, 462, 18884, 4235, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 13691, 29892, 13, 462, 18884, 4235, 29889, 29925, 455, 11501, 1542, 29889, 10699, 7228, 1125, 13, 9651, 736, 13, 13, 4706, 396, 319, 4055, 338, 2715, 1244, 3265, 1135, 472, 278, 3132, 2625, 304, 4772, 385, 13, 4706, 396, 2228, 411, 2534, 3618, 1728, 445, 4055, 6790, 2645, 385, 13, 4706, 396, 14955, 304, 278, 937, 1873, 393, 11286, 11415, 445, 4055, 29889, 13, 4706, 565, 11565, 29889, 657, 29898, 29925, 8426, 29918, 1525, 29924, 2891, 29923, 29918, 1529, 3521, 1692, 29928, 29918, 16881, 29897, 338, 6213, 29901, 13, 9651, 396, 6058, 29923, 29901, 8282, 526, 9401, 408, 6031, 1206, 29899, 1144, 575, 277, 3598, 29892, 1074, 13, 9651, 396, 282, 455, 29918, 10141, 29918, 7728, 29918, 4352, 297, 26121, 29914, 29886, 455, 29914, 13239, 29889, 2272, 29889, 13, 9651, 11565, 29961, 29925, 8426, 29918, 1525, 29924, 2891, 29923, 29918, 1529, 3521, 1692, 29928, 29918, 16881, 29962, 353, 525, 4541, 29915, 13, 13, 1678, 822, 903, 3258, 29918, 10109, 29918, 8149, 29918, 3166, 29918, 3359, 29898, 13, 4706, 1583, 29892, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 742, 13, 1678, 1723, 1599, 7911, 29889, 27636, 29961, 11426, 5387, 13, 4706, 9995, 4391, 263, 22663, 11565, 9657, 393, 445, 2906, 338, 7424, 304, 367, 760, 310, 13, 13, 4706, 3940, 393, 445, 11565, 9657, 3743, 278, 22663, 11565, 29915, 29879, 6611, 322, 1009, 13, 4706, 1819, 29889, 525, 2798, 29915, 322, 525, 3359, 1575, 29915, 526, 451, 5134, 29889, 13, 4706, 9995, 13, 4706, 396, 3872, 29915, 29873, 788, 263, 4742, 393, 1838, 29915, 29873, 505, 263, 9686, 4742, 1580, 29889, 13, 4706, 396, 910, 508, 3799, 2645, 2847, 16523, 701, 411, 278, 4701, 13, 4706, 2906, 6550, 353, 1583, 29889, 3359, 29918, 4572, 29889, 657, 29918, 3359, 6550, 29898, 3359, 29897, 13, 4706, 565, 451, 2906, 6550, 29901, 13, 9651, 736, 6213, 13, 4706, 8282, 353, 2906, 6550, 29889, 657, 29918, 11338, 580, 13, 4706, 11565, 353, 426, 29895, 29901, 679, 5552, 29898, 3359, 29892, 413, 29897, 363, 413, 297, 1583, 29889, 10109, 29918, 8149, 29913, 13, 4706, 565, 8282, 29901, 13, 9651, 11565, 29889, 5504, 29898, 11338, 29897, 13, 4706, 396, 6058, 29923, 29898, 29887, 747, 29875, 1125, 3847, 29918, 361, 978, 14741, 763, 263, 4055, 2645, 282, 455, 5995, 541, 13, 4706, 396, 451, 4944, 408, 760, 310, 278, 377, 7454, 391, 1580, 408, 372, 338, 4469, 17809, 13, 4706, 396, 491, 278, 4610, 7156, 29889, 13, 4706, 396, 910, 1820, 338, 1304, 363, 1993, 2799, 749, 29925, 455, 3089, 1250, 287, 491, 11553, 1617, 16169, 13, 4706, 396, 393, 756, 6503, 29918, 3827, 322, 5480, 393, 756, 6503, 24082, 13, 4706, 396, 2307, 297, 2174, 13561, 29889, 13, 4706, 565, 2906, 29889, 17833, 29918, 3888, 29889, 657, 877, 3560, 29918, 361, 978, 29374, 13, 9651, 11565, 1839, 3560, 29918, 361, 978, 2033, 353, 2906, 29889, 17833, 29918, 3888, 1839, 3560, 29918, 361, 978, 2033, 13, 13, 4706, 1583, 3032, 7469, 29918, 16674, 29918, 25240, 29918, 4039, 29898, 3359, 29892, 11565, 29897, 13, 13, 4706, 736, 11565, 13, 13, 1678, 822, 903, 657, 29918, 10109, 29918, 2541, 29918, 10141, 29918, 1853, 29918, 29885, 1608, 905, 29898, 13, 4706, 1583, 29892, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 742, 13, 1678, 1723, 1599, 7911, 29889, 27636, 29961, 1017, 29889, 23215, 552, 29961, 11426, 29892, 525, 12650, 29889, 29925, 455, 11501, 2033, 5387, 13, 4706, 9995, 5596, 363, 4742, 1134, 29635, 297, 278, 772, 3775, 363, 263, 2183, 4742, 29889, 13, 13, 4706, 7106, 313, 10109, 29892, 4742, 29897, 565, 4742, 1134, 947, 451, 1993, 470, 263, 2323, 6213, 13, 4706, 565, 278, 4742, 1134, 7087, 29889, 13, 4706, 9995, 13, 4706, 363, 11565, 297, 1583, 29889, 1129, 3775, 29901, 13, 9651, 363, 4742, 297, 11565, 1839, 3359, 1575, 2033, 29901, 13, 18884, 565, 4742, 29889, 7328, 1275, 2906, 29889, 7328, 29901, 13, 462, 1678, 565, 2906, 29889, 3359, 29918, 1853, 2804, 11565, 3366, 3359, 29918, 1853, 3108, 29901, 13, 462, 4706, 736, 11565, 29892, 4742, 13, 462, 1678, 736, 6213, 13, 13, 4706, 736, 6213, 13, 13, 1678, 822, 2767, 29918, 10141, 29898, 1311, 29892, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 1495, 1599, 6213, 29901, 13, 4706, 9995, 6422, 263, 4742, 304, 967, 9686, 11565, 1213, 15945, 13, 4706, 11565, 29918, 10141, 29918, 3888, 353, 1583, 3032, 657, 29918, 10109, 29918, 2541, 29918, 10141, 29918, 1853, 29918, 29885, 1608, 905, 29898, 3359, 29897, 13, 4706, 565, 11565, 29918, 10141, 29918, 3888, 338, 6213, 29901, 13, 9651, 736, 6213, 13, 13, 4706, 11565, 29892, 4742, 353, 11565, 29918, 10141, 29918, 3888, 13, 4706, 11565, 1839, 3359, 1575, 13359, 5992, 29898, 10141, 29897, 13, 4706, 1583, 3032, 311, 1037, 559, 29918, 10109, 29918, 2798, 29898, 1311, 29889, 1129, 3775, 29892, 11565, 29897, 13, 4706, 1583, 29889, 1202, 29918, 10141, 29898, 3359, 29897, 13, 13, 1678, 822, 788, 29918, 10141, 29898, 1311, 29892, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 1495, 1599, 6213, 29901, 13, 4706, 9995, 2528, 263, 4742, 304, 967, 9686, 11565, 1213, 15945, 13, 4706, 2906, 29918, 10109, 353, 1583, 3032, 3258, 29918, 10109, 29918, 8149, 29918, 3166, 29918, 3359, 29898, 3359, 29897, 13, 4706, 565, 2906, 29918, 10109, 29901, 13, 9651, 11565, 353, 1583, 3032, 2886, 29918, 10109, 29898, 3359, 29918, 10109, 29897, 13, 9651, 565, 451, 11565, 29901, 13, 18884, 2906, 29918, 10109, 1839, 2798, 2033, 353, 29871, 29900, 13, 18884, 2906, 29918, 10109, 1839, 3359, 1575, 2033, 353, 5159, 13, 18884, 1583, 29889, 1129, 3775, 29889, 4397, 29898, 3359, 29918, 10109, 29897, 13, 18884, 1583, 29889, 1129, 3775, 29889, 6605, 29898, 1989, 29922, 2892, 2944, 29901, 7431, 29898, 667, 876, 13, 18884, 11565, 353, 2906, 29918, 10109, 13, 9651, 11565, 1839, 2798, 2033, 4619, 29871, 29896, 13, 9651, 11565, 1839, 3359, 1575, 13359, 4397, 29898, 3359, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 903, 311, 1037, 559, 29918, 10109, 29918, 2798, 29898, 13, 4706, 11565, 29918, 1761, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 11565, 29901, 28625, 29892, 2302, 29901, 938, 353, 29871, 29896, 29892, 13, 1678, 1723, 1599, 938, 29901, 13, 4706, 9995, 6185, 276, 358, 11565, 29915, 29879, 2159, 491, 2302, 29889, 13, 13, 4706, 960, 11565, 7415, 4069, 29892, 3349, 11565, 515, 11565, 29918, 1761, 29889, 13, 4706, 9995, 13, 4706, 565, 11565, 1839, 2798, 2033, 1405, 2302, 29901, 13, 9651, 11565, 1839, 2798, 2033, 22361, 2302, 13, 9651, 2302, 353, 29871, 29900, 13, 4706, 1683, 29901, 13, 9651, 2302, 22361, 11565, 1839, 2798, 2033, 13, 9651, 11565, 29918, 1761, 29889, 5992, 29898, 10109, 29897, 13, 4706, 736, 2302, 13, 13, 1678, 822, 3349, 29918, 10141, 29898, 1311, 29892, 2906, 29901, 525, 12650, 29889, 29925, 455, 11501, 1495, 1599, 6213, 29901, 13, 4706, 9995, 15941, 697, 4742, 515, 278, 937, 11565, 393, 372, 7087, 1213, 15945, 13, 4706, 2906, 29918, 10109, 353, 1583, 3032, 3258, 29918, 10109, 29918, 8149, 29918, 3166, 29918, 3359, 29898, 3359, 29897, 13, 4706, 565, 2906, 29918, 10109, 29901, 13, 9651, 11565, 353, 1583, 3032, 2886, 29918, 10109, 29898, 3359, 29918, 10109, 29897, 13, 9651, 565, 451, 11565, 29901, 13, 18884, 12020, 3682, 29889, 29925, 455, 11501, 11426, 8915, 29898, 13, 462, 1678, 10272, 29918, 3177, 29918, 333, 29922, 3359, 29889, 26017, 29918, 3177, 29918, 333, 29892, 3211, 29922, 3359, 29889, 7328, 29897, 13, 9651, 11565, 1839, 3359, 1575, 13359, 5992, 29898, 3359, 29897, 13, 9651, 1583, 3032, 311, 1037, 559, 29918, 10109, 29918, 2798, 29898, 1311, 29889, 1129, 3775, 29892, 11565, 29897, 13, 13, 1678, 822, 679, 29918, 9021, 29918, 3359, 29879, 29898, 1311, 29897, 1599, 7911, 29889, 1293, 1839, 12650, 29889, 29925, 455, 11501, 2033, 29901, 13, 4706, 3889, 29918, 3359, 29879, 29901, 7911, 29889, 1293, 29961, 12650, 29889, 29925, 455, 11501, 29962, 353, 5159, 13, 4706, 363, 11565, 297, 1583, 29889, 1129, 3775, 29901, 13, 9651, 3889, 29918, 3359, 29879, 29889, 21843, 29898, 10109, 1839, 3359, 1575, 11287, 13, 4706, 736, 3889, 29918, 3359, 29879, 13, 13, 1678, 822, 29151, 29918, 24830, 29898, 13, 4706, 1583, 29892, 13, 4706, 282, 455, 29918, 24830, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 29879, 742, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 29925, 455, 11501, 2033, 5387, 13, 13, 4706, 6643, 29918, 3359, 1575, 29901, 7911, 29889, 1293, 29961, 12650, 29889, 29925, 455, 11501, 29962, 353, 5159, 13, 13, 4706, 363, 2009, 297, 282, 455, 29918, 24830, 29901, 13, 9651, 2302, 353, 2009, 29889, 2798, 13, 13, 9651, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29898, 1311, 29889, 1129, 3775, 29892, 2009, 29892, 954, 29874, 29918, 3729, 29879, 29897, 13, 13, 9651, 396, 18390, 304, 23632, 278, 3734, 1353, 310, 9224, 29889, 7106, 278, 13, 9651, 396, 9224, 2307, 19591, 2645, 3517, 24372, 1250, 304, 13, 9651, 396, 1009, 772, 3775, 13, 9651, 565, 451, 772, 3775, 29901, 13, 18884, 25401, 29889, 2704, 703, 17776, 304, 23632, 349, 8426, 9224, 363, 2777, 29889, 376, 13, 462, 3986, 376, 2525, 16645, 292, 9224, 1250, 304, 772, 3775, 29889, 376, 13, 462, 3986, 376, 4013, 881, 451, 3799, 29892, 1951, 278, 1364, 14952, 376, 13, 462, 3986, 376, 9344, 505, 16232, 2472, 29892, 322, 24082, 376, 13, 462, 3986, 376, 29881, 3864, 16726, 338, 20704, 3025, 263, 4808, 376, 13, 462, 3986, 376, 265, 278, 10272, 2943, 3031, 12451, 487, 23157, 13, 18884, 363, 270, 297, 3464, 29898, 2435, 29898, 15956, 29918, 3359, 1575, 22164, 13, 462, 1678, 1583, 29889, 1202, 29918, 10141, 29898, 15956, 29918, 3359, 1575, 29889, 7323, 3101, 13, 18884, 736, 6213, 13, 13, 9651, 363, 11565, 297, 772, 3775, 29901, 13, 18884, 565, 11565, 1839, 2798, 2033, 6736, 2302, 29901, 13, 462, 1678, 954, 29918, 15956, 353, 2302, 13, 18884, 1683, 29901, 13, 462, 1678, 954, 29918, 15956, 353, 11565, 1839, 2798, 2033, 13, 18884, 2302, 22361, 954, 29918, 15956, 13, 18884, 11565, 1839, 2798, 2033, 22361, 954, 29918, 15956, 13, 18884, 363, 270, 297, 3464, 29898, 1949, 29918, 15956, 1125, 13, 462, 1678, 282, 455, 29918, 3359, 353, 11565, 1839, 3359, 1575, 13359, 7323, 580, 13, 462, 1678, 1583, 3032, 8411, 29918, 10141, 29918, 2716, 355, 1237, 29898, 29886, 455, 29918, 3359, 29897, 13, 462, 1678, 282, 455, 29918, 3359, 29889, 3827, 29918, 333, 353, 2009, 29889, 3827, 29918, 333, 13, 462, 1678, 6643, 29918, 3359, 1575, 29889, 4397, 29898, 29886, 455, 29918, 3359, 29897, 13, 18884, 565, 2302, 1275, 29871, 29900, 29901, 13, 462, 1678, 2867, 13, 13, 4706, 736, 6643, 29918, 3359, 1575, 13, 13, 1678, 822, 903, 8411, 29918, 10141, 29918, 2716, 355, 1237, 29898, 1311, 29892, 282, 455, 29918, 3359, 29901, 525, 12650, 29889, 29925, 455, 11501, 1495, 1599, 6213, 29901, 13, 4706, 9995, 15941, 4742, 8839, 1237, 470, 263, 3847, 515, 772, 3775, 29889, 13, 13, 4706, 512, 1206, 278, 4742, 338, 263, 349, 29943, 29892, 599, 310, 372, 29915, 29879, 14278, 478, 29943, 29879, 881, 13, 4706, 367, 6206, 515, 772, 3775, 2302, 29892, 565, 1438, 526, 2198, 29889, 13, 4706, 1932, 278, 4742, 338, 263, 478, 29943, 29892, 470, 263, 478, 29928, 7228, 4742, 29892, 372, 29915, 29879, 3847, 349, 29943, 13, 4706, 11565, 2302, 881, 367, 9263, 1463, 29892, 6521, 372, 338, 694, 5520, 297, 263, 11565, 29889, 13, 4706, 9995, 13, 4706, 565, 282, 455, 29918, 3359, 29889, 3359, 29918, 1853, 1275, 4235, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 13691, 29901, 13, 9651, 325, 5847, 29918, 1761, 353, 282, 455, 29918, 3359, 29889, 5145, 29918, 3359, 1575, 13, 9651, 565, 325, 5847, 29918, 1761, 29901, 13, 18884, 3889, 29918, 3359, 29879, 353, 1583, 29889, 657, 29918, 9021, 29918, 3359, 29879, 580, 13, 18884, 363, 325, 29888, 297, 325, 5847, 29918, 1761, 29901, 13, 462, 1678, 396, 6058, 29923, 29898, 29887, 747, 29875, 1125, 437, 451, 1018, 304, 3349, 263, 4742, 393, 526, 13, 462, 1678, 396, 2307, 6206, 13, 462, 1678, 565, 325, 29888, 297, 3889, 29918, 3359, 29879, 29901, 13, 462, 4706, 1583, 29889, 5992, 29918, 10141, 29898, 29894, 29888, 29897, 13, 4706, 25342, 282, 455, 29918, 3359, 29889, 3359, 29918, 1853, 297, 313, 13, 9651, 4235, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 24460, 29892, 13, 9651, 4235, 29889, 29925, 455, 11501, 1542, 29889, 10699, 7228, 29892, 13, 308, 1125, 13, 9651, 1018, 29901, 13, 18884, 3847, 353, 282, 455, 29918, 3359, 29889, 3560, 29918, 10141, 13, 18884, 396, 8561, 1854, 451, 304, 23806, 349, 29943, 11565, 2302, 565, 445, 3847, 756, 13, 18884, 396, 1063, 2307, 6206, 515, 772, 3775, 13, 18884, 565, 3847, 297, 1583, 29889, 657, 29918, 9021, 29918, 3359, 29879, 7295, 13, 462, 1678, 1583, 29889, 5992, 29918, 10141, 29898, 3560, 29897, 13, 9651, 5174, 3682, 29889, 29925, 455, 11501, 17413, 29901, 13, 18884, 736, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 6550, 29898, 13, 4706, 1583, 29892, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 9995, 5072, 714, 772, 3775, 393, 1016, 29915, 29873, 1993, 278, 2009, 29915, 29879, 4742, 1580, 29889, 13, 13, 4706, 1222, 2325, 772, 3775, 393, 437, 451, 1993, 278, 6790, 4954, 19167, 29918, 333, 29952, 1673, 13, 4706, 4954, 4704, 29918, 333, 16159, 322, 29914, 272, 4954, 10141, 29918, 1853, 16159, 1746, 29892, 470, 738, 310, 278, 916, 13, 4706, 11472, 8282, 1316, 408, 4954, 14017, 936, 29918, 11618, 29952, 1673, 6790, 297, 278, 2009, 29889, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 367, 1304, 304, 2304, 278, 2009, 565, 13, 9651, 445, 338, 1950, 29889, 13, 4706, 9995, 13, 4706, 2009, 29918, 5965, 2395, 353, 2009, 29889, 6550, 13, 4706, 736, 518, 13, 9651, 11565, 363, 11565, 297, 772, 3775, 13, 9651, 565, 3667, 29879, 29889, 29886, 455, 29918, 10141, 29918, 7728, 29918, 4352, 29898, 10109, 29892, 2009, 29918, 5965, 2395, 29897, 13, 4706, 4514, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 1949, 29874, 29918, 3729, 29879, 29898, 13, 4706, 1583, 29892, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 13, 4706, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 1402, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 9995, 5072, 714, 772, 3775, 411, 278, 2743, 405, 29965, 1529, 2756, 13593, 29892, 565, 3734, 29889, 13, 13, 4706, 1222, 2325, 772, 3775, 393, 437, 451, 505, 334, 2146, 8270, 29930, 349, 8426, 405, 29965, 1529, 2756, 13593, 29889, 13, 4706, 4954, 1949, 29874, 29918, 22197, 16159, 3683, 1475, 825, 334, 2146, 8270, 29930, 2794, 29892, 1641, 697, 310, 13, 4706, 349, 25866, 1001, 19386, 313, 16533, 29899, 517, 29899, 17532, 511, 11060, 29954, 2477, 29979, 313, 21969, 29899, 17532, 29899, 361, 29899, 16515, 29897, 322, 5195, 29984, 3120, 19386, 13, 4706, 313, 21969, 29899, 17532, 467, 1334, 13649, 1549, 278, 5164, 24833, 297, 1797, 310, 13, 4706, 9406, 2264, 29889, 910, 2794, 393, 1584, 565, 591, 871, 334, 1457, 571, 29930, 349, 8426, 29899, 11601, 1529, 2756, 13593, 29892, 13, 4706, 591, 674, 1603, 4218, 304, 3867, 372, 565, 1950, 29889, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 3207, 954, 29874, 29918, 3729, 29879, 29901, 319, 1051, 310, 2799, 749, 11601, 1529, 4617, 3618, 5069, 4954, 333, 16159, 13, 9651, 16161, 304, 278, 4954, 333, 16159, 310, 3495, 405, 29965, 1529, 13418, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 29892, 4208, 29892, 3867, 472, 3203, 13, 9651, 4954, 3827, 287, 29918, 2798, 16159, 349, 8426, 9224, 411, 278, 3233, 310, 405, 29965, 1529, 2756, 13593, 13, 9651, 3734, 491, 4954, 1949, 29874, 29918, 22197, 29952, 1673, 1683, 599, 772, 3775, 393, 508, 15523, 445, 13, 9651, 8898, 1584, 565, 372, 29915, 29879, 451, 3307, 29889, 13, 4706, 9995, 13, 4706, 565, 451, 954, 29874, 29918, 3729, 29879, 29901, 13, 9651, 736, 772, 3775, 13, 13, 4706, 396, 591, 2322, 304, 278, 525, 1397, 4135, 29915, 8898, 363, 856, 974, 3236, 856, 1397, 4135, 9590, 13, 4706, 13877, 29918, 22197, 353, 4235, 29889, 9026, 1177, 29965, 1529, 27867, 13593, 15644, 29889, 1307, 29954, 2477, 29979, 13, 4706, 565, 525, 1949, 29874, 29918, 22197, 29915, 297, 2009, 29901, 13, 9651, 13877, 29918, 22197, 353, 2009, 29889, 1949, 29874, 29918, 22197, 470, 13877, 29918, 22197, 13, 13, 4706, 13877, 29918, 2798, 353, 2009, 29889, 2798, 13, 4706, 954, 29874, 29918, 3729, 29918, 4841, 353, 518, 3729, 29889, 333, 363, 3038, 297, 954, 29874, 29918, 3729, 29879, 29962, 13, 13, 4706, 396, 4175, 714, 772, 3775, 607, 954, 29874, 29918, 3177, 338, 451, 5134, 297, 954, 29874, 29918, 3729, 29918, 4841, 13, 4706, 22289, 29918, 1129, 3775, 353, 518, 13, 9651, 11565, 363, 11565, 297, 772, 3775, 565, 738, 29898, 13239, 29889, 29886, 455, 29918, 10141, 29918, 7728, 29918, 4352, 29898, 13, 18884, 11565, 29892, 518, 10998, 1949, 29874, 29918, 3177, 2396, 3038, 29913, 2314, 363, 3038, 297, 954, 29874, 29918, 3729, 29918, 4841, 4638, 13, 13, 4706, 396, 591, 508, 29915, 29873, 3394, 263, 3109, 9406, 8898, 1135, 278, 697, 13877, 29892, 577, 591, 13, 4706, 396, 817, 304, 736, 565, 591, 29915, 345, 24432, 263, 405, 29965, 1529, 2756, 13593, 310, 5195, 29984, 3120, 19386, 29889, 13, 4706, 396, 2398, 29892, 405, 29965, 1529, 2756, 13593, 338, 263, 1781, 2655, 29889, 960, 591, 508, 679, 3307, 9224, 13, 4706, 396, 411, 278, 851, 293, 357, 8898, 769, 591, 674, 671, 963, 29889, 13, 4706, 565, 13877, 29918, 22197, 1275, 4235, 29889, 9026, 1177, 29965, 1529, 27867, 13593, 15644, 29889, 1525, 29984, 3120, 19386, 470, 2533, 29898, 13, 18884, 11565, 1839, 2798, 2033, 363, 11565, 297, 22289, 29918, 1129, 3775, 29897, 6736, 13877, 29918, 2798, 29901, 13, 9651, 736, 22289, 29918, 1129, 3775, 13, 13, 4706, 396, 278, 7791, 7077, 2544, 8898, 338, 263, 2586, 310, 263, 4266, 1206, 29889, 739, 29915, 29879, 3109, 9406, 1135, 13, 4706, 396, 5195, 29984, 3120, 19386, 313, 578, 5195, 29984, 3120, 19386, 674, 6336, 6095, 1777, 7791, 7077, 2544, 29892, 472, 3203, 13, 4706, 396, 411, 1749, 11833, 310, 2360, 2534, 2999, 577, 9737, 639, 405, 29965, 1529, 2943, 511, 13, 4706, 396, 541, 451, 2337, 901, 9406, 1135, 11060, 29954, 2477, 29979, 29901, 263, 349, 8426, 4742, 411, 694, 405, 29965, 1529, 13, 4706, 396, 2756, 13593, 674, 6095, 1777, 11060, 29954, 2477, 29979, 541, 451, 7791, 7077, 2544, 29889, 960, 591, 505, 7791, 7077, 2544, 29892, 13, 4706, 396, 1889, 372, 1244, 322, 1016, 29915, 29873, 6773, 29889, 13, 4706, 565, 13877, 29918, 22197, 1275, 4235, 29889, 9026, 1177, 29965, 1529, 27867, 13593, 15644, 29889, 6156, 7077, 2544, 29901, 13, 9651, 736, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 11514, 29918, 3470, 13593, 29898, 1129, 3775, 29892, 954, 29874, 29918, 3729, 29879, 29897, 13, 13, 4706, 396, 777, 6757, 1016, 29915, 29873, 3461, 405, 29965, 1529, 2943, 5235, 363, 349, 8426, 9224, 29892, 297, 607, 13, 4706, 396, 1206, 6213, 338, 8967, 297, 525, 29886, 455, 29918, 10141, 29889, 1949, 29874, 29918, 3177, 4286, 450, 11060, 29954, 2477, 29979, 8898, 13, 4706, 396, 6511, 502, 304, 671, 1438, 9224, 577, 591, 3160, 6213, 297, 278, 1051, 310, 13, 4706, 396, 13907, 405, 29965, 1529, 9101, 29889, 13, 4706, 954, 29874, 29918, 3729, 29918, 4841, 29889, 4397, 29898, 8516, 29897, 13, 13, 4706, 396, 4175, 714, 772, 3775, 607, 954, 29874, 29918, 3177, 338, 451, 5134, 297, 954, 29874, 29918, 3729, 29918, 4841, 13, 4706, 22289, 29918, 1129, 3775, 353, 518, 13, 9651, 11565, 363, 11565, 297, 772, 3775, 565, 738, 29898, 13239, 29889, 29886, 455, 29918, 10141, 29918, 7728, 29918, 4352, 29898, 13, 18884, 11565, 29892, 518, 10998, 1949, 29874, 29918, 3177, 2396, 3038, 29913, 2314, 363, 3038, 297, 954, 29874, 29918, 3729, 29918, 4841, 4638, 13, 13, 4706, 396, 2748, 1449, 29892, 591, 508, 29915, 29873, 3394, 263, 3109, 9406, 8898, 1135, 278, 697, 13, 4706, 396, 13877, 29892, 577, 591, 817, 304, 736, 565, 591, 29915, 345, 24432, 263, 405, 29965, 1529, 2756, 13593, 310, 13, 4706, 396, 11060, 29954, 2477, 29979, 29889, 20175, 29892, 591, 674, 884, 736, 565, 591, 505, 3307, 9224, 304, 13, 4706, 396, 15523, 445, 10579, 9406, 8898, 29889, 13, 4706, 565, 13877, 29918, 22197, 1275, 4235, 29889, 9026, 1177, 29965, 1529, 27867, 13593, 15644, 29889, 1307, 29954, 2477, 29979, 470, 2533, 29898, 13, 18884, 11565, 1839, 2798, 2033, 363, 11565, 297, 22289, 29918, 1129, 3775, 29897, 6736, 13877, 29918, 2798, 29901, 13, 9651, 736, 22289, 29918, 1129, 3775, 13, 13, 4706, 396, 565, 591, 29915, 345, 2355, 1244, 29892, 591, 29915, 276, 773, 278, 349, 25866, 1001, 19386, 8898, 322, 2949, 264, 29915, 29873, 2221, 13, 4706, 396, 304, 3867, 3099, 411, 851, 293, 357, 2756, 13593, 29889, 4803, 6514, 9224, 366, 13, 4706, 396, 508, 29892, 900, 2039, 29889, 13, 4706, 736, 12705, 29898, 13, 9651, 772, 3775, 29892, 1820, 29922, 2892, 11565, 29901, 11565, 29889, 657, 877, 1949, 29874, 29918, 3177, 1495, 451, 297, 954, 29874, 29918, 3729, 29918, 4841, 29897, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 11514, 29918, 3470, 13593, 29898, 13, 4706, 1583, 29892, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 7464, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 3495, 29918, 3729, 29879, 353, 1583, 29889, 1949, 29874, 29918, 3332, 3002, 29889, 3729, 29879, 13, 4706, 396, 289, 737, 4688, 565, 591, 1016, 29915, 29873, 505, 9909, 2472, 363, 599, 3495, 29918, 3729, 29879, 29889, 13, 4706, 396, 910, 1033, 3799, 565, 591, 29915, 276, 2734, 373, 385, 13543, 9642, 1788, 411, 13, 4706, 396, 2999, 577, 9737, 639, 405, 29965, 1529, 2943, 29892, 607, 338, 263, 5285, 393, 591, 13, 4706, 396, 9479, 12784, 451, 304, 2304, 29889, 13, 4706, 565, 738, 29898, 3729, 29889, 11514, 338, 6213, 363, 3038, 297, 3495, 29918, 3729, 29879, 1125, 13, 9651, 25401, 29889, 8382, 877, 3782, 9909, 2472, 297, 3495, 405, 29965, 1529, 3038, 29898, 29879, 467, 1495, 13, 9651, 736, 5159, 13, 13, 4706, 396, 679, 263, 731, 310, 3495, 577, 9737, 393, 278, 17838, 9101, 526, 297, 29889, 4001, 17838, 13, 4706, 396, 3038, 23481, 2910, 304, 3495, 3038, 23481, 29892, 591, 508, 925, 16280, 278, 7480, 29915, 29879, 13, 4706, 396, 9909, 29889, 13, 4706, 9909, 29918, 4841, 353, 731, 580, 13, 4706, 363, 17838, 29918, 3729, 297, 954, 29874, 29918, 3729, 29879, 29901, 13, 9651, 363, 3495, 29918, 3729, 297, 3495, 29918, 3729, 29879, 29901, 13, 18884, 565, 17838, 29918, 3729, 29889, 333, 1275, 3495, 29918, 3729, 29889, 333, 29901, 13, 462, 1678, 9909, 29918, 4841, 29889, 1202, 29898, 3069, 29918, 3729, 29889, 11514, 29897, 13, 13, 4706, 396, 1286, 679, 263, 731, 310, 3495, 405, 29965, 1529, 7573, 393, 526, 297, 278, 2038, 577, 9737, 13, 4706, 6068, 29918, 1949, 29874, 29918, 18010, 353, 731, 580, 13, 4706, 363, 3495, 29918, 3729, 297, 3495, 29918, 3729, 29879, 29901, 13, 9651, 565, 3495, 29918, 3729, 29889, 11514, 297, 9909, 29918, 4841, 29901, 13, 18884, 6068, 29918, 1949, 29874, 29918, 18010, 29889, 1202, 29898, 3069, 29918, 3729, 29889, 333, 29897, 13, 13, 4706, 396, 4175, 714, 772, 3775, 393, 526, 451, 297, 697, 310, 278, 1959, 3495, 405, 29965, 1529, 7573, 29889, 13, 4706, 736, 518, 13, 9651, 11565, 363, 11565, 297, 772, 3775, 565, 738, 29898, 13, 18884, 3667, 29879, 29889, 29886, 455, 29918, 10141, 29918, 7728, 29918, 4352, 29898, 10109, 29892, 518, 10998, 1949, 29874, 29918, 3177, 2396, 954, 29874, 29918, 3177, 29913, 2314, 13, 18884, 363, 954, 29874, 29918, 3177, 297, 6068, 29918, 1949, 29874, 29918, 18010, 13, 9651, 1723, 13, 4706, 4514, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 29886, 5847, 29898, 13, 4706, 1583, 29892, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 9995, 5072, 714, 772, 3775, 411, 349, 29943, 29879, 29892, 6521, 1438, 526, 3734, 29889, 13, 13, 4706, 910, 338, 5181, 297, 4251, 988, 349, 29943, 29879, 322, 478, 29943, 29879, 505, 278, 1021, 3234, 29918, 333, 13, 4706, 322, 6892, 5407, 17551, 29889, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 367, 1304, 304, 2304, 278, 2009, 565, 13, 9651, 445, 338, 1950, 29889, 13, 4706, 9995, 13, 4706, 565, 599, 29898, 13, 9651, 1580, 29889, 657, 877, 3359, 29918, 1853, 1495, 2804, 4235, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 13691, 13, 9651, 363, 1580, 297, 2009, 29889, 6550, 13, 308, 1125, 13, 9651, 772, 3775, 353, 518, 13, 18884, 11565, 363, 11565, 297, 772, 3775, 13, 18884, 565, 451, 11565, 29889, 657, 877, 3359, 29918, 1853, 1495, 1275, 4235, 29889, 29925, 455, 11501, 1542, 29889, 29903, 3960, 29949, 29963, 29918, 13691, 13, 9651, 4514, 13, 4706, 736, 772, 3775, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 27491, 3274, 29918, 3359, 1575, 29898, 13, 4706, 1583, 29892, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 13, 4706, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 9995, 5072, 714, 772, 3775, 411, 478, 29928, 7228, 9224, 29892, 6521, 1438, 526, 3734, 29889, 13, 13, 4706, 910, 338, 5181, 408, 325, 29881, 3274, 9224, 1996, 4266, 11415, 322, 13, 4706, 881, 451, 367, 19591, 304, 10035, 282, 455, 4742, 7274, 29889, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 367, 1304, 304, 2304, 278, 2009, 565, 13, 9651, 445, 338, 1950, 29889, 13, 4706, 9995, 13, 4706, 565, 599, 29898, 13, 9651, 1580, 29889, 657, 877, 3359, 29918, 1853, 1495, 2804, 4235, 29889, 29925, 455, 11501, 1542, 29889, 10699, 7228, 13, 9651, 363, 1580, 297, 2009, 29889, 6550, 13, 308, 1125, 13, 9651, 772, 3775, 353, 518, 13, 18884, 11565, 363, 11565, 297, 772, 3775, 13, 18884, 565, 451, 11565, 29889, 657, 877, 3359, 29918, 1853, 1495, 1275, 4235, 29889, 29925, 455, 11501, 1542, 29889, 10699, 7228, 13, 9651, 4514, 13, 4706, 736, 772, 3775, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 16674, 29918, 25240, 29918, 3359, 1575, 29898, 13, 4706, 1583, 29892, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 1678, 1723, 1599, 7911, 29889, 1293, 29961, 11426, 5387, 13, 4706, 9995, 5072, 714, 772, 3775, 411, 7592, 29918, 25240, 9224, 29892, 6521, 13877, 29889, 13, 13, 4706, 5240, 866, 29899, 25240, 9224, 526, 451, 502, 519, 363, 25000, 21020, 29899, 5971, 29963, 470, 12837, 13, 4706, 1283, 1359, 21846, 322, 1818, 367, 429, 13347, 515, 24082, 29889, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 367, 1304, 304, 2304, 278, 2009, 565, 13, 9651, 445, 338, 1950, 29889, 13, 4706, 9995, 13, 4706, 565, 599, 29898, 1333, 851, 13239, 29889, 11227, 29918, 3166, 29918, 1807, 29898, 6550, 29889, 657, 29898, 29925, 8426, 29918, 1525, 29924, 2891, 29923, 29918, 1529, 3521, 1692, 29928, 29918, 16881, 876, 13, 1669, 363, 1580, 297, 2009, 29889, 6550, 1125, 13, 9651, 772, 3775, 353, 518, 10109, 363, 11565, 297, 772, 3775, 13, 462, 268, 565, 451, 851, 13239, 29889, 11227, 29918, 3166, 29918, 1807, 29898, 13, 462, 308, 11565, 29889, 657, 29898, 29925, 8426, 29918, 1525, 29924, 2891, 29923, 29918, 1529, 3521, 1692, 29928, 29918, 16881, 28166, 13, 4706, 736, 772, 3775, 13, 13, 1678, 822, 903, 4572, 29918, 1129, 3775, 29898, 13, 4706, 1583, 29892, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 13, 4706, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 1402, 13, 1678, 1723, 1599, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 29961, 11426, 5262, 29901, 13, 4706, 9995, 6362, 837, 457, 565, 385, 5375, 349, 8426, 2009, 508, 367, 1539, 29889, 13, 13, 4706, 19916, 772, 3775, 29892, 607, 526, 16250, 310, 9224, 411, 2788, 1020, 1169, 29892, 304, 13, 4706, 12439, 1906, 393, 508, 2304, 278, 4944, 349, 8426, 2009, 29889, 13, 13, 4706, 960, 4954, 1949, 29874, 29918, 3729, 29879, 16159, 338, 4944, 769, 405, 29965, 1529, 1887, 537, 1122, 367, 4586, 964, 13, 4706, 3633, 29892, 8679, 373, 278, 995, 310, 4954, 3827, 29889, 1949, 29874, 29918, 22197, 29952, 1412, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 3207, 954, 29874, 29918, 3729, 29879, 29901, 319, 1051, 310, 2799, 749, 11601, 1529, 4617, 3618, 5069, 4954, 333, 16159, 13, 9651, 16161, 304, 278, 4954, 333, 16159, 310, 3495, 405, 29965, 1529, 4617, 3618, 29889, 13, 4706, 584, 18280, 29901, 319, 1051, 310, 772, 3775, 393, 508, 367, 1304, 304, 2304, 278, 2009, 565, 13, 9651, 445, 338, 1950, 29892, 1683, 6213, 29889, 13, 4706, 9995, 13, 4706, 396, 6058, 29923, 29898, 29894, 4528, 638, 29878, 1125, 910, 775, 1122, 367, 1722, 304, 8175, 5855, 29889, 13, 4706, 396, 7803, 21984, 7274, 1122, 9269, 746, 2000, 2304, 29918, 24830, 13, 4706, 396, 1363, 445, 1158, 947, 451, 3349, 4475, 9224, 515, 278, 772, 3775, 13, 13, 4706, 396, 3824, 368, 29892, 1235, 29915, 29879, 19060, 599, 9224, 393, 1016, 29915, 29873, 1993, 1749, 1580, 313, 29872, 29889, 29887, 29889, 13, 4706, 396, 896, 29915, 345, 2355, 1422, 349, 8426, 23481, 470, 1554, 29897, 13, 4706, 1434, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 6550, 29898, 1129, 3775, 29892, 2009, 29897, 13, 4706, 1156, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 1434, 29918, 2798, 29901, 13, 9651, 25401, 29889, 8382, 29898, 13, 18884, 525, 29928, 307, 2986, 1273, 29881, 4742, 29898, 29879, 29897, 2861, 304, 29635, 287, 349, 8426, 5352, 29898, 29879, 29897, 742, 13, 18884, 1434, 29918, 2798, 448, 1156, 29918, 2798, 13, 9651, 1723, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 2009, 29889, 2798, 29901, 13, 9651, 25401, 29889, 8382, 877, 3664, 3307, 349, 8426, 9224, 2175, 304, 15523, 2009, 1495, 13, 9651, 736, 6213, 13, 13, 4706, 396, 8084, 29892, 1235, 29915, 29879, 19060, 599, 9224, 393, 9455, 29915, 29873, 373, 278, 1959, 405, 29965, 1529, 2943, 13, 4706, 396, 470, 9909, 29892, 334, 465, 9929, 29930, 591, 505, 9224, 322, 2562, 1048, 393, 29892, 408, 13, 4706, 396, 10087, 491, 8898, 13, 4706, 1434, 29918, 2798, 353, 1156, 29918, 2798, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 1949, 29874, 29918, 3729, 29879, 29898, 1129, 3775, 29892, 2009, 29892, 954, 29874, 29918, 3729, 29879, 29897, 13, 4706, 1156, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 1434, 29918, 2798, 29901, 13, 9651, 25401, 29889, 8382, 29898, 13, 18884, 525, 29928, 307, 2986, 1273, 29881, 4742, 29898, 29879, 29897, 408, 896, 526, 373, 278, 2743, 405, 29965, 1529, 2943, 29898, 29879, 29897, 742, 13, 18884, 1434, 29918, 2798, 448, 1156, 29918, 2798, 13, 9651, 1723, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 2009, 29889, 2798, 29901, 13, 9651, 25401, 29889, 8382, 877, 3664, 3307, 349, 8426, 9224, 2175, 304, 15523, 2009, 1495, 13, 9651, 736, 6213, 13, 13, 4706, 396, 960, 591, 29915, 276, 451, 2009, 292, 349, 29943, 29879, 769, 591, 881, 451, 671, 1438, 29889, 13, 4706, 396, 1222, 2325, 963, 29889, 13, 4706, 1434, 29918, 2798, 353, 1156, 29918, 2798, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 29886, 5847, 29898, 1129, 3775, 29892, 2009, 29897, 13, 4706, 1156, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 1434, 29918, 2798, 29901, 13, 9651, 25401, 29889, 8382, 29898, 13, 18884, 525, 29928, 307, 2986, 1273, 29881, 4742, 29898, 29879, 29897, 408, 896, 526, 349, 29943, 29879, 607, 591, 505, 451, 525, 13, 18884, 525, 3827, 287, 742, 13, 18884, 1434, 29918, 2798, 448, 1156, 29918, 2798, 13, 9651, 1723, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 2009, 29889, 2798, 29901, 13, 9651, 25401, 29889, 8382, 877, 3664, 3307, 349, 8426, 9224, 2175, 304, 15523, 2009, 1495, 13, 9651, 736, 6213, 13, 13, 4706, 396, 960, 591, 29915, 276, 451, 2009, 292, 478, 29928, 7228, 9224, 769, 591, 881, 451, 671, 1438, 13, 4706, 396, 2845, 29889, 1222, 2325, 963, 29889, 13, 4706, 1434, 29918, 2798, 353, 1156, 29918, 2798, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 27491, 3274, 29918, 3359, 1575, 29898, 1129, 3775, 29892, 2009, 29897, 13, 4706, 1156, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 1434, 29918, 2798, 29901, 13, 9651, 25401, 29889, 8382, 29898, 13, 18884, 525, 29928, 307, 2986, 1273, 29881, 4742, 29898, 29879, 29897, 408, 896, 526, 478, 29928, 7228, 9224, 607, 591, 505, 525, 13, 18884, 525, 1333, 13877, 742, 13, 18884, 1434, 29918, 2798, 448, 1156, 29918, 2798, 13, 9651, 1723, 13, 13, 4706, 396, 960, 591, 29915, 276, 451, 2009, 292, 7592, 29918, 25240, 9224, 769, 591, 881, 451, 13, 4706, 396, 671, 1438, 2845, 29889, 1222, 2325, 963, 29889, 13, 4706, 1434, 29918, 2798, 353, 1156, 29918, 2798, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 348, 3827, 287, 29918, 16674, 29918, 25240, 29918, 3359, 1575, 29898, 13, 9651, 772, 3775, 29892, 2009, 29897, 13, 4706, 1156, 29918, 2798, 353, 2533, 4197, 10109, 1839, 2798, 2033, 363, 11565, 297, 772, 3775, 2314, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 1434, 29918, 2798, 29901, 13, 9651, 25401, 29889, 8382, 29898, 13, 18884, 525, 29928, 307, 2986, 1273, 29881, 4742, 29898, 29879, 29897, 408, 896, 526, 7592, 29899, 25240, 9224, 607, 29915, 13, 18884, 525, 705, 505, 451, 13877, 742, 13, 18884, 1434, 29918, 2798, 448, 1156, 29918, 2798, 13, 9651, 1723, 13, 13, 4706, 565, 1156, 29918, 2798, 529, 2009, 29889, 2798, 29901, 13, 9651, 25401, 29889, 8382, 877, 3664, 3307, 349, 8426, 9224, 2175, 304, 15523, 2009, 1495, 13, 9651, 736, 6213, 13, 13, 4706, 736, 772, 3775, 13, 13, 1678, 822, 2304, 29918, 24830, 29898, 13, 4706, 1583, 29892, 13, 4706, 7274, 29901, 7911, 29889, 1293, 1839, 12650, 29889, 4998, 29925, 8426, 3089, 7464, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 6120, 29901, 13, 4706, 9995, 6362, 837, 457, 565, 278, 349, 8426, 7274, 508, 367, 1539, 29889, 13, 13, 4706, 5953, 837, 457, 29892, 2729, 373, 263, 10272, 2943, 29915, 29879, 349, 8426, 22663, 29892, 565, 385, 2777, 508, 367, 13, 4706, 21467, 373, 278, 2943, 29889, 3579, 14039, 947, 451, 2099, 1855, 24082, 1068, 29889, 13, 13, 4706, 960, 4954, 1949, 29874, 29918, 3729, 29879, 16159, 338, 4944, 769, 405, 29965, 1529, 1887, 537, 1122, 367, 4586, 964, 13, 4706, 3633, 29892, 8679, 373, 278, 995, 310, 4954, 1949, 29874, 29918, 22197, 29952, 1412, 13, 13, 4706, 584, 3207, 7274, 29901, 319, 1051, 310, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 13, 9651, 4072, 29892, 26855, 322, 3734, 405, 29965, 1529, 2756, 262, 1907, 310, 9224, 591, 864, 29889, 13, 4706, 584, 1853, 7274, 29901, 26121, 29889, 12650, 29889, 4998, 29925, 8426, 3089, 29879, 13, 4706, 584, 3207, 954, 29874, 29918, 3729, 29879, 29901, 319, 1051, 310, 2799, 749, 11601, 1529, 4617, 3618, 5069, 4954, 333, 16159, 13, 9651, 16161, 304, 278, 4954, 333, 16159, 310, 3495, 405, 29965, 1529, 13418, 29892, 470, 6213, 29889, 13, 4706, 584, 18280, 29901, 26460, 445, 10272, 2943, 508, 15523, 278, 2183, 2009, 29889, 13, 4706, 9995, 13, 4706, 396, 6058, 29923, 29898, 29891, 2397, 574, 29945, 1125, 445, 740, 756, 1880, 13331, 304, 4418, 29892, 13, 4706, 396, 577, 694, 3682, 881, 367, 19799, 363, 4180, 2769, 29889, 13, 4706, 736, 599, 29898, 13, 9651, 1583, 3032, 4572, 29918, 1129, 3775, 29898, 1311, 29889, 1129, 3775, 29892, 364, 29892, 954, 29874, 29918, 3729, 29879, 29897, 363, 364, 297, 7274, 13, 4706, 1723, 13, 13, 1678, 822, 903, 7302, 29918, 3827, 29898, 13, 4706, 1583, 29892, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 1402, 13, 4706, 2009, 29901, 525, 12650, 29889, 4998, 29925, 8426, 3089, 742, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 6120, 29901, 13, 4706, 9995, 2052, 368, 385, 5375, 349, 8426, 2009, 29889, 13, 13, 4706, 2401, 368, 263, 349, 8426, 2009, 2750, 263, 2183, 731, 310, 349, 8426, 4742, 772, 3775, 29892, 607, 526, 13, 4706, 16250, 310, 9224, 411, 2788, 1020, 1169, 29889, 13, 13, 4706, 960, 4954, 1949, 29874, 29918, 3729, 29879, 16159, 338, 4944, 769, 405, 29965, 1529, 1887, 537, 1122, 367, 4586, 964, 13, 4706, 3633, 29892, 8679, 373, 278, 995, 310, 4954, 3827, 29889, 1949, 29874, 29918, 22197, 29952, 1412, 13, 13, 4706, 584, 3207, 772, 3775, 29901, 319, 1051, 310, 349, 8426, 4742, 11565, 9657, 29879, 13, 4706, 584, 3207, 2009, 29901, 530, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 1134, 29892, 13, 9651, 14728, 322, 3734, 405, 29965, 1529, 2756, 13593, 310, 4742, 29898, 29879, 29897, 591, 864, 29889, 13, 4706, 584, 3207, 954, 29874, 29918, 3729, 29879, 29901, 319, 1051, 310, 2799, 749, 11601, 1529, 4617, 3618, 5069, 4954, 333, 16159, 13, 9651, 16161, 304, 278, 4954, 333, 16159, 310, 3495, 405, 29965, 1529, 4617, 3618, 29889, 13, 4706, 584, 18280, 29901, 5852, 565, 278, 2009, 471, 7436, 2750, 278, 4944, 772, 3775, 13, 9651, 8472, 29892, 1683, 7700, 29889, 13, 4706, 9995, 13, 4706, 396, 6058, 29923, 29898, 29894, 4528, 638, 29878, 1125, 910, 775, 5505, 1722, 304, 8175, 5855, 29889, 13, 4706, 396, 7803, 21984, 7274, 1122, 9269, 746, 2000, 2304, 29918, 24830, 13, 4706, 396, 1363, 445, 1158, 947, 451, 3349, 4475, 9224, 515, 278, 772, 3775, 13, 13, 4706, 22289, 29918, 1129, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29898, 1129, 3775, 29892, 2009, 29892, 954, 29874, 29918, 3729, 29879, 29897, 13, 13, 4706, 565, 451, 22289, 29918, 1129, 3775, 29901, 13, 9651, 736, 7700, 13, 13, 4706, 2302, 353, 2009, 29889, 2798, 13, 4706, 363, 11565, 297, 22289, 29918, 1129, 3775, 29901, 13, 9651, 2302, 353, 1583, 3032, 311, 1037, 559, 29918, 10109, 29918, 2798, 29898, 1129, 3775, 29892, 11565, 29892, 2302, 29897, 13, 9651, 565, 451, 2302, 29901, 13, 18884, 2867, 13, 13, 4706, 736, 5852, 13, 13, 1678, 822, 3394, 29918, 24830, 29898, 13, 4706, 1583, 29892, 13, 4706, 7274, 29901, 7911, 29889, 1293, 1839, 12650, 29889, 4998, 29925, 8426, 3089, 7464, 13, 4706, 954, 29874, 29918, 3729, 29879, 29901, 7911, 29889, 27636, 29961, 1017, 29889, 1293, 1839, 12650, 29889, 4998, 11601, 1529, 4617, 2033, 29962, 353, 6213, 29892, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 9995, 2052, 368, 349, 8426, 7274, 304, 278, 349, 8426, 22663, 29889, 13, 13, 4706, 910, 338, 1304, 297, 2999, 2777, 11265, 29892, 746, 278, 1364, 14952, 756, 304, 13, 4706, 7344, 920, 278, 7788, 526, 11233, 287, 491, 278, 8871, 29889, 13, 13, 4706, 960, 4954, 1949, 29874, 29918, 3729, 29879, 16159, 338, 4944, 769, 405, 29965, 1529, 1887, 537, 1122, 367, 4586, 964, 13, 4706, 3633, 29892, 8679, 373, 278, 995, 310, 4954, 1949, 29874, 29918, 22197, 29952, 1412, 13, 13, 4706, 584, 3207, 7274, 29901, 319, 1051, 310, 2799, 749, 29925, 8426, 3089, 1203, 20766, 278, 13, 9651, 4072, 29892, 26855, 322, 3734, 405, 29965, 1529, 2756, 262, 1907, 310, 9224, 591, 864, 29889, 13, 4706, 584, 1853, 7274, 29901, 26121, 29889, 12650, 29889, 4998, 29925, 8426, 3089, 29879, 13, 4706, 584, 3207, 954, 29874, 29918, 3729, 29879, 29901, 319, 1051, 310, 2799, 749, 11601, 1529, 4617, 3618, 5069, 4954, 333, 16159, 13, 9651, 16161, 304, 278, 4954, 333, 16159, 310, 3495, 405, 29965, 1529, 13418, 29892, 470, 6213, 29889, 13, 4706, 584, 336, 4637, 29901, 3682, 29889, 29925, 455, 11501, 3089, 17776, 565, 445, 10272, 2943, 2609, 13, 9651, 15523, 278, 2183, 2009, 29889, 13, 4706, 9995, 13, 4706, 565, 451, 599, 29898, 13, 9651, 1583, 3032, 7302, 29918, 3827, 29898, 1311, 29889, 1129, 3775, 29892, 364, 29892, 954, 29874, 29918, 3729, 29879, 29897, 363, 364, 297, 7274, 13, 308, 1125, 13, 9651, 12020, 3682, 29889, 29925, 455, 11501, 3089, 17776, 29898, 24830, 29922, 24830, 29897, 13, 13, 1678, 822, 4770, 1524, 12035, 1311, 29897, 1599, 7911, 29889, 20277, 29961, 11426, 5387, 13, 4706, 772, 3775, 29901, 7911, 29889, 1293, 29961, 11426, 29962, 353, 5159, 13, 4706, 363, 11565, 297, 1583, 29889, 1129, 3775, 29901, 13, 9651, 11565, 353, 3509, 29889, 24535, 8552, 29898, 10109, 29897, 13, 9651, 396, 525, 3359, 1575, 29915, 9273, 29915, 29873, 367, 760, 310, 22663, 13, 9651, 565, 525, 3359, 1575, 29915, 297, 11565, 29901, 13, 18884, 628, 11565, 1839, 3359, 1575, 2033, 13, 9651, 772, 3775, 29889, 4397, 29898, 10109, 29897, 13, 4706, 736, 4256, 29898, 1129, 3775, 29897, 13, 13, 1678, 822, 2821, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 9995, 18759, 599, 278, 22663, 19949, 1213, 15945, 13, 4706, 1583, 29889, 1129, 3775, 353, 5159, 13, 13, 1678, 822, 4770, 1837, 12035, 1311, 29892, 916, 29901, 1203, 29897, 1599, 6120, 29901, 13, 4706, 565, 451, 338, 8758, 29898, 1228, 29892, 349, 455, 11501, 25060, 1125, 13, 9651, 736, 2216, 1888, 2037, 287, 13, 4706, 736, 1583, 29889, 1129, 3775, 1275, 916, 29889, 1129, 3775, 13, 13, 1678, 822, 304, 29918, 10141, 29918, 1129, 3775, 29918, 5415, 29898, 1311, 29897, 1599, 525, 12650, 29889, 29925, 455, 11501, 11426, 1293, 2396, 13, 4706, 9995, 11609, 278, 8118, 310, 278, 772, 3775, 408, 263, 349, 455, 11501, 11426, 1293, 1203, 1213, 15945, 13, 4706, 22663, 353, 518, 29916, 363, 921, 297, 1583, 29962, 13, 4706, 736, 282, 455, 29918, 10141, 29918, 10109, 29889, 3166, 29918, 29886, 455, 29918, 16202, 29898, 16202, 29897, 13, 13, 1678, 822, 756, 29918, 16674, 29918, 25240, 29918, 10141, 29918, 1129, 3775, 29898, 1311, 29897, 1599, 6120, 29901, 13, 4706, 9995, 6362, 837, 457, 3692, 7592, 8745, 4742, 772, 3775, 526, 2198, 373, 263, 3495, 29889, 13, 13, 4706, 450, 1423, 338, 11565, 29899, 6707, 29892, 451, 3889, 4742, 29899, 6707, 322, 338, 405, 29965, 1529, 3038, 13, 4706, 946, 6582, 293, 29889, 13, 4706, 9995, 13, 4706, 20254, 29918, 7971, 353, 3618, 29889, 4998, 29925, 8426, 3089, 29898, 13, 9651, 2302, 29922, 29900, 29892, 13, 9651, 1580, 11759, 10998, 16674, 29918, 25240, 2396, 5852, 6525, 13, 4706, 1723, 13, 4706, 772, 3775, 353, 1583, 3032, 4572, 29918, 1129, 3775, 29918, 1454, 29918, 6550, 29898, 1311, 29889, 1129, 3775, 29892, 20254, 29918, 7971, 29897, 13, 4706, 736, 6120, 29898, 1129, 3775, 29897, 13, 2 ]
routine_qiime2_analyses/post_analyses.py
FranckLejzerowicz/routine_qiime2_analyses
0
52416
<reponame>FranckLejzerowicz/routine_qiime2_analyses # ---------------------------------------------------------------------------- # Copyright (c) 2020, <NAME>. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------------------------------------------------------------- import glob import pandas as pd from os.path import dirname, isfile, splitext from skbio.stats.ordination import OrdinationResults from routine_qiime2_analyses.analyses_prep import AnalysisPrep from routine_qiime2_analyses._routine_q2_cmds import ( get_case, get_new_meta_pd, run_import, run_export, filter_feature_table, ) from routine_qiime2_analyses._routine_q2_io_utils import ( read_yaml_file, get_analysis_folder ) from routine_qiime2_analyses._routine_q2_taxonomy import ( get_split_taxonomy ) from routine_qiime2_analyses._routine_q2_mmbird import ( get_order_omics, get_pc_sb_correlations, edit_ordi_qzv, get_qzs, get_biplot_commands, get_xmmvec_commands, get_paired_heatmaps_command ) class PostAnalysis(object): def __init__(self, config, project) -> None: self.config = config self.project = project self.cmds = {} self.mmvec_songbird_pd = pd.DataFrame() self.taxo_pds = {} self.metas = {} self.mmvec_res = {} self.mmvec_issues = set() self.xmmvecs = read_yaml_file(config.xmmvec) self.highlights = read_yaml_file(config.mmvec_highlights) def merge_mmvec_songbird(self, songbird_pd): rename_dic1 = dict( (x, '%s_omic1_songbird_common_fp' % x) for x in songbird_pd.columns) rename_dic1.update({'pair_omic_subset_filt': 'pair_omic_subset_filt1'}) self.mmvec_songbird_pd = self.mmvec_songbird_pd.merge( songbird_pd.rename(columns=rename_dic1), on='pair_omic_subset_filt1', how='left') rename_dic2 = dict( (x, '%s_omic2_songbird_common_fp' % x) for x in songbird_pd.columns) rename_dic2.update({'pair_omic_subset_filt': 'pair_omic_subset_filt2'}) self.mmvec_songbird_pd = self.mmvec_songbird_pd.merge( songbird_pd.rename(columns=rename_dic2), on='pair_omic_subset_filt2', how='left') def prep_mmvec(self, mmvec_pd): mmvec_pd = mmvec_pd.set_index(mmvec_pd.columns.tolist()[:-1]).unstack() mmvec_pd.columns = mmvec_pd.columns.droplevel() mmvec_pd.reset_index(inplace=True) mmvec_pd['filter1'] = mmvec_pd['pr1'] + '_' + mmvec_pd['ab1'] mmvec_pd['filter2'] = mmvec_pd['pr2'] + '_' + mmvec_pd['ab2'] mmvec_pd['omic_subset_filt1'] = mmvec_pd.apply( lambda x: '__'.join(x[['omic1', 'subset', 'filter1']]), axis=1) mmvec_pd['omic_subset_filt2'] = mmvec_pd.apply( lambda x: '__'.join(x[['omic1', 'subset', 'filter2']]), axis=1) mmvec_pd['pair_omic_subset_filt1'] = mmvec_pd.apply( lambda x: '__'.join(x[['pair', 'omic_subset_filt1']]), axis=1) mmvec_pd['pair_omic_subset_filt2'] = mmvec_pd.apply( lambda x: '__'.join(x[['pair', 'omic_subset_filt2']]), axis=1) self.mmvec_songbird_pd = mmvec_pd @staticmethod def prep_songbird(songbird_pd): songbird_pd['pair_omic_subset_filt'] = songbird_pd.apply( lambda x: '__'.join(x[['pair', 'dataset', 'subset', 'filter']]), axis=1) songbird_pd = songbird_pd[ ['params', 'pair_omic_subset_filt', 'differentials'] ].drop_duplicates().pivot( columns='params', index='pair_omic_subset_filt') songbird_pd.columns = songbird_pd.columns.droplevel() songbird_pd = songbird_pd.reset_index() return songbird_pd def get_tax_fp(self, omic): if isfile(self.project.datasets[omic].tax[-1]): omic_tax_fp = self.project.datasets[omic].tax[-1] else: omic_tax_fp = '' return omic_tax_fp def get_taxo_pds(self): for omicn in ['1', '2']: for omic in self.mmvec_songbird_pd['omic%s' % omicn].unique(): omic_tax_fp = self.get_tax_fp(omic) if isfile(omic_tax_fp): omic_tax_pd = pd.read_csv( omic_tax_fp, header=0, sep='\t', dtype=str) omic_tax_pd.rename( columns={omic_tax_pd.columns[0]: 'Feature ID'}, inplace=True) else: omic_tax_pd = pd.DataFrame() self.taxo_pds[omic] = omic_tax_pd def get_omics_songbirds_taxa(self): for omicn in ['1', '2']: pair_case_omics_filts = ['pair', 'subset', 'omic1', 'filter1', 'omic2', 'filter2'] all_omic_sb = [x for x in self.mmvec_songbird_pd.columns if x.endswith('omic%s_songbird_common_fp' % omicn)] omicn_songbirds = self.mmvec_songbird_pd[ (pair_case_omics_filts + all_omic_sb)].set_index( pair_case_omics_filts).T.to_dict() for (pair, subset, omic1, filt1, omic2, filt2), sb_head_diff_fp in omicn_songbirds.items(): if omicn == '1': omic = omic1 omic_ = omic2 filt = filt1 filt_ = filt2 else: omic = omic2 omic_ = omic1 filt = filt2 filt_ = filt1 feats_diff_cols = [] cur_mmvec_folder = get_analysis_folder( self.config.i_datasets_folder, 'mmvec/metadata/%s/%s' % (pair, subset)) omic_diff_list = [] if len(sb_head_diff_fp): for sb_head, diff_fp in sb_head_diff_fp.items(): model = sb_head.replace( '_omic%s_songbird_common_fp' % omicn, '') if str(diff_fp) != 'nan' and isfile(diff_fp): diff_pd = pd.read_csv(diff_fp, header=0, sep='\t', dtype=str) index_header = diff_pd.columns[0] if diff_pd[index_header][0] == '#q2:types': diff_pd = diff_pd[1:] diff_pd = diff_pd.rename( columns={index_header: 'Feature ID'}).set_index( 'Feature ID') diff_pd = diff_pd.drop( columns=[x for x in diff_pd.columns if 'Intercept' in x]) q2s = {} diff_htmls = glob.glob( '%s/*/tensorboard.html' % dirname(diff_fp)) if len(diff_htmls): for diff_html in diff_htmls: baseline = diff_html.split('/')[-2] with open(diff_html) as f: for line in f: if 'Pseudo Q-squared' in line: q2 = line.split( 'Pseudo Q-squared:</a></strong> ')[ -1].split('<')[0] if float(q2) > 0.01: q2s[baseline] = q2 break if q2s: diff_cols = ['%s__%s__%s' % ( model, x, '--'.join( ['%s-Q2=%s' % (b, q) if b else 'noQ2' for b, q in q2s.items()]) ) for x in diff_pd.columns] diff_pd.columns = diff_cols feats_diff_cols.extend(diff_cols) omic_diff_list.append(diff_pd) if len(omic_diff_list): omic_songbird_ranks = pd.concat( omic_diff_list, axis=1, sort=False).reset_index() omic_songbird_ranks.rename( columns={omic_songbird_ranks.columns[0]: 'Feature ID'}, inplace=True ) else: omic_common_fp = self.mmvec_songbird_pd.loc[ (self.mmvec_songbird_pd['pair'] == pair) & (self.mmvec_songbird_pd['subset'] == subset) & (self.mmvec_songbird_pd['omic1'] == omic1) & (self.mmvec_songbird_pd['filter1'] == filt1) & (self.mmvec_songbird_pd['omic2'] == omic2) & (self.mmvec_songbird_pd['filter2'] == filt2), 'omic%s_common_fp' % omicn ].tolist()[0] omic_tax_list = [] if not isfile(omic_common_fp): continue with open(omic_common_fp) as f: for ldx, line in enumerate(f): if ldx: omic_tax_list.append([line.split('\t')[0]]) omic_songbird_ranks = pd.DataFrame(omic_tax_list, columns=['Feature ID']) if omic in self.taxo_pds: omic_tax_pd = self.taxo_pds[omic] if omic_tax_pd.shape[0]: if 'Taxon' in omic_tax_pd.columns: omic_split_taxa_pd = get_split_taxonomy( omic_tax_pd.Taxon.tolist(), True) omic_tax_pd = pd.concat( [omic_tax_pd, omic_split_taxa_pd], axis=1, sort=False) omic_songbird_ranks = omic_songbird_ranks.merge( omic_tax_pd, on='Feature ID', how='left').drop_duplicates() meta_omic_fp = '%s/feature_metadata_%s_%s__%s_%s.tsv' % ( cur_mmvec_folder, omic, filt, omic_, filt_) drop_columns = [col for col in omic_songbird_ranks.columns if omic_songbird_ranks[col].unique().size == 1] meta_omic_pd = omic_songbird_ranks.drop(columns=drop_columns) meta_omic_pd.to_csv(meta_omic_fp, index=False, sep='\t') meta_omic_pd.set_index('Feature ID', inplace=True) self.metas[(pair, subset, omic, filt, omic_, filt_)] = ( meta_omic_fp, meta_omic_pd, feats_diff_cols) def get_mmvec_res(self): mmvec_out_cols = [x for x in self.mmvec_songbird_pd.columns if x.startswith('mmvec_out__')] # for ech row of the main table that also # contain the mmvec output folders for r, row in self.mmvec_songbird_pd.iterrows(): pair = row['pair'] subset = row['subset'] omic1 = row['omic1'] omic2 = row['omic2'] filt1 = row['filter1'] filt2 = row['filter2'] omic1_common_fp = row['omic1_common_fp'] if str(omic1_common_fp) == 'nan': continue omic2_common_fp = row['omic2_common_fp'] n_common = row['n_common'] meta_fp = row['meta_common_fp'] # for each mmvec-parameters result for mmvec_out_col in mmvec_out_cols: # get the current parameters output result folder mmvec_out = row[mmvec_out_col] if str(mmvec_out) == 'nan': continue # get the ordination file and the ranks file and skip # + warning if not performed mmvec_out_ranks = mmvec_out + '/model/ranks.tsv' mmvec_out_ordi = mmvec_out + '/model/ordination.txt' if not isfile(mmvec_out_ranks) or not isfile(mmvec_out_ordi): issue = '\t\t[run mmvec first] %s (%s) %s (%s)' % ( omic1, filt1, omic2, filt2) self.mmvec_issues.add(issue) continue # collect the ranks + ordination # + songbirds for each pair of omics and parameters self.mmvec_res[ (pair, subset, omic1, omic2, filt1, filt2, n_common, mmvec_out_col.replace('mmvec_out__', '')) ] = [mmvec_out_ranks, mmvec_out_ordi, meta_fp, omic1_common_fp, omic2_common_fp] def get_pair_cmds(self, omics_pairs): crowdeds = [0, 1] pc_sb_correlations = [] for keys, values in self.mmvec_res.items(): pair, case, omic1, omic2, filt1, filt2, sams, mmvec = keys ranks_fp, ordi_fp, meta_fp, omic1_common, omic2_common = values order_omics = get_order_omics(omic1, omic2, filt1, filt2, case, omics_pairs) omic1 = order_omics[0] omic2 = order_omics[1] filt1 = order_omics[2] filt2 = order_omics[3] omic_feature = order_omics[4] omic_sample = order_omics[5] omic_microbe = order_omics[6] omic_metabolite = order_omics[7] # get differentials meta1, meta_pd1, diff_cols1 = self.metas[(pair, case, omic1, filt1, omic2, filt2)] meta2, meta_pd2, diff_cols2 = self.metas[(pair, case, omic2, filt2, omic1, filt1)] # features are biplot, samples are dots ordi = OrdinationResults.read(ordi_fp) cur_pc_sb_correlations, max_r = get_pc_sb_correlations( pair, case, ordi, omic1, omic2, filt1, filt2, diff_cols1, meta_pd1, diff_cols2, meta_pd2, meta_fp, omic1_common, omic2_common, ranks_fp) pc_sb_correlations.append(cur_pc_sb_correlations) cmd = '' if pair in self.highlights: pair_highlights = self.highlights[pair] for highlight, regexes_list in pair_highlights.items(): n_edit, meta_edit, ordi_edit_fp = edit_ordi_qzv( ordi, ordi_fp, highlight, regexes_list, meta1, meta_pd1) if n_edit: qza, qzv = get_qzs(ordi_edit_fp) cmd += get_biplot_commands( ordi_edit_fp, qza, qzv, omic_feature, omic_sample, meta_edit, meta2, n_edit, max_r) ordi_edit_fp = ordi_fp qza, qzv = get_qzs(ordi_edit_fp) for crowded in crowdeds: if crowded: n_ordi_feats = ordi.features.shape[0] qzv = qzv.replace('.qzv', '_crowded.qzv') else: n_ordi_feats = 15 # heat_qza, heat_qzv = get_heatmap_qzs(ranks_fp) # cmd += get_heatmap_commands( # ranks_fp, heat_qza, heat_qzv, meta1, # meta2, meta_pd1, meta_pd2) cmd += get_biplot_commands( ordi_edit_fp, qza, qzv, omic_feature, omic_sample, meta1, meta2, n_ordi_feats, max_r) cmd += get_xmmvec_commands( ordi_edit_fp, omic1, omic2, meta1, meta2, self.xmmvecs, pair) topn = 5 features_names = [] if features_names: heat = '%s_paired_heatmaps_custom.qzv' % splitext(ranks_fp)[0] else: heat = '%s_paired_heatmaps_top%s.qzv' % (splitext(ranks_fp)[0], topn) cmd += get_paired_heatmaps_command( ranks_fp, omic1_common, omic2_common, meta1, features_names, topn, heat) self.cmds.setdefault(pair, []).append(cmd) return pc_sb_correlations def show_mmvec_issues(self): if self.mmvec_issues: for mmvec_issue in self.mmvec_issues: print(mmvec_issue) def mmbird(self, paired_datasets, differentials): if not paired_datasets.mmvec_pd.shape[0]: print('No mmvec output detected...') return None self.prep_mmvec(paired_datasets.mmvec_pd) if differentials.songbird_pd.shape[0]: songbird_pd = self.prep_songbird(differentials.songbird_pd) self.merge_mmvec_songbird(songbird_pd) self.get_taxo_pds() self.get_omics_songbirds_taxa() self.get_mmvec_res() self.show_mmvec_issues() omics_pairs = [tuple(x) for x in self.mmvec_songbird_pd[ ['omic_subset_filt1', 'omic_subset_filt2']].values.tolist()] pc_sb_correlations = self.get_pair_cmds(omics_pairs) if len(pc_sb_correlations): out_folder = get_analysis_folder(self.config.i_datasets_folder, 'mmbird') out_correlations = '%s/pc_vs_songbird_correlations.tsv' % out_folder pc_sb_correlations_pd = pd.concat(pc_sb_correlations) if pc_sb_correlations_pd.shape[0]: pc_sb_correlations_pd.to_csv( out_correlations, index=False, sep='\t') print('\t\t==> Written:', out_correlations) else: print('\t\t==> No good songbird model to ' 'make correlations with mmvec PCs...') self.register_command('mmbird') def register_command(self, analysis): AnalysisPrep.analyses_commands[analysis] = self.cmds
[ 1, 529, 276, 1112, 420, 29958, 7675, 384, 3226, 29926, 3298, 340, 5175, 29914, 14608, 457, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 29892, 529, 5813, 15513, 13, 29937, 13, 29937, 6652, 7541, 1090, 278, 4958, 310, 278, 3382, 2164, 350, 7230, 19245, 29889, 13, 29937, 13, 29937, 450, 2989, 19405, 338, 297, 278, 934, 365, 2965, 1430, 1660, 29892, 13235, 411, 445, 7047, 29889, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 13, 5215, 13149, 13, 5215, 11701, 408, 10518, 13, 3166, 2897, 29889, 2084, 1053, 4516, 978, 29892, 338, 1445, 29892, 8536, 568, 486, 13, 13, 3166, 2071, 24840, 29889, 16202, 29889, 536, 3381, 1053, 16557, 3381, 12191, 13, 13, 3166, 26529, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 29889, 7054, 952, 267, 29918, 15287, 1053, 24352, 29925, 3445, 13, 3166, 26529, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 3032, 14608, 457, 29918, 29939, 29906, 29918, 9006, 29879, 1053, 313, 13, 1678, 679, 29918, 4878, 29892, 679, 29918, 1482, 29918, 7299, 29918, 15926, 29892, 1065, 29918, 5215, 29892, 1065, 29918, 15843, 29892, 4175, 29918, 14394, 29918, 2371, 29892, 13, 29897, 13, 3166, 26529, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 3032, 14608, 457, 29918, 29939, 29906, 29918, 601, 29918, 13239, 1053, 313, 13, 1678, 1303, 29918, 25162, 29918, 1445, 29892, 679, 29918, 15916, 29918, 12083, 13, 29897, 13, 3166, 26529, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 3032, 14608, 457, 29918, 29939, 29906, 29918, 20725, 21926, 1053, 313, 13, 1678, 679, 29918, 5451, 29918, 20725, 21926, 13, 29897, 13, 3166, 26529, 29918, 26461, 603, 29906, 29918, 7054, 952, 267, 3032, 14608, 457, 29918, 29939, 29906, 29918, 4317, 18513, 1053, 313, 13, 1678, 679, 29918, 2098, 29918, 290, 1199, 29892, 679, 29918, 6739, 29918, 20778, 29918, 2616, 2674, 800, 29892, 3863, 29918, 536, 29875, 29918, 29939, 29920, 29894, 29892, 679, 29918, 29939, 22381, 29892, 13, 1678, 679, 29918, 5365, 5317, 29918, 26381, 29892, 679, 29918, 29916, 4317, 2003, 29918, 26381, 29892, 679, 29918, 3274, 2859, 29918, 354, 271, 10339, 29918, 6519, 13, 29897, 13, 13, 13, 1990, 4918, 21067, 4848, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2295, 29892, 2060, 29897, 1599, 6213, 29901, 13, 4706, 1583, 29889, 2917, 353, 2295, 13, 4706, 1583, 29889, 4836, 353, 2060, 13, 4706, 1583, 29889, 9006, 29879, 353, 6571, 13, 4706, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 353, 10518, 29889, 17271, 580, 13, 4706, 1583, 29889, 20725, 29877, 29918, 29886, 6289, 353, 6571, 13, 4706, 1583, 29889, 2527, 294, 353, 6571, 13, 4706, 1583, 29889, 4317, 2003, 29918, 690, 353, 6571, 13, 4706, 1583, 29889, 4317, 2003, 29918, 12175, 353, 731, 580, 13, 4706, 1583, 29889, 29916, 4317, 2003, 29879, 353, 1303, 29918, 25162, 29918, 1445, 29898, 2917, 29889, 29916, 4317, 2003, 29897, 13, 4706, 1583, 29889, 28970, 29879, 353, 1303, 29918, 25162, 29918, 1445, 29898, 2917, 29889, 4317, 2003, 29918, 28970, 29879, 29897, 13, 13, 1678, 822, 10366, 29918, 4317, 2003, 29918, 21453, 18513, 29898, 1311, 29892, 4823, 18513, 29918, 15926, 1125, 13, 4706, 19508, 29918, 27774, 29896, 353, 9657, 29898, 13, 9651, 313, 29916, 29892, 14210, 29879, 29918, 25426, 29896, 29918, 21453, 18513, 29918, 9435, 29918, 18091, 29915, 1273, 921, 29897, 363, 921, 297, 4823, 18513, 29918, 15926, 29889, 13099, 29897, 13, 4706, 19508, 29918, 27774, 29896, 29889, 5504, 3319, 29915, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 2396, 525, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 29915, 1800, 13, 4706, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 353, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 14634, 29898, 13, 9651, 4823, 18513, 29918, 15926, 29889, 1267, 420, 29898, 13099, 29922, 1267, 420, 29918, 27774, 29896, 511, 13, 9651, 373, 2433, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 742, 920, 2433, 1563, 1495, 13, 4706, 19508, 29918, 27774, 29906, 353, 9657, 29898, 13, 9651, 313, 29916, 29892, 14210, 29879, 29918, 25426, 29906, 29918, 21453, 18513, 29918, 9435, 29918, 18091, 29915, 1273, 921, 29897, 363, 921, 297, 4823, 18513, 29918, 15926, 29889, 13099, 29897, 13, 4706, 19508, 29918, 27774, 29906, 29889, 5504, 3319, 29915, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 2396, 525, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 29915, 1800, 13, 4706, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 353, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 14634, 29898, 13, 9651, 4823, 18513, 29918, 15926, 29889, 1267, 420, 29898, 13099, 29922, 1267, 420, 29918, 27774, 29906, 511, 13, 9651, 373, 2433, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 742, 920, 2433, 1563, 1495, 13, 13, 1678, 822, 8273, 29918, 4317, 2003, 29898, 1311, 29892, 5654, 2003, 29918, 15926, 1125, 13, 4706, 5654, 2003, 29918, 15926, 353, 5654, 2003, 29918, 15926, 29889, 842, 29918, 2248, 29898, 4317, 2003, 29918, 15926, 29889, 13099, 29889, 25027, 391, 580, 7503, 29899, 29896, 14664, 348, 1429, 580, 13, 4706, 5654, 2003, 29918, 15926, 29889, 13099, 353, 5654, 2003, 29918, 15926, 29889, 13099, 29889, 26419, 552, 955, 580, 13, 4706, 5654, 2003, 29918, 15926, 29889, 12071, 29918, 2248, 29898, 262, 6689, 29922, 5574, 29897, 13, 4706, 5654, 2003, 29918, 15926, 1839, 4572, 29896, 2033, 353, 5654, 2003, 29918, 15926, 1839, 558, 29896, 2033, 718, 22868, 29915, 718, 5654, 2003, 29918, 15926, 1839, 370, 29896, 2033, 13, 4706, 5654, 2003, 29918, 15926, 1839, 4572, 29906, 2033, 353, 5654, 2003, 29918, 15926, 1839, 558, 29906, 2033, 718, 22868, 29915, 718, 5654, 2003, 29918, 15926, 1839, 370, 29906, 2033, 13, 4706, 5654, 2003, 29918, 15926, 1839, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 2033, 353, 5654, 2003, 29918, 15926, 29889, 7302, 29898, 13, 9651, 14013, 921, 29901, 525, 1649, 4286, 7122, 29898, 29916, 29961, 1839, 25426, 29896, 742, 525, 6484, 742, 525, 4572, 29896, 2033, 11724, 9685, 29922, 29896, 29897, 13, 4706, 5654, 2003, 29918, 15926, 1839, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 2033, 353, 5654, 2003, 29918, 15926, 29889, 7302, 29898, 13, 9651, 14013, 921, 29901, 525, 1649, 4286, 7122, 29898, 29916, 29961, 1839, 25426, 29896, 742, 525, 6484, 742, 525, 4572, 29906, 2033, 11724, 9685, 29922, 29896, 29897, 13, 4706, 5654, 2003, 29918, 15926, 1839, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 2033, 353, 5654, 2003, 29918, 15926, 29889, 7302, 29898, 13, 9651, 14013, 921, 29901, 525, 1649, 4286, 7122, 29898, 29916, 29961, 1839, 18784, 742, 525, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 2033, 11724, 9685, 29922, 29896, 29897, 13, 4706, 5654, 2003, 29918, 15926, 1839, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 2033, 353, 5654, 2003, 29918, 15926, 29889, 7302, 29898, 13, 9651, 14013, 921, 29901, 525, 1649, 4286, 7122, 29898, 29916, 29961, 1839, 18784, 742, 525, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 2033, 11724, 9685, 29922, 29896, 29897, 13, 4706, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 353, 5654, 2003, 29918, 15926, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 8273, 29918, 21453, 18513, 29898, 21453, 18513, 29918, 15926, 1125, 13, 4706, 4823, 18513, 29918, 15926, 1839, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 2033, 353, 4823, 18513, 29918, 15926, 29889, 7302, 29898, 13, 9651, 14013, 921, 29901, 525, 1649, 4286, 7122, 29898, 29916, 29961, 1839, 18784, 742, 525, 24713, 742, 525, 6484, 742, 525, 4572, 2033, 11724, 13, 9651, 9685, 29922, 29896, 29897, 13, 4706, 4823, 18513, 29918, 15926, 353, 4823, 18513, 29918, 15926, 29961, 13, 9651, 6024, 7529, 742, 525, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 742, 525, 29881, 8349, 9409, 2033, 13, 308, 1822, 8865, 29918, 20908, 15815, 2141, 29886, 11002, 29898, 13, 9651, 4341, 2433, 7529, 742, 2380, 2433, 18784, 29918, 25426, 29918, 6484, 29918, 1777, 29873, 1495, 13, 4706, 4823, 18513, 29918, 15926, 29889, 13099, 353, 4823, 18513, 29918, 15926, 29889, 13099, 29889, 26419, 552, 955, 580, 13, 4706, 4823, 18513, 29918, 15926, 353, 4823, 18513, 29918, 15926, 29889, 12071, 29918, 2248, 580, 13, 4706, 736, 4823, 18513, 29918, 15926, 13, 13, 1678, 822, 679, 29918, 20725, 29918, 18091, 29898, 1311, 29892, 2703, 293, 1125, 13, 4706, 565, 338, 1445, 29898, 1311, 29889, 4836, 29889, 14538, 1691, 29961, 25426, 1822, 20725, 14352, 29896, 29962, 1125, 13, 9651, 2703, 293, 29918, 20725, 29918, 18091, 353, 1583, 29889, 4836, 29889, 14538, 1691, 29961, 25426, 1822, 20725, 14352, 29896, 29962, 13, 4706, 1683, 29901, 13, 9651, 2703, 293, 29918, 20725, 29918, 18091, 353, 6629, 13, 4706, 736, 2703, 293, 29918, 20725, 29918, 18091, 13, 13, 1678, 822, 679, 29918, 20725, 29877, 29918, 29886, 6289, 29898, 1311, 1125, 13, 4706, 363, 2703, 293, 29876, 297, 6024, 29896, 742, 525, 29906, 2033, 29901, 13, 9651, 363, 2703, 293, 297, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 25426, 29995, 29879, 29915, 1273, 2703, 293, 29876, 1822, 13092, 7295, 13, 18884, 2703, 293, 29918, 20725, 29918, 18091, 353, 1583, 29889, 657, 29918, 20725, 29918, 18091, 29898, 25426, 29897, 13, 18884, 565, 338, 1445, 29898, 25426, 29918, 20725, 29918, 18091, 1125, 13, 462, 1678, 2703, 293, 29918, 20725, 29918, 15926, 353, 10518, 29889, 949, 29918, 7638, 29898, 13, 462, 4706, 2703, 293, 29918, 20725, 29918, 18091, 29892, 4839, 29922, 29900, 29892, 16345, 2433, 29905, 29873, 742, 26688, 29922, 710, 29897, 13, 462, 1678, 2703, 293, 29918, 20725, 29918, 15926, 29889, 1267, 420, 29898, 13, 462, 4706, 4341, 3790, 25426, 29918, 20725, 29918, 15926, 29889, 13099, 29961, 29900, 5387, 525, 19132, 3553, 16675, 13, 462, 4706, 297, 6689, 29922, 5574, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 2703, 293, 29918, 20725, 29918, 15926, 353, 10518, 29889, 17271, 580, 13, 18884, 1583, 29889, 20725, 29877, 29918, 29886, 6289, 29961, 25426, 29962, 353, 2703, 293, 29918, 20725, 29918, 15926, 13, 13, 1678, 822, 679, 29918, 290, 1199, 29918, 21453, 18513, 29879, 29918, 941, 17367, 29898, 1311, 1125, 13, 4706, 363, 2703, 293, 29876, 297, 6024, 29896, 742, 525, 29906, 2033, 29901, 13, 9651, 5101, 29918, 4878, 29918, 290, 1199, 29918, 1777, 1372, 353, 6024, 18784, 742, 525, 6484, 742, 525, 25426, 29896, 742, 13, 462, 462, 268, 525, 4572, 29896, 742, 525, 25426, 29906, 742, 525, 4572, 29906, 2033, 13, 9651, 599, 29918, 25426, 29918, 20778, 353, 518, 29916, 363, 921, 297, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 13099, 565, 13, 462, 965, 921, 29889, 1975, 2541, 877, 25426, 29995, 29879, 29918, 21453, 18513, 29918, 9435, 29918, 18091, 29915, 1273, 2703, 293, 29876, 4638, 13, 9651, 2703, 293, 29876, 29918, 21453, 18513, 29879, 353, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29961, 13, 18884, 313, 18784, 29918, 4878, 29918, 290, 1199, 29918, 1777, 1372, 718, 599, 29918, 25426, 29918, 20778, 29897, 1822, 842, 29918, 2248, 29898, 13, 18884, 5101, 29918, 4878, 29918, 290, 1199, 29918, 1777, 1372, 467, 29911, 29889, 517, 29918, 8977, 580, 13, 9651, 363, 313, 18784, 29892, 11306, 29892, 2703, 293, 29896, 29892, 977, 29873, 29896, 29892, 2703, 293, 29906, 29892, 13, 462, 977, 29873, 29906, 511, 17444, 29918, 2813, 29918, 12765, 29918, 18091, 297, 2703, 293, 29876, 29918, 21453, 18513, 29879, 29889, 7076, 7295, 13, 18884, 565, 2703, 293, 29876, 1275, 525, 29896, 2396, 13, 462, 1678, 2703, 293, 353, 2703, 293, 29896, 13, 462, 1678, 2703, 293, 29918, 353, 2703, 293, 29906, 13, 462, 1678, 977, 29873, 353, 977, 29873, 29896, 13, 462, 1678, 977, 29873, 29918, 353, 977, 29873, 29906, 13, 18884, 1683, 29901, 13, 462, 1678, 2703, 293, 353, 2703, 293, 29906, 13, 462, 1678, 2703, 293, 29918, 353, 2703, 293, 29896, 13, 462, 1678, 977, 29873, 353, 977, 29873, 29906, 13, 462, 1678, 977, 29873, 29918, 353, 977, 29873, 29896, 13, 18884, 1238, 1446, 29918, 12765, 29918, 22724, 353, 5159, 13, 18884, 3151, 29918, 4317, 2003, 29918, 12083, 353, 679, 29918, 15916, 29918, 12083, 29898, 13, 462, 1678, 1583, 29889, 2917, 29889, 29875, 29918, 14538, 1691, 29918, 12083, 29892, 13, 462, 1678, 525, 4317, 2003, 29914, 19635, 22584, 29879, 22584, 29879, 29915, 1273, 313, 18784, 29892, 11306, 876, 13, 18884, 2703, 293, 29918, 12765, 29918, 1761, 353, 5159, 13, 18884, 565, 7431, 29898, 20778, 29918, 2813, 29918, 12765, 29918, 18091, 1125, 13, 462, 1678, 363, 17444, 29918, 2813, 29892, 2923, 29918, 18091, 297, 17444, 29918, 2813, 29918, 12765, 29918, 18091, 29889, 7076, 7295, 13, 462, 4706, 1904, 353, 17444, 29918, 2813, 29889, 6506, 29898, 13, 462, 9651, 22868, 25426, 29995, 29879, 29918, 21453, 18513, 29918, 9435, 29918, 18091, 29915, 1273, 2703, 293, 29876, 29892, 27255, 13, 462, 4706, 565, 851, 29898, 12765, 29918, 18091, 29897, 2804, 525, 13707, 29915, 322, 338, 1445, 29898, 12765, 29918, 18091, 1125, 13, 462, 9651, 2923, 29918, 15926, 353, 10518, 29889, 949, 29918, 7638, 29898, 12765, 29918, 18091, 29892, 4839, 29922, 29900, 29892, 16345, 2433, 29905, 29873, 742, 13, 462, 462, 462, 29871, 26688, 29922, 710, 29897, 13, 462, 9651, 2380, 29918, 6672, 353, 2923, 29918, 15926, 29889, 13099, 29961, 29900, 29962, 13, 462, 9651, 565, 2923, 29918, 15926, 29961, 2248, 29918, 6672, 3816, 29900, 29962, 1275, 16321, 29939, 29906, 29901, 8768, 2396, 13, 462, 18884, 2923, 29918, 15926, 353, 2923, 29918, 15926, 29961, 29896, 17531, 13, 462, 9651, 2923, 29918, 15926, 353, 2923, 29918, 15926, 29889, 1267, 420, 29898, 13, 462, 18884, 4341, 3790, 2248, 29918, 6672, 29901, 525, 19132, 3553, 29915, 7690, 842, 29918, 2248, 29898, 13, 462, 18884, 525, 19132, 3553, 1495, 13, 462, 9651, 2923, 29918, 15926, 353, 2923, 29918, 15926, 29889, 8865, 29898, 13, 462, 18884, 4341, 11759, 29916, 363, 921, 297, 2923, 29918, 15926, 29889, 13099, 565, 13, 462, 462, 308, 525, 4074, 1547, 29915, 297, 921, 2314, 13, 462, 9651, 3855, 29906, 29879, 353, 6571, 13, 462, 9651, 2923, 29918, 1420, 29879, 353, 13149, 29889, 23705, 29898, 13, 462, 18884, 14210, 29879, 29914, 3877, 20158, 3377, 29889, 1420, 29915, 1273, 4516, 978, 29898, 12765, 29918, 18091, 876, 13, 462, 9651, 565, 7431, 29898, 12765, 29918, 1420, 29879, 1125, 13, 462, 18884, 363, 2923, 29918, 1420, 297, 2923, 29918, 1420, 29879, 29901, 13, 462, 462, 1678, 2362, 5570, 353, 2923, 29918, 1420, 29889, 5451, 11219, 1495, 14352, 29906, 29962, 13, 462, 462, 1678, 411, 1722, 29898, 12765, 29918, 1420, 29897, 408, 285, 29901, 13, 462, 462, 4706, 363, 1196, 297, 285, 29901, 13, 462, 462, 9651, 565, 525, 29925, 344, 5333, 660, 29899, 26613, 1965, 29915, 297, 1196, 29901, 13, 462, 462, 18884, 3855, 29906, 353, 1196, 29889, 5451, 29898, 13, 462, 462, 462, 1678, 525, 29925, 344, 5333, 660, 29899, 26613, 1965, 29901, 829, 29874, 2565, 1110, 29958, 525, 9601, 13, 462, 462, 462, 1678, 448, 29896, 1822, 5451, 877, 29966, 29861, 29900, 29962, 13, 462, 462, 18884, 565, 5785, 29898, 29939, 29906, 29897, 1405, 29871, 29900, 29889, 29900, 29896, 29901, 13, 462, 462, 462, 1678, 3855, 29906, 29879, 29961, 6500, 5570, 29962, 353, 3855, 29906, 13, 462, 462, 18884, 2867, 13, 462, 9651, 565, 3855, 29906, 29879, 29901, 13, 462, 18884, 2923, 29918, 22724, 353, 6024, 29995, 29879, 1649, 29995, 29879, 1649, 29995, 29879, 29915, 1273, 313, 13, 462, 462, 1678, 1904, 29892, 921, 29892, 525, 489, 4286, 7122, 29898, 13, 462, 462, 4706, 6024, 29995, 29879, 29899, 29984, 29906, 16328, 29879, 29915, 1273, 313, 29890, 29892, 3855, 29897, 565, 289, 1683, 525, 1217, 29984, 29906, 29915, 13, 462, 462, 308, 363, 289, 29892, 3855, 297, 3855, 29906, 29879, 29889, 7076, 580, 2314, 13, 462, 18884, 1723, 363, 921, 297, 2923, 29918, 15926, 29889, 13099, 29962, 13, 462, 18884, 2923, 29918, 15926, 29889, 13099, 353, 2923, 29918, 22724, 13, 462, 18884, 1238, 1446, 29918, 12765, 29918, 22724, 29889, 21843, 29898, 12765, 29918, 22724, 29897, 13, 462, 18884, 2703, 293, 29918, 12765, 29918, 1761, 29889, 4397, 29898, 12765, 29918, 15926, 29897, 13, 18884, 565, 7431, 29898, 25426, 29918, 12765, 29918, 1761, 1125, 13, 462, 1678, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 353, 10518, 29889, 17685, 29898, 13, 462, 4706, 2703, 293, 29918, 12765, 29918, 1761, 29892, 9685, 29922, 29896, 29892, 2656, 29922, 8824, 467, 12071, 29918, 2248, 580, 13, 462, 1678, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 29889, 1267, 420, 29898, 13, 462, 4706, 4341, 3790, 25426, 29918, 21453, 18513, 29918, 661, 2039, 29889, 13099, 29961, 29900, 5387, 525, 19132, 3553, 16675, 13, 462, 4706, 297, 6689, 29922, 5574, 13, 462, 1678, 1723, 13, 18884, 1683, 29901, 13, 462, 1678, 2703, 293, 29918, 9435, 29918, 18091, 353, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 2029, 29961, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 18784, 2033, 1275, 5101, 29897, 669, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 6484, 2033, 1275, 11306, 29897, 669, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 25426, 29896, 2033, 1275, 2703, 293, 29896, 29897, 669, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 4572, 29896, 2033, 1275, 977, 29873, 29896, 29897, 669, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 25426, 29906, 2033, 1275, 2703, 293, 29906, 29897, 669, 13, 462, 4706, 313, 1311, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 1839, 4572, 29906, 2033, 1275, 977, 29873, 29906, 511, 13, 462, 4706, 525, 25426, 29995, 29879, 29918, 9435, 29918, 18091, 29915, 1273, 2703, 293, 29876, 13, 462, 268, 1822, 25027, 391, 580, 29961, 29900, 29962, 13, 462, 1678, 2703, 293, 29918, 20725, 29918, 1761, 353, 5159, 13, 462, 1678, 565, 451, 338, 1445, 29898, 25426, 29918, 9435, 29918, 18091, 1125, 13, 462, 4706, 6773, 13, 462, 1678, 411, 1722, 29898, 25426, 29918, 9435, 29918, 18091, 29897, 408, 285, 29901, 13, 462, 4706, 363, 301, 8235, 29892, 1196, 297, 26985, 29898, 29888, 1125, 13, 462, 9651, 565, 301, 8235, 29901, 13, 462, 18884, 2703, 293, 29918, 20725, 29918, 1761, 29889, 4397, 4197, 1220, 29889, 5451, 28909, 29873, 29861, 29900, 24960, 13, 462, 1678, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 353, 10518, 29889, 17271, 29898, 25426, 29918, 20725, 29918, 1761, 29892, 13, 462, 462, 462, 539, 4341, 29922, 1839, 19132, 3553, 11287, 13, 18884, 565, 2703, 293, 297, 1583, 29889, 20725, 29877, 29918, 29886, 6289, 29901, 13, 462, 1678, 2703, 293, 29918, 20725, 29918, 15926, 353, 1583, 29889, 20725, 29877, 29918, 29886, 6289, 29961, 25426, 29962, 13, 462, 1678, 565, 2703, 293, 29918, 20725, 29918, 15926, 29889, 12181, 29961, 29900, 5387, 13, 462, 4706, 565, 525, 29911, 1165, 265, 29915, 297, 2703, 293, 29918, 20725, 29918, 15926, 29889, 13099, 29901, 13, 462, 9651, 2703, 293, 29918, 5451, 29918, 941, 17367, 29918, 15926, 353, 679, 29918, 5451, 29918, 20725, 21926, 29898, 13, 462, 18884, 2703, 293, 29918, 20725, 29918, 15926, 29889, 29911, 1165, 265, 29889, 25027, 391, 3285, 5852, 29897, 13, 462, 9651, 2703, 293, 29918, 20725, 29918, 15926, 353, 10518, 29889, 17685, 29898, 13, 462, 18884, 518, 25426, 29918, 20725, 29918, 15926, 29892, 2703, 293, 29918, 5451, 29918, 941, 17367, 29918, 15926, 1402, 9685, 29922, 29896, 29892, 13, 462, 18884, 2656, 29922, 8824, 29897, 13, 462, 4706, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 353, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 29889, 14634, 29898, 13, 462, 9651, 2703, 293, 29918, 20725, 29918, 15926, 29892, 373, 2433, 19132, 3553, 742, 13, 462, 9651, 920, 2433, 1563, 2824, 8865, 29918, 20908, 15815, 580, 13, 18884, 12700, 29918, 25426, 29918, 18091, 353, 14210, 29879, 29914, 14394, 29918, 19635, 29918, 29995, 29879, 29918, 29995, 29879, 1649, 29995, 29879, 29918, 29995, 29879, 29889, 1372, 29894, 29915, 1273, 313, 13, 462, 1678, 3151, 29918, 4317, 2003, 29918, 12083, 29892, 2703, 293, 29892, 977, 29873, 29892, 2703, 293, 3383, 977, 29873, 19925, 13, 18884, 5768, 29918, 13099, 353, 518, 1054, 363, 784, 297, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 29889, 13099, 565, 13, 462, 18884, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 29961, 1054, 1822, 13092, 2141, 2311, 1275, 29871, 29896, 29962, 13, 18884, 12700, 29918, 25426, 29918, 15926, 353, 2703, 293, 29918, 21453, 18513, 29918, 661, 2039, 29889, 8865, 29898, 13099, 29922, 8865, 29918, 13099, 29897, 13, 18884, 12700, 29918, 25426, 29918, 15926, 29889, 517, 29918, 7638, 29898, 7299, 29918, 25426, 29918, 18091, 29892, 2380, 29922, 8824, 29892, 16345, 2433, 29905, 29873, 1495, 13, 18884, 12700, 29918, 25426, 29918, 15926, 29889, 842, 29918, 2248, 877, 19132, 3553, 742, 297, 6689, 29922, 5574, 29897, 13, 18884, 1583, 29889, 2527, 294, 15625, 18784, 29892, 11306, 29892, 2703, 293, 29892, 977, 29873, 29892, 2703, 293, 3383, 977, 29873, 29918, 4638, 353, 313, 13, 462, 1678, 12700, 29918, 25426, 29918, 18091, 29892, 12700, 29918, 25426, 29918, 15926, 29892, 1238, 1446, 29918, 12765, 29918, 22724, 29897, 13, 13, 1678, 822, 679, 29918, 4317, 2003, 29918, 690, 29898, 1311, 1125, 13, 4706, 5654, 2003, 29918, 449, 29918, 22724, 353, 518, 29916, 363, 921, 297, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 13099, 565, 13, 462, 3986, 921, 29889, 27382, 2541, 877, 4317, 2003, 29918, 449, 1649, 1495, 29962, 13, 4706, 396, 363, 321, 305, 1948, 310, 278, 1667, 1591, 393, 884, 13, 4706, 396, 1712, 278, 5654, 2003, 1962, 16495, 13, 4706, 363, 364, 29892, 1948, 297, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29889, 1524, 5727, 7295, 13, 9651, 5101, 353, 1948, 1839, 18784, 2033, 13, 9651, 11306, 353, 1948, 1839, 6484, 2033, 13, 9651, 2703, 293, 29896, 353, 1948, 1839, 25426, 29896, 2033, 13, 9651, 2703, 293, 29906, 353, 1948, 1839, 25426, 29906, 2033, 13, 9651, 977, 29873, 29896, 353, 1948, 1839, 4572, 29896, 2033, 13, 9651, 977, 29873, 29906, 353, 1948, 1839, 4572, 29906, 2033, 13, 9651, 2703, 293, 29896, 29918, 9435, 29918, 18091, 353, 1948, 1839, 25426, 29896, 29918, 9435, 29918, 18091, 2033, 13, 9651, 565, 851, 29898, 25426, 29896, 29918, 9435, 29918, 18091, 29897, 1275, 525, 13707, 2396, 13, 18884, 6773, 13, 9651, 2703, 293, 29906, 29918, 9435, 29918, 18091, 353, 1948, 1839, 25426, 29906, 29918, 9435, 29918, 18091, 2033, 13, 9651, 302, 29918, 9435, 353, 1948, 1839, 29876, 29918, 9435, 2033, 13, 9651, 12700, 29918, 18091, 353, 1948, 1839, 7299, 29918, 9435, 29918, 18091, 2033, 13, 9651, 396, 363, 1269, 5654, 2003, 29899, 16744, 1121, 13, 9651, 363, 5654, 2003, 29918, 449, 29918, 1054, 297, 5654, 2003, 29918, 449, 29918, 22724, 29901, 13, 18884, 396, 679, 278, 1857, 4128, 1962, 1121, 4138, 13, 18884, 5654, 2003, 29918, 449, 353, 1948, 29961, 4317, 2003, 29918, 449, 29918, 1054, 29962, 13, 18884, 565, 851, 29898, 4317, 2003, 29918, 449, 29897, 1275, 525, 13707, 2396, 13, 462, 1678, 6773, 13, 18884, 396, 679, 278, 4356, 3381, 934, 322, 278, 27871, 934, 322, 14383, 13, 18884, 396, 718, 9177, 565, 451, 8560, 13, 18884, 5654, 2003, 29918, 449, 29918, 661, 2039, 353, 5654, 2003, 29918, 449, 718, 8207, 4299, 29914, 661, 2039, 29889, 1372, 29894, 29915, 13, 18884, 5654, 2003, 29918, 449, 29918, 536, 29875, 353, 5654, 2003, 29918, 449, 718, 8207, 4299, 29914, 536, 3381, 29889, 3945, 29915, 13, 18884, 565, 451, 338, 1445, 29898, 4317, 2003, 29918, 449, 29918, 661, 2039, 29897, 470, 451, 338, 1445, 29898, 4317, 2003, 29918, 449, 29918, 536, 29875, 1125, 13, 462, 1678, 2228, 353, 11297, 29873, 29905, 29873, 29961, 3389, 5654, 2003, 937, 29962, 1273, 29879, 313, 29995, 29879, 29897, 1273, 29879, 313, 29995, 29879, 16029, 1273, 313, 13, 462, 4706, 2703, 293, 29896, 29892, 977, 29873, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29906, 29897, 13, 462, 1678, 1583, 29889, 4317, 2003, 29918, 12175, 29889, 1202, 29898, 15118, 29897, 13, 462, 1678, 6773, 13, 18884, 396, 6314, 278, 27871, 718, 4356, 3381, 13, 18884, 396, 718, 4823, 18513, 29879, 363, 1269, 5101, 310, 2703, 1199, 322, 4128, 13, 18884, 1583, 29889, 4317, 2003, 29918, 690, 29961, 13, 462, 1678, 313, 18784, 29892, 11306, 29892, 2703, 293, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29896, 29892, 977, 29873, 29906, 29892, 302, 29918, 9435, 29892, 13, 462, 268, 5654, 2003, 29918, 449, 29918, 1054, 29889, 6506, 877, 4317, 2003, 29918, 449, 1649, 742, 6629, 876, 13, 18884, 4514, 353, 518, 4317, 2003, 29918, 449, 29918, 661, 2039, 29892, 5654, 2003, 29918, 449, 29918, 536, 29875, 29892, 12700, 29918, 18091, 29892, 13, 462, 268, 2703, 293, 29896, 29918, 9435, 29918, 18091, 29892, 2703, 293, 29906, 29918, 9435, 29918, 18091, 29962, 13, 13, 1678, 822, 679, 29918, 18784, 29918, 9006, 29879, 29898, 1311, 29892, 2703, 1199, 29918, 29886, 7121, 1125, 13, 4706, 19174, 5779, 353, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 22844, 29918, 20778, 29918, 2616, 2674, 800, 353, 5159, 13, 4706, 363, 6611, 29892, 1819, 297, 1583, 29889, 4317, 2003, 29918, 690, 29889, 7076, 7295, 13, 9651, 5101, 29892, 1206, 29892, 2703, 293, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29896, 29892, 977, 29873, 29906, 29892, 269, 2232, 29892, 5654, 2003, 353, 6611, 13, 9651, 27871, 29918, 18091, 29892, 4356, 29875, 29918, 18091, 29892, 12700, 29918, 18091, 29892, 2703, 293, 29896, 29918, 9435, 29892, 2703, 293, 29906, 29918, 9435, 353, 1819, 13, 9651, 1797, 29918, 290, 1199, 353, 679, 29918, 2098, 29918, 290, 1199, 29898, 25426, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29896, 29892, 977, 29873, 29906, 29892, 1206, 29892, 13, 462, 462, 3986, 2703, 1199, 29918, 29886, 7121, 29897, 13, 9651, 2703, 293, 29896, 353, 1797, 29918, 290, 1199, 29961, 29900, 29962, 13, 9651, 2703, 293, 29906, 353, 1797, 29918, 290, 1199, 29961, 29896, 29962, 13, 9651, 977, 29873, 29896, 353, 1797, 29918, 290, 1199, 29961, 29906, 29962, 13, 9651, 977, 29873, 29906, 353, 1797, 29918, 290, 1199, 29961, 29941, 29962, 13, 9651, 2703, 293, 29918, 14394, 353, 1797, 29918, 290, 1199, 29961, 29946, 29962, 13, 9651, 2703, 293, 29918, 11249, 353, 1797, 29918, 290, 1199, 29961, 29945, 29962, 13, 9651, 2703, 293, 29918, 29885, 2357, 915, 353, 1797, 29918, 290, 1199, 29961, 29953, 29962, 13, 9651, 2703, 293, 29918, 2527, 19388, 568, 353, 1797, 29918, 290, 1199, 29961, 29955, 29962, 13, 13, 9651, 396, 679, 16712, 29879, 13, 9651, 12700, 29896, 29892, 12700, 29918, 15926, 29896, 29892, 2923, 29918, 22724, 29896, 353, 1583, 29889, 2527, 294, 15625, 18784, 29892, 1206, 29892, 2703, 293, 29896, 29892, 13, 462, 462, 462, 418, 977, 29873, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29906, 4638, 13, 9651, 12700, 29906, 29892, 12700, 29918, 15926, 29906, 29892, 2923, 29918, 22724, 29906, 353, 1583, 29889, 2527, 294, 15625, 18784, 29892, 1206, 29892, 2703, 293, 29906, 29892, 13, 462, 462, 462, 418, 977, 29873, 29906, 29892, 2703, 293, 29896, 29892, 977, 29873, 29896, 4638, 13, 9651, 396, 5680, 526, 4768, 5317, 29892, 11916, 526, 270, 1862, 13, 9651, 4356, 29875, 353, 16557, 3381, 12191, 29889, 949, 29898, 536, 29875, 29918, 18091, 29897, 13, 9651, 3151, 29918, 6739, 29918, 20778, 29918, 2616, 2674, 800, 29892, 4236, 29918, 29878, 353, 679, 29918, 6739, 29918, 20778, 29918, 2616, 2674, 800, 29898, 13, 18884, 5101, 29892, 1206, 29892, 4356, 29875, 29892, 2703, 293, 29896, 29892, 2703, 293, 29906, 29892, 977, 29873, 29896, 29892, 977, 29873, 29906, 29892, 2923, 29918, 22724, 29896, 29892, 13, 18884, 12700, 29918, 15926, 29896, 29892, 2923, 29918, 22724, 29906, 29892, 12700, 29918, 15926, 29906, 29892, 12700, 29918, 18091, 29892, 2703, 293, 29896, 29918, 9435, 29892, 13, 18884, 2703, 293, 29906, 29918, 9435, 29892, 27871, 29918, 18091, 29897, 13, 9651, 22844, 29918, 20778, 29918, 2616, 2674, 800, 29889, 4397, 29898, 2764, 29918, 6739, 29918, 20778, 29918, 2616, 2674, 800, 29897, 13, 13, 9651, 9920, 353, 6629, 13, 9651, 565, 5101, 297, 1583, 29889, 28970, 29879, 29901, 13, 18884, 5101, 29918, 28970, 29879, 353, 1583, 29889, 28970, 29879, 29961, 18784, 29962, 13, 18884, 363, 12141, 29892, 6528, 267, 29918, 1761, 297, 5101, 29918, 28970, 29879, 29889, 7076, 7295, 13, 462, 1678, 302, 29918, 5628, 29892, 12700, 29918, 5628, 29892, 4356, 29875, 29918, 5628, 29918, 18091, 353, 3863, 29918, 536, 29875, 29918, 29939, 29920, 29894, 29898, 13, 462, 4706, 4356, 29875, 29892, 4356, 29875, 29918, 18091, 29892, 12141, 29892, 6528, 267, 29918, 1761, 29892, 12700, 29896, 29892, 12700, 29918, 15926, 29896, 29897, 13, 462, 1678, 565, 302, 29918, 5628, 29901, 13, 462, 4706, 3855, 1362, 29892, 3855, 29920, 29894, 353, 679, 29918, 29939, 22381, 29898, 536, 29875, 29918, 5628, 29918, 18091, 29897, 13, 462, 4706, 9920, 4619, 679, 29918, 5365, 5317, 29918, 26381, 29898, 13, 462, 9651, 4356, 29875, 29918, 5628, 29918, 18091, 29892, 3855, 1362, 29892, 3855, 29920, 29894, 29892, 2703, 293, 29918, 14394, 29892, 2703, 293, 29918, 11249, 29892, 13, 462, 9651, 12700, 29918, 5628, 29892, 12700, 29906, 29892, 302, 29918, 5628, 29892, 4236, 29918, 29878, 29897, 13, 9651, 4356, 29875, 29918, 5628, 29918, 18091, 353, 4356, 29875, 29918, 18091, 13, 9651, 3855, 1362, 29892, 3855, 29920, 29894, 353, 679, 29918, 29939, 22381, 29898, 536, 29875, 29918, 5628, 29918, 18091, 29897, 13, 9651, 363, 11660, 7176, 297, 19174, 5779, 29901, 13, 18884, 565, 11660, 7176, 29901, 13, 462, 1678, 302, 29918, 536, 29875, 29918, 1725, 1446, 353, 4356, 29875, 29889, 22100, 29889, 12181, 29961, 29900, 29962, 13, 462, 1678, 3855, 29920, 29894, 353, 3855, 29920, 29894, 29889, 6506, 12839, 29939, 29920, 29894, 742, 22868, 29883, 798, 7176, 29889, 29939, 29920, 29894, 1495, 13, 18884, 1683, 29901, 13, 462, 1678, 302, 29918, 536, 29875, 29918, 1725, 1446, 353, 29871, 29896, 29945, 13, 462, 1678, 396, 12871, 29918, 29939, 1362, 29892, 12871, 29918, 29939, 29920, 29894, 353, 679, 29918, 354, 271, 1958, 29918, 29939, 22381, 29898, 661, 2039, 29918, 18091, 29897, 13, 462, 1678, 396, 9920, 4619, 679, 29918, 354, 271, 1958, 29918, 26381, 29898, 13, 462, 1678, 396, 268, 27871, 29918, 18091, 29892, 12871, 29918, 29939, 1362, 29892, 12871, 29918, 29939, 29920, 29894, 29892, 12700, 29896, 29892, 13, 462, 1678, 396, 268, 12700, 29906, 29892, 12700, 29918, 15926, 29896, 29892, 12700, 29918, 15926, 29906, 29897, 13, 18884, 9920, 4619, 679, 29918, 5365, 5317, 29918, 26381, 29898, 13, 462, 1678, 4356, 29875, 29918, 5628, 29918, 18091, 29892, 3855, 1362, 29892, 3855, 29920, 29894, 29892, 2703, 293, 29918, 14394, 29892, 2703, 293, 29918, 11249, 29892, 13, 462, 1678, 12700, 29896, 29892, 12700, 29906, 29892, 302, 29918, 536, 29875, 29918, 1725, 1446, 29892, 4236, 29918, 29878, 29897, 13, 9651, 9920, 4619, 679, 29918, 29916, 4317, 2003, 29918, 26381, 29898, 13, 18884, 4356, 29875, 29918, 5628, 29918, 18091, 29892, 2703, 293, 29896, 29892, 2703, 293, 29906, 29892, 12700, 29896, 29892, 12700, 29906, 29892, 1583, 29889, 29916, 4317, 2003, 29879, 29892, 5101, 29897, 13, 13, 9651, 2246, 29876, 353, 29871, 29945, 13, 9651, 5680, 29918, 7039, 353, 5159, 13, 9651, 565, 5680, 29918, 7039, 29901, 13, 18884, 12871, 353, 14210, 29879, 29918, 3274, 2859, 29918, 354, 271, 10339, 29918, 6341, 29889, 29939, 29920, 29894, 29915, 1273, 8536, 568, 486, 29898, 661, 2039, 29918, 18091, 9601, 29900, 29962, 13, 9651, 1683, 29901, 13, 18884, 12871, 353, 14210, 29879, 29918, 3274, 2859, 29918, 354, 271, 10339, 29918, 3332, 29995, 29879, 29889, 29939, 29920, 29894, 29915, 1273, 313, 23579, 568, 486, 29898, 661, 2039, 29918, 18091, 9601, 29900, 1402, 13, 462, 462, 462, 308, 2246, 29876, 29897, 13, 9651, 9920, 4619, 679, 29918, 3274, 2859, 29918, 354, 271, 10339, 29918, 6519, 29898, 13, 18884, 27871, 29918, 18091, 29892, 2703, 293, 29896, 29918, 9435, 29892, 2703, 293, 29906, 29918, 9435, 29892, 12700, 29896, 29892, 5680, 29918, 7039, 29892, 13, 18884, 2246, 29876, 29892, 12871, 29897, 13, 9651, 1583, 29889, 9006, 29879, 29889, 842, 4381, 29898, 18784, 29892, 5159, 467, 4397, 29898, 9006, 29897, 13, 4706, 736, 22844, 29918, 20778, 29918, 2616, 2674, 800, 13, 13, 1678, 822, 1510, 29918, 4317, 2003, 29918, 12175, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 4317, 2003, 29918, 12175, 29901, 13, 9651, 363, 5654, 2003, 29918, 15118, 297, 1583, 29889, 4317, 2003, 29918, 12175, 29901, 13, 18884, 1596, 29898, 4317, 2003, 29918, 15118, 29897, 13, 13, 1678, 822, 5654, 18513, 29898, 1311, 29892, 3300, 2859, 29918, 14538, 1691, 29892, 16712, 29879, 1125, 13, 4706, 565, 451, 3300, 2859, 29918, 14538, 1691, 29889, 4317, 2003, 29918, 15926, 29889, 12181, 29961, 29900, 5387, 13, 9651, 1596, 877, 3782, 5654, 2003, 1962, 17809, 856, 1495, 13, 9651, 736, 6213, 13, 4706, 1583, 29889, 15287, 29918, 4317, 2003, 29898, 3274, 2859, 29918, 14538, 1691, 29889, 4317, 2003, 29918, 15926, 29897, 13, 4706, 565, 16712, 29879, 29889, 21453, 18513, 29918, 15926, 29889, 12181, 29961, 29900, 5387, 13, 9651, 4823, 18513, 29918, 15926, 353, 1583, 29889, 15287, 29918, 21453, 18513, 29898, 29881, 8349, 9409, 29889, 21453, 18513, 29918, 15926, 29897, 13, 9651, 1583, 29889, 14634, 29918, 4317, 2003, 29918, 21453, 18513, 29898, 21453, 18513, 29918, 15926, 29897, 13, 13, 4706, 1583, 29889, 657, 29918, 20725, 29877, 29918, 29886, 6289, 580, 13, 4706, 1583, 29889, 657, 29918, 290, 1199, 29918, 21453, 18513, 29879, 29918, 941, 17367, 580, 13, 4706, 1583, 29889, 657, 29918, 4317, 2003, 29918, 690, 580, 13, 4706, 1583, 29889, 4294, 29918, 4317, 2003, 29918, 12175, 580, 13, 13, 4706, 2703, 1199, 29918, 29886, 7121, 353, 518, 23583, 29898, 29916, 29897, 363, 921, 297, 1583, 29889, 4317, 2003, 29918, 21453, 18513, 29918, 15926, 29961, 13, 9651, 6024, 25426, 29918, 6484, 29918, 1777, 29873, 29896, 742, 525, 25426, 29918, 6484, 29918, 1777, 29873, 29906, 2033, 1822, 5975, 29889, 25027, 391, 580, 29962, 13, 4706, 22844, 29918, 20778, 29918, 2616, 2674, 800, 353, 1583, 29889, 657, 29918, 18784, 29918, 9006, 29879, 29898, 290, 1199, 29918, 29886, 7121, 29897, 13, 13, 4706, 565, 7431, 29898, 6739, 29918, 20778, 29918, 2616, 2674, 800, 1125, 13, 9651, 714, 29918, 12083, 353, 679, 29918, 15916, 29918, 12083, 29898, 1311, 29889, 2917, 29889, 29875, 29918, 14538, 1691, 29918, 12083, 29892, 13, 462, 462, 632, 525, 4317, 18513, 1495, 13, 9651, 714, 29918, 2616, 2674, 800, 353, 14210, 29879, 29914, 6739, 29918, 4270, 29918, 21453, 18513, 29918, 2616, 2674, 800, 29889, 1372, 29894, 29915, 1273, 714, 29918, 12083, 13, 9651, 22844, 29918, 20778, 29918, 2616, 2674, 800, 29918, 15926, 353, 10518, 29889, 17685, 29898, 6739, 29918, 20778, 29918, 2616, 2674, 800, 29897, 13, 9651, 565, 22844, 29918, 20778, 29918, 2616, 2674, 800, 29918, 15926, 29889, 12181, 29961, 29900, 5387, 13, 18884, 22844, 29918, 20778, 29918, 2616, 2674, 800, 29918, 15926, 29889, 517, 29918, 7638, 29898, 13, 462, 1678, 714, 29918, 2616, 2674, 800, 29892, 2380, 29922, 8824, 29892, 16345, 2433, 29905, 29873, 1495, 13, 18884, 1596, 28909, 29873, 29905, 29873, 1360, 29958, 16849, 841, 29901, 742, 714, 29918, 2616, 2674, 800, 29897, 13, 9651, 1683, 29901, 13, 18884, 1596, 28909, 29873, 29905, 29873, 1360, 29958, 1939, 1781, 4823, 18513, 1904, 304, 525, 13, 462, 418, 525, 5675, 8855, 800, 411, 5654, 2003, 9609, 29879, 856, 1495, 13, 4706, 1583, 29889, 9573, 29918, 6519, 877, 4317, 18513, 1495, 13, 13, 1678, 822, 6036, 29918, 6519, 29898, 1311, 29892, 7418, 1125, 13, 4706, 24352, 29925, 3445, 29889, 7054, 952, 267, 29918, 26381, 29961, 15916, 29962, 353, 1583, 29889, 9006, 29879, 13, 2 ]
fabfile.py
zzz123-tech/zhanzhenblog
0
46113
<gh_stars>0 from fabric import task from invoke import Responder from _credentials import github_username, github_password def _get_github_auth_responders(): """ 返回 GitHub 用户名密码自动填充器 """ username_responder = Responder( pattern="Username for 'https://github.com':", response='{}\n'.format(github_username) ) password_responder = Responder( pattern="Password for 'https://{}@github.com':".format(github_username), response='{}\n'.format(github_password) ) return [username_responder, password_responder] @task() def deploy(c): supervisor_conf_path = '~/etc/' supervisor_program_name = 'zhanzhenblog' project_root_path = '~/apps/zhanzhenblog/' # 先停止应用 with c.cd(supervisor_conf_path): cmd = '/home/zhanzhen/.local/bin/supervisorctl stop {}'.format(supervisor_program_name) c.run(cmd) # 进入项目根目录,从 Git 拉取最新代码 with c.cd(project_root_path): cmd = 'git pull' responders = _get_github_auth_responders() c.run(cmd, watchers=responders) # 安装依赖,迁移数据库,收集静态文件 with c.cd(project_root_path): c.run('pipenv install --deploy --ignore-pipfile') c.run('pipenv run python manage.py migrate') c.run('pipenv run python manage.py collectstatic --noinput') # 重新启动应用 with c.cd(supervisor_conf_path): cmd = '/home/zhanzhen/.local/bin/supervisorctl start {}'.format(supervisor_program_name) c.run(cmd)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 18187, 1053, 3414, 13, 3166, 15928, 1053, 2538, 27582, 13, 3166, 903, 11944, 9409, 1053, 18546, 29918, 6786, 29892, 18546, 29918, 5630, 13, 13, 13, 1753, 903, 657, 29918, 3292, 29918, 5150, 29918, 3636, 414, 7295, 13, 4706, 9995, 13, 308, 31086, 30742, 25492, 29871, 30406, 31229, 30548, 31461, 31183, 30688, 30846, 232, 164, 174, 232, 136, 136, 30943, 13, 4706, 9995, 13, 4706, 8952, 29918, 690, 27582, 353, 2538, 27582, 29898, 13, 18884, 4766, 543, 20249, 363, 525, 991, 597, 3292, 29889, 510, 2396, 613, 13, 18884, 2933, 2433, 29912, 1012, 29876, 4286, 4830, 29898, 3292, 29918, 6786, 29897, 13, 4706, 1723, 13, 4706, 4800, 29918, 690, 27582, 353, 2538, 27582, 29898, 13, 18884, 4766, 543, 10048, 363, 525, 991, 597, 8875, 29992, 3292, 29889, 510, 2396, 1642, 4830, 29898, 3292, 29918, 6786, 511, 13, 18884, 2933, 2433, 29912, 1012, 29876, 4286, 4830, 29898, 3292, 29918, 5630, 29897, 13, 4706, 1723, 13, 4706, 736, 518, 6786, 29918, 690, 27582, 29892, 4800, 29918, 690, 27582, 29962, 13, 29992, 7662, 580, 13, 1753, 7246, 29898, 29883, 1125, 13, 4706, 2428, 19188, 29918, 5527, 29918, 2084, 353, 525, 20038, 7070, 22208, 13, 4706, 2428, 19188, 29918, 8860, 29918, 978, 353, 525, 17599, 4096, 3169, 7312, 29915, 13, 13, 4706, 2060, 29918, 4632, 29918, 2084, 353, 525, 20038, 13371, 29914, 17599, 4096, 3169, 7312, 22208, 13, 13, 462, 1678, 396, 29871, 31244, 232, 132, 159, 31981, 31370, 30406, 13, 4706, 411, 274, 29889, 2252, 29898, 9136, 19188, 29918, 5527, 29918, 2084, 1125, 13, 9651, 9920, 353, 8207, 5184, 29914, 17599, 4096, 3169, 6294, 2997, 29914, 2109, 29914, 9136, 19188, 16948, 5040, 6571, 4286, 4830, 29898, 9136, 19188, 29918, 8860, 29918, 978, 29897, 13, 9651, 274, 29889, 3389, 29898, 9006, 29897, 13, 13, 462, 462, 9651, 396, 29871, 31174, 30752, 31888, 30895, 31393, 30895, 31283, 30214, 31594, 11786, 29871, 31543, 30683, 30878, 30374, 30690, 31183, 13, 4706, 411, 274, 29889, 2252, 29898, 4836, 29918, 4632, 29918, 2084, 1125, 13, 9651, 9920, 353, 525, 5559, 8206, 29915, 13, 9651, 10049, 414, 353, 903, 657, 29918, 3292, 29918, 5150, 29918, 3636, 414, 580, 13, 9651, 274, 29889, 3389, 29898, 9006, 29892, 6505, 414, 29922, 3636, 414, 29897, 13, 13, 462, 462, 462, 462, 9651, 396, 29871, 30670, 31905, 231, 193, 160, 235, 184, 153, 30214, 235, 194, 132, 31618, 30354, 30763, 31700, 30214, 31997, 30893, 236, 160, 156, 31613, 30333, 30631, 13, 4706, 411, 274, 29889, 2252, 29898, 4836, 29918, 4632, 29918, 2084, 1125, 13, 9651, 274, 29889, 3389, 877, 13096, 6272, 2601, 1192, 16519, 1192, 17281, 29899, 13096, 1445, 1495, 13, 9651, 274, 29889, 3389, 877, 13096, 6272, 1065, 3017, 10933, 29889, 2272, 9725, 403, 1495, 13, 9651, 274, 29889, 3389, 877, 13096, 6272, 1065, 3017, 10933, 29889, 2272, 6314, 7959, 1192, 1217, 2080, 1495, 13, 13, 462, 462, 462, 462, 462, 462, 18884, 396, 29871, 30908, 30374, 232, 147, 178, 30846, 31370, 30406, 13, 4706, 411, 274, 29889, 2252, 29898, 9136, 19188, 29918, 5527, 29918, 2084, 1125, 13, 9651, 9920, 353, 8207, 5184, 29914, 17599, 4096, 3169, 6294, 2997, 29914, 2109, 29914, 9136, 19188, 16948, 1369, 6571, 4286, 4830, 29898, 9136, 19188, 29918, 8860, 29918, 978, 29897, 13, 9651, 274, 29889, 3389, 29898, 9006, 29897, 13, 13, 2 ]
sources/praline/client/project/pipeline/stages/pull_dependencies_test.py
dansandu/praline
0
1615411
<filename>sources/praline/client/project/pipeline/stages/pull_dependencies_test.py from os.path import basename, normpath from praline.client.project.pipeline.stages.pull_dependencies import pull_dependencies from praline.common.testing.file_system_mock import FileSystemMock from typing import Any, Dict from unittest import TestCase import pickle class CompilerMock: def get_name(self): return 'clang' def get_architecture(self): return 'x64' def get_platform(self): return 'darwin' def get_mode(self): return 'release' class RemoteProxyMock: def __init__(self, client_file_system): self.client_file_system = client_file_system self.packages = { 'fruit-apple-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/apple/apple.hpp': b'fruit-apple-hpp', 'libraries/libfruit-apple-x64-darwin-clang-release-1.0.0.dylib': b'fruit-apple-dylib' }), 'fruit-grapes-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/grapes/grapes.hpp': b'new-fruit-grapes-hpp', 'libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib': b'new-fruit-grapes-dylib' }), 'fruit-waterlemon-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/waterlemon/waterlemon.hpp': b'fruit-waterlemon-hpp', 'libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib': b'fruit-waterlemon-dylib' }) } def pull_package(self, package_path: str) -> None: package_name = basename(package_path) with self.client_file_system.open_file(package_path, 'wb') as f: f.write(self.packages[package_name]) def push_package(self, package_path: str) -> None: package_name = basename(package_path) with self.client_file_system.open_file(package_path, 'rb') as f: self.packages[package_name] = f.read() def solve_dependencies(self, pralinefile: Dict[str, Any], architecture: str, platform: str, compiler: str, mode: str) -> Dict[str, str]: return { 'fruit-apple-x64-darwin-clang-release-1.0.0.tar.gz': 'apple-hash', 'fruit-grapes-x64-darwin-clang-release-1.0.0.tar.gz': 'new-grapes-hash', 'fruit-waterlemon-x64-darwin-clang-release-1.0.0.tar.gz': 'waterlemon-hash' } class PullDependenciesStageTest(TestCase): def test_pull_dependencies(self): pralinefile = b"""\ organization: fruit artifact: banana version: 1.0.0 dependencies: - organization: fruit artifact: apple version: 1.0.0 """ file_system = FileSystemMock({ 'project/target/external/headers/fruit/grapes', 'project/target/external/headers/fruit/waterlemon', 'project/target/external/headers/fruit/raspberry', 'project/target/external/libraries', 'project/target/external/packages' }, { 'project/target/external/headers/fruit/grapes/grapes.hpp': b'fruit-grapes-hpp', 'project/target/external/headers/fruit/waterlemon/waterlemon.hpp': b'fruit-waterlemon-hpp', 'project/target/external/headers/fruit/raspberry/raspberry.hpp': b'fruit-raspberry-hpp', 'project/target/external/libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib': b'fruit-grapes-dylib', 'project/target/external/libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib': b'fruit-waterlemon-dylib', 'project/target/external/libraries/libfruit-raspberry-x64-darwin-clang-release-1.0.0.dylib': b'fruit-raspberry-dylib', 'project/target/external/packages/fruit-grapes-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/grapes/grapes.hpp': b'fruit-grapes-hpp', 'libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib': b'fruit-grapes-dylib' }), 'project/target/external/packages/fruit-waterlemon-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/waterlemon/waterlemon.hpp': b'fruit-waterlemon-hpp', 'libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib': b'fruit-waterlemon-dylib' }), 'project/target/external/packages/fruit-raspberry-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/raspberry/raspberry.hpp': b'fruit-raspberry-hpp', 'libraries/libfruit-raspberry-x64-darwin-clang-release-1.0.0.dylib': b'fruit-raspberry-dylib' }) }) resources = { 'project_directory': 'project', 'pralinefile': pralinefile, 'architecture': 'x64', 'platform': 'darwin', 'mode': 'release', 'compiler': CompilerMock() } cache = { 'fruit-grapes-x64-darwin-clang-release-1.0.0.tar.gz': 'grapes-hash', 'fruit-waterlemon-x64-darwin-clang-release-1.0.0.tar.gz': 'waterlemon-hash', 'fruit-raspberry-x64-darwin-clang-release-1.0.0.tar.gz': 'raspberry-hash' } program_arguments = { 'global': { 'logging_level': 4 } } remote_proxy = RemoteProxyMock(file_system) pull_dependencies(file_system, resources, cache, program_arguments, None, remote_proxy) expected_files = { 'project/target/external/headers/fruit/apple/apple.hpp': b'fruit-apple-hpp', 'project/target/external/headers/fruit/grapes/grapes.hpp': b'new-fruit-grapes-hpp', 'project/target/external/headers/fruit/waterlemon/waterlemon.hpp': b'fruit-waterlemon-hpp', 'project/target/external/libraries/libfruit-apple-x64-darwin-clang-release-1.0.0.dylib': b'fruit-apple-dylib', 'project/target/external/libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib': b'new-fruit-grapes-dylib', 'project/target/external/libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib': b'fruit-waterlemon-dylib', 'project/target/external/packages/fruit-apple-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/apple/apple.hpp': b'fruit-apple-hpp', 'libraries/libfruit-apple-x64-darwin-clang-release-1.0.0.dylib': b'fruit-apple-dylib' }), 'project/target/external/packages/fruit-grapes-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/grapes/grapes.hpp': b'new-fruit-grapes-hpp', 'libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib': b'new-fruit-grapes-dylib' }), 'project/target/external/packages/fruit-waterlemon-x64-darwin-clang-release-1.0.0.tar.gz': pickle.dumps({ 'headers/fruit/waterlemon/waterlemon.hpp': b'fruit-waterlemon-hpp', 'libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib': b'fruit-waterlemon-dylib' }) } self.assertEqual(file_system.files, {normpath(p): d for p, d in expected_files.items()}) expected_directories = { 'project/target/external/packages', 'project/target/external/resources', 'project/target/external/headers/fruit/apple', 'project/target/external/headers/fruit/grapes', 'project/target/external/headers/fruit/waterlemon', 'project/target/external/libraries', 'project/target/external/libraries_interfaces', 'project/target/external/symbols_tables', 'project/target/external/executables' } self.assertEqual(file_system.directories, {normpath(p) for p in expected_directories}) self.assertEqual(resources['external_resources_root'], normpath('project/target/external/resources')) self.assertEqual(resources['external_headers_root'], normpath('project/target/external/headers')) self.assertEqual(resources['external_libraries_root'], normpath('project/target/external/libraries')) self.assertEqual(resources['external_libraries_interfaces_root'], normpath('project/target/external/libraries_interfaces')) self.assertEqual(resources['external_symbols_tables_root'], normpath('project/target/external/symbols_tables')) self.assertEqual(resources['external_executables_root'], normpath('project/target/external/executables')) self.assertEqual(resources['external_resources'], []) expected_headers = { 'project/target/external/headers/fruit/apple/apple.hpp', 'project/target/external/headers/fruit/grapes/grapes.hpp', 'project/target/external/headers/fruit/waterlemon/waterlemon.hpp' } self.assertEqual({normpath(p) for p in resources['external_headers']}, {normpath(p) for p in expected_headers}) expected_libraries = { 'project/target/external/libraries/libfruit-apple-x64-darwin-clang-release-1.0.0.dylib', 'project/target/external/libraries/libfruit-grapes-x64-darwin-clang-release-1.0.0.dylib', 'project/target/external/libraries/libfruit-waterlemon-x64-darwin-clang-release-1.0.0.dylib' } self.assertEqual({normpath(p) for p in resources['external_libraries']}, {normpath(p) for p in expected_libraries}) self.assertEqual(resources['external_libraries_interfaces'], []) self.assertEqual(resources['external_symbols_tables'], []) self.assertEqual(resources['external_executables'], [])
[ 1, 529, 9507, 29958, 29879, 2863, 29914, 558, 284, 457, 29914, 4645, 29914, 4836, 29914, 13096, 5570, 29914, 303, 1179, 29914, 26746, 29918, 22594, 29918, 1688, 29889, 2272, 13, 3166, 2897, 29889, 2084, 1053, 2362, 3871, 29892, 6056, 2084, 13, 3166, 544, 284, 457, 29889, 4645, 29889, 4836, 29889, 13096, 5570, 29889, 303, 1179, 29889, 26746, 29918, 22594, 1053, 8206, 29918, 22594, 13, 3166, 544, 284, 457, 29889, 9435, 29889, 13424, 29889, 1445, 29918, 5205, 29918, 17640, 1053, 3497, 3924, 18680, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 13, 3166, 443, 27958, 1053, 4321, 8259, 13, 5215, 5839, 280, 13, 13, 13, 1990, 3831, 3955, 18680, 29901, 13, 1678, 822, 679, 29918, 978, 29898, 1311, 1125, 13, 4706, 736, 525, 695, 574, 29915, 13, 13, 1678, 822, 679, 29918, 25428, 29898, 1311, 1125, 13, 4706, 736, 525, 29916, 29953, 29946, 29915, 13, 13, 1678, 822, 679, 29918, 12120, 29898, 1311, 1125, 13, 4706, 736, 525, 16702, 5080, 29915, 13, 13, 1678, 822, 679, 29918, 8513, 29898, 1311, 1125, 13, 4706, 736, 525, 14096, 29915, 13, 13, 13, 1990, 5240, 866, 14048, 18680, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3132, 29918, 1445, 29918, 5205, 1125, 13, 4706, 1583, 29889, 4645, 29918, 1445, 29918, 5205, 353, 3132, 29918, 1445, 29918, 5205, 13, 4706, 1583, 29889, 8318, 965, 353, 426, 13, 9651, 525, 29888, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 11548, 29914, 11548, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 4518, 1982, 29915, 13, 9651, 5615, 13, 4706, 500, 13, 13, 1678, 822, 8206, 29918, 5113, 29898, 1311, 29892, 3577, 29918, 2084, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 3577, 29918, 978, 353, 2362, 3871, 29898, 5113, 29918, 2084, 29897, 13, 4706, 411, 1583, 29889, 4645, 29918, 1445, 29918, 5205, 29889, 3150, 29918, 1445, 29898, 5113, 29918, 2084, 29892, 525, 29893, 29890, 1495, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 1311, 29889, 8318, 29961, 5113, 29918, 978, 2314, 13, 13, 1678, 822, 5503, 29918, 5113, 29898, 1311, 29892, 3577, 29918, 2084, 29901, 851, 29897, 1599, 6213, 29901, 13, 4706, 3577, 29918, 978, 353, 2362, 3871, 29898, 5113, 29918, 2084, 29897, 13, 4706, 411, 1583, 29889, 4645, 29918, 1445, 29918, 5205, 29889, 3150, 29918, 1445, 29898, 5113, 29918, 2084, 29892, 525, 6050, 1495, 408, 285, 29901, 13, 9651, 1583, 29889, 8318, 29961, 5113, 29918, 978, 29962, 353, 285, 29889, 949, 580, 13, 13, 1678, 822, 4505, 29918, 22594, 29898, 1311, 29892, 544, 284, 457, 1445, 29901, 360, 919, 29961, 710, 29892, 3139, 1402, 11258, 29901, 851, 29892, 7481, 29901, 851, 29892, 6516, 29901, 851, 29892, 4464, 29901, 851, 29897, 1599, 360, 919, 29961, 710, 29892, 851, 5387, 13, 4706, 736, 426, 13, 9651, 525, 29888, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 11548, 29899, 8568, 742, 13, 9651, 525, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 1482, 29899, 29887, 2390, 267, 29899, 8568, 742, 13, 9651, 525, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 13405, 2409, 265, 29899, 8568, 29915, 13, 4706, 500, 13, 13, 13, 1990, 349, 913, 8498, 7158, 27276, 3057, 29898, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 26746, 29918, 22594, 29898, 1311, 1125, 13, 4706, 544, 284, 457, 1445, 353, 289, 15945, 26732, 13, 9651, 13013, 29901, 15774, 13, 9651, 24238, 29901, 9892, 1648, 13, 9651, 1873, 29901, 29871, 29896, 29889, 29900, 29889, 29900, 13, 9651, 9962, 29901, 13, 9651, 448, 13013, 29901, 15774, 13, 795, 24238, 29901, 26163, 13, 795, 1873, 29901, 29871, 29896, 29889, 29900, 29889, 29900, 13, 9651, 9995, 13, 308, 13, 4706, 934, 29918, 5205, 353, 3497, 3924, 18680, 3319, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 3417, 29886, 16344, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29915, 13, 4706, 2981, 426, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 3417, 29886, 16344, 29914, 3417, 29886, 16344, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 29887, 2390, 267, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 3417, 29886, 16344, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 29887, 2390, 267, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 3417, 29886, 16344, 29914, 3417, 29886, 16344, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 3417, 29886, 16344, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 4518, 1982, 29915, 13, 9651, 5615, 13, 4706, 5615, 13, 13, 4706, 7788, 353, 426, 13, 9651, 525, 4836, 29918, 12322, 2396, 525, 4836, 742, 13, 9651, 525, 558, 284, 457, 1445, 2396, 544, 284, 457, 1445, 29892, 13, 9651, 525, 25428, 2396, 525, 29916, 29953, 29946, 742, 13, 9651, 525, 12120, 2396, 525, 16702, 5080, 742, 13, 9651, 525, 8513, 2396, 525, 14096, 742, 13, 9651, 525, 21789, 2396, 3831, 3955, 18680, 580, 13, 4706, 500, 13, 13, 4706, 7090, 353, 426, 13, 9651, 525, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 29887, 2390, 267, 29899, 8568, 742, 13, 9651, 525, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 13405, 2409, 265, 29899, 8568, 742, 13, 9651, 525, 29888, 9216, 29899, 3417, 29886, 16344, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 525, 3417, 29886, 16344, 29899, 8568, 29915, 13, 4706, 500, 13, 13, 4706, 1824, 29918, 25699, 353, 426, 13, 9651, 525, 10945, 2396, 426, 13, 18884, 525, 21027, 29918, 5563, 2396, 29871, 29946, 13, 9651, 500, 13, 4706, 500, 13, 13, 4706, 7592, 29918, 14701, 353, 5240, 866, 14048, 18680, 29898, 1445, 29918, 5205, 29897, 13, 13, 4706, 8206, 29918, 22594, 29898, 1445, 29918, 5205, 29892, 7788, 29892, 7090, 29892, 1824, 29918, 25699, 29892, 6213, 29892, 7592, 29918, 14701, 29897, 13, 13, 4706, 3806, 29918, 5325, 353, 426, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 11548, 29914, 11548, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 11548, 29914, 11548, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 11548, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 1482, 29899, 29888, 9216, 29899, 29887, 2390, 267, 29899, 4518, 1982, 29915, 13, 9651, 500, 511, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 29914, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 12637, 29889, 18828, 2396, 5839, 280, 29889, 29881, 17204, 3319, 13, 18884, 525, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 29623, 742, 13, 18884, 525, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 2396, 289, 29915, 29888, 9216, 29899, 13405, 2409, 265, 29899, 4518, 1982, 29915, 13, 9651, 5615, 13, 4706, 500, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1445, 29918, 5205, 29889, 5325, 29892, 426, 12324, 2084, 29898, 29886, 1125, 270, 363, 282, 29892, 270, 297, 3806, 29918, 5325, 29889, 7076, 580, 1800, 13, 13, 4706, 3806, 29918, 11851, 3842, 353, 426, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 8318, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13237, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 11548, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29918, 1639, 8726, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 18098, 29879, 29918, 24051, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 4258, 329, 1849, 29915, 13, 4706, 500, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1445, 29918, 5205, 29889, 11851, 3842, 29892, 426, 12324, 2084, 29898, 29886, 29897, 363, 282, 297, 3806, 29918, 11851, 3842, 1800, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 13237, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 13237, 8785, 13, 308, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 13662, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 8785, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 492, 8464, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 8785, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 492, 8464, 29918, 1639, 8726, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29918, 1639, 8726, 8785, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 18098, 29879, 29918, 24051, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 18098, 29879, 29918, 24051, 8785, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 4258, 329, 1849, 29918, 4632, 7464, 6056, 2084, 877, 4836, 29914, 5182, 29914, 23176, 29914, 4258, 329, 1849, 8785, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 13237, 7464, 518, 2314, 13, 13, 4706, 3806, 29918, 13662, 353, 426, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 11548, 29914, 11548, 29889, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 29887, 2390, 267, 29914, 29887, 2390, 267, 29889, 29623, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 13662, 29914, 29888, 9216, 29914, 13405, 2409, 265, 29914, 13405, 2409, 265, 29889, 29623, 29915, 13, 4706, 500, 13, 13, 4706, 1583, 29889, 9294, 9843, 3319, 12324, 2084, 29898, 29886, 29897, 363, 282, 297, 7788, 1839, 23176, 29918, 13662, 2033, 1118, 426, 12324, 2084, 29898, 29886, 29897, 363, 282, 297, 3806, 29918, 13662, 1800, 13, 13, 4706, 3806, 29918, 492, 8464, 353, 426, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 11548, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 29887, 2390, 267, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 742, 13, 9651, 525, 4836, 29914, 5182, 29914, 23176, 29914, 492, 8464, 29914, 492, 1635, 9216, 29899, 13405, 2409, 265, 29899, 29916, 29953, 29946, 29899, 16702, 5080, 29899, 695, 574, 29899, 14096, 29899, 29896, 29889, 29900, 29889, 29900, 29889, 4518, 1982, 29915, 13, 4706, 500, 13, 13, 4706, 1583, 29889, 9294, 9843, 3319, 12324, 2084, 29898, 29886, 29897, 363, 282, 297, 7788, 1839, 23176, 29918, 492, 8464, 2033, 1118, 426, 12324, 2084, 29898, 29886, 29897, 363, 282, 297, 3806, 29918, 492, 8464, 1800, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 492, 8464, 29918, 1639, 8726, 7464, 518, 2314, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 18098, 29879, 29918, 24051, 7464, 518, 2314, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13237, 1839, 23176, 29918, 4258, 329, 1849, 7464, 518, 2314, 13, 2 ]
tests/conftest.py
Peter-Metz/taxdata
0
29588
import os import json import pytest import pandas as pd # TODO: revise the following constants when using new or revised CPS/PUF data CPS_START_YEAR = 2014 PUF_START_YEAR = 2011 PUF_COUNT = 248591 LAST_YEAR = 2027 @pytest.fixture(scope='session') def test_path(): return os.path.abspath(os.path.dirname(__file__)) @pytest.fixture(scope='session') def growfactors(test_path): gf_path = os.path.join(test_path, '../puf_stage1/growfactors.csv') return pd.read_csv(gf_path, index_col='YEAR') @pytest.fixture(scope='session') def metadata(test_path): md_path = os.path.join(test_path, 'records_metadata.json') with open(md_path, 'r') as mdf: return json.load(mdf) @pytest.fixture(scope='session') def cps(test_path): cps_path = os.path.join(test_path, '../cps_data/cps.csv.gz') return pd.read_csv(cps_path) @pytest.fixture(scope='session') def cps_count(test_path): cps_path = os.path.join(test_path, '../cps_data/cps.csv.gz') cps_df = pd.read_csv(cps_path) return cps_df.shape[0] @pytest.fixture(scope='session') def cps_start_year(): return CPS_START_YEAR @pytest.fixture(scope='session') def puf_path(test_path): return os.path.join(test_path, '../puf_data/puf.csv') @pytest.fixture(scope='session') def puf(puf_path): if os.path.isfile(puf_path): return pd.read_csv(puf_path) else: return None @pytest.fixture(scope='session') def puf_count(puf_path): if os.path.isfile(puf_path): puf_df = pd.read_csv(puf_path) count = puf_df.shape[0] if count != PUF_COUNT: msg = 'puf.shape[0] = {} not equal to PUF_COUNT = {}' raise ValueError(msg.format(count, PUF_COUNT)) else: count = PUF_COUNT return count @pytest.fixture(scope='session') def puf_start_year(): return PUF_START_YEAR @pytest.fixture(scope='session') def last_year(): return LAST_YEAR @pytest.fixture(scope='session') def cps_weights(test_path): cpsw_path = os.path.join(test_path, '../cps_stage2/cps_weights.csv.gz') return pd.read_csv(cpsw_path) @pytest.fixture(scope='session') def puf_weights(test_path): pufw_path = os.path.join(test_path, '../puf_stage2/puf_weights.csv.gz') return pd.read_csv(pufw_path) @pytest.fixture(scope='session') def cps_ratios(test_path): # cpsr_path = os.path.join(test_path, '../cps_stage3/cps_ratios.csv') # return pd.read_csv(cpsr_path, index_col=0) return None @pytest.fixture(scope='session') def puf_ratios(test_path): pufr_path = os.path.join(test_path, '../puf_stage3/puf_ratios.csv') return pd.read_csv(pufr_path, index_col=0)
[ 1, 1053, 2897, 13, 5215, 4390, 13, 5215, 11451, 1688, 13, 5215, 11701, 408, 10518, 13, 13, 13, 29937, 14402, 29901, 6664, 895, 278, 1494, 17727, 746, 773, 716, 470, 337, 11292, 315, 7024, 29914, 7056, 29943, 848, 13, 6271, 29903, 29918, 25826, 29918, 29979, 26441, 353, 29871, 29906, 29900, 29896, 29946, 13, 7056, 29943, 29918, 25826, 29918, 29979, 26441, 353, 29871, 29906, 29900, 29896, 29896, 13, 7056, 29943, 29918, 18736, 353, 29871, 29906, 29946, 29947, 29945, 29929, 29896, 13, 4375, 1254, 29918, 29979, 26441, 353, 29871, 29906, 29900, 29906, 29955, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 1243, 29918, 2084, 7295, 13, 1678, 736, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 876, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 6548, 17028, 943, 29898, 1688, 29918, 2084, 1125, 13, 1678, 330, 29888, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29886, 1137, 29918, 19190, 29896, 29914, 29887, 798, 17028, 943, 29889, 7638, 1495, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 29887, 29888, 29918, 2084, 29892, 2380, 29918, 1054, 2433, 29979, 26441, 1495, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 15562, 29898, 1688, 29918, 2084, 1125, 13, 1678, 22821, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 3757, 4339, 29918, 19635, 29889, 3126, 1495, 13, 1678, 411, 1722, 29898, 3487, 29918, 2084, 29892, 525, 29878, 1495, 408, 286, 2176, 29901, 13, 4706, 736, 4390, 29889, 1359, 29898, 29885, 2176, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 274, 567, 29898, 1688, 29918, 2084, 1125, 13, 1678, 274, 567, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29883, 567, 29918, 1272, 29914, 29883, 567, 29889, 7638, 29889, 18828, 1495, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 29883, 567, 29918, 2084, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 274, 567, 29918, 2798, 29898, 1688, 29918, 2084, 1125, 13, 1678, 274, 567, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29883, 567, 29918, 1272, 29914, 29883, 567, 29889, 7638, 29889, 18828, 1495, 13, 1678, 274, 567, 29918, 2176, 353, 10518, 29889, 949, 29918, 7638, 29898, 29883, 567, 29918, 2084, 29897, 13, 1678, 736, 274, 567, 29918, 2176, 29889, 12181, 29961, 29900, 29962, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 274, 567, 29918, 2962, 29918, 6360, 7295, 13, 1678, 736, 315, 7024, 29918, 25826, 29918, 29979, 26441, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29918, 2084, 29898, 1688, 29918, 2084, 1125, 13, 1678, 736, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29886, 1137, 29918, 1272, 29914, 29886, 1137, 29889, 7638, 1495, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29898, 29886, 1137, 29918, 2084, 1125, 13, 1678, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 29886, 1137, 29918, 2084, 1125, 13, 4706, 736, 10518, 29889, 949, 29918, 7638, 29898, 29886, 1137, 29918, 2084, 29897, 13, 1678, 1683, 29901, 13, 4706, 736, 6213, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29918, 2798, 29898, 29886, 1137, 29918, 2084, 1125, 13, 1678, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 29886, 1137, 29918, 2084, 1125, 13, 4706, 282, 1137, 29918, 2176, 353, 10518, 29889, 949, 29918, 7638, 29898, 29886, 1137, 29918, 2084, 29897, 13, 4706, 2302, 353, 282, 1137, 29918, 2176, 29889, 12181, 29961, 29900, 29962, 13, 4706, 565, 2302, 2804, 349, 29965, 29943, 29918, 18736, 29901, 13, 9651, 10191, 353, 525, 29886, 1137, 29889, 12181, 29961, 29900, 29962, 353, 6571, 451, 5186, 304, 349, 29965, 29943, 29918, 18736, 353, 6571, 29915, 13, 9651, 12020, 7865, 2392, 29898, 7645, 29889, 4830, 29898, 2798, 29892, 349, 29965, 29943, 29918, 18736, 876, 13, 1678, 1683, 29901, 13, 4706, 2302, 353, 349, 29965, 29943, 29918, 18736, 13, 1678, 736, 2302, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29918, 2962, 29918, 6360, 7295, 13, 1678, 736, 349, 29965, 29943, 29918, 25826, 29918, 29979, 26441, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 1833, 29918, 6360, 7295, 13, 1678, 736, 17900, 1254, 29918, 29979, 26441, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 274, 567, 29918, 705, 5861, 29898, 1688, 29918, 2084, 1125, 13, 1678, 274, 567, 29893, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29883, 567, 29918, 19190, 29906, 29914, 29883, 567, 29918, 705, 5861, 29889, 7638, 29889, 18828, 1495, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 29883, 567, 29893, 29918, 2084, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29918, 705, 5861, 29898, 1688, 29918, 2084, 1125, 13, 1678, 282, 1137, 29893, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29886, 1137, 29918, 19190, 29906, 29914, 29886, 1137, 29918, 705, 5861, 29889, 7638, 29889, 18828, 1495, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 29886, 1137, 29893, 29918, 2084, 29897, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 274, 567, 29918, 29878, 2219, 359, 29898, 1688, 29918, 2084, 1125, 13, 1678, 396, 274, 567, 29878, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29883, 567, 29918, 19190, 29941, 29914, 29883, 567, 29918, 29878, 2219, 359, 29889, 7638, 1495, 13, 1678, 396, 736, 10518, 29889, 949, 29918, 7638, 29898, 29883, 567, 29878, 29918, 2084, 29892, 2380, 29918, 1054, 29922, 29900, 29897, 13, 1678, 736, 6213, 13, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 2433, 7924, 1495, 13, 1753, 282, 1137, 29918, 29878, 2219, 359, 29898, 1688, 29918, 2084, 1125, 13, 1678, 282, 1137, 29878, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1688, 29918, 2084, 29892, 525, 6995, 29886, 1137, 29918, 19190, 29941, 29914, 29886, 1137, 29918, 29878, 2219, 359, 29889, 7638, 1495, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 29886, 1137, 29878, 29918, 2084, 29892, 2380, 29918, 1054, 29922, 29900, 29897, 13, 2 ]
cli_helpers/templates/bin/renamer.py
ppreeper/ansible_roles
0
108602
<reponame>ppreeper/ansible_roles #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import eyed3 import argparse import re us = re.compile(r' ') sq = re.compile(r"'") dq = re.compile(r'""') ex = re.compile(r"!") colon = re.compile(r":") semicolon = re.compile(r";") question = re.compile(r'\?') parser = argparse.ArgumentParser() parser.add_argument("filename") args = parser.parse_args() audiofile = eyed3.load(args.filename) track_num = "%02d" % audiofile.tag.track_num[0] disc_num = "%02d" % audiofile.tag.disc_num[0] # print(disc_num) title = us.sub('_', audiofile.tag.title) title = sq.sub('', title) title = dq.sub('', title) title = ex.sub('', title) title = colon.sub('', title) title = semicolon.sub('', title) title = question.sub('', title) print("%s-%s.mp3" % (track_num, title)) new_filename = "{0}-{1}.mp3".format(track_num, title) os.rename(args.filename, new_filename)
[ 1, 529, 276, 1112, 420, 29958, 407, 929, 546, 29914, 550, 1821, 29918, 307, 793, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 2897, 13, 5215, 321, 28133, 29941, 13, 5215, 1852, 5510, 13, 5215, 337, 13, 13, 375, 353, 337, 29889, 12198, 29898, 29878, 29915, 25710, 13, 3044, 353, 337, 29889, 12198, 29898, 29878, 29908, 29915, 1159, 13, 29881, 29939, 353, 337, 29889, 12198, 29898, 29878, 11838, 29908, 1495, 13, 735, 353, 337, 29889, 12198, 29898, 29878, 29908, 29991, 1159, 13, 17308, 353, 337, 29889, 12198, 29898, 29878, 1115, 1159, 13, 12846, 5283, 265, 353, 337, 29889, 12198, 29898, 29878, 1769, 1159, 13, 12470, 353, 337, 29889, 12198, 29898, 29878, 12764, 29973, 1495, 13, 13, 16680, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 16680, 29889, 1202, 29918, 23516, 703, 9507, 1159, 13, 13, 5085, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 18494, 1445, 353, 321, 28133, 29941, 29889, 1359, 29898, 5085, 29889, 9507, 29897, 13, 11294, 29918, 1949, 353, 11860, 29900, 29906, 29881, 29908, 1273, 10348, 1445, 29889, 4039, 29889, 11294, 29918, 1949, 29961, 29900, 29962, 13, 2218, 29883, 29918, 1949, 353, 11860, 29900, 29906, 29881, 29908, 1273, 10348, 1445, 29889, 4039, 29889, 2218, 29883, 29918, 1949, 29961, 29900, 29962, 13, 29937, 1596, 29898, 2218, 29883, 29918, 1949, 29897, 13, 3257, 353, 502, 29889, 1491, 877, 29918, 742, 10348, 1445, 29889, 4039, 29889, 3257, 29897, 13, 3257, 353, 18074, 29889, 1491, 877, 742, 3611, 29897, 13, 3257, 353, 270, 29939, 29889, 1491, 877, 742, 3611, 29897, 13, 3257, 353, 429, 29889, 1491, 877, 742, 3611, 29897, 13, 3257, 353, 8104, 29889, 1491, 877, 742, 3611, 29897, 13, 3257, 353, 3031, 5283, 265, 29889, 1491, 877, 742, 3611, 29897, 13, 3257, 353, 1139, 29889, 1491, 877, 742, 3611, 29897, 13, 2158, 11702, 29879, 19222, 29879, 29889, 1526, 29941, 29908, 1273, 313, 11294, 29918, 1949, 29892, 3611, 876, 13, 1482, 29918, 9507, 353, 29850, 29900, 7402, 29912, 29896, 1836, 1526, 29941, 1642, 4830, 29898, 11294, 29918, 1949, 29892, 3611, 29897, 13, 359, 29889, 1267, 420, 29898, 5085, 29889, 9507, 29892, 716, 29918, 9507, 29897, 13, 2 ]
user_role_mgmt/operations.py
sundarsms1975/user-role-management
0
66932
<reponame>sundarsms1975/user-role-management from accounts import User,Role import ast import json import os import sys from copy import deepcopy # Operation List presented when the main program execution starts def choice_list(): print('\n Choose the operation you would like to perform on User & Role List') print(' 1. Load User List from INPUT file ') print(' 2. Load Role List from INPUT file ') print(' 3. Show Subordinates defined under a Role ID') print(' 4. Add a new Role to List ') print(' 5. Add a new User to List ') print(' 6. Remove a role from List ') print(' 7. Remove a user from List ') print(' 8. Show Users with role definition ') print(' 9. Show Subordinates with role details defined under a Role ID ') print(' 10. Show Users belongs to a Role_ID ') print(' 11. Show Users belongs to a Parent_ID') print(' 12. Show Roles belongs to a Particular Parent_ID') print(' 14. Exit ') print('\n') # Function loads User list from INPUT FILE and returns a list of dictionary objects def getUserFromFile(filename): try: with open(filename) as f: s = f.read() users = ast.literal_eval(s) except OSError as err: print("OS error: {0}".format(err)) except: print("Unexpected error:", sys.exc_info()[0]) return users # Function loads Roles list from INPUT FILE and returns a list of dictionary objects def getRoleFromFile(filename): try: with open(filename) as f: s = f.read() roles = ast.literal_eval(s) except OSError as err: print("OS error: {0}".format(err)) except: print("Unexpected error:", sys.exc_info()[0]) return roles # Function to fetch subordinates defined under a particular Role ID def getSubordinates(roleid,userList): filteredUsers = [user for user in userList if int(user["Role"]) > int(roleid) ] return filteredUsers # Function checks whether a Role exist in the current List def isRoleExist(role_id,roles): for r in roles: if int(role_id) == int(r["Id"]): return True # Function checks whether Role to be added exists in the list before adding a Role to the List def addRoleToList(role,roleList): try: if not isRoleExist(role.role_id,roleList): roleList.append({"Id":role.role_id,"Name":role.role_name,"Parent":role.parent_id}) del role else: print("Role_ID found in the new User object") except OSError as err: print("OS error: {0}".format(err)) except: print("Unexpected error:", sys.exc_info()[0]) return roleList # Function checks the role to be deleted before removing it def removeRole(role_id,roleList): if not isRoleExist(role_id,roleList): print("Role ID supplied does not exist") try: for i in range(len(roleList)): if int(roleList[i]["Id"]) == int(role_id): del roleList[i] break except: print("Unexpected error:", sys.exc_info()[0]) # Function checks the role before adding a user to a particular role. def addUserToList(user,userList,roleList): try: if isRoleExist(user.roleId,roleList): userList.append({"Id":user.user_id,"Name":user.username,"Role":user.roleId}) del user else: print("Role_ID not found in the new User object, please add the role and add the user again") except OSError as err: print("OS error: {0}".format(err)) except: print("Unexpected error:", sys.exc_info()[0]) return userList # Function checks whether a User exists def isUserExist(user_id,users): for user in users: if int(user_id) == int(user["Id"]): return True # Function checks whether the user exits in the list before deleting it def removeUser(user_id,userList): if not isUserExist(user_id,userList): print("User ID supplied does not exist") try: for i in range(len(userList)): if int(userList[i]["Id"]) == int(user_id): del userList[i] break except: print("Unexpected error:", sys.exc_info()[0]) def lineDecorator(ichar): print(ichar*120) #Get subordinates based on role_id def getSubOrdinates(role_id,users): filteredUsers = [user for user in users if int(user["Role"]) > int(role_id) ] return filteredUsers #Get user based on user_id def getUser(user_id,users): filteredUsers = [user for user in users if int(user["Id"]) == int(user_id) ] return filteredUsers # Decorator funtion def linespacing(): print("\n") # Function to flatten User and Role, produces a combined list # A single list user and role details in one record def flattenUserRole(userList,roleList): userList_c = deepcopy(userList) for user in userList_c: for role in roleList: if user["Role"] == role["Id"]: user.update({"role_name":role["Name"],"parent_id":role["Parent"]}) return userList_c # Function to output a Role or User List in a nice JSON format def dispResult(output_list): lineDecorator("*") print(json.dumps(output_list,indent=2)) lineDecorator("*") #Spacing function as decorator linespacing() # Function to filter subordinates defined under a particular role. def outputResult(id,output_list): lineDecorator("*") print(json.dumps(getSubOrdinates(id,output_list),indent=2)) lineDecorator("*") #Spacing function as decorator linespacing() # Screen clear function, based on the OS type, it automatically chooses the command # to clear the screen def clear(): _ = os.system('clear' if os.name =='posix' else 'cls') # Pause function waits until user hits ENTER button to move the main Menu def hitContine(): input('Hit Enter to continue') # Function to update changes back to User and Role definition INPUT files # Next run of this program of picks up the latest changes as the starting List of Roles def dumpListsToFile(Lists,filename): try: with open(filename,'w+') as f: json.dump(Lists,f,indent=2) except OSError as err: print("OS error: {0}".format(err)) except: print("Unexpected error:", sys.exc_info()[0]) #Get subordinates based on role_id def getUserListForRoleId(role_id,users): filteredUsers = [user for user in users if int(user["Role"]) == int(role_id) ] return filteredUsers #Get All users belongs to a particular parent_id def getListForParentID(parent_id,users): filteredUsers = [user for user in users if int(user["parent_id"]) == int(parent_id) ] return filteredUsers # Get all roles belongs to a particular parent_id def getRolesListForParentID(parent_id,roles): filteredRoles = [role for role in roles if int(role["Parent"]) == int(parent_id) ] return filteredRoles # The below functions are defined as decorator to output the result.s def outputUserList_forRoleId(id,output_list): lineDecorator("*") print(json.dumps(getUserListForRoleId(id,output_list),indent=2)) lineDecorator("*") #Spacing function as decorator linespacing() def outputUserList_forParentId(id,output_list): lineDecorator("*") print(json.dumps(getListForParentID(id,output_list),indent=2)) lineDecorator("*") #Spacing function as decorator linespacing() def outputRolesList_forParentId(parent_id,roles): lineDecorator("*") print(json.dumps(getRolesListForParentID(parent_id,roles),indent=2)) lineDecorator("*") #Spacing function as decorator linespacing()
[ 1, 529, 276, 1112, 420, 29958, 29879, 870, 1503, 1516, 29896, 29929, 29955, 29945, 29914, 1792, 29899, 12154, 29899, 21895, 13, 3166, 15303, 1053, 4911, 29892, 16727, 13, 5215, 8717, 13, 5215, 4390, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 3509, 1053, 6483, 8552, 13, 13, 29937, 20462, 2391, 9132, 746, 278, 1667, 1824, 8225, 8665, 13, 1753, 7348, 29918, 1761, 7295, 13, 1678, 1596, 28909, 29876, 14542, 852, 278, 5858, 366, 723, 763, 304, 2189, 373, 4911, 669, 1528, 280, 2391, 1495, 13, 1678, 1596, 877, 462, 29896, 29889, 16012, 4911, 2391, 515, 2672, 12336, 934, 25710, 13, 1678, 1596, 877, 462, 29906, 29889, 16012, 1528, 280, 2391, 515, 2672, 12336, 934, 25710, 13, 1678, 1596, 877, 462, 29941, 29889, 7704, 3323, 24266, 3342, 1090, 263, 1528, 280, 3553, 1495, 13, 1678, 1596, 877, 462, 29946, 29889, 3462, 263, 716, 1528, 280, 304, 2391, 25710, 13, 1678, 1596, 877, 462, 29945, 29889, 3462, 263, 716, 4911, 304, 2391, 25710, 13, 1678, 1596, 877, 462, 29953, 29889, 15154, 263, 6297, 515, 2391, 25710, 13, 1678, 1596, 877, 462, 29955, 29889, 15154, 263, 1404, 515, 2391, 25710, 13, 1678, 1596, 877, 462, 29947, 29889, 7704, 23861, 411, 6297, 5023, 25710, 13, 1678, 1596, 877, 462, 29929, 29889, 7704, 3323, 24266, 411, 6297, 4902, 3342, 1090, 263, 1528, 280, 3553, 29871, 25710, 13, 1678, 1596, 877, 18884, 29896, 29900, 29889, 7704, 23861, 14393, 304, 263, 1528, 280, 29918, 1367, 25710, 13, 1678, 1596, 877, 18884, 29896, 29896, 29889, 7704, 23861, 14393, 304, 263, 22280, 29918, 1367, 1495, 13, 1678, 1596, 877, 18884, 29896, 29906, 29889, 7704, 390, 6544, 14393, 304, 263, 3455, 16311, 22280, 29918, 1367, 1495, 13, 1678, 1596, 877, 18884, 29896, 29946, 29889, 25954, 25710, 13, 1678, 1596, 28909, 29876, 1495, 13, 29937, 6680, 15376, 4911, 1051, 515, 2672, 12336, 24080, 322, 3639, 263, 1051, 310, 8600, 3618, 13, 1753, 679, 2659, 4591, 2283, 29898, 9507, 1125, 13, 1678, 1018, 29901, 13, 4706, 411, 1722, 29898, 9507, 29897, 408, 285, 29901, 13, 9651, 269, 353, 285, 29889, 949, 580, 13, 9651, 4160, 353, 8717, 29889, 20889, 284, 29918, 14513, 29898, 29879, 29897, 13, 1678, 5174, 438, 29173, 408, 4589, 29901, 13, 4706, 1596, 703, 3267, 1059, 29901, 426, 29900, 29913, 1642, 4830, 29898, 3127, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 13, 1678, 736, 4160, 13, 13, 29937, 6680, 15376, 390, 6544, 1051, 515, 2672, 12336, 24080, 322, 3639, 263, 1051, 310, 8600, 3618, 13, 1753, 679, 16727, 4591, 2283, 29898, 9507, 1125, 13, 1678, 1018, 29901, 13, 4706, 411, 1722, 29898, 9507, 29897, 408, 285, 29901, 13, 9651, 269, 353, 285, 29889, 949, 580, 13, 9651, 16178, 353, 8717, 29889, 20889, 284, 29918, 14513, 29898, 29879, 29897, 13, 1678, 5174, 438, 29173, 408, 4589, 29901, 13, 4706, 1596, 703, 3267, 1059, 29901, 426, 29900, 29913, 1642, 4830, 29898, 3127, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 13, 1678, 736, 16178, 13, 13, 29937, 6680, 304, 6699, 1014, 24266, 3342, 1090, 263, 3153, 1528, 280, 3553, 13, 1753, 679, 4035, 24266, 29898, 12154, 333, 29892, 1792, 1293, 1125, 13, 1678, 22289, 5959, 353, 518, 1792, 363, 1404, 297, 1404, 1293, 565, 938, 29898, 1792, 3366, 16727, 20068, 1405, 938, 29898, 12154, 333, 29897, 4514, 13, 1678, 736, 22289, 5959, 13, 13, 29937, 6680, 12747, 3692, 263, 1528, 280, 1863, 297, 278, 1857, 2391, 13, 1753, 338, 16727, 1252, 391, 29898, 12154, 29918, 333, 29892, 307, 793, 1125, 13, 1678, 363, 364, 297, 16178, 29901, 13, 4706, 565, 938, 29898, 12154, 29918, 333, 29897, 1275, 938, 29898, 29878, 3366, 1204, 3108, 1125, 13, 9651, 736, 5852, 1678, 13, 13, 29937, 6680, 12747, 3692, 1528, 280, 304, 367, 2715, 4864, 297, 278, 1051, 1434, 4417, 263, 1528, 280, 304, 278, 2391, 29871, 13, 1753, 788, 16727, 21254, 29898, 12154, 29892, 12154, 1293, 1125, 13, 1678, 1018, 29901, 13, 4706, 565, 451, 338, 16727, 1252, 391, 29898, 12154, 29889, 12154, 29918, 333, 29892, 12154, 1293, 1125, 13, 9651, 6297, 1293, 29889, 4397, 3319, 29908, 1204, 1115, 12154, 29889, 12154, 29918, 333, 1699, 1170, 1115, 12154, 29889, 12154, 29918, 978, 1699, 9780, 1115, 12154, 29889, 3560, 29918, 333, 1800, 13, 9651, 628, 6297, 13, 4706, 1683, 29901, 13, 9651, 1596, 703, 16727, 29918, 1367, 1476, 297, 278, 716, 4911, 1203, 1159, 13, 1678, 5174, 438, 29173, 408, 4589, 29901, 13, 4706, 1596, 703, 3267, 1059, 29901, 426, 29900, 29913, 1642, 4830, 29898, 3127, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 268, 13, 1678, 736, 6297, 1293, 13, 13, 29937, 6680, 12747, 278, 6297, 304, 367, 11132, 1434, 11077, 372, 13, 1753, 3349, 16727, 29898, 12154, 29918, 333, 29892, 12154, 1293, 1125, 13, 1678, 565, 451, 338, 16727, 1252, 391, 29898, 12154, 29918, 333, 29892, 12154, 1293, 1125, 13, 4706, 1596, 703, 16727, 3553, 19056, 947, 451, 1863, 1159, 29871, 13, 1678, 1018, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 12154, 1293, 22164, 13, 9651, 565, 938, 29898, 12154, 1293, 29961, 29875, 29962, 3366, 1204, 20068, 1275, 938, 29898, 12154, 29918, 333, 1125, 13, 18884, 628, 6297, 1293, 29961, 29875, 29962, 418, 13, 18884, 2867, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 13, 29937, 6680, 12747, 278, 6297, 1434, 4417, 263, 1404, 304, 263, 3153, 6297, 29889, 13, 1753, 788, 2659, 21254, 29898, 1792, 29892, 1792, 1293, 29892, 12154, 1293, 1125, 13, 1678, 1018, 29901, 13, 4706, 565, 338, 16727, 1252, 391, 29898, 1792, 29889, 12154, 1204, 29892, 12154, 1293, 1125, 13, 9651, 1404, 1293, 29889, 4397, 3319, 29908, 1204, 1115, 1792, 29889, 1792, 29918, 333, 1699, 1170, 1115, 1792, 29889, 6786, 1699, 16727, 1115, 1792, 29889, 12154, 1204, 1800, 13, 9651, 628, 1404, 13, 4706, 1683, 29901, 13, 9651, 1596, 703, 16727, 29918, 1367, 451, 1476, 297, 278, 716, 4911, 1203, 29892, 3113, 788, 278, 6297, 322, 788, 278, 1404, 1449, 1159, 13, 1678, 5174, 438, 29173, 408, 4589, 29901, 13, 4706, 1596, 703, 3267, 1059, 29901, 426, 29900, 29913, 1642, 4830, 29898, 3127, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 268, 13, 1678, 736, 1404, 1293, 13, 13, 29937, 6680, 12747, 3692, 263, 4911, 4864, 13, 1753, 338, 2659, 1252, 391, 29898, 1792, 29918, 333, 29892, 7193, 1125, 13, 1678, 363, 1404, 297, 4160, 29901, 13, 4706, 565, 938, 29898, 1792, 29918, 333, 29897, 1275, 938, 29898, 1792, 3366, 1204, 3108, 1125, 13, 9651, 736, 5852, 13, 13, 29937, 6680, 12747, 3692, 278, 1404, 429, 1169, 297, 278, 1051, 1434, 21228, 372, 9651, 13, 1753, 3349, 2659, 29898, 1792, 29918, 333, 29892, 1792, 1293, 1125, 13, 1678, 565, 451, 338, 2659, 1252, 391, 29898, 1792, 29918, 333, 29892, 1792, 1293, 1125, 13, 4706, 1596, 703, 2659, 3553, 19056, 947, 451, 1863, 1159, 29871, 13, 308, 13, 1678, 1018, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1792, 1293, 22164, 13, 9651, 565, 938, 29898, 1792, 1293, 29961, 29875, 29962, 3366, 1204, 20068, 1275, 938, 29898, 1792, 29918, 333, 1125, 13, 18884, 628, 1404, 1293, 29961, 29875, 29962, 418, 13, 18884, 2867, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 13, 1753, 1196, 6185, 272, 1061, 29898, 436, 279, 1125, 13, 1678, 1596, 29898, 436, 279, 29930, 29896, 29906, 29900, 29897, 13, 13, 29937, 2577, 1014, 24266, 2729, 373, 6297, 29918, 333, 13, 1753, 679, 4035, 23302, 262, 1078, 29898, 12154, 29918, 333, 29892, 7193, 1125, 13, 1678, 22289, 5959, 353, 518, 1792, 363, 1404, 297, 4160, 565, 938, 29898, 1792, 3366, 16727, 20068, 1405, 938, 29898, 12154, 29918, 333, 29897, 4514, 13, 1678, 736, 22289, 5959, 13, 13, 13, 29937, 2577, 1404, 2729, 373, 1404, 29918, 333, 13, 1753, 679, 2659, 29898, 1792, 29918, 333, 29892, 7193, 1125, 13, 1678, 22289, 5959, 353, 518, 1792, 363, 1404, 297, 4160, 565, 938, 29898, 1792, 3366, 1204, 20068, 1275, 938, 29898, 1792, 29918, 333, 29897, 4514, 13, 1678, 736, 22289, 5959, 13, 13, 29937, 3826, 272, 1061, 285, 1657, 291, 13, 1753, 3454, 29886, 9390, 7295, 13, 1678, 1596, 14182, 29876, 1159, 13, 13, 29937, 6680, 304, 1652, 8606, 4911, 322, 1528, 280, 29892, 13880, 263, 12420, 1051, 13, 29937, 319, 2323, 1051, 1404, 322, 6297, 4902, 297, 697, 2407, 13, 1753, 1652, 8606, 2659, 16727, 29898, 1792, 1293, 29892, 12154, 1293, 1125, 13, 1678, 1404, 1293, 29918, 29883, 353, 6483, 8552, 29898, 1792, 1293, 29897, 13, 1678, 363, 1404, 297, 1404, 1293, 29918, 29883, 29901, 13, 4706, 363, 6297, 297, 6297, 1293, 29901, 13, 9651, 565, 1404, 3366, 16727, 3108, 1275, 6297, 3366, 1204, 3108, 29901, 13, 18884, 1404, 29889, 5504, 3319, 29908, 12154, 29918, 978, 1115, 12154, 3366, 1170, 12436, 29908, 3560, 29918, 333, 1115, 12154, 3366, 9780, 3108, 1800, 13, 1678, 736, 1404, 1293, 29918, 29883, 13, 13, 29937, 6680, 304, 1962, 263, 1528, 280, 470, 4911, 2391, 297, 263, 7575, 4663, 3402, 13, 1753, 12272, 3591, 29898, 4905, 29918, 1761, 1125, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 4905, 29918, 1761, 29892, 12860, 29922, 29906, 876, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 396, 5592, 9390, 740, 408, 10200, 1061, 13, 1678, 3454, 29886, 9390, 580, 29871, 13, 13, 29937, 6680, 304, 4175, 1014, 24266, 3342, 1090, 263, 3153, 6297, 29889, 13, 1753, 1962, 3591, 29898, 333, 29892, 4905, 29918, 1761, 1125, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 657, 4035, 23302, 262, 1078, 29898, 333, 29892, 4905, 29918, 1761, 511, 12860, 29922, 29906, 876, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 396, 5592, 9390, 740, 408, 10200, 1061, 13, 1678, 3454, 29886, 9390, 580, 29871, 13, 13, 29937, 22666, 2821, 740, 29892, 2729, 373, 278, 6570, 1134, 29892, 372, 6336, 3060, 15806, 278, 1899, 13, 29937, 304, 2821, 278, 4315, 13, 1753, 2821, 7295, 13, 1678, 903, 353, 2897, 29889, 5205, 877, 8551, 29915, 565, 2897, 29889, 978, 1275, 29915, 1066, 861, 29915, 1683, 525, 25932, 1495, 13, 13, 29937, 349, 1071, 740, 11324, 1169, 2745, 1404, 19572, 12524, 4945, 2826, 304, 4337, 278, 1667, 20019, 13, 1753, 7124, 1323, 457, 7295, 13, 1678, 1881, 877, 29950, 277, 9041, 304, 6773, 1495, 13, 13, 29937, 6680, 304, 2767, 3620, 1250, 304, 4911, 322, 1528, 280, 5023, 2672, 12336, 2066, 13, 29937, 8084, 1065, 310, 445, 1824, 310, 5839, 29879, 701, 278, 9281, 3620, 408, 278, 6257, 2391, 310, 390, 6544, 13, 1753, 16766, 1293, 29879, 1762, 2283, 29898, 1293, 29879, 29892, 9507, 1125, 13, 1678, 1018, 29901, 13, 4706, 411, 1722, 29898, 9507, 5501, 29893, 29974, 1495, 408, 285, 29901, 13, 9651, 4390, 29889, 15070, 29898, 1293, 29879, 29892, 29888, 29892, 12860, 29922, 29906, 29897, 13, 1678, 5174, 438, 29173, 408, 4589, 29901, 13, 4706, 1596, 703, 3267, 1059, 29901, 426, 29900, 29913, 1642, 4830, 29898, 3127, 876, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 29965, 13996, 6021, 1059, 29901, 613, 10876, 29889, 735, 29883, 29918, 3888, 580, 29961, 29900, 2314, 13, 13, 29937, 2577, 1014, 24266, 2729, 373, 6297, 29918, 333, 13, 1753, 679, 2659, 1293, 2831, 16727, 1204, 29898, 12154, 29918, 333, 29892, 7193, 1125, 13, 1678, 22289, 5959, 353, 518, 1792, 363, 1404, 297, 4160, 565, 938, 29898, 1792, 3366, 16727, 20068, 1275, 938, 29898, 12154, 29918, 333, 29897, 4514, 13, 1678, 736, 22289, 5959, 13, 13, 29937, 2577, 2178, 4160, 14393, 304, 263, 3153, 3847, 29918, 333, 13, 1753, 679, 1293, 2831, 9780, 1367, 29898, 3560, 29918, 333, 29892, 7193, 1125, 13, 1678, 22289, 5959, 353, 518, 1792, 363, 1404, 297, 4160, 565, 938, 29898, 1792, 3366, 3560, 29918, 333, 20068, 1275, 938, 29898, 3560, 29918, 333, 29897, 4514, 13, 1678, 736, 22289, 5959, 13, 13, 29937, 3617, 599, 16178, 14393, 304, 263, 3153, 3847, 29918, 333, 13, 1753, 679, 29934, 6544, 1293, 2831, 9780, 1367, 29898, 3560, 29918, 333, 29892, 307, 793, 1125, 13, 1678, 22289, 29934, 6544, 353, 518, 12154, 363, 6297, 297, 16178, 565, 938, 29898, 12154, 3366, 9780, 20068, 1275, 938, 29898, 3560, 29918, 333, 29897, 4514, 13, 1678, 736, 22289, 29934, 6544, 13, 13, 29937, 450, 2400, 3168, 526, 3342, 408, 10200, 1061, 304, 1962, 278, 1121, 29889, 29879, 13, 1753, 1962, 2659, 1293, 29918, 1454, 16727, 1204, 29898, 333, 29892, 4905, 29918, 1761, 1125, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 657, 2659, 1293, 2831, 16727, 1204, 29898, 333, 29892, 4905, 29918, 1761, 511, 12860, 29922, 29906, 876, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 396, 5592, 9390, 740, 408, 10200, 1061, 13, 1678, 3454, 29886, 9390, 580, 29871, 13, 13, 1753, 1962, 2659, 1293, 29918, 1454, 9780, 1204, 29898, 333, 29892, 4905, 29918, 1761, 1125, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 657, 1293, 2831, 9780, 1367, 29898, 333, 29892, 4905, 29918, 1761, 511, 12860, 29922, 29906, 876, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 396, 5592, 9390, 740, 408, 10200, 1061, 13, 1678, 3454, 29886, 9390, 580, 29871, 13, 13, 1753, 1962, 29934, 6544, 1293, 29918, 1454, 9780, 1204, 29898, 3560, 29918, 333, 29892, 307, 793, 1125, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 657, 29934, 6544, 1293, 2831, 9780, 1367, 29898, 3560, 29918, 333, 29892, 307, 793, 511, 12860, 29922, 29906, 876, 13, 1678, 1196, 6185, 272, 1061, 703, 29930, 1159, 13, 1678, 396, 5592, 9390, 740, 408, 10200, 1061, 13, 1678, 3454, 29886, 9390, 580, 29871, 2 ]
scripts/featuresFromIntermediates.py
mkalte666/sdl2wrap
0
174968
import sys import re ignoreList = [ ".*_h_$", "^SDL_test.*", "^SDLTest_.*", "SDLCALL", "^SDL_$", ".*_$", "SDL_INLINE", "^SDL$", "^SDL_Read.*$", "^SDL_Write.*$", ] class ImplInfo: def __init__(self): self.implemented = "NO" self.implName = "" self.comment = "" if len(sys.argv) != 5: print("do not use this directly!!!") def calcCoverage(knownSymbols): count = len(knownSymbols) countYes = 0 for key in knownSymbols: value = knownSymbols[key] if value.implemented != "NO": countYes+=1 return "%.2f %% (%d/%d)" % (float(countYes)/float(count)*100.0, countYes, count) wrapImplName = sys.argv[1] wrapWontfixName = sys.argv[2] sdlGrepName = sys.argv[3] outfileName = sys.argv[4] wrapImplFile = open(wrapImplName, "r").read().splitlines(False) wrapWontfixFile = open(wrapWontfixName, "r").read().splitlines(False) sdlGrepFile = open(sdlGrepName, "r").read().splitlines(False) knownSymbols = {} for name in sdlGrepFile: needIgnore = False for ignore in ignoreList: if re.match(rf"{ignore}", name): needIgnore = True break if needIgnore: continue knownSymbols[name] = ImplInfo() for line in wrapImplFile: parts = line.split(" ", 2) what = parts[0] info = ImplInfo() info.implemented = "YES" if len(parts) > 1: info.implName = parts[1] if len(parts) > 2: info.comment = parts[2] knownSymbols[what] = info for line in wrapWontfixFile: parts = line.split(" ", 1) what = parts[0] info = ImplInfo() info.implemented = "WONTFIX" if len(parts) > 1: info.comment = parts[1] knownSymbols[what] = info outfile = open(outfileName, "w") outfile.write("This list is generated and might not be reflect the truth to 100%\n") outfile.write("Estimated coverage: %s\n" % calcCoverage(knownSymbols)) outfile.write("\n") outfile.write("| SDL Symbol | Implemented? | New Name | Comment |\n") outfile.write("| ---------- | ------------ | -------- | ------- |\n") for key in sorted(knownSymbols): info = knownSymbols[key] line = "| {} | {} | {} | {} |\n".format(key, info.implemented, info.implName, info.comment) outfile.write(line) outfile.close()
[ 1, 1053, 10876, 13, 5215, 337, 13, 13, 17281, 1293, 353, 518, 13, 1678, 376, 5575, 29918, 29882, 29918, 29938, 613, 13, 1678, 13898, 7230, 29931, 29918, 1688, 5575, 613, 13, 1678, 13898, 7230, 29931, 3057, 5396, 29930, 613, 13, 1678, 376, 7230, 12182, 9818, 613, 13, 1678, 13898, 7230, 29931, 29918, 29938, 613, 13, 1678, 376, 5575, 29918, 29938, 613, 13, 1678, 376, 7230, 29931, 29918, 1177, 18521, 613, 13, 1678, 13898, 7230, 29931, 29938, 613, 13, 1678, 13898, 7230, 29931, 29918, 6359, 5575, 29938, 613, 13, 1678, 13898, 7230, 29931, 29918, 6113, 5575, 29938, 613, 13, 29962, 13, 13, 1990, 1954, 572, 3401, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 326, 2037, 287, 353, 376, 6632, 29908, 13, 4706, 1583, 29889, 13699, 1170, 353, 5124, 13, 4706, 1583, 29889, 9342, 353, 5124, 13, 13, 361, 7431, 29898, 9675, 29889, 19218, 29897, 2804, 29871, 29945, 29901, 13, 1678, 1596, 703, 1867, 451, 671, 445, 4153, 21004, 1159, 13, 13, 1753, 22235, 29907, 957, 482, 29898, 5203, 14730, 29879, 1125, 13, 1678, 2302, 353, 7431, 29898, 5203, 14730, 29879, 29897, 13, 1678, 2302, 8241, 353, 29871, 29900, 13, 1678, 363, 1820, 297, 2998, 14730, 29879, 29901, 13, 4706, 995, 353, 2998, 14730, 29879, 29961, 1989, 29962, 13, 4706, 565, 995, 29889, 326, 2037, 287, 2804, 376, 6632, 1115, 13, 9651, 2302, 8241, 23661, 29896, 13, 13, 1678, 736, 11860, 29889, 29906, 29888, 17806, 313, 29995, 29881, 22584, 29881, 5513, 1273, 313, 7411, 29898, 2798, 8241, 6802, 7411, 29898, 2798, 11877, 29896, 29900, 29900, 29889, 29900, 29892, 2302, 8241, 29892, 2302, 29897, 13, 13, 6312, 6647, 1170, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 6312, 29956, 609, 5878, 1170, 353, 10876, 29889, 19218, 29961, 29906, 29962, 13, 29222, 29954, 3445, 1170, 353, 10876, 29889, 19218, 29961, 29941, 29962, 13, 449, 28926, 353, 10876, 29889, 19218, 29961, 29946, 29962, 13, 13, 6312, 6647, 2283, 353, 1722, 29898, 6312, 6647, 1170, 29892, 376, 29878, 2564, 949, 2141, 5451, 9012, 29898, 8824, 29897, 13, 6312, 29956, 609, 5878, 2283, 353, 1722, 29898, 6312, 29956, 609, 5878, 1170, 29892, 376, 29878, 2564, 949, 2141, 5451, 9012, 29898, 8824, 29897, 13, 29222, 29954, 3445, 2283, 353, 1722, 29898, 29222, 29954, 3445, 1170, 29892, 376, 29878, 2564, 949, 2141, 5451, 9012, 29898, 8824, 29897, 13, 13, 5203, 14730, 29879, 353, 6571, 13, 1454, 1024, 297, 269, 11671, 29954, 3445, 2283, 29901, 13, 1678, 817, 23805, 353, 7700, 13, 1678, 363, 11455, 297, 11455, 1293, 29901, 13, 4706, 565, 337, 29889, 4352, 29898, 9600, 29908, 29912, 17281, 17671, 1024, 1125, 13, 9651, 817, 23805, 353, 5852, 13, 9651, 2867, 13, 1678, 565, 817, 23805, 29901, 13, 4706, 6773, 13, 1678, 2998, 14730, 29879, 29961, 978, 29962, 353, 1954, 572, 3401, 580, 13, 13, 1454, 1196, 297, 12244, 6647, 2283, 29901, 13, 1678, 5633, 353, 1196, 29889, 5451, 703, 9162, 29871, 29906, 29897, 13, 1678, 825, 353, 5633, 29961, 29900, 29962, 13, 1678, 5235, 353, 1954, 572, 3401, 580, 13, 1678, 5235, 29889, 326, 2037, 287, 353, 376, 21143, 29908, 13, 1678, 565, 7431, 29898, 20895, 29897, 1405, 29871, 29896, 29901, 13, 4706, 5235, 29889, 13699, 1170, 353, 5633, 29961, 29896, 29962, 13, 4706, 565, 7431, 29898, 20895, 29897, 1405, 29871, 29906, 29901, 13, 9651, 5235, 29889, 9342, 353, 5633, 29961, 29906, 29962, 13, 1678, 2998, 14730, 29879, 29961, 5816, 29962, 353, 5235, 13, 13, 1454, 1196, 297, 12244, 29956, 609, 5878, 2283, 29901, 13, 1678, 5633, 353, 1196, 29889, 5451, 703, 9162, 29871, 29896, 29897, 13, 1678, 825, 353, 5633, 29961, 29900, 29962, 13, 1678, 5235, 353, 1954, 572, 3401, 580, 13, 1678, 5235, 29889, 326, 2037, 287, 353, 376, 29956, 1164, 29911, 25634, 29908, 13, 1678, 565, 7431, 29898, 20895, 29897, 1405, 29871, 29896, 29901, 13, 4706, 5235, 29889, 9342, 353, 5633, 29961, 29896, 29962, 13, 1678, 2998, 14730, 29879, 29961, 5816, 29962, 353, 5235, 13, 13, 449, 1445, 353, 1722, 29898, 449, 28926, 29892, 376, 29893, 1159, 13, 449, 1445, 29889, 3539, 703, 4013, 1051, 338, 5759, 322, 1795, 451, 367, 9432, 278, 8760, 304, 29871, 29896, 29900, 29900, 29995, 29905, 29876, 1159, 13, 449, 1445, 29889, 3539, 703, 12787, 326, 630, 23746, 29901, 1273, 29879, 29905, 29876, 29908, 1273, 22235, 29907, 957, 482, 29898, 5203, 14730, 29879, 876, 13, 449, 1445, 29889, 3539, 14182, 29876, 1159, 13, 449, 1445, 29889, 3539, 703, 29989, 8073, 29931, 23858, 891, 1954, 2037, 287, 29973, 891, 1570, 4408, 891, 461, 18283, 29876, 1159, 13, 449, 1445, 29889, 3539, 703, 29989, 448, 1378, 29899, 891, 448, 1378, 5634, 891, 448, 26589, 891, 448, 22158, 18283, 29876, 1159, 13, 13, 1454, 1820, 297, 12705, 29898, 5203, 14730, 29879, 1125, 13, 1678, 5235, 353, 2998, 14730, 29879, 29961, 1989, 29962, 13, 1678, 1196, 353, 376, 29989, 6571, 891, 6571, 891, 6571, 891, 6571, 18283, 29876, 1642, 4830, 29898, 1989, 29892, 5235, 29889, 326, 2037, 287, 29892, 5235, 29889, 13699, 1170, 29892, 5235, 29889, 9342, 29897, 13, 1678, 714, 1445, 29889, 3539, 29898, 1220, 29897, 13, 13, 449, 1445, 29889, 5358, 580, 2 ]
examples/examples_interceptor.py
hatamiarash7/PacketTracer
3
126791
""" Interceptor example using ICMP Requirements: iptables -I INPUT 1 -p icmp -j NFQUEUE --queue-balance 0:2 """ import time from packetracer import interceptor from packetracer.layer3 import ip, icmp # Add iptables rule: # iptables -I INPUT 1 -p icmp -j NFQUEUE --queue-balance 0:2 # ICMP Echo request intercepting def verdict_cb(ll_data, ll_proto_id, data, ctx): ip1 = ip.IP(data) icmp1 = ip1[icmp.ICMP] if icmp1 is None or icmp1.type != icmp.ICMP_TYPE_ECHO_REQ: return data, interceptor.NF_ACCEPT echo1 = icmp1[icmp.ICMP.Echo] if echo1 is None: return data, interceptor.NF_ACCEPT pp_bts = b"PACKETRACER" print("changing ICMP echo request packet") echo1.body_bytes = echo1.body_bytes[:len(pp_bts)] + pp_bts return ip1.bin(), interceptor.NF_ACCEPT ictor = interceptor.Interceptor() ictor.start(verdict_cb, queue_ids=[0, 1, 2]) try: time.sleep(999) except KeyboardInterrupt: pass ictor.stop()
[ 1, 9995, 13, 24923, 1342, 773, 18340, 3580, 13, 13, 1123, 1548, 1860, 29901, 13, 21278, 1849, 448, 29902, 2672, 12336, 29871, 29896, 448, 29886, 16077, 1526, 448, 29926, 405, 29943, 11144, 4462, 1192, 9990, 29899, 5521, 749, 29871, 29900, 29901, 29906, 13, 15945, 29908, 13, 5215, 931, 13, 13, 3166, 18203, 945, 261, 1053, 1006, 14268, 13, 3166, 18203, 945, 261, 29889, 13148, 29941, 1053, 10377, 29892, 16077, 1526, 13, 13, 13, 29937, 3462, 474, 415, 1849, 5751, 29901, 13, 29937, 474, 415, 1849, 448, 29902, 2672, 12336, 29871, 29896, 448, 29886, 16077, 1526, 448, 29926, 405, 29943, 11144, 4462, 1192, 9990, 29899, 5521, 749, 29871, 29900, 29901, 29906, 13, 13, 13, 29937, 18340, 3580, 382, 1859, 2009, 23404, 292, 13, 1753, 1147, 8977, 29918, 10702, 29898, 645, 29918, 1272, 29892, 11148, 29918, 17529, 29918, 333, 29892, 848, 29892, 12893, 1125, 13, 1678, 10377, 29896, 353, 10377, 29889, 5690, 29898, 1272, 29897, 13, 1678, 16077, 1526, 29896, 353, 10377, 29896, 29961, 293, 1526, 29889, 2965, 3580, 29962, 13, 13, 1678, 565, 16077, 1526, 29896, 338, 6213, 470, 16077, 1526, 29896, 29889, 1853, 2804, 16077, 1526, 29889, 2965, 3580, 29918, 11116, 29918, 29923, 3210, 29949, 29918, 1525, 29984, 29901, 13, 4706, 736, 848, 29892, 1006, 14268, 29889, 22498, 29918, 2477, 4741, 7982, 13, 13, 1678, 2916, 29896, 353, 16077, 1526, 29896, 29961, 293, 1526, 29889, 2965, 3580, 29889, 29923, 1859, 29962, 13, 13, 1678, 565, 2916, 29896, 338, 6213, 29901, 13, 4706, 736, 848, 29892, 1006, 14268, 29889, 22498, 29918, 2477, 4741, 7982, 13, 13, 1678, 6499, 29918, 29890, 1372, 353, 289, 29908, 29925, 11375, 2544, 29934, 2477, 1001, 29908, 13, 1678, 1596, 703, 305, 9776, 18340, 3580, 2916, 2009, 18203, 1159, 13, 1678, 2916, 29896, 29889, 2587, 29918, 13193, 353, 2916, 29896, 29889, 2587, 29918, 13193, 7503, 2435, 29898, 407, 29918, 29890, 1372, 4638, 718, 6499, 29918, 29890, 1372, 13, 1678, 736, 10377, 29896, 29889, 2109, 3285, 1006, 14268, 29889, 22498, 29918, 2477, 4741, 7982, 13, 13, 13, 919, 272, 353, 1006, 14268, 29889, 24923, 580, 13, 919, 272, 29889, 2962, 29898, 369, 8977, 29918, 10702, 29892, 9521, 29918, 4841, 11759, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 2314, 13, 13, 2202, 29901, 13, 1678, 931, 29889, 17059, 29898, 29929, 29929, 29929, 29897, 13, 19499, 7670, 3377, 4074, 6685, 29901, 13, 1678, 1209, 13, 919, 272, 29889, 9847, 580, 13, 2 ]
TCO2_Dashboard/content_BCT.py
originalpkbims/subgrounds-pkbims
0
117049
<gh_stars>0 from dash import html from dash import dcc import dash_bootstrap_components as dbc from helpers import (date_manipulations, black_list_manipulations, filter_carbon_pool) from Figures_Carbon_Pool import deposited_over_time, redeemed_over_time from data_related_constants import redeems_rename_map, deposits_rename_map from import_data import get_data_pool df_deposited, df_redeemed = get_data_pool() # rename_columns df_deposited = df_deposited.rename(columns=deposits_rename_map) df_redeemed = df_redeemed.rename(columns=redeems_rename_map) # datetime manipulations df_deposited = date_manipulations(df_deposited) df_redeemed = date_manipulations(df_redeemed) # Blacklist manipulations df_deposited = black_list_manipulations(df_deposited) df_redeemed = black_list_manipulations(df_redeemed) # Carbon pool filter BCT_deposited, BCT_redeemed = filter_carbon_pool( df_deposited, df_redeemed, "0x2f800db0fdb5223b3c3f354886d907a671414a7f") # Figures fig_deposited_over_time = deposited_over_time(BCT_deposited) fig_redeemed_over_time = redeemed_over_time(BCT_redeemed) content_BCT = [ dbc.Row( dbc.Col( dbc.Card([ dbc.CardHeader( html.H1("Toucan Protocol : Base Carbon Tonne Pool", className='page-title')) ]), width=8) ), dbc.Row([ dbc.Col( dbc.Card([ html.H5("TCO2 tokens deposited", className="card-title"), dbc.CardBody("{:,}".format( int(BCT_deposited["Quantity"].sum())), className="card-text") ]), width=4), dbc.Col( dbc.Card([ html.H5("TCO2 tokens redeemed", className="card-title"), dbc.CardBody("{:,}".format( int(BCT_redeemed["Quantity"].sum())), className="card-text") ]), width=4), dbc.Col( dbc.Card([ html.H5("BCT tokens retired", className="card-title"), dbc.CardBody("Coming soon", className="card-text") ]), width=4), ], style={'padding-top': '96px'}), dbc.Row([ dbc.Col([ dbc.Card([ html.H5("TCO2 tokens deposited over time", className="card-title"), dbc.CardBody(dcc.Graph(figure=fig_deposited_over_time)) ], className="card-graph") ], width=4), dbc.Col([ dbc.Card([ html.H5("TCO2 tokens redeemed over time", className="card-title"), dbc.CardBody(dcc.Graph(figure=fig_redeemed_over_time)) ], className="card-graph") ], width=4), dbc.Col([ dbc.Card([ html.H5("BCT tokens retired over time", className="card-title"), dbc.CardBody("Coming soon", className="card-text") ], className="card-graph"), ], width=4) ]) ]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 12569, 1053, 3472, 13, 3166, 12569, 1053, 270, 617, 13, 5215, 12569, 29918, 8704, 29918, 14036, 408, 4833, 29883, 13, 3166, 1371, 414, 1053, 313, 1256, 29918, 1171, 666, 8250, 29892, 4628, 29918, 1761, 29918, 1171, 666, 8250, 29892, 13, 462, 268, 4175, 29918, 4287, 6718, 29918, 10109, 29897, 13, 3166, 5104, 1973, 29918, 8179, 6718, 29918, 11426, 1053, 19754, 1573, 29918, 957, 29918, 2230, 29892, 337, 311, 22580, 29918, 957, 29918, 2230, 13, 3166, 848, 29918, 12817, 29918, 3075, 1934, 1053, 337, 311, 1567, 29918, 1267, 420, 29918, 1958, 29892, 19754, 1169, 29918, 1267, 420, 29918, 1958, 13, 3166, 1053, 29918, 1272, 1053, 679, 29918, 1272, 29918, 10109, 13, 13, 2176, 29918, 311, 1066, 1573, 29892, 4489, 29918, 276, 311, 22580, 353, 679, 29918, 1272, 29918, 10109, 580, 13, 13, 29937, 19508, 29918, 13099, 13, 2176, 29918, 311, 1066, 1573, 353, 4489, 29918, 311, 1066, 1573, 29889, 1267, 420, 29898, 13099, 29922, 311, 1066, 1169, 29918, 1267, 420, 29918, 1958, 29897, 13, 2176, 29918, 276, 311, 22580, 353, 4489, 29918, 276, 311, 22580, 29889, 1267, 420, 29898, 13099, 29922, 276, 311, 1567, 29918, 1267, 420, 29918, 1958, 29897, 13, 29937, 12865, 11525, 8250, 13, 2176, 29918, 311, 1066, 1573, 353, 2635, 29918, 1171, 666, 8250, 29898, 2176, 29918, 311, 1066, 1573, 29897, 13, 2176, 29918, 276, 311, 22580, 353, 2635, 29918, 1171, 666, 8250, 29898, 2176, 29918, 276, 311, 22580, 29897, 13, 29937, 6054, 1761, 11525, 8250, 13, 2176, 29918, 311, 1066, 1573, 353, 4628, 29918, 1761, 29918, 1171, 666, 8250, 29898, 2176, 29918, 311, 1066, 1573, 29897, 13, 2176, 29918, 276, 311, 22580, 353, 4628, 29918, 1761, 29918, 1171, 666, 8250, 29898, 2176, 29918, 276, 311, 22580, 29897, 13, 13, 29937, 1704, 6718, 11565, 4175, 13, 29933, 1783, 29918, 311, 1066, 1573, 29892, 350, 1783, 29918, 276, 311, 22580, 353, 4175, 29918, 4287, 6718, 29918, 10109, 29898, 13, 1678, 4489, 29918, 311, 1066, 1573, 29892, 4489, 29918, 276, 311, 22580, 29892, 376, 29900, 29916, 29906, 29888, 29947, 29900, 29900, 2585, 29900, 29888, 2585, 29945, 29906, 29906, 29941, 29890, 29941, 29883, 29941, 29888, 29941, 29945, 29946, 29947, 29947, 29953, 29881, 29929, 29900, 29955, 29874, 29953, 29955, 29896, 29946, 29896, 29946, 29874, 29955, 29888, 1159, 13, 13, 29937, 5104, 1973, 13, 1003, 29918, 311, 1066, 1573, 29918, 957, 29918, 2230, 353, 19754, 1573, 29918, 957, 29918, 2230, 29898, 29933, 1783, 29918, 311, 1066, 1573, 29897, 13, 1003, 29918, 276, 311, 22580, 29918, 957, 29918, 2230, 353, 337, 311, 22580, 29918, 957, 29918, 2230, 29898, 29933, 1783, 29918, 276, 311, 22580, 29897, 13, 13, 3051, 29918, 29933, 1783, 353, 518, 13, 1678, 4833, 29883, 29889, 4301, 29898, 13, 4706, 4833, 29883, 29889, 1625, 29898, 13, 9651, 4833, 29883, 29889, 13200, 4197, 13, 18884, 4833, 29883, 29889, 13200, 7850, 29898, 13, 462, 1678, 3472, 29889, 29950, 29896, 703, 29911, 283, 3068, 1019, 5770, 584, 7399, 1704, 6718, 323, 7293, 28625, 613, 22030, 2433, 3488, 29899, 3257, 8785, 13, 9651, 4514, 511, 2920, 29922, 29947, 29897, 13, 1678, 10353, 13, 1678, 4833, 29883, 29889, 4301, 4197, 13, 4706, 4833, 29883, 29889, 1625, 29898, 13, 9651, 4833, 29883, 29889, 13200, 4197, 13, 18884, 3472, 29889, 29950, 29945, 703, 29911, 3217, 29906, 18897, 19754, 1573, 613, 22030, 543, 7543, 29899, 3257, 4968, 13, 18884, 4833, 29883, 29889, 13200, 8434, 703, 25641, 29892, 29913, 1642, 4830, 29898, 13, 462, 1678, 938, 29898, 29933, 1783, 29918, 311, 1066, 1573, 3366, 22930, 537, 16862, 2083, 3101, 511, 22030, 543, 7543, 29899, 726, 1159, 13, 9651, 4514, 511, 2920, 29922, 29946, 511, 13, 4706, 4833, 29883, 29889, 1625, 29898, 13, 9651, 4833, 29883, 29889, 13200, 4197, 13, 18884, 3472, 29889, 29950, 29945, 703, 29911, 3217, 29906, 18897, 337, 311, 22580, 613, 22030, 543, 7543, 29899, 3257, 4968, 13, 18884, 4833, 29883, 29889, 13200, 8434, 703, 25641, 29892, 29913, 1642, 4830, 29898, 13, 462, 1678, 938, 29898, 29933, 1783, 29918, 276, 311, 22580, 3366, 22930, 537, 16862, 2083, 3101, 511, 22030, 543, 7543, 29899, 726, 1159, 13, 9651, 4514, 511, 2920, 29922, 29946, 511, 13, 4706, 4833, 29883, 29889, 1625, 29898, 13, 9651, 4833, 29883, 29889, 13200, 4197, 13, 18884, 3472, 29889, 29950, 29945, 703, 29933, 1783, 18897, 16528, 613, 22030, 543, 7543, 29899, 3257, 4968, 13, 18884, 4833, 29883, 29889, 13200, 8434, 703, 1523, 292, 4720, 613, 22030, 543, 7543, 29899, 726, 1159, 13, 9651, 4514, 511, 2920, 29922, 29946, 511, 13, 1678, 21251, 3114, 3790, 29915, 12791, 29899, 3332, 2396, 525, 29929, 29953, 1756, 29915, 9594, 13, 1678, 4833, 29883, 29889, 4301, 4197, 13, 4706, 4833, 29883, 29889, 1625, 4197, 13, 9651, 4833, 29883, 29889, 13200, 4197, 13, 18884, 3472, 29889, 29950, 29945, 703, 29911, 3217, 29906, 18897, 19754, 1573, 975, 931, 613, 13, 462, 4706, 22030, 543, 7543, 29899, 3257, 4968, 13, 18884, 4833, 29883, 29889, 13200, 8434, 29898, 29881, 617, 29889, 9527, 29898, 4532, 29922, 1003, 29918, 311, 1066, 1573, 29918, 957, 29918, 2230, 876, 13, 9651, 21251, 22030, 543, 7543, 29899, 4262, 1159, 13, 4706, 21251, 2920, 29922, 29946, 511, 13, 4706, 4833, 29883, 29889, 1625, 4197, 13, 18884, 4833, 29883, 29889, 13200, 4197, 13, 462, 1678, 3472, 29889, 29950, 29945, 703, 29911, 3217, 29906, 18897, 337, 311, 22580, 975, 931, 613, 13, 462, 9651, 22030, 543, 7543, 29899, 3257, 4968, 13, 462, 1678, 4833, 29883, 29889, 13200, 8434, 29898, 29881, 617, 29889, 9527, 29898, 4532, 29922, 1003, 29918, 276, 311, 22580, 29918, 957, 29918, 2230, 876, 13, 18884, 21251, 22030, 543, 7543, 29899, 4262, 1159, 13, 18884, 21251, 2920, 29922, 29946, 511, 13, 4706, 4833, 29883, 29889, 1625, 4197, 13, 18884, 4833, 29883, 29889, 13200, 4197, 13, 462, 1678, 3472, 29889, 29950, 29945, 703, 29933, 1783, 18897, 16528, 975, 931, 613, 13, 462, 9651, 22030, 543, 7543, 29899, 3257, 4968, 13, 462, 1678, 4833, 29883, 29889, 13200, 8434, 703, 1523, 292, 4720, 613, 22030, 543, 7543, 29899, 726, 1159, 13, 18884, 21251, 22030, 543, 7543, 29899, 4262, 4968, 13, 18884, 21251, 2920, 29922, 29946, 29897, 13, 268, 2314, 13, 29962, 13, 2 ]
src/nprintml/learn/__init__.py
nprint/nPrintML
13
1604351
from .automl import AutoML # noqa: F401
[ 1, 515, 869, 17405, 29880, 1053, 11133, 1988, 29871, 396, 694, 25621, 29901, 383, 29946, 29900, 29896, 13, 2 ]
test/__init__.py
shikajiro/picosdk-python-wrappers
114
28921
# # Copyright (C) 2018 Pico Technology Ltd. See LICENSE file for terms. #
[ 1, 396, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29947, 349, 1417, 17968, 19806, 29889, 2823, 365, 2965, 1430, 1660, 934, 363, 4958, 29889, 13, 29937, 13, 2 ]
configs/keypoints/cascade_mask_rcnn_x101_3x_coco.py
VGrondin/CBNetV2_mask_remote
0
109190
_base_ = '../cascade_rcnn/cascade_mask_rcnn_r50_fpn_mstrain_3x_coco.py' model = dict( backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=8, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), style='pytorch', init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://detectron2/resnext101_32x8d')), roi_head=dict( _delete_=True, type='KeypointCascadeRoIHead', output_heatmaps=False, keypoint_decoder=dict(type='HeatmapDecodeOneKeypoint', upscale=4), num_keypoints=5, num_stages=3, stage_loss_weights=[1, 0.5, 0.25], bbox_roi_extractor=dict( type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0), out_channels=256, featmap_strides=[4, 8, 16, 32]), bbox_head=[ dict( type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=80, bbox_coder=dict( type='DeltaXYWHBBoxCoder', target_means=[0., 0., 0., 0.], target_stds=[0.1, 0.1, 0.2, 0.2]), reg_class_agnostic=True, loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)), dict( type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=80, bbox_coder=dict( type='DeltaXYWHBBoxCoder', target_means=[0., 0., 0., 0.], target_stds=[0.05, 0.05, 0.1, 0.1]), reg_class_agnostic=True, loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)), dict( type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=80, bbox_coder=dict( type='DeltaXYWHBBoxCoder', target_means=[0., 0., 0., 0.], target_stds=[0.033, 0.033, 0.067, 0.067]), reg_class_agnostic=True, loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)) ], mask_roi_extractor=dict( type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0), out_channels=256, featmap_strides=[4, 8, 16, 32]), mask_head=dict( type='FCNMaskHead', num_convs=4, in_channels=256, conv_out_channels=256, num_classes=80, loss_mask=dict( type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))) )
[ 1, 903, 3188, 29918, 353, 525, 6995, 9398, 6332, 29918, 2214, 15755, 29914, 9398, 6332, 29918, 13168, 29918, 2214, 15755, 29918, 29878, 29945, 29900, 29918, 18091, 29876, 29918, 29885, 4151, 262, 29918, 29941, 29916, 29918, 29883, 6235, 29889, 2272, 29915, 13, 13, 4299, 353, 9657, 29898, 13, 1678, 1250, 15933, 29922, 8977, 29898, 13, 4706, 1134, 2433, 1666, 8139, 29990, 29873, 742, 13, 4706, 10809, 29922, 29896, 29900, 29896, 29892, 13, 4706, 6471, 29922, 29941, 29906, 29892, 13, 4706, 2967, 29918, 2103, 29922, 29947, 29892, 13, 4706, 954, 29918, 303, 1179, 29922, 29946, 29892, 13, 4706, 714, 29918, 513, 1575, 7607, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 511, 13, 4706, 14671, 2256, 29918, 303, 1179, 29922, 29896, 29892, 13, 4706, 6056, 29918, 16859, 29922, 8977, 29898, 1853, 2433, 29933, 29940, 742, 6858, 29918, 5105, 29922, 8824, 511, 13, 4706, 3114, 2433, 2272, 7345, 305, 742, 13, 4706, 2069, 29918, 16859, 29922, 8977, 29898, 13, 9651, 1134, 2433, 29925, 2267, 22042, 742, 13, 9651, 1423, 3149, 2433, 3150, 29899, 29885, 828, 370, 597, 4801, 522, 1617, 29906, 29914, 690, 4622, 29896, 29900, 29896, 29918, 29941, 29906, 29916, 29947, 29881, 1495, 511, 13, 1678, 14100, 29918, 2813, 29922, 8977, 29898, 13, 4706, 903, 8143, 29918, 29922, 5574, 29892, 13, 4706, 1134, 2433, 2558, 3149, 29907, 294, 6332, 9588, 29902, 5494, 742, 13, 4706, 1962, 29918, 354, 271, 10339, 29922, 8824, 29892, 13, 4706, 1820, 3149, 29918, 7099, 6119, 29922, 8977, 29898, 1853, 2433, 3868, 271, 1958, 2772, 401, 6716, 2558, 3149, 742, 24081, 29883, 744, 29922, 29946, 511, 13, 12, 1949, 29918, 1989, 9748, 29922, 29945, 29892, 13, 4706, 954, 29918, 303, 1179, 29922, 29941, 29892, 13, 4706, 7408, 29918, 6758, 29918, 705, 5861, 11759, 29896, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29906, 29945, 1402, 13, 4706, 289, 1884, 29918, 307, 29875, 29918, 21111, 272, 29922, 8977, 29898, 13, 9651, 1134, 2433, 15771, 9588, 29902, 5647, 28891, 742, 13, 9651, 14100, 29918, 13148, 29922, 8977, 29898, 1853, 2433, 9588, 29902, 2499, 647, 742, 1962, 29918, 2311, 29922, 29955, 29892, 23460, 29918, 3605, 601, 29922, 29900, 511, 13, 9651, 714, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 9651, 1238, 271, 1958, 29918, 710, 2247, 11759, 29946, 29892, 29871, 29947, 29892, 29871, 29896, 29953, 29892, 29871, 29941, 29906, 11724, 13, 4706, 289, 1884, 29918, 2813, 11759, 13, 9651, 9657, 29898, 13, 18884, 1134, 2433, 21741, 29906, 8610, 29933, 3313, 5494, 742, 13, 18884, 297, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 18884, 285, 29883, 29918, 449, 29918, 305, 12629, 29922, 29896, 29900, 29906, 29946, 29892, 13, 18884, 14100, 29918, 1725, 271, 29918, 2311, 29922, 29955, 29892, 13, 18884, 954, 29918, 13203, 29922, 29947, 29900, 29892, 13, 18884, 289, 1884, 29918, 29883, 6119, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 5268, 18454, 25039, 29933, 3313, 29907, 6119, 742, 13, 462, 1678, 3646, 29918, 1004, 550, 11759, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 29889, 1402, 13, 462, 1678, 3646, 29918, 4172, 29879, 11759, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29906, 29892, 29871, 29900, 29889, 29906, 11724, 13, 18884, 1072, 29918, 1990, 29918, 21780, 29922, 5574, 29892, 13, 18884, 6410, 29918, 25932, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 29907, 2124, 5292, 14441, 29931, 2209, 742, 13, 462, 1678, 671, 29918, 18816, 29885, 3398, 29922, 8824, 29892, 13, 462, 1678, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 511, 13, 18884, 6410, 29918, 29890, 1884, 29922, 8977, 29898, 1853, 2433, 29903, 4346, 720, 29931, 29896, 29931, 2209, 742, 21762, 29922, 29896, 29889, 29900, 29892, 13, 462, 1669, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 8243, 13, 9651, 9657, 29898, 13, 18884, 1134, 2433, 21741, 29906, 8610, 29933, 3313, 5494, 742, 13, 18884, 297, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 18884, 285, 29883, 29918, 449, 29918, 305, 12629, 29922, 29896, 29900, 29906, 29946, 29892, 13, 18884, 14100, 29918, 1725, 271, 29918, 2311, 29922, 29955, 29892, 13, 18884, 954, 29918, 13203, 29922, 29947, 29900, 29892, 13, 18884, 289, 1884, 29918, 29883, 6119, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 5268, 18454, 25039, 29933, 3313, 29907, 6119, 742, 13, 462, 1678, 3646, 29918, 1004, 550, 11759, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 29889, 1402, 13, 462, 1678, 3646, 29918, 4172, 29879, 11759, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29900, 29945, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29896, 11724, 13, 18884, 1072, 29918, 1990, 29918, 21780, 29922, 5574, 29892, 13, 18884, 6410, 29918, 25932, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 29907, 2124, 5292, 14441, 29931, 2209, 742, 13, 462, 1678, 671, 29918, 18816, 29885, 3398, 29922, 8824, 29892, 13, 462, 1678, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 511, 13, 18884, 6410, 29918, 29890, 1884, 29922, 8977, 29898, 1853, 2433, 29903, 4346, 720, 29931, 29896, 29931, 2209, 742, 21762, 29922, 29896, 29889, 29900, 29892, 13, 462, 1669, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 8243, 13, 9651, 9657, 29898, 13, 18884, 1134, 2433, 21741, 29906, 8610, 29933, 3313, 5494, 742, 13, 18884, 297, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 18884, 285, 29883, 29918, 449, 29918, 305, 12629, 29922, 29896, 29900, 29906, 29946, 29892, 13, 18884, 14100, 29918, 1725, 271, 29918, 2311, 29922, 29955, 29892, 13, 18884, 954, 29918, 13203, 29922, 29947, 29900, 29892, 13, 18884, 289, 1884, 29918, 29883, 6119, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 5268, 18454, 25039, 29933, 3313, 29907, 6119, 742, 13, 462, 1678, 3646, 29918, 1004, 550, 11759, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 29889, 1402, 13, 462, 1678, 3646, 29918, 4172, 29879, 11759, 29900, 29889, 29900, 29941, 29941, 29892, 29871, 29900, 29889, 29900, 29941, 29941, 29892, 29871, 29900, 29889, 29900, 29953, 29955, 29892, 29871, 29900, 29889, 29900, 29953, 29955, 11724, 13, 18884, 1072, 29918, 1990, 29918, 21780, 29922, 5574, 29892, 13, 18884, 6410, 29918, 25932, 29922, 8977, 29898, 13, 462, 1678, 1134, 2433, 29907, 2124, 5292, 14441, 29931, 2209, 742, 13, 462, 1678, 671, 29918, 18816, 29885, 3398, 29922, 8824, 29892, 13, 462, 1678, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 511, 13, 18884, 6410, 29918, 29890, 1884, 29922, 8977, 29898, 1853, 2433, 29903, 4346, 720, 29931, 29896, 29931, 2209, 742, 21762, 29922, 29896, 29889, 29900, 29892, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 876, 13, 4706, 21251, 13, 4706, 11105, 29918, 307, 29875, 29918, 21111, 272, 29922, 8977, 29898, 13, 9651, 1134, 2433, 15771, 9588, 29902, 5647, 28891, 742, 13, 9651, 14100, 29918, 13148, 29922, 8977, 29898, 1853, 2433, 9588, 29902, 2499, 647, 742, 1962, 29918, 2311, 29922, 29896, 29946, 29892, 23460, 29918, 3605, 601, 29922, 29900, 511, 13, 9651, 714, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 9651, 1238, 271, 1958, 29918, 710, 2247, 11759, 29946, 29892, 29871, 29947, 29892, 29871, 29896, 29953, 29892, 29871, 29941, 29906, 11724, 13, 4706, 11105, 29918, 2813, 29922, 8977, 29898, 13, 9651, 1134, 2433, 8610, 29940, 19832, 5494, 742, 13, 9651, 954, 29918, 535, 4270, 29922, 29946, 29892, 13, 9651, 297, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 9651, 7602, 29918, 449, 29918, 305, 12629, 29922, 29906, 29945, 29953, 29892, 13, 9651, 954, 29918, 13203, 29922, 29947, 29900, 29892, 13, 9651, 6410, 29918, 13168, 29922, 8977, 29898, 13, 18884, 1134, 2433, 29907, 2124, 5292, 14441, 29931, 2209, 742, 671, 29918, 13168, 29922, 5574, 29892, 6410, 29918, 7915, 29922, 29896, 29889, 29900, 4961, 268, 13, 1678, 1723, 13, 2 ]
geekhours/database.py
YukieK/GeekHours
3
175192
<gh_stars>1-10 """ database.py is a module to communicate with a database. """ from datetime import datetime import sqlite3 from typing import List class Database: """ Database class initializes and manipulates SQLite3 database. """ def __init__(self, db_name): self.con = sqlite3.connect(db_name) self.cur = self.con.cursor() self.donelist = 'donelist' self.course = 'course' def close_db(self): """ Close the database """ if self.con: self.con.close() def create_table(self): """ Create table. donelist: Table for registration of date, course name and duration you studied. course: Table for validation of course name. """ donelist = ("CREATE TABLE IF NOT EXISTS donelist (" "id INTEGER PRIMARY KEY AUTOINCREMENT, " "date TEXT NOT NULL, " "course TEXT NOT NULL, " "duration TEXT NOT NULL)") course = ("CREATE TABLE IF NOT EXISTS course (" "id INTEGER PRIMARY KEY AUTOINCREMENT, " "name TEXT NOT NULL UNIQUE)") with self.con: self.cur.execute(donelist) self.cur.execute(course) def get_column(self, table: str): """ Get column names """ self.con.row_factory = sqlite3.Row cur = self.con.cursor() if table == self.course: course_columns = cur.execute('SELECT * FROM course').fetchone() columns = course_columns.keys() elif table == self.donelist: donelist_columns = cur.execute('SELECT * FROM donelist').fetchone() columns = donelist_columns.keys() return columns def show(self, table: str): """ Show table """ if table == self.course: ret = self.cur.execute('SELECT * FROM course').fetchall() elif table == self.donelist: ret = self.cur.execute('SELECT * FROM donelist').fetchall() else: raise RuntimeError("No such table.") return ret def insert_course(self, courses: List[str]): """ Insert course name. Insert course name into the 'course' table. Insertion of the course name which is already registered will be discarded. """ for elem in courses: with self.con: self.con.execute('INSERT INTO course(name) VALUES (?)', (elem,)) print("Add '{}' in course.".format(elem)) def insert_donelist(self, date: str, course: str, duration: str): """ Insert donelist. Insert donelist into the 'donelist' table. The course name must be a registered name in the 'course' table. """ check_course_name = self.con.execute('SELECT name FROM course WHERE name=?', (course,)) check_course_name = check_course_name.fetchall() check_duplicate = self.con.execute( 'SELECT date course FROM donelist WHERE date=? AND course=?', ( date, course, )) check_duplicate = check_duplicate.fetchall() if not check_course_name: raise RuntimeError("No such course in 'course' table.") if check_duplicate: raise RuntimeError("Record already exists in 'donelist' table.") if len(date) != 10: raise ValueError("The date must be in YYYY-MM-DD format.") is_valid = True try: date_dt = datetime.strptime(date, '%Y-%m-%d') except ValueError: is_valid = False if is_valid: date = date_dt.date() else: raise ValueError('Invalid date') with self.con: self.con.execute('INSERT INTO donelist(date, course, duration) VALUES (?, ?, ?)', ( date, course, duration, )) print("Add '{} {} {}' in donelist.".format(date, course, duration)) def remove_course(self, course: str): """ Remove course name from 'course' table. """ ret = self.con.execute('SELECT name FROM course WHERE name=?', (course,)) check = ret.fetchall() if not check: raise RuntimeError("No such course in 'course' table.") with self.con: self.cur.execute('DELETE FROM course WHERE name=?', (course,)) print("Removed '{}' from course.".format(course)) def remove_donelist(self, date: str, course: str): """ Remove record from 'donelist' table. Search record by date and course name and if found matched record, it will be removed. """ ret = self.con.execute('SELECT date, course FROM donelist WHERE date=? AND course=?', ( date, course, )) check = ret.fetchall() if not check: raise RuntimeError("No such record in 'donelist' table.") with self.con: self.cur.execute('DELETE FROM donelist WHERE date=? AND course=?', ( date, course, )) print('Removed record.') def get_total_hours(self): """ Get the total hours Get the total number of hours and return it. """ with self.con: total = self.cur.execute( ("SELECT 'Total: ', SUM(donelist.duration) FROM donelist")).fetchall() return total def get_total_hours_course(self): """ Get the total hours per course Get the total number of hours per course and return it. """ with self.con: total = self.cur.execute(("SELECT course.name, SUM(donelist.duration) " "FROM donelist " "INNER JOIN course ON course.name = donelist.course " "GROUP BY course.name")).fetchall() return total def get_total_hours_week(self, course: str = None): """ Get the total hours per week Get the total number of hours per week and return it. If the course name is passed as an argument, return the total hours per week for each course. Args: course: Target course name to get the total hours. """ with self.con: if not course: total = self.cur.execute( ("SELECT strftime('%w', donelist.date) AS week, SUM(donelist.duration) " "FROM donelist " "INNER JOIN course ON course.name = donelist.course " "GROUP BY week")).fetchall() else: total = self.cur.execute( ("SELECT strftime('%w', donelist.date) AS week, SUM(donelist.duration) " "FROM donelist " "INNER JOIN course ON course.name = donelist.course " "WHERE course=? " "GROUP BY week"), (course,)).fetchall() return total def get_total_hours_month(self, course=None): """ Get the total hours per month Get the total number of hours per month and return it. If the course name is passed as an argument, return the total hours per month for each course. Args: course: Target course name to get the total hours. """ with self.con: if not course: total = self.cur.execute( ("SELECT strftime('%m', donelist.date) AS month, SUM(donelist.duration) " "FROM donelist " "INNER JOIN course ON course.name = donelist.course " "GROUP BY month")).fetchall() else: total = self.cur.execute( ("SELECT strftime('%m', donelist.date) AS month, SUM(donelist.duration) " "FROM donelist " "INNER JOIN course ON course.name = donelist.course " "WHERE course=? " "GROUP BY month"), (course,)).fetchall() return total
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 2566, 29889, 2272, 338, 263, 3883, 304, 23120, 411, 263, 2566, 29889, 9995, 13, 13, 3166, 12865, 1053, 12865, 13, 5215, 21120, 29941, 13, 3166, 19229, 1053, 2391, 13, 13, 13, 1990, 5470, 29901, 13, 1678, 9995, 5470, 770, 2847, 7093, 322, 11525, 352, 1078, 23299, 29941, 2566, 29889, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4833, 29918, 978, 1125, 13, 4706, 1583, 29889, 535, 353, 21120, 29941, 29889, 6915, 29898, 2585, 29918, 978, 29897, 13, 4706, 1583, 29889, 2764, 353, 1583, 29889, 535, 29889, 18127, 580, 13, 4706, 1583, 29889, 9176, 295, 391, 353, 525, 9176, 295, 391, 29915, 13, 4706, 1583, 29889, 15775, 353, 525, 15775, 29915, 13, 13, 1678, 822, 3802, 29918, 2585, 29898, 1311, 1125, 13, 4706, 9995, 23186, 278, 2566, 9995, 13, 4706, 565, 1583, 29889, 535, 29901, 13, 9651, 1583, 29889, 535, 29889, 5358, 580, 13, 13, 1678, 822, 1653, 29918, 2371, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 6204, 1591, 29889, 13, 13, 4706, 1016, 295, 391, 29901, 6137, 363, 22583, 310, 2635, 29892, 3236, 1024, 322, 14385, 366, 12399, 29889, 13, 4706, 3236, 29901, 6137, 363, 8845, 310, 3236, 1024, 29889, 13, 4706, 9995, 13, 4706, 1016, 295, 391, 353, 4852, 27045, 10911, 10762, 6058, 28731, 1016, 295, 391, 4852, 13, 462, 1678, 376, 333, 2672, 4330, 17070, 29778, 14636, 26524, 6992, 22245, 13780, 29892, 376, 13, 462, 1678, 376, 1256, 323, 12194, 6058, 4265, 29892, 376, 13, 462, 1678, 376, 15775, 323, 12194, 6058, 4265, 29892, 376, 13, 462, 1678, 376, 19708, 323, 12194, 6058, 4265, 25760, 13, 13, 4706, 3236, 353, 4852, 27045, 10911, 10762, 6058, 28731, 3236, 4852, 13, 462, 29871, 376, 333, 2672, 4330, 17070, 29778, 14636, 26524, 6992, 22245, 13780, 29892, 376, 13, 462, 29871, 376, 978, 323, 12194, 6058, 4265, 8291, 29902, 11144, 25760, 13, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 1583, 29889, 2764, 29889, 7978, 29898, 9176, 295, 391, 29897, 13, 9651, 1583, 29889, 2764, 29889, 7978, 29898, 15775, 29897, 13, 13, 1678, 822, 679, 29918, 4914, 29898, 1311, 29892, 1591, 29901, 851, 1125, 13, 4706, 9995, 3617, 1897, 2983, 9995, 13, 4706, 1583, 29889, 535, 29889, 798, 29918, 14399, 353, 21120, 29941, 29889, 4301, 13, 4706, 3151, 353, 1583, 29889, 535, 29889, 18127, 580, 13, 13, 4706, 565, 1591, 1275, 1583, 29889, 15775, 29901, 13, 9651, 3236, 29918, 13099, 353, 3151, 29889, 7978, 877, 6404, 334, 3895, 3236, 2824, 9155, 650, 580, 13, 9651, 4341, 353, 3236, 29918, 13099, 29889, 8149, 580, 13, 4706, 25342, 1591, 1275, 1583, 29889, 9176, 295, 391, 29901, 13, 9651, 1016, 295, 391, 29918, 13099, 353, 3151, 29889, 7978, 877, 6404, 334, 3895, 1016, 295, 391, 2824, 9155, 650, 580, 13, 9651, 4341, 353, 1016, 295, 391, 29918, 13099, 29889, 8149, 580, 13, 4706, 736, 4341, 13, 13, 1678, 822, 1510, 29898, 1311, 29892, 1591, 29901, 851, 1125, 13, 4706, 9995, 29871, 7704, 1591, 9995, 13, 4706, 565, 1591, 1275, 1583, 29889, 15775, 29901, 13, 9651, 3240, 353, 1583, 29889, 2764, 29889, 7978, 877, 6404, 334, 3895, 3236, 2824, 9155, 497, 580, 13, 4706, 25342, 1591, 1275, 1583, 29889, 9176, 295, 391, 29901, 13, 9651, 3240, 353, 1583, 29889, 2764, 29889, 7978, 877, 6404, 334, 3895, 1016, 295, 391, 2824, 9155, 497, 580, 13, 4706, 1683, 29901, 13, 9651, 12020, 24875, 2392, 703, 3782, 1316, 1591, 23157, 13, 4706, 736, 3240, 13, 13, 1678, 822, 4635, 29918, 15775, 29898, 1311, 29892, 21888, 29901, 2391, 29961, 710, 29962, 1125, 13, 4706, 9995, 24505, 3236, 1024, 29889, 13, 13, 4706, 24505, 3236, 1024, 964, 278, 525, 15775, 29915, 1591, 29889, 13, 4706, 24505, 291, 310, 278, 3236, 1024, 607, 338, 2307, 15443, 674, 367, 2313, 25600, 29889, 13, 4706, 9995, 13, 4706, 363, 21268, 297, 21888, 29901, 13, 9651, 411, 1583, 29889, 535, 29901, 13, 18884, 1583, 29889, 535, 29889, 7978, 877, 19460, 11646, 3236, 29898, 978, 29897, 15673, 313, 7897, 742, 313, 20461, 29892, 876, 13, 18884, 1596, 703, 2528, 525, 8875, 29915, 297, 3236, 1213, 29889, 4830, 29898, 20461, 876, 13, 13, 1678, 822, 4635, 29918, 9176, 295, 391, 29898, 1311, 29892, 2635, 29901, 851, 29892, 3236, 29901, 851, 29892, 14385, 29901, 851, 1125, 13, 4706, 9995, 24505, 1016, 295, 391, 29889, 13, 13, 4706, 24505, 1016, 295, 391, 964, 278, 525, 9176, 295, 391, 29915, 1591, 29889, 13, 4706, 450, 3236, 1024, 1818, 367, 263, 15443, 1024, 297, 278, 525, 15775, 29915, 1591, 29889, 13, 4706, 9995, 13, 4706, 1423, 29918, 15775, 29918, 978, 353, 1583, 29889, 535, 29889, 7978, 877, 6404, 1024, 3895, 3236, 5754, 1024, 29922, 29973, 742, 313, 15775, 29892, 876, 13, 4706, 1423, 29918, 15775, 29918, 978, 353, 1423, 29918, 15775, 29918, 978, 29889, 9155, 497, 580, 13, 4706, 1423, 29918, 20908, 5926, 353, 1583, 29889, 535, 29889, 7978, 29898, 13, 9651, 525, 6404, 2635, 3236, 3895, 1016, 295, 391, 5754, 2635, 29922, 29973, 5300, 3236, 29922, 29973, 742, 313, 13, 18884, 2635, 29892, 13, 18884, 3236, 29892, 13, 632, 876, 13, 4706, 1423, 29918, 20908, 5926, 353, 1423, 29918, 20908, 5926, 29889, 9155, 497, 580, 13, 13, 4706, 565, 451, 1423, 29918, 15775, 29918, 978, 29901, 13, 9651, 12020, 24875, 2392, 703, 3782, 1316, 3236, 297, 525, 15775, 29915, 1591, 23157, 13, 13, 4706, 565, 1423, 29918, 20908, 5926, 29901, 13, 9651, 12020, 24875, 2392, 703, 9182, 2307, 4864, 297, 525, 9176, 295, 391, 29915, 1591, 23157, 13, 13, 4706, 565, 7431, 29898, 1256, 29897, 2804, 29871, 29896, 29900, 29901, 13, 9651, 12020, 7865, 2392, 703, 1576, 2635, 1818, 367, 297, 612, 14995, 29979, 29899, 7428, 29899, 7858, 3402, 23157, 13, 13, 4706, 338, 29918, 3084, 353, 5852, 13, 4706, 1018, 29901, 13, 9651, 2635, 29918, 6008, 353, 12865, 29889, 710, 415, 603, 29898, 1256, 29892, 14210, 29979, 19222, 29885, 19222, 29881, 1495, 13, 4706, 5174, 7865, 2392, 29901, 13, 9651, 338, 29918, 3084, 353, 7700, 13, 13, 4706, 565, 338, 29918, 3084, 29901, 13, 9651, 2635, 353, 2635, 29918, 6008, 29889, 1256, 580, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 13919, 2635, 1495, 13, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 1583, 29889, 535, 29889, 7978, 877, 19460, 11646, 1016, 295, 391, 29898, 1256, 29892, 3236, 29892, 14385, 29897, 15673, 313, 14579, 1577, 29892, 1577, 29897, 742, 313, 13, 18884, 2635, 29892, 13, 18884, 3236, 29892, 13, 18884, 14385, 29892, 13, 632, 876, 13, 9651, 1596, 703, 2528, 525, 8875, 6571, 6571, 29915, 297, 1016, 295, 391, 1213, 29889, 4830, 29898, 1256, 29892, 3236, 29892, 14385, 876, 13, 13, 1678, 822, 3349, 29918, 15775, 29898, 1311, 29892, 3236, 29901, 851, 1125, 13, 4706, 9995, 15154, 3236, 1024, 515, 525, 15775, 29915, 1591, 29889, 9995, 13, 4706, 3240, 353, 1583, 29889, 535, 29889, 7978, 877, 6404, 1024, 3895, 3236, 5754, 1024, 29922, 29973, 742, 313, 15775, 29892, 876, 13, 4706, 1423, 353, 3240, 29889, 9155, 497, 580, 13, 13, 4706, 565, 451, 1423, 29901, 13, 9651, 12020, 24875, 2392, 703, 3782, 1316, 3236, 297, 525, 15775, 29915, 1591, 23157, 13, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 1583, 29889, 2764, 29889, 7978, 877, 2287, 18476, 3895, 3236, 5754, 1024, 29922, 29973, 742, 313, 15775, 29892, 876, 13, 9651, 1596, 703, 7301, 8238, 525, 8875, 29915, 515, 3236, 1213, 29889, 4830, 29898, 15775, 876, 13, 13, 1678, 822, 3349, 29918, 9176, 295, 391, 29898, 1311, 29892, 2635, 29901, 851, 29892, 3236, 29901, 851, 1125, 13, 4706, 9995, 15154, 2407, 515, 525, 9176, 295, 391, 29915, 1591, 29889, 13, 13, 4706, 11856, 2407, 491, 2635, 322, 3236, 1024, 322, 565, 1476, 19228, 2407, 29892, 372, 674, 367, 6206, 29889, 13, 4706, 9995, 13, 4706, 3240, 353, 1583, 29889, 535, 29889, 7978, 877, 6404, 2635, 29892, 3236, 3895, 1016, 295, 391, 5754, 2635, 29922, 29973, 5300, 3236, 29922, 29973, 742, 313, 13, 9651, 2635, 29892, 13, 9651, 3236, 29892, 13, 308, 876, 13, 4706, 1423, 353, 3240, 29889, 9155, 497, 580, 13, 13, 4706, 565, 451, 1423, 29901, 13, 9651, 12020, 24875, 2392, 703, 3782, 1316, 2407, 297, 525, 9176, 295, 391, 29915, 1591, 23157, 13, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 1583, 29889, 2764, 29889, 7978, 877, 2287, 18476, 3895, 1016, 295, 391, 5754, 2635, 29922, 29973, 5300, 3236, 29922, 29973, 742, 313, 13, 18884, 2635, 29892, 13, 18884, 3236, 29892, 13, 632, 876, 13, 9651, 1596, 877, 7301, 8238, 2407, 29889, 1495, 13, 13, 1678, 822, 679, 29918, 7827, 29918, 29882, 2470, 29898, 1311, 1125, 13, 4706, 9995, 3617, 278, 3001, 6199, 13, 13, 4706, 3617, 278, 3001, 1353, 310, 6199, 322, 736, 372, 29889, 13, 4706, 9995, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 13, 18884, 4852, 6404, 525, 11536, 29901, 13420, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 3895, 1016, 295, 391, 1159, 467, 9155, 497, 580, 13, 13, 4706, 736, 3001, 13, 13, 1678, 822, 679, 29918, 7827, 29918, 29882, 2470, 29918, 15775, 29898, 1311, 1125, 13, 4706, 9995, 3617, 278, 3001, 6199, 639, 3236, 13, 13, 4706, 3617, 278, 3001, 1353, 310, 6199, 639, 3236, 322, 736, 372, 29889, 13, 4706, 9995, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 703, 6404, 3236, 29889, 978, 29892, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 376, 13, 462, 462, 418, 376, 21482, 1016, 295, 391, 376, 13, 462, 462, 418, 376, 1177, 13865, 8780, 3236, 6732, 3236, 29889, 978, 353, 1016, 295, 391, 29889, 15775, 376, 13, 462, 462, 418, 376, 26284, 6770, 3236, 29889, 978, 1159, 467, 9155, 497, 580, 13, 4706, 736, 3001, 13, 13, 1678, 822, 679, 29918, 7827, 29918, 29882, 2470, 29918, 18448, 29898, 1311, 29892, 3236, 29901, 851, 353, 6213, 1125, 13, 4706, 9995, 3617, 278, 3001, 6199, 639, 4723, 13, 13, 4706, 3617, 278, 3001, 1353, 310, 6199, 639, 4723, 322, 736, 372, 29889, 13, 4706, 960, 278, 3236, 1024, 338, 4502, 408, 385, 2980, 29892, 736, 278, 3001, 13, 4706, 6199, 639, 4723, 363, 1269, 3236, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 3236, 29901, 17157, 3236, 1024, 304, 679, 278, 3001, 6199, 29889, 13, 4706, 9995, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 565, 451, 3236, 29901, 13, 18884, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 13, 462, 1678, 4852, 6404, 851, 615, 603, 877, 29995, 29893, 742, 1016, 295, 391, 29889, 1256, 29897, 3339, 4723, 29892, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 376, 13, 462, 268, 376, 21482, 1016, 295, 391, 376, 13, 462, 268, 376, 1177, 13865, 8780, 3236, 6732, 3236, 29889, 978, 353, 1016, 295, 391, 29889, 15775, 376, 13, 462, 268, 376, 26284, 6770, 4723, 1159, 467, 9155, 497, 580, 13, 9651, 1683, 29901, 13, 18884, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 13, 462, 1678, 4852, 6404, 851, 615, 603, 877, 29995, 29893, 742, 1016, 295, 391, 29889, 1256, 29897, 3339, 4723, 29892, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 376, 13, 462, 268, 376, 21482, 1016, 295, 391, 376, 13, 462, 268, 376, 1177, 13865, 8780, 3236, 6732, 3236, 29889, 978, 353, 1016, 295, 391, 29889, 15775, 376, 13, 462, 268, 376, 22043, 3236, 29922, 29973, 376, 13, 462, 268, 376, 26284, 6770, 4723, 4968, 313, 15775, 29892, 8106, 9155, 497, 580, 13, 13, 4706, 736, 3001, 13, 13, 1678, 822, 679, 29918, 7827, 29918, 29882, 2470, 29918, 10874, 29898, 1311, 29892, 3236, 29922, 8516, 1125, 13, 4706, 9995, 3617, 278, 3001, 6199, 639, 4098, 13, 13, 4706, 3617, 278, 3001, 1353, 310, 6199, 639, 4098, 322, 736, 372, 29889, 13, 4706, 960, 278, 3236, 1024, 338, 4502, 408, 385, 2980, 29892, 736, 278, 3001, 13, 4706, 6199, 639, 4098, 363, 1269, 3236, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 3236, 29901, 17157, 3236, 1024, 304, 679, 278, 3001, 6199, 29889, 13, 4706, 9995, 13, 4706, 411, 1583, 29889, 535, 29901, 13, 9651, 565, 451, 3236, 29901, 13, 18884, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 13, 462, 1678, 4852, 6404, 851, 615, 603, 877, 29995, 29885, 742, 1016, 295, 391, 29889, 1256, 29897, 3339, 4098, 29892, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 376, 13, 462, 268, 376, 21482, 1016, 295, 391, 376, 13, 462, 268, 376, 1177, 13865, 8780, 3236, 6732, 3236, 29889, 978, 353, 1016, 295, 391, 29889, 15775, 376, 13, 462, 268, 376, 26284, 6770, 4098, 1159, 467, 9155, 497, 580, 13, 9651, 1683, 29901, 13, 18884, 3001, 353, 1583, 29889, 2764, 29889, 7978, 29898, 13, 462, 1678, 4852, 6404, 851, 615, 603, 877, 29995, 29885, 742, 1016, 295, 391, 29889, 1256, 29897, 3339, 4098, 29892, 22753, 29898, 9176, 295, 391, 29889, 19708, 29897, 376, 13, 462, 268, 376, 21482, 1016, 295, 391, 376, 13, 462, 268, 376, 1177, 13865, 8780, 3236, 6732, 3236, 29889, 978, 353, 1016, 295, 391, 29889, 15775, 376, 13, 462, 268, 376, 22043, 3236, 29922, 29973, 376, 13, 462, 268, 376, 26284, 6770, 4098, 4968, 313, 15775, 29892, 8106, 9155, 497, 580, 13, 13, 4706, 736, 3001, 13, 2 ]
train.py
ostaptan/deeptrans
0
105467
<reponame>ostaptan/deeptrans<gh_stars>0 import argparse import math import os import dill from collections import OrderedDict from tqdm import tqdm from torchtext.legacy import data from torchtext import datasets from torchtext.vocab import Vectors import torch import torch.nn as nn import torch.optim as optim from options import train_opts from options import model_opts from model import Seq2seqAttn class Trainer(object): def __init__( self, model, criterion, optimizer, scheduler, clip): self.model = model self.criterion = criterion self.optimizer = optimizer self.scheduler = scheduler self.clip = clip self.n_updates = 0 def get_lr(self): return self.optimizer.param_groups[0]['lr'] def step(self, samples, tf_ratio): self.optimizer.zero_grad() bsz = samples.src.size(1) outs = self.model(samples.src, samples.tgt, tf_ratio) loss = self.criterion(outs.view(-1, outs.size(2)), samples.tgt.view(-1)) if self.model.training: loss.backward() nn.utils.clip_grad_norm_(self.model.parameters(), self.clip) self.optimizer.step() self.n_updates += 1 return loss def save_model(save_vars, filename): model_path = os.path.join(args.savedir, filename) torch.save(save_vars, model_path) def save_vocab(savedir, fields): name, field = fields save_path = os.path.join(savedir, f'{name}_vocab.txt') with open(save_path, 'w') as fout: for w in field.vocab.itos: fout.write(w + '\n') def save_field(savedir, fields): name, field = fields save_path = os.path.join(savedir, f"{name}.field") with open(save_path, 'wb') as fout: dill.dump(field, fout) def main(args): device = torch.device('cuda' if args.gpu else 'cpu') # load data and construct vocabulary dictionary SRC = data.Field(lower=True) TGT = data.Field(lower=True, eos_token='<eos>') fields = [('src', SRC), ('tgt', TGT)] train_data = data.TabularDataset( path=args.train, format='tsv', fields=fields, ) valid_data = data.TabularDataset( path=args.valid, format='tsv', fields=fields, ) SRC.build_vocab(train_data, min_freq=args.src_min_freq) TGT.build_vocab(train_data, min_freq=args.tgt_min_freq) if not os.path.exists(args.savedir): os.mkdir(args.savedir) # save field and vocabulary for field in fields: save_field(args.savedir, field) save_vocab(args.savedir, field) # set iterator train_iter, valid_iter = data.BucketIterator.splits( (train_data, valid_data), batch_size=args.batch_size, sort_within_batch=True, sort_key= lambda x: len(x.src), repeat=False, device=device ) model = Seq2seqAttn(args, fields, device).to(device) print(model) print('') criterion = nn.CrossEntropyLoss(ignore_index=TGT.vocab.stoi['<pad>']) optimizer = optim.SGD(model.parameters(), lr=args.lr) scheduler = optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode='min') trainer = Trainer(model, criterion, optimizer, scheduler, args.clip) epoch = 1 max_epoch = args.max_epoch or math.inf max_update = args.max_update or math.inf best_loss = math.inf while epoch < max_epoch and trainer.n_updates < max_update \ and args.min_lr < trainer.get_lr(): # training with tqdm(train_iter, dynamic_ncols=True) as pbar: train_loss = 0.0 trainer.model.train() for samples in pbar: bsz = samples.src.size(1) loss = trainer.step(samples, args.tf_ratio) train_loss += loss.item() # setting of progressbar pbar.set_description(f"epoch {str(epoch).zfill(3)}") progress_state = OrderedDict( loss=loss.item(), ppl=math.exp(loss.item()), bsz=len(samples), lr=trainer.get_lr(), clip=args.clip, num_updates=trainer.n_updates) pbar.set_postfix(progress_state) train_loss /= len(train_iter) print(f"| epoch {str(epoch).zfill(3)} | train ", end="") print(f"| loss {train_loss:.{4}} ", end="") print(f"| ppl {math.exp(train_loss):.{4}} ", end="") print(f"| lr {trainer.get_lr():.1e} ", end="") print(f"| clip {args.clip} ", end="") print(f"| num_updates {trainer.n_updates} |") # validation valid_loss = 0.0 trainer.model.eval() for samples in valid_iter: bsz = samples.src.size(1) loss = trainer.step(samples, tf_ratio=0.0) valid_loss += loss.item() valid_loss /= len(valid_iter) print(f"| epoch {str(epoch).zfill(3)} | valid ", end="") print(f"| loss {valid_loss:.{4}} ", end="") print(f"| ppl {math.exp(valid_loss):.{4}} ", end="") print(f"| lr {trainer.get_lr():.1e} ", end="") print(f"| clip {args.clip} ", end="") print(f"| num_updates {trainer.n_updates} |") # saving model save_vars = {"train_args": args, "state_dict": model.state_dict()} if valid_loss < best_loss: best_loss = valid_loss save_model(save_vars, 'checkpoint_best.pt') save_model(save_vars, "checkpoint_last.pt") # update trainer.scheduler.step(valid_loss) epoch += 1 if __name__ == '__main__': parser = argparse.ArgumentParser('') train_opts(parser) model_opts(parser) args = parser.parse_args() main(args)
[ 1, 529, 276, 1112, 420, 29958, 520, 2156, 273, 29914, 311, 29872, 7414, 550, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 1852, 5510, 13, 5215, 5844, 13, 5215, 2897, 13, 5215, 270, 453, 13, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 13, 3166, 4842, 305, 726, 29889, 1397, 4135, 1053, 848, 13, 3166, 4842, 305, 726, 1053, 20035, 13, 3166, 4842, 305, 726, 29889, 29894, 542, 370, 1053, 478, 11142, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 20640, 408, 5994, 13, 13, 3166, 3987, 1053, 7945, 29918, 25707, 13, 3166, 3987, 1053, 1904, 29918, 25707, 13, 3166, 1904, 1053, 25981, 29906, 11762, 4165, 29876, 13, 13, 13, 1990, 3201, 4983, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 1904, 29892, 28770, 291, 29892, 5994, 3950, 29892, 1364, 14952, 29892, 20102, 1125, 13, 4706, 1583, 29889, 4299, 353, 1904, 13, 4706, 1583, 29889, 29883, 5385, 291, 353, 28770, 291, 13, 4706, 1583, 29889, 20640, 3950, 353, 5994, 3950, 13, 4706, 1583, 29889, 816, 14952, 353, 1364, 14952, 13, 4706, 1583, 29889, 24049, 353, 20102, 13, 4706, 1583, 29889, 29876, 29918, 786, 15190, 353, 29871, 29900, 13, 13, 1678, 822, 679, 29918, 29212, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 29212, 2033, 13, 13, 1678, 822, 4331, 29898, 1311, 29892, 11916, 29892, 15886, 29918, 3605, 601, 1125, 13, 4706, 1583, 29889, 20640, 3950, 29889, 9171, 29918, 5105, 580, 13, 4706, 289, 3616, 353, 11916, 29889, 4351, 29889, 2311, 29898, 29896, 29897, 13, 4706, 714, 29879, 353, 1583, 29889, 4299, 29898, 27736, 29889, 4351, 29892, 11916, 29889, 29873, 4141, 29892, 15886, 29918, 3605, 601, 29897, 13, 4706, 6410, 353, 1583, 29889, 29883, 5385, 291, 29898, 17718, 29889, 1493, 6278, 29896, 29892, 714, 29879, 29889, 2311, 29898, 29906, 8243, 11916, 29889, 29873, 4141, 29889, 1493, 6278, 29896, 876, 13, 13, 4706, 565, 1583, 29889, 4299, 29889, 26495, 29901, 13, 9651, 6410, 29889, 1627, 1328, 580, 13, 9651, 302, 29876, 29889, 13239, 29889, 24049, 29918, 5105, 29918, 12324, 23538, 1311, 29889, 4299, 29889, 16744, 3285, 1583, 29889, 24049, 29897, 13, 9651, 1583, 29889, 20640, 3950, 29889, 10568, 580, 13, 9651, 1583, 29889, 29876, 29918, 786, 15190, 4619, 29871, 29896, 13, 4706, 736, 6410, 13, 13, 13, 1753, 4078, 29918, 4299, 29898, 7620, 29918, 16908, 29892, 10422, 1125, 13, 1678, 1904, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 17314, 381, 29892, 10422, 29897, 13, 1678, 4842, 305, 29889, 7620, 29898, 7620, 29918, 16908, 29892, 1904, 29918, 2084, 29897, 13, 13, 13, 1753, 4078, 29918, 29894, 542, 370, 29898, 17314, 381, 29892, 4235, 1125, 13, 1678, 1024, 29892, 1746, 353, 4235, 13, 1678, 4078, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 17314, 381, 29892, 285, 29915, 29912, 978, 2403, 29894, 542, 370, 29889, 3945, 1495, 13, 1678, 411, 1722, 29898, 7620, 29918, 2084, 29892, 525, 29893, 1495, 408, 285, 449, 29901, 13, 4706, 363, 281, 297, 1746, 29889, 29894, 542, 370, 29889, 12870, 29901, 13, 9651, 285, 449, 29889, 3539, 29898, 29893, 718, 11297, 29876, 1495, 13, 13, 13, 1753, 4078, 29918, 2671, 29898, 17314, 381, 29892, 4235, 1125, 13, 1678, 1024, 29892, 1746, 353, 4235, 13, 1678, 4078, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 17314, 381, 29892, 285, 29908, 29912, 978, 1836, 2671, 1159, 13, 1678, 411, 1722, 29898, 7620, 29918, 2084, 29892, 525, 29893, 29890, 1495, 408, 285, 449, 29901, 13, 4706, 270, 453, 29889, 15070, 29898, 2671, 29892, 285, 449, 29897, 13, 13, 13, 1753, 1667, 29898, 5085, 1125, 13, 1678, 4742, 353, 4842, 305, 29889, 10141, 877, 29883, 6191, 29915, 565, 6389, 29889, 29887, 3746, 29871, 1683, 525, 21970, 1495, 13, 13, 1678, 396, 2254, 848, 322, 3386, 7931, 370, 352, 653, 8600, 13, 1678, 317, 10363, 353, 848, 29889, 3073, 29898, 13609, 29922, 5574, 29897, 13, 1678, 323, 23799, 353, 848, 29889, 3073, 29898, 13609, 29922, 5574, 29892, 321, 359, 29918, 6979, 2433, 29966, 29872, 359, 29958, 1495, 13, 1678, 4235, 353, 518, 877, 4351, 742, 317, 10363, 511, 6702, 29873, 4141, 742, 323, 23799, 4638, 13, 13, 1678, 7945, 29918, 1272, 353, 848, 29889, 8863, 1070, 16390, 24541, 29898, 13, 4706, 2224, 29922, 5085, 29889, 14968, 29892, 13, 4706, 3402, 2433, 1372, 29894, 742, 13, 4706, 4235, 29922, 9621, 29892, 13, 1678, 1723, 13, 13, 1678, 2854, 29918, 1272, 353, 848, 29889, 8863, 1070, 16390, 24541, 29898, 13, 4706, 2224, 29922, 5085, 29889, 3084, 29892, 13, 4706, 3402, 2433, 1372, 29894, 742, 13, 4706, 4235, 29922, 9621, 29892, 13, 1678, 1723, 13, 13, 1678, 317, 10363, 29889, 4282, 29918, 29894, 542, 370, 29898, 14968, 29918, 1272, 29892, 1375, 29918, 29888, 7971, 29922, 5085, 29889, 4351, 29918, 1195, 29918, 29888, 7971, 29897, 13, 1678, 323, 23799, 29889, 4282, 29918, 29894, 542, 370, 29898, 14968, 29918, 1272, 29892, 1375, 29918, 29888, 7971, 29922, 5085, 29889, 29873, 4141, 29918, 1195, 29918, 29888, 7971, 29897, 13, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 5085, 29889, 17314, 381, 1125, 13, 4706, 2897, 29889, 11256, 3972, 29898, 5085, 29889, 17314, 381, 29897, 13, 13, 1678, 396, 4078, 1746, 322, 7931, 370, 352, 653, 13, 1678, 363, 1746, 297, 4235, 29901, 13, 4706, 4078, 29918, 2671, 29898, 5085, 29889, 17314, 381, 29892, 1746, 29897, 13, 4706, 4078, 29918, 29894, 542, 370, 29898, 5085, 29889, 17314, 381, 29892, 1746, 29897, 13, 13, 1678, 396, 731, 20380, 13, 1678, 7945, 29918, 1524, 29892, 2854, 29918, 1524, 353, 848, 29889, 29933, 2707, 300, 20277, 29889, 23579, 1169, 29898, 13, 4706, 313, 14968, 29918, 1272, 29892, 2854, 29918, 1272, 511, 13, 4706, 9853, 29918, 2311, 29922, 5085, 29889, 16175, 29918, 2311, 29892, 13, 4706, 2656, 29918, 2541, 262, 29918, 16175, 29922, 5574, 29892, 13, 4706, 2656, 29918, 1989, 29922, 14013, 921, 29901, 7431, 29898, 29916, 29889, 4351, 511, 13, 4706, 12312, 29922, 8824, 29892, 13, 4706, 4742, 29922, 10141, 13, 1678, 1723, 13, 13, 1678, 1904, 353, 25981, 29906, 11762, 4165, 29876, 29898, 5085, 29892, 4235, 29892, 4742, 467, 517, 29898, 10141, 29897, 13, 1678, 1596, 29898, 4299, 29897, 13, 1678, 1596, 877, 1495, 13, 13, 1678, 28770, 291, 353, 302, 29876, 29889, 29907, 2124, 5292, 14441, 29931, 2209, 29898, 17281, 29918, 2248, 29922, 29911, 23799, 29889, 29894, 542, 370, 29889, 303, 7768, 1839, 29966, 8305, 29958, 11287, 13, 1678, 5994, 3950, 353, 5994, 29889, 26016, 29928, 29898, 4299, 29889, 16744, 3285, 301, 29878, 29922, 5085, 29889, 29212, 29897, 13, 1678, 1364, 14952, 353, 5994, 29889, 29212, 29918, 816, 14952, 29889, 29934, 6085, 346, 29931, 1672, 29876, 3247, 403, 585, 29898, 20640, 3950, 29892, 4464, 2433, 1195, 1495, 13, 1678, 1020, 4983, 353, 3201, 4983, 29898, 4299, 29892, 28770, 291, 29892, 5994, 3950, 29892, 1364, 14952, 29892, 6389, 29889, 24049, 29897, 13, 13, 1678, 21502, 305, 353, 29871, 29896, 13, 1678, 4236, 29918, 1022, 2878, 353, 6389, 29889, 3317, 29918, 1022, 2878, 470, 5844, 29889, 7192, 13, 1678, 4236, 29918, 5504, 353, 6389, 29889, 3317, 29918, 5504, 470, 5844, 29889, 7192, 13, 1678, 1900, 29918, 6758, 353, 5844, 29889, 7192, 13, 13, 1678, 1550, 21502, 305, 529, 4236, 29918, 1022, 2878, 322, 1020, 4983, 29889, 29876, 29918, 786, 15190, 529, 4236, 29918, 5504, 320, 13, 4706, 322, 6389, 29889, 1195, 29918, 29212, 529, 1020, 4983, 29889, 657, 29918, 29212, 7295, 13, 13, 4706, 396, 6694, 13, 4706, 411, 260, 29939, 18933, 29898, 14968, 29918, 1524, 29892, 7343, 29918, 29876, 22724, 29922, 5574, 29897, 408, 282, 1646, 29901, 13, 9651, 7945, 29918, 6758, 353, 29871, 29900, 29889, 29900, 13, 9651, 1020, 4983, 29889, 4299, 29889, 14968, 580, 13, 9651, 363, 11916, 297, 282, 1646, 29901, 13, 18884, 289, 3616, 353, 11916, 29889, 4351, 29889, 2311, 29898, 29896, 29897, 13, 18884, 6410, 353, 1020, 4983, 29889, 10568, 29898, 27736, 29892, 6389, 29889, 13264, 29918, 3605, 601, 29897, 13, 18884, 7945, 29918, 6758, 4619, 6410, 29889, 667, 580, 13, 13, 18884, 396, 4444, 310, 6728, 1646, 13, 18884, 282, 1646, 29889, 842, 29918, 8216, 29898, 29888, 29908, 1022, 2878, 426, 710, 29898, 1022, 2878, 467, 29920, 5589, 29898, 29941, 2915, 1159, 13, 18884, 6728, 29918, 3859, 353, 8170, 287, 21533, 29898, 13, 462, 1678, 6410, 29922, 6758, 29889, 667, 3285, 13, 462, 1678, 282, 572, 29922, 755, 29889, 4548, 29898, 6758, 29889, 667, 25739, 13, 462, 1678, 289, 3616, 29922, 2435, 29898, 27736, 511, 13, 462, 1678, 301, 29878, 29922, 3018, 4983, 29889, 657, 29918, 29212, 3285, 13, 462, 1678, 20102, 29922, 5085, 29889, 24049, 29892, 13, 462, 1678, 954, 29918, 786, 15190, 29922, 3018, 4983, 29889, 29876, 29918, 786, 15190, 29897, 13, 18884, 282, 1646, 29889, 842, 29918, 2490, 5878, 29898, 18035, 29918, 3859, 29897, 13, 4706, 7945, 29918, 6758, 847, 29922, 7431, 29898, 14968, 29918, 1524, 29897, 13, 13, 4706, 1596, 29898, 29888, 29908, 29989, 21502, 305, 426, 710, 29898, 1022, 2878, 467, 29920, 5589, 29898, 29941, 2915, 891, 7945, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 6410, 426, 14968, 29918, 6758, 29901, 29889, 29912, 29946, 930, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 282, 572, 426, 755, 29889, 4548, 29898, 14968, 29918, 6758, 1125, 29889, 29912, 29946, 930, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 301, 29878, 426, 3018, 4983, 29889, 657, 29918, 29212, 7295, 29889, 29896, 29872, 29913, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 20102, 426, 5085, 29889, 24049, 29913, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 954, 29918, 786, 15190, 426, 3018, 4983, 29889, 29876, 29918, 786, 15190, 29913, 891, 1159, 13, 13, 4706, 396, 8845, 13, 4706, 2854, 29918, 6758, 353, 29871, 29900, 29889, 29900, 13, 4706, 1020, 4983, 29889, 4299, 29889, 14513, 580, 13, 4706, 363, 11916, 297, 2854, 29918, 1524, 29901, 13, 9651, 289, 3616, 353, 11916, 29889, 4351, 29889, 2311, 29898, 29896, 29897, 13, 9651, 6410, 353, 1020, 4983, 29889, 10568, 29898, 27736, 29892, 15886, 29918, 3605, 601, 29922, 29900, 29889, 29900, 29897, 13, 9651, 2854, 29918, 6758, 4619, 6410, 29889, 667, 580, 13, 13, 4706, 2854, 29918, 6758, 847, 29922, 7431, 29898, 3084, 29918, 1524, 29897, 13, 13, 4706, 1596, 29898, 29888, 29908, 29989, 21502, 305, 426, 710, 29898, 1022, 2878, 467, 29920, 5589, 29898, 29941, 2915, 891, 2854, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 6410, 426, 3084, 29918, 6758, 29901, 29889, 29912, 29946, 930, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 282, 572, 426, 755, 29889, 4548, 29898, 3084, 29918, 6758, 1125, 29889, 29912, 29946, 930, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 301, 29878, 426, 3018, 4983, 29889, 657, 29918, 29212, 7295, 29889, 29896, 29872, 29913, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 20102, 426, 5085, 29889, 24049, 29913, 9162, 1095, 543, 1159, 13, 4706, 1596, 29898, 29888, 29908, 29989, 954, 29918, 786, 15190, 426, 3018, 4983, 29889, 29876, 29918, 786, 15190, 29913, 891, 1159, 13, 13, 4706, 396, 14238, 1904, 13, 4706, 4078, 29918, 16908, 353, 8853, 14968, 29918, 5085, 1115, 6389, 29892, 13, 462, 268, 376, 3859, 29918, 8977, 1115, 1904, 29889, 3859, 29918, 8977, 28296, 13, 13, 4706, 565, 2854, 29918, 6758, 529, 1900, 29918, 6758, 29901, 13, 9651, 1900, 29918, 6758, 353, 2854, 29918, 6758, 13, 9651, 4078, 29918, 4299, 29898, 7620, 29918, 16908, 29892, 525, 3198, 3149, 29918, 13318, 29889, 415, 1495, 13, 4706, 4078, 29918, 4299, 29898, 7620, 29918, 16908, 29892, 376, 3198, 3149, 29918, 4230, 29889, 415, 1159, 13, 13, 4706, 396, 2767, 13, 4706, 1020, 4983, 29889, 816, 14952, 29889, 10568, 29898, 3084, 29918, 6758, 29897, 13, 4706, 21502, 305, 4619, 29871, 29896, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 877, 1495, 13, 1678, 7945, 29918, 25707, 29898, 16680, 29897, 13, 1678, 1904, 29918, 25707, 29898, 16680, 29897, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 1667, 29898, 5085, 29897, 13, 13, 2 ]
train_medseg_timm-regnetx_002_grid_distortion.py
BrunoKrinski/segtool
0
66955
<reponame>BrunoKrinski/segtool import os ls=["python main.py --configs configs/train_medseg_unetplusplus_timm-regnetx_002_fold0_grid_distortion.yml", "python main.py --configs configs/train_medseg_unetplusplus_timm-regnetx_002_fold1_grid_distortion.yml", "python main.py --configs configs/train_medseg_unetplusplus_timm-regnetx_002_fold2_grid_distortion.yml", "python main.py --configs configs/train_medseg_unetplusplus_timm-regnetx_002_fold3_grid_distortion.yml", "python main.py --configs configs/train_medseg_unetplusplus_timm-regnetx_002_fold4_grid_distortion.yml", ] for l in ls: os.system(l)
[ 1, 529, 276, 1112, 420, 29958, 29933, 3389, 29877, 29968, 17056, 2574, 29914, 10199, 10154, 13, 5215, 2897, 13, 13, 3137, 29922, 3366, 4691, 1667, 29889, 2272, 1192, 2917, 29879, 2295, 29879, 29914, 14968, 29918, 2168, 10199, 29918, 348, 300, 11242, 11242, 29918, 29873, 6727, 29899, 1727, 1212, 29916, 29918, 29900, 29900, 29906, 29918, 8771, 29900, 29918, 7720, 29918, 5721, 441, 291, 29889, 21053, 613, 13, 29908, 4691, 1667, 29889, 2272, 1192, 2917, 29879, 2295, 29879, 29914, 14968, 29918, 2168, 10199, 29918, 348, 300, 11242, 11242, 29918, 29873, 6727, 29899, 1727, 1212, 29916, 29918, 29900, 29900, 29906, 29918, 8771, 29896, 29918, 7720, 29918, 5721, 441, 291, 29889, 21053, 613, 13, 29908, 4691, 1667, 29889, 2272, 1192, 2917, 29879, 2295, 29879, 29914, 14968, 29918, 2168, 10199, 29918, 348, 300, 11242, 11242, 29918, 29873, 6727, 29899, 1727, 1212, 29916, 29918, 29900, 29900, 29906, 29918, 8771, 29906, 29918, 7720, 29918, 5721, 441, 291, 29889, 21053, 613, 13, 29908, 4691, 1667, 29889, 2272, 1192, 2917, 29879, 2295, 29879, 29914, 14968, 29918, 2168, 10199, 29918, 348, 300, 11242, 11242, 29918, 29873, 6727, 29899, 1727, 1212, 29916, 29918, 29900, 29900, 29906, 29918, 8771, 29941, 29918, 7720, 29918, 5721, 441, 291, 29889, 21053, 613, 13, 29908, 4691, 1667, 29889, 2272, 1192, 2917, 29879, 2295, 29879, 29914, 14968, 29918, 2168, 10199, 29918, 348, 300, 11242, 11242, 29918, 29873, 6727, 29899, 1727, 1212, 29916, 29918, 29900, 29900, 29906, 29918, 8771, 29946, 29918, 7720, 29918, 5721, 441, 291, 29889, 21053, 613, 13, 29962, 13, 13, 1454, 301, 297, 19375, 29901, 13, 29871, 2897, 29889, 5205, 29898, 29880, 29897, 2 ]
examples/test_project/mlpa/models.py
movermeyer/madrona
9
73710
from django.contrib.gis.db import models from madrona.features import register from madrona.features.models import PointFeature, LineFeature, PolygonFeature, FeatureCollection from madrona.layers.models import PrivateLayerList from madrona.features.forms import FeatureForm, SpatialFeatureForm DESIGNATION_CHOICES = ( ('R', 'Reserve'), ('P', 'Park'), ('C', 'Conservation Area') ) ########################### @register class Mpa(PolygonFeature): designation = models.CharField(max_length=1, choices=DESIGNATION_CHOICES) class Options: verbose_name = 'Marine Protected Area' form = 'mlpa.models.MpaForm' manipulators = [] class MpaForm(SpatialFeatureForm): class Meta(SpatialFeatureForm.Meta): model = Mpa ########################### @register class Array(FeatureCollection): class Options: form = 'mlpa.models.ArrayForm' valid_children = ('mlpa.models.Mpa', ) class ArrayForm(FeatureForm): class Meta(FeatureForm.Meta): model = Array ########################### @register class Shipwreck(PointFeature): incident = models.CharField(max_length=100,default='') class Options: verbose_name = 'Shipwreck' form = 'mlpa.models.ShipwreckForm' class ShipwreckForm(SpatialFeatureForm): class Meta(SpatialFeatureForm.Meta): model = Shipwreck ########################### @register class Pipeline(LineFeature): type = models.CharField(max_length=30,default='') diameter = models.FloatField(null=True) class Options: verbose_name = 'Pipeline' form = 'mlpa.models.PipelineForm' class PipelineForm(SpatialFeatureForm): class Meta(SpatialFeatureForm.Meta): model = Pipeline ########################### @register class Folder(FeatureCollection): class Options: form = 'mlpa.models.FolderForm' valid_children = ( 'mlpa.models.Mpa', 'mlpa.models.Array', 'mlpa.models.Pipeline', 'mlpa.models.Shipwreck', 'mlpa.models.Folder' ) class FolderForm(FeatureForm): class Meta(FeatureForm.Meta): model = Folder ########################### @register class UserKml(PrivateLayerList): class Options: form = 'mlpa.models.UserKmlForm' class UserKmlForm(FeatureForm): class Meta(FeatureForm.Meta): model = UserKml
[ 1, 515, 9557, 29889, 21570, 29889, 29887, 275, 29889, 2585, 1053, 4733, 13, 3166, 10395, 1617, 29874, 29889, 22100, 1053, 6036, 13, 3166, 10395, 1617, 29874, 29889, 22100, 29889, 9794, 1053, 8984, 19132, 29892, 7407, 19132, 29892, 2043, 17125, 19132, 29892, 5169, 1535, 7196, 13, 3166, 10395, 1617, 29874, 29889, 29277, 29889, 9794, 1053, 12230, 14420, 1293, 13, 3166, 10395, 1617, 29874, 29889, 22100, 29889, 9514, 1053, 5169, 1535, 2500, 29892, 1706, 15238, 19132, 2500, 13, 13, 2287, 5425, 20728, 8098, 29918, 3210, 29949, 2965, 2890, 353, 313, 13, 1678, 6702, 29934, 742, 525, 1666, 7143, 5477, 29871, 13, 1678, 6702, 29925, 742, 525, 29925, 935, 5477, 13, 1678, 6702, 29907, 742, 525, 1168, 2140, 362, 18320, 1495, 13, 29897, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 341, 3274, 29898, 7713, 17125, 19132, 1125, 13, 1678, 2874, 362, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29896, 29892, 19995, 29922, 2287, 5425, 20728, 8098, 29918, 3210, 29949, 2965, 2890, 29897, 13, 13, 1678, 770, 25186, 29901, 13, 4706, 26952, 29918, 978, 353, 525, 7083, 457, 14409, 2954, 18320, 29915, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 29924, 3274, 2500, 29915, 13, 4706, 11525, 352, 4097, 353, 5159, 13, 308, 13, 1990, 341, 3274, 2500, 29898, 29903, 5031, 616, 19132, 2500, 1125, 13, 13, 1678, 770, 20553, 29898, 29903, 5031, 616, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 341, 3274, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 4398, 29898, 19132, 7196, 1125, 13, 13, 1678, 770, 25186, 29901, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 2588, 2500, 29915, 13, 4706, 2854, 29918, 11991, 353, 6702, 828, 3274, 29889, 9794, 29889, 29924, 3274, 742, 1723, 13, 13, 1990, 4398, 2500, 29898, 19132, 2500, 1125, 13, 13, 1678, 770, 20553, 29898, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 4398, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 1383, 666, 29893, 18217, 29898, 5228, 19132, 1125, 13, 1678, 15134, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 4381, 2433, 1495, 13, 418, 13, 1678, 770, 25186, 29901, 13, 4706, 26952, 29918, 978, 353, 525, 2713, 666, 29893, 18217, 29915, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 2713, 666, 29893, 18217, 2500, 29915, 13, 13, 1990, 1383, 666, 29893, 18217, 2500, 29898, 29903, 5031, 616, 19132, 2500, 1125, 13, 1678, 770, 20553, 29898, 29903, 5031, 616, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 1383, 666, 29893, 18217, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 349, 23828, 29898, 3542, 19132, 1125, 13, 1678, 1134, 353, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29941, 29900, 29892, 4381, 2433, 1495, 13, 1678, 24235, 353, 4733, 29889, 11031, 3073, 29898, 4304, 29922, 5574, 29897, 13, 13, 1678, 770, 25186, 29901, 13, 4706, 26952, 29918, 978, 353, 525, 29925, 23828, 29915, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 29925, 23828, 2500, 29915, 13, 13, 1990, 349, 23828, 2500, 29898, 29903, 5031, 616, 19132, 2500, 1125, 13, 1678, 770, 20553, 29898, 29903, 5031, 616, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 349, 23828, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 383, 3194, 29898, 19132, 7196, 1125, 13, 1678, 770, 25186, 29901, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 12924, 2500, 29915, 13, 4706, 2854, 29918, 11991, 353, 313, 29871, 13, 18884, 525, 828, 3274, 29889, 9794, 29889, 29924, 3274, 742, 29871, 13, 18884, 525, 828, 3274, 29889, 9794, 29889, 2588, 742, 29871, 13, 18884, 525, 828, 3274, 29889, 9794, 29889, 29925, 23828, 742, 29871, 13, 18884, 525, 828, 3274, 29889, 9794, 29889, 2713, 666, 29893, 18217, 742, 29871, 13, 18884, 525, 828, 3274, 29889, 9794, 29889, 12924, 29915, 29871, 13, 4706, 1723, 13, 13, 1990, 383, 3194, 2500, 29898, 19132, 2500, 1125, 13, 1678, 770, 20553, 29898, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 383, 3194, 13, 13, 13383, 7346, 2277, 29937, 13, 29992, 9573, 13, 1990, 4911, 29968, 828, 29898, 25207, 14420, 1293, 1125, 13, 1678, 770, 25186, 29901, 13, 4706, 883, 353, 525, 828, 3274, 29889, 9794, 29889, 2659, 29968, 828, 2500, 29915, 13, 13, 1990, 4911, 29968, 828, 2500, 29898, 19132, 2500, 1125, 13, 1678, 770, 20553, 29898, 19132, 2500, 29889, 19346, 1125, 13, 4706, 1904, 353, 4911, 29968, 828, 13, 2 ]
src/components/convLayer.py
JasonYuJjyu/unsupFlownet
24
1606627
<filename>src/components/convLayer.py import tensorflow as tf def convLayer(x,kernelSize, outMaps, stride): # default caffe style MRSA with tf.variable_scope(None,default_name="conv"): inMaps = x.get_shape()[3] kShape = [kernelSize,kernelSize,inMaps,outMaps] w = tf.get_variable("weights",shape=kShape,initializer=tf.uniform_unit_scaling_initializer()) b = tf.get_variable("biases",shape=[outMaps],initializer=tf.constant_initializer(0)) tf.add_to_collection("weights",w) conv = tf.nn.conv2d(x,w,strides=[1,stride,stride,1], padding="SAME",name="conv2d") return conv + b
[ 1, 529, 9507, 29958, 4351, 29914, 14036, 29914, 20580, 14420, 29889, 2272, 13, 5215, 26110, 408, 15886, 13, 13, 1753, 7602, 14420, 29898, 29916, 29892, 17460, 3505, 29892, 714, 29924, 2547, 29892, 380, 2426, 1125, 396, 2322, 274, 3470, 29872, 3114, 29751, 8132, 13, 12, 2541, 15886, 29889, 11918, 29918, 6078, 29898, 8516, 29892, 4381, 29918, 978, 543, 20580, 29908, 1125, 13, 12, 12, 262, 29924, 2547, 353, 921, 29889, 657, 29918, 12181, 580, 29961, 29941, 29962, 13, 13, 12, 12, 29895, 24111, 353, 518, 17460, 3505, 29892, 17460, 3505, 29892, 262, 29924, 2547, 29892, 449, 29924, 2547, 29962, 13, 12, 12, 29893, 353, 15886, 29889, 657, 29918, 11918, 703, 705, 5861, 613, 12181, 29922, 29895, 24111, 29892, 11228, 3950, 29922, 13264, 29889, 29590, 29918, 5441, 29918, 19529, 292, 29918, 11228, 3950, 3101, 13, 12, 12, 29890, 353, 15886, 29889, 657, 29918, 11918, 703, 5365, 2129, 613, 12181, 11759, 449, 29924, 2547, 1402, 11228, 3950, 29922, 13264, 29889, 23362, 29918, 11228, 3950, 29898, 29900, 876, 13, 13, 12, 12, 13264, 29889, 1202, 29918, 517, 29918, 10855, 703, 705, 5861, 613, 29893, 29897, 13, 12, 12, 20580, 353, 15886, 29889, 15755, 29889, 20580, 29906, 29881, 29898, 29916, 29892, 29893, 29892, 710, 2247, 11759, 29896, 29892, 303, 2426, 29892, 303, 2426, 29892, 29896, 1402, 7164, 543, 8132, 2303, 613, 978, 543, 20580, 29906, 29881, 1159, 13, 12, 12, 2457, 7602, 718, 289, 13, 2 ]
route/recent_changes.py
lsh23/openNAMU
0
195404
<reponame>lsh23/openNAMU from .tool.func import * def recent_changes_2(conn, name, tool): curs = conn.cursor() if flask.request.method == 'POST': return redirect( '/diff/' + url_pas(name) + '?first=' + flask.request.form.get('b', '1') + '&second=' + flask.request.form.get('a', '1') ) else: ban = '' select = '' sub = '' div = ''' <table id="main_table_set"> <tbody> <tr> ''' num = int(number_check(flask.request.args.get('num', '1'))) if num * 50 > 0: sql_num = num * 50 - 50 else: sql_num = 0 if name: if tool == 'history': sub += ' (' + load_lang('history') + ')' div += ''' <td id="main_table_width">''' + load_lang('version') + '''</td> <td id="main_table_width">''' + load_lang('editor') + '''</td> <td id="main_table_width">''' + load_lang('time') + '''</td> ''' tool_select = flask.request.args.get('tool', 'normal') if tool_select == 'move': plus_sql = 'where (send like ? or send like ?) and type = "" ' plus_list = ['%(<a>' + name +'</a>%', '%<a>' + name + '</a> move)', sql_num] sub += ' (' + load_lang('move') + ')' elif tool_select == 'delete': plus_sql = 'where (send like "%(delete)") and title = ? and type = "" ' plus_list = [name, sql_num] sub += ' (' + load_lang('revert') + ')' elif tool_select == 'revert': plus_sql = 'where (send like ?) and title = ? and type = "" ' plus_list = ['%(r%)', name, sql_num] sub += ' (' + load_lang('revert') + ')' else: plus_sql = 'where title = ? and type = "" ' plus_list = [name, sql_num] curs.execute(db_change('' + \ 'select id, title, date, ip, send, leng from history ' + \ plus_sql + \ 'order by id + 0 desc ' + \ "limit ?, 50" + \ ''), plus_list) else: div += ''' <td id="main_table_width">''' + load_lang('document_name') + '''</td> <td id="main_table_width">''' + load_lang('editor') + '''</td> <td id="main_table_width">''' + load_lang('time') + '''</td> ''' div = '<a href="/topic_record/' + url_pas(name) + '">(' + load_lang('discussion') + ')</a><hr class=\"main_hr\">' + div curs.execute(db_change('' + \ 'select id, title, date, ip, send, leng from history ' + \ "where ip = ? and type = '' order by date desc limit ?, 50" + \ ''), [name, sql_num]) else: div += ''' <td id="main_table_width">''' + load_lang('document_name') + '''</td> <td id="main_table_width">''' + load_lang('editor') + '''</td> <td id="main_table_width">''' + load_lang('time') + '''</td> ''' set_type = flask.request.args.get('set', 'normal') if set_type == 'normal': div = '' + \ '<a href="?set=user">(' + load_lang('user_document') + ')</a> ' + \ '<a href="?set=req">(' + load_lang('edit_req') + ')</a>' + \ '<hr class="main_hr">' + div + \ '' if set_type == 'req': plus_sql = "where type = 'req' " elif set_type == 'user': plus_sql = "where title like 'user:%' and type = '' " else: plus_sql = "where not title like 'user:%' and type = '' " curs.execute(db_change('' + \ 'select id, title, date, ip, send, leng from history ' + \ plus_sql + \ 'order by date desc ' + \ 'limit ?, 50' + \ ''), [sql_num]) div += '</tr>' data_list = curs.fetchall() for data in data_list: select += '<option value="' + data[0] + '">' + data[0] + '</option>' send = '<br>' if data[4]: if not re.search("^(?: *)$", data[4]): send = data[4] if re.search("\+", data[5]): leng = '<span style="color:green;">(' + data[5] + ')</span>' elif re.search("\-", data[5]): leng = '<span style="color:red;">(' + data[5] + ')</span>' else: leng = '<span style="color:gray;">(' + data[5] + ')</span>' ip = ip_pas(data[3]) if tool == 'history': m_tool = '<a href="/history_tool/' + url_pas(data[1]) + '?num=' + data[0] + '&type=history">(' + load_lang('tool') + ')</a>' else: m_tool = '<a href="/history_tool/' + url_pas(data[1]) + '?num=' + data[0] + '">(' + load_lang('tool') + ')</a>' style = ['', ''] date = data[2] curs.execute(db_change(''' select title from history where title = ? and id = ? and hide = 'O' '''), [data[1], data[0]]) hide = curs.fetchall() if admin_check(6) == 1: if hide: style[0] = 'id="toron_color_grey"' style[1] = 'id="toron_color_grey"' send += ' (' + load_lang('hide') + ')' elif not hide: pass else: ip = '' ban = '' date = '' send = '(' + load_lang('hide') + ')' style[0] = 'style="display: none;"' style[1] = 'id="toron_color_grey"' if tool == 'history': title = '<a href="/w/' + url_pas(name) + '?num=' + data[0] + '">r' + data[0] + '</a> ' else: if not name and set_type == 'req': title = '<a href="/edit_req/' + url_pas(data[1]) + '?r=' + data[0] + '">' + html.escape(data[1]) + ' (r' + data[0] + ')</a> ' else: title = '<a href="/w/' + url_pas(data[1]) + '">' + html.escape(data[1]) + '</a> ' title += '<a href="/history/' + url_pas(data[1]) + '">(r' + data[0] + ')</a> ' div += ''' <tr ''' + style[0] + '''> <td>''' + title + m_tool + ' ' + leng + '''</td> <td>''' + ip + ban + '''</td> <td>''' + date + '''</td> </tr> <tr ''' + style[1] + '''> <td colspan="3">''' + send_parser(send) + '''</td> </tr> ''' div += ''' </tbody> </table> ''' if name: if tool == 'history': if not tool_select: div = '' + \ '<a href="?tool=move">(' + load_lang('move') + ')</a> ' + \ '<a href="?tool=delete">(' + load_lang('delete') + ')</a> ' + \ '<a href="?tool=revert">(' + load_lang('revert') + ')</a>' + \ '<hr class="main_hr">' + div + \ '' menu = [['w/' + url_pas(name), load_lang('document')], ['raw/' + url_pas(name), load_lang('raw')]] else: menu = [['history/' + url_pas(name), load_lang('return')]] div = ''' <form method="post"> <select name="a">''' + select + '''</select> <select name="b">''' + select + '''</select> <button type="submit">''' + load_lang('compare') + '''</button> </form> <hr class=\"main_hr\"> ''' + div title = name div += next_fix('/history/' + url_pas(name) + '?tool=' + tool_select + '&num=', num, data_list) else: title = load_lang('edit_record') menu = [['other', load_lang('other')], ['user', load_lang('user')], ['count/' + url_pas(name), load_lang('count')]] div += next_fix('/record/' + url_pas(name) + '?num=', num, data_list) else: menu = 0 title = load_lang('recent_change') div += next_fix('/recent_changes?set=' + set_type + '&num=', num, data_list) if set_type == 'user': sub = ' (' + load_lang('user') + ')' menu = [['recent_changes', load_lang('return')]] elif set_type == 'req': sub = ' (' + load_lang('edit_req') + ')' menu = [['recent_changes', load_lang('return')]] if sub == '': sub = 0 return easy_minify(flask.render_template(skin_check(), imp = [title, wiki_set(), custom(), other2([sub, 0])], data = div, menu = menu ))
[ 1, 529, 276, 1112, 420, 29958, 29880, 845, 29906, 29941, 29914, 3150, 3521, 29924, 29965, 13, 3166, 869, 10154, 29889, 9891, 1053, 334, 13, 13, 1753, 7786, 29918, 25990, 29918, 29906, 29898, 13082, 29892, 1024, 29892, 5780, 1125, 13, 1678, 18580, 353, 11009, 29889, 18127, 580, 13, 13, 1678, 565, 29784, 29889, 3827, 29889, 5696, 1275, 525, 5438, 2396, 13, 4706, 736, 6684, 29898, 13, 9651, 8207, 12765, 22208, 718, 3142, 29918, 18182, 29898, 978, 29897, 718, 13, 9651, 525, 29973, 4102, 2433, 718, 29784, 29889, 3827, 29889, 689, 29889, 657, 877, 29890, 742, 525, 29896, 1495, 718, 13, 9651, 525, 29987, 7496, 2433, 718, 29784, 29889, 3827, 29889, 689, 29889, 657, 877, 29874, 742, 525, 29896, 1495, 13, 4706, 1723, 13, 1678, 1683, 29901, 308, 13, 4706, 9892, 353, 6629, 13, 4706, 1831, 353, 6629, 13, 4706, 1014, 353, 6629, 13, 13, 4706, 1933, 353, 14550, 13, 9651, 529, 2371, 1178, 543, 3396, 29918, 2371, 29918, 842, 1013, 13, 18884, 529, 15370, 29958, 13, 462, 1678, 529, 509, 29958, 13, 4706, 14550, 13, 308, 13, 4706, 954, 353, 938, 29898, 4537, 29918, 3198, 29898, 1579, 1278, 29889, 3827, 29889, 5085, 29889, 657, 877, 1949, 742, 525, 29896, 29915, 4961, 13, 4706, 565, 954, 334, 29871, 29945, 29900, 1405, 29871, 29900, 29901, 13, 9651, 4576, 29918, 1949, 353, 954, 334, 29871, 29945, 29900, 448, 29871, 29945, 29900, 13, 4706, 1683, 29901, 13, 9651, 4576, 29918, 1949, 353, 29871, 29900, 1678, 13, 13, 4706, 565, 1024, 29901, 13, 9651, 565, 5780, 1275, 525, 18434, 2396, 13, 18884, 1014, 4619, 525, 6702, 718, 2254, 29918, 3893, 877, 18434, 1495, 718, 525, 16029, 13, 13, 18884, 1933, 4619, 14550, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 3259, 1495, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 15204, 1495, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 2230, 1495, 718, 14550, 829, 1594, 29958, 13, 18884, 14550, 13, 462, 13, 18884, 5780, 29918, 2622, 353, 29784, 29889, 3827, 29889, 5085, 29889, 657, 877, 10154, 742, 525, 8945, 1495, 13, 18884, 565, 5780, 29918, 2622, 1275, 525, 11631, 2396, 13, 462, 1678, 2298, 29918, 2850, 353, 525, 3062, 313, 6717, 763, 1577, 470, 3638, 763, 1577, 29897, 322, 1134, 353, 5124, 525, 13, 462, 1678, 2298, 29918, 1761, 353, 6024, 29995, 29898, 29966, 29874, 16299, 718, 1024, 718, 29915, 829, 29874, 29958, 29995, 742, 14210, 29966, 29874, 16299, 718, 1024, 718, 525, 829, 29874, 29958, 4337, 29897, 742, 4576, 29918, 1949, 29962, 268, 13, 462, 1678, 1014, 4619, 525, 6702, 718, 2254, 29918, 3893, 877, 11631, 1495, 718, 525, 16029, 13, 18884, 25342, 5780, 29918, 2622, 1275, 525, 8143, 2396, 13, 462, 1678, 2298, 29918, 2850, 353, 525, 3062, 313, 6717, 763, 11860, 29898, 8143, 25760, 322, 3611, 353, 1577, 322, 1134, 353, 5124, 525, 13, 462, 1678, 2298, 29918, 1761, 353, 518, 978, 29892, 4576, 29918, 1949, 29962, 268, 13, 462, 1678, 1014, 4619, 525, 6702, 718, 2254, 29918, 3893, 877, 276, 1765, 1495, 718, 525, 16029, 13, 18884, 25342, 5780, 29918, 2622, 1275, 525, 276, 1765, 2396, 13, 462, 1678, 2298, 29918, 2850, 353, 525, 3062, 313, 6717, 763, 1577, 29897, 322, 3611, 353, 1577, 322, 1134, 353, 5124, 525, 13, 462, 1678, 2298, 29918, 1761, 353, 6024, 29995, 29898, 29878, 10997, 742, 1024, 29892, 4576, 29918, 1949, 29962, 268, 13, 462, 1678, 1014, 4619, 525, 6702, 718, 2254, 29918, 3893, 877, 276, 1765, 1495, 718, 525, 16029, 13, 18884, 1683, 29901, 13, 462, 1678, 2298, 29918, 2850, 353, 525, 3062, 3611, 353, 1577, 322, 1134, 353, 5124, 525, 13, 462, 1678, 2298, 29918, 1761, 353, 518, 978, 29892, 4576, 29918, 1949, 29962, 13, 13, 18884, 18580, 29889, 7978, 29898, 2585, 29918, 3167, 877, 29915, 718, 320, 13, 462, 1678, 525, 2622, 1178, 29892, 3611, 29892, 2635, 29892, 10377, 29892, 3638, 29892, 28537, 515, 4955, 525, 718, 320, 13, 462, 1678, 2298, 29918, 2850, 718, 320, 13, 462, 1678, 525, 2098, 491, 1178, 718, 29871, 29900, 5153, 525, 718, 320, 13, 462, 1678, 376, 13400, 1577, 29892, 29871, 29945, 29900, 29908, 718, 320, 13, 18884, 525, 5477, 2298, 29918, 1761, 29897, 13, 9651, 1683, 29901, 13, 18884, 1933, 4619, 29871, 14550, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 3225, 29918, 978, 1495, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 15204, 1495, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 2230, 1495, 718, 14550, 829, 1594, 29958, 13, 18884, 14550, 13, 13, 18884, 1933, 353, 12801, 29874, 2822, 13802, 13010, 29918, 11651, 22208, 718, 3142, 29918, 18182, 29898, 978, 29897, 718, 525, 1013, 877, 718, 2254, 29918, 3893, 877, 26404, 1495, 718, 25710, 829, 29874, 5299, 1092, 770, 14672, 3396, 29918, 1092, 29905, 1013, 29915, 718, 1933, 13, 462, 13, 18884, 18580, 29889, 7978, 29898, 2585, 29918, 3167, 877, 29915, 718, 320, 13, 462, 1678, 525, 2622, 1178, 29892, 3611, 29892, 2635, 29892, 10377, 29892, 3638, 29892, 28537, 515, 4955, 525, 718, 320, 13, 462, 1678, 376, 3062, 10377, 353, 1577, 322, 1134, 353, 6629, 1797, 491, 2635, 5153, 4046, 1577, 29892, 29871, 29945, 29900, 29908, 718, 320, 13, 18884, 525, 5477, 518, 978, 29892, 4576, 29918, 1949, 2314, 13, 4706, 1683, 29901, 13, 9651, 1933, 4619, 29871, 14550, 13, 18884, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 3225, 29918, 978, 1495, 718, 14550, 829, 1594, 29958, 13, 18884, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 15204, 1495, 718, 14550, 829, 1594, 29958, 13, 18884, 529, 1594, 1178, 543, 3396, 29918, 2371, 29918, 2103, 1013, 12008, 718, 2254, 29918, 3893, 877, 2230, 1495, 718, 14550, 829, 1594, 29958, 13, 9651, 14550, 13, 13, 9651, 731, 29918, 1853, 353, 29784, 29889, 3827, 29889, 5085, 29889, 657, 877, 842, 742, 525, 8945, 1495, 13, 9651, 565, 731, 29918, 1853, 1275, 525, 8945, 2396, 13, 18884, 1933, 353, 6629, 718, 320, 13, 462, 1678, 12801, 29874, 2822, 543, 29973, 842, 29922, 1792, 1013, 877, 718, 2254, 29918, 3893, 877, 1792, 29918, 3225, 1495, 718, 25710, 829, 29874, 29958, 525, 718, 320, 13, 462, 1678, 12801, 29874, 2822, 543, 29973, 842, 29922, 7971, 1013, 877, 718, 2254, 29918, 3893, 877, 5628, 29918, 7971, 1495, 718, 25710, 829, 29874, 16299, 718, 320, 13, 462, 1678, 12801, 1092, 770, 543, 3396, 29918, 1092, 1013, 29915, 718, 1933, 718, 320, 13, 18884, 6629, 13, 13, 9651, 565, 731, 29918, 1853, 1275, 525, 7971, 2396, 13, 18884, 2298, 29918, 2850, 353, 376, 3062, 1134, 353, 525, 7971, 29915, 376, 13, 9651, 25342, 731, 29918, 1853, 1275, 525, 1792, 2396, 13, 18884, 2298, 29918, 2850, 353, 376, 3062, 3611, 763, 525, 1792, 16664, 29915, 322, 1134, 353, 6629, 376, 13, 9651, 1683, 29901, 13, 18884, 2298, 29918, 2850, 353, 376, 3062, 451, 3611, 763, 525, 1792, 16664, 29915, 322, 1134, 353, 6629, 376, 13, 13, 9651, 18580, 29889, 7978, 29898, 2585, 29918, 3167, 877, 29915, 718, 320, 13, 18884, 525, 2622, 1178, 29892, 3611, 29892, 2635, 29892, 10377, 29892, 3638, 29892, 28537, 515, 4955, 525, 718, 320, 13, 18884, 2298, 29918, 2850, 718, 320, 13, 18884, 525, 2098, 491, 2635, 5153, 525, 718, 320, 13, 18884, 525, 13400, 1577, 29892, 29871, 29945, 29900, 29915, 718, 320, 13, 9651, 525, 5477, 518, 2850, 29918, 1949, 2314, 13, 13, 4706, 1933, 4619, 525, 829, 509, 16299, 13, 13, 4706, 848, 29918, 1761, 353, 18580, 29889, 9155, 497, 580, 13, 4706, 363, 848, 297, 848, 29918, 1761, 29901, 268, 13, 9651, 1831, 4619, 12801, 3385, 995, 543, 29915, 718, 848, 29961, 29900, 29962, 718, 525, 1013, 29915, 718, 848, 29961, 29900, 29962, 718, 525, 829, 3385, 16299, 418, 13, 9651, 3638, 353, 12801, 1182, 16299, 13, 632, 13, 9651, 565, 848, 29961, 29946, 5387, 13, 18884, 565, 451, 337, 29889, 4478, 703, 29985, 10780, 29901, 334, 1262, 613, 848, 29961, 29946, 29962, 1125, 13, 462, 1678, 3638, 353, 848, 29961, 29946, 29962, 13, 632, 13, 9651, 565, 337, 29889, 4478, 14182, 29974, 613, 848, 29961, 29945, 29962, 1125, 13, 18884, 28537, 353, 12801, 9653, 3114, 543, 2780, 29901, 12692, 12334, 877, 718, 848, 29961, 29945, 29962, 718, 25710, 829, 9653, 16299, 13, 9651, 25342, 337, 29889, 4478, 14182, 29899, 613, 848, 29961, 29945, 29962, 1125, 13, 18884, 28537, 353, 12801, 9653, 3114, 543, 2780, 29901, 1127, 12334, 877, 718, 848, 29961, 29945, 29962, 718, 25710, 829, 9653, 16299, 13, 9651, 1683, 29901, 13, 18884, 28537, 353, 12801, 9653, 3114, 543, 2780, 29901, 21012, 12334, 877, 718, 848, 29961, 29945, 29962, 718, 25710, 829, 9653, 16299, 13, 462, 13, 9651, 10377, 353, 10377, 29918, 18182, 29898, 1272, 29961, 29941, 2314, 13, 9651, 565, 5780, 1275, 525, 18434, 2396, 13, 18884, 286, 29918, 10154, 353, 12801, 29874, 2822, 13802, 18434, 29918, 10154, 22208, 718, 3142, 29918, 18182, 29898, 1272, 29961, 29896, 2314, 718, 525, 29973, 1949, 2433, 718, 848, 29961, 29900, 29962, 718, 525, 29987, 1853, 29922, 18434, 1013, 877, 718, 2254, 29918, 3893, 877, 10154, 1495, 718, 25710, 829, 29874, 16299, 13, 9651, 1683, 29901, 13, 18884, 286, 29918, 10154, 353, 12801, 29874, 2822, 13802, 18434, 29918, 10154, 22208, 718, 3142, 29918, 18182, 29898, 1272, 29961, 29896, 2314, 718, 525, 29973, 1949, 2433, 718, 848, 29961, 29900, 29962, 718, 525, 1013, 877, 718, 2254, 29918, 3893, 877, 10154, 1495, 718, 25710, 829, 29874, 16299, 13, 632, 13, 9651, 3114, 353, 6024, 742, 525, 2033, 13, 9651, 2635, 353, 848, 29961, 29906, 29962, 13, 13, 9651, 18580, 29889, 7978, 29898, 2585, 29918, 3167, 877, 4907, 13, 18884, 1831, 3611, 515, 4955, 13, 18884, 988, 3611, 353, 1577, 322, 1178, 353, 1577, 322, 9563, 353, 525, 29949, 29915, 13, 9651, 14550, 511, 518, 1272, 29961, 29896, 1402, 848, 29961, 29900, 24960, 13, 9651, 9563, 353, 18580, 29889, 9155, 497, 580, 13, 632, 13, 9651, 565, 4113, 29918, 3198, 29898, 29953, 29897, 1275, 29871, 29896, 29901, 13, 18884, 565, 9563, 29901, 462, 268, 13, 462, 1678, 3114, 29961, 29900, 29962, 353, 525, 333, 543, 7345, 265, 29918, 2780, 29918, 7979, 29891, 29908, 29915, 13, 462, 1678, 3114, 29961, 29896, 29962, 353, 525, 333, 543, 7345, 265, 29918, 2780, 29918, 7979, 29891, 29908, 29915, 13, 462, 268, 13, 462, 1678, 3638, 4619, 525, 6702, 718, 2254, 29918, 3893, 877, 11458, 1495, 718, 525, 16029, 13, 9651, 25342, 451, 9563, 29901, 13, 18884, 1209, 13, 9651, 1683, 29901, 13, 18884, 10377, 353, 6629, 13, 18884, 9892, 353, 6629, 13, 18884, 2635, 353, 6629, 13, 13, 18884, 3638, 353, 525, 877, 718, 2254, 29918, 3893, 877, 11458, 1495, 718, 525, 16029, 13, 13, 18884, 3114, 29961, 29900, 29962, 353, 525, 3293, 543, 4990, 29901, 5642, 15458, 29915, 13, 18884, 3114, 29961, 29896, 29962, 353, 525, 333, 543, 7345, 265, 29918, 2780, 29918, 7979, 29891, 29908, 29915, 13, 13, 9651, 565, 5780, 1275, 525, 18434, 2396, 13, 18884, 3611, 353, 12801, 29874, 2822, 13802, 29893, 22208, 718, 3142, 29918, 18182, 29898, 978, 29897, 718, 525, 29973, 1949, 2433, 718, 848, 29961, 29900, 29962, 718, 525, 1013, 29878, 29915, 718, 848, 29961, 29900, 29962, 718, 525, 829, 29874, 29958, 525, 13, 9651, 1683, 29901, 13, 18884, 565, 451, 1024, 322, 731, 29918, 1853, 1275, 525, 7971, 2396, 13, 462, 1678, 3611, 353, 12801, 29874, 2822, 13802, 5628, 29918, 7971, 22208, 718, 3142, 29918, 18182, 29898, 1272, 29961, 29896, 2314, 718, 525, 29973, 29878, 2433, 718, 848, 29961, 29900, 29962, 718, 525, 1013, 29915, 718, 3472, 29889, 21587, 29898, 1272, 29961, 29896, 2314, 718, 525, 313, 29878, 29915, 718, 848, 29961, 29900, 29962, 718, 25710, 829, 29874, 29958, 525, 13, 18884, 1683, 29901, 13, 462, 1678, 3611, 353, 12801, 29874, 2822, 13802, 29893, 22208, 718, 3142, 29918, 18182, 29898, 1272, 29961, 29896, 2314, 718, 525, 1013, 29915, 718, 3472, 29889, 21587, 29898, 1272, 29961, 29896, 2314, 718, 525, 829, 29874, 29958, 525, 13, 462, 1678, 3611, 4619, 12801, 29874, 2822, 13802, 18434, 22208, 718, 3142, 29918, 18182, 29898, 1272, 29961, 29896, 2314, 718, 525, 1013, 29898, 29878, 29915, 718, 848, 29961, 29900, 29962, 718, 25710, 829, 29874, 29958, 525, 13, 13, 9651, 1933, 4619, 29871, 14550, 13, 18884, 529, 509, 14550, 718, 3114, 29961, 29900, 29962, 718, 14550, 29958, 13, 462, 1678, 529, 1594, 29958, 12008, 718, 3611, 718, 286, 29918, 10154, 718, 525, 525, 718, 28537, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 29958, 12008, 718, 10377, 718, 9892, 718, 14550, 829, 1594, 29958, 13, 462, 1678, 529, 1594, 29958, 12008, 718, 2635, 718, 14550, 829, 1594, 29958, 13, 18884, 1533, 509, 29958, 13, 18884, 529, 509, 14550, 718, 3114, 29961, 29896, 29962, 718, 14550, 29958, 13, 462, 1678, 529, 1594, 784, 9653, 543, 29941, 1013, 12008, 718, 3638, 29918, 16680, 29898, 6717, 29897, 718, 14550, 829, 1594, 29958, 13, 18884, 1533, 509, 29958, 13, 9651, 14550, 13, 13, 4706, 1933, 4619, 29871, 14550, 13, 18884, 1533, 15370, 29958, 13, 9651, 1533, 2371, 29958, 13, 4706, 14550, 13, 13, 4706, 565, 1024, 29901, 13, 9651, 565, 5780, 1275, 525, 18434, 2396, 13, 18884, 565, 451, 5780, 29918, 2622, 29901, 13, 462, 1678, 1933, 353, 6629, 718, 320, 13, 462, 4706, 12801, 29874, 2822, 543, 29973, 10154, 29922, 11631, 1013, 877, 718, 2254, 29918, 3893, 877, 11631, 1495, 718, 25710, 829, 29874, 29958, 525, 718, 320, 13, 462, 4706, 12801, 29874, 2822, 543, 29973, 10154, 29922, 8143, 1013, 877, 718, 2254, 29918, 3893, 877, 8143, 1495, 718, 25710, 829, 29874, 29958, 525, 718, 320, 13, 462, 4706, 12801, 29874, 2822, 543, 29973, 10154, 29922, 276, 1765, 1013, 877, 718, 2254, 29918, 3893, 877, 276, 1765, 1495, 718, 25710, 829, 29874, 16299, 718, 320, 13, 462, 4706, 12801, 1092, 770, 543, 3396, 29918, 1092, 1013, 29915, 718, 1933, 718, 320, 13, 462, 1678, 6629, 13, 13, 462, 1678, 6143, 353, 518, 1839, 29893, 22208, 718, 3142, 29918, 18182, 29898, 978, 511, 2254, 29918, 3893, 877, 3225, 1495, 1402, 6024, 1610, 22208, 718, 3142, 29918, 18182, 29898, 978, 511, 2254, 29918, 3893, 877, 1610, 1495, 5262, 13, 18884, 1683, 29901, 13, 462, 1678, 6143, 353, 518, 1839, 18434, 22208, 718, 3142, 29918, 18182, 29898, 978, 511, 2254, 29918, 3893, 877, 2457, 1495, 5262, 13, 13, 18884, 1933, 353, 14550, 13, 462, 1678, 529, 689, 1158, 543, 2490, 1013, 13, 462, 4706, 529, 2622, 1024, 543, 29874, 1013, 12008, 718, 1831, 718, 14550, 829, 2622, 29958, 529, 2622, 1024, 543, 29890, 1013, 12008, 718, 1831, 718, 14550, 829, 2622, 29958, 13, 462, 4706, 529, 3092, 1134, 543, 7892, 1013, 12008, 718, 2254, 29918, 3893, 877, 18307, 1495, 718, 14550, 829, 3092, 29958, 13, 462, 1678, 1533, 689, 29958, 13, 462, 1678, 529, 1092, 770, 14672, 3396, 29918, 1092, 29905, 1013, 13, 18884, 14550, 718, 1933, 13, 18884, 3611, 353, 1024, 13, 18884, 1933, 4619, 2446, 29918, 5878, 11219, 18434, 22208, 718, 3142, 29918, 18182, 29898, 978, 29897, 718, 525, 29973, 10154, 2433, 718, 5780, 29918, 2622, 718, 525, 29987, 1949, 29922, 742, 954, 29892, 848, 29918, 1761, 29897, 13, 9651, 1683, 29901, 13, 18884, 3611, 353, 2254, 29918, 3893, 877, 5628, 29918, 11651, 1495, 13, 18884, 6143, 353, 518, 1839, 1228, 742, 2254, 29918, 3893, 877, 1228, 1495, 1402, 6024, 1792, 742, 2254, 29918, 3893, 877, 1792, 1495, 1402, 6024, 2798, 22208, 718, 3142, 29918, 18182, 29898, 978, 511, 2254, 29918, 3893, 877, 2798, 1495, 5262, 13, 18884, 1933, 4619, 2446, 29918, 5878, 11219, 11651, 22208, 718, 3142, 29918, 18182, 29898, 978, 29897, 718, 525, 29973, 1949, 29922, 742, 954, 29892, 848, 29918, 1761, 29897, 13, 4706, 1683, 29901, 13, 9651, 6143, 353, 29871, 29900, 13, 9651, 3611, 353, 2254, 29918, 3893, 877, 276, 1760, 29918, 3167, 1495, 13, 9651, 1933, 4619, 2446, 29918, 5878, 11219, 276, 1760, 29918, 25990, 29973, 842, 2433, 718, 731, 29918, 1853, 718, 525, 29987, 1949, 29922, 742, 954, 29892, 848, 29918, 1761, 29897, 13, 13, 9651, 565, 731, 29918, 1853, 1275, 525, 1792, 2396, 13, 18884, 1014, 353, 525, 6702, 718, 2254, 29918, 3893, 877, 1792, 1495, 718, 525, 16029, 13, 18884, 6143, 353, 518, 1839, 276, 1760, 29918, 25990, 742, 2254, 29918, 3893, 877, 2457, 1495, 5262, 13, 9651, 25342, 731, 29918, 1853, 1275, 525, 7971, 2396, 13, 18884, 1014, 353, 525, 6702, 718, 2254, 29918, 3893, 877, 5628, 29918, 7971, 1495, 718, 525, 16029, 13, 18884, 6143, 353, 518, 1839, 276, 1760, 29918, 25990, 742, 2254, 29918, 3893, 877, 2457, 1495, 5262, 13, 308, 13, 4706, 565, 1014, 1275, 525, 2396, 13, 9651, 1014, 353, 29871, 29900, 13, 462, 13, 4706, 736, 4780, 29918, 1195, 1598, 29898, 1579, 1278, 29889, 9482, 29918, 6886, 29898, 808, 262, 29918, 3198, 3285, 29871, 13, 9651, 2411, 353, 518, 3257, 29892, 281, 10058, 29918, 842, 3285, 2888, 3285, 916, 29906, 4197, 1491, 29892, 29871, 29900, 2314, 1402, 13, 9651, 848, 353, 1933, 29892, 13, 9651, 6143, 353, 6143, 13, 308, 876, 2 ]
nipype/interfaces/semtools/diffusion/diffusion.py
sebastientourbier/nipype
2
71827
# -*- coding: utf-8 -*- # -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" import os from ...base import (CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath) class dtiaverageInputSpec(CommandLineInputSpec): inputs = InputMultiPath(File(exists=True), desc="List of all the tensor fields to be averaged", argstr="--inputs %s...") tensor_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Averaged tensor volume", argstr="--tensor_output %s") DTI_double = traits.Bool(desc="Tensor components are saved as doubles (cannot be visualized in Slicer)", argstr="--DTI_double ") verbose = traits.Bool(desc="produce verbose output", argstr="--verbose ") class dtiaverageOutputSpec(TraitedSpec): tensor_output = File(desc="Averaged tensor volume", exists=True) class dtiaverage(SEMLikeCommandLine): """title: DTIAverage (DTIProcess) category: Diffusion.Diffusion Tensor Images.CommandLineOnly description: dtiaverage is a program that allows to compute the average of an arbitrary number of tensor fields (listed after the --inputs option) This program is used in our pipeline as the last step of the atlas building processing. When all the tensor fields have been deformed in the same space, to create the average tensor field (--tensor_output) we use dtiaverage. Several average method can be used (specified by the --method option): euclidian, log-euclidian and pga. The default being euclidian. version: 1.0.0 documentation-url: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DTIProcess license: Copyright (c) <NAME>. All rights reserved. See http://www.ia.unc.edu/dev/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. contributor: <NAME> """ input_spec = dtiaverageInputSpec output_spec = dtiaverageOutputSpec _cmd = " dtiaverage " _outputs_filenames = {'tensor_output': 'tensor_output.nii'} _redirect_x = False class dtiestimInputSpec(CommandLineInputSpec): dwi_image = File(desc="DWI image volume (required)", exists=True, argstr="--dwi_image %s") tensor_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Tensor OutputImage", argstr="--tensor_output %s") B0 = traits.Either(traits.Bool, File(), hash_files=False, desc="Baseline image, average of all baseline images", argstr="--B0 %s") idwi = traits.Either(traits.Bool, File(), hash_files=False, desc="idwi output image. Image with isotropic diffusion-weighted information = geometric mean of diffusion images", argstr="--idwi %s") B0_mask_output = traits.Either(traits.Bool, File(), hash_files=False, desc="B0 mask used for the estimation. B0 thresholded either with the -t option value or the automatic OTSU value", argstr="--B0_mask_output %s") brain_mask = File(desc="Brain mask. Image where for every voxel == 0 the tensors are not estimated. Be aware that in addition a threshold based masking will be performed by default. If such an additional threshold masking is NOT desired, then use option -t 0.", exists=True, argstr="--brain_mask %s") bad_region_mask = File(desc="Bad region mask. Image where for every voxel > 0 the tensors are not estimated", exists=True, argstr="--bad_region_mask %s") method = traits.Enum("lls", "wls", "nls", "ml", desc="Esitmation method (lls:linear least squares, wls:weighted least squares, nls:non-linear least squares, ml:maximum likelihood)", argstr="--method %s") correction = traits.Enum("none", "zero", "abs", "nearest", desc="Correct the tensors if computed tensor is not semi-definite positive", argstr="--correction %s") threshold = traits.Int(desc="Baseline threshold for estimation. If not specified calculated using an OTSU threshold on the baseline image.", argstr="--threshold %d") weight_iterations = traits.Int(desc="Number of iterations to recaluate weightings from tensor estimate", argstr="--weight_iterations %d") step = traits.Float(desc="Gradient descent step size (for nls and ml methods)", argstr="--step %f") sigma = traits.Float(argstr="--sigma %f") DTI_double = traits.Bool(desc="Tensor components are saved as doubles (cannot be visualized in Slicer)", argstr="--DTI_double ") verbose = traits.Bool(desc="produce verbose output", argstr="--verbose ") defaultTensor = InputMultiPath(traits.Float, desc="Default tensor used if estimated tensor is below a given threshold", sep=",", argstr="--defaultTensor %s") shiftNeg = traits.Bool( desc="Shift eigenvalues so all are positive (accounts for bad tensors related to noise or acquisition error). This is the same option as the one available in DWIToDTIEstimation in Slicer (but instead of just adding the minimum eigenvalue to all the eigenvalues if it is smaller than 0, we use a coefficient to have stictly positive eigenvalues", argstr="--shiftNeg ") shiftNegCoeff = traits.Float( desc="Shift eigenvalues so all are positive (accounts for bad tensors related to noise or acquisition error). Instead of just adding the minimum eigenvalue to all the eigenvalues if it is smaller than 0, we use a coefficient to have stictly positive eigenvalues. Coefficient must be between 1.0 and 1.001 (included).", argstr="--shiftNegCoeff %f") class dtiestimOutputSpec(TraitedSpec): tensor_output = File(desc="Tensor OutputImage", exists=True) B0 = File(desc="Baseline image, average of all baseline images", exists=True) idwi = File(desc="idwi output image. Image with isotropic diffusion-weighted information = geometric mean of diffusion images", exists=True) B0_mask_output = File(desc="B0 mask used for the estimation. B0 thresholded either with the -t option value or the automatic OTSU value", exists=True) class dtiestim(SEMLikeCommandLine): """title: DTIEstim (DTIProcess) category: Diffusion.Diffusion Weighted Images description: dtiestim is a tool that takes in a set of DWIs (with --dwi_image option) in nrrd format and estimates a tensor field out of it. The output tensor file name is specified with the --tensor_output option There are several methods to estimate the tensors which you can specify with the option --method lls|wls|nls|ml . Here is a short description of the different methods: lls Linear least squares. Standard estimation technique that recovers the tensor parameters by multiplying the log of the normalized signal intensities by the pseudo-inverse of the gradient matrix. Default option. wls Weighted least squares. This method is similar to the linear least squares method except that the gradient matrix is weighted by the original lls estimate. (See <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., and <NAME>. Formal characterization and extension of the linearized diffusion tensor model. Human Brain Mapping 24, 2 (Feb. 2005), 144-155. for more information on this method). This method is recommended for most applications. The weight for each iteration can be specified with the --weight_iterations. It is not currently the default due to occasional matrix singularities. nls Non-linear least squares. This method does not take the log of the signal and requires an optimization based on levenberg-marquadt to optimize the parameters of the signal. The lls estimate is used as an initialization. For this method the step size can be specified with the --step option. ml Maximum likelihood estimation. This method is experimental and is not currently recommended. For this ml method the sigma can be specified with the option --sigma and the step size can be specified with the --step option. You can set a threshold (--threshold) to have the tensor estimated to only a subset of voxels. All the baseline voxel value higher than the threshold define the voxels where the tensors are computed. If not specified the threshold is calculated using an OTSU threshold on the baseline image.The masked generated by the -t option or by the otsu value can be saved with the --B0_mask_output option. dtiestim also can extract a few scalar images out of the DWI set of images: - the average baseline image (--B0) which is the average of all the B0s. - the IDWI (--idwi)which is the geometric mean of the diffusion images. You can also load a mask if you want to compute the tensors only where the voxels are non-zero (--brain_mask) or a negative mask and the tensors will be estimated where the negative mask has zero values (--bad_region_mask) version: 1.2.0 documentation-url: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DTIProcess license: Copyright (c) <NAME>. All rights reserved. See http://www.ia.unc.edu/dev/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. contributor: <NAME>, <NAME> acknowledgements: <NAME>(1,3,4); <NAME>(1); (1=University of Iowa Department of Psychiatry, 3=University of Iowa Department of Biomedical Engineering, 4=University of Iowa Department of Electrical and Computer Engineering) provided conversions to make DTIProcess compatible with Slicer execution, and simplified the stand-alone build requirements by removing the dependancies on boost and a fortran compiler. """ input_spec = dtiestimInputSpec output_spec = dtiestimOutputSpec _cmd = " dtiestim " _outputs_filenames = {'B0': 'B0.nii', 'idwi': 'idwi.nii', 'tensor_output': 'tensor_output.nii', 'B0_mask_output': 'B0_mask_output.nii'} _redirect_x = False class dtiprocessInputSpec(CommandLineInputSpec): dti_image = File(desc="DTI tensor volume", exists=True, argstr="--dti_image %s") fa_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Fractional Anisotropy output file", argstr="--fa_output %s") md_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Mean Diffusivity output file", argstr="--md_output %s") sigma = traits.Float(desc="Scale of gradients", argstr="--sigma %f") fa_gradient_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Fractional Anisotropy Gradient output file", argstr="--fa_gradient_output %s") fa_gradmag_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Fractional Anisotropy Gradient Magnitude output file", argstr="--fa_gradmag_output %s") color_fa_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Color Fractional Anisotropy output file", argstr="--color_fa_output %s") principal_eigenvector_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Principal Eigenvectors Output", argstr="--principal_eigenvector_output %s") negative_eigenvector_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Negative Eigenvectors Output: create a binary image where if any of the eigen value is below zero, the voxel is set to 1, otherwise 0.", argstr="--negative_eigenvector_output %s") frobenius_norm_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Frobenius Norm Output", argstr="--frobenius_norm_output %s") lambda1_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Axial Diffusivity - Lambda 1 (largest eigenvalue) output", argstr="--lambda1_output %s") lambda2_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Lambda 2 (middle eigenvalue) output", argstr="--lambda2_output %s") lambda3_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Lambda 3 (smallest eigenvalue) output", argstr="--lambda3_output %s") RD_output = traits.Either(traits.Bool, File(), hash_files=False, desc="RD (Radial Diffusivity 1/2*(lambda2+lambda3)) output", argstr="--RD_output %s") rot_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Rotated tensor output file. Must also specify the dof file.", argstr="--rot_output %s") affineitk_file = File(desc="Transformation file for affine transformation. ITK format.", exists=True, argstr="--affineitk_file %s") dof_file = File(desc="Transformation file for affine transformation. This can be ITK format (or the outdated RView).", exists=True, argstr="--dof_file %s") newdof_file = File(desc="Transformation file for affine transformation. RView NEW format. (txt file output of dof2mat)", exists=True, argstr="--newdof_file %s") mask = File(desc="Mask tensors. Specify --outmask if you want to save the masked tensor field, otherwise the mask is applied just for the current processing ", exists=True, argstr="--mask %s") outmask = traits.Either(traits.Bool, File(), hash_files=False, desc="Name of the masked tensor field.", argstr="--outmask %s") hField = traits.Bool(desc="forward and inverse transformations are h-fields instead of displacement fields", argstr="--hField ") forward = File(desc="Forward transformation. Assumed to be a deformation field in world coordinates, unless the --h-field option is specified.", exists=True, argstr="--forward %s") deformation_output = traits.Either(traits.Bool, File(), hash_files=False, desc="Warped tensor field based on a deformation field. This option requires the --forward,-F transformation to be specified.", argstr="--deformation_output %s") interpolation = traits.Enum("nearestneighbor", "linear", "cubic", desc="Interpolation type (nearestneighbor, linear, cubic)", argstr="--interpolation %s") reorientation = traits.Enum("fs", "ppd", desc="Reorientation type (fs, ppd)", argstr="--reorientation %s") correction = traits.Enum("none", "zero", "abs", "nearest", desc="Correct the tensors if computed tensor is not semi-definite positive", argstr="--correction %s") scalar_float = traits.Bool(desc="Write scalar [FA,MD] as unscaled float (with their actual values, otherwise scaled by 10 000). Also causes FA to be unscaled [0..1].", argstr="--scalar_float ") DTI_double = traits.Bool(desc="Tensor components are saved as doubles (cannot be visualized in Slicer)", argstr="--DTI_double ") verbose = traits.Bool(desc="produce verbose output", argstr="--verbose ") class dtiprocessOutputSpec(TraitedSpec): fa_output = File(desc="Fractional Anisotropy output file", exists=True) md_output = File(desc="Mean Diffusivity output file", exists=True) fa_gradient_output = File(desc="Fractional Anisotropy Gradient output file", exists=True) fa_gradmag_output = File(desc="Fractional Anisotropy Gradient Magnitude output file", exists=True) color_fa_output = File(desc="Color Fractional Anisotropy output file", exists=True) principal_eigenvector_output = File(desc="Principal Eigenvectors Output", exists=True) negative_eigenvector_output = File(desc="Negative Eigenvectors Output: create a binary image where if any of the eigen value is below zero, the voxel is set to 1, otherwise 0.", exists=True) frobenius_norm_output = File(desc="Frobenius Norm Output", exists=True) lambda1_output = File(desc="Axial Diffusivity - Lambda 1 (largest eigenvalue) output", exists=True) lambda2_output = File(desc="Lambda 2 (middle eigenvalue) output", exists=True) lambda3_output = File(desc="Lambda 3 (smallest eigenvalue) output", exists=True) RD_output = File(desc="RD (Radial Diffusivity 1/2*(lambda2+lambda3)) output", exists=True) rot_output = File(desc="Rotated tensor output file. Must also specify the dof file.", exists=True) outmask = File(desc="Name of the masked tensor field.", exists=True) deformation_output = File(desc="Warped tensor field based on a deformation field. This option requires the --forward,-F transformation to be specified.", exists=True) class dtiprocess(SEMLikeCommandLine): """title: DTIProcess (DTIProcess) category: Diffusion.Diffusion Tensor Images description: dtiprocess is a tool that handles tensor fields. It takes as an input a tensor field in nrrd format. It can generate diffusion scalar properties out of the tensor field such as : FA (--fa_output), Gradient FA image (--fa_gradient_output), color FA (--color_fa_output), MD (--md_output), Frobenius norm (--frobenius_norm_output), lbd1, lbd2, lbd3 (--lambda{1,2,3}_output), binary map of voxel where if any of the eigenvalue is negative, the voxel is set to 1 (--negative_eigenvector_output) It also creates 4D images out of the tensor field such as: Highest eigenvector map (highest eigenvector at each voxel) (--principal_eigenvector_output) Masking capabilities: For any of the processing done with dtiprocess, it's possible to apply it on a masked region of the tensor field. You need to use the --mask option for any of the option to be applied on that tensor field sub-region only. If you want to save the masked tensor field use the option --outmask and specify the new masked tensor field file name. dtiprocess also allows a range of transformations on the tensor fields. The transformed tensor field file name is specified with the option --deformation_output. There are 3 resampling interpolation methods specified with the tag --interpolation followed by the type to use (nearestneighbor, linear, cubic) Then you have several transformations possible to apply: - Affine transformations using as an input - itk affine transformation file (based on the itkAffineTransform class) - Affine transformations using rview (details and download at http://www.doc.ic.ac.uk/~dr/software/). There are 2 versions of rview both creating transformation files called dof files. The old version of rview outputs text files containing the transformation parameters. It can be read in with the --dof_file option. The new version outputs binary dof files. These dof files can be transformed into human readable file with the dof2mat tool which is part of the rview package. So you need to save the output of dof2mat into a text file which can then be used with the -- newdof_file option. Usage example: dof2mat mynewdoffile.dof >> mynewdoffile.txt dtiprocess --dti_image mytensorfield.nhdr --newdof_file mynewdoffile.txt --rot_output myaffinetensorfield.nhdr Non linear transformations as an input: The default transformation file type is d-field (displacement field) in nrrd format. The option to use is --forward with the name of the file. If the transformation file is a h-field you have to add the option --hField. version: 1.0.1 documentation-url: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DTIProcess license: Copyright (c) <NAME>. All rights reserved. See http://www.ia.unc.edu/dev/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. contributor: <NAME> """ input_spec = dtiprocessInputSpec output_spec = dtiprocessOutputSpec _cmd = " dtiprocess " _outputs_filenames = {'fa_gradmag_output': 'fa_gradmag_output.nii', 'fa_gradient_output': 'fa_gradient_output.nii', 'lambda1_output': 'lambda1_output.nii', 'lambda2_output': 'lambda2_output.nii', 'color_fa_output': 'color_fa_output.nii', 'fa_output': 'fa_output.nii', 'frobenius_norm_output': 'frobenius_norm_output.nii', 'principal_eigenvector_output': 'principal_eigenvector_output.nii', 'outmask': 'outmask.nii', 'lambda3_output': 'lambda3_output.nii', 'negative_eigenvector_output': 'negative_eigenvector_output.nii', 'md_output': 'md_output.nii', 'RD_output': 'RD_output.nii', 'deformation_output': 'deformation_output.nii', 'rot_output': 'rot_output.nii'} _redirect_x = False class DWIConvertInputSpec(CommandLineInputSpec): conversionMode = traits.Enum("DicomToNrrd", "DicomToFSL", "NrrdToFSL", "FSLToNrrd", desc="Determine which conversion to perform. DicomToNrrd (default): Convert DICOM series to NRRD DicomToFSL: Convert DICOM series to NIfTI File + gradient/bvalue text files NrrdToFSL: Convert DWI NRRD file to NIfTI File + gradient/bvalue text files FSLToNrrd: Convert NIfTI File + gradient/bvalue text files to NRRD file.", argstr="--conversionMode %s") inputVolume = File(desc="Input DWI volume -- not used for DicomToNrrd mode.", exists=True, argstr="--inputVolume %s") outputVolume = traits.Either(traits.Bool, File(), hash_files=False, desc="Output filename (.nhdr or .nrrd)", argstr="--outputVolume %s") inputDicomDirectory = Directory(desc="Directory holding Dicom series", exists=True, argstr="--inputDicomDirectory %s") fslNIFTIFile = File(desc="4D NIfTI file containing gradient volumes", exists=True, argstr="--fslNIFTIFile %s") inputBValues = File(desc="The B Values are stored in FSL .bval text file format", exists=True, argstr="--inputBValues %s") inputBVectors = File(desc="The Gradient Vectors are stored in FSL .bvec text file format", exists=True, argstr="--inputBVectors %s") outputBValues = traits.Either(traits.Bool, File(), hash_files=False, desc="The B Values are stored in FSL .bval text file format (defaults to <outputVolume>.bval)", argstr="--outputBValues %s") outputBVectors = traits.Either(traits.Bool, File(), hash_files=False, desc="The Gradient Vectors are stored in FSL .bvec text file format (defaults to <outputVolume>.bvec)", argstr="--outputBVectors %s") fMRI = traits.Bool(desc="Output a NRRD file, but without gradients", argstr="--fMRI ") writeProtocolGradientsFile = traits.Bool( desc="Write the protocol gradients to a file suffixed by \'.txt\' as they were specified in the procol by multiplying each diffusion gradient direction by the measurement frame. This file is for debugging purposes only, the format is not fixed, and will likely change as debugging of new dicom formats is necessary.", argstr="--writeProtocolGradientsFile ") useIdentityMeaseurementFrame = traits.Bool(desc="Adjust all the gradients so that the measurement frame is an identity matrix.", argstr="--useIdentityMeaseurementFrame ") useBMatrixGradientDirections = traits.Bool( desc="Fill the nhdr header with the gradient directions and bvalues computed out of the BMatrix. Only changes behavior for Siemens data. In some cases the standard public gradients are not properly computed. The gradients can emperically computed from the private BMatrix fields. In some cases the private BMatrix is consistent with the public grandients, but not in all cases, when it exists BMatrix is usually most robust.", argstr="--useBMatrixGradientDirections ") outputDirectory = traits.Either(traits.Bool, Directory(), hash_files=False, desc="Directory holding the output NRRD file", argstr="--outputDirectory %s") gradientVectorFile = traits.Either(traits.Bool, File(), hash_files=False, desc="Text file giving gradient vectors", argstr="--gradientVectorFile %s") smallGradientThreshold = traits.Float(desc="If a gradient magnitude is greater than 0 and less than smallGradientThreshold, then DWIConvert will display an error message and quit, unless the useBMatrixGradientDirections option is set.", argstr="--smallGradientThreshold %f") allowLossyConversion = traits.Bool(desc="The only supported output type is \'short\'. Conversion from images of a different type may cause data loss due to rounding or truncation. Use with caution!", argstr="--allowLossyConversion ") transposeInputBVectors = traits.Bool(desc="FSL input BVectors are expected to be encoded in the input file as one vector per line. If it is not the case, use this option to transpose the file as it is read.", argstr="--transposeInputBVectors ") class DWIConvertOutputSpec(TraitedSpec): outputVolume = File(desc="Output filename (.nhdr or .nrrd)", exists=True) outputBValues = File(desc="The B Values are stored in FSL .bval text file format (defaults to <outputVolume>.bval)", exists=True) outputBVectors = File(desc="The Gradient Vectors are stored in FSL .bvec text file format (defaults to <outputVolume>.bvec)", exists=True) outputDirectory = Directory(desc="Directory holding the output NRRD file", exists=True) gradientVectorFile = File(desc="Text file giving gradient vectors", exists=True) class DWIConvert(SEMLikeCommandLine): """title: DWIConverter category: Diffusion.Diffusion Data Conversion description: Converts diffusion weighted MR images in dicom series into Nrrd format for analysis in Slicer. This program has been tested on only a limited subset of DTI dicom formats available from Siemens, GE, and Phillips scanners. Work in progress to support dicom multi-frame data. The program parses dicom header to extract necessary information about measurement frame, diffusion weighting directions, b-values, etc, and write out a nrrd image. For non-diffusion weighted dicom images, it loads in an entire dicom series and writes out a single dicom volume in a .nhdr/.raw pair. version: Version 1.0 documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DWIConverter license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt contributor: <NAME> (UIowa), <NAME> (UIowa), <NAME> (UIowa), <NAME> (UIowa), <NAME> (Uiowa), <NAME> (GE) acknowledgements: This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Additional support for DTI data produced on Philips scanners was contributed by <NAME> and <NAME> at the University of Iowa. """ input_spec = DWIConvertInputSpec output_spec = DWIConvertOutputSpec _cmd = " DWIConvert " _outputs_filenames = {'outputVolume': 'outputVolume.nii', 'outputDirectory': 'outputDirectory', 'outputBValues': 'outputBValues.bval', 'gradientVectorFile': 'gradientVectorFile', 'outputBVectors': 'outputBVectors.bvec'} _redirect_x = False
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29947, 448, 29930, 29899, 13, 15945, 29908, 6147, 468, 759, 630, 934, 448, 11662, 6058, 11488, 13, 3644, 366, 9758, 263, 6494, 29892, 3113, 3461, 372, 373, 278, 611, 6504, 1051, 322, 29914, 272, 1735, 278, 15299, 1213, 15945, 13, 13, 5215, 2897, 13, 13, 3166, 2023, 3188, 1053, 313, 6255, 3542, 29892, 10516, 3542, 4290, 10299, 29892, 3725, 1988, 9345, 6255, 3542, 29892, 13, 462, 268, 3201, 1573, 10299, 29892, 3497, 29892, 18862, 29892, 1020, 1169, 29892, 338, 12119, 29892, 13, 462, 268, 10567, 15329, 2605, 29892, 10604, 15329, 2605, 29897, 13, 13, 13, 1990, 11636, 423, 19698, 4290, 10299, 29898, 6255, 3542, 4290, 10299, 1125, 13, 1678, 10970, 353, 10567, 15329, 2605, 29898, 2283, 29898, 9933, 29922, 5574, 511, 5153, 543, 1293, 310, 599, 278, 12489, 4235, 304, 367, 4759, 4063, 613, 1852, 710, 543, 489, 2080, 29879, 1273, 29879, 856, 1159, 13, 1678, 12489, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29909, 369, 4063, 12489, 7977, 613, 1852, 710, 543, 489, 20158, 29918, 4905, 1273, 29879, 1159, 13, 1678, 360, 24301, 29918, 8896, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 29911, 6073, 7117, 526, 7160, 408, 27641, 313, 29883, 6735, 367, 7604, 1891, 297, 317, 506, 261, 19123, 1852, 710, 543, 489, 12972, 29902, 29918, 8896, 16521, 13, 1678, 26952, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 5498, 346, 26952, 1962, 613, 1852, 710, 543, 489, 369, 15828, 16521, 13, 13, 13, 1990, 11636, 423, 19698, 6466, 10299, 29898, 5323, 1573, 10299, 1125, 13, 1678, 12489, 29918, 4905, 353, 3497, 29898, 14273, 543, 29909, 369, 4063, 12489, 7977, 613, 4864, 29922, 5574, 29897, 13, 13, 13, 1990, 11636, 423, 19698, 29898, 1660, 1988, 9345, 6255, 3542, 1125, 13, 13, 1678, 9995, 3257, 29901, 360, 29911, 10764, 19698, 313, 12972, 29902, 7032, 29897, 13, 13, 7320, 29901, 360, 2593, 3958, 29889, 26023, 3958, 323, 6073, 1954, 1179, 29889, 6255, 3542, 11730, 13, 13, 8216, 29901, 11636, 423, 19698, 338, 263, 1824, 393, 6511, 304, 10272, 278, 6588, 310, 385, 11472, 1353, 310, 12489, 4235, 313, 1761, 287, 1156, 278, 1192, 2080, 29879, 2984, 29897, 910, 1824, 338, 1304, 297, 1749, 16439, 408, 278, 1833, 4331, 310, 278, 472, 3333, 5214, 9068, 29889, 1932, 599, 278, 12489, 4235, 505, 1063, 316, 15628, 297, 278, 1021, 2913, 29892, 304, 1653, 278, 6588, 12489, 1746, 313, 489, 20158, 29918, 4905, 29897, 591, 671, 11636, 423, 19698, 29889, 13, 21882, 6588, 1158, 508, 367, 1304, 313, 6550, 2164, 491, 278, 1192, 5696, 2984, 1125, 11878, 695, 333, 713, 29892, 1480, 29899, 12932, 695, 333, 713, 322, 282, 3249, 29889, 450, 2322, 1641, 11878, 695, 333, 713, 29889, 13, 13, 3259, 29901, 29871, 29896, 29889, 29900, 29889, 29900, 13, 13, 12663, 29899, 2271, 29901, 1732, 597, 1636, 29889, 29879, 506, 261, 29889, 990, 29914, 29879, 506, 261, 5653, 29875, 29914, 2248, 29889, 1961, 29914, 6268, 362, 29914, 29940, 523, 368, 29914, 26982, 29914, 12972, 29902, 7032, 13, 13, 506, 1947, 29901, 14187, 1266, 313, 29883, 29897, 29871, 529, 5813, 15513, 2178, 10462, 21676, 29889, 13, 1678, 2823, 1732, 597, 1636, 29889, 423, 29889, 4661, 29889, 6085, 29914, 3359, 29914, 11882, 1266, 29889, 13357, 363, 4902, 29889, 13, 1678, 910, 7047, 338, 13235, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 13, 1678, 278, 2411, 2957, 1370, 21867, 29891, 310, 341, 1001, 3210, 13566, 2882, 6227, 11937, 470, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 13, 1678, 349, 4574, 13152, 1660, 29889, 29871, 2823, 278, 2038, 3509, 1266, 451, 1575, 363, 901, 2472, 29889, 13, 13, 21570, 3406, 29901, 529, 5813, 29958, 13, 13, 15945, 29908, 13, 13, 1678, 1881, 29918, 6550, 353, 11636, 423, 19698, 4290, 10299, 13, 1678, 1962, 29918, 6550, 353, 11636, 423, 19698, 6466, 10299, 13, 1678, 903, 9006, 353, 376, 11636, 423, 19698, 376, 13, 1678, 903, 4905, 29879, 29918, 1777, 264, 1280, 353, 11117, 20158, 29918, 4905, 2396, 525, 20158, 29918, 4905, 29889, 1240, 29875, 10827, 13, 1678, 903, 17886, 29918, 29916, 353, 7700, 13, 13, 13, 1990, 270, 2034, 342, 326, 4290, 10299, 29898, 6255, 3542, 4290, 10299, 1125, 13, 1678, 270, 4353, 29918, 3027, 353, 3497, 29898, 14273, 543, 29928, 22119, 1967, 7977, 313, 12403, 19123, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 29881, 4353, 29918, 3027, 1273, 29879, 1159, 13, 1678, 12489, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29911, 6073, 10604, 2940, 613, 1852, 710, 543, 489, 20158, 29918, 4905, 1273, 29879, 1159, 13, 1678, 350, 29900, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 9496, 5570, 1967, 29892, 6588, 310, 599, 2362, 5570, 4558, 613, 1852, 710, 543, 489, 29933, 29900, 1273, 29879, 1159, 13, 1678, 1178, 4353, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 333, 4353, 1962, 1967, 29889, 7084, 411, 338, 28467, 293, 23253, 29899, 7915, 287, 2472, 353, 26224, 2099, 310, 23253, 4558, 613, 1852, 710, 543, 489, 333, 4353, 1273, 29879, 1159, 13, 1678, 350, 29900, 29918, 13168, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29933, 29900, 11105, 1304, 363, 278, 23248, 29889, 350, 29900, 16897, 287, 2845, 411, 278, 448, 29873, 2984, 995, 470, 278, 18428, 438, 9375, 29965, 995, 613, 1852, 710, 543, 489, 29933, 29900, 29918, 13168, 29918, 4905, 1273, 29879, 1159, 13, 1678, 17294, 29918, 13168, 353, 3497, 29898, 14273, 543, 22097, 11105, 29889, 29871, 7084, 988, 363, 1432, 992, 29916, 295, 1275, 29871, 29900, 278, 25187, 943, 526, 451, 15899, 29889, 1522, 9543, 393, 297, 6124, 263, 16897, 2729, 11105, 292, 674, 367, 8560, 491, 2322, 29889, 960, 1316, 385, 5684, 16897, 11105, 292, 338, 6058, 7429, 29892, 769, 671, 2984, 448, 29873, 29871, 29900, 19602, 13, 462, 418, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 2634, 262, 29918, 13168, 1273, 29879, 1159, 13, 1678, 4319, 29918, 12803, 29918, 13168, 353, 3497, 29898, 14273, 543, 22050, 5120, 11105, 29889, 29871, 7084, 988, 363, 1432, 992, 29916, 295, 1405, 29871, 29900, 278, 25187, 943, 526, 451, 15899, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 12313, 29918, 12803, 29918, 13168, 1273, 29879, 1159, 13, 1678, 1158, 353, 1020, 1169, 29889, 16854, 703, 645, 29879, 613, 376, 29893, 3137, 613, 376, 29876, 3137, 613, 376, 828, 613, 5153, 543, 14190, 277, 29885, 362, 1158, 313, 645, 29879, 29901, 10660, 3203, 25256, 29892, 281, 3137, 29901, 7915, 287, 3203, 25256, 29892, 302, 3137, 29901, 5464, 29899, 10660, 3203, 25256, 29892, 286, 29880, 29901, 27525, 398, 4188, 22342, 19123, 1852, 710, 543, 489, 5696, 1273, 29879, 1159, 13, 1678, 26385, 353, 1020, 1169, 29889, 16854, 703, 9290, 613, 376, 9171, 613, 376, 6897, 613, 376, 28502, 342, 613, 5153, 543, 12521, 1621, 278, 25187, 943, 565, 15712, 12489, 338, 451, 12647, 29899, 25476, 568, 6374, 613, 1852, 710, 543, 489, 2616, 276, 428, 1273, 29879, 1159, 13, 1678, 16897, 353, 1020, 1169, 29889, 2928, 29898, 14273, 543, 9496, 5570, 16897, 363, 23248, 29889, 960, 451, 6790, 12833, 773, 385, 438, 9375, 29965, 16897, 373, 278, 2362, 5570, 1967, 19602, 1852, 710, 543, 489, 386, 12268, 1273, 29881, 1159, 13, 1678, 7688, 29918, 1524, 800, 353, 1020, 1169, 29889, 2928, 29898, 14273, 543, 4557, 310, 24372, 304, 337, 1052, 27240, 7688, 886, 515, 12489, 12678, 613, 1852, 710, 543, 489, 7915, 29918, 1524, 800, 1273, 29881, 1159, 13, 1678, 4331, 353, 1020, 1169, 29889, 11031, 29898, 14273, 543, 25584, 993, 26815, 4331, 2159, 313, 1454, 302, 3137, 322, 286, 29880, 3519, 19123, 1852, 710, 543, 489, 10568, 1273, 29888, 1159, 13, 1678, 269, 2934, 353, 1020, 1169, 29889, 11031, 29898, 1191, 710, 543, 489, 3754, 1273, 29888, 1159, 13, 1678, 360, 24301, 29918, 8896, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 29911, 6073, 7117, 526, 7160, 408, 27641, 313, 29883, 6735, 367, 7604, 1891, 297, 317, 506, 261, 19123, 1852, 710, 543, 489, 12972, 29902, 29918, 8896, 16521, 13, 1678, 26952, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 5498, 346, 26952, 1962, 613, 1852, 710, 543, 489, 369, 15828, 16521, 13, 1678, 2322, 29911, 6073, 353, 10567, 15329, 2605, 29898, 3018, 1169, 29889, 11031, 29892, 5153, 543, 4592, 12489, 1304, 565, 15899, 12489, 338, 2400, 263, 2183, 16897, 613, 16345, 543, 29892, 613, 1852, 710, 543, 489, 4381, 29911, 6073, 1273, 29879, 1159, 13, 1678, 9500, 29940, 387, 353, 1020, 1169, 29889, 24693, 29898, 13, 4706, 5153, 543, 29657, 25973, 577, 599, 526, 6374, 313, 10149, 29879, 363, 4319, 25187, 943, 4475, 304, 11462, 470, 1274, 23493, 1059, 467, 910, 338, 278, 1021, 2984, 408, 278, 697, 3625, 297, 360, 22119, 1762, 12972, 8673, 303, 7715, 297, 317, 506, 261, 313, 4187, 2012, 310, 925, 4417, 278, 9212, 7388, 1767, 304, 599, 278, 25973, 565, 372, 338, 7968, 1135, 29871, 29900, 29892, 591, 671, 263, 10825, 304, 505, 380, 919, 368, 6374, 25973, 613, 1852, 710, 543, 489, 10889, 29940, 387, 16521, 13, 1678, 9500, 29940, 387, 29907, 7297, 600, 353, 1020, 1169, 29889, 11031, 29898, 13, 4706, 5153, 543, 29657, 25973, 577, 599, 526, 6374, 313, 10149, 29879, 363, 4319, 25187, 943, 4475, 304, 11462, 470, 1274, 23493, 1059, 467, 8669, 310, 925, 4417, 278, 9212, 7388, 1767, 304, 599, 278, 25973, 565, 372, 338, 7968, 1135, 29871, 29900, 29892, 591, 671, 263, 10825, 304, 505, 380, 919, 368, 6374, 25973, 29889, 3189, 8462, 1818, 367, 1546, 29871, 29896, 29889, 29900, 322, 29871, 29896, 29889, 29900, 29900, 29896, 313, 11707, 287, 467, 613, 1852, 710, 543, 489, 10889, 29940, 387, 29907, 7297, 600, 1273, 29888, 1159, 13, 13, 13, 1990, 270, 2034, 342, 326, 6466, 10299, 29898, 5323, 1573, 10299, 1125, 13, 1678, 12489, 29918, 4905, 353, 3497, 29898, 14273, 543, 29911, 6073, 10604, 2940, 613, 4864, 29922, 5574, 29897, 13, 1678, 350, 29900, 353, 3497, 29898, 14273, 543, 9496, 5570, 1967, 29892, 6588, 310, 599, 2362, 5570, 4558, 613, 4864, 29922, 5574, 29897, 13, 1678, 1178, 4353, 353, 3497, 29898, 14273, 543, 333, 4353, 1962, 1967, 29889, 7084, 411, 338, 28467, 293, 23253, 29899, 7915, 287, 2472, 353, 26224, 2099, 310, 23253, 4558, 613, 4864, 29922, 5574, 29897, 13, 1678, 350, 29900, 29918, 13168, 29918, 4905, 353, 3497, 29898, 14273, 543, 29933, 29900, 11105, 1304, 363, 278, 23248, 29889, 350, 29900, 16897, 287, 2845, 411, 278, 448, 29873, 2984, 995, 470, 278, 18428, 438, 9375, 29965, 995, 613, 4864, 29922, 5574, 29897, 13, 13, 13, 1990, 270, 2034, 342, 326, 29898, 1660, 1988, 9345, 6255, 3542, 1125, 13, 13, 1678, 9995, 3257, 29901, 360, 29911, 8673, 303, 326, 313, 12972, 29902, 7032, 29897, 13, 13, 7320, 29901, 360, 2593, 3958, 29889, 26023, 3958, 1334, 523, 287, 1954, 1179, 13, 13, 8216, 29901, 270, 2034, 342, 326, 338, 263, 5780, 393, 4893, 297, 263, 731, 310, 360, 29956, 3624, 313, 2541, 1192, 29881, 4353, 29918, 3027, 2984, 29897, 297, 17114, 5499, 3402, 322, 21875, 263, 12489, 1746, 714, 310, 372, 29889, 450, 1962, 12489, 934, 1024, 338, 6790, 411, 278, 1192, 20158, 29918, 4905, 2984, 13, 8439, 526, 3196, 3519, 304, 12678, 278, 25187, 943, 607, 366, 508, 6084, 411, 278, 2984, 1192, 5696, 301, 3137, 29989, 29893, 3137, 29989, 29876, 3137, 29989, 828, 869, 2266, 338, 263, 3273, 6139, 310, 278, 1422, 3519, 29901, 13, 13, 645, 29879, 13, 418, 22985, 3203, 25256, 29889, 10117, 23248, 11043, 393, 337, 1111, 874, 278, 12489, 4128, 491, 6674, 5890, 278, 1480, 310, 278, 4226, 1891, 7182, 12838, 1907, 491, 278, 17381, 29899, 262, 3901, 310, 278, 16030, 4636, 29889, 13109, 2984, 29889, 13, 13, 29893, 3137, 13, 1678, 1334, 523, 287, 3203, 25256, 29889, 910, 1158, 338, 2788, 304, 278, 5608, 3203, 25256, 1158, 5174, 393, 278, 16030, 4636, 338, 7688, 287, 491, 278, 2441, 301, 3137, 12678, 29889, 313, 13393, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 322, 529, 5813, 15513, 383, 2759, 2931, 2133, 322, 6081, 310, 278, 5608, 1891, 23253, 12489, 1904, 29889, 12968, 5032, 262, 341, 20304, 29871, 29906, 29946, 29892, 29871, 29906, 313, 29943, 774, 29889, 29871, 29906, 29900, 29900, 29945, 511, 29871, 29896, 29946, 29946, 29899, 29896, 29945, 29945, 29889, 363, 901, 2472, 373, 445, 1158, 467, 910, 1158, 338, 13622, 363, 1556, 8324, 29889, 450, 7688, 363, 1269, 12541, 508, 367, 6790, 411, 278, 1192, 7915, 29918, 1524, 800, 29889, 29871, 739, 338, 451, 5279, 278, 2322, 2861, 304, 14882, 1848, 4636, 13512, 1907, 29889, 13, 29876, 3137, 13, 1678, 10050, 29899, 10660, 3203, 25256, 29889, 910, 1158, 947, 451, 2125, 278, 1480, 310, 278, 7182, 322, 6858, 385, 13883, 2729, 373, 454, 854, 2552, 29899, 3034, 3425, 29873, 304, 24656, 278, 4128, 310, 278, 7182, 29889, 450, 301, 3137, 12678, 338, 1304, 408, 385, 17865, 29889, 1152, 445, 1158, 278, 4331, 2159, 508, 367, 6790, 411, 278, 1192, 10568, 2984, 29889, 13, 828, 13, 1678, 5918, 12539, 4188, 22342, 23248, 29889, 910, 1158, 338, 17986, 322, 338, 451, 5279, 13622, 29889, 1152, 445, 286, 29880, 1158, 278, 269, 2934, 508, 367, 6790, 411, 278, 2984, 1192, 3754, 322, 278, 4331, 2159, 508, 367, 6790, 411, 278, 1192, 10568, 2984, 29889, 13, 13, 3492, 508, 731, 263, 16897, 313, 489, 386, 12268, 29897, 304, 505, 278, 12489, 15899, 304, 871, 263, 11306, 310, 992, 29916, 1379, 29889, 2178, 278, 2362, 5570, 992, 29916, 295, 995, 6133, 1135, 278, 16897, 4529, 278, 992, 29916, 1379, 988, 278, 25187, 943, 526, 15712, 29889, 960, 451, 6790, 278, 16897, 338, 12833, 773, 385, 438, 9375, 29965, 16897, 373, 278, 2362, 5570, 1967, 29889, 1576, 11105, 287, 5759, 491, 278, 448, 29873, 2984, 470, 491, 278, 288, 1372, 29884, 995, 508, 367, 7160, 411, 278, 1192, 29933, 29900, 29918, 13168, 29918, 4905, 2984, 29889, 13, 13, 29881, 2034, 342, 326, 884, 508, 6597, 263, 2846, 17336, 4558, 714, 310, 278, 360, 22119, 731, 310, 4558, 29901, 13, 13, 4706, 448, 278, 6588, 2362, 5570, 1967, 313, 489, 29933, 29900, 29897, 607, 338, 278, 6588, 310, 599, 278, 350, 29900, 29879, 29889, 13, 4706, 448, 278, 3553, 22119, 313, 489, 333, 4353, 29897, 4716, 338, 278, 26224, 2099, 310, 278, 23253, 4558, 29889, 13, 13, 3492, 508, 884, 2254, 263, 11105, 565, 366, 864, 304, 10272, 278, 25187, 943, 871, 988, 278, 992, 29916, 1379, 526, 1661, 29899, 9171, 313, 489, 2634, 262, 29918, 13168, 29897, 470, 263, 8178, 11105, 322, 278, 25187, 943, 674, 367, 15899, 988, 278, 8178, 11105, 756, 5225, 1819, 313, 489, 12313, 29918, 12803, 29918, 13168, 29897, 13, 13, 3259, 29901, 29871, 29896, 29889, 29906, 29889, 29900, 13, 13, 12663, 29899, 2271, 29901, 1732, 597, 1636, 29889, 29879, 506, 261, 29889, 990, 29914, 29879, 506, 261, 5653, 29875, 29914, 2248, 29889, 1961, 29914, 6268, 362, 29914, 29940, 523, 368, 29914, 26982, 29914, 12972, 29902, 7032, 13, 13, 506, 1947, 29901, 14187, 1266, 313, 29883, 29897, 29871, 529, 5813, 15513, 2178, 10462, 21676, 29889, 13, 29871, 2823, 1732, 597, 1636, 29889, 423, 29889, 4661, 29889, 6085, 29914, 3359, 29914, 11882, 1266, 29889, 13357, 363, 4902, 29889, 13, 268, 910, 7047, 338, 13235, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 13, 268, 278, 2411, 2957, 1370, 21867, 29891, 310, 341, 1001, 3210, 13566, 2882, 6227, 11937, 470, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 13, 268, 349, 4574, 13152, 1660, 29889, 29871, 2823, 278, 2038, 3509, 1266, 451, 1575, 363, 901, 2472, 29889, 13, 13, 21570, 3406, 29901, 529, 5813, 10202, 529, 5813, 29958, 13, 13, 547, 3707, 839, 29887, 4110, 29901, 529, 5813, 5961, 29896, 29892, 29941, 29892, 29946, 416, 529, 5813, 5961, 29896, 416, 313, 29896, 29922, 11574, 537, 310, 25327, 10317, 310, 16777, 7163, 719, 29892, 29871, 29941, 29922, 11574, 537, 310, 25327, 10317, 310, 3457, 27067, 936, 22557, 29892, 29871, 29946, 29922, 11574, 537, 310, 25327, 10317, 310, 10513, 16888, 322, 20972, 22557, 29897, 4944, 9678, 1080, 304, 1207, 360, 24301, 7032, 15878, 411, 317, 506, 261, 8225, 29892, 322, 20875, 278, 2317, 29899, 18785, 2048, 11780, 491, 11077, 278, 8839, 273, 2478, 373, 14505, 322, 263, 363, 509, 273, 6516, 29889, 13, 13, 15945, 29908, 13, 13, 1678, 1881, 29918, 6550, 353, 270, 2034, 342, 326, 4290, 10299, 13, 1678, 1962, 29918, 6550, 353, 270, 2034, 342, 326, 6466, 10299, 13, 1678, 903, 9006, 353, 376, 270, 2034, 342, 326, 376, 13, 1678, 903, 4905, 29879, 29918, 1777, 264, 1280, 353, 11117, 29933, 29900, 2396, 525, 29933, 29900, 29889, 1240, 29875, 742, 525, 333, 4353, 2396, 525, 333, 4353, 29889, 1240, 29875, 742, 525, 20158, 29918, 4905, 2396, 525, 20158, 29918, 4905, 29889, 1240, 29875, 742, 525, 29933, 29900, 29918, 13168, 29918, 4905, 2396, 525, 29933, 29900, 29918, 13168, 29918, 4905, 29889, 1240, 29875, 10827, 13, 1678, 903, 17886, 29918, 29916, 353, 7700, 13, 13, 13, 1990, 11636, 666, 307, 985, 4290, 10299, 29898, 6255, 3542, 4290, 10299, 1125, 13, 1678, 270, 2034, 29918, 3027, 353, 3497, 29898, 14273, 543, 12972, 29902, 12489, 7977, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 29881, 2034, 29918, 3027, 1273, 29879, 1159, 13, 1678, 2258, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29943, 13857, 284, 530, 275, 327, 14441, 1962, 934, 613, 1852, 710, 543, 489, 5444, 29918, 4905, 1273, 29879, 1159, 13, 1678, 22821, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 6816, 273, 360, 2593, 375, 2068, 1962, 934, 613, 1852, 710, 543, 489, 3487, 29918, 4905, 1273, 29879, 1159, 13, 1678, 269, 2934, 353, 1020, 1169, 29889, 11031, 29898, 14273, 543, 17185, 310, 4656, 10070, 613, 1852, 710, 543, 489, 3754, 1273, 29888, 1159, 13, 1678, 2258, 29918, 24970, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29943, 13857, 284, 530, 275, 327, 14441, 19295, 993, 1962, 934, 613, 1852, 710, 543, 489, 5444, 29918, 24970, 29918, 4905, 1273, 29879, 1159, 13, 1678, 2258, 29918, 5105, 11082, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29943, 13857, 284, 530, 275, 327, 14441, 19295, 993, 19975, 4279, 1962, 934, 613, 1852, 710, 543, 489, 5444, 29918, 5105, 11082, 29918, 4905, 1273, 29879, 1159, 13, 1678, 2927, 29918, 5444, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 3306, 7347, 428, 284, 530, 275, 327, 14441, 1962, 934, 613, 1852, 710, 543, 489, 2780, 29918, 5444, 29918, 4905, 1273, 29879, 1159, 13, 1678, 5882, 29918, 29872, 2101, 8111, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 4040, 26706, 382, 2101, 345, 14359, 10604, 613, 1852, 710, 543, 489, 558, 26706, 29918, 29872, 2101, 8111, 29918, 4905, 1273, 29879, 1159, 13, 1678, 8178, 29918, 29872, 2101, 8111, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29940, 387, 1230, 382, 2101, 345, 14359, 10604, 29901, 1653, 263, 7581, 1967, 988, 565, 738, 310, 278, 7388, 995, 338, 2400, 5225, 29892, 278, 992, 29916, 295, 338, 731, 304, 29871, 29896, 29892, 6467, 29871, 29900, 19602, 1852, 710, 543, 489, 22198, 29918, 29872, 2101, 8111, 29918, 4905, 1273, 29879, 1159, 13, 1678, 14671, 1785, 2482, 29918, 12324, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29943, 307, 1785, 2482, 5655, 10604, 613, 1852, 710, 543, 489, 29888, 307, 1785, 2482, 29918, 12324, 29918, 4905, 1273, 29879, 1159, 13, 1678, 14013, 29896, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29909, 29916, 616, 360, 2593, 375, 2068, 448, 365, 2269, 29871, 29896, 313, 27489, 342, 7388, 1767, 29897, 1962, 613, 1852, 710, 543, 489, 2892, 29896, 29918, 4905, 1273, 29879, 1159, 13, 1678, 14013, 29906, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 9099, 29871, 29906, 313, 17662, 7388, 1767, 29897, 1962, 613, 1852, 710, 543, 489, 2892, 29906, 29918, 4905, 1273, 29879, 1159, 13, 1678, 14013, 29941, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 9099, 29871, 29941, 313, 9278, 342, 7388, 1767, 29897, 1962, 613, 1852, 710, 543, 489, 2892, 29941, 29918, 4905, 1273, 29879, 1159, 13, 1678, 390, 29928, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29934, 29928, 313, 9908, 616, 360, 2593, 375, 2068, 29871, 29896, 29914, 29906, 16395, 2892, 29906, 29974, 2892, 29941, 876, 1962, 613, 1852, 710, 543, 489, 29934, 29928, 29918, 4905, 1273, 29879, 1159, 13, 1678, 5731, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 21281, 630, 12489, 1962, 934, 29889, 29871, 19928, 884, 6084, 278, 437, 29888, 934, 19602, 1852, 710, 543, 489, 5450, 29918, 4905, 1273, 29879, 1159, 13, 1678, 2756, 457, 277, 29895, 29918, 1445, 353, 3497, 29898, 14273, 543, 4300, 5404, 934, 363, 2756, 457, 13852, 29889, 29871, 13315, 29968, 3402, 19602, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 3470, 457, 277, 29895, 29918, 1445, 1273, 29879, 1159, 13, 1678, 437, 29888, 29918, 1445, 353, 3497, 29898, 14273, 543, 4300, 5404, 934, 363, 2756, 457, 13852, 29889, 29871, 910, 508, 367, 13315, 29968, 3402, 313, 272, 278, 714, 9715, 390, 1043, 467, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 29881, 974, 29918, 1445, 1273, 29879, 1159, 13, 1678, 716, 29881, 974, 29918, 1445, 353, 3497, 29898, 14273, 543, 4300, 5404, 934, 363, 2756, 457, 13852, 29889, 29871, 390, 1043, 29091, 3402, 29889, 313, 3945, 934, 1962, 310, 437, 29888, 29906, 2922, 19123, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 1482, 29881, 974, 29918, 1445, 1273, 29879, 1159, 13, 1678, 11105, 353, 3497, 29898, 14273, 543, 19832, 25187, 943, 29889, 12048, 1598, 1192, 449, 13168, 565, 366, 864, 304, 4078, 278, 11105, 287, 12489, 1746, 29892, 6467, 278, 11105, 338, 7436, 925, 363, 278, 1857, 9068, 9162, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 13168, 1273, 29879, 1159, 13, 1678, 714, 13168, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 1170, 310, 278, 11105, 287, 12489, 1746, 19602, 1852, 710, 543, 489, 449, 13168, 1273, 29879, 1159, 13, 1678, 298, 3073, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 11333, 322, 16402, 29304, 526, 298, 29899, 9621, 2012, 310, 12272, 9552, 4235, 613, 1852, 710, 543, 489, 29882, 3073, 16521, 13, 1678, 6375, 353, 3497, 29898, 14273, 543, 2831, 1328, 13852, 29889, 29871, 4007, 21571, 304, 367, 263, 316, 5404, 1746, 297, 3186, 10350, 29892, 6521, 278, 1192, 29882, 29899, 2671, 2984, 338, 6790, 19602, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 11333, 1273, 29879, 1159, 13, 1678, 316, 5404, 29918, 4905, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 29956, 6834, 287, 12489, 1746, 2729, 373, 263, 316, 5404, 1746, 29889, 29871, 910, 2984, 6858, 278, 1192, 11333, 6653, 29943, 13852, 304, 367, 6790, 19602, 1852, 710, 543, 489, 311, 5404, 29918, 4905, 1273, 29879, 1159, 13, 1678, 29694, 353, 1020, 1169, 29889, 16854, 703, 28502, 342, 484, 1141, 4089, 613, 376, 10660, 613, 376, 29883, 431, 293, 613, 5153, 543, 4074, 3733, 362, 1134, 313, 28502, 342, 484, 1141, 4089, 29892, 5608, 29892, 13630, 293, 19123, 1852, 710, 543, 489, 1639, 3733, 362, 1273, 29879, 1159, 13, 1678, 337, 20659, 353, 1020, 1169, 29889, 16854, 703, 5847, 613, 376, 407, 29881, 613, 5153, 543, 1123, 20659, 1134, 313, 5847, 29892, 6499, 29881, 19123, 1852, 710, 543, 489, 276, 20659, 1273, 29879, 1159, 13, 1678, 26385, 353, 1020, 1169, 29889, 16854, 703, 9290, 613, 376, 9171, 613, 376, 6897, 613, 376, 28502, 342, 613, 5153, 543, 12521, 1621, 278, 25187, 943, 565, 15712, 12489, 338, 451, 12647, 29899, 25476, 568, 6374, 613, 1852, 710, 543, 489, 2616, 276, 428, 1273, 29879, 1159, 13, 1678, 17336, 29918, 7411, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 6113, 17336, 518, 4519, 29892, 5773, 29962, 408, 443, 7052, 29881, 5785, 313, 2541, 1009, 3935, 1819, 29892, 6467, 6287, 29881, 491, 29871, 29896, 29900, 29871, 29900, 29900, 29900, 467, 29871, 3115, 9946, 13515, 304, 367, 443, 7052, 29881, 518, 29900, 636, 29896, 1822, 613, 1852, 710, 543, 489, 19529, 279, 29918, 7411, 16521, 13, 1678, 360, 24301, 29918, 8896, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 29911, 6073, 7117, 526, 7160, 408, 27641, 313, 29883, 6735, 367, 7604, 1891, 297, 317, 506, 261, 19123, 1852, 710, 543, 489, 12972, 29902, 29918, 8896, 16521, 13, 1678, 26952, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 5498, 346, 26952, 1962, 613, 1852, 710, 543, 489, 369, 15828, 16521, 13, 13, 13, 1990, 11636, 666, 307, 985, 6466, 10299, 29898, 5323, 1573, 10299, 1125, 13, 1678, 2258, 29918, 4905, 353, 3497, 29898, 14273, 543, 29943, 13857, 284, 530, 275, 327, 14441, 1962, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 22821, 29918, 4905, 353, 3497, 29898, 14273, 543, 6816, 273, 360, 2593, 375, 2068, 1962, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 2258, 29918, 24970, 29918, 4905, 353, 3497, 29898, 14273, 543, 29943, 13857, 284, 530, 275, 327, 14441, 19295, 993, 1962, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 2258, 29918, 5105, 11082, 29918, 4905, 353, 3497, 29898, 14273, 543, 29943, 13857, 284, 530, 275, 327, 14441, 19295, 993, 19975, 4279, 1962, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 2927, 29918, 5444, 29918, 4905, 353, 3497, 29898, 14273, 543, 3306, 7347, 428, 284, 530, 275, 327, 14441, 1962, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 5882, 29918, 29872, 2101, 8111, 29918, 4905, 353, 3497, 29898, 14273, 543, 4040, 26706, 382, 2101, 345, 14359, 10604, 613, 4864, 29922, 5574, 29897, 13, 1678, 8178, 29918, 29872, 2101, 8111, 29918, 4905, 353, 3497, 29898, 14273, 543, 29940, 387, 1230, 382, 2101, 345, 14359, 10604, 29901, 1653, 263, 7581, 1967, 988, 565, 738, 310, 278, 7388, 995, 338, 2400, 5225, 29892, 278, 992, 29916, 295, 338, 731, 304, 29871, 29896, 29892, 6467, 29871, 29900, 19602, 4864, 29922, 5574, 29897, 13, 1678, 14671, 1785, 2482, 29918, 12324, 29918, 4905, 353, 3497, 29898, 14273, 543, 29943, 307, 1785, 2482, 5655, 10604, 613, 4864, 29922, 5574, 29897, 13, 1678, 14013, 29896, 29918, 4905, 353, 3497, 29898, 14273, 543, 29909, 29916, 616, 360, 2593, 375, 2068, 448, 365, 2269, 29871, 29896, 313, 27489, 342, 7388, 1767, 29897, 1962, 613, 4864, 29922, 5574, 29897, 13, 1678, 14013, 29906, 29918, 4905, 353, 3497, 29898, 14273, 543, 9099, 29871, 29906, 313, 17662, 7388, 1767, 29897, 1962, 613, 4864, 29922, 5574, 29897, 13, 1678, 14013, 29941, 29918, 4905, 353, 3497, 29898, 14273, 543, 9099, 29871, 29941, 313, 9278, 342, 7388, 1767, 29897, 1962, 613, 4864, 29922, 5574, 29897, 13, 1678, 390, 29928, 29918, 4905, 353, 3497, 29898, 14273, 543, 29934, 29928, 313, 9908, 616, 360, 2593, 375, 2068, 29871, 29896, 29914, 29906, 16395, 2892, 29906, 29974, 2892, 29941, 876, 1962, 613, 4864, 29922, 5574, 29897, 13, 1678, 5731, 29918, 4905, 353, 3497, 29898, 14273, 543, 21281, 630, 12489, 1962, 934, 29889, 29871, 19928, 884, 6084, 278, 437, 29888, 934, 19602, 4864, 29922, 5574, 29897, 13, 1678, 714, 13168, 353, 3497, 29898, 14273, 543, 1170, 310, 278, 11105, 287, 12489, 1746, 19602, 4864, 29922, 5574, 29897, 13, 1678, 316, 5404, 29918, 4905, 353, 3497, 29898, 14273, 543, 29956, 6834, 287, 12489, 1746, 2729, 373, 263, 316, 5404, 1746, 29889, 29871, 910, 2984, 6858, 278, 1192, 11333, 6653, 29943, 13852, 304, 367, 6790, 19602, 4864, 29922, 5574, 29897, 13, 13, 13, 1990, 11636, 666, 307, 985, 29898, 1660, 1988, 9345, 6255, 3542, 1125, 13, 13, 1678, 9995, 3257, 29901, 360, 24301, 7032, 313, 12972, 29902, 7032, 29897, 13, 13, 7320, 29901, 360, 2593, 3958, 29889, 26023, 3958, 323, 6073, 1954, 1179, 13, 13, 8216, 29901, 11636, 666, 307, 985, 338, 263, 5780, 393, 17766, 12489, 4235, 29889, 739, 4893, 408, 385, 1881, 263, 12489, 1746, 297, 17114, 5499, 3402, 29889, 13, 3112, 508, 5706, 23253, 17336, 4426, 714, 310, 278, 12489, 1746, 1316, 408, 584, 13515, 313, 489, 5444, 29918, 4905, 511, 19295, 993, 13515, 1967, 313, 489, 5444, 29918, 24970, 29918, 4905, 511, 2927, 13515, 313, 489, 2780, 29918, 5444, 29918, 4905, 511, 20672, 313, 489, 3487, 29918, 4905, 511, 25022, 1785, 2482, 6056, 313, 489, 29888, 307, 1785, 2482, 29918, 12324, 29918, 4905, 511, 301, 6448, 29896, 29892, 301, 6448, 29906, 29892, 301, 6448, 29941, 313, 489, 2892, 29912, 29896, 29892, 29906, 29892, 29941, 2403, 4905, 511, 7581, 2910, 310, 992, 29916, 295, 988, 565, 738, 310, 278, 7388, 1767, 338, 8178, 29892, 278, 992, 29916, 295, 338, 731, 304, 29871, 29896, 313, 489, 22198, 29918, 29872, 2101, 8111, 29918, 4905, 29897, 13, 13, 3112, 884, 10017, 29871, 29946, 29928, 4558, 714, 310, 278, 12489, 1746, 1316, 408, 29901, 5057, 342, 7388, 8111, 2910, 313, 9812, 342, 7388, 8111, 472, 1269, 992, 29916, 295, 29897, 313, 489, 558, 26706, 29918, 29872, 2101, 8111, 29918, 4905, 29897, 13, 13, 19832, 292, 27108, 29901, 1152, 738, 310, 278, 9068, 2309, 411, 11636, 666, 307, 985, 29892, 372, 29915, 29879, 1950, 304, 3394, 372, 373, 263, 11105, 287, 5120, 310, 278, 12489, 1746, 29889, 887, 817, 304, 671, 278, 1192, 13168, 2984, 363, 738, 310, 278, 2984, 304, 367, 7436, 373, 393, 12489, 1746, 1014, 29899, 12803, 871, 29889, 960, 366, 864, 304, 4078, 278, 11105, 287, 12489, 1746, 671, 278, 2984, 1192, 449, 13168, 322, 6084, 278, 716, 11105, 287, 12489, 1746, 934, 1024, 29889, 13, 6008, 666, 307, 985, 884, 6511, 263, 3464, 310, 29304, 373, 278, 12489, 4235, 29889, 450, 27615, 12489, 1746, 934, 1024, 338, 6790, 411, 278, 2984, 1192, 311, 5404, 29918, 4905, 29889, 1670, 526, 29871, 29941, 620, 314, 10335, 29694, 3519, 6790, 411, 278, 4055, 1192, 1639, 3733, 362, 5643, 491, 278, 1134, 304, 671, 313, 28502, 342, 484, 1141, 4089, 29892, 5608, 29892, 13630, 293, 29897, 1987, 366, 505, 3196, 29304, 1950, 304, 3394, 29901, 13, 13, 4706, 448, 13737, 457, 29304, 773, 408, 385, 1881, 13, 4706, 448, 372, 29895, 2756, 457, 13852, 934, 313, 6707, 373, 278, 372, 29895, 27867, 457, 13372, 770, 29897, 13, 4706, 448, 13737, 457, 29304, 773, 364, 1493, 313, 14144, 322, 5142, 472, 1732, 597, 1636, 29889, 1514, 29889, 293, 29889, 562, 29889, 2679, 24629, 7707, 29914, 20415, 12495, 1670, 526, 29871, 29906, 6910, 310, 364, 1493, 1716, 4969, 13852, 2066, 2000, 437, 29888, 2066, 29889, 450, 2030, 1873, 310, 364, 1493, 14391, 1426, 2066, 6943, 278, 13852, 4128, 29889, 739, 508, 367, 1303, 297, 411, 278, 1192, 29881, 974, 29918, 1445, 2984, 29889, 450, 716, 1873, 14391, 7581, 437, 29888, 2066, 29889, 4525, 437, 29888, 2066, 508, 367, 27615, 964, 5199, 19909, 934, 411, 278, 437, 29888, 29906, 2922, 5780, 607, 338, 760, 310, 278, 364, 1493, 3577, 29889, 1105, 366, 817, 304, 4078, 278, 1962, 310, 437, 29888, 29906, 2922, 964, 263, 1426, 934, 607, 508, 769, 367, 1304, 411, 278, 1192, 716, 29881, 974, 29918, 1445, 2984, 29889, 10783, 482, 1342, 29901, 437, 29888, 29906, 2922, 590, 1482, 1867, 600, 488, 29889, 29881, 974, 5099, 590, 1482, 1867, 600, 488, 29889, 3945, 539, 11636, 666, 307, 985, 1192, 29881, 2034, 29918, 3027, 590, 20158, 2671, 29889, 29876, 29882, 7707, 1192, 1482, 29881, 974, 29918, 1445, 590, 1482, 1867, 600, 488, 29889, 3945, 1192, 5450, 29918, 4905, 590, 3470, 10157, 6073, 2671, 29889, 29876, 29882, 7707, 13, 13, 12283, 5608, 29304, 408, 385, 1881, 29901, 450, 2322, 13852, 934, 1134, 338, 270, 29899, 2671, 313, 2218, 29886, 9552, 1746, 29897, 297, 17114, 5499, 3402, 29889, 450, 2984, 304, 671, 338, 1192, 11333, 411, 278, 1024, 310, 278, 934, 29889, 960, 278, 13852, 934, 338, 263, 298, 29899, 2671, 366, 505, 304, 788, 278, 2984, 1192, 29882, 3073, 29889, 13, 13, 3259, 29901, 29871, 29896, 29889, 29900, 29889, 29896, 13, 13, 12663, 29899, 2271, 29901, 1732, 597, 1636, 29889, 29879, 506, 261, 29889, 990, 29914, 29879, 506, 261, 5653, 29875, 29914, 2248, 29889, 1961, 29914, 6268, 362, 29914, 29940, 523, 368, 29914, 26982, 29914, 12972, 29902, 7032, 13, 13, 506, 1947, 29901, 14187, 1266, 313, 29883, 29897, 29871, 529, 5813, 15513, 2178, 10462, 21676, 29889, 13, 29871, 2823, 1732, 597, 1636, 29889, 423, 29889, 4661, 29889, 6085, 29914, 3359, 29914, 11882, 1266, 29889, 13357, 363, 4902, 29889, 13, 268, 910, 7047, 338, 13235, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 13, 268, 278, 2411, 2957, 1370, 21867, 29891, 310, 341, 1001, 3210, 13566, 2882, 6227, 11937, 470, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 13, 268, 349, 4574, 13152, 1660, 29889, 29871, 2823, 278, 2038, 3509, 1266, 451, 1575, 363, 901, 2472, 29889, 13, 13, 21570, 3406, 29901, 529, 5813, 29958, 13, 13, 15945, 29908, 13, 13, 1678, 1881, 29918, 6550, 353, 11636, 666, 307, 985, 4290, 10299, 13, 1678, 1962, 29918, 6550, 353, 11636, 666, 307, 985, 6466, 10299, 13, 1678, 903, 9006, 353, 376, 11636, 666, 307, 985, 376, 13, 1678, 903, 4905, 29879, 29918, 1777, 264, 1280, 353, 11117, 5444, 29918, 5105, 11082, 29918, 4905, 2396, 525, 5444, 29918, 5105, 11082, 29918, 4905, 29889, 1240, 29875, 742, 525, 5444, 29918, 24970, 29918, 4905, 2396, 525, 5444, 29918, 24970, 29918, 4905, 29889, 1240, 29875, 742, 525, 2892, 29896, 29918, 4905, 2396, 525, 2892, 29896, 29918, 4905, 29889, 1240, 29875, 742, 525, 2892, 29906, 29918, 4905, 2396, 525, 2892, 29906, 29918, 4905, 29889, 1240, 29875, 742, 525, 2780, 29918, 5444, 29918, 4905, 2396, 525, 2780, 29918, 5444, 29918, 4905, 29889, 1240, 29875, 742, 525, 5444, 29918, 4905, 2396, 525, 5444, 29918, 4905, 29889, 1240, 29875, 742, 525, 29888, 307, 1785, 2482, 29918, 12324, 29918, 4905, 2396, 525, 29888, 307, 1785, 2482, 29918, 12324, 29918, 4905, 29889, 1240, 29875, 742, 13, 462, 3986, 525, 558, 26706, 29918, 29872, 2101, 8111, 29918, 4905, 2396, 525, 558, 26706, 29918, 29872, 2101, 8111, 29918, 4905, 29889, 1240, 29875, 742, 525, 449, 13168, 2396, 525, 449, 13168, 29889, 1240, 29875, 742, 525, 2892, 29941, 29918, 4905, 2396, 525, 2892, 29941, 29918, 4905, 29889, 1240, 29875, 742, 525, 22198, 29918, 29872, 2101, 8111, 29918, 4905, 2396, 525, 22198, 29918, 29872, 2101, 8111, 29918, 4905, 29889, 1240, 29875, 742, 525, 3487, 29918, 4905, 2396, 525, 3487, 29918, 4905, 29889, 1240, 29875, 742, 525, 29934, 29928, 29918, 4905, 2396, 525, 29934, 29928, 29918, 4905, 29889, 1240, 29875, 742, 525, 311, 5404, 29918, 4905, 2396, 525, 311, 5404, 29918, 4905, 29889, 1240, 29875, 742, 525, 5450, 29918, 4905, 2396, 525, 5450, 29918, 4905, 29889, 1240, 29875, 10827, 13, 1678, 903, 17886, 29918, 29916, 353, 7700, 13, 13, 13, 1990, 360, 22119, 18455, 4290, 10299, 29898, 6255, 3542, 4290, 10299, 1125, 13, 1678, 11301, 6818, 353, 1020, 1169, 29889, 16854, 703, 29928, 293, 290, 1762, 29940, 29878, 5499, 613, 376, 29928, 293, 290, 1762, 9998, 29931, 613, 376, 29940, 29878, 5499, 1762, 9998, 29931, 613, 376, 9998, 29931, 1762, 29940, 29878, 5499, 613, 13, 462, 462, 5153, 543, 6362, 837, 457, 607, 11301, 304, 2189, 29889, 28550, 290, 1762, 29940, 29878, 5499, 313, 4381, 1125, 14806, 360, 2965, 6488, 3652, 304, 27759, 29934, 29928, 28550, 290, 1762, 9998, 29931, 29901, 14806, 360, 2965, 6488, 3652, 304, 405, 3644, 24301, 3497, 718, 16030, 29914, 29890, 1767, 1426, 2066, 11100, 5499, 1762, 9998, 29931, 29901, 14806, 360, 22119, 27759, 29934, 29928, 934, 304, 405, 3644, 24301, 3497, 718, 16030, 29914, 29890, 1767, 1426, 2066, 383, 12750, 1762, 29940, 29878, 5499, 29901, 14806, 405, 3644, 24301, 3497, 718, 16030, 29914, 29890, 1767, 1426, 2066, 304, 27759, 29934, 29928, 934, 19602, 1852, 710, 543, 489, 535, 3259, 6818, 1273, 29879, 1159, 13, 1678, 1881, 24679, 353, 3497, 29898, 14273, 543, 4290, 360, 22119, 7977, 1192, 451, 1304, 363, 28550, 290, 1762, 29940, 29878, 5499, 4464, 19602, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 2080, 24679, 1273, 29879, 1159, 13, 1678, 1962, 24679, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 6466, 10422, 14544, 29876, 29882, 7707, 470, 869, 22230, 5499, 19123, 1852, 710, 543, 489, 4905, 24679, 1273, 29879, 1159, 13, 1678, 1881, 29928, 293, 290, 9882, 353, 18862, 29898, 14273, 543, 9882, 13587, 28550, 290, 3652, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 2080, 29928, 293, 290, 9882, 1273, 29879, 1159, 13, 1678, 285, 2536, 29940, 6545, 24301, 2283, 353, 3497, 29898, 14273, 543, 29946, 29928, 405, 3644, 24301, 934, 6943, 16030, 18167, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 29888, 2536, 29940, 6545, 24301, 2283, 1273, 29879, 1159, 13, 1678, 1881, 29933, 9065, 353, 3497, 29898, 14273, 543, 1576, 350, 2630, 1041, 526, 6087, 297, 383, 12750, 869, 29890, 791, 1426, 934, 3402, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 2080, 29933, 9065, 1273, 29879, 1159, 13, 1678, 1881, 29933, 29963, 11142, 353, 3497, 29898, 14273, 543, 1576, 19295, 993, 478, 11142, 526, 6087, 297, 383, 12750, 869, 29890, 2003, 1426, 934, 3402, 613, 4864, 29922, 5574, 29892, 1852, 710, 543, 489, 2080, 29933, 29963, 11142, 1273, 29879, 1159, 13, 1678, 1962, 29933, 9065, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 1576, 350, 2630, 1041, 526, 6087, 297, 383, 12750, 869, 29890, 791, 1426, 934, 3402, 313, 4381, 29879, 304, 529, 4905, 24679, 15513, 29890, 791, 19123, 1852, 710, 543, 489, 4905, 29933, 9065, 1273, 29879, 1159, 13, 1678, 1962, 29933, 29963, 11142, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 1576, 19295, 993, 478, 11142, 526, 6087, 297, 383, 12750, 869, 29890, 2003, 1426, 934, 3402, 313, 4381, 29879, 304, 529, 4905, 24679, 15513, 29890, 2003, 19123, 1852, 710, 543, 489, 4905, 29933, 29963, 11142, 1273, 29879, 1159, 13, 1678, 285, 29924, 3960, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 6466, 263, 27759, 29934, 29928, 934, 29892, 541, 1728, 4656, 10070, 613, 1852, 710, 543, 489, 29888, 29924, 3960, 16521, 13, 1678, 2436, 17830, 25584, 10070, 2283, 353, 1020, 1169, 29889, 24693, 29898, 13, 4706, 5153, 543, 6113, 278, 9608, 4656, 10070, 304, 263, 934, 9378, 11925, 491, 320, 4286, 3945, 20333, 408, 896, 892, 6790, 297, 278, 410, 1054, 491, 6674, 5890, 1269, 23253, 16030, 5305, 491, 278, 20039, 3515, 29889, 29871, 910, 934, 338, 363, 13490, 11976, 871, 29892, 278, 3402, 338, 451, 4343, 29892, 322, 674, 5517, 1735, 408, 13490, 310, 716, 12124, 290, 21971, 338, 5181, 19602, 1852, 710, 543, 489, 3539, 17830, 25584, 10070, 2283, 16521, 13, 1678, 671, 18415, 6816, 559, 545, 358, 4308, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 3253, 5143, 599, 278, 4656, 10070, 577, 393, 278, 20039, 3515, 338, 385, 10110, 4636, 19602, 1852, 710, 543, 489, 1509, 18415, 6816, 559, 545, 358, 4308, 16521, 13, 1678, 671, 29933, 14609, 25584, 993, 29928, 533, 1953, 353, 1020, 1169, 29889, 24693, 29898, 13, 4706, 5153, 543, 20876, 278, 302, 29882, 7707, 4839, 411, 278, 16030, 18112, 322, 289, 5975, 15712, 714, 310, 278, 350, 14609, 29889, 9333, 3620, 6030, 363, 317, 3768, 575, 848, 29889, 29871, 512, 777, 4251, 278, 3918, 970, 4656, 10070, 526, 451, 6284, 15712, 29889, 29871, 450, 4656, 10070, 508, 953, 546, 1711, 15712, 515, 278, 2024, 350, 14609, 4235, 29889, 29871, 512, 777, 4251, 278, 2024, 350, 14609, 338, 13747, 411, 278, 970, 4595, 10070, 29892, 541, 451, 297, 599, 4251, 29892, 746, 372, 4864, 350, 14609, 338, 5491, 1556, 16424, 19602, 1852, 710, 543, 489, 1509, 29933, 14609, 25584, 993, 29928, 533, 1953, 16521, 13, 1678, 1962, 9882, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 18862, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 9882, 13587, 278, 1962, 27759, 29934, 29928, 934, 613, 1852, 710, 543, 489, 4905, 9882, 1273, 29879, 1159, 13, 1678, 16030, 12877, 2283, 353, 1020, 1169, 29889, 29923, 2121, 29898, 3018, 1169, 29889, 24693, 29892, 3497, 3285, 6608, 29918, 5325, 29922, 8824, 29892, 5153, 543, 1626, 934, 6820, 16030, 12047, 613, 1852, 710, 543, 489, 24970, 12877, 2283, 1273, 29879, 1159, 13, 1678, 2319, 25584, 993, 1349, 12268, 353, 1020, 1169, 29889, 11031, 29898, 14273, 543, 3644, 263, 16030, 18497, 338, 7621, 1135, 29871, 29900, 322, 3109, 1135, 2319, 25584, 993, 1349, 12268, 29892, 769, 360, 22119, 18455, 674, 2479, 385, 1059, 2643, 322, 23283, 29892, 6521, 278, 671, 29933, 14609, 25584, 993, 29928, 533, 1953, 2984, 338, 731, 19602, 1852, 710, 543, 489, 9278, 25584, 993, 1349, 12268, 1273, 29888, 1159, 13, 1678, 2758, 29931, 2209, 29891, 1168, 3259, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 1576, 871, 6969, 1962, 1134, 338, 320, 29915, 12759, 29905, 4286, 1281, 3259, 515, 4558, 310, 263, 1422, 1134, 1122, 4556, 848, 6410, 2861, 304, 4513, 292, 470, 21022, 362, 29889, 4803, 411, 5777, 918, 29991, 613, 1852, 710, 543, 489, 9536, 29931, 2209, 29891, 1168, 3259, 16521, 13, 1678, 1301, 4220, 4290, 29933, 29963, 11142, 353, 1020, 1169, 29889, 24693, 29898, 14273, 543, 9998, 29931, 1881, 350, 29963, 11142, 526, 3806, 304, 367, 18511, 297, 278, 1881, 934, 408, 697, 4608, 639, 1196, 29889, 960, 372, 338, 451, 278, 1206, 29892, 671, 445, 2984, 304, 1301, 4220, 278, 934, 408, 372, 338, 1303, 19602, 1852, 710, 543, 489, 3286, 4220, 4290, 29933, 29963, 11142, 16521, 13, 13, 13, 1990, 360, 22119, 18455, 6466, 10299, 29898, 5323, 1573, 10299, 1125, 13, 1678, 1962, 24679, 353, 3497, 29898, 14273, 543, 6466, 10422, 14544, 29876, 29882, 7707, 470, 869, 22230, 5499, 19123, 4864, 29922, 5574, 29897, 13, 1678, 1962, 29933, 9065, 353, 3497, 29898, 14273, 543, 1576, 350, 2630, 1041, 526, 6087, 297, 383, 12750, 869, 29890, 791, 1426, 934, 3402, 313, 4381, 29879, 304, 529, 4905, 24679, 15513, 29890, 791, 19123, 4864, 29922, 5574, 29897, 13, 1678, 1962, 29933, 29963, 11142, 353, 3497, 29898, 14273, 543, 1576, 19295, 993, 478, 11142, 526, 6087, 297, 383, 12750, 869, 29890, 2003, 1426, 934, 3402, 313, 4381, 29879, 304, 529, 4905, 24679, 15513, 29890, 2003, 19123, 4864, 29922, 5574, 29897, 13, 1678, 1962, 9882, 353, 18862, 29898, 14273, 543, 9882, 13587, 278, 1962, 27759, 29934, 29928, 934, 613, 4864, 29922, 5574, 29897, 13, 1678, 16030, 12877, 2283, 353, 3497, 29898, 14273, 543, 1626, 934, 6820, 16030, 12047, 613, 4864, 29922, 5574, 29897, 13, 13, 13, 1990, 360, 22119, 18455, 29898, 1660, 1988, 9345, 6255, 3542, 1125, 13, 13, 1678, 9995, 3257, 29901, 360, 22119, 18545, 13, 13, 7320, 29901, 360, 2593, 3958, 29889, 26023, 3958, 3630, 1281, 3259, 13, 13, 8216, 29901, 1281, 369, 1372, 23253, 7688, 287, 29751, 4558, 297, 12124, 290, 3652, 964, 11100, 5499, 3402, 363, 7418, 297, 317, 506, 261, 29889, 910, 1824, 756, 1063, 9528, 373, 871, 263, 9078, 11306, 310, 360, 24301, 12124, 290, 21971, 3625, 515, 317, 3768, 575, 29892, 402, 29923, 29892, 322, 21856, 4512, 885, 812, 414, 29889, 5244, 297, 6728, 304, 2304, 12124, 290, 2473, 29899, 2557, 848, 29889, 450, 1824, 610, 29879, 267, 12124, 290, 4839, 304, 6597, 5181, 2472, 1048, 20039, 3515, 29892, 23253, 7688, 292, 18112, 29892, 289, 29899, 5975, 29892, 2992, 29892, 322, 2436, 714, 263, 17114, 5499, 1967, 29889, 1152, 1661, 29899, 12765, 3958, 7688, 287, 12124, 290, 4558, 29892, 372, 15376, 297, 385, 4152, 12124, 290, 3652, 322, 15873, 714, 263, 2323, 12124, 290, 7977, 297, 263, 869, 29876, 29882, 7707, 6294, 1610, 5101, 29889, 13, 13, 3259, 29901, 10079, 29871, 29896, 29889, 29900, 13, 13, 12663, 29899, 2271, 29901, 1732, 597, 4594, 29889, 29879, 506, 261, 29889, 990, 29914, 29879, 506, 261, 5653, 29875, 29914, 2248, 29889, 1961, 29914, 6268, 362, 29914, 29946, 29889, 29896, 29914, 2111, 2540, 29914, 29928, 22119, 18545, 13, 13, 506, 1947, 29901, 2045, 597, 1636, 29889, 26129, 2214, 29889, 990, 29914, 27517, 29914, 29705, 29914, 8893, 4081, 29879, 29914, 509, 2960, 29914, 29931, 293, 1947, 29889, 3945, 13, 13, 21570, 3406, 29901, 529, 5813, 29958, 313, 3120, 5604, 511, 529, 5813, 29958, 313, 3120, 5604, 511, 529, 5813, 29958, 313, 3120, 5604, 511, 529, 5813, 29958, 313, 3120, 5604, 511, 529, 5813, 29958, 313, 29965, 29875, 5604, 511, 529, 5813, 29958, 313, 1692, 29897, 13, 13, 547, 3707, 839, 29887, 4110, 29901, 910, 664, 338, 760, 310, 278, 3086, 29855, 363, 20795, 7084, 11796, 292, 313, 3521, 29924, 2965, 511, 5220, 287, 491, 278, 3086, 5827, 2667, 310, 15202, 1549, 278, 405, 29902, 29950, 9321, 1958, 363, 20795, 10550, 29892, 18102, 501, 29945, 29946, 382, 29933, 29900, 29900, 29945, 29896, 29946, 29929, 29889, 29871, 3462, 3245, 2304, 363, 360, 24301, 848, 7371, 373, 8234, 567, 885, 812, 414, 471, 26869, 491, 529, 5813, 29958, 322, 529, 5813, 29958, 472, 278, 3014, 310, 25327, 29889, 13, 13, 15945, 29908, 13, 13, 1678, 1881, 29918, 6550, 353, 360, 22119, 18455, 4290, 10299, 13, 1678, 1962, 29918, 6550, 353, 360, 22119, 18455, 6466, 10299, 13, 1678, 903, 9006, 353, 376, 360, 22119, 18455, 376, 13, 1678, 903, 4905, 29879, 29918, 1777, 264, 1280, 353, 11117, 4905, 24679, 2396, 525, 4905, 24679, 29889, 1240, 29875, 742, 525, 4905, 9882, 2396, 525, 4905, 9882, 742, 525, 4905, 29933, 9065, 2396, 525, 4905, 29933, 9065, 29889, 29890, 791, 742, 525, 24970, 12877, 2283, 2396, 525, 24970, 12877, 2283, 742, 525, 4905, 29933, 29963, 11142, 2396, 525, 4905, 29933, 29963, 11142, 29889, 29890, 2003, 10827, 13, 1678, 903, 17886, 29918, 29916, 353, 7700, 13, 2 ]
neurodsp/sim/aperiodic.py
JanCBrammer/neurodsp
154
69532
"""Simulating time series, with aperiodic activity.""" import numpy as np from scipy.stats import zscore from scipy.linalg import toeplitz, cholesky from neurodsp.filt import filter_signal, infer_passtype from neurodsp.filt.fir import compute_filter_length from neurodsp.filt.checks import check_filter_definition from neurodsp.utils import remove_nans from neurodsp.utils.checks import check_param_range from neurodsp.utils.data import create_times, compute_nsamples from neurodsp.utils.decorators import normalize from neurodsp.spectral import rotate_powerlaw from neurodsp.sim.transients import sim_synaptic_kernel ################################################################################################### ################################################################################################### @normalize def sim_poisson_pop(n_seconds, fs, n_neurons=1000, firing_rate=2): """Simulate a Poisson population. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. n_neurons : int, optional, default: 1000 Number of neurons in the simulated population. firing_rate : float, optional, default: 2 Firing rate of individual neurons in the population. Returns ------- sig : 1d array Simulated population activity. Notes ----- The simulated signal is essentially white noise, but satisfies the Poisson property, i.e. mean(X) = var(X). The lambda parameter of the Poisson process (total rate) is determined as firing rate * number of neurons, i.e. summation of Poisson processes is still a Poisson processes. Note that the Gaussian approximation for a sum of Poisson processes is only a good approximation for large lambdas. Examples -------- Simulate a Poisson population: >>> sig = sim_poisson_pop(n_seconds=1, fs=500, n_neurons=1000, firing_rate=2) """ # Poisson population rate signal scales with # of neurons and individual rate lam = n_neurons * firing_rate # Variance is equal to the mean sig = np.random.normal(loc=lam, scale=lam**0.5, size=compute_nsamples(n_seconds, fs)) # Enforce that sig is non-negative in cases of low firing rate sig[np.where(sig < 0.)] = 0. return sig @normalize def sim_synaptic_current(n_seconds, fs, n_neurons=1000, firing_rate=2., tau_r=0., tau_d=0.01, t_ker=None): """Simulate a signal as a synaptic current, which has 1/f characteristics with a knee. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. n_neurons : int, optional, default: 1000 Number of neurons in the simulated population. firing_rate : float, optional, default: 2 Firing rate of individual neurons in the population. tau_r : float, optional, default: 0. Rise time of synaptic kernel, in seconds. tau_d : float, optional, default: 0.01 Decay time of synaptic kernel, in seconds. t_ker : float, optional Length of time of the simulated synaptic kernel, in seconds. Returns ------- sig : 1d array Simulated synaptic current. Notes ----- - This simulation is based on the one used in [1]_. - The resulting signal is most similar to unsigned intracellular current or conductance change. References ---------- .. [1] <NAME>., <NAME>., & <NAME>. (2017). Inferring synaptic excitation/inhibition balance from field potentials. NeuroImage, 158, 70–78. DOI: https://doi.org/10.1016/j.neuroimage.2017.06.078 Examples -------- Simulate a synaptic current signal: >>> sig = sim_synaptic_current(n_seconds=1, fs=500) """ # If not provided, compute t_ker as a function of decay time constant if t_ker is None: t_ker = 5. * tau_d # Simulate an extra bit because the convolution will trim & turn off normalization sig = sim_poisson_pop((n_seconds + t_ker), fs, n_neurons, firing_rate, mean=None, variance=None) ker = sim_synaptic_kernel(t_ker, fs, tau_r, tau_d) sig = np.convolve(sig, ker, 'valid')[:compute_nsamples(n_seconds, fs)] return sig @normalize def sim_knee(n_seconds, fs, chi1, chi2, knee): """Simulate a signal whose power spectrum has a 1/f structure with a knee. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. chi1 : float Power law exponent before the knee. chi2 : float Power law exponent added to chi1 after the knee. knee : float Location of the knee in Hz. Returns ------- sig : 1d array Time series with the desired power spectrum. Notes ----- This simulated time series has a power spectrum that follows the Lorentzian equation: `P(f) = 1 / (f**chi1 * (f**chi2 + knee))` - This simulation creates this power spectrum shape using a sum of sinusoids. - The slope of the log power spectrum before the knee is chi1 whereas after the knee it is chi2, but only when the sign of chi1 and chi2 are the same. Examples -------- Simulate a time series with chi1 of -1, chi2 of -2, and knee of 100: >> sim_knee(n_seconds=10, fs=1000, chi1=-1, chi2=-2, knee=100) """ times = create_times(n_seconds, fs) n_samples = compute_nsamples(n_seconds, fs) # Create frequencies for the power spectrum, which will be freqs of the summed cosines freqs = np.linspace(0, fs/2, num=int(n_samples//2 + 1), endpoint=True) # Drop the DC component freqs = freqs[1:] # Map the frequencies under the (square root) Lorentzian # This will give us the amplitude coefficients for the sinusoids cosine_coeffs = np.array([np.sqrt(1 / (freq ** -chi1 * (freq ** (-chi2 - chi1) + knee))) \ for freq in freqs]) # Add sinusoids with a random phase shift sig = np.sum(np.array([cosine_coeffs[ell] * \ np.cos(2 * np.pi * freq * times + 2 * np.pi * np.random.rand()) \ for ell, freq in enumerate(freqs)]), axis=0) return sig @normalize def sim_random_walk(n_seconds, fs, theta=1., mu=0., sigma=5.): """Simulate a mean-reverting random walk, as an Ornstein-Uhlenbeck process. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. theta : float, optional, default: 1.0 Memory scale parameter. Larger theta values create faster fluctuations. mu : float, optional, default: 0.0 Mean of the random walk. sigma : float, optional, default: 5.0 Standard deviation of the random walk. Returns ------- sig : 1d array Simulated random walk signal. Notes ----- The random walk is simulated as a discretized Ornstein-Uhlenbeck process: `dx = theta*(x-mu)*dt + sigma*dWt` Where: - mu : mean - sigma : standard deviation - theta : memory scale - dWt : increments of Wiener process, i.e. white noise See the wikipedia page [1]_ for the integral solution. References ---------- .. [1] https://en.wikipedia.org/wiki/Ornstein-Uhlenbeck_process#Formal_solution Examples -------- Simulate a Ornstein-Uhlenbeck random walk: >>> sig = sim_random_walk(n_seconds=1, fs=500, theta=1.) """ times = create_times(n_seconds, fs) x0 = mu dt = times[1] - times[0] ws = np.random.normal(size=len(times)) ex = np.exp(-theta * times) ws[0] = 0. sig = x0 * ex + mu * (1. - ex) + sigma * ex * \ np.cumsum(np.exp(theta * times) * np.sqrt(dt) * ws) return sig @normalize def sim_powerlaw(n_seconds, fs, exponent=-2.0, f_range=None, **filter_kwargs): """Simulate a power law time series, with a specified exponent. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. exponent : float, optional, default: -2 Desired power-law exponent, of the form P(f)=f^exponent. f_range : list of [float, float] or None, optional Frequency range to filter simulated data, as [f_lo, f_hi], in Hz. **filter_kwargs : kwargs, optional Keyword arguments to pass to `filter_signal`. Returns ------- sig : 1d array Time-series with the desired power law exponent. Notes ----- - Powerlaw data with exponents is created by spectrally rotating white noise [1]_. References ---------- .. [1] <NAME>., & <NAME>. (1995). On Generating Power Law Noise. Astronomy and Astrophysics, 300, 707–710. Examples -------- Simulate a power law signal, with an exponent of -2 (brown noise): >>> sig = sim_powerlaw(n_seconds=1, fs=500, exponent=-2.0) Simulate a power law signal, with a highpass filter applied at 2 Hz: >>> sig = sim_powerlaw(n_seconds=1, fs=500, exponent=-1.5, f_range=(2, None)) """ # Compute the number of samples for the simulated time series n_samples = compute_nsamples(n_seconds, fs) # Get the number of samples to simulate for the signal # If signal is to be filtered, with FIR, add extra to compensate for edges if f_range and filter_kwargs.get('filter_type', None) != 'iir': pass_type = infer_passtype(f_range) filt_len = compute_filter_length(fs, pass_type, *check_filter_definition(pass_type, f_range), n_seconds=filter_kwargs.get('n_seconds', None), n_cycles=filter_kwargs.get('n_cycles', 3)) n_samples += filt_len + 1 # Simulate the powerlaw data sig = _create_powerlaw(n_samples, fs, exponent) if f_range is not None: sig = filter_signal(sig, fs, infer_passtype(f_range), f_range, remove_edges=True, **filter_kwargs) # Drop the edges, that were compensated for, if not using FIR filter if not filter_kwargs.get('filter_type', None) == 'iir': sig, _ = remove_nans(sig) return sig @normalize def sim_frac_gaussian_noise(n_seconds, fs, chi=0, hurst=None): """Simulate a timeseries as fractional gaussian noise. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. chi: float, optional, default: 0 Desired power law exponent of the spectrum of the signal. Must be in the range (-1, 1). hurst : float, optional, default: None Desired Hurst parameter, which must be in the range (0, 1). If provided, this value overwrites the `chi` parameter. Returns ------- sig: 1d array Simulated fractional gaussian noise time series. Notes ----- The time series can be specified with either a desired power law exponent, or alternatively with a specified Hurst parameter. The Hurst parameter is not the Hurst exponent as defined in rescaled range analysis. The Hurst parameter is defined for self-similar processes such that Y(at) = a^H Y(t) for all a > 0, where this equality holds in distribution. The relationship between the power law exponent chi and the Hurst parameter for fractional gaussian noise is chi = 2 * hurst - 1. For more information, consult [1]_. References ---------- .. [1] <NAME>., <NAME>., <NAME>., & <NAME>. (2002). Fractal characterization of complexity in temporal physiological signals. Physiological Measurement, 23(1), R1–R38. DOI: https://doi.org/10.1088/0967-3334/23/1/201 Examples -------- Simulate fractional gaussian noise with a power law decay of 0 (white noise): >>> sig = sim_frac_gaussian_noise(n_seconds=1, fs=500, chi=0) Simulate fractional gaussian noise with a Hurst parameter of 0.5 (also white noise): >>> sig = sim_frac_gaussian_noise(n_seconds=1, fs=500, hurst=0.5) """ if hurst is not None: check_param_range(hurst, 'hurst', (0, 1)) else: check_param_range(chi, 'chi', (-1, 1)) # Infer the hurst parameter from chi hurst = (-chi + 1.) / 2 # Compute the number of samples for the simulated time series n_samples = compute_nsamples(n_seconds, fs) # Define helper function for computing the auto-covariance def autocov(hurst): return lambda k: 0.5 * (np.abs(k - 1) ** (2 * hurst) - 2 * \ k ** (2 * hurst) + (k + 1) ** (2 * hurst)) # Build the autocovariance matrix gamma = np.arange(0, n_samples) gamma = np.apply_along_axis(autocov(hurst), 0, gamma) autocov_matrix = toeplitz(gamma) # Use the Cholesky factor to transform white noise to get the desired time series white_noise = np.random.randn(n_samples) cholesky_factor = cholesky(autocov_matrix, lower=True) sig = cholesky_factor @ white_noise return sig @normalize def sim_frac_brownian_motion(n_seconds, fs, chi=-2, hurst=None): """Simulate a timeseries as fractional brownian motion. Parameters ---------- n_seconds : float Simulation time, in seconds. fs : float Sampling rate of simulated signal, in Hz. chi : float, optional, default: -2 Desired power law exponent of the spectrum of the signal. Must be in the range (-3, -1). hurst : float, optional, default: None Desired Hurst parameter, which must be in the range (0, 1). If provided, this value overwrites the `chi` parameter. Returns ------- sig : 1d array Simulated fractional brownian motion time series. Notes ----- The time series can be specified with either a desired power law exponent, or alternatively with a specified Hurst parameter. Note that when specifying there can be some bias leading to a steeper than expected spectrum of the simulated signal. This bias is higher for chi values near to 1, and may be more severe in shorter signals. The Hurst parameter is not the Hurst exponent in general. The Hurst parameter is defined for self-similar processes such that Y(at) = a^H Y(t) for all a > 0, where this equality holds in distribution. The relationship between the power law exponent chi and the Hurst parameter for fractional brownian motion is chi = 2 * hurst + 1 For more information, consult [1]_ and/or [2]_. References ---------- .. [1] <NAME>., <NAME>., <NAME>., & <NAME>. (2002). Fractal characterization of complexity in temporal physiological signals. Physiological Measurement, 23(1), R1–R38. DOI: https://doi.org/10.1088/0967-3334/23/1/201 .. [2] <NAME>. (2004). Simulation of fractional Brownian motion. 77. Examples -------- Simulate fractional brownian motion with a power law exponent of -2 (brown noise): >>> sig = sim_frac_brownian_motion(n_seconds=1, fs=500, chi=-2) Simulate fractional brownian motion with a Hurst parameter of 0.5 (also brown noise): >>> sig = sim_frac_brownian_motion(n_seconds=1, fs=500, hurst=0.5) """ if hurst is not None: check_param_range(hurst, 'hurst', (0, 1)) else: check_param_range(chi, 'chi', (-3, -1)) # Infer the hurst parameter from chi hurst = (-chi - 1.) / 2 # Fractional brownian motion is the cumulative sum of fractional gaussian noise fgn = sim_frac_gaussian_noise(n_seconds, fs, hurst=hurst) sig = np.cumsum(fgn) return sig def _create_powerlaw(n_samples, fs, exponent): """Create a power law time series. Parameters ---------- n_samples : int The number of samples to simulate. fs : float Sampling rate of simulated signal, in Hz. exponent : float Desired power-law exponent, of the form P(f)=f^exponent. Returns ------- sig : 1d array Time-series with the desired power law exponent. Notes ----- This function creates variable power law exponents by spectrally rotating white noise. """ # Start with white noise signal, that we will rotate, in frequency space sig = np.random.randn(n_samples) # Compute the FFT fft_output = np.fft.fft(sig) freqs = np.fft.fftfreq(len(sig), 1. / fs) # Rotate spectrum and invert back to time series, with a z-score to normalize # Delta exponent is divided by two, as the FFT output is in units of amplitude not power fft_output_rot = rotate_powerlaw(freqs, fft_output, -exponent/2) sig = zscore(np.real(np.fft.ifft(fft_output_rot))) return sig
[ 1, 9995, 8942, 18099, 931, 3652, 29892, 411, 263, 19145, 293, 6354, 1213, 15945, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 16202, 1053, 503, 13628, 13, 3166, 4560, 2272, 29889, 29880, 979, 29887, 1053, 29363, 572, 2784, 29892, 521, 6544, 3459, 13, 13, 3166, 452, 2192, 29881, 1028, 29889, 1777, 29873, 1053, 4175, 29918, 25436, 29892, 10115, 29918, 18182, 303, 668, 13, 3166, 452, 2192, 29881, 1028, 29889, 1777, 29873, 29889, 28034, 1053, 10272, 29918, 4572, 29918, 2848, 13, 3166, 452, 2192, 29881, 1028, 29889, 1777, 29873, 29889, 3198, 29879, 1053, 1423, 29918, 4572, 29918, 16553, 13, 3166, 452, 2192, 29881, 1028, 29889, 13239, 1053, 3349, 29918, 29876, 550, 13, 3166, 452, 2192, 29881, 1028, 29889, 13239, 29889, 3198, 29879, 1053, 1423, 29918, 3207, 29918, 3881, 13, 3166, 452, 2192, 29881, 1028, 29889, 13239, 29889, 1272, 1053, 1653, 29918, 3706, 29892, 10272, 29918, 1983, 9422, 13, 3166, 452, 2192, 29881, 1028, 29889, 13239, 29889, 19557, 4097, 1053, 4226, 675, 13, 3166, 452, 2192, 29881, 1028, 29889, 21494, 1705, 1053, 16734, 29918, 13519, 10653, 13, 3166, 452, 2192, 29881, 1028, 29889, 3601, 29889, 3286, 10070, 1053, 1027, 29918, 19274, 2156, 293, 29918, 17460, 13, 13, 13383, 13383, 13383, 13383, 13383, 13383, 2277, 29937, 13, 13383, 13383, 13383, 13383, 13383, 13383, 2277, 29937, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 1129, 17387, 29918, 7323, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 302, 29918, 16115, 787, 29922, 29896, 29900, 29900, 29900, 29892, 25948, 29918, 10492, 29922, 29906, 1125, 13, 1678, 9995, 8942, 5987, 263, 3929, 17387, 4665, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 302, 29918, 16115, 787, 584, 938, 29892, 13136, 29892, 2322, 29901, 29871, 29896, 29900, 29900, 29900, 13, 4706, 9681, 310, 26808, 787, 297, 278, 1027, 7964, 4665, 29889, 13, 1678, 25948, 29918, 10492, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29906, 13, 4706, 383, 8491, 6554, 310, 5375, 26808, 787, 297, 278, 4665, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 3439, 7964, 4665, 6354, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 450, 1027, 7964, 7182, 338, 13674, 4796, 11462, 29892, 541, 17150, 278, 3929, 17387, 13, 1678, 2875, 29892, 474, 29889, 29872, 29889, 2099, 29898, 29990, 29897, 353, 722, 29898, 29990, 467, 13, 13, 1678, 450, 14013, 3443, 310, 278, 3929, 17387, 1889, 313, 7827, 6554, 29897, 338, 10087, 408, 13, 1678, 25948, 6554, 334, 1353, 310, 26808, 787, 29892, 474, 29889, 29872, 29889, 22792, 362, 310, 3929, 17387, 10174, 338, 1603, 13, 1678, 263, 3929, 17387, 10174, 29889, 13, 13, 1678, 3940, 393, 278, 22477, 16845, 363, 263, 2533, 310, 3929, 17387, 10174, 338, 871, 13, 1678, 263, 1781, 16845, 363, 2919, 301, 1117, 17370, 29889, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 263, 3929, 17387, 4665, 29901, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 1129, 17387, 29918, 7323, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 302, 29918, 16115, 787, 29922, 29896, 29900, 29900, 29900, 29892, 25948, 29918, 10492, 29922, 29906, 29897, 13, 1678, 9995, 13, 13, 1678, 396, 3929, 17387, 4665, 6554, 7182, 23431, 411, 396, 310, 26808, 787, 322, 5375, 6554, 13, 1678, 301, 314, 353, 302, 29918, 16115, 787, 334, 25948, 29918, 10492, 13, 13, 1678, 396, 11681, 8837, 338, 5186, 304, 278, 2099, 13, 1678, 4365, 353, 7442, 29889, 8172, 29889, 8945, 29898, 2029, 29922, 5288, 29892, 6287, 29922, 5288, 1068, 29900, 29889, 29945, 29892, 2159, 29922, 26017, 29918, 1983, 9422, 29898, 29876, 29918, 23128, 29892, 18920, 876, 13, 13, 1678, 396, 1174, 10118, 393, 4365, 338, 1661, 29899, 22198, 297, 4251, 310, 4482, 25948, 6554, 13, 1678, 4365, 29961, 9302, 29889, 3062, 29898, 18816, 529, 29871, 29900, 1846, 29962, 353, 29871, 29900, 29889, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 19274, 2156, 293, 29918, 3784, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 302, 29918, 16115, 787, 29922, 29896, 29900, 29900, 29900, 29892, 25948, 29918, 10492, 29922, 29906, 1696, 13, 462, 308, 260, 585, 29918, 29878, 29922, 29900, 1696, 260, 585, 29918, 29881, 29922, 29900, 29889, 29900, 29896, 29892, 260, 29918, 3946, 29922, 8516, 1125, 13, 1678, 9995, 8942, 5987, 263, 7182, 408, 263, 5222, 2156, 293, 1857, 29892, 607, 756, 29871, 29896, 29914, 29888, 21862, 411, 263, 17905, 29872, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 302, 29918, 16115, 787, 584, 938, 29892, 13136, 29892, 2322, 29901, 29871, 29896, 29900, 29900, 29900, 13, 4706, 9681, 310, 26808, 787, 297, 278, 1027, 7964, 4665, 29889, 13, 1678, 25948, 29918, 10492, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29906, 13, 4706, 383, 8491, 6554, 310, 5375, 26808, 787, 297, 278, 4665, 29889, 13, 1678, 260, 585, 29918, 29878, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29900, 29889, 13, 4706, 390, 895, 931, 310, 5222, 2156, 293, 8466, 29892, 297, 6923, 29889, 13, 1678, 260, 585, 29918, 29881, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29900, 29889, 29900, 29896, 13, 4706, 3826, 388, 931, 310, 5222, 2156, 293, 8466, 29892, 297, 6923, 29889, 13, 1678, 260, 29918, 3946, 584, 5785, 29892, 13136, 13, 4706, 365, 1477, 310, 931, 310, 278, 1027, 7964, 5222, 2156, 293, 8466, 29892, 297, 6923, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 3439, 7964, 5222, 2156, 293, 1857, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 448, 910, 17402, 338, 2729, 373, 278, 697, 1304, 297, 518, 29896, 29962, 5396, 13, 1678, 448, 450, 9819, 7182, 338, 1556, 2788, 304, 12780, 938, 945, 514, 1070, 1857, 470, 7512, 749, 1735, 29889, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 6317, 518, 29896, 29962, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29896, 29955, 467, 512, 571, 5393, 5222, 2156, 293, 13, 965, 5566, 7018, 29914, 262, 6335, 654, 17346, 515, 1746, 7037, 29879, 29889, 2448, 2192, 2940, 29892, 29871, 29896, 29945, 29947, 29892, 29871, 29955, 29900, 29994, 29955, 29947, 29889, 13, 965, 11662, 29902, 29901, 2045, 597, 1867, 29875, 29889, 990, 29914, 29896, 29900, 29889, 29896, 29900, 29896, 29953, 29914, 29926, 29889, 484, 2192, 3027, 29889, 29906, 29900, 29896, 29955, 29889, 29900, 29953, 29889, 29900, 29955, 29947, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 263, 5222, 2156, 293, 1857, 7182, 29901, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 19274, 2156, 293, 29918, 3784, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29897, 13, 1678, 9995, 13, 13, 1678, 396, 960, 451, 4944, 29892, 10272, 260, 29918, 3946, 408, 263, 740, 310, 20228, 931, 4868, 13, 1678, 565, 260, 29918, 3946, 338, 6213, 29901, 13, 4706, 260, 29918, 3946, 353, 29871, 29945, 29889, 334, 260, 585, 29918, 29881, 13, 13, 1678, 396, 3439, 5987, 385, 4805, 2586, 1363, 278, 26851, 674, 17151, 669, 2507, 1283, 4226, 2133, 13, 1678, 4365, 353, 1027, 29918, 1129, 17387, 29918, 7323, 3552, 29876, 29918, 23128, 718, 260, 29918, 3946, 511, 18920, 29892, 302, 29918, 16115, 787, 29892, 25948, 29918, 10492, 29892, 13, 462, 3986, 2099, 29922, 8516, 29892, 20162, 29922, 8516, 29897, 13, 1678, 13023, 353, 1027, 29918, 19274, 2156, 293, 29918, 17460, 29898, 29873, 29918, 3946, 29892, 18920, 29892, 260, 585, 29918, 29878, 29892, 260, 585, 29918, 29881, 29897, 13, 1678, 4365, 353, 7442, 29889, 535, 1555, 345, 29898, 18816, 29892, 13023, 29892, 525, 3084, 1495, 7503, 26017, 29918, 1983, 9422, 29898, 29876, 29918, 23128, 29892, 18920, 4638, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 29895, 484, 29872, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 18558, 29896, 29892, 18558, 29906, 29892, 17905, 29872, 1125, 13, 1678, 9995, 8942, 5987, 263, 7182, 5069, 3081, 18272, 756, 263, 29871, 29896, 29914, 29888, 3829, 411, 263, 17905, 29872, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 18558, 29896, 584, 5785, 13, 4706, 9206, 4307, 28869, 1434, 278, 17905, 29872, 29889, 13, 1678, 18558, 29906, 584, 5785, 13, 4706, 9206, 4307, 28869, 2715, 304, 18558, 29896, 1156, 278, 17905, 29872, 29889, 13, 1678, 17905, 29872, 584, 5785, 13, 4706, 17015, 310, 278, 17905, 29872, 297, 379, 29920, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 5974, 3652, 411, 278, 7429, 3081, 18272, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 910, 1027, 7964, 931, 3652, 756, 263, 3081, 18272, 393, 4477, 278, 10980, 296, 29920, 713, 6306, 29901, 13, 13, 1678, 421, 29925, 29898, 29888, 29897, 353, 29871, 29896, 847, 313, 29888, 1068, 4161, 29896, 334, 313, 29888, 1068, 4161, 29906, 718, 17905, 29872, 25337, 13, 13, 1678, 448, 910, 17402, 10017, 445, 3081, 18272, 8267, 773, 263, 2533, 310, 4457, 375, 3398, 29879, 29889, 13, 1678, 448, 450, 24968, 310, 278, 1480, 3081, 18272, 1434, 278, 17905, 29872, 338, 18558, 29896, 13452, 1156, 278, 17905, 29872, 372, 338, 18558, 29906, 29892, 13, 1678, 541, 871, 746, 278, 1804, 310, 18558, 29896, 322, 18558, 29906, 526, 278, 1021, 29889, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 263, 931, 3652, 411, 18558, 29896, 310, 448, 29896, 29892, 18558, 29906, 310, 448, 29906, 29892, 322, 17905, 29872, 310, 29871, 29896, 29900, 29900, 29901, 13, 13, 1678, 5099, 1027, 29918, 29895, 484, 29872, 29898, 29876, 29918, 23128, 29922, 29896, 29900, 29892, 18920, 29922, 29896, 29900, 29900, 29900, 29892, 18558, 29896, 10457, 29896, 29892, 18558, 29906, 10457, 29906, 29892, 17905, 29872, 29922, 29896, 29900, 29900, 29897, 13, 1678, 9995, 13, 13, 1678, 3064, 353, 1653, 29918, 3706, 29898, 29876, 29918, 23128, 29892, 18920, 29897, 13, 1678, 302, 29918, 27736, 353, 10272, 29918, 1983, 9422, 29898, 29876, 29918, 23128, 29892, 18920, 29897, 13, 13, 1678, 396, 6204, 29511, 363, 278, 3081, 18272, 29892, 607, 674, 367, 3005, 29939, 29879, 310, 278, 2533, 2168, 6776, 1475, 13, 1678, 3005, 29939, 29879, 353, 7442, 29889, 1915, 3493, 29898, 29900, 29892, 18920, 29914, 29906, 29892, 954, 29922, 524, 29898, 29876, 29918, 27736, 458, 29906, 718, 29871, 29896, 511, 16248, 29922, 5574, 29897, 13, 13, 1678, 396, 20724, 278, 13681, 4163, 13, 1678, 3005, 29939, 29879, 353, 3005, 29939, 29879, 29961, 29896, 17531, 13, 13, 1678, 396, 7315, 278, 29511, 1090, 278, 313, 17619, 3876, 29897, 10980, 296, 29920, 713, 13, 1678, 396, 259, 910, 674, 2367, 502, 278, 28347, 16127, 363, 278, 4457, 375, 3398, 29879, 13, 1678, 6776, 457, 29918, 1111, 12352, 29879, 353, 7442, 29889, 2378, 4197, 9302, 29889, 3676, 29898, 29896, 847, 313, 29888, 7971, 3579, 448, 4161, 29896, 334, 313, 29888, 7971, 3579, 8521, 4161, 29906, 448, 18558, 29896, 29897, 718, 17905, 29872, 4961, 320, 13, 4706, 363, 3005, 29939, 297, 3005, 29939, 29879, 2314, 13, 13, 1678, 396, 3462, 4457, 375, 3398, 29879, 411, 263, 4036, 8576, 9500, 13, 1678, 4365, 353, 7442, 29889, 2083, 29898, 9302, 29889, 2378, 4197, 3944, 457, 29918, 1111, 12352, 29879, 29961, 514, 29962, 334, 320, 13, 462, 3986, 7442, 29889, 3944, 29898, 29906, 334, 7442, 29889, 1631, 334, 3005, 29939, 334, 3064, 718, 29871, 29906, 334, 7442, 29889, 1631, 334, 7442, 29889, 8172, 29889, 9502, 3101, 320, 13, 462, 363, 12302, 29892, 3005, 29939, 297, 26985, 29898, 29888, 7971, 29879, 4638, 511, 9685, 29922, 29900, 29897, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 8172, 29918, 20919, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 278, 941, 29922, 29896, 1696, 3887, 29922, 29900, 1696, 269, 2934, 29922, 29945, 9575, 13, 1678, 9995, 8942, 5987, 263, 2099, 29899, 276, 369, 1259, 4036, 6686, 29892, 408, 385, 1394, 29876, 5465, 29899, 29965, 29785, 19645, 1889, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 278, 941, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29896, 29889, 29900, 13, 4706, 18914, 6287, 3443, 29889, 8218, 914, 278, 941, 1819, 1653, 8473, 1652, 5313, 29884, 800, 29889, 13, 1678, 3887, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29900, 29889, 29900, 13, 4706, 16316, 310, 278, 4036, 6686, 29889, 13, 1678, 269, 2934, 584, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29945, 29889, 29900, 13, 4706, 10117, 29522, 310, 278, 4036, 6686, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 3439, 7964, 4036, 6686, 7182, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 450, 4036, 6686, 338, 1027, 7964, 408, 263, 766, 4838, 1891, 1394, 29876, 5465, 29899, 29965, 29785, 19645, 1889, 29901, 13, 13, 1678, 421, 8235, 353, 278, 941, 16395, 29916, 29899, 2589, 11877, 6008, 718, 269, 2934, 29930, 29881, 29956, 29873, 29952, 13, 13, 1678, 6804, 29901, 13, 13, 1678, 448, 3887, 584, 2099, 13, 1678, 448, 269, 2934, 584, 3918, 29522, 13, 1678, 448, 278, 941, 584, 3370, 6287, 13, 1678, 448, 270, 29956, 29873, 584, 3079, 1860, 310, 27301, 1889, 29892, 474, 29889, 29872, 29889, 4796, 11462, 13, 13, 1678, 2823, 278, 281, 638, 4652, 1813, 518, 29896, 21540, 363, 278, 10160, 1650, 29889, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 6317, 518, 29896, 29962, 2045, 597, 264, 29889, 6011, 29889, 990, 29914, 4594, 29914, 2816, 29876, 5465, 29899, 29965, 29785, 19645, 29918, 5014, 29937, 2500, 284, 29918, 2929, 918, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 263, 1394, 29876, 5465, 29899, 29965, 29785, 19645, 4036, 6686, 29901, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 8172, 29918, 20919, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 278, 941, 29922, 29896, 1846, 13, 1678, 9995, 13, 13, 1678, 3064, 353, 1653, 29918, 3706, 29898, 29876, 29918, 23128, 29892, 18920, 29897, 13, 13, 1678, 921, 29900, 353, 3887, 13, 1678, 11636, 353, 3064, 29961, 29896, 29962, 448, 3064, 29961, 29900, 29962, 13, 1678, 16904, 353, 7442, 29889, 8172, 29889, 8945, 29898, 2311, 29922, 2435, 29898, 3706, 876, 13, 1678, 429, 353, 7442, 29889, 4548, 6278, 3416, 334, 3064, 29897, 13, 1678, 16904, 29961, 29900, 29962, 353, 29871, 29900, 29889, 13, 13, 1678, 4365, 353, 921, 29900, 334, 429, 718, 3887, 334, 313, 29896, 29889, 448, 429, 29897, 718, 269, 2934, 334, 429, 334, 320, 13, 4706, 7442, 29889, 29883, 398, 2083, 29898, 9302, 29889, 4548, 29898, 3416, 334, 3064, 29897, 334, 7442, 29889, 3676, 29898, 6008, 29897, 334, 16904, 29897, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 13519, 10653, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 28869, 10457, 29906, 29889, 29900, 29892, 285, 29918, 3881, 29922, 8516, 29892, 3579, 4572, 29918, 19290, 1125, 13, 1678, 9995, 8942, 5987, 263, 3081, 4307, 931, 3652, 29892, 411, 263, 6790, 28869, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 28869, 584, 5785, 29892, 13136, 29892, 2322, 29901, 448, 29906, 13, 4706, 2726, 2859, 3081, 29899, 10653, 28869, 29892, 310, 278, 883, 349, 29898, 29888, 3892, 29888, 29985, 735, 3296, 29889, 13, 1678, 285, 29918, 3881, 584, 1051, 310, 518, 7411, 29892, 5785, 29962, 470, 6213, 29892, 13136, 13, 4706, 3878, 23860, 3464, 304, 4175, 1027, 7964, 848, 29892, 408, 518, 29888, 29918, 417, 29892, 285, 29918, 2918, 1402, 297, 379, 29920, 29889, 13, 1678, 3579, 4572, 29918, 19290, 584, 9049, 5085, 29892, 13136, 13, 4706, 7670, 1742, 6273, 304, 1209, 304, 421, 4572, 29918, 25436, 1412, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 5974, 29899, 13757, 411, 278, 7429, 3081, 4307, 28869, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 448, 9206, 10653, 848, 411, 429, 9340, 338, 2825, 491, 6683, 29878, 635, 5731, 1218, 4796, 11462, 518, 29896, 29962, 5396, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 6317, 518, 29896, 29962, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29896, 29929, 29929, 29945, 467, 1551, 3251, 1218, 9206, 7927, 1939, 895, 29889, 13, 965, 27348, 29891, 322, 10186, 307, 25105, 29892, 29871, 29941, 29900, 29900, 29892, 29871, 29955, 29900, 29955, 29994, 29955, 29896, 29900, 29889, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 263, 3081, 4307, 7182, 29892, 411, 385, 28869, 310, 448, 29906, 313, 29890, 4708, 11462, 1125, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 13519, 10653, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 28869, 10457, 29906, 29889, 29900, 29897, 13, 13, 1678, 3439, 5987, 263, 3081, 4307, 7182, 29892, 411, 263, 1880, 3364, 4175, 7436, 472, 29871, 29906, 379, 29920, 29901, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 13519, 10653, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 28869, 10457, 29896, 29889, 29945, 29892, 285, 29918, 3881, 7607, 29906, 29892, 6213, 876, 13, 1678, 9995, 13, 13, 1678, 396, 11796, 29872, 278, 1353, 310, 11916, 363, 278, 1027, 7964, 931, 3652, 13, 1678, 302, 29918, 27736, 353, 10272, 29918, 1983, 9422, 29898, 29876, 29918, 23128, 29892, 18920, 29897, 13, 13, 1678, 396, 3617, 278, 1353, 310, 11916, 304, 29611, 363, 278, 7182, 13, 1678, 396, 259, 960, 7182, 338, 304, 367, 22289, 29892, 411, 383, 8193, 29892, 788, 4805, 304, 22874, 403, 363, 12770, 13, 1678, 565, 285, 29918, 3881, 322, 4175, 29918, 19290, 29889, 657, 877, 4572, 29918, 1853, 742, 6213, 29897, 2804, 525, 29875, 381, 2396, 13, 13, 4706, 1209, 29918, 1853, 353, 10115, 29918, 18182, 303, 668, 29898, 29888, 29918, 3881, 29897, 13, 4706, 977, 29873, 29918, 2435, 353, 10272, 29918, 4572, 29918, 2848, 29898, 5847, 29892, 1209, 29918, 1853, 29892, 13, 462, 462, 308, 334, 3198, 29918, 4572, 29918, 16553, 29898, 3364, 29918, 1853, 29892, 285, 29918, 3881, 511, 13, 462, 462, 308, 302, 29918, 23128, 29922, 4572, 29918, 19290, 29889, 657, 877, 29876, 29918, 23128, 742, 6213, 511, 13, 462, 462, 308, 302, 29918, 1270, 7799, 29922, 4572, 29918, 19290, 29889, 657, 877, 29876, 29918, 1270, 7799, 742, 29871, 29941, 876, 13, 13, 4706, 302, 29918, 27736, 4619, 977, 29873, 29918, 2435, 718, 29871, 29896, 13, 13, 1678, 396, 3439, 5987, 278, 3081, 10653, 848, 13, 1678, 4365, 353, 903, 3258, 29918, 13519, 10653, 29898, 29876, 29918, 27736, 29892, 18920, 29892, 28869, 29897, 13, 13, 1678, 565, 285, 29918, 3881, 338, 451, 6213, 29901, 13, 4706, 4365, 353, 4175, 29918, 25436, 29898, 18816, 29892, 18920, 29892, 10115, 29918, 18182, 303, 668, 29898, 29888, 29918, 3881, 511, 285, 29918, 3881, 29892, 13, 462, 9651, 3349, 29918, 287, 2710, 29922, 5574, 29892, 3579, 4572, 29918, 19290, 29897, 13, 4706, 396, 20724, 278, 12770, 29892, 393, 892, 22874, 630, 363, 29892, 565, 451, 773, 383, 8193, 4175, 13, 4706, 565, 451, 4175, 29918, 19290, 29889, 657, 877, 4572, 29918, 1853, 742, 6213, 29897, 1275, 525, 29875, 381, 2396, 13, 9651, 4365, 29892, 903, 353, 3349, 29918, 29876, 550, 29898, 18816, 29897, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 1154, 29918, 29887, 17019, 29918, 1217, 895, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 18558, 29922, 29900, 29892, 12166, 303, 29922, 8516, 1125, 13, 1678, 9995, 8942, 5987, 263, 3064, 6358, 408, 15958, 284, 330, 17019, 11462, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 18558, 29901, 5785, 29892, 13136, 29892, 2322, 29901, 29871, 29900, 13, 4706, 2726, 2859, 3081, 4307, 28869, 310, 278, 18272, 310, 278, 7182, 29889, 13, 4706, 19928, 367, 297, 278, 3464, 8521, 29896, 29892, 29871, 29896, 467, 13, 1678, 12166, 303, 584, 5785, 29892, 13136, 29892, 2322, 29901, 6213, 13, 4706, 2726, 2859, 22220, 303, 3443, 29892, 607, 1818, 367, 297, 278, 3464, 313, 29900, 29892, 29871, 29896, 467, 13, 4706, 960, 4944, 29892, 445, 995, 975, 8231, 267, 278, 421, 4161, 29952, 3443, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 29901, 29871, 29896, 29881, 1409, 13, 4706, 3439, 7964, 15958, 284, 330, 17019, 11462, 931, 3652, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 450, 931, 3652, 508, 367, 6790, 411, 2845, 263, 7429, 3081, 4307, 28869, 29892, 13, 1678, 470, 5136, 6703, 411, 263, 6790, 22220, 303, 3443, 29889, 13, 13, 1678, 450, 22220, 303, 3443, 338, 451, 278, 22220, 303, 28869, 408, 3342, 297, 620, 29883, 7943, 3464, 7418, 29889, 13, 1678, 450, 22220, 303, 3443, 338, 3342, 363, 1583, 29899, 29764, 10174, 1316, 393, 612, 29898, 271, 29897, 353, 263, 29985, 29950, 612, 29898, 29873, 29897, 13, 1678, 363, 599, 263, 1405, 29871, 29900, 29892, 988, 445, 17193, 8640, 297, 4978, 29889, 13, 13, 1678, 450, 9443, 1546, 278, 3081, 4307, 28869, 18558, 322, 278, 22220, 303, 3443, 13, 1678, 363, 15958, 284, 330, 17019, 11462, 338, 18558, 353, 29871, 29906, 334, 12166, 303, 448, 29871, 29896, 29889, 13, 13, 1678, 1152, 901, 2472, 29892, 8799, 518, 29896, 29962, 5396, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 6317, 518, 29896, 29962, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29900, 29906, 467, 383, 1461, 284, 2931, 2133, 310, 13, 965, 13644, 297, 25406, 4824, 29875, 5996, 18470, 29889, 11661, 29875, 5996, 2191, 3745, 358, 29892, 29871, 29906, 29941, 29898, 29896, 511, 390, 29896, 29994, 29934, 29941, 29947, 29889, 13, 965, 11662, 29902, 29901, 2045, 597, 1867, 29875, 29889, 990, 29914, 29896, 29900, 29889, 29896, 29900, 29947, 29947, 29914, 29900, 29929, 29953, 29955, 29899, 29941, 29941, 29941, 29946, 29914, 29906, 29941, 29914, 29896, 29914, 29906, 29900, 29896, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 15958, 284, 330, 17019, 11462, 411, 263, 3081, 4307, 20228, 310, 29871, 29900, 313, 10921, 11462, 1125, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 1154, 29918, 29887, 17019, 29918, 1217, 895, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 18558, 29922, 29900, 29897, 13, 13, 1678, 3439, 5987, 15958, 284, 330, 17019, 11462, 411, 263, 22220, 303, 3443, 310, 29871, 29900, 29889, 29945, 313, 15189, 4796, 11462, 1125, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 1154, 29918, 29887, 17019, 29918, 1217, 895, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 12166, 303, 29922, 29900, 29889, 29945, 29897, 13, 1678, 9995, 13, 13, 1678, 565, 12166, 303, 338, 451, 6213, 29901, 13, 4706, 1423, 29918, 3207, 29918, 3881, 29898, 29882, 26268, 29892, 525, 29882, 26268, 742, 313, 29900, 29892, 29871, 29896, 876, 13, 13, 1678, 1683, 29901, 13, 4706, 1423, 29918, 3207, 29918, 3881, 29898, 4161, 29892, 525, 4161, 742, 8521, 29896, 29892, 29871, 29896, 876, 13, 13, 4706, 396, 512, 571, 278, 12166, 303, 3443, 515, 18558, 13, 4706, 12166, 303, 353, 8521, 4161, 718, 29871, 29896, 1846, 847, 29871, 29906, 13, 13, 1678, 396, 11796, 29872, 278, 1353, 310, 11916, 363, 278, 1027, 7964, 931, 3652, 13, 1678, 302, 29918, 27736, 353, 10272, 29918, 1983, 9422, 29898, 29876, 29918, 23128, 29892, 18920, 29897, 13, 13, 1678, 396, 22402, 16876, 740, 363, 20602, 278, 4469, 29899, 24542, 279, 8837, 13, 1678, 822, 1120, 542, 586, 29898, 29882, 26268, 1125, 13, 4706, 736, 14013, 413, 29901, 29871, 29900, 29889, 29945, 334, 313, 9302, 29889, 6897, 29898, 29895, 448, 29871, 29896, 29897, 3579, 313, 29906, 334, 12166, 303, 29897, 448, 29871, 29906, 334, 320, 13, 462, 18884, 413, 3579, 313, 29906, 334, 12166, 303, 29897, 718, 313, 29895, 718, 29871, 29896, 29897, 3579, 313, 29906, 334, 12166, 303, 876, 13, 13, 1678, 396, 8878, 278, 1120, 542, 586, 279, 8837, 4636, 13, 1678, 330, 2735, 353, 7442, 29889, 279, 927, 29898, 29900, 29892, 302, 29918, 27736, 29897, 13, 1678, 330, 2735, 353, 7442, 29889, 7302, 29918, 284, 549, 29918, 8990, 29898, 1300, 542, 586, 29898, 29882, 26268, 511, 29871, 29900, 29892, 330, 2735, 29897, 13, 1678, 1120, 542, 586, 29918, 5344, 353, 29363, 572, 2784, 29898, 4283, 29897, 13, 13, 1678, 396, 4803, 278, 678, 6544, 3459, 7329, 304, 4327, 4796, 11462, 304, 679, 278, 7429, 931, 3652, 13, 1678, 4796, 29918, 1217, 895, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 29876, 29918, 27736, 29897, 13, 1678, 521, 6544, 3459, 29918, 19790, 353, 521, 6544, 3459, 29898, 1300, 542, 586, 29918, 5344, 29892, 5224, 29922, 5574, 29897, 13, 1678, 4365, 353, 521, 6544, 3459, 29918, 19790, 732, 4796, 29918, 1217, 895, 13, 13, 1678, 736, 4365, 13, 13, 13, 29992, 8945, 675, 13, 1753, 1027, 29918, 1154, 29918, 29890, 4708, 713, 29918, 29885, 8194, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 18558, 10457, 29906, 29892, 12166, 303, 29922, 8516, 1125, 13, 1678, 9995, 8942, 5987, 263, 3064, 6358, 408, 15958, 284, 17354, 713, 10884, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 23128, 584, 5785, 13, 4706, 3439, 2785, 931, 29892, 297, 6923, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 18558, 584, 5785, 29892, 13136, 29892, 2322, 29901, 448, 29906, 13, 4706, 2726, 2859, 3081, 4307, 28869, 310, 278, 18272, 310, 278, 7182, 29889, 13, 4706, 19928, 367, 297, 278, 3464, 8521, 29941, 29892, 448, 29896, 467, 13, 1678, 12166, 303, 584, 5785, 29892, 13136, 29892, 2322, 29901, 6213, 13, 4706, 2726, 2859, 22220, 303, 3443, 29892, 607, 1818, 367, 297, 278, 3464, 313, 29900, 29892, 29871, 29896, 467, 13, 4706, 960, 4944, 29892, 445, 995, 975, 8231, 267, 278, 421, 4161, 29952, 3443, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 3439, 7964, 15958, 284, 17354, 713, 10884, 931, 3652, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 450, 931, 3652, 508, 367, 6790, 411, 2845, 263, 7429, 3081, 4307, 28869, 29892, 13, 1678, 470, 5136, 6703, 411, 263, 6790, 22220, 303, 3443, 29889, 13, 13, 1678, 3940, 393, 746, 22146, 727, 508, 367, 777, 24003, 8236, 304, 263, 1886, 11356, 1135, 3806, 13, 1678, 18272, 310, 278, 1027, 7964, 7182, 29889, 910, 24003, 338, 6133, 363, 18558, 1819, 2978, 304, 29871, 29896, 29892, 13, 1678, 322, 1122, 367, 901, 22261, 297, 20511, 18470, 29889, 13, 13, 1678, 450, 22220, 303, 3443, 338, 451, 278, 22220, 303, 28869, 297, 2498, 29889, 450, 22220, 303, 3443, 13, 1678, 338, 3342, 363, 1583, 29899, 29764, 10174, 1316, 393, 612, 29898, 271, 29897, 353, 263, 29985, 29950, 612, 29898, 29873, 29897, 363, 599, 263, 1405, 29871, 29900, 29892, 13, 1678, 988, 445, 17193, 8640, 297, 4978, 29889, 13, 13, 1678, 450, 9443, 1546, 278, 3081, 4307, 28869, 18558, 322, 278, 22220, 303, 3443, 13, 1678, 363, 15958, 284, 17354, 713, 10884, 338, 18558, 353, 29871, 29906, 334, 12166, 303, 718, 29871, 29896, 13, 13, 1678, 1152, 901, 2472, 29892, 8799, 518, 29896, 21540, 322, 29914, 272, 518, 29906, 29962, 5396, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 6317, 518, 29896, 29962, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 529, 5813, 29958, 1696, 669, 529, 5813, 15513, 313, 29906, 29900, 29900, 29906, 467, 383, 1461, 284, 2931, 2133, 310, 13, 965, 13644, 297, 25406, 4824, 29875, 5996, 18470, 29889, 11661, 29875, 5996, 2191, 3745, 358, 29892, 29871, 29906, 29941, 29898, 29896, 511, 390, 29896, 29994, 29934, 29941, 29947, 29889, 13, 965, 11662, 29902, 29901, 2045, 597, 1867, 29875, 29889, 990, 29914, 29896, 29900, 29889, 29896, 29900, 29947, 29947, 29914, 29900, 29929, 29953, 29955, 29899, 29941, 29941, 29941, 29946, 29914, 29906, 29941, 29914, 29896, 29914, 29906, 29900, 29896, 13, 1678, 6317, 518, 29906, 29962, 529, 5813, 15513, 313, 29906, 29900, 29900, 29946, 467, 3439, 2785, 310, 15958, 284, 9817, 713, 10884, 29889, 29871, 29955, 29955, 29889, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 3439, 5987, 15958, 284, 17354, 713, 10884, 411, 263, 3081, 4307, 28869, 310, 448, 29906, 313, 29890, 4708, 11462, 1125, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 1154, 29918, 29890, 4708, 713, 29918, 29885, 8194, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 18558, 10457, 29906, 29897, 13, 13, 1678, 3439, 5987, 15958, 284, 17354, 713, 10884, 411, 263, 22220, 303, 3443, 310, 29871, 29900, 29889, 29945, 313, 15189, 17354, 11462, 1125, 13, 13, 1678, 8653, 4365, 353, 1027, 29918, 1154, 29918, 29890, 4708, 713, 29918, 29885, 8194, 29898, 29876, 29918, 23128, 29922, 29896, 29892, 18920, 29922, 29945, 29900, 29900, 29892, 12166, 303, 29922, 29900, 29889, 29945, 29897, 13, 1678, 9995, 13, 13, 1678, 565, 12166, 303, 338, 451, 6213, 29901, 13, 4706, 1423, 29918, 3207, 29918, 3881, 29898, 29882, 26268, 29892, 525, 29882, 26268, 742, 313, 29900, 29892, 29871, 29896, 876, 13, 13, 1678, 1683, 29901, 13, 4706, 1423, 29918, 3207, 29918, 3881, 29898, 4161, 29892, 525, 4161, 742, 8521, 29941, 29892, 448, 29896, 876, 13, 13, 4706, 396, 512, 571, 278, 12166, 303, 3443, 515, 18558, 13, 4706, 12166, 303, 353, 8521, 4161, 448, 29871, 29896, 1846, 847, 29871, 29906, 13, 13, 1678, 396, 7347, 428, 284, 17354, 713, 10884, 338, 278, 13299, 28524, 2533, 310, 15958, 284, 330, 17019, 11462, 13, 1678, 285, 5138, 353, 1027, 29918, 1154, 29918, 29887, 17019, 29918, 1217, 895, 29898, 29876, 29918, 23128, 29892, 18920, 29892, 12166, 303, 29922, 29882, 26268, 29897, 13, 1678, 4365, 353, 7442, 29889, 29883, 398, 2083, 29898, 29888, 5138, 29897, 13, 13, 1678, 736, 4365, 13, 13, 13, 1753, 903, 3258, 29918, 13519, 10653, 29898, 29876, 29918, 27736, 29892, 18920, 29892, 28869, 1125, 13, 1678, 9995, 4391, 263, 3081, 4307, 931, 3652, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 302, 29918, 27736, 584, 938, 13, 4706, 450, 1353, 310, 11916, 304, 29611, 29889, 13, 1678, 18920, 584, 5785, 13, 4706, 3685, 10335, 6554, 310, 1027, 7964, 7182, 29892, 297, 379, 29920, 29889, 13, 1678, 28869, 584, 5785, 13, 4706, 2726, 2859, 3081, 29899, 10653, 28869, 29892, 310, 278, 883, 349, 29898, 29888, 3892, 29888, 29985, 735, 3296, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 4365, 584, 29871, 29896, 29881, 1409, 13, 4706, 5974, 29899, 13757, 411, 278, 7429, 3081, 4307, 28869, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 910, 740, 10017, 2286, 3081, 4307, 429, 9340, 491, 6683, 29878, 635, 5731, 1218, 4796, 11462, 29889, 13, 1678, 9995, 13, 13, 1678, 396, 7370, 411, 4796, 11462, 7182, 29892, 393, 591, 674, 16734, 29892, 297, 10868, 2913, 13, 1678, 4365, 353, 7442, 29889, 8172, 29889, 9502, 29876, 29898, 29876, 29918, 27736, 29897, 13, 13, 1678, 396, 11796, 29872, 278, 383, 7818, 13, 1678, 285, 615, 29918, 4905, 353, 7442, 29889, 600, 29873, 29889, 600, 29873, 29898, 18816, 29897, 13, 1678, 3005, 29939, 29879, 353, 7442, 29889, 600, 29873, 29889, 600, 13264, 7971, 29898, 2435, 29898, 18816, 511, 29871, 29896, 29889, 847, 18920, 29897, 13, 13, 1678, 396, 9664, 403, 18272, 322, 21292, 1250, 304, 931, 3652, 29892, 411, 263, 503, 29899, 13628, 304, 4226, 675, 13, 1678, 396, 259, 360, 2554, 28869, 338, 13931, 491, 1023, 29892, 408, 278, 383, 7818, 1962, 338, 297, 10340, 310, 28347, 451, 3081, 13, 1678, 285, 615, 29918, 4905, 29918, 5450, 353, 16734, 29918, 13519, 10653, 29898, 29888, 7971, 29879, 29892, 285, 615, 29918, 4905, 29892, 448, 735, 3296, 29914, 29906, 29897, 13, 1678, 4365, 353, 503, 13628, 29898, 9302, 29889, 6370, 29898, 9302, 29889, 600, 29873, 29889, 361, 615, 29898, 600, 29873, 29918, 4905, 29918, 5450, 4961, 13, 13, 1678, 736, 4365, 13, 2 ]
yauber_algo/_algo/tests/test_featurewiz_categorize.py
LongNguyen1012/yauber-algo
1
141031
import unittest from yauber_algo.errors import * class CategorizeTestCase(unittest.TestCase): def test_categorize(self): import yauber_algo.sanitychecks as sc from numpy import array, nan, inf import os import sys import pandas as pd import numpy as np from yauber_algo.algo import categorize # # Function settings # algo = 'categorize' func = categorize with sc.SanityChecker(algo) as s: # # Check regular algorithm logic # s.check_regular( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 3, 6, 10] ), suffix='reg' ) s.check_regular( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0.1, 3, 6, 10] ), suffix='min_not_in_bins', exception=YaUberAlgoInternalError ) s.check_regular( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 3, 6, 9.999] ), suffix='max_not_in_bins', exception=YaUberAlgoInternalError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 10] ), suffix='min_max_one_bin', exception=YaUberAlgoArgumentError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 10, 10] ), suffix='bins_non_unique', exception=YaUberAlgoArgumentError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 10, 5] ), suffix='bins_not_sorted', exception=YaUberAlgoArgumentError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 5, 'obj'] ), suffix='bins_non_number', exception=YaUberAlgoArgumentError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 5, nan] ), suffix='bins_nan', exception=YaUberAlgoArgumentError ) s.check_regular( np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), [0, 5, inf] ), suffix='bins_inf', exception=YaUberAlgoArgumentError ) s.check_naninf( np.array([0., 0., 0., 0., 1., 1., 1., 2., nan, nan]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, inf, nan]), [0, 3, 6, 10] ), suffix='reg' ) s.check_regular( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), np.array([0, 3, 6, 10]) ), suffix='bins_are_np_array' ) s.check_regular( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.]), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10]), pd.Series([0, 3, 6, 10]) ), suffix='bins_are_series' ) s.check_series( pd.Series(np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.])), func, ( pd.Series(np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10])), [0, 3, 6, 10] ), suffix='' ) s.check_dtype_float( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.], dtype=np.float), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10], dtype=np.float), [0, 3, 6, 10] ), suffix='' ) s.check_dtype_int( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.], dtype=np.float), func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10], dtype=np.int32), [0, 3, 6, 10] ), suffix='' ) s.check_dtype_bool( np.array([0., 0., 0., 0., 1., 1., 1., 2., 2., 2.], dtype=np.float), func, ( np.array([0, 1, 0, 0, 1, 0, 1, 0, 0, 1], dtype=np.bool), [0, 3, 6, 10] ), suffix='', exception=YaUberAlgoDtypeNotSupportedError ) s.check_dtype_object( func, ( np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 10], dtype=np.object), [0, 3, 6, 10] ), suffix='' ) s.check_futref(5, 1, func, ( np.random.random(1000), [0, 0.33, 0.66, 1.0] ), ) s.check_window_consistency(5, 1, func, ( np.random.random(1000), [0, 0.33, 0.66, 1.0] ), )
[ 1, 1053, 443, 27958, 13, 3166, 9343, 11234, 29918, 284, 1484, 29889, 12523, 1053, 334, 13, 13, 13, 1990, 315, 20440, 675, 3057, 8259, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 29883, 20440, 675, 29898, 1311, 1125, 13, 4706, 1053, 9343, 11234, 29918, 284, 1484, 29889, 28455, 537, 3198, 29879, 408, 885, 13, 4706, 515, 12655, 1053, 1409, 29892, 23432, 29892, 3041, 13, 4706, 1053, 2897, 13, 4706, 1053, 10876, 13, 4706, 1053, 11701, 408, 10518, 13, 4706, 1053, 12655, 408, 7442, 13, 13, 4706, 515, 9343, 11234, 29918, 284, 1484, 29889, 284, 1484, 1053, 11608, 675, 13, 13, 4706, 396, 13, 4706, 396, 6680, 6055, 13, 4706, 396, 13, 4706, 24673, 353, 525, 29883, 20440, 675, 29915, 13, 4706, 3653, 353, 11608, 675, 13, 13, 4706, 411, 885, 29889, 22509, 537, 5596, 261, 29898, 284, 1484, 29897, 408, 269, 29901, 13, 9651, 396, 13, 9651, 396, 5399, 4943, 5687, 5900, 13, 9651, 396, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 1727, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29889, 29896, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 1195, 29918, 1333, 29918, 262, 29918, 29890, 1144, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 16491, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29929, 29889, 29929, 29929, 29929, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 3317, 29918, 1333, 29918, 262, 29918, 29890, 1144, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 16491, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 1195, 29918, 3317, 29918, 650, 29918, 2109, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 5464, 29918, 13092, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29945, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 1333, 29918, 24582, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29945, 29892, 525, 5415, 2033, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 5464, 29918, 4537, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29945, 29892, 23432, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 13707, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29945, 29892, 3041, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 7192, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 15730, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 13707, 7192, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 23432, 29892, 23432, 11724, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 3041, 29892, 23432, 11724, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 1727, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 2314, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 598, 29918, 9302, 29918, 2378, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 15227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 5586, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 11724, 13, 462, 1678, 10518, 29889, 19204, 4197, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 2314, 13, 18884, 10353, 13, 18884, 25557, 2433, 29890, 1144, 29918, 598, 29918, 13757, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 13757, 29898, 13, 18884, 10518, 29889, 19204, 29898, 9302, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 29889, 2314, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 10518, 29889, 19204, 29898, 9302, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 2314, 511, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 29881, 1853, 29918, 7411, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 29889, 1402, 26688, 29922, 9302, 29889, 7411, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 1402, 26688, 29922, 9302, 29889, 7411, 511, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 29881, 1853, 29918, 524, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 29889, 1402, 26688, 29922, 9302, 29889, 7411, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 1402, 26688, 29922, 9302, 29889, 524, 29941, 29906, 511, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 29881, 1853, 29918, 11227, 29898, 13, 18884, 7442, 29889, 2378, 4197, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29900, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29896, 1696, 29871, 29906, 1696, 29871, 29906, 1696, 29871, 29906, 29889, 1402, 26688, 29922, 9302, 29889, 7411, 511, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 1402, 26688, 29922, 9302, 29889, 11227, 511, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 742, 13, 18884, 3682, 29922, 29979, 29874, 29965, 495, 2499, 1484, 29928, 1853, 3664, 14039, 287, 2392, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 29881, 1853, 29918, 3318, 29898, 13, 18884, 3653, 29892, 13, 18884, 313, 13, 462, 1678, 7442, 29889, 2378, 4197, 29900, 29892, 29871, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 29892, 29871, 29945, 29892, 29871, 29953, 29892, 29871, 29955, 29892, 29871, 29947, 29892, 29871, 29896, 29900, 1402, 26688, 29922, 9302, 29889, 3318, 511, 13, 462, 1678, 518, 29900, 29892, 29871, 29941, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29962, 13, 18884, 10353, 13, 18884, 25557, 2433, 29915, 13, 9651, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 29888, 329, 999, 29898, 29945, 29892, 29871, 29896, 29892, 13, 462, 965, 3653, 29892, 13, 462, 965, 313, 13, 462, 1669, 7442, 29889, 8172, 29889, 8172, 29898, 29896, 29900, 29900, 29900, 511, 13, 462, 1669, 518, 29900, 29892, 29871, 29900, 29889, 29941, 29941, 29892, 29871, 29900, 29889, 29953, 29953, 29892, 29871, 29896, 29889, 29900, 29962, 13, 462, 965, 10353, 13, 462, 965, 1723, 13, 13, 9651, 269, 29889, 3198, 29918, 7165, 29918, 3200, 391, 3819, 29898, 29945, 29892, 29871, 29896, 29892, 13, 462, 462, 539, 3653, 29892, 13, 462, 462, 539, 313, 13, 462, 462, 965, 7442, 29889, 8172, 29889, 8172, 29898, 29896, 29900, 29900, 29900, 511, 13, 462, 462, 965, 518, 29900, 29892, 29871, 29900, 29889, 29941, 29941, 29892, 29871, 29900, 29889, 29953, 29953, 29892, 29871, 29896, 29889, 29900, 29962, 13, 462, 462, 539, 10353, 13, 462, 462, 539, 1723, 2 ]
eda_scripts/pct_cans_interested_in.py
eitrheim/Resume-Screening-and-Selection
14
174827
<gh_stars>10-100 import pandas as pd import numpy as np import matplotlib.pyplot as plt resume_text = pd.read_csv("~/data/Candidate Report_tokenized.csv").fillna('') job_text = pd.read_csv("~/data/full_requisition_data_tokenized.csv").fillna('') jobs_reviewed_atleast_once = ['Review', 'Completion', 'Phone Screen', 'Schedule Interview', 'Offer Rejected', 'Schedule interview', 'No Show (Interview / First Day)', 'Offer', 'Second Round Interview', 'Background Check', 'Revise Offer', 'Final Round Interview', 'Voluntary Withdrew', # NEW ADDT 'Salary Expectations too high', # NEW ADDT 'Skills or Abilities'] # NEW ADDT #how many candidates with NO RESUMES were they interested in? temp_df = resume_text[resume_text['Resume Text'] == '[\'nan\']'] temp_df = temp_df.merge(job_text, how='left',on='Req ID') temp_df = temp_df['Latest Recruiting Step'].value_counts() sum(temp_df[temp_df.index.isin(jobs_reviewed_atleast_once)]) ####### 860 CANDIDATES?! ####### #interested in atleast one candidate with a resume temp_df = resume_text[resume_text['Latest Recruiting Step'].isin(jobs_reviewed_atleast_once)] #temp_df = temp_df[temp_df['Resume Text'] != '[\'nan\']'] x = temp_df[['Req ID', 'Candidate ID','Resume Text']] x = x.merge(job_text, how='left',on='Req ID') x = x['Req ID'].value_counts() x = x[x >= 1] jobIDs = x.index def pct_reviewed(low_lim, high_lim): temp_df = x[x >= low_lim][x < high_lim].index jobIDs = temp_df if len(temp_df) == 0: output = np.nan else: y = resume_text[resume_text['Req ID'].isin(jobIDs)] y = y['Latest Recruiting Step'].value_counts() output = sum(y[y.index.isin(jobs_reviewed_atleast_once)])/sum(y) return output pcts = [] for i in list(range(0,245,15)): pcts.append(pct_reviewed(i, i+15)) plot_data = pd.DataFrame(pcts,list(range(0,245,15))).reset_index() plot_data.columns = ['Number of Candidates Applied', 'Percent that Recruiters Were Interested In'] plt.scatter(x=plot_data.iloc[:,0],y=plot_data.iloc[:,1]) PercentInterestedIn = [] for i in x.index: y = resume_text[resume_text['Req ID'] == i] y = y['Latest Recruiting Step'].value_counts() output = sum(y[y.index.isin(jobs_reviewed_atleast_once)])/sum(y) # output = round(output*100) PercentInterestedIn.append(output) import seaborn as sns plot_data = pd.DataFrame(x.values,PercentInterestedIn).reset_index() plot_data.columns = ['Percent that Recruiters Were Interested In', 'Number of Candidates to Apply'] sns.set() sns.jointplot(x=plot_data[plot_data.columns[1]],y=plot_data[plot_data.columns[0]],s=3).ax_joint.legend_.remove() #if a role has a lot of candidates apply to it, they are interested in more candidates #this seems backwards, say if 1000 people apply, they shouldn't be interested in almost 1000
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 11701, 408, 10518, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 30004, 13, 690, 2017, 29918, 726, 353, 10518, 29889, 949, 29918, 7638, 703, 20038, 1272, 29914, 29907, 5380, 403, 13969, 29918, 6979, 1891, 29889, 7638, 2564, 5589, 1056, 877, 1495, 30004, 13, 9057, 29918, 726, 353, 10518, 29889, 949, 29918, 7638, 703, 20038, 1272, 29914, 8159, 29918, 276, 23493, 29918, 1272, 29918, 6979, 1891, 29889, 7638, 2564, 5589, 1056, 877, 1495, 30004, 13, 30004, 13, 9057, 29879, 29918, 27828, 287, 29918, 271, 280, 579, 29918, 10646, 353, 6024, 1123, 1493, 23592, 13, 462, 795, 525, 28958, 23592, 13, 462, 795, 525, 9861, 22666, 23592, 13, 462, 795, 525, 4504, 11272, 4124, 1493, 23592, 13, 462, 795, 525, 2776, 571, 830, 622, 287, 23592, 13, 462, 795, 525, 4504, 11272, 15593, 742, 6756, 13, 462, 795, 525, 3782, 7704, 313, 4074, 1493, 847, 3824, 8373, 29897, 23592, 13, 462, 795, 525, 2776, 571, 23592, 13, 462, 795, 525, 11863, 21595, 4124, 1493, 742, 6756, 13, 462, 795, 525, 10581, 5399, 23592, 13, 462, 795, 525, 1123, 29894, 895, 4587, 571, 23592, 13, 462, 795, 525, 15790, 21595, 4124, 1493, 23592, 13, 462, 795, 525, 13072, 1657, 653, 2973, 29881, 3973, 742, 396, 29091, 27827, 29911, 30004, 13, 462, 795, 525, 20392, 653, 1222, 1103, 800, 2086, 1880, 742, 396, 29091, 27827, 29911, 30004, 13, 462, 795, 525, 15797, 6090, 470, 1976, 9770, 2033, 396, 29091, 27827, 29911, 30004, 13, 30004, 13, 29937, 3525, 1784, 21669, 411, 11698, 390, 2890, 29965, 2303, 29903, 892, 896, 8852, 297, 29973, 30004, 13, 7382, 29918, 2176, 353, 620, 2017, 29918, 726, 29961, 690, 2017, 29918, 726, 1839, 1666, 2017, 3992, 2033, 1275, 29871, 525, 7110, 29915, 13707, 29905, 2033, 2033, 30004, 13, 7382, 29918, 2176, 353, 5694, 29918, 2176, 29889, 14634, 29898, 9057, 29918, 726, 29892, 920, 2433, 1563, 742, 265, 2433, 1123, 29939, 3553, 1495, 30004, 13, 7382, 29918, 2176, 353, 5694, 29918, 2176, 1839, 13992, 342, 3599, 9216, 292, 16696, 13359, 1767, 29918, 2798, 29879, 26471, 13, 2083, 29898, 7382, 29918, 2176, 29961, 7382, 29918, 2176, 29889, 2248, 29889, 275, 262, 29898, 9057, 29879, 29918, 27828, 287, 29918, 271, 280, 579, 29918, 10646, 29897, 2314, 30004, 13, 4136, 2277, 29937, 29871, 29947, 29953, 29900, 315, 9468, 1367, 1299, 2890, 29973, 29991, 835, 4136, 30004, 13, 30004, 13, 30004, 13, 29937, 1639, 2868, 297, 472, 280, 579, 697, 14020, 411, 263, 620, 2017, 30004, 13, 7382, 29918, 2176, 353, 620, 2017, 29918, 726, 29961, 690, 2017, 29918, 726, 1839, 13992, 342, 3599, 9216, 292, 16696, 13359, 275, 262, 29898, 9057, 29879, 29918, 27828, 287, 29918, 271, 280, 579, 29918, 10646, 4638, 30004, 13, 29937, 7382, 29918, 2176, 353, 5694, 29918, 2176, 29961, 7382, 29918, 2176, 1839, 1666, 2017, 3992, 2033, 2804, 29871, 525, 7110, 29915, 13707, 29905, 2033, 2033, 30004, 13, 29916, 353, 5694, 29918, 2176, 29961, 1839, 1123, 29939, 3553, 742, 525, 29907, 5380, 403, 3553, 3788, 1666, 2017, 3992, 2033, 29962, 30004, 13, 29916, 353, 921, 29889, 14634, 29898, 9057, 29918, 726, 29892, 920, 2433, 1563, 742, 265, 2433, 1123, 29939, 3553, 1495, 30004, 13, 29916, 353, 921, 1839, 1123, 29939, 3553, 13359, 1767, 29918, 2798, 29879, 26471, 13, 29916, 353, 921, 29961, 29916, 6736, 29871, 29896, 29962, 30004, 13, 9057, 1367, 29879, 353, 921, 29889, 2248, 30004, 13, 30004, 13, 30004, 13, 1753, 282, 312, 29918, 27828, 287, 29898, 677, 29918, 2576, 29892, 1880, 29918, 2576, 1125, 30004, 13, 29871, 5694, 29918, 2176, 353, 921, 29961, 29916, 6736, 4482, 29918, 2576, 3816, 29916, 529, 1880, 29918, 2576, 1822, 2248, 30004, 13, 29871, 4982, 1367, 29879, 353, 5694, 29918, 2176, 30004, 13, 29871, 565, 7431, 29898, 7382, 29918, 2176, 29897, 1275, 29871, 29900, 29901, 30004, 13, 1678, 1962, 353, 7442, 29889, 13707, 30004, 13, 29871, 1683, 29901, 30004, 13, 1678, 343, 353, 620, 2017, 29918, 726, 29961, 690, 2017, 29918, 726, 1839, 1123, 29939, 3553, 13359, 275, 262, 29898, 9057, 1367, 29879, 4638, 30004, 13, 1678, 343, 353, 343, 1839, 13992, 342, 3599, 9216, 292, 16696, 13359, 1767, 29918, 2798, 29879, 26471, 13, 1678, 1962, 353, 2533, 29898, 29891, 29961, 29891, 29889, 2248, 29889, 275, 262, 29898, 9057, 29879, 29918, 27828, 287, 29918, 271, 280, 579, 29918, 10646, 29897, 2314, 29914, 2083, 29898, 29891, 8443, 13, 29871, 736, 1962, 30004, 13, 30004, 13, 29886, 312, 29879, 353, 5159, 30004, 13, 1454, 474, 297, 1051, 29898, 3881, 29898, 29900, 29892, 29906, 29946, 29945, 29892, 29896, 29945, 22164, 30004, 13, 29871, 282, 312, 29879, 29889, 4397, 29898, 29886, 312, 29918, 27828, 287, 29898, 29875, 29892, 474, 29974, 29896, 29945, 876, 30004, 13, 30004, 13, 5317, 29918, 1272, 353, 10518, 29889, 17271, 29898, 29886, 312, 29879, 29892, 1761, 29898, 3881, 29898, 29900, 29892, 29906, 29946, 29945, 29892, 29896, 29945, 876, 467, 12071, 29918, 2248, 26471, 13, 5317, 29918, 1272, 29889, 13099, 353, 6024, 4557, 310, 315, 5380, 1078, 2401, 2957, 742, 525, 27933, 393, 3599, 9216, 414, 399, 406, 4124, 2868, 512, 2033, 30004, 13, 572, 29873, 29889, 1557, 2620, 29898, 29916, 29922, 5317, 29918, 1272, 29889, 309, 542, 7503, 29892, 29900, 1402, 29891, 29922, 5317, 29918, 1272, 29889, 309, 542, 7503, 29892, 29896, 2314, 30004, 13, 30004, 13, 27933, 4074, 2868, 797, 353, 5159, 30004, 13, 1454, 474, 297, 921, 29889, 2248, 29901, 30004, 13, 29871, 343, 353, 620, 2017, 29918, 726, 29961, 690, 2017, 29918, 726, 1839, 1123, 29939, 3553, 2033, 1275, 474, 29962, 30004, 13, 29871, 343, 353, 343, 1839, 13992, 342, 3599, 9216, 292, 16696, 13359, 1767, 29918, 2798, 29879, 26471, 13, 29871, 1962, 353, 2533, 29898, 29891, 29961, 29891, 29889, 2248, 29889, 275, 262, 29898, 9057, 29879, 29918, 27828, 287, 29918, 271, 280, 579, 29918, 10646, 29897, 2314, 29914, 2083, 29898, 29891, 8443, 13, 396, 1962, 353, 4513, 29898, 4905, 29930, 29896, 29900, 29900, 8443, 13, 29871, 2431, 1760, 4074, 2868, 797, 29889, 4397, 29898, 4905, 8443, 13, 30004, 13, 5215, 409, 370, 1398, 408, 269, 1983, 30004, 13, 5317, 29918, 1272, 353, 10518, 29889, 17271, 29898, 29916, 29889, 5975, 29892, 27933, 4074, 2868, 797, 467, 12071, 29918, 2248, 26471, 13, 5317, 29918, 1272, 29889, 13099, 353, 6024, 27933, 393, 3599, 9216, 414, 399, 406, 4124, 2868, 512, 742, 525, 4557, 310, 315, 5380, 1078, 304, 2401, 368, 2033, 30004, 13, 29879, 1983, 29889, 842, 26471, 13, 29879, 1983, 29889, 12090, 5317, 29898, 29916, 29922, 5317, 29918, 1272, 29961, 5317, 29918, 1272, 29889, 13099, 29961, 29896, 20526, 29891, 29922, 5317, 29918, 1272, 29961, 5317, 29918, 1272, 29889, 13099, 29961, 29900, 20526, 29879, 29922, 29941, 467, 1165, 29918, 12090, 29889, 26172, 5396, 5992, 26471, 13, 30004, 13, 30004, 13, 29937, 361, 263, 6297, 756, 263, 3287, 310, 21669, 3394, 304, 372, 29892, 896, 526, 8852, 297, 901, 21669, 30004, 13, 29937, 1366, 2444, 28953, 29892, 1827, 565, 29871, 29896, 29900, 29900, 29900, 2305, 3394, 29892, 896, 9273, 29915, 29873, 367, 8852, 297, 4359, 29871, 29896, 29900, 29900, 29900, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 2 ]
check_logstash_hot_threads.py
adolci/nagios-plugins
0
50349
#!/usr/bin/env python # coding=utf-8 # vim:ts=4:sts=4:sw=4:et # # Author: <NAME> # Date: 2017-11-26 18:55:00 +0100 (Sun, 26 Nov 2017) # # https://github.com/harisekhon/nagios-plugins # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn # and optionally send me feedback to help steer this or other code I publish # # https://www.linkedin.com/in/harisekhon # """ Nagios Plugin to check Logstash hot threads via the Logstash Rest API Optional thresholds apply to the % CPU time for the busiest hot thread by default, or if using the --top-3 switch then the total sum of % CPU time for top 3 hot threads combined The top hot thread CPU % and state is output regardless, and perfdata for the top hot thread CPU % and the top 3 hot threads total CPU % is output for graphing API is only available in Logstash 5.x onwards, will get connection refused on older versions Ensure Logstash options: --http.host should be set to 0.0.0.0 if querying remotely --http.port should be set to the same port that you are querying via this plugin's --port switch Tested on Logstash 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 6.0, 6.1 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import sys import traceback srcdir = os.path.abspath(os.path.dirname(__file__)) libdir = os.path.join(srcdir, 'pylib') sys.path.append(libdir) try: # pylint: disable=wrong-import-position #from harisekhon.utils import log from harisekhon.utils import UnknownError, support_msg_api from harisekhon.utils import isDict, isList from harisekhon import RestNagiosPlugin except ImportError as _: print(traceback.format_exc(), end='') sys.exit(4) __author__ = '<NAME>' __version__ = '0.2' class CheckLogstashHotThreads(RestNagiosPlugin): def __init__(self): # Python 2.x super(CheckLogstashHotThreads, self).__init__() # Python 3.x # super().__init__() self.name = 'Logstash' self.default_port = 9600 # could add pipeline name to end of this endpoint but error would be less good 404 Not Found # Logstash 5.x /_node/pipeline <= use -5 switch for older Logstash # Logstash 6.x /_node/pipelines self.path = '/_node/hot_threads' self.auth = False self.json = True self.msg = 'Logstash hot threads msg not defined yet' self.plugins = None def add_options(self): super(CheckLogstashHotThreads, self).add_options() self.add_opt('--top-3', action='store_true', help='Test the total sum cpu percentage of the top 3 hot threads' + \ ' instead of the top thread') self.add_thresholds(default_warning=50) def process_options(self): super(CheckLogstashHotThreads, self).process_options() self.validate_thresholds(percent=True, optional=True) def parse_json(self, json_data): if not isDict(json_data): raise UnknownError('non-dict returned for hot threads. {}'.format(support_msg_api())) hot_threads = json_data['hot_threads']['threads'] top_3 = self.get_opt('top_3') sum_percent = 0 last_percent = None for thread in hot_threads: thread_percent = thread['percent_of_cpu_time'] if last_percent is None: last_percent = thread_percent if thread_percent > last_percent: raise UnknownError('assertion failure - subsequent thread percent is unexpectedly higher' + \ ', out of expected order. {}'.format(support_msg_api())) sum_percent += thread_percent self.msg = 'Logstash ' if top_3: self.msg += 'top 3 hot threads cpu percentage = {}%'.format(sum_percent) self.check_thresholds(sum_percent) self.msg += ', ' # they come sorted with highest at top top_thread = hot_threads[0] name = top_thread['name'] percent = top_thread['percent_of_cpu_time'] state = top_thread['state'] # not available in 5.0, only later versions such as 6.0 #thread_id = top_thread['thread_id'] self.msg += 'top hot thread \'{}\' cpu percentage = {}%'.format(name, percent) if not top_3: self.check_thresholds(percent) self.msg += ', state = \'{}\''.format(state) #self.msg += ', id = {}'.format(state, thread_id) if self.verbose: if not isList(top_thread['traces']): raise UnknownError('hot thread\'s trace field is not a list. {}'.format(support_msg_api())) traces = '\\n'.join(top_thread['traces']) self.msg += ', traces: {}'.format(traces) if not top_3: self.msg += ', top 3 hot threads cpu percentage = {}%'.format(sum_percent) self.msg += ' | top_hot_thread_cpu_percentage={}%'.format(percent) if not top_3: self.msg += '{}'.format(self.get_perf_thresholds()) self.msg += ' top_three_hot_thread_cpu_percentage={}%'.format(sum_percent) if top_3: self.msg += '{}'.format(self.get_perf_thresholds()) if __name__ == '__main__': CheckLogstashHotThreads().main()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 29871, 14137, 29922, 9420, 29899, 29947, 13, 29937, 29871, 325, 326, 29901, 1372, 29922, 29946, 29901, 303, 29879, 29922, 29946, 29901, 2774, 29922, 29946, 29901, 300, 13, 29937, 13, 29937, 29871, 13361, 29901, 529, 5813, 29958, 13, 29937, 29871, 4712, 29901, 29871, 29906, 29900, 29896, 29955, 29899, 29896, 29896, 29899, 29906, 29953, 29871, 29896, 29947, 29901, 29945, 29945, 29901, 29900, 29900, 718, 29900, 29896, 29900, 29900, 313, 29903, 348, 29892, 29871, 29906, 29953, 2864, 29871, 29906, 29900, 29896, 29955, 29897, 13, 29937, 13, 29937, 29871, 2045, 597, 3292, 29889, 510, 29914, 8222, 895, 15339, 265, 29914, 29876, 351, 2363, 29899, 12800, 13, 29937, 13, 29937, 29871, 19245, 29901, 1074, 10259, 1384, 292, 379, 1306, 922, 15339, 265, 365, 2965, 1430, 1660, 934, 13, 29937, 13, 29937, 29871, 960, 366, 29915, 276, 773, 590, 775, 366, 29915, 276, 12853, 304, 4511, 411, 592, 373, 28547, 797, 13, 29937, 29871, 322, 2984, 635, 3638, 592, 16705, 304, 1371, 1886, 261, 445, 470, 916, 775, 306, 9805, 13, 29937, 13, 29937, 29871, 2045, 597, 1636, 29889, 2324, 287, 262, 29889, 510, 29914, 262, 29914, 8222, 895, 15339, 265, 13, 29937, 13, 13, 15945, 29908, 13, 13, 29940, 351, 2363, 1858, 3851, 304, 1423, 4522, 303, 1161, 7375, 9717, 3025, 278, 4522, 303, 1161, 11654, 3450, 13, 13, 27636, 266, 3781, 3361, 3394, 304, 278, 1273, 10808, 931, 363, 278, 3593, 12239, 7375, 3244, 491, 2322, 29892, 470, 565, 773, 278, 13, 489, 3332, 29899, 29941, 4607, 769, 278, 3001, 2533, 310, 1273, 10808, 931, 363, 2246, 29871, 29941, 7375, 9717, 12420, 13, 13, 1576, 2246, 7375, 3244, 10808, 1273, 322, 2106, 338, 1962, 17126, 29892, 322, 23895, 1272, 363, 278, 2246, 7375, 3244, 10808, 1273, 322, 13, 1552, 2246, 29871, 29941, 7375, 9717, 3001, 10808, 1273, 338, 1962, 363, 3983, 292, 13, 13, 8787, 338, 871, 3625, 297, 4522, 303, 1161, 29871, 29945, 29889, 29916, 373, 2935, 29892, 674, 679, 3957, 15964, 373, 9642, 6910, 13, 13, 29923, 1983, 545, 4522, 303, 1161, 3987, 29901, 13, 29871, 1192, 1124, 29889, 3069, 881, 367, 731, 304, 29871, 29900, 29889, 29900, 29889, 29900, 29889, 29900, 565, 2346, 292, 1083, 327, 873, 13, 29871, 1192, 1124, 29889, 637, 881, 367, 731, 304, 278, 1021, 2011, 393, 366, 526, 2346, 292, 3025, 445, 7079, 29915, 29879, 1192, 637, 4607, 13, 13, 29911, 2868, 373, 4522, 303, 1161, 29871, 29945, 29889, 29900, 29892, 29871, 29945, 29889, 29896, 29892, 29871, 29945, 29889, 29906, 29892, 29871, 29945, 29889, 29941, 29892, 29871, 29945, 29889, 29946, 29892, 29871, 29945, 29889, 29945, 29892, 29871, 29945, 29889, 29953, 29892, 29871, 29953, 29889, 29900, 29892, 29871, 29953, 29889, 29896, 13, 13, 15945, 29908, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 9637, 1627, 13, 4351, 3972, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 876, 13, 1982, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 4351, 3972, 29892, 525, 2272, 1982, 1495, 13, 9675, 29889, 2084, 29889, 4397, 29898, 1982, 3972, 29897, 13, 2202, 29901, 13, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 15866, 549, 29899, 5215, 29899, 3283, 13, 1678, 396, 3166, 4023, 895, 15339, 265, 29889, 13239, 1053, 1480, 13, 1678, 515, 4023, 895, 15339, 265, 29889, 13239, 1053, 853, 5203, 2392, 29892, 2304, 29918, 7645, 29918, 2754, 13, 1678, 515, 4023, 895, 15339, 265, 29889, 13239, 1053, 338, 21533, 29892, 338, 1293, 13, 1678, 515, 4023, 895, 15339, 265, 1053, 11654, 29940, 351, 2363, 16288, 13, 19499, 16032, 2392, 408, 903, 29901, 13, 1678, 1596, 29898, 15003, 1627, 29889, 4830, 29918, 735, 29883, 3285, 1095, 2433, 1495, 13, 1678, 10876, 29889, 13322, 29898, 29946, 29897, 13, 13, 1649, 8921, 1649, 353, 12801, 5813, 16299, 13, 1649, 3259, 1649, 353, 525, 29900, 29889, 29906, 29915, 13, 13, 13, 1990, 5399, 3403, 303, 1161, 28917, 4899, 29879, 29898, 15078, 29940, 351, 2363, 16288, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 396, 5132, 29871, 29906, 29889, 29916, 13, 4706, 2428, 29898, 5596, 3403, 303, 1161, 28917, 4899, 29879, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 396, 5132, 29871, 29941, 29889, 29916, 13, 4706, 396, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 978, 353, 525, 3403, 303, 1161, 29915, 13, 4706, 1583, 29889, 4381, 29918, 637, 353, 29871, 29929, 29953, 29900, 29900, 13, 4706, 396, 1033, 788, 16439, 1024, 304, 1095, 310, 445, 16248, 541, 1059, 723, 367, 3109, 1781, 29871, 29946, 29900, 29946, 2216, 7460, 13, 4706, 396, 4522, 303, 1161, 29871, 29945, 29889, 29916, 847, 29918, 3177, 29914, 13096, 5570, 5277, 671, 448, 29945, 4607, 363, 9642, 4522, 303, 1161, 13, 4706, 396, 4522, 303, 1161, 29871, 29953, 29889, 29916, 847, 29918, 3177, 29914, 13096, 24210, 13, 4706, 1583, 29889, 2084, 353, 8207, 29918, 3177, 29914, 8711, 29918, 28993, 29915, 13, 4706, 1583, 29889, 5150, 353, 7700, 13, 4706, 1583, 29889, 3126, 353, 5852, 13, 4706, 1583, 29889, 7645, 353, 525, 3403, 303, 1161, 7375, 9717, 10191, 451, 3342, 3447, 29915, 13, 4706, 1583, 29889, 12800, 353, 6213, 13, 13, 1678, 822, 788, 29918, 6768, 29898, 1311, 1125, 13, 4706, 2428, 29898, 5596, 3403, 303, 1161, 28917, 4899, 29879, 29892, 1583, 467, 1202, 29918, 6768, 580, 13, 4706, 1583, 29889, 1202, 29918, 3670, 877, 489, 3332, 29899, 29941, 742, 3158, 2433, 8899, 29918, 3009, 742, 13, 462, 268, 1371, 2433, 3057, 278, 3001, 2533, 26403, 19649, 310, 278, 2246, 29871, 29941, 7375, 9717, 29915, 718, 320, 13, 462, 3986, 525, 2012, 310, 278, 2246, 3244, 1495, 13, 4706, 1583, 29889, 1202, 29918, 386, 3781, 3361, 29898, 4381, 29918, 27392, 29922, 29945, 29900, 29897, 13, 13, 1678, 822, 1889, 29918, 6768, 29898, 1311, 1125, 13, 4706, 2428, 29898, 5596, 3403, 303, 1161, 28917, 4899, 29879, 29892, 1583, 467, 5014, 29918, 6768, 580, 13, 4706, 1583, 29889, 15480, 29918, 386, 3781, 3361, 29898, 25376, 29922, 5574, 29892, 13136, 29922, 5574, 29897, 13, 13, 1678, 822, 6088, 29918, 3126, 29898, 1311, 29892, 4390, 29918, 1272, 1125, 13, 4706, 565, 451, 338, 21533, 29898, 3126, 29918, 1272, 1125, 13, 9651, 12020, 853, 5203, 2392, 877, 5464, 29899, 8977, 4133, 363, 7375, 9717, 29889, 6571, 4286, 4830, 29898, 5924, 29918, 7645, 29918, 2754, 22130, 13, 4706, 7375, 29918, 28993, 353, 4390, 29918, 1272, 1839, 8711, 29918, 28993, 16215, 28993, 2033, 13, 4706, 2246, 29918, 29941, 353, 1583, 29889, 657, 29918, 3670, 877, 3332, 29918, 29941, 1495, 13, 4706, 2533, 29918, 25376, 353, 29871, 29900, 13, 4706, 1833, 29918, 25376, 353, 6213, 13, 4706, 363, 3244, 297, 7375, 29918, 28993, 29901, 13, 9651, 3244, 29918, 25376, 353, 3244, 1839, 25376, 29918, 974, 29918, 21970, 29918, 2230, 2033, 13, 9651, 565, 1833, 29918, 25376, 338, 6213, 29901, 13, 18884, 1833, 29918, 25376, 353, 3244, 29918, 25376, 13, 9651, 565, 3244, 29918, 25376, 1405, 1833, 29918, 25376, 29901, 13, 18884, 12020, 853, 5203, 2392, 877, 9294, 291, 10672, 448, 15352, 3244, 10151, 338, 15668, 368, 6133, 29915, 718, 320, 13, 462, 462, 259, 13420, 714, 310, 3806, 1797, 29889, 6571, 4286, 4830, 29898, 5924, 29918, 7645, 29918, 2754, 22130, 13, 9651, 2533, 29918, 25376, 4619, 3244, 29918, 25376, 13, 4706, 1583, 29889, 7645, 353, 525, 3403, 303, 1161, 525, 13, 4706, 565, 2246, 29918, 29941, 29901, 13, 9651, 1583, 29889, 7645, 4619, 525, 3332, 29871, 29941, 7375, 9717, 26403, 19649, 353, 6571, 29995, 4286, 4830, 29898, 2083, 29918, 25376, 29897, 13, 9651, 1583, 29889, 3198, 29918, 386, 3781, 3361, 29898, 2083, 29918, 25376, 29897, 13, 9651, 1583, 29889, 7645, 4619, 13420, 525, 13, 4706, 396, 896, 2041, 12705, 411, 9939, 472, 2246, 13, 4706, 2246, 29918, 7097, 353, 7375, 29918, 28993, 29961, 29900, 29962, 13, 4706, 1024, 353, 2246, 29918, 7097, 1839, 978, 2033, 13, 4706, 10151, 353, 2246, 29918, 7097, 1839, 25376, 29918, 974, 29918, 21970, 29918, 2230, 2033, 13, 4706, 2106, 353, 2246, 29918, 7097, 1839, 3859, 2033, 13, 4706, 396, 451, 3625, 297, 29871, 29945, 29889, 29900, 29892, 871, 2678, 6910, 1316, 408, 29871, 29953, 29889, 29900, 13, 4706, 396, 7097, 29918, 333, 353, 2246, 29918, 7097, 1839, 7097, 29918, 333, 2033, 13, 4706, 1583, 29889, 7645, 4619, 525, 3332, 7375, 3244, 320, 29915, 29912, 1012, 29915, 26403, 19649, 353, 6571, 29995, 4286, 4830, 29898, 978, 29892, 10151, 29897, 13, 4706, 565, 451, 2246, 29918, 29941, 29901, 13, 9651, 1583, 29889, 3198, 29918, 386, 3781, 3361, 29898, 25376, 29897, 13, 4706, 1583, 29889, 7645, 4619, 13420, 2106, 353, 320, 29915, 29912, 1012, 29915, 4286, 4830, 29898, 3859, 29897, 13, 4706, 396, 1311, 29889, 7645, 4619, 13420, 1178, 353, 6571, 4286, 4830, 29898, 3859, 29892, 3244, 29918, 333, 29897, 13, 4706, 565, 1583, 29889, 369, 15828, 29901, 13, 9651, 565, 451, 338, 1293, 29898, 3332, 29918, 7097, 1839, 3018, 778, 2033, 1125, 13, 18884, 12020, 853, 5203, 2392, 877, 8711, 3244, 20333, 29879, 9637, 1746, 338, 451, 263, 1051, 29889, 6571, 4286, 4830, 29898, 5924, 29918, 7645, 29918, 2754, 22130, 13, 9651, 26695, 353, 525, 1966, 29876, 4286, 7122, 29898, 3332, 29918, 7097, 1839, 3018, 778, 11287, 13, 9651, 1583, 29889, 7645, 4619, 13420, 26695, 29901, 6571, 4286, 4830, 29898, 3018, 778, 29897, 13, 4706, 565, 451, 2246, 29918, 29941, 29901, 13, 9651, 1583, 29889, 7645, 4619, 13420, 2246, 29871, 29941, 7375, 9717, 26403, 19649, 353, 6571, 29995, 4286, 4830, 29898, 2083, 29918, 25376, 29897, 13, 4706, 1583, 29889, 7645, 4619, 525, 891, 2246, 29918, 8711, 29918, 7097, 29918, 21970, 29918, 25376, 482, 3790, 10560, 4286, 4830, 29898, 25376, 29897, 13, 4706, 565, 451, 2246, 29918, 29941, 29901, 13, 9651, 1583, 29889, 7645, 4619, 525, 8875, 4286, 4830, 29898, 1311, 29889, 657, 29918, 546, 29888, 29918, 386, 3781, 3361, 3101, 13, 4706, 1583, 29889, 7645, 4619, 525, 2246, 29918, 17536, 29918, 8711, 29918, 7097, 29918, 21970, 29918, 25376, 482, 3790, 10560, 4286, 4830, 29898, 2083, 29918, 25376, 29897, 13, 4706, 565, 2246, 29918, 29941, 29901, 13, 9651, 1583, 29889, 7645, 4619, 525, 8875, 4286, 4830, 29898, 1311, 29889, 657, 29918, 546, 29888, 29918, 386, 3781, 3361, 3101, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 5399, 3403, 303, 1161, 28917, 4899, 29879, 2141, 3396, 580, 13, 2 ]
pseudo_dojo/refdata/nist/atomicdata.py
fnaccarato/pseudo_dojo
0
28659
#!/usr/bin/env python import os.path import sys from pprint import pprint import nist_database def sort_dict(d, key=None, reverse=False): """ Returns an OrderedDict object whose keys are ordered according to their value. Args: d: Input dictionary key: function which takes an tuple (key, object) and returns a value to compare and sort by. By default, the function compares the values of the dict i.e. key = lambda t : t[1] reverse: allows to reverse sort order. """ import collections kv_items = [kv for kv in d.items()] # Sort kv_items according to key. if key is None: kv_items.sort(key=lambda t: t[1], reverse=reverse) else: kv_items.sort(key=key, reverse=reverse) # Build ordered dict. return collections.OrderedDict(kv_items) #class AtomicData(dict): # # _mandatory_keys = [ # "Etot", # "Ekin", # "Ecoul", # "Eenuc", # "Exc", # ] # # def __init__(self, *args, **kwargs): # super(AtomicData, self).__init__(*args, **kwargs) # # for k in self._mandatory_keys: # if k not in self: # raise ValueError("mandatory key %s is missing" % k) # #self.symbol # #self.Z = Z # #self.configurations = configurations def make_nist_configurations(path): neutral, cations, symb2Z = parse_nist_configurations(path) print("# Computer generated code") print("neutral = ") pprint(neutral) print("") print("# Computer generated code") print("cations = ") pprint(cations) print("") print("# Computer generated code") print("symb2Z = ") pprint(symb2Z) print("") def parse_nist_configurations(path): """Read and parse the file with the configurations.""" # Z Symbol Neutral Positive ion # 1 H 1s^1 - # 2 He 1s^2 1s^1 neutral, cations, symb2Z = {}, {}, {} count = 1 with open(os.path.join(path, "configurations"), "r") as fh: for line in fh: if not (len(line) > 1 and line[1].isdigit()): continue head, catio = line[:44], line[44:].strip() toks = head.split() Z, symbol, neutr = int(toks[0]), toks[1], " ".join(t for t in toks[2:]) assert Z == count count += 1 neutr = neutr.replace("^", "") catio = catio.replace("^", "") neutral[symbol] = neutr cations[symbol] = catio if catio != "-" else None symb2Z[symbol] = Z return neutral, cations, symb2Z def occupations_from_symbol(symbol): Z = symb2Z[symbol] configuration = neutral[Z] if configuration[0][0] == '[': occupations = occupations_from_symbol(configuration[0][1:-1]) configuration = configuration[1:] else: occupations = [] for s in configuration: occupations.append((s[:2], int(s[3:]))) return occupations def extract_nistdata(path, nist_xctype, iontype): # http://www.physics.nist.gov/PhysRefData/DFTdata/ # Read and parse the configurations file # Z Symbol Neutral Positive ion # 1 H 1s^1 - # 2 He 1s^2 1s^1 Ztable = {} configurations = [['X', '']] Z = 1 with open(os.path.join(path, "configurations"), "r") as fh: for line in fh: if len(line) > 1 and line[1].isdigit(): line = line[:44].split() symbol = line[1] Ztable[symbol] = Z assert int(line[0]) == Z configurations.append(line[2:]) Z += 1 def occupations_from_symbol(symbol): Z = Ztable[symbol] configuration = configurations[Z] if configuration[0][0] == '[': occupations = occupations_from_symbol(configuration[0][1:-1]) configuration = configuration[1:] else: occupations = [] for s in configuration: occupations.append((s[:2], int(s[3:]))) return occupations # Ex of file with AE results: # Etot = -675.742283 # Ekin = 674.657334 # Ecoul = 285.206130 # Eenuc = -1601.463209 # Exc = -34.142538 # 1s -143.935181 # 2s -15.046905 # 2p -12.285376 # 3s -1.706331 # 3p -1.030572 # 4s -0.141411 nistdata = {} spdf = {'s': 0, 'p': 1, 'd': 2, 'f': 3} for (symbol, Z) in Ztable.items(): #print("in symbol %s" % symbol) occupations = occupations_from_symbol(symbol) fname = os.path.join(path, nist_xctype, iontype, '%02d%s' % (Z, symbol)) energies, eigens = {}, {} with open(fname, 'r') as fh: for n in range(5): ename, evalue = fh.readline().split("=") energies[ename.strip()] = float(evalue) for line in fh: state, eig = line.split() eigens[state] = float(eig) nloe = [] for (state, occ) in occupations: n = int(state[0]) l = spdf[state[1]] eig = eigens[state] nloe.append((n, l, occ, eig)) nistdata[symbol] = (Z, nloe, energies) return nistdata def make_nistmodule(path, nist_xctype): #for iontype in ["neutrals", "cations",]: for iontype in ["neutrals",]: print('# Computer generated code: nist_xctype = %s, iontype = %s' % (nist_xctype, iontype)) print("format:\n\t element: (atomic number, [(n, l, occ, energy), ...]") print('%s = ' % iontype) data = extract_nistdata(path, nist_xctype, iontype) pprint(data) #print(json.dumps(data, indent=4)) if __name__ == '__main__': import sys from qatom import states_from_string, AtomicConfiguration for symbol in nist_database.symbols: aconf = AtomicConfiguration.neutral_from_symbol(symbol) print(aconf) sys.exit(1) path = sys.argv[1] #neutral = {} #for (symbol, confstr) in nist_database.neutral.items(): # states = states_from_string(confstr) # print(confstr) # neutral[symbol] = (nist_database.symb2Z[symbol], states) #for s in states: # pprint(tuple(s)) #aconf = AtomicConfiguration.from_string(confstr, symb2Z[symbol]) #make_nist_configurations(path) #xctypes = ["LDA", "ScRLDA"] #, "LSD", "RLDA",] nist_xctypes = ["LDA",] for xctype in nist_xctypes: print("xctype: %s" % xctype) make_nistmodule(path, xctype) #iontype = "neutrals" #dft_data = extract_nistdata(sys.argv[1], nist_xctype, iontype) #make_nistmodule(sys.argv[1], "LDA")
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 2897, 29889, 2084, 13, 5215, 10876, 13, 13, 3166, 282, 2158, 1053, 282, 2158, 13, 13, 5215, 302, 391, 29918, 9803, 13, 13, 13, 1753, 2656, 29918, 8977, 29898, 29881, 29892, 1820, 29922, 8516, 29892, 11837, 29922, 8824, 1125, 13, 1678, 9995, 13, 1678, 16969, 385, 8170, 287, 21533, 1203, 5069, 6611, 526, 10372, 5034, 304, 1009, 13, 1678, 995, 29889, 13, 13, 1678, 826, 3174, 29901, 13, 4706, 270, 29901, 13, 9651, 10567, 8600, 13, 4706, 1820, 29901, 13, 9651, 740, 607, 4893, 385, 18761, 313, 1989, 29892, 1203, 29897, 322, 3639, 263, 995, 304, 13, 9651, 7252, 322, 2656, 491, 29889, 2648, 2322, 29892, 278, 740, 752, 5114, 278, 1819, 13, 632, 310, 278, 9657, 474, 29889, 29872, 29889, 1820, 353, 14013, 260, 584, 260, 29961, 29896, 29962, 13, 4706, 11837, 29901, 13, 9651, 6511, 304, 11837, 2656, 1797, 29889, 13, 1678, 9995, 13, 1678, 1053, 16250, 13, 1678, 10908, 29918, 7076, 353, 518, 27049, 363, 10908, 297, 270, 29889, 7076, 580, 29962, 13, 13, 1678, 396, 20025, 10908, 29918, 7076, 5034, 304, 1820, 29889, 13, 1678, 565, 1820, 338, 6213, 29901, 13, 4706, 10908, 29918, 7076, 29889, 6605, 29898, 1989, 29922, 2892, 260, 29901, 260, 29961, 29896, 1402, 11837, 29922, 24244, 29897, 13, 1678, 1683, 29901, 13, 4706, 10908, 29918, 7076, 29889, 6605, 29898, 1989, 29922, 1989, 29892, 11837, 29922, 24244, 29897, 13, 13, 1678, 396, 8878, 10372, 9657, 29889, 13, 1678, 736, 16250, 29889, 7514, 287, 21533, 29898, 27049, 29918, 7076, 29897, 13, 13, 29937, 1990, 2180, 25426, 1469, 29898, 8977, 1125, 13, 29937, 13, 29937, 268, 903, 29885, 392, 7606, 29918, 8149, 353, 518, 13, 29937, 308, 376, 29923, 4260, 613, 13, 29937, 308, 376, 29923, 9089, 613, 13, 29937, 308, 376, 29923, 29883, 5059, 613, 13, 29937, 308, 376, 29923, 264, 1682, 613, 13, 29937, 308, 376, 1252, 29883, 613, 13, 29937, 268, 4514, 13, 29937, 13, 29937, 268, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 29937, 4706, 2428, 29898, 4178, 25426, 1469, 29892, 1583, 467, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 29937, 13, 29937, 4706, 363, 413, 297, 1583, 3032, 29885, 392, 7606, 29918, 8149, 29901, 13, 29937, 9651, 565, 413, 451, 297, 1583, 29901, 13, 29937, 18884, 12020, 7865, 2392, 703, 29885, 392, 7606, 1820, 1273, 29879, 338, 4567, 29908, 1273, 413, 29897, 13, 29937, 4706, 396, 1311, 29889, 18098, 13, 29937, 4706, 396, 1311, 29889, 29999, 353, 796, 13, 29937, 4706, 396, 1311, 29889, 2917, 332, 800, 353, 22920, 13, 13, 13, 1753, 1207, 29918, 29876, 391, 29918, 2917, 332, 800, 29898, 2084, 1125, 13, 13, 1678, 21104, 29892, 274, 800, 29892, 5016, 29890, 29906, 29999, 353, 6088, 29918, 29876, 391, 29918, 2917, 332, 800, 29898, 2084, 29897, 13, 13, 1678, 1596, 14822, 20972, 5759, 775, 1159, 13, 1678, 1596, 703, 17821, 1705, 353, 16521, 13, 1678, 282, 2158, 29898, 17821, 1705, 29897, 13, 1678, 1596, 703, 1159, 13, 13, 1678, 1596, 14822, 20972, 5759, 775, 1159, 13, 1678, 1596, 703, 29883, 800, 353, 16521, 13, 1678, 282, 2158, 29898, 29883, 800, 29897, 13, 1678, 1596, 703, 1159, 13, 13, 1678, 1596, 14822, 20972, 5759, 775, 1159, 13, 1678, 1596, 703, 11967, 29890, 29906, 29999, 353, 16521, 13, 1678, 282, 2158, 29898, 11967, 29890, 29906, 29999, 29897, 13, 1678, 1596, 703, 1159, 13, 13, 13, 1753, 6088, 29918, 29876, 391, 29918, 2917, 332, 800, 29898, 2084, 1125, 13, 1678, 9995, 6359, 322, 6088, 278, 934, 411, 278, 22920, 1213, 15945, 13, 1678, 396, 796, 1678, 23858, 268, 2448, 329, 1705, 462, 1678, 10321, 3321, 16346, 13, 1678, 396, 29871, 29896, 418, 379, 4706, 29896, 29879, 29985, 29896, 462, 965, 448, 13, 1678, 396, 29871, 29906, 418, 940, 539, 29896, 29879, 29985, 29906, 462, 308, 29896, 29879, 29985, 29896, 13, 1678, 21104, 29892, 274, 800, 29892, 5016, 29890, 29906, 29999, 353, 24335, 24335, 6571, 13, 13, 1678, 2302, 353, 29871, 29896, 13, 1678, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29892, 376, 2917, 332, 800, 4968, 376, 29878, 1159, 408, 285, 29882, 29901, 13, 4706, 363, 1196, 297, 285, 29882, 29901, 13, 9651, 565, 451, 313, 2435, 29898, 1220, 29897, 1405, 29871, 29896, 322, 1196, 29961, 29896, 1822, 275, 26204, 580, 1125, 13, 18884, 6773, 13, 9651, 2343, 29892, 6635, 601, 353, 1196, 7503, 29946, 29946, 1402, 1196, 29961, 29946, 29946, 29901, 1822, 17010, 580, 13, 9651, 304, 2039, 353, 2343, 29889, 5451, 580, 13, 9651, 796, 29892, 5829, 29892, 11553, 29878, 353, 938, 29898, 517, 2039, 29961, 29900, 11724, 304, 2039, 29961, 29896, 1402, 376, 11393, 7122, 29898, 29873, 363, 260, 297, 304, 2039, 29961, 29906, 29901, 2314, 13, 9651, 4974, 796, 1275, 2302, 13, 9651, 2302, 4619, 29871, 29896, 13, 13, 9651, 11553, 29878, 353, 11553, 29878, 29889, 6506, 703, 29985, 613, 20569, 13, 9651, 6635, 601, 353, 6635, 601, 29889, 6506, 703, 29985, 613, 20569, 13, 13, 9651, 21104, 29961, 18098, 29962, 353, 11553, 29878, 13, 9651, 274, 800, 29961, 18098, 29962, 353, 6635, 601, 565, 6635, 601, 2804, 11663, 29908, 1683, 6213, 13, 9651, 5016, 29890, 29906, 29999, 29961, 18098, 29962, 353, 796, 13, 13, 4706, 736, 21104, 29892, 274, 800, 29892, 5016, 29890, 29906, 29999, 13, 13, 13, 1753, 6919, 800, 29918, 3166, 29918, 18098, 29898, 18098, 1125, 13, 1678, 796, 353, 5016, 29890, 29906, 29999, 29961, 18098, 29962, 13, 1678, 5285, 353, 21104, 29961, 29999, 29962, 13, 13, 1678, 565, 5285, 29961, 29900, 3816, 29900, 29962, 1275, 525, 1839, 29901, 13, 4706, 6919, 800, 353, 6919, 800, 29918, 3166, 29918, 18098, 29898, 13305, 29961, 29900, 3816, 29896, 13018, 29896, 2314, 13, 4706, 5285, 353, 5285, 29961, 29896, 17531, 13, 1678, 1683, 29901, 13, 4706, 6919, 800, 353, 5159, 13, 1678, 363, 269, 297, 5285, 29901, 13, 4706, 6919, 800, 29889, 4397, 3552, 29879, 7503, 29906, 1402, 938, 29898, 29879, 29961, 29941, 17531, 4961, 13, 1678, 736, 6919, 800, 13, 13, 13, 1753, 6597, 29918, 29876, 391, 1272, 29898, 2084, 29892, 302, 391, 29918, 29916, 312, 668, 29892, 16346, 1853, 1125, 13, 1678, 396, 1732, 597, 1636, 29889, 25105, 29889, 29876, 391, 29889, 13513, 29914, 25847, 5620, 1469, 29914, 4037, 29911, 1272, 29914, 13, 13, 1678, 396, 7523, 322, 6088, 278, 22920, 934, 13, 1678, 396, 796, 1678, 23858, 268, 2448, 329, 1705, 462, 1678, 10321, 3321, 16346, 13, 1678, 396, 29871, 29896, 418, 379, 4706, 29896, 29879, 29985, 29896, 462, 965, 448, 13, 1678, 396, 29871, 29906, 418, 940, 539, 29896, 29879, 29985, 29906, 462, 308, 29896, 29879, 29985, 29896, 13, 1678, 796, 2371, 353, 6571, 13, 1678, 22920, 353, 518, 1839, 29990, 742, 525, 2033, 29962, 13, 1678, 796, 353, 29871, 29896, 13, 13, 1678, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 2084, 29892, 376, 2917, 332, 800, 4968, 376, 29878, 1159, 408, 285, 29882, 29901, 13, 4706, 363, 1196, 297, 285, 29882, 29901, 13, 9651, 565, 7431, 29898, 1220, 29897, 1405, 29871, 29896, 322, 1196, 29961, 29896, 1822, 275, 26204, 7295, 13, 18884, 1196, 353, 1196, 7503, 29946, 29946, 1822, 5451, 580, 13, 18884, 5829, 353, 1196, 29961, 29896, 29962, 13, 18884, 796, 2371, 29961, 18098, 29962, 353, 796, 13, 18884, 4974, 938, 29898, 1220, 29961, 29900, 2314, 1275, 796, 13, 18884, 22920, 29889, 4397, 29898, 1220, 29961, 29906, 29901, 2314, 13, 18884, 796, 4619, 29871, 29896, 13, 13, 1678, 822, 6919, 800, 29918, 3166, 29918, 18098, 29898, 18098, 1125, 13, 4706, 796, 353, 796, 2371, 29961, 18098, 29962, 13, 4706, 5285, 353, 22920, 29961, 29999, 29962, 13, 4706, 565, 5285, 29961, 29900, 3816, 29900, 29962, 1275, 525, 1839, 29901, 13, 9651, 6919, 800, 353, 6919, 800, 29918, 3166, 29918, 18098, 29898, 13305, 29961, 29900, 3816, 29896, 13018, 29896, 2314, 13, 9651, 5285, 353, 5285, 29961, 29896, 17531, 13, 4706, 1683, 29901, 13, 9651, 6919, 800, 353, 5159, 13, 4706, 363, 269, 297, 5285, 29901, 13, 9651, 6919, 800, 29889, 4397, 3552, 29879, 7503, 29906, 1402, 938, 29898, 29879, 29961, 29941, 17531, 4961, 13, 4706, 736, 6919, 800, 13, 13, 1678, 396, 1222, 310, 934, 411, 319, 29923, 2582, 29901, 13, 1678, 396, 382, 4260, 29871, 353, 268, 448, 29953, 29955, 29945, 29889, 29955, 29946, 29906, 29906, 29947, 29941, 13, 1678, 396, 382, 9089, 29871, 353, 539, 29953, 29955, 29946, 29889, 29953, 29945, 29955, 29941, 29941, 29946, 13, 1678, 396, 382, 29883, 5059, 353, 539, 29906, 29947, 29945, 29889, 29906, 29900, 29953, 29896, 29941, 29900, 13, 1678, 396, 16883, 1682, 353, 1678, 448, 29896, 29953, 29900, 29896, 29889, 29946, 29953, 29941, 29906, 29900, 29929, 13, 1678, 396, 1222, 29883, 259, 353, 418, 448, 29941, 29946, 29889, 29896, 29946, 29906, 29945, 29941, 29947, 13, 1678, 396, 29871, 29896, 29879, 539, 448, 29896, 29946, 29941, 29889, 29929, 29941, 29945, 29896, 29947, 29896, 13, 1678, 396, 29871, 29906, 29879, 4706, 448, 29896, 29945, 29889, 29900, 29946, 29953, 29929, 29900, 29945, 13, 1678, 396, 29871, 29906, 29886, 4706, 448, 29896, 29906, 29889, 29906, 29947, 29945, 29941, 29955, 29953, 13, 1678, 396, 29871, 29941, 29879, 308, 448, 29896, 29889, 29955, 29900, 29953, 29941, 29941, 29896, 13, 1678, 396, 29871, 29941, 29886, 308, 448, 29896, 29889, 29900, 29941, 29900, 29945, 29955, 29906, 13, 1678, 396, 29871, 29946, 29879, 308, 448, 29900, 29889, 29896, 29946, 29896, 29946, 29896, 29896, 13, 1678, 302, 391, 1272, 353, 6571, 13, 1678, 805, 2176, 353, 11117, 29879, 2396, 29871, 29900, 29892, 525, 29886, 2396, 29871, 29896, 29892, 525, 29881, 2396, 29871, 29906, 29892, 525, 29888, 2396, 29871, 29941, 29913, 13, 13, 1678, 363, 313, 18098, 29892, 796, 29897, 297, 796, 2371, 29889, 7076, 7295, 13, 4706, 396, 2158, 703, 262, 5829, 1273, 29879, 29908, 1273, 5829, 29897, 13, 4706, 6919, 800, 353, 6919, 800, 29918, 3166, 29918, 18098, 29898, 18098, 29897, 13, 13, 4706, 285, 978, 353, 2897, 29889, 2084, 29889, 7122, 29898, 2084, 29892, 302, 391, 29918, 29916, 312, 668, 29892, 16346, 1853, 29892, 14210, 29900, 29906, 29881, 29995, 29879, 29915, 1273, 313, 29999, 29892, 5829, 876, 13, 13, 4706, 18190, 583, 29892, 15761, 575, 353, 24335, 6571, 13, 13, 4706, 411, 1722, 29898, 29888, 978, 29892, 525, 29878, 1495, 408, 285, 29882, 29901, 13, 9651, 363, 302, 297, 3464, 29898, 29945, 1125, 13, 18884, 427, 420, 29892, 321, 1767, 353, 285, 29882, 29889, 949, 1220, 2141, 5451, 703, 543, 29897, 13, 18884, 18190, 583, 29961, 3871, 29889, 17010, 580, 29962, 353, 5785, 29898, 29872, 1767, 29897, 13, 13, 9651, 363, 1196, 297, 285, 29882, 29901, 13, 18884, 2106, 29892, 15761, 353, 1196, 29889, 5451, 580, 13, 18884, 15761, 575, 29961, 3859, 29962, 353, 5785, 29898, 29872, 335, 29897, 13, 13, 4706, 302, 417, 29872, 353, 5159, 13, 4706, 363, 313, 3859, 29892, 2179, 29897, 297, 6919, 800, 29901, 13, 9651, 302, 353, 938, 29898, 3859, 29961, 29900, 2314, 13, 9651, 301, 353, 805, 2176, 29961, 3859, 29961, 29896, 5262, 13, 9651, 15761, 353, 15761, 575, 29961, 3859, 29962, 13, 9651, 302, 417, 29872, 29889, 4397, 3552, 29876, 29892, 301, 29892, 2179, 29892, 15761, 876, 13, 13, 4706, 302, 391, 1272, 29961, 18098, 29962, 353, 313, 29999, 29892, 302, 417, 29872, 29892, 18190, 583, 29897, 13, 13, 1678, 736, 302, 391, 1272, 13, 13, 13, 1753, 1207, 29918, 29876, 391, 5453, 29898, 2084, 29892, 302, 391, 29918, 29916, 312, 668, 1125, 13, 1678, 396, 1454, 16346, 1853, 297, 6796, 17821, 29878, 1338, 613, 376, 29883, 800, 613, 5387, 13, 1678, 363, 16346, 1853, 297, 6796, 17821, 29878, 1338, 613, 5387, 13, 4706, 1596, 14237, 20972, 5759, 775, 29901, 302, 391, 29918, 29916, 312, 668, 353, 1273, 29879, 29892, 16346, 1853, 353, 1273, 29879, 29915, 1273, 313, 29876, 391, 29918, 29916, 312, 668, 29892, 16346, 1853, 876, 13, 4706, 1596, 703, 4830, 3583, 29876, 29905, 29873, 1543, 29901, 313, 21641, 1353, 29892, 17288, 29876, 29892, 301, 29892, 2179, 29892, 5864, 511, 2023, 29962, 1159, 13, 4706, 1596, 877, 29995, 29879, 353, 525, 1273, 16346, 1853, 29897, 13, 4706, 848, 353, 6597, 29918, 29876, 391, 1272, 29898, 2084, 29892, 302, 391, 29918, 29916, 312, 668, 29892, 16346, 1853, 29897, 13, 4706, 282, 2158, 29898, 1272, 29897, 13, 4706, 396, 2158, 29898, 3126, 29889, 29881, 17204, 29898, 1272, 29892, 29536, 29922, 29946, 876, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1053, 10876, 13, 1678, 515, 3855, 8678, 1053, 5922, 29918, 3166, 29918, 1807, 29892, 2180, 25426, 8614, 13, 13, 1678, 363, 5829, 297, 302, 391, 29918, 9803, 29889, 18098, 29879, 29901, 13, 4706, 263, 5527, 353, 2180, 25426, 8614, 29889, 17821, 1705, 29918, 3166, 29918, 18098, 29898, 18098, 29897, 13, 4706, 1596, 29898, 29874, 5527, 29897, 13, 1678, 10876, 29889, 13322, 29898, 29896, 29897, 13, 13, 1678, 2224, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 13, 1678, 396, 17821, 1705, 353, 6571, 13, 1678, 396, 1454, 313, 18098, 29892, 1970, 710, 29897, 297, 302, 391, 29918, 9803, 29889, 17821, 1705, 29889, 7076, 7295, 13, 1678, 396, 1678, 5922, 353, 5922, 29918, 3166, 29918, 1807, 29898, 5527, 710, 29897, 13, 1678, 396, 1678, 1596, 29898, 5527, 710, 29897, 13, 1678, 396, 1678, 21104, 29961, 18098, 29962, 353, 313, 29876, 391, 29918, 9803, 29889, 11967, 29890, 29906, 29999, 29961, 18098, 1402, 5922, 29897, 13, 4706, 396, 1454, 269, 297, 5922, 29901, 13, 4706, 396, 1678, 282, 2158, 29898, 23583, 29898, 29879, 876, 13, 4706, 396, 29874, 5527, 353, 2180, 25426, 8614, 29889, 3166, 29918, 1807, 29898, 5527, 710, 29892, 5016, 29890, 29906, 29999, 29961, 18098, 2314, 13, 13, 1678, 396, 5675, 29918, 29876, 391, 29918, 2917, 332, 800, 29898, 2084, 29897, 13, 13, 1678, 396, 29916, 312, 7384, 353, 6796, 29931, 7698, 613, 376, 4421, 2241, 7698, 3108, 396, 29892, 376, 29931, 7230, 613, 376, 2241, 7698, 613, 29962, 13, 1678, 302, 391, 29918, 29916, 312, 7384, 353, 6796, 29931, 7698, 613, 29962, 13, 1678, 363, 921, 312, 668, 297, 302, 391, 29918, 29916, 312, 7384, 29901, 13, 4706, 1596, 703, 29916, 312, 668, 29901, 1273, 29879, 29908, 1273, 921, 312, 668, 29897, 13, 4706, 1207, 29918, 29876, 391, 5453, 29898, 2084, 29892, 921, 312, 668, 29897, 13, 13, 1678, 396, 291, 1853, 353, 376, 17821, 29878, 1338, 29908, 13, 1678, 396, 29881, 615, 29918, 1272, 353, 6597, 29918, 29876, 391, 1272, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 302, 391, 29918, 29916, 312, 668, 29892, 16346, 1853, 29897, 13, 1678, 396, 5675, 29918, 29876, 391, 5453, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 376, 29931, 7698, 1159, 13, 2 ]
mumu/feature/_woe.py
mingminyu/mumu
1
143814
<filename>mumu/feature/_woe.py # coding: utf-8 # ================================================ # Project: mumu # File: feature/_woe.py # Author: <NAME> # Email: <EMAIL> # Date: 2021/6/24 18:24 # Description: # ================================================ import os import string import logging import math import xlsxwriter import pandas as pd import numpy as np import scipy.stats import matplotlib.pyplot as plt from sklearn import tree from matplotlib.font_manager import FontProperties from ._contingency import chi2_contingency def __woe_calc(bad=None, good=None, bad_freq=None, good_freq=None): """Calculate woe :param bad: int or float, count of samples(target=1) in single bin :param good: int or float count of samples(target=0) in single bin :param bad_freq: int or float count of samples(target=1) in all samples :param good_freq: int or float count of samples(target=0) in all samples :return: """ target_rt = bad / float(bad_freq) non_target_rt = good / float(good_freq) if float(bad) != 0.0 and bad / float(bad + good) != 1.0: woe = math.log(float(target_rt / non_target_rt)) elif target_rt == 0.0: woe = -99999999.0 elif bad / float(bad + good) == 1.0: woe = 99999999.0 else: woe = -99999999.0 return woe def __iv_calc(ds=None): """Calculate iv value of the variable :param ds: DataFrame :return: iv, float """ bad_dist = ds['1'] / float(ds['1'].sum()) good_dist = ds['0'] / float(ds['0'].sum()) bad_dist = bad_dist.apply(lambda x: 0.0001 if x == 0 else x) ds['iv'] = (bad_dist - good_dist) * np.log(bad_dist / good_dist) iv = ds['iv'].sum() return iv def __target_check(df_master=None, target="target"): """Check target is right, target column only includes 0 and 1 in theory. :param df_master: DataFrame :param target: str :return: """ # 检查target是否只有0和1两个取值 if set(df_master[target].unique()) != {0, 1}: raise ValueError('Target are not only 0 and 1!') def init_binning(df_master=None, var_name=None, target=None, max_bin_num=200, missing=False, cut_points=None): """Cut bins for numerical variables(`var_name`) and describe distribution of target in each bin. :param df_master: DataFrame :param var_name: str :param target: str :param max_bin_num: int, default 200, max num of bins cut :param missing: bool, default False whether if the variable has missing value. :param cut_points: list, 指定的切分点,若不指定则根据分位点分bin specified cut points, if not, then cut bins according to cut points. :return: ds: DataFrame, statistical information for bins cut of the variable. """ df_tmp = df_master[[var_name, target]].copy() # Initialization cut points if cut_points is not None: if len(cut_points) == 0: raise ValueError('wrong cut points: {0}'.format(var_name)) if np.max(df_tmp[var_name]) >= cut_points[-1]: # last value of bins is inf cut_points[-1] = np.inf if np.min(df_tmp[var_name]) < cut_points[0]: # # last value of bins is minimum cut_points[0] = np.min(df_tmp[var_name]) # bins第一个值改为min value, 防止忘记填最小值 # If #(unique value) < max_bin_num, then each value will be a bin. elif len(df_tmp[var_name].unique()) < max_bin_num: cut_points = np.sort(df_tmp[var_name].unique()) cut_points = np.append(cut_points, np.inf) # If #(unique value) >= max_bin_num, then cut `max_bin_num` bins according to cut points. else: pct = np.arange(max_bin_num + 1) / max_bin_num # calculate cut points and drop duplicates. cut_points = df_tmp[var_name].quantile(pct, interpolation='higher').unique() # 计算分位点并去重 cut_points[-1] = np.inf # when missing is true, put `-1.0` into a single bin if missing: if cut_points[0] == -1.0: tmp_ary1 = np.asarray([-1.0, 0.0]) tmp_ary2 = np.asarray(cut_points[2:]) cut_points = np.concatenate((tmp_ary1, tmp_ary2), axis=0) else: logging.warning('Expect variable has missing value but actually no missing') # cut bins according to cut points and calculate distribution of target in each bin. # 按切分点分bin,并计算每个bin中target的分布 df_tmp[var_name + '_bin'] = np.digitize(df_tmp[var_name], bins=cut_points, right=False) ds = df_tmp.groupby(var_name + '_bin')[target].value_counts().unstack().fillna(value=0) ds['total'] = ds[0] + ds[1] ds['bin'] = [[cut_points[i - 1], cut_points[i]] for i in list(ds.index)] ds['bin_lb'] = [cut_points[i - 1] for i in list(ds.index)] ds = ds.sort_values(by='bin_lb', axis=0, ascending=True).reset_index(drop=True) # 根据bin的下界进行排序 ds.columns = ['0', '1', 'total', 'bin', 'bin_lb'] return ds def __value_match(map_dict=None, key_list=None): """Return corresponding key of the value according to `map_dict` example: [1,3,4,5] → ['本科','大专','高中','研究生'] :param map_dict: dict :param key_list: list :return: list, """ result = [] for key in key_list: if key in map_dict: result.append(map_dict[key]) else: result.append('base') return result def __mergebin(ds=None, idx_list=None, idx=None, var_type=None): """Merge adjacent bins, and calculate statistical information of the merged bin and chi value :param ds: DataFrame :param idx_list: list :param idx: int index of bins in list will be merged :param var_type: str, options ['numerical', 'categorical'] type of the variable. :return: ds: DataFrame """ # merge two bins, and recalculate distribution of target. ds.at[idx_list[idx], ['0', '1']] = ds.loc[idx_list[idx], ['0', '1']] + ds.loc[idx_list[idx + 1], ['0', '1']] ds.at[idx_list[idx], 'total'] = ds.loc[idx_list[idx], 'total'] + ds.loc[idx_list[idx + 1], 'total'] # recalculate range of the merged bin if var_type == 'numerical': ds.at[idx_list[idx], 'bin'] = [ds.loc[idx_list[idx], 'bin'][0], ds.loc[idx_list[idx + 1], 'bin'][1]] elif var_type == 'categorical': ds.at[idx_list[idx], 'bin'] = ds.loc[idx_list[idx:idx + 2], 'bin'].sum() # drop original bin after merged ds = ds.drop(idx_list[idx + 1], axis=0) # drop the index of original bins after merged idx_list.pop(idx + 1) # recalculate chi values of the merged bin, previous bin and later bin # if the merged bin is not first, then don't need to calculate the chi value of the previous bin if idx != 0: ds.at[idx_list[idx - 1], 'chisq'] = chi2_contingency(ds.loc[idx_list[(idx - 1):(idx + 1)], ['0', '1']])[0] # if the merged bin is not last, then don't need to calculate the chi value of the later bin if idx < ds.shape[0] - 1: ds.at[idx_list[idx], 'chisq'] = chi2_contingency(ds.loc[idx_list[idx:idx + 2], ['0', '1']])[0] else: ds.at[idx_list[idx], 'chisq'] = 9999999.0 return ds def generate_reference(ds=None, var_name=None, var_type=None): """generate reference table of woe of the variable. :param ds: DataFrame :param var_name: str :param var_type: str, options ['numerical', 'categorical'] :return: DataFrame, reference table """ # calculate woe and iv value for each bin good_freq = ds['0'].sum() bad_freq = ds['1'].sum() ds['woe_value'] = ds.apply(lambda x: __woe_calc(x['1'], x['0'], bad_freq, good_freq), axis=1) iv = __iv_calc(ds) # generate reference table df_ref_table = pd.DataFrame(columns=['Var_Name', 'Var_Type', 'Bin_No', 'Var_Value', 'Ref_Value', 'Count_0', 'Count_1', 'Total', 'Target_Rate', 'Proportion', 'IV']) df_ref_table['Bin_No'] = range(1, ds.shape[0] + 1) # Bin的编号,从1开始 df_ref_table['Var_Value'] = ds['bin'].astype(str) # 将list转成字符串 df_ref_table['Ref_Value'] = ds['woe_value'] df_ref_table['Count_0'] = ds['0'] df_ref_table['Count_1'] = ds['1'] df_ref_table['Total'] = ds['total'] df_ref_table['Target_Rate'] = 1.0 * df_ref_table['Count_1'] / df_ref_table['Total'] df_ref_table['Proportion'] = 1.0 * df_ref_table['Total'] / ds['total'].sum() df_ref_table['IV'] = iv df_ref_table['Var_Name'] = var_name df_ref_table['Var_Type'] = var_type return df_ref_table def __get_list_str(x): """Get value of the categorical variable, and put 3 value in one line :param x: str :return: list """ str_list = x.split('\001') s = '' for i in range(len(str_list)): s += str_list[i] + ',' if (i + 1) % 3 == 0 and i + 1 != len(str_list): s += '\n' return s[:-1] def plot_reference(df_ref=None, save_path=None, figsize=(10, 4)): """Woe plotting according to reference table :param df_ref: DataFrame :param save_path: str, the path of image saved :param figsize: tuple, size of the figure, default (10, 4) :return: """ x = np.arange(df_ref.shape[0]) y = df_ref['Ref_Value'].values z = df_ref['Target_Rate'].values var_name = df_ref['Var_Name'].iloc[0] iv = round(df_ref['IV'].iloc[0], 5) plt.figure(figsize=figsize, dpi=200) plt.bar(x, df_ref['Proportion'], color='royalblue', label='0', align='center') plt.bar(x, df_ref['Proportion'] * df_ref['Target_Rate'], color='firebrick', label='1', align='center') # draw label of x axis if df_ref['Var_Type'].iloc[0] == 'numerical': xticks_list = df_ref['Var_Value'].values xticks_list = [tuple([float(j) for j in i.strip('([] ').split(',')]) for i in xticks_list] xticks_list = [[round(i[0], 4), round(i[1], 4)] for i in xticks_list] plt.xticks(x, xticks_list) package_path = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) font_path = os.path.join(package_path, "resources", "fonts", "simsun.ttc") # noinspection PyBroadException try: zh_font = FontProperties(fname=font_path) except Exception: zh_font = FontProperties() if df_ref['Var_Type'].iloc[0] == 'categorical': xticks_list = df_ref['Var_Value'].apply(__get_list_str).tolist() plt.xticks(x, xticks_list, fontproperties=zh_font) plt.ylabel('proportion') plt.legend(loc=1, fontsize=9) ax2 = plt.twinx() plt.plot(x, y, '.-k', lw=2, markersize=8) for i, j, k in zip(x, y, z): ax2.annotate('%.2f(%.2f%%)' % (j, k * 100), xy=(i, j), va='center', ha='center', bbox={'boxstyle': 'round', 'fc': 'w'}) plt.ylabel('Woe value(Target rate)') plt.title('{0}: IV={1}'.format(var_name, iv), fontproperties=zh_font, fontsize=15) # save image if save_path is not None: if save_path.endswith('.png') or save_path.endswith('.jpg'): plt.savefig(save_path, bbox_inches='tight') elif os.path.isdir(save_path): plt.savefig(os.path.join(save_path, '{0}.png'.format(var_name)), bbox_inches='tight') else: raise ValueError('No such file or directory: {0}'.format(save_path)) plt.show() plt.close() def numwoe_autobinning(df_master=None, var_name=None, target='target', max_bins=6, min_prop_in_bin=0.05, missing=True, max_bin_init=200, method='chisq', to_plot=True, save_path=None): """Cut bins for numerical variable automatically, and calculate woe, iv value :param df_master: DataFrame :param var_name: :param target: :param max_bins: int, default 6 :param min_prop_in_bin: float, default 0.05 minimum sample ratio in each bin :param missing: bool, default True if missing is true, only support that cast `-1.0` into missing value now :param max_bin_init: int, default 200 max num of bin when initialization cut, determined by the size of samples and unique value :param method: str, option ['chisq', 'entropy'] methods of cut bins :param to_plot: bool, default True whether to plot reference table :param save_path: str, the path of image saved :return: df_ref_table: DataFrame, woe reference table """ # calculate size of samples for each bin min_samples_in_bin = int(df_master.shape[0] * min_prop_in_bin) if method == 'chisq': ds = init_binning(df_master, var_name=var_name, target=target, max_bin_num=max_bin_init, missing=missing) # calculate chi value of adjacent bins chisq = [] for i in range(ds.shape[0] - 1): chisq.append(chi2_contingency(ds.iloc[[i, i + 1], [0, 1]])[0]) chisq.append(9999999.0) ds['chisq'] = chisq # cut missing value into a single bin if missing: if ds[ds['bin_lb'] == -1.0].shape[0] > 0: ds_miss = ds[ds['bin_lb'] == -1.0].copy() ds = ds[ds['bin_lb'] != -1.0] else: ds_miss = pd.DataFrame() # merge two bins with small chi value ds_idx_list = list(ds.index) while (ds.shape[0] > max_bins) | (ds['chisq'].min() <= scipy.stats.chi2.ppf(0.95, 1)): # 找到卡方值最小的bin的index在index list中的位置 k = ds_idx_list.index(ds['chisq'].idxmin()) ds = __mergebin(ds=ds, idx_list=ds_idx_list, idx=k, var_type='numerical') # limit size of samples in each bin while (ds['total'].min() < min_samples_in_bin) & (ds.shape[0] > 2): # find the bin with minimum size of samples k = ds_idx_list.index(ds['total'].idxmin()) # if chi value of previous bin < later bin, choose previous bin to merge if (k == len(ds_idx_list) - 1) | ( ds.loc[ds_idx_list[k], 'chisq'] > ds.loc[ds_idx_list[k - 1], 'chisq']): k -= 1 ds = __mergebin(ds, idx_list=ds_idx_list, idx=k, var_type='numerical') elif method == 'entropy': max_depth = int(math.log(max_bins, 2)) if missing: df_miss = df_master.loc[df_master[var_name] == -1.0, [var_name, target]].reset_index(drop=True) df_no_miss = df_master.loc[df_master[var_name] != -1.0, [var_name, target]].reset_index(drop=True) if df_miss.shape[0] > 0: ds_miss = init_binning(df_master=df_miss, var_name=var_name, target=target, cut_points=[-1.0, -0.5], missing=False) else: ds_miss = pd.DataFrame() min_value = -0.5 else: df_no_miss = df_master min_value = df_no_miss[var_name].min() clf = tree.DecisionTreeClassifier(criterion='entropy', max_depth=max_depth, min_samples_leaf=min_samples_in_bin) clf.fit(df_no_miss[var_name].values.reshape(-1, 1), df_no_miss[target]) cut_points = np.sort(clf.tree_.threshold[clf.tree_.threshold != -2.0]) cut_points = np.append([min_value], cut_points) cut_points = np.append(cut_points, df_no_miss[var_name].max()) ds = init_binning(df_no_miss, var_name=var_name, target=target, cut_points=cut_points, missing=False) else: raise ValueError('wrong method, only choose "chisq" or "entropy"!') # generate final reference table if missing: ds = pd.concat([ds_miss, ds]) ds = ds.reset_index(drop=True) df_ref_table = generate_reference(ds=ds, var_name=var_name, var_type='numerical') # plotting if to_plot: plot_reference(df_ref_table, save_path=save_path) return df_ref_table def numwoe_aptbinning(df_master=None, var_name=None, target=None, bins=None, to_plot=True, save_path=None): """Cut bins of numerical variables according to specified cut points, and calculate woe, iv value :param df_master: DataFrame :param var_name: str, variable name :param target: str, target name :param bins: list, specified cut points, eg. [0.0, 1.0, 3.0, 10.0] :param to_plot: bool, default True whether to plot reference table :param save_path: str, the path of image saved :return: df_ref_table: DataFrame, woe reference table """ ds = init_binning(df_master, var_name=var_name, target=target, cut_points=bins, missing=False) df_ref_table = generate_reference(ds, var_name=var_name, var_type='numerical') if to_plot: plot_reference(df_ref_table, save_path=save_path) return df_ref_table def catwoe_autobinning(df_master=None, var_name=None, target=None, max_bins=6, min_prop_in_bin=0.05, min_samples_init=1, missing_value=None, to_plot=True, save_path=None): """Cut bins of categorical variables according to specified cut points, and calculate woe, iv value :param: df_master: DataFrame :param: var_name: str, variable name :param: target: str, target name :param: max_bins: int :param: min_samples_init: int, default 1 minimum size of cut bins on initialization, merge bins with small size of samples :param: min_prop_in_bin: float, default None minimum sample ratio in each bin :param: missing_value: str, default None if missing is true, will put the value into a single bin :param: to_plot: bool, default True whether to plot reference table :param: save_path: str, default None str, the path of image saved :return: df_ref_table: DataFrame, woe reference table """ min_samples_in_bin = int(df_master.shape[0] * min_prop_in_bin) ds = pd.crosstab(df_master[var_name], df_master[target]).fillna(value=0).reset_index(drop=False) ds['total'] = ds[1] + ds[0] # index for each bin ds['bin'] = [[i] for i in ds.index] ds.columns = ['value', '0', '1', 'total', 'bin'] # generate a mapping dict of index and real value map_dict = dict(zip(ds.index, ds['value'])) # whether to put missing value into a single bin if missing_value is not None: ds_miss = ds[ds['value'] == missing_value].copy() ds = ds[ds['value'] != missing_value] # sort the bin order by size of samples in each bin ds = ds.sort_values(by=['total'], ascending=True) # merge bins with small size of samples idx_small_bin = list(ds[ds['total'] < min_samples_init].index) if len(idx_small_bin) >= 2: ds.at[idx_small_bin[0], ['0', '1']] = ds.loc[idx_small_bin, ['0', '1']].sum() ds.at[idx_small_bin[0], 'total'] = ds.loc[idx_small_bin, 'total'].sum() ds.at[idx_small_bin[0], 'bin'] = idx_small_bin ds = ds.drop(idx_small_bin[1:], axis=0) # calculate target rate for each bin ds['target_rt'] = ds['1'] / (ds['0'] + ds['1']) # sort order by target rate of each bin ds = ds.sort_values(by='target_rt', ascending=True) # calculate chi value of two adjacent bins chisq = [] for i in range(ds.shape[0] - 1): # noinspection PyBroadException try: chisq.append(chi2_contingency(ds.iloc[[i, i + 1], [1, 2]])[0]) except Exception: chisq.append(chi2_contingency(ds.iloc[[i, i + 1], [0, 1]])[0]) chisq.append(9999999.0) ds['chisq'] = chisq # loop of merging two adjacent bins, recalculate chi value of previous and later bin ds_idx_list = list(ds.index) while (ds.shape[0] > max_bins) | (ds.chisq.min() <= scipy.stats.chi2.ppf(0.95, 1)): k = ds_idx_list.index(ds['chisq'].idxmin()) ds = __mergebin(ds, idx_list=ds_idx_list, idx=k, var_type='categorical') # limit size of samples for each bin while (ds['total'].min() < min_samples_in_bin) & (ds.shape[0] > 2): # find the bin with minimum size of samples k = ds_idx_list.index(ds['total'].idxmin()) if (k == len(ds_idx_list) - 1) | (ds.loc[ds_idx_list[k], 'chisq'] > ds.loc[ds_idx_list[k - 1], 'chisq']): k -= 1 ds = __mergebin(ds, idx_list=ds_idx_list, idx=k, var_type='categorical') # generate reference table if missing_value is not None: ds = pd.concat([ds_miss, ds]) ds = ds.reset_index(drop=True) ds['bin'] = ds['bin'].apply(lambda x: __value_match(map_dict, x)) # 将索引还原成变量原本的取值 ds['bin'] = ds['bin'].apply(lambda x: '\001'.join(x)) # 用特殊符号'\001'拼接value,防止出现value中有标点符号 df_ref_table = generate_reference(ds, var_name=var_name, var_type='categorical') # plotting if to_plot: plot_reference(df_ref_table, save_path=save_path) return df_ref_table def catwoe_aptbinning(df_master=None, var_name=None, target=None, bins=None, to_plot=True, save_path=None): """Cut bins of categorical variables according to specified cut points, and calculate woe, iv value :param: df_master: DataFrame :param: var_name: str :param: target: str :param: bins: list rules of grouping, eg. [['初中', '高中'], ['大专', '本科', '硕士研究生'], ['博士研究生']] :param: to_plot: bool, default True whether to plot reference table :param: save_path: str, the path of image saved :return: df_ref_table: DataFrame, woe reference table """ unique_values = set(sum(bins, [])) if len(unique_values) != len(sum(bins, [])): raise ValueError('Value is repetitive, please check bins is correct') ds = pd.crosstab(df_master[var_name], df_master[target]).fillna(value=0).reset_index(drop=False) ds['total'] = ds[1] + ds[0] ds.columns = ['bin', '0', '1', 'total'] # cut bins according to the specified method for bin in bins: idx_list = [] for value in bin: idx_list.append(int(ds[ds['bin'] == value].index.values)) ds.at[idx_list[0], ['0', '1']] = ds.loc[idx_list, ['0', '1']].sum() ds.at[idx_list[0], 'total'] = ds.loc[idx_list, 'total'].sum() ds.at[idx_list[0], 'bin'] = bin ds = ds.drop(idx_list[1:], axis=0) ds = ds.reset_index(drop=True) # generate reference table ds['bin'] = ds['bin'].apply(lambda x: '\001'.join(x)) # 用特殊符号'\001'拼接value,防止出现value中有标点符号 df_ref_table = generate_reference(ds, var_name=var_name, var_type='categorical') # plotting if to_plot: plot_reference(df_ref_table, save_path=save_path) return df_ref_table def __str_convert(x): """Cast types of variable into str :param x: :return: """ if type(x) in [int, float, np.float64]: return str(int(x)) elif type(x) is str: return x else: return x def __restore_list(s=None, value_type=None): """Restore list with str format into original list eg:'[1, 2]' → [1,2] :param s: str, need to restored :param value_type: str, options ['numerical', 'categorical'] type of value :return: """ if value_type == 'numerical': return [np.float(i.strip('[] ')) for i in s.split(',')] elif value_type == 'categorical': return s.split('\001') else: raise ValueError('Wrong value type!') def __cvlookup(value=None, map_dict=None): """Find corresponding woe value of the variable :param value: str, :param map_dict: dict, mapping dict :return: woe_value: float, woe value """ if value in map_dict.keys(): woe_value = map_dict[value] else: woe_value = 0.0 return woe_value def numwoe_apply(df_master=None, ref_table=None, var_name=None): """Replace original value with woe value for single numerical variable if `bin_lb[i] ≤ X < bin_ub[i]` is meet, replace X with `ref_value[i]` :param: df_master: DataFrame :param: ref_table: DataFrame, reference table :param: var_name: str, variable name """ interval = ref_table['Var_Value'].apply(lambda x: __restore_list(x, 'numerical')).values # minimum bin_lb = np.asarray([i[0] for i in interval]).reshape((1, -1)) # bin的下界 bin_lb[0][0] = -np.Infinity # 把第一个bin的下界替换成负无穷 base_woe = ref_table['Ref_Value'].iloc[0] # 取第一个值作为baseline x = (df_master[var_name].values.reshape((-1, 1)) >= bin_lb) * 1.0 w = ref_table['Ref_Value'].diff(periods=1).fillna(base_woe).values # 进行1阶差分 df_master['nwoe_' + var_name] = np.dot(x, w) def catwoe_apply(df_master=None, ref_table=None, var_name=None): """Replace original value with woe value for single categorical variable :param: df_master: DataFrame :param: ref_table: DataFrame, reference table :param: var_name: str, variable name """ var_value = ref_table['Var_Value'].apply(lambda x: __restore_list(x, 'categorical')).values df_master[var_name] = df_master[var_name].apply(lambda x: __str_convert(x)) # build a dict of values value_list = [] ref_value_list = [] for i, lst in enumerate(var_value): value_list += lst ref_value_list += [ref_table['Ref_Value'].iloc[i]] * len(lst) value_dict = dict(zip(value_list, ref_value_list)) df_master['cwoe_' + var_name] = df_master[var_name].apply(lambda x: __cvlookup(x, value_dict)) def woeref_old2new(ref_woe=None): """Replace old woe reference table with the new :param ref_woe: DataFrame old woe reference table :return: ref_new_woe: DataFrame new woe reference table """ ref_woe_copy = ref_woe.copy() ref_woe_copy = ref_woe_copy.loc[ref_woe_copy['Var_Value'] != 'base'] ref_woe_copy['Total'] = ref_woe_copy['Count_0'] + ref_woe_copy['Count_1'] ref_woe_copy = ref_woe_copy.rename(columns={'Ratio_1': 'Target_Rate', 'Ratio_All': 'Proportion'}) ref_woe_copy['Var_Value'] = ref_woe_copy['Var_Value'].apply(lambda x: str(x).split('_')) ref_new_woe = ref_woe_copy.groupby(['Var_Name', 'Var_Type', 'IV', 'Ref_Value'], as_index=False, ) \ .agg({'Var_Value': 'sum', 'Count_0': 'sum', 'Count_1': 'sum', 'Total': 'sum', 'Proportion': 'sum', }) ref_new_woe['Target_Rate'] = ref_new_woe['Count_1'] / ref_new_woe['Total'] ref_new_woe['Var_Value'].loc[ref_new_woe['Var_Type'] == 'categorical'] = ref_new_woe['Var_Value'].loc[ ref_new_woe['Var_Type'] == 'categorical'].apply(lambda x: "\001".join(x)) ref_new_woe['Bin_No'] = ref_new_woe[['Var_Name', 'Ref_Value']].groupby(['Var_Name']).rank(method='dense', ascending=True) ref_new_woe['Var_Value'] = ref_new_woe['Var_Value'].apply(lambda x: str(x).replace("'", "")) return ref_new_woe def iv_extract(woe_ref=None, save_path=None): """Extract iv value according to woe reference table, order by desc :param woe_ref: DataFrame woe reference table :param save_path: str, default None the path of csv file saved :return: df_iv: DataFrame """ iv = [] for var in woe_ref.Var_Name.unique(): iv.append([var, woe_ref['IV'][woe_ref['Var_Name'] == var].iloc[0]]) df_iv = pd.DataFrame(iv, columns=['Var_Name', 'IV']) df_iv = df_iv.sort_values(by='IV', ascending=False) if not save_path: df_iv.to_csv(save_path, index=False) return df_iv def replace_var_woe_ref(woe_ref_all=None, woe_ref_var=None): """Replace the specified reference table of variable in all with the new :param: woe_ref_all: DataFrame reference tables of all variables :param: woe_ref_var: DataFrame reference table of the specified variable :return: woe_ref_new: DataFrame new reference table """ replace_var = woe_ref_var['Var_Name'].unique()[0] woe_ref_new = woe_ref_all.loc[woe_ref_all['Var_Name'] != replace_var, :].copy() woe_ref_new = pd.concat([woe_ref_new, woe_ref_var], axis=0, ignore_index=True) return woe_ref_new def save_pictures_in_excel(file_name=None, img_loc=None, var_list=None, columns_num=1, img_rows=20, sheet_name='images'): """Save the image in excel :param file_name: str, default xlsx format :param img_loc: str, path of the image :param var_list: list, default None variables will saved in excel, if None, will embed all images in excel :param columns_num: int, default 1 columns for the image :param img_rows: int, default 20 rows for the image :param sheet_name:str, default 'images' excel sheet name :return: """ if not img_loc.endswith('/'): img_loc = img_loc + '/' book = xlsxwriter.Workbook(file_name) sheet = book.add_worksheet(sheet_name) # generate a list of images if var_list is not None: img_list = ['{0}.png'.format(var) for var in var_list] else: img_list = [img for img in os.listdir(img_loc) if img.split(".")[-1] in ['jpg', 'png', 'bmp']] img_list.sort(reverse=True) # list of A - Z location_list = [i for i in string.ascii_uppercase] for i, img in zip(range(len(img_list)), img_list): location_x = location_list[(i % columns_num) * 2 + 1] if i < columns_num: # set 90px of width sheet.set_column('{0}:{0}'.format(location_x), 90) location_y = img_rows * (i // columns_num) + 1 sheet.write('{0}{1}'.format(location_x, location_y), img) sheet.insert_image('{0}{1}'.format(location_x, location_y + 1), img_loc + img, options={'x_scale': 0.8, 'y_scale': 0.88}) book.close()
[ 1, 529, 9507, 29958, 29885, 398, 29884, 29914, 14394, 19891, 827, 29872, 29889, 2272, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 29937, 1275, 9166, 9166, 4936, 2751, 1360, 13, 29937, 8010, 29901, 286, 398, 29884, 13, 29937, 3497, 29901, 4682, 19891, 827, 29872, 29889, 2272, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 22608, 29901, 529, 26862, 6227, 29958, 13, 29937, 4712, 29901, 29871, 29906, 29900, 29906, 29896, 29914, 29953, 29914, 29906, 29946, 29871, 29896, 29947, 29901, 29906, 29946, 13, 29937, 12953, 29901, 13, 29937, 1275, 9166, 9166, 4936, 2751, 1360, 13, 5215, 2897, 13, 5215, 1347, 13, 5215, 12183, 13, 5215, 5844, 13, 5215, 921, 3137, 29916, 13236, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 16202, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 2071, 19668, 1053, 5447, 13, 3166, 22889, 29889, 5657, 29918, 12847, 1053, 10928, 11857, 13, 3166, 869, 29918, 535, 1259, 3819, 1053, 18558, 29906, 29918, 535, 1259, 3819, 13, 13, 13, 1753, 4770, 827, 29872, 29918, 28667, 29898, 12313, 29922, 8516, 29892, 1781, 29922, 8516, 29892, 4319, 29918, 29888, 7971, 29922, 8516, 29892, 1781, 29918, 29888, 7971, 29922, 8516, 1125, 13, 1678, 9995, 27065, 403, 281, 7297, 13, 13, 1678, 584, 3207, 4319, 29901, 938, 470, 5785, 29892, 13, 4706, 2302, 310, 11916, 29898, 5182, 29922, 29896, 29897, 297, 2323, 9016, 13, 1678, 584, 3207, 1781, 29901, 938, 470, 5785, 13, 4706, 2302, 310, 11916, 29898, 5182, 29922, 29900, 29897, 297, 2323, 9016, 13, 1678, 584, 3207, 4319, 29918, 29888, 7971, 29901, 938, 470, 5785, 13, 4706, 2302, 310, 11916, 29898, 5182, 29922, 29896, 29897, 297, 599, 11916, 13, 1678, 584, 3207, 1781, 29918, 29888, 7971, 29901, 938, 470, 5785, 13, 4706, 2302, 310, 11916, 29898, 5182, 29922, 29900, 29897, 297, 599, 11916, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 3646, 29918, 2273, 353, 4319, 847, 5785, 29898, 12313, 29918, 29888, 7971, 29897, 13, 1678, 1661, 29918, 5182, 29918, 2273, 353, 1781, 847, 5785, 29898, 16773, 29918, 29888, 7971, 29897, 13, 13, 1678, 565, 5785, 29898, 12313, 29897, 2804, 29871, 29900, 29889, 29900, 322, 4319, 847, 5785, 29898, 12313, 718, 1781, 29897, 2804, 29871, 29896, 29889, 29900, 29901, 13, 4706, 281, 7297, 353, 5844, 29889, 1188, 29898, 7411, 29898, 5182, 29918, 2273, 847, 1661, 29918, 5182, 29918, 2273, 876, 13, 1678, 25342, 3646, 29918, 2273, 1275, 29871, 29900, 29889, 29900, 29901, 13, 4706, 281, 7297, 353, 448, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 13, 1678, 25342, 4319, 847, 5785, 29898, 12313, 718, 1781, 29897, 1275, 29871, 29896, 29889, 29900, 29901, 13, 4706, 281, 7297, 353, 29871, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 13, 1678, 1683, 29901, 13, 4706, 281, 7297, 353, 448, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 13, 13, 1678, 736, 281, 7297, 13, 13, 13, 1753, 4770, 440, 29918, 28667, 29898, 6289, 29922, 8516, 1125, 13, 1678, 9995, 27065, 403, 20444, 995, 310, 278, 2286, 13, 13, 1678, 584, 3207, 18031, 29901, 3630, 4308, 13, 1678, 584, 2457, 29901, 20444, 29892, 5785, 13, 1678, 9995, 13, 1678, 4319, 29918, 5721, 353, 18031, 1839, 29896, 2033, 847, 5785, 29898, 6289, 1839, 29896, 13359, 2083, 3101, 13, 1678, 1781, 29918, 5721, 353, 18031, 1839, 29900, 2033, 847, 5785, 29898, 6289, 1839, 29900, 13359, 2083, 3101, 13, 1678, 4319, 29918, 5721, 353, 4319, 29918, 5721, 29889, 7302, 29898, 2892, 921, 29901, 29871, 29900, 29889, 29900, 29900, 29900, 29896, 565, 921, 1275, 29871, 29900, 1683, 921, 29897, 13, 1678, 18031, 1839, 440, 2033, 353, 313, 12313, 29918, 5721, 448, 1781, 29918, 5721, 29897, 334, 7442, 29889, 1188, 29898, 12313, 29918, 5721, 847, 1781, 29918, 5721, 29897, 13, 1678, 20444, 353, 18031, 1839, 440, 13359, 2083, 580, 13, 13, 1678, 736, 20444, 13, 13, 13, 1753, 4770, 5182, 29918, 3198, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 3646, 543, 5182, 29908, 1125, 13, 1678, 9995, 5596, 3646, 338, 1492, 29892, 3646, 1897, 871, 7805, 29871, 29900, 322, 29871, 29896, 297, 6368, 29889, 13, 13, 1678, 584, 3207, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 3646, 29901, 851, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 396, 29871, 233, 166, 131, 31213, 5182, 30392, 31191, 31557, 30417, 29900, 30503, 29896, 31977, 30502, 30683, 30959, 13, 1678, 565, 731, 29898, 2176, 29918, 6207, 29961, 5182, 1822, 13092, 3101, 2804, 426, 29900, 29892, 29871, 29896, 6177, 13, 4706, 12020, 7865, 2392, 877, 8667, 526, 451, 871, 29871, 29900, 322, 29871, 29896, 29991, 1495, 13, 13, 13, 1753, 2069, 29918, 2109, 1076, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 3646, 29922, 8516, 29892, 4236, 29918, 2109, 29918, 1949, 29922, 29906, 29900, 29900, 29892, 4567, 29922, 8824, 29892, 5700, 29918, 9748, 29922, 8516, 1125, 13, 1678, 9995, 29907, 329, 289, 1144, 363, 16259, 3651, 16787, 1707, 29918, 978, 6348, 322, 8453, 4978, 310, 3646, 297, 1269, 9016, 29889, 13, 13, 1678, 584, 3207, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 722, 29918, 978, 29901, 851, 13, 1678, 584, 3207, 3646, 29901, 851, 13, 1678, 584, 3207, 4236, 29918, 2109, 29918, 1949, 29901, 938, 29892, 2322, 29871, 29906, 29900, 29900, 29892, 13, 4706, 4236, 954, 310, 289, 1144, 5700, 13, 1678, 584, 3207, 4567, 29901, 6120, 29892, 2322, 7700, 13, 4706, 3692, 565, 278, 2286, 756, 4567, 995, 29889, 13, 1678, 584, 3207, 5700, 29918, 9748, 29901, 1051, 29892, 29871, 31084, 30495, 30210, 31757, 30748, 30940, 30214, 31653, 30413, 31084, 30495, 31403, 31393, 30763, 30748, 30956, 30940, 30748, 2109, 13, 4706, 6790, 5700, 3291, 29892, 565, 451, 29892, 769, 5700, 289, 1144, 5034, 304, 5700, 3291, 29889, 13, 1678, 584, 2457, 29901, 18031, 29901, 3630, 4308, 29892, 13, 4706, 24148, 2472, 363, 289, 1144, 5700, 310, 278, 2286, 29889, 13, 1678, 9995, 13, 1678, 4489, 29918, 7050, 353, 4489, 29918, 6207, 8999, 1707, 29918, 978, 29892, 3646, 29962, 1822, 8552, 580, 13, 13, 1678, 396, 17250, 2133, 5700, 3291, 13, 1678, 565, 5700, 29918, 9748, 338, 451, 6213, 29901, 13, 4706, 565, 7431, 29898, 7582, 29918, 9748, 29897, 1275, 29871, 29900, 29901, 13, 9651, 12020, 7865, 2392, 877, 15866, 549, 5700, 3291, 29901, 426, 29900, 29913, 4286, 4830, 29898, 1707, 29918, 978, 876, 13, 13, 4706, 565, 7442, 29889, 3317, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 2314, 6736, 5700, 29918, 9748, 14352, 29896, 5387, 13, 9651, 396, 1833, 995, 310, 289, 1144, 338, 3041, 13, 9651, 5700, 29918, 9748, 14352, 29896, 29962, 353, 7442, 29889, 7192, 13, 13, 4706, 565, 7442, 29889, 1195, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 2314, 529, 5700, 29918, 9748, 29961, 29900, 5387, 13, 9651, 396, 396, 1833, 995, 310, 289, 1144, 338, 9212, 13, 9651, 5700, 29918, 9748, 29961, 29900, 29962, 353, 7442, 29889, 1195, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 2314, 29871, 396, 289, 1144, 30622, 30287, 30502, 30959, 31264, 30573, 1195, 995, 29892, 29871, 236, 155, 181, 31981, 232, 194, 155, 31410, 232, 164, 174, 30878, 30446, 30959, 13, 13, 1678, 396, 960, 27355, 13092, 995, 29897, 529, 4236, 29918, 2109, 29918, 1949, 29892, 769, 1269, 995, 674, 367, 263, 9016, 29889, 13, 1678, 25342, 7431, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 1822, 13092, 3101, 529, 4236, 29918, 2109, 29918, 1949, 29901, 13, 4706, 5700, 29918, 9748, 353, 7442, 29889, 6605, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 1822, 13092, 3101, 13, 4706, 5700, 29918, 9748, 353, 7442, 29889, 4397, 29898, 7582, 29918, 9748, 29892, 7442, 29889, 7192, 29897, 13, 13, 1678, 396, 960, 27355, 13092, 995, 29897, 6736, 4236, 29918, 2109, 29918, 1949, 29892, 769, 5700, 421, 3317, 29918, 2109, 29918, 1949, 29952, 289, 1144, 5034, 304, 5700, 3291, 29889, 13, 1678, 1683, 29901, 13, 4706, 282, 312, 353, 7442, 29889, 279, 927, 29898, 3317, 29918, 2109, 29918, 1949, 718, 29871, 29896, 29897, 847, 4236, 29918, 2109, 29918, 1949, 13, 4706, 396, 8147, 5700, 3291, 322, 5768, 20955, 29889, 13, 4706, 5700, 29918, 9748, 353, 4489, 29918, 7050, 29961, 1707, 29918, 978, 1822, 12150, 488, 29898, 29886, 312, 29892, 29694, 2433, 9812, 261, 2824, 13092, 580, 29871, 396, 29871, 31466, 31565, 30748, 30956, 30940, 31666, 31475, 30908, 13, 4706, 5700, 29918, 9748, 14352, 29896, 29962, 353, 7442, 29889, 7192, 13, 13, 1678, 396, 746, 4567, 338, 1565, 29892, 1925, 9370, 29896, 29889, 29900, 29952, 964, 263, 2323, 9016, 13, 1678, 565, 4567, 29901, 13, 4706, 565, 5700, 29918, 9748, 29961, 29900, 29962, 1275, 448, 29896, 29889, 29900, 29901, 13, 9651, 13128, 29918, 653, 29896, 353, 7442, 29889, 294, 2378, 4197, 29899, 29896, 29889, 29900, 29892, 29871, 29900, 29889, 29900, 2314, 13, 9651, 13128, 29918, 653, 29906, 353, 7442, 29889, 294, 2378, 29898, 7582, 29918, 9748, 29961, 29906, 29901, 2314, 13, 9651, 5700, 29918, 9748, 353, 7442, 29889, 535, 29883, 2579, 403, 3552, 7050, 29918, 653, 29896, 29892, 13128, 29918, 653, 29906, 511, 9685, 29922, 29900, 29897, 13, 4706, 1683, 29901, 13, 9651, 12183, 29889, 27392, 877, 1252, 1103, 2286, 756, 4567, 995, 541, 2869, 694, 4567, 1495, 13, 13, 1678, 396, 5700, 289, 1144, 5034, 304, 5700, 3291, 322, 8147, 4978, 310, 3646, 297, 1269, 9016, 29889, 13, 1678, 396, 29871, 31590, 31757, 30748, 30940, 30748, 2109, 30214, 31666, 31466, 31565, 31951, 30502, 2109, 30275, 5182, 30210, 30748, 31454, 13, 1678, 4489, 29918, 7050, 29961, 1707, 29918, 978, 718, 22868, 2109, 2033, 353, 7442, 29889, 26204, 675, 29898, 2176, 29918, 7050, 29961, 1707, 29918, 978, 1402, 289, 1144, 29922, 7582, 29918, 9748, 29892, 1492, 29922, 8824, 29897, 13, 1678, 18031, 353, 4489, 29918, 7050, 29889, 27789, 29898, 1707, 29918, 978, 718, 22868, 2109, 29861, 5182, 1822, 1767, 29918, 2798, 29879, 2141, 348, 1429, 2141, 5589, 1056, 29898, 1767, 29922, 29900, 29897, 13, 1678, 18031, 1839, 7827, 2033, 353, 18031, 29961, 29900, 29962, 718, 18031, 29961, 29896, 29962, 13, 1678, 18031, 1839, 2109, 2033, 353, 5519, 7582, 29918, 9748, 29961, 29875, 448, 29871, 29896, 1402, 5700, 29918, 9748, 29961, 29875, 5262, 363, 474, 297, 1051, 29898, 6289, 29889, 2248, 4638, 13, 1678, 18031, 1839, 2109, 29918, 27728, 2033, 353, 518, 7582, 29918, 9748, 29961, 29875, 448, 29871, 29896, 29962, 363, 474, 297, 1051, 29898, 6289, 29889, 2248, 4638, 13, 1678, 18031, 353, 18031, 29889, 6605, 29918, 5975, 29898, 1609, 2433, 2109, 29918, 27728, 742, 9685, 29922, 29900, 29892, 12066, 2548, 29922, 5574, 467, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 29871, 396, 29871, 31393, 30763, 2109, 30210, 30557, 30967, 31174, 30448, 233, 145, 149, 31463, 13, 1678, 18031, 29889, 13099, 353, 6024, 29900, 742, 525, 29896, 742, 525, 7827, 742, 525, 2109, 742, 525, 2109, 29918, 27728, 2033, 13, 13, 1678, 736, 18031, 13, 13, 13, 1753, 4770, 1767, 29918, 4352, 29898, 1958, 29918, 8977, 29922, 8516, 29892, 1820, 29918, 1761, 29922, 8516, 1125, 13, 1678, 9995, 11609, 6590, 1820, 310, 278, 995, 5034, 304, 421, 1958, 29918, 8977, 29952, 13, 1678, 1342, 29901, 518, 29896, 29892, 29941, 29892, 29946, 29892, 29945, 29962, 10309, 6024, 30346, 31030, 3788, 30257, 31756, 3788, 30528, 30275, 3788, 31367, 31455, 30486, 2033, 13, 13, 1678, 584, 3207, 2910, 29918, 8977, 29901, 9657, 13, 1678, 584, 3207, 1820, 29918, 1761, 29901, 1051, 13, 1678, 584, 2457, 29901, 1051, 29892, 13, 1678, 9995, 13, 1678, 1121, 353, 5159, 13, 13, 1678, 363, 1820, 297, 1820, 29918, 1761, 29901, 13, 4706, 565, 1820, 297, 2910, 29918, 8977, 29901, 13, 9651, 1121, 29889, 4397, 29898, 1958, 29918, 8977, 29961, 1989, 2314, 13, 4706, 1683, 29901, 13, 9651, 1121, 29889, 4397, 877, 3188, 1495, 13, 13, 1678, 736, 1121, 13, 13, 13, 1753, 4770, 14634, 2109, 29898, 6289, 29922, 8516, 29892, 22645, 29918, 1761, 29922, 8516, 29892, 22645, 29922, 8516, 29892, 722, 29918, 1853, 29922, 8516, 1125, 13, 1678, 9995, 15836, 479, 20114, 289, 1144, 29892, 322, 8147, 24148, 2472, 310, 278, 19412, 9016, 322, 18558, 995, 13, 13, 1678, 584, 3207, 18031, 29901, 3630, 4308, 13, 1678, 584, 3207, 22645, 29918, 1761, 29901, 1051, 13, 1678, 584, 3207, 22645, 29901, 938, 13, 4706, 2380, 310, 289, 1144, 297, 1051, 674, 367, 19412, 13, 1678, 584, 3207, 722, 29918, 1853, 29901, 851, 29892, 3987, 6024, 8058, 936, 742, 525, 29883, 20440, 936, 2033, 13, 4706, 1134, 310, 278, 2286, 29889, 13, 1678, 584, 2457, 29901, 18031, 29901, 3630, 4308, 13, 1678, 9995, 13, 1678, 396, 10366, 1023, 289, 1144, 29892, 322, 337, 15807, 403, 4978, 310, 3646, 29889, 13, 1678, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 6024, 29900, 742, 525, 29896, 2033, 29962, 353, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 6024, 29900, 742, 525, 29896, 2033, 29962, 718, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 718, 29871, 29896, 1402, 6024, 29900, 742, 525, 29896, 2033, 29962, 13, 1678, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 7827, 2033, 353, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 7827, 2033, 718, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 718, 29871, 29896, 1402, 525, 7827, 2033, 13, 13, 1678, 396, 337, 15807, 403, 3464, 310, 278, 19412, 9016, 13, 1678, 565, 722, 29918, 1853, 1275, 525, 8058, 936, 2396, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 2109, 2033, 353, 518, 6289, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 2109, 2033, 29961, 29900, 1402, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 718, 29871, 29896, 1402, 525, 2109, 2033, 29961, 29896, 5262, 13, 1678, 25342, 722, 29918, 1853, 1275, 525, 29883, 20440, 936, 2396, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 2109, 2033, 353, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 29901, 13140, 718, 29871, 29906, 1402, 525, 2109, 13359, 2083, 580, 13, 13, 1678, 396, 5768, 2441, 9016, 1156, 19412, 13, 1678, 18031, 353, 18031, 29889, 8865, 29898, 13140, 29918, 1761, 29961, 13140, 718, 29871, 29896, 1402, 9685, 29922, 29900, 29897, 13, 1678, 396, 5768, 278, 2380, 310, 2441, 289, 1144, 1156, 19412, 13, 1678, 22645, 29918, 1761, 29889, 7323, 29898, 13140, 718, 29871, 29896, 29897, 13, 13, 1678, 396, 337, 15807, 403, 18558, 1819, 310, 278, 19412, 9016, 29892, 3517, 9016, 322, 2678, 9016, 13, 1678, 396, 565, 278, 19412, 9016, 338, 451, 937, 29892, 769, 1016, 29915, 29873, 817, 304, 8147, 278, 18558, 995, 310, 278, 3517, 9016, 13, 1678, 565, 22645, 2804, 29871, 29900, 29901, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 448, 29871, 29896, 1402, 525, 305, 275, 29939, 2033, 353, 18558, 29906, 29918, 535, 1259, 3819, 29898, 6289, 29889, 2029, 29961, 13140, 29918, 1761, 15625, 13140, 448, 29871, 29896, 1125, 29898, 13140, 718, 29871, 29896, 29897, 1402, 6024, 29900, 742, 525, 29896, 2033, 2314, 29961, 29900, 29962, 13, 13, 1678, 396, 565, 278, 19412, 9016, 338, 451, 1833, 29892, 769, 1016, 29915, 29873, 817, 304, 8147, 278, 18558, 995, 310, 278, 2678, 9016, 13, 1678, 565, 22645, 529, 18031, 29889, 12181, 29961, 29900, 29962, 448, 29871, 29896, 29901, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 305, 275, 29939, 2033, 353, 18558, 29906, 29918, 535, 1259, 3819, 29898, 6289, 29889, 2029, 29961, 13140, 29918, 1761, 29961, 13140, 29901, 13140, 718, 29871, 29906, 1402, 6024, 29900, 742, 525, 29896, 2033, 2314, 29961, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 13140, 1402, 525, 305, 275, 29939, 2033, 353, 29871, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 13, 13, 1678, 736, 18031, 13, 13, 13, 1753, 5706, 29918, 5679, 29898, 6289, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 722, 29918, 1853, 29922, 8516, 1125, 13, 1678, 9995, 17158, 3407, 1591, 310, 281, 7297, 310, 278, 2286, 29889, 13, 13, 1678, 584, 3207, 18031, 29901, 3630, 4308, 13, 1678, 584, 3207, 722, 29918, 978, 29901, 851, 13, 1678, 584, 3207, 722, 29918, 1853, 29901, 851, 29892, 3987, 6024, 8058, 936, 742, 525, 29883, 20440, 936, 2033, 13, 1678, 584, 2457, 29901, 3630, 4308, 29892, 3407, 1591, 13, 1678, 9995, 13, 1678, 396, 8147, 281, 7297, 322, 20444, 995, 363, 1269, 9016, 13, 1678, 1781, 29918, 29888, 7971, 353, 18031, 1839, 29900, 13359, 2083, 580, 13, 1678, 4319, 29918, 29888, 7971, 353, 18031, 1839, 29896, 13359, 2083, 580, 13, 1678, 18031, 1839, 827, 29872, 29918, 1767, 2033, 353, 18031, 29889, 7302, 29898, 2892, 921, 29901, 4770, 827, 29872, 29918, 28667, 29898, 29916, 1839, 29896, 7464, 921, 1839, 29900, 7464, 4319, 29918, 29888, 7971, 29892, 1781, 29918, 29888, 7971, 511, 9685, 29922, 29896, 29897, 13, 1678, 20444, 353, 4770, 440, 29918, 28667, 29898, 6289, 29897, 13, 13, 1678, 396, 5706, 3407, 1591, 13, 1678, 4489, 29918, 999, 29918, 2371, 353, 10518, 29889, 17271, 29898, 13099, 29922, 1839, 9037, 29918, 1170, 742, 525, 9037, 29918, 1542, 742, 525, 29933, 262, 29918, 3782, 742, 525, 9037, 29918, 1917, 742, 525, 5620, 29918, 1917, 742, 13, 462, 462, 308, 525, 3981, 29918, 29900, 742, 525, 3981, 29918, 29896, 742, 525, 11536, 742, 525, 8667, 29918, 19907, 742, 525, 1184, 637, 291, 742, 525, 5667, 11287, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 29933, 262, 29918, 3782, 2033, 353, 3464, 29898, 29896, 29892, 18031, 29889, 12181, 29961, 29900, 29962, 718, 29871, 29896, 29897, 29871, 396, 27662, 30210, 31795, 30850, 30214, 31594, 29896, 31026, 31020, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 9037, 29918, 1917, 2033, 353, 18031, 1839, 2109, 13359, 579, 668, 29898, 710, 29897, 29871, 396, 29871, 30998, 1761, 31415, 30494, 30578, 31277, 31767, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 5620, 29918, 1917, 2033, 353, 18031, 1839, 827, 29872, 29918, 1767, 2033, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 3981, 29918, 29900, 2033, 353, 18031, 1839, 29900, 2033, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 3981, 29918, 29896, 2033, 353, 18031, 1839, 29896, 2033, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 11536, 2033, 353, 18031, 1839, 7827, 2033, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 8667, 29918, 19907, 2033, 353, 29871, 29896, 29889, 29900, 334, 4489, 29918, 999, 29918, 2371, 1839, 3981, 29918, 29896, 2033, 847, 4489, 29918, 999, 29918, 2371, 1839, 11536, 2033, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 1184, 637, 291, 2033, 353, 29871, 29896, 29889, 29900, 334, 4489, 29918, 999, 29918, 2371, 1839, 11536, 2033, 847, 18031, 1839, 7827, 13359, 2083, 580, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 5667, 2033, 353, 20444, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 9037, 29918, 1170, 2033, 353, 722, 29918, 978, 13, 1678, 4489, 29918, 999, 29918, 2371, 1839, 9037, 29918, 1542, 2033, 353, 722, 29918, 1853, 13, 13, 1678, 736, 4489, 29918, 999, 29918, 2371, 13, 13, 13, 1753, 4770, 657, 29918, 1761, 29918, 710, 29898, 29916, 1125, 13, 1678, 9995, 2577, 995, 310, 278, 11608, 936, 2286, 29892, 322, 1925, 29871, 29941, 995, 297, 697, 1196, 13, 13, 1678, 584, 3207, 921, 29901, 851, 13, 1678, 584, 2457, 29901, 1051, 13, 1678, 9995, 13, 1678, 851, 29918, 1761, 353, 921, 29889, 5451, 28909, 29900, 29900, 29896, 1495, 13, 1678, 269, 353, 6629, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 710, 29918, 1761, 22164, 13, 4706, 269, 4619, 851, 29918, 1761, 29961, 29875, 29962, 718, 525, 5501, 13, 4706, 565, 313, 29875, 718, 29871, 29896, 29897, 1273, 29871, 29941, 1275, 29871, 29900, 322, 474, 718, 29871, 29896, 2804, 7431, 29898, 710, 29918, 1761, 1125, 13, 9651, 269, 4619, 11297, 29876, 29915, 13, 13, 1678, 736, 269, 7503, 29899, 29896, 29962, 13, 13, 13, 1753, 6492, 29918, 5679, 29898, 2176, 29918, 999, 29922, 8516, 29892, 4078, 29918, 2084, 29922, 8516, 29892, 2537, 2311, 7607, 29896, 29900, 29892, 29871, 29946, 22164, 13, 1678, 9995, 29956, 7297, 6492, 1259, 5034, 304, 29871, 3407, 1591, 13, 13, 1678, 584, 3207, 4489, 29918, 999, 29901, 3630, 4308, 13, 1678, 584, 3207, 4078, 29918, 2084, 29901, 851, 29892, 278, 2224, 310, 1967, 7160, 13, 1678, 584, 3207, 2537, 2311, 29901, 18761, 29892, 2159, 310, 278, 4377, 29892, 2322, 29871, 313, 29896, 29900, 29892, 29871, 29946, 29897, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 921, 353, 7442, 29889, 279, 927, 29898, 2176, 29918, 999, 29889, 12181, 29961, 29900, 2314, 13, 1678, 343, 353, 4489, 29918, 999, 1839, 5620, 29918, 1917, 13359, 5975, 13, 1678, 503, 353, 4489, 29918, 999, 1839, 8667, 29918, 19907, 13359, 5975, 13, 1678, 722, 29918, 978, 353, 4489, 29918, 999, 1839, 9037, 29918, 1170, 13359, 309, 542, 29961, 29900, 29962, 13, 1678, 20444, 353, 4513, 29898, 2176, 29918, 999, 1839, 5667, 13359, 309, 542, 29961, 29900, 1402, 29871, 29945, 29897, 13, 13, 1678, 14770, 29889, 4532, 29898, 1003, 2311, 29922, 1003, 2311, 29892, 270, 1631, 29922, 29906, 29900, 29900, 29897, 13, 1678, 14770, 29889, 1646, 29898, 29916, 29892, 4489, 29918, 999, 1839, 1184, 637, 291, 7464, 2927, 2433, 307, 4605, 9539, 742, 3858, 2433, 29900, 742, 7595, 2433, 5064, 1495, 13, 1678, 14770, 29889, 1646, 29898, 29916, 29892, 4489, 29918, 999, 1839, 1184, 637, 291, 2033, 334, 4489, 29918, 999, 1839, 8667, 29918, 19907, 7464, 2927, 2433, 8696, 1182, 860, 742, 3858, 2433, 29896, 742, 7595, 2433, 5064, 1495, 13, 13, 1678, 396, 4216, 3858, 310, 921, 9685, 13, 1678, 565, 4489, 29918, 999, 1839, 9037, 29918, 1542, 13359, 309, 542, 29961, 29900, 29962, 1275, 525, 8058, 936, 2396, 13, 308, 486, 7358, 29918, 1761, 353, 4489, 29918, 999, 1839, 9037, 29918, 1917, 13359, 5975, 13, 308, 486, 7358, 29918, 1761, 353, 518, 23583, 4197, 7411, 29898, 29926, 29897, 363, 432, 297, 474, 29889, 17010, 877, 29898, 2636, 525, 467, 5451, 29317, 1495, 2314, 363, 474, 297, 29871, 486, 7358, 29918, 1761, 29962, 13, 308, 486, 7358, 29918, 1761, 353, 5519, 14486, 29898, 29875, 29961, 29900, 1402, 29871, 29946, 511, 4513, 29898, 29875, 29961, 29896, 1402, 29871, 29946, 4638, 363, 474, 297, 29871, 486, 7358, 29918, 1761, 29962, 13, 4706, 14770, 29889, 486, 7358, 29898, 29916, 29892, 29871, 486, 7358, 29918, 1761, 29897, 13, 13, 1678, 3577, 29918, 2084, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 13, 1678, 4079, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5113, 29918, 2084, 29892, 376, 13237, 613, 376, 28586, 613, 376, 3601, 11445, 29889, 698, 29883, 1159, 13, 13, 1678, 396, 694, 1144, 27988, 10772, 29933, 9972, 2451, 13, 1678, 1018, 29901, 13, 4706, 503, 29882, 29918, 5657, 353, 10928, 11857, 29898, 29888, 978, 29922, 5657, 29918, 2084, 29897, 13, 1678, 5174, 8960, 29901, 13, 4706, 503, 29882, 29918, 5657, 353, 10928, 11857, 580, 13, 13, 1678, 565, 4489, 29918, 999, 1839, 9037, 29918, 1542, 13359, 309, 542, 29961, 29900, 29962, 1275, 525, 29883, 20440, 936, 2396, 13, 308, 486, 7358, 29918, 1761, 353, 4489, 29918, 999, 1839, 9037, 29918, 1917, 13359, 7302, 22168, 657, 29918, 1761, 29918, 710, 467, 25027, 391, 580, 13, 4706, 14770, 29889, 486, 7358, 29898, 29916, 29892, 29871, 486, 7358, 29918, 1761, 29892, 4079, 11330, 29922, 17599, 29918, 5657, 29897, 13, 13, 1678, 14770, 29889, 29891, 1643, 877, 771, 637, 291, 1495, 13, 1678, 14770, 29889, 26172, 29898, 2029, 29922, 29896, 29892, 4079, 2311, 29922, 29929, 29897, 13, 1678, 4853, 29906, 353, 14770, 29889, 29873, 5080, 29916, 580, 13, 1678, 14770, 29889, 5317, 29898, 29916, 29892, 343, 29892, 525, 9229, 29895, 742, 301, 29893, 29922, 29906, 29892, 29320, 675, 29922, 29947, 29897, 13, 13, 1678, 363, 474, 29892, 432, 29892, 413, 297, 14319, 29898, 29916, 29892, 343, 29892, 503, 1125, 13, 4706, 4853, 29906, 29889, 6735, 403, 877, 15543, 29906, 29888, 29898, 15543, 29906, 29888, 7686, 16029, 1273, 313, 29926, 29892, 413, 334, 29871, 29896, 29900, 29900, 511, 921, 29891, 7607, 29875, 29892, 432, 511, 2947, 2433, 5064, 742, 447, 2433, 5064, 742, 13, 462, 268, 289, 1884, 3790, 29915, 1884, 3293, 2396, 525, 14486, 742, 525, 13801, 2396, 525, 29893, 29915, 1800, 13, 13, 1678, 14770, 29889, 29891, 1643, 877, 29956, 7297, 995, 29898, 8667, 6554, 29897, 1495, 13, 1678, 14770, 29889, 3257, 877, 29912, 29900, 6177, 6599, 3790, 29896, 29913, 4286, 4830, 29898, 1707, 29918, 978, 29892, 20444, 511, 4079, 11330, 29922, 17599, 29918, 5657, 29892, 4079, 2311, 29922, 29896, 29945, 29897, 13, 13, 1678, 396, 4078, 1967, 13, 1678, 565, 4078, 29918, 2084, 338, 451, 6213, 29901, 13, 4706, 565, 4078, 29918, 2084, 29889, 1975, 2541, 12839, 2732, 1495, 470, 4078, 29918, 2084, 29889, 1975, 2541, 12839, 6173, 29374, 13, 9651, 14770, 29889, 7620, 1003, 29898, 7620, 29918, 2084, 29892, 289, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 4706, 25342, 2897, 29889, 2084, 29889, 275, 3972, 29898, 7620, 29918, 2084, 1125, 13, 9651, 14770, 29889, 7620, 1003, 29898, 359, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 2084, 29892, 22372, 29900, 1836, 2732, 4286, 4830, 29898, 1707, 29918, 978, 8243, 289, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 3782, 1316, 934, 470, 3884, 29901, 426, 29900, 29913, 4286, 4830, 29898, 7620, 29918, 2084, 876, 13, 13, 1678, 14770, 29889, 4294, 580, 13, 1678, 14770, 29889, 5358, 580, 13, 13, 13, 1753, 954, 827, 29872, 29918, 1300, 711, 262, 1076, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 3646, 2433, 5182, 742, 4236, 29918, 29890, 1144, 29922, 29953, 29892, 13, 462, 539, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29922, 29900, 29889, 29900, 29945, 29892, 4567, 29922, 5574, 29892, 4236, 29918, 2109, 29918, 2344, 29922, 29906, 29900, 29900, 29892, 13, 462, 539, 1158, 2433, 305, 275, 29939, 742, 304, 29918, 5317, 29922, 5574, 29892, 4078, 29918, 2084, 29922, 8516, 1125, 13, 1678, 9995, 29907, 329, 289, 1144, 363, 16259, 2286, 6336, 29892, 322, 8147, 281, 7297, 29892, 20444, 995, 13, 13, 1678, 584, 3207, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 722, 29918, 978, 29901, 13, 1678, 584, 3207, 3646, 29901, 13, 1678, 584, 3207, 4236, 29918, 29890, 1144, 29901, 938, 29892, 2322, 29871, 29953, 13, 1678, 584, 3207, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29901, 5785, 29892, 2322, 29871, 29900, 29889, 29900, 29945, 13, 4706, 9212, 4559, 11959, 297, 1269, 9016, 13, 1678, 584, 3207, 4567, 29901, 6120, 29892, 2322, 5852, 13, 4706, 565, 4567, 338, 1565, 29892, 871, 2304, 393, 4320, 9370, 29896, 29889, 29900, 29952, 964, 4567, 995, 1286, 13, 1678, 584, 3207, 4236, 29918, 2109, 29918, 2344, 29901, 938, 29892, 2322, 29871, 29906, 29900, 29900, 13, 4706, 4236, 954, 310, 9016, 746, 17865, 5700, 29892, 10087, 491, 278, 2159, 310, 11916, 322, 5412, 995, 13, 1678, 584, 3207, 1158, 29901, 851, 29892, 2984, 6024, 305, 275, 29939, 742, 525, 296, 14441, 2033, 13, 4706, 3519, 310, 5700, 289, 1144, 13, 1678, 584, 3207, 304, 29918, 5317, 29901, 6120, 29892, 2322, 5852, 13, 4706, 3692, 304, 6492, 3407, 1591, 13, 1678, 584, 3207, 4078, 29918, 2084, 29901, 851, 29892, 278, 2224, 310, 1967, 7160, 13, 1678, 584, 2457, 29901, 4489, 29918, 999, 29918, 2371, 29901, 3630, 4308, 29892, 281, 7297, 3407, 1591, 13, 1678, 9995, 13, 1678, 396, 8147, 2159, 310, 11916, 363, 1269, 9016, 13, 1678, 1375, 29918, 27736, 29918, 262, 29918, 2109, 353, 938, 29898, 2176, 29918, 6207, 29889, 12181, 29961, 29900, 29962, 334, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29897, 13, 13, 1678, 565, 1158, 1275, 525, 305, 275, 29939, 2396, 13, 4706, 18031, 353, 2069, 29918, 2109, 1076, 29898, 2176, 29918, 6207, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 3646, 29922, 5182, 29892, 4236, 29918, 2109, 29918, 1949, 29922, 3317, 29918, 2109, 29918, 2344, 29892, 4567, 29922, 27259, 29897, 13, 4706, 396, 8147, 18558, 995, 310, 20114, 289, 1144, 13, 4706, 521, 275, 29939, 353, 5159, 13, 13, 4706, 363, 474, 297, 3464, 29898, 6289, 29889, 12181, 29961, 29900, 29962, 448, 29871, 29896, 1125, 13, 9651, 521, 275, 29939, 29889, 4397, 29898, 4161, 29906, 29918, 535, 1259, 3819, 29898, 6289, 29889, 309, 542, 8999, 29875, 29892, 474, 718, 29871, 29896, 1402, 518, 29900, 29892, 29871, 29896, 24960, 29961, 29900, 2314, 13, 13, 4706, 521, 275, 29939, 29889, 4397, 29898, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 29897, 13, 4706, 18031, 1839, 305, 275, 29939, 2033, 353, 521, 275, 29939, 13, 13, 4706, 396, 5700, 4567, 995, 964, 263, 2323, 9016, 13, 4706, 565, 4567, 29901, 13, 9651, 565, 18031, 29961, 6289, 1839, 2109, 29918, 27728, 2033, 1275, 448, 29896, 29889, 29900, 1822, 12181, 29961, 29900, 29962, 1405, 29871, 29900, 29901, 13, 18884, 18031, 29918, 9894, 353, 18031, 29961, 6289, 1839, 2109, 29918, 27728, 2033, 1275, 448, 29896, 29889, 29900, 1822, 8552, 580, 13, 18884, 18031, 353, 18031, 29961, 6289, 1839, 2109, 29918, 27728, 2033, 2804, 448, 29896, 29889, 29900, 29962, 13, 9651, 1683, 29901, 13, 18884, 18031, 29918, 9894, 353, 10518, 29889, 17271, 580, 13, 13, 4706, 396, 10366, 1023, 289, 1144, 411, 2319, 18558, 995, 13, 4706, 18031, 29918, 13140, 29918, 1761, 353, 1051, 29898, 6289, 29889, 2248, 29897, 13, 13, 4706, 1550, 313, 6289, 29889, 12181, 29961, 29900, 29962, 1405, 4236, 29918, 29890, 1144, 29897, 891, 313, 6289, 1839, 305, 275, 29939, 13359, 1195, 580, 5277, 4560, 2272, 29889, 16202, 29889, 4161, 29906, 29889, 407, 29888, 29898, 29900, 29889, 29929, 29945, 29892, 29871, 29896, 22164, 13, 9651, 396, 29871, 233, 140, 193, 30780, 232, 144, 164, 30525, 30959, 30878, 30446, 30210, 2109, 30210, 2248, 30505, 2248, 1051, 30275, 30210, 30956, 30669, 13, 9651, 413, 353, 18031, 29918, 13140, 29918, 1761, 29889, 2248, 29898, 6289, 1839, 305, 275, 29939, 13359, 13140, 1195, 3101, 13, 9651, 18031, 353, 4770, 14634, 2109, 29898, 6289, 29922, 6289, 29892, 22645, 29918, 1761, 29922, 6289, 29918, 13140, 29918, 1761, 29892, 22645, 29922, 29895, 29892, 722, 29918, 1853, 2433, 8058, 936, 1495, 13, 13, 4706, 396, 4046, 2159, 310, 11916, 297, 1269, 9016, 13, 4706, 1550, 313, 6289, 1839, 7827, 13359, 1195, 580, 529, 1375, 29918, 27736, 29918, 262, 29918, 2109, 29897, 669, 313, 6289, 29889, 12181, 29961, 29900, 29962, 1405, 29871, 29906, 1125, 13, 9651, 396, 1284, 278, 9016, 411, 9212, 2159, 310, 11916, 13, 9651, 413, 353, 18031, 29918, 13140, 29918, 1761, 29889, 2248, 29898, 6289, 1839, 7827, 13359, 13140, 1195, 3101, 13, 13, 9651, 396, 565, 18558, 995, 310, 3517, 9016, 529, 2678, 9016, 29892, 6755, 3517, 9016, 304, 10366, 13, 9651, 565, 313, 29895, 1275, 7431, 29898, 6289, 29918, 13140, 29918, 1761, 29897, 448, 29871, 29896, 29897, 891, 313, 13, 462, 1678, 18031, 29889, 2029, 29961, 6289, 29918, 13140, 29918, 1761, 29961, 29895, 1402, 525, 305, 275, 29939, 2033, 1405, 18031, 29889, 2029, 29961, 6289, 29918, 13140, 29918, 1761, 29961, 29895, 448, 29871, 29896, 1402, 525, 305, 275, 29939, 2033, 1125, 13, 18884, 413, 22361, 29871, 29896, 13, 9651, 18031, 353, 4770, 14634, 2109, 29898, 6289, 29892, 22645, 29918, 1761, 29922, 6289, 29918, 13140, 29918, 1761, 29892, 22645, 29922, 29895, 29892, 722, 29918, 1853, 2433, 8058, 936, 1495, 13, 13, 1678, 25342, 1158, 1275, 525, 296, 14441, 2396, 13, 4706, 4236, 29918, 19488, 353, 938, 29898, 755, 29889, 1188, 29898, 3317, 29918, 29890, 1144, 29892, 29871, 29906, 876, 13, 13, 4706, 565, 4567, 29901, 13, 9651, 4489, 29918, 9894, 353, 4489, 29918, 6207, 29889, 2029, 29961, 2176, 29918, 6207, 29961, 1707, 29918, 978, 29962, 1275, 448, 29896, 29889, 29900, 29892, 518, 1707, 29918, 978, 29892, 3646, 29962, 1822, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 9651, 4489, 29918, 1217, 29918, 9894, 353, 4489, 29918, 6207, 29889, 2029, 29961, 2176, 29918, 6207, 29961, 1707, 29918, 978, 29962, 2804, 448, 29896, 29889, 29900, 29892, 518, 1707, 29918, 978, 29892, 3646, 29962, 1822, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 13, 9651, 565, 4489, 29918, 9894, 29889, 12181, 29961, 29900, 29962, 1405, 29871, 29900, 29901, 13, 18884, 18031, 29918, 9894, 353, 2069, 29918, 2109, 1076, 29898, 2176, 29918, 6207, 29922, 2176, 29918, 9894, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 3646, 29922, 5182, 29892, 13, 462, 462, 9651, 5700, 29918, 9748, 11759, 29899, 29896, 29889, 29900, 29892, 448, 29900, 29889, 29945, 1402, 4567, 29922, 8824, 29897, 13, 9651, 1683, 29901, 13, 18884, 18031, 29918, 9894, 353, 10518, 29889, 17271, 580, 13, 13, 9651, 1375, 29918, 1767, 353, 448, 29900, 29889, 29945, 13, 4706, 1683, 29901, 13, 9651, 4489, 29918, 1217, 29918, 9894, 353, 4489, 29918, 6207, 13, 9651, 1375, 29918, 1767, 353, 4489, 29918, 1217, 29918, 9894, 29961, 1707, 29918, 978, 1822, 1195, 580, 13, 13, 4706, 1067, 29888, 353, 5447, 29889, 6185, 2459, 9643, 2385, 3709, 29898, 29883, 5385, 291, 2433, 296, 14441, 742, 4236, 29918, 19488, 29922, 3317, 29918, 19488, 29892, 13, 462, 462, 3986, 1375, 29918, 27736, 29918, 29500, 29922, 1195, 29918, 27736, 29918, 262, 29918, 2109, 29897, 13, 4706, 1067, 29888, 29889, 9202, 29898, 2176, 29918, 1217, 29918, 9894, 29961, 1707, 29918, 978, 1822, 5975, 29889, 690, 14443, 6278, 29896, 29892, 29871, 29896, 511, 4489, 29918, 1217, 29918, 9894, 29961, 5182, 2314, 13, 4706, 5700, 29918, 9748, 353, 7442, 29889, 6605, 29898, 695, 29888, 29889, 8336, 5396, 386, 12268, 29961, 695, 29888, 29889, 8336, 5396, 386, 12268, 2804, 448, 29906, 29889, 29900, 2314, 13, 4706, 5700, 29918, 9748, 353, 7442, 29889, 4397, 4197, 1195, 29918, 1767, 1402, 5700, 29918, 9748, 29897, 13, 4706, 5700, 29918, 9748, 353, 7442, 29889, 4397, 29898, 7582, 29918, 9748, 29892, 4489, 29918, 1217, 29918, 9894, 29961, 1707, 29918, 978, 1822, 3317, 3101, 13, 4706, 18031, 353, 2069, 29918, 2109, 1076, 29898, 2176, 29918, 1217, 29918, 9894, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 3646, 29922, 5182, 29892, 5700, 29918, 9748, 29922, 7582, 29918, 9748, 29892, 4567, 29922, 8824, 29897, 13, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 877, 15866, 549, 1158, 29892, 871, 6755, 376, 305, 275, 29939, 29908, 470, 376, 296, 14441, 29908, 29991, 1495, 13, 13, 1678, 396, 5706, 2186, 3407, 1591, 13, 1678, 565, 4567, 29901, 13, 4706, 18031, 353, 10518, 29889, 17685, 4197, 6289, 29918, 9894, 29892, 18031, 2314, 13, 13, 1678, 18031, 353, 18031, 29889, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 1678, 4489, 29918, 999, 29918, 2371, 353, 5706, 29918, 5679, 29898, 6289, 29922, 6289, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 722, 29918, 1853, 2433, 8058, 936, 1495, 13, 13, 1678, 396, 6492, 1259, 13, 1678, 565, 304, 29918, 5317, 29901, 13, 4706, 6492, 29918, 5679, 29898, 2176, 29918, 999, 29918, 2371, 29892, 4078, 29918, 2084, 29922, 7620, 29918, 2084, 29897, 13, 13, 1678, 736, 4489, 29918, 999, 29918, 2371, 13, 13, 13, 1753, 954, 827, 29872, 29918, 2156, 2109, 1076, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 3646, 29922, 8516, 29892, 289, 1144, 29922, 8516, 29892, 304, 29918, 5317, 29922, 5574, 29892, 4078, 29918, 2084, 29922, 8516, 1125, 13, 1678, 9995, 29907, 329, 289, 1144, 310, 16259, 3651, 5034, 304, 6790, 5700, 3291, 29892, 322, 8147, 281, 7297, 29892, 20444, 995, 13, 13, 1678, 584, 3207, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 722, 29918, 978, 29901, 851, 29892, 2286, 1024, 13, 1678, 584, 3207, 3646, 29901, 851, 29892, 3646, 1024, 13, 1678, 584, 3207, 289, 1144, 29901, 1051, 29892, 13, 4706, 6790, 5700, 3291, 29892, 8087, 29889, 518, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29892, 29871, 29941, 29889, 29900, 29892, 29871, 29896, 29900, 29889, 29900, 29962, 13, 1678, 584, 3207, 304, 29918, 5317, 29901, 6120, 29892, 2322, 5852, 13, 4706, 3692, 304, 6492, 3407, 1591, 13, 1678, 584, 3207, 4078, 29918, 2084, 29901, 851, 29892, 278, 2224, 310, 1967, 7160, 13, 1678, 584, 2457, 29901, 4489, 29918, 999, 29918, 2371, 29901, 3630, 4308, 29892, 281, 7297, 3407, 1591, 13, 1678, 9995, 13, 1678, 18031, 353, 2069, 29918, 2109, 1076, 29898, 2176, 29918, 6207, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 3646, 29922, 5182, 29892, 5700, 29918, 9748, 29922, 29890, 1144, 29892, 4567, 29922, 8824, 29897, 13, 1678, 4489, 29918, 999, 29918, 2371, 353, 5706, 29918, 5679, 29898, 6289, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 722, 29918, 1853, 2433, 8058, 936, 1495, 13, 13, 1678, 565, 304, 29918, 5317, 29901, 13, 4706, 6492, 29918, 5679, 29898, 2176, 29918, 999, 29918, 2371, 29892, 4078, 29918, 2084, 29922, 7620, 29918, 2084, 29897, 13, 13, 1678, 736, 4489, 29918, 999, 29918, 2371, 13, 13, 13, 1753, 6635, 827, 29872, 29918, 1300, 711, 262, 1076, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 3646, 29922, 8516, 29892, 13, 462, 539, 4236, 29918, 29890, 1144, 29922, 29953, 29892, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29922, 29900, 29889, 29900, 29945, 29892, 1375, 29918, 27736, 29918, 2344, 29922, 29896, 29892, 13, 462, 539, 4567, 29918, 1767, 29922, 8516, 29892, 304, 29918, 5317, 29922, 5574, 29892, 4078, 29918, 2084, 29922, 8516, 1125, 13, 1678, 9995, 29907, 329, 289, 1144, 310, 11608, 936, 3651, 5034, 304, 6790, 5700, 3291, 29892, 322, 8147, 281, 7297, 29892, 20444, 995, 13, 13, 1678, 584, 3207, 29901, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 29901, 722, 29918, 978, 29901, 851, 29892, 2286, 1024, 13, 1678, 584, 3207, 29901, 3646, 29901, 851, 29892, 3646, 1024, 13, 1678, 584, 3207, 29901, 4236, 29918, 29890, 1144, 29901, 938, 13, 1678, 584, 3207, 29901, 1375, 29918, 27736, 29918, 2344, 29901, 938, 29892, 2322, 29871, 29896, 13, 4706, 9212, 2159, 310, 5700, 289, 1144, 373, 17865, 29892, 10366, 289, 1144, 411, 2319, 2159, 310, 11916, 13, 1678, 584, 3207, 29901, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29901, 5785, 29892, 2322, 6213, 13, 4706, 9212, 4559, 11959, 297, 1269, 9016, 13, 1678, 584, 3207, 29901, 4567, 29918, 1767, 29901, 851, 29892, 2322, 6213, 13, 4706, 565, 4567, 338, 1565, 29892, 674, 1925, 278, 995, 964, 263, 2323, 9016, 13, 1678, 584, 3207, 29901, 304, 29918, 5317, 29901, 6120, 29892, 2322, 5852, 13, 4706, 3692, 304, 6492, 3407, 1591, 13, 1678, 584, 3207, 29901, 4078, 29918, 2084, 29901, 851, 29892, 2322, 6213, 13, 4706, 851, 29892, 278, 2224, 310, 1967, 7160, 13, 1678, 584, 2457, 29901, 4489, 29918, 999, 29918, 2371, 29901, 3630, 4308, 29892, 281, 7297, 3407, 1591, 13, 1678, 9995, 13, 1678, 1375, 29918, 27736, 29918, 262, 29918, 2109, 353, 938, 29898, 2176, 29918, 6207, 29889, 12181, 29961, 29900, 29962, 334, 1375, 29918, 7728, 29918, 262, 29918, 2109, 29897, 13, 1678, 18031, 353, 10518, 29889, 29883, 1883, 29256, 29898, 2176, 29918, 6207, 29961, 1707, 29918, 978, 1402, 4489, 29918, 6207, 29961, 5182, 14664, 5589, 1056, 29898, 1767, 29922, 29900, 467, 12071, 29918, 2248, 29898, 8865, 29922, 8824, 29897, 13, 1678, 18031, 1839, 7827, 2033, 353, 18031, 29961, 29896, 29962, 718, 18031, 29961, 29900, 29962, 13, 1678, 396, 2380, 363, 1269, 9016, 13, 1678, 18031, 1839, 2109, 2033, 353, 5519, 29875, 29962, 363, 474, 297, 18031, 29889, 2248, 29962, 13, 1678, 18031, 29889, 13099, 353, 6024, 1767, 742, 525, 29900, 742, 525, 29896, 742, 525, 7827, 742, 525, 2109, 2033, 13, 1678, 396, 5706, 263, 10417, 9657, 310, 2380, 322, 1855, 995, 13, 1678, 2910, 29918, 8977, 353, 9657, 29898, 7554, 29898, 6289, 29889, 2248, 29892, 18031, 1839, 1767, 25901, 13, 13, 1678, 396, 3692, 304, 1925, 4567, 995, 964, 263, 2323, 9016, 13, 1678, 565, 4567, 29918, 1767, 338, 451, 6213, 29901, 13, 4706, 18031, 29918, 9894, 353, 18031, 29961, 6289, 1839, 1767, 2033, 1275, 4567, 29918, 1767, 1822, 8552, 580, 13, 4706, 18031, 353, 18031, 29961, 6289, 1839, 1767, 2033, 2804, 4567, 29918, 1767, 29962, 13, 13, 1678, 396, 2656, 278, 9016, 1797, 491, 2159, 310, 11916, 297, 1269, 9016, 13, 1678, 18031, 353, 18031, 29889, 6605, 29918, 5975, 29898, 1609, 29922, 1839, 7827, 7464, 12066, 2548, 29922, 5574, 29897, 13, 13, 1678, 396, 10366, 289, 1144, 411, 2319, 2159, 310, 11916, 13, 1678, 22645, 29918, 9278, 29918, 2109, 353, 1051, 29898, 6289, 29961, 6289, 1839, 7827, 2033, 529, 1375, 29918, 27736, 29918, 2344, 1822, 2248, 29897, 13, 13, 1678, 565, 7431, 29898, 13140, 29918, 9278, 29918, 2109, 29897, 6736, 29871, 29906, 29901, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 9278, 29918, 2109, 29961, 29900, 1402, 6024, 29900, 742, 525, 29896, 2033, 29962, 353, 18031, 29889, 2029, 29961, 13140, 29918, 9278, 29918, 2109, 29892, 6024, 29900, 742, 525, 29896, 2033, 1822, 2083, 580, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 9278, 29918, 2109, 29961, 29900, 1402, 525, 7827, 2033, 353, 18031, 29889, 2029, 29961, 13140, 29918, 9278, 29918, 2109, 29892, 525, 7827, 13359, 2083, 580, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 9278, 29918, 2109, 29961, 29900, 1402, 525, 2109, 2033, 353, 22645, 29918, 9278, 29918, 2109, 13, 4706, 18031, 353, 18031, 29889, 8865, 29898, 13140, 29918, 9278, 29918, 2109, 29961, 29896, 29901, 1402, 9685, 29922, 29900, 29897, 13, 13, 1678, 396, 8147, 3646, 6554, 363, 1269, 9016, 13, 1678, 18031, 1839, 5182, 29918, 2273, 2033, 353, 18031, 1839, 29896, 2033, 847, 313, 6289, 1839, 29900, 2033, 718, 18031, 1839, 29896, 11287, 13, 1678, 396, 2656, 1797, 491, 3646, 6554, 310, 1269, 9016, 13, 1678, 18031, 353, 18031, 29889, 6605, 29918, 5975, 29898, 1609, 2433, 5182, 29918, 2273, 742, 12066, 2548, 29922, 5574, 29897, 13, 13, 1678, 396, 8147, 18558, 995, 310, 1023, 20114, 289, 1144, 13, 1678, 521, 275, 29939, 353, 5159, 13, 13, 1678, 363, 474, 297, 3464, 29898, 6289, 29889, 12181, 29961, 29900, 29962, 448, 29871, 29896, 1125, 13, 4706, 396, 694, 1144, 27988, 10772, 29933, 9972, 2451, 13, 4706, 1018, 29901, 13, 9651, 521, 275, 29939, 29889, 4397, 29898, 4161, 29906, 29918, 535, 1259, 3819, 29898, 6289, 29889, 309, 542, 8999, 29875, 29892, 474, 718, 29871, 29896, 1402, 518, 29896, 29892, 29871, 29906, 24960, 29961, 29900, 2314, 13, 4706, 5174, 8960, 29901, 13, 9651, 521, 275, 29939, 29889, 4397, 29898, 4161, 29906, 29918, 535, 1259, 3819, 29898, 6289, 29889, 309, 542, 8999, 29875, 29892, 474, 718, 29871, 29896, 1402, 518, 29900, 29892, 29871, 29896, 24960, 29961, 29900, 2314, 13, 13, 1678, 521, 275, 29939, 29889, 4397, 29898, 29929, 29929, 29929, 29929, 29929, 29929, 29929, 29889, 29900, 29897, 13, 1678, 18031, 1839, 305, 275, 29939, 2033, 353, 521, 275, 29939, 13, 13, 1678, 396, 2425, 310, 2778, 3460, 1023, 20114, 289, 1144, 29892, 337, 15807, 403, 18558, 995, 310, 3517, 322, 2678, 9016, 13, 1678, 18031, 29918, 13140, 29918, 1761, 353, 1051, 29898, 6289, 29889, 2248, 29897, 13, 13, 1678, 1550, 313, 6289, 29889, 12181, 29961, 29900, 29962, 1405, 4236, 29918, 29890, 1144, 29897, 891, 313, 6289, 29889, 305, 275, 29939, 29889, 1195, 580, 5277, 4560, 2272, 29889, 16202, 29889, 4161, 29906, 29889, 407, 29888, 29898, 29900, 29889, 29929, 29945, 29892, 29871, 29896, 22164, 13, 4706, 413, 353, 18031, 29918, 13140, 29918, 1761, 29889, 2248, 29898, 6289, 1839, 305, 275, 29939, 13359, 13140, 1195, 3101, 13, 4706, 18031, 353, 4770, 14634, 2109, 29898, 6289, 29892, 22645, 29918, 1761, 29922, 6289, 29918, 13140, 29918, 1761, 29892, 22645, 29922, 29895, 29892, 722, 29918, 1853, 2433, 29883, 20440, 936, 1495, 13, 13, 1678, 396, 4046, 2159, 310, 11916, 363, 1269, 9016, 13, 1678, 1550, 313, 6289, 1839, 7827, 13359, 1195, 580, 529, 1375, 29918, 27736, 29918, 262, 29918, 2109, 29897, 669, 313, 6289, 29889, 12181, 29961, 29900, 29962, 1405, 29871, 29906, 1125, 13, 4706, 396, 1284, 278, 9016, 411, 9212, 2159, 310, 11916, 13, 4706, 413, 353, 18031, 29918, 13140, 29918, 1761, 29889, 2248, 29898, 6289, 1839, 7827, 13359, 13140, 1195, 3101, 13, 13, 4706, 565, 313, 29895, 1275, 7431, 29898, 6289, 29918, 13140, 29918, 1761, 29897, 448, 29871, 29896, 29897, 891, 313, 6289, 29889, 2029, 29961, 6289, 29918, 13140, 29918, 1761, 29961, 29895, 1402, 525, 305, 275, 29939, 2033, 1405, 18031, 29889, 2029, 29961, 6289, 29918, 13140, 29918, 1761, 29961, 29895, 448, 29871, 29896, 1402, 525, 305, 275, 29939, 2033, 1125, 13, 9651, 413, 22361, 29871, 29896, 13, 13, 4706, 18031, 353, 4770, 14634, 2109, 29898, 6289, 29892, 22645, 29918, 1761, 29922, 6289, 29918, 13140, 29918, 1761, 29892, 22645, 29922, 29895, 29892, 722, 29918, 1853, 2433, 29883, 20440, 936, 1495, 13, 13, 1678, 396, 5706, 3407, 1591, 13, 1678, 565, 4567, 29918, 1767, 338, 451, 6213, 29901, 13, 4706, 18031, 353, 10518, 29889, 17685, 4197, 6289, 29918, 9894, 29892, 18031, 2314, 13, 13, 1678, 18031, 353, 18031, 29889, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 1678, 18031, 1839, 2109, 2033, 353, 18031, 1839, 2109, 13359, 7302, 29898, 2892, 921, 29901, 4770, 1767, 29918, 4352, 29898, 1958, 29918, 8977, 29892, 921, 876, 29871, 396, 29871, 30998, 31836, 31674, 31994, 30667, 30494, 31462, 31180, 30667, 30346, 30210, 30683, 30959, 13, 1678, 18031, 1839, 2109, 2033, 353, 18031, 1839, 2109, 13359, 7302, 29898, 2892, 921, 29901, 11297, 29900, 29900, 29896, 4286, 7122, 29898, 29916, 876, 29871, 396, 29871, 30406, 31141, 233, 177, 141, 31277, 30850, 12764, 29900, 29900, 29896, 29915, 233, 142, 191, 31092, 1767, 30214, 236, 155, 181, 31981, 30544, 31424, 1767, 30275, 30417, 31062, 30940, 31277, 30850, 13, 1678, 4489, 29918, 999, 29918, 2371, 353, 5706, 29918, 5679, 29898, 6289, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 722, 29918, 1853, 2433, 29883, 20440, 936, 1495, 13, 13, 1678, 396, 6492, 1259, 13, 1678, 565, 304, 29918, 5317, 29901, 13, 4706, 6492, 29918, 5679, 29898, 2176, 29918, 999, 29918, 2371, 29892, 4078, 29918, 2084, 29922, 7620, 29918, 2084, 29897, 13, 13, 1678, 736, 4489, 29918, 999, 29918, 2371, 13, 13, 13, 1753, 6635, 827, 29872, 29918, 2156, 2109, 1076, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 29892, 3646, 29922, 8516, 29892, 289, 1144, 29922, 8516, 29892, 304, 29918, 5317, 29922, 5574, 29892, 4078, 29918, 2084, 29922, 8516, 1125, 13, 1678, 9995, 29907, 329, 289, 1144, 310, 11608, 936, 3651, 5034, 304, 6790, 5700, 3291, 29892, 322, 8147, 281, 7297, 29892, 20444, 995, 13, 13, 1678, 584, 3207, 29901, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 29901, 722, 29918, 978, 29901, 851, 13, 1678, 584, 3207, 29901, 3646, 29901, 851, 13, 1678, 584, 3207, 29901, 289, 1144, 29901, 1051, 13, 4706, 6865, 310, 27270, 29892, 8087, 29889, 518, 1839, 31120, 30275, 742, 525, 30528, 30275, 7464, 6024, 30257, 31756, 742, 525, 30346, 31030, 742, 525, 234, 164, 152, 30927, 31367, 31455, 30486, 7464, 6024, 31196, 30927, 31367, 31455, 30486, 2033, 29962, 13, 1678, 584, 3207, 29901, 304, 29918, 5317, 29901, 6120, 29892, 2322, 5852, 13, 4706, 3692, 304, 6492, 3407, 1591, 13, 1678, 584, 3207, 29901, 4078, 29918, 2084, 29901, 851, 29892, 278, 2224, 310, 1967, 7160, 13, 1678, 584, 2457, 29901, 4489, 29918, 999, 29918, 2371, 29901, 3630, 4308, 29892, 281, 7297, 3407, 1591, 13, 1678, 9995, 13, 1678, 5412, 29918, 5975, 353, 731, 29898, 2083, 29898, 29890, 1144, 29892, 5159, 876, 13, 13, 1678, 565, 7431, 29898, 13092, 29918, 5975, 29897, 2804, 7431, 29898, 2083, 29898, 29890, 1144, 29892, 5159, 22164, 13, 4706, 12020, 7865, 2392, 877, 1917, 338, 21159, 3321, 29892, 3113, 1423, 289, 1144, 338, 1959, 1495, 13, 13, 1678, 18031, 353, 10518, 29889, 29883, 1883, 29256, 29898, 2176, 29918, 6207, 29961, 1707, 29918, 978, 1402, 4489, 29918, 6207, 29961, 5182, 14664, 5589, 1056, 29898, 1767, 29922, 29900, 467, 12071, 29918, 2248, 29898, 8865, 29922, 8824, 29897, 13, 1678, 18031, 1839, 7827, 2033, 353, 18031, 29961, 29896, 29962, 718, 18031, 29961, 29900, 29962, 13, 1678, 18031, 29889, 13099, 353, 6024, 2109, 742, 525, 29900, 742, 525, 29896, 742, 525, 7827, 2033, 13, 13, 1678, 396, 5700, 289, 1144, 5034, 304, 278, 6790, 1158, 13, 1678, 363, 9016, 297, 289, 1144, 29901, 13, 4706, 22645, 29918, 1761, 353, 5159, 13, 13, 4706, 363, 995, 297, 9016, 29901, 13, 9651, 22645, 29918, 1761, 29889, 4397, 29898, 524, 29898, 6289, 29961, 6289, 1839, 2109, 2033, 1275, 995, 1822, 2248, 29889, 5975, 876, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 29900, 1402, 6024, 29900, 742, 525, 29896, 2033, 29962, 353, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29892, 6024, 29900, 742, 525, 29896, 2033, 1822, 2083, 580, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 29900, 1402, 525, 7827, 2033, 353, 18031, 29889, 2029, 29961, 13140, 29918, 1761, 29892, 525, 7827, 13359, 2083, 580, 13, 4706, 18031, 29889, 271, 29961, 13140, 29918, 1761, 29961, 29900, 1402, 525, 2109, 2033, 353, 9016, 13, 4706, 18031, 353, 18031, 29889, 8865, 29898, 13140, 29918, 1761, 29961, 29896, 29901, 1402, 9685, 29922, 29900, 29897, 13, 13, 1678, 18031, 353, 18031, 29889, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 13, 1678, 396, 5706, 3407, 1591, 13, 1678, 18031, 1839, 2109, 2033, 353, 18031, 1839, 2109, 13359, 7302, 29898, 2892, 921, 29901, 11297, 29900, 29900, 29896, 4286, 7122, 29898, 29916, 876, 29871, 396, 29871, 30406, 31141, 233, 177, 141, 31277, 30850, 12764, 29900, 29900, 29896, 29915, 233, 142, 191, 31092, 1767, 30214, 236, 155, 181, 31981, 30544, 31424, 1767, 30275, 30417, 31062, 30940, 31277, 30850, 13, 1678, 4489, 29918, 999, 29918, 2371, 353, 5706, 29918, 5679, 29898, 6289, 29892, 722, 29918, 978, 29922, 1707, 29918, 978, 29892, 722, 29918, 1853, 2433, 29883, 20440, 936, 1495, 13, 13, 1678, 396, 6492, 1259, 13, 1678, 565, 304, 29918, 5317, 29901, 13, 4706, 6492, 29918, 5679, 29898, 2176, 29918, 999, 29918, 2371, 29892, 4078, 29918, 2084, 29922, 7620, 29918, 2084, 29897, 13, 13, 1678, 736, 4489, 29918, 999, 29918, 2371, 13, 13, 13, 1753, 4770, 710, 29918, 13441, 29898, 29916, 1125, 13, 1678, 9995, 15738, 4072, 310, 2286, 964, 851, 13, 13, 1678, 584, 3207, 921, 29901, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 565, 1134, 29898, 29916, 29897, 297, 518, 524, 29892, 5785, 29892, 7442, 29889, 7411, 29953, 29946, 5387, 13, 4706, 736, 851, 29898, 524, 29898, 29916, 876, 13, 1678, 25342, 1134, 29898, 29916, 29897, 338, 851, 29901, 13, 4706, 736, 921, 13, 1678, 1683, 29901, 13, 4706, 736, 921, 13, 13, 13, 1753, 4770, 5060, 487, 29918, 1761, 29898, 29879, 29922, 8516, 29892, 995, 29918, 1853, 29922, 8516, 1125, 13, 1678, 9995, 15078, 487, 1051, 411, 851, 3402, 964, 2441, 1051, 13, 4706, 8087, 11283, 29961, 29896, 29892, 29871, 29906, 29962, 29915, 10309, 518, 29896, 29892, 29906, 29962, 13, 13, 1678, 584, 3207, 269, 29901, 851, 29892, 817, 304, 23119, 13, 1678, 584, 3207, 995, 29918, 1853, 29901, 851, 29892, 3987, 6024, 8058, 936, 742, 525, 29883, 20440, 936, 2033, 13, 4706, 1134, 310, 995, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 1678, 565, 995, 29918, 1853, 1275, 525, 8058, 936, 2396, 13, 4706, 736, 518, 9302, 29889, 7411, 29898, 29875, 29889, 17010, 877, 2636, 525, 876, 363, 474, 297, 269, 29889, 5451, 29317, 1495, 29962, 13, 1678, 25342, 995, 29918, 1853, 1275, 525, 29883, 20440, 936, 2396, 13, 4706, 736, 269, 29889, 5451, 28909, 29900, 29900, 29896, 1495, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 877, 29956, 29373, 995, 1134, 29991, 1495, 13, 13, 13, 1753, 4770, 11023, 20401, 29898, 1767, 29922, 8516, 29892, 2910, 29918, 8977, 29922, 8516, 1125, 13, 1678, 9995, 12542, 6590, 281, 7297, 995, 310, 278, 2286, 13, 13, 1678, 584, 3207, 995, 29901, 851, 29892, 13, 1678, 584, 3207, 2910, 29918, 8977, 29901, 9657, 29892, 10417, 9657, 13, 1678, 584, 2457, 29901, 281, 7297, 29918, 1767, 29901, 5785, 29892, 281, 7297, 995, 13, 1678, 9995, 13, 1678, 565, 995, 297, 2910, 29918, 8977, 29889, 8149, 7295, 13, 4706, 281, 7297, 29918, 1767, 353, 2910, 29918, 8977, 29961, 1767, 29962, 13, 1678, 1683, 29901, 13, 4706, 281, 7297, 29918, 1767, 353, 29871, 29900, 29889, 29900, 13, 13, 1678, 736, 281, 7297, 29918, 1767, 13, 13, 13, 1753, 954, 827, 29872, 29918, 7302, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 2143, 29918, 2371, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 1125, 13, 1678, 9995, 20083, 2441, 995, 411, 281, 7297, 995, 363, 2323, 16259, 2286, 13, 1678, 565, 421, 2109, 29918, 27728, 29961, 29875, 29962, 29871, 30248, 1060, 29871, 242, 191, 159, 9016, 29918, 431, 29961, 29875, 7961, 338, 5870, 29892, 5191, 1060, 411, 421, 999, 29918, 1767, 29961, 29875, 7961, 13, 13, 1678, 584, 3207, 29901, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 29901, 2143, 29918, 2371, 29901, 3630, 4308, 29892, 3407, 1591, 13, 1678, 584, 3207, 29901, 722, 29918, 978, 29901, 851, 29892, 2286, 1024, 13, 1678, 9995, 13, 1678, 7292, 353, 2143, 29918, 2371, 1839, 9037, 29918, 1917, 13359, 7302, 29898, 2892, 921, 29901, 4770, 5060, 487, 29918, 1761, 29898, 29916, 29892, 525, 8058, 936, 1495, 467, 5975, 13, 1678, 396, 9212, 13, 1678, 9016, 29918, 27728, 353, 7442, 29889, 294, 2378, 4197, 29875, 29961, 29900, 29962, 363, 474, 297, 7292, 14664, 690, 14443, 3552, 29896, 29892, 448, 29896, 876, 29871, 396, 9016, 30210, 30557, 30967, 13, 1678, 9016, 29918, 27728, 29961, 29900, 3816, 29900, 29962, 353, 448, 9302, 29889, 797, 4951, 537, 29871, 396, 29871, 233, 141, 141, 30622, 30287, 30502, 2109, 30210, 30557, 30967, 233, 158, 194, 31640, 30494, 235, 183, 162, 31352, 234, 172, 186, 13, 1678, 2967, 29918, 827, 29872, 353, 2143, 29918, 2371, 1839, 5620, 29918, 1917, 13359, 309, 542, 29961, 29900, 29962, 29871, 396, 29871, 30683, 30622, 30287, 30502, 30959, 30732, 30573, 6500, 5570, 13, 1678, 921, 353, 313, 2176, 29918, 6207, 29961, 1707, 29918, 978, 1822, 5975, 29889, 690, 14443, 3552, 29899, 29896, 29892, 29871, 29896, 876, 6736, 9016, 29918, 27728, 29897, 334, 29871, 29896, 29889, 29900, 13, 1678, 281, 353, 2143, 29918, 2371, 1839, 5620, 29918, 1917, 13359, 12765, 29898, 19145, 29879, 29922, 29896, 467, 5589, 1056, 29898, 3188, 29918, 827, 29872, 467, 5975, 29871, 396, 29871, 31174, 30448, 29896, 236, 155, 185, 232, 186, 177, 30748, 13, 1678, 4489, 29918, 6207, 1839, 29876, 827, 29872, 29918, 29915, 718, 722, 29918, 978, 29962, 353, 7442, 29889, 6333, 29898, 29916, 29892, 281, 29897, 13, 13, 13, 1753, 6635, 827, 29872, 29918, 7302, 29898, 2176, 29918, 6207, 29922, 8516, 29892, 2143, 29918, 2371, 29922, 8516, 29892, 722, 29918, 978, 29922, 8516, 1125, 13, 1678, 9995, 20083, 2441, 995, 411, 281, 7297, 995, 363, 2323, 11608, 936, 2286, 13, 13, 1678, 584, 3207, 29901, 4489, 29918, 6207, 29901, 3630, 4308, 13, 1678, 584, 3207, 29901, 2143, 29918, 2371, 29901, 3630, 4308, 29892, 3407, 1591, 13, 1678, 584, 3207, 29901, 722, 29918, 978, 29901, 851, 29892, 2286, 1024, 13, 1678, 9995, 13, 1678, 722, 29918, 1767, 353, 2143, 29918, 2371, 1839, 9037, 29918, 1917, 13359, 7302, 29898, 2892, 921, 29901, 4770, 5060, 487, 29918, 1761, 29898, 29916, 29892, 525, 29883, 20440, 936, 1495, 467, 5975, 13, 1678, 4489, 29918, 6207, 29961, 1707, 29918, 978, 29962, 353, 4489, 29918, 6207, 29961, 1707, 29918, 978, 1822, 7302, 29898, 2892, 921, 29901, 4770, 710, 29918, 13441, 29898, 29916, 876, 13, 13, 1678, 396, 2048, 263, 9657, 310, 1819, 13, 1678, 995, 29918, 1761, 353, 5159, 13, 1678, 2143, 29918, 1767, 29918, 1761, 353, 5159, 13, 13, 1678, 363, 474, 29892, 24471, 297, 26985, 29898, 1707, 29918, 1767, 1125, 13, 4706, 995, 29918, 1761, 4619, 24471, 13, 4706, 2143, 29918, 1767, 29918, 1761, 4619, 518, 999, 29918, 2371, 1839, 5620, 29918, 1917, 13359, 309, 542, 29961, 29875, 5262, 334, 7431, 29898, 20155, 29897, 13, 13, 1678, 995, 29918, 8977, 353, 9657, 29898, 7554, 29898, 1767, 29918, 1761, 29892, 2143, 29918, 1767, 29918, 1761, 876, 13, 1678, 4489, 29918, 6207, 1839, 29883, 827, 29872, 29918, 29915, 718, 722, 29918, 978, 29962, 353, 4489, 29918, 6207, 29961, 1707, 29918, 978, 1822, 7302, 29898, 2892, 921, 29901, 4770, 11023, 20401, 29898, 29916, 29892, 995, 29918, 8977, 876, 13, 13, 13, 1753, 8879, 406, 29888, 29918, 1025, 29906, 1482, 29898, 999, 29918, 827, 29872, 29922, 8516, 1125, 13, 1678, 9995, 20083, 2030, 281, 7297, 3407, 1591, 411, 278, 716, 13, 13, 1678, 584, 3207, 2143, 29918, 827, 29872, 29901, 3630, 4308, 13, 4706, 2030, 281, 7297, 3407, 1591, 13, 1678, 584, 2457, 29901, 2143, 29918, 1482, 29918, 827, 29872, 29901, 3630, 4308, 13, 4706, 716, 281, 7297, 3407, 1591, 13, 1678, 9995, 13, 1678, 2143, 29918, 827, 29872, 29918, 8552, 353, 2143, 29918, 827, 29872, 29889, 8552, 580, 13, 1678, 2143, 29918, 827, 29872, 29918, 8552, 353, 2143, 29918, 827, 29872, 29918, 8552, 29889, 2029, 29961, 999, 29918, 827, 29872, 29918, 8552, 1839, 9037, 29918, 1917, 2033, 2804, 525, 3188, 2033, 13, 1678, 2143, 29918, 827, 29872, 29918, 8552, 1839, 11536, 2033, 353, 2143, 29918, 827, 29872, 29918, 8552, 1839, 3981, 29918, 29900, 2033, 718, 2143, 29918, 827, 29872, 29918, 8552, 1839, 3981, 29918, 29896, 2033, 13, 1678, 2143, 29918, 827, 29872, 29918, 8552, 353, 2143, 29918, 827, 29872, 29918, 8552, 29889, 1267, 420, 29898, 13099, 3790, 29915, 29934, 20819, 29918, 29896, 2396, 525, 8667, 29918, 19907, 742, 525, 29934, 20819, 29918, 3596, 2396, 525, 1184, 637, 291, 29915, 1800, 13, 1678, 2143, 29918, 827, 29872, 29918, 8552, 1839, 9037, 29918, 1917, 2033, 353, 2143, 29918, 827, 29872, 29918, 8552, 1839, 9037, 29918, 1917, 13359, 7302, 29898, 2892, 921, 29901, 851, 29898, 29916, 467, 5451, 877, 29918, 8785, 13, 13, 1678, 2143, 29918, 1482, 29918, 827, 29872, 353, 2143, 29918, 827, 29872, 29918, 8552, 29889, 27789, 18959, 9037, 29918, 1170, 742, 525, 9037, 29918, 1542, 742, 525, 5667, 742, 525, 5620, 29918, 1917, 7464, 408, 29918, 2248, 29922, 8824, 29892, 1723, 320, 13, 4706, 869, 16170, 3319, 29915, 9037, 29918, 1917, 2396, 525, 2083, 742, 525, 3981, 29918, 29900, 2396, 525, 2083, 742, 525, 3981, 29918, 29896, 2396, 525, 2083, 742, 525, 11536, 2396, 525, 2083, 742, 525, 1184, 637, 291, 2396, 525, 2083, 742, 5615, 13, 13, 1678, 2143, 29918, 1482, 29918, 827, 29872, 1839, 8667, 29918, 19907, 2033, 353, 2143, 29918, 1482, 29918, 827, 29872, 1839, 3981, 29918, 29896, 2033, 847, 2143, 29918, 1482, 29918, 827, 29872, 1839, 11536, 2033, 13, 13, 1678, 2143, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1917, 13359, 2029, 29961, 999, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1542, 2033, 1275, 525, 29883, 20440, 936, 2033, 353, 2143, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1917, 13359, 2029, 29961, 13, 4706, 2143, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1542, 2033, 1275, 525, 29883, 20440, 936, 13359, 7302, 29898, 2892, 921, 29901, 6634, 29900, 29900, 29896, 1642, 7122, 29898, 29916, 876, 13, 13, 1678, 2143, 29918, 1482, 29918, 827, 29872, 1839, 29933, 262, 29918, 3782, 2033, 353, 2143, 29918, 1482, 29918, 827, 29872, 29961, 1839, 9037, 29918, 1170, 742, 525, 5620, 29918, 1917, 2033, 1822, 27789, 18959, 9037, 29918, 1170, 2033, 467, 10003, 29898, 5696, 2433, 1145, 344, 742, 13, 462, 462, 462, 462, 462, 795, 12066, 2548, 29922, 5574, 29897, 13, 1678, 2143, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1917, 2033, 353, 2143, 29918, 1482, 29918, 827, 29872, 1839, 9037, 29918, 1917, 13359, 7302, 29898, 2892, 921, 29901, 851, 29898, 29916, 467, 6506, 703, 29915, 613, 5124, 876, 13, 13, 1678, 736, 2143, 29918, 1482, 29918, 827, 29872, 13, 13, 13, 1753, 20444, 29918, 21111, 29898, 827, 29872, 29918, 999, 29922, 8516, 29892, 4078, 29918, 2084, 29922, 8516, 1125, 13, 1678, 9995, 5647, 1461, 20444, 995, 5034, 304, 281, 7297, 3407, 1591, 29892, 1797, 491, 5153, 13, 13, 1678, 584, 3207, 281, 7297, 29918, 999, 29901, 3630, 4308, 13, 4706, 281, 7297, 3407, 1591, 13, 1678, 584, 3207, 4078, 29918, 2084, 29901, 851, 29892, 2322, 6213, 13, 4706, 278, 2224, 310, 11799, 934, 7160, 13, 1678, 584, 2457, 29901, 4489, 29918, 440, 29901, 3630, 4308, 13, 1678, 9995, 13, 1678, 20444, 353, 5159, 13, 13, 1678, 363, 722, 297, 281, 7297, 29918, 999, 29889, 9037, 29918, 1170, 29889, 13092, 7295, 13, 4706, 20444, 29889, 4397, 4197, 1707, 29892, 281, 7297, 29918, 999, 1839, 5667, 2033, 29961, 827, 29872, 29918, 999, 1839, 9037, 29918, 1170, 2033, 1275, 722, 1822, 309, 542, 29961, 29900, 24960, 13, 13, 1678, 4489, 29918, 440, 353, 10518, 29889, 17271, 29898, 440, 29892, 4341, 29922, 1839, 9037, 29918, 1170, 742, 525, 5667, 11287, 13, 1678, 4489, 29918, 440, 353, 4489, 29918, 440, 29889, 6605, 29918, 5975, 29898, 1609, 2433, 5667, 742, 12066, 2548, 29922, 8824, 29897, 13, 13, 1678, 565, 451, 4078, 29918, 2084, 29901, 13, 4706, 4489, 29918, 440, 29889, 517, 29918, 7638, 29898, 7620, 29918, 2084, 29892, 2380, 29922, 8824, 29897, 13, 13, 1678, 736, 4489, 29918, 440, 13, 13, 13, 1753, 5191, 29918, 1707, 29918, 827, 29872, 29918, 999, 29898, 827, 29872, 29918, 999, 29918, 497, 29922, 8516, 29892, 281, 7297, 29918, 999, 29918, 1707, 29922, 8516, 1125, 13, 1678, 9995, 20083, 278, 6790, 3407, 1591, 310, 2286, 297, 599, 411, 278, 716, 13, 13, 1678, 584, 3207, 29901, 281, 7297, 29918, 999, 29918, 497, 29901, 3630, 4308, 13, 4706, 3407, 6131, 310, 599, 3651, 13, 1678, 584, 3207, 29901, 281, 7297, 29918, 999, 29918, 1707, 29901, 3630, 4308, 13, 4706, 3407, 1591, 310, 278, 6790, 2286, 13, 1678, 584, 2457, 29901, 281, 7297, 29918, 999, 29918, 1482, 29901, 3630, 4308, 13, 4706, 716, 3407, 1591, 13, 1678, 9995, 13, 1678, 5191, 29918, 1707, 353, 281, 7297, 29918, 999, 29918, 1707, 1839, 9037, 29918, 1170, 13359, 13092, 580, 29961, 29900, 29962, 13, 1678, 281, 7297, 29918, 999, 29918, 1482, 353, 281, 7297, 29918, 999, 29918, 497, 29889, 2029, 29961, 827, 29872, 29918, 999, 29918, 497, 1839, 9037, 29918, 1170, 2033, 2804, 5191, 29918, 1707, 29892, 584, 1822, 8552, 580, 13, 1678, 281, 7297, 29918, 999, 29918, 1482, 353, 10518, 29889, 17685, 4197, 827, 29872, 29918, 999, 29918, 1482, 29892, 281, 7297, 29918, 999, 29918, 1707, 1402, 9685, 29922, 29900, 29892, 11455, 29918, 2248, 29922, 5574, 29897, 13, 13, 1678, 736, 281, 7297, 29918, 999, 29918, 1482, 13, 13, 13, 1753, 4078, 29918, 29886, 10373, 29918, 262, 29918, 24633, 29898, 1445, 29918, 978, 29922, 8516, 29892, 10153, 29918, 2029, 29922, 8516, 29892, 722, 29918, 1761, 29922, 8516, 29892, 4341, 29918, 1949, 29922, 29896, 29892, 10153, 29918, 5727, 29922, 29906, 29900, 29892, 9869, 29918, 978, 2433, 8346, 29374, 13, 1678, 9995, 11371, 278, 1967, 297, 10616, 13, 13, 1678, 584, 3207, 934, 29918, 978, 29901, 851, 29892, 2322, 921, 3137, 29916, 3402, 13, 1678, 584, 3207, 10153, 29918, 2029, 29901, 851, 29892, 2224, 310, 278, 1967, 13, 1678, 584, 3207, 722, 29918, 1761, 29901, 1051, 29892, 2322, 6213, 13, 4706, 3651, 674, 7160, 297, 10616, 29892, 565, 6213, 29892, 674, 8297, 599, 4558, 297, 10616, 13, 1678, 584, 3207, 4341, 29918, 1949, 29901, 938, 29892, 2322, 29871, 29896, 13, 4706, 4341, 363, 278, 1967, 13, 1678, 584, 3207, 10153, 29918, 5727, 29901, 938, 29892, 2322, 29871, 29906, 29900, 13, 4706, 4206, 363, 278, 1967, 13, 1678, 584, 3207, 9869, 29918, 978, 30383, 710, 29892, 2322, 525, 8346, 29915, 13, 4706, 10616, 9869, 1024, 13, 1678, 584, 2457, 29901, 13, 1678, 9995, 13, 13, 1678, 565, 451, 10153, 29918, 2029, 29889, 1975, 2541, 11219, 29374, 13, 4706, 10153, 29918, 2029, 353, 10153, 29918, 2029, 718, 8207, 29915, 13, 13, 1678, 3143, 353, 921, 3137, 29916, 13236, 29889, 26501, 29898, 1445, 29918, 978, 29897, 13, 1678, 9869, 353, 3143, 29889, 1202, 29918, 1287, 9855, 29898, 9855, 29918, 978, 29897, 13, 13, 1678, 396, 5706, 263, 1051, 310, 4558, 13, 1678, 565, 722, 29918, 1761, 338, 451, 6213, 29901, 13, 4706, 10153, 29918, 1761, 353, 6024, 29912, 29900, 1836, 2732, 4286, 4830, 29898, 1707, 29897, 363, 722, 297, 722, 29918, 1761, 29962, 13, 1678, 1683, 29901, 13, 4706, 10153, 29918, 1761, 353, 518, 2492, 363, 10153, 297, 2897, 29889, 1761, 3972, 29898, 2492, 29918, 2029, 29897, 565, 10153, 29889, 5451, 17350, 1159, 14352, 29896, 29962, 297, 6024, 6173, 742, 525, 2732, 742, 525, 29890, 1526, 2033, 29962, 13, 13, 1678, 10153, 29918, 1761, 29889, 6605, 29898, 24244, 29922, 5574, 29897, 13, 13, 1678, 396, 1051, 310, 319, 448, 796, 13, 1678, 4423, 29918, 1761, 353, 518, 29875, 363, 474, 297, 1347, 29889, 294, 18869, 29918, 21064, 4878, 29962, 13, 13, 1678, 363, 474, 29892, 10153, 297, 14319, 29898, 3881, 29898, 2435, 29898, 2492, 29918, 1761, 8243, 10153, 29918, 1761, 1125, 13, 4706, 4423, 29918, 29916, 353, 4423, 29918, 1761, 15625, 29875, 1273, 4341, 29918, 1949, 29897, 334, 29871, 29906, 718, 29871, 29896, 29962, 13, 13, 4706, 565, 474, 529, 4341, 29918, 1949, 29901, 13, 9651, 396, 731, 29871, 29929, 29900, 1756, 310, 2920, 13, 9651, 9869, 29889, 842, 29918, 4914, 877, 29912, 29900, 6177, 29912, 29900, 29913, 4286, 4830, 29898, 5479, 29918, 29916, 511, 29871, 29929, 29900, 29897, 13, 13, 4706, 4423, 29918, 29891, 353, 10153, 29918, 5727, 334, 313, 29875, 849, 4341, 29918, 1949, 29897, 718, 29871, 29896, 13, 4706, 9869, 29889, 3539, 877, 29912, 29900, 1157, 29896, 29913, 4286, 4830, 29898, 5479, 29918, 29916, 29892, 4423, 29918, 29891, 511, 10153, 29897, 13, 4706, 9869, 29889, 7851, 29918, 3027, 877, 29912, 29900, 1157, 29896, 29913, 4286, 4830, 29898, 5479, 29918, 29916, 29892, 4423, 29918, 29891, 718, 29871, 29896, 511, 10153, 29918, 2029, 718, 10153, 29892, 13, 462, 965, 3987, 3790, 29915, 29916, 29918, 7052, 2396, 29871, 29900, 29889, 29947, 29892, 525, 29891, 29918, 7052, 2396, 29871, 29900, 29889, 29947, 29947, 1800, 13, 1678, 3143, 29889, 5358, 580, 13, 2 ]
projects/SalsaNext/salsa/crf.py
Gorilla-Lab-SCUT/gorilla-3d
6
1617692
<gh_stars>1-10 #!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import gorilla import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class LocallyConnectedXYZLayer(nn.Module): def __init__(self, h: int, w: int, sigma: float, nclasses: int): super().__init__() # size of window self.h = h self.padh = h//2 self.w = w self.padw = w//2 assert(self.h % 2 == 1 and self.w % 2 == 1) # window must be odd self.sigma = sigma self.gauss_den = 2 * self.sigma**2 self.nclasses = nclasses def forward(self, xyz, softmax, mask): # softmax size N, C, H, W = softmax.shape # make sofmax zero everywhere input is invalid softmax = softmax * mask.unsqueeze(1).float() # get x,y,z for distance (shape N,1,H,W) x = xyz[:, 0].unsqueeze(1) y = xyz[:, 1].unsqueeze(1) z = xyz[:, 2].unsqueeze(1) # im2col in size of window of input (x,y,z separately) window_x = F.unfold(x, kernel_size=(self.h, self.w), padding=(self.padh, self.padw)) center_x = F.unfold(x, kernel_size=(1, 1), padding=(0, 0)) window_y = F.unfold(y, kernel_size=(self.h, self.w), padding=(self.padh, self.padw)) center_y = F.unfold(y, kernel_size=(1, 1), padding=(0, 0)) window_z = F.unfold(z, kernel_size=(self.h, self.w), padding=(self.padh, self.padw)) center_z = F.unfold(z, kernel_size=(1, 1), padding=(0, 0)) # sq distance to center (center distance is zero) unravel_dist2 = (window_x - center_x)**2 + \ (window_y - center_y)**2 + \ (window_z - center_z)**2 # weight input distance by gaussian weights unravel_gaussian = torch.exp(- unravel_dist2 / self.gauss_den) # im2col in size of window of softmax to reweight by gaussian weights from input cloned_softmax = softmax.clone() for i in range(self.nclasses): # get the softmax for this class c_softmax = softmax[:, i].unsqueeze(1) # unfold this class to weigh it by the proper gaussian weights unravel_softmax = F.unfold(c_softmax, kernel_size=(self.h, self.w), padding=(self.padh, self.padw)) unravel_w_softmax = unravel_softmax * unravel_gaussian # add dimenssion 1 to obtain the new softmax for this class unravel_added_softmax = unravel_w_softmax.sum(dim=1).unsqueeze(1) # fold it and put it in new tensor added_softmax = unravel_added_softmax.view(N, H, W) cloned_softmax[:, i] = added_softmax return cloned_softmax @gorilla.MODULES.register_module() class CRF(nn.Module): def __init__(self, nclasses: int, iter: int, height: int, width: int, xyz_coef: float, xyz_sigma: float): super().__init__() self.iter = torch.nn.Parameter(torch.tensor(iter), requires_grad=False) self.lcn_size = torch.nn.Parameter(torch.tensor([height, width]), requires_grad=False) self.xyz_coef = torch.nn.Parameter(torch.tensor(xyz_coef), requires_grad=False).float() self.xyz_sigma = torch.nn.Parameter(torch.tensor(xyz_sigma), requires_grad=False).float() self.nclasses = nclasses print("Using CRF!") # define layers here # compat init self.compat_kernel_init = np.reshape(np.ones((self.nclasses, self.nclasses)) - np.identity(self.nclasses), [self.nclasses, self.nclasses, 1, 1]) # bilateral compatibility matrixes self.compat_conv = nn.Conv2d(self.nclasses, self.nclasses, 1) self.compat_conv.weight = torch.nn.Parameter(torch.from_numpy( self.compat_kernel_init).float() * self.xyz_coef, requires_grad=True) # locally connected layer for message passing self.local_conn_xyz = LocallyConnectedXYZLayer(height, width, xyz_coef, self.nclasses) def forward(self, input, softmax, mask): # use xyz xyz = input[:, 1:4] # iteratively for iter in range(self.iter): # message passing as locally connected layer locally_connected = self.local_conn_xyz(xyz, softmax, mask) # reweigh with the 1x1 convolution reweight_softmax = self.compat_conv(locally_connected) # add the new values to the original softmax reweight_softmax = reweight_softmax + softmax # lastly, renormalize softmax = F.softmax(reweight_softmax, dim=1) return softmax
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 910, 934, 338, 10664, 491, 278, 365, 2965, 1430, 1660, 934, 297, 278, 3876, 310, 445, 2060, 29889, 13, 13, 5215, 330, 272, 2911, 13, 5215, 12655, 408, 7442, 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, 13, 1990, 5976, 635, 20971, 2954, 18454, 29999, 14420, 29898, 15755, 29889, 7355, 1125, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 13, 1669, 298, 29901, 938, 29892, 13, 1669, 281, 29901, 938, 29892, 13, 1669, 269, 2934, 29901, 5785, 29892, 13, 1669, 302, 13203, 29901, 938, 1125, 13, 1678, 2428, 2141, 1649, 2344, 1649, 580, 13, 1678, 396, 2159, 310, 3474, 13, 1678, 1583, 29889, 29882, 353, 298, 13, 1678, 1583, 29889, 8305, 29882, 353, 298, 458, 29906, 13, 1678, 1583, 29889, 29893, 353, 281, 13, 1678, 1583, 29889, 8305, 29893, 353, 281, 458, 29906, 13, 1678, 4974, 29898, 1311, 29889, 29882, 1273, 29871, 29906, 1275, 29871, 29896, 322, 1583, 29889, 29893, 1273, 29871, 29906, 1275, 29871, 29896, 29897, 29871, 396, 3474, 1818, 367, 7736, 13, 1678, 1583, 29889, 3754, 353, 269, 2934, 13, 1678, 1583, 29889, 29887, 11214, 29918, 1145, 353, 29871, 29906, 334, 1583, 29889, 3754, 1068, 29906, 13, 1678, 1583, 29889, 29876, 13203, 353, 302, 13203, 13, 13, 29871, 822, 6375, 29898, 1311, 29892, 921, 12339, 29892, 4964, 3317, 29892, 11105, 1125, 13, 1678, 396, 4964, 3317, 2159, 13, 1678, 405, 29892, 315, 29892, 379, 29892, 399, 353, 4964, 3317, 29889, 12181, 13, 13, 1678, 396, 1207, 577, 29888, 3317, 5225, 16978, 1881, 338, 8340, 13, 1678, 4964, 3317, 353, 4964, 3317, 334, 11105, 29889, 6948, 802, 29872, 911, 29898, 29896, 467, 7411, 580, 13, 13, 1678, 396, 679, 921, 29892, 29891, 29892, 29920, 363, 5418, 313, 12181, 405, 29892, 29896, 29892, 29950, 29892, 29956, 29897, 13, 1678, 921, 353, 921, 12339, 7503, 29892, 29871, 29900, 1822, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 1678, 343, 353, 921, 12339, 7503, 29892, 29871, 29896, 1822, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 1678, 503, 353, 921, 12339, 7503, 29892, 29871, 29906, 1822, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 13, 1678, 396, 527, 29906, 1054, 297, 2159, 310, 3474, 310, 1881, 313, 29916, 29892, 29891, 29892, 29920, 16949, 29897, 13, 1678, 3474, 29918, 29916, 353, 383, 29889, 348, 8771, 29898, 29916, 29892, 8466, 29918, 2311, 7607, 1311, 29889, 29882, 29892, 1583, 29889, 29893, 511, 13, 462, 4706, 7164, 7607, 1311, 29889, 8305, 29882, 29892, 1583, 29889, 8305, 29893, 876, 13, 1678, 4818, 29918, 29916, 353, 383, 29889, 348, 8771, 29898, 29916, 29892, 8466, 29918, 2311, 7607, 29896, 29892, 29871, 29896, 511, 13, 462, 4706, 7164, 7607, 29900, 29892, 29871, 29900, 876, 13, 1678, 3474, 29918, 29891, 353, 383, 29889, 348, 8771, 29898, 29891, 29892, 8466, 29918, 2311, 7607, 1311, 29889, 29882, 29892, 1583, 29889, 29893, 511, 13, 462, 4706, 7164, 7607, 1311, 29889, 8305, 29882, 29892, 1583, 29889, 8305, 29893, 876, 13, 1678, 4818, 29918, 29891, 353, 383, 29889, 348, 8771, 29898, 29891, 29892, 8466, 29918, 2311, 7607, 29896, 29892, 29871, 29896, 511, 13, 462, 4706, 7164, 7607, 29900, 29892, 29871, 29900, 876, 13, 1678, 3474, 29918, 29920, 353, 383, 29889, 348, 8771, 29898, 29920, 29892, 8466, 29918, 2311, 7607, 1311, 29889, 29882, 29892, 1583, 29889, 29893, 511, 13, 462, 4706, 7164, 7607, 1311, 29889, 8305, 29882, 29892, 1583, 29889, 8305, 29893, 876, 13, 1678, 4818, 29918, 29920, 353, 383, 29889, 348, 8771, 29898, 29920, 29892, 8466, 29918, 2311, 7607, 29896, 29892, 29871, 29896, 511, 13, 462, 4706, 7164, 7607, 29900, 29892, 29871, 29900, 876, 13, 13, 1678, 396, 18074, 5418, 304, 4818, 313, 5064, 5418, 338, 5225, 29897, 13, 1678, 443, 336, 955, 29918, 5721, 29906, 353, 313, 7165, 29918, 29916, 448, 4818, 29918, 29916, 29897, 1068, 29906, 718, 320, 13, 4706, 313, 7165, 29918, 29891, 448, 4818, 29918, 29891, 29897, 1068, 29906, 718, 320, 13, 4706, 313, 7165, 29918, 29920, 448, 4818, 29918, 29920, 29897, 1068, 29906, 13, 13, 1678, 396, 7688, 1881, 5418, 491, 330, 17019, 18177, 13, 1678, 443, 336, 955, 29918, 29887, 17019, 353, 4842, 305, 29889, 4548, 6278, 443, 336, 955, 29918, 5721, 29906, 847, 1583, 29889, 29887, 11214, 29918, 1145, 29897, 13, 13, 1678, 396, 527, 29906, 1054, 297, 2159, 310, 3474, 310, 4964, 3317, 304, 337, 7915, 491, 330, 17019, 18177, 515, 1881, 13, 1678, 1067, 22367, 29918, 2695, 3317, 353, 4964, 3317, 29889, 16513, 580, 13, 1678, 363, 474, 297, 3464, 29898, 1311, 29889, 29876, 13203, 1125, 13, 418, 396, 679, 278, 4964, 3317, 363, 445, 770, 13, 418, 274, 29918, 2695, 3317, 353, 4964, 3317, 7503, 29892, 474, 1822, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 418, 396, 20220, 445, 770, 304, 591, 1141, 372, 491, 278, 1571, 330, 17019, 18177, 13, 418, 443, 336, 955, 29918, 2695, 3317, 353, 383, 29889, 348, 8771, 29898, 29883, 29918, 2695, 3317, 29892, 13, 462, 462, 8466, 29918, 2311, 7607, 1311, 29889, 29882, 29892, 1583, 29889, 29893, 511, 13, 462, 462, 7164, 7607, 1311, 29889, 8305, 29882, 29892, 1583, 29889, 8305, 29893, 876, 13, 418, 443, 336, 955, 29918, 29893, 29918, 2695, 3317, 353, 443, 336, 955, 29918, 2695, 3317, 334, 443, 336, 955, 29918, 29887, 17019, 13, 418, 396, 788, 3964, 575, 29879, 291, 29871, 29896, 304, 4017, 278, 716, 4964, 3317, 363, 445, 770, 13, 418, 443, 336, 955, 29918, 23959, 29918, 2695, 3317, 353, 443, 336, 955, 29918, 29893, 29918, 2695, 3317, 29889, 2083, 29898, 6229, 29922, 29896, 467, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 418, 396, 900, 29881, 372, 322, 1925, 372, 297, 716, 12489, 13, 418, 2715, 29918, 2695, 3317, 353, 443, 336, 955, 29918, 23959, 29918, 2695, 3317, 29889, 1493, 29898, 29940, 29892, 379, 29892, 399, 29897, 13, 418, 1067, 22367, 29918, 2695, 3317, 7503, 29892, 474, 29962, 353, 2715, 29918, 2695, 3317, 13, 13, 1678, 736, 1067, 22367, 29918, 2695, 3317, 13, 13, 29992, 21208, 2911, 29889, 6720, 14849, 17101, 29889, 9573, 29918, 5453, 580, 13, 1990, 15600, 29943, 29898, 15755, 29889, 7355, 1125, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 13, 1669, 302, 13203, 29901, 938, 29892, 13, 1669, 4256, 29901, 938, 29892, 13, 1669, 3171, 29901, 938, 29892, 13, 1669, 2920, 29901, 938, 29892, 13, 1669, 921, 12339, 29918, 1111, 1389, 29901, 5785, 29892, 13, 1669, 921, 12339, 29918, 3754, 29901, 5785, 1125, 13, 1678, 2428, 2141, 1649, 2344, 1649, 580, 13, 1678, 1583, 29889, 1524, 353, 4842, 305, 29889, 15755, 29889, 9329, 29898, 7345, 305, 29889, 20158, 29898, 1524, 511, 13, 462, 462, 259, 6858, 29918, 5105, 29922, 8824, 29897, 13, 1678, 1583, 29889, 29880, 18038, 29918, 2311, 353, 4842, 305, 29889, 15755, 29889, 9329, 29898, 7345, 305, 29889, 20158, 4197, 3545, 29892, 2920, 11724, 13, 462, 462, 539, 6858, 29918, 5105, 29922, 8824, 29897, 13, 1678, 1583, 29889, 20230, 29918, 1111, 1389, 353, 4842, 305, 29889, 15755, 29889, 9329, 29898, 7345, 305, 29889, 20158, 29898, 20230, 29918, 1111, 1389, 511, 6858, 29918, 5105, 29922, 8824, 467, 7411, 580, 13, 1678, 1583, 29889, 20230, 29918, 3754, 353, 4842, 305, 29889, 15755, 29889, 9329, 29898, 7345, 305, 29889, 20158, 29898, 20230, 29918, 3754, 511, 6858, 29918, 5105, 29922, 8824, 467, 7411, 580, 13, 13, 1678, 1583, 29889, 29876, 13203, 353, 302, 13203, 13, 1678, 1596, 703, 15156, 15600, 29943, 29991, 1159, 13, 13, 1678, 396, 4529, 15359, 1244, 13, 1678, 396, 10007, 2069, 13, 1678, 1583, 29889, 12667, 29918, 17460, 29918, 2344, 353, 7442, 29889, 690, 14443, 29898, 9302, 29889, 2873, 3552, 1311, 29889, 29876, 13203, 29892, 1583, 29889, 29876, 13203, 876, 448, 13, 462, 462, 308, 7442, 29889, 22350, 29898, 1311, 29889, 29876, 13203, 511, 13, 462, 462, 308, 518, 1311, 29889, 29876, 13203, 29892, 1583, 29889, 29876, 13203, 29892, 29871, 29896, 29892, 29871, 29896, 2314, 13, 13, 1678, 396, 13181, 1008, 284, 24521, 4636, 267, 13, 1678, 1583, 29889, 12667, 29918, 20580, 353, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29898, 1311, 29889, 29876, 13203, 29892, 1583, 29889, 29876, 13203, 29892, 29871, 29896, 29897, 13, 1678, 1583, 29889, 12667, 29918, 20580, 29889, 7915, 353, 4842, 305, 29889, 15755, 29889, 9329, 29898, 7345, 305, 29889, 3166, 29918, 23749, 29898, 13, 4706, 1583, 29889, 12667, 29918, 17460, 29918, 2344, 467, 7411, 580, 334, 1583, 29889, 20230, 29918, 1111, 1389, 29892, 6858, 29918, 5105, 29922, 5574, 29897, 13, 13, 1678, 396, 12430, 6631, 7546, 363, 2643, 6819, 13, 1678, 1583, 29889, 2997, 29918, 13082, 29918, 20230, 353, 5976, 635, 20971, 2954, 18454, 29999, 14420, 29898, 3545, 29892, 2920, 29892, 921, 12339, 29918, 1111, 1389, 29892, 1583, 29889, 29876, 13203, 29897, 13, 13, 29871, 822, 6375, 29898, 1311, 29892, 1881, 29892, 4964, 3317, 29892, 11105, 1125, 13, 1678, 396, 671, 921, 12339, 13, 1678, 921, 12339, 353, 1881, 7503, 29892, 29871, 29896, 29901, 29946, 29962, 13, 13, 1678, 396, 4256, 6703, 13, 1678, 363, 4256, 297, 3464, 29898, 1311, 29889, 1524, 1125, 13, 418, 396, 2643, 6819, 408, 12430, 6631, 7546, 13, 418, 12430, 29918, 18045, 353, 1583, 29889, 2997, 29918, 13082, 29918, 20230, 29898, 20230, 29892, 4964, 3317, 29892, 11105, 29897, 13, 13, 418, 396, 337, 705, 1141, 411, 278, 29871, 29896, 29916, 29896, 26851, 13, 418, 337, 7915, 29918, 2695, 3317, 353, 1583, 29889, 12667, 29918, 20580, 29898, 2029, 635, 29918, 18045, 29897, 13, 13, 418, 396, 788, 278, 716, 1819, 304, 278, 2441, 4964, 3317, 13, 418, 337, 7915, 29918, 2695, 3317, 353, 337, 7915, 29918, 2695, 3317, 718, 4964, 3317, 13, 13, 418, 396, 1833, 368, 29892, 4325, 2759, 675, 13, 418, 4964, 3317, 353, 383, 29889, 2695, 3317, 29898, 276, 7915, 29918, 2695, 3317, 29892, 3964, 29922, 29896, 29897, 13, 13, 1678, 736, 4964, 3317, 13, 13, 2 ]
setup.py
rako233/rako-pyads
1
52090
from setuptools import setup, find_packages exec(open('counsyl_pyads/version.py').read()) setup( name='counsyl-pyads', version=__version__, packages=find_packages(), scripts=['bin/twincat_plc_info.py'], include_package_data=True, zip_safe=False, author='<NAME>.', author_email='<EMAIL>', description='A library for directly interacting with a Twincat PLC.', url='https://github.com/counsyl/counsyl-pyads/', classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
[ 1, 515, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 4258, 29898, 3150, 877, 29883, 1309, 29879, 2904, 29918, 2272, 7925, 29914, 3259, 29889, 2272, 2824, 949, 3101, 13, 13, 14669, 29898, 13, 1678, 1024, 2433, 29883, 1309, 29879, 2904, 29899, 2272, 7925, 742, 13, 1678, 1873, 29922, 1649, 3259, 1649, 29892, 13, 1678, 9741, 29922, 2886, 29918, 8318, 3285, 13, 1678, 12078, 29922, 1839, 2109, 29914, 7516, 3742, 271, 29918, 572, 29883, 29918, 3888, 29889, 2272, 7464, 13, 1678, 3160, 29918, 5113, 29918, 1272, 29922, 5574, 29892, 13, 1678, 14319, 29918, 11177, 29922, 8824, 29892, 13, 1678, 4148, 2433, 29966, 5813, 15513, 742, 13, 1678, 4148, 29918, 5269, 2433, 29966, 26862, 6227, 29958, 742, 13, 1678, 6139, 2433, 29909, 3489, 363, 4153, 16254, 292, 411, 263, 8168, 3742, 271, 349, 12182, 29889, 742, 13, 1678, 3142, 2433, 991, 597, 3292, 29889, 510, 29914, 29883, 1309, 29879, 2904, 29914, 29883, 1309, 29879, 2904, 29899, 2272, 7925, 29914, 742, 13, 1678, 770, 14903, 11759, 13, 4706, 525, 21956, 358, 16034, 4761, 29871, 29945, 448, 19561, 29914, 855, 519, 742, 13, 4706, 525, 29931, 293, 1947, 4761, 438, 5425, 28268, 1490, 4761, 341, 1806, 19245, 742, 13, 4706, 525, 9283, 4056, 17088, 4761, 5132, 742, 13, 4706, 525, 7031, 293, 4761, 23753, 928, 29914, 12412, 3241, 4761, 25796, 10863, 29914, 17830, 4103, 29880, 1061, 742, 13, 4706, 525, 7031, 293, 4761, 18540, 14650, 4761, 365, 4626, 4314, 4761, 5132, 3382, 2540, 742, 13, 1678, 21251, 13, 29897, 13, 2 ]
example/wallets/fetch_payment_address_by_id.py
oyeolamilekan/quidax-python
1
111752
from ..base import quidax response = quidax.wallets.fetch_payment_address("<address_id>", "<currency>") print(response)
[ 1, 515, 6317, 3188, 1053, 439, 333, 1165, 13, 13, 5327, 353, 439, 333, 1165, 29889, 14625, 10376, 29889, 9155, 29918, 27825, 29918, 7328, 28945, 7328, 29918, 333, 28341, 9872, 26095, 29958, 1159, 13, 13, 2158, 29898, 5327, 29897, 13, 2 ]
SVHN/core.py
IMBINGO95/FairMOT
0
194818
import threading, queue, time from queue import Queue from threading import Thread, currentThread import os from CalibrateTransfer.img_operation import ScreenSHot_batch from CalibrateTransfer.data_preprocess import write_data_to_json_file, read_data_from_json_file_v2 import numpy as np import torch.utils.data as data import torch import json import shutil from ReID_model.modeling import ReID_Model from utils_BINGO.K_Means import k_means from ReID_model.utils.dataset_loader import ReID_imgs_load_by_home_and_away import logging from utils.log import Log from utils.timer import Timer from utils.dir_related_operation import makedir_v1 import cv2 from SVHN.svhn import load_in_Svhn_model from torchvision import transforms from PIL import Image from utils_BINGO.Number_Rectifier import Number_Rectifier class SVHN_Predict(): def __init__(self, opt, ReIDCfg, Num_Pred_opt, Pose_output_queue, S_Number_Predict, vis=False, save_results=False, queueSize=1024): self.opt = opt self.dir_name = opt.dir_name self.root_path = os.path.join(opt.data_root, '{}'.format(opt.dir_name)) # logger.info('目标文件夹是{}'.format(self.root_path)) self.file_name = opt.file_name self.file_save_name_before_Number_Rectify = 'Step1_' self.file_save_name_after_Number_Rectify = 'Step2_' # 本来就是要载入两次视频,分开读亦可以 self.Videoparameters, \ self.setting_parameter, \ self.action_datas, \ self.channel_list, \ self.parameter = read_data_from_json_file_v2(self.root_path, self.file_name, self.opt) # 号码纠正器, 根据四官报告来修改参数 self.Number_Rectifier = Number_Rectifier self.datalen = len(self.action_datas) self.batch_size = 60 self.Num_Pred_opt = Num_Pred_opt # 用来设置号码识别模型的参数。 self.SVHN_predictor = load_in_Svhn_model(self.Num_Pred_opt) self.input_Q = Pose_output_queue # 骨骼关键节点检测后的输入结果 self.PreProcess_Q = Queue(maxsize=queueSize) # 在号码识别前,对输入图片进行预处理。 self.SVHN_Q = Queue(maxsize=queueSize) self.transform = transforms.Compose([ transforms.Resize([54, 54]), transforms.ToTensor(), transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]) ]) self.vis = vis if self.vis == True: self.vis_path = os.path.join(self.root_path, 'vis') os.makedirs(self.vis_path, exist_ok=True) self.S_Number_Predict = S_Number_Predict self.S_Final = max( S_Number_Predict - 1, 0) self.height_threshold = 21 self.width_threshold = 12 self.save_results = save_results if self.save_results == True: self.intermediate_results_dir = os.path.join(self.root_path, 'intermediate_results', 'SVHN_Predict') os.makedirs(self.intermediate_results_dir, exist_ok=True) self.main_imgs_dir = os.path.join(self.root_path, 'intermediate_results', 'main_imgs') self.FMLoader_dir = os.path.join(self.root_path, 'intermediate_results', 'FMLoader') # 加载 ReID 模型 self.ReIDCfg = ReIDCfg self.num_cls = 4 # 场上有几种类型的人 self.logger = Log(__name__, 'SVHN_Predict').getlog() def Read_From_Cache(self): ''' 从文件把之前计算过的结果提取出来 ''' self.logger.debug( 'The pid of SVHN_Predict.Read_From_Cache() : {}'.format(os.getpid())) self.logger.debug( 'The thread of SVHN_Predict.Read_From_Cache() : {}'.format(currentThread())) self.load_intermediate_resutls(self.S_Final) self.logger.log(24, ' SVHN_Predict loads action {} from Cache file '.format(self.S_Final)) def PreProcess_(self): self.t_PreProcess = Thread(target=self.PreProcess, args=()) self.t_PreProcess.daemon = True self.t_PreProcess.start() def PreProcess(self): ''' 对需要号码识别的图片进行预处理。 ''' self.logger.debug('The pid of SVHN_Predict.PreProcess() : {}'.format(os.getpid())) self.logger.debug('The thread of SVHN_Predict.PreProcess() : {}'.format(currentThread())) PreProcess_timer = Timer() for action_index in range(self.S_Number_Predict, self.datalen): PreProcess_timer.tic() # 开始计时 self.logger.debug('PreProcess() ======================================== action {}'.format(action_index)) Flag, input_results = self.input_Q.get() if Flag == False: # Flag == False 的话,直接就不要了 self.PreProcess_Q.put((False, (action_index, []))) continue #输入的数据有意义,可以接着处理 [input_index, sub_imgs_out, target_regions] = input_results if input_index != action_index: self.logger.log(31, '---——————————————————————————————————index does match') raise Exception( 'SVHN_Predict.PreProcess action_index_update {} != input_index {} '.format(action_index, input_index)) # 对数据进行预处理。 rectangle_imgs,original_imgs = self.img_pre_for_SVHN(sub_imgs_out,target_regions) if type(rectangle_imgs) != torch.Tensor: self.PreProcess_Q.put((False, (action_index, []))) else: self.PreProcess_Q.put((True, (action_index, rectangle_imgs, original_imgs))) # self.logger.info('Calibrate_transfer.sub_img_generate() action {} consums {}s'.format(action_index,sub_img_generate_timer.toc())) self.logger.log(24, 'SVHN_Predict.PreProcess() action {} consums {}s'.format(action_index, PreProcess_timer.toc())) def img_pre_for_SVHN(self,sub_imgs_out,target_regions): ''' 对需要 SVHN 的图片进行 数据预处理的 具体操作 ''' rectangle_imgs = [] original_imgs = [] for target_index in range(len(target_regions)) : sub_img = sub_imgs_out[target_index] [xmin, xmax, ymin, ymax] = target_regions[target_index] i_height, i_weight, i_channel = sub_img.shape crop_img = sub_img[max(ymin, 0):min(i_height, ymax), max(xmin, 0):min(xmax, i_weight)] h_i, w_i, _ = crop_img.shape if h_i < self.height_threshold or w_i < self.width_threshold: # 如果背部区域太小了,也要舍弃。 continue crop_image = Image.fromarray(crop_img) crop_image = self.transform(crop_image) rectangle_imgs.append(crop_image) original_imgs.append(sub_img) # 如果都不符合条件的话。 if len(rectangle_imgs) == 0: return None, None rectangle_imgs = torch.stack(rectangle_imgs, dim=0) return rectangle_imgs,original_imgs def Predict_(self): self.t_Predict = Thread(target=self.Predict, args=()) self.t_Predict.daemon = True self.t_Predict.start() def Predict(self): ''' 使用 SVHN 对完成预处理的图片进行号码预测 ''' Predict_timer = Timer() self.logger.debug( 'The pid of SVHN_Predict.Predict() : {}'.format(os.getpid())) self.logger.debug( 'The thread of SVHN_Predict.Predict() : {}'.format(currentThread())) for action_index in range(self.S_Number_Predict, self.datalen): Predict_timer.tic() # 开始计时 PreProcess_Flag, PreResults = self.PreProcess_Q.get() self.logger.debug('Predict() ======================================== action {}'.format(action_index)) if PreProcess_Flag == False: # 输入的数据无意义 preNum = -1 self.action_datas[action_index]['predicted_nums'] = [] else: # 输入的数据有意义, 读取数据 _, rectangle_imgs,original_imgs = PreResults imgs_length = rectangle_imgs.size(0) leftover = 0 if (imgs_length) % self.batch_size: leftover = 1 num_batches = imgs_length // self.batch_size + leftover if self.vis == True: vis_dir = os.path.join(self.vis_path,'{}'.format(action_index),'SVHN_Predict') makedir_v1(vis_dir) vis_dir_0 = os.path.join(self.vis_path, '{}'.format(action_index), 'SVHN_Predict_Minus_one') makedir_v1(vis_dir_0) NumsArray = [] for j in range(num_batches): input_imgs_j = rectangle_imgs[j*self.batch_size:min((j+1)*self.batch_size , imgs_length)] length_logits_j, digits_logits_j = self.SVHN_predictor(input_imgs_j.cuda()) '''This max function return two column, the first row is value, and the second row is index ''' length_predictions_j = length_logits_j.max(1)[1].cpu().tolist() digits_predictions_j = [digits_logits_j.max(1)[1].cpu().tolist() for digits_logits_j in digits_logits_j] NumsArray_j = [] for Num_i in range(len(length_predictions_j)): Number_len = length_predictions_j[Num_i] if Number_len == 1: Num = digits_predictions_j[0][Num_i] NumsArray_j.append(Num) elif Number_len == 2: Num = digits_predictions_j[0][Num_i] * 10 + digits_predictions_j[1][Num_i] NumsArray_j.append(Num) elif Number_len == 0: Num = -1 if self.vis == True: cv2.imwrite(os.path.join(vis_dir_0, '{}_P{}.jpg'.format(num_batches*j + Num_i, Num)), original_imgs[Num_i]) continue else: continue if self.vis == True: cv2.imwrite(os.path.join(vis_dir, '{}_P{}.jpg'.format(num_batches*j + Num_i, Num)), original_imgs[Num_i]) NumsArray.extend(NumsArray_j) # 将数据保存下来 self.action_datas[action_index]['predicted_nums'] = NumsArray if len(NumsArray) > 1: # NumberArray range from 0 to 99. # We need to count how many times does each number appear! NumsArray = np.histogram(NumsArray, bins=100, range=(0, 100))[0] preNum = np.argmax(NumsArray) # if preNum == 10: # print('wrong value') preNum_count = NumsArray[preNum] if np.where(NumsArray == preNum_count)[0].size > 1: # if there are more than one number have the maximun counts, then return -1 # can sort by number classification scores. preNum = -1 else: preNum = -1 # 保存数据 True_num = self.action_datas[action_index]['num'] self.action_datas[action_index]['num'] = '{}'.format(preNum) self.logger.log(24, 'SVHN_Predict.Predict action {} consums {}s'.format(action_index, Predict_timer.toc())) self.logger.log(24,'action {} ====================== True num = {}, Predict num = {} ============='.format( action_index,True_num,preNum)) if self.save_results == True: self.save_intermediate_resutls(action_index) self.logger.log(24, '-----------------------------Finished SVHN_Predict.Predict() datalen = {}-----------------------------'.format(self.datalen)) # Finished 完成了所有的计算,保存最终结果,未进行号码矫正 write_data_to_json_file(self.root_path, self.file_name, self.action_datas, self.parameter, file_save_name=self.file_save_name_before_Number_Rectify) # 根据四官报告修改最终结果 self.action_datas = self.Number_Rectifier(os.path.join(self.root_path,self.file_save_name_before_Number_Rectify + self.file_name)).rectify() self.logger.log(24, 'Successfully Rectify numbers according to four officials report') write_data_to_json_file(self.root_path, self.file_name, self.action_datas, self.parameter, file_save_name=self.file_save_name_after_Number_Rectify) # 并根据ReID特征划分主图片。 self.cluster_main_imgs() def save_intermediate_resutls(self, action_index): '''将每一次计算的结果保存下来。''' intermediate_resutls_path = os.path.join(self.intermediate_results_dir,'{}'.format(action_index)) os.makedirs(intermediate_resutls_path,exist_ok=True) json_file = os.path.join(intermediate_resutls_path, '{}_action_data.json'.format(action_index)) with open(json_file,'w') as f: json.dump(self.action_datas,f) def load_intermediate_resutls(self, action_index): '''将中间结果读取出来''' intermediate_resutls_path = os.path.join(self.intermediate_results_dir, '{}'.format(action_index)) os.makedirs(intermediate_resutls_path, exist_ok=True) json_file = os.path.join(intermediate_resutls_path, '{}_action_data.json'.format(action_index)) with open(json_file, 'r') as f: self.action_datas = json.load(f) def mk_cluster_dirs(self, save_dir, num_cls): ''' save_dir : 保存分类结果的根目录 num_cls : 分类的数量,种类数 ''' for i in range(num_cls): sub_dir = os.path.join(save_dir, str(i)) if os.path.exists(sub_dir): shutil.rmtree(sub_dir) os.makedirs(sub_dir, exist_ok=True) def generate_main_imgs(self): '''在追踪结果的基础之上,生成各个动作的主图片。''' if os.path.exists(self.main_imgs_dir): shutil.rmtree(self.main_imgs_dir) os.makedirs(self.main_imgs_dir) FMLoader = self.FMLoader_dir if os.path.exists(FMLoader): print('{} exists'.format(FMLoader)) action_indexes = os.listdir(FMLoader) action_indexes = sorted(action_indexes, key=lambda x: int(x)) for action_index in action_indexes: action_dir = os.path.join(FMLoader, '{}'.format(action_index)) if os.path.exists(action_dir): target_read_path = os.path.join(action_dir, '0.jpg') target_save_path = os.path.join(self.main_imgs_dir, '{}.jpg'.format(action_index)) shutil.copy(target_read_path, target_save_path) self.logger.log(24, 'SVHN_Predict.generate_main_imgs() Finished') def cluster_main_imgs(self): ''' :param ReID: ReID model :param ReIDCfg: ReID configure :param main_img_dir: The dir save the imgs which the programme what to cluster. :param action_datas: :param save_dir: :param num_cls: how many classes that the programme want ! :return: ''' # 计时器 cluster_main_imgs_timer = Timer() cluster_main_imgs_timer.tic() '''在追踪结果的基础之上,生成各个动作的主图片。''' self.generate_main_imgs() # 创建ReID模型 self.ReID = ReID_Model(self.ReIDCfg) self.ReID.cuda() # make directories to save the clustered imgs. action_datas = self.action_datas # 场上有四类目标人物,创建四个子文件夹 save_dir = self.main_imgs_dir self.mk_cluster_dirs(save_dir, self.num_cls) '''Preprocess the imgs before ReID''' if not os.path.exists(self.main_imgs_dir): raise ValueError("The main_img_dir is not exits") '''对要输入ReID网络的图片进行预处理''' imgs_arrays_all, img_names_all = ReID_imgs_load_by_home_and_away(self.ReIDCfg, self.main_imgs_dir, self.action_datas) # 分成主客两队 cls_res_all = {'Home': 0, 'Away': 2} # 主队保存在前两个文件夹 0 和 1, 客队保存在后两个文件夹 2 和 3 for TeanIndex, TeamType in enumerate(['Home', 'Away']): imgs_arrays = imgs_arrays_all[TeamType] img_names = img_names_all[TeamType] cls_res = cls_res_all[TeamType] all_feats = [] # 用来存储各个动作主图片的ReID特征 with torch.no_grad(): for imgs_array in imgs_arrays: imgs_array = imgs_array.to('cuda') feats = self.ReID(imgs_array).cpu().numpy().tolist() all_feats.extend(feats) length = len(all_feats) self.logger.log(24, ' ReID models ,there are {} actions of TeamType {} want to be delt with.'.format(length,TeamType)) '''根据ReID特征,进行分类,分成num_cls类, 门将和球员''' assignments, dataset = k_means(all_feats, 2) '''根据分类结果,将图片按文件夹分类''' for index, cls in enumerate(assignments): cls += cls_res # 所要保存的文件夹的序号 # 是否有识别成功以号码检测为准。 if int(action_datas[int(img_names[index])]['num']) == -1 or \ action_datas[int(img_names[index])]['num'] == None: shutil.copyfile(os.path.join(self.main_imgs_dir, img_names[index] + '.jpg'), os.path.join(save_dir,'{}'.format(cls),'{}_.jpg'.format(img_names[index]))) else: shutil.copyfile(os.path.join(self.main_imgs_dir, img_names[index] + '.jpg'), os.path.join(save_dir,'{}'.format(cls),'{}_{}.jpg'.format(img_names[index], action_datas[int(img_names[index])]['num']))) action_datas[int(img_names[index])]['team'] = str(cls) self.action_datas = action_datas self.logger.log(24, 'SVHN_Predict.cluster_main_imgs() Finished, consums {}s'.format(cluster_main_imgs_timer.toc()))
[ 1, 1053, 3244, 292, 29892, 9521, 29892, 931, 13, 3166, 9521, 1053, 5462, 434, 13, 3166, 3244, 292, 1053, 10480, 29892, 1857, 4899, 13, 13, 5215, 2897, 13, 3166, 3037, 4626, 403, 4300, 571, 29889, 2492, 29918, 16453, 1053, 22666, 7068, 327, 29918, 16175, 13, 3166, 3037, 4626, 403, 4300, 571, 29889, 1272, 29918, 1457, 5014, 1053, 2436, 29918, 1272, 29918, 517, 29918, 3126, 29918, 1445, 29892, 1303, 29918, 1272, 29918, 3166, 29918, 3126, 29918, 1445, 29918, 29894, 29906, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 29889, 13239, 29889, 1272, 408, 848, 13, 5215, 4842, 305, 13, 5215, 4390, 13, 5215, 528, 4422, 13, 13, 3166, 830, 1367, 29918, 4299, 29889, 4299, 292, 1053, 830, 1367, 29918, 3195, 13, 3166, 3667, 29879, 29918, 29933, 4214, 29949, 29889, 29968, 29918, 6816, 550, 1053, 413, 29918, 1004, 550, 13, 3166, 830, 1367, 29918, 4299, 29889, 13239, 29889, 24713, 29918, 12657, 1053, 830, 1367, 29918, 2492, 29879, 29918, 1359, 29918, 1609, 29918, 5184, 29918, 392, 29918, 21694, 13, 13, 5215, 12183, 13, 3166, 3667, 29879, 29889, 1188, 1053, 4522, 13, 3166, 3667, 29879, 29889, 20404, 1053, 29168, 13, 3166, 3667, 29879, 29889, 3972, 29918, 12817, 29918, 16453, 1053, 2136, 287, 381, 29918, 29894, 29896, 13, 5215, 13850, 29906, 13, 3166, 13955, 29950, 29940, 29889, 4501, 3123, 1053, 2254, 29918, 262, 29918, 29903, 29894, 3123, 29918, 4299, 13, 3166, 4842, 305, 4924, 1053, 4327, 29879, 13, 3166, 349, 6227, 1053, 7084, 13, 3166, 3667, 29879, 29918, 29933, 4214, 29949, 29889, 4557, 29918, 7364, 3709, 1053, 9681, 29918, 7364, 3709, 13, 1990, 13955, 29950, 29940, 29918, 23084, 919, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3523, 29892, 830, 1367, 29907, 16434, 29892, 11848, 29918, 23084, 29918, 3670, 29892, 349, 852, 29918, 4905, 29918, 9990, 29892, 317, 29918, 4557, 29918, 23084, 919, 29892, 13, 462, 1998, 29922, 8824, 29892, 4078, 29918, 9902, 29922, 8824, 29892, 9521, 3505, 29922, 29896, 29900, 29906, 29946, 1125, 13, 13, 4706, 1583, 29889, 3670, 353, 3523, 13, 4706, 1583, 29889, 3972, 29918, 978, 353, 3523, 29889, 3972, 29918, 978, 13, 4706, 1583, 29889, 4632, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 3670, 29889, 1272, 29918, 4632, 29892, 525, 8875, 4286, 4830, 29898, 3670, 29889, 3972, 29918, 978, 876, 13, 4706, 396, 17927, 29889, 3888, 877, 30895, 31062, 30333, 30631, 232, 167, 188, 30392, 8875, 4286, 4830, 29898, 1311, 29889, 4632, 29918, 2084, 876, 13, 4706, 1583, 29889, 1445, 29918, 978, 353, 3523, 29889, 1445, 29918, 978, 13, 13, 4706, 1583, 29889, 1445, 29918, 7620, 29918, 978, 29918, 11083, 29918, 4557, 29918, 7364, 1598, 353, 525, 14448, 29896, 29918, 29915, 13, 4706, 1583, 29889, 1445, 29918, 7620, 29918, 978, 29918, 7045, 29918, 4557, 29918, 7364, 1598, 353, 525, 14448, 29906, 29918, 29915, 13, 13, 13, 4706, 396, 29871, 30346, 30805, 31238, 30392, 30698, 31526, 30752, 31977, 30936, 31568, 236, 165, 148, 30214, 30748, 31026, 235, 178, 190, 231, 189, 169, 30682, 30651, 13, 4706, 1583, 29889, 29963, 680, 459, 11269, 2699, 29892, 320, 13, 4706, 1583, 29889, 26740, 29918, 15501, 29892, 320, 13, 4706, 1583, 29889, 2467, 29918, 14538, 29892, 320, 13, 4706, 1583, 29889, 12719, 29918, 1761, 29892, 320, 13, 4706, 1583, 29889, 15501, 353, 1303, 29918, 1272, 29918, 3166, 29918, 3126, 29918, 1445, 29918, 29894, 29906, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 1583, 29889, 1445, 29918, 978, 29892, 1583, 29889, 3670, 29897, 13, 13, 4706, 396, 29871, 30850, 31183, 234, 189, 163, 30724, 30943, 30214, 29871, 31393, 30763, 30928, 31694, 233, 141, 168, 31785, 30805, 31273, 31264, 31125, 30354, 13, 4706, 1583, 29889, 4557, 29918, 7364, 3709, 353, 9681, 29918, 7364, 3709, 13, 13, 4706, 1583, 29889, 29881, 2075, 264, 353, 7431, 29898, 1311, 29889, 2467, 29918, 14538, 29897, 13, 4706, 1583, 29889, 16175, 29918, 2311, 353, 29871, 29953, 29900, 13, 13, 4706, 1583, 29889, 8009, 29918, 23084, 29918, 3670, 353, 11848, 29918, 23084, 29918, 3670, 29871, 396, 29871, 30406, 30805, 30872, 30669, 30850, 31183, 235, 178, 137, 232, 139, 174, 31382, 30883, 30210, 31125, 30354, 30267, 13, 4706, 1583, 29889, 7597, 29950, 29940, 29918, 27711, 272, 353, 2254, 29918, 262, 29918, 29903, 29894, 3123, 29918, 4299, 29898, 1311, 29889, 8009, 29918, 23084, 29918, 3670, 29897, 13, 13, 4706, 1583, 29889, 2080, 29918, 29984, 353, 349, 852, 29918, 4905, 29918, 9990, 29871, 396, 29871, 236, 173, 171, 236, 173, 191, 31057, 236, 151, 177, 31669, 30940, 233, 166, 131, 31851, 30822, 30210, 31573, 30752, 31320, 30801, 13, 4706, 1583, 29889, 6572, 7032, 29918, 29984, 353, 5462, 434, 29898, 3317, 2311, 29922, 9990, 3505, 29897, 29871, 396, 29871, 30505, 30850, 31183, 235, 178, 137, 232, 139, 174, 30658, 30214, 30783, 31573, 30752, 30861, 31122, 31174, 30448, 236, 165, 135, 31548, 30687, 30267, 13, 4706, 1583, 29889, 7597, 29950, 29940, 29918, 29984, 353, 5462, 434, 29898, 3317, 2311, 29922, 9990, 3505, 29897, 13, 13, 4706, 1583, 29889, 9067, 353, 4327, 29879, 29889, 1523, 4220, 4197, 13, 9651, 4327, 29879, 29889, 1666, 675, 4197, 29945, 29946, 29892, 29871, 29945, 29946, 11724, 13, 9651, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 9651, 4327, 29879, 29889, 19077, 675, 4197, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29945, 1402, 518, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29945, 2314, 13, 308, 2314, 13, 13, 4706, 1583, 29889, 1730, 353, 1998, 13, 4706, 565, 1583, 29889, 1730, 1275, 5852, 29901, 13, 9651, 1583, 29889, 1730, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 525, 1730, 1495, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 1311, 29889, 1730, 29918, 2084, 29892, 1863, 29918, 554, 29922, 5574, 29897, 13, 13, 4706, 1583, 29889, 29903, 29918, 4557, 29918, 23084, 919, 353, 317, 29918, 4557, 29918, 23084, 919, 13, 4706, 1583, 29889, 29903, 29918, 15790, 353, 4236, 29898, 317, 29918, 4557, 29918, 23084, 919, 448, 29871, 29896, 29892, 29871, 29900, 29897, 13, 4706, 1583, 29889, 3545, 29918, 386, 12268, 353, 29871, 29906, 29896, 13, 4706, 1583, 29889, 2103, 29918, 386, 12268, 353, 29871, 29896, 29906, 13, 4706, 1583, 29889, 7620, 29918, 9902, 353, 4078, 29918, 9902, 13, 4706, 565, 1583, 29889, 7620, 29918, 9902, 1275, 5852, 29901, 13, 9651, 1583, 29889, 1639, 13847, 29918, 9902, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 525, 1639, 13847, 29918, 9902, 742, 525, 7597, 29950, 29940, 29918, 23084, 919, 1495, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 1311, 29889, 1639, 13847, 29918, 9902, 29918, 3972, 29892, 1863, 29918, 554, 29922, 5574, 29897, 13, 13, 4706, 1583, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 525, 1639, 13847, 29918, 9902, 742, 525, 3396, 29918, 2492, 29879, 1495, 13, 4706, 1583, 29889, 29943, 1988, 29877, 1664, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 525, 1639, 13847, 29918, 9902, 742, 525, 29943, 1988, 29877, 1664, 1495, 13, 13, 4706, 396, 29871, 30666, 31526, 830, 1367, 29871, 31382, 30883, 13, 4706, 1583, 29889, 1123, 1367, 29907, 16434, 353, 830, 1367, 29907, 16434, 13, 4706, 1583, 29889, 1949, 29918, 25932, 353, 29871, 29946, 396, 29871, 31632, 30429, 30417, 232, 138, 163, 31893, 30832, 30883, 30210, 30313, 13, 13, 4706, 1583, 29889, 21707, 353, 4522, 22168, 978, 1649, 29892, 525, 7597, 29950, 29940, 29918, 23084, 919, 2824, 657, 1188, 580, 13, 13, 1678, 822, 7523, 29918, 4591, 29918, 10408, 29898, 1311, 1125, 13, 4706, 14550, 13, 308, 31594, 30333, 30631, 233, 141, 141, 30577, 30658, 31466, 31565, 31138, 30210, 31320, 30801, 31302, 30683, 30544, 30805, 13, 4706, 14550, 13, 4706, 1583, 29889, 21707, 29889, 8382, 29898, 525, 1576, 23107, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 6359, 29918, 4591, 29918, 10408, 580, 584, 6571, 4286, 4830, 29898, 359, 29889, 657, 5935, 22130, 13, 4706, 1583, 29889, 21707, 29889, 8382, 29898, 525, 1576, 3244, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 6359, 29918, 4591, 29918, 10408, 580, 584, 6571, 4286, 4830, 29898, 3784, 4899, 22130, 13, 4706, 1583, 29889, 1359, 29918, 1639, 13847, 29918, 690, 329, 3137, 29898, 1311, 29889, 29903, 29918, 15790, 29897, 13, 4706, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 13955, 29950, 29940, 29918, 23084, 919, 15376, 3158, 6571, 515, 28540, 934, 15300, 4830, 29898, 1311, 29889, 29903, 29918, 15790, 876, 13, 13, 1678, 822, 4721, 7032, 23538, 1311, 1125, 13, 4706, 1583, 29889, 29873, 29918, 6572, 7032, 353, 10480, 29898, 5182, 29922, 1311, 29889, 6572, 7032, 29892, 6389, 29922, 3101, 13, 4706, 1583, 29889, 29873, 29918, 6572, 7032, 29889, 1388, 9857, 353, 5852, 13, 4706, 1583, 29889, 29873, 29918, 6572, 7032, 29889, 2962, 580, 13, 13, 13, 1678, 822, 4721, 7032, 29898, 1311, 1125, 13, 4706, 14550, 13, 308, 30783, 31383, 30698, 30850, 31183, 235, 178, 137, 232, 139, 174, 30210, 30861, 31122, 31174, 30448, 236, 165, 135, 31548, 30687, 30267, 13, 4706, 14550, 13, 4706, 1583, 29889, 21707, 29889, 8382, 877, 1576, 23107, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 6572, 7032, 580, 584, 6571, 4286, 4830, 29898, 359, 29889, 657, 5935, 22130, 13, 4706, 1583, 29889, 21707, 29889, 8382, 877, 1576, 3244, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 6572, 7032, 580, 584, 6571, 4286, 4830, 29898, 3784, 4899, 22130, 13, 4706, 4721, 7032, 29918, 20404, 353, 29168, 580, 13, 4706, 363, 3158, 29918, 2248, 297, 3464, 29898, 1311, 29889, 29903, 29918, 4557, 29918, 23084, 919, 29892, 1583, 29889, 29881, 2075, 264, 1125, 13, 9651, 4721, 7032, 29918, 20404, 29889, 29873, 293, 580, 29871, 396, 29871, 31026, 31020, 31466, 30594, 13, 9651, 1583, 29889, 21707, 29889, 8382, 877, 6572, 7032, 580, 1275, 9166, 9166, 2751, 1360, 3158, 6571, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 9651, 28697, 29892, 1881, 29918, 9902, 353, 1583, 29889, 2080, 29918, 29984, 29889, 657, 580, 13, 13, 9651, 565, 28697, 1275, 7700, 29901, 13, 18884, 396, 28697, 1275, 7700, 29871, 30210, 31852, 30214, 31157, 31092, 31238, 30413, 30698, 30743, 13, 18884, 1583, 29889, 6572, 7032, 29918, 29984, 29889, 649, 3552, 8824, 29892, 313, 2467, 29918, 2248, 29892, 5159, 4961, 13, 18884, 6773, 13, 9651, 396, 31573, 30752, 30210, 30354, 30763, 30417, 31474, 31349, 30214, 30682, 30651, 31092, 234, 160, 131, 31548, 30687, 13, 9651, 518, 2080, 29918, 2248, 29892, 1014, 29918, 2492, 29879, 29918, 449, 29892, 3646, 29918, 1727, 1080, 29962, 353, 1881, 29918, 9902, 13, 13, 9651, 565, 1881, 29918, 2248, 2804, 3158, 29918, 2248, 29901, 13, 18884, 1583, 29889, 21707, 29889, 1188, 29898, 29941, 29896, 29892, 525, 5634, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 30003, 2248, 947, 1993, 1495, 13, 18884, 12020, 8960, 29898, 13, 462, 1678, 525, 7597, 29950, 29940, 29918, 23084, 919, 29889, 6572, 7032, 3158, 29918, 2248, 29918, 5504, 6571, 2804, 1881, 29918, 2248, 6571, 15300, 4830, 29898, 2467, 29918, 2248, 29892, 13, 462, 462, 462, 462, 462, 1669, 1881, 29918, 2248, 876, 13, 9651, 396, 29871, 30783, 30354, 30763, 31174, 30448, 236, 165, 135, 31548, 30687, 30267, 13, 9651, 16701, 29918, 2492, 29879, 29892, 13492, 29918, 2492, 29879, 353, 1583, 29889, 2492, 29918, 1457, 29918, 1454, 29918, 7597, 29950, 29940, 29898, 1491, 29918, 2492, 29879, 29918, 449, 29892, 5182, 29918, 1727, 1080, 29897, 13, 13, 9651, 565, 1134, 29898, 1621, 2521, 29918, 2492, 29879, 29897, 2804, 4842, 305, 29889, 29911, 6073, 29901, 13, 18884, 1583, 29889, 6572, 7032, 29918, 29984, 29889, 649, 3552, 8824, 29892, 313, 2467, 29918, 2248, 29892, 5159, 4961, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 6572, 7032, 29918, 29984, 29889, 649, 3552, 5574, 29892, 313, 2467, 29918, 2248, 29892, 16701, 29918, 2492, 29879, 29892, 2441, 29918, 2492, 29879, 4961, 13, 13, 9651, 396, 1583, 29889, 21707, 29889, 3888, 877, 7856, 4626, 403, 29918, 3286, 571, 29889, 1491, 29918, 2492, 29918, 17158, 580, 3158, 6571, 1136, 6762, 6571, 29879, 4286, 4830, 29898, 2467, 29918, 2248, 29892, 1491, 29918, 2492, 29918, 17158, 29918, 20404, 29889, 517, 29883, 22130, 13, 9651, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 7597, 29950, 29940, 29918, 23084, 919, 29889, 6572, 7032, 580, 3158, 6571, 1136, 6762, 6571, 29879, 4286, 4830, 29898, 2467, 29918, 2248, 29892, 4721, 7032, 29918, 20404, 29889, 517, 29883, 22130, 13, 13, 13, 1678, 822, 10153, 29918, 1457, 29918, 1454, 29918, 7597, 29950, 29940, 29898, 1311, 29892, 1491, 29918, 2492, 29879, 29918, 449, 29892, 5182, 29918, 1727, 1080, 1125, 13, 4706, 14550, 13, 308, 30783, 31383, 30698, 13955, 29950, 29940, 29871, 30210, 30861, 31122, 31174, 30448, 29871, 30354, 30763, 236, 165, 135, 31548, 30687, 30210, 29871, 232, 136, 186, 30988, 31904, 30732, 13, 4706, 14550, 13, 4706, 16701, 29918, 2492, 29879, 353, 5159, 13, 4706, 2441, 29918, 2492, 29879, 353, 5159, 13, 4706, 363, 3646, 29918, 2248, 297, 3464, 29898, 2435, 29898, 5182, 29918, 1727, 1080, 876, 584, 13, 9651, 1014, 29918, 2492, 353, 1014, 29918, 2492, 29879, 29918, 449, 29961, 5182, 29918, 2248, 29962, 13, 9651, 518, 29916, 1195, 29892, 921, 3317, 29892, 343, 1195, 29892, 343, 3317, 29962, 353, 3646, 29918, 1727, 1080, 29961, 5182, 29918, 2248, 29962, 13, 13, 9651, 474, 29918, 3545, 29892, 474, 29918, 7915, 29892, 474, 29918, 12719, 353, 1014, 29918, 2492, 29889, 12181, 13, 9651, 274, 1336, 29918, 2492, 353, 1014, 29918, 2492, 29961, 3317, 29898, 962, 262, 29892, 29871, 29900, 1125, 1195, 29898, 29875, 29918, 3545, 29892, 343, 3317, 511, 4236, 29898, 29916, 1195, 29892, 29871, 29900, 1125, 1195, 29898, 29916, 3317, 29892, 474, 29918, 7915, 4638, 13, 9651, 298, 29918, 29875, 29892, 281, 29918, 29875, 29892, 903, 353, 274, 1336, 29918, 2492, 29889, 12181, 13, 9651, 565, 298, 29918, 29875, 529, 1583, 29889, 3545, 29918, 386, 12268, 470, 281, 29918, 29875, 529, 1583, 29889, 2103, 29918, 386, 12268, 29901, 13, 18884, 396, 29871, 30847, 30801, 235, 134, 143, 30636, 30467, 232, 162, 162, 30654, 30446, 30743, 30214, 30953, 30698, 235, 139, 144, 232, 191, 134, 30267, 13, 18884, 6773, 13, 9651, 274, 1336, 29918, 3027, 353, 7084, 29889, 3166, 2378, 29898, 29883, 1336, 29918, 2492, 29897, 13, 9651, 274, 1336, 29918, 3027, 353, 1583, 29889, 9067, 29898, 29883, 1336, 29918, 3027, 29897, 13, 9651, 16701, 29918, 2492, 29879, 29889, 4397, 29898, 29883, 1336, 29918, 3027, 29897, 13, 9651, 2441, 29918, 2492, 29879, 29889, 4397, 29898, 1491, 29918, 2492, 29897, 13, 4706, 396, 29871, 30847, 30801, 30769, 30413, 31277, 30733, 31217, 30631, 30210, 31852, 30267, 13, 4706, 565, 7431, 29898, 1621, 2521, 29918, 2492, 29879, 29897, 1275, 29871, 29900, 29901, 13, 9651, 736, 6213, 29892, 6213, 13, 13, 4706, 16701, 29918, 2492, 29879, 353, 4842, 305, 29889, 1429, 29898, 1621, 2521, 29918, 2492, 29879, 29892, 3964, 29922, 29900, 29897, 13, 4706, 736, 16701, 29918, 2492, 29879, 29892, 13492, 29918, 2492, 29879, 13, 13, 1678, 822, 21099, 919, 23538, 1311, 1125, 13, 4706, 1583, 29889, 29873, 29918, 23084, 919, 353, 10480, 29898, 5182, 29922, 1311, 29889, 23084, 919, 29892, 6389, 29922, 3101, 13, 4706, 1583, 29889, 29873, 29918, 23084, 919, 29889, 1388, 9857, 353, 5852, 13, 4706, 1583, 29889, 29873, 29918, 23084, 919, 29889, 2962, 580, 13, 13, 1678, 822, 21099, 919, 29898, 1311, 1125, 13, 4706, 14550, 13, 308, 30785, 30406, 13955, 29950, 29940, 29871, 30783, 31366, 30494, 236, 165, 135, 31548, 30687, 30210, 30861, 31122, 31174, 30448, 30850, 31183, 236, 165, 135, 31851, 13, 4706, 14550, 13, 4706, 21099, 919, 29918, 20404, 353, 29168, 580, 13, 4706, 1583, 29889, 21707, 29889, 8382, 29898, 525, 1576, 23107, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 23084, 919, 580, 584, 6571, 4286, 4830, 29898, 359, 29889, 657, 5935, 22130, 13, 4706, 1583, 29889, 21707, 29889, 8382, 29898, 525, 1576, 3244, 310, 13955, 29950, 29940, 29918, 23084, 919, 29889, 23084, 919, 580, 584, 6571, 4286, 4830, 29898, 3784, 4899, 22130, 13, 4706, 363, 3158, 29918, 2248, 297, 3464, 29898, 1311, 29889, 29903, 29918, 4557, 29918, 23084, 919, 29892, 1583, 29889, 29881, 2075, 264, 1125, 13, 9651, 21099, 919, 29918, 20404, 29889, 29873, 293, 580, 396, 29871, 31026, 31020, 31466, 30594, 13, 9651, 4721, 7032, 29918, 21979, 29892, 4721, 12191, 353, 1583, 29889, 6572, 7032, 29918, 29984, 29889, 657, 580, 13, 9651, 1583, 29889, 21707, 29889, 8382, 877, 23084, 919, 580, 1275, 9166, 9166, 2751, 1360, 3158, 6571, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 13, 9651, 565, 4721, 7032, 29918, 21979, 1275, 7700, 29901, 13, 18884, 396, 29871, 31573, 30752, 30210, 30354, 30763, 31352, 31474, 31349, 13, 18884, 758, 8009, 353, 448, 29896, 13, 18884, 1583, 29889, 2467, 29918, 14538, 29961, 2467, 29918, 2248, 22322, 11965, 18186, 29918, 1949, 29879, 2033, 353, 5159, 13, 13, 9651, 1683, 29901, 13, 18884, 396, 29871, 31573, 30752, 30210, 30354, 30763, 30417, 31474, 31349, 30214, 29871, 235, 178, 190, 30683, 30354, 30763, 13, 18884, 17117, 16701, 29918, 2492, 29879, 29892, 13492, 29918, 2492, 29879, 353, 4721, 12191, 13, 18884, 527, 3174, 29918, 2848, 353, 16701, 29918, 2492, 29879, 29889, 2311, 29898, 29900, 29897, 13, 18884, 454, 29888, 517, 369, 353, 29871, 29900, 13, 18884, 565, 313, 2492, 29879, 29918, 2848, 29897, 1273, 1583, 29889, 16175, 29918, 2311, 29901, 13, 462, 1678, 454, 29888, 517, 369, 353, 29871, 29896, 13, 18884, 954, 29918, 16175, 267, 353, 527, 3174, 29918, 2848, 849, 1583, 29889, 16175, 29918, 2311, 718, 454, 29888, 517, 369, 13, 13, 18884, 565, 1583, 29889, 1730, 1275, 5852, 29901, 13, 462, 1678, 1998, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 1730, 29918, 2084, 5501, 8875, 4286, 4830, 29898, 2467, 29918, 2248, 511, 29915, 7597, 29950, 29940, 29918, 23084, 919, 1495, 13, 462, 1678, 2136, 287, 381, 29918, 29894, 29896, 29898, 1730, 29918, 3972, 29897, 13, 462, 1678, 1998, 29918, 3972, 29918, 29900, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 1730, 29918, 2084, 29892, 525, 8875, 4286, 4830, 29898, 2467, 29918, 2248, 511, 525, 7597, 29950, 29940, 29918, 23084, 919, 29918, 8140, 375, 29918, 650, 1495, 13, 462, 1678, 2136, 287, 381, 29918, 29894, 29896, 29898, 1730, 29918, 3972, 29918, 29900, 29897, 13, 13, 18884, 405, 6762, 2588, 353, 5159, 13, 18884, 363, 432, 297, 3464, 29898, 1949, 29918, 16175, 267, 1125, 13, 462, 1678, 1881, 29918, 2492, 29879, 29918, 29926, 353, 16701, 29918, 2492, 29879, 29961, 29926, 29930, 1311, 29889, 16175, 29918, 2311, 29901, 1195, 3552, 29926, 29974, 29896, 11877, 1311, 29889, 16175, 29918, 2311, 1919, 527, 3174, 29918, 2848, 4638, 13, 462, 1678, 3309, 29918, 1188, 1169, 29918, 29926, 29892, 13340, 29918, 1188, 1169, 29918, 29926, 353, 1583, 29889, 7597, 29950, 29940, 29918, 27711, 272, 29898, 2080, 29918, 2492, 29879, 29918, 29926, 29889, 29883, 6191, 3101, 13, 13, 462, 1678, 14550, 4013, 4236, 740, 736, 1023, 1897, 29892, 278, 937, 1948, 338, 995, 29892, 322, 278, 1473, 1948, 338, 2380, 14550, 13, 462, 1678, 3309, 29918, 27711, 1080, 29918, 29926, 353, 3309, 29918, 1188, 1169, 29918, 29926, 29889, 3317, 29898, 29896, 9601, 29896, 1822, 21970, 2141, 25027, 391, 580, 13, 462, 1678, 13340, 29918, 27711, 1080, 29918, 29926, 353, 518, 7501, 1169, 29918, 1188, 1169, 29918, 29926, 29889, 3317, 29898, 29896, 9601, 29896, 1822, 21970, 2141, 25027, 391, 580, 363, 13340, 29918, 1188, 1169, 29918, 29926, 297, 13340, 29918, 1188, 1169, 29918, 29926, 29962, 13, 13, 462, 1678, 405, 6762, 2588, 29918, 29926, 353, 5159, 13, 462, 1678, 363, 11848, 29918, 29875, 297, 3464, 29898, 2435, 29898, 2848, 29918, 27711, 1080, 29918, 29926, 22164, 13, 462, 4706, 9681, 29918, 2435, 353, 3309, 29918, 27711, 1080, 29918, 29926, 29961, 8009, 29918, 29875, 29962, 13, 13, 462, 4706, 565, 9681, 29918, 2435, 1275, 29871, 29896, 29901, 13, 462, 9651, 11848, 353, 13340, 29918, 27711, 1080, 29918, 29926, 29961, 29900, 3816, 8009, 29918, 29875, 29962, 13, 462, 9651, 405, 6762, 2588, 29918, 29926, 29889, 4397, 29898, 8009, 29897, 13, 462, 4706, 25342, 9681, 29918, 2435, 1275, 29871, 29906, 29901, 13, 462, 9651, 11848, 353, 13340, 29918, 27711, 1080, 29918, 29926, 29961, 29900, 3816, 8009, 29918, 29875, 29962, 334, 29871, 29896, 29900, 718, 13340, 29918, 27711, 1080, 29918, 29926, 29961, 29896, 3816, 8009, 29918, 29875, 29962, 13, 462, 9651, 405, 6762, 2588, 29918, 29926, 29889, 4397, 29898, 8009, 29897, 13, 462, 4706, 25342, 9681, 29918, 2435, 1275, 29871, 29900, 29901, 13, 462, 9651, 11848, 353, 448, 29896, 13, 462, 9651, 565, 1583, 29889, 1730, 1275, 5852, 29901, 13, 462, 18884, 13850, 29906, 29889, 326, 3539, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1730, 29918, 3972, 29918, 29900, 29892, 22372, 2403, 29925, 29912, 1836, 6173, 4286, 4830, 29898, 1949, 29918, 16175, 267, 29930, 29926, 718, 11848, 29918, 29875, 29892, 11848, 8243, 2441, 29918, 2492, 29879, 29961, 8009, 29918, 29875, 2314, 13, 462, 9651, 6773, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 6773, 13, 13, 462, 4706, 565, 1583, 29889, 1730, 1275, 5852, 29901, 13, 462, 9651, 13850, 29906, 29889, 326, 3539, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1730, 29918, 3972, 29892, 22372, 2403, 29925, 29912, 1836, 6173, 4286, 4830, 29898, 1949, 29918, 16175, 267, 29930, 29926, 718, 11848, 29918, 29875, 29892, 11848, 8243, 2441, 29918, 2492, 29879, 29961, 8009, 29918, 29875, 2314, 13, 13, 462, 1678, 405, 6762, 2588, 29889, 21843, 29898, 29940, 6762, 2588, 29918, 29926, 29897, 13, 13, 18884, 396, 29871, 30998, 30354, 30763, 30982, 30946, 30557, 30805, 13, 18884, 1583, 29889, 2467, 29918, 14538, 29961, 2467, 29918, 2248, 22322, 11965, 18186, 29918, 1949, 29879, 2033, 353, 405, 6762, 2588, 13, 13, 18884, 565, 7431, 29898, 29940, 6762, 2588, 29897, 1405, 29871, 29896, 29901, 13, 462, 1678, 396, 9681, 2588, 3464, 515, 29871, 29900, 304, 29871, 29929, 29929, 29889, 13, 462, 1678, 396, 1334, 817, 304, 2302, 920, 1784, 3064, 947, 1269, 1353, 2615, 29991, 13, 462, 1678, 405, 6762, 2588, 353, 7442, 29889, 29882, 391, 13342, 29898, 29940, 6762, 2588, 29892, 289, 1144, 29922, 29896, 29900, 29900, 29892, 3464, 7607, 29900, 29892, 29871, 29896, 29900, 29900, 876, 29961, 29900, 29962, 13, 462, 1678, 758, 8009, 353, 7442, 29889, 1191, 3317, 29898, 29940, 6762, 2588, 29897, 13, 462, 1678, 396, 565, 758, 8009, 1275, 29871, 29896, 29900, 29901, 13, 462, 1678, 396, 268, 1596, 877, 15866, 549, 995, 1495, 13, 462, 1678, 758, 8009, 29918, 2798, 353, 405, 6762, 2588, 29961, 1457, 8009, 29962, 13, 462, 1678, 565, 7442, 29889, 3062, 29898, 29940, 6762, 2588, 1275, 758, 8009, 29918, 2798, 9601, 29900, 1822, 2311, 1405, 29871, 29896, 29901, 13, 462, 4706, 396, 565, 727, 526, 901, 1135, 697, 1353, 505, 278, 5256, 348, 18139, 29892, 769, 736, 448, 29896, 13, 462, 4706, 396, 508, 2656, 491, 1353, 12965, 19435, 29889, 13, 462, 4706, 758, 8009, 353, 448, 29896, 13, 18884, 1683, 29901, 13, 462, 1678, 758, 8009, 353, 448, 29896, 13, 13, 9651, 396, 29871, 30982, 30946, 30354, 30763, 13, 9651, 5852, 29918, 1949, 353, 1583, 29889, 2467, 29918, 14538, 29961, 2467, 29918, 2248, 22322, 1949, 2033, 13, 9651, 1583, 29889, 2467, 29918, 14538, 29961, 2467, 29918, 2248, 22322, 1949, 2033, 353, 525, 8875, 4286, 4830, 29898, 1457, 8009, 29897, 13, 9651, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 7597, 29950, 29940, 29918, 23084, 919, 29889, 23084, 919, 3158, 6571, 1136, 6762, 6571, 29879, 4286, 4830, 29898, 2467, 29918, 2248, 29892, 21099, 919, 29918, 20404, 29889, 517, 29883, 22130, 13, 9651, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 5501, 2467, 6571, 1275, 9166, 2751, 5852, 954, 353, 24335, 21099, 919, 954, 353, 6571, 1275, 4936, 1360, 2433, 29889, 4830, 29898, 13, 18884, 3158, 29918, 2248, 29892, 5574, 29918, 1949, 29892, 1457, 8009, 876, 13, 13, 9651, 565, 1583, 29889, 7620, 29918, 9902, 1275, 5852, 29901, 13, 18884, 1583, 29889, 7620, 29918, 1639, 13847, 29918, 690, 329, 3137, 29898, 2467, 29918, 2248, 29897, 13, 13, 4706, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 2683, 9072, 29899, 12881, 3276, 13955, 29950, 29940, 29918, 23084, 919, 29889, 23084, 919, 580, 1418, 10066, 353, 6571, 2683, 9072, 29899, 4286, 4830, 29898, 1311, 29889, 29881, 2075, 264, 876, 13, 13, 4706, 396, 4231, 3276, 29871, 31366, 30494, 30743, 30744, 30417, 30210, 31466, 31565, 30214, 30982, 30946, 30878, 234, 190, 139, 31320, 30801, 29892, 31295, 31174, 30448, 30850, 31183, 234, 162, 174, 30724, 13, 4706, 2436, 29918, 1272, 29918, 517, 29918, 3126, 29918, 1445, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 1583, 29889, 1445, 29918, 978, 29892, 1583, 29889, 2467, 29918, 14538, 29892, 1583, 29889, 15501, 29892, 934, 29918, 7620, 29918, 978, 29922, 1311, 29889, 1445, 29918, 7620, 29918, 978, 29918, 11083, 29918, 4557, 29918, 7364, 1598, 29897, 13, 13, 4706, 396, 29871, 31393, 30763, 30928, 31694, 233, 141, 168, 31785, 31273, 31264, 30878, 234, 190, 139, 31320, 30801, 13, 4706, 1583, 29889, 2467, 29918, 14538, 353, 1583, 29889, 4557, 29918, 7364, 3709, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 1311, 29889, 1445, 29918, 7620, 29918, 978, 29918, 11083, 29918, 4557, 29918, 7364, 1598, 718, 1583, 29889, 1445, 29918, 978, 8106, 1621, 1598, 580, 13, 4706, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 14191, 3730, 22914, 1598, 3694, 5034, 304, 3023, 24921, 3461, 1495, 13, 4706, 2436, 29918, 1272, 29918, 517, 29918, 3126, 29918, 1445, 29898, 1311, 29889, 4632, 29918, 2084, 29892, 1583, 29889, 1445, 29918, 978, 29892, 1583, 29889, 2467, 29918, 14538, 29892, 1583, 29889, 15501, 29892, 934, 29918, 7620, 29918, 978, 29922, 1311, 29889, 1445, 29918, 7620, 29918, 978, 29918, 7045, 29918, 4557, 29918, 7364, 1598, 29897, 13, 13, 4706, 396, 29871, 31666, 31393, 30763, 1123, 1367, 31141, 232, 193, 132, 232, 139, 149, 30748, 30888, 30861, 31122, 30267, 13, 4706, 1583, 29889, 19594, 29918, 3396, 29918, 2492, 29879, 580, 13, 13, 1678, 822, 4078, 29918, 1639, 13847, 29918, 690, 329, 3137, 29898, 1311, 29892, 3158, 29918, 2248, 1125, 13, 4706, 14550, 30998, 31951, 30287, 30936, 31466, 31565, 30210, 31320, 30801, 30982, 30946, 30557, 30805, 30267, 12008, 13, 4706, 19697, 29918, 690, 329, 3137, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 1639, 13847, 29918, 9902, 29918, 3972, 5501, 8875, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 1639, 13847, 29918, 690, 329, 3137, 29918, 2084, 29892, 28997, 29918, 554, 29922, 5574, 29897, 13, 4706, 4390, 29918, 1445, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1639, 13847, 29918, 690, 329, 3137, 29918, 2084, 29892, 22372, 2403, 2467, 29918, 1272, 29889, 3126, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 4706, 411, 1722, 29898, 3126, 29918, 1445, 5501, 29893, 1495, 408, 285, 29901, 13, 9651, 4390, 29889, 15070, 29898, 1311, 29889, 2467, 29918, 14538, 29892, 29888, 29897, 13, 13, 1678, 822, 2254, 29918, 1639, 13847, 29918, 690, 329, 3137, 29898, 1311, 29892, 3158, 29918, 2248, 1125, 13, 4706, 14550, 30998, 30275, 31016, 31320, 30801, 235, 178, 190, 30683, 30544, 30805, 12008, 13, 4706, 19697, 29918, 690, 329, 3137, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 1639, 13847, 29918, 9902, 29918, 3972, 29892, 525, 8875, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 1639, 13847, 29918, 690, 329, 3137, 29918, 2084, 29892, 1863, 29918, 554, 29922, 5574, 29897, 13, 4706, 4390, 29918, 1445, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1639, 13847, 29918, 690, 329, 3137, 29918, 2084, 29892, 22372, 2403, 2467, 29918, 1272, 29889, 3126, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 4706, 411, 1722, 29898, 3126, 29918, 1445, 29892, 525, 29878, 1495, 408, 285, 29901, 13, 9651, 1583, 29889, 2467, 29918, 14538, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 13, 13, 13, 1678, 822, 14690, 29918, 19594, 29918, 3972, 29879, 29898, 1311, 29892, 4078, 29918, 3972, 29892, 954, 29918, 25932, 1125, 13, 4706, 14550, 13, 4706, 4078, 29918, 3972, 584, 29871, 30982, 30946, 30748, 30832, 31320, 30801, 30210, 31393, 30895, 31283, 13, 4706, 954, 29918, 25932, 584, 29871, 30748, 30832, 30210, 30354, 31180, 30214, 31893, 30832, 30354, 13, 4706, 14550, 13, 4706, 363, 474, 297, 3464, 29898, 1949, 29918, 25932, 1125, 13, 9651, 1014, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 3972, 29892, 851, 29898, 29875, 876, 13, 9651, 565, 2897, 29889, 2084, 29889, 9933, 29898, 1491, 29918, 3972, 1125, 13, 18884, 528, 4422, 29889, 1758, 8336, 29898, 1491, 29918, 3972, 29897, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 1491, 29918, 3972, 29892, 1863, 29918, 554, 29922, 5574, 29897, 13, 13, 1678, 822, 5706, 29918, 3396, 29918, 2492, 29879, 29898, 1311, 1125, 13, 4706, 14550, 30505, 235, 194, 192, 235, 187, 173, 31320, 30801, 30210, 31359, 234, 164, 131, 30577, 30429, 30214, 30486, 30494, 232, 147, 135, 30502, 30846, 30732, 30210, 30888, 30861, 31122, 30267, 12008, 13, 4706, 565, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 1125, 13, 9651, 528, 4422, 29889, 1758, 8336, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29897, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29897, 13, 13, 4706, 383, 1988, 29877, 1664, 353, 1583, 29889, 29943, 1988, 29877, 1664, 29918, 3972, 13, 4706, 565, 2897, 29889, 2084, 29889, 9933, 29898, 29943, 1988, 29877, 1664, 1125, 13, 9651, 1596, 877, 8875, 4864, 4286, 4830, 29898, 29943, 1988, 29877, 1664, 876, 13, 9651, 3158, 29918, 2248, 267, 353, 2897, 29889, 1761, 3972, 29898, 29943, 1988, 29877, 1664, 29897, 13, 9651, 3158, 29918, 2248, 267, 353, 12705, 29898, 2467, 29918, 2248, 267, 29892, 1820, 29922, 2892, 921, 29901, 938, 29898, 29916, 876, 13, 9651, 363, 3158, 29918, 2248, 297, 3158, 29918, 2248, 267, 29901, 13, 18884, 3158, 29918, 3972, 353, 2897, 29889, 2084, 29889, 7122, 29898, 29943, 1988, 29877, 1664, 29892, 525, 8875, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 18884, 565, 2897, 29889, 2084, 29889, 9933, 29898, 2467, 29918, 3972, 1125, 13, 462, 1678, 3646, 29918, 949, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 2467, 29918, 3972, 29892, 525, 29900, 29889, 6173, 1495, 13, 462, 1678, 3646, 29918, 7620, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29892, 22372, 1836, 6173, 4286, 4830, 29898, 2467, 29918, 2248, 876, 13, 462, 1678, 528, 4422, 29889, 8552, 29898, 5182, 29918, 949, 29918, 2084, 29892, 3646, 29918, 7620, 29918, 2084, 29897, 13, 4706, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 7597, 29950, 29940, 29918, 23084, 919, 29889, 17158, 29918, 3396, 29918, 2492, 29879, 580, 4231, 3276, 1495, 13, 13, 1678, 822, 9867, 29918, 3396, 29918, 2492, 29879, 29898, 1311, 1125, 13, 4706, 14550, 13, 308, 12, 29901, 3207, 830, 1367, 29901, 830, 1367, 1904, 13, 308, 12, 29901, 3207, 830, 1367, 29907, 16434, 29901, 830, 1367, 10822, 13, 308, 12, 29901, 3207, 1667, 29918, 2492, 29918, 3972, 29901, 450, 4516, 4078, 278, 527, 3174, 607, 278, 19607, 825, 304, 9867, 29889, 13, 308, 12, 29901, 3207, 3158, 29918, 14538, 29901, 13, 308, 12, 29901, 3207, 4078, 29918, 3972, 29901, 13, 308, 12, 29901, 3207, 954, 29918, 25932, 29901, 920, 1784, 4413, 393, 278, 19607, 864, 1738, 13, 308, 12, 29901, 2457, 29901, 13, 308, 12, 12008, 13, 4706, 396, 29871, 31466, 30594, 30943, 13, 4706, 9867, 29918, 3396, 29918, 2492, 29879, 29918, 20404, 353, 29168, 580, 13, 4706, 9867, 29918, 3396, 29918, 2492, 29879, 29918, 20404, 29889, 29873, 293, 580, 13, 13, 4706, 14550, 30505, 235, 194, 192, 235, 187, 173, 31320, 30801, 30210, 31359, 234, 164, 131, 30577, 30429, 30214, 30486, 30494, 232, 147, 135, 30502, 30846, 30732, 30210, 30888, 30861, 31122, 30267, 12008, 13, 4706, 1583, 29889, 17158, 29918, 3396, 29918, 2492, 29879, 580, 13, 13, 4706, 396, 29871, 31441, 30886, 1123, 1367, 31382, 30883, 13, 4706, 1583, 29889, 1123, 1367, 353, 830, 1367, 29918, 3195, 29898, 1311, 29889, 1123, 1367, 29907, 16434, 29897, 13, 4706, 1583, 29889, 1123, 1367, 29889, 29883, 6191, 580, 13, 13, 4706, 396, 1207, 17525, 304, 4078, 278, 9867, 287, 527, 3174, 29889, 13, 4706, 3158, 29918, 14538, 353, 1583, 29889, 2467, 29918, 14538, 13, 13, 4706, 396, 29871, 31632, 30429, 30417, 30928, 30832, 30895, 31062, 30313, 30834, 30214, 31441, 30886, 30928, 30502, 30319, 30333, 30631, 232, 167, 188, 13, 4706, 4078, 29918, 3972, 353, 1583, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 13, 4706, 1583, 29889, 11256, 29918, 19594, 29918, 3972, 29879, 29898, 7620, 29918, 3972, 29892, 1583, 29889, 1949, 29918, 25932, 29897, 13, 13, 4706, 14550, 6572, 5014, 278, 527, 3174, 1434, 830, 1367, 12008, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 1125, 13, 9651, 12020, 7865, 2392, 703, 1576, 1667, 29918, 2492, 29918, 3972, 338, 451, 429, 1169, 1159, 13, 13, 4706, 14550, 30783, 30698, 31573, 30752, 1123, 1367, 31222, 234, 190, 159, 30210, 30861, 31122, 31174, 30448, 236, 165, 135, 31548, 30687, 12008, 13, 4706, 527, 3174, 29918, 2378, 29879, 29918, 497, 29892, 10153, 29918, 7039, 29918, 497, 353, 830, 1367, 29918, 2492, 29879, 29918, 1359, 29918, 1609, 29918, 5184, 29918, 392, 29918, 21694, 29898, 1311, 29889, 1123, 1367, 29907, 16434, 29892, 1583, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29892, 1583, 29889, 2467, 29918, 14538, 29897, 13, 13, 4706, 396, 29871, 30748, 30494, 30888, 31915, 31977, 236, 155, 162, 13, 4706, 1067, 29879, 29918, 690, 29918, 497, 353, 11117, 11184, 2396, 29871, 29900, 29892, 525, 29909, 1582, 2396, 29871, 29906, 29913, 396, 29871, 30888, 236, 155, 162, 30982, 30946, 30505, 30658, 31977, 30502, 30333, 30631, 232, 167, 188, 29871, 29900, 29871, 30503, 29871, 29896, 30214, 29871, 31915, 236, 155, 162, 30982, 30946, 30505, 30822, 31977, 30502, 30333, 30631, 232, 167, 188, 29871, 29906, 29871, 30503, 29871, 29941, 13, 4706, 363, 1920, 273, 3220, 29892, 8583, 1542, 297, 26985, 18959, 11184, 742, 525, 29909, 1582, 2033, 1125, 13, 13, 9651, 527, 3174, 29918, 2378, 29879, 353, 527, 3174, 29918, 2378, 29879, 29918, 497, 29961, 19409, 1542, 29962, 13, 9651, 10153, 29918, 7039, 353, 10153, 29918, 7039, 29918, 497, 29961, 19409, 1542, 29962, 13, 9651, 1067, 29879, 29918, 690, 353, 1067, 29879, 29918, 690, 29918, 497, 29961, 19409, 1542, 29962, 13, 9651, 599, 29918, 1725, 1446, 353, 5159, 396, 29871, 30406, 30805, 30946, 232, 133, 171, 232, 147, 135, 30502, 30846, 30732, 30888, 30861, 31122, 30210, 1123, 1367, 31141, 232, 193, 132, 13, 9651, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 13, 18884, 363, 527, 3174, 29918, 2378, 297, 527, 3174, 29918, 2378, 29879, 29901, 13, 462, 1678, 527, 3174, 29918, 2378, 353, 527, 3174, 29918, 2378, 29889, 517, 877, 29883, 6191, 1495, 13, 462, 1678, 1238, 1446, 353, 1583, 29889, 1123, 1367, 29898, 2492, 29879, 29918, 2378, 467, 21970, 2141, 23749, 2141, 25027, 391, 580, 13, 462, 1678, 599, 29918, 1725, 1446, 29889, 21843, 29898, 1725, 1446, 29897, 13, 13, 9651, 3309, 353, 7431, 29898, 497, 29918, 1725, 1446, 29897, 13, 9651, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 830, 1367, 4733, 1919, 12711, 526, 6571, 8820, 310, 8583, 1542, 6571, 864, 304, 367, 628, 29873, 411, 29889, 4286, 4830, 29898, 2848, 29892, 19409, 1542, 876, 13, 13, 9651, 14550, 31393, 30763, 1123, 1367, 31141, 232, 193, 132, 30214, 31174, 30448, 30748, 30832, 30214, 30748, 30494, 1949, 29918, 25932, 30832, 29892, 29871, 31649, 30998, 30503, 31539, 31911, 12008, 13, 9651, 3566, 1860, 29892, 8783, 353, 413, 29918, 1004, 550, 29898, 497, 29918, 1725, 1446, 29892, 29871, 29906, 29897, 13, 13, 9651, 14550, 31393, 30763, 30748, 30832, 31320, 30801, 30214, 30998, 30861, 31122, 31590, 30333, 30631, 232, 167, 188, 30748, 30832, 12008, 13, 9651, 363, 2380, 29892, 1067, 29879, 297, 26985, 29898, 16645, 1860, 1125, 13, 18884, 1067, 29879, 4619, 1067, 29879, 29918, 690, 396, 29871, 30744, 30698, 30982, 30946, 30210, 30333, 30631, 232, 167, 188, 30210, 31463, 30850, 13, 18884, 396, 29871, 30392, 31191, 30417, 235, 178, 137, 232, 139, 174, 30494, 31134, 30651, 30850, 31183, 233, 166, 131, 31851, 30573, 232, 138, 137, 30267, 13, 18884, 565, 938, 29898, 2467, 29918, 14538, 29961, 524, 29898, 2492, 29918, 7039, 29961, 2248, 2314, 22322, 1949, 11287, 1275, 448, 29896, 470, 320, 13, 462, 4706, 3158, 29918, 14538, 29961, 524, 29898, 2492, 29918, 7039, 29961, 2248, 2314, 22322, 1949, 2033, 1275, 6213, 29901, 13, 13, 462, 1678, 528, 4422, 29889, 8552, 1445, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29892, 10153, 29918, 7039, 29961, 2248, 29962, 718, 15300, 6173, 5477, 13, 462, 462, 1678, 2897, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 3972, 5501, 8875, 4286, 4830, 29898, 25932, 511, 29915, 29912, 2403, 29889, 6173, 4286, 4830, 29898, 2492, 29918, 7039, 29961, 2248, 29962, 4961, 13, 18884, 1683, 29901, 13, 462, 1678, 528, 4422, 29889, 8552, 1445, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 3396, 29918, 2492, 29879, 29918, 3972, 29892, 10153, 29918, 7039, 29961, 2248, 29962, 718, 15300, 6173, 5477, 13, 462, 462, 1678, 2897, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 3972, 5501, 8875, 4286, 4830, 29898, 25932, 511, 29915, 29912, 3227, 1836, 6173, 4286, 4830, 29898, 2492, 29918, 7039, 29961, 2248, 1402, 3158, 29918, 14538, 29961, 524, 29898, 2492, 29918, 7039, 29961, 2248, 2314, 22322, 1949, 2033, 4961, 13, 13, 18884, 3158, 29918, 14538, 29961, 524, 29898, 2492, 29918, 7039, 29961, 2248, 2314, 22322, 14318, 2033, 353, 851, 29898, 25932, 29897, 13, 13, 4706, 1583, 29889, 2467, 29918, 14538, 353, 3158, 29918, 14538, 13, 4706, 1583, 29889, 21707, 29889, 1188, 29898, 29906, 29946, 29892, 525, 7597, 29950, 29940, 29918, 23084, 919, 29889, 19594, 29918, 3396, 29918, 2492, 29879, 580, 4231, 3276, 30214, 1136, 6762, 6571, 29879, 4286, 4830, 29898, 19594, 29918, 3396, 29918, 2492, 29879, 29918, 20404, 29889, 517, 29883, 22130, 13, 13, 2 ]
tests/test_binary_sensor.py
dermotduffy/hass-motioneye
13
71879
"""Tests for the motionEye binary sensor platform.""" from __future__ import annotations import datetime from datetime import timedelta import logging from unittest.mock import patch from pytest_homeassistant_custom_component.common import async_fire_time_changed from custom_components.motioneye import get_motioneye_device_identifier from custom_components.motioneye.const import ( CONF_EVENT_DURATION, DOMAIN, EVENT_FILE_STORED, EVENT_MOTION_DETECTED, TYPE_MOTIONEYE_MOTION_BINARY_SENSOR, ) from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DOMAIN as BINARY_SENSOR_DOMAIN, ) from homeassistant.const import CONF_DEVICE_ID from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er import homeassistant.util.dt as dt_util from . import ( TEST_BINARY_SENSOR_FILE_STORED_ENTITY_ID, TEST_BINARY_SENSOR_MOTION_ENTITY_ID, TEST_CAMERA_ID, create_mock_motioneye_client, register_test_entity, setup_mock_motioneye_config_entry, ) _LOGGER = logging.getLogger(__name__) async def test_binary_sensor_events(hass: HomeAssistant) -> None: """Test the actions sensor.""" async def fire_event( now: datetime.datetime, event_type: str, device_id: str | None = None ) -> None: """Fire an event.""" with patch("homeassistant.helpers.event.dt_util.utcnow", return_value=now): hass.bus.async_fire( f"{DOMAIN}.{event_type}", {CONF_DEVICE_ID: device_id} if device_id else {}, ) await hass.async_block_till_done() register_test_entity( hass, BINARY_SENSOR_DOMAIN, TEST_CAMERA_ID, TYPE_MOTIONEYE_MOTION_BINARY_SENSOR, TEST_BINARY_SENSOR_MOTION_ENTITY_ID, ) device_registry = dr.async_get(hass) client = create_mock_motioneye_client() config_entry = await setup_mock_motioneye_config_entry(hass, client=client) device_identifer = get_motioneye_device_identifier( config_entry.entry_id, TEST_CAMERA_ID ) device = device_registry.async_get_device({device_identifer}) assert device now = dt_util.utcnow() # Ensure it starts off... entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "off" # ... motion is detected ... await fire_event(now, EVENT_MOTION_DETECTED, device.id) # ... state should now be on ... entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "on" # ... 10 seconds elapses ... now += timedelta(seconds=10) async_fire_time_changed(hass, now) await hass.async_block_till_done() # ... still should still be on ... entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "on" # ... motion is detected again ... await fire_event(now, EVENT_MOTION_DETECTED, device.id) # ... 21 seconds later it should still be on ... now += timedelta(seconds=21) async_fire_time_changed(hass, now) await hass.async_block_till_done() entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "on" # ... but after a further 10 seconds it should be back off. now += timedelta(seconds=10) async_fire_time_changed(hass, now) await hass.async_block_till_done() entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "off" # Now a different device detects motion. await fire_event(now, EVENT_MOTION_DETECTED, "different-id") entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "off" # Test storing a file. await fire_event(now, EVENT_FILE_STORED, device.id) entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "off" entity_state = hass.states.get(TEST_BINARY_SENSOR_FILE_STORED_ENTITY_ID) assert entity_state assert entity_state.state == "on" now += timedelta(seconds=31) async_fire_time_changed(hass, now) await hass.async_block_till_done() entity_state = hass.states.get(TEST_BINARY_SENSOR_FILE_STORED_ENTITY_ID) assert entity_state assert entity_state.state == "off" # Test missing device id. await fire_event(now, EVENT_FILE_STORED) entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "off" entity_state = hass.states.get(TEST_BINARY_SENSOR_FILE_STORED_ENTITY_ID) assert entity_state assert entity_state.state == "off" # Reload with a larger event duration. with patch( "custom_components.motioneye.MotionEyeClient", return_value=client, ): hass.config_entries.async_update_entry( config_entry, options={CONF_EVENT_DURATION: 600} ) await hass.async_block_till_done() await fire_event(now, EVENT_MOTION_DETECTED, device.id) now += timedelta(seconds=32) async_fire_time_changed(hass, now) await hass.async_block_till_done() entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.state == "on" async def test_binary_sensor_device_info(hass: HomeAssistant) -> None: """Verify device information includes expected details.""" config_entry = await setup_mock_motioneye_config_entry(hass) device_identifer = get_motioneye_device_identifier( config_entry.entry_id, TEST_CAMERA_ID ) device_registry = dr.async_get(hass) device = device_registry.async_get_device({device_identifer}) assert device entity_registry = await er.async_get_registry(hass) entities_from_device = [ entry.entity_id for entry in er.async_entries_for_device(entity_registry, device.id) ] assert TEST_BINARY_SENSOR_MOTION_ENTITY_ID in entities_from_device async def test_binary_sensor_device_class(hass: HomeAssistant) -> None: """Verify device information includes expected details.""" await setup_mock_motioneye_config_entry(hass) entity_state = hass.states.get(TEST_BINARY_SENSOR_MOTION_ENTITY_ID) assert entity_state assert entity_state.attributes.get("device_class") == DEVICE_CLASS_MOTION entity_state = hass.states.get(TEST_BINARY_SENSOR_FILE_STORED_ENTITY_ID) assert entity_state assert "device_class" not in entity_state.attributes
[ 1, 9995, 24376, 363, 278, 10884, 29923, 4099, 7581, 23530, 7481, 1213, 15945, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 5215, 12865, 13, 3166, 12865, 1053, 5335, 287, 2554, 13, 5215, 12183, 13, 3166, 443, 27958, 29889, 17640, 1053, 13261, 13, 13, 3166, 11451, 1688, 29918, 5184, 465, 22137, 29918, 6341, 29918, 9700, 29889, 9435, 1053, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 13, 13, 3166, 2888, 29918, 14036, 29889, 29885, 8194, 1032, 29872, 1053, 679, 29918, 29885, 8194, 1032, 29872, 29918, 10141, 29918, 25378, 13, 3166, 2888, 29918, 14036, 29889, 29885, 8194, 1032, 29872, 29889, 3075, 1053, 313, 13, 1678, 8707, 29943, 29918, 22240, 3919, 29918, 29928, 4574, 8098, 29892, 13, 1678, 11662, 29032, 29892, 13, 1678, 382, 29963, 3919, 29918, 7724, 29918, 1254, 29949, 19386, 29892, 13, 1678, 382, 29963, 3919, 29918, 29924, 2891, 2725, 29918, 2287, 4330, 1783, 3352, 29892, 13, 1678, 323, 6959, 29918, 29924, 2891, 2725, 13282, 29923, 29918, 29924, 2891, 2725, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29892, 13, 29897, 13, 3166, 3271, 465, 22137, 29889, 14036, 29889, 19541, 29918, 29879, 6073, 1053, 313, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29924, 2891, 2725, 29892, 13, 1678, 11662, 29032, 408, 350, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 3970, 29032, 29892, 13, 29897, 13, 3166, 3271, 465, 22137, 29889, 3075, 1053, 8707, 29943, 29918, 2287, 19059, 29918, 1367, 13, 3166, 3271, 465, 22137, 29889, 3221, 1053, 8778, 7900, 22137, 13, 3166, 3271, 465, 22137, 29889, 3952, 6774, 1053, 4742, 29918, 1727, 6020, 408, 4192, 29892, 7855, 29918, 1727, 6020, 408, 604, 13, 5215, 3271, 465, 22137, 29889, 4422, 29889, 6008, 408, 11636, 29918, 4422, 13, 13, 3166, 869, 1053, 313, 13, 1678, 17067, 1254, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 7724, 29918, 1254, 29949, 19386, 29918, 3919, 11937, 29918, 1367, 29892, 13, 1678, 17067, 1254, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29892, 13, 1678, 17067, 1254, 29918, 29907, 5194, 1001, 29909, 29918, 1367, 29892, 13, 1678, 1653, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 4645, 29892, 13, 1678, 6036, 29918, 1688, 29918, 10041, 29892, 13, 1678, 6230, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 2917, 29918, 8269, 29892, 13, 29897, 13, 13, 29918, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 12674, 822, 1243, 29918, 19541, 29918, 29879, 6073, 29918, 13604, 29898, 29882, 465, 29901, 8778, 7900, 22137, 29897, 1599, 6213, 29901, 13, 1678, 9995, 3057, 278, 8820, 23530, 1213, 15945, 13, 13, 1678, 7465, 822, 3974, 29918, 3696, 29898, 13, 4706, 1286, 29901, 12865, 29889, 12673, 29892, 1741, 29918, 1853, 29901, 851, 29892, 4742, 29918, 333, 29901, 851, 891, 6213, 353, 6213, 13, 1678, 1723, 1599, 6213, 29901, 13, 4706, 9995, 18654, 385, 1741, 1213, 15945, 13, 4706, 411, 13261, 703, 5184, 465, 22137, 29889, 3952, 6774, 29889, 3696, 29889, 6008, 29918, 4422, 29889, 329, 29883, 3707, 613, 736, 29918, 1767, 29922, 3707, 1125, 13, 9651, 298, 465, 29889, 8262, 29889, 12674, 29918, 8696, 29898, 13, 18884, 285, 29908, 29912, 3970, 29032, 1836, 29912, 3696, 29918, 1853, 17671, 13, 18884, 426, 6007, 29943, 29918, 2287, 19059, 29918, 1367, 29901, 4742, 29918, 333, 29913, 565, 4742, 29918, 333, 1683, 24335, 13, 9651, 1723, 13, 9651, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 6036, 29918, 1688, 29918, 10041, 29898, 13, 4706, 298, 465, 29892, 13, 4706, 350, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 3970, 29032, 29892, 13, 4706, 17067, 1254, 29918, 29907, 5194, 1001, 29909, 29918, 1367, 29892, 13, 4706, 323, 6959, 29918, 29924, 2891, 2725, 13282, 29923, 29918, 29924, 2891, 2725, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29892, 13, 4706, 17067, 1254, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29892, 13, 1678, 1723, 13, 13, 1678, 4742, 29918, 1727, 6020, 353, 4192, 29889, 12674, 29918, 657, 29898, 29882, 465, 29897, 13, 1678, 3132, 353, 1653, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 4645, 580, 13, 1678, 2295, 29918, 8269, 353, 7272, 6230, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 2917, 29918, 8269, 29898, 29882, 465, 29892, 3132, 29922, 4645, 29897, 13, 1678, 4742, 29918, 1693, 9633, 353, 679, 29918, 29885, 8194, 1032, 29872, 29918, 10141, 29918, 25378, 29898, 13, 4706, 2295, 29918, 8269, 29889, 8269, 29918, 333, 29892, 17067, 1254, 29918, 29907, 5194, 1001, 29909, 29918, 1367, 13, 1678, 1723, 13, 1678, 4742, 353, 4742, 29918, 1727, 6020, 29889, 12674, 29918, 657, 29918, 10141, 3319, 10141, 29918, 1693, 9633, 1800, 13, 1678, 4974, 4742, 13, 13, 1678, 1286, 353, 11636, 29918, 4422, 29889, 329, 29883, 3707, 580, 13, 13, 1678, 396, 22521, 545, 372, 8665, 1283, 856, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 396, 2023, 10884, 338, 17809, 2023, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 29924, 2891, 2725, 29918, 2287, 4330, 1783, 3352, 29892, 4742, 29889, 333, 29897, 13, 13, 1678, 396, 2023, 2106, 881, 1286, 367, 373, 2023, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 265, 29908, 13, 13, 1678, 396, 2023, 29871, 29896, 29900, 6923, 560, 2547, 267, 2023, 13, 1678, 1286, 4619, 5335, 287, 2554, 29898, 23128, 29922, 29896, 29900, 29897, 13, 1678, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 29898, 29882, 465, 29892, 1286, 29897, 13, 1678, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 396, 2023, 1603, 881, 1603, 367, 373, 2023, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 265, 29908, 13, 13, 1678, 396, 2023, 10884, 338, 17809, 1449, 2023, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 29924, 2891, 2725, 29918, 2287, 4330, 1783, 3352, 29892, 4742, 29889, 333, 29897, 13, 13, 1678, 396, 2023, 29871, 29906, 29896, 6923, 2678, 372, 881, 1603, 367, 373, 2023, 13, 1678, 1286, 4619, 5335, 287, 2554, 29898, 23128, 29922, 29906, 29896, 29897, 13, 1678, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 29898, 29882, 465, 29892, 1286, 29897, 13, 1678, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 265, 29908, 13, 13, 1678, 396, 2023, 541, 1156, 263, 4340, 29871, 29896, 29900, 6923, 372, 881, 367, 1250, 1283, 29889, 13, 1678, 1286, 4619, 5335, 287, 2554, 29898, 23128, 29922, 29896, 29900, 29897, 13, 1678, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 29898, 29882, 465, 29892, 1286, 29897, 13, 1678, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 396, 2567, 263, 1422, 4742, 6459, 29879, 10884, 29889, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 29924, 2891, 2725, 29918, 2287, 4330, 1783, 3352, 29892, 376, 29881, 15622, 29899, 333, 1159, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 396, 4321, 15446, 263, 934, 29889, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 7724, 29918, 1254, 29949, 19386, 29892, 4742, 29889, 333, 29897, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 7724, 29918, 1254, 29949, 19386, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 265, 29908, 13, 13, 1678, 1286, 4619, 5335, 287, 2554, 29898, 23128, 29922, 29941, 29896, 29897, 13, 1678, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 29898, 29882, 465, 29892, 1286, 29897, 13, 1678, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 7724, 29918, 1254, 29949, 19386, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 396, 4321, 4567, 4742, 1178, 29889, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 7724, 29918, 1254, 29949, 19386, 29897, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 7724, 29918, 1254, 29949, 19386, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 2696, 29908, 13, 13, 1678, 396, 6376, 29877, 328, 411, 263, 7200, 1741, 14385, 29889, 13, 1678, 411, 13261, 29898, 13, 4706, 376, 6341, 29918, 14036, 29889, 29885, 8194, 1032, 29872, 29889, 29924, 8194, 29923, 4099, 4032, 613, 13, 4706, 736, 29918, 1767, 29922, 4645, 29892, 13, 268, 1125, 13, 4706, 298, 465, 29889, 2917, 29918, 26586, 29889, 12674, 29918, 5504, 29918, 8269, 29898, 13, 9651, 2295, 29918, 8269, 29892, 3987, 3790, 6007, 29943, 29918, 22240, 3919, 29918, 29928, 4574, 8098, 29901, 29871, 29953, 29900, 29900, 29913, 13, 4706, 1723, 13, 4706, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 7272, 3974, 29918, 3696, 29898, 3707, 29892, 382, 29963, 3919, 29918, 29924, 2891, 2725, 29918, 2287, 4330, 1783, 3352, 29892, 4742, 29889, 333, 29897, 13, 1678, 1286, 4619, 5335, 287, 2554, 29898, 23128, 29922, 29941, 29906, 29897, 13, 1678, 7465, 29918, 8696, 29918, 2230, 29918, 15033, 29898, 29882, 465, 29892, 1286, 29897, 13, 1678, 7272, 298, 465, 29889, 12674, 29918, 1271, 29918, 29873, 453, 29918, 15091, 580, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 3859, 1275, 376, 265, 29908, 13, 13, 13, 12674, 822, 1243, 29918, 19541, 29918, 29879, 6073, 29918, 10141, 29918, 3888, 29898, 29882, 465, 29901, 8778, 7900, 22137, 29897, 1599, 6213, 29901, 13, 1678, 9995, 6565, 1598, 4742, 2472, 7805, 3806, 4902, 1213, 15945, 13, 1678, 2295, 29918, 8269, 353, 7272, 6230, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 2917, 29918, 8269, 29898, 29882, 465, 29897, 13, 13, 1678, 4742, 29918, 1693, 9633, 353, 679, 29918, 29885, 8194, 1032, 29872, 29918, 10141, 29918, 25378, 29898, 13, 4706, 2295, 29918, 8269, 29889, 8269, 29918, 333, 29892, 17067, 1254, 29918, 29907, 5194, 1001, 29909, 29918, 1367, 13, 1678, 1723, 13, 13, 1678, 4742, 29918, 1727, 6020, 353, 4192, 29889, 12674, 29918, 657, 29898, 29882, 465, 29897, 13, 1678, 4742, 353, 4742, 29918, 1727, 6020, 29889, 12674, 29918, 657, 29918, 10141, 3319, 10141, 29918, 1693, 9633, 1800, 13, 1678, 4974, 4742, 13, 13, 1678, 7855, 29918, 1727, 6020, 353, 7272, 604, 29889, 12674, 29918, 657, 29918, 1727, 6020, 29898, 29882, 465, 29897, 13, 1678, 16212, 29918, 3166, 29918, 10141, 353, 518, 13, 4706, 6251, 29889, 10041, 29918, 333, 13, 4706, 363, 6251, 297, 604, 29889, 12674, 29918, 26586, 29918, 1454, 29918, 10141, 29898, 10041, 29918, 1727, 6020, 29892, 4742, 29889, 333, 29897, 13, 1678, 4514, 13, 1678, 4974, 17067, 1254, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 297, 16212, 29918, 3166, 29918, 10141, 13, 13, 13, 12674, 822, 1243, 29918, 19541, 29918, 29879, 6073, 29918, 10141, 29918, 1990, 29898, 29882, 465, 29901, 8778, 7900, 22137, 29897, 1599, 6213, 29901, 13, 1678, 9995, 6565, 1598, 4742, 2472, 7805, 3806, 4902, 1213, 15945, 13, 1678, 7272, 6230, 29918, 17640, 29918, 29885, 8194, 1032, 29872, 29918, 2917, 29918, 8269, 29898, 29882, 465, 29897, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 29924, 2891, 2725, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 7855, 29918, 3859, 29889, 15697, 29889, 657, 703, 10141, 29918, 1990, 1159, 1275, 5012, 19059, 29918, 13875, 1799, 29918, 29924, 2891, 2725, 13, 13, 1678, 7855, 29918, 3859, 353, 298, 465, 29889, 28631, 29889, 657, 29898, 18267, 29918, 29933, 1177, 19926, 29918, 29903, 1430, 29903, 1955, 29918, 7724, 29918, 1254, 29949, 19386, 29918, 3919, 11937, 29918, 1367, 29897, 13, 1678, 4974, 7855, 29918, 3859, 13, 1678, 4974, 376, 10141, 29918, 1990, 29908, 451, 297, 7855, 29918, 3859, 29889, 15697, 13, 2 ]
datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/windows/__init__.py
tdimnet/integrations-core
663
86764
<reponame>tdimnet/integrations-core # (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import click from ...console import CONTEXT_SETTINGS from .pdh import pdh ALL_COMMANDS = [pdh] @click.group(context_settings=CONTEXT_SETTINGS, short_help='Windows utilities') def windows(): pass for command in ALL_COMMANDS: windows.add_command(command)
[ 1, 529, 276, 1112, 420, 29958, 1594, 326, 1212, 29914, 14146, 800, 29899, 3221, 13, 29937, 313, 29907, 29897, 13373, 328, 468, 29892, 9266, 29889, 29871, 29906, 29900, 29906, 29896, 29899, 6338, 13, 29937, 2178, 10462, 21676, 13, 29937, 10413, 21144, 1090, 263, 29871, 29941, 29899, 16398, 1509, 350, 7230, 3114, 19405, 313, 4149, 365, 2965, 1430, 1660, 29897, 13, 5215, 2828, 13, 13, 3166, 2023, 11058, 1053, 8707, 16975, 29918, 10490, 29911, 4214, 29903, 13, 3166, 869, 29886, 12744, 1053, 10518, 29882, 13, 13, 9818, 29918, 19795, 1529, 2797, 29903, 353, 518, 29886, 12744, 29962, 13, 13, 13, 29992, 3808, 29889, 2972, 29898, 4703, 29918, 11027, 29922, 6007, 16975, 29918, 10490, 29911, 4214, 29903, 29892, 3273, 29918, 8477, 2433, 7685, 3667, 1907, 1495, 13, 1753, 5417, 7295, 13, 1678, 1209, 13, 13, 13, 1454, 1899, 297, 15149, 29918, 19795, 1529, 2797, 29903, 29901, 13, 1678, 5417, 29889, 1202, 29918, 6519, 29898, 6519, 29897, 13, 2 ]
accounts/tests/test_views.py
EliasOPrado/tour-project
7
88347
<filename>accounts/tests/test_views.py from django.test import TestCase, Client from django.shortcuts import redirect from django.urls import reverse from tour_store.models import Destinations from django.utils import timezone from django.contrib.auth.models import User from django.contrib import messages from django.contrib.messages import get_messages class TestView(TestCase): def test_get_register_customer_page(self): #test if the register view is working page = self.client.get("/accounts/register/") self.assertEqual(page.status_code, 200) self.assertTemplateUsed(page, "register.html") def test_registering_a_new_user(self): # test if the register form is working for user page = self.client.get('/accounts/register/', data={'username': 'test', 'email': '<EMAIL>', 'password1': <PASSWORD>', 'password2': <PASSWORD>'}, ) self.assertEqual(page.status_code, 200) self.assertTemplateUsed(page, "register.html") def test_get_login_page(self): # test login url directs to login.html # url to login page = self.client.get("/accounts/login/") # check for a status code 200 self.assertEqual(page.status_code, 200) # check Template Used is login.html self.assertTemplateUsed(page, "login.html") def test_login_view_when_a_user_is_log_in(self): # create a user user = User.objects.create_user('username', '<EMAIL>', 'password') # login self.client.login(username='username', password='password') # url to the login page page = self.client.get("/accounts/login/") # check for a status code 200 self.assertEqual(page.status_code, 200) # check Template Used is profile.html self.assertTemplateUsed(page, 'login.html') def test_logout_view_after_user_already_logged_in(self): #test logout view # create a user user = User.objects.create_user('username', '<EMAIL>', <PASSWORD>') # login self.client.login(username='username', password='<PASSWORD>') # url to the logout page page = self.client.get("/accounts/logout/", follow=True) # check for a status code 302 self.assertEqual(page.status_code, 200) # check Template Used is main.html page self.assertTemplateUsed(page, 'main.html') # check the message stored is equal to the expected message messages = list(get_messages(page.wsgi_request)) self.assertEqual(str(messages[0]), 'You have successfully logged out')
[ 1, 529, 9507, 29958, 10149, 29879, 29914, 21150, 29914, 1688, 29918, 7406, 29889, 2272, 13, 3166, 9557, 29889, 1688, 1053, 4321, 8259, 29892, 12477, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 6684, 13, 3166, 9557, 29889, 26045, 1053, 11837, 13, 3166, 6282, 29918, 8899, 29889, 9794, 1053, 15435, 262, 800, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 9794, 1053, 4911, 13, 3166, 9557, 29889, 21570, 1053, 7191, 13, 3166, 9557, 29889, 21570, 29889, 19158, 1053, 679, 29918, 19158, 13, 13, 1990, 4321, 1043, 29898, 3057, 8259, 1125, 13, 13, 268, 822, 1243, 29918, 657, 29918, 9573, 29918, 15539, 29918, 3488, 29898, 1311, 1125, 13, 308, 396, 1688, 565, 278, 6036, 1776, 338, 1985, 13, 4706, 1813, 353, 1583, 29889, 4645, 29889, 657, 11974, 10149, 29879, 29914, 9573, 29914, 1159, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3488, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 3488, 29892, 376, 9573, 29889, 1420, 1159, 13, 13, 268, 822, 1243, 29918, 9573, 292, 29918, 29874, 29918, 1482, 29918, 1792, 29898, 1311, 1125, 13, 4706, 396, 1243, 565, 278, 6036, 883, 338, 1985, 363, 1404, 13, 4706, 1813, 353, 1583, 29889, 4645, 29889, 657, 11219, 10149, 29879, 29914, 9573, 29914, 742, 13, 462, 18884, 848, 3790, 29915, 6786, 2396, 525, 1688, 742, 13, 462, 18884, 525, 5269, 2396, 12801, 26862, 6227, 29958, 742, 13, 462, 462, 525, 5630, 29896, 2396, 529, 25711, 17013, 29958, 742, 13, 462, 462, 525, 5630, 29906, 2396, 529, 25711, 17013, 16299, 1118, 13, 462, 18884, 1723, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3488, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 3488, 29892, 376, 9573, 29889, 1420, 1159, 13, 13, 13, 268, 822, 1243, 29918, 657, 29918, 7507, 29918, 3488, 29898, 1311, 1125, 13, 4706, 396, 1243, 6464, 3142, 1513, 29879, 304, 6464, 29889, 1420, 13, 4706, 396, 3142, 304, 6464, 13, 4706, 1813, 353, 1583, 29889, 4645, 29889, 657, 11974, 10149, 29879, 29914, 7507, 29914, 1159, 13, 4706, 396, 1423, 363, 263, 4660, 775, 29871, 29906, 29900, 29900, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3488, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 396, 1423, 25663, 501, 8485, 338, 6464, 29889, 1420, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 3488, 29892, 376, 7507, 29889, 1420, 1159, 13, 13, 268, 822, 1243, 29918, 7507, 29918, 1493, 29918, 8256, 29918, 29874, 29918, 1792, 29918, 275, 29918, 1188, 29918, 262, 29898, 1311, 1125, 13, 13, 4706, 396, 1653, 263, 1404, 13, 4706, 1404, 353, 4911, 29889, 12650, 29889, 3258, 29918, 1792, 877, 6786, 742, 13, 462, 462, 4706, 12801, 26862, 6227, 29958, 742, 13, 462, 462, 4706, 525, 5630, 1495, 13, 4706, 396, 6464, 13, 4706, 1583, 29889, 4645, 29889, 7507, 29898, 6786, 2433, 6786, 742, 13, 462, 3986, 4800, 2433, 5630, 1495, 13, 4706, 396, 3142, 304, 278, 6464, 1813, 13, 4706, 1813, 353, 1583, 29889, 4645, 29889, 657, 11974, 10149, 29879, 29914, 7507, 29914, 1159, 13, 4706, 396, 1423, 363, 263, 4660, 775, 29871, 29906, 29900, 29900, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3488, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 396, 1423, 25663, 501, 8485, 338, 8722, 29889, 1420, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 3488, 29892, 525, 7507, 29889, 1420, 1495, 13, 13, 268, 822, 1243, 29918, 1188, 449, 29918, 1493, 29918, 7045, 29918, 1792, 29918, 284, 2040, 29918, 1188, 3192, 29918, 262, 29898, 1311, 1125, 13, 4706, 396, 1688, 1480, 449, 1776, 13, 13, 4706, 396, 1653, 263, 1404, 13, 4706, 1404, 353, 4911, 29889, 12650, 29889, 3258, 29918, 1792, 877, 6786, 742, 13, 462, 462, 4706, 12801, 26862, 6227, 29958, 742, 13, 462, 462, 4706, 529, 25711, 17013, 29958, 1495, 13, 4706, 396, 6464, 13, 4706, 1583, 29889, 4645, 29889, 7507, 29898, 6786, 2433, 6786, 742, 13, 462, 3986, 4800, 2433, 29966, 25711, 17013, 29958, 1495, 13, 4706, 396, 3142, 304, 278, 1480, 449, 1813, 13, 4706, 1813, 353, 1583, 29889, 4645, 29889, 657, 11974, 10149, 29879, 29914, 1188, 449, 29914, 613, 1101, 29922, 5574, 29897, 13, 4706, 396, 1423, 363, 263, 4660, 775, 29871, 29941, 29900, 29906, 13, 4706, 1583, 29889, 9294, 9843, 29898, 3488, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 396, 1423, 25663, 501, 8485, 338, 1667, 29889, 1420, 1813, 13, 4706, 1583, 29889, 9294, 6733, 29965, 8485, 29898, 3488, 29892, 525, 3396, 29889, 1420, 1495, 13, 4706, 396, 1423, 278, 2643, 6087, 338, 5186, 304, 278, 3806, 2643, 13, 4706, 7191, 353, 1051, 29898, 657, 29918, 19158, 29898, 3488, 29889, 5652, 3146, 29918, 3827, 876, 13, 4706, 1583, 29889, 9294, 9843, 29898, 710, 29898, 19158, 29961, 29900, 11724, 13, 462, 308, 525, 3492, 505, 8472, 13817, 714, 1495, 13, 2 ]
z2z_metadata/__init__.py
Mitchellpkt/z2z-metadata
0
23832
<gh_stars>0 """Top-level package for z2z Metadata analysis.""" __author__ = """Isthmus // <NAME>""" __email__ = '<EMAIL>' __version__ = '0.0.1'
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 7031, 29899, 5563, 3577, 363, 503, 29906, 29920, 4737, 7221, 7418, 1213, 15945, 13, 13, 1649, 8921, 1649, 353, 9995, 29902, 303, 7184, 375, 849, 529, 5813, 11903, 15945, 13, 1649, 5269, 1649, 353, 12801, 26862, 6227, 16299, 13, 1649, 3259, 1649, 353, 525, 29900, 29889, 29900, 29889, 29896, 29915, 13, 2 ]
Python/Fibonacci.py
kennethsequeira/Hello-world
1
1762
#Doesn't work. import time fibonacci = [1, 1] n = int(input()) while len(fibonacci) < n: fibonacci.append(fibonacci[-1] + fibonacci[-2]) for i in range(n): print(fibonacci[i], end=' ')
[ 1, 396, 25125, 29876, 29915, 29873, 664, 22993, 13, 5215, 931, 30004, 13, 30004, 13, 29888, 747, 265, 21566, 353, 518, 29896, 29892, 29871, 29896, 29962, 30004, 13, 29876, 353, 938, 29898, 2080, 3101, 30004, 13, 8000, 7431, 29898, 29888, 747, 265, 21566, 29897, 529, 302, 29901, 30004, 13, 1678, 18755, 265, 21566, 29889, 4397, 29898, 29888, 747, 265, 21566, 14352, 29896, 29962, 718, 18755, 265, 21566, 14352, 29906, 2314, 30004, 13, 1454, 474, 297, 3464, 29898, 29876, 1125, 30004, 13, 1678, 1596, 29898, 29888, 747, 265, 21566, 29961, 29875, 1402, 1095, 2433, 525, 8443, 13, 2 ]
DynamicProgramming/solution.py
ylyzty/leecode_study
0
80022
from typing import List class Solution: @staticmethod def fib(n: int) -> int: """ Offer 10-I 斐波那契数列 :param n: :return: """ a, b = 0, 1 for _ in range(n): a, b = b, a + b return a % 1000000007 @staticmethod def fib_2(n: int) -> int: a = [0, 1] for i in range(1, n): a.append(a[i - 1] + a[i]) print(a) return a[n] % 100000007 @staticmethod def num_ways(n: int) -> int: """ Offer 10-II 青蛙跳台阶问题 :param n: :return: """ a, b = 1, 1 for _ in range(n): a, b = b, a + b return a @staticmethod def max_profit(prices: List[int]) -> int: """ Offer63 股票最大利润 :param prices: :return: """ if not prices: return 0 res = [0] cheapest = prices[0] for i in range(1, len(prices)): res.append(max(prices[i] - cheapest, res[i - 1])) cheapest = min(cheapest, prices[i]) return res[len(prices) - 1] @staticmethod def max_sub_array(nums: List[int]) -> int: """ Offer 42. 连续子数组的最大和 :param nums: :return: """ if not len(nums): return 0 res = [nums[0]] for i in range(1, len(nums)): res.append(max(res[i - 1] + nums[i], nums[i])) return max(res) @staticmethod def max_value(grid: List[List[int]]) -> int: """ Offer 47. 礼物的最大价值 :param grid: :return: """ row, col = len(grid), len(grid(0)) values = [[0 for x in range(col)] for y in range(row)] values[0][0] = grid[0][0] for i in range(1, col): values[0][i] = values[0][i - 1] + grid[0][i] for j in range(1, row): values[i][0] = values[i - 1][0] + grid[i][0] for i in range(1, row): for j in range(1, col): values[i][j] = max(values[i - 1][j], values[i][j - 1]) + grid[i][j] return values[row - 1][col - 1] @staticmethod def translate_num(num: int) -> int: """ Offer 46. 把数字翻译成字符串 :param num: :return: """ # dp[i]只和dp[i-1]有关, 所以可以省略dp列表 s_num = str(num) a, b = 1, 1 for i in range(1, len(s_num)): a, b = a, (a + b if "10" <= s_num[i - 1:i + 1] <= "25" else b) return b @staticmethod def length_of_longest_substring(s: str) -> int: """ Offer 48. 最长不含重复字符的子字符串 :param s: :return: """ if len(s) <= 1: return len(s) dic = {} dp = [0 for _ in range(len(s))] dp[0], dic[s[0]] = 1, 0 for i in range(1, len(s)): index = dic.get(s[i], -1) if dp[i - 1] < i - index: dp[i] = dp[i - 1] + 1 else: dp[i] = i - index dic[s[i]] = i # 更新哈希表 return max(dp) @staticmethod def length_of_longest_substring_2(s: str) -> int: """ 节省 O(N)的 dp 空间 :param s: :return: """ dic = {} res, temp = 0, 0 for i in range(len(s)): index = dic.get(s[i], -1) if temp < i - index: temp += 1 else: temp = i - index dic[s[i]] = [i] res = max(res, temp) return res @staticmethod def last_remaining(n: int, m: int): """ Offer 62. 圆圈中最后剩下的数字 """ x = 0 for i in range(2, n + 1): x = (x + m) % i return x @staticmethod def dices_probability(n: int) -> List[float]: dp = [[0 for j in range(n)] for i in range(6 * n)] for i in range(6): dp[i][0] = 1 for j in range(1, n): for i in range(j, 6 * (j + 1)): count = 1 while i - count >= 0 and count <= 6: dp[i][j] += dp[i - count][j - 1] count += 1 res = [] for i in range(n-1, 6*n): res.append(dp[i][n-1]) for i in range(len(res)): res[i] /= pow(6, n) return res def nth_ugly_number(n: int) -> int: """ 动态规划 Offer 49. 丑数 初始状态:dp[0] = 1 转移方程:dp[i] = min(n2, n3, n5) """ dp = [1 for _ in range(n)] a, b, c = 0, 0, 0 for i in range(1, n): n2, n3, n5 = dp[a] * 2, dp[b] * 3, dp[c] * 5 dp[i] = min(n2, n3, n5) if dp[i] == n2: a += 1 if dp[i] == n3: b += 1 if dp[i] == n5: c += 1 return dp[-1] if __name__ == "__main__": print(Solution.dices_probability(2))
[ 1, 515, 19229, 1053, 2391, 13, 13, 13, 1990, 24380, 29901, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 18755, 29898, 29876, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29896, 29900, 29899, 29902, 29871, 233, 153, 147, 31529, 31356, 232, 168, 148, 30354, 31025, 13, 4706, 584, 3207, 302, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 263, 29892, 289, 353, 29871, 29900, 29892, 29871, 29896, 13, 4706, 363, 903, 297, 3464, 29898, 29876, 1125, 13, 9651, 263, 29892, 289, 353, 289, 29892, 263, 718, 289, 13, 4706, 736, 263, 1273, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29955, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 18755, 29918, 29906, 29898, 29876, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 263, 353, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 302, 1125, 13, 9651, 263, 29889, 4397, 29898, 29874, 29961, 29875, 448, 29871, 29896, 29962, 718, 263, 29961, 29875, 2314, 13, 4706, 1596, 29898, 29874, 29897, 13, 4706, 736, 263, 29961, 29876, 29962, 1273, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29955, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 954, 29918, 1994, 29898, 29876, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29896, 29900, 29899, 2687, 29871, 30986, 235, 158, 156, 235, 186, 182, 31037, 236, 155, 185, 31658, 31596, 13, 4706, 584, 3207, 302, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 263, 29892, 289, 353, 29871, 29896, 29892, 29871, 29896, 13, 4706, 363, 903, 297, 3464, 29898, 29876, 1125, 13, 9651, 263, 29892, 289, 353, 289, 29892, 263, 718, 289, 13, 4706, 736, 263, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 4236, 29918, 771, 9202, 29898, 558, 1575, 29901, 2391, 29961, 524, 2314, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29953, 29941, 29871, 235, 133, 164, 234, 168, 171, 30878, 30257, 31107, 233, 185, 169, 13, 4706, 584, 3207, 26094, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 565, 451, 26094, 29901, 13, 9651, 736, 29871, 29900, 13, 13, 4706, 620, 353, 518, 29900, 29962, 13, 4706, 923, 13198, 353, 26094, 29961, 29900, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 558, 1575, 22164, 13, 9651, 620, 29889, 4397, 29898, 3317, 29898, 558, 1575, 29961, 29875, 29962, 448, 923, 13198, 29892, 620, 29961, 29875, 448, 29871, 29896, 12622, 13, 9651, 923, 13198, 353, 1375, 29898, 1173, 13198, 29892, 26094, 29961, 29875, 2314, 13, 4706, 736, 620, 29961, 2435, 29898, 558, 1575, 29897, 448, 29871, 29896, 29962, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 4236, 29918, 1491, 29918, 2378, 29898, 1949, 29879, 29901, 2391, 29961, 524, 2314, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29946, 29906, 29889, 29871, 31903, 234, 190, 176, 30319, 30354, 31263, 30210, 30878, 30257, 30503, 13, 4706, 584, 3207, 954, 29879, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 565, 451, 7431, 29898, 1949, 29879, 1125, 13, 9651, 736, 29871, 29900, 13, 4706, 620, 353, 518, 1949, 29879, 29961, 29900, 5262, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 1949, 29879, 22164, 13, 9651, 620, 29889, 4397, 29898, 3317, 29898, 690, 29961, 29875, 448, 29871, 29896, 29962, 718, 954, 29879, 29961, 29875, 1402, 954, 29879, 29961, 29875, 12622, 13, 4706, 736, 4236, 29898, 690, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 4236, 29918, 1767, 29898, 7720, 29901, 2391, 29961, 1293, 29961, 524, 24960, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29946, 29955, 29889, 29871, 234, 167, 191, 30834, 30210, 30878, 30257, 231, 190, 186, 30959, 13, 4706, 584, 3207, 6856, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 1948, 29892, 784, 353, 7431, 29898, 7720, 511, 7431, 29898, 7720, 29898, 29900, 876, 13, 4706, 1819, 353, 5519, 29900, 363, 921, 297, 3464, 29898, 1054, 4638, 363, 343, 297, 3464, 29898, 798, 4638, 13, 4706, 1819, 29961, 29900, 3816, 29900, 29962, 353, 6856, 29961, 29900, 3816, 29900, 29962, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 784, 1125, 13, 9651, 1819, 29961, 29900, 3816, 29875, 29962, 353, 1819, 29961, 29900, 3816, 29875, 448, 29871, 29896, 29962, 718, 6856, 29961, 29900, 3816, 29875, 29962, 13, 4706, 363, 432, 297, 3464, 29898, 29896, 29892, 1948, 1125, 13, 9651, 1819, 29961, 29875, 3816, 29900, 29962, 353, 1819, 29961, 29875, 448, 29871, 29896, 3816, 29900, 29962, 718, 6856, 29961, 29875, 3816, 29900, 29962, 13, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 1948, 1125, 13, 9651, 363, 432, 297, 3464, 29898, 29896, 29892, 784, 1125, 13, 18884, 1819, 29961, 29875, 3816, 29926, 29962, 353, 4236, 29898, 5975, 29961, 29875, 448, 29871, 29896, 3816, 29926, 1402, 1819, 29961, 29875, 3816, 29926, 448, 29871, 29896, 2314, 718, 6856, 29961, 29875, 3816, 29926, 29962, 13, 13, 4706, 736, 1819, 29961, 798, 448, 29871, 29896, 3816, 1054, 448, 29871, 29896, 29962, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 14240, 29918, 1949, 29898, 1949, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29946, 29953, 29889, 29871, 233, 141, 141, 30354, 30578, 234, 194, 190, 235, 178, 148, 30494, 30578, 31277, 31767, 13, 4706, 584, 3207, 954, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 396, 270, 29886, 29961, 29875, 29962, 31557, 30503, 6099, 29961, 29875, 29899, 29896, 29962, 30417, 31057, 29892, 29871, 30744, 30651, 30682, 30651, 31600, 234, 152, 168, 6099, 31025, 30746, 13, 4706, 269, 29918, 1949, 353, 851, 29898, 1949, 29897, 13, 4706, 263, 29892, 289, 353, 29871, 29896, 29892, 29871, 29896, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 29879, 29918, 1949, 22164, 13, 9651, 263, 29892, 289, 353, 263, 29892, 313, 29874, 718, 289, 565, 376, 29896, 29900, 29908, 5277, 269, 29918, 1949, 29961, 29875, 448, 29871, 29896, 29901, 29875, 718, 29871, 29896, 29962, 5277, 376, 29906, 29945, 29908, 1683, 289, 29897, 13, 4706, 736, 289, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 3309, 29918, 974, 29918, 5426, 342, 29918, 20363, 29898, 29879, 29901, 851, 29897, 1599, 938, 29901, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29946, 29947, 29889, 29871, 30878, 31143, 30413, 232, 147, 174, 30908, 31810, 30578, 31277, 30210, 30319, 30578, 31277, 31767, 13, 4706, 584, 3207, 269, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 565, 7431, 29898, 29879, 29897, 5277, 29871, 29896, 29901, 13, 9651, 736, 7431, 29898, 29879, 29897, 13, 13, 4706, 12124, 353, 6571, 13, 4706, 270, 29886, 353, 518, 29900, 363, 903, 297, 3464, 29898, 2435, 29898, 29879, 28166, 13, 4706, 270, 29886, 29961, 29900, 1402, 12124, 29961, 29879, 29961, 29900, 5262, 353, 29871, 29896, 29892, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 29879, 22164, 13, 9651, 2380, 353, 12124, 29889, 657, 29898, 29879, 29961, 29875, 1402, 448, 29896, 29897, 13, 9651, 565, 270, 29886, 29961, 29875, 448, 29871, 29896, 29962, 529, 474, 448, 2380, 29901, 13, 18884, 270, 29886, 29961, 29875, 29962, 353, 270, 29886, 29961, 29875, 448, 29871, 29896, 29962, 718, 29871, 29896, 13, 9651, 1683, 29901, 13, 18884, 270, 29886, 29961, 29875, 29962, 353, 474, 448, 2380, 13, 13, 9651, 12124, 29961, 29879, 29961, 29875, 5262, 353, 474, 29871, 396, 29871, 31100, 30374, 232, 150, 139, 31841, 30746, 13, 4706, 736, 4236, 29898, 6099, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 3309, 29918, 974, 29918, 5426, 342, 29918, 20363, 29918, 29906, 29898, 29879, 29901, 851, 29897, 1599, 938, 29901, 13, 4706, 9995, 13, 308, 31669, 31600, 438, 29898, 29940, 29897, 30210, 270, 29886, 29871, 30816, 31016, 13, 4706, 584, 3207, 269, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 12124, 353, 6571, 13, 4706, 620, 29892, 5694, 353, 29871, 29900, 29892, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 29879, 22164, 13, 9651, 2380, 353, 12124, 29889, 657, 29898, 29879, 29961, 29875, 1402, 448, 29896, 29897, 13, 9651, 565, 5694, 529, 474, 448, 2380, 29901, 13, 18884, 5694, 4619, 29871, 29896, 13, 9651, 1683, 29901, 13, 18884, 5694, 353, 474, 448, 2380, 13, 9651, 12124, 29961, 29879, 29961, 29875, 5262, 353, 518, 29875, 29962, 13, 9651, 620, 353, 4236, 29898, 690, 29892, 5694, 29897, 13, 4706, 736, 620, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 1833, 29918, 1745, 17225, 29898, 29876, 29901, 938, 29892, 286, 29901, 938, 1125, 13, 4706, 9995, 13, 4706, 4587, 571, 29871, 29953, 29906, 29889, 29871, 232, 159, 137, 232, 159, 139, 30275, 30878, 30822, 232, 140, 172, 30557, 30210, 30354, 30578, 13, 4706, 9995, 13, 4706, 921, 353, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 29906, 29892, 302, 718, 29871, 29896, 1125, 13, 9651, 921, 353, 313, 29916, 718, 286, 29897, 1273, 474, 13, 4706, 736, 921, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 270, 1575, 29918, 22795, 3097, 29898, 29876, 29901, 938, 29897, 1599, 2391, 29961, 7411, 5387, 13, 4706, 270, 29886, 353, 5519, 29900, 363, 432, 297, 3464, 29898, 29876, 4638, 363, 474, 297, 3464, 29898, 29953, 334, 302, 4638, 13, 4706, 363, 474, 297, 3464, 29898, 29953, 1125, 13, 9651, 270, 29886, 29961, 29875, 3816, 29900, 29962, 353, 29871, 29896, 13, 4706, 363, 432, 297, 3464, 29898, 29896, 29892, 302, 1125, 13, 9651, 363, 474, 297, 3464, 29898, 29926, 29892, 29871, 29953, 334, 313, 29926, 718, 29871, 29896, 22164, 13, 18884, 2302, 353, 29871, 29896, 13, 18884, 1550, 474, 448, 2302, 6736, 29871, 29900, 322, 2302, 5277, 29871, 29953, 29901, 13, 462, 1678, 270, 29886, 29961, 29875, 3816, 29926, 29962, 4619, 270, 29886, 29961, 29875, 448, 2302, 3816, 29926, 448, 29871, 29896, 29962, 13, 462, 1678, 2302, 4619, 29871, 29896, 13, 4706, 620, 353, 5159, 13, 4706, 363, 474, 297, 3464, 29898, 29876, 29899, 29896, 29892, 29871, 29953, 29930, 29876, 1125, 13, 9651, 620, 29889, 4397, 29898, 6099, 29961, 29875, 3816, 29876, 29899, 29896, 2314, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 690, 22164, 13, 9651, 620, 29961, 29875, 29962, 847, 29922, 4764, 29898, 29953, 29892, 302, 29897, 13, 4706, 736, 620, 13, 13, 13, 1753, 302, 386, 29918, 688, 368, 29918, 4537, 29898, 29876, 29901, 938, 29897, 1599, 938, 29901, 13, 1678, 9995, 13, 268, 30846, 31613, 235, 170, 135, 232, 139, 149, 13, 1678, 4587, 571, 29871, 29946, 29929, 29889, 29871, 231, 187, 148, 30354, 13, 268, 31120, 31020, 31531, 31613, 30383, 6099, 29961, 29900, 29962, 353, 29871, 29896, 13, 268, 31415, 31618, 30525, 31101, 30383, 6099, 29961, 29875, 29962, 353, 1375, 29898, 29876, 29906, 29892, 302, 29941, 29892, 302, 29945, 29897, 13, 1678, 9995, 13, 1678, 270, 29886, 353, 518, 29896, 363, 903, 297, 3464, 29898, 29876, 4638, 13, 1678, 263, 29892, 289, 29892, 274, 353, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 13, 1678, 363, 474, 297, 3464, 29898, 29896, 29892, 302, 1125, 13, 4706, 302, 29906, 29892, 302, 29941, 29892, 302, 29945, 353, 270, 29886, 29961, 29874, 29962, 334, 29871, 29906, 29892, 270, 29886, 29961, 29890, 29962, 334, 29871, 29941, 29892, 270, 29886, 29961, 29883, 29962, 334, 29871, 29945, 13, 4706, 270, 29886, 29961, 29875, 29962, 353, 1375, 29898, 29876, 29906, 29892, 302, 29941, 29892, 302, 29945, 29897, 13, 4706, 565, 270, 29886, 29961, 29875, 29962, 1275, 302, 29906, 29901, 13, 9651, 263, 4619, 29871, 29896, 13, 4706, 565, 270, 29886, 29961, 29875, 29962, 1275, 302, 29941, 29901, 13, 9651, 289, 4619, 29871, 29896, 13, 4706, 565, 270, 29886, 29961, 29875, 29962, 1275, 302, 29945, 29901, 13, 9651, 274, 4619, 29871, 29896, 13, 1678, 736, 270, 29886, 14352, 29896, 29962, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1596, 29898, 13296, 918, 29889, 29881, 1575, 29918, 22795, 3097, 29898, 29906, 876, 13, 2 ]
app/models.py
marknesh/Blogging-website
0
184165
<gh_stars>0 from . import db from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime class User(UserMixin,db.Model): __tablename__ = 'person' id = db.Column(db.Integer,primary_key = True) email = db.Column(db.String(255), unique=True, index=True) username = db.Column(db.String(255)) secure_password=db.Column(db.String(255)) @property def password(self): raise AttributeError('you cannot this attribute password') @password.setter def password(self,password): self.secure_password=generate_password_hash(password) def verify_password(self,password): return check_password_hash(self.secure_password,password) class Blog(db.Model): __tablename__='blogs' id = db.Column(db.Integer, primary_key=True) title=db.Column(db.String(255)) content = db.Column(db.String(255)) posted=db.Column(db.DateTime,default=datetime.utcnow) comments=db.relationship('Comments',backref='blogr',lazy="dynamic") def save_blog(self): db.session.add(self) db.session.commit() @classmethod def get_blog(cls,id): eka=Blog.query.filter_by().all() return eka @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class Comments(db.Model): __tablename__='comments' id =db.Column(db.Integer, primary_key=True) comment=db.Column(db.String(255)) blogr_id=db.Column(db.Integer,db.ForeignKey('blogs.id')) def save_comment(self): db.session.add(self) db.session.commit() class Subscriber(db.Model): __tablename__ = 'subscriber' id = db.Column(db.Integer,primary_key = True) email = db.Column(db.String(255), unique=True, index=True) class Qoutes: def __init__(self,id,author,quote): self.id = id self.author=author self.quote=quote
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 869, 1053, 4833, 13, 3166, 23085, 13289, 29889, 8926, 1053, 5706, 29918, 5630, 29918, 8568, 29892, 3198, 29918, 5630, 29918, 8568, 13, 3166, 29784, 29918, 7507, 1053, 4911, 29924, 861, 262, 13, 3166, 869, 29871, 1053, 6464, 29918, 12847, 13, 3166, 12865, 1053, 12865, 13, 13, 13, 1990, 4911, 29898, 2659, 29924, 861, 262, 29892, 2585, 29889, 3195, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 353, 525, 10532, 29915, 13, 1678, 1178, 353, 4833, 29889, 4409, 29898, 2585, 29889, 7798, 29892, 16072, 29918, 1989, 353, 5852, 29897, 13, 1678, 4876, 353, 4833, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 511, 5412, 29922, 5574, 29892, 2380, 29922, 5574, 29897, 13, 1678, 8952, 353, 4833, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 876, 13, 1678, 11592, 29918, 5630, 29922, 2585, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 876, 13, 13, 13, 1678, 732, 6799, 13, 1678, 822, 4800, 29898, 1311, 1125, 13, 4706, 12020, 23833, 2392, 877, 6293, 2609, 445, 5352, 4800, 1495, 13, 13, 1678, 732, 5630, 29889, 842, 357, 13, 13, 13, 1678, 822, 4800, 29898, 1311, 29892, 5630, 1125, 13, 4706, 1583, 29889, 24216, 29918, 5630, 29922, 17158, 29918, 5630, 29918, 8568, 29898, 5630, 29897, 13, 13, 1678, 822, 11539, 29918, 5630, 29898, 1311, 29892, 5630, 1125, 13, 4706, 736, 1423, 29918, 5630, 29918, 8568, 29898, 1311, 29889, 24216, 29918, 5630, 29892, 5630, 29897, 13, 13, 1990, 350, 1188, 29898, 2585, 29889, 3195, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 2433, 25762, 29915, 13, 1678, 1178, 353, 4833, 29889, 4409, 29898, 2585, 29889, 7798, 29892, 7601, 29918, 1989, 29922, 5574, 29897, 13, 1678, 3611, 29922, 2585, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 876, 13, 1678, 2793, 353, 4833, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 876, 13, 1678, 8059, 29922, 2585, 29889, 4409, 29898, 2585, 29889, 11384, 29892, 4381, 29922, 12673, 29889, 329, 29883, 3707, 29897, 13, 1678, 6589, 29922, 2585, 29889, 2674, 800, 4034, 877, 1523, 1860, 742, 1627, 999, 2433, 14073, 629, 742, 433, 1537, 543, 16626, 1159, 13, 13, 13, 13, 1678, 822, 4078, 29918, 7312, 29898, 1311, 1125, 13, 4706, 4833, 29889, 7924, 29889, 1202, 29898, 1311, 29897, 13, 4706, 4833, 29889, 7924, 29889, 15060, 580, 13, 13, 1678, 732, 1990, 5696, 13, 13, 13, 1678, 822, 679, 29918, 7312, 29898, 25932, 29892, 333, 1125, 13, 4706, 321, 1335, 29922, 29933, 1188, 29889, 1972, 29889, 4572, 29918, 1609, 2141, 497, 580, 13, 4706, 736, 321, 1335, 13, 13, 1678, 732, 7507, 29918, 12847, 29889, 1792, 29918, 12657, 13, 1678, 822, 2254, 29918, 1792, 29898, 1792, 29918, 333, 1125, 13, 4706, 736, 4911, 29889, 1972, 29889, 657, 29898, 524, 29898, 1792, 29918, 333, 876, 13, 13, 1990, 461, 29879, 29898, 2585, 29889, 3195, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 2433, 21032, 29915, 13, 1678, 1178, 353, 2585, 29889, 4409, 29898, 2585, 29889, 7798, 29892, 7601, 29918, 1989, 29922, 5574, 29897, 13, 1678, 3440, 29922, 2585, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 876, 13, 1678, 6668, 629, 29918, 333, 29922, 2585, 29889, 4409, 29898, 2585, 29889, 7798, 29892, 2585, 29889, 27755, 2558, 877, 25762, 29889, 333, 8785, 13, 13, 13, 13, 1678, 822, 4078, 29918, 9342, 29898, 1311, 1125, 13, 4706, 4833, 29889, 7924, 29889, 1202, 29898, 1311, 29897, 13, 4706, 4833, 29889, 7924, 29889, 15060, 580, 13, 13, 1990, 3323, 7588, 495, 29898, 2585, 29889, 3195, 1125, 13, 1678, 4770, 3891, 2435, 420, 1649, 353, 525, 1491, 7588, 495, 29915, 13, 1678, 1178, 353, 4833, 29889, 4409, 29898, 2585, 29889, 7798, 29892, 16072, 29918, 1989, 353, 5852, 29897, 13, 1678, 4876, 353, 4833, 29889, 4409, 29898, 2585, 29889, 1231, 29898, 29906, 29945, 29945, 511, 5412, 29922, 5574, 29892, 2380, 29922, 5574, 29897, 13, 13, 1990, 660, 449, 267, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 333, 29892, 8921, 29892, 1396, 1125, 13, 4706, 1583, 29889, 333, 353, 1178, 13, 4706, 1583, 29889, 8921, 29922, 8921, 13, 4706, 1583, 29889, 1396, 29922, 1396, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2 ]
salty_listener.py
BatedUrGonnaDie/salty_bot
12
70380
<reponame>BatedUrGonnaDie/salty_bot #! /usr/bin/env python2.7 # -*- coding: utf-8 -*- import socket import urlparse import psycopg2 import psycopg2.extras class WebRetrieve: def __init__(self, dev, db_url, web_ip, web_port, web_secret): self.development = dev self.db_url = db_url self.web_secret = "" self.web_secret = web_secret self.web_port = web_port self.web_host = web_ip self.web_s = socket.socket() self.web_s.bind((self.web_host, self.web_port)) self.disect_url() def disect_url(self): urlparse.uses_netloc.append("postgres") url_parts = urlparse.urlparse(self.db_url) self.db_name = url_parts.path[1:] self.db_user = url_parts.username self.db_password = url_parts.password self.db_host = url_parts.hostname self.db_port = url_parts.port def db_connect(self): conn = psycopg2.connect(database=self.db_name, user=self.db_user, host=self.db_host, password=self.db_password, port=self.db_port) return conn def db_close(self, connection): connection.close() def setup_cursor(self, connection_inst, cf_type = psycopg2.extras.RealDictCursor): cursor = connection_inst.cursor(cursor_factory=cf_type) return cursor def close_cursor(self, cursor): cursor.close() def execute_one(self, cursor, query, parameters = None): cursor.execute(query, parameters) return cursor.fetchone() def execute_all(self, cursor, query, parameters = None): cursor.execute(query, parameters) return cursor.fetchall() def initial_retrieve(self): channels_dict = {} conn = self.db_connect() cur = self.setup_cursor(conn) if not self.development: users = self.execute_all(cur, """SELECT * FROM users AS u JOIN settings AS s on u.id=s.user_id WHERE s.active=true""") commands = self.execute_all(cur, """SELECT * FROM commands AS c WHERE c.user_id in (SELECT s.user_id FROM Settings AS s WHERE s.active=true)""") custom_commands = self.execute_all(cur, """SELECT * FROM custom_commands AS c WHERE c.user_id in (SELECT s.user_id FROM Settings AS s WHERE s.active=true)""") else: users = self.execute_all(cur, """SELECT * FROM users AS u JOIN settings AS s on u.id=1 AND u.id=s.user_id WHERE s.active=true""") commands = self.execute_all(cur, """SELECT * FROM commands AS c WHERE c.user_id=1""") custom_commands = self.execute_all(cur, """SELECT * FROM custom_commands AS c WHERE c.user_id=1""") self.close_cursor(cur) self.db_close(conn) users_dict = {} for i in users: i["id"] = i["user_id"] users_dict[i["id"]] = i users_dict[i["id"]]["commands"] = [] users_dict[i["id"]]["custom_commands"] = [] for i in commands: users_dict[i["user_id"]]["commands"].append(i) for i in custom_commands: users_dict[i["user_id"]]["custom_commands"].append(i) for v in users_dict.values(): channels_dict[v["twitch_name"]] = v return channels_dict def update_retrieve(self, user_id): user_dict = {} conn = self.db_connect() cur = self.setup_cursor(conn) user = self.execute_one(cur, """SELECT u.*, s.* FROM users AS u JOIN settings AS s on s.user_id=%s WHERE u.id=%s""", parameters=(user_id, user_id)) commands = self.execute_all(cur, """SELECT c.* FROM commands AS c WHERE c.user_id=%s""", parameters=(user_id,)) custom_commands = self.execute_all(cur, """SELECT cc.* FROM custom_commands AS cc WHERE cc.user_id=%s""", parameters=(user_id,)) name = user["twitch_name"] user_dict[name] = user user_dict[name]["id"] = user_dict[name]["user_id"] user_dict[name]["commands"] = commands user_dict[name]["custom_commands"] = custom_commands return user_dict def main_listen(self): self.web_s.listen(1) connection, address = self.web_s.accept() secret = connection.recv(128) if secret != self.web_secret: connection.close() print address raise ValueError else: to_update = connection.recv(128) connection.close() return to_update
[ 1, 529, 276, 1112, 420, 29958, 29933, 630, 29965, 29878, 29954, 11586, 16334, 29914, 29879, 18745, 29918, 7451, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 29906, 29889, 29955, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 9909, 13, 5215, 3142, 5510, 13, 13, 5215, 6529, 29891, 9708, 29887, 29906, 13, 5215, 6529, 29891, 9708, 29887, 29906, 29889, 1062, 3417, 13, 13, 1990, 2563, 8015, 29878, 2418, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2906, 29892, 4833, 29918, 2271, 29892, 1856, 29918, 666, 29892, 1856, 29918, 637, 29892, 1856, 29918, 19024, 1125, 13, 4706, 1583, 29889, 25431, 353, 2906, 13, 4706, 1583, 29889, 2585, 29918, 2271, 353, 4833, 29918, 2271, 13, 4706, 1583, 29889, 2676, 29918, 19024, 353, 5124, 13, 4706, 1583, 29889, 2676, 29918, 19024, 353, 1856, 29918, 19024, 13, 4706, 1583, 29889, 2676, 29918, 637, 353, 1856, 29918, 637, 13, 4706, 1583, 29889, 2676, 29918, 3069, 353, 1856, 29918, 666, 13, 4706, 1583, 29889, 2676, 29918, 29879, 353, 9909, 29889, 11514, 580, 13, 4706, 1583, 29889, 2676, 29918, 29879, 29889, 5355, 3552, 1311, 29889, 2676, 29918, 3069, 29892, 1583, 29889, 2676, 29918, 637, 876, 13, 4706, 1583, 29889, 2218, 522, 29918, 2271, 580, 13, 13, 1678, 822, 766, 522, 29918, 2271, 29898, 1311, 1125, 13, 4706, 3142, 5510, 29889, 6394, 29918, 1212, 2029, 29889, 4397, 703, 2490, 7201, 1159, 13, 4706, 3142, 29918, 20895, 353, 3142, 5510, 29889, 2271, 5510, 29898, 1311, 29889, 2585, 29918, 2271, 29897, 13, 4706, 1583, 29889, 2585, 29918, 978, 353, 3142, 29918, 20895, 29889, 2084, 29961, 29896, 17531, 13, 4706, 1583, 29889, 2585, 29918, 1792, 353, 3142, 29918, 20895, 29889, 6786, 13, 4706, 1583, 29889, 2585, 29918, 5630, 353, 3142, 29918, 20895, 29889, 5630, 13, 4706, 1583, 29889, 2585, 29918, 3069, 353, 3142, 29918, 20895, 29889, 28988, 13, 4706, 1583, 29889, 2585, 29918, 637, 353, 3142, 29918, 20895, 29889, 637, 13, 13, 1678, 822, 4833, 29918, 6915, 29898, 1311, 1125, 13, 4706, 11009, 353, 6529, 29891, 9708, 29887, 29906, 29889, 6915, 29898, 9803, 29922, 1311, 29889, 2585, 29918, 978, 29892, 1404, 29922, 1311, 29889, 2585, 29918, 1792, 29892, 3495, 29922, 1311, 29889, 2585, 29918, 3069, 29892, 4800, 29922, 1311, 29889, 2585, 29918, 5630, 29892, 2011, 29922, 1311, 29889, 2585, 29918, 637, 29897, 13, 4706, 736, 11009, 13, 13, 1678, 822, 4833, 29918, 5358, 29898, 1311, 29892, 3957, 1125, 13, 4706, 3957, 29889, 5358, 580, 13, 13, 1678, 822, 6230, 29918, 18127, 29898, 1311, 29892, 3957, 29918, 2611, 29892, 274, 29888, 29918, 1853, 353, 6529, 29891, 9708, 29887, 29906, 29889, 1062, 3417, 29889, 21713, 21533, 19890, 1125, 13, 4706, 10677, 353, 3957, 29918, 2611, 29889, 18127, 29898, 18127, 29918, 14399, 29922, 6854, 29918, 1853, 29897, 13, 4706, 736, 10677, 13, 13, 1678, 822, 3802, 29918, 18127, 29898, 1311, 29892, 10677, 1125, 13, 4706, 10677, 29889, 5358, 580, 13, 13, 1678, 822, 6222, 29918, 650, 29898, 1311, 29892, 10677, 29892, 2346, 29892, 4128, 353, 6213, 1125, 13, 4706, 10677, 29889, 7978, 29898, 1972, 29892, 4128, 29897, 13, 4706, 736, 10677, 29889, 9155, 650, 580, 13, 13, 1678, 822, 6222, 29918, 497, 29898, 1311, 29892, 10677, 29892, 2346, 29892, 4128, 353, 6213, 1125, 13, 4706, 10677, 29889, 7978, 29898, 1972, 29892, 4128, 29897, 13, 4706, 736, 10677, 29889, 9155, 497, 580, 13, 13, 1678, 822, 2847, 29918, 276, 509, 2418, 29898, 1311, 1125, 13, 4706, 18196, 29918, 8977, 353, 6571, 13, 13, 4706, 11009, 353, 1583, 29889, 2585, 29918, 6915, 580, 13, 4706, 3151, 353, 1583, 29889, 14669, 29918, 18127, 29898, 13082, 29897, 13, 13, 4706, 565, 451, 1583, 29889, 25431, 29901, 13, 9651, 4160, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 4160, 3339, 318, 8780, 6055, 3339, 269, 373, 318, 29889, 333, 29922, 29879, 29889, 1792, 29918, 333, 5754, 269, 29889, 4925, 29922, 3009, 15945, 1159, 13, 9651, 8260, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 8260, 3339, 274, 5754, 274, 29889, 1792, 29918, 333, 297, 313, 6404, 269, 29889, 1792, 29918, 333, 3895, 19215, 3339, 269, 5754, 269, 29889, 4925, 29922, 3009, 5513, 29908, 1159, 13, 9651, 2888, 29918, 26381, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 2888, 29918, 26381, 3339, 274, 5754, 274, 29889, 1792, 29918, 333, 297, 313, 6404, 269, 29889, 1792, 29918, 333, 3895, 19215, 3339, 269, 5754, 269, 29889, 4925, 29922, 3009, 5513, 29908, 1159, 13, 4706, 1683, 29901, 13, 9651, 4160, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 4160, 3339, 318, 8780, 6055, 3339, 269, 373, 318, 29889, 333, 29922, 29896, 5300, 318, 29889, 333, 29922, 29879, 29889, 1792, 29918, 333, 5754, 269, 29889, 4925, 29922, 3009, 15945, 1159, 13, 9651, 8260, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 8260, 3339, 274, 5754, 274, 29889, 1792, 29918, 333, 29922, 29896, 15945, 1159, 13, 9651, 2888, 29918, 26381, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 334, 3895, 2888, 29918, 26381, 3339, 274, 5754, 274, 29889, 1792, 29918, 333, 29922, 29896, 15945, 1159, 13, 13, 4706, 1583, 29889, 5358, 29918, 18127, 29898, 2764, 29897, 13, 4706, 1583, 29889, 2585, 29918, 5358, 29898, 13082, 29897, 13, 13, 4706, 4160, 29918, 8977, 353, 6571, 13, 4706, 363, 474, 297, 4160, 29901, 13, 9651, 474, 3366, 333, 3108, 353, 474, 3366, 1792, 29918, 333, 3108, 13, 9651, 4160, 29918, 8977, 29961, 29875, 3366, 333, 3108, 29962, 353, 474, 13, 9651, 4160, 29918, 8977, 29961, 29875, 3366, 333, 3108, 29962, 3366, 26381, 3108, 353, 5159, 13, 9651, 4160, 29918, 8977, 29961, 29875, 3366, 333, 3108, 29962, 3366, 6341, 29918, 26381, 3108, 353, 5159, 13, 13, 4706, 363, 474, 297, 8260, 29901, 13, 9651, 4160, 29918, 8977, 29961, 29875, 3366, 1792, 29918, 333, 3108, 29962, 3366, 26381, 16862, 4397, 29898, 29875, 29897, 13, 13, 4706, 363, 474, 297, 2888, 29918, 26381, 29901, 13, 9651, 4160, 29918, 8977, 29961, 29875, 3366, 1792, 29918, 333, 3108, 29962, 3366, 6341, 29918, 26381, 16862, 4397, 29898, 29875, 29897, 13, 4706, 363, 325, 297, 4160, 29918, 8977, 29889, 5975, 7295, 13, 9651, 18196, 29918, 8977, 29961, 29894, 3366, 7516, 2335, 29918, 978, 3108, 29962, 353, 325, 13, 13, 4706, 736, 18196, 29918, 8977, 13, 13, 1678, 822, 2767, 29918, 276, 509, 2418, 29898, 1311, 29892, 1404, 29918, 333, 1125, 13, 4706, 1404, 29918, 8977, 353, 6571, 13, 4706, 11009, 353, 1583, 29889, 2585, 29918, 6915, 580, 13, 4706, 3151, 353, 1583, 29889, 14669, 29918, 18127, 29898, 13082, 29897, 13, 13, 4706, 1404, 353, 1583, 29889, 7978, 29918, 650, 29898, 2764, 29892, 9995, 6404, 318, 5575, 29892, 269, 5575, 3895, 4160, 3339, 318, 8780, 6055, 3339, 269, 373, 269, 29889, 1792, 29918, 333, 16328, 29879, 5754, 318, 29889, 333, 16328, 29879, 15945, 613, 4128, 7607, 1792, 29918, 333, 29892, 1404, 29918, 333, 876, 13, 4706, 8260, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 274, 5575, 3895, 8260, 3339, 274, 5754, 274, 29889, 1792, 29918, 333, 16328, 29879, 15945, 613, 4128, 7607, 1792, 29918, 333, 29892, 876, 13, 4706, 2888, 29918, 26381, 353, 1583, 29889, 7978, 29918, 497, 29898, 2764, 29892, 9995, 6404, 21759, 5575, 3895, 2888, 29918, 26381, 3339, 21759, 5754, 21759, 29889, 1792, 29918, 333, 16328, 29879, 15945, 613, 4128, 7607, 1792, 29918, 333, 29892, 876, 13, 13, 4706, 1024, 353, 1404, 3366, 7516, 2335, 29918, 978, 3108, 13, 4706, 1404, 29918, 8977, 29961, 978, 29962, 353, 1404, 13, 4706, 1404, 29918, 8977, 29961, 978, 29962, 3366, 333, 3108, 353, 1404, 29918, 8977, 29961, 978, 29962, 3366, 1792, 29918, 333, 3108, 13, 4706, 1404, 29918, 8977, 29961, 978, 29962, 3366, 26381, 3108, 353, 8260, 13, 4706, 1404, 29918, 8977, 29961, 978, 29962, 3366, 6341, 29918, 26381, 3108, 353, 2888, 29918, 26381, 13, 4706, 736, 1404, 29918, 8977, 13, 13, 1678, 822, 1667, 29918, 20631, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2676, 29918, 29879, 29889, 20631, 29898, 29896, 29897, 13, 4706, 3957, 29892, 3211, 353, 1583, 29889, 2676, 29918, 29879, 29889, 16044, 580, 13, 4706, 7035, 353, 3957, 29889, 3757, 29894, 29898, 29896, 29906, 29947, 29897, 13, 4706, 565, 7035, 2804, 1583, 29889, 2676, 29918, 19024, 29901, 13, 9651, 3957, 29889, 5358, 580, 13, 9651, 1596, 3211, 13, 9651, 12020, 7865, 2392, 13, 4706, 1683, 29901, 13, 9651, 304, 29918, 5504, 353, 3957, 29889, 3757, 29894, 29898, 29896, 29906, 29947, 29897, 13, 9651, 3957, 29889, 5358, 580, 13, 9651, 736, 304, 29918, 5504, 13, 2 ]
tests/test_helper.py
xlsdnx/myambra
0
125709
<reponame>xlsdnx/myambra import requests import logging import sys import os import pytest import shlex from singledispatch import singledispatch from subprocess import call import subprocess from retry import retry # TODO: perhaps this file should be moved to envoy? logging.basicConfig(stream=sys.stderr ) logging.getLogger("log").setLevel( logging.DEBUG ) log=logging.getLogger("log") @singledispatch def assert_status(req, status_code=200): log.error('input type unmatched') assert False # since input type unmatched @assert_status.register(str) def _(url, status_code=200): req = requests.get(url) assert req.status_code == status_code, req.text return req @assert_status.register(requests.Response) def _(req, status_code=200): assert req.status_code == status_code, req.text return req def docker_compose(compose_config, command): compose = 'docker-compose -f /dockerfiles/configurations/'+compose_config+'.yml' log.debug("RUN: " + compose + ' ' + command) subprocess.check_output(shlex.split(compose + ' ' + command)) @retry(tries=30, delay=3) def wait_for_web_service(url): log.debug("Trying to reach " + url + " ...") req = requests.get(url) if req.status_code != 200: raise Exception('status=' + str(req.status_code)) return req @pytest.fixture(scope="class") def stack(request): compose_config = getattr(request.module, "compose_config", "unknown") wait_urls = getattr(request.module, "wait_urls", "http://unknown:123") log.debug('compose_config: ' + compose_config) docker_compose(compose_config, 'kill') docker_compose(compose_config, 'rm -f -v') docker_compose(compose_config, 'up -d') for url in wait_urls: wait_for_web_service(url) yield docker_compose(compose_config, 'kill') docker_compose(compose_config, 'rm -f -v')
[ 1, 529, 276, 1112, 420, 29958, 20267, 5200, 29916, 29914, 1357, 1117, 336, 13, 5215, 7274, 13, 5215, 12183, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 11451, 1688, 13, 5215, 528, 2506, 13, 3166, 1809, 839, 275, 5041, 1053, 1809, 839, 275, 5041, 13, 3166, 1014, 5014, 1053, 1246, 13, 5215, 1014, 5014, 13, 3166, 337, 2202, 1053, 337, 2202, 13, 13, 29937, 14402, 29901, 6060, 445, 934, 881, 367, 6153, 304, 427, 18644, 29973, 13, 13, 21027, 29889, 16121, 3991, 29898, 5461, 29922, 9675, 29889, 303, 20405, 1723, 13, 21027, 29889, 657, 16363, 703, 1188, 2564, 842, 10108, 29898, 12183, 29889, 18525, 1723, 13, 1188, 29922, 21027, 29889, 657, 16363, 703, 1188, 1159, 13, 13, 29992, 2976, 839, 275, 5041, 13, 1753, 4974, 29918, 4882, 29898, 7971, 29892, 4660, 29918, 401, 29922, 29906, 29900, 29900, 1125, 13, 29871, 1480, 29889, 2704, 877, 2080, 1134, 443, 4352, 287, 1495, 13, 29871, 4974, 7700, 29871, 396, 1951, 1881, 1134, 443, 4352, 287, 13, 13, 29992, 9294, 29918, 4882, 29889, 9573, 29898, 710, 29897, 13, 1753, 903, 29898, 2271, 29892, 4660, 29918, 401, 29922, 29906, 29900, 29900, 1125, 13, 29871, 12428, 353, 7274, 29889, 657, 29898, 2271, 29897, 13, 29871, 4974, 12428, 29889, 4882, 29918, 401, 1275, 4660, 29918, 401, 29892, 12428, 29889, 726, 13, 29871, 736, 12428, 13, 13, 29992, 9294, 29918, 4882, 29889, 9573, 29898, 24830, 29889, 5103, 29897, 13, 1753, 903, 29898, 7971, 29892, 4660, 29918, 401, 29922, 29906, 29900, 29900, 1125, 13, 29871, 4974, 12428, 29889, 4882, 29918, 401, 1275, 4660, 29918, 401, 29892, 12428, 29889, 726, 13, 29871, 736, 12428, 13, 13, 1753, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 1899, 1125, 13, 29871, 27435, 353, 525, 14695, 29899, 19438, 448, 29888, 847, 14695, 5325, 29914, 2917, 332, 800, 29914, 18717, 19438, 29918, 2917, 29974, 4286, 21053, 29915, 13, 29871, 1480, 29889, 8382, 703, 29934, 3904, 29901, 376, 718, 27435, 718, 525, 525, 718, 1899, 29897, 13, 29871, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 845, 2506, 29889, 5451, 29898, 19438, 718, 525, 525, 718, 1899, 876, 13, 13, 29992, 276, 2202, 29898, 29873, 2722, 29922, 29941, 29900, 29892, 9055, 29922, 29941, 29897, 13, 1753, 4480, 29918, 1454, 29918, 2676, 29918, 5509, 29898, 2271, 1125, 13, 29871, 1480, 29889, 8382, 703, 15870, 292, 304, 6159, 376, 718, 3142, 718, 376, 2023, 1159, 13, 29871, 12428, 353, 7274, 29889, 657, 29898, 2271, 29897, 13, 29871, 565, 12428, 29889, 4882, 29918, 401, 2804, 29871, 29906, 29900, 29900, 29901, 13, 1678, 12020, 8960, 877, 4882, 2433, 718, 851, 29898, 7971, 29889, 4882, 29918, 401, 876, 13, 29871, 736, 12428, 13, 13, 29992, 2272, 1688, 29889, 7241, 15546, 29898, 6078, 543, 1990, 1159, 13, 1753, 5096, 29898, 3827, 1125, 13, 13, 29871, 27435, 29918, 2917, 353, 679, 5552, 29898, 3827, 29889, 5453, 29892, 376, 19438, 29918, 2917, 613, 376, 26690, 1159, 13, 29871, 4480, 29918, 26045, 353, 679, 5552, 29898, 3827, 29889, 5453, 29892, 376, 10685, 29918, 26045, 613, 376, 1124, 597, 26690, 29901, 29896, 29906, 29941, 1159, 13, 13, 29871, 1480, 29889, 8382, 877, 19438, 29918, 2917, 29901, 525, 718, 27435, 29918, 2917, 29897, 13, 13, 29871, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 525, 21174, 1495, 13, 29871, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 525, 1758, 448, 29888, 448, 29894, 1495, 13, 29871, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 525, 786, 448, 29881, 1495, 13, 13, 29871, 363, 3142, 297, 4480, 29918, 26045, 29901, 13, 1678, 4480, 29918, 1454, 29918, 2676, 29918, 5509, 29898, 2271, 29897, 13, 13, 29871, 7709, 13, 13, 29871, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 525, 21174, 1495, 13, 29871, 10346, 29918, 19438, 29898, 19438, 29918, 2917, 29892, 525, 1758, 448, 29888, 448, 29894, 1495, 13, 2 ]
photobooth/1-web-base-layout/app/views.py
albertoSoto/raspberry-tic-projects
0
37274
<filename>photobooth/1-web-base-layout/app/views.py<gh_stars>0 from flask import render_template, flash, redirect from app import app @app.route('/') @app.route('/index') def index(): user = {'nickname': 'Berto'} posts = [ { 'author': {'nickname': 'Alum Post 1'}, 'body': 'This is the body of the first post.' }, { 'author': {'nickname': 'Teacher Post 2'}, 'body': 'This is the body of the second post.' } ] return render_template('index.html', title='Home', user=user, posts=posts) @app.route('/about') def about(): return render_template('about.html', title='About')
[ 1, 529, 9507, 29958, 561, 327, 711, 6983, 29914, 29896, 29899, 2676, 29899, 3188, 29899, 2680, 29914, 932, 29914, 7406, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 29784, 1053, 4050, 29918, 6886, 29892, 11013, 29892, 6684, 13, 3166, 623, 1053, 623, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 1495, 13, 29992, 932, 29889, 13134, 11219, 2248, 1495, 13, 1753, 2380, 7295, 13, 1678, 1404, 353, 11117, 19254, 978, 2396, 525, 17104, 517, 10827, 13, 1678, 11803, 353, 518, 13, 4706, 426, 13, 9651, 525, 8921, 2396, 11117, 19254, 978, 2396, 525, 2499, 398, 4918, 29871, 29896, 16675, 13, 9651, 525, 2587, 2396, 525, 4013, 338, 278, 3573, 310, 278, 937, 1400, 6169, 13, 4706, 2981, 13, 4706, 426, 13, 9651, 525, 8921, 2396, 11117, 19254, 978, 2396, 525, 29911, 4204, 261, 4918, 29871, 29906, 16675, 13, 9651, 525, 2587, 2396, 525, 4013, 338, 278, 3573, 310, 278, 1473, 1400, 6169, 13, 4706, 500, 13, 1678, 4514, 13, 1678, 736, 4050, 29918, 6886, 877, 2248, 29889, 1420, 742, 13, 462, 965, 3611, 2433, 11184, 742, 13, 462, 965, 1404, 29922, 1792, 29892, 13, 462, 965, 11803, 29922, 14080, 29897, 13, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 12717, 1495, 13, 1753, 1048, 7295, 13, 1678, 736, 4050, 29918, 6886, 877, 12717, 29889, 1420, 742, 13, 462, 965, 3611, 2433, 28173, 1495, 2 ]
comms.py
kajusz/ufscreenadsclient
0
16103
<reponame>kajusz/ufscreenadsclient<filename>comms.py import zmq context = zmq.Context() socket = context.socket(zmq.PAIR) address = "tcp://127.0.0.1:5000" def client(address): socket.connect(address) def server(address): socket.bind(address) def send(data): socket.send_string(data) def recv(): try: return socket.recv(flags=zmq.NOBLOCK) except zmq.Again as e: return None # print("No message received yet")
[ 1, 529, 276, 1112, 420, 29958, 29895, 1175, 10958, 29914, 1137, 10525, 328, 1557, 1593, 29966, 9507, 29958, 510, 1516, 29889, 2272, 13, 5215, 12162, 29939, 13, 4703, 353, 12162, 29939, 29889, 2677, 580, 13, 11514, 353, 3030, 29889, 11514, 29898, 14018, 29939, 29889, 7228, 8193, 29897, 13, 13, 7328, 353, 376, 23981, 597, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29945, 29900, 29900, 29900, 29908, 13, 13, 1753, 3132, 29898, 7328, 1125, 13, 1678, 9909, 29889, 6915, 29898, 7328, 29897, 13, 13, 1753, 1923, 29898, 7328, 1125, 13, 1678, 9909, 29889, 5355, 29898, 7328, 29897, 13, 13, 1753, 3638, 29898, 1272, 1125, 13, 1678, 9909, 29889, 6717, 29918, 1807, 29898, 1272, 29897, 13, 13, 1753, 1162, 29894, 7295, 13, 1678, 1018, 29901, 13, 4706, 736, 9909, 29889, 3757, 29894, 29898, 15764, 29922, 14018, 29939, 29889, 6632, 29933, 21339, 29897, 13, 1678, 5174, 12162, 29939, 29889, 14769, 475, 408, 321, 29901, 13, 4706, 736, 6213, 13, 29937, 4706, 1596, 703, 3782, 2643, 4520, 3447, 1159, 13, 2 ]
nmfTools/NMFtoolbox/NMFdiag.py
avinashpujala/av_segmentation
2
137603
<gh_stars>1-10 """ Name: NMFdiag Date of Revision: Jun 2019 Programmer: <NAME>, <NAME> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If you use the 'NMF toolbox' please refer to: [1] <NAME>, <NAME>, <NAME>, and <NAME> NMF Toolbox: Music Processing Applications of Nonnegative Matrix Factorization In Proceedings of the International Conference on Digital Audio Effects (DAFx), 2019. License: This file is part of 'NMF toolbox'. https://www.audiolabs-erlangen.de/resources/MIR/NMFtoolbox/ 'NMF toolbox' is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 'NMF toolbox' 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 'NMF toolbox'. If not, see http://www.gnu.org/licenses/. """ from copy import deepcopy import numpy as np from scipy.signal import convolve2d from scipy.ndimage import maximum_filter import matplotlib.pyplot as plt from tqdm import tnrange from NMFtoolbox.utils import EPS def NMFdiag(V, W0, H0, parameter=None): """Given a non-negative matrix V, find non-negative matrix factors W and H such that V ~ WH. Possibly also enforce continuity constraints. References ---------- [2] Lee, DD & Seung, HS. "Algorithms for Non-negative Matrix Factorization" <NAME>. & Mueller, M. "Using Score-Informed Constraints For NMF-Based Source Separation" Parameters ---------- V: array-like NxM matrix to be factorized W0: array-like Initialized W matrix H0: array-like Initialized H matrix parameter: dict distMeas Distance measure which is used for the optimization. Values are 'euclidean' for Euclidean, or 'divergence' for KL-divergence. numOfIter Number of iterations the algorithm will run. fixW Set to 1 if Templates W should be fixed during the update process. divergence cost function update rules # TODO: ? continuity Set of parameters related to the enforced continuity constraints. length Number of templates which should be activated successively. decay Parameter for specifying the decaying gain of successively activated templates. grid This value indicates in wich iterations of the NMF update procedure the continuity constraints should be enforced. Returns ------- W: array-like NxK non-negative matrix factor H: array-like KxM non-negative matrix factor """ N, M = V.shape # V matrix dimensions parameter = init_parameters(parameter) assertions(V, W0, H0) numOfSimulAct = parameter['continuity']['polyphony'] vis = parameter['vis'] # V matrix factorization # initialization of W and H W = deepcopy(W0) H = deepcopy(H0) fixW = parameter['fixW'] energyInW = np.sum(W**2, axis=0).reshape(-1, 1) energyScaler = np.tile(energyInW, (1, H.shape[1])) # prepare the max neighborhood kernel s = np.array(parameter['continuity']['sparsen']) assert np.mod(s[0], 2) == 1 and np.mod(s[1], 2) == 1, 'Sparsity parameter needs to be odd!' maxFiltKernel = np.zeros(s) maxFiltKernel[:, np.ceil(s[0] / 2).astype(int) - 1] = 1 maxFiltKernel[np.ceil(s[0] / 2).astype(int) - 1, :] = 1 for k in tnrange(parameter['numOfIter'], desc='Processing'): if vis: fig, ax = plt.subplots(figsize=(15, 10)) ax.imshow(H, aspect='auto', cmap='gray_r') ax.set_title('Activation Matrix H in Iteration {}'.format(k+1)) # in every 'grid' iteration of the update... if np.mod(k, parameter['continuity']['grid']) == 0: # sparsen the activations if s.max() > 1: # should in principle also include the energyScaler... H_filt = maximum_filter(H, footprint=maxFiltKernel, mode='constant') # find max values in neighborhood cond = np.array(H != np.array(H_filt)) H = np.where(cond, H * (1 - (k + 1) / parameter['numOfIter']), H) # ...restrict polyphony... if numOfSimulAct < H.shape[1]: sortVec = np.argsort(np.multiply(-H, energyScaler), axis=0) for j in range(H.shape[1]): H[sortVec[numOfSimulAct:, j], j] *= (1 - (k + 1) / parameter['numOfIter']) # ... and enforce continuity filt = np.eye(parameter['continuity']['length']) H = convolve2d(H, filt, 'same') if parameter['distMeas'] == 'euclidean': # euclidean update rules H *= (W.T @ V) / (W.T @ W @ H + EPS) if not fixW: W *= (V @ H.T / ((W @ H @ H.T) + EPS)) elif parameter['distMeas'] == 'divergence': # divergence update rules H *= (W.T @ (V / (W @ H + EPS))) / (np.sum(W, axis=0).T.reshape(-1, 1) @ np.ones((1, M)) + EPS) if not fixW: W *= ((V / (W @ H + EPS)) @ H.T) / (np.ones((N, 1)) @ np.sum(H, axis=1).reshape(1, -1) + EPS) else: raise ValueError('Unknown distance measure') if vis: _, ax2 = plt.subplots(figsize=(15, 10)) ax2.imshow(H, aspect='auto', cmap='gray_r') ax2.set_title('Final Activation Matrix H') return W, H def init_parameters(parameter): """Auxiliary function to set the parameter dictionary Parameters ---------- parameter: dict See the above function NMFdiag for further information Returns ------- parameter: dict """ parameter = dict() if parameter is None else parameter parameter['distMeas'] = 'divergence' if 'distMeas' not in parameter else parameter['distMeas'] parameter['numOfIter'] = 50 if 'fixW' not in parameter else parameter['numOfIter'] parameter['fixW'] = False if 'fixW' not in parameter else parameter['fixW'] parameter['continuity'] = {'length': 10, 'grid': 5, 'sparsen': [1, 1], 'polyphony': 5} if 'continuity' not in parameter else parameter['continuity'] parameter['vis'] = False if 'vis' not in parameter else parameter['vis'] return parameter def assertions(V, W0, H0): """ Auxiliary function to throw assertion errors, if needed Parameters ---------- V: array-like NxM matrix to be factorized W0: array-like Initialized W matrix H0: array-like Initialized H matrix """ # matrices dimensions consistency check N, M = V.shape # V matrix dimensions WN, WK = W0.shape # W matrix dimensions HK, HM = H0.shape # H matrix dimensions K = deepcopy(WK) # check if W matrix dimensions are consistent assert WN == N, 'W matrix has inconsistent dimensions.' # check if H matrix dimensions are consistent assert HK == K and HM == M, 'H matrix has inconsistent dimensions.' # matrices non-negativity check # check V matrix is non-negative assert not np.any(V < 0), 'V matrix must not contain negative values.' # check W0 matrix is non-negative assert not np.any(W0 < 0), 'W0 matrix must not contain negative values.' # check H0 matrix is non-negative assert not np.any(H0 < 0), 'H0 matrix must not contain negative values.'
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 13, 1678, 4408, 29901, 405, 29924, 29943, 6051, 351, 13, 1678, 4712, 310, 830, 4924, 29901, 8378, 29871, 29906, 29900, 29896, 29929, 13, 1678, 7835, 1050, 29901, 529, 5813, 10202, 529, 5813, 29958, 13, 13, 1678, 1273, 28198, 28198, 28198, 28198, 28198, 28198, 28198, 28198, 28198, 7686, 13, 1678, 960, 366, 671, 278, 525, 29940, 29924, 29943, 5780, 1884, 29915, 3113, 2737, 304, 29901, 13, 1678, 518, 29896, 29962, 29871, 529, 5813, 10202, 529, 5813, 10202, 529, 5813, 10202, 322, 529, 5813, 29958, 13, 418, 405, 29924, 29943, 21704, 1884, 29901, 6125, 10554, 292, 2401, 5795, 310, 405, 3409, 387, 1230, 22513, 13, 418, 383, 7168, 2133, 13, 418, 512, 1019, 3947, 886, 310, 278, 4623, 16377, 373, 15918, 21764, 26475, 29879, 13, 418, 313, 29928, 5098, 29916, 511, 29871, 29906, 29900, 29896, 29929, 29889, 13, 13, 1678, 19245, 29901, 13, 1678, 910, 934, 338, 760, 310, 525, 29940, 29924, 29943, 5780, 1884, 4286, 13, 1678, 2045, 597, 1636, 29889, 28863, 324, 6897, 29899, 261, 3893, 264, 29889, 311, 29914, 13237, 29914, 29924, 8193, 29914, 29940, 29924, 29943, 10154, 1884, 29914, 13, 1678, 525, 29940, 29924, 29943, 5780, 1884, 29915, 338, 3889, 7047, 29901, 366, 508, 2654, 391, 2666, 372, 322, 29914, 272, 6623, 372, 13, 1678, 1090, 278, 4958, 310, 278, 15143, 4593, 5236, 19245, 408, 6369, 491, 278, 13, 1678, 278, 12362, 18540, 10606, 29892, 2845, 1873, 29871, 29941, 310, 278, 19245, 29892, 470, 313, 271, 13, 1678, 596, 2984, 29897, 738, 2678, 1873, 29889, 13, 13, 1678, 525, 29940, 29924, 29943, 5780, 1884, 29915, 338, 13235, 297, 278, 4966, 393, 372, 674, 367, 5407, 29892, 541, 13, 1678, 399, 1806, 8187, 2692, 13764, 29979, 399, 1718, 29934, 13566, 29979, 29936, 1728, 1584, 278, 2411, 2957, 1370, 21867, 29891, 310, 13, 1678, 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, 15143, 4593, 13, 1678, 5236, 19245, 363, 901, 4902, 29889, 13, 13, 1678, 887, 881, 505, 4520, 263, 3509, 310, 278, 15143, 4593, 5236, 19245, 3412, 13, 1678, 411, 525, 29940, 29924, 29943, 5780, 1884, 4286, 960, 451, 29892, 1074, 1732, 597, 1636, 29889, 18713, 29889, 990, 29914, 506, 11259, 6294, 13, 13, 15945, 29908, 13, 13, 3166, 3509, 1053, 6483, 8552, 13, 5215, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 25436, 1053, 378, 1555, 345, 29906, 29881, 13, 3166, 4560, 2272, 29889, 299, 3027, 1053, 7472, 29918, 4572, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 260, 29939, 18933, 1053, 260, 29876, 3881, 13, 13, 3166, 405, 29924, 29943, 10154, 1884, 29889, 13239, 1053, 382, 7024, 13, 13, 13, 1753, 405, 29924, 29943, 6051, 351, 29898, 29963, 29892, 399, 29900, 29892, 379, 29900, 29892, 3443, 29922, 8516, 1125, 13, 1678, 9995, 29954, 5428, 263, 1661, 29899, 22198, 4636, 478, 29892, 1284, 1661, 29899, 22198, 4636, 13879, 399, 322, 379, 13, 1678, 1316, 393, 478, 3695, 12317, 29889, 29863, 14981, 884, 427, 10118, 3133, 537, 11938, 29889, 13, 13, 1678, 28318, 13, 1678, 448, 1378, 29899, 13, 1678, 518, 29906, 29962, 9371, 29892, 360, 29928, 669, 922, 686, 29892, 379, 29903, 29889, 376, 22461, 12404, 363, 10050, 29899, 22198, 22513, 383, 7168, 2133, 29908, 13, 1678, 529, 5813, 15513, 669, 8229, 4539, 29892, 341, 29889, 376, 15156, 2522, 487, 29899, 797, 15628, 1281, 4151, 9466, 1152, 405, 29924, 29943, 29899, 29933, 1463, 13, 1678, 7562, 922, 862, 362, 29908, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 478, 29901, 1409, 29899, 4561, 13, 4706, 405, 29916, 29924, 4636, 304, 367, 7329, 1891, 13, 13, 1678, 399, 29900, 29901, 1409, 29899, 4561, 13, 4706, 17250, 1891, 399, 4636, 13, 13, 1678, 379, 29900, 29901, 1409, 29899, 4561, 13, 4706, 17250, 1891, 379, 4636, 13, 13, 1678, 3443, 29901, 9657, 13, 4706, 1320, 6816, 294, 1678, 6652, 749, 5645, 607, 338, 1304, 363, 278, 13883, 29889, 13, 462, 1678, 2630, 1041, 526, 525, 29872, 27511, 29915, 363, 382, 27511, 29892, 470, 525, 29881, 2147, 10238, 29915, 13, 462, 1678, 363, 476, 29931, 29899, 29881, 2147, 10238, 29889, 13, 4706, 954, 2776, 13463, 259, 9681, 310, 24372, 278, 5687, 674, 1065, 29889, 13, 4706, 2329, 29956, 4706, 3789, 304, 29871, 29896, 565, 6789, 9884, 399, 881, 367, 4343, 2645, 278, 13, 462, 1678, 2767, 1889, 29889, 13, 462, 1678, 17089, 10238, 3438, 740, 2767, 6865, 396, 14402, 29901, 1577, 13, 4706, 3133, 537, 29871, 3789, 310, 4128, 4475, 304, 278, 24555, 1133, 3133, 537, 13, 462, 1678, 11938, 29889, 13, 4706, 3309, 418, 9681, 310, 17475, 607, 881, 367, 5039, 630, 13, 462, 1678, 2551, 3598, 29889, 13, 4706, 20228, 539, 24953, 363, 22146, 278, 20228, 292, 11581, 310, 2551, 3598, 13, 462, 1678, 5039, 630, 17475, 29889, 13, 4706, 6856, 4706, 910, 995, 14088, 297, 281, 436, 24372, 310, 278, 405, 29924, 29943, 2767, 13, 462, 1678, 8792, 278, 3133, 537, 11938, 881, 367, 24555, 1133, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 399, 29901, 1409, 29899, 4561, 13, 4706, 405, 29916, 29968, 1661, 29899, 22198, 4636, 7329, 13, 13, 1678, 379, 29901, 1409, 29899, 4561, 13, 4706, 476, 29916, 29924, 1661, 29899, 22198, 4636, 7329, 13, 1678, 9995, 13, 1678, 405, 29892, 341, 353, 478, 29889, 12181, 29871, 396, 478, 4636, 13391, 13, 13, 1678, 3443, 353, 2069, 29918, 16744, 29898, 15501, 29897, 13, 1678, 4974, 1080, 29898, 29963, 29892, 399, 29900, 29892, 379, 29900, 29897, 13, 13, 1678, 954, 2776, 8942, 352, 2865, 353, 3443, 1839, 20621, 537, 16215, 22678, 22214, 2033, 13, 1678, 1998, 353, 3443, 1839, 1730, 2033, 13, 13, 1678, 396, 478, 4636, 7329, 2133, 13, 1678, 396, 29871, 17865, 310, 399, 322, 379, 13, 1678, 399, 353, 6483, 8552, 29898, 29956, 29900, 29897, 13, 1678, 379, 353, 6483, 8552, 29898, 29950, 29900, 29897, 13, 13, 1678, 2329, 29956, 353, 3443, 1839, 5878, 29956, 2033, 13, 13, 1678, 5864, 797, 29956, 353, 7442, 29889, 2083, 29898, 29956, 1068, 29906, 29892, 9685, 29922, 29900, 467, 690, 14443, 6278, 29896, 29892, 29871, 29896, 29897, 13, 1678, 5864, 29636, 261, 353, 7442, 29889, 29873, 488, 29898, 27548, 797, 29956, 29892, 313, 29896, 29892, 379, 29889, 12181, 29961, 29896, 12622, 13, 13, 1678, 396, 19012, 278, 4236, 18403, 8466, 13, 1678, 269, 353, 7442, 29889, 2378, 29898, 15501, 1839, 20621, 537, 16215, 29879, 862, 4881, 11287, 13, 1678, 4974, 7442, 29889, 1545, 29898, 29879, 29961, 29900, 1402, 29871, 29906, 29897, 1275, 29871, 29896, 322, 7442, 29889, 1545, 29898, 29879, 29961, 29896, 1402, 29871, 29906, 29897, 1275, 29871, 29896, 29892, 525, 29903, 862, 29879, 537, 3443, 4225, 304, 367, 7736, 20714, 13, 13, 1678, 4236, 29943, 2782, 29968, 5851, 353, 7442, 29889, 3298, 359, 29898, 29879, 29897, 13, 1678, 4236, 29943, 2782, 29968, 5851, 7503, 29892, 7442, 29889, 27696, 29898, 29879, 29961, 29900, 29962, 847, 29871, 29906, 467, 579, 668, 29898, 524, 29897, 448, 29871, 29896, 29962, 353, 29871, 29896, 13, 1678, 4236, 29943, 2782, 29968, 5851, 29961, 9302, 29889, 27696, 29898, 29879, 29961, 29900, 29962, 847, 29871, 29906, 467, 579, 668, 29898, 524, 29897, 448, 29871, 29896, 29892, 584, 29962, 353, 29871, 29896, 13, 13, 1678, 363, 413, 297, 260, 29876, 3881, 29898, 15501, 1839, 1949, 2776, 13463, 7464, 5153, 2433, 7032, 292, 29374, 13, 4706, 565, 1998, 29901, 13, 9651, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 29898, 1003, 2311, 7607, 29896, 29945, 29892, 29871, 29896, 29900, 876, 13, 9651, 4853, 29889, 326, 4294, 29898, 29950, 29892, 9565, 2433, 6921, 742, 274, 1958, 2433, 21012, 29918, 29878, 1495, 13, 9651, 4853, 29889, 842, 29918, 3257, 877, 21786, 362, 22513, 379, 297, 20504, 362, 6571, 4286, 4830, 29898, 29895, 29974, 29896, 876, 13, 13, 4706, 396, 297, 1432, 525, 7720, 29915, 12541, 310, 278, 2767, 856, 13, 4706, 565, 7442, 29889, 1545, 29898, 29895, 29892, 3443, 1839, 20621, 537, 16215, 7720, 11287, 1275, 29871, 29900, 29901, 13, 13, 9651, 396, 805, 1503, 264, 278, 5039, 800, 13, 9651, 565, 269, 29889, 3317, 580, 1405, 29871, 29896, 29901, 13, 13, 18884, 396, 881, 297, 12502, 884, 3160, 278, 5864, 29636, 261, 856, 13, 18884, 379, 29918, 1777, 29873, 353, 7472, 29918, 4572, 29898, 29950, 29892, 3661, 2158, 29922, 3317, 29943, 2782, 29968, 5851, 29892, 4464, 2433, 23362, 1495, 29871, 396, 1284, 4236, 1819, 297, 18403, 13, 13, 18884, 2148, 353, 7442, 29889, 2378, 29898, 29950, 2804, 7442, 29889, 2378, 29898, 29950, 29918, 1777, 29873, 876, 13, 18884, 379, 353, 7442, 29889, 3062, 29898, 1116, 29892, 379, 334, 313, 29896, 448, 313, 29895, 718, 29871, 29896, 29897, 847, 3443, 1839, 1949, 2776, 13463, 2033, 511, 379, 29897, 13, 13, 9651, 396, 2023, 5060, 4146, 15680, 22214, 856, 13, 9651, 565, 954, 2776, 8942, 352, 2865, 529, 379, 29889, 12181, 29961, 29896, 5387, 13, 18884, 2656, 25987, 353, 7442, 29889, 5085, 441, 29898, 9302, 29889, 18056, 368, 6278, 29950, 29892, 5864, 29636, 261, 511, 9685, 29922, 29900, 29897, 13, 13, 18884, 363, 432, 297, 3464, 29898, 29950, 29889, 12181, 29961, 29896, 29962, 1125, 13, 462, 1678, 379, 29961, 6605, 25987, 29961, 1949, 2776, 8942, 352, 2865, 29901, 29892, 432, 1402, 432, 29962, 334, 29922, 313, 29896, 448, 313, 29895, 718, 29871, 29896, 29897, 847, 3443, 1839, 1949, 2776, 13463, 11287, 13, 13, 9651, 396, 2023, 322, 427, 10118, 3133, 537, 13, 9651, 977, 29873, 353, 7442, 29889, 1032, 29872, 29898, 15501, 1839, 20621, 537, 16215, 2848, 11287, 13, 9651, 379, 353, 378, 1555, 345, 29906, 29881, 29898, 29950, 29892, 977, 29873, 29892, 525, 17642, 1495, 13, 13, 4706, 565, 3443, 1839, 5721, 6816, 294, 2033, 1275, 525, 29872, 27511, 2396, 29871, 396, 321, 27511, 2767, 6865, 13, 9651, 379, 334, 29922, 313, 29956, 29889, 29911, 732, 478, 29897, 847, 313, 29956, 29889, 29911, 732, 399, 732, 379, 718, 382, 7024, 29897, 13, 13, 9651, 565, 451, 2329, 29956, 29901, 13, 18884, 399, 334, 29922, 313, 29963, 732, 379, 29889, 29911, 847, 5135, 29956, 732, 379, 732, 379, 29889, 29911, 29897, 718, 382, 7024, 876, 13, 13, 4706, 25342, 3443, 1839, 5721, 6816, 294, 2033, 1275, 525, 29881, 2147, 10238, 2396, 29871, 396, 17089, 10238, 2767, 6865, 13, 9651, 379, 334, 29922, 313, 29956, 29889, 29911, 732, 313, 29963, 847, 313, 29956, 732, 379, 718, 382, 7024, 4961, 847, 313, 9302, 29889, 2083, 29898, 29956, 29892, 9685, 29922, 29900, 467, 29911, 29889, 690, 14443, 6278, 29896, 29892, 29871, 29896, 29897, 732, 7442, 29889, 2873, 3552, 29896, 29892, 341, 876, 718, 382, 7024, 29897, 13, 13, 9651, 565, 451, 2329, 29956, 29901, 13, 18884, 399, 334, 29922, 5135, 29963, 847, 313, 29956, 732, 379, 718, 382, 7024, 876, 732, 379, 29889, 29911, 29897, 847, 313, 9302, 29889, 2873, 3552, 29940, 29892, 29871, 29896, 876, 732, 7442, 29889, 2083, 29898, 29950, 29892, 9685, 29922, 29896, 467, 690, 14443, 29898, 29896, 29892, 448, 29896, 29897, 718, 382, 7024, 29897, 13, 13, 4706, 1683, 29901, 13, 9651, 12020, 7865, 2392, 877, 14148, 5418, 5645, 1495, 13, 13, 1678, 565, 1998, 29901, 13, 4706, 17117, 4853, 29906, 353, 14770, 29889, 1491, 26762, 29898, 1003, 2311, 7607, 29896, 29945, 29892, 29871, 29896, 29900, 876, 13, 4706, 4853, 29906, 29889, 326, 4294, 29898, 29950, 29892, 9565, 2433, 6921, 742, 274, 1958, 2433, 21012, 29918, 29878, 1495, 13, 4706, 4853, 29906, 29889, 842, 29918, 3257, 877, 15790, 21775, 362, 22513, 379, 1495, 13, 13, 1678, 736, 399, 29892, 379, 13, 13, 13, 1753, 2069, 29918, 16744, 29898, 15501, 1125, 13, 1678, 9995, 29909, 1314, 2638, 653, 740, 304, 731, 278, 3443, 8600, 13, 13, 539, 12662, 2699, 13, 539, 448, 1378, 29899, 13, 539, 3443, 29901, 9657, 13, 965, 2823, 278, 2038, 740, 405, 29924, 29943, 6051, 351, 363, 4340, 2472, 13, 13, 539, 16969, 13, 539, 448, 22158, 13, 539, 3443, 29901, 9657, 13, 1678, 9995, 13, 1678, 3443, 353, 9657, 580, 565, 3443, 338, 6213, 1683, 3443, 13, 1678, 3443, 1839, 5721, 6816, 294, 2033, 353, 525, 29881, 2147, 10238, 29915, 565, 525, 5721, 6816, 294, 29915, 451, 297, 3443, 1683, 3443, 1839, 5721, 6816, 294, 2033, 13, 1678, 3443, 1839, 1949, 2776, 13463, 2033, 353, 29871, 29945, 29900, 565, 525, 5878, 29956, 29915, 451, 297, 3443, 1683, 3443, 1839, 1949, 2776, 13463, 2033, 13, 1678, 3443, 1839, 5878, 29956, 2033, 353, 7700, 565, 525, 5878, 29956, 29915, 451, 297, 3443, 1683, 3443, 1839, 5878, 29956, 2033, 13, 1678, 3443, 1839, 20621, 537, 2033, 353, 11117, 2848, 2396, 29871, 29896, 29900, 29892, 13, 462, 1669, 525, 7720, 2396, 29871, 29945, 29892, 13, 462, 1669, 525, 29879, 862, 4881, 2396, 518, 29896, 29892, 29871, 29896, 1402, 13, 462, 1669, 525, 22678, 22214, 2396, 29871, 29945, 29913, 565, 525, 20621, 537, 29915, 451, 297, 3443, 1683, 3443, 1839, 20621, 537, 2033, 13, 13, 1678, 3443, 1839, 1730, 2033, 353, 7700, 565, 525, 1730, 29915, 451, 297, 3443, 1683, 3443, 1839, 1730, 2033, 13, 13, 1678, 736, 3443, 13, 13, 13, 1753, 4974, 1080, 29898, 29963, 29892, 399, 29900, 29892, 379, 29900, 1125, 13, 1678, 9995, 13, 4706, 319, 1314, 2638, 653, 740, 304, 3183, 28306, 4436, 29892, 565, 4312, 13, 13, 4706, 12662, 2699, 13, 4706, 448, 1378, 29899, 13, 4706, 478, 29901, 1409, 29899, 4561, 13, 9651, 405, 29916, 29924, 4636, 304, 367, 7329, 1891, 13, 4706, 399, 29900, 29901, 1409, 29899, 4561, 13, 9651, 17250, 1891, 399, 4636, 13, 4706, 379, 29900, 29901, 1409, 29899, 4561, 13, 9651, 17250, 1891, 379, 4636, 13, 1678, 9995, 13, 1678, 396, 13516, 13391, 5718, 3819, 1423, 13, 1678, 405, 29892, 341, 353, 478, 29889, 12181, 29871, 396, 478, 4636, 13391, 13, 1678, 399, 29940, 29892, 399, 29968, 353, 399, 29900, 29889, 12181, 29871, 396, 399, 4636, 13391, 13, 1678, 379, 29968, 29892, 379, 29924, 353, 379, 29900, 29889, 12181, 29871, 396, 379, 4636, 13391, 13, 1678, 476, 353, 6483, 8552, 29898, 29956, 29968, 29897, 13, 13, 1678, 396, 1423, 565, 399, 4636, 13391, 526, 13747, 13, 1678, 4974, 399, 29940, 1275, 405, 29892, 525, 29956, 4636, 756, 22435, 9696, 13391, 6169, 13, 13, 1678, 396, 1423, 565, 379, 4636, 13391, 526, 13747, 13, 1678, 4974, 379, 29968, 1275, 476, 322, 379, 29924, 1275, 341, 29892, 525, 29950, 4636, 756, 22435, 9696, 13391, 6169, 13, 13, 1678, 396, 13516, 1661, 29899, 10052, 28157, 1423, 13, 13, 1678, 396, 29871, 1423, 478, 4636, 338, 1661, 29899, 22198, 13, 1678, 4974, 451, 7442, 29889, 1384, 29898, 29963, 529, 29871, 29900, 511, 525, 29963, 4636, 1818, 451, 1712, 8178, 1819, 6169, 13, 13, 1678, 396, 29871, 1423, 399, 29900, 4636, 338, 1661, 29899, 22198, 13, 1678, 4974, 451, 7442, 29889, 1384, 29898, 29956, 29900, 529, 29871, 29900, 511, 525, 29956, 29900, 4636, 1818, 451, 1712, 8178, 1819, 6169, 13, 13, 1678, 396, 29871, 1423, 379, 29900, 4636, 338, 1661, 29899, 22198, 13, 1678, 4974, 451, 7442, 29889, 1384, 29898, 29950, 29900, 529, 29871, 29900, 511, 525, 29950, 29900, 4636, 1818, 451, 1712, 8178, 1819, 6169, 13, 2 ]
functest/opnfv_tests/openstack/shaker/shaker.py
opnfv-poc/functest
0
7959
<filename>functest/opnfv_tests/openstack/shaker/shaker.py #!/usr/bin/env python # Copyright (c) 2018 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 """ Shaker_ wraps around popular system network testing tools like iperf, iperf3 and netperf (with help of flent). Shaker is able to deploy OpenStack instances and networks in different topologies. Shaker scenario specifies the deployment and list of tests to execute. .. _Shaker: http://pyshaker.readthedocs.io/en/latest/ """ import logging import os import json import scp from functest.core import singlevm from functest.utils import env class Shaker(singlevm.SingleVm2): """Run shaker full+perf l2 and l3""" # pylint: disable=too-many-instance-attributes __logger = logging.getLogger(__name__) filename = '/home/opnfv/functest/images/shaker-image-1.3.0+stretch.qcow2' flavor_ram = 512 flavor_vcpus = 1 flavor_disk = 3 username = 'debian' port = 9000 ssh_connect_loops = 12 create_server_timeout = 300 shaker_timeout = '3600' quota_instances = -1 quota_cores = -1 def __init__(self, **kwargs): super(Shaker, self).__init__(**kwargs) self.role = None def check_requirements(self): if self.count_hypervisors() < 2: self.__logger.warning("Shaker requires at least 2 hypervisors") self.is_skipped = True self.project.clean() def prepare(self): super(Shaker, self).prepare() self.cloud.create_security_group_rule( self.sec.id, port_range_min=self.port, port_range_max=self.port, protocol='tcp', direction='ingress') def execute(self): """ Returns: - 0 if success - 1 on operation error """ assert self.ssh endpoint = self.get_public_auth_url(self.orig_cloud) self.__logger.debug("keystone endpoint: %s", endpoint) if self.orig_cloud.get_role("admin"): role_name = "admin" elif self.orig_cloud.get_role("Admin"): role_name = "Admin" else: raise Exception("Cannot detect neither admin nor Admin") self.orig_cloud.grant_role( role_name, user=self.project.user.id, project=self.project.project.id, domain=self.project.domain.id) if not self.orig_cloud.get_role("heat_stack_owner"): self.role = self.orig_cloud.create_role("heat_stack_owner") self.orig_cloud.grant_role( "heat_stack_owner", user=self.project.user.id, project=self.project.project.id, domain=self.project.domain.id) self.orig_cloud.set_compute_quotas( self.project.project.name, instances=self.quota_instances, cores=self.quota_cores) scpc = scp.SCPClient(self.ssh.get_transport()) scpc.put('/home/opnfv/functest/conf/env_file', remote_path='~/') if os.environ.get('OS_CACERT'): scpc.put(os.environ.get('OS_CACERT'), remote_path='~/os_cacert') (_, stdout, stderr) = self.ssh.exec_command( 'source ~/env_file && ' 'export OS_INTERFACE=public && ' 'export OS_AUTH_URL={} && ' 'export OS_USERNAME={} && ' 'export OS_PROJECT_NAME={} && ' 'export OS_PROJECT_ID={} && ' 'unset OS_TENANT_NAME && ' 'unset OS_TENANT_ID && ' 'unset OS_ENDPOINT_TYPE && ' 'export OS_PASSWORD="{}" && ' '{}' 'env && ' 'timeout {} shaker --debug --image-name {} --flavor-name {} ' '--server-endpoint {}:9000 --external-net {} --dns-nameservers {} ' '--scenario openstack/full_l2,' 'openstack/full_l3_east_west,' 'openstack/full_l3_north_south,' 'openstack/perf_l3_north_south ' '--report report.html --output report.json'.format( endpoint, self.project.user.name, self.project.project.name, self.project.project.id, self.project.password, 'export OS_CACERT=~/os_cacert && ' if os.environ.get( 'OS_CACERT') else '', self.shaker_timeout, self.image.name, self.flavor.name, self.fip.floating_ip_address, self.ext_net.id, env.get('NAMESERVER'))) self.__logger.info("output:\n%s", stdout.read().decode("utf-8")) self.__logger.info("error:\n%s", stderr.read().decode("utf-8")) if not os.path.exists(self.res_dir): os.makedirs(self.res_dir) try: scpc.get('report.json', self.res_dir) scpc.get('report.html', self.res_dir) except scp.SCPException: self.__logger.exception("cannot get report files") return 1 with open(os.path.join(self.res_dir, 'report.json')) as json_file: data = json.load(json_file) for value in data["records"].values(): if value["status"] != "ok": self.__logger.error( "%s failed\n%s", value["scenario"], value["stderr"]) return 1 return stdout.channel.recv_exit_status() def clean(self): super(Shaker, self).clean() if self.role: self.orig_cloud.delete_role(self.role.id)
[ 1, 529, 9507, 29958, 7692, 312, 342, 29914, 459, 29876, 29888, 29894, 29918, 21150, 29914, 3150, 1429, 29914, 845, 5790, 29914, 845, 5790, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 26048, 322, 4045, 29889, 13, 29937, 13, 29937, 2178, 10462, 21676, 29889, 910, 1824, 322, 278, 10259, 1384, 292, 17279, 13, 29937, 526, 1754, 3625, 1090, 278, 4958, 310, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 13, 29937, 607, 18509, 583, 445, 4978, 29892, 322, 338, 3625, 472, 13, 29937, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 13, 15945, 29908, 13, 2713, 5790, 29918, 11463, 567, 2820, 5972, 1788, 3564, 6724, 8492, 763, 474, 546, 29888, 29892, 474, 546, 29888, 29941, 13, 392, 7787, 546, 29888, 313, 2541, 1371, 310, 1652, 296, 467, 1383, 5790, 338, 2221, 304, 7246, 4673, 7264, 8871, 13, 392, 14379, 297, 1422, 2246, 11763, 29889, 1383, 5790, 10483, 1580, 11057, 278, 18209, 13, 392, 1051, 310, 6987, 304, 6222, 29889, 13, 13, 636, 903, 2713, 5790, 29901, 1732, 597, 2272, 845, 5790, 29889, 949, 386, 287, 12332, 29889, 601, 29914, 264, 29914, 12333, 29914, 13, 15945, 29908, 13, 13, 5215, 12183, 13, 5215, 2897, 13, 13, 5215, 4390, 13, 5215, 885, 29886, 13, 13, 3166, 2090, 312, 342, 29889, 3221, 1053, 2323, 6925, 13, 3166, 2090, 312, 342, 29889, 13239, 1053, 8829, 13, 13, 13, 1990, 1383, 5790, 29898, 2976, 2608, 29885, 29889, 15771, 29963, 29885, 29906, 1125, 13, 1678, 9995, 6558, 528, 5790, 2989, 29974, 546, 29888, 301, 29906, 322, 301, 29941, 15945, 29908, 13, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 517, 29877, 29899, 13011, 29899, 8758, 29899, 15697, 13, 13, 1678, 4770, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 1678, 10422, 353, 8207, 5184, 29914, 459, 29876, 29888, 29894, 29914, 7692, 312, 342, 29914, 8346, 29914, 845, 5790, 29899, 3027, 29899, 29896, 29889, 29941, 29889, 29900, 29974, 303, 10301, 29889, 29939, 20587, 29906, 29915, 13, 1678, 21054, 272, 29918, 2572, 353, 29871, 29945, 29896, 29906, 13, 1678, 21054, 272, 29918, 29894, 6814, 375, 353, 29871, 29896, 13, 1678, 21054, 272, 29918, 20960, 353, 29871, 29941, 13, 1678, 8952, 353, 525, 16529, 713, 29915, 13, 1678, 2011, 353, 29871, 29929, 29900, 29900, 29900, 13, 1678, 13927, 29918, 6915, 29918, 417, 3554, 353, 29871, 29896, 29906, 13, 1678, 1653, 29918, 2974, 29918, 15619, 353, 29871, 29941, 29900, 29900, 13, 1678, 528, 5790, 29918, 15619, 353, 525, 29941, 29953, 29900, 29900, 29915, 13, 1678, 439, 4616, 29918, 2611, 2925, 353, 448, 29896, 13, 1678, 439, 4616, 29918, 29883, 2361, 353, 448, 29896, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 19290, 1125, 13, 4706, 2428, 29898, 2713, 5790, 29892, 1583, 467, 1649, 2344, 12035, 1068, 19290, 29897, 13, 4706, 1583, 29889, 12154, 353, 6213, 13, 13, 1678, 822, 1423, 29918, 12277, 1860, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 2798, 29918, 24947, 1730, 943, 580, 529, 29871, 29906, 29901, 13, 9651, 1583, 17255, 21707, 29889, 27392, 703, 2713, 5790, 6858, 472, 3203, 29871, 29906, 11266, 1730, 943, 1159, 13, 9651, 1583, 29889, 275, 29918, 2574, 2986, 353, 5852, 13, 9651, 1583, 29889, 4836, 29889, 14941, 580, 13, 13, 1678, 822, 19012, 29898, 1311, 1125, 13, 4706, 2428, 29898, 2713, 5790, 29892, 1583, 467, 19125, 580, 13, 4706, 1583, 29889, 9274, 29889, 3258, 29918, 8926, 29918, 2972, 29918, 7491, 29898, 13, 9651, 1583, 29889, 3471, 29889, 333, 29892, 2011, 29918, 3881, 29918, 1195, 29922, 1311, 29889, 637, 29892, 2011, 29918, 3881, 29918, 3317, 29922, 1311, 29889, 637, 29892, 13, 9651, 9608, 2433, 23981, 742, 5305, 2433, 292, 1253, 1495, 13, 13, 1678, 822, 6222, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 16969, 29901, 13, 9651, 448, 29871, 29900, 565, 2551, 13, 9651, 448, 29871, 29896, 373, 5858, 1059, 13, 4706, 9995, 13, 4706, 4974, 1583, 29889, 15269, 13, 4706, 16248, 353, 1583, 29889, 657, 29918, 3597, 29918, 5150, 29918, 2271, 29898, 1311, 29889, 12683, 29918, 9274, 29897, 13, 4706, 1583, 17255, 21707, 29889, 8382, 703, 446, 858, 650, 16248, 29901, 1273, 29879, 613, 16248, 29897, 13, 4706, 565, 1583, 29889, 12683, 29918, 9274, 29889, 657, 29918, 12154, 703, 6406, 29908, 1125, 13, 9651, 6297, 29918, 978, 353, 376, 6406, 29908, 13, 4706, 25342, 1583, 29889, 12683, 29918, 9274, 29889, 657, 29918, 12154, 703, 12754, 29908, 1125, 13, 9651, 6297, 29918, 978, 353, 376, 12754, 29908, 13, 4706, 1683, 29901, 13, 9651, 12020, 8960, 703, 29089, 6459, 9561, 4113, 3643, 10229, 1159, 13, 4706, 1583, 29889, 12683, 29918, 9274, 29889, 629, 424, 29918, 12154, 29898, 13, 9651, 6297, 29918, 978, 29892, 1404, 29922, 1311, 29889, 4836, 29889, 1792, 29889, 333, 29892, 13, 9651, 2060, 29922, 1311, 29889, 4836, 29889, 4836, 29889, 333, 29892, 13, 9651, 5354, 29922, 1311, 29889, 4836, 29889, 7247, 29889, 333, 29897, 13, 4706, 565, 451, 1583, 29889, 12683, 29918, 9274, 29889, 657, 29918, 12154, 703, 354, 271, 29918, 1429, 29918, 20348, 29908, 1125, 13, 9651, 1583, 29889, 12154, 353, 1583, 29889, 12683, 29918, 9274, 29889, 3258, 29918, 12154, 703, 354, 271, 29918, 1429, 29918, 20348, 1159, 13, 4706, 1583, 29889, 12683, 29918, 9274, 29889, 629, 424, 29918, 12154, 29898, 13, 9651, 376, 354, 271, 29918, 1429, 29918, 20348, 613, 1404, 29922, 1311, 29889, 4836, 29889, 1792, 29889, 333, 29892, 13, 9651, 2060, 29922, 1311, 29889, 4836, 29889, 4836, 29889, 333, 29892, 13, 9651, 5354, 29922, 1311, 29889, 4836, 29889, 7247, 29889, 333, 29897, 13, 4706, 1583, 29889, 12683, 29918, 9274, 29889, 842, 29918, 26017, 29918, 23083, 294, 29898, 13, 9651, 1583, 29889, 4836, 29889, 4836, 29889, 978, 29892, 13, 9651, 8871, 29922, 1311, 29889, 339, 4616, 29918, 2611, 2925, 29892, 13, 9651, 28337, 29922, 1311, 29889, 339, 4616, 29918, 29883, 2361, 29897, 13, 4706, 885, 6739, 353, 885, 29886, 29889, 29903, 6271, 4032, 29898, 1311, 29889, 15269, 29889, 657, 29918, 27882, 3101, 13, 4706, 885, 6739, 29889, 649, 11219, 5184, 29914, 459, 29876, 29888, 29894, 29914, 7692, 312, 342, 29914, 5527, 29914, 6272, 29918, 1445, 742, 7592, 29918, 2084, 2433, 20038, 1495, 13, 4706, 565, 2897, 29889, 21813, 29889, 657, 877, 3267, 29918, 29907, 2477, 20161, 29374, 13, 9651, 885, 6739, 29889, 649, 29898, 359, 29889, 21813, 29889, 657, 877, 3267, 29918, 29907, 2477, 20161, 5477, 7592, 29918, 2084, 2433, 20038, 359, 29918, 29883, 562, 814, 1495, 13, 4706, 313, 3383, 27591, 29892, 380, 20405, 29897, 353, 1583, 29889, 15269, 29889, 4258, 29918, 6519, 29898, 13, 9651, 525, 4993, 3695, 29914, 6272, 29918, 1445, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 23845, 29943, 11538, 29922, 3597, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 20656, 29950, 29918, 4219, 3790, 29913, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 11889, 5813, 3790, 29913, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 8618, 17637, 29918, 5813, 3790, 29913, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 8618, 17637, 29918, 1367, 3790, 29913, 2607, 525, 13, 9651, 525, 348, 842, 6570, 29918, 29911, 1430, 13566, 29918, 5813, 2607, 525, 13, 9651, 525, 348, 842, 6570, 29918, 29911, 1430, 13566, 29918, 1367, 2607, 525, 13, 9651, 525, 348, 842, 6570, 29918, 1430, 11191, 6992, 29911, 29918, 11116, 2607, 525, 13, 9651, 525, 15843, 6570, 29918, 25711, 17013, 10724, 5038, 2607, 525, 13, 9651, 525, 8875, 29915, 13, 9651, 525, 6272, 2607, 525, 13, 9651, 525, 15619, 6571, 528, 5790, 1192, 8382, 1192, 3027, 29899, 978, 6571, 1192, 29888, 4112, 272, 29899, 978, 6571, 525, 13, 9651, 525, 489, 2974, 29899, 29734, 426, 6177, 29929, 29900, 29900, 29900, 1192, 23176, 29899, 1212, 6571, 1192, 29881, 1983, 29899, 7039, 261, 874, 6571, 525, 13, 9651, 525, 489, 1557, 24893, 1722, 1429, 29914, 8159, 29918, 29880, 29906, 5501, 13, 9651, 525, 3150, 1429, 29914, 8159, 29918, 29880, 29941, 29918, 23027, 29918, 5933, 5501, 13, 9651, 525, 3150, 1429, 29914, 8159, 29918, 29880, 29941, 29918, 29876, 2072, 29918, 29879, 2438, 5501, 13, 9651, 525, 3150, 1429, 29914, 546, 29888, 29918, 29880, 29941, 29918, 29876, 2072, 29918, 29879, 2438, 525, 13, 9651, 525, 489, 12276, 3461, 29889, 1420, 1192, 4905, 3461, 29889, 3126, 4286, 4830, 29898, 13, 18884, 16248, 29892, 1583, 29889, 4836, 29889, 1792, 29889, 978, 29892, 1583, 29889, 4836, 29889, 4836, 29889, 978, 29892, 13, 18884, 1583, 29889, 4836, 29889, 4836, 29889, 333, 29892, 1583, 29889, 4836, 29889, 5630, 29892, 13, 18884, 525, 15843, 6570, 29918, 29907, 2477, 20161, 29922, 20038, 359, 29918, 29883, 562, 814, 2607, 525, 565, 2897, 29889, 21813, 29889, 657, 29898, 13, 462, 1678, 525, 3267, 29918, 29907, 2477, 20161, 1495, 1683, 15516, 13, 18884, 1583, 29889, 845, 5790, 29918, 15619, 29892, 1583, 29889, 3027, 29889, 978, 29892, 1583, 29889, 29888, 4112, 272, 29889, 978, 29892, 13, 18884, 1583, 29889, 29888, 666, 29889, 29888, 417, 1218, 29918, 666, 29918, 7328, 29892, 1583, 29889, 1062, 29918, 1212, 29889, 333, 29892, 13, 18884, 8829, 29889, 657, 877, 5813, 18603, 29915, 4961, 13, 4706, 1583, 17255, 21707, 29889, 3888, 703, 4905, 3583, 29876, 29995, 29879, 613, 27591, 29889, 949, 2141, 13808, 703, 9420, 29899, 29947, 5783, 13, 4706, 1583, 17255, 21707, 29889, 3888, 703, 2704, 3583, 29876, 29995, 29879, 613, 380, 20405, 29889, 949, 2141, 13808, 703, 9420, 29899, 29947, 5783, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 1311, 29889, 690, 29918, 3972, 1125, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 1311, 29889, 690, 29918, 3972, 29897, 13, 4706, 1018, 29901, 13, 9651, 885, 6739, 29889, 657, 877, 12276, 29889, 3126, 742, 1583, 29889, 690, 29918, 3972, 29897, 13, 9651, 885, 6739, 29889, 657, 877, 12276, 29889, 1420, 742, 1583, 29889, 690, 29918, 3972, 29897, 13, 4706, 5174, 885, 29886, 29889, 29903, 6271, 2451, 29901, 13, 9651, 1583, 17255, 21707, 29889, 11739, 703, 29883, 6735, 679, 3461, 2066, 1159, 13, 9651, 736, 29871, 29896, 13, 4706, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 690, 29918, 3972, 29892, 525, 12276, 29889, 3126, 8785, 408, 4390, 29918, 1445, 29901, 13, 9651, 848, 353, 4390, 29889, 1359, 29898, 3126, 29918, 1445, 29897, 13, 9651, 363, 995, 297, 848, 3366, 3757, 4339, 16862, 5975, 7295, 13, 18884, 565, 995, 3366, 4882, 3108, 2804, 376, 554, 1115, 13, 462, 1678, 1583, 17255, 21707, 29889, 2704, 29898, 13, 462, 4706, 11860, 29879, 5229, 29905, 29876, 29995, 29879, 613, 995, 3366, 1557, 24893, 12436, 995, 3366, 303, 20405, 20068, 13, 462, 1678, 736, 29871, 29896, 13, 4706, 736, 27591, 29889, 12719, 29889, 3757, 29894, 29918, 13322, 29918, 4882, 580, 13, 13, 1678, 822, 5941, 29898, 1311, 1125, 13, 4706, 2428, 29898, 2713, 5790, 29892, 1583, 467, 14941, 580, 13, 4706, 565, 1583, 29889, 12154, 29901, 13, 9651, 1583, 29889, 12683, 29918, 9274, 29889, 8143, 29918, 12154, 29898, 1311, 29889, 12154, 29889, 333, 29897, 13, 2 ]
sa/profiles/Zyxel/ZyNOS/get_switchport.py
xUndero/noc
1
108678
<reponame>xUndero/noc # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Zyxel.ZyNOS.get_switchport # --------------------------------------------------------------------- # Copyright (C) 2007-2015 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modules import re # NOC modules from noc.core.script.base import BaseScript from noc.sa.interfaces.igetswitchport import IGetSwitchport class Script(BaseScript): name = "Zyxel.ZyNOS.get_switchport" interface = IGetSwitchport rx_portinfo = re.compile( r"Port No\s+:(?P<interface>\d+)\n" r"\s*Active\s+:(?P<admin>\S+)\n" r"\s*Name\s+:(?P<description>.+)?\n" r"\s*PVID\s+:(?P<untag>\d+)\s+Flow Control\s+:\S+$", re.MULTILINE, ) rx_vlan_stack = re.compile(r"^(?P<interface>\d+)\s+(?P<role>\S+).+$", re.MULTILINE) rx_vlan_stack_global = re.compile(r"^Operation:\s+(?P<status>active)$") rx_vlan_ports = re.compile( r"\s+\d+\s+(?P<vid>\d+)\s+\S+\s+\S+\s+" r"Untagged\s+:(?P<untagged>[0-9,\-]*)." r"\s+Tagged\s+:(?P<tagged>[0-9,\-]*)", re.MULTILINE | re.DOTALL, ) def execute(self): # Get portchannels portchannel_members = [] portchannels = self.scripts.get_portchannel() for p in portchannels: portchannel_members += p["members"] # Get interafces' status interface_status = {} for s in self.scripts.get_interface_status(): interface_status[s["interface"]] = s["status"] # Get 802.1ad status if supported vlan_stack_status = {} try: cmd = self.cli("show vlan-stacking") match = self.rx_vlan_stack_global.match(cmd) if match: for match in self.rx_vlan_stack.finditer(cmd): if match.group("role").lower() == "tunnel": vlan_stack_status[int(match.group("interface"))] = True except self.CLISyntaxError: pass # Get ports in vlans vlan_ports = [] for match in self.rx_vlan_ports.finditer(self.cli("show vlan")): vlan_ports += [ { "vid": match.group("vid"), "tagged": self.expand_rangelist(match.group("tagged")), "untagged": self.expand_rangelist(match.group("untagged")), } ] # Make a list of tags for each port port_tags = {} for port in interface_status: tags = [] untag = [] for vlan in vlan_ports: if int(port) in vlan["tagged"]: tags += [vlan["vid"]] elif int(port) in vlan["untagged"]: untag = vlan["vid"] port_tags[port] = {"tags": tags, "untag": untag} # Get switchport data and overall result r = [] swp = {} for match in self.rx_portinfo.finditer(self.cli("show interface config *")): name = match.group("interface") swp = { "status": interface_status.get(name, False), "802.1Q Enabled": len(port_tags[name].get("tags", None)) > 0, "802.1ad Tunnel": vlan_stack_status.get(int(name), False), "tagged": port_tags[name]["tags"], } if match.group("description"): swp["description"] = match.group("description") if port_tags[name]["untag"]: swp["untagged"] = port_tags[name]["untag"] if name not in portchannel_members: swp["interface"] = name swp["members"] = [] r += [swp] else: for p in portchannels: if name in p["members"]: swp["interface"] = p["interface"] swp["members"] = p["members"] r += [swp] st = False for m in p["members"]: st = interface_status.get(name, False) if st: break swp["status"] = st portchannels.remove(p) break return r
[ 1, 529, 276, 1112, 420, 29958, 29916, 25263, 1489, 29914, 10763, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 448, 2683, 2683, 2683, 2683, 807, 13, 29937, 796, 29891, 29916, 295, 29889, 29999, 29891, 29940, 3267, 29889, 657, 29918, 15123, 637, 13, 29937, 448, 2683, 2683, 2683, 2683, 807, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29955, 29899, 29906, 29900, 29896, 29945, 450, 11698, 29907, 8010, 13, 29937, 2823, 365, 2965, 1430, 1660, 363, 4902, 13, 29937, 448, 2683, 2683, 2683, 2683, 807, 13, 13, 29937, 5132, 10585, 13, 5215, 337, 13, 13, 29937, 11698, 29907, 10585, 13, 3166, 302, 542, 29889, 3221, 29889, 2154, 29889, 3188, 1053, 7399, 4081, 13, 3166, 302, 542, 29889, 4977, 29889, 1639, 8726, 29889, 335, 1691, 29893, 2335, 637, 1053, 306, 2577, 24995, 637, 13, 13, 13, 1990, 14415, 29898, 5160, 4081, 1125, 13, 1678, 1024, 353, 376, 29999, 29891, 29916, 295, 29889, 29999, 29891, 29940, 3267, 29889, 657, 29918, 15123, 637, 29908, 13, 1678, 5067, 353, 306, 2577, 24995, 637, 13, 13, 1678, 364, 29916, 29918, 637, 3888, 353, 337, 29889, 12198, 29898, 13, 4706, 364, 29908, 2290, 1939, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 13248, 14247, 29881, 29974, 2144, 29876, 29908, 13, 4706, 364, 26732, 29879, 29930, 9966, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 6406, 14247, 29903, 29974, 2144, 29876, 29908, 13, 4706, 364, 26732, 29879, 29930, 1170, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 8216, 15513, 29974, 6877, 29905, 29876, 29908, 13, 4706, 364, 26732, 29879, 29930, 29925, 13044, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 1657, 351, 14247, 29881, 29974, 2144, 29879, 29974, 17907, 11264, 29905, 29879, 29974, 3583, 29903, 24035, 613, 13, 4706, 337, 29889, 29924, 8647, 6227, 8895, 29892, 13, 1678, 1723, 13, 1678, 364, 29916, 29918, 29894, 6468, 29918, 1429, 353, 337, 29889, 12198, 29898, 29878, 29908, 29985, 10780, 29925, 29966, 13248, 14247, 29881, 29974, 2144, 29879, 29974, 10780, 29925, 29966, 12154, 14247, 29903, 29974, 467, 24035, 613, 337, 29889, 29924, 8647, 6227, 8895, 29897, 13, 1678, 364, 29916, 29918, 29894, 6468, 29918, 1429, 29918, 10945, 353, 337, 29889, 12198, 29898, 29878, 29908, 29985, 10925, 3583, 29879, 29974, 10780, 29925, 29966, 4882, 29958, 4925, 1262, 1159, 13, 1678, 364, 29916, 29918, 29894, 6468, 29918, 4011, 353, 337, 29889, 12198, 29898, 13, 4706, 364, 26732, 29879, 3124, 29881, 3124, 29879, 29974, 10780, 29925, 29966, 8590, 14247, 29881, 29974, 2144, 29879, 3124, 29903, 3124, 29879, 3124, 29903, 3124, 29879, 13578, 13, 4706, 364, 29908, 29965, 593, 351, 3192, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 1657, 351, 3192, 24566, 29900, 29899, 29929, 2053, 29899, 14178, 467, 29908, 13, 4706, 364, 26732, 29879, 29974, 8176, 3192, 29905, 29879, 29974, 5919, 29973, 29925, 29966, 4039, 3192, 24566, 29900, 29899, 29929, 2053, 29899, 29962, 7528, 613, 13, 4706, 337, 29889, 29924, 8647, 6227, 8895, 891, 337, 29889, 29928, 2891, 9818, 29892, 13, 1678, 1723, 13, 13, 1678, 822, 6222, 29898, 1311, 1125, 13, 4706, 396, 3617, 2011, 305, 12629, 13, 4706, 2011, 12719, 29918, 28109, 353, 5159, 13, 4706, 2011, 305, 12629, 353, 1583, 29889, 16713, 29889, 657, 29918, 637, 12719, 580, 13, 4706, 363, 282, 297, 2011, 305, 12629, 29901, 13, 9651, 2011, 12719, 29918, 28109, 4619, 282, 3366, 28109, 3108, 13, 13, 4706, 396, 3617, 1006, 2142, 778, 29915, 4660, 13, 4706, 5067, 29918, 4882, 353, 6571, 13, 4706, 363, 269, 297, 1583, 29889, 16713, 29889, 657, 29918, 13248, 29918, 4882, 7295, 13, 9651, 5067, 29918, 4882, 29961, 29879, 3366, 13248, 3108, 29962, 353, 269, 3366, 4882, 3108, 13, 13, 4706, 396, 3617, 29871, 29947, 29900, 29906, 29889, 29896, 328, 4660, 565, 6969, 13, 4706, 325, 6468, 29918, 1429, 29918, 4882, 353, 6571, 13, 4706, 1018, 29901, 13, 9651, 9920, 353, 1583, 29889, 11303, 703, 4294, 325, 6468, 29899, 1429, 292, 1159, 13, 9651, 1993, 353, 1583, 29889, 17697, 29918, 29894, 6468, 29918, 1429, 29918, 10945, 29889, 4352, 29898, 9006, 29897, 13, 9651, 565, 1993, 29901, 13, 18884, 363, 1993, 297, 1583, 29889, 17697, 29918, 29894, 6468, 29918, 1429, 29889, 2886, 1524, 29898, 9006, 1125, 13, 462, 1678, 565, 1993, 29889, 2972, 703, 12154, 2564, 13609, 580, 1275, 376, 29873, 16163, 1115, 13, 462, 4706, 325, 6468, 29918, 1429, 29918, 4882, 29961, 524, 29898, 4352, 29889, 2972, 703, 13248, 5783, 29962, 353, 5852, 13, 4706, 5174, 1583, 29889, 6154, 3235, 4217, 2392, 29901, 13, 9651, 1209, 13, 13, 4706, 396, 3617, 16169, 297, 14204, 550, 13, 4706, 325, 6468, 29918, 4011, 353, 5159, 13, 4706, 363, 1993, 297, 1583, 29889, 17697, 29918, 29894, 6468, 29918, 4011, 29889, 2886, 1524, 29898, 1311, 29889, 11303, 703, 4294, 325, 6468, 5783, 29901, 13, 9651, 325, 6468, 29918, 4011, 4619, 518, 13, 18884, 426, 13, 462, 1678, 376, 8590, 1115, 1993, 29889, 2972, 703, 8590, 4968, 13, 462, 1678, 376, 4039, 3192, 1115, 1583, 29889, 18837, 29918, 29878, 9477, 391, 29898, 4352, 29889, 2972, 703, 4039, 3192, 1159, 511, 13, 462, 1678, 376, 1657, 351, 3192, 1115, 1583, 29889, 18837, 29918, 29878, 9477, 391, 29898, 4352, 29889, 2972, 703, 1657, 351, 3192, 1159, 511, 13, 18884, 500, 13, 9651, 4514, 13, 13, 4706, 396, 8561, 263, 1051, 310, 8282, 363, 1269, 2011, 13, 4706, 2011, 29918, 11338, 353, 6571, 13, 4706, 363, 2011, 297, 5067, 29918, 4882, 29901, 13, 9651, 8282, 353, 5159, 13, 9651, 443, 4039, 353, 5159, 13, 9651, 363, 325, 6468, 297, 325, 6468, 29918, 4011, 29901, 13, 18884, 565, 938, 29898, 637, 29897, 297, 325, 6468, 3366, 4039, 3192, 3108, 29901, 13, 462, 1678, 8282, 4619, 518, 29894, 6468, 3366, 8590, 3108, 29962, 13, 18884, 25342, 938, 29898, 637, 29897, 297, 325, 6468, 3366, 1657, 351, 3192, 3108, 29901, 13, 462, 1678, 443, 4039, 353, 325, 6468, 3366, 8590, 3108, 13, 9651, 2011, 29918, 11338, 29961, 637, 29962, 353, 8853, 11338, 1115, 8282, 29892, 376, 1657, 351, 1115, 443, 4039, 29913, 13, 13, 4706, 396, 3617, 4607, 637, 848, 322, 12463, 1121, 13, 4706, 364, 353, 5159, 13, 4706, 2381, 29886, 353, 6571, 13, 4706, 363, 1993, 297, 1583, 29889, 17697, 29918, 637, 3888, 29889, 2886, 1524, 29898, 1311, 29889, 11303, 703, 4294, 5067, 2295, 334, 5783, 29901, 13, 9651, 1024, 353, 1993, 29889, 2972, 703, 13248, 1159, 13, 9651, 2381, 29886, 353, 426, 13, 18884, 376, 4882, 1115, 5067, 29918, 4882, 29889, 657, 29898, 978, 29892, 7700, 511, 13, 18884, 376, 29947, 29900, 29906, 29889, 29896, 29984, 1174, 3606, 1115, 7431, 29898, 637, 29918, 11338, 29961, 978, 1822, 657, 703, 11338, 613, 6213, 876, 1405, 29871, 29900, 29892, 13, 18884, 376, 29947, 29900, 29906, 29889, 29896, 328, 323, 16163, 1115, 325, 6468, 29918, 1429, 29918, 4882, 29889, 657, 29898, 524, 29898, 978, 511, 7700, 511, 13, 18884, 376, 4039, 3192, 1115, 2011, 29918, 11338, 29961, 978, 29962, 3366, 11338, 12436, 13, 9651, 500, 13, 9651, 565, 1993, 29889, 2972, 703, 8216, 29908, 1125, 13, 18884, 2381, 29886, 3366, 8216, 3108, 353, 1993, 29889, 2972, 703, 8216, 1159, 13, 9651, 565, 2011, 29918, 11338, 29961, 978, 29962, 3366, 1657, 351, 3108, 29901, 13, 18884, 2381, 29886, 3366, 1657, 351, 3192, 3108, 353, 2011, 29918, 11338, 29961, 978, 29962, 3366, 1657, 351, 3108, 13, 9651, 565, 1024, 451, 297, 2011, 12719, 29918, 28109, 29901, 13, 18884, 2381, 29886, 3366, 13248, 3108, 353, 1024, 13, 18884, 2381, 29886, 3366, 28109, 3108, 353, 5159, 13, 18884, 364, 4619, 518, 2774, 29886, 29962, 13, 9651, 1683, 29901, 13, 18884, 363, 282, 297, 2011, 305, 12629, 29901, 13, 462, 1678, 565, 1024, 297, 282, 3366, 28109, 3108, 29901, 13, 462, 4706, 2381, 29886, 3366, 13248, 3108, 353, 282, 3366, 13248, 3108, 13, 462, 4706, 2381, 29886, 3366, 28109, 3108, 353, 282, 3366, 28109, 3108, 13, 462, 4706, 364, 4619, 518, 2774, 29886, 29962, 13, 462, 4706, 380, 353, 7700, 13, 462, 4706, 363, 286, 297, 282, 3366, 28109, 3108, 29901, 13, 462, 9651, 380, 353, 5067, 29918, 4882, 29889, 657, 29898, 978, 29892, 7700, 29897, 13, 462, 9651, 565, 380, 29901, 13, 462, 18884, 2867, 13, 462, 4706, 2381, 29886, 3366, 4882, 3108, 353, 380, 13, 462, 4706, 2011, 305, 12629, 29889, 5992, 29898, 29886, 29897, 13, 462, 4706, 2867, 13, 13, 4706, 736, 364, 13, 2 ]
src/python/dart/engine/emr/add_sub_graphs.py
RetailMeNotSandbox/dart
18
1603302
import logging import os from dart.client.python.dart_client import Dart from dart.config.config import configuration from dart.engine.emr.metadata import EmrActionTypes from dart.model.action import Action, ActionData, ActionState from dart.model.graph import SubGraphDefinition, EntityType, Relationship, Ref, SubGraphDefinitionData from dart.model.subscription import Subscription, SubscriptionData from dart.model.trigger import Trigger, TriggerData from dart.model.workflow import Workflow, WorkflowData from dart.trigger.subscription import subscription_batch_trigger _logger = logging.getLogger(__name__) def add_emr_engine_sub_graphs(config): engine_config = config['engines']['emr_engine'] opts = engine_config['options'] dart = Dart(opts['dart_host'], opts['dart_port'], opts['dart_api_version']) assert isinstance(dart, Dart) _logger.info('saving emr_engine sub_graphs') engine_id = None for e in dart.get_engines(): if e.data.name == 'emr_engine': engine_id = e.id if not engine_id: raise subgraph_definitions = [ SubGraphDefinition(data=SubGraphDefinitionData( name='consume_subscription_workflow', description='Add to a datastore to create entities for loading a dataset on an ongoing basis', engine_name='emr_engine', related_type=EntityType.datastore, related_is_a=Relationship.PARENT, workflows=[ Workflow(id=Ref.workflow(1), data=WorkflowData( name='emr-workflow-consume_subscription', datastore_id=Ref.parent(), engine_name='emr_engine', )), ], subscriptions=[ Subscription(id=Ref.subscription(1), data=SubscriptionData( name='emr-subscription', dataset_id='' )), ], triggers=[ Trigger(id=Ref.trigger(1), data=TriggerData( name='emr-trigger-subscription-1G-batch', trigger_type_name=subscription_batch_trigger.name, workflow_ids=[Ref.workflow(1)], args={ 'subscription_id': Ref.subscription(1), 'unconsumed_data_size_in_bytes': 1000*1000*1000 } )), ], actions=[ Action(id=Ref.action(1), data=ActionData( name='emr-action-consume_subscription', action_type_name=EmrActionTypes.consume_subscription.name, engine_name='emr_engine', workflow_id=Ref.workflow(1), state=ActionState.TEMPLATE, args={'subscription_id': Ref.subscription(1)} )), ] )) ] for e in subgraph_definitions: s = dart.save_subgraph_definition(e, engine_id) _logger.info('created subgraph_definition: %s' % s.id) if __name__ == '__main__': add_emr_engine_sub_graphs(configuration(os.environ['DART_CONFIG']))
[ 1, 1053, 12183, 13, 5215, 2897, 13, 3166, 270, 442, 29889, 4645, 29889, 4691, 29889, 11353, 29918, 4645, 1053, 360, 442, 13, 3166, 270, 442, 29889, 2917, 29889, 2917, 1053, 5285, 13, 3166, 270, 442, 29889, 10599, 29889, 331, 29878, 29889, 19635, 1053, 2812, 29878, 4276, 10562, 13, 3166, 270, 442, 29889, 4299, 29889, 2467, 1053, 9123, 29892, 9123, 1469, 29892, 9123, 2792, 13, 3166, 270, 442, 29889, 4299, 29889, 4262, 1053, 3323, 9527, 14683, 29892, 14945, 1542, 29892, 6376, 800, 4034, 29892, 9897, 29892, 3323, 9527, 14683, 1469, 13, 3166, 270, 442, 29889, 4299, 29889, 1491, 22371, 1053, 3323, 22371, 29892, 3323, 22371, 1469, 13, 3166, 270, 442, 29889, 4299, 29889, 21001, 1053, 1605, 3567, 29892, 1605, 3567, 1469, 13, 3166, 270, 442, 29889, 4299, 29889, 1287, 1731, 1053, 5244, 1731, 29892, 5244, 1731, 1469, 13, 3166, 270, 442, 29889, 21001, 29889, 1491, 22371, 1053, 25691, 29918, 16175, 29918, 21001, 13, 13, 29918, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 13, 1753, 788, 29918, 331, 29878, 29918, 10599, 29918, 1491, 29918, 4262, 29879, 29898, 2917, 1125, 13, 1678, 6012, 29918, 2917, 353, 2295, 1839, 996, 1475, 16215, 331, 29878, 29918, 10599, 2033, 13, 1678, 29111, 353, 6012, 29918, 2917, 1839, 6768, 2033, 13, 1678, 270, 442, 353, 360, 442, 29898, 25707, 1839, 11353, 29918, 3069, 7464, 29111, 1839, 11353, 29918, 637, 7464, 29111, 1839, 11353, 29918, 2754, 29918, 3259, 11287, 13, 1678, 4974, 338, 8758, 29898, 11353, 29892, 360, 442, 29897, 13, 13, 1678, 903, 21707, 29889, 3888, 877, 29879, 5555, 953, 29878, 29918, 10599, 1014, 29918, 4262, 29879, 1495, 13, 13, 1678, 6012, 29918, 333, 353, 6213, 13, 1678, 363, 321, 297, 270, 442, 29889, 657, 29918, 996, 1475, 7295, 13, 4706, 565, 321, 29889, 1272, 29889, 978, 1275, 525, 331, 29878, 29918, 10599, 2396, 13, 9651, 6012, 29918, 333, 353, 321, 29889, 333, 13, 1678, 565, 451, 6012, 29918, 333, 29901, 13, 4706, 12020, 13, 13, 1678, 1014, 4262, 29918, 25476, 2187, 353, 518, 13, 4706, 3323, 9527, 14683, 29898, 1272, 29922, 4035, 9527, 14683, 1469, 29898, 13, 9651, 1024, 2433, 3200, 2017, 29918, 1491, 22371, 29918, 1287, 1731, 742, 13, 9651, 6139, 2433, 2528, 304, 263, 1418, 579, 487, 304, 1653, 16212, 363, 8363, 263, 8783, 373, 385, 373, 17696, 8405, 742, 13, 9651, 6012, 29918, 978, 2433, 331, 29878, 29918, 10599, 742, 13, 9651, 4475, 29918, 1853, 29922, 6691, 1542, 29889, 4130, 579, 487, 29892, 13, 9651, 4475, 29918, 275, 29918, 29874, 29922, 9662, 800, 4034, 29889, 16320, 3919, 29892, 13, 9651, 27321, 29879, 11759, 13, 18884, 5244, 1731, 29898, 333, 29922, 5620, 29889, 1287, 1731, 29898, 29896, 511, 848, 29922, 5531, 1731, 1469, 29898, 13, 462, 1678, 1024, 2433, 331, 29878, 29899, 1287, 1731, 29899, 3200, 2017, 29918, 1491, 22371, 742, 13, 462, 1678, 1418, 579, 487, 29918, 333, 29922, 5620, 29889, 3560, 3285, 13, 462, 1678, 6012, 29918, 978, 2433, 331, 29878, 29918, 10599, 742, 13, 18884, 1723, 511, 13, 9651, 21251, 13, 9651, 21696, 1980, 11759, 13, 18884, 3323, 22371, 29898, 333, 29922, 5620, 29889, 1491, 22371, 29898, 29896, 511, 848, 29922, 4035, 22371, 1469, 29898, 13, 462, 1678, 1024, 2433, 331, 29878, 29899, 1491, 22371, 742, 13, 462, 1678, 8783, 29918, 333, 2433, 29915, 13, 18884, 1723, 511, 13, 9651, 21251, 13, 9651, 23660, 11759, 13, 18884, 1605, 3567, 29898, 333, 29922, 5620, 29889, 21001, 29898, 29896, 511, 848, 29922, 20211, 1469, 29898, 13, 462, 1678, 1024, 2433, 331, 29878, 29899, 21001, 29899, 1491, 22371, 29899, 29896, 29954, 29899, 16175, 742, 13, 462, 1678, 7135, 29918, 1853, 29918, 978, 29922, 1491, 22371, 29918, 16175, 29918, 21001, 29889, 978, 29892, 13, 462, 1678, 27321, 29918, 4841, 11759, 5620, 29889, 1287, 1731, 29898, 29896, 29897, 1402, 13, 462, 1678, 6389, 3790, 13, 462, 4706, 525, 1491, 22371, 29918, 333, 2396, 9897, 29889, 1491, 22371, 29898, 29896, 511, 13, 462, 4706, 525, 348, 25978, 287, 29918, 1272, 29918, 2311, 29918, 262, 29918, 13193, 2396, 29871, 29896, 29900, 29900, 29900, 29930, 29896, 29900, 29900, 29900, 29930, 29896, 29900, 29900, 29900, 13, 462, 1678, 500, 13, 18884, 1723, 511, 13, 9651, 21251, 13, 9651, 8820, 11759, 13, 18884, 9123, 29898, 333, 29922, 5620, 29889, 2467, 29898, 29896, 511, 848, 29922, 4276, 1469, 29898, 13, 462, 1678, 1024, 2433, 331, 29878, 29899, 2467, 29899, 3200, 2017, 29918, 1491, 22371, 742, 13, 462, 1678, 3158, 29918, 1853, 29918, 978, 29922, 6026, 29878, 4276, 10562, 29889, 3200, 2017, 29918, 1491, 22371, 29889, 978, 29892, 13, 462, 1678, 6012, 29918, 978, 2433, 331, 29878, 29918, 10599, 742, 13, 462, 1678, 27321, 29918, 333, 29922, 5620, 29889, 1287, 1731, 29898, 29896, 511, 13, 462, 1678, 2106, 29922, 4276, 2792, 29889, 4330, 3580, 29931, 3040, 29892, 13, 462, 1678, 6389, 3790, 29915, 1491, 22371, 29918, 333, 2396, 9897, 29889, 1491, 22371, 29898, 29896, 2915, 13, 18884, 1723, 511, 13, 9651, 4514, 13, 308, 876, 13, 1678, 4514, 13, 13, 1678, 363, 321, 297, 1014, 4262, 29918, 25476, 2187, 29901, 13, 4706, 269, 353, 270, 442, 29889, 7620, 29918, 1491, 4262, 29918, 16553, 29898, 29872, 29892, 6012, 29918, 333, 29897, 13, 4706, 903, 21707, 29889, 3888, 877, 11600, 1014, 4262, 29918, 16553, 29901, 1273, 29879, 29915, 1273, 269, 29889, 333, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 788, 29918, 331, 29878, 29918, 10599, 29918, 1491, 29918, 4262, 29879, 29898, 13305, 29898, 359, 29889, 21813, 1839, 29928, 8322, 29918, 25903, 25901, 13, 2 ]
w2v_flask_app_run.py
dataquanty/Word2Vec-Search-API
0
147625
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 22 16:12:00 2018 @author: dataquanty """ from flask import Flask, request, redirect, url_for, flash, jsonify from textsearch import TextSearch import json """ Flask API that returns the n closest match of a text query Takes as input a json query in the following format : { "0":"search query number one", "1":"search query number two", "2":"search query number three", ... } Returns a json, see below an example query : { "0":"screw 12mm", "1":"WEIL SCREW 14MM", "2":"PLASTIC RULER" } And the API response : "0": { "486254": { "PrimaryDI": "5055662908169", "deviceDescription": "WEIL SCREW 15MM", "score": 0.9808971874473267 }, "486255": { "PrimaryDI": "5055662908145", "deviceDescription": "WEIL SCREW 14MM", "score": 0.9832867778975147 }, "486256": { "PrimaryDI": "5055662908107", "deviceDescription": "WEIL SCREW 12MM", "score": 0.9984706088591793 }, "486271": { "PrimaryDI": "5055662907803", "deviceDescription": "SCARF SCREW 14MM", "score": 0.9830988843545456 }, "486272": { "PrimaryDI": "5055662907780", "deviceDescription": "SCARF SCREW 12MM", "score": 0.9991383984663418 } }, "1": { "486255": { "PrimaryDI": "5055662908145", "deviceDescription": "WEIL SCREW 14MM", "score": 1.0 }, "486256": { "PrimaryDI": "5055662908107", "deviceDescription": "WEIL SCREW 12MM", "score": 0.9837789865449079 }, "486270": { "PrimaryDI": "5055662907827", "deviceDescription": "SCARF SCREW 16MM", "score": 0.9807465993142839 }, "486271": { "PrimaryDI": "5055662907803", "deviceDescription": "SCARF SCREW 14MM", "score": 0.9984709553907667 }, "486272": { "PrimaryDI": "5055662907780", "deviceDescription": "SCARF SCREW 12MM", "score": 0.9833732279886143 } }, "2": { "128236": { "PrimaryDI": "10887488232799", "deviceDescription": "PLASTIC WORKMAN", "score": 0.9935797830217448 }, "166500": { "PrimaryDI": "10885425323524", "deviceDescription": "PLASTIC RULER", "score": 1.0 }, "817102": { "PrimaryDI": "J011774560000", "deviceDescription": "Dentalastics\u00ae personal plastic ligatures, orange", "score": 0.8884202724654189 }, "817105": { "PrimaryDI": "J011774557000", "deviceDescription": "Dentalastics\u00ae personal plastic ligatures, purple", "score": 0.8872598116029575 }, "920321": { "PrimaryDI": "817573023578", "deviceDescription": "REL-PLASTIC CONDITIONER 10CC", "score": 0.905961617774754 } } } """ app = Flask(__name__) @app.route('/api/makecalc/', methods=['POST']) def makecalc(): """ Function run at each API call TODO: add inputs checks and cleaning """ jsonfile = request.get_json() res = dict() for key in jsonfile.keys(): # TODO: remove prints after debug print(key, jsonfile[key]) res[key] = textSearch.searchTop(jsonfile[key], 5) return jsonify(res) # used for debug # return jsonify({"uuid":jsonfile['0']}) if __name__ == '__main__': """ The TextSearch class instance is loaded at the init of the flask API for performance reasons, meaning that all the inputs matrices are stored as in-memory objects Then at each call of the API, the searchTop method is called and uses the in-memory matrices to make the proximity calculation The largest file - document matrix - is (n documents) x (m vect components) 64 bit float 64 bits is not necessary, this can be optimized. """ with open("params.json", 'r') as stream: params = json.load(stream) modelfile = params['modelfile'] docmatrixfile = params['docmatrixfile'] textfile = params['textfile'] textSearch = TextSearch(modelfile, docmatrixfile, textfile) app.run(debug=True)
[ 1, 18787, 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, 498, 29884, 1085, 29871, 29906, 29906, 29871, 29896, 29953, 29901, 29896, 29906, 29901, 29900, 29900, 29871, 29906, 29900, 29896, 29947, 13, 13, 29992, 8921, 29901, 848, 12150, 29891, 13, 15945, 29908, 13, 13, 3166, 29784, 1053, 2379, 1278, 29892, 2009, 29892, 6684, 29892, 3142, 29918, 1454, 29892, 11013, 29892, 4390, 1598, 13, 3166, 1426, 4478, 1053, 3992, 7974, 13, 5215, 4390, 13, 13, 15945, 29908, 13, 8754, 1278, 3450, 393, 3639, 278, 302, 21438, 1993, 310, 263, 1426, 2346, 13, 13, 29911, 6926, 408, 1881, 263, 4390, 2346, 297, 278, 1494, 3402, 584, 29871, 13, 1678, 426, 13, 1678, 376, 29900, 4710, 4478, 2346, 1353, 697, 613, 13, 1678, 376, 29896, 4710, 4478, 2346, 1353, 1023, 613, 13, 1678, 376, 29906, 4710, 4478, 2346, 1353, 2211, 613, 13, 1678, 2023, 13, 1678, 500, 13, 13, 11609, 29879, 263, 4390, 29892, 1074, 2400, 385, 1342, 2346, 584, 29871, 13, 268, 13, 1678, 426, 13, 4706, 376, 29900, 4710, 29879, 1037, 29893, 29871, 29896, 29906, 4317, 613, 13, 4706, 376, 29896, 4710, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29946, 7428, 613, 13, 4706, 376, 29906, 4710, 29925, 4375, 1254, 2965, 390, 13309, 1001, 29908, 13, 1678, 500, 13, 13, 2855, 278, 3450, 2933, 584, 29871, 13, 29908, 29900, 1115, 426, 13, 1678, 376, 29946, 29947, 29953, 29906, 29945, 29946, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29947, 29896, 29953, 29929, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29945, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29900, 29947, 29929, 29955, 29896, 29947, 29955, 29946, 29946, 29955, 29941, 29906, 29953, 29955, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29945, 29945, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29947, 29896, 29946, 29945, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29946, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29941, 29906, 29947, 29953, 29955, 29955, 29955, 29947, 29929, 29955, 29945, 29896, 29946, 29955, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29945, 29953, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29947, 29896, 29900, 29955, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29906, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29929, 29947, 29946, 29955, 29900, 29953, 29900, 29947, 29947, 29945, 29929, 29896, 29955, 29929, 29941, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29955, 29896, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29955, 29947, 29900, 29941, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 7187, 1718, 29943, 12314, 1525, 29956, 29871, 29896, 29946, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29941, 29900, 29929, 29947, 29947, 29947, 29946, 29941, 29945, 29946, 29945, 29946, 29945, 29953, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29955, 29906, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29955, 29955, 29947, 29900, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 7187, 1718, 29943, 12314, 1525, 29956, 29871, 29896, 29906, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29929, 29929, 29896, 29941, 29947, 29941, 29929, 29947, 29946, 29953, 29953, 29941, 29946, 29896, 29947, 13, 1678, 500, 13, 29871, 2981, 29871, 13, 29871, 376, 29896, 1115, 426, 13, 1678, 376, 29946, 29947, 29953, 29906, 29945, 29945, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29947, 29896, 29946, 29945, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29946, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29896, 29889, 29900, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29945, 29953, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29947, 29896, 29900, 29955, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 8851, 6227, 12314, 1525, 29956, 29871, 29896, 29906, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29941, 29955, 29955, 29947, 29929, 29947, 29953, 29945, 29946, 29946, 29929, 29900, 29955, 29929, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29955, 29900, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29955, 29947, 29906, 29955, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 7187, 1718, 29943, 12314, 1525, 29956, 29871, 29896, 29953, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29900, 29955, 29946, 29953, 29945, 29929, 29929, 29941, 29896, 29946, 29906, 29947, 29941, 29929, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29955, 29896, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29955, 29947, 29900, 29941, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 7187, 1718, 29943, 12314, 1525, 29956, 29871, 29896, 29946, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29929, 29947, 29946, 29955, 29900, 29929, 29945, 29945, 29941, 29929, 29900, 29955, 29953, 29953, 29955, 13, 1678, 2981, 29871, 13, 1678, 376, 29946, 29947, 29953, 29906, 29955, 29906, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29945, 29900, 29945, 29945, 29953, 29953, 29906, 29929, 29900, 29955, 29955, 29947, 29900, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 7187, 1718, 29943, 12314, 1525, 29956, 29871, 29896, 29906, 7428, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29947, 29941, 29941, 29955, 29941, 29906, 29906, 29955, 29929, 29947, 29947, 29953, 29896, 29946, 29941, 13, 1678, 500, 13, 29871, 2981, 29871, 13, 29871, 376, 29906, 1115, 426, 13, 1678, 376, 29896, 29906, 29947, 29906, 29941, 29953, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29896, 29900, 29947, 29947, 29955, 29946, 29947, 29947, 29906, 29941, 29906, 29955, 29929, 29929, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 29925, 4375, 1254, 2965, 399, 1955, 29968, 27616, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29929, 29941, 29945, 29955, 29929, 29955, 29947, 29941, 29900, 29906, 29896, 29955, 29946, 29946, 29947, 13, 1678, 2981, 29871, 13, 1678, 376, 29896, 29953, 29953, 29945, 29900, 29900, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29896, 29900, 29947, 29947, 29945, 29946, 29906, 29945, 29941, 29906, 29941, 29945, 29906, 29946, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 29925, 4375, 1254, 2965, 390, 13309, 1001, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29896, 29889, 29900, 13, 1678, 2981, 29871, 13, 1678, 376, 29947, 29896, 29955, 29896, 29900, 29906, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29967, 29900, 29896, 29896, 29955, 29955, 29946, 29945, 29953, 29900, 29900, 29900, 29900, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 29928, 13703, 579, 1199, 29905, 29884, 29900, 29900, 3660, 7333, 715, 6288, 14172, 3698, 29892, 24841, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29947, 29947, 29947, 29946, 29906, 29900, 29906, 29955, 29906, 29946, 29953, 29945, 29946, 29896, 29947, 29929, 13, 1678, 2981, 29871, 13, 1678, 376, 29947, 29896, 29955, 29896, 29900, 29945, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29967, 29900, 29896, 29896, 29955, 29955, 29946, 29945, 29945, 29955, 29900, 29900, 29900, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 29928, 13703, 579, 1199, 29905, 29884, 29900, 29900, 3660, 7333, 715, 6288, 14172, 3698, 29892, 3708, 552, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29947, 29947, 29955, 29906, 29945, 29929, 29947, 29896, 29896, 29953, 29900, 29906, 29929, 29945, 29955, 29945, 13, 1678, 2981, 29871, 13, 1678, 376, 29929, 29906, 29900, 29941, 29906, 29896, 1115, 426, 13, 418, 376, 26666, 4571, 1115, 376, 29947, 29896, 29955, 29945, 29955, 29941, 29900, 29906, 29941, 29945, 29955, 29947, 613, 29871, 13, 418, 376, 10141, 9868, 1115, 376, 1525, 29931, 29899, 29925, 4375, 1254, 2965, 8707, 29928, 22122, 1001, 29871, 29896, 29900, 4174, 613, 29871, 13, 418, 376, 13628, 1115, 29871, 29900, 29889, 29929, 29900, 29945, 29929, 29953, 29896, 29953, 29896, 29955, 29955, 29955, 29946, 29955, 29945, 29946, 13, 1678, 500, 13, 29871, 500, 13, 29913, 13, 13, 15945, 29908, 13, 13, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29897, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 2754, 29914, 5675, 28667, 29914, 742, 3519, 29922, 1839, 5438, 11287, 13, 1753, 1207, 28667, 7295, 13, 1678, 9995, 13, 1678, 6680, 1065, 472, 1269, 3450, 1246, 13, 268, 13, 1678, 14402, 29901, 788, 10970, 12747, 322, 5941, 292, 13, 268, 13, 1678, 9995, 13, 1678, 4390, 1445, 353, 2009, 29889, 657, 29918, 3126, 580, 13, 1678, 620, 353, 9657, 580, 13, 1678, 363, 1820, 297, 4390, 1445, 29889, 8149, 7295, 13, 4706, 396, 14402, 29901, 3349, 14677, 1156, 4744, 13, 4706, 1596, 29898, 1989, 29892, 4390, 1445, 29961, 1989, 2314, 13, 4706, 620, 29961, 1989, 29962, 353, 1426, 7974, 29889, 4478, 7031, 29898, 3126, 1445, 29961, 1989, 1402, 29871, 29945, 29897, 13, 308, 13, 1678, 736, 4390, 1598, 29898, 690, 29897, 13, 268, 13, 1678, 396, 1304, 363, 4744, 13, 1678, 396, 736, 4390, 1598, 3319, 29908, 25118, 1115, 3126, 1445, 1839, 29900, 2033, 1800, 13, 13, 308, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 9995, 13, 1678, 450, 3992, 7974, 770, 2777, 338, 7500, 472, 278, 2069, 310, 278, 29784, 13, 1678, 3450, 363, 4180, 9590, 29892, 6593, 393, 599, 278, 10970, 13516, 526, 29871, 13, 1678, 6087, 408, 297, 29899, 14834, 3618, 13, 1678, 1987, 472, 1269, 1246, 310, 278, 3450, 29892, 278, 2740, 7031, 1158, 338, 2000, 322, 3913, 29871, 13, 1678, 278, 297, 29899, 14834, 13516, 304, 1207, 278, 23203, 537, 13944, 13, 268, 13, 1678, 450, 10150, 934, 448, 1842, 4636, 448, 338, 29871, 13, 4706, 313, 29876, 10701, 29897, 921, 313, 29885, 325, 522, 7117, 29897, 29871, 29953, 29946, 2586, 5785, 13, 268, 13, 268, 29953, 29946, 9978, 338, 451, 5181, 29892, 445, 508, 367, 27545, 29889, 29871, 13, 268, 13, 268, 13, 1678, 9995, 13, 268, 13, 1678, 411, 1722, 703, 7529, 29889, 3126, 613, 525, 29878, 1495, 408, 4840, 29901, 13, 4706, 8636, 353, 4390, 29889, 1359, 29898, 5461, 29897, 13, 13, 1678, 878, 761, 488, 353, 8636, 1839, 1545, 761, 488, 2033, 13, 1678, 1574, 5344, 1445, 353, 8636, 1839, 1514, 5344, 1445, 2033, 13, 1678, 1426, 1445, 353, 8636, 1839, 726, 1445, 2033, 13, 1678, 1426, 7974, 353, 3992, 7974, 29898, 1545, 761, 488, 29892, 1574, 5344, 1445, 29892, 1426, 1445, 29897, 13, 1678, 623, 29889, 3389, 29898, 8382, 29922, 5574, 29897, 2 ]
authInterlink/authInterlink.py
danielSilva21/interlinker-service-augmenter
0
169262
from flask import Blueprint, jsonify, flash import requests, math from urllib.parse import urljoin, urlparse import datetime import uuid from flask import current_app, g from flask_babel import format_number,gettext,format_decimal, format_currency, format_percent from flask import Flask, render_template, redirect, request, url_for, session from flask_login import ( LoginManager, current_user, login_required, login_user, logout_user, ) from annotator.survey import Survey from authInterlink.user import User from annotator.annotation import Annotation from annotator.description import Description from annotator.notification import Notification from website.languages import getLanguagesList authInterlink = Blueprint('authInterlink', __name__,template_folder="./gui/templates") #Genero Secretos para los estados: tok1 = uuid.uuid4() tok2 = uuid.uuid4() APP_STATE = tok1.hex NONCE = tok2.hex @authInterlink.route("/login") def login(): # get request params query_params = {'client_id': current_app.config["CLIENT_ID"], 'redirect_uri': current_app.config["REDIRECT_URI"], 'scope': "openid email profile", 'state': APP_STATE, 'nonce': NONCE, 'response_type': 'code', 'response_mode': 'query'} # build request_uri request_uri = "{base_url}?{query_params}".format( base_url=current_app.config["AUTH_URI"], query_params=requests.compat.urlencode(query_params) ) return redirect(request_uri) @authInterlink.route("/logout", methods=["GET", "POST"]) @login_required def logout(): logout_user() #response = redirect(config["end_session_endpoint"]) payload = {'id_token_hint': session['id_token'], 'post_logout_redirect_uri': "http://127.0.0.1:5000/home", 'state': APP_STATE} #headers = {'Content-Type': 'application/x-www-form-urlencoded'} r = requests.get( current_app.config["END_SESSION_ENDPOINT"], params=payload, ) r.url r.text session.clear() #return response #return render_template("home.html") return redirect(current_app.config["END_SESSION_ENDPOINT"]) #Por ahora queda asi. @authInterlink.route("/about") def about(): return render_template("about.html") @authInterlink.route("/dashboard") @login_required def dashboard(): #Cargo los combos: vectorUrls=Description._get_uniqueValuesUrl() urlList=[] for urls in vectorUrls: key=urls["key"] if(key!=""): domain = urlparse(key).netloc if not (domain in urlList): urlList.append(domain) print(urlList) vectorPAs=Description._get_uniqueValues(campo="padministration") paList=[] for pas in vectorPAs: key=pas["key"] if key=="": key='Unassigned' paList.append(key) print(paList) textoABuscar=request.args.get("searchText") padministration=request.args.get("padministration") domain=request.args.get("domain") page=request.args.get("page",1) registroInicial=(int(page)-1)*10 totalRegistros=0 if(textoABuscar==None or textoABuscar==''): res= Description.search(offset=registroInicial) totalRegistros= Description.count() else: res= Description._get_Descriptions(textoABuscar=textoABuscar,padministration=padministration,url=domain,offset=registroInicial) totalRegistros= Description._get_DescriptionsCounts(textoABuscar=textoABuscar,padministration=padministration,url=domain) #Cargo los números de anotaciones por categoria for itemDesc in res: #Obtengo los Urls: listUrl=[] for url in itemDesc['urls']: listUrl.append(url['url']) #Cargo datos estadisticos de las descripciones resCategory=Annotation.descriptionStats(Annotation,uris=listUrl) nroFeedbacks=0 nroQuestions=0 nroTerms=0 nroFeedProgress=0 nroFeedApproved=0 nroQuesProgress=0 nroQuesApproved=0 nroTermProgress=0 nroTermApproved=0 #Obtengo la informacion estadistica: if(len(resCategory)>0): for itemCategory in resCategory: cateGroup=itemCategory['key'] if(cateGroup=='feedback'): nroFeedbacks=itemCategory['doc_count'] listStates=itemCategory['group_state']['buckets'] for itemState in listStates: cateState=itemState['key'] nroState=itemState['doc_count'] if(cateState==0):#In Progress nroFeedProgress=nroState if(cateState==2):#In Approved nroFeedApproved=nroState if(cateGroup=='question'): nroQuestions=itemCategory['doc_count'] listStates=itemCategory['group_state']['buckets'] for itemState in listStates: cateState=itemState['key'] nroState=itemState['doc_count'] if(cateState==0):#In Progress nroQuesProgress=nroState if(cateState==2):#In Approved nroQuesApproved=nroState if(cateGroup=='term'): nroTerms=itemCategory['doc_count'] listStates=itemCategory['group_state']['buckets'] for itemState in listStates: cateState=itemState['key'] nroState=itemState['doc_count'] if(cateState==0):#In Progress nroTermProgress=nroState if(cateState==2):#In Approved nroTermApproved=nroState #Cargo los valores totales itemDesc['nroTerms']=nroTerms itemDesc['nroQuest']=nroQuestions itemDesc['nroFeeds']=nroFeedbacks #Cargo los progressBar con valores por estados. # Progreso Total (%) = Approved * 100 / (InProgress + Approved) #Feedback Progress: #Incluyo validacion de la division x / 0 (if statement) progressFeed= ( (nroFeedApproved * 100) / ( nroFeedProgress + nroFeedApproved ) ) if ( nroFeedProgress + nroFeedApproved ) != 0 else 0 progressTerm= ( (nroTermApproved * 100) / ( nroTermProgress + nroTermApproved ) ) if ( nroTermProgress + nroTermApproved ) != 0 else 0 progressQues= ( (nroQuesApproved * 100) / ( nroQuesProgress + nroQuesApproved ) ) if ( nroQuesProgress + nroQuesApproved ) != 0 else 0 itemDesc['progressFeed']=progressFeed itemDesc['progressTerm']=progressTerm itemDesc['progressQues']=progressQues textoStats=("<b>Feedback ("+str(nroFeedApproved)+"/"+str(nroFeedApproved+nroFeedProgress)+")</b> : "+str(round(progressFeed))+"% <br>"+ "<b>Terms ("+str(nroTermApproved)+"/"+str(nroTermApproved+nroTermProgress)+")</b>: "+str(round(progressTerm))+"% <br>"+ "<b>Questions ("+str(nroQuesApproved)+"/"+str(nroQuesApproved+nroQuesProgress)+")</b>: "+str(round(progressQues))+"% <br>") itemDesc['textoStats']=textoStats progressTotalApproved = nroFeedApproved + nroTermApproved + nroQuesApproved progressTotalInProgress = nroFeedProgress + nroTermProgress + nroQuesProgress progressTotal= ( (progressTotalApproved * 100) / ( progressTotalInProgress + progressTotalApproved ) ) if ( progressTotalInProgress + progressTotalApproved ) != 0 else 0 itemDesc['progressTotal']=round(progressTotal) pagesNumbers=math.ceil(totalRegistros/10) paginacion={'page':page,'pagesNumbers':pagesNumbers,'totalRegisters':totalRegistros,'searchBox':textoABuscar,'padministration':padministration,'url':domain} listNotifications,numRes=cargarNotifications() return render_template("dashboard.html",descriptions=res,urls=urlList,publicsa=paList,paginacion=paginacion,notifications=listNotifications,notificationNum=numRes) @authInterlink.route("/moderate") @login_required def moderate(): #Cargo los combos: vectorUrls=Description._get_uniqueValues(campo="url") urlList=[] for urls in vectorUrls: key=urls["key"] if(key!=""): domain = urlparse(key).netloc if not (domain in urlList): urlList.append(domain) print(urlList) vectorPAs=Description._get_uniqueValues(campo="padministration") paList=[] for pas in vectorPAs: key=pas["key"] if key=="": key='Unassigned' paList.append(key) print(paList) textoABuscar=request.args.get("searchText") padministration=request.args.get("padministration") domain=request.args.get("domain") page=request.args.get("page",1) registroInicial=(int(page)-1)*10 totalRegistros=0 if(textoABuscar==None or textoABuscar==''): res= Description.search(offset=registroInicial) totalRegistros= Description.count() else: res= Description._get_Descriptions(textoABuscar=textoABuscar,padministration=padministration,url=domain,offset=registroInicial) totalRegistros= Description._get_DescriptionsCounts(textoABuscar=textoABuscar,padministration=padministration,url=domain) res=Description._get_Descript_byModerEmail(email=current_user.email) totalRegistros= Description._get_Descript_byModerEmailCounts(email=current_user.email) pagesNumbers=math.ceil(totalRegistros/10) paginacion={'page':page,'pagesNumbers':pagesNumbers,'totalRegisters':totalRegistros,'searchBox':textoABuscar,'padministration':padministration,'url':domain} #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("moderate.html",descriptions=res,urls=urlList,publicsa=paList,paginacion=paginacion,notifications=listNotifications,notificationNum=numRes) @authInterlink.route("/survey") @login_required def survey(): textoABuscar=request.args.get("searchText") page=request.args.get("page",1) registroInicial=(int(page)-1)*10 totalRegistros=0 #Searchs: """ if(textoABuscar==None or textoABuscar==''): res= Survey.search(offset=registroInicial) totalRegistros= Survey.count() else: res= Survey._get_Surveys(textoABuscar=textoABuscar,offset=registroInicial) """ resTemp=Survey._get_all() res=resTemp['surveys'] totalRegistros= resTemp['numRes'] pagesNumbers=math.ceil(totalRegistros/10) paginacion={'page':page,'pagesNumbers':pagesNumbers,'totalRegisters':totalRegistros,'searchBox':textoABuscar} #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() #Defino la direccion del SurveyHost surveyHost=current_app.config['SURVEYINTERLINK_URL'] surveyApiVersion=current_app.config['SURVEYAPI_VERSION'] return render_template("surveys.html",surveys=res,paginacion=paginacion,notifications=listNotifications,notificationNum=numRes,surveyHost=surveyHost,surveyApiVersion=surveyApiVersion) @authInterlink.route("/surveyInstantiator",methods=["POST"]) def surveyInstantiator(): #Redirecciono al editor: return redirect(current_app.config['SURVEYINTERLINK_URL']+"/assets/"+"instantiate") def obtainUsersEmail(listItemsBucket=[]): listUsers=[] for itemBucket in listItemsBucket: userEmail=itemBucket['key'] if userEmail!='Anonymous' and userEmail!='Annonymous' : listUsers.append(userEmail) return listUsers @authInterlink.route("/lauchSurvey",methods=["POST"]) def surveyLauchProcess(): #Obtengo los valores del Survey: selTargetUsers=request.form.get("selTargetList") listUsersArea=request.form.get("listUsersArea") is_optional=request.form.get("is_optional") ini_date=request.form.get("ini_date") fin_date=request.form.get("fin_date") selEvent=request.form.get("selEvent") mandatory=True if is_optional =='on': mandatory=False #Creo la notification: idAsset=request.form.get('assetId') title=request.form.get('surveyTitle') description= request.form.get('surveyDesc') #Defino the users: listUsersEmails=[] if selTargetUsers=="everybody": listUsersWhoAnnotated=obtainUsersEmail(Annotation.currentActiveUsers()) listUsersWhoModerate= obtainUsersEmail(Description.currentActiveUsersModerators()) listUsersEmails=list(set(listUsersWhoAnnotated+listUsersWhoModerate)) else: listUsersEmails= listUsersArea.split(";") for userEmail in listUsersEmails: email=userEmail target_url=current_app.config['SURVEYINTERLINK_URL']+ "/assets/"+idAsset+"/view/" newNotification=Notification( title=title, email=email, description=description, target_url=target_url, resolved=False, category="survey", idAsset=idAsset, triggerEvent=selEvent, triggerDate=ini_date, isMandatory=mandatory ) newNotification.save(index="notification") #Se ha lanzado exitosamente el suvey: flash("The survey has been lauched.","info") #Redirecciono al editor: return redirect("/survey") @authInterlink.route('/advanceSearch',) def advanceSearch(): res = Annotation.search(query={'user': current_user.email}) return render_template("advanceSearch.html", user=current_user, anotations=res) @authInterlink.route('/description/<string:descriptionId>',) @login_required def description(descriptionId=None): description = Description._get_Descriptions_byId(id=descriptionId)[0] urlMainPage = [url['url'] for url in description['urls'] if url['isMain'] == True][0] categoria=request.args.get('category') page=request.args.get("page",1) registroInicial=(int(page)-1)*10 if(categoria == None or categoria=='all' ): categoria='' res=[] stats=[] numRes=0 listUrlsPages=[] for itemUrl in description['urls']: url=itemUrl['url'] listUrlsPages.append(url) # Cargo las replies de cada annotacion: stats=stats+Annotation.annotationStats(Annotation,uri=itemUrl['url']) res= Annotation._get_by_multiple(Annotation,textoABuscar='',estados={'InProgress':True,'Archived':True,'Approved':True},urls=listUrlsPages,category=categoria,notreply=True,page=page) numRes= res['numRes'] res=res['annotations'] dictStats={} for itemStat in stats: clave=itemStat['key'] val=itemStat['doc_count'] dictStats[clave]=val for itemRes in res: if itemRes['id'] in dictStats.keys(): itemRes['nroReplies']=dictStats[itemRes['id']] else: itemRes['nroReplies']=0 page=request.args.get("page",1) pagesNumbers=math.ceil(numRes/10) paginacion={'page':page,'pagesNumbers':pagesNumbers,'totalRegisters':numRes} #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("description.html", user=current_user, description=description,anotations=res,categoryLabel=categoria,paginacion=paginacion,urlMainPage=urlMainPage,notifications=listNotifications,notificationNum=numRes) # return 'la desc: '+category+'lauri is'+str(uri) @authInterlink.route('/description/<string:descriptionId>/<string:option>',) @login_required def editDescription(descriptionId=None,option='Edit'): vectorPAs=Description._get_uniqueValues(campo="padministration") paList=[] for pas in vectorPAs: key=pas["key"] if key=="": key='Unassigned' paList.append(key) print(paList) description = Description._get_Descriptions_byId(id=descriptionId)[0] for itemUrl in description['urls']: if itemUrl['language']!='Undefined': itemUrl['langText']=getLanguagesList()[itemUrl['language']] else: itemUrl['langText']="Undefined" #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("descriptionDetail.html", user=current_user, description=description,option=option,publicsa=paList,notifications=listNotifications,notificationNum=numRes) @authInterlink.route('/subjectPage/<string:descriptionId>/<string:annotatorId>',) @login_required def subjectPage(descriptionId=None,annotatorId=None): description = Description._get_Descriptions_byId(id=descriptionId)[0] urlMainPage = [url['url'] for url in description['urls'] if url['isMain'] == True][0] annotation = Annotation._get_Annotation_byId(id=annotatorId)[0] nroReplies = Annotation.count(query={ 'idReplyRoot': annotatorId ,'category':'reply' }) replies = Annotation.search(query={ 'idReplyRoot': annotatorId ,'category':'reply' },limit=nroReplies) nroRepliesOfAnnotation=nroReplies #nroRepliesOfAnnotation = Annotation.count(query={ '_id': description['id'] ,'category':'reply','idReplyRoot':annotatorId }) #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("subjectPage.html", user=current_user, annotation=annotation,description=description,categoryLabel=annotation['category'],replies=replies,nroReplies=nroRepliesOfAnnotation,urlMainPage=urlMainPage,notifications=listNotifications,notificationNum=numRes) # return 'la desc: '+category+'lauri is'+str(uri) @authInterlink.route('/subjectPage/<string:descriptionId>/<string:annotatorId>/<string:option>', methods=["GET", "POST"]) @login_required def changeAnnotation(descriptionId=None,annotatorId=None,option=None): if option == 'state': argumentos=request.json newstate=argumentos.pop('stateToChange') commentsChangeState=argumentos.pop('commentsChangeState') objtype=argumentos.pop('objtype') annotationRootId='' losvalores=argumentos.keys() if "annotationRootId" in losvalores: annotationRootId=argumentos.pop('annotationRootId') annotation = Annotation._get_Annotation_byId(id=annotatorId)[0] #Registro el cambio y quien lo hizo if(len(annotation['statechanges'])==0): annotation['statechanges']=[] #Si el estado inicial es prohibido y el estado final es prohibido #Se resetea el estado a in progress. if(annotation['state']==3 & int(newstate)==3): newstate=0 annotation['statechanges'].append({ "initstate": annotation['state'], "endstate": int(newstate), "text": commentsChangeState, "objtype" : objtype, "date": datetime.datetime.now().replace(microsecond=0).isoformat(), "user": current_user.email }) annotation['state']=int(newstate) annotation.updateState() return jsonify(annotation) elif option=='like': argumentos=request.json vote=int(argumentos.pop('stateToChange')) newstate=vote commentsChangeState=argumentos.pop('commentsChangeState') objtype=argumentos.pop('objtype') annotationRootId='' losvalores=argumentos.keys() if "annotationRootId" in losvalores: annotationRootId=argumentos.pop('annotationRootId') #Verifico si anteriormente este usuario ha realizado una anotacion annotation = Annotation._get_Annotation_byId(id=annotatorId)[0] nroLikes=annotation.userAlreadyLike(email=current_user.email,id=annotatorId) #Un usuario solo puede votar una vez if nroLikes==0: #Registro el cambio y quien lo hizo if(len(annotation['statechanges'])==0): annotation['statechanges']=[] #Registro el cambio y quien lo hizo initState=0 if(vote==1): initState=int(annotation['like']) annotation['like']=initState+1 objtype='annotation_like' elif vote==-1: initState=int(annotation['dislike']) annotation['dislike']=initState+1 objtype='annotation_like' #Registro el cambio de estado annotation['statechanges'].append({ "initstate": initState, "endstate": initState+1, "text": commentsChangeState, "objtype" : objtype, "date": datetime.datetime.now().replace(microsecond=0).isoformat(), "user": current_user.email }) annotation.updateLike() annotation.updateState() return jsonify(annotation) @authInterlink.route("/descriptionDetail") @login_required def descriptionDetail(): vectorPAs=Description._get_uniqueValues(campo="padministration") paList=[] for pas in vectorPAs: key=pas["key"] if key=="": key='Unassigned' paList.append(key) print(paList) res = Annotation.search(query={'user': current_user.email}) return render_template("descriptionDetail.html", user=current_user, anotations=res,publicsa=paList) @authInterlink.route("/profile") @login_required def profile(): #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("profile.html", user=current_user,notifications=listNotifications,notificationNum=numRes) @authInterlink.route("/settings") @login_required def settings(): results=[] anthony =gettext('Anthony') us_num=format_number(1099) results.append(us_num) us_num=format_currency(1099.98, 'USD') results.append(us_num) us_num=format_decimal(1.2346) results.append(us_num) #Cargo las Notificaciones listNotifications,numRes=cargarNotifications() return render_template("settings.html", user=current_user,results=results,anthony=anthony,notifications=listNotifications,notificationNum=numRes) @authInterlink.route("/oidc_callback") def callback(): headers = {'Content-Type': 'application/x-www-form-urlencoded'} code = request.args.get("code") #la pagina que se pretende ingresar es: paginaNext='' if 'next' in session.keys(): paginaNext=session['next'] if not code: return "The code was not returned or is not accessible", 403 query_params = {'grant_type': 'authorization_code', 'code': code, 'redirect_uri': request.base_url } query_params = requests.compat.urlencode(query_params) exchange = requests.post( current_app.config["TOKEN_URI"], headers=headers, data=query_params, auth=(current_app.config["CLIENT_ID"], current_app.config["CLIENT_SECRET"]), ).json() # Get tokens and validate if not exchange.get("token_type"): return "Unsupported token type. Should be 'Bearer'.", 403 access_token = exchange["access_token"] id_token = exchange["id_token"] session['id_token']=id_token #if not is_access_token_valid(access_token, config["issuer"], config["client_id"]): # return "Access token is invalid", 403 #if not is_id_token_valid(id_token, config["issuer"], config["client_id"], NONCE): # return "ID token is invalid", 403 # Authorization flow successful, get userinfo and login user userinfo_response = requests.get(current_app.config["USERINFO_URI"], headers={'Authorization': f'Bearer {access_token}'}).json() unique_id = userinfo_response["sub"] user_email = userinfo_response["email"] user_name = userinfo_response["given_name"] user = User( id_=unique_id, name=user_name, email=user_email ) if not User.get(unique_id): User.create(unique_id, user_name, user_email) login_user(user) # g.user =user session.pop('_flashes', None) if paginaNext!="": return redirect(paginaNext) else: return redirect(url_for("authInterlink.dashboard")) def cargarNotifications(): #Cargo las Notificaciones listNotifications=Notification._get_Notification_byModerCategory(category="survey") #listNotifications.append(Notification._get_Notification_byModerCategory(category="survey")) numRes=listNotifications['numRes'] listNotifications=listNotifications['notifications'] return listNotifications,numRes
[ 1, 515, 29784, 1053, 10924, 2158, 29892, 4390, 1598, 29892, 11013, 13, 5215, 7274, 29892, 5844, 13, 3166, 3142, 1982, 29889, 5510, 1053, 3142, 7122, 29892, 3142, 5510, 13, 5215, 12865, 13, 5215, 318, 5416, 13, 3166, 29784, 1053, 1857, 29918, 932, 29892, 330, 13, 13, 3166, 29784, 29918, 28727, 1053, 3402, 29918, 4537, 29892, 657, 726, 29892, 4830, 29918, 7099, 3039, 29892, 3402, 29918, 26095, 29892, 3402, 29918, 25376, 13, 13, 13, 3166, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 29892, 6684, 29892, 2009, 29892, 3142, 29918, 1454, 29892, 4867, 13, 3166, 29784, 29918, 7507, 1053, 313, 13, 1678, 19130, 3260, 29892, 13, 1678, 1857, 29918, 1792, 29892, 13, 1678, 6464, 29918, 12403, 29892, 13, 1678, 6464, 29918, 1792, 29892, 13, 1678, 1480, 449, 29918, 1792, 29892, 13, 29897, 13, 3166, 9732, 1061, 29889, 7610, 6950, 1053, 23218, 13, 13, 13, 3166, 4817, 4074, 2324, 29889, 1792, 1053, 4911, 13, 13, 3166, 9732, 1061, 29889, 18317, 1053, 530, 16666, 13, 3166, 9732, 1061, 29889, 8216, 1053, 12953, 13, 3166, 9732, 1061, 29889, 24671, 1053, 28578, 13, 3166, 4700, 29889, 29880, 8737, 1053, 679, 29931, 8737, 1293, 13, 13, 5150, 4074, 2324, 353, 10924, 2158, 877, 5150, 4074, 2324, 742, 4770, 978, 1649, 29892, 6886, 29918, 12083, 543, 6904, 23569, 29914, 20943, 1159, 13, 13, 29937, 5631, 29877, 10213, 359, 1702, 1232, 707, 2255, 29901, 13, 17082, 29896, 353, 318, 5416, 29889, 25118, 29946, 580, 13, 17082, 29906, 353, 318, 5416, 29889, 25118, 29946, 580, 13, 13, 20576, 29918, 19713, 353, 304, 29895, 29896, 29889, 20970, 13, 29940, 1164, 4741, 353, 304, 29895, 29906, 29889, 20970, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 7507, 1159, 13, 1753, 6464, 7295, 13, 1678, 396, 679, 2009, 8636, 13, 1678, 2346, 29918, 7529, 353, 11117, 4645, 29918, 333, 2396, 1857, 29918, 932, 29889, 2917, 3366, 27205, 3919, 29918, 1367, 12436, 13, 462, 1678, 525, 17886, 29918, 5338, 2396, 1857, 29918, 932, 29889, 2917, 3366, 1525, 4571, 26282, 29918, 15551, 12436, 13, 462, 1678, 525, 6078, 2396, 376, 3150, 333, 4876, 8722, 613, 13, 462, 1678, 525, 3859, 2396, 12279, 29925, 29918, 19713, 29892, 13, 462, 1678, 525, 5464, 346, 2396, 405, 1164, 4741, 29892, 13, 462, 1678, 525, 5327, 29918, 1853, 2396, 525, 401, 742, 13, 462, 1678, 525, 5327, 29918, 8513, 2396, 525, 1972, 10827, 13, 13, 1678, 396, 2048, 2009, 29918, 5338, 13, 1678, 2009, 29918, 5338, 353, 29850, 3188, 29918, 2271, 29913, 29973, 29912, 1972, 29918, 7529, 29913, 1642, 4830, 29898, 13, 4706, 2967, 29918, 2271, 29922, 3784, 29918, 932, 29889, 2917, 3366, 20656, 29950, 29918, 15551, 12436, 13, 4706, 2346, 29918, 7529, 29922, 24830, 29889, 12667, 29889, 2271, 12508, 29898, 1972, 29918, 7529, 29897, 13, 1678, 1723, 13, 13, 1678, 736, 6684, 29898, 3827, 29918, 5338, 29897, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 1188, 449, 613, 3519, 29922, 3366, 7194, 613, 376, 5438, 20068, 13, 29992, 7507, 29918, 12403, 13, 1753, 1480, 449, 7295, 13, 1678, 1480, 449, 29918, 1792, 580, 13, 1678, 396, 5327, 353, 6684, 29898, 2917, 3366, 355, 29918, 7924, 29918, 29734, 20068, 13, 1678, 20092, 353, 11117, 333, 29918, 6979, 29918, 29882, 524, 2396, 4867, 1839, 333, 29918, 6979, 7464, 13, 462, 1678, 525, 2490, 29918, 1188, 449, 29918, 17886, 29918, 5338, 2396, 376, 1124, 597, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29901, 29945, 29900, 29900, 29900, 29914, 5184, 613, 13, 462, 1678, 525, 3859, 2396, 12279, 29925, 29918, 19713, 29913, 13, 1678, 396, 13662, 353, 11117, 3916, 29899, 1542, 2396, 525, 6214, 29914, 29916, 29899, 1636, 29899, 689, 29899, 2271, 26716, 10827, 13, 1678, 364, 353, 7274, 29889, 657, 29898, 13, 4706, 1857, 29918, 932, 29889, 2917, 3366, 11794, 29918, 17493, 29918, 1430, 11191, 6992, 29911, 12436, 13, 4706, 8636, 29922, 23813, 29892, 13, 1678, 1723, 13, 1678, 364, 29889, 2271, 13, 1678, 364, 29889, 726, 13, 1678, 4867, 29889, 8551, 580, 13, 1678, 396, 2457, 2933, 13, 1678, 396, 2457, 4050, 29918, 6886, 703, 5184, 29889, 1420, 1159, 13, 1678, 736, 6684, 29898, 3784, 29918, 932, 29889, 2917, 3366, 11794, 29918, 17493, 29918, 1430, 11191, 6992, 29911, 20068, 396, 29925, 272, 263, 15255, 439, 8710, 28278, 29889, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 12717, 1159, 13, 1753, 1048, 7295, 13, 1678, 736, 4050, 29918, 6886, 703, 12717, 29889, 1420, 1159, 13, 268, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 14592, 3377, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 12569, 3377, 7295, 13, 13, 268, 396, 29907, 7921, 1232, 4145, 359, 29901, 13, 13, 1678, 4608, 5983, 29879, 29922, 9868, 3032, 657, 29918, 13092, 9065, 5983, 580, 13, 1678, 3142, 1293, 29922, 2636, 13, 1678, 363, 23942, 297, 4608, 5983, 29879, 29901, 13, 4706, 1820, 29922, 26045, 3366, 1989, 3108, 13, 4706, 565, 29898, 1989, 29991, 13776, 1125, 13, 9651, 5354, 353, 3142, 5510, 29898, 1989, 467, 1212, 2029, 13, 9651, 565, 451, 313, 7247, 297, 3142, 1293, 1125, 13, 18884, 3142, 1293, 29889, 4397, 29898, 7247, 29897, 13, 1678, 1596, 29898, 2271, 1293, 29897, 13, 13, 13, 13, 13, 13, 1678, 4608, 29925, 2887, 29922, 9868, 3032, 657, 29918, 13092, 9065, 29898, 11108, 1129, 543, 29886, 6406, 8306, 1159, 13, 1678, 3300, 1293, 29922, 2636, 13, 1678, 363, 2331, 297, 4608, 29925, 2887, 29901, 13, 4706, 1820, 29922, 18182, 3366, 1989, 3108, 13, 13, 4706, 565, 1820, 26359, 1115, 13, 9651, 1820, 2433, 2525, 465, 12961, 29915, 13, 13, 4706, 3300, 1293, 29889, 4397, 29898, 1989, 29897, 13, 1678, 1596, 29898, 3274, 1293, 29897, 13, 13, 13, 1678, 1426, 29877, 2882, 375, 4287, 29922, 3827, 29889, 5085, 29889, 657, 703, 4478, 1626, 1159, 13, 1678, 282, 6406, 8306, 29922, 3827, 29889, 5085, 29889, 657, 703, 29886, 6406, 8306, 1159, 13, 1678, 5354, 29922, 3827, 29889, 5085, 29889, 657, 703, 7247, 1159, 13, 13, 1678, 1813, 29922, 3827, 29889, 5085, 29889, 657, 703, 3488, 613, 29896, 29897, 13, 1678, 1072, 19150, 797, 5611, 7607, 524, 29898, 3488, 6817, 29896, 11877, 29896, 29900, 13, 268, 13, 268, 13, 13, 1678, 3001, 4597, 391, 1883, 29922, 29900, 13, 1678, 565, 29898, 726, 29877, 2882, 375, 4287, 1360, 8516, 470, 1426, 29877, 2882, 375, 4287, 1360, 4907, 1125, 13, 4706, 620, 29922, 12953, 29889, 4478, 29898, 10289, 29922, 1727, 19150, 797, 5611, 29897, 13, 4706, 3001, 4597, 391, 1883, 29922, 12953, 29889, 2798, 580, 13, 1678, 1683, 29901, 13, 4706, 620, 29922, 12953, 3032, 657, 29918, 4002, 699, 1980, 29898, 726, 29877, 2882, 375, 4287, 29922, 726, 29877, 2882, 375, 4287, 29892, 29886, 6406, 8306, 29922, 29886, 6406, 8306, 29892, 2271, 29922, 7247, 29892, 10289, 29922, 1727, 19150, 797, 5611, 29897, 13, 4706, 3001, 4597, 391, 1883, 29922, 12953, 3032, 657, 29918, 4002, 699, 1980, 3981, 29879, 29898, 726, 29877, 2882, 375, 4287, 29922, 726, 29877, 2882, 375, 4287, 29892, 29886, 6406, 8306, 29922, 29886, 6406, 8306, 29892, 2271, 29922, 7247, 29897, 13, 13, 1678, 396, 29907, 7921, 1232, 12158, 359, 316, 385, 327, 6027, 1277, 6107, 4108, 13, 1678, 363, 2944, 19617, 297, 620, 29901, 13, 308, 13, 4706, 396, 6039, 841, 1484, 1232, 501, 2096, 29879, 29901, 13, 4706, 1051, 5983, 29922, 2636, 13, 4706, 363, 3142, 297, 2944, 19617, 1839, 26045, 2033, 29901, 13, 9651, 1051, 5983, 29889, 4397, 29898, 2271, 1839, 2271, 11287, 13, 13, 4706, 396, 29907, 7921, 18683, 12386, 4695, 359, 316, 1869, 2342, 6739, 2884, 13, 4706, 620, 10900, 29922, 21978, 29889, 8216, 25060, 29898, 21978, 29892, 332, 275, 29922, 1761, 5983, 29897, 13, 308, 13, 4706, 302, 307, 29737, 1627, 29879, 29922, 29900, 13, 4706, 302, 307, 2182, 2297, 29922, 29900, 13, 4706, 302, 307, 14343, 29879, 29922, 29900, 13, 13, 4706, 302, 307, 29737, 14470, 29922, 29900, 13, 4706, 302, 307, 29737, 2052, 307, 1490, 29922, 29900, 13, 4706, 302, 307, 29984, 1041, 14470, 29922, 29900, 13, 4706, 302, 307, 29984, 1041, 2052, 307, 1490, 29922, 29900, 13, 4706, 302, 307, 14343, 14470, 29922, 29900, 13, 4706, 302, 307, 14343, 2052, 307, 1490, 29922, 29900, 13, 308, 13, 4706, 396, 6039, 841, 1484, 425, 1871, 16337, 12386, 24504, 29901, 13, 4706, 565, 29898, 2435, 29898, 690, 10900, 15410, 29900, 1125, 13, 632, 13, 9651, 363, 2944, 10900, 297, 620, 10900, 29901, 13, 462, 13, 18884, 274, 403, 4782, 29922, 667, 10900, 1839, 1989, 2033, 13, 795, 13, 462, 13, 18884, 565, 29898, 29883, 403, 4782, 1360, 29915, 18798, 1627, 29374, 13, 462, 1678, 302, 307, 29737, 1627, 29879, 29922, 667, 10900, 1839, 1514, 29918, 2798, 2033, 13, 462, 1678, 1051, 855, 1078, 29922, 667, 10900, 1839, 2972, 29918, 3859, 16215, 2423, 9737, 2033, 13, 462, 268, 13, 462, 1678, 363, 2944, 2792, 297, 1051, 855, 1078, 29901, 13, 462, 4706, 274, 403, 2792, 29922, 667, 2792, 1839, 1989, 2033, 13, 462, 4706, 302, 307, 2792, 29922, 667, 2792, 1839, 1514, 29918, 2798, 2033, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29900, 1125, 29937, 797, 20018, 13, 462, 9651, 302, 307, 29737, 14470, 29922, 29876, 307, 2792, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29906, 1125, 29937, 797, 28268, 1490, 13, 462, 9651, 302, 307, 29737, 2052, 307, 1490, 29922, 29876, 307, 2792, 268, 13, 13, 18884, 565, 29898, 29883, 403, 4782, 1360, 29915, 12470, 29374, 13, 462, 1678, 302, 307, 2182, 2297, 29922, 667, 10900, 1839, 1514, 29918, 2798, 2033, 13, 462, 1678, 1051, 855, 1078, 29922, 667, 10900, 1839, 2972, 29918, 3859, 16215, 2423, 9737, 2033, 13, 462, 268, 13, 462, 1678, 363, 2944, 2792, 297, 1051, 855, 1078, 29901, 13, 462, 4706, 274, 403, 2792, 29922, 667, 2792, 1839, 1989, 2033, 13, 462, 4706, 302, 307, 2792, 29922, 667, 2792, 1839, 1514, 29918, 2798, 2033, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29900, 1125, 29937, 797, 20018, 13, 462, 9651, 302, 307, 29984, 1041, 14470, 29922, 29876, 307, 2792, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29906, 1125, 29937, 797, 28268, 1490, 13, 462, 9651, 302, 307, 29984, 1041, 2052, 307, 1490, 29922, 29876, 307, 2792, 1678, 13, 13, 18884, 565, 29898, 29883, 403, 4782, 1360, 29915, 8489, 29374, 13, 462, 1678, 302, 307, 14343, 29879, 29922, 667, 10900, 1839, 1514, 29918, 2798, 2033, 13, 462, 1678, 1051, 855, 1078, 29922, 667, 10900, 1839, 2972, 29918, 3859, 16215, 2423, 9737, 2033, 13, 462, 268, 13, 462, 1678, 363, 2944, 2792, 297, 1051, 855, 1078, 29901, 13, 462, 4706, 274, 403, 2792, 29922, 667, 2792, 1839, 1989, 2033, 13, 462, 4706, 302, 307, 2792, 29922, 667, 2792, 1839, 1514, 29918, 2798, 2033, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29900, 1125, 29937, 797, 20018, 13, 462, 9651, 302, 307, 14343, 14470, 29922, 29876, 307, 2792, 13, 462, 4706, 565, 29898, 29883, 403, 2792, 1360, 29906, 1125, 29937, 797, 28268, 1490, 13, 462, 9651, 302, 307, 14343, 2052, 307, 1490, 29922, 29876, 307, 2792, 29871, 13, 13, 4706, 396, 29907, 7921, 1232, 659, 2361, 2025, 2122, 13, 4706, 2944, 19617, 1839, 29876, 307, 14343, 29879, 2033, 29922, 29876, 307, 14343, 29879, 13, 4706, 2944, 19617, 1839, 29876, 307, 2182, 342, 2033, 29922, 29876, 307, 2182, 2297, 13, 4706, 2944, 19617, 1839, 29876, 307, 8263, 5779, 2033, 29922, 29876, 307, 29737, 1627, 29879, 259, 13, 13, 4706, 396, 29907, 7921, 1232, 6728, 4297, 378, 659, 2361, 1277, 707, 2255, 29889, 13, 4706, 396, 1019, 7201, 29877, 14990, 313, 10997, 353, 28268, 1490, 334, 29871, 29896, 29900, 29900, 847, 313, 797, 14470, 718, 28268, 1490, 29897, 13, 4706, 396, 29737, 1627, 20018, 29901, 13, 13, 4706, 396, 797, 695, 8631, 29877, 2854, 16337, 316, 425, 8542, 29871, 921, 847, 29871, 29900, 313, 361, 3229, 29897, 29871, 13, 4706, 13, 4706, 6728, 29737, 29922, 313, 313, 29876, 307, 29737, 2052, 307, 1490, 334, 29871, 29896, 29900, 29900, 29897, 847, 29871, 313, 302, 307, 29737, 14470, 718, 302, 307, 29737, 2052, 307, 1490, 1723, 1723, 29871, 565, 313, 302, 307, 29737, 14470, 718, 302, 307, 29737, 2052, 307, 1490, 1723, 2804, 29871, 29900, 1683, 29871, 29900, 13, 4706, 6728, 14343, 29922, 313, 313, 29876, 307, 14343, 2052, 307, 1490, 334, 29871, 29896, 29900, 29900, 29897, 847, 29871, 313, 302, 307, 14343, 14470, 718, 302, 307, 14343, 2052, 307, 1490, 1723, 1723, 29871, 565, 313, 302, 307, 14343, 14470, 718, 302, 307, 14343, 2052, 307, 1490, 1723, 2804, 29871, 29900, 1683, 29871, 29900, 13, 4706, 6728, 29984, 1041, 29922, 313, 313, 29876, 307, 29984, 1041, 2052, 307, 1490, 334, 29871, 29896, 29900, 29900, 29897, 847, 29871, 313, 302, 307, 29984, 1041, 14470, 718, 302, 307, 29984, 1041, 2052, 307, 1490, 1723, 1723, 29871, 565, 313, 302, 307, 29984, 1041, 14470, 718, 302, 307, 29984, 1041, 2052, 307, 1490, 1723, 2804, 29871, 29900, 1683, 29871, 29900, 13, 13, 4706, 2944, 19617, 1839, 18035, 29737, 2033, 29922, 18035, 29737, 13, 4706, 2944, 19617, 1839, 18035, 14343, 2033, 29922, 18035, 14343, 13, 4706, 2944, 19617, 1839, 18035, 29984, 1041, 2033, 29922, 18035, 29984, 1041, 13, 13, 13, 4706, 1426, 29877, 25060, 29922, 28945, 29890, 29958, 29737, 1627, 4852, 29974, 710, 29898, 29876, 307, 29737, 2052, 307, 1490, 7240, 29908, 12975, 29974, 710, 29898, 29876, 307, 29737, 2052, 307, 1490, 29974, 29876, 307, 29737, 14470, 7240, 1159, 829, 29890, 29958, 584, 15691, 710, 29898, 14486, 29898, 18035, 29737, 876, 13578, 29995, 529, 1182, 11903, 29974, 13, 462, 259, 9872, 29890, 29958, 14343, 29879, 4852, 29974, 710, 29898, 29876, 307, 14343, 2052, 307, 1490, 7240, 29908, 12975, 29974, 710, 29898, 29876, 307, 14343, 2052, 307, 1490, 29974, 29876, 307, 14343, 14470, 7240, 1159, 829, 29890, 23917, 15691, 710, 29898, 14486, 29898, 18035, 14343, 876, 13578, 29995, 529, 1182, 11903, 29974, 13, 462, 259, 9872, 29890, 29958, 2182, 2297, 4852, 29974, 710, 29898, 29876, 307, 29984, 1041, 2052, 307, 1490, 7240, 29908, 12975, 29974, 710, 29898, 29876, 307, 29984, 1041, 2052, 307, 1490, 29974, 29876, 307, 29984, 1041, 14470, 7240, 1159, 829, 29890, 23917, 15691, 710, 29898, 14486, 29898, 18035, 29984, 1041, 876, 13578, 29995, 529, 1182, 29958, 1159, 13, 18884, 13, 308, 13, 4706, 2944, 19617, 1839, 726, 29877, 25060, 2033, 29922, 726, 29877, 25060, 13, 13, 4706, 6728, 11536, 2052, 307, 1490, 353, 29871, 302, 307, 29737, 2052, 307, 1490, 718, 302, 307, 14343, 2052, 307, 1490, 718, 302, 307, 29984, 1041, 2052, 307, 1490, 13, 4706, 6728, 11536, 797, 14470, 353, 302, 307, 29737, 14470, 718, 302, 307, 14343, 14470, 718, 302, 307, 29984, 1041, 14470, 13, 4706, 6728, 11536, 29922, 313, 313, 18035, 11536, 2052, 307, 1490, 334, 29871, 29896, 29900, 29900, 29897, 847, 29871, 313, 6728, 11536, 797, 14470, 718, 6728, 11536, 2052, 307, 1490, 1723, 1723, 565, 313, 6728, 11536, 797, 14470, 718, 6728, 11536, 2052, 307, 1490, 1723, 2804, 29871, 29900, 1683, 29871, 29900, 13, 13, 4706, 2944, 19617, 1839, 18035, 11536, 2033, 29922, 14486, 29898, 18035, 11536, 29897, 13, 13, 13, 1678, 6515, 29478, 29922, 755, 29889, 27696, 29898, 7827, 4597, 391, 1883, 29914, 29896, 29900, 29897, 13, 268, 13, 1678, 10203, 262, 16337, 3790, 29915, 3488, 2396, 3488, 5501, 12292, 29478, 2396, 12292, 29478, 5501, 7827, 15213, 29879, 2396, 7827, 4597, 391, 1883, 5501, 4478, 3313, 2396, 726, 29877, 2882, 375, 4287, 5501, 29886, 6406, 8306, 2396, 29886, 6406, 8306, 5501, 2271, 2396, 7247, 29913, 13, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 14592, 3377, 29889, 1420, 613, 2783, 699, 1980, 29922, 690, 29892, 26045, 29922, 2271, 1293, 29892, 3597, 4977, 29922, 3274, 1293, 29892, 13573, 262, 16337, 29922, 13573, 262, 16337, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 1545, 261, 403, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 17768, 403, 7295, 13, 13, 268, 396, 29907, 7921, 1232, 4145, 359, 29901, 13, 13, 1678, 4608, 5983, 29879, 29922, 9868, 3032, 657, 29918, 13092, 9065, 29898, 11108, 1129, 543, 2271, 1159, 13, 1678, 3142, 1293, 29922, 2636, 13, 1678, 363, 23942, 297, 4608, 5983, 29879, 29901, 13, 4706, 1820, 29922, 26045, 3366, 1989, 3108, 13, 4706, 565, 29898, 1989, 29991, 13776, 1125, 13, 9651, 5354, 353, 3142, 5510, 29898, 1989, 467, 1212, 2029, 13, 9651, 565, 451, 313, 7247, 297, 3142, 1293, 1125, 13, 18884, 3142, 1293, 29889, 4397, 29898, 7247, 29897, 13, 1678, 1596, 29898, 2271, 1293, 29897, 13, 13, 13, 13, 13, 13, 1678, 4608, 29925, 2887, 29922, 9868, 3032, 657, 29918, 13092, 9065, 29898, 11108, 1129, 543, 29886, 6406, 8306, 1159, 13, 1678, 3300, 1293, 29922, 2636, 13, 1678, 363, 2331, 297, 4608, 29925, 2887, 29901, 13, 4706, 1820, 29922, 18182, 3366, 1989, 3108, 13, 13, 4706, 565, 1820, 26359, 1115, 13, 9651, 1820, 2433, 2525, 465, 12961, 29915, 13, 13, 4706, 3300, 1293, 29889, 4397, 29898, 1989, 29897, 13, 1678, 1596, 29898, 3274, 1293, 29897, 13, 13, 13, 1678, 1426, 29877, 2882, 375, 4287, 29922, 3827, 29889, 5085, 29889, 657, 703, 4478, 1626, 1159, 13, 1678, 282, 6406, 8306, 29922, 3827, 29889, 5085, 29889, 657, 703, 29886, 6406, 8306, 1159, 13, 1678, 5354, 29922, 3827, 29889, 5085, 29889, 657, 703, 7247, 1159, 13, 13, 1678, 1813, 29922, 3827, 29889, 5085, 29889, 657, 703, 3488, 613, 29896, 29897, 13, 1678, 1072, 19150, 797, 5611, 7607, 524, 29898, 3488, 6817, 29896, 11877, 29896, 29900, 13, 268, 13, 268, 13, 13, 1678, 3001, 4597, 391, 1883, 29922, 29900, 13, 1678, 565, 29898, 726, 29877, 2882, 375, 4287, 1360, 8516, 470, 1426, 29877, 2882, 375, 4287, 1360, 4907, 1125, 13, 4706, 620, 29922, 12953, 29889, 4478, 29898, 10289, 29922, 1727, 19150, 797, 5611, 29897, 13, 4706, 3001, 4597, 391, 1883, 29922, 12953, 29889, 2798, 580, 13, 1678, 1683, 29901, 13, 4706, 620, 29922, 12953, 3032, 657, 29918, 4002, 699, 1980, 29898, 726, 29877, 2882, 375, 4287, 29922, 726, 29877, 2882, 375, 4287, 29892, 29886, 6406, 8306, 29922, 29886, 6406, 8306, 29892, 2271, 29922, 7247, 29892, 10289, 29922, 1727, 19150, 797, 5611, 29897, 13, 4706, 3001, 4597, 391, 1883, 29922, 12953, 3032, 657, 29918, 4002, 699, 1980, 3981, 29879, 29898, 726, 29877, 2882, 375, 4287, 29922, 726, 29877, 2882, 375, 4287, 29892, 29886, 6406, 8306, 29922, 29886, 6406, 8306, 29892, 2271, 29922, 7247, 29897, 13, 308, 13, 1678, 620, 29922, 9868, 3032, 657, 29918, 4002, 924, 29918, 1609, 2111, 261, 9823, 29898, 5269, 29922, 3784, 29918, 1792, 29889, 5269, 29897, 13, 1678, 3001, 4597, 391, 1883, 29922, 12953, 3032, 657, 29918, 4002, 924, 29918, 1609, 2111, 261, 9823, 3981, 29879, 29898, 5269, 29922, 3784, 29918, 1792, 29889, 5269, 29897, 13, 13, 13, 1678, 6515, 29478, 29922, 755, 29889, 27696, 29898, 7827, 4597, 391, 1883, 29914, 29896, 29900, 29897, 13, 268, 13, 1678, 10203, 262, 16337, 3790, 29915, 3488, 2396, 3488, 5501, 12292, 29478, 2396, 12292, 29478, 5501, 7827, 15213, 29879, 2396, 7827, 4597, 391, 1883, 5501, 4478, 3313, 2396, 726, 29877, 2882, 375, 4287, 5501, 29886, 6406, 8306, 2396, 29886, 6406, 8306, 5501, 2271, 2396, 7247, 29913, 13, 13, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 1545, 261, 403, 29889, 1420, 613, 2783, 699, 1980, 29922, 690, 29892, 26045, 29922, 2271, 1293, 29892, 3597, 4977, 29922, 3274, 1293, 29892, 13573, 262, 16337, 29922, 13573, 262, 16337, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 7610, 6950, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 18994, 7295, 13, 13, 1678, 1426, 29877, 2882, 375, 4287, 29922, 3827, 29889, 5085, 29889, 657, 703, 4478, 1626, 1159, 13, 268, 13, 1678, 1813, 29922, 3827, 29889, 5085, 29889, 657, 703, 3488, 613, 29896, 29897, 13, 1678, 1072, 19150, 797, 5611, 7607, 524, 29898, 3488, 6817, 29896, 11877, 29896, 29900, 13, 268, 13, 1678, 3001, 4597, 391, 1883, 29922, 29900, 13, 13, 1678, 396, 7974, 29879, 29901, 13, 1678, 9995, 565, 29898, 726, 29877, 2882, 375, 4287, 1360, 8516, 470, 1426, 29877, 2882, 375, 4287, 1360, 4907, 1125, 13, 4706, 620, 29922, 23218, 29889, 4478, 29898, 10289, 29922, 1727, 19150, 797, 5611, 29897, 13, 4706, 3001, 4597, 391, 1883, 29922, 23218, 29889, 2798, 580, 13, 1678, 1683, 29901, 13, 4706, 620, 29922, 23218, 3032, 657, 29918, 18498, 345, 952, 29898, 726, 29877, 2882, 375, 4287, 29922, 726, 29877, 2882, 375, 4287, 29892, 10289, 29922, 1727, 19150, 797, 5611, 29897, 9995, 13, 308, 13, 1678, 620, 15637, 29922, 18498, 6950, 3032, 657, 29918, 497, 580, 13, 1678, 620, 29922, 690, 15637, 1839, 7610, 345, 952, 2033, 13, 1678, 3001, 4597, 391, 1883, 29922, 620, 15637, 1839, 1949, 1666, 2033, 13, 13, 13, 1678, 6515, 29478, 29922, 755, 29889, 27696, 29898, 7827, 4597, 391, 1883, 29914, 29896, 29900, 29897, 13, 268, 13, 1678, 10203, 262, 16337, 3790, 29915, 3488, 2396, 3488, 5501, 12292, 29478, 2396, 12292, 29478, 5501, 7827, 15213, 29879, 2396, 7827, 4597, 391, 1883, 5501, 4478, 3313, 2396, 726, 29877, 2882, 375, 4287, 29913, 13, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 396, 3206, 1789, 425, 2970, 22643, 628, 23218, 8514, 13, 1678, 18994, 8514, 29922, 3784, 29918, 932, 29889, 2917, 1839, 29903, 4574, 12064, 29979, 23845, 23714, 29968, 29918, 4219, 2033, 13, 1678, 18994, 11713, 6594, 29922, 3784, 29918, 932, 29889, 2917, 1839, 29903, 4574, 12064, 29979, 8787, 29918, 16358, 2033, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 7610, 345, 952, 29889, 1420, 613, 7610, 345, 952, 29922, 690, 29892, 13573, 262, 16337, 29922, 13573, 262, 16337, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29892, 7610, 6950, 8514, 29922, 7610, 6950, 8514, 29892, 7610, 6950, 11713, 6594, 29922, 7610, 6950, 11713, 6594, 29897, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 7610, 6950, 3379, 3656, 1061, 613, 23515, 29922, 3366, 5438, 20068, 13, 1753, 18994, 3379, 3656, 1061, 7295, 13, 13, 1678, 396, 9039, 533, 22643, 29877, 394, 6920, 29901, 13, 1678, 736, 6684, 29898, 3784, 29918, 932, 29889, 2917, 1839, 29903, 4574, 12064, 29979, 23845, 23714, 29968, 29918, 4219, 2033, 13578, 29914, 16596, 12975, 13578, 2611, 3656, 403, 1159, 13, 13, 1753, 4017, 5959, 9823, 29898, 1761, 6913, 29933, 2707, 300, 29922, 2636, 1125, 13, 1678, 1051, 5959, 29922, 2636, 13, 1678, 363, 2944, 29933, 2707, 300, 297, 1051, 6913, 29933, 2707, 300, 29901, 13, 4706, 1404, 9823, 29922, 667, 29933, 2707, 300, 1839, 1989, 2033, 13, 4706, 565, 1404, 9823, 29991, 2433, 2744, 11428, 29915, 322, 1404, 9823, 29991, 2433, 2744, 29876, 11428, 29915, 584, 13, 9651, 1051, 5959, 29889, 4397, 29898, 1792, 9823, 29897, 13, 1678, 736, 1051, 5959, 13, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 433, 987, 18498, 6950, 613, 23515, 29922, 3366, 5438, 20068, 13, 1753, 18994, 29931, 13989, 7032, 7295, 13, 13, 1678, 396, 6039, 841, 1484, 1232, 659, 2361, 628, 23218, 29901, 13, 1678, 5535, 8667, 5959, 29922, 3827, 29889, 689, 29889, 657, 703, 2838, 8667, 1293, 1159, 13, 1678, 1051, 5959, 13799, 29922, 3827, 29889, 689, 29889, 657, 703, 1761, 5959, 13799, 1159, 13, 1678, 338, 29918, 25253, 29922, 3827, 29889, 689, 29889, 657, 703, 275, 29918, 25253, 1159, 13, 1678, 297, 29875, 29918, 1256, 29922, 3827, 29889, 689, 29889, 657, 703, 2172, 29918, 1256, 1159, 13, 1678, 1436, 29918, 1256, 29922, 3827, 29889, 689, 29889, 657, 703, 4951, 29918, 1256, 1159, 13, 1678, 5535, 2624, 29922, 3827, 29889, 689, 29889, 657, 703, 2838, 2624, 1159, 13, 13, 1678, 9619, 7606, 29922, 5574, 13, 1678, 565, 338, 29918, 25253, 1275, 29915, 265, 2396, 13, 4706, 9619, 7606, 29922, 8824, 13, 13, 13, 1678, 396, 9832, 29877, 425, 12519, 29901, 13, 1678, 1178, 26405, 29922, 3827, 29889, 689, 29889, 657, 877, 24129, 1204, 1495, 13, 1678, 3611, 29922, 3827, 29889, 689, 29889, 657, 877, 7610, 6950, 7030, 1495, 13, 1678, 6139, 29922, 2009, 29889, 689, 29889, 657, 877, 7610, 6950, 19617, 1495, 13, 13, 1678, 396, 3206, 1789, 278, 4160, 29901, 13, 1678, 1051, 5959, 9823, 29879, 29922, 2636, 13, 1678, 565, 5535, 8667, 5959, 26359, 17991, 2587, 1115, 13, 13, 4706, 1051, 5959, 22110, 2744, 1333, 630, 29922, 711, 2408, 5959, 9823, 29898, 21978, 29889, 3784, 9966, 5959, 3101, 13, 4706, 1051, 5959, 22110, 2111, 261, 403, 29922, 4017, 5959, 9823, 29898, 9868, 29889, 3784, 9966, 5959, 2111, 261, 4097, 3101, 13, 4706, 1051, 5959, 9823, 29879, 29922, 1761, 29898, 842, 29898, 1761, 5959, 22110, 2744, 1333, 630, 29974, 1761, 5959, 22110, 2111, 261, 403, 876, 13, 308, 13, 1678, 1683, 29901, 13, 4706, 1051, 5959, 9823, 29879, 29922, 1051, 5959, 13799, 29889, 5451, 703, 29936, 1159, 13, 268, 13, 13, 13, 1678, 363, 1404, 9823, 297, 1051, 5959, 9823, 29879, 29901, 13, 13, 4706, 4876, 29922, 1792, 9823, 13, 4706, 3646, 29918, 2271, 29922, 3784, 29918, 932, 29889, 2917, 1839, 29903, 4574, 12064, 29979, 23845, 23714, 29968, 29918, 4219, 2033, 29974, 5591, 16596, 12975, 29974, 333, 26405, 13578, 29914, 1493, 12975, 13, 13, 4706, 716, 12958, 29922, 12958, 29898, 13, 462, 4706, 3611, 29922, 3257, 29892, 13, 462, 4706, 4876, 29922, 5269, 29892, 13, 462, 4706, 6139, 29922, 8216, 29892, 13, 462, 4706, 3646, 29918, 2271, 29922, 5182, 29918, 2271, 29892, 13, 462, 4706, 11527, 29922, 8824, 29892, 13, 462, 4706, 7663, 543, 7610, 6950, 613, 13, 462, 4706, 1178, 26405, 29922, 333, 26405, 29892, 13, 462, 4706, 7135, 2624, 29922, 2838, 2624, 29892, 13, 462, 4706, 7135, 2539, 29922, 2172, 29918, 1256, 29892, 13, 462, 4706, 338, 29924, 392, 7606, 29922, 29885, 392, 7606, 13, 462, 4706, 1723, 13, 308, 13, 13, 13, 4706, 716, 12958, 29889, 7620, 29898, 2248, 543, 24671, 1159, 13, 13, 13, 1678, 396, 2008, 447, 18138, 912, 6876, 359, 2503, 560, 480, 6950, 29901, 13, 1678, 11013, 703, 1576, 18994, 756, 1063, 425, 987, 287, 29889, 3284, 3888, 1159, 13, 4706, 13, 1678, 396, 9039, 533, 22643, 29877, 394, 6920, 29901, 13, 1678, 736, 6684, 11974, 7610, 6950, 1159, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11219, 17263, 749, 7974, 742, 29897, 13, 1753, 6564, 7974, 7295, 13, 13, 13, 1678, 620, 353, 530, 16666, 29889, 4478, 29898, 1972, 3790, 29915, 1792, 2396, 1857, 29918, 1792, 29889, 5269, 1800, 13, 268, 13, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 17263, 749, 7974, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 385, 327, 800, 29922, 690, 29897, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11219, 8216, 29914, 29966, 1807, 29901, 8216, 1204, 29958, 742, 29897, 13, 29992, 7507, 29918, 12403, 13, 1753, 6139, 29898, 8216, 1204, 29922, 8516, 1125, 13, 13, 1678, 6139, 353, 12953, 3032, 657, 29918, 4002, 699, 1980, 29918, 1609, 1204, 29898, 333, 29922, 8216, 1204, 9601, 29900, 29962, 13, 268, 13, 1678, 3142, 6330, 5074, 353, 518, 2271, 1839, 2271, 2033, 363, 3142, 297, 6139, 1839, 26045, 2033, 565, 3142, 1839, 275, 6330, 2033, 1275, 5852, 3816, 29900, 29962, 13, 13, 1678, 6107, 4108, 29922, 3827, 29889, 5085, 29889, 657, 877, 7320, 1495, 13, 13, 1678, 1813, 29922, 3827, 29889, 5085, 29889, 657, 703, 3488, 613, 29896, 29897, 13, 1678, 1072, 19150, 797, 5611, 7607, 524, 29898, 3488, 6817, 29896, 11877, 29896, 29900, 13, 13, 268, 13, 13, 13, 1678, 565, 29898, 29883, 1845, 4108, 1275, 6213, 470, 6107, 4108, 1360, 29915, 497, 29915, 29871, 1125, 13, 4706, 6107, 4108, 2433, 29915, 13, 268, 13, 1678, 620, 29922, 2636, 13, 1678, 22663, 29922, 2636, 13, 1678, 954, 1666, 29922, 29900, 13, 1678, 1051, 5983, 29879, 27514, 29922, 2636, 13, 1678, 363, 2944, 5983, 297, 6139, 1839, 26045, 2033, 29901, 13, 4706, 3142, 29922, 667, 5983, 1839, 2271, 2033, 13, 4706, 1051, 5983, 29879, 27514, 29889, 4397, 29898, 2271, 29897, 13, 13, 4706, 396, 315, 7921, 1869, 1634, 3687, 316, 9747, 9732, 16337, 29901, 13, 4706, 22663, 29922, 16202, 29974, 21978, 29889, 18317, 25060, 29898, 21978, 29892, 5338, 29922, 667, 5983, 1839, 2271, 11287, 13, 13, 1678, 620, 29922, 530, 16666, 3032, 657, 29918, 1609, 29918, 20787, 29898, 21978, 29892, 726, 29877, 2882, 375, 4287, 2433, 742, 342, 2255, 3790, 29915, 797, 14470, 2396, 5574, 5501, 13197, 2347, 2396, 5574, 5501, 2052, 307, 1490, 2396, 5574, 1118, 26045, 29922, 1761, 5983, 29879, 27514, 29892, 7320, 29922, 29883, 1845, 4108, 29892, 1333, 3445, 368, 29922, 5574, 29892, 3488, 29922, 3488, 29897, 13, 1678, 954, 1666, 29922, 620, 1839, 1949, 1666, 2033, 13, 1678, 620, 29922, 690, 1839, 6735, 800, 2033, 13, 13, 13, 1678, 9657, 25060, 3790, 29913, 13, 1678, 363, 2944, 9513, 297, 22663, 29901, 13, 4706, 3711, 345, 29922, 667, 9513, 1839, 1989, 2033, 13, 4706, 659, 29922, 667, 9513, 1839, 1514, 29918, 2798, 2033, 13, 4706, 9657, 25060, 29961, 16398, 345, 13192, 791, 13, 13, 1678, 363, 2944, 1666, 297, 620, 29901, 13, 4706, 565, 2944, 1666, 1839, 333, 2033, 297, 9657, 25060, 29889, 8149, 7295, 13, 9651, 2944, 1666, 1839, 29876, 307, 5612, 3687, 2033, 29922, 8977, 25060, 29961, 667, 1666, 1839, 333, 2033, 29962, 13, 4706, 1683, 29901, 13, 9651, 2944, 1666, 1839, 29876, 307, 5612, 3687, 2033, 29922, 29900, 13, 268, 13, 1678, 1813, 29922, 3827, 29889, 5085, 29889, 657, 703, 3488, 613, 29896, 29897, 13, 1678, 6515, 29478, 29922, 755, 29889, 27696, 29898, 1949, 1666, 29914, 29896, 29900, 29897, 13, 268, 13, 1678, 10203, 262, 16337, 3790, 29915, 3488, 2396, 3488, 5501, 12292, 29478, 2396, 12292, 29478, 5501, 7827, 15213, 29879, 2396, 1949, 1666, 29913, 13, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 8216, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 6139, 29922, 8216, 29892, 273, 327, 800, 29922, 690, 29892, 7320, 4775, 29922, 29883, 1845, 4108, 29892, 13573, 262, 16337, 29922, 13573, 262, 16337, 29892, 2271, 6330, 5074, 29922, 2271, 6330, 5074, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 259, 396, 736, 525, 433, 5153, 29901, 525, 29974, 7320, 23097, 433, 5338, 338, 18717, 710, 29898, 5338, 29897, 29871, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11219, 8216, 29914, 29966, 1807, 29901, 8216, 1204, 20690, 29966, 1807, 29901, 3385, 29958, 742, 29897, 13, 29992, 7507, 29918, 12403, 13, 1753, 3863, 9868, 29898, 8216, 1204, 29922, 8516, 29892, 3385, 2433, 6103, 29374, 13, 13, 1678, 4608, 29925, 2887, 29922, 9868, 3032, 657, 29918, 13092, 9065, 29898, 11108, 1129, 543, 29886, 6406, 8306, 1159, 13, 1678, 3300, 1293, 29922, 2636, 13, 1678, 363, 2331, 297, 4608, 29925, 2887, 29901, 13, 4706, 1820, 29922, 18182, 3366, 1989, 3108, 13, 13, 4706, 565, 1820, 26359, 1115, 13, 9651, 1820, 2433, 2525, 465, 12961, 29915, 13, 13, 4706, 3300, 1293, 29889, 4397, 29898, 1989, 29897, 13, 1678, 1596, 29898, 3274, 1293, 29897, 13, 13, 1678, 6139, 353, 12953, 3032, 657, 29918, 4002, 699, 1980, 29918, 1609, 1204, 29898, 333, 29922, 8216, 1204, 9601, 29900, 29962, 1678, 13, 268, 13, 1678, 363, 2944, 5983, 297, 6139, 1839, 26045, 2033, 29901, 13, 4706, 565, 2944, 5983, 1839, 11675, 2033, 29991, 2433, 25263, 5598, 2396, 13, 9651, 2944, 5983, 1839, 3893, 1626, 2033, 29922, 657, 29931, 8737, 1293, 580, 29961, 667, 5983, 1839, 11675, 2033, 29962, 13, 4706, 1683, 29901, 13, 9651, 2944, 5983, 1839, 3893, 1626, 2033, 543, 25263, 5598, 29908, 13, 13, 29937, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 259, 13, 1678, 736, 4050, 29918, 6886, 703, 8216, 16570, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 6139, 29922, 8216, 29892, 3385, 29922, 3385, 29892, 3597, 4977, 29922, 3274, 1293, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11219, 16009, 5074, 29914, 29966, 1807, 29901, 8216, 1204, 20690, 29966, 1807, 29901, 6735, 1061, 1204, 29958, 742, 29897, 13, 29992, 7507, 29918, 12403, 13, 1753, 4967, 5074, 29898, 8216, 1204, 29922, 8516, 29892, 6735, 1061, 1204, 29922, 8516, 1125, 13, 13, 1678, 6139, 353, 12953, 3032, 657, 29918, 4002, 699, 1980, 29918, 1609, 1204, 29898, 333, 29922, 8216, 1204, 9601, 29900, 29962, 13, 13, 1678, 3142, 6330, 5074, 353, 518, 2271, 1839, 2271, 2033, 363, 3142, 297, 6139, 1839, 26045, 2033, 565, 3142, 1839, 275, 6330, 2033, 1275, 5852, 3816, 29900, 29962, 13, 13, 1678, 17195, 353, 530, 16666, 3032, 657, 29918, 21978, 29918, 1609, 1204, 29898, 333, 29922, 6735, 1061, 1204, 9601, 29900, 29962, 13, 13, 1678, 302, 307, 5612, 3687, 353, 530, 16666, 29889, 2798, 29898, 1972, 3790, 525, 333, 5612, 368, 10303, 2396, 9732, 1061, 1204, 1919, 29915, 7320, 22099, 3445, 368, 29915, 5615, 13, 1678, 1634, 3687, 353, 530, 16666, 29889, 4478, 29898, 1972, 3790, 525, 333, 5612, 368, 10303, 2396, 9732, 1061, 1204, 1919, 29915, 7320, 22099, 3445, 368, 29915, 29871, 2981, 13400, 29922, 29876, 307, 5612, 3687, 29897, 13, 13, 1678, 302, 307, 5612, 3687, 2776, 21978, 29922, 29876, 307, 5612, 3687, 13, 1678, 396, 29876, 307, 5612, 3687, 2776, 21978, 353, 530, 16666, 29889, 2798, 29898, 1972, 3790, 22868, 333, 2396, 6139, 1839, 333, 2033, 1919, 29915, 7320, 22099, 3445, 368, 3788, 333, 5612, 368, 10303, 2396, 6735, 1061, 1204, 29871, 5615, 13, 268, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 16009, 5074, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 17195, 29922, 18317, 29892, 8216, 29922, 8216, 29892, 7320, 4775, 29922, 18317, 1839, 7320, 7464, 3445, 3687, 29922, 3445, 3687, 29892, 29876, 307, 5612, 3687, 29922, 29876, 307, 5612, 3687, 2776, 21978, 29892, 2271, 6330, 5074, 29922, 2271, 6330, 5074, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 259, 396, 736, 525, 433, 5153, 29901, 525, 29974, 7320, 23097, 433, 5338, 338, 18717, 710, 29898, 5338, 29897, 29871, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11219, 16009, 5074, 29914, 29966, 1807, 29901, 8216, 1204, 20690, 29966, 1807, 29901, 6735, 1061, 1204, 20690, 29966, 1807, 29901, 3385, 29958, 742, 3519, 29922, 3366, 7194, 613, 376, 5438, 20068, 13, 29992, 7507, 29918, 12403, 13, 1753, 1735, 21978, 29898, 8216, 1204, 29922, 8516, 29892, 6735, 1061, 1204, 29922, 8516, 29892, 3385, 29922, 8516, 1125, 13, 13, 268, 13, 1678, 565, 2984, 1275, 525, 3859, 2396, 13, 308, 13, 4706, 2980, 359, 29922, 3827, 29889, 3126, 13, 4706, 716, 3859, 29922, 23516, 359, 29889, 7323, 877, 3859, 1762, 7277, 1495, 13, 4706, 6589, 7277, 2792, 29922, 23516, 359, 29889, 7323, 877, 21032, 7277, 2792, 1495, 13, 4706, 5446, 1853, 29922, 23516, 359, 29889, 7323, 877, 5415, 1853, 1495, 13, 13, 4706, 17195, 10303, 1204, 2433, 29915, 13, 4706, 1232, 791, 2361, 29922, 23516, 359, 29889, 8149, 580, 13, 4706, 565, 376, 18317, 10303, 1204, 29908, 297, 1232, 791, 2361, 29901, 13, 9651, 17195, 10303, 1204, 29922, 23516, 359, 29889, 7323, 877, 18317, 10303, 1204, 1495, 13, 308, 13, 13, 4706, 17195, 353, 530, 16666, 3032, 657, 29918, 21978, 29918, 1609, 1204, 29898, 333, 29922, 6735, 1061, 1204, 9601, 29900, 29962, 13, 308, 13, 13, 4706, 396, 4597, 19150, 560, 26007, 343, 14310, 658, 22598, 13, 4706, 565, 29898, 2435, 29898, 18317, 1839, 3859, 25990, 11287, 1360, 29900, 1125, 13, 9651, 17195, 1839, 3859, 25990, 2033, 29922, 2636, 259, 13, 13, 4706, 396, 25598, 560, 12082, 24879, 831, 21460, 1941, 343, 560, 12082, 2186, 831, 21460, 1941, 13, 4706, 396, 2008, 620, 2650, 29874, 560, 12082, 263, 297, 6728, 29889, 13, 4706, 565, 29898, 18317, 1839, 3859, 2033, 1360, 29941, 669, 938, 29898, 1482, 3859, 29897, 1360, 29941, 1125, 13, 9651, 716, 3859, 29922, 29900, 13, 308, 13, 13, 4706, 17195, 1839, 3859, 25990, 13359, 4397, 3319, 13, 462, 4706, 376, 2344, 3859, 1115, 17195, 1839, 3859, 7464, 13, 462, 4706, 376, 355, 3859, 1115, 938, 29898, 1482, 3859, 511, 13, 462, 4706, 376, 726, 1115, 6589, 7277, 2792, 29892, 13, 462, 4706, 376, 5415, 1853, 29908, 584, 5446, 1853, 29892, 13, 462, 4706, 376, 1256, 1115, 12865, 29889, 12673, 29889, 3707, 2141, 6506, 29898, 29885, 2357, 7496, 29922, 29900, 467, 10718, 4830, 3285, 13, 462, 4706, 376, 1792, 1115, 1857, 29918, 1792, 29889, 5269, 13, 462, 1678, 5615, 13, 13, 4706, 17195, 1839, 3859, 2033, 29922, 524, 29898, 1482, 3859, 29897, 13, 4706, 17195, 29889, 5504, 2792, 580, 13, 13, 4706, 736, 4390, 1598, 29898, 18317, 29897, 13, 308, 13, 308, 13, 13, 1678, 25342, 2984, 1360, 29915, 4561, 2396, 13, 13, 4706, 2980, 359, 29922, 3827, 29889, 3126, 13, 13, 13, 4706, 11719, 29922, 524, 29898, 23516, 359, 29889, 7323, 877, 3859, 1762, 7277, 8785, 13, 13, 4706, 716, 3859, 29922, 15814, 13, 4706, 6589, 7277, 2792, 29922, 23516, 359, 29889, 7323, 877, 21032, 7277, 2792, 1495, 13, 4706, 5446, 1853, 29922, 23516, 359, 29889, 7323, 877, 5415, 1853, 1495, 13, 13, 4706, 17195, 10303, 1204, 2433, 29915, 13, 4706, 1232, 791, 2361, 29922, 23516, 359, 29889, 8149, 580, 13, 4706, 565, 376, 18317, 10303, 1204, 29908, 297, 1232, 791, 2361, 29901, 13, 9651, 17195, 10303, 1204, 29922, 23516, 359, 29889, 7323, 877, 18317, 10303, 1204, 1495, 13, 13, 4706, 396, 6565, 928, 29877, 1354, 29871, 14123, 2689, 4404, 502, 22223, 447, 8869, 912, 1185, 385, 327, 16337, 13, 4706, 17195, 353, 530, 16666, 3032, 657, 29918, 21978, 29918, 1609, 1204, 29898, 333, 29922, 6735, 1061, 1204, 9601, 29900, 29962, 13, 4706, 302, 307, 29931, 29379, 29922, 18317, 29889, 1792, 2499, 2040, 27552, 29898, 5269, 29922, 3784, 29918, 1792, 29889, 5269, 29892, 333, 29922, 6735, 1061, 1204, 29897, 13, 13, 4706, 396, 2525, 502, 22223, 6651, 11493, 9014, 279, 1185, 7763, 13, 4706, 565, 302, 307, 29931, 29379, 1360, 29900, 29901, 13, 13, 632, 13, 13, 9651, 396, 4597, 19150, 560, 26007, 343, 14310, 658, 22598, 13, 9651, 565, 29898, 2435, 29898, 18317, 1839, 3859, 25990, 11287, 1360, 29900, 1125, 13, 18884, 17195, 1839, 3859, 25990, 2033, 29922, 2636, 29871, 13, 632, 13, 9651, 396, 4597, 19150, 560, 26007, 343, 14310, 658, 22598, 13, 9651, 2069, 2792, 29922, 29900, 13, 9651, 565, 29898, 15814, 1360, 29896, 1125, 13, 18884, 2069, 2792, 29922, 524, 29898, 18317, 1839, 4561, 11287, 13, 18884, 17195, 1839, 4561, 2033, 29922, 2344, 2792, 29974, 29896, 13, 18884, 5446, 1853, 2433, 18317, 29918, 4561, 29915, 13, 462, 268, 13, 9651, 25342, 11719, 1360, 29899, 29896, 29901, 13, 18884, 2069, 2792, 29922, 524, 29898, 18317, 1839, 2218, 4561, 11287, 13, 18884, 17195, 1839, 2218, 4561, 2033, 29922, 2344, 2792, 29974, 29896, 13, 18884, 5446, 1853, 2433, 18317, 29918, 4561, 29915, 13, 13, 9651, 396, 4597, 19150, 560, 26007, 316, 12082, 13, 9651, 17195, 1839, 3859, 25990, 13359, 4397, 3319, 13, 462, 9651, 376, 2344, 3859, 1115, 2069, 2792, 29892, 13, 462, 9651, 376, 355, 3859, 1115, 2069, 2792, 29974, 29896, 29892, 13, 462, 9651, 376, 726, 1115, 6589, 7277, 2792, 29892, 13, 462, 9651, 376, 5415, 1853, 29908, 584, 5446, 1853, 29892, 13, 462, 9651, 376, 1256, 1115, 12865, 29889, 12673, 29889, 3707, 2141, 6506, 29898, 29885, 2357, 7496, 29922, 29900, 467, 10718, 4830, 3285, 13, 462, 9651, 376, 1792, 1115, 1857, 29918, 1792, 29889, 5269, 13, 462, 4706, 5615, 13, 13, 13, 9651, 17195, 29889, 5504, 27552, 580, 13, 9651, 17195, 29889, 5504, 2792, 580, 13, 13, 4706, 736, 4390, 1598, 29898, 18317, 29897, 13, 13, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 8216, 16570, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 6139, 16570, 7295, 13, 13, 1678, 4608, 29925, 2887, 29922, 9868, 3032, 657, 29918, 13092, 9065, 29898, 11108, 1129, 543, 29886, 6406, 8306, 1159, 13, 1678, 3300, 1293, 29922, 2636, 13, 1678, 363, 2331, 297, 4608, 29925, 2887, 29901, 13, 4706, 1820, 29922, 18182, 3366, 1989, 3108, 13, 13, 4706, 565, 1820, 26359, 1115, 13, 9651, 1820, 2433, 2525, 465, 12961, 29915, 13, 13, 4706, 3300, 1293, 29889, 4397, 29898, 1989, 29897, 13, 1678, 1596, 29898, 3274, 1293, 29897, 13, 13, 1678, 620, 353, 530, 16666, 29889, 4478, 29898, 1972, 3790, 29915, 1792, 2396, 1857, 29918, 1792, 29889, 5269, 1800, 13, 268, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 8216, 16570, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 385, 327, 800, 29922, 690, 29892, 3597, 4977, 29922, 3274, 1293, 29897, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 10185, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 8722, 7295, 13, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 10185, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 11027, 1159, 13, 29992, 7507, 29918, 12403, 13, 1753, 6055, 7295, 268, 13, 13, 1678, 2582, 29922, 2636, 13, 268, 13, 1678, 24612, 2592, 353, 657, 726, 877, 2744, 386, 2592, 1495, 13, 13, 1678, 502, 29918, 1949, 29922, 4830, 29918, 4537, 29898, 29896, 29900, 29929, 29929, 29897, 13, 1678, 2582, 29889, 4397, 29898, 375, 29918, 1949, 29897, 13, 259, 13, 1678, 502, 29918, 1949, 29922, 4830, 29918, 26095, 29898, 29896, 29900, 29929, 29929, 29889, 29929, 29947, 29892, 525, 3308, 29928, 1495, 13, 1678, 2582, 29889, 4397, 29898, 375, 29918, 1949, 29897, 13, 259, 13, 1678, 502, 29918, 1949, 29922, 4830, 29918, 7099, 3039, 29898, 29896, 29889, 29906, 29941, 29946, 29953, 29897, 13, 1678, 2582, 29889, 4397, 29898, 375, 29918, 1949, 29897, 13, 268, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29892, 1949, 1666, 29922, 29883, 1191, 279, 3664, 8232, 580, 13, 13, 1678, 736, 4050, 29918, 6886, 703, 11027, 29889, 1420, 613, 1404, 29922, 3784, 29918, 1792, 29892, 9902, 29922, 9902, 29892, 9716, 2592, 29922, 9716, 2592, 29892, 1333, 8232, 29922, 1761, 3664, 8232, 29892, 24671, 8009, 29922, 1949, 1666, 29897, 13, 13, 13, 29992, 5150, 4074, 2324, 29889, 13134, 11974, 3398, 29883, 29918, 14035, 1159, 13, 1753, 6939, 7295, 13, 1678, 9066, 353, 11117, 3916, 29899, 1542, 2396, 525, 6214, 29914, 29916, 29899, 1636, 29899, 689, 29899, 2271, 26716, 10827, 13, 268, 13, 1678, 775, 353, 2009, 29889, 5085, 29889, 657, 703, 401, 1159, 13, 13, 1678, 396, 433, 10203, 1099, 712, 409, 758, 841, 311, 2348, 690, 279, 831, 29901, 13, 1678, 10203, 1099, 9190, 2433, 29915, 13, 1678, 565, 525, 4622, 29915, 297, 4867, 29889, 8149, 7295, 13, 4706, 10203, 1099, 9190, 29922, 7924, 1839, 4622, 2033, 13, 13, 1678, 565, 451, 775, 29901, 13, 4706, 736, 376, 1576, 775, 471, 451, 4133, 470, 338, 451, 15579, 613, 29871, 29946, 29900, 29941, 13, 1678, 2346, 29918, 7529, 353, 11117, 629, 424, 29918, 1853, 2396, 525, 8921, 2133, 29918, 401, 742, 13, 462, 1678, 525, 401, 2396, 775, 29892, 13, 462, 1678, 525, 17886, 29918, 5338, 2396, 2009, 29889, 3188, 29918, 2271, 13, 462, 1678, 500, 13, 1678, 2346, 29918, 7529, 353, 7274, 29889, 12667, 29889, 2271, 12508, 29898, 1972, 29918, 7529, 29897, 13, 1678, 14523, 353, 7274, 29889, 2490, 29898, 13, 4706, 1857, 29918, 932, 29889, 2917, 3366, 4986, 29968, 1430, 29918, 15551, 12436, 13, 4706, 9066, 29922, 13662, 29892, 13, 4706, 848, 29922, 1972, 29918, 7529, 29892, 13, 4706, 4817, 7607, 3784, 29918, 932, 29889, 2917, 3366, 27205, 3919, 29918, 1367, 12436, 1857, 29918, 932, 29889, 2917, 3366, 27205, 3919, 29918, 1660, 22245, 29911, 3108, 511, 13, 1678, 13742, 3126, 580, 13, 13, 1678, 396, 3617, 18897, 322, 12725, 13, 1678, 565, 451, 14523, 29889, 657, 703, 6979, 29918, 1853, 29908, 1125, 13, 4706, 736, 376, 25807, 29884, 3016, 287, 5993, 1134, 29889, 10575, 367, 525, 29933, 799, 261, 4286, 613, 29871, 29946, 29900, 29941, 13, 1678, 2130, 29918, 6979, 353, 14523, 3366, 5943, 29918, 6979, 3108, 13, 1678, 1178, 29918, 6979, 353, 14523, 3366, 333, 29918, 6979, 3108, 13, 13, 1678, 4867, 1839, 333, 29918, 6979, 2033, 29922, 333, 29918, 6979, 13, 13, 1678, 396, 361, 451, 338, 29918, 5943, 29918, 6979, 29918, 3084, 29898, 5943, 29918, 6979, 29892, 2295, 3366, 790, 2853, 12436, 2295, 3366, 4645, 29918, 333, 3108, 1125, 13, 1678, 396, 1678, 736, 376, 6638, 5993, 338, 8340, 613, 29871, 29946, 29900, 29941, 13, 13, 1678, 396, 361, 451, 338, 29918, 333, 29918, 6979, 29918, 3084, 29898, 333, 29918, 6979, 29892, 2295, 3366, 790, 2853, 12436, 2295, 3366, 4645, 29918, 333, 12436, 405, 1164, 4741, 1125, 13, 1678, 396, 1678, 736, 376, 1367, 5993, 338, 8340, 613, 29871, 29946, 29900, 29941, 13, 13, 1678, 396, 13361, 2133, 4972, 9150, 29892, 679, 1404, 3888, 322, 6464, 1404, 13, 1678, 1404, 3888, 29918, 5327, 353, 7274, 29889, 657, 29898, 3784, 29918, 932, 29889, 2917, 3366, 11889, 11690, 29918, 15551, 12436, 13, 462, 462, 268, 9066, 3790, 29915, 25471, 2396, 285, 29915, 29933, 799, 261, 426, 5943, 29918, 6979, 10162, 7690, 3126, 580, 13, 13, 1678, 5412, 29918, 333, 353, 1404, 3888, 29918, 5327, 3366, 1491, 3108, 13, 1678, 1404, 29918, 5269, 353, 1404, 3888, 29918, 5327, 3366, 5269, 3108, 13, 1678, 1404, 29918, 978, 353, 1404, 3888, 29918, 5327, 3366, 29887, 5428, 29918, 978, 3108, 13, 13, 1678, 1404, 353, 4911, 29898, 13, 4706, 1178, 29918, 29922, 13092, 29918, 333, 29892, 1024, 29922, 1792, 29918, 978, 29892, 4876, 29922, 1792, 29918, 5269, 13, 1678, 1723, 13, 13, 1678, 565, 451, 4911, 29889, 657, 29898, 13092, 29918, 333, 1125, 13, 4706, 4911, 29889, 3258, 29898, 13092, 29918, 333, 29892, 1404, 29918, 978, 29892, 1404, 29918, 5269, 29897, 13, 13, 1678, 6464, 29918, 1792, 29898, 1792, 29897, 13, 259, 396, 330, 29889, 1792, 353, 1792, 13, 13, 1678, 4867, 29889, 7323, 877, 29918, 28041, 267, 742, 6213, 29897, 13, 13, 1678, 565, 10203, 1099, 9190, 29991, 543, 1115, 13, 4706, 736, 6684, 29898, 13573, 1099, 9190, 29897, 13, 1678, 1683, 29901, 13, 4706, 736, 6684, 29898, 2271, 29918, 1454, 703, 5150, 4074, 2324, 29889, 14592, 3377, 5783, 13, 13, 1753, 274, 1191, 279, 3664, 8232, 7295, 13, 1678, 396, 29907, 7921, 1869, 2216, 928, 6027, 13, 1678, 1051, 3664, 8232, 29922, 12958, 3032, 657, 29918, 12958, 29918, 1609, 2111, 261, 10900, 29898, 7320, 543, 7610, 6950, 1159, 13, 1678, 396, 1761, 3664, 8232, 29889, 4397, 29898, 12958, 3032, 657, 29918, 12958, 29918, 1609, 2111, 261, 10900, 29898, 7320, 543, 7610, 6950, 5783, 13, 1678, 954, 1666, 29922, 1761, 3664, 8232, 1839, 1949, 1666, 2033, 13, 1678, 1051, 3664, 8232, 29922, 1761, 3664, 8232, 1839, 1333, 8232, 2033, 13, 1678, 736, 1051, 3664, 8232, 29892, 1949, 1666, 13, 13, 2 ]
Graphy.py
rasmdc/Graphy
0
125467
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Sat Apr 11 17:47:37 2020 @author: Eriel """ from tkinter import * from matplotlib import * from PIL import Image, ImageTk def menu(): # Menu Window menu = Tk() menu.geometry('500x500') menu.title("Menu") menu.iconbitmap(r'graphy.ico') menu['bg'] = '#161616' # Image Header canvas = Canvas(menu, height = 244, width = 365, bg = '#161616' ) canvas.pack(pady= 20) wel_img = PhotoImage(file='...\src\img\welcome.png') canvas.create_image(0, 0, anchor = NW, image = wel_img) # Selection Frame btn_frame = Frame(menu, bg = '#161616') btn_frame.pack() graph_btn = PhotoImage(file = r"graph_btn.png") exit_btn = PhotoImage(file = r"exit_btn.png") btn = Button(btn_frame, image = graph_btn, command = graphy, bg = '#161616') btn.pack(pady = 10) btn = Button(btn_frame, image = exit_btn, bg = '#161616') btn.pack(pady = 10) menu.mainloop() # Runs menu in a loop def graphy(): # Graphy Window graph = Tk() graph.geometry('1500x500') graph.title("Graphy") graph.iconbitmap(r'graphy.ico') graph['bg'] = '#161616' def change(*args): print("running change") OPTIONS = [ "Linear", "Squared", "Cubic", "Squared root", "Cubic root", "Cardioid", "Lemniscate", "Spiral", "Roses" ] var = StringVar(graph) var.set("Select One") var.trace("w", change) down_menu = OptionMenu(graph, var, OPTIONS[0], OPTIONS[1], OPTIONS[2]) down_menu.pack() menu()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 30004, 13, 15945, 19451, 13, 20399, 373, 12178, 319, 558, 29871, 29896, 29896, 29871, 29896, 29955, 29901, 29946, 29955, 29901, 29941, 29955, 29871, 29906, 29900, 29906, 29900, 30004, 13, 30004, 13, 29992, 8921, 29901, 382, 12836, 30004, 13, 15945, 19451, 13, 3166, 18883, 1639, 1053, 334, 30004, 13, 3166, 22889, 1053, 334, 30004, 13, 3166, 349, 6227, 1053, 7084, 29892, 7084, 29911, 29895, 30004, 13, 30004, 13, 30004, 13, 1753, 6143, 7295, 30004, 13, 1678, 396, 20019, 18379, 30004, 13, 1678, 6143, 353, 323, 29895, 580, 6756, 13, 1678, 6143, 29889, 19156, 877, 29945, 29900, 29900, 29916, 29945, 29900, 29900, 1495, 6756, 13, 1678, 6143, 29889, 3257, 703, 6823, 1159, 30004, 13, 1678, 6143, 29889, 4144, 2966, 1958, 29898, 29878, 29915, 4262, 29891, 29889, 1417, 1495, 30004, 13, 1678, 6143, 1839, 16264, 2033, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 29915, 30004, 13, 1678, 6756, 13, 1678, 396, 7084, 19345, 30004, 13, 1678, 10508, 353, 1815, 4428, 29898, 6510, 29892, 3171, 353, 29871, 29906, 29946, 29946, 29892, 2920, 353, 29871, 29941, 29953, 29945, 29892, 25989, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 29915, 1723, 30004, 13, 1678, 10508, 29889, 4058, 29898, 29886, 3714, 29922, 29871, 29906, 29900, 8443, 13, 1678, 5476, 29918, 2492, 353, 1963, 3747, 2940, 29898, 1445, 2433, 856, 29905, 4351, 29905, 2492, 29905, 20466, 2763, 29889, 2732, 1495, 30004, 13, 1678, 10508, 29889, 3258, 29918, 3027, 29898, 29900, 29892, 29871, 29900, 29892, 17360, 353, 405, 29956, 29892, 29871, 1967, 353, 5476, 29918, 2492, 8443, 13, 1678, 6756, 13, 1678, 396, 27930, 12218, 30004, 13, 1678, 9503, 29918, 2557, 353, 12218, 29898, 6510, 29892, 25989, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 1495, 30004, 13, 1678, 9503, 29918, 2557, 29889, 4058, 26471, 13, 1678, 3983, 29918, 7290, 353, 1963, 3747, 2940, 29898, 1445, 353, 364, 29908, 4262, 29918, 7290, 29889, 2732, 1159, 30004, 13, 1678, 6876, 29918, 7290, 353, 1963, 3747, 2940, 29898, 1445, 353, 364, 29908, 13322, 29918, 7290, 29889, 2732, 1159, 30004, 13, 1678, 9503, 353, 11025, 29898, 7290, 29918, 2557, 29892, 1967, 353, 3983, 29918, 7290, 29892, 1899, 353, 3983, 29891, 29892, 25989, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 1495, 30004, 13, 1678, 9503, 29889, 4058, 29898, 29886, 3714, 353, 29871, 29896, 29900, 8443, 13, 1678, 9503, 353, 11025, 29898, 7290, 29918, 2557, 29892, 1967, 353, 6876, 29918, 7290, 29892, 25989, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 1495, 30004, 13, 1678, 9503, 29889, 4058, 29898, 29886, 3714, 353, 29871, 29896, 29900, 8443, 13, 1678, 6756, 13, 1678, 6143, 29889, 3396, 7888, 580, 396, 390, 6948, 6143, 297, 263, 2425, 30004, 13, 30004, 13, 1753, 3983, 29891, 7295, 30004, 13, 1678, 396, 12367, 29891, 18379, 30004, 13, 1678, 3983, 353, 323, 29895, 580, 6756, 13, 1678, 3983, 29889, 19156, 877, 29896, 29945, 29900, 29900, 29916, 29945, 29900, 29900, 1495, 6756, 13, 1678, 3983, 29889, 3257, 703, 9527, 29891, 1159, 30004, 13, 1678, 3983, 29889, 4144, 2966, 1958, 29898, 29878, 29915, 4262, 29891, 29889, 1417, 1495, 30004, 13, 1678, 3983, 1839, 16264, 2033, 353, 16321, 29896, 29953, 29896, 29953, 29896, 29953, 29915, 30004, 13, 1678, 6756, 13, 1678, 822, 1735, 10456, 5085, 1125, 30004, 13, 4706, 1596, 703, 21094, 1735, 1159, 30004, 13, 1678, 6756, 13, 1678, 6418, 29911, 27946, 353, 518, 30004, 13, 4706, 376, 12697, 15231, 13, 4706, 376, 29903, 339, 1965, 15231, 13, 4706, 376, 29907, 431, 293, 15231, 13, 4706, 376, 29903, 339, 1965, 3876, 15231, 13, 4706, 376, 29907, 431, 293, 3876, 15231, 13, 4706, 376, 13200, 601, 333, 15231, 13, 4706, 376, 29931, 331, 6994, 29883, 403, 15231, 13, 4706, 376, 5592, 19647, 15231, 13, 4706, 376, 29934, 15806, 19451, 13, 4706, 4514, 30004, 13, 1678, 6756, 13, 1678, 722, 353, 1714, 9037, 29898, 4262, 8443, 13, 1678, 722, 29889, 842, 703, 3549, 3118, 1159, 30004, 13, 1678, 722, 29889, 15003, 703, 29893, 613, 1735, 8443, 13, 1678, 6756, 13, 1678, 1623, 29918, 6510, 353, 10831, 6823, 29898, 4262, 29892, 722, 29892, 6418, 29911, 27946, 29961, 29900, 1402, 6418, 29911, 27946, 29961, 29896, 1402, 6418, 29911, 27946, 29961, 29906, 2314, 30004, 13, 1678, 1623, 29918, 6510, 29889, 4058, 26471, 13, 30004, 13, 6510, 580, 2 ]
test_phyton/pages/func.py
gergo1001/conduit
0
1606210
import random import string webpage_visible = False def random_email(): return "".join([random.choice(string.ascii_lowercase) for _ in range(8)]) + '@testemail.hu' def random_user(): return "".join([random.choice(string.ascii_letters) for _ in range(6)]) def random_pass(): return "".join([random.choice(string.ascii_lowercase) for _ in range(6)]) + "".join( [random.choice(string.ascii_uppercase) for _ in range(1)]) + "".join( [random.choice(string.digits) for _ in range(1)]) + '!' def random_title(): return "".join([random.choice(string.ascii_letters) for _ in range(10)]) def inputelement(driver, typeofelementpath, path): if typeofelementpath == 'xpath': return driver.find_element_by_xpath(path)
[ 1, 1053, 4036, 13, 5215, 1347, 13, 13, 2676, 3488, 29918, 12872, 353, 7700, 13, 13, 13, 1753, 4036, 29918, 5269, 7295, 13, 1678, 736, 376, 1642, 7122, 4197, 8172, 29889, 16957, 29898, 1807, 29889, 294, 18869, 29918, 13609, 4878, 29897, 363, 903, 297, 3464, 29898, 29947, 29897, 2314, 718, 18803, 1688, 5269, 29889, 6905, 29915, 13, 13, 13, 1753, 4036, 29918, 1792, 7295, 13, 1678, 736, 376, 1642, 7122, 4197, 8172, 29889, 16957, 29898, 1807, 29889, 294, 18869, 29918, 1026, 2153, 29897, 363, 903, 297, 3464, 29898, 29953, 29897, 2314, 13, 13, 13, 1753, 4036, 29918, 3364, 7295, 13, 1678, 736, 376, 1642, 7122, 4197, 8172, 29889, 16957, 29898, 1807, 29889, 294, 18869, 29918, 13609, 4878, 29897, 363, 903, 297, 3464, 29898, 29953, 29897, 2314, 718, 376, 1642, 7122, 29898, 13, 4706, 518, 8172, 29889, 16957, 29898, 1807, 29889, 294, 18869, 29918, 21064, 4878, 29897, 363, 903, 297, 3464, 29898, 29896, 29897, 2314, 718, 376, 1642, 7122, 29898, 13, 4706, 518, 8172, 29889, 16957, 29898, 1807, 29889, 7501, 1169, 29897, 363, 903, 297, 3464, 29898, 29896, 29897, 2314, 718, 525, 20714, 13, 13, 13, 1753, 4036, 29918, 3257, 7295, 13, 1678, 736, 376, 1642, 7122, 4197, 8172, 29889, 16957, 29898, 1807, 29889, 294, 18869, 29918, 1026, 2153, 29897, 363, 903, 297, 3464, 29898, 29896, 29900, 29897, 2314, 13, 13, 13, 1753, 1881, 5029, 29898, 9465, 29892, 20086, 5029, 2084, 29892, 2224, 1125, 13, 1678, 565, 20086, 5029, 2084, 1275, 525, 23635, 2396, 13, 4706, 736, 7156, 29889, 2886, 29918, 5029, 29918, 1609, 29918, 23635, 29898, 2084, 29897, 13, 2 ]
users/tests/test_models.py
City-of-Helsinki/apartment-application-service
1
126879
import pytest from django.core.exceptions import ValidationError from users.models import Profile from users.tests.factories import ProfileFactory @pytest.mark.django_db def test_profile_exist_after_user_is_deleted(): profile = ProfileFactory() profile.user.delete() assert Profile.objects.all().count() == 1 assert Profile.objects.first().user is None @pytest.mark.django_db def test_profile_national_identification_number_validation(): profile = ProfileFactory() # Invalid format profile.national_identification_number = "123456-1234" with pytest.raises(ValidationError, match="The number has an invalid format."): profile.clean() # Invalid checksum profile.national_identification_number = "131052-308U" with pytest.raises( ValidationError, match="The number's checksum or check digit is invalid." ): profile.clean() # Correct checksum profile.national_identification_number = "131052-308T" profile.save()
[ 1, 1053, 11451, 1688, 13, 3166, 9557, 29889, 3221, 29889, 11739, 29879, 1053, 15758, 362, 2392, 13, 13, 3166, 4160, 29889, 9794, 1053, 20802, 13, 3166, 4160, 29889, 21150, 29889, 17028, 3842, 1053, 20802, 5126, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 14095, 29918, 2585, 13, 1753, 1243, 29918, 10185, 29918, 28997, 29918, 7045, 29918, 1792, 29918, 275, 29918, 311, 22742, 7295, 13, 1678, 8722, 353, 20802, 5126, 580, 13, 13, 1678, 8722, 29889, 1792, 29889, 8143, 580, 13, 13, 1678, 4974, 20802, 29889, 12650, 29889, 497, 2141, 2798, 580, 1275, 29871, 29896, 13, 1678, 4974, 20802, 29889, 12650, 29889, 4102, 2141, 1792, 338, 6213, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 14095, 29918, 2585, 13, 1753, 1243, 29918, 10185, 29918, 29876, 1288, 29918, 1693, 2450, 29918, 4537, 29918, 18157, 7295, 13, 1678, 8722, 353, 20802, 5126, 580, 13, 13, 1678, 396, 21403, 3402, 13, 1678, 8722, 29889, 29876, 1288, 29918, 1693, 2450, 29918, 4537, 353, 376, 29896, 29906, 29941, 29946, 29945, 29953, 29899, 29896, 29906, 29941, 29946, 29908, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 19448, 2392, 29892, 1993, 543, 1576, 1353, 756, 385, 8340, 3402, 1213, 1125, 13, 4706, 8722, 29889, 14941, 580, 13, 13, 1678, 396, 21403, 1423, 2083, 13, 1678, 8722, 29889, 29876, 1288, 29918, 1693, 2450, 29918, 4537, 353, 376, 29896, 29941, 29896, 29900, 29945, 29906, 29899, 29941, 29900, 29947, 29965, 29908, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 13, 4706, 15758, 362, 2392, 29892, 1993, 543, 1576, 1353, 29915, 29879, 1423, 2083, 470, 1423, 13615, 338, 8340, 1213, 13, 268, 1125, 13, 4706, 8722, 29889, 14941, 580, 13, 13, 1678, 396, 28518, 1423, 2083, 13, 1678, 8722, 29889, 29876, 1288, 29918, 1693, 2450, 29918, 4537, 353, 376, 29896, 29941, 29896, 29900, 29945, 29906, 29899, 29941, 29900, 29947, 29911, 29908, 13, 1678, 8722, 29889, 7620, 580, 13, 2 ]
main.py
hashc/Toward_Reuse
24
156198
'''Train CIFAR10 with PyTorch.''' from __future__ import print_function import sys import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.backends.cudnn as cudnn import config as cf import torchvision import torchvision.transforms as transforms import os import argparse from models import * from utils import progress_bar import numpy as np parser = argparse.ArgumentParser(description='PyTorch CIFAR10 Training') parser.add_argument('--lr', default=0.1, type=float, help='learning rate') parser.add_argument('--batch_size', default=256, type=int, help='batch size') parser.add_argument('--dataset', default='cifar10', type=str, help='dataset = [cifar10, cifar100, fashion-mnist]') parser.add_argument('--model', default='lrunet', type=str, help='model = [lrunet, shufflenet, shufflenetv2, mobilenet, mobilenetv2]') parser.add_argument('--layer_reuse', default=8, type=int, help='layer reuse') parser.add_argument('--width_mult', default=1.0, type=float, help='width multiplier') parser.add_argument('--drop', default=0.5, type=float, help='applied dropout') parser.add_argument('--groups', default=3, type=int, help='The number of groups at group convolution at ShuffleNet') parser.add_argument('--resume_path', default='', type=str, help='Save data (.pth) of previous training') args = parser.parse_args() device = 'cuda' if torch.cuda.is_available() else 'cpu' best_acc = 0 # best test accuracy start_epoch = 0 # start from epoch 0 or last checkpoint epoch # Data print('==> Preparing data..') transform_train = transforms.Compose([ transforms.RandomCrop(32, padding=4), transforms.RandomRotation(degrees=10), transforms.RandomHorizontalFlip(), transforms.ToTensor(), # transforms.Normalize(cf.mean[args.dataset], cf.std[args.dataset]), ]) transform_test = transforms.Compose([ transforms.ToTensor(), # transforms.Normalize(cf.mean[args.dataset], cf.std[args.dataset]), ]) if(args.dataset == 'cifar10'): print("| Preparing CIFAR-10 dataset...") sys.stdout.write("| ") trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform_train) testset = torchvision.datasets.CIFAR10(root='./data', train=False, download=False, transform=transform_test) num_classes = 10 init_ch = 3 # Number of channels for the first conv layer elif(args.dataset == 'cifar100'): print("| Preparing CIFAR-100 dataset...") sys.stdout.write("| ") trainset = torchvision.datasets.CIFAR100(root='./data', train=True, download=True, transform=transform_train) testset = torchvision.datasets.CIFAR100(root='./data', train=False, download=False, transform=transform_test) num_classes = 100 init_ch = 3 # Number of channels for the first conv layer elif(args.dataset == 'fashionmnist'): print("| Preparing FashionMNIST dataset...") sys.stdout.write("| ") trainset = torchvision.datasets.FashionMNIST(root='./data', train=True, download=True, transform=transform_train) testset = torchvision.datasets.FashionMNIST(root='./data', train=False, download=True, transform=transform_test) num_classes = 10 init_ch = 1 # Number of channels for the first conv layer trainloader = torch.utils.data.DataLoader(trainset, batch_size=args.batch_size, shuffle=True, num_workers=2) testloader = torch.utils.data.DataLoader(testset, batch_size=100, shuffle=False, num_workers=2) # Model print('==> Building model..') if args.model == 'lrunet': net = LruNet(num_classes, args.width_mult, args.layer_reuse, args.drop, init_ch) elif args.model == 'mobilenet': net = MobileNet(num_classes, args.width_mult, init_ch) elif args.model == 'mobilenetv2': net = MobileNetV2(num_classes, args.width_mult, init_ch) elif args.model == 'shufflenet': net = ShuffleNet(num_classes, args.width_mult, args.groups, init_ch) elif args.model == 'shufflenetv2': net = ShuffleNetV2(num_classes, args.width_mult, init_ch) net = net.to(device) if device == 'cuda': net = torch.nn.DataParallel(net) cudnn.benchmark = True print(net) conv_params = 0 for key in net.modules(): if (isinstance(key, nn.Conv2d) | isinstance(key, nn.Linear)): #print(key) conv_params += sum(p.numel() for p in key.parameters() if p.requires_grad) print("Total number of convolution parameters: ", conv_params) pytorch_total_params = sum(p.numel() for p in net.parameters() if p.requires_grad) print("Total number of trainable parameters: ", pytorch_total_params) if args.resume_path: # Load checkpoint. print('==> Resuming from checkpoint..') checkpoint = torch.load(args.resume_path) net.load_state_dict(checkpoint['net']) best_acc = checkpoint['acc'] start_epoch = checkpoint['epoch'] criterion = nn.CrossEntropyLoss() optimizer = optim.SGD(net.parameters(), lr=args.lr, momentum=0.9, weight_decay=5e-4) # Training def train(epoch): print('Epoch: %d' % epoch) net.train() train_loss = 0 correct = 0 total = 0 for batch_idx, (inputs, targets) in enumerate(trainloader): inputs, targets = inputs.to(device), targets.to(device) optimizer.zero_grad() outputs = net(inputs) loss = criterion(outputs, targets) loss.backward() optimizer.step() train_loss += loss.item() _, predicted = outputs.max(1) total += targets.size(0) correct += predicted.eq(targets).sum().item() progress_bar(batch_idx, len(trainloader), 'Loss: %.3f | Acc: %.3f%% (%d/%d)' % (train_loss/(batch_idx+1), 100.*correct/total, correct, total)) def test(epoch): global best_acc net.eval() test_loss = 0 correct = 0 total = 0 with torch.no_grad(): for batch_idx, (inputs, targets) in enumerate(testloader): inputs, targets = inputs.to(device), targets.to(device) outputs = net(inputs) loss = criterion(outputs, targets) test_loss += loss.item() _, predicted = outputs.max(1) total += targets.size(0) correct += predicted.eq(targets).sum().item() progress_bar(batch_idx, len(testloader), 'Loss: %.3f | Acc: %.3f%% (%d/%d)' % (test_loss/(batch_idx+1), 100.*correct/total, correct, total)) # Save checkpoint. acc = 100.*correct/total if acc > best_acc: print('Saving..') state = { 'net': net.state_dict(), 'acc': acc, 'epoch': epoch, } if not os.path.isdir('checkpoint'): os.mkdir('checkpoint') torch.save(state, './checkpoint/ckpt.t7') best_acc = acc for epoch in range(start_epoch, start_epoch+275): train(epoch) test(epoch)
[ 1, 14550, 5323, 262, 315, 6545, 1718, 29896, 29900, 411, 10772, 29911, 25350, 29889, 12008, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 10876, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 20640, 408, 5994, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 5215, 4842, 305, 29889, 1627, 1975, 29889, 29883, 566, 15755, 408, 274, 566, 15755, 13, 5215, 2295, 408, 274, 29888, 13, 13, 5215, 4842, 305, 4924, 13, 5215, 4842, 305, 4924, 29889, 9067, 29879, 408, 4327, 29879, 13, 13, 5215, 2897, 13, 5215, 1852, 5510, 13, 13, 3166, 4733, 1053, 334, 13, 3166, 3667, 29879, 1053, 6728, 29918, 1646, 13, 5215, 12655, 408, 7442, 13, 13, 13, 16680, 353, 1852, 5510, 29889, 15730, 11726, 29898, 8216, 2433, 19737, 29911, 25350, 315, 6545, 1718, 29896, 29900, 26101, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 29212, 742, 2322, 29922, 29900, 29889, 29896, 29892, 1134, 29922, 7411, 29892, 1371, 2433, 21891, 6554, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 16175, 29918, 2311, 742, 2322, 29922, 29906, 29945, 29953, 29892, 1134, 29922, 524, 29892, 1371, 2433, 16175, 2159, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 24713, 742, 2322, 2433, 29883, 361, 279, 29896, 29900, 742, 1134, 29922, 710, 29892, 1371, 2433, 24713, 353, 518, 29883, 361, 279, 29896, 29900, 29892, 274, 361, 279, 29896, 29900, 29900, 29892, 13460, 29899, 23521, 391, 29962, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 4299, 742, 2322, 2433, 29880, 3389, 300, 742, 1134, 29922, 710, 29892, 1371, 2433, 4299, 353, 518, 29880, 3389, 300, 29892, 528, 3096, 2435, 300, 29892, 528, 3096, 2435, 300, 29894, 29906, 29892, 27227, 264, 300, 29892, 27227, 264, 300, 29894, 29906, 29962, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 13148, 29918, 276, 1509, 742, 2322, 29922, 29947, 29892, 1134, 29922, 524, 29892, 1371, 2433, 13148, 24270, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 2103, 29918, 4713, 742, 2322, 29922, 29896, 29889, 29900, 29892, 1134, 29922, 7411, 29892, 1371, 2433, 2103, 6674, 4926, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 8865, 742, 2322, 29922, 29900, 29889, 29945, 29892, 1134, 29922, 7411, 29892, 1371, 2433, 932, 2957, 5768, 449, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 13155, 742, 2322, 29922, 29941, 29892, 1134, 29922, 524, 29892, 1371, 2433, 1576, 1353, 310, 6471, 472, 2318, 26851, 472, 1383, 21897, 6779, 1495, 13, 16680, 29889, 1202, 29918, 23516, 877, 489, 690, 2017, 29918, 2084, 742, 2322, 2433, 742, 1134, 29922, 710, 29892, 1371, 2433, 11371, 848, 14544, 29886, 386, 29897, 310, 3517, 6694, 1495, 13, 5085, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 10141, 353, 525, 29883, 6191, 29915, 565, 4842, 305, 29889, 29883, 6191, 29889, 275, 29918, 16515, 580, 1683, 525, 21970, 29915, 13, 13318, 29918, 5753, 353, 29871, 29900, 29871, 396, 1900, 1243, 13600, 13, 2962, 29918, 1022, 2878, 353, 29871, 29900, 29871, 396, 1369, 515, 21502, 305, 29871, 29900, 470, 1833, 1423, 3149, 21502, 305, 13, 13, 29937, 3630, 13, 2158, 877, 1360, 29958, 4721, 862, 292, 848, 636, 1495, 13, 9067, 29918, 14968, 353, 4327, 29879, 29889, 1523, 4220, 4197, 13, 1678, 4327, 29879, 29889, 17875, 29907, 1336, 29898, 29941, 29906, 29892, 7164, 29922, 29946, 511, 13, 1678, 4327, 29879, 29889, 17875, 21281, 362, 29898, 311, 7979, 267, 29922, 29896, 29900, 511, 13, 1678, 4327, 29879, 29889, 17875, 24932, 29943, 3466, 3285, 13, 1678, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 1678, 396, 4327, 29879, 29889, 19077, 675, 29898, 6854, 29889, 12676, 29961, 5085, 29889, 24713, 1402, 274, 29888, 29889, 4172, 29961, 5085, 29889, 24713, 11724, 13, 2314, 13, 13, 9067, 29918, 1688, 353, 4327, 29879, 29889, 1523, 4220, 4197, 13, 1678, 4327, 29879, 29889, 1762, 29911, 6073, 3285, 13, 1678, 396, 4327, 29879, 29889, 19077, 675, 29898, 6854, 29889, 12676, 29961, 5085, 29889, 24713, 1402, 274, 29888, 29889, 4172, 29961, 5085, 29889, 24713, 11724, 13, 2314, 13, 13, 361, 29898, 5085, 29889, 24713, 1275, 525, 29883, 361, 279, 29896, 29900, 29374, 13, 1678, 1596, 703, 29989, 4721, 862, 292, 315, 6545, 1718, 29899, 29896, 29900, 8783, 856, 1159, 13, 1678, 10876, 29889, 25393, 29889, 3539, 703, 29989, 16521, 13, 1678, 7945, 842, 1678, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29907, 6545, 1718, 29896, 29900, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 5574, 29892, 5142, 29922, 5574, 29892, 4327, 29922, 9067, 29918, 14968, 29897, 13, 1678, 1243, 842, 268, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29907, 6545, 1718, 29896, 29900, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 8824, 29892, 5142, 29922, 8824, 29892, 4327, 29922, 9067, 29918, 1688, 29897, 13, 1678, 954, 29918, 13203, 353, 29871, 29896, 29900, 13, 1678, 2069, 29918, 305, 268, 353, 29871, 29941, 396, 9681, 310, 18196, 363, 278, 937, 7602, 7546, 13, 23681, 29898, 5085, 29889, 24713, 1275, 525, 29883, 361, 279, 29896, 29900, 29900, 29374, 13, 1678, 1596, 703, 29989, 4721, 862, 292, 315, 6545, 1718, 29899, 29896, 29900, 29900, 8783, 856, 1159, 13, 1678, 10876, 29889, 25393, 29889, 3539, 703, 29989, 16521, 13, 1678, 7945, 842, 1678, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29907, 6545, 1718, 29896, 29900, 29900, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 5574, 29892, 5142, 29922, 5574, 29892, 4327, 29922, 9067, 29918, 14968, 29897, 13, 1678, 1243, 842, 268, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29907, 6545, 1718, 29896, 29900, 29900, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 8824, 29892, 5142, 29922, 8824, 29892, 4327, 29922, 9067, 29918, 1688, 29897, 13, 1678, 954, 29918, 13203, 353, 29871, 29896, 29900, 29900, 13, 1678, 2069, 29918, 305, 268, 353, 29871, 29941, 396, 9681, 310, 18196, 363, 278, 937, 7602, 7546, 13, 23681, 29898, 5085, 29889, 24713, 1275, 525, 29888, 10904, 23521, 391, 29374, 13, 1678, 1596, 703, 29989, 4721, 862, 292, 383, 10904, 29924, 29940, 9047, 8783, 856, 1159, 13, 1678, 10876, 29889, 25393, 29889, 3539, 703, 29989, 16521, 13, 1678, 7945, 842, 1678, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29943, 10904, 29924, 29940, 9047, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 5574, 29892, 5142, 29922, 5574, 29892, 4327, 29922, 9067, 29918, 14968, 29897, 13, 1678, 1243, 842, 268, 353, 4842, 305, 4924, 29889, 14538, 1691, 29889, 29943, 10904, 29924, 29940, 9047, 29898, 4632, 2433, 6904, 1272, 742, 7945, 29922, 8824, 29892, 5142, 29922, 5574, 29892, 4327, 29922, 9067, 29918, 1688, 29897, 13, 1678, 954, 29918, 13203, 353, 29871, 29896, 29900, 13, 1678, 2069, 29918, 305, 268, 353, 29871, 29896, 396, 9681, 310, 18196, 363, 278, 937, 7602, 7546, 13, 13, 14968, 12657, 353, 4842, 305, 29889, 13239, 29889, 1272, 29889, 1469, 10036, 29898, 14968, 842, 29892, 9853, 29918, 2311, 29922, 5085, 29889, 16175, 29918, 2311, 29892, 528, 21897, 29922, 5574, 29892, 954, 29918, 1287, 414, 29922, 29906, 29897, 13, 1688, 12657, 353, 4842, 305, 29889, 13239, 29889, 1272, 29889, 1469, 10036, 29898, 1688, 842, 29892, 9853, 29918, 2311, 29922, 29896, 29900, 29900, 29892, 528, 21897, 29922, 8824, 29892, 954, 29918, 1287, 414, 29922, 29906, 29897, 13, 13, 29937, 8125, 13, 2158, 877, 1360, 29958, 17166, 1904, 636, 1495, 13, 361, 6389, 29889, 4299, 1275, 525, 29880, 3389, 300, 2396, 13, 1678, 7787, 353, 365, 582, 6779, 29898, 1949, 29918, 13203, 29892, 6389, 29889, 2103, 29918, 4713, 29892, 6389, 29889, 13148, 29918, 276, 1509, 29892, 6389, 29889, 8865, 29892, 2069, 29918, 305, 29897, 13, 23681, 6389, 29889, 4299, 1275, 525, 29885, 12213, 264, 300, 2396, 13, 1678, 7787, 353, 21600, 6779, 29898, 1949, 29918, 13203, 29892, 6389, 29889, 2103, 29918, 4713, 29892, 2069, 29918, 305, 29897, 13, 23681, 6389, 29889, 4299, 1275, 525, 29885, 12213, 264, 300, 29894, 29906, 2396, 13, 1678, 7787, 353, 21600, 6779, 29963, 29906, 29898, 1949, 29918, 13203, 29892, 6389, 29889, 2103, 29918, 4713, 29892, 2069, 29918, 305, 29897, 13, 23681, 6389, 29889, 4299, 1275, 525, 845, 3096, 2435, 300, 2396, 13, 1678, 7787, 353, 1383, 21897, 6779, 29898, 1949, 29918, 13203, 29892, 6389, 29889, 2103, 29918, 4713, 29892, 6389, 29889, 13155, 29892, 2069, 29918, 305, 29897, 13, 23681, 6389, 29889, 4299, 1275, 525, 845, 3096, 2435, 300, 29894, 29906, 2396, 13, 1678, 7787, 353, 1383, 21897, 6779, 29963, 29906, 29898, 1949, 29918, 13203, 29892, 6389, 29889, 2103, 29918, 4713, 29892, 2069, 29918, 305, 29897, 13, 1212, 353, 7787, 29889, 517, 29898, 10141, 29897, 13, 13, 361, 4742, 1275, 525, 29883, 6191, 2396, 13, 1678, 7787, 353, 4842, 305, 29889, 15755, 29889, 1469, 2177, 6553, 29898, 1212, 29897, 13, 1678, 274, 566, 15755, 29889, 1785, 16580, 353, 5852, 13, 2158, 29898, 1212, 29897, 13, 13, 20580, 29918, 7529, 353, 29871, 29900, 13, 1454, 1820, 297, 7787, 29889, 7576, 7295, 13, 1678, 565, 313, 275, 8758, 29898, 1989, 29892, 302, 29876, 29889, 1168, 29894, 29906, 29881, 29897, 891, 338, 8758, 29898, 1989, 29892, 302, 29876, 29889, 12697, 22164, 13, 4706, 396, 2158, 29898, 1989, 29897, 13, 4706, 7602, 29918, 7529, 4619, 2533, 29898, 29886, 29889, 1949, 295, 580, 363, 282, 297, 1820, 29889, 16744, 580, 565, 282, 29889, 276, 339, 2658, 29918, 5105, 29897, 13, 2158, 703, 11536, 1353, 310, 26851, 4128, 29901, 9162, 7602, 29918, 7529, 29897, 13, 13, 2272, 7345, 305, 29918, 7827, 29918, 7529, 353, 2533, 29898, 29886, 29889, 1949, 295, 580, 363, 282, 297, 7787, 29889, 16744, 580, 565, 282, 29889, 276, 339, 2658, 29918, 5105, 29897, 13, 2158, 703, 11536, 1353, 310, 7945, 519, 4128, 29901, 9162, 282, 3637, 25350, 29918, 7827, 29918, 7529, 29897, 13, 13, 361, 6389, 29889, 690, 2017, 29918, 2084, 29901, 13, 1678, 396, 16012, 1423, 3149, 29889, 13, 1678, 1596, 877, 1360, 29958, 2538, 9929, 515, 1423, 3149, 636, 1495, 13, 1678, 1423, 3149, 353, 4842, 305, 29889, 1359, 29898, 5085, 29889, 690, 2017, 29918, 2084, 29897, 13, 1678, 7787, 29889, 1359, 29918, 3859, 29918, 8977, 29898, 3198, 3149, 1839, 1212, 11287, 13, 1678, 1900, 29918, 5753, 353, 1423, 3149, 1839, 5753, 2033, 13, 1678, 1369, 29918, 1022, 2878, 353, 1423, 3149, 1839, 1022, 2878, 2033, 13, 13, 29883, 5385, 291, 353, 302, 29876, 29889, 29907, 2124, 5292, 14441, 29931, 2209, 580, 13, 20640, 3950, 353, 5994, 29889, 26016, 29928, 29898, 1212, 29889, 16744, 3285, 301, 29878, 29922, 5085, 29889, 29212, 29892, 19399, 29922, 29900, 29889, 29929, 29892, 7688, 29918, 7099, 388, 29922, 29945, 29872, 29899, 29946, 29897, 13, 13, 13, 29937, 26101, 13, 1753, 7945, 29898, 1022, 2878, 1125, 13, 1678, 1596, 877, 29923, 1129, 305, 29901, 1273, 29881, 29915, 1273, 21502, 305, 29897, 13, 1678, 7787, 29889, 14968, 580, 13, 1678, 7945, 29918, 6758, 353, 29871, 29900, 13, 1678, 1959, 353, 29871, 29900, 13, 1678, 3001, 353, 29871, 29900, 13, 1678, 363, 9853, 29918, 13140, 29892, 313, 2080, 29879, 29892, 22525, 29897, 297, 26985, 29898, 14968, 12657, 1125, 13, 4706, 10970, 29892, 22525, 353, 10970, 29889, 517, 29898, 10141, 511, 22525, 29889, 517, 29898, 10141, 29897, 13, 4706, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 4706, 14391, 353, 7787, 29898, 2080, 29879, 29897, 13, 4706, 6410, 353, 28770, 291, 29898, 4905, 29879, 29892, 22525, 29897, 13, 4706, 6410, 29889, 1627, 1328, 580, 13, 4706, 5994, 3950, 29889, 10568, 580, 13, 13, 4706, 7945, 29918, 6758, 4619, 6410, 29889, 667, 580, 13, 4706, 17117, 25383, 353, 14391, 29889, 3317, 29898, 29896, 29897, 13, 4706, 3001, 4619, 22525, 29889, 2311, 29898, 29900, 29897, 13, 4706, 1959, 4619, 25383, 29889, 1837, 29898, 5182, 29879, 467, 2083, 2141, 667, 580, 13, 13, 4706, 6728, 29918, 1646, 29898, 16175, 29918, 13140, 29892, 7431, 29898, 14968, 12657, 511, 525, 29931, 2209, 29901, 18695, 29941, 29888, 891, 4831, 29901, 18695, 29941, 29888, 7686, 313, 29995, 29881, 22584, 29881, 16029, 13, 9651, 1273, 313, 14968, 29918, 6758, 14571, 16175, 29918, 13140, 29974, 29896, 511, 29871, 29896, 29900, 29900, 5575, 15728, 29914, 7827, 29892, 1959, 29892, 3001, 876, 13, 13, 1753, 1243, 29898, 1022, 2878, 1125, 13, 1678, 5534, 1900, 29918, 5753, 13, 1678, 7787, 29889, 14513, 580, 13, 1678, 1243, 29918, 6758, 353, 29871, 29900, 13, 1678, 1959, 353, 29871, 29900, 13, 1678, 3001, 353, 29871, 29900, 13, 1678, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 4706, 363, 9853, 29918, 13140, 29892, 313, 2080, 29879, 29892, 22525, 29897, 297, 26985, 29898, 1688, 12657, 1125, 13, 9651, 10970, 29892, 22525, 353, 10970, 29889, 517, 29898, 10141, 511, 22525, 29889, 517, 29898, 10141, 29897, 13, 9651, 14391, 353, 7787, 29898, 2080, 29879, 29897, 13, 9651, 6410, 353, 28770, 291, 29898, 4905, 29879, 29892, 22525, 29897, 13, 13, 9651, 1243, 29918, 6758, 4619, 6410, 29889, 667, 580, 13, 9651, 17117, 25383, 353, 14391, 29889, 3317, 29898, 29896, 29897, 13, 9651, 3001, 4619, 22525, 29889, 2311, 29898, 29900, 29897, 13, 9651, 1959, 4619, 25383, 29889, 1837, 29898, 5182, 29879, 467, 2083, 2141, 667, 580, 13, 13, 9651, 6728, 29918, 1646, 29898, 16175, 29918, 13140, 29892, 7431, 29898, 1688, 12657, 511, 525, 29931, 2209, 29901, 18695, 29941, 29888, 891, 4831, 29901, 18695, 29941, 29888, 7686, 313, 29995, 29881, 22584, 29881, 16029, 13, 18884, 1273, 313, 1688, 29918, 6758, 14571, 16175, 29918, 13140, 29974, 29896, 511, 29871, 29896, 29900, 29900, 5575, 15728, 29914, 7827, 29892, 1959, 29892, 3001, 876, 13, 13, 1678, 396, 16913, 1423, 3149, 29889, 13, 1678, 1035, 353, 29871, 29896, 29900, 29900, 5575, 15728, 29914, 7827, 13, 1678, 565, 1035, 1405, 1900, 29918, 5753, 29901, 13, 4706, 1596, 877, 29903, 5555, 636, 1495, 13, 4706, 2106, 353, 426, 13, 9651, 525, 1212, 2396, 7787, 29889, 3859, 29918, 8977, 3285, 13, 9651, 525, 5753, 2396, 1035, 29892, 13, 9651, 525, 1022, 2878, 2396, 21502, 305, 29892, 13, 4706, 500, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 3972, 877, 3198, 3149, 29374, 13, 9651, 2897, 29889, 11256, 3972, 877, 3198, 3149, 1495, 13, 4706, 4842, 305, 29889, 7620, 29898, 3859, 29892, 19283, 3198, 3149, 29914, 384, 415, 29889, 29873, 29955, 1495, 13, 4706, 1900, 29918, 5753, 353, 1035, 13, 13, 13, 1454, 21502, 305, 297, 3464, 29898, 2962, 29918, 1022, 2878, 29892, 1369, 29918, 1022, 2878, 29974, 29906, 29955, 29945, 1125, 13, 1678, 7945, 29898, 1022, 2878, 29897, 13, 1678, 1243, 29898, 1022, 2878, 29897, 13, 2 ]
tests/test_no_inputenc.py
vikorbit/PyLaTeX
4
114398
<filename>tests/test_no_inputenc.py # -*- coding: utf-8 -*- r"""A test to make sure the document compiles with inputenc set to `None`.""" from pylatex.base_classes import Arguments from pylatex import Document doc = Document('no_inputenc', inputenc=None) doc.append('test text') # Make sure inputenc isn't used assert not any([p.arguments == Arguments('inputenc') for p in doc.packages]) doc.generate_pdf(clean=True, clean_tex=False, silent=False)
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 1217, 29918, 2080, 3977, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29878, 15945, 29908, 29909, 1243, 304, 1207, 1854, 278, 1842, 752, 5475, 411, 1881, 3977, 731, 304, 421, 8516, 29952, 1213, 15945, 13, 13, 3166, 282, 2904, 403, 29916, 29889, 3188, 29918, 13203, 1053, 11842, 9331, 13, 3166, 282, 2904, 403, 29916, 1053, 10854, 13, 13, 1514, 353, 10854, 877, 1217, 29918, 2080, 3977, 742, 1881, 3977, 29922, 8516, 29897, 13, 1514, 29889, 4397, 877, 1688, 1426, 1495, 13, 13, 29937, 8561, 1854, 1881, 3977, 3508, 29915, 29873, 1304, 13, 9294, 451, 738, 4197, 29886, 29889, 25699, 1275, 11842, 9331, 877, 2080, 3977, 1495, 363, 282, 297, 1574, 29889, 8318, 2314, 13, 13, 1514, 29889, 17158, 29918, 5140, 29898, 14941, 29922, 5574, 29892, 5941, 29918, 4776, 29922, 8824, 29892, 17436, 29922, 8824, 29897, 13, 2 ]
calculator.py
rupen4678/botique_management_system
0
5980
<reponame>rupen4678/botique_management_system from tkinter import * import random import time from PIL import Image from datetime import datetime from tinydb import * import os import pickle #from database1 import * from random import randint root = Tk() root.geometry("1600x800+0+0") root.title("Suman_dai_ko_DHOKAN") root.configure(bg="goldenrod4") text_Input = StringVar() operator ="" yes ="" no="" Tops = Frame(root, width=1600 ,height=50,bg="goldenrod4", relief=RIDGE) Tops.pack(side=TOP) f1 = Frame(root, width = 800 ,height=500,bg="goldenrod4",relief=SUNKEN) f1.pack(side=LEFT) f2 = Frame(root, width = 300,height = 700,bg="dark slate blue",relief=SUNKEN) f2.pack(side=RIGHT) #f3= Frame(root,width=1600,height=300,fg="blue", bg="powder blue", relief=SUNKEN).pack(side=Bottom) #==========================================================Time======================================= localtime=time.asctime(time.localtime(time.time())) #datetime=Label(Tops,font("arial",20,"bold"),text=nowTime,bd=10 ,bg="black", #fg="white", anchor="w").pack() #====================================debugged======================== shirt = IntVar() pant = IntVar() sale = IntVar() buy = IntVar() deposite = IntVar() withdraw = IntVar() coat = IntVar() order = IntVar() total = IntVar() out = IntVar() before = IntVar() #order before the 60 stock = IntVar() delivery = IntVar() #########################main_gate###################### def _calculation(): shirt_mm = shirt.get() pant_mm = pant.get() sale_mm = sale.get() buy_mm = buy.get() deposite_mm = deposite.get() withdraw_mm = withdraw.get() coat_mm = coat.get() order_mm = order.get() total_mm = total.get() time = datetime.now() day = time.day month = time.month hour = time.hour second = time.second year = time.year minute = time.minute #setting the filename using the loop #file = open("1{}".format()) '''for i in range(5): if os.path.isfile(i): pass else: file = open("{}.txt".format(i+1), "w+") created with name {}".format(file))''' #creating the filenames with append =1 if the name already existed file_name = "r.txt" if os.path.isfile(file_name): expand = 1 while True: expand += 1 new_file_name = file_name.split(".txt")[0] + str(expand) + ".txt" if os.path.isfile(new_file_name): #if the newfilename exists print("using the file {}".format(new_file_name)) #file = open("{}".format(new_file_name), "w+") continue else: file_name = open(new_file_name, "w+") print("creating the file {}".format(file_name)) #file = open("{}".format(file_name), "w+") break file_name = "fil.txt" file = open("{}".format(file_name),"w+") totalx = shirt_mm+pant_mm+sale_mm+buy_mm+deposite_mm+withdraw_mm+coat_mm+order_mm file.write("Total:-{}".format(totalx)) file.write("shirt:-{}".format(shirt_mm)) file.write("pant_mm:-{}".format(pant_mm)) file.write("sale_mm:-{}".format(sale_mm)) file.write("buy_mm:-{}".format(buy_mm)) file.write("deposite_mm:-{}".format(deposite_mm)) file.write("withdraw_mm:-{}".format(withdraw_mm)) file.write("coat:-{}".format(coat_mm)) file.write("order:-{}".format(order_mm)) reading = file.readlines() file.close() #after wards set the total from here total.set #++++++++++++++++++++++++++++++Varibales_inset+++++++++++++++++++++++++++++++++ order_bef = IntVar() stock_full = IntVar() shrting = IntVar() pant = IntVar() sari = IntVar() order_info = IntVar() delivery_report = IntVar() daily_info = IntVar() sales = IntVar() buy = IntVar() total_bank = IntVar() bank_deposite = IntVar() bank_withdraw = IntVar() due_amount = IntVar() order_info = IntVar() daily_cash = IntVar() cus_name = IntVar() cus_no = IntVar() employee = IntVar() ###############################class of algoriths######################### class __main(): def __init__(self): self.order = order def __order_info(self): self.now = datetime() self.hour = now.hour self.minute = now.minute self.second = now.second self.year = now.year self.month = now.month self.day = now.day self.record_time = record_time if self.hour == self.record_timeD: print("the time for the product is actually %s left" %(self.hour-self.record_timeD)) #++++++++++++++++++++++++++++++++++++++++tinydb example++++++++++++++++++++++ #db = TinyDB("/databse/d4ta.json") #db.insert({"cus_number":"98938232", "cus_name":"rupen"}) #def no_y(): # lis = db.all() ################Info=============== lblInfo = Label(Tops, font=("arial",60, "italic bold"),text="Botique Management Systewm",fg="white", bg="dark slate blue", bd=10, anchor="w", relief=RIDGE) lblInfo.pack() lblInfo = Label(Tops, font=("arial",30, "bold"),text=localtime,fg="white",bg="black", bd=10, anchor="w", relief=RIDGE) lblInfo.pack() #===========================================================Calculator================================== """def current_dir(): import os import sys DIR = os.getcwd() print(DIR) lblInfo = Label(Tops, font=("arial",60, "italic"),text=current_dir,fg="black",bg="powder blue",bd=10, anchor="W") lblInfo.pack() #DIR = dir #return dir """ #randomBtn=Button(f1,pady=16,padx=16,bd=8,bg="powder blue", text="C_dir", command=lambda: current_dir(dir)).pack(side=TOP) def btnClick(numbers): global operator operator = operator + str(numbers) text_Input.set(operator) def btnClearDisplay(): global operator operator="" text_Input.set("") def btnEqualsInput(): global operator sumup=str(eval(operator)) text_Input.set(sumup) operator="" def bill_entry(): global bill_in global bill_out bill_out = "" bill_in = "" def rupen(): global rupen rupen = rupen ronley = StringVar() '''def malware_activate(): global cmd_active if "rupen" in cmd_active: if "rupen" in cmd_active[1]: if "ronley" in cmd_active[2]:''' #==============================another windows about me===================== def ano_win1(): win1 = Toplevel() #this is going to be the window in which there is nothing in the function #of the system on the support in teh main loop #there is no limit in the system of teh win1.title("this is the owner window:") win1.geometry("1600x800+0+0") #win1.configure(bg="silver") my_info = Frame(win1, width=600, height=700,bg="RoyalBlue4",relief=GROOVE) my_info.pack(side=LEFT) customer_info = Frame(win1, width=600, height=500,bg="RoyalBlue4", relief=GROOVE) customer_info.pack(side=RIGHT) others_info = Frame(win1, width=100, height=100,bg="RoyalBlue4",relief=GROOVE) others_info.pack(side=BOTTOM) all_info = Frame(win1, width=50, height=50,bg="RoyalBlue4",relief=RAISED) all_info.pack() lblname=Label(my_info,font=("arial",20,"italic"),text="<NAME>",bg="powder blue", fg="green", bd=10, relief=SUNKEN).pack(side=TOP) lblpro=Label(my_info,font=("arial", 20,"bold"),text="Software Engineer",bg="powder blue", fg="green",bd=10, relief=RAISED).pack() ima = StringVar() imageloc=Entry(win1,font=("arial",16,"italic"),bg="black",fg="white",bd=5,insertwidth=1,relief=GROOVE,textvariable=ima).pack() imageButt=Button(win1,font=("arial",20, "bold"),bd=5,bg="white",fg="white",command= lambda: _image(image)).pack() '''def _image(image): image = image.set(imageloc) return image #image = Image.open("/root/Desktop/Desktop/anonymous/5.png") imae = Label(win1,font=("arial", 20,"italic"),width=300, height=168,bg="black",fg="white", text=image,relief=FLAT).pack() win1.mainloop()''' #=============================getting all the infos ======================== def _price_inputs(): win2 = Toplevel() win2.title("This is going to the section for the price inputs") win2.geometry("1600x800") framex = Frame(win2,width=1600,bg="RoyalBlue4",height=100,relief=GROOVE).pack(side=TOP) frame1 = Frame(win2,width=775, height=750,bg="white", relief=SUNKEN).pack() frame2 = Frame(win2, width=775,height=750,bg="black", relief=FLAT).pack() #==++++===========================title============================= llb1 = Label(framex,font=("arial", 20,"italic"),bg="powder blue",fg="green",text="INPUT THE PRICES",relief=GROOVE).pack() win2.mainloop() ###########################sending emails############################ def __send_email(): '''import smtplib gmail = smtplib.SMTP("smtp.gmail.com", 587) gmail.starttls() _file = open("/root/Desktop/Desktop/python/") gmail.login("username", "password") msg = "YOUR MESSAGE" gmail.sendmail("your email adress", "the") gmail.quit()''' dialog = Tk() dialog.title("Send emails") dialog.geometry("800x800") dframe = Frame(dialog,width=800,height=800,bg="white",relief=SUNKEN).pack() email = StringVar() password = StringVar() semail = StringVar() spassword = StringVar() label = Label(dframe, font=("arial",16, "bold"), fg="white", bg="black", text="your_email").pack(side=LEFT) entry1 = Entry(dframe, font=("arial",16,"bold"), fg="white",bg="black", textvariable=email,insertwidth=1,bd=5).pack(side=RIGHT) label1 = Label(dframe, font=("arial",16, "bold"), fg="white", bg="black", text="password", relief=SUNKEN).pack() entry2 = Entry(dframe,font=("arial", 16 ,"bold"),textvariable=password, insertwidth=1,bd=5).pack(side=RIGHT) Label2 =Label(dframe,font=("arial",16, "bold"),fg="white",bg="black", text="sender_email",relief=SUNKEN).pack(side=LEFT) entry2 = Entry(dframe,font=("arial",16, "bold"),bd=5,fg="white",bg="black",textvariable=semail,insertwidth=1).pack(side=LEFT) label3 = Label(dframe,font=("arial",16,"bold"),fg="white",bg="black",text="sender_password", relief=SUNKEN).pack(side=LEFT) entry3= Entry(dframe,font=("arial",16,"bold"),fg="white",textvariable=spassword,insertwidth=1,relief=SUNKEN).pack() dialog.mainloop() #btnEmail = Button(root,font=("arial", 16, "bold"), bg="black",fg="white",text="email",command=lambda: __send_email(),relief=GROOVE).pack() #================================next section=========================== fix = Button(root, bd=10,bg="black",fg="white",command=_price_inputs,relief=GROOVE).pack(side=BOTTOM) btnru = Button(root, font=("arial 20 bold"),bd=20, bg="black",fg="white",text="click",command=ano_win1,relief=GROOVE).pack(side=BOTTOM) #fucking mazing yr coding def column(col): for coll in col: call=cal+1 return call #def yes_y(): # rupe = Toplevel(root) # rupe.title("this is second window") # return #def no_y(): #nos = Toplevel(root) #nos.title("this is nos window") #return a = Entry(f2,font=("arial", 20,"bold"), textvariable=text_Input, bd=30, insertwidth=4, bg="dark slate blue",fg="white", justify="right").grid(columnspan=4) btn7=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"), text="7",bg="dim gray", command=lambda: btnClick(7)).grid(row=2,column=0) btn8=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"), text="8",bg="dim gray", command=lambda: btnClick(8)).grid(row=2,column=1) btn9=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"), text="9",bg="dim gray", command=lambda: btnClick(9)).grid(row=2,column=2) #!!!!!!!!!!!!!!!!!!!!!!additions!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Addition=Button(f2,padx=16,pady=16,bd=8,text="+",fg="black",bg="dim gray", command=lambda: btnClick("+")).grid(row=2,column=3) btn6=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"),text="4", bg="dim gray", command=lambda: btnClick(4)).grid(row=3,column=0) btn5=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"),text="5", bg="dim gray", command=lambda: btnClick(5)).grid(row=3,column=1) btn4=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"),text="6",bg="dim gray", command=lambda: btnClick(6)).grid(row=3,column=2) Subtract=Button(f2,padx=16,pady=16,bd=8,text="-", bg="dim gray", command=lambda: btnClick("-")).grid(row=3,column=3) btn3=Button(f2,padx=16,pady=16,bd=8,text="3",font=("arial", 20, "bold") ,bg="dim gray", command=lambda: btnClick(3)).grid(row=4,column=0) btn2=Button(f2,padx=16,pady=16,bd=8,text="2",font=("arial", 20, "bold"), bg="dim gray", command=lambda: btnClick(2)).grid(row=4,column=1) btn1=Button(f2,padx=16,pady=16,bd=8,text="1",font=("arial", 20, "bold") ,bg="dim gray", command=lambda: btnClick(1)).grid(row=4,column=2) Multiply=Button(f2,padx=16,pady=16,bd=8,text="*", bg="dim gray", command=lambda: btnClick("X")).grid(row=4,column=3) #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ btn0=Button(f2,padx=16,pady=16,bd=8,bg="dim gray",text="0",fg="black",font=("arial", 20, "bold"), command=lambda: btnClick(0)).grid(row=5,column=0) btnClear=Button(f2,pady=16,padx=16,bd=8, fg="black",font=("arial", 20, "bold"),text="C",bg="dim gray", command=btnClearDisplay).grid(row=5,column=1) btnEquals=Button(f2,padx=16,pady=16,fg="black",bd=8,text="=",bg="dim gray", font=("arial", 20,"bold"), command=btnEqualsInput).grid(row=5,column=2) #btn2=Button(f2,padx=16,pady=16,bd=8,fg="black",text="2",bg="dim gray", command=lambda: btnClick(2)).grid(row=5,column=3) division=Button(f2,padx=16,pady=16,bd=8,fg="black", text="/", bg="dim gray", command=lambda: btnClick("/")).grid(row=5,column=3) #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! rand = StringVar() #lblReference = Label(f1,font=("arial", 16,"bold"), text="Reference",bd=16,fg="red",bg="red",anchor="w",relief=RIDGE).grid(row=0,column=0) #txtReference=Entry(f1,font=("arial", 16, "bold"), textvariable=rand, bd=10,insertwidth=4,bg="red",fg="white", justify = "right").grid(row=0,column=1) #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! lblReference = Label(f1,font=("arial", 16,"bold"), text="Reference",bd=16,fg="white",bg="green",anchor="w", relief=RIDGE) lblReference.grid(row=0,column=0) b=Entry(f1,font=("arial", 16, "bold"), textvariable=rand, bd=10,insertwidth=4,fg="white",bg="black", justify = "left") b.grid(row=0,column=1) #img = "/root/Desktop/Desktop/python/projects/prj1_Botik/1.jpg" #root.ima = Image.open(img) #Label (root,bg="white",width=120,height=120, image=ima).pack() bill_in = StringVar() bill_out = StringVar() shrting=Label(f1,font=("arial", 20, "bold"), text="Shirting:",bg="powder blue", fg="black",anchor="w",relief=GROOVE).grid(row=1,column=0) shirts=Entry(f1,font=("arial", 16, "italic"), bd=10, textvariable=shirt, insertwidth=1,bg="black",fg="white", justify="left").grid(row=2,column=0) owner=Button(root,padx=16,pady=16, font=("arial",12, "bold"),text="info", bd=8,bg="black",command=ano_win1,fg="white",relief=RAISED).pack(side=LEFT) yes=Button(root,padx=16,pady=16,font=("arial",12, "bold"),text="Done",bd=8,bg="black", fg="white", command=_calculation(),relief=RAISED).pack(side=RIGHT) panting=Label(f1,font=("arial",20, "bold"), text="pant_mm:", bg="powder blue",fg="black",anchor="w",relief=GROOVE).grid(row=1,column=1) pantx=Entry(f1,font=("arial",16, "bold"), textvariable=pant, insertwidth=1, bd=10,bg="black",fg="white", justify="left").grid(row=2,column=1) sales=Label(f1,font=("arial",16, "bold"), text="sales_total:",bg="powder blue",fg="black",anchor="w",bd=8,relief=GROOVE).grid(row=1,column=2) salex=Entry(f1,font=("arial",16, "bold"),bg="black",fg="white",textvariable=sale,insertwidth=1,bd=10,justify="left").grid(row=2,column=2) buying=Label(f1,font=("arial",16, "bold"), text="buying_something: ",bg="powder blue",fg="black", anchor="e", relief=GROOVE).grid(row=3,column=0) buyx=Entry(f1,font=("arial", 16, "bold"), textvariable=buy, insertwidth=1, bd=10,bg="black", fg="white", justify="left").grid(row=4,column=0) Bank_Total=Label(f1,font=("arial",16,"bold"),text="Bank_Deposite: ", bg="powder blue", fg="black", anchor="e",relief=GROOVE).grid(row=3, column=1) depositex=Entry(f1,font=("arial",16,"bold"),bd=10, textvariable=deposite, bg="black", fg="white", justify="left").grid(row=4, column=1) lblBankwith=Label(f1, font=("arial", 16, "bold"),fg="black",bg="powder blue",text="Bank_Withdraw", anchor="e",relief=GROOVE).grid(row=3,column=2) withdrawx=Entry(f1,font=("arial",16, "bold"),bd=10, fg="white",bg="black", textvariable=withdraw, insertwidth=1).grid(row=4,column=2) coating=Label(f1, font=("arial", 16, "bold"),text="coat_mm:", bg="powder blue",fg="black",anchor="e").grid(row=5,column=0) coatx=Entry(f1, font=("arial", 16, "bold"), bg="black", fg="white", textvariable=coat, insertwidth=1, justify="left",bd=10).grid(row=6,column=0) lablsari=Label(f1,font=("arial", 16, "bold"), bg="powder blue",text="sari mm:", fg="black",anchor="e",relief=GROOVE).grid(row=5,column=1) sarix=Entry(f1, font=("arial", 16, "bold"), bg="black",bd=10, fg="white",textvariable=sari, insertwidth=1).grid(row=6,column=1) buying=Label(f1,font=("arial", 16, "bold"), bg="powder blue",text="buy_info:",fg="black",anchor="e",relief=GROOVE).grid(row=7,column=0) buyx=Entry(f1,font=("arial",16, "bold"),bd=8, fg="white",bg="black",textvariable=buy,insertwidth=1).grid(row=8,column=0) outgoing =Label(f1, font=("arial", 16, "bold"), bg="powder blue", text="outgoing:", fg="black",anchor="e",relief=GROOVE).grid(row=7,column=1) outx=Entry(f1,font=("arial", 16, "bold"),textvariable=out, bd=8,fg="white",bg="black",insertwidth=1).grid(row=8,column=1) ordering=Label(f1,font=("arial",16,"bold"),bg="powder blue",text="order_info:",fg="black",anchor="e",relief=GROOVE).grid(row=9,column=0) orderx=Entry(f1,font=("arial",16,"bold"),insertwidth=1, textvariable=order,bd=8,fg="white",bg="black").grid(row=10,column=0) lblcustomer=Label(f1,font=("arial",16,"bold"),bg="powder blue",text="cus_name:",fg="black",anchor="e",relief=GROOVE).grid(row=9,column=1) no=Entry(f1,font=("arial",16, "bold"),bd=8,bg="black",fg="white",insertwidth=1, textvariable=cus_name).grid(row=10,column=1) lblmonthly=Label(f1, font=("arial",16,"bold"),bg="powder blue",text="monthly:",fg="black",anchor="e",relief=GROOVE).grid(row=5,column=2) monthly=StringVar() monthx=Entry(f1,font=("arial",16,"bold"),show="blank",bg="black",textvariable=monthly,insertwidth=1,fg="white",bd=10).grid(row=6,column=2) lbltotal=Label(f1, font=("arial", 16, "bold"),bg="powder blue",text="Total:",fg="black").grid(row=7,column=2) totalx=Entry(f1, font=("arial", 16, "bold"),bg="black",textvariable=total,fg="white",insertwidth=1,bd=10).grid(row=8,column=2) lblemployee = Label(f1,font=("arial", 16, "bold"),bg="powder blue",text="employee name:",fg="black",anchor="e",relief=GROOVE).grid(row=9,column=2) employx= Entry(f1,font=("arial", 16,"bold"),textvariable=employee,insertwidth=1,bg="black",fg="white",bd=10).grid(row=10,column=2) ###############################database for the project###################### '''def __database(): db = TinyDB("/records.json") #print(monthly) #print(b) #fuck = c.get() a = order_bef.get() b = stock_full.get() c = shrting.get() d = pant.get() e = sari.get() f = order_info.get() g = delivery_report.get() h = daily_info.get() i = sales.get() j = buy.get() k = total_bank.get() l = bank_deposite.get() m = bank_withdraw.get() n = due_amount.get() o = order_info.get() p = daily_cash.get() q = cus_name.get() r = cus_no.get() s = employee.get() files = {"a": "", "b": "", "c": "", "d": "", "e": "", "f": "", "g": "", "h": "", "i": "", "j": "" , "k": "", "l": "", "m": "", "n": "", "o": "", "p": "", "q": "", "r": "", "s": ""} db.insert({"total": a }), db.insert({"regrds":"reference"}), db.insert({"day_income":"billion"}), db.insert({"day_outgoing":"billout"}), db.insert({"bankdeposit":"bankdepo"}), db.insert({"full_stock":"stock"}), db.insert({"shirt_mm":"shirt"}), db.insert({"bankwithdraw":"bankwith"}), db.insert({"pantmm":"pant"}), db.insert({"sarimm":"sari"}), db.insert({"orderday":"orderinfo"}), db.insert({"salling":"sales"}), db.insert({"buying":"buy"}), db.insert({"customern":"customer"}), db.insert({"monthly_info":"monthly"}), db.insert({"totaldy":"total"}), db.insert({"employeid":"employee"}) for db in range(1): print(db) files = list(files) file = open("/file.txt", "wb") da = "" for data in files: if len(data) != 0: print("this is are the files written in python\\n check the file.txt for debug ") da += data print(data) da = int(da) file.write(da) try: file = open("/records.txt", "r") except: print("creating the file from script {}".format(__file__)) file = open("/records.txt","w") finally: pass check = os.path.isfile("/records.txt") if check: for item in db: data = open("/records.txt","wb") #with open("/records.txt","wb") as file: #pickle.dump(item, data) #file.close() #file1 = pickle.load(file) if len(item) == len(file1): break if item != file: #item = str(item) file.write("%s" %(item)) time.sleep(1) print("done writing to the file") #for item in db: with open("/records.txt", "rb") as file: reading = file1 if len(reading) != None: print("its printed") print(reading) file.close() #db.insert({"name":"<NAME>"}) name = Query() #db(name.type == "changed") d = datetime.now() month = str(d.month) day = str(d.day) year = str(d.year) hour = str(d.hour) minute = str(d.minute) second = str(d.second) between = str(":")''' '''def __time(infos): time = datetime.now() day = str(time.day) month = str(time.month) hour = str(time.hour) second = str(time.second) year = str(time.year) minute = str(time.minute) #assuming the infos as the order taken that will be notified before the #60 hours #changing all the formats to the seconds that will be easy for the #calculation #first calculating seconds in one day that will ease all the further operations daysec = (24*60) * 60 * 60 ### ##this is will be easy now yearSec = daysec * 365 month = daysec * 30 daySec = daysec hourSec = 60 * 60 * 60 minuteSec = 60 * 60 files = {"a":"", "b":"","c":"","d":"","e":"","f":"","g":"","h":"","i":"","j":"" ,"k":"","l":"","m":"","n":"","o":"","p":"","q":"","r":"","s":""}''' #files = list(files) '''for data in files: if len(data) != 0: print(data)''' #lenght = len(db) ##this will show the recorded bill numbers def bill_in(): ##assuming the variable as bill number .get var bill = bill_in.get() billo = bill_out.get() bills = tinydb.TinyDb("/bills.json") while bill or billo != None: bills.insert({"billInput": bill, "billOutput": billo}) win = Toplevel() win.title("bills") winF = Frame(win, bg="black",relief=SUNKEN).pack() winE = Entry(winF, insertwidth=10,insertheight=10,fg="white",bg="black",textvariable=bills).pack() win.mainloop() #l # command=bill_in).pack(anchor=NE) root.mainloop() #__database() #add1=Button(f2,padx=16,pady=16,bd=8, fg="black", font=("arial",20,"bold"), #text="+",bg="powder blue", command=lambda: btnClick("+")).grid(row=3,column=6) #btn10=Button(f2,padx=16,padx=16, fg="blue", font("arial",5,"bold"), # text="rupen",bg="powder blue", command=rupen).grid(row=3,column=5) #def function(): # pass(): # pass main(): # root.mainloop() #for the revies of the follow in the sorry of the same of the tkinter in the main function of the sollow #main()
[ 1, 529, 276, 1112, 420, 29958, 582, 2238, 29946, 29953, 29955, 29947, 29914, 7451, 1387, 29918, 21895, 29918, 5205, 13, 3166, 18883, 1639, 1053, 334, 13, 5215, 4036, 13, 5215, 931, 13, 3166, 349, 6227, 1053, 7084, 13, 3166, 12865, 1053, 12865, 13, 3166, 21577, 2585, 1053, 334, 13, 5215, 2897, 13, 5215, 5839, 280, 13, 29937, 3166, 2566, 29896, 1053, 334, 13, 3166, 4036, 1053, 20088, 524, 13, 13, 4632, 353, 323, 29895, 580, 13, 4632, 29889, 19156, 703, 29896, 29953, 29900, 29900, 29916, 29947, 29900, 29900, 29974, 29900, 29974, 29900, 1159, 13, 4632, 29889, 3257, 703, 29903, 7889, 29918, 1388, 29875, 29918, 2901, 29918, 29928, 8187, 29968, 2190, 1159, 13, 4632, 29889, 17591, 29898, 16264, 543, 29887, 1025, 264, 5964, 29946, 1159, 13, 13, 13, 726, 29918, 4290, 353, 1714, 9037, 580, 13, 6891, 353, 15945, 13, 3582, 353, 15945, 13, 1217, 13776, 13, 13, 13, 29911, 3554, 353, 12218, 29898, 4632, 29892, 2920, 29922, 29896, 29953, 29900, 29900, 1919, 3545, 29922, 29945, 29900, 29892, 16264, 543, 29887, 1025, 264, 5964, 29946, 613, 18892, 29922, 29934, 1367, 1692, 29897, 13, 29911, 3554, 29889, 4058, 29898, 2975, 29922, 29911, 4590, 29897, 13, 13, 29888, 29896, 353, 12218, 29898, 4632, 29892, 2920, 353, 29871, 29947, 29900, 29900, 1919, 3545, 29922, 29945, 29900, 29900, 29892, 16264, 543, 29887, 1025, 264, 5964, 29946, 613, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 29897, 13, 29888, 29896, 29889, 4058, 29898, 2975, 29922, 28024, 29897, 13, 13, 29888, 29906, 353, 12218, 29898, 4632, 29892, 2920, 353, 29871, 29941, 29900, 29900, 29892, 3545, 353, 29871, 29955, 29900, 29900, 29892, 16264, 543, 26031, 2243, 403, 7254, 613, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 29897, 13, 29888, 29906, 29889, 4058, 29898, 2975, 29922, 22789, 3912, 29897, 13, 13, 29937, 29888, 29941, 29922, 12218, 29898, 4632, 29892, 2103, 29922, 29896, 29953, 29900, 29900, 29892, 3545, 29922, 29941, 29900, 29900, 29892, 16434, 543, 9539, 613, 25989, 543, 12248, 672, 7254, 613, 18892, 29922, 29903, 3904, 29968, 1430, 467, 4058, 29898, 2975, 29922, 15342, 29897, 13, 13, 13, 13, 29937, 9166, 9166, 9166, 4936, 1360, 2481, 9166, 9166, 2751, 25512, 13, 13, 2997, 2230, 29922, 2230, 29889, 294, 312, 603, 29898, 2230, 29889, 2997, 2230, 29898, 2230, 29889, 2230, 22130, 13, 13, 29937, 12673, 29922, 4775, 29898, 29911, 3554, 29892, 5657, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 726, 29922, 3707, 2481, 29892, 6448, 29922, 29896, 29900, 1919, 16264, 543, 8517, 613, 396, 16434, 543, 10921, 613, 17360, 543, 29893, 2564, 4058, 580, 13, 13, 13, 29937, 9166, 9166, 2751, 8382, 3192, 9166, 4936, 13, 13, 13, 845, 2728, 353, 3159, 9037, 580, 13, 29886, 424, 353, 3159, 9037, 580, 13, 29879, 744, 353, 3159, 9037, 580, 13, 2423, 29891, 353, 3159, 9037, 580, 13, 311, 1066, 568, 353, 3159, 9037, 580, 13, 2541, 4012, 353, 3159, 9037, 580, 13, 1111, 271, 353, 3159, 9037, 580, 13, 2098, 353, 3159, 9037, 580, 13, 7827, 353, 3159, 9037, 580, 13, 449, 353, 3159, 9037, 580, 13, 11083, 353, 3159, 9037, 580, 396, 2098, 1434, 278, 29871, 29953, 29900, 13, 17712, 353, 3159, 9037, 580, 13, 29881, 27657, 353, 3159, 9037, 580, 13, 13, 13, 13383, 7346, 29937, 3396, 29918, 17062, 13383, 4136, 2277, 13, 13, 13, 13, 13, 1753, 903, 15807, 362, 7295, 13, 13, 1678, 528, 2728, 29918, 4317, 353, 528, 2728, 29889, 657, 580, 13, 1678, 282, 424, 29918, 4317, 353, 282, 424, 29889, 657, 580, 13, 1678, 14686, 29918, 4317, 353, 14686, 29889, 657, 580, 13, 1678, 15649, 29918, 4317, 353, 15649, 29889, 657, 580, 13, 1678, 19754, 568, 29918, 4317, 353, 19754, 568, 29889, 657, 580, 13, 1678, 28679, 29918, 4317, 353, 28679, 29889, 657, 580, 13, 1678, 24296, 29918, 4317, 353, 24296, 29889, 657, 580, 13, 1678, 1797, 29918, 4317, 353, 1797, 29889, 657, 580, 13, 1678, 3001, 29918, 4317, 353, 3001, 29889, 657, 580, 13, 13, 1678, 931, 353, 12865, 29889, 3707, 580, 13, 1678, 2462, 353, 931, 29889, 3250, 13, 1678, 4098, 353, 931, 29889, 10874, 13, 1678, 7234, 353, 931, 29889, 18721, 13, 1678, 1473, 353, 931, 29889, 7496, 13, 1678, 1629, 353, 931, 29889, 6360, 13, 1678, 11015, 353, 931, 29889, 1195, 1082, 13, 13, 1678, 396, 26740, 278, 10422, 773, 278, 2425, 13, 13, 1678, 396, 1445, 353, 1722, 703, 29896, 8875, 1642, 4830, 3101, 13, 13, 1678, 14550, 1454, 474, 297, 3464, 29898, 29945, 1125, 13, 4706, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 29875, 1125, 13, 9651, 1209, 13, 4706, 1683, 29901, 13, 9651, 934, 353, 1722, 703, 29912, 1836, 3945, 1642, 4830, 29898, 29875, 29974, 29896, 511, 376, 29893, 29974, 1159, 13, 632, 2825, 411, 1024, 6571, 1642, 4830, 29898, 1445, 876, 12008, 13, 13, 1678, 396, 1037, 1218, 278, 977, 264, 1280, 411, 9773, 353, 29896, 565, 278, 1024, 2307, 22856, 13, 1678, 934, 29918, 978, 353, 376, 29878, 29889, 3945, 29908, 13, 1678, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 1445, 29918, 978, 1125, 13, 4706, 7985, 353, 29871, 29896, 13, 4706, 1550, 5852, 29901, 13, 9651, 7985, 4619, 29871, 29896, 13, 9651, 716, 29918, 1445, 29918, 978, 353, 934, 29918, 978, 29889, 5451, 17350, 3945, 1159, 29961, 29900, 29962, 718, 851, 29898, 18837, 29897, 718, 11393, 3945, 29908, 13, 9651, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 1482, 29918, 1445, 29918, 978, 1125, 396, 361, 278, 716, 9507, 4864, 29871, 13, 18884, 1596, 703, 4746, 278, 934, 6571, 1642, 4830, 29898, 1482, 29918, 1445, 29918, 978, 876, 13, 18884, 396, 1445, 353, 1722, 703, 8875, 1642, 4830, 29898, 1482, 29918, 1445, 29918, 978, 511, 376, 29893, 29974, 1159, 13, 18884, 6773, 13, 9651, 1683, 29901, 13, 18884, 934, 29918, 978, 353, 1722, 29898, 1482, 29918, 1445, 29918, 978, 29892, 376, 29893, 29974, 1159, 13, 18884, 1596, 703, 1037, 1218, 278, 934, 6571, 1642, 4830, 29898, 1445, 29918, 978, 876, 13, 18884, 396, 1445, 353, 1722, 703, 8875, 1642, 4830, 29898, 1445, 29918, 978, 511, 376, 29893, 29974, 1159, 13, 18884, 2867, 13, 13, 18884, 934, 29918, 978, 353, 376, 1777, 29889, 3945, 29908, 13, 13, 13, 1678, 934, 353, 1722, 703, 8875, 1642, 4830, 29898, 1445, 29918, 978, 511, 29908, 29893, 29974, 1159, 13, 632, 13, 13, 1678, 3001, 29916, 353, 528, 2728, 29918, 4317, 29974, 29886, 424, 29918, 4317, 29974, 29879, 744, 29918, 4317, 29974, 2423, 29891, 29918, 4317, 29974, 311, 1066, 568, 29918, 4317, 29974, 2541, 4012, 29918, 4317, 29974, 1111, 271, 29918, 4317, 29974, 2098, 29918, 4317, 13, 13, 1678, 934, 29889, 3539, 703, 11536, 13018, 8875, 1642, 4830, 29898, 7827, 29916, 876, 13, 1678, 934, 29889, 3539, 703, 845, 2728, 13018, 8875, 1642, 4830, 29898, 845, 2728, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 29886, 424, 29918, 4317, 13018, 8875, 1642, 4830, 29898, 29886, 424, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 29879, 744, 29918, 4317, 13018, 8875, 1642, 4830, 29898, 29879, 744, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 2423, 29891, 29918, 4317, 13018, 8875, 1642, 4830, 29898, 2423, 29891, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 311, 1066, 568, 29918, 4317, 13018, 8875, 1642, 4830, 29898, 311, 1066, 568, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 2541, 4012, 29918, 4317, 13018, 8875, 1642, 4830, 29898, 2541, 4012, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 1111, 271, 13018, 8875, 1642, 4830, 29898, 1111, 271, 29918, 4317, 876, 13, 1678, 934, 29889, 3539, 703, 2098, 13018, 8875, 1642, 4830, 29898, 2098, 29918, 4317, 876, 13, 1678, 5183, 353, 934, 29889, 949, 9012, 580, 13, 1678, 934, 29889, 5358, 580, 13, 29937, 7045, 281, 3163, 731, 278, 3001, 515, 1244, 3001, 29889, 842, 13, 13, 29937, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 9037, 747, 2122, 29918, 262, 842, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 29974, 13, 13, 2098, 29918, 915, 29888, 353, 3159, 9037, 580, 13, 17712, 29918, 8159, 353, 3159, 9037, 580, 13, 845, 29878, 1259, 353, 3159, 9037, 580, 13, 29886, 424, 353, 3159, 9037, 580, 13, 29879, 1306, 353, 3159, 9037, 580, 13, 2098, 29918, 3888, 353, 3159, 9037, 580, 13, 29881, 27657, 29918, 12276, 353, 3159, 9037, 580, 13, 29881, 8683, 29918, 3888, 353, 3159, 9037, 580, 13, 29879, 2122, 353, 3159, 9037, 580, 13, 2423, 29891, 353, 3159, 9037, 580, 13, 7827, 29918, 9157, 353, 3159, 9037, 580, 13, 9157, 29918, 311, 1066, 568, 353, 3159, 9037, 580, 13, 9157, 29918, 2541, 4012, 353, 3159, 9037, 580, 13, 29123, 29918, 14506, 353, 3159, 9037, 580, 13, 2098, 29918, 3888, 353, 3159, 9037, 580, 13, 29881, 8683, 29918, 29883, 1161, 353, 3159, 9037, 580, 13, 8668, 29918, 978, 353, 3159, 9037, 580, 13, 8668, 29918, 1217, 353, 3159, 9037, 580, 13, 26143, 353, 3159, 9037, 580, 13, 13, 13383, 7346, 4136, 2277, 29937, 1990, 310, 3093, 3751, 29879, 13383, 7346, 29937, 13, 13, 13, 1990, 4770, 3396, 7295, 13, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 2098, 353, 1797, 13, 13, 1678, 822, 4770, 2098, 29918, 3888, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 3707, 353, 12865, 580, 13, 4706, 1583, 29889, 18721, 353, 1286, 29889, 18721, 13, 4706, 1583, 29889, 1195, 1082, 353, 1286, 29889, 1195, 1082, 13, 4706, 1583, 29889, 7496, 353, 1286, 29889, 7496, 13, 4706, 1583, 29889, 6360, 353, 1286, 29889, 6360, 13, 4706, 1583, 29889, 10874, 353, 1286, 29889, 10874, 13, 4706, 1583, 29889, 3250, 353, 1286, 29889, 3250, 13, 13, 4706, 1583, 29889, 11651, 29918, 2230, 353, 2407, 29918, 2230, 13, 13, 13, 4706, 565, 1583, 29889, 18721, 1275, 1583, 29889, 11651, 29918, 2230, 29928, 29901, 13, 9651, 1596, 703, 1552, 931, 363, 278, 3234, 338, 2869, 1273, 29879, 2175, 29908, 1273, 29898, 1311, 29889, 18721, 29899, 1311, 29889, 11651, 29918, 2230, 29928, 876, 13, 13, 29937, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 25649, 2585, 1342, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 13, 29937, 2585, 353, 323, 4901, 4051, 11974, 29503, 344, 29914, 29881, 29946, 941, 29889, 3126, 1159, 13, 29937, 2585, 29889, 7851, 3319, 29908, 8668, 29918, 4537, 4710, 29929, 29947, 29929, 29941, 29947, 29906, 29941, 29906, 613, 376, 8668, 29918, 978, 4710, 582, 2238, 29908, 1800, 13, 13, 29937, 1753, 694, 29918, 29891, 7295, 13, 396, 259, 301, 275, 353, 4833, 29889, 497, 580, 13, 13383, 3401, 4936, 2751, 25512, 13, 26648, 3401, 353, 15796, 29898, 29911, 3554, 29892, 4079, 29922, 703, 27521, 613, 29953, 29900, 29892, 376, 2410, 293, 14288, 4968, 726, 543, 29933, 327, 1387, 15057, 24272, 809, 29885, 613, 16434, 543, 10921, 613, 25989, 543, 26031, 2243, 403, 7254, 613, 289, 29881, 29922, 29896, 29900, 29892, 17360, 543, 29893, 613, 18892, 29922, 29934, 1367, 1692, 29897, 13, 26648, 3401, 29889, 4058, 580, 13, 26648, 3401, 353, 15796, 29898, 29911, 3554, 29892, 4079, 29922, 703, 27521, 613, 29941, 29900, 29892, 376, 8934, 4968, 726, 29922, 2997, 2230, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 289, 29881, 29922, 29896, 29900, 29892, 17360, 543, 29893, 613, 18892, 29922, 29934, 1367, 1692, 29897, 13, 26648, 3401, 29889, 4058, 580, 13, 13, 29937, 9166, 9166, 9166, 4936, 25512, 27065, 1061, 9166, 9166, 1360, 13, 15945, 29908, 1753, 1857, 29918, 3972, 7295, 13, 1678, 1053, 2897, 13, 1678, 1053, 10876, 13, 13, 1678, 360, 8193, 353, 2897, 29889, 657, 29883, 9970, 580, 13, 1678, 1596, 29898, 9464, 29897, 13, 26648, 3401, 353, 15796, 29898, 29911, 3554, 29892, 4079, 29922, 703, 27521, 613, 29953, 29900, 29892, 376, 2410, 293, 4968, 726, 29922, 3784, 29918, 3972, 29892, 16434, 543, 8517, 613, 16264, 543, 12248, 672, 7254, 613, 6448, 29922, 29896, 29900, 29892, 17360, 543, 29956, 1159, 13, 26648, 3401, 29889, 4058, 580, 13, 13, 1678, 396, 9464, 353, 4516, 13, 1678, 396, 2457, 4516, 13, 1678, 9995, 13, 13, 29937, 8172, 20808, 29922, 3125, 29898, 29888, 29896, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 16264, 543, 12248, 672, 7254, 613, 1426, 543, 29907, 29918, 3972, 613, 1899, 29922, 2892, 29901, 1857, 29918, 3972, 29898, 3972, 8106, 4058, 29898, 2975, 29922, 29911, 4590, 29897, 13, 13, 13, 1753, 9503, 4164, 29898, 20326, 1125, 13, 1678, 5534, 5455, 13, 1678, 5455, 353, 5455, 718, 851, 29898, 20326, 29897, 13, 1678, 1426, 29918, 4290, 29889, 842, 29898, 6891, 29897, 13, 13, 1753, 9503, 18759, 9323, 7295, 13, 1678, 5534, 5455, 13, 1678, 5455, 13776, 13, 1678, 1426, 29918, 4290, 29889, 842, 703, 1159, 29871, 13, 13, 13, 1753, 9503, 14776, 4290, 7295, 13, 1678, 5534, 5455, 13, 1678, 2533, 786, 29922, 710, 29898, 14513, 29898, 6891, 876, 13, 1678, 1426, 29918, 4290, 29889, 842, 29898, 2083, 786, 29897, 13, 1678, 5455, 13776, 13, 13, 1753, 11118, 29918, 8269, 7295, 13, 1678, 5534, 11118, 29918, 262, 13, 1678, 5534, 11118, 29918, 449, 13, 1678, 11118, 29918, 449, 353, 5124, 13, 1678, 11118, 29918, 262, 353, 5124, 13, 13, 13, 1753, 364, 786, 264, 7295, 13, 1678, 5534, 364, 786, 264, 13, 1678, 364, 786, 264, 353, 364, 786, 264, 13, 1678, 364, 265, 2330, 353, 1714, 9037, 580, 13, 13, 12008, 1753, 4439, 2519, 29918, 11236, 403, 7295, 13, 1678, 5534, 9920, 29918, 4925, 29871, 13, 1678, 565, 376, 582, 2238, 29908, 297, 9920, 29918, 4925, 29901, 13, 4706, 565, 376, 582, 2238, 29908, 297, 9920, 29918, 4925, 29961, 29896, 5387, 13, 9651, 565, 376, 1617, 2330, 29908, 297, 9920, 29918, 4925, 29961, 29906, 5387, 12008, 13, 13, 29937, 9166, 4936, 2751, 1360, 23327, 5417, 1048, 592, 9166, 2751, 29922, 13, 13, 1753, 19410, 29918, 5080, 29896, 7295, 13, 1678, 5401, 29896, 353, 323, 1991, 955, 580, 13, 1678, 396, 1366, 338, 2675, 304, 367, 278, 3474, 297, 607, 727, 338, 3078, 297, 278, 740, 13, 1678, 396, 974, 278, 1788, 373, 278, 2304, 297, 734, 29882, 1667, 2425, 13, 1678, 396, 12711, 338, 694, 4046, 297, 278, 1788, 310, 734, 29882, 13, 1678, 5401, 29896, 29889, 3257, 703, 1366, 338, 278, 12271, 3474, 29901, 1159, 13, 1678, 5401, 29896, 29889, 19156, 703, 29896, 29953, 29900, 29900, 29916, 29947, 29900, 29900, 29974, 29900, 29974, 29900, 1159, 13, 1678, 396, 5080, 29896, 29889, 17591, 29898, 16264, 543, 25590, 369, 1159, 13, 13, 13, 1678, 590, 29918, 3888, 353, 12218, 29898, 5080, 29896, 29892, 2920, 29922, 29953, 29900, 29900, 29892, 3171, 29922, 29955, 29900, 29900, 29892, 16264, 543, 9588, 4605, 21319, 29946, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 29897, 13, 1678, 590, 29918, 3888, 29889, 4058, 29898, 2975, 29922, 28024, 29897, 13, 1678, 11962, 29918, 3888, 353, 12218, 29898, 5080, 29896, 29892, 2920, 29922, 29953, 29900, 29900, 29892, 3171, 29922, 29945, 29900, 29900, 29892, 16264, 543, 9588, 4605, 21319, 29946, 613, 18892, 29922, 29954, 1672, 29949, 12064, 29897, 13, 1678, 11962, 29918, 3888, 29889, 4058, 29898, 2975, 29922, 22789, 3912, 29897, 13, 13, 1678, 4045, 29918, 3888, 353, 12218, 29898, 5080, 29896, 29892, 2920, 29922, 29896, 29900, 29900, 29892, 3171, 29922, 29896, 29900, 29900, 29892, 16264, 543, 9588, 4605, 21319, 29946, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 29897, 13, 1678, 4045, 29918, 3888, 29889, 4058, 29898, 2975, 29922, 29933, 2891, 4986, 29924, 29897, 13, 13, 13, 1678, 599, 29918, 3888, 353, 12218, 29898, 5080, 29896, 29892, 2920, 29922, 29945, 29900, 29892, 3171, 29922, 29945, 29900, 29892, 16264, 543, 9588, 4605, 21319, 29946, 613, 2674, 2575, 29922, 4717, 29902, 1660, 29928, 29897, 13, 1678, 599, 29918, 3888, 29889, 4058, 580, 13, 13, 13, 1678, 301, 2204, 978, 29922, 4775, 29898, 1357, 29918, 3888, 29892, 5657, 29922, 703, 27521, 613, 29906, 29900, 1699, 2410, 293, 4968, 726, 543, 29966, 5813, 28341, 16264, 543, 12248, 672, 7254, 613, 285, 29887, 543, 12692, 613, 289, 29881, 29922, 29896, 29900, 29892, 18892, 29922, 29903, 3904, 29968, 1430, 467, 4058, 29898, 2975, 29922, 29911, 4590, 29897, 13, 1678, 301, 2204, 771, 29922, 4775, 29898, 1357, 29918, 3888, 29892, 5657, 29922, 703, 27521, 613, 259, 29906, 29900, 1699, 8934, 4968, 726, 543, 6295, 14093, 10863, 261, 613, 16264, 543, 12248, 672, 7254, 613, 285, 29887, 543, 12692, 613, 6448, 29922, 29896, 29900, 29892, 18892, 29922, 4717, 29902, 1660, 29928, 467, 4058, 580, 13, 13, 1678, 527, 29874, 353, 1714, 9037, 580, 13, 1678, 6382, 295, 542, 29922, 9634, 29898, 5080, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 2410, 293, 4968, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 6448, 29922, 29945, 29892, 7851, 2103, 29922, 29896, 29892, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 29892, 726, 11918, 29922, 2946, 467, 4058, 580, 13, 1678, 1967, 29819, 29922, 3125, 29898, 5080, 29896, 29892, 5657, 29922, 703, 27521, 613, 29906, 29900, 29892, 376, 8934, 4968, 6448, 29922, 29945, 29892, 16264, 543, 10921, 613, 16434, 543, 10921, 613, 6519, 29922, 14013, 29901, 903, 3027, 29898, 3027, 8106, 4058, 580, 13, 13, 1678, 14550, 1753, 903, 3027, 29898, 3027, 1125, 13, 13, 13, 4706, 1967, 353, 1967, 29889, 842, 29898, 326, 351, 295, 542, 29897, 13, 4706, 736, 1967, 13, 1678, 396, 3027, 353, 7084, 29889, 3150, 11974, 4632, 29914, 17600, 29914, 17600, 29914, 25772, 29914, 29945, 29889, 2732, 1159, 13, 13, 1678, 527, 3660, 353, 15796, 29898, 5080, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 1699, 2410, 293, 4968, 2103, 29922, 29941, 29900, 29900, 29892, 3171, 29922, 29896, 29953, 29947, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 1426, 29922, 3027, 29892, 2674, 2575, 29922, 10536, 1299, 467, 4058, 580, 13, 13, 1678, 5401, 29896, 29889, 3396, 7888, 580, 12008, 13, 13, 13, 29937, 9166, 4936, 2751, 29922, 29264, 599, 278, 3041, 359, 1275, 9166, 2751, 1360, 13, 13, 1753, 903, 9175, 29918, 2080, 29879, 7295, 13, 1678, 5401, 29906, 353, 323, 1991, 955, 580, 13, 1678, 5401, 29906, 29889, 3257, 703, 4013, 338, 2675, 304, 278, 4004, 363, 278, 8666, 10970, 1159, 13, 1678, 5401, 29906, 29889, 19156, 703, 29896, 29953, 29900, 29900, 29916, 29947, 29900, 29900, 1159, 13, 13, 1678, 3515, 29916, 353, 12218, 29898, 5080, 29906, 29892, 2103, 29922, 29896, 29953, 29900, 29900, 29892, 16264, 543, 9588, 4605, 21319, 29946, 613, 3545, 29922, 29896, 29900, 29900, 29892, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 4058, 29898, 2975, 29922, 29911, 4590, 29897, 13, 1678, 3515, 29896, 353, 12218, 29898, 5080, 29906, 29892, 2103, 29922, 29955, 29955, 29945, 29892, 3171, 29922, 29955, 29945, 29900, 29892, 16264, 543, 10921, 613, 18892, 29922, 29903, 3904, 29968, 1430, 467, 4058, 580, 13, 1678, 3515, 29906, 353, 12218, 29898, 5080, 29906, 29892, 2920, 29922, 29955, 29955, 29945, 29892, 3545, 29922, 29955, 29945, 29900, 29892, 16264, 543, 8517, 613, 18892, 29922, 10536, 1299, 467, 4058, 580, 13, 13, 1678, 396, 1360, 1817, 1817, 9166, 4936, 25512, 3257, 9166, 4936, 2751, 29922, 13, 13, 1678, 11148, 29890, 29896, 353, 15796, 29898, 2557, 29916, 29892, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 1699, 2410, 293, 4968, 16264, 543, 12248, 672, 7254, 613, 16434, 543, 12692, 613, 726, 543, 1177, 12336, 6093, 12089, 2965, 2890, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 4058, 580, 13, 13, 268, 13, 13, 13, 1678, 5401, 29906, 29889, 3396, 7888, 580, 13, 13, 13383, 7346, 2277, 29937, 29879, 2548, 24609, 13383, 7346, 4136, 13, 13, 13, 1753, 4770, 6717, 29918, 5269, 7295, 13, 13, 1678, 14550, 5215, 1560, 9392, 1982, 13, 13, 1678, 330, 2549, 353, 1560, 9392, 1982, 29889, 17061, 3557, 703, 3844, 9392, 29889, 21980, 29889, 510, 613, 29871, 29945, 29947, 29955, 29897, 13, 1678, 330, 2549, 29889, 2962, 29873, 3137, 580, 13, 13, 1678, 903, 1445, 353, 1722, 11974, 4632, 29914, 17600, 29914, 17600, 29914, 4691, 29914, 1159, 13, 13, 1678, 330, 2549, 29889, 7507, 703, 6786, 613, 376, 5630, 1159, 13, 13, 1678, 10191, 353, 376, 29979, 22970, 22986, 1799, 10461, 29908, 13, 13, 1678, 330, 2549, 29889, 6717, 2549, 703, 8066, 4876, 594, 1253, 613, 376, 1552, 1159, 13, 1678, 330, 2549, 29889, 28358, 580, 12008, 13, 13, 1678, 7928, 353, 323, 29895, 580, 13, 1678, 7928, 29889, 3257, 703, 12600, 24609, 1159, 13, 1678, 7928, 29889, 19156, 703, 29947, 29900, 29900, 29916, 29947, 29900, 29900, 1159, 13, 13, 1678, 270, 2557, 353, 12218, 29898, 15901, 29892, 2103, 29922, 29947, 29900, 29900, 29892, 3545, 29922, 29947, 29900, 29900, 29892, 16264, 543, 10921, 613, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 467, 4058, 580, 13, 1678, 4876, 353, 1714, 9037, 580, 13, 1678, 4800, 353, 1714, 9037, 580, 13, 13, 1678, 3031, 737, 353, 1714, 9037, 580, 13, 1678, 805, 465, 1742, 353, 1714, 9037, 580, 13, 13, 1678, 3858, 353, 15796, 29898, 29881, 2557, 29892, 4079, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 285, 29887, 543, 10921, 613, 25989, 543, 8517, 613, 1426, 543, 8066, 29918, 5269, 2564, 4058, 29898, 2975, 29922, 28024, 29897, 13, 1678, 6251, 29896, 353, 28236, 29898, 29881, 2557, 29892, 4079, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 285, 29887, 543, 10921, 613, 16264, 543, 8517, 613, 1426, 11918, 29922, 5269, 29892, 7851, 2103, 29922, 29896, 29892, 6448, 29922, 29945, 467, 4058, 29898, 2975, 29922, 22789, 3912, 29897, 13, 13, 1678, 3858, 29896, 353, 15796, 29898, 29881, 2557, 29892, 4079, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 285, 29887, 543, 10921, 613, 25989, 543, 8517, 613, 1426, 543, 5630, 613, 18892, 29922, 29903, 3904, 29968, 1430, 467, 4058, 580, 13, 1678, 6251, 29906, 353, 28236, 29898, 29881, 2557, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29871, 1699, 8934, 4968, 726, 11918, 29922, 5630, 29892, 4635, 2103, 29922, 29896, 29892, 6448, 29922, 29945, 467, 4058, 29898, 2975, 29922, 22789, 3912, 29897, 13, 13, 1678, 15796, 29906, 353, 4775, 29898, 29881, 2557, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 1426, 543, 15452, 29918, 5269, 613, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 467, 4058, 29898, 2975, 29922, 28024, 29897, 13, 1678, 6251, 29906, 353, 28236, 29898, 29881, 2557, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 6448, 29922, 29945, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 726, 11918, 29922, 29879, 5269, 29892, 7851, 2103, 29922, 29896, 467, 4058, 29898, 2975, 29922, 28024, 29897, 13, 13, 1678, 3858, 29941, 353, 15796, 29898, 29881, 2557, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 726, 543, 15452, 29918, 5630, 613, 18892, 29922, 29903, 3904, 29968, 1430, 467, 4058, 29898, 2975, 29922, 28024, 29897, 13, 1678, 6251, 29941, 29922, 28236, 29898, 29881, 2557, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 16434, 543, 10921, 613, 726, 11918, 29922, 1028, 465, 1742, 29892, 7851, 2103, 29922, 29896, 29892, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 467, 4058, 580, 13, 13, 13, 13, 1678, 7928, 29889, 3396, 7888, 580, 13, 13, 13, 13, 29937, 7290, 9823, 353, 11025, 29898, 4632, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 8517, 613, 16434, 543, 10921, 613, 726, 543, 5269, 613, 6519, 29922, 2892, 29901, 4770, 6717, 29918, 5269, 3285, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 4058, 580, 13, 29937, 9166, 9166, 4622, 4004, 9166, 4936, 25512, 13, 13, 13, 13, 13, 5878, 353, 11025, 29898, 4632, 29892, 289, 29881, 29922, 29896, 29900, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 6519, 29922, 29918, 9175, 29918, 2080, 29879, 29892, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 4058, 29898, 2975, 29922, 29933, 2891, 4986, 29924, 29897, 13, 7290, 582, 353, 11025, 29898, 4632, 29892, 4079, 29922, 703, 27521, 29871, 29906, 29900, 14288, 4968, 6448, 29922, 29906, 29900, 29892, 25989, 543, 8517, 613, 16434, 543, 10921, 613, 726, 543, 3808, 613, 6519, 29922, 1562, 29918, 5080, 29896, 29892, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 4058, 29898, 2975, 29922, 29933, 2891, 4986, 29924, 29897, 13, 13, 13, 13, 29937, 29888, 2707, 292, 611, 19583, 343, 29878, 14137, 13, 1753, 1897, 29898, 1054, 1125, 13, 1678, 363, 5321, 297, 784, 29901, 13, 4706, 1246, 29922, 1052, 29974, 29896, 13, 13, 1678, 736, 1246, 13, 13, 29937, 1753, 4874, 29918, 29891, 7295, 13, 396, 259, 5796, 412, 353, 323, 1991, 955, 29898, 4632, 29897, 13, 29871, 396, 29871, 5796, 412, 29889, 3257, 703, 1366, 338, 1473, 3474, 1159, 13, 259, 396, 736, 13, 13, 29937, 1753, 694, 29918, 29891, 7295, 13, 1678, 396, 17639, 353, 323, 1991, 955, 29898, 4632, 29897, 13, 1678, 396, 17639, 29889, 3257, 703, 1366, 338, 7814, 3474, 1159, 13, 1678, 396, 2457, 13, 13, 13, 29874, 353, 28236, 29898, 29888, 29906, 29892, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 1699, 8934, 4968, 1426, 11918, 29922, 726, 29918, 4290, 29892, 289, 29881, 29922, 29941, 29900, 29892, 4635, 2103, 29922, 29946, 29892, 13, 1669, 25989, 543, 26031, 2243, 403, 7254, 613, 16434, 543, 10921, 613, 26922, 543, 1266, 2564, 7720, 29898, 4914, 9653, 29922, 29946, 29897, 13, 13, 7290, 29955, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 13, 4706, 1426, 543, 29955, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29955, 8106, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29900, 29897, 13, 13, 7290, 29947, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 13, 9651, 1426, 543, 29947, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29947, 8106, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29896, 29897, 13, 13, 7290, 29929, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 13, 9651, 1426, 543, 29929, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29929, 8106, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29906, 29897, 13, 13, 29937, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 1202, 2187, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 21004, 13, 13, 2528, 654, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29974, 613, 16434, 543, 8517, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 703, 29974, 1159, 467, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29941, 29897, 13, 13, 7290, 29953, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 726, 543, 29946, 613, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29946, 8106, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29900, 29897, 13, 13, 7290, 29945, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 726, 543, 29945, 613, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29945, 8106, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29896, 29897, 13, 13, 7290, 29946, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 726, 543, 29953, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29953, 8106, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29906, 29897, 13, 13, 4035, 29873, 1461, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29899, 613, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 703, 29899, 1159, 467, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29941, 29897, 13, 13, 7290, 29941, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29941, 613, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 1159, 1919, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29941, 8106, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29900, 29897, 13, 13, 7290, 29906, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29906, 613, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 4968, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29906, 8106, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29896, 29897, 13, 13, 7290, 29896, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29896, 613, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 1159, 1919, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29896, 8106, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29906, 29897, 13, 13, 6857, 666, 368, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 726, 543, 29930, 613, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 703, 29990, 1159, 467, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29941, 29897, 13, 13, 29937, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 29974, 13, 13, 7290, 29900, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 16264, 543, 6229, 16749, 613, 726, 543, 29900, 613, 16434, 543, 8517, 613, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 4968, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29900, 8106, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29900, 29897, 13, 13, 7290, 18759, 29922, 3125, 29898, 29888, 29906, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 4968, 726, 543, 29907, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 7290, 18759, 9323, 467, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29896, 29897, 13, 13, 7290, 14776, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 16434, 543, 8517, 613, 6448, 29922, 29947, 29892, 726, 543, 543, 29892, 16264, 543, 6229, 16749, 613, 4079, 29922, 703, 27521, 613, 29871, 29906, 29900, 1699, 8934, 4968, 1899, 29922, 7290, 14776, 4290, 467, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29906, 29897, 13, 13, 29937, 7290, 29906, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 16434, 543, 8517, 613, 726, 543, 29906, 613, 16264, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 29898, 29906, 8106, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29941, 29897, 13, 13, 4563, 2459, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 16434, 543, 8517, 613, 1426, 13802, 613, 25989, 543, 6229, 16749, 613, 1899, 29922, 2892, 29901, 9503, 4164, 11974, 1159, 467, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29941, 29897, 13, 13, 29937, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 13, 13, 9502, 353, 1714, 9037, 580, 13, 13, 29937, 26648, 7422, 353, 15796, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 1699, 8934, 4968, 1426, 543, 7422, 613, 6448, 29922, 29896, 29953, 29892, 16434, 543, 1127, 613, 16264, 543, 1127, 613, 25367, 543, 29893, 613, 2674, 2575, 29922, 29934, 1367, 1692, 467, 7720, 29898, 798, 29922, 29900, 29892, 4914, 29922, 29900, 29897, 13, 29937, 3945, 7422, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 1426, 11918, 29922, 9502, 29892, 289, 29881, 29922, 29896, 29900, 29892, 7851, 2103, 29922, 29946, 29892, 16264, 543, 1127, 613, 16434, 543, 10921, 613, 26922, 353, 376, 1266, 2564, 7720, 29898, 798, 29922, 29900, 29892, 4914, 29922, 29896, 29897, 13, 13, 29937, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 6824, 21004, 13, 26648, 7422, 353, 15796, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 1699, 8934, 4968, 1426, 543, 7422, 613, 6448, 29922, 29896, 29953, 29892, 16434, 543, 10921, 613, 16264, 543, 12692, 613, 25367, 543, 29893, 613, 18892, 29922, 29934, 1367, 1692, 29897, 13, 26648, 7422, 29889, 7720, 29898, 798, 29922, 29900, 29892, 4914, 29922, 29900, 29897, 13, 29890, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 1426, 11918, 29922, 9502, 29892, 289, 29881, 29922, 29896, 29900, 29892, 7851, 2103, 29922, 29946, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 26922, 353, 376, 1563, 1159, 13, 29890, 29889, 7720, 29898, 798, 29922, 29900, 29892, 4914, 29922, 29896, 29897, 13, 29937, 2492, 353, 5591, 4632, 29914, 17600, 29914, 17600, 29914, 4691, 29914, 16418, 29914, 558, 29926, 29896, 29918, 29933, 327, 638, 29914, 29896, 29889, 6173, 29908, 13, 29937, 4632, 29889, 2946, 353, 7084, 29889, 3150, 29898, 2492, 29897, 13, 29937, 4775, 313, 4632, 29892, 16264, 543, 10921, 613, 2103, 29922, 29896, 29906, 29900, 29892, 3545, 29922, 29896, 29906, 29900, 29892, 1967, 29922, 2946, 467, 4058, 580, 13, 13, 29890, 453, 29918, 262, 353, 1714, 9037, 580, 13, 29890, 453, 29918, 449, 353, 1714, 9037, 580, 13, 13, 845, 29878, 1259, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29906, 29900, 29892, 376, 8934, 4968, 1426, 543, 2713, 381, 1259, 29901, 613, 16264, 543, 12248, 672, 7254, 613, 285, 29887, 543, 8517, 613, 25367, 543, 29893, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29896, 29892, 4914, 29922, 29900, 29897, 13, 845, 381, 1372, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 2410, 293, 4968, 289, 29881, 29922, 29896, 29900, 29892, 1426, 11918, 29922, 845, 2728, 29892, 4635, 2103, 29922, 29896, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 26922, 543, 1563, 2564, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29900, 29897, 13, 13, 13, 20348, 29922, 3125, 29898, 4632, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 4079, 29922, 703, 27521, 613, 29896, 29906, 29892, 376, 8934, 4968, 726, 543, 3888, 613, 289, 29881, 29922, 29947, 29892, 16264, 543, 8517, 613, 6519, 29922, 1562, 29918, 5080, 29896, 29892, 16434, 543, 10921, 613, 2674, 2575, 29922, 4717, 29902, 1660, 29928, 467, 4058, 29898, 2975, 29922, 28024, 29897, 13, 3582, 29922, 3125, 29898, 4632, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 5657, 29922, 703, 27521, 613, 29896, 29906, 29892, 376, 8934, 4968, 726, 543, 25632, 613, 6448, 29922, 29947, 29892, 16264, 543, 8517, 613, 285, 29887, 543, 10921, 613, 1899, 29922, 29918, 15807, 362, 3285, 2674, 2575, 29922, 4717, 29902, 1660, 29928, 467, 4058, 29898, 2975, 29922, 22789, 3912, 29897, 13, 13, 29886, 424, 292, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29906, 29900, 29892, 376, 8934, 4968, 1426, 543, 29886, 424, 29918, 4317, 29901, 613, 25989, 543, 12248, 672, 7254, 613, 16434, 543, 8517, 613, 25367, 543, 29893, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29896, 29892, 4914, 29922, 29896, 29897, 13, 29886, 424, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 1426, 11918, 29922, 29886, 424, 29892, 4635, 2103, 29922, 29896, 29892, 289, 29881, 29922, 29896, 29900, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 26922, 543, 1563, 2564, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29896, 29897, 13, 13, 13, 29879, 2122, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 1426, 543, 29879, 2122, 29918, 7827, 29901, 613, 16264, 543, 12248, 672, 7254, 613, 16434, 543, 8517, 613, 25367, 543, 29893, 613, 6448, 29922, 29947, 29892, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29896, 29892, 4914, 29922, 29906, 29897, 13, 29879, 744, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 726, 11918, 29922, 29879, 744, 29892, 7851, 2103, 29922, 29896, 29892, 6448, 29922, 29896, 29900, 29892, 5143, 1598, 543, 1563, 2564, 7720, 29898, 798, 29922, 29906, 29892, 4914, 29922, 29906, 29897, 13, 13, 2423, 5414, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 1426, 543, 2423, 5414, 29918, 14481, 29901, 29871, 9162, 16264, 543, 12248, 672, 7254, 613, 16434, 543, 8517, 613, 17360, 543, 29872, 613, 18892, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29900, 29897, 13, 2423, 29891, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 1426, 11918, 29922, 2423, 29891, 29892, 4635, 2103, 29922, 29896, 29892, 289, 29881, 29922, 29896, 29900, 29892, 16264, 543, 8517, 613, 285, 29887, 543, 10921, 613, 26922, 543, 1563, 2564, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29900, 29897, 13, 13, 29933, 804, 29918, 11536, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 726, 543, 29933, 804, 29918, 8498, 359, 568, 29901, 9162, 25989, 543, 12248, 672, 7254, 613, 285, 29887, 543, 8517, 613, 17360, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29941, 29892, 1897, 29922, 29896, 29897, 13, 311, 1066, 568, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 6448, 29922, 29896, 29900, 29892, 1426, 11918, 29922, 311, 1066, 568, 29892, 25989, 543, 8517, 613, 285, 29887, 543, 10921, 613, 26922, 543, 1563, 2564, 7720, 29898, 798, 29922, 29946, 29892, 1897, 29922, 29896, 29897, 13, 13, 26648, 29933, 804, 2541, 29922, 4775, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 16434, 543, 8517, 613, 16264, 543, 12248, 672, 7254, 613, 726, 543, 29933, 804, 29918, 3047, 4012, 613, 17360, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29906, 29897, 13, 2541, 4012, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 6448, 29922, 29896, 29900, 29892, 285, 29887, 543, 10921, 613, 16264, 543, 8517, 613, 1426, 11918, 29922, 2541, 4012, 29892, 4635, 2103, 29922, 29896, 467, 7720, 29898, 798, 29922, 29946, 29892, 4914, 29922, 29906, 29897, 13, 13, 13, 1111, 1218, 29922, 4775, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 726, 543, 1111, 271, 29918, 4317, 29901, 613, 25989, 543, 12248, 672, 7254, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 2564, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29900, 29897, 13, 1111, 271, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 8517, 613, 285, 29887, 543, 10921, 613, 13, 3986, 1426, 11918, 29922, 1111, 271, 29892, 4635, 2103, 29922, 29896, 29892, 26922, 543, 1563, 613, 6448, 29922, 29896, 29900, 467, 7720, 29898, 798, 29922, 29953, 29892, 4914, 29922, 29900, 29897, 13, 13, 8205, 3137, 1306, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 12248, 672, 7254, 613, 726, 543, 29879, 1306, 5654, 29901, 613, 285, 29887, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29896, 29897, 13, 29879, 279, 861, 29922, 9634, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 8517, 613, 6448, 29922, 29896, 29900, 29892, 285, 29887, 543, 10921, 613, 726, 11918, 29922, 29879, 1306, 29892, 4635, 2103, 29922, 29896, 467, 7720, 29898, 798, 29922, 29953, 29892, 4914, 29922, 29896, 29897, 13, 13, 2423, 5414, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 12248, 672, 7254, 613, 726, 543, 2423, 29891, 29918, 3888, 29901, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29955, 29892, 4914, 29922, 29900, 29897, 13, 2423, 29891, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 6448, 29922, 29947, 29892, 285, 29887, 543, 10921, 613, 16264, 543, 8517, 613, 726, 11918, 29922, 2423, 29891, 29892, 7851, 2103, 29922, 29896, 467, 7720, 29898, 798, 29922, 29947, 29892, 4914, 29922, 29900, 29897, 13, 13, 449, 17696, 353, 4775, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 25989, 543, 12248, 672, 7254, 613, 1426, 543, 449, 17696, 29901, 613, 285, 29887, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29955, 29892, 4914, 29922, 29896, 29897, 13, 449, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 726, 11918, 29922, 449, 29892, 289, 29881, 29922, 29947, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 7851, 2103, 29922, 29896, 467, 7720, 29898, 798, 29922, 29947, 29892, 4914, 29922, 29896, 29897, 13, 13, 2098, 292, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 16264, 543, 12248, 672, 7254, 613, 726, 543, 2098, 29918, 3888, 29901, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29929, 29892, 4914, 29922, 29900, 29897, 13, 2098, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 7851, 2103, 29922, 29896, 29892, 1426, 11918, 29922, 2098, 29892, 6448, 29922, 29947, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 2564, 7720, 29898, 798, 29922, 29896, 29900, 29892, 4914, 29922, 29900, 29897, 13, 13, 26648, 15539, 29922, 4775, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 16264, 543, 12248, 672, 7254, 613, 726, 543, 8668, 29918, 978, 29901, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29929, 29892, 4914, 29922, 29896, 29897, 13, 1217, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 29892, 376, 8934, 4968, 6448, 29922, 29947, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 7851, 2103, 29922, 29896, 29892, 1426, 11918, 29922, 8668, 29918, 978, 467, 7720, 29898, 798, 29922, 29896, 29900, 29892, 4914, 29922, 29896, 29897, 13, 13, 26648, 10874, 368, 29922, 4775, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 16264, 543, 12248, 672, 7254, 613, 726, 543, 10874, 368, 29901, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29945, 29892, 4914, 29922, 29906, 29897, 13, 10874, 368, 29922, 1231, 9037, 580, 13, 10874, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29896, 29953, 1699, 8934, 4968, 4294, 543, 19465, 613, 16264, 543, 8517, 613, 726, 11918, 29922, 10874, 368, 29892, 7851, 2103, 29922, 29896, 29892, 16434, 543, 10921, 613, 6448, 29922, 29896, 29900, 467, 7720, 29898, 798, 29922, 29953, 29892, 4914, 29922, 29906, 29897, 13, 13, 27728, 1896, 7288, 29922, 4775, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 16264, 543, 12248, 672, 7254, 613, 726, 543, 11536, 29901, 613, 16434, 543, 8517, 2564, 7720, 29898, 798, 29922, 29955, 29892, 4914, 29922, 29906, 29897, 13, 7827, 29916, 29922, 9634, 29898, 29888, 29896, 29892, 4079, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 16264, 543, 8517, 613, 726, 11918, 29922, 7827, 29892, 16434, 543, 10921, 613, 7851, 2103, 29922, 29896, 29892, 6448, 29922, 29896, 29900, 467, 7720, 29898, 798, 29922, 29947, 29892, 4914, 29922, 29906, 29897, 13, 13, 29880, 1031, 29886, 10164, 353, 15796, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 29892, 376, 8934, 4968, 16264, 543, 12248, 672, 7254, 613, 726, 543, 26143, 1024, 29901, 613, 16434, 543, 8517, 613, 25367, 543, 29872, 613, 2674, 2575, 29922, 29954, 1672, 29949, 12064, 467, 7720, 29898, 798, 29922, 29929, 29892, 4914, 29922, 29906, 29897, 13, 3451, 2376, 29916, 29922, 28236, 29898, 29888, 29896, 29892, 5657, 29922, 703, 27521, 613, 29871, 29896, 29953, 1699, 8934, 4968, 726, 11918, 29922, 26143, 29892, 7851, 2103, 29922, 29896, 29892, 16264, 543, 8517, 613, 16434, 543, 10921, 613, 6448, 29922, 29896, 29900, 467, 7720, 29898, 798, 29922, 29896, 29900, 29892, 4914, 29922, 29906, 29897, 13, 13, 13, 13383, 7346, 4136, 2277, 29937, 9803, 363, 278, 2060, 13383, 4136, 2277, 13, 13, 13, 12008, 1753, 4770, 9803, 7295, 13, 13, 13, 1678, 4833, 353, 323, 4901, 4051, 11974, 3757, 4339, 29889, 3126, 1159, 13, 13, 1678, 396, 2158, 29898, 10874, 368, 29897, 13, 1678, 396, 2158, 29898, 29890, 29897, 13, 1678, 396, 29888, 2707, 353, 274, 29889, 657, 580, 13, 13, 1678, 263, 353, 1797, 29918, 915, 29888, 29889, 657, 580, 13, 1678, 289, 353, 10961, 29918, 8159, 29889, 657, 580, 13, 1678, 274, 353, 14653, 1259, 29889, 657, 580, 13, 1678, 270, 353, 282, 424, 29889, 657, 580, 13, 1678, 321, 353, 269, 1306, 29889, 657, 580, 13, 1678, 285, 353, 1797, 29918, 3888, 29889, 657, 580, 13, 1678, 330, 353, 28289, 29918, 12276, 29889, 657, 580, 13, 1678, 298, 353, 14218, 29918, 3888, 29889, 657, 580, 13, 1678, 474, 353, 16538, 29889, 657, 580, 13, 1678, 432, 353, 15649, 29889, 657, 580, 13, 1678, 413, 353, 3001, 29918, 9157, 29889, 657, 580, 13, 1678, 301, 353, 9124, 29918, 311, 1066, 568, 29889, 657, 580, 13, 1678, 286, 353, 9124, 29918, 2541, 4012, 29889, 657, 580, 13, 1678, 302, 353, 2861, 29918, 14506, 29889, 657, 580, 13, 1678, 288, 353, 1797, 29918, 3888, 29889, 657, 580, 13, 1678, 282, 353, 14218, 29918, 29883, 1161, 29889, 657, 580, 13, 1678, 3855, 353, 274, 375, 29918, 978, 29889, 657, 580, 13, 1678, 364, 353, 274, 375, 29918, 1217, 29889, 657, 580, 13, 1678, 269, 353, 19001, 29889, 657, 580, 13, 13, 1678, 2066, 353, 8853, 29874, 1115, 12633, 376, 29890, 1115, 12633, 376, 29883, 1115, 12633, 376, 29881, 1115, 12633, 376, 29872, 1115, 12633, 376, 29888, 1115, 12633, 376, 29887, 1115, 12633, 376, 29882, 1115, 12633, 376, 29875, 1115, 12633, 376, 29926, 1115, 5124, 13, 4706, 1919, 376, 29895, 1115, 12633, 376, 29880, 1115, 12633, 376, 29885, 1115, 12633, 376, 29876, 1115, 12633, 376, 29877, 1115, 12633, 376, 29886, 1115, 12633, 376, 29939, 1115, 12633, 376, 29878, 1115, 12633, 376, 29879, 1115, 5124, 29913, 13, 13, 1678, 4833, 29889, 7851, 3319, 29908, 7827, 1115, 263, 500, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 276, 629, 6289, 4710, 5679, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 3250, 29918, 262, 2763, 4710, 29890, 453, 291, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 3250, 29918, 449, 17696, 4710, 29890, 453, 449, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 9157, 311, 1066, 277, 4710, 9157, 311, 1129, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 8159, 29918, 17712, 4710, 17712, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 845, 2728, 29918, 4317, 4710, 845, 2728, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 9157, 2541, 4012, 4710, 9157, 2541, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 29886, 424, 4317, 4710, 29886, 424, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 29879, 279, 6727, 4710, 29879, 1306, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 536, 2018, 388, 4710, 2098, 3888, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 29879, 27855, 4710, 29879, 2122, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 2423, 5414, 4710, 2423, 29891, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 6341, 824, 4710, 15539, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 10874, 368, 29918, 3888, 4710, 10874, 368, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 4260, 2741, 29891, 4710, 7827, 9092, 511, 13, 1678, 4833, 29889, 7851, 3319, 29908, 3451, 2376, 29872, 333, 4710, 26143, 29908, 1800, 13, 13, 1678, 363, 4833, 297, 3464, 29898, 29896, 1125, 13, 4706, 1596, 29898, 2585, 29897, 13, 13, 1678, 2066, 353, 1051, 29898, 5325, 29897, 13, 1678, 934, 353, 1722, 11974, 1445, 29889, 3945, 613, 376, 29893, 29890, 1159, 13, 1678, 1146, 353, 5124, 13, 1678, 363, 848, 297, 2066, 29901, 13, 4706, 565, 7431, 29898, 1272, 29897, 2804, 29871, 29900, 29901, 13, 9651, 1596, 703, 1366, 338, 526, 278, 2066, 3971, 297, 3017, 1966, 29876, 1423, 278, 934, 29889, 3945, 363, 4744, 16521, 13, 9651, 1146, 4619, 848, 13, 9651, 1596, 29898, 1272, 29897, 13, 1678, 1146, 353, 938, 29898, 1388, 29897, 13, 1678, 934, 29889, 3539, 29898, 1388, 29897, 13, 13, 1678, 1018, 29901, 13, 4706, 934, 353, 1722, 11974, 3757, 4339, 29889, 3945, 613, 376, 29878, 1159, 13, 1678, 5174, 29901, 13, 4706, 1596, 703, 1037, 1218, 278, 934, 515, 2471, 6571, 1642, 4830, 22168, 1445, 1649, 876, 13, 4706, 934, 353, 1722, 11974, 3757, 4339, 29889, 3945, 3284, 29893, 1159, 13, 1678, 7146, 29901, 13, 4706, 1209, 13, 13, 308, 13, 4706, 1423, 353, 2897, 29889, 2084, 29889, 275, 1445, 11974, 3757, 4339, 29889, 3945, 1159, 13, 4706, 565, 1423, 29901, 13, 9651, 363, 2944, 297, 4833, 29901, 13, 18884, 848, 353, 1722, 11974, 3757, 4339, 29889, 3945, 3284, 29893, 29890, 1159, 13, 18884, 396, 2541, 1722, 11974, 3757, 4339, 29889, 3945, 3284, 29893, 29890, 1159, 408, 934, 29901, 13, 18884, 396, 23945, 280, 29889, 15070, 29898, 667, 29892, 848, 29897, 13, 18884, 396, 1445, 29889, 5358, 580, 13, 18884, 396, 1445, 29896, 353, 5839, 280, 29889, 1359, 29898, 1445, 29897, 13, 18884, 565, 7431, 29898, 667, 29897, 1275, 7431, 29898, 1445, 29896, 1125, 13, 462, 1678, 2867, 13, 13, 18884, 565, 2944, 2804, 934, 29901, 13, 462, 1678, 396, 667, 353, 851, 29898, 667, 29897, 13, 462, 1678, 934, 29889, 3539, 11702, 29879, 29908, 1273, 29898, 667, 876, 13, 462, 1678, 931, 29889, 17059, 29898, 29896, 29897, 13, 462, 1678, 1596, 703, 15091, 5007, 304, 278, 934, 1159, 13, 13, 462, 268, 13, 1678, 396, 1454, 2944, 297, 4833, 29901, 13, 1678, 411, 1722, 11974, 3757, 4339, 29889, 3945, 613, 376, 6050, 1159, 408, 934, 29901, 13, 308, 13, 4706, 5183, 353, 934, 29896, 13, 4706, 565, 7431, 29898, 19715, 29897, 2804, 6213, 29901, 13, 9651, 1596, 703, 1169, 13350, 1159, 13, 4706, 1596, 29898, 19715, 29897, 13, 1678, 934, 29889, 5358, 580, 13, 268, 13, 13, 1678, 396, 2585, 29889, 7851, 3319, 29908, 978, 4710, 29966, 5813, 11903, 1800, 13, 13, 1678, 1024, 353, 13641, 580, 13, 13, 1678, 396, 2585, 29898, 978, 29889, 1853, 1275, 376, 15033, 1159, 13, 13, 1678, 270, 353, 12865, 29889, 3707, 580, 13, 13, 1678, 4098, 353, 851, 29898, 29881, 29889, 10874, 29897, 13, 1678, 2462, 353, 851, 29898, 29881, 29889, 3250, 29897, 13, 1678, 1629, 353, 851, 29898, 29881, 29889, 6360, 29897, 13, 1678, 7234, 353, 851, 29898, 29881, 29889, 18721, 29897, 13, 1678, 11015, 353, 851, 29898, 29881, 29889, 1195, 1082, 29897, 13, 1678, 1473, 353, 851, 29898, 29881, 29889, 7496, 29897, 13, 1678, 1546, 353, 851, 703, 29901, 1159, 12008, 13, 13, 12008, 1753, 4770, 2230, 29898, 7192, 359, 1125, 13, 13, 4706, 931, 353, 12865, 29889, 3707, 580, 13, 4706, 2462, 353, 851, 29898, 2230, 29889, 3250, 29897, 13, 4706, 4098, 353, 851, 29898, 2230, 29889, 10874, 29897, 13, 4706, 7234, 353, 851, 29898, 2230, 29889, 18721, 29897, 13, 4706, 1473, 353, 851, 29898, 2230, 29889, 7496, 29897, 13, 4706, 1629, 353, 851, 29898, 2230, 29889, 6360, 29897, 13, 4706, 11015, 353, 851, 29898, 2230, 29889, 1195, 1082, 29897, 13, 13, 4706, 396, 465, 9929, 278, 3041, 359, 408, 278, 1797, 4586, 393, 674, 367, 451, 2164, 1434, 278, 13, 4706, 396, 29953, 29900, 6199, 13, 13, 13, 4706, 396, 305, 9776, 599, 278, 21971, 304, 278, 6923, 393, 674, 367, 4780, 363, 278, 396, 15807, 362, 13, 13, 13, 4706, 396, 4102, 25202, 6923, 297, 697, 2462, 393, 674, 16326, 599, 278, 4340, 6931, 13, 13, 4706, 2462, 3471, 353, 313, 29906, 29946, 29930, 29953, 29900, 29897, 334, 29871, 29953, 29900, 334, 29871, 29953, 29900, 13, 4706, 835, 13, 4706, 444, 1366, 338, 674, 367, 4780, 1286, 29871, 13, 13, 4706, 1629, 7898, 353, 2462, 3471, 334, 29871, 29941, 29953, 29945, 13, 4706, 4098, 353, 2462, 3471, 334, 29871, 29941, 29900, 13, 4706, 2462, 7898, 353, 2462, 3471, 13, 4706, 7234, 7898, 353, 259, 29953, 29900, 334, 29871, 29953, 29900, 334, 29871, 29953, 29900, 13, 4706, 11015, 7898, 353, 29871, 29953, 29900, 334, 29871, 29953, 29900, 13, 13, 13, 13, 5325, 353, 8853, 29874, 4710, 613, 376, 29890, 4710, 3284, 29883, 4710, 3284, 29881, 4710, 3284, 29872, 4710, 3284, 29888, 4710, 3284, 29887, 4710, 3284, 29882, 4710, 3284, 29875, 4710, 3284, 29926, 4710, 29908, 13, 308, 1699, 29895, 4710, 3284, 29880, 4710, 3284, 29885, 4710, 3284, 29876, 4710, 3284, 29877, 4710, 3284, 29886, 4710, 3284, 29939, 4710, 3284, 29878, 4710, 3284, 29879, 4710, 9092, 12008, 13, 13, 13, 29937, 5325, 353, 1051, 29898, 5325, 29897, 13, 12008, 1454, 848, 297, 2066, 29901, 13, 1678, 565, 7431, 29898, 1272, 29897, 2804, 29871, 29900, 29901, 13, 4706, 1596, 29898, 1272, 29897, 12008, 13, 13, 13, 29937, 29880, 996, 400, 353, 7431, 29898, 2585, 29897, 13, 2277, 1366, 674, 1510, 278, 10478, 11118, 3694, 13, 13, 1753, 11118, 29918, 262, 7295, 13, 1678, 444, 465, 9929, 278, 2286, 408, 11118, 1353, 869, 657, 722, 13, 13, 1678, 11118, 353, 11118, 29918, 262, 29889, 657, 580, 13, 1678, 289, 9093, 353, 11118, 29918, 449, 29889, 657, 580, 13, 13, 1678, 289, 6090, 353, 21577, 2585, 29889, 29911, 4901, 10234, 11974, 29890, 6090, 29889, 3126, 1159, 13, 13, 1678, 1550, 11118, 470, 289, 9093, 2804, 6213, 29901, 13, 4706, 289, 6090, 29889, 7851, 3319, 29908, 29890, 453, 4290, 1115, 11118, 29892, 376, 29890, 453, 6466, 1115, 289, 9093, 1800, 13, 13, 1678, 5401, 353, 323, 1991, 955, 580, 13, 1678, 5401, 29889, 3257, 703, 29890, 6090, 1159, 13, 13, 1678, 5401, 29943, 353, 12218, 29898, 5080, 29892, 25989, 543, 8517, 613, 2674, 2575, 29922, 29903, 3904, 29968, 1430, 467, 4058, 580, 13, 1678, 5401, 29923, 353, 28236, 29898, 5080, 29943, 29892, 4635, 2103, 29922, 29896, 29900, 29892, 262, 643, 1552, 523, 29922, 29896, 29900, 29892, 16434, 543, 10921, 613, 16264, 543, 8517, 613, 726, 11918, 29922, 29890, 6090, 467, 4058, 580, 13, 1678, 5401, 29889, 3396, 7888, 580, 13, 29937, 29880, 13, 29937, 9651, 1899, 29922, 29890, 453, 29918, 262, 467, 4058, 29898, 25367, 29922, 8186, 29897, 13, 13, 13, 4632, 29889, 3396, 7888, 580, 13, 29937, 1649, 9803, 580, 13, 13, 13, 29937, 1202, 29896, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 29886, 3714, 29922, 29896, 29953, 29892, 6448, 29922, 29947, 29892, 285, 29887, 543, 8517, 613, 4079, 29922, 703, 27521, 613, 29906, 29900, 1699, 8934, 4968, 13, 9651, 396, 726, 543, 29974, 613, 16264, 543, 12248, 672, 7254, 613, 1899, 29922, 2892, 29901, 9503, 4164, 703, 29974, 1159, 467, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29953, 29897, 13, 13, 13, 29937, 7290, 29896, 29900, 29922, 3125, 29898, 29888, 29906, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 8305, 29916, 29922, 29896, 29953, 29892, 285, 29887, 543, 9539, 613, 4079, 703, 27521, 613, 29945, 1699, 8934, 4968, 13, 632, 396, 1426, 543, 582, 2238, 613, 16264, 543, 12248, 672, 7254, 613, 1899, 29922, 582, 2238, 467, 7720, 29898, 798, 29922, 29941, 29892, 4914, 29922, 29945, 29897, 13, 13, 29937, 1753, 740, 7295, 13, 259, 396, 1209, 7295, 13, 1678, 396, 1209, 1667, 7295, 13, 259, 396, 3876, 29889, 3396, 7888, 580, 13, 13, 29937, 1454, 278, 6664, 583, 310, 278, 1101, 297, 278, 7423, 310, 278, 1021, 310, 278, 18883, 1639, 297, 278, 1667, 740, 310, 278, 899, 677, 13, 13, 29937, 3396, 580, 13, 13, 2 ]
Server/manifest_server.py
llmay98/WSI-online-analysis-framework
2
121806
<gh_stars>1-10 from flask import render_template, request, redirect from flask import jsonify from flask_login import login_required from Controller import manifest_controller from Controller import thread_controller from Controller import image_processing from Controller import dataset_controller from Controller import annotation_project_controller import os import uuid icon_root = 'static/data/slide_icon/' def add_manifest_server(app): @app.route('/slide_table') @login_required def slide_table(): page_no = request.args.get('page_no', default=1, type=int) item_per_page = request.args.get('item_per_page', default=15, type=int) total_page = (manifest_controller.get_total_number() + item_per_page - 1) // item_per_page if total_page == 0: page_no = 1 elif page_no <= 0: page_no = 1 elif page_no > total_page: page_no = total_page return render_template('slide_table.html', page_no=page_no, total_page=total_page, item_per_page=item_per_page) @app.route('/manifest_table_data') @login_required def table_data(): page_no = request.args.get('page_no', default=1, type=int) item_per_page = request.args.get('item_per_page', default=15, type=int) return jsonify( manifest_controller.get_table(page_no * item_per_page - item_per_page, page_no * item_per_page, 0)) @app.route('/dzi_list_data') @login_required def dzi_list_data(): page_no = request.args.get('page_no', default=1, type=int) item_per_page = request.args.get('item_per_page', default=15, type=int) return jsonify( manifest_controller.get_dzi_path(page_no * item_per_page - item_per_page, page_no * item_per_page)) @app.route('/refresh_manifest_table_data') @login_required def refresh_manifest_table_data(): thread_controller.BackgroundThread(manifest_controller.get_table).start() return redirect('/manifest_table') @app.route('/continue_slide_id') @login_required def continue_slide_id(): manifest_controller.continue_slide_id() thread_controller.BackgroundThread(annotation_project_controller.refresh_npy).start() return jsonify({"mas": 'None'}) @app.route('/remove_wsi') @login_required def remove_wsi(): slide_id = request.args.get('slide_id', type=int) manifest_controller.remove_wsi_by_id(slide_id) return jsonify({"info": "Removed Successfully !", "time": "1"}) @app.route('/uploader', methods=['GET', 'POST']) @login_required def uploader_file(): slide_uuid = request.form['uuid'] file = request.files['file'] print(file.filename[-3:]) if file.filename[-3:] == "txt": if not os.path.exists('manifest_temp/'): os.mkdir('manifest_temp/') file.save('manifest_temp/' + file.filename) dataset_controller.import_manifest('manifest_temp/' + file.filename) return render_template('warning.html', info='file uploaded successfully') else: if slide_uuid == "": slide_uuid = str(uuid.uuid4()) if not os.path.exists('Data/Original_data/' + slide_uuid): os.mkdir('Data/Original_data/' + slide_uuid) try: file.save('Data/Original_data/' + slide_uuid + '/' + file.filename) manifest_controller.add_wsi(slide_uuid, file.filename) except Exception as e: print(e) return render_template('warning.html', info='file uploaded fail') try: if not os.path.exists(icon_root + slide_uuid + '/'): os.mkdir(icon_root + slide_uuid + '/') icon_file_path = icon_root + slide_uuid + '/' + 'icon.png' image_processing.generate_icon_image_from_svs_file( 'Data/Original_data/' + slide_uuid + '/' + file.filename, icon_file_path) except Exception as e: print(e) return render_template('warning.html', info='file uploaded successfully')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 29784, 1053, 4050, 29918, 6886, 29892, 2009, 29892, 6684, 13, 3166, 29784, 1053, 4390, 1598, 13, 3166, 29784, 29918, 7507, 1053, 6464, 29918, 12403, 13, 13, 3166, 15830, 1053, 10419, 29918, 8299, 13, 3166, 15830, 1053, 3244, 29918, 8299, 13, 3166, 15830, 1053, 1967, 29918, 19170, 13, 3166, 15830, 1053, 8783, 29918, 8299, 13, 3166, 15830, 1053, 17195, 29918, 4836, 29918, 8299, 13, 13, 5215, 2897, 13, 5215, 318, 5416, 13, 13, 4144, 29918, 4632, 353, 525, 7959, 29914, 1272, 29914, 19265, 29918, 4144, 22208, 13, 13, 1753, 788, 29918, 29135, 29918, 2974, 29898, 932, 1125, 13, 1678, 732, 932, 29889, 13134, 11219, 19265, 29918, 2371, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 20343, 29918, 2371, 7295, 13, 4706, 1813, 29918, 1217, 353, 2009, 29889, 5085, 29889, 657, 877, 3488, 29918, 1217, 742, 2322, 29922, 29896, 29892, 1134, 29922, 524, 29897, 13, 4706, 2944, 29918, 546, 29918, 3488, 353, 2009, 29889, 5085, 29889, 657, 877, 667, 29918, 546, 29918, 3488, 742, 2322, 29922, 29896, 29945, 29892, 1134, 29922, 524, 29897, 13, 4706, 3001, 29918, 3488, 353, 313, 29135, 29918, 8299, 29889, 657, 29918, 7827, 29918, 4537, 580, 718, 2944, 29918, 546, 29918, 3488, 448, 29871, 29896, 29897, 849, 2944, 29918, 546, 29918, 3488, 13, 4706, 565, 3001, 29918, 3488, 1275, 29871, 29900, 29901, 13, 9651, 1813, 29918, 1217, 353, 29871, 29896, 13, 4706, 25342, 1813, 29918, 1217, 5277, 29871, 29900, 29901, 13, 9651, 1813, 29918, 1217, 353, 29871, 29896, 13, 4706, 25342, 1813, 29918, 1217, 1405, 3001, 29918, 3488, 29901, 13, 9651, 1813, 29918, 1217, 353, 3001, 29918, 3488, 13, 4706, 736, 4050, 29918, 6886, 877, 19265, 29918, 2371, 29889, 1420, 742, 1813, 29918, 1217, 29922, 3488, 29918, 1217, 29892, 3001, 29918, 3488, 29922, 7827, 29918, 3488, 29892, 2944, 29918, 546, 29918, 3488, 29922, 667, 29918, 546, 29918, 3488, 29897, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 29135, 29918, 2371, 29918, 1272, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 1591, 29918, 1272, 7295, 13, 4706, 1813, 29918, 1217, 353, 2009, 29889, 5085, 29889, 657, 877, 3488, 29918, 1217, 742, 2322, 29922, 29896, 29892, 1134, 29922, 524, 29897, 13, 4706, 2944, 29918, 546, 29918, 3488, 353, 2009, 29889, 5085, 29889, 657, 877, 667, 29918, 546, 29918, 3488, 742, 2322, 29922, 29896, 29945, 29892, 1134, 29922, 524, 29897, 13, 4706, 736, 4390, 1598, 29898, 13, 9651, 10419, 29918, 8299, 29889, 657, 29918, 2371, 29898, 3488, 29918, 1217, 334, 2944, 29918, 546, 29918, 3488, 448, 2944, 29918, 546, 29918, 3488, 29892, 1813, 29918, 1217, 334, 2944, 29918, 546, 29918, 3488, 29892, 29871, 29900, 876, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 29881, 2526, 29918, 1761, 29918, 1272, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 270, 2526, 29918, 1761, 29918, 1272, 7295, 13, 4706, 1813, 29918, 1217, 353, 2009, 29889, 5085, 29889, 657, 877, 3488, 29918, 1217, 742, 2322, 29922, 29896, 29892, 1134, 29922, 524, 29897, 13, 4706, 2944, 29918, 546, 29918, 3488, 353, 2009, 29889, 5085, 29889, 657, 877, 667, 29918, 546, 29918, 3488, 742, 2322, 29922, 29896, 29945, 29892, 1134, 29922, 524, 29897, 13, 4706, 736, 4390, 1598, 29898, 13, 9651, 10419, 29918, 8299, 29889, 657, 29918, 29881, 2526, 29918, 2084, 29898, 3488, 29918, 1217, 334, 2944, 29918, 546, 29918, 3488, 448, 2944, 29918, 546, 29918, 3488, 29892, 1813, 29918, 1217, 334, 2944, 29918, 546, 29918, 3488, 876, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 22379, 29918, 29135, 29918, 2371, 29918, 1272, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 11086, 29918, 29135, 29918, 2371, 29918, 1272, 7295, 13, 4706, 3244, 29918, 8299, 29889, 10581, 4899, 29898, 29135, 29918, 8299, 29889, 657, 29918, 2371, 467, 2962, 580, 13, 4706, 736, 6684, 11219, 29135, 29918, 2371, 1495, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 19878, 29918, 19265, 29918, 333, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 6773, 29918, 19265, 29918, 333, 7295, 13, 4706, 10419, 29918, 8299, 29889, 19878, 29918, 19265, 29918, 333, 580, 13, 4706, 3244, 29918, 8299, 29889, 10581, 4899, 29898, 18317, 29918, 4836, 29918, 8299, 29889, 22379, 29918, 29876, 2272, 467, 2962, 580, 13, 4706, 736, 4390, 1598, 3319, 29908, 8247, 1115, 525, 8516, 29915, 1800, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 5992, 29918, 29893, 1039, 1495, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 3349, 29918, 29893, 1039, 7295, 13, 4706, 20343, 29918, 333, 353, 2009, 29889, 5085, 29889, 657, 877, 19265, 29918, 333, 742, 1134, 29922, 524, 29897, 13, 4706, 10419, 29918, 8299, 29889, 5992, 29918, 29893, 1039, 29918, 1609, 29918, 333, 29898, 19265, 29918, 333, 29897, 13, 4706, 736, 4390, 1598, 3319, 29908, 3888, 1115, 376, 7301, 8238, 21397, 3730, 1738, 613, 376, 2230, 1115, 376, 29896, 29908, 1800, 13, 13, 1678, 732, 932, 29889, 13134, 11219, 9009, 261, 742, 3519, 29922, 1839, 7194, 742, 525, 5438, 11287, 13, 1678, 732, 7507, 29918, 12403, 13, 1678, 822, 6441, 261, 29918, 1445, 7295, 13, 4706, 20343, 29918, 25118, 353, 2009, 29889, 689, 1839, 25118, 2033, 13, 4706, 934, 353, 2009, 29889, 5325, 1839, 1445, 2033, 13, 4706, 1596, 29898, 1445, 29889, 9507, 14352, 29941, 29901, 2314, 13, 4706, 565, 934, 29889, 9507, 14352, 29941, 17531, 1275, 376, 3945, 1115, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 877, 29135, 29918, 7382, 22208, 1125, 13, 18884, 2897, 29889, 11256, 3972, 877, 29135, 29918, 7382, 29914, 1495, 13, 9651, 934, 29889, 7620, 877, 29135, 29918, 7382, 22208, 718, 934, 29889, 9507, 29897, 13, 9651, 8783, 29918, 8299, 29889, 5215, 29918, 29135, 877, 29135, 29918, 7382, 22208, 718, 934, 29889, 9507, 29897, 13, 9651, 736, 4050, 29918, 6886, 877, 27392, 29889, 1420, 742, 5235, 2433, 1445, 20373, 8472, 1495, 13, 4706, 1683, 29901, 13, 9651, 565, 20343, 29918, 25118, 1275, 376, 1115, 13, 18884, 20343, 29918, 25118, 353, 851, 29898, 25118, 29889, 25118, 29946, 3101, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 877, 1469, 29914, 26036, 29918, 1272, 22208, 718, 20343, 29918, 25118, 1125, 13, 18884, 2897, 29889, 11256, 3972, 877, 1469, 29914, 26036, 29918, 1272, 22208, 718, 20343, 29918, 25118, 29897, 13, 9651, 1018, 29901, 13, 18884, 934, 29889, 7620, 877, 1469, 29914, 26036, 29918, 1272, 22208, 718, 20343, 29918, 25118, 718, 8207, 29915, 718, 934, 29889, 9507, 29897, 13, 18884, 10419, 29918, 8299, 29889, 1202, 29918, 29893, 1039, 29898, 19265, 29918, 25118, 29892, 934, 29889, 9507, 29897, 13, 9651, 5174, 8960, 408, 321, 29901, 13, 18884, 1596, 29898, 29872, 29897, 13, 18884, 736, 4050, 29918, 6886, 877, 27392, 29889, 1420, 742, 5235, 2433, 1445, 20373, 4418, 1495, 13, 9651, 1018, 29901, 13, 18884, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 4144, 29918, 4632, 718, 20343, 29918, 25118, 718, 8207, 29374, 13, 462, 1678, 2897, 29889, 11256, 3972, 29898, 4144, 29918, 4632, 718, 20343, 29918, 25118, 718, 8207, 1495, 13, 18884, 9849, 29918, 1445, 29918, 2084, 353, 9849, 29918, 4632, 718, 20343, 29918, 25118, 718, 8207, 29915, 718, 525, 4144, 29889, 2732, 29915, 13, 18884, 1967, 29918, 19170, 29889, 17158, 29918, 4144, 29918, 3027, 29918, 3166, 29918, 29879, 4270, 29918, 1445, 29898, 13, 462, 1678, 525, 1469, 29914, 26036, 29918, 1272, 22208, 718, 20343, 29918, 25118, 718, 8207, 29915, 718, 934, 29889, 9507, 29892, 13, 462, 1678, 9849, 29918, 1445, 29918, 2084, 29897, 13, 9651, 5174, 8960, 408, 321, 29901, 13, 18884, 1596, 29898, 29872, 29897, 13, 9651, 736, 4050, 29918, 6886, 877, 27392, 29889, 1420, 742, 5235, 2433, 1445, 20373, 8472, 1495, 13, 2 ]
lib/EXP_label.py
devsecops-SRC/CVE-Flow
0
169242
<reponame>devsecops-SRC/CVE-Flow import requests import json import math import re from bs4 import BeautifulSoup import codecs import os import random from multiprocessing import Process,Pool import pandas import configparser from sqlite3_operate import SQLite,create_table from utils import path,time_delta,get_ua,list2tuple_dict from seebug_crawler import seebug_headers def cve_details_parser(url): """ 单次解析,返回cve id的exp标记 :param url: :return label: :type:int :value:1不存在,2存在且无exp,3存在且有msf exp标记,4存在且有public exploit,7存在且有msf和pub """ try: r=requests.get(url,timeout=5).text if re.search(r'(\d) public exploit',r): if re.search(r'(\d) Metasploit modules',r): label=7 else: label=4 elif re.search(r'(\d) Metasploit modules',r): label=3 elif re.search(r'Unknown CVE ID',r): label=1 else: label=2 return label except Exception as e: print("[!] Error %s %s in function `cve_details_parser`" %(url,str(e))) return False def cve_exists(db='nvd',table='nvd_cve',key='CVE_Items_cve_CVE_data_meta_ID'): """ 取本地数据库已有的CVE id等单字段 :return exist_cid: :type:list :value:['1','2','3'] """ so=SQLite('../data/{db}.db'.format(db=db)) sql='select {key} from {table}'.format(table=table,key=key) exist_cid=so.query(sql) if exist_cid: exist_cid=[i[0] for i in exist_cid] else: exist_cid=[] return so,exist_cid def cve_details_exp(): """ 从cvedetails.com爬cve详情和exp label:public/msf """ create_table(db='cvedetail',table='cvedetail_exp',key=['cve_id','label'],primary_key='cve_id') so,exist_cid=cve_exists(db='cvedetail',table='cvedetail_exp',key='cve_id') so1,all_cid=cve_exists(db='nvd',table='nvd_cve',key='CVE_Items_cve_CVE_data_meta_ID') add_cid=list(set(all_cid)^set(exist_cid)) cve_exp=dict() for cid in add_cid: url="https://www.cvedetails.com/cve/{}/".format(cid) label=cve_details_parser(url) print(url,label) if label: cve_exp[cid]=(cid,label) sql='replace INTO cvedetail_exp (cve_id, label) VALUES (?, ?)' so.executemany(sql,cve_exp.values()) return 'cvedetails.com',cve_exp def nvd_nist_exp(): """ 从nvd.nist中reference source中提取CVE exp label 打标策略之一:exploit-db verified or verified """ so=SQLite('../data/nvd.db') sql='select CVE_Items_cve_CVE_data_meta_ID from nvd_cve where CVE_Items_cve_references_reference_data_tags like "%Exploit%"' r=so.query(sql) ids=[i[0] for i in r] cve_exp=dict() for cid in ids: url='https://nvd.nist.gov/vuln/detail/{}'.format(cid) cve_exp[cid]=url return 'nvd.nist.gov',cve_exp def mitre_expdb_exp(): """ 从cve.mitre.org中提取CVE exp label,弥补nvd.nist中Resource中Exploit标记的不足 更新策略:全量更新,返回全部数据 :return cve_exp: :type:dict :value:{'cve-id':'edb-id'} """ hfile=path('../data/nvd',time_delta()+'source-EXPLOIT-DB.html') if not os.path.exists(hfile): r=requests.get('https://cve.mitre.org/data/refs/refmap/source-EXPLOIT-DB.html') html=r.content with codecs.open(hfile,'wb') as f: f.write(html) cve_exp=dict() if os.path.exists(hfile): with codecs.open(hfile,'rb') as f: soup=BeautifulSoup(f,'html.parser') for tr in soup.find_all('tr'): exp_db='' cve='' for td in tr.find_all('td'): t=str(td) if re.search(r'EXPLOIT-DB:(\d+)',t): r=re.search(r'EXPLOIT-DB:(\d+)',t) exp_db=r.group(1) elif re.search(r'(CVE-[\d]+-[\d]+)',t): r=re.findall(r'(CVE-[\d]+-[\d]+)',t) cve=[] for c in r: cve.append(c) else: continue if exp_db and cve: if isinstance(cve,list): for c in cve: cve_exp[c]=exp_db else: cve_exp[cve]=exp_db return 'cve.mitre.org',cve_exp def expdb_parser(eid): """ 单次解析,返回单条数据 :param eid: :return exp_values: :type:dict :value:{'EDB-ID:': '37074', 'CVE:': '2015-4039;2015-4038', 'Author:': '<NAME>', 'Type:': 'webapps', 'Platform:': 'PHP', 'Date:': '2015-05-21'}: """ exp_values=dict() url='https://www.exploit-db.com/exploits/'+str(eid) r=requests.get(url,headers={'User-Agent':get_ua()},timeout=10) html=r.content if r.status_code==200 and b'404 Page Not Found' not in html: soup=BeautifulSoup(html,'html.parser') for div in soup.find_all('div',class_='col-6 text-center'): exp_value=list(div.stripped_strings) if len(exp_value)>=2: exp_values[exp_value[0]]=";".join(exp_value[1:]) else: exp_values[exp_value[0]]='' return exp_values else: return False def offensive_download(): try: url='https://raw.githubusercontent.com/offensive-security/exploitdb/master/files_exploits.csv' r=requests.get(url) with codecs.open('../data/exploit-db/offensive_expfile.csv','wb') as f: f.write(r.content) print("[+] DOWNLOAD NEW EXPLOIT-DB") except Exception as e: print("[!] DOWNLOAD %s error" %url) def expdb_exists(): """ 从offensive Security github file exploits取最新的全量edb-id """ offensive_download() if os.path.exists('../data/exploit-db/offensive_expfile.csv'): exps=pandas.read_csv('../data/exploit-db/offensive_expfile.csv') return list(exps['id'].values) else: return False def expdb_exp(batch=False,batch_size=10): """ 从exploit-db.com中提取CVE exp label,弥补不足 更新策略:增量覆盖 """ create_table(db='exp2',table='expdb',key=['edb_id','cve_id','author','type','platform','date'],primary_key='edb_id') so,exist_eid=cve_exists(db='exp2',table='expdb',key='edb_id') all_eid=expdb_exists() all_eid=[str(i) for i in all_eid] add_eid=list(set(all_eid)^set(exist_eid)) print(add_eid) j=0 cve_exp=dict() for eid in add_eid: try: exp_values=expdb_parser(eid) if exp_values: cve_exp[eid]=tuple(exp_values.values()) print(cve_exp) j=j+1 if batch: if j%batch_size==0: ### todo sql='replace INTO expdb (edb_id, cve_id, author, type, platform, date) VALUES (?, ?, ?, ?, ?, ?)' so.executemany(sql,cve_exp.values()) else: sql='replace INTO expdb (edb_id, cve_id, author, type, platform, date) VALUES (?, ?, ?, ?, ?, ?)' so.execute(sql,tuple(exp_values.values())) else: print("[!] exp-values Not Found") except Exception as e: print("[!] DOWNLOAD ERROR %s error:%s" %(eid,repr(e))) so.close() class GitHub(object): def __init__(self, **config_options): self.__dict__.update(**config_options) self.session = requests.Session() if hasattr(self, 'api_token'): self.session.headers['Authorization'] = 'token %s' % self.api_token elif hasattr(self, 'username') and hasattr(self, 'password'): self.session.auth = (self.username, self.password) def call_to_the_api(self, *args): try: res=self.session.get(*args) except Exception as e: return # do stuff with args return res def single_parser(gh,items): """ 解析单个仓库:仓库名,描述,目录名,获取CVE和exp标记 """ cve_list=[] for item in items: name=item['name'] description=item['description'] content_url=item['contents_url'] name=re.search(r'CVE-(\d+)-(\d+)',name) description=re.search(r'CVE-(\d+)-(\d+)',description) if name: cve_list.append(name.group(0)) continue elif description: cve_list.append(description.group(0)) continue elif content_url: r=gh.call_to_the_api(content_url) content=r.text match=re.findall(r'(CVE-[\d]+-[\d]+)',content) if match: match=list(set(match)) cve_list.extend(match) cve_list=list(set(cve_list)) return cve_list def single_request(gh,kname='CVE exploit',page=1,per_page=50): """ 解析单页仓库数据,获取CVE和exp标记 """ cve_list=[] url="https://api.github.com/search/repositories?q={key_name}&sort=updated&order=desc&page={page}&per_page={per_page}".format(key_name=kname,page=page,per_page=per_page) r=gh.call_to_the_api(url) if r: content=r.text js=json.loads(content) items=js['items'] cve_list.extend(single_parser(gh,items)) total_count=js['total_count'] return total_count,cve_list else: return False,False def max_total_count(gh,kname='CVE exploit',page=1,per_page=50): """ 一次解析,返回检索结果总条数 """ cve_list=[] url="https://api.github.com/search/repositories?q={key_name}&sort=updated&order=desc&page={page}&per_page={per_page}".format(key_name=kname,page=page,per_page=per_page) r=gh.call_to_the_api(url) if r: content=r.text js=json.loads(content) total_count=js['total_count'] return total_count else: return def github_exp(api_token,per_page=100): """ 根据(多组)关键词搜索github上cve和exp标记 更新策略:支持存量和增量更新 """ # 本地和远程对比->差集 create_table(db='github',table='github_exp',key=['cve_id','label'],primary_key='cve_id') ## 选择sqlite3 而不是json存储的原因在易于扩展和检索 so,exist_cid=cve_exists(db='github',table='github_exp',key='cve_id') conf=configparser.ConfigParser() conf.read('conf/info.conf') local_count=conf.get('CVE_Label','total_count') key_name=conf.get('CVE_Label','search_key') gh=GitHub(api_token=api_token) total_count=max_total_count(gh=gh,kname=key_name,per_page=per_page) cve_list=[] if total_count: if total_count>1000: total_count=1000 add_count=total_count-int(local_count) print("local num:%s,total num:%s,add num:%s" %(local_count,total_count,add_count)) # 补全差集 page_count=math.ceil(add_count/per_page) if page_count>0: for page in range(page_count,-1,-1): t,c=single_request(gh=gh,kname=key_name,per_page=per_page,page=page) if t: print(c) cve_list.extend(c) else: print("[!] Error in call_to_the_api") else: print("[!] WARNING:No Updated in function github_cve") # 插入sqlite3 if page_count>0: cve_tuple=list2tuple_dict(cve_list,label=1) sql='replace INTO github_exp (cve_id, label) VALUES (?, ?)' so.executemany(sql,cve_tuple.values()) conf.set('CVE_Label','total_count',str(total_count)) with open('conf/info.conf', 'w') as configfile: conf.write(configfile) else: pass else: print("[!] Error in call_to_the_api") return return cve_list def seebug_page_parser(url,headers): """ 解析seebug单页,获取CVE exp label,返回多条数据 :return cve_page: :type:dict :value:{'cve_id1':0,'cve_id2':1,'cve_idN':0 or 1} """ r=requests.get(url,headers=headers) soup=BeautifulSoup(r.content,'html.parser') cve_page=dict() for td_date in soup.find_all('td',class_='text-center datetime hidden-sm hidden-xs'): date=td_date.text td_status=td_date.find_next('td',class_='text-center hidden-sm hidden-xs ') i=td_status.find_all('i')[0] cve_id=re.search(r'(CVE-[\d]+-[\d]+)',str(i)) if cve_id: cid=cve_id.group(0) if " ".join(td_status.find_all('i')[1].get('class'))=='fa fa-rocket text-muted ': label=0 elif " ".join(td_status.find_all('i')[1].get('class'))=='fa fa-rocket ': label=1 else: print("[!] WARNING poc_value is not 0 or 1") cve_page[cid]=(cid,label,date) else: # 非cve的漏洞 pass return cve_page def seebug_max_page(url='https://www.seebug.org/vuldb/vulnerabilities'): """ 获取seebug漏洞数据的最大页面数 :return max_page: :type:int :value:N :return headers: :type:dict :value:浏览器头 """ headers=seebug_headers(url) r=requests.get(url,headers=headers) regex=re.compile(r'page=(\d+)') num=re.findall(regex,r.text) num=[int(i) for i in num] max_page=max(num) print("[+] Got max page:%d" %max_page) return max_page,headers def seebug_exp(stock=True): """ 爬取seebug全部cve数据 :return source: :type:str :value:'seebug' :return cve_seebug: :type:dict :value:seebug全部cve数据,形如{'CVE-2020-0001':0} """ create_table(db='seebug',table='seebug_exp',key=['cve_id','label','date'],primary_key='cve_id') so,exist_cid=cve_exists(db='seebug',table='seebug_exp',key='cve_id') max_page,headers=seebug_max_page() cve_seebug=dict() if stock: for i in range(1,max_page): vul_url='https://www.seebug.org/vuldb/vulnerabilities?page={}'.format(str(i)) cve_page=seebug_page_parser(url=vul_url,headers=headers) print("[+] Got page:%d" %(i)) cve_seebug={**cve_seebug,**cve_page} sql='replace INTO seebug_exp (cve_id, label, date) VALUES (?, ?, ?)' so.executemany(sql,cve_seebug.values()) else: page=1 et=0 while(page>0): vul_url='https://www.seebug.org/vuldb/vulnerabilities?page={}'.format(str(page)) cve_page=seebug_page_parser(url=vul_url,headers=headers) for i in cve_page.values(): if i[0] in exist_cid: et=et+1 if et>0: sql='replace INTO seebug_exp (cve_id, label, date) VALUES (?, ?, ?)' so.executemany(sql,cve_page.values()) cve_seebug={**cve_seebug,**cve_page} break else: page=page+1 return 'seebug',cve_seebug def securityfocus_exp(): """ security_focus exp label """ def symantic_exp(): """ symantic exp label """ if __name__=='__main__': #b,nexp=nvd_nist_exp() #c,mexp=mitre_expdb_exp() #print(set(list(mitre_expdb_exp()[1].keys()))^set(list(nvd_nist_exp()[1].keys()))) #expdb_exp() #cve_details_exp() # github:res/code/commits/issues->cve exp label and github link #cve_list=github_exp(api_token='<PASSWORD>') #print(cve_list) # other vul db, such as seebug, 0day.today etc. #print(seebug_exp(stock=False)) # SecurityFocus # in the wild pass
[ 1, 529, 276, 1112, 420, 29958, 3359, 3471, 3554, 29899, 29903, 10363, 29914, 29907, 12064, 29899, 17907, 13, 5215, 7274, 13, 5215, 4390, 13, 5215, 5844, 13, 5215, 337, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 5215, 775, 2395, 13, 5215, 2897, 13, 5215, 4036, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 29892, 11426, 13, 5215, 11701, 13, 5215, 2295, 16680, 13, 3166, 21120, 29941, 29918, 3372, 403, 1053, 23299, 29892, 3258, 29918, 2371, 13, 3166, 3667, 29879, 1053, 2224, 29892, 2230, 29918, 4181, 29892, 657, 29918, 3357, 29892, 1761, 29906, 23583, 29918, 8977, 13, 3166, 409, 774, 688, 29918, 29883, 1610, 1358, 1053, 409, 774, 688, 29918, 13662, 13, 13, 1753, 274, 345, 29918, 14144, 29918, 16680, 29898, 2271, 1125, 13, 1678, 9995, 13, 268, 31166, 30936, 31201, 233, 161, 147, 30214, 31086, 30742, 29883, 345, 1178, 30210, 4548, 31062, 31410, 13, 1678, 584, 3207, 3142, 29901, 13, 1678, 584, 2457, 3858, 29901, 13, 4706, 584, 1853, 29901, 524, 13, 4706, 584, 1767, 29901, 29896, 30413, 30946, 30505, 30214, 29906, 30946, 30505, 231, 187, 151, 31352, 4548, 30214, 29941, 30946, 30505, 231, 187, 151, 30417, 1516, 29888, 1518, 31062, 31410, 30214, 29946, 30946, 30505, 231, 187, 151, 30417, 3597, 16035, 277, 29892, 29955, 30946, 30505, 231, 187, 151, 30417, 1516, 29888, 30503, 5467, 13, 1678, 9995, 13, 1678, 1018, 29901, 13, 4706, 364, 29922, 24830, 29889, 657, 29898, 2271, 29892, 15619, 29922, 29945, 467, 726, 13, 4706, 565, 337, 29889, 4478, 29898, 29878, 29915, 1194, 29881, 29897, 970, 16035, 277, 742, 29878, 1125, 13, 9651, 565, 337, 29889, 4478, 29898, 29878, 29915, 1194, 29881, 29897, 4737, 4692, 417, 277, 10585, 742, 29878, 1125, 13, 18884, 3858, 29922, 29955, 13, 9651, 1683, 29901, 13, 18884, 3858, 29922, 29946, 13, 4706, 25342, 337, 29889, 4478, 29898, 29878, 29915, 1194, 29881, 29897, 4737, 4692, 417, 277, 10585, 742, 29878, 1125, 13, 9651, 3858, 29922, 29941, 13, 4706, 25342, 337, 29889, 4478, 29898, 29878, 29915, 14148, 315, 12064, 3553, 742, 29878, 1125, 13, 9651, 3858, 29922, 29896, 13, 4706, 1683, 29901, 13, 9651, 3858, 29922, 29906, 13, 4706, 736, 3858, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 1596, 703, 29961, 29991, 29962, 4829, 1273, 29879, 1273, 29879, 297, 740, 421, 29883, 345, 29918, 14144, 29918, 16680, 29952, 29908, 1273, 29898, 2271, 29892, 710, 29898, 29872, 4961, 13, 4706, 736, 7700, 13, 13, 1753, 274, 345, 29918, 9933, 29898, 2585, 2433, 29876, 27491, 742, 2371, 2433, 29876, 27491, 29918, 29883, 345, 742, 1989, 2433, 29907, 12064, 29918, 6913, 29918, 29883, 345, 29918, 29907, 12064, 29918, 1272, 29918, 7299, 29918, 1367, 29374, 13, 1678, 9995, 13, 268, 30683, 30346, 30533, 30354, 30763, 31700, 31290, 30417, 30210, 29907, 12064, 1178, 31184, 31166, 30578, 31559, 13, 1678, 584, 2457, 1863, 29918, 25232, 29901, 13, 4706, 584, 1853, 29901, 1761, 13, 4706, 584, 1767, 29901, 1839, 29896, 3788, 29906, 3788, 29941, 2033, 13, 1678, 9995, 13, 1678, 577, 29922, 4176, 568, 877, 6995, 1272, 19248, 2585, 1836, 2585, 4286, 4830, 29898, 2585, 29922, 2585, 876, 13, 1678, 4576, 2433, 2622, 426, 1989, 29913, 515, 426, 2371, 29913, 4286, 4830, 29898, 2371, 29922, 2371, 29892, 1989, 29922, 1989, 29897, 13, 1678, 1863, 29918, 25232, 29922, 578, 29889, 1972, 29898, 2850, 29897, 13, 1678, 565, 1863, 29918, 25232, 29901, 13, 4706, 1863, 29918, 25232, 11759, 29875, 29961, 29900, 29962, 363, 474, 297, 1863, 29918, 25232, 29962, 13, 1678, 1683, 29901, 13, 4706, 1863, 29918, 25232, 29922, 2636, 13, 268, 13, 1678, 736, 577, 29892, 28997, 29918, 25232, 13, 13, 1753, 274, 345, 29918, 14144, 29918, 4548, 7295, 13, 1678, 9995, 13, 268, 31594, 29883, 1490, 300, 2234, 29889, 510, 234, 139, 175, 29883, 345, 235, 178, 169, 30993, 30503, 4548, 3858, 29901, 3597, 29914, 1516, 29888, 13, 1678, 9995, 13, 1678, 1653, 29918, 2371, 29898, 2585, 2433, 29883, 1490, 300, 737, 742, 2371, 2433, 29883, 1490, 300, 737, 29918, 4548, 742, 1989, 29922, 1839, 29883, 345, 29918, 333, 3788, 1643, 7464, 16072, 29918, 1989, 2433, 29883, 345, 29918, 333, 1495, 13, 1678, 577, 29892, 28997, 29918, 25232, 29922, 29883, 345, 29918, 9933, 29898, 2585, 2433, 29883, 1490, 300, 737, 742, 2371, 2433, 29883, 1490, 300, 737, 29918, 4548, 742, 1989, 2433, 29883, 345, 29918, 333, 1495, 13, 1678, 577, 29896, 29892, 497, 29918, 25232, 29922, 29883, 345, 29918, 9933, 29898, 2585, 2433, 29876, 27491, 742, 2371, 2433, 29876, 27491, 29918, 29883, 345, 742, 1989, 2433, 29907, 12064, 29918, 6913, 29918, 29883, 345, 29918, 29907, 12064, 29918, 1272, 29918, 7299, 29918, 1367, 1495, 13, 1678, 788, 29918, 25232, 29922, 1761, 29898, 842, 29898, 497, 29918, 25232, 4887, 842, 29898, 28997, 29918, 25232, 876, 13, 268, 13, 1678, 274, 345, 29918, 4548, 29922, 8977, 580, 13, 1678, 363, 274, 333, 297, 788, 29918, 25232, 29901, 13, 4706, 3142, 543, 991, 597, 1636, 29889, 29883, 1490, 300, 2234, 29889, 510, 29914, 29883, 345, 19248, 6822, 1642, 4830, 29898, 25232, 29897, 13, 4706, 3858, 29922, 29883, 345, 29918, 14144, 29918, 16680, 29898, 2271, 29897, 13, 4706, 1596, 29898, 2271, 29892, 1643, 29897, 13, 4706, 565, 3858, 29901, 13, 9651, 274, 345, 29918, 4548, 29961, 25232, 29962, 7607, 25232, 29892, 1643, 29897, 13, 1678, 4576, 2433, 6506, 11646, 274, 1490, 300, 737, 29918, 4548, 313, 29883, 345, 29918, 333, 29892, 3858, 29897, 15673, 313, 14579, 1577, 16029, 13, 1678, 577, 29889, 4258, 329, 331, 1384, 29898, 2850, 29892, 29883, 345, 29918, 4548, 29889, 5975, 3101, 13, 1678, 736, 525, 29883, 1490, 300, 2234, 29889, 510, 742, 29883, 345, 29918, 4548, 13, 13, 1753, 302, 27491, 29918, 29876, 391, 29918, 4548, 7295, 13, 1678, 9995, 13, 268, 31594, 29876, 27491, 29889, 29876, 391, 30275, 5679, 2752, 30275, 31302, 30683, 29907, 12064, 1518, 3858, 13, 268, 31656, 31062, 234, 176, 153, 234, 152, 168, 30577, 30287, 30383, 4548, 417, 277, 29899, 2585, 26834, 470, 26834, 13, 1678, 9995, 13, 1678, 577, 29922, 4176, 568, 877, 6995, 1272, 29914, 29876, 27491, 29889, 2585, 1495, 13, 1678, 4576, 2433, 2622, 315, 12064, 29918, 6913, 29918, 29883, 345, 29918, 29907, 12064, 29918, 1272, 29918, 7299, 29918, 1367, 515, 302, 27491, 29918, 29883, 345, 988, 315, 12064, 29918, 6913, 29918, 29883, 345, 29918, 276, 10662, 29918, 5679, 29918, 1272, 29918, 11338, 763, 11860, 9544, 417, 277, 23577, 29915, 13, 1678, 364, 29922, 578, 29889, 1972, 29898, 2850, 29897, 13, 1678, 18999, 11759, 29875, 29961, 29900, 29962, 363, 474, 297, 364, 29962, 13, 13, 1678, 274, 345, 29918, 4548, 29922, 8977, 580, 13, 1678, 363, 274, 333, 297, 18999, 29901, 13, 4706, 3142, 2433, 991, 597, 29876, 27491, 29889, 29876, 391, 29889, 13513, 29914, 29894, 352, 29876, 29914, 16432, 29914, 8875, 4286, 4830, 29898, 25232, 29897, 13, 4706, 274, 345, 29918, 4548, 29961, 25232, 13192, 2271, 13, 268, 13, 1678, 736, 525, 29876, 27491, 29889, 29876, 391, 29889, 13513, 742, 29883, 345, 29918, 4548, 13, 13, 1753, 1380, 276, 29918, 4548, 2585, 29918, 4548, 7295, 13, 1678, 9995, 13, 268, 31594, 29883, 345, 29889, 2415, 276, 29889, 990, 30275, 31302, 30683, 29907, 12064, 1518, 3858, 30214, 232, 191, 168, 235, 164, 168, 29876, 27491, 29889, 29876, 391, 30275, 6848, 30275, 9544, 417, 277, 31062, 31410, 30210, 30413, 31722, 13, 268, 31100, 30374, 234, 176, 153, 234, 152, 168, 30383, 30753, 31180, 31100, 30374, 30214, 31086, 30742, 30753, 30636, 30354, 30763, 13, 1678, 584, 2457, 274, 345, 29918, 4548, 29901, 13, 4706, 584, 1853, 29901, 8977, 13, 4706, 584, 1767, 29901, 10998, 29883, 345, 29899, 333, 22099, 287, 29890, 29899, 333, 10827, 13, 1678, 9995, 13, 1678, 298, 1445, 29922, 2084, 877, 6995, 1272, 29914, 29876, 27491, 742, 2230, 29918, 4181, 580, 23097, 4993, 29899, 5746, 29925, 3927, 1806, 29899, 4051, 29889, 1420, 1495, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 29882, 1445, 1125, 13, 4706, 364, 29922, 24830, 29889, 657, 877, 991, 597, 29883, 345, 29889, 2415, 276, 29889, 990, 29914, 1272, 29914, 24539, 29914, 999, 1958, 29914, 4993, 29899, 5746, 29925, 3927, 1806, 29899, 4051, 29889, 1420, 1495, 13, 4706, 3472, 29922, 29878, 29889, 3051, 13, 4706, 411, 775, 2395, 29889, 3150, 29898, 29882, 1445, 5501, 29893, 29890, 1495, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 1420, 29897, 13, 13, 1678, 274, 345, 29918, 4548, 29922, 8977, 580, 13, 1678, 565, 2897, 29889, 2084, 29889, 9933, 29898, 29882, 1445, 1125, 13, 4706, 411, 775, 2395, 29889, 3150, 29898, 29882, 1445, 5501, 6050, 1495, 408, 285, 29901, 13, 9651, 22300, 29922, 3629, 1300, 6845, 29903, 1132, 29898, 29888, 5501, 1420, 29889, 16680, 1495, 13, 9651, 363, 534, 297, 22300, 29889, 2886, 29918, 497, 877, 509, 29374, 13, 18884, 1518, 29918, 2585, 2433, 29915, 13, 18884, 274, 345, 2433, 29915, 13, 18884, 363, 22599, 297, 534, 29889, 2886, 29918, 497, 877, 1594, 29374, 13, 462, 1678, 260, 29922, 710, 29898, 1594, 29897, 13, 462, 268, 13, 462, 1678, 565, 337, 29889, 4478, 29898, 29878, 29915, 5746, 29925, 3927, 1806, 29899, 4051, 29901, 1194, 29881, 28135, 742, 29873, 1125, 13, 462, 4706, 364, 29922, 276, 29889, 4478, 29898, 29878, 29915, 5746, 29925, 3927, 1806, 29899, 4051, 29901, 1194, 29881, 28135, 742, 29873, 29897, 13, 462, 4706, 1518, 29918, 2585, 29922, 29878, 29889, 2972, 29898, 29896, 29897, 13, 462, 1678, 25342, 337, 29889, 4478, 29898, 29878, 12215, 29907, 12064, 29899, 7110, 29881, 10062, 29899, 7110, 29881, 10062, 29897, 742, 29873, 1125, 13, 462, 4706, 364, 29922, 276, 29889, 2886, 497, 29898, 29878, 12215, 29907, 12064, 29899, 7110, 29881, 10062, 29899, 7110, 29881, 10062, 29897, 742, 29873, 29897, 13, 462, 4706, 274, 345, 29922, 2636, 13, 462, 4706, 363, 274, 297, 364, 29901, 13, 462, 9651, 274, 345, 29889, 4397, 29898, 29883, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 6773, 13, 462, 13, 18884, 565, 1518, 29918, 2585, 322, 274, 345, 29901, 13, 462, 1678, 565, 338, 8758, 29898, 29883, 345, 29892, 1761, 1125, 13, 462, 4706, 363, 274, 297, 274, 345, 29901, 13, 462, 9651, 274, 345, 29918, 4548, 29961, 29883, 13192, 4548, 29918, 2585, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 274, 345, 29918, 4548, 29961, 29883, 345, 13192, 4548, 29918, 2585, 13, 268, 13, 1678, 736, 525, 29883, 345, 29889, 2415, 276, 29889, 990, 742, 29883, 345, 29918, 4548, 13, 13, 1753, 1518, 2585, 29918, 16680, 29898, 29872, 333, 1125, 13, 1678, 9995, 13, 268, 31166, 30936, 31201, 233, 161, 147, 30214, 31086, 30742, 31166, 31217, 30354, 30763, 13, 1678, 584, 3207, 321, 333, 29901, 13, 1678, 584, 2457, 1518, 29918, 5975, 29901, 13, 4706, 584, 1853, 29901, 8977, 13, 4706, 584, 1767, 29901, 10998, 3352, 29933, 29899, 1367, 29901, 2396, 525, 29941, 29955, 29900, 29955, 29946, 742, 525, 29907, 12064, 29901, 2396, 525, 29906, 29900, 29896, 29945, 29899, 29946, 29900, 29941, 29929, 29936, 29906, 29900, 29896, 29945, 29899, 29946, 29900, 29941, 29947, 742, 525, 13720, 29901, 2396, 12801, 5813, 29958, 742, 525, 1542, 29901, 2396, 525, 2676, 13371, 742, 525, 21889, 29901, 2396, 525, 17130, 742, 525, 2539, 29901, 2396, 525, 29906, 29900, 29896, 29945, 29899, 29900, 29945, 29899, 29906, 29896, 29915, 6177, 13, 1678, 9995, 13, 1678, 1518, 29918, 5975, 29922, 8977, 580, 13, 1678, 3142, 2433, 991, 597, 1636, 29889, 4548, 417, 277, 29899, 2585, 29889, 510, 29914, 4548, 417, 1169, 29914, 18717, 710, 29898, 29872, 333, 29897, 13, 1678, 364, 29922, 24830, 29889, 657, 29898, 2271, 29892, 13662, 3790, 29915, 2659, 29899, 19661, 2396, 657, 29918, 3357, 580, 1118, 15619, 29922, 29896, 29900, 29897, 13, 1678, 3472, 29922, 29878, 29889, 3051, 13, 1678, 565, 364, 29889, 4882, 29918, 401, 1360, 29906, 29900, 29900, 322, 289, 29915, 29946, 29900, 29946, 9305, 2216, 7460, 29915, 451, 297, 3472, 29901, 13, 4706, 22300, 29922, 3629, 1300, 6845, 29903, 1132, 29898, 1420, 5501, 1420, 29889, 16680, 1495, 13, 4706, 363, 1933, 297, 22300, 29889, 2886, 29918, 497, 877, 4563, 742, 1990, 29918, 2433, 1054, 29899, 29953, 1426, 29899, 5064, 29374, 13, 9651, 1518, 29918, 1767, 29922, 1761, 29898, 4563, 29889, 303, 374, 2986, 29918, 19651, 29897, 13, 9651, 565, 7431, 29898, 4548, 29918, 1767, 15410, 29922, 29906, 29901, 13, 18884, 1518, 29918, 5975, 29961, 4548, 29918, 1767, 29961, 29900, 5262, 543, 29936, 1642, 7122, 29898, 4548, 29918, 1767, 29961, 29896, 29901, 2314, 13, 9651, 1683, 29901, 13, 18884, 1518, 29918, 5975, 29961, 4548, 29918, 1767, 29961, 29900, 5262, 2433, 29915, 13, 308, 13, 4706, 736, 1518, 29918, 5975, 13, 1678, 1683, 29901, 13, 4706, 736, 7700, 13, 13, 1753, 1283, 6270, 29918, 10382, 7295, 13, 1678, 1018, 29901, 13, 4706, 3142, 2433, 991, 597, 1610, 29889, 3292, 1792, 3051, 29889, 510, 29914, 2696, 6270, 29899, 8926, 29914, 4548, 417, 277, 2585, 29914, 6207, 29914, 5325, 29918, 4548, 417, 1169, 29889, 7638, 29915, 13, 4706, 364, 29922, 24830, 29889, 657, 29898, 2271, 29897, 13, 4706, 411, 775, 2395, 29889, 3150, 877, 6995, 1272, 29914, 4548, 417, 277, 29899, 2585, 29914, 2696, 6270, 29918, 4548, 1445, 29889, 7638, 3788, 29893, 29890, 1495, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 29878, 29889, 3051, 29897, 13, 4706, 1596, 703, 29961, 29974, 29962, 360, 9806, 29940, 29428, 29091, 8528, 29925, 3927, 1806, 29899, 4051, 1159, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 1596, 703, 29961, 29991, 29962, 360, 9806, 29940, 29428, 1273, 29879, 1059, 29908, 1273, 2271, 29897, 13, 13, 1753, 1518, 2585, 29918, 9933, 7295, 13, 1678, 9995, 13, 268, 31594, 2696, 6270, 14223, 18546, 934, 16035, 1169, 30683, 30878, 30374, 30210, 30753, 31180, 287, 29890, 29899, 333, 13, 1678, 9995, 13, 1678, 1283, 6270, 29918, 10382, 580, 13, 1678, 565, 2897, 29889, 2084, 29889, 9933, 877, 6995, 1272, 29914, 4548, 417, 277, 29899, 2585, 29914, 2696, 6270, 29918, 4548, 1445, 29889, 7638, 29374, 13, 4706, 429, 567, 29922, 15112, 29889, 949, 29918, 7638, 877, 6995, 1272, 29914, 4548, 417, 277, 29899, 2585, 29914, 2696, 6270, 29918, 4548, 1445, 29889, 7638, 1495, 13, 4706, 736, 1051, 29898, 735, 567, 1839, 333, 13359, 5975, 29897, 13, 1678, 1683, 29901, 13, 4706, 736, 7700, 13, 13, 1753, 1518, 2585, 29918, 4548, 29898, 16175, 29922, 8824, 29892, 16175, 29918, 2311, 29922, 29896, 29900, 1125, 13, 1678, 9995, 13, 268, 31594, 4548, 417, 277, 29899, 2585, 29889, 510, 30275, 31302, 30683, 29907, 12064, 1518, 3858, 30214, 232, 191, 168, 235, 164, 168, 30413, 31722, 13, 268, 31100, 30374, 234, 176, 153, 234, 152, 168, 30383, 232, 165, 161, 31180, 235, 169, 137, 234, 158, 153, 13, 1678, 9995, 13, 1678, 1653, 29918, 2371, 29898, 2585, 2433, 4548, 29906, 742, 2371, 2433, 4548, 2585, 742, 1989, 29922, 1839, 287, 29890, 29918, 333, 3788, 29883, 345, 29918, 333, 3788, 8921, 3788, 1853, 3788, 12120, 3788, 1256, 7464, 16072, 29918, 1989, 2433, 287, 29890, 29918, 333, 1495, 13, 1678, 577, 29892, 28997, 29918, 29872, 333, 29922, 29883, 345, 29918, 9933, 29898, 2585, 2433, 4548, 29906, 742, 2371, 2433, 4548, 2585, 742, 1989, 2433, 287, 29890, 29918, 333, 1495, 13, 1678, 599, 29918, 29872, 333, 29922, 4548, 2585, 29918, 9933, 580, 13, 1678, 599, 29918, 29872, 333, 11759, 710, 29898, 29875, 29897, 363, 474, 297, 599, 29918, 29872, 333, 29962, 13, 1678, 788, 29918, 29872, 333, 29922, 1761, 29898, 842, 29898, 497, 29918, 29872, 333, 4887, 842, 29898, 28997, 29918, 29872, 333, 876, 13, 1678, 1596, 29898, 1202, 29918, 29872, 333, 29897, 13, 1678, 432, 29922, 29900, 13, 1678, 274, 345, 29918, 4548, 29922, 8977, 580, 13, 1678, 363, 321, 333, 297, 788, 29918, 29872, 333, 29901, 13, 4706, 1018, 29901, 13, 9651, 1518, 29918, 5975, 29922, 4548, 2585, 29918, 16680, 29898, 29872, 333, 29897, 13, 9651, 565, 1518, 29918, 5975, 29901, 13, 18884, 274, 345, 29918, 4548, 29961, 29872, 333, 13192, 23583, 29898, 4548, 29918, 5975, 29889, 5975, 3101, 13, 18884, 1596, 29898, 29883, 345, 29918, 4548, 29897, 13, 18884, 432, 29922, 29926, 29974, 29896, 13, 18884, 565, 9853, 29901, 13, 462, 1678, 565, 432, 29995, 16175, 29918, 2311, 1360, 29900, 29901, 835, 10481, 13, 462, 4706, 4576, 2433, 6506, 11646, 1518, 2585, 313, 287, 29890, 29918, 333, 29892, 274, 345, 29918, 333, 29892, 4148, 29892, 1134, 29892, 7481, 29892, 2635, 29897, 15673, 313, 14579, 1577, 29892, 1577, 29892, 1577, 29892, 1577, 29892, 1577, 16029, 13, 462, 4706, 577, 29889, 4258, 329, 331, 1384, 29898, 2850, 29892, 29883, 345, 29918, 4548, 29889, 5975, 3101, 13, 18884, 1683, 29901, 13, 462, 1678, 4576, 2433, 6506, 11646, 1518, 2585, 313, 287, 29890, 29918, 333, 29892, 274, 345, 29918, 333, 29892, 4148, 29892, 1134, 29892, 7481, 29892, 2635, 29897, 15673, 313, 14579, 1577, 29892, 1577, 29892, 1577, 29892, 1577, 29892, 1577, 16029, 13, 462, 1678, 577, 29889, 7978, 29898, 2850, 29892, 23583, 29898, 4548, 29918, 5975, 29889, 5975, 22130, 13, 13, 9651, 1683, 29901, 13, 18884, 1596, 703, 29961, 29991, 29962, 1518, 29899, 5975, 2216, 7460, 1159, 13, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 29961, 29991, 29962, 360, 9806, 29940, 29428, 14431, 1273, 29879, 1059, 16664, 29879, 29908, 1273, 29898, 29872, 333, 29892, 276, 558, 29898, 29872, 4961, 13, 308, 13, 1678, 577, 29889, 5358, 580, 13, 259, 13, 1990, 25492, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3579, 2917, 29918, 6768, 1125, 13, 4706, 1583, 17255, 8977, 26914, 5504, 29898, 1068, 2917, 29918, 6768, 29897, 13, 4706, 1583, 29889, 7924, 353, 7274, 29889, 7317, 580, 13, 4706, 565, 756, 5552, 29898, 1311, 29892, 525, 2754, 29918, 6979, 29374, 13, 965, 1583, 29889, 7924, 29889, 13662, 1839, 25471, 2033, 353, 525, 6979, 1273, 29879, 29915, 1273, 1583, 29889, 2754, 29918, 6979, 13, 4706, 25342, 756, 5552, 29898, 1311, 29892, 525, 6786, 1495, 322, 756, 5552, 29898, 1311, 29892, 525, 5630, 29374, 13, 965, 1583, 29889, 7924, 29889, 5150, 353, 313, 1311, 29889, 6786, 29892, 1583, 29889, 5630, 29897, 13, 13, 1678, 822, 1246, 29918, 517, 29918, 1552, 29918, 2754, 29898, 1311, 29892, 334, 5085, 1125, 13, 4706, 1018, 29901, 13, 9651, 620, 29922, 1311, 29889, 7924, 29889, 657, 10456, 5085, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 736, 29871, 13, 4706, 396, 437, 6433, 411, 6389, 13, 4706, 736, 620, 13, 13, 1753, 2323, 29918, 16680, 29898, 12443, 29892, 7076, 1125, 13, 1678, 9995, 13, 268, 31201, 233, 161, 147, 31166, 30502, 231, 190, 150, 31700, 30383, 231, 190, 150, 31700, 30548, 30214, 233, 146, 146, 235, 194, 179, 30214, 30895, 31283, 30548, 30214, 31024, 30683, 29907, 12064, 30503, 4548, 31062, 31410, 13, 1678, 9995, 13, 1678, 274, 345, 29918, 1761, 29922, 2636, 13, 1678, 363, 2944, 297, 4452, 29901, 13, 4706, 1024, 29922, 667, 1839, 978, 2033, 13, 4706, 6139, 29922, 667, 1839, 8216, 2033, 13, 4706, 2793, 29918, 2271, 29922, 667, 1839, 10853, 29918, 2271, 2033, 13, 4706, 1024, 29922, 276, 29889, 4478, 29898, 29878, 29915, 29907, 12064, 29899, 1194, 29881, 29974, 6817, 1194, 29881, 28135, 742, 978, 29897, 13, 4706, 6139, 29922, 276, 29889, 4478, 29898, 29878, 29915, 29907, 12064, 29899, 1194, 29881, 29974, 6817, 1194, 29881, 28135, 742, 8216, 29897, 13, 4706, 565, 1024, 29901, 13, 9651, 274, 345, 29918, 1761, 29889, 4397, 29898, 978, 29889, 2972, 29898, 29900, 876, 13, 9651, 6773, 13, 4706, 25342, 6139, 29901, 13, 9651, 274, 345, 29918, 1761, 29889, 4397, 29898, 8216, 29889, 2972, 29898, 29900, 876, 13, 9651, 6773, 13, 4706, 25342, 2793, 29918, 2271, 29901, 13, 9651, 364, 29922, 12443, 29889, 4804, 29918, 517, 29918, 1552, 29918, 2754, 29898, 3051, 29918, 2271, 29897, 13, 9651, 2793, 29922, 29878, 29889, 726, 13, 9651, 1993, 29922, 276, 29889, 2886, 497, 29898, 29878, 12215, 29907, 12064, 29899, 7110, 29881, 10062, 29899, 7110, 29881, 10062, 29897, 742, 3051, 29897, 13, 9651, 565, 1993, 29901, 13, 18884, 1993, 29922, 1761, 29898, 842, 29898, 4352, 876, 13, 18884, 274, 345, 29918, 1761, 29889, 21843, 29898, 4352, 29897, 13, 13, 1678, 274, 345, 29918, 1761, 29922, 1761, 29898, 842, 29898, 29883, 345, 29918, 1761, 876, 13, 1678, 736, 274, 345, 29918, 1761, 13, 13, 1753, 2323, 29918, 3827, 29898, 12443, 29892, 29895, 978, 2433, 29907, 12064, 16035, 277, 742, 3488, 29922, 29896, 29892, 546, 29918, 3488, 29922, 29945, 29900, 1125, 13, 1678, 9995, 13, 268, 31201, 233, 161, 147, 31166, 31610, 231, 190, 150, 31700, 30354, 30763, 30214, 31024, 30683, 29907, 12064, 30503, 4548, 31062, 31410, 13, 1678, 9995, 13, 1678, 274, 345, 29918, 1761, 29922, 2636, 13, 1678, 3142, 543, 991, 597, 2754, 29889, 3292, 29889, 510, 29914, 4478, 29914, 276, 1066, 20106, 29973, 29939, 3790, 1989, 29918, 978, 15704, 6605, 29922, 21402, 29987, 2098, 29922, 14273, 29987, 3488, 3790, 3488, 15704, 546, 29918, 3488, 3790, 546, 29918, 3488, 29913, 1642, 4830, 29898, 1989, 29918, 978, 29922, 29895, 978, 29892, 3488, 29922, 3488, 29892, 546, 29918, 3488, 29922, 546, 29918, 3488, 29897, 13, 1678, 364, 29922, 12443, 29889, 4804, 29918, 517, 29918, 1552, 29918, 2754, 29898, 2271, 29897, 13, 1678, 565, 364, 29901, 13, 4706, 2793, 29922, 29878, 29889, 726, 13, 4706, 6965, 29922, 3126, 29889, 18132, 29898, 3051, 29897, 13, 4706, 4452, 29922, 1315, 1839, 7076, 2033, 13, 4706, 274, 345, 29918, 1761, 29889, 21843, 29898, 14369, 29918, 16680, 29898, 12443, 29892, 7076, 876, 13, 13, 4706, 3001, 29918, 2798, 29922, 1315, 1839, 7827, 29918, 2798, 2033, 13, 13, 4706, 736, 3001, 29918, 2798, 29892, 29883, 345, 29918, 1761, 13, 1678, 1683, 29901, 13, 4706, 736, 7700, 29892, 8824, 13, 13, 1753, 4236, 29918, 7827, 29918, 2798, 29898, 12443, 29892, 29895, 978, 2433, 29907, 12064, 16035, 277, 742, 3488, 29922, 29896, 29892, 546, 29918, 3488, 29922, 29945, 29900, 1125, 13, 1678, 9995, 13, 268, 30287, 30936, 31201, 233, 161, 147, 30214, 31086, 30742, 233, 166, 131, 31836, 31320, 30801, 233, 131, 190, 31217, 30354, 13, 1678, 9995, 13, 1678, 274, 345, 29918, 1761, 29922, 2636, 13, 1678, 3142, 543, 991, 597, 2754, 29889, 3292, 29889, 510, 29914, 4478, 29914, 276, 1066, 20106, 29973, 29939, 3790, 1989, 29918, 978, 15704, 6605, 29922, 21402, 29987, 2098, 29922, 14273, 29987, 3488, 3790, 3488, 15704, 546, 29918, 3488, 3790, 546, 29918, 3488, 29913, 1642, 4830, 29898, 1989, 29918, 978, 29922, 29895, 978, 29892, 3488, 29922, 3488, 29892, 546, 29918, 3488, 29922, 546, 29918, 3488, 29897, 13, 1678, 364, 29922, 12443, 29889, 4804, 29918, 517, 29918, 1552, 29918, 2754, 29898, 2271, 29897, 13, 1678, 565, 364, 29901, 13, 4706, 2793, 29922, 29878, 29889, 726, 13, 4706, 6965, 29922, 3126, 29889, 18132, 29898, 3051, 29897, 13, 4706, 3001, 29918, 2798, 29922, 1315, 1839, 7827, 29918, 2798, 2033, 13, 13, 4706, 736, 3001, 29918, 2798, 13, 1678, 1683, 29901, 13, 4706, 736, 29871, 13, 13, 1753, 18546, 29918, 4548, 29898, 2754, 29918, 6979, 29892, 546, 29918, 3488, 29922, 29896, 29900, 29900, 1125, 13, 1678, 9995, 13, 268, 31393, 30763, 29898, 30923, 31263, 29897, 31057, 236, 151, 177, 235, 178, 144, 233, 147, 159, 31836, 3292, 30429, 29883, 345, 30503, 4548, 31062, 31410, 13, 268, 31100, 30374, 234, 176, 153, 234, 152, 168, 30383, 31541, 31695, 30946, 31180, 30503, 232, 165, 161, 31180, 31100, 30374, 13, 1678, 9995, 13, 1678, 396, 29871, 30346, 30533, 30503, 235, 194, 159, 31101, 30783, 31419, 976, 232, 186, 177, 30893, 13, 1678, 1653, 29918, 2371, 29898, 2585, 2433, 3292, 742, 2371, 2433, 3292, 29918, 4548, 742, 1989, 29922, 1839, 29883, 345, 29918, 333, 3788, 1643, 7464, 16072, 29918, 1989, 2433, 29883, 345, 29918, 333, 1495, 444, 29871, 31333, 233, 142, 172, 22793, 29941, 29871, 31325, 30413, 30392, 3126, 30946, 232, 133, 171, 30210, 30667, 31570, 30505, 233, 155, 150, 30909, 233, 140, 172, 31599, 30503, 233, 166, 131, 31836, 13, 1678, 577, 29892, 28997, 29918, 25232, 29922, 29883, 345, 29918, 9933, 29898, 2585, 2433, 3292, 742, 2371, 2433, 3292, 29918, 4548, 742, 1989, 2433, 29883, 345, 29918, 333, 1495, 13, 13, 1678, 1970, 29922, 2917, 16680, 29889, 3991, 11726, 580, 13, 1678, 1970, 29889, 949, 877, 5527, 29914, 3888, 29889, 5527, 1495, 13, 1678, 1887, 29918, 2798, 29922, 5527, 29889, 657, 877, 29907, 12064, 29918, 4775, 3788, 7827, 29918, 2798, 1495, 13, 1678, 1820, 29918, 978, 29922, 5527, 29889, 657, 877, 29907, 12064, 29918, 4775, 3788, 4478, 29918, 1989, 1495, 13, 13, 1678, 24170, 29922, 28712, 16046, 29898, 2754, 29918, 6979, 29922, 2754, 29918, 6979, 29897, 13, 1678, 3001, 29918, 2798, 29922, 3317, 29918, 7827, 29918, 2798, 29898, 12443, 29922, 12443, 29892, 29895, 978, 29922, 1989, 29918, 978, 29892, 546, 29918, 3488, 29922, 546, 29918, 3488, 29897, 13, 1678, 274, 345, 29918, 1761, 29922, 2636, 13, 1678, 565, 3001, 29918, 2798, 29901, 13, 4706, 565, 3001, 29918, 2798, 29958, 29896, 29900, 29900, 29900, 29901, 13, 9651, 3001, 29918, 2798, 29922, 29896, 29900, 29900, 29900, 13, 13, 4706, 788, 29918, 2798, 29922, 7827, 29918, 2798, 29899, 524, 29898, 2997, 29918, 2798, 29897, 13, 4706, 1596, 703, 2997, 954, 16664, 29879, 29892, 7827, 954, 16664, 29879, 29892, 1202, 954, 16664, 29879, 29908, 1273, 29898, 2997, 29918, 2798, 29892, 7827, 29918, 2798, 29892, 1202, 29918, 2798, 876, 13, 4706, 396, 29871, 235, 164, 168, 30753, 232, 186, 177, 30893, 13, 4706, 1813, 29918, 2798, 29922, 755, 29889, 27696, 29898, 1202, 29918, 2798, 29914, 546, 29918, 3488, 29897, 13, 4706, 565, 1813, 29918, 2798, 29958, 29900, 29901, 13, 9651, 363, 1813, 297, 3464, 29898, 3488, 29918, 2798, 6653, 29896, 6653, 29896, 1125, 13, 18884, 260, 29892, 29883, 29922, 14369, 29918, 3827, 29898, 12443, 29922, 12443, 29892, 29895, 978, 29922, 1989, 29918, 978, 29892, 546, 29918, 3488, 29922, 546, 29918, 3488, 29892, 3488, 29922, 3488, 29897, 13, 18884, 565, 260, 29901, 13, 462, 1678, 1596, 29898, 29883, 29897, 13, 462, 1678, 274, 345, 29918, 1761, 29889, 21843, 29898, 29883, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1596, 703, 29961, 29991, 29962, 4829, 297, 1246, 29918, 517, 29918, 1552, 29918, 2754, 1159, 13, 4706, 1683, 29901, 13, 9651, 1596, 703, 29961, 29991, 29962, 399, 25614, 29901, 3782, 25723, 297, 740, 18546, 29918, 29883, 345, 1159, 13, 13, 4706, 396, 29871, 233, 146, 149, 30752, 22793, 29941, 13, 4706, 565, 1813, 29918, 2798, 29958, 29900, 29901, 13, 9651, 274, 345, 29918, 23583, 29922, 1761, 29906, 23583, 29918, 8977, 29898, 29883, 345, 29918, 1761, 29892, 1643, 29922, 29896, 29897, 13, 9651, 4576, 2433, 6506, 11646, 18546, 29918, 4548, 313, 29883, 345, 29918, 333, 29892, 3858, 29897, 15673, 313, 14579, 1577, 16029, 13, 9651, 577, 29889, 4258, 329, 331, 1384, 29898, 2850, 29892, 29883, 345, 29918, 23583, 29889, 5975, 3101, 13, 9651, 1970, 29889, 842, 877, 29907, 12064, 29918, 4775, 3788, 7827, 29918, 2798, 742, 710, 29898, 7827, 29918, 2798, 876, 13, 9651, 411, 1722, 877, 5527, 29914, 3888, 29889, 5527, 742, 525, 29893, 1495, 408, 2295, 1445, 29901, 13, 18884, 1970, 29889, 3539, 29898, 2917, 1445, 29897, 13, 4706, 1683, 29901, 13, 9651, 1209, 13, 1678, 1683, 29901, 13, 4706, 1596, 703, 29961, 29991, 29962, 4829, 297, 1246, 29918, 517, 29918, 1552, 29918, 2754, 1159, 13, 4706, 736, 29871, 13, 1678, 736, 274, 345, 29918, 1761, 13, 13, 1753, 409, 774, 688, 29918, 3488, 29918, 16680, 29898, 2271, 29892, 13662, 1125, 13, 1678, 9995, 13, 268, 31201, 233, 161, 147, 344, 774, 688, 31166, 31610, 30214, 31024, 30683, 29907, 12064, 1518, 3858, 29892, 31086, 30742, 30923, 31217, 30354, 30763, 13, 1678, 584, 2457, 274, 345, 29918, 3488, 29901, 13, 4706, 584, 1853, 29901, 8977, 13, 4706, 584, 1767, 29901, 10998, 29883, 345, 29918, 333, 29896, 2396, 29900, 5501, 29883, 345, 29918, 333, 29906, 2396, 29896, 5501, 29883, 345, 29918, 333, 29940, 2396, 29900, 470, 29871, 29896, 29913, 13, 1678, 9995, 13, 1678, 364, 29922, 24830, 29889, 657, 29898, 2271, 29892, 13662, 29922, 13662, 29897, 13, 1678, 22300, 29922, 3629, 1300, 6845, 29903, 1132, 29898, 29878, 29889, 3051, 5501, 1420, 29889, 16680, 1495, 13, 1678, 274, 345, 29918, 3488, 29922, 8977, 580, 13, 1678, 363, 22599, 29918, 1256, 297, 22300, 29889, 2886, 29918, 497, 877, 1594, 742, 1990, 29918, 2433, 726, 29899, 5064, 12865, 7934, 29899, 3844, 7934, 29899, 10351, 29374, 13, 4706, 2635, 29922, 1594, 29918, 1256, 29889, 726, 13, 4706, 22599, 29918, 4882, 29922, 1594, 29918, 1256, 29889, 2886, 29918, 4622, 877, 1594, 742, 1990, 29918, 2433, 726, 29899, 5064, 7934, 29899, 3844, 7934, 29899, 10351, 25710, 13, 4706, 474, 29922, 1594, 29918, 4882, 29889, 2886, 29918, 497, 877, 29875, 29861, 29900, 29962, 13, 4706, 274, 345, 29918, 333, 29922, 276, 29889, 4478, 29898, 29878, 12215, 29907, 12064, 29899, 7110, 29881, 10062, 29899, 7110, 29881, 10062, 29897, 742, 710, 29898, 29875, 876, 13, 4706, 565, 274, 345, 29918, 333, 29901, 13, 9651, 274, 333, 29922, 29883, 345, 29918, 333, 29889, 2972, 29898, 29900, 29897, 13, 9651, 565, 376, 11393, 7122, 29898, 1594, 29918, 4882, 29889, 2886, 29918, 497, 877, 29875, 29861, 29896, 1822, 657, 877, 1990, 8785, 1360, 29915, 5444, 2258, 29899, 307, 3522, 1426, 29899, 29885, 3860, 525, 29901, 13, 18884, 3858, 29922, 29900, 13, 9651, 25342, 376, 11393, 7122, 29898, 1594, 29918, 4882, 29889, 2886, 29918, 497, 877, 29875, 29861, 29896, 1822, 657, 877, 1990, 8785, 1360, 29915, 5444, 2258, 29899, 307, 3522, 525, 29901, 13, 18884, 3858, 29922, 29896, 13, 9651, 1683, 29901, 13, 18884, 1596, 703, 29961, 29991, 29962, 399, 25614, 15341, 29918, 1767, 338, 451, 29871, 29900, 470, 29871, 29896, 1159, 13, 9651, 274, 345, 29918, 3488, 29961, 25232, 29962, 7607, 25232, 29892, 1643, 29892, 1256, 29897, 13, 4706, 1683, 29901, 13, 9651, 396, 29871, 31838, 29883, 345, 30210, 233, 191, 146, 31886, 13, 9651, 1209, 13, 1678, 736, 274, 345, 29918, 3488, 13, 13, 1753, 409, 774, 688, 29918, 3317, 29918, 3488, 29898, 2271, 2433, 991, 597, 1636, 29889, 344, 774, 688, 29889, 990, 29914, 29894, 352, 2585, 29914, 29894, 352, 1089, 11614, 29374, 13, 1678, 9995, 13, 268, 31024, 30683, 344, 774, 688, 233, 191, 146, 31886, 30354, 30763, 30210, 30878, 30257, 31610, 30806, 30354, 13, 1678, 584, 2457, 4236, 29918, 3488, 29901, 13, 4706, 584, 1853, 29901, 524, 13, 4706, 584, 1767, 29901, 29940, 13, 1678, 584, 2457, 9066, 29901, 13, 4706, 584, 1853, 29901, 8977, 13, 4706, 584, 1767, 29901, 233, 184, 146, 235, 170, 139, 30943, 31584, 13, 1678, 9995, 13, 1678, 9066, 29922, 344, 774, 688, 29918, 13662, 29898, 2271, 29897, 13, 1678, 364, 29922, 24830, 29889, 657, 29898, 2271, 29892, 13662, 29922, 13662, 29897, 13, 1678, 6528, 29922, 276, 29889, 12198, 29898, 29878, 29915, 3488, 29922, 1194, 29881, 28135, 1495, 13, 1678, 954, 29922, 276, 29889, 2886, 497, 29898, 13087, 29892, 29878, 29889, 726, 29897, 13, 1678, 954, 11759, 524, 29898, 29875, 29897, 363, 474, 297, 954, 29962, 13, 1678, 4236, 29918, 3488, 29922, 3317, 29898, 1949, 29897, 13, 1678, 1596, 703, 29961, 29974, 29962, 15992, 4236, 1813, 16664, 29881, 29908, 1273, 3317, 29918, 3488, 29897, 13, 1678, 736, 4236, 29918, 3488, 29892, 13662, 13, 13, 1753, 409, 774, 688, 29918, 4548, 29898, 17712, 29922, 5574, 1125, 13, 1678, 9995, 13, 268, 234, 139, 175, 30683, 344, 774, 688, 30753, 30636, 29883, 345, 30354, 30763, 13, 1678, 584, 2457, 2752, 29901, 13, 4706, 584, 1853, 29901, 710, 13, 4706, 584, 1767, 11283, 344, 774, 688, 29915, 13, 1678, 584, 2457, 274, 345, 29918, 344, 774, 688, 29901, 13, 4706, 584, 1853, 29901, 8977, 13, 4706, 584, 1767, 29901, 344, 774, 688, 30753, 30636, 29883, 345, 30354, 30763, 30214, 31305, 30847, 10998, 29907, 12064, 29899, 29906, 29900, 29906, 29900, 29899, 29900, 29900, 29900, 29896, 2396, 29900, 29913, 13, 1678, 9995, 13, 1678, 1653, 29918, 2371, 29898, 2585, 2433, 344, 774, 688, 742, 2371, 2433, 344, 774, 688, 29918, 4548, 742, 1989, 29922, 1839, 29883, 345, 29918, 333, 3788, 1643, 3788, 1256, 7464, 16072, 29918, 1989, 2433, 29883, 345, 29918, 333, 1495, 13, 1678, 577, 29892, 28997, 29918, 25232, 29922, 29883, 345, 29918, 9933, 29898, 2585, 2433, 344, 774, 688, 742, 2371, 2433, 344, 774, 688, 29918, 4548, 742, 1989, 2433, 29883, 345, 29918, 333, 1495, 13, 1678, 4236, 29918, 3488, 29892, 13662, 29922, 344, 774, 688, 29918, 3317, 29918, 3488, 580, 13, 1678, 274, 345, 29918, 344, 774, 688, 29922, 8977, 580, 13, 1678, 565, 10961, 29901, 13, 4706, 363, 474, 297, 3464, 29898, 29896, 29892, 3317, 29918, 3488, 1125, 13, 9651, 12799, 29918, 2271, 2433, 991, 597, 1636, 29889, 344, 774, 688, 29889, 990, 29914, 29894, 352, 2585, 29914, 29894, 352, 1089, 11614, 29973, 3488, 3790, 29913, 4286, 4830, 29898, 710, 29898, 29875, 876, 13, 9651, 274, 345, 29918, 3488, 29922, 344, 774, 688, 29918, 3488, 29918, 16680, 29898, 2271, 29922, 29894, 352, 29918, 2271, 29892, 13662, 29922, 13662, 29897, 13, 9651, 1596, 703, 29961, 29974, 29962, 15992, 1813, 16664, 29881, 29908, 1273, 29898, 29875, 876, 13, 9651, 274, 345, 29918, 344, 774, 688, 3790, 1068, 29883, 345, 29918, 344, 774, 688, 29892, 1068, 29883, 345, 29918, 3488, 29913, 13, 4706, 4576, 2433, 6506, 11646, 409, 774, 688, 29918, 4548, 313, 29883, 345, 29918, 333, 29892, 3858, 29892, 2635, 29897, 15673, 313, 14579, 1577, 29892, 1577, 16029, 13, 4706, 577, 29889, 4258, 329, 331, 1384, 29898, 2850, 29892, 29883, 345, 29918, 344, 774, 688, 29889, 5975, 3101, 13, 1678, 1683, 29901, 13, 4706, 1813, 29922, 29896, 13, 4706, 634, 29922, 29900, 13, 4706, 1550, 29898, 3488, 29958, 29900, 1125, 13, 9651, 12799, 29918, 2271, 2433, 991, 597, 1636, 29889, 344, 774, 688, 29889, 990, 29914, 29894, 352, 2585, 29914, 29894, 352, 1089, 11614, 29973, 3488, 3790, 29913, 4286, 4830, 29898, 710, 29898, 3488, 876, 13, 9651, 274, 345, 29918, 3488, 29922, 344, 774, 688, 29918, 3488, 29918, 16680, 29898, 2271, 29922, 29894, 352, 29918, 2271, 29892, 13662, 29922, 13662, 29897, 13, 9651, 363, 474, 297, 274, 345, 29918, 3488, 29889, 5975, 7295, 13, 18884, 565, 474, 29961, 29900, 29962, 297, 1863, 29918, 25232, 29901, 13, 462, 1678, 634, 29922, 300, 29974, 29896, 13, 9651, 565, 634, 29958, 29900, 29901, 13, 18884, 4576, 2433, 6506, 11646, 409, 774, 688, 29918, 4548, 313, 29883, 345, 29918, 333, 29892, 3858, 29892, 2635, 29897, 15673, 313, 14579, 1577, 29892, 1577, 16029, 13, 18884, 577, 29889, 4258, 329, 331, 1384, 29898, 2850, 29892, 29883, 345, 29918, 3488, 29889, 5975, 3101, 13, 18884, 274, 345, 29918, 344, 774, 688, 3790, 1068, 29883, 345, 29918, 344, 774, 688, 29892, 1068, 29883, 345, 29918, 3488, 29913, 13, 18884, 2867, 13, 9651, 1683, 29901, 13, 18884, 1813, 29922, 3488, 29974, 29896, 13, 13, 1678, 736, 525, 344, 774, 688, 742, 29883, 345, 29918, 344, 774, 688, 13, 13, 1753, 6993, 18037, 29918, 4548, 7295, 13, 1678, 9995, 13, 1678, 6993, 29918, 18037, 1518, 3858, 13, 1678, 9995, 13, 1753, 5016, 7716, 29918, 4548, 7295, 13, 1678, 9995, 13, 1678, 5016, 7716, 1518, 3858, 13, 1678, 9995, 13, 13, 361, 4770, 978, 1649, 1360, 29915, 1649, 3396, 1649, 2396, 13, 1678, 396, 29890, 29892, 13996, 29886, 29922, 29876, 27491, 29918, 29876, 391, 29918, 4548, 580, 13, 1678, 396, 29883, 29892, 29885, 4548, 29922, 2415, 276, 29918, 4548, 2585, 29918, 4548, 580, 13, 1678, 396, 2158, 29898, 842, 29898, 1761, 29898, 2415, 276, 29918, 4548, 2585, 29918, 4548, 580, 29961, 29896, 1822, 8149, 22130, 29985, 842, 29898, 1761, 29898, 29876, 27491, 29918, 29876, 391, 29918, 4548, 580, 29961, 29896, 1822, 8149, 580, 4961, 13, 13, 1678, 396, 4548, 2585, 29918, 4548, 580, 29871, 13, 13, 1678, 396, 29883, 345, 29918, 14144, 29918, 4548, 580, 13, 268, 13, 1678, 396, 18546, 29901, 690, 29914, 401, 29914, 2055, 1169, 29914, 12175, 976, 29883, 345, 1518, 3858, 322, 18546, 1544, 13, 1678, 396, 29883, 345, 29918, 1761, 29922, 3292, 29918, 4548, 29898, 2754, 29918, 6979, 2433, 29966, 25711, 17013, 29958, 1495, 13, 1678, 396, 2158, 29898, 29883, 345, 29918, 1761, 29897, 13, 13, 1678, 396, 916, 12799, 4833, 29892, 1316, 408, 409, 774, 688, 29892, 29871, 29900, 3250, 29889, 27765, 2992, 29889, 13, 1678, 396, 2158, 29898, 344, 774, 688, 29918, 4548, 29898, 17712, 29922, 8824, 876, 13, 13, 1678, 396, 14223, 20560, 13, 13, 1678, 396, 297, 278, 8775, 13, 1678, 1209, 13, 13, 13, 268, 13, 268, 13, 268, 13, 13, 13, 2 ]
launch_jobs/ecs_control.py
rhodricusack/docker-hcp
0
107000
<reponame>rhodricusack/docker-hcp import boto3 import os import time def register_task(client): response = client.register_task_definition( executionRoleArn='arn:aws:iam::807820536621:role/ecsTaskExecutionRole', family='roi-extract', taskRoleArn='arn:aws:iam::807820536621:role/cusacklab_elasticcontainer_service_task', networkMode='awsvpc', containerDefinitions=[ { 'name': 'roi-extract', 'image': "807820536621.dkr.ecr.eu-west-1.amazonaws.com/roi-extract:latest", 'essential': True, 'command': [ 'echo testing', ], 'logConfiguration': { 'logDriver': 'awslogs', 'options': { "awslogs-group": "/ecs/roi-extract", "awslogs-region": "eu-west-1", "awslogs-stream-prefix": "ecs" }, }, 'secrets': [ { "valueFrom": "arn:aws:secretsmanager:eu-west-1:807820536621:secret:aws/hcp-B9P9EV", "name": "HCP_KEYS" } ] }, ], requiresCompatibilities=[ 'FARGATE', ], cpu='1024', memory='4096', tags=[ { 'key': 'PrimaryUser', 'value': 'rhodricusack' }, { 'key': 'SystemComponent', 'value': 'cusacklab' }, ], ) return response def run_task(client=None, command=None): response = client.run_task( cluster='cusacklab-fargate-cluster', count=1, launchType='FARGATE', networkConfiguration={ 'awsvpcConfiguration': { 'subnets': [ "subnet-0e1d25cdf492ff98b", "subnet-06311e579ae22eae0"], 'securityGroups': ['sg-01743b5e88320d81a'], 'assignPublicIp': 'ENABLED' } }, overrides={ 'containerOverrides': [ { 'name': 'roi-extract', 'command': command }, ], 'executionRoleArn': 'arn:aws:iam::807820536621:role/ecsTaskExecutionRole', 'taskRoleArn': 'arn:aws:iam::807820536621:role/cusacklab_elasticcontainer_service_task' }, platformVersion='LATEST', startedBy='neurana-python', tags=[ { 'key': 'PrimaryUser', 'value': 'chiaracaldinelli' # put your username in here! }, { 'key': 'SystemComponent', 'value': 'cusacklab' }, ], taskDefinition='roi-extract' ) return response def wait_for_completion(client=None, taskresponses=None, waitfor = 3600, delay=6.0): stages = ['PROVISIONING', 'PENDING', 'RUNNING', 'DEPROVISIONING', 'STOPPED'] for attempt in range(int(waitfor/delay)): # Twelve hours max all_status=[] for taskresponse in taskresponses: if taskresponse['tasks']: cluster = taskresponse['tasks'][0]['clusterArn'] tasks =[x['taskArn'] for x in taskresponse['tasks']] status = client.describe_tasks(cluster = cluster, tasks=tasks) for task in status['tasks']: for container in task['containers']: all_status.append({x:container[x] for x in ('lastStatus', 'exitCode', 'reason') if x in container}) all_status[-1]['task_lastStatus']=task['lastStatus'] njobs = len(all_status) stage_count = {x:0 for x in stages} for task in all_status: stage_count[task['lastStatus']] +=1 exit0 = sum([x['exitCode']==0 for x in all_status if 'exitCode' in x]) for stage in stages: print(f'{stage}:{stage_count[stage]} ', end = ' ') print(f'{exit0}/{njobs} completed successfully') if njobs == stage_count['STOPPED']: print(f'All jobs have stopped, {exit0} successfully and {len(all_status)-exit0} with errors') return time.sleep(delay)
[ 1, 529, 276, 1112, 420, 29958, 19046, 397, 2200, 375, 547, 29914, 14695, 29899, 29882, 6814, 13, 5215, 289, 3747, 29941, 13, 5215, 2897, 13, 5215, 931, 13, 13, 1753, 6036, 29918, 7662, 29898, 4645, 1125, 13, 13, 1678, 2933, 353, 3132, 29889, 9573, 29918, 7662, 29918, 16553, 29898, 13, 4706, 8225, 16727, 1433, 29876, 2433, 2753, 29901, 10467, 29901, 2829, 1057, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29901, 12154, 29914, 687, 29879, 5398, 20418, 16727, 742, 13, 4706, 3942, 2433, 307, 29875, 29899, 21111, 742, 13, 4706, 3414, 16727, 1433, 29876, 2433, 2753, 29901, 10467, 29901, 2829, 1057, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29901, 12154, 29914, 8668, 547, 8205, 29918, 295, 6288, 7611, 29918, 5509, 29918, 7662, 742, 13, 4706, 3564, 6818, 2433, 1450, 4501, 6739, 742, 13, 4706, 5639, 3206, 262, 2187, 11759, 13, 9651, 426, 13, 18884, 525, 978, 2396, 525, 307, 29875, 29899, 21111, 742, 13, 18884, 525, 3027, 2396, 376, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29889, 8181, 29878, 29889, 687, 29878, 29889, 12932, 29899, 5933, 29899, 29896, 29889, 17260, 10467, 29889, 510, 29914, 307, 29875, 29899, 21111, 29901, 12333, 613, 13, 18884, 525, 404, 2556, 2396, 5852, 29892, 13, 18884, 525, 6519, 2396, 518, 13, 462, 1678, 525, 8057, 6724, 742, 13, 18884, 21251, 13, 18884, 525, 1188, 8614, 2396, 426, 13, 462, 1678, 525, 1188, 12376, 2396, 525, 10467, 20756, 742, 13, 462, 1678, 525, 6768, 2396, 426, 13, 462, 4706, 376, 10467, 20756, 29899, 2972, 1115, 5591, 687, 29879, 29914, 307, 29875, 29899, 21111, 613, 13, 462, 4706, 376, 10467, 20756, 29899, 12803, 1115, 376, 12932, 29899, 5933, 29899, 29896, 613, 13, 462, 4706, 376, 10467, 20756, 29899, 5461, 29899, 13506, 1115, 376, 687, 29879, 29908, 13, 462, 1678, 2981, 13, 18884, 2981, 13, 18884, 525, 344, 1037, 1372, 2396, 518, 13, 462, 1678, 426, 13, 462, 4706, 376, 1767, 4591, 1115, 376, 2753, 29901, 10467, 29901, 344, 1037, 1372, 12847, 29901, 12932, 29899, 5933, 29899, 29896, 29901, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29901, 19024, 29901, 10467, 29914, 29882, 6814, 29899, 29933, 29929, 29925, 29929, 22240, 613, 13, 462, 4706, 376, 978, 1115, 376, 29950, 6271, 29918, 10818, 29903, 29908, 13, 462, 1678, 500, 13, 18884, 4514, 13, 9651, 2981, 13, 4706, 21251, 13, 4706, 6858, 14644, 747, 9770, 11759, 13, 9651, 525, 29943, 1718, 29954, 3040, 742, 13, 4706, 21251, 13, 308, 13, 4706, 26403, 2433, 29896, 29900, 29906, 29946, 742, 13, 4706, 3370, 2433, 29946, 29900, 29929, 29953, 742, 13, 308, 13, 4706, 8282, 11759, 13, 9651, 426, 13, 18884, 525, 1989, 2396, 525, 26666, 2659, 742, 13, 18884, 525, 1767, 2396, 525, 19046, 397, 2200, 375, 547, 29915, 13, 9651, 2981, 13, 9651, 426, 13, 18884, 525, 1989, 2396, 525, 3924, 5308, 742, 13, 18884, 525, 1767, 2396, 525, 8668, 547, 8205, 29915, 13, 9651, 2981, 13, 4706, 21251, 13, 1678, 1723, 13, 13, 1678, 736, 2933, 13, 13, 1753, 1065, 29918, 7662, 29898, 4645, 29922, 8516, 29892, 1899, 29922, 8516, 1125, 13, 1678, 2933, 353, 3132, 29889, 3389, 29918, 7662, 29898, 13, 4706, 9867, 2433, 8668, 547, 8205, 29899, 29888, 1191, 403, 29899, 19594, 742, 13, 4706, 2302, 29922, 29896, 29892, 13, 4706, 6826, 1542, 2433, 29943, 1718, 29954, 3040, 742, 13, 4706, 3564, 8614, 3790, 13, 9651, 525, 1450, 4501, 6739, 8614, 2396, 426, 13, 18884, 525, 1491, 1212, 29879, 2396, 518, 376, 1491, 1212, 29899, 29900, 29872, 29896, 29881, 29906, 29945, 29883, 2176, 29946, 29929, 29906, 600, 29929, 29947, 29890, 613, 376, 1491, 1212, 29899, 29900, 29953, 29941, 29896, 29896, 29872, 29945, 29955, 29929, 3660, 29906, 29906, 29872, 3660, 29900, 12436, 13, 18884, 525, 8926, 24020, 2396, 6024, 5311, 29899, 29900, 29896, 29955, 29946, 29941, 29890, 29945, 29872, 29947, 29947, 29941, 29906, 29900, 29881, 29947, 29896, 29874, 7464, 13, 18884, 525, 16645, 19858, 29902, 29886, 2396, 525, 1430, 6181, 29928, 29915, 13, 9651, 500, 13, 4706, 2981, 13, 4706, 975, 24040, 3790, 13, 9651, 525, 7611, 3563, 24040, 2396, 518, 13, 18884, 426, 13, 462, 1678, 525, 978, 2396, 525, 307, 29875, 29899, 21111, 742, 13, 462, 1678, 525, 6519, 2396, 1899, 13, 462, 1678, 13, 13, 18884, 2981, 13, 9651, 21251, 13, 9651, 525, 22256, 16727, 1433, 29876, 2396, 525, 2753, 29901, 10467, 29901, 2829, 1057, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29901, 12154, 29914, 687, 29879, 5398, 20418, 16727, 742, 13, 9651, 525, 7662, 16727, 1433, 29876, 2396, 525, 2753, 29901, 10467, 29901, 2829, 1057, 29947, 29900, 29955, 29947, 29906, 29900, 29945, 29941, 29953, 29953, 29906, 29896, 29901, 12154, 29914, 8668, 547, 8205, 29918, 295, 6288, 7611, 29918, 5509, 29918, 7662, 29915, 13, 4706, 2981, 13, 4706, 7481, 6594, 2433, 29931, 3040, 1254, 742, 13, 4706, 4687, 2059, 2433, 16115, 1648, 29899, 4691, 742, 13, 4706, 8282, 11759, 13, 9651, 426, 13, 18884, 525, 1989, 2396, 525, 26666, 2659, 742, 13, 18884, 525, 1767, 2396, 525, 4161, 279, 562, 2741, 262, 5481, 29915, 396, 1925, 596, 8952, 297, 1244, 29991, 13, 9651, 2981, 13, 9651, 426, 13, 18884, 525, 1989, 2396, 525, 3924, 5308, 742, 13, 18884, 525, 1767, 2396, 525, 8668, 547, 8205, 29915, 13, 9651, 2981, 13, 4706, 21251, 13, 4706, 3414, 14683, 2433, 307, 29875, 29899, 21111, 29915, 13, 1678, 1723, 13, 1678, 736, 2933, 13, 13, 1753, 4480, 29918, 1454, 29918, 5729, 12757, 29898, 4645, 29922, 8516, 29892, 3414, 26679, 267, 29922, 8516, 29892, 4480, 1454, 353, 29871, 29941, 29953, 29900, 29900, 29892, 9055, 29922, 29953, 29889, 29900, 1125, 13, 13, 1678, 22950, 353, 6024, 8618, 28607, 2725, 4214, 742, 525, 29925, 11794, 4214, 742, 525, 29934, 3904, 29940, 4214, 742, 525, 2287, 8618, 28607, 2725, 4214, 742, 525, 1254, 4590, 29925, 3352, 2033, 13, 13, 1678, 363, 4218, 297, 3464, 29898, 524, 29898, 10685, 1454, 29914, 18829, 22164, 29871, 396, 8168, 13841, 6199, 4236, 13, 4706, 599, 29918, 4882, 29922, 2636, 13, 308, 13, 4706, 363, 3414, 5327, 297, 3414, 26679, 267, 29901, 13, 9651, 565, 29871, 3414, 5327, 1839, 20673, 2033, 29901, 13, 18884, 9867, 353, 3414, 5327, 1839, 20673, 2033, 29961, 29900, 22322, 19594, 1433, 29876, 2033, 13, 18884, 9595, 353, 29961, 29916, 1839, 7662, 1433, 29876, 2033, 363, 921, 297, 3414, 5327, 1839, 20673, 2033, 29962, 13, 18884, 4660, 353, 3132, 29889, 2783, 29581, 29918, 20673, 29898, 19594, 353, 9867, 29892, 9595, 29922, 20673, 29897, 13, 18884, 363, 3414, 297, 4660, 1839, 20673, 2033, 29901, 13, 462, 268, 13, 462, 1678, 363, 5639, 297, 3414, 1839, 1285, 475, 414, 2033, 29901, 13, 462, 4706, 599, 29918, 4882, 29889, 4397, 3319, 29916, 29901, 7611, 29961, 29916, 29962, 363, 921, 297, 6702, 4230, 5709, 742, 525, 13322, 3399, 742, 525, 23147, 1495, 565, 921, 297, 5639, 1800, 13, 462, 1678, 599, 29918, 4882, 14352, 29896, 22322, 7662, 29918, 4230, 5709, 2033, 29922, 7662, 1839, 4230, 5709, 2033, 13, 13, 4706, 302, 9057, 29879, 353, 7431, 29898, 497, 29918, 4882, 29897, 13, 4706, 7408, 29918, 2798, 353, 426, 29916, 29901, 29900, 363, 921, 297, 22950, 29913, 13, 13, 4706, 363, 3414, 297, 599, 29918, 4882, 29901, 13, 9651, 7408, 29918, 2798, 29961, 7662, 1839, 4230, 5709, 2033, 29962, 4619, 29896, 13, 13, 4706, 6876, 29900, 353, 2533, 4197, 29916, 1839, 13322, 3399, 2033, 1360, 29900, 363, 921, 297, 599, 29918, 4882, 565, 525, 13322, 3399, 29915, 297, 921, 2314, 13, 13, 4706, 363, 7408, 297, 22950, 29901, 13, 9651, 1596, 29898, 29888, 29915, 29912, 19190, 6177, 29912, 19190, 29918, 2798, 29961, 19190, 12258, 13420, 1095, 353, 525, 25710, 13, 13, 4706, 1596, 29898, 29888, 29915, 29912, 13322, 29900, 6822, 29912, 29876, 9057, 29879, 29913, 8676, 8472, 1495, 13, 308, 13, 4706, 565, 302, 9057, 29879, 1275, 7408, 29918, 2798, 1839, 1254, 4590, 29925, 3352, 2033, 29901, 13, 9651, 1596, 29898, 29888, 29915, 3596, 17643, 505, 11084, 29892, 426, 13322, 29900, 29913, 8472, 322, 426, 2435, 29898, 497, 29918, 4882, 6817, 13322, 29900, 29913, 411, 4436, 1495, 13, 9651, 736, 13, 4706, 931, 29889, 17059, 29898, 18829, 29897, 13, 2 ]
ucf_sub_catkin_ros/src/sub_states/src/qual/test.py
RoboticsClubatUCF/RoboSub
0
16780
#!/usr/bin/env python import rospy import smach import gate import pole class SubStates: def __init__(self): rospy.loginfo("State Machine has started.") self.gate = smach.StateMachine(outcomes=['preempted', 'POLE', 'GATE']) self.pole = smach.StateMachine(outcomes=['preempted', 'GATE', 'POLE']) self.tasks = smach.StateMachine(outcomes=['POLE', 'GATE', 'preempted', self.gate, self.pole]) with self.tasks: smach.StateMachine.add('Start', self.pole, transitions={'POLE':self.pole, 'GATE':self.gate}) with self.gate: smach.StateMachine.add('LOCATE', gate.locate(), transitions={'preempted':'preempted', 'success': 'ALIGN', 'failure': 'LOCATE'}) smach.StateMachine.add('ALIGN', gate.align(), transitions={'preempted':'preempted', 'success': 'THROUGH', 'failure': 'LOCATE'}) smach.StateMachine.add('THROUGH', gate.through(), transitions={'preempted':'preempted', 'success': 'POLE', 'failure':'LOCATE'}) with self.pole: smach.StateMachine.add('LOCATE', pole.locate(), transitions={'preempted':'preempted', 'success': 'ALIGN', 'failure': 'LOCATE'}) smach.StateMachine.add('ALIGN', pole.align(), transitions={'preempted':'preempted', 'success': 'DRIFT', 'failure': 'LOCATE'}) smach.StateMachine.add('DRIFT', pole.drift(), transitions={'preempted':'preempted', 'success': 'GATE', 'failure': 'LOCATE'}) if __name__ == '__main__': rospy.init_node('hippo_sm') sm = SubStates() outcome = sm.tasks.execute() rospy.spin()
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 696, 1028, 29891, 13, 5215, 1560, 496, 13, 13, 5215, 12417, 13, 5215, 22775, 13, 13, 1990, 3323, 855, 1078, 29901, 13, 13, 4706, 822, 4770, 2344, 12035, 1311, 1125, 13, 18884, 696, 1028, 29891, 29889, 1188, 3888, 703, 2792, 6189, 756, 4687, 23157, 13, 13, 18884, 1583, 29889, 17062, 353, 1560, 496, 29889, 2792, 29076, 29898, 449, 26807, 29922, 1839, 1457, 3456, 287, 742, 525, 13152, 1307, 742, 525, 29954, 3040, 11287, 13, 18884, 1583, 29889, 15831, 353, 1560, 496, 29889, 2792, 29076, 29898, 449, 26807, 29922, 1839, 1457, 3456, 287, 742, 525, 29954, 3040, 742, 525, 13152, 1307, 11287, 13, 18884, 1583, 29889, 20673, 353, 1560, 496, 29889, 2792, 29076, 29898, 449, 26807, 29922, 1839, 13152, 1307, 742, 525, 29954, 3040, 742, 525, 1457, 3456, 287, 742, 1583, 29889, 17062, 29892, 1583, 29889, 15831, 2314, 13, 13, 18884, 411, 1583, 29889, 20673, 29901, 13, 13, 462, 4706, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 4763, 742, 1583, 29889, 15831, 29892, 1301, 2187, 3790, 29915, 13152, 1307, 2396, 1311, 29889, 15831, 29892, 525, 29954, 3040, 2396, 1311, 29889, 17062, 1800, 13, 13, 462, 4706, 411, 1583, 29889, 17062, 29901, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 16652, 3040, 742, 12417, 29889, 2029, 403, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 1678, 525, 8698, 2396, 525, 1964, 17298, 742, 13, 462, 462, 462, 462, 1678, 525, 14057, 545, 2396, 525, 16652, 3040, 29915, 1800, 13, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 1964, 17298, 742, 12417, 29889, 2520, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 1678, 525, 8698, 2396, 525, 4690, 1672, 23338, 29950, 742, 13, 462, 462, 462, 462, 1678, 525, 14057, 545, 2396, 525, 16652, 3040, 29915, 1800, 13, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 4690, 1672, 23338, 29950, 742, 12417, 29889, 20678, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 1678, 525, 8698, 2396, 525, 13152, 1307, 742, 13, 462, 462, 462, 462, 1678, 525, 14057, 545, 22099, 16652, 3040, 29915, 1800, 13, 462, 4706, 411, 1583, 29889, 15831, 29901, 13, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 16652, 3040, 742, 22775, 29889, 2029, 403, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 1678, 525, 8698, 2396, 525, 1964, 17298, 742, 13, 462, 462, 462, 462, 1678, 525, 14057, 545, 2396, 525, 16652, 3040, 29915, 1800, 13, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 1964, 17298, 742, 22775, 29889, 2520, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 268, 525, 8698, 2396, 525, 29928, 3960, 7818, 742, 13, 462, 462, 462, 462, 268, 525, 14057, 545, 2396, 525, 16652, 3040, 29915, 1800, 13, 13, 462, 18884, 1560, 496, 29889, 2792, 29076, 29889, 1202, 877, 29928, 3960, 7818, 742, 22775, 29889, 29881, 7532, 3285, 13, 462, 462, 462, 539, 1301, 2187, 3790, 29915, 1457, 3456, 287, 22099, 1457, 3456, 287, 742, 13, 462, 462, 462, 462, 1678, 525, 8698, 2396, 525, 29954, 3040, 742, 13, 462, 462, 462, 462, 1678, 525, 14057, 545, 2396, 525, 16652, 3040, 29915, 1800, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 4706, 696, 1028, 29891, 29889, 2344, 29918, 3177, 877, 2918, 9759, 29918, 3844, 1495, 13, 4706, 1560, 353, 3323, 855, 1078, 580, 13, 12, 449, 2763, 353, 1560, 29889, 20673, 29889, 7978, 580, 13, 12, 307, 1028, 29891, 29889, 1028, 262, 580, 13, 2 ]
stamper/hashes.py
ISTU-Labs/stumper
0
199286
import bcrypt import mmh3 as mmh3 def get_hashed_password(plain_text_password): # Хэширует пароль в фазе его задания # Используется модуль bcrypt, соль записывается в сам хэш plain_text_password = as_bytes(plain_text_password) return bcrypt.hashpw(plain_text_password, bcrypt.gensalt()).decode("utf-8") def check_password(plain_text_password, hashed_password): # Проверка пароля. В модуле bcrypt соль записана в самом хеше plain_text_password = as_bytes(plain_text_password) print(type(plain_text_password), type(hashed_password)) return bcrypt.checkpw(plain_text_password, hashed_password.encode("utf-8")) def as_bytes(s): if type(s) == str: return s.encode('utf-8') return s def hexdigest(digest): """Convert byte digest to hex digest Arguments: - `digest`: Byte array representing digest """ if type(digest) in (tuple, list): digest = joindigest(digest) if type(digest) == str: return digest # implied, that string is a digest already if type(digest) == int: digest = bindigest(digest) return ''.join(["{:02x}".format(b) for b in digest]) def bindigest(digest, bs=16): if type(digest) in (tuple, list): digest = joindigest(digest) if type(digest) == str: return bytearray.fromhex(digest) if type(digest) == int: digest = digest.to_bytes(bs, byteorder='little') return digest def intdigest(digest): if type(digest) in (tuple, list): digest = joindigest(digest) if type(digest) == int: return digest if type(digest) == str: digest = bytearray.fromhex(digest) return int.from_bytes(digest, byteorder='little') def hash128(content): return mmh3.hash_bytes(content) def hash128_int(content): return intdigest(hash128(content)) def splitdigest(digest): """Splits 128bit hash into two 64bit numbers.""" d = bindigest(digest) l, h = intdigest(d[:8]), intdigest(d[8:]) return l, h two64 = 1 << 64 def joindigest(digest): l, h = digest if l < 0: l = two64 - l if h < 0: h = two64 - h l = bindigest(l, bs=8) h = bindigest(h, bs=8) return l + h
[ 1, 1053, 289, 29883, 4641, 13, 5215, 5654, 29882, 29941, 408, 5654, 29882, 29941, 13, 13, 13, 1753, 679, 29918, 8568, 287, 29918, 5630, 29898, 24595, 29918, 726, 29918, 5630, 1125, 13, 1678, 396, 3004, 30051, 1911, 1086, 1257, 4554, 576, 693, 490, 6725, 4791, 5686, 27341, 1587, 13, 1678, 396, 2081, 3565, 693, 3923, 4364, 2569, 1520, 693, 289, 29883, 4641, 29892, 1778, 693, 1077, 1668, 5551, 25107, 490, 24640, 4354, 30051, 30002, 13, 1678, 8656, 29918, 726, 29918, 5630, 353, 408, 29918, 13193, 29898, 24595, 29918, 726, 29918, 5630, 29897, 13, 1678, 736, 289, 29883, 4641, 29889, 8568, 29886, 29893, 29898, 24595, 29918, 726, 29918, 5630, 29892, 289, 29883, 4641, 29889, 17397, 1997, 16655, 13808, 703, 9420, 29899, 29947, 1159, 13, 13, 13, 1753, 1423, 29918, 5630, 29898, 24595, 29918, 726, 29918, 5630, 29892, 6608, 287, 29918, 5630, 1125, 13, 1678, 396, 971, 2899, 780, 642, 4554, 576, 1225, 29889, 939, 2569, 1520, 753, 289, 29883, 4641, 1778, 693, 1077, 7832, 477, 490, 8761, 29959, 4354, 29919, 2237, 13, 1678, 8656, 29918, 726, 29918, 5630, 353, 408, 29918, 13193, 29898, 24595, 29918, 726, 29918, 5630, 29897, 13, 1678, 1596, 29898, 1853, 29898, 24595, 29918, 726, 29918, 5630, 511, 1134, 29898, 8568, 287, 29918, 5630, 876, 13, 1678, 736, 289, 29883, 4641, 29889, 3198, 29886, 29893, 29898, 24595, 29918, 726, 29918, 5630, 29892, 6608, 287, 29918, 5630, 29889, 12508, 703, 9420, 29899, 29947, 5783, 13, 13, 13, 1753, 408, 29918, 13193, 29898, 29879, 1125, 13, 1678, 565, 1134, 29898, 29879, 29897, 1275, 851, 29901, 13, 4706, 736, 269, 29889, 12508, 877, 9420, 29899, 29947, 1495, 13, 1678, 736, 269, 13, 13, 13, 1753, 15090, 7501, 342, 29898, 7501, 342, 1125, 13, 1678, 9995, 18455, 7023, 4697, 342, 304, 13, 1678, 15090, 4697, 342, 13, 1678, 11842, 9331, 29901, 13, 1678, 448, 421, 7501, 342, 6998, 19831, 1409, 15783, 13, 1678, 4697, 342, 13, 1678, 9995, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 297, 313, 23583, 29892, 1051, 1125, 13, 4706, 4697, 342, 353, 2958, 513, 335, 342, 29898, 7501, 342, 29897, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 851, 29901, 13, 4706, 736, 4697, 342, 12, 12, 29937, 2411, 2957, 29892, 393, 1347, 338, 263, 4697, 342, 2307, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 938, 29901, 13, 4706, 4697, 342, 353, 7868, 335, 342, 29898, 7501, 342, 29897, 13, 1678, 736, 525, 4286, 7122, 29898, 3366, 25641, 29900, 29906, 29916, 29913, 1642, 4830, 29898, 29890, 29897, 363, 289, 297, 4697, 342, 2314, 13, 13, 13, 1753, 7868, 335, 342, 29898, 7501, 342, 29892, 24512, 29922, 29896, 29953, 1125, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 297, 313, 23583, 29892, 1051, 1125, 13, 4706, 4697, 342, 353, 2958, 513, 335, 342, 29898, 7501, 342, 29897, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 851, 29901, 13, 4706, 736, 7023, 2378, 29889, 3166, 20970, 29898, 7501, 342, 29897, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 938, 29901, 13, 4706, 4697, 342, 353, 4697, 342, 29889, 517, 29918, 13193, 29898, 5824, 29892, 7023, 2098, 2433, 29880, 1992, 1495, 13, 1678, 736, 4697, 342, 13, 13, 13, 1753, 938, 7501, 342, 29898, 7501, 342, 1125, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 297, 313, 23583, 29892, 1051, 1125, 13, 4706, 4697, 342, 353, 2958, 513, 335, 342, 29898, 7501, 342, 29897, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 938, 29901, 13, 4706, 736, 4697, 342, 13, 1678, 565, 1134, 29898, 7501, 342, 29897, 1275, 851, 29901, 13, 4706, 4697, 342, 353, 7023, 2378, 29889, 3166, 20970, 29898, 7501, 342, 29897, 13, 1678, 736, 938, 29889, 3166, 29918, 13193, 29898, 7501, 342, 29892, 7023, 2098, 2433, 29880, 1992, 1495, 13, 13, 13, 1753, 6608, 29896, 29906, 29947, 29898, 3051, 1125, 13, 1678, 736, 5654, 29882, 29941, 29889, 8568, 29918, 13193, 29898, 3051, 29897, 13, 13, 13, 1753, 6608, 29896, 29906, 29947, 29918, 524, 29898, 3051, 1125, 13, 1678, 736, 938, 7501, 342, 29898, 8568, 29896, 29906, 29947, 29898, 3051, 876, 13, 13, 13, 1753, 6219, 7501, 342, 29898, 7501, 342, 1125, 13, 1678, 9995, 29903, 572, 1169, 29871, 29896, 29906, 29947, 2966, 6608, 964, 1023, 13, 268, 29953, 29946, 2966, 3694, 1213, 15945, 13, 1678, 270, 353, 7868, 335, 342, 29898, 7501, 342, 29897, 13, 1678, 301, 29892, 298, 353, 938, 7501, 342, 29898, 29881, 7503, 29947, 11724, 938, 7501, 342, 29898, 29881, 29961, 29947, 29901, 2314, 13, 1678, 736, 301, 29892, 298, 13, 13, 13, 10184, 29953, 29946, 353, 29871, 29896, 3532, 29871, 29953, 29946, 13, 13, 13, 1753, 2958, 513, 335, 342, 29898, 7501, 342, 1125, 13, 1678, 301, 29892, 298, 353, 4697, 342, 13, 1678, 565, 301, 529, 29871, 29900, 29901, 13, 4706, 301, 353, 1023, 29953, 29946, 448, 301, 13, 1678, 565, 298, 529, 29871, 29900, 29901, 13, 4706, 298, 353, 1023, 29953, 29946, 448, 298, 13, 1678, 301, 353, 7868, 335, 342, 29898, 29880, 29892, 24512, 29922, 29947, 29897, 13, 1678, 298, 353, 7868, 335, 342, 29898, 29882, 29892, 24512, 29922, 29947, 29897, 13, 1678, 736, 301, 718, 298, 13, 2 ]
hub_module/tests/unittests/test_ernie_skep_sentiment_analysis.py
18621579069/PaddleHub-yu
4
1612336
<reponame>18621579069/PaddleHub-yu<filename>hub_module/tests/unittests/test_ernie_skep_sentiment_analysis.py # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from unittest import TestCase, main os.environ['CUDA_VISIBLE_DEVICES'] = '1' import numpy as np import paddlehub as hub class ErnieSkepSentimentAnalysisTestCase(TestCase): def setUp(self): self.module = hub.Module(name='ernie_skep_sentiment_analysis') self.test_text = [[ '飞桨(PaddlePaddle)是国内开源产业级深度学习平台', 'PaddleHub是飞桨生态的预训练模型应用工具' ], ["飞浆PaddleHub"]] self.test_data = ['你不是不聪明,而是不认真', '虽然小明很努力,但是他还是没有考100分'] self.results = [{ 'text': '你不是不聪明,而是不认真', 'sentiment_label': 'negative', 'positive_probs': 0.10738213360309601, 'negative_probs': 0.8926178216934204 }, { 'text': '虽然小明很努力,但是他还是没有考100分', 'sentiment_label': 'negative', 'positive_probs': 0.053915347903966904, 'negative_probs': 0.9460846185684204 }] def test_predict_sentiment(self): results_1 = self.module.predict_sentiment(self.test_data, use_gpu=False) results_2 = self.module.predict_sentiment(self.test_data, use_gpu=True) for index, res in enumerate(results_1): self.assertEqual(res['text'], self.results[index]['text']) self.assertEqual(res['sentiment_label'], self.results[index]['sentiment_label']) self.assertTrue( abs(res['positive_probs'] - self.results[index]['positive_probs']) < 1e-6) self.assertTrue( abs(res['negative_probs'] - self.results[index]['negative_probs']) < 1e-6) self.assertEqual(res['text'], results_2[index]['text']) self.assertEqual(res['sentiment_label'], results_2[index]['sentiment_label']) self.assertTrue( abs(res['positive_probs'] - results_2[index]['positive_probs']) < 1e-6) self.assertTrue( abs(res['negative_probs'] - results_2[index]['negative_probs']) < 1e-6) def test_get_embedding(self): # test batch_size max_seq_len = 128 results = self.module.get_embedding( texts=self.test_text, use_gpu=False, batch_size=1, max_seq_len=max_seq_len) results_2 = self.module.get_embedding( texts=self.test_text, use_gpu=False, batch_size=10, max_seq_len=max_seq_len) # 2 sample results self.assertEqual(len(results), 2) self.assertEqual(len(results_2), 2) # sequence embedding and token embedding results per sample self.assertEqual(len(results[0]), 2) self.assertEqual(len(results_2[0]), 2) # sequence embedding shape self.assertEqual(results[0][0].shape, (1024, )) self.assertEqual(results_2[0][0].shape, (1024, )) # token embedding shape self.assertEqual(results[0][1].shape, (max_seq_len, 1024)) self.assertEqual(results_2[0][1].shape, (max_seq_len, 1024)) # test gpu results_3 = self.module.get_embedding( texts=self.test_text, use_gpu=True, batch_size=1, max_seq_len=max_seq_len) diff = np.abs(results[0][0] - results_3[0][0]) self.assertTrue((diff < 1e-6).all) diff = np.abs(results[0][1] - results_3[0][1]) self.assertTrue((diff < 1e-6).all) diff = np.abs(results[1][0] - results_3[1][0]) self.assertTrue((diff < 1e-6).all) diff = np.abs(results[1][1] - results_3[1][1]) self.assertTrue((diff < 1e-6).all) def test_get_params_layer(self): self.module.context() layers = self.module.get_params_layer() layers = list(set(layers.values())) true_layers = [i for i in range(24)] self.assertEqual(layers, true_layers) def test_get_spm_path(self): self.assertEqual(self.module.get_spm_path(), None) def test_get_word_dict_path(self): self.assertEqual(self.module.get_word_dict_path(), None) def test_get_vocab_path(self): vocab_path = self.module.get_vocab_path() true_vocab_path = os.path.join(self.module.directory, "assets", "ernie_1.0_large_ch.vocab.txt") self.assertEqual(vocab_path, true_vocab_path) if __name__ == '__main__': main()
[ 1, 529, 276, 1112, 420, 29958, 29896, 29947, 29953, 29906, 29896, 29945, 29955, 29929, 29900, 29953, 29929, 29914, 29925, 22352, 16046, 29899, 29891, 29884, 29966, 9507, 29958, 29882, 431, 29918, 5453, 29914, 21150, 29914, 348, 986, 9197, 29914, 1688, 29918, 824, 347, 29918, 26050, 29886, 29918, 18616, 2073, 29918, 15916, 29889, 2272, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 349, 22352, 29925, 22352, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 268, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 13, 29937, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 27028, 1090, 278, 19245, 29889, 13, 5215, 2897, 13, 3166, 443, 27958, 1053, 4321, 8259, 29892, 1667, 13, 359, 29889, 21813, 1839, 29907, 29965, 7698, 29918, 28607, 8979, 1307, 29918, 2287, 29963, 2965, 2890, 2033, 353, 525, 29896, 29915, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 22352, 29882, 431, 408, 19766, 13, 13, 13, 1990, 1425, 2786, 29903, 446, 29886, 29903, 296, 2073, 21067, 4848, 3057, 8259, 29898, 3057, 8259, 1125, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 1583, 29889, 5453, 353, 19766, 29889, 7355, 29898, 978, 2433, 824, 347, 29918, 26050, 29886, 29918, 18616, 2073, 29918, 15916, 1495, 13, 4706, 1583, 29889, 1688, 29918, 726, 353, 5519, 13, 9651, 525, 236, 166, 161, 233, 164, 171, 30419, 29925, 22352, 29925, 22352, 30409, 30392, 30356, 30728, 31026, 31193, 231, 189, 170, 31729, 234, 189, 170, 31947, 30898, 30415, 231, 188, 163, 30606, 31037, 742, 525, 29925, 22352, 16046, 30392, 236, 166, 161, 233, 164, 171, 30486, 31613, 30210, 236, 165, 135, 235, 177, 176, 234, 190, 134, 31382, 30883, 31370, 30406, 31041, 232, 136, 186, 29915, 13, 4706, 21251, 6796, 236, 166, 161, 233, 184, 137, 29925, 22352, 16046, 3108, 29962, 13, 4706, 1583, 29889, 1688, 29918, 1272, 353, 6024, 30919, 30413, 30392, 30413, 235, 132, 173, 30592, 30214, 31325, 30392, 30413, 31439, 30848, 742, 525, 235, 156, 192, 31516, 30446, 30592, 232, 193, 139, 232, 141, 173, 31074, 30214, 231, 192, 137, 30392, 31221, 31994, 30392, 31423, 30417, 235, 131, 134, 29896, 29900, 29900, 30748, 2033, 13, 4706, 1583, 29889, 9902, 353, 15974, 13, 9651, 525, 726, 2396, 525, 30919, 30413, 30392, 30413, 235, 132, 173, 30592, 30214, 31325, 30392, 30413, 31439, 30848, 742, 13, 9651, 525, 18616, 2073, 29918, 1643, 2396, 525, 22198, 742, 13, 9651, 525, 1066, 3321, 29918, 771, 5824, 2396, 29871, 29900, 29889, 29896, 29900, 29955, 29941, 29947, 29906, 29896, 29941, 29941, 29953, 29900, 29941, 29900, 29929, 29953, 29900, 29896, 29892, 13, 9651, 525, 22198, 29918, 771, 5824, 2396, 29871, 29900, 29889, 29947, 29929, 29906, 29953, 29896, 29955, 29947, 29906, 29896, 29953, 29929, 29941, 29946, 29906, 29900, 29946, 13, 4706, 2981, 13, 462, 4706, 426, 13, 462, 9651, 525, 726, 2396, 525, 235, 156, 192, 31516, 30446, 30592, 232, 193, 139, 232, 141, 173, 31074, 30214, 231, 192, 137, 30392, 31221, 31994, 30392, 31423, 30417, 235, 131, 134, 29896, 29900, 29900, 30748, 742, 13, 462, 9651, 525, 18616, 2073, 29918, 1643, 2396, 525, 22198, 742, 13, 462, 9651, 525, 1066, 3321, 29918, 771, 5824, 2396, 29871, 29900, 29889, 29900, 29945, 29941, 29929, 29896, 29945, 29941, 29946, 29955, 29929, 29900, 29941, 29929, 29953, 29953, 29929, 29900, 29946, 29892, 13, 462, 9651, 525, 22198, 29918, 771, 5824, 2396, 29871, 29900, 29889, 29929, 29946, 29953, 29900, 29947, 29946, 29953, 29896, 29947, 29945, 29953, 29947, 29946, 29906, 29900, 29946, 13, 462, 4706, 500, 29962, 13, 13, 1678, 822, 1243, 29918, 27711, 29918, 18616, 2073, 29898, 1311, 1125, 13, 4706, 2582, 29918, 29896, 353, 1583, 29889, 5453, 29889, 27711, 29918, 18616, 2073, 29898, 1311, 29889, 1688, 29918, 1272, 29892, 671, 29918, 29887, 3746, 29922, 8824, 29897, 13, 4706, 2582, 29918, 29906, 353, 1583, 29889, 5453, 29889, 27711, 29918, 18616, 2073, 29898, 1311, 29889, 1688, 29918, 1272, 29892, 671, 29918, 29887, 3746, 29922, 5574, 29897, 13, 13, 4706, 363, 2380, 29892, 620, 297, 26985, 29898, 9902, 29918, 29896, 1125, 13, 9651, 1583, 29889, 9294, 9843, 29898, 690, 1839, 726, 7464, 1583, 29889, 9902, 29961, 2248, 22322, 726, 11287, 13, 9651, 1583, 29889, 9294, 9843, 29898, 690, 1839, 18616, 2073, 29918, 1643, 7464, 13, 462, 632, 1583, 29889, 9902, 29961, 2248, 22322, 18616, 2073, 29918, 1643, 11287, 13, 9651, 1583, 29889, 9294, 5574, 29898, 13, 18884, 6425, 29898, 690, 1839, 1066, 3321, 29918, 771, 5824, 2033, 448, 13, 462, 1678, 1583, 29889, 9902, 29961, 2248, 22322, 1066, 3321, 29918, 771, 5824, 11287, 529, 29871, 29896, 29872, 29899, 29953, 29897, 13, 9651, 1583, 29889, 9294, 5574, 29898, 13, 18884, 6425, 29898, 690, 1839, 22198, 29918, 771, 5824, 2033, 448, 13, 462, 1678, 1583, 29889, 9902, 29961, 2248, 22322, 22198, 29918, 771, 5824, 11287, 529, 29871, 29896, 29872, 29899, 29953, 29897, 13, 13, 9651, 1583, 29889, 9294, 9843, 29898, 690, 1839, 726, 7464, 2582, 29918, 29906, 29961, 2248, 22322, 726, 11287, 13, 9651, 1583, 29889, 9294, 9843, 29898, 690, 1839, 18616, 2073, 29918, 1643, 7464, 13, 462, 632, 2582, 29918, 29906, 29961, 2248, 22322, 18616, 2073, 29918, 1643, 11287, 13, 9651, 1583, 29889, 9294, 5574, 29898, 13, 18884, 6425, 29898, 690, 1839, 1066, 3321, 29918, 771, 5824, 2033, 448, 13, 462, 1678, 2582, 29918, 29906, 29961, 2248, 22322, 1066, 3321, 29918, 771, 5824, 11287, 529, 29871, 29896, 29872, 29899, 29953, 29897, 13, 9651, 1583, 29889, 9294, 5574, 29898, 13, 18884, 6425, 29898, 690, 1839, 22198, 29918, 771, 5824, 2033, 448, 13, 462, 1678, 2582, 29918, 29906, 29961, 2248, 22322, 22198, 29918, 771, 5824, 11287, 529, 29871, 29896, 29872, 29899, 29953, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 17987, 8497, 29898, 1311, 1125, 13, 4706, 396, 1243, 9853, 29918, 2311, 13, 4706, 4236, 29918, 11762, 29918, 2435, 353, 29871, 29896, 29906, 29947, 13, 4706, 2582, 353, 1583, 29889, 5453, 29889, 657, 29918, 17987, 8497, 29898, 13, 9651, 26442, 29922, 1311, 29889, 1688, 29918, 726, 29892, 13, 9651, 671, 29918, 29887, 3746, 29922, 8824, 29892, 13, 9651, 9853, 29918, 2311, 29922, 29896, 29892, 13, 9651, 4236, 29918, 11762, 29918, 2435, 29922, 3317, 29918, 11762, 29918, 2435, 29897, 13, 4706, 2582, 29918, 29906, 353, 1583, 29889, 5453, 29889, 657, 29918, 17987, 8497, 29898, 13, 9651, 26442, 29922, 1311, 29889, 1688, 29918, 726, 29892, 13, 9651, 671, 29918, 29887, 3746, 29922, 8824, 29892, 13, 9651, 9853, 29918, 2311, 29922, 29896, 29900, 29892, 13, 9651, 4236, 29918, 11762, 29918, 2435, 29922, 3317, 29918, 11762, 29918, 2435, 29897, 13, 4706, 396, 29871, 29906, 4559, 2582, 13, 4706, 1583, 29889, 9294, 9843, 29898, 2435, 29898, 9902, 511, 29871, 29906, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 2435, 29898, 9902, 29918, 29906, 511, 29871, 29906, 29897, 13, 4706, 396, 5665, 23655, 322, 5993, 23655, 2582, 639, 4559, 13, 4706, 1583, 29889, 9294, 9843, 29898, 2435, 29898, 9902, 29961, 29900, 11724, 29871, 29906, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 2435, 29898, 9902, 29918, 29906, 29961, 29900, 11724, 29871, 29906, 29897, 13, 4706, 396, 5665, 23655, 8267, 13, 4706, 1583, 29889, 9294, 9843, 29898, 9902, 29961, 29900, 3816, 29900, 1822, 12181, 29892, 313, 29896, 29900, 29906, 29946, 29892, 29871, 876, 13, 4706, 1583, 29889, 9294, 9843, 29898, 9902, 29918, 29906, 29961, 29900, 3816, 29900, 1822, 12181, 29892, 313, 29896, 29900, 29906, 29946, 29892, 29871, 876, 13, 4706, 396, 5993, 23655, 8267, 13, 4706, 1583, 29889, 9294, 9843, 29898, 9902, 29961, 29900, 3816, 29896, 1822, 12181, 29892, 313, 3317, 29918, 11762, 29918, 2435, 29892, 29871, 29896, 29900, 29906, 29946, 876, 13, 4706, 1583, 29889, 9294, 9843, 29898, 9902, 29918, 29906, 29961, 29900, 3816, 29896, 1822, 12181, 29892, 313, 3317, 29918, 11762, 29918, 2435, 29892, 29871, 29896, 29900, 29906, 29946, 876, 13, 13, 4706, 396, 1243, 330, 3746, 13, 4706, 2582, 29918, 29941, 353, 1583, 29889, 5453, 29889, 657, 29918, 17987, 8497, 29898, 13, 9651, 26442, 29922, 1311, 29889, 1688, 29918, 726, 29892, 13, 9651, 671, 29918, 29887, 3746, 29922, 5574, 29892, 13, 9651, 9853, 29918, 2311, 29922, 29896, 29892, 13, 9651, 4236, 29918, 11762, 29918, 2435, 29922, 3317, 29918, 11762, 29918, 2435, 29897, 13, 4706, 2923, 353, 7442, 29889, 6897, 29898, 9902, 29961, 29900, 3816, 29900, 29962, 448, 2582, 29918, 29941, 29961, 29900, 3816, 29900, 2314, 13, 4706, 1583, 29889, 9294, 5574, 3552, 12765, 529, 29871, 29896, 29872, 29899, 29953, 467, 497, 29897, 13, 4706, 2923, 353, 7442, 29889, 6897, 29898, 9902, 29961, 29900, 3816, 29896, 29962, 448, 2582, 29918, 29941, 29961, 29900, 3816, 29896, 2314, 13, 4706, 1583, 29889, 9294, 5574, 3552, 12765, 529, 29871, 29896, 29872, 29899, 29953, 467, 497, 29897, 13, 4706, 2923, 353, 7442, 29889, 6897, 29898, 9902, 29961, 29896, 3816, 29900, 29962, 448, 2582, 29918, 29941, 29961, 29896, 3816, 29900, 2314, 13, 4706, 1583, 29889, 9294, 5574, 3552, 12765, 529, 29871, 29896, 29872, 29899, 29953, 467, 497, 29897, 13, 4706, 2923, 353, 7442, 29889, 6897, 29898, 9902, 29961, 29896, 3816, 29896, 29962, 448, 2582, 29918, 29941, 29961, 29896, 3816, 29896, 2314, 13, 4706, 1583, 29889, 9294, 5574, 3552, 12765, 529, 29871, 29896, 29872, 29899, 29953, 467, 497, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 7529, 29918, 13148, 29898, 1311, 1125, 13, 4706, 1583, 29889, 5453, 29889, 4703, 580, 13, 4706, 15359, 353, 1583, 29889, 5453, 29889, 657, 29918, 7529, 29918, 13148, 580, 13, 4706, 15359, 353, 1051, 29898, 842, 29898, 29277, 29889, 5975, 22130, 13, 4706, 1565, 29918, 29277, 353, 518, 29875, 363, 474, 297, 3464, 29898, 29906, 29946, 4638, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29277, 29892, 1565, 29918, 29277, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1028, 29885, 29918, 2084, 29898, 1311, 1125, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1311, 29889, 5453, 29889, 657, 29918, 1028, 29885, 29918, 2084, 3285, 6213, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 1742, 29918, 8977, 29918, 2084, 29898, 1311, 1125, 13, 4706, 1583, 29889, 9294, 9843, 29898, 1311, 29889, 5453, 29889, 657, 29918, 1742, 29918, 8977, 29918, 2084, 3285, 6213, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 29894, 542, 370, 29918, 2084, 29898, 1311, 1125, 13, 4706, 7931, 370, 29918, 2084, 353, 1583, 29889, 5453, 29889, 657, 29918, 29894, 542, 370, 29918, 2084, 580, 13, 4706, 1565, 29918, 29894, 542, 370, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 5453, 29889, 12322, 29892, 376, 16596, 613, 13, 462, 462, 539, 376, 824, 347, 29918, 29896, 29889, 29900, 29918, 16961, 29918, 305, 29889, 29894, 542, 370, 29889, 3945, 1159, 13, 4706, 1583, 29889, 9294, 9843, 29898, 29894, 542, 370, 29918, 2084, 29892, 1565, 29918, 29894, 542, 370, 29918, 2084, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 1667, 580, 13, 2 ]
hatsploit/utils/string.py
sunmughan/rat
0
142802
#!/usr/bin/env python3 # # MIT License # # Copyright (c) 2020-2021 EntySec # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # import re import base64 import random import string ############################################################## # Lempel-Ziv-Stac decompression # BitReader and RingList classes # # Copyright (C) 2011 <NAME> - FiloSottile # filosottile.wiki gmail.com - www.pytux.it # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (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, see &lt;http://www.gnu.org/licenses/&gt;. # ############################################################## import collections class BitReader: def __init__(self, data_bytes): self._bits = collections.deque() for byte in data_bytes: for n in range(8): self._bits.append(bool((byte >> (7 - n)) & 1)) def getBit(self): return self._bits.popleft() def getBits(self, num): res = 0 for i in range(num): res += self.getBit() << num - 1 - i return res def getByte(self): return self.getBits(8) def __len__(self): return len(self._bits) class RingList: def __init__(self, length): self.__data__ = collections.deque() self.__full__ = False self.__max__ = length def append(self, x): if self.__full__: self.__data__.popleft() self.__data__.append(x) if self.size() == self.__max__: self.__full__ = True def get(self): return self.__data__ def size(self): return len(self.__data__) def maxsize(self): return self.__max__ def __getitem__(self, n): if n >= self.size(): return None return self.__data__[n] def LZSDecompress(data, window=RingList(2048)): reader = BitReader(data) result = '' while True: bit = reader.getBit() if not bit: char = reader.getByte() result += chr(char) window.append(char) else: bit = reader.getBit() if bit: offset = reader.getBits(7) if offset == 0: # EOF break else: offset = reader.getBits(11) lenField = reader.getBits(2) if lenField < 3: length = lenField + 2 else: lenField <<= 2 lenField += reader.getBits(2) if lenField < 15: length = (lenField & 0x0f) + 5 else: lenCounter = 0 lenField = reader.getBits(4) while lenField == 15: lenField = reader.getBits(4) lenCounter += 1 length = 15 * lenCounter + 8 + lenField for i in range(length): char = window[-offset] result += chr(char) window.append(char) return result, window class StringTools: @staticmethod def extract_strings(binary_data): strings = re.findall("[^\x00-\x1F\x7F-\xFF]{4,}", binary_data) return strings @staticmethod def xor_string(string): result = "" for c in string: result += chr(ord(c) ^ len(string)) return result @staticmethod def base64_string(string): base64.b64encode(string.encode()) return string.decode() @staticmethod def random_string(length=16, alphabet=string.ascii_letters + string.digits): return "".join(random.choice(alphabet) for _ in range(length)) @staticmethod def lzs_decompress(data, window=RingList(2048)): result, window = LZSDecompress(data, window) return result
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 29937, 13, 29937, 341, 1806, 19245, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 29899, 29906, 29900, 29906, 29896, 4284, 29891, 7898, 13, 29937, 13, 29937, 20894, 2333, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, 292, 263, 3509, 13, 29937, 310, 445, 7047, 322, 6942, 5106, 2066, 313, 1552, 376, 6295, 14093, 4968, 304, 5376, 13, 29937, 297, 278, 18540, 1728, 24345, 29892, 3704, 1728, 29485, 278, 10462, 13, 29937, 304, 671, 29892, 3509, 29892, 6623, 29892, 10366, 29892, 9805, 29892, 1320, 2666, 29892, 269, 803, 1947, 29892, 322, 29914, 272, 19417, 13, 29937, 14591, 310, 278, 18540, 29892, 322, 304, 14257, 12407, 304, 6029, 278, 18540, 338, 13, 29937, 15252, 3276, 304, 437, 577, 29892, 4967, 304, 278, 1494, 5855, 29901, 13, 29937, 13, 29937, 450, 2038, 3509, 1266, 8369, 322, 445, 10751, 8369, 4091, 367, 5134, 297, 599, 13, 29937, 14591, 470, 23228, 2011, 1080, 310, 278, 18540, 29889, 13, 29937, 13, 29937, 6093, 7791, 7818, 12982, 1525, 8519, 13756, 13044, 3352, 376, 3289, 8519, 613, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29979, 8079, 13764, 29979, 476, 22255, 29892, 8528, 15094, 1799, 6323, 13, 29937, 306, 3580, 5265, 3352, 29892, 2672, 6154, 15789, 4214, 350, 2692, 6058, 27848, 3352, 7495, 6093, 399, 1718, 29934, 13566, 29059, 8079, 341, 1001, 3210, 13566, 2882, 6227, 11937, 29892, 13, 29937, 383, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 5300, 405, 1164, 1177, 15860, 1177, 1692, 13780, 29889, 2672, 11698, 382, 29963, 3919, 24972, 9818, 6093, 13, 29937, 26524, 29950, 24125, 6323, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 29903, 20700, 17705, 6181, 15842, 13764, 29979, 315, 4375, 7833, 29892, 21330, 1529, 1692, 29903, 6323, 438, 29911, 4448, 13, 29937, 17705, 2882, 6227, 11937, 29892, 12317, 2544, 4448, 2672, 13764, 319, 9838, 8079, 8707, 29911, 4717, 1783, 29892, 323, 8476, 6323, 438, 29911, 4448, 22119, 1660, 29892, 9033, 3235, 4214, 3895, 29892, 13, 29937, 19474, 8079, 6323, 2672, 8707, 8186, 9838, 22659, 6093, 7791, 7818, 12982, 1525, 6323, 6093, 501, 1660, 6323, 438, 29911, 4448, 5012, 1964, 4214, 29903, 2672, 6093, 13, 29937, 7791, 7818, 12982, 1525, 29889, 13, 29937, 13, 13, 5215, 337, 13, 5215, 2967, 29953, 29946, 13, 5215, 4036, 13, 5215, 1347, 13, 13, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 365, 3451, 295, 29899, 29999, 440, 29899, 855, 562, 17753, 2590, 13, 29937, 18531, 6982, 322, 17716, 1293, 4413, 13, 29937, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29896, 29871, 529, 5813, 29958, 448, 2514, 29877, 29903, 1501, 488, 13, 29937, 977, 359, 1501, 488, 29889, 4594, 330, 2549, 29889, 510, 448, 7821, 29889, 2272, 29873, 1314, 29889, 277, 13, 29937, 13, 29937, 910, 1824, 338, 3889, 7047, 29901, 366, 508, 2654, 391, 2666, 372, 322, 29914, 272, 6623, 13, 29937, 372, 1090, 278, 4958, 310, 278, 15143, 4593, 5236, 19245, 408, 6369, 491, 13, 29937, 278, 12362, 18540, 10606, 29892, 2845, 1873, 29871, 29941, 310, 278, 19245, 29892, 470, 13, 29937, 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, 29889, 29871, 960, 451, 29892, 1074, 669, 1896, 29936, 1124, 597, 1636, 29889, 18713, 29889, 990, 29914, 506, 11259, 29914, 29987, 4141, 29936, 29889, 13, 29937, 13, 13383, 13383, 13383, 7346, 4136, 2277, 13, 13, 5215, 16250, 13, 13, 13, 1990, 18531, 6982, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 848, 29918, 13193, 1125, 13, 4706, 1583, 3032, 14836, 353, 16250, 29889, 311, 802, 580, 13, 13, 4706, 363, 7023, 297, 848, 29918, 13193, 29901, 13, 9651, 363, 302, 297, 3464, 29898, 29947, 1125, 13, 18884, 1583, 3032, 14836, 29889, 4397, 29898, 11227, 3552, 10389, 5099, 313, 29955, 448, 302, 876, 669, 29871, 29896, 876, 13, 13, 1678, 822, 679, 21591, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 14836, 29889, 7323, 1563, 580, 13, 13, 1678, 822, 679, 29933, 1169, 29898, 1311, 29892, 954, 1125, 13, 4706, 620, 353, 29871, 29900, 13, 4706, 363, 474, 297, 3464, 29898, 1949, 1125, 13, 9651, 620, 4619, 1583, 29889, 657, 21591, 580, 3532, 954, 448, 29871, 29896, 448, 474, 13, 4706, 736, 620, 13, 13, 1678, 822, 679, 12901, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 657, 29933, 1169, 29898, 29947, 29897, 13, 13, 1678, 822, 4770, 2435, 12035, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 3032, 14836, 29897, 13, 13, 13, 1990, 17716, 1293, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3309, 1125, 13, 4706, 1583, 17255, 1272, 1649, 353, 16250, 29889, 311, 802, 580, 13, 4706, 1583, 17255, 8159, 1649, 353, 7700, 13, 4706, 1583, 17255, 3317, 1649, 353, 3309, 13, 13, 1678, 822, 9773, 29898, 1311, 29892, 921, 1125, 13, 4706, 565, 1583, 17255, 8159, 1649, 29901, 13, 9651, 1583, 17255, 1272, 26914, 7323, 1563, 580, 13, 4706, 1583, 17255, 1272, 26914, 4397, 29898, 29916, 29897, 13, 4706, 565, 1583, 29889, 2311, 580, 1275, 1583, 17255, 3317, 1649, 29901, 13, 9651, 1583, 17255, 8159, 1649, 353, 5852, 13, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 1272, 1649, 13, 13, 1678, 822, 2159, 29898, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 17255, 1272, 1649, 29897, 13, 13, 1678, 822, 4236, 2311, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 3317, 1649, 13, 13, 1678, 822, 4770, 657, 667, 12035, 1311, 29892, 302, 1125, 13, 4706, 565, 302, 6736, 1583, 29889, 2311, 7295, 13, 9651, 736, 6213, 13, 4706, 736, 1583, 17255, 1272, 1649, 29961, 29876, 29962, 13, 13, 13, 1753, 365, 29999, 29903, 2772, 510, 2139, 29898, 1272, 29892, 3474, 29922, 29934, 292, 1293, 29898, 29906, 29900, 29946, 29947, 22164, 13, 1678, 9591, 353, 18531, 6982, 29898, 1272, 29897, 13, 1678, 1121, 353, 6629, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 2586, 353, 9591, 29889, 657, 21591, 580, 13, 4706, 565, 451, 2586, 29901, 13, 9651, 1373, 353, 9591, 29889, 657, 12901, 580, 13, 9651, 1121, 4619, 18460, 29898, 3090, 29897, 13, 9651, 3474, 29889, 4397, 29898, 3090, 29897, 13, 4706, 1683, 29901, 13, 9651, 2586, 353, 9591, 29889, 657, 21591, 580, 13, 9651, 565, 2586, 29901, 13, 18884, 9210, 353, 9591, 29889, 657, 29933, 1169, 29898, 29955, 29897, 13, 18884, 565, 9210, 1275, 29871, 29900, 29901, 13, 462, 1678, 396, 382, 9800, 13, 462, 1678, 2867, 13, 9651, 1683, 29901, 13, 18884, 9210, 353, 9591, 29889, 657, 29933, 1169, 29898, 29896, 29896, 29897, 13, 13, 9651, 7431, 3073, 353, 9591, 29889, 657, 29933, 1169, 29898, 29906, 29897, 13, 9651, 565, 7431, 3073, 529, 29871, 29941, 29901, 13, 18884, 3309, 353, 7431, 3073, 718, 29871, 29906, 13, 9651, 1683, 29901, 13, 18884, 7431, 3073, 3532, 29922, 29871, 29906, 13, 18884, 7431, 3073, 4619, 9591, 29889, 657, 29933, 1169, 29898, 29906, 29897, 13, 18884, 565, 7431, 3073, 529, 29871, 29896, 29945, 29901, 13, 462, 1678, 3309, 353, 313, 2435, 3073, 669, 29871, 29900, 29916, 29900, 29888, 29897, 718, 29871, 29945, 13, 18884, 1683, 29901, 13, 462, 1678, 7431, 17779, 353, 29871, 29900, 13, 462, 1678, 7431, 3073, 353, 9591, 29889, 657, 29933, 1169, 29898, 29946, 29897, 13, 462, 1678, 1550, 7431, 3073, 1275, 29871, 29896, 29945, 29901, 13, 462, 4706, 7431, 3073, 353, 9591, 29889, 657, 29933, 1169, 29898, 29946, 29897, 13, 462, 4706, 7431, 17779, 4619, 29871, 29896, 13, 462, 1678, 3309, 353, 29871, 29896, 29945, 334, 7431, 17779, 718, 29871, 29947, 718, 7431, 3073, 13, 9651, 363, 474, 297, 3464, 29898, 2848, 1125, 13, 18884, 1373, 353, 3474, 14352, 10289, 29962, 13, 18884, 1121, 4619, 18460, 29898, 3090, 29897, 13, 18884, 3474, 29889, 4397, 29898, 3090, 29897, 13, 13, 1678, 736, 1121, 29892, 3474, 13, 13, 13, 1990, 1714, 24183, 29901, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 6597, 29918, 19651, 29898, 19541, 29918, 1272, 1125, 13, 4706, 6031, 353, 337, 29889, 2886, 497, 703, 29961, 3823, 29916, 29900, 29900, 2612, 29916, 29896, 29943, 29905, 29916, 29955, 29943, 2612, 29916, 4198, 3199, 29946, 29892, 17671, 7581, 29918, 1272, 29897, 13, 4706, 736, 6031, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 921, 272, 29918, 1807, 29898, 1807, 1125, 13, 4706, 1121, 353, 5124, 13, 4706, 363, 274, 297, 1347, 29901, 13, 9651, 1121, 4619, 18460, 29898, 536, 29898, 29883, 29897, 6228, 7431, 29898, 1807, 876, 13, 4706, 736, 1121, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 2967, 29953, 29946, 29918, 1807, 29898, 1807, 1125, 13, 4706, 2967, 29953, 29946, 29889, 29890, 29953, 29946, 12508, 29898, 1807, 29889, 12508, 3101, 13, 4706, 736, 1347, 29889, 13808, 580, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 4036, 29918, 1807, 29898, 2848, 29922, 29896, 29953, 29892, 22968, 29922, 1807, 29889, 294, 18869, 29918, 1026, 2153, 718, 1347, 29889, 7501, 1169, 1125, 13, 4706, 736, 376, 1642, 7122, 29898, 8172, 29889, 16957, 29898, 284, 17416, 29897, 363, 903, 297, 3464, 29898, 2848, 876, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 301, 22381, 29918, 311, 510, 2139, 29898, 1272, 29892, 3474, 29922, 29934, 292, 1293, 29898, 29906, 29900, 29946, 29947, 22164, 13, 4706, 1121, 29892, 3474, 353, 365, 29999, 29903, 2772, 510, 2139, 29898, 1272, 29892, 3474, 29897, 13, 4706, 736, 1121, 13, 2 ]
Curso_de_Python_ Curso_em_Video/PythonExercicios/ex113.py
DanilooSilva/Cursos_de_Python
0
71162
def leiaInt(mgn): while True: try: n = int(input(mgn)) except (ValueError, TypeError): print('\033[031mErro: por favor, digite um número interio válido.\033[m') else: return n break def leiaFloat(mgn): while True: try: n = float(input(mgn)) except (ValueError, TypeError): print('\033[031mErro: por favor, digite um número real válido.\033[m') else: return f'{n:.2f}' break nu = leiaInt('Digite um valor inteiro: ') fl = leiaFloat('Digite um número real: ') print(f'O valor Inteiro é {nu} e o número real é {fl}')
[ 1, 822, 454, 423, 2928, 29898, 29885, 5138, 1125, 13, 1678, 1550, 5852, 29901, 13, 4706, 1018, 29901, 13, 9651, 302, 353, 938, 29898, 2080, 29898, 29885, 5138, 876, 13, 4706, 5174, 313, 1917, 2392, 29892, 20948, 1125, 13, 9651, 1596, 28909, 29900, 29941, 29941, 29961, 29900, 29941, 29896, 29885, 2110, 307, 29901, 1277, 7853, 29892, 4697, 568, 1922, 13831, 1006, 601, 12196, 1941, 7790, 29900, 29941, 29941, 29961, 29885, 1495, 13, 4706, 1683, 29901, 13, 9651, 736, 302, 13, 9651, 2867, 13, 13, 13, 1753, 454, 423, 11031, 29898, 29885, 5138, 1125, 13, 1678, 1550, 5852, 29901, 13, 4706, 1018, 29901, 13, 9651, 302, 353, 5785, 29898, 2080, 29898, 29885, 5138, 876, 13, 4706, 5174, 313, 1917, 2392, 29892, 20948, 1125, 13, 9651, 1596, 28909, 29900, 29941, 29941, 29961, 29900, 29941, 29896, 29885, 2110, 307, 29901, 1277, 7853, 29892, 4697, 568, 1922, 13831, 1855, 12196, 1941, 7790, 29900, 29941, 29941, 29961, 29885, 1495, 13, 4706, 1683, 29901, 13, 9651, 736, 285, 29915, 29912, 29876, 29901, 29889, 29906, 29888, 10162, 13, 9651, 2867, 13, 13, 13, 13, 13, 3433, 353, 454, 423, 2928, 877, 14991, 568, 1922, 16497, 2293, 3350, 29901, 25710, 13, 1579, 353, 454, 423, 11031, 877, 14991, 568, 1922, 13831, 1855, 29901, 25710, 13, 2158, 29898, 29888, 29915, 29949, 16497, 512, 371, 3350, 904, 426, 3433, 29913, 321, 288, 13831, 1855, 904, 426, 1579, 29913, 1495, 2 ]
prog/python/python tuto/snapper/Snapper.py
gribdesbois/prog-backup
0
1606068
#handle text display def display_scoreboard_data(scoreboard_text, alignment): display_text = font.render(scoreboard_text, True, WHITE) text_rect = display_text.get_rect() text_loc = [0, 0] if alignment == 'Left': text_loc = [SCOREBOARD_MARGIN, SCREEN_HEIGHT - SCOREBOARD_HEIGHT] elif alignment == 'Centre': text_loc = [(SCREEN_WIDTH - text_rect.width) / 2, SCREEN_HEIGHT - SCOREBOARD_HEIGHT] game_screen.blit(display_text, text_loc) #display end of game message def display_game_over(): game_over_rect = (3 * SCOREBOARD_HEIGHT, 8 * SCOREBOARD_HEIGHT, SCREEN_WIDTH - SCOREBOARD_HEIGHT * 6, SCOREBOARD_HEIGHT * 5) pygame.draw.rect(game_screen, DARK_GREEN, game_over_rect) text_line_1 = font.render('GAME OVER', True, WHITE) text_rect_1 = text_line_1.get_rect() text_line_1_loc = [(SCREEN_WIDTH - text_rect_1.width) / 2, (SCREEN_HEIGHT / 2) - 16] text_line_2 = font.render('HIT RETURN FOR A NEW GAME', True, WHITE) text_rect_2 = text_line_2.get_rect() text_line_2_loc = [(SCREEN_WIDTH - text_rect_2.width) / 2, (SCREEN_HEIGHT / 2) + 16] game_screen.blit(text_line_1, text_line_1_loc) game_screen.blit(text_line_2, text_line_2_loc) if __name__ == '__main__': main()
[ 1, 29871, 13, 13, 29937, 8411, 1426, 2479, 13, 1753, 2479, 29918, 13628, 3377, 29918, 1272, 29898, 13628, 3377, 29918, 726, 29892, 22239, 1125, 13, 12, 4990, 29918, 726, 353, 4079, 29889, 9482, 29898, 13628, 3377, 29918, 726, 29892, 5852, 29892, 12317, 9094, 29897, 13, 12, 726, 29918, 1621, 353, 2479, 29918, 726, 29889, 657, 29918, 1621, 580, 13, 13, 12, 726, 29918, 2029, 353, 518, 29900, 29892, 29871, 29900, 29962, 13, 13, 12, 361, 22239, 1275, 525, 8091, 2396, 13, 12, 12, 726, 29918, 2029, 353, 518, 29903, 3217, 1525, 8456, 17011, 29918, 1529, 29934, 29954, 1177, 29892, 12314, 1525, 1430, 29918, 9606, 22530, 448, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 29962, 13, 13, 12, 23681, 22239, 1275, 525, 29907, 14056, 2396, 13, 12, 12, 726, 29918, 2029, 353, 17288, 7187, 1525, 1430, 29918, 22574, 448, 1426, 29918, 1621, 29889, 2103, 29897, 847, 29871, 29906, 29892, 12314, 1525, 1430, 29918, 9606, 22530, 448, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 29962, 13, 13, 12, 11802, 29918, 10525, 29889, 2204, 277, 29898, 4990, 29918, 726, 29892, 1426, 29918, 2029, 29897, 13, 13, 13, 29937, 4990, 1095, 310, 3748, 2643, 13, 13, 1753, 2479, 29918, 11802, 29918, 957, 7295, 13, 12, 11802, 29918, 957, 29918, 1621, 353, 313, 29941, 334, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 29892, 29871, 29947, 334, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 29892, 12314, 1525, 1430, 29918, 22574, 448, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 334, 29871, 29953, 29892, 317, 3217, 1525, 8456, 17011, 29918, 9606, 22530, 334, 29871, 29945, 29897, 13, 13, 12, 2272, 11802, 29889, 4012, 29889, 1621, 29898, 11802, 29918, 10525, 29892, 360, 1718, 29968, 29918, 29954, 1525, 1430, 29892, 3748, 29918, 957, 29918, 1621, 29897, 13, 13, 12, 726, 29918, 1220, 29918, 29896, 353, 4079, 29889, 9482, 877, 12739, 2303, 438, 5348, 742, 5852, 29892, 12317, 9094, 29897, 13, 12, 726, 29918, 1621, 29918, 29896, 353, 1426, 29918, 1220, 29918, 29896, 29889, 657, 29918, 1621, 580, 13, 12, 726, 29918, 1220, 29918, 29896, 29918, 2029, 353, 17288, 7187, 1525, 1430, 29918, 22574, 448, 1426, 29918, 1621, 29918, 29896, 29889, 2103, 29897, 847, 29871, 29906, 29892, 313, 7187, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29906, 29897, 448, 29871, 29896, 29953, 29962, 13, 13, 12, 726, 29918, 1220, 29918, 29906, 353, 4079, 29889, 9482, 877, 29950, 1806, 28081, 24015, 15842, 319, 29091, 402, 25797, 742, 5852, 29892, 12317, 9094, 29897, 13, 12, 726, 29918, 1621, 29918, 29906, 353, 1426, 29918, 1220, 29918, 29906, 29889, 657, 29918, 1621, 580, 13, 12, 726, 29918, 1220, 29918, 29906, 29918, 2029, 353, 17288, 7187, 1525, 1430, 29918, 22574, 448, 1426, 29918, 1621, 29918, 29906, 29889, 2103, 29897, 847, 29871, 29906, 29892, 313, 7187, 1525, 1430, 29918, 9606, 22530, 847, 29871, 29906, 29897, 718, 29871, 29896, 29953, 29962, 13, 13, 12, 11802, 29918, 10525, 29889, 2204, 277, 29898, 726, 29918, 1220, 29918, 29896, 29892, 1426, 29918, 1220, 29918, 29896, 29918, 2029, 29897, 13, 12, 11802, 29918, 10525, 29889, 2204, 277, 29898, 726, 29918, 1220, 29918, 29906, 29892, 1426, 29918, 1220, 29918, 29906, 29918, 2029, 29897, 13, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 12, 3396, 580, 13, 2 ]
utopian.py
tolgahanuzun/curation
0
132104
<reponame>tolgahanuzun/curation import requests from bs4 import BeautifulSoup from utils import avaible_link utopian_link = 'https://utopian.rocks/queue' exclude = 'https://steemit.com/utopian-io/@amosbastian/developing-the-new-utopian-bot' def run(): r = requests.get(utopian_link) data = r.text soup = BeautifulSoup(data) contributions = soup.find('div', {'class' :'contributions'}) data = [] for link in soup.find_all('a'): link = link.get('href') if avaible_link(link): data.append(link) if exclude in data: data.remove(exclude) return data
[ 1, 529, 276, 1112, 420, 29958, 29873, 22991, 801, 273, 3365, 348, 29914, 29883, 2633, 13, 5215, 7274, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 13, 3166, 3667, 29879, 1053, 1029, 1794, 569, 29918, 2324, 13, 13, 329, 459, 713, 29918, 2324, 353, 525, 991, 597, 329, 459, 713, 29889, 307, 4684, 29914, 9990, 29915, 13, 735, 2325, 353, 525, 991, 597, 1655, 21976, 29889, 510, 29914, 329, 459, 713, 29899, 601, 29368, 14054, 29890, 579, 713, 29914, 4888, 292, 29899, 1552, 29899, 1482, 29899, 329, 459, 713, 29899, 7451, 29915, 13, 13, 1753, 1065, 7295, 13, 1678, 364, 29871, 353, 7274, 29889, 657, 29898, 329, 459, 713, 29918, 2324, 29897, 13, 1678, 848, 353, 364, 29889, 726, 13, 13, 1678, 22300, 353, 25685, 29903, 1132, 29898, 1272, 29897, 13, 1678, 20706, 353, 22300, 29889, 2886, 877, 4563, 742, 11117, 1990, 29915, 584, 29915, 1285, 3224, 29879, 29915, 1800, 13, 1678, 848, 353, 5159, 13, 1678, 363, 1544, 297, 22300, 29889, 2886, 29918, 497, 877, 29874, 29374, 13, 4706, 1544, 353, 1544, 29889, 657, 877, 12653, 1495, 13, 4706, 565, 1029, 1794, 569, 29918, 2324, 29898, 2324, 1125, 13, 9651, 848, 29889, 4397, 29898, 2324, 29897, 13, 1678, 565, 19060, 297, 848, 29901, 13, 4706, 848, 29889, 5992, 29898, 735, 2325, 29897, 13, 1678, 736, 848, 13, 2 ]
pysal/explore/pointpats/centrography.py
ocefpaf/pysal
1
72736
""" Centrographic measures for point patterns TODO - testing - documentation """ __author__ = "<NAME> <EMAIL>" __all__ = ['mbr', 'hull', 'mean_center', 'weighted_mean_center', 'manhattan_median', 'std_distance', 'euclidean_median', 'ellipse', 'skyum', 'dtot',"_circle"] import sys import numpy as np import warnings import copy from math import pi as PI from scipy.spatial import ConvexHull from pysal.lib.cg import get_angle_between, Ray, is_clockwise from scipy.spatial import distance as dist from scipy.optimize import minimize not_clockwise = lambda x: not is_clockwise(x) MAXD = sys.float_info.max MIND = sys.float_info.min def mbr(points): """ Find minimum bounding rectangle of a point array. Parameters ---------- points : arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- min_x : float leftmost value of the vertices of minimum bounding rectangle. min_y : float downmost value of the vertices of minimum bounding rectangle. max_x : float rightmost value of the vertices of minimum bounding rectangle. max_y : float upmost value of the vertices of minimum bounding rectangle. """ points = np.asarray(points) min_x = min_y = MAXD max_x = max_y = MIND for point in points: x, y = point if x > max_x: max_x = x if x < min_x: min_x = x if y > max_y: max_y = y if y < min_y: min_y = y return min_x, min_y, max_x, max_y def hull(points): """ Find convex hull of a point array. Parameters ---------- points: arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : array (h,2), points defining the hull in counterclockwise order. """ points = np.asarray(points) h = ConvexHull(points) return points[h.vertices] def mean_center(points): """ Find mean center of a point array. Parameters ---------- points: arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : array (2,), (x,y) coordinates of the mean center. """ points = np.asarray(points) return points.mean(axis=0) def weighted_mean_center(points, weights): """ Find weighted mean center of a marked point pattern. Parameters ---------- points : arraylike (n,2), (x,y) coordinates of a series of event points. weights : arraylike a series of attribute values of length n. Returns ------- _ : array (2,), (x,y) coordinates of the weighted mean center. """ points, weights = np.asarray(points), np.asarray(weights) w = weights * 1. / weights.sum() w.shape = (1, len(points)) return np.dot(w, points)[0] def manhattan_median(points): """ Find manhattan median of a point array. Parameters ---------- points : arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : array (2,), (x,y) coordinates of the manhattan median. """ points = np.asarray(points) if not len(points) % 2: s = "Manhattan Median is not unique for even point patterns." warnings.warn(s) return np.median(points, axis=0) def std_distance(points): """ Calculate standard distance of a point array. Parameters ---------- points : arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : float standard distance. """ points = np.asarray(points) n, p = points.shape m = points.mean(axis=0) return np.sqrt(((points*points).sum(axis=0)/n - m*m).sum()) def ellipse(points): """ Calculate parameters of standard deviational ellipse for a point pattern. Parameters ---------- points : arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : float semi-major axis. _ : float semi-minor axis. theta : float clockwise rotation angle of the ellipse. Notes ----- Implements approach from: https://www.icpsr.umich.edu/CrimeStat/files/CrimeStatChapter.4.pdf """ points = np.asarray(points) n, k = points.shape x = points[:, 0] y = points[:, 1] xd = x - x.mean() yd = y - y.mean() xss = (xd * xd).sum() yss = (yd * yd).sum() cv = (xd * yd).sum() num = (xss - yss) + np.sqrt((xss - yss)**2 + 4 * (cv)**2) den = 2 * cv theta = np.arctan(num / den) cos_theta = np.cos(theta) sin_theta = np.sin(theta) n_2 = n - 2 sd_x = (2 * (xd * cos_theta - yd * sin_theta)**2).sum() / n_2 sd_y = (2 * (xd * sin_theta - yd * cos_theta)**2).sum() / n_2 return np.sqrt(sd_x), np.sqrt(sd_y), theta def dtot(coord, points): """ Sum of Euclidean distances between event points and a selected point. Parameters ---------- coord : arraylike (x,y) coordinates of a point. points : arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- d : float sum of Euclidean distances. """ points = np.asarray(points) xd = points[:, 0] - coord[0] yd = points[:, 1] - coord[1] d = np.sqrt(xd*xd + yd*yd).sum() return d def euclidean_median(points): """ Calculate the Euclidean median for a point pattern. Parameters ---------- points: arraylike (n,2), (x,y) coordinates of a series of event points. Returns ------- _ : array (2,), (x,y) coordinates of the Euclidean median. """ points = np.asarray(points) start = mean_center(points) res = minimize(dtot, start, args=(points,)) return res['x'] def skyum(points, not_hull=True): """ Implements Skyum (1990)'s algorithm for the minimum bounding circle in R^2. 0. Store points clockwise. 1. Find p in S that maximizes angle(prec(p), p, succ(p) THEN radius(prec(p), p, succ(p)). This is also called the lexicographic maximum, and is the last entry of a list of (radius, angle) in lexicographical order. 2a. If angle(prec(p), p, succ(p)) <= 90 degrees, then finish. 2b. If not, remove p from set. """ points = hull(points).tolist() if not_clockwise(points): points.reverse() if not_clockwise(points): raise Exception('Points are neither clockwise nor counterclockwise') POINTS = copy.deepcopy(points) removed = [] i=0 while True: angles = [_angle(_prec(p, points), p, _succ(p, points)) for p in points] circles = [_circle(_prec(p, points), p, _succ(p, points)) for p in points] radii = [c[0] for c in circles] lexord = np.lexsort((radii, angles)) #confusing as hell defaults... lexmax = lexord[-1] candidate = (_prec(points[lexmax], points), points[lexmax], _succ(points[lexmax], points)) if angles[lexmax] <= PI/2.0: #print("Constrained by points: {}".format(candidate)) return _circle(*candidate), points, removed, candidate else: try: removed.append((points.pop(lexmax), i)) except IndexError: raise Exception("Construction of Minimum Bounding Circle failed!") i+=1 def _angle(p,q,r): """ compute the positive angle formed by PQR """ return np.abs(get_angle_between(Ray(q,p),Ray(q,r))) def _prec(p,l): """ retrieve the predecessor of p in list l """ pos = l.index(p) if pos-1 < 0: return l[-1] else: return l[pos-1] def _succ(p,l): """ retrieve the successor of p in list l """ pos = l.index(p) if pos+1 >= len(l): return l[0] else: return l[pos+1] def _circle(p,q,r, dmetric=dist.euclidean): """ Returns (radius, (center_x, center_y)) of the circumscribed circle by the triangle pqr. note, this does not assume that p!=q!=r """ px,py = p qx,qy = q rx,ry = r if np.allclose(np.abs(_angle(p,q,r)), PI): radius = dmetric(p,r)/2. center_x = (px + rx)/2. center_y = (py + ry)/2. elif np.allclose(np.abs(_angle(p,q,r)), 0): radius = dmetric(p,q)/2. center_x = (px + qx)/2. center_y = (py + qy)/2. else: D = 2*(px*(qy - ry) + qx*(ry - py) + rx*(py - qy)) center_x = ((px**2 + py**2)*(qy-ry) + (qx**2 + qy**2)*(ry-py) + (rx**2 + ry**2)*(py-qy)) / float(D) center_y = ((px**2 + py**2)*(rx-qx) + (qx**2 + qy**2)*(px-rx) + (rx**2 + ry**2)*(qx-px)) / float(D) radius = dmetric((center_x, center_y), p) return radius, (center_x, center_y)
[ 1, 9995, 13, 23369, 307, 4262, 293, 15366, 363, 1298, 15038, 13, 13, 4986, 3970, 13, 13, 29899, 6724, 13, 29899, 5106, 13, 13, 15945, 29908, 13, 13, 1649, 8921, 1649, 353, 9872, 5813, 29958, 529, 26862, 6227, 11903, 13, 1649, 497, 1649, 353, 6024, 29885, 1182, 742, 525, 29882, 913, 742, 525, 12676, 29918, 5064, 742, 525, 7915, 287, 29918, 12676, 29918, 5064, 742, 13, 965, 525, 1171, 29882, 23586, 29918, 2168, 713, 742, 525, 4172, 29918, 19244, 742, 525, 29872, 27511, 29918, 2168, 713, 742, 525, 295, 5843, 742, 13, 965, 525, 7912, 398, 742, 525, 29881, 4260, 742, 29908, 29918, 16622, 3108, 13, 13, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 5215, 18116, 13, 5215, 3509, 13, 3166, 5844, 1053, 2930, 408, 349, 29902, 13, 3166, 4560, 2272, 29889, 1028, 15238, 1053, 1281, 13809, 29950, 913, 13, 3166, 282, 952, 284, 29889, 1982, 29889, 29883, 29887, 1053, 679, 29918, 2521, 29918, 14811, 29892, 9596, 29892, 338, 29918, 13058, 3538, 13, 3166, 4560, 2272, 29889, 1028, 15238, 1053, 5418, 408, 1320, 13, 3166, 4560, 2272, 29889, 20640, 675, 1053, 6260, 675, 13, 13, 1333, 29918, 13058, 3538, 353, 14013, 921, 29901, 451, 338, 29918, 13058, 3538, 29898, 29916, 29897, 13, 13, 12648, 29928, 353, 10876, 29889, 7411, 29918, 3888, 29889, 3317, 13, 16173, 29928, 353, 10876, 29889, 7411, 29918, 3888, 29889, 1195, 13, 13, 13, 1753, 286, 1182, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 10987, 9212, 3216, 292, 16701, 310, 263, 1298, 1409, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 584, 1409, 4561, 13, 632, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 1375, 29918, 29916, 29871, 584, 5785, 13, 632, 2175, 3242, 995, 310, 278, 13791, 310, 9212, 3216, 292, 16701, 29889, 13, 1678, 1375, 29918, 29891, 29871, 584, 5785, 13, 632, 1623, 3242, 995, 310, 278, 13791, 310, 9212, 3216, 292, 16701, 29889, 13, 1678, 4236, 29918, 29916, 29871, 584, 5785, 13, 632, 1492, 3242, 995, 310, 278, 13791, 310, 9212, 3216, 292, 16701, 29889, 13, 1678, 4236, 29918, 29891, 29871, 584, 5785, 13, 632, 701, 3242, 995, 310, 278, 13791, 310, 9212, 3216, 292, 16701, 29889, 13, 13, 1678, 9995, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 1375, 29918, 29916, 353, 1375, 29918, 29891, 353, 18134, 29928, 13, 1678, 4236, 29918, 29916, 353, 4236, 29918, 29891, 353, 341, 22255, 13, 1678, 363, 1298, 297, 3291, 29901, 13, 4706, 921, 29892, 343, 353, 1298, 13, 4706, 565, 921, 1405, 4236, 29918, 29916, 29901, 13, 9651, 4236, 29918, 29916, 353, 921, 13, 4706, 565, 921, 529, 1375, 29918, 29916, 29901, 13, 9651, 1375, 29918, 29916, 353, 921, 13, 4706, 565, 343, 1405, 4236, 29918, 29891, 29901, 13, 9651, 4236, 29918, 29891, 353, 343, 13, 4706, 565, 343, 529, 1375, 29918, 29891, 29901, 13, 9651, 1375, 29918, 29891, 353, 343, 13, 1678, 736, 1375, 29918, 29916, 29892, 1375, 29918, 29891, 29892, 4236, 29918, 29916, 29892, 4236, 29918, 29891, 13, 13, 13, 1753, 298, 913, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 10987, 18635, 298, 913, 310, 263, 1298, 1409, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29901, 1409, 4561, 13, 9651, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 268, 584, 1409, 13, 9651, 313, 29882, 29892, 29906, 511, 3291, 16184, 278, 298, 913, 297, 6795, 13058, 3538, 1797, 29889, 13, 1678, 9995, 13, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 298, 353, 1281, 13809, 29950, 913, 29898, 9748, 29897, 13, 1678, 736, 3291, 29961, 29882, 29889, 1765, 1575, 29962, 13, 13, 13, 1753, 2099, 29918, 5064, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 10987, 2099, 4818, 310, 263, 1298, 1409, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29901, 1409, 4561, 13, 9651, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 268, 584, 1409, 13, 9651, 313, 29906, 29892, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 278, 2099, 4818, 29889, 13, 1678, 9995, 13, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 736, 3291, 29889, 12676, 29898, 8990, 29922, 29900, 29897, 13, 13, 13, 1753, 7688, 287, 29918, 12676, 29918, 5064, 29898, 9748, 29892, 18177, 1125, 13, 1678, 9995, 13, 1678, 10987, 7688, 287, 2099, 4818, 310, 263, 10902, 1298, 4766, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29871, 584, 1409, 4561, 13, 795, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 1678, 18177, 584, 1409, 4561, 13, 795, 263, 3652, 310, 5352, 1819, 310, 3309, 302, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 418, 584, 1409, 13, 632, 313, 29906, 29892, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 278, 7688, 287, 2099, 4818, 29889, 13, 1678, 9995, 13, 13, 13, 1678, 3291, 29892, 18177, 353, 7442, 29889, 294, 2378, 29898, 9748, 511, 7442, 29889, 294, 2378, 29898, 705, 5861, 29897, 13, 1678, 281, 353, 18177, 334, 29871, 29896, 29889, 847, 18177, 29889, 2083, 580, 13, 1678, 281, 29889, 12181, 353, 313, 29896, 29892, 7431, 29898, 9748, 876, 13, 1678, 736, 7442, 29889, 6333, 29898, 29893, 29892, 3291, 9601, 29900, 29962, 13, 13, 13, 1753, 767, 29882, 23586, 29918, 2168, 713, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 10987, 767, 29882, 23586, 19194, 310, 263, 1298, 1409, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29871, 584, 1409, 4561, 13, 795, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 418, 584, 1409, 13, 632, 313, 29906, 29892, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 278, 767, 29882, 23586, 19194, 29889, 13, 1678, 9995, 13, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 565, 451, 7431, 29898, 9748, 29897, 1273, 29871, 29906, 29901, 13, 4706, 269, 353, 376, 2517, 29882, 23586, 3436, 713, 338, 451, 5412, 363, 1584, 1298, 15038, 1213, 13, 4706, 18116, 29889, 25442, 29898, 29879, 29897, 13, 1678, 736, 7442, 29889, 2168, 713, 29898, 9748, 29892, 9685, 29922, 29900, 29897, 13, 13, 13, 1753, 3659, 29918, 19244, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 20535, 403, 3918, 5418, 310, 263, 1298, 1409, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29871, 584, 1409, 4561, 13, 795, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 418, 584, 5785, 13, 632, 3918, 5418, 29889, 13, 1678, 9995, 13, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 302, 29892, 282, 353, 3291, 29889, 12181, 13, 1678, 286, 353, 3291, 29889, 12676, 29898, 8990, 29922, 29900, 29897, 13, 1678, 736, 7442, 29889, 3676, 3552, 29898, 9748, 29930, 9748, 467, 2083, 29898, 8990, 29922, 29900, 6802, 29876, 448, 286, 29930, 29885, 467, 2083, 3101, 13, 13, 13, 1753, 560, 5843, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 20535, 403, 4128, 310, 3918, 29668, 1288, 560, 5843, 363, 263, 1298, 4766, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 584, 1409, 4561, 13, 632, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 418, 584, 5785, 13, 632, 12647, 29899, 21355, 9685, 29889, 13, 1678, 903, 418, 584, 5785, 13, 632, 12647, 29899, 1195, 272, 9685, 29889, 13, 1678, 278, 941, 29871, 584, 5785, 13, 632, 12006, 3538, 13733, 10696, 310, 278, 560, 5843, 29889, 13, 13, 1678, 8695, 13, 1678, 448, 807, 13, 1678, 1954, 9711, 2948, 515, 29901, 13, 13, 1678, 2045, 597, 1636, 29889, 293, 567, 29878, 29889, 398, 436, 29889, 6085, 29914, 20647, 603, 9513, 29914, 5325, 29914, 20647, 603, 9513, 1451, 3314, 29889, 29946, 29889, 5140, 13, 1678, 9995, 13, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 302, 29892, 413, 353, 3291, 29889, 12181, 13, 1678, 921, 353, 3291, 7503, 29892, 29871, 29900, 29962, 13, 1678, 343, 353, 3291, 7503, 29892, 29871, 29896, 29962, 13, 1678, 921, 29881, 353, 921, 448, 921, 29889, 12676, 580, 13, 1678, 343, 29881, 353, 343, 448, 343, 29889, 12676, 580, 13, 1678, 921, 893, 353, 313, 29916, 29881, 334, 921, 29881, 467, 2083, 580, 13, 1678, 343, 893, 353, 313, 2941, 334, 343, 29881, 467, 2083, 580, 13, 1678, 13850, 353, 313, 29916, 29881, 334, 343, 29881, 467, 2083, 580, 13, 1678, 954, 353, 313, 29916, 893, 448, 343, 893, 29897, 718, 7442, 29889, 3676, 3552, 29916, 893, 448, 343, 893, 29897, 1068, 29906, 718, 29871, 29946, 334, 313, 11023, 29897, 1068, 29906, 29897, 13, 1678, 972, 353, 29871, 29906, 334, 13850, 13, 1678, 278, 941, 353, 7442, 29889, 27014, 273, 29898, 1949, 847, 972, 29897, 13, 1678, 6776, 29918, 3416, 353, 7442, 29889, 3944, 29898, 3416, 29897, 13, 1678, 4457, 29918, 3416, 353, 7442, 29889, 5223, 29898, 3416, 29897, 13, 1678, 302, 29918, 29906, 353, 302, 448, 29871, 29906, 13, 1678, 28972, 29918, 29916, 353, 313, 29906, 334, 313, 29916, 29881, 334, 6776, 29918, 3416, 448, 343, 29881, 334, 4457, 29918, 3416, 29897, 1068, 29906, 467, 2083, 580, 847, 302, 29918, 29906, 13, 1678, 28972, 29918, 29891, 353, 313, 29906, 334, 313, 29916, 29881, 334, 4457, 29918, 3416, 448, 343, 29881, 334, 6776, 29918, 3416, 29897, 1068, 29906, 467, 2083, 580, 847, 302, 29918, 29906, 13, 1678, 736, 7442, 29889, 3676, 29898, 4928, 29918, 29916, 511, 7442, 29889, 3676, 29898, 4928, 29918, 29891, 511, 278, 941, 13, 13, 13, 1753, 270, 4260, 29898, 1111, 536, 29892, 3291, 1125, 13, 1678, 9995, 13, 1678, 6991, 310, 382, 27511, 24610, 1546, 1741, 3291, 322, 263, 4629, 1298, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 29311, 259, 584, 1409, 4561, 13, 795, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 1298, 29889, 13, 1678, 3291, 29871, 584, 1409, 4561, 13, 795, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 270, 539, 584, 5785, 13, 795, 2533, 310, 382, 27511, 24610, 29889, 13, 13, 1678, 9995, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 921, 29881, 353, 3291, 7503, 29892, 29871, 29900, 29962, 448, 29311, 29961, 29900, 29962, 13, 1678, 343, 29881, 353, 3291, 7503, 29892, 29871, 29896, 29962, 448, 29311, 29961, 29896, 29962, 13, 1678, 270, 353, 7442, 29889, 3676, 29898, 29916, 29881, 29930, 29916, 29881, 718, 343, 29881, 29930, 2941, 467, 2083, 580, 13, 1678, 736, 270, 13, 13, 1753, 321, 27511, 29918, 2168, 713, 29898, 9748, 1125, 13, 1678, 9995, 13, 1678, 20535, 403, 278, 382, 27511, 19194, 363, 263, 1298, 4766, 29889, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 3291, 29901, 1409, 4561, 13, 9651, 313, 29876, 29892, 29906, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 263, 3652, 310, 1741, 3291, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 903, 268, 584, 1409, 13, 9651, 313, 29906, 29892, 511, 313, 29916, 29892, 29891, 29897, 10350, 310, 278, 382, 27511, 19194, 29889, 13, 13, 1678, 9995, 13, 1678, 3291, 353, 7442, 29889, 294, 2378, 29898, 9748, 29897, 13, 1678, 1369, 353, 2099, 29918, 5064, 29898, 9748, 29897, 13, 1678, 620, 353, 6260, 675, 29898, 29881, 4260, 29892, 1369, 29892, 6389, 7607, 9748, 29892, 876, 13, 1678, 736, 620, 1839, 29916, 2033, 13, 13, 1753, 14744, 398, 29898, 9748, 29892, 451, 29918, 29882, 913, 29922, 5574, 1125, 13, 1678, 9995, 13, 1678, 1954, 9711, 16572, 398, 313, 29896, 29929, 29929, 29900, 16029, 29879, 5687, 363, 278, 9212, 3216, 292, 8607, 297, 390, 29985, 29906, 29889, 13, 13, 268, 29900, 29889, 14491, 3291, 12006, 3538, 29889, 13, 268, 29896, 29889, 10987, 282, 297, 317, 393, 5256, 7093, 10696, 29898, 17990, 29898, 29886, 511, 282, 29892, 8348, 29898, 29886, 29897, 8183, 11855, 29898, 17990, 29898, 29886, 511, 13, 1678, 282, 29892, 8348, 29898, 29886, 8106, 910, 338, 884, 2000, 278, 19566, 293, 12122, 7472, 29892, 322, 338, 278, 1833, 13, 1678, 6251, 310, 263, 1051, 310, 313, 13471, 29892, 10696, 29897, 297, 19566, 293, 19711, 1797, 29889, 13, 268, 29906, 29874, 29889, 960, 10696, 29898, 17990, 29898, 29886, 511, 282, 29892, 8348, 29898, 29886, 876, 5277, 29871, 29929, 29900, 14496, 29892, 769, 8341, 29889, 13, 268, 29906, 29890, 29889, 960, 451, 29892, 3349, 282, 515, 731, 29889, 13, 1678, 9995, 13, 1678, 3291, 353, 298, 913, 29898, 9748, 467, 25027, 391, 580, 13, 1678, 565, 451, 29918, 13058, 3538, 29898, 9748, 1125, 13, 4706, 3291, 29889, 24244, 580, 13, 4706, 565, 451, 29918, 13058, 3538, 29898, 9748, 1125, 13, 9651, 12020, 8960, 877, 20325, 526, 9561, 12006, 3538, 3643, 6795, 13058, 3538, 1495, 13, 1678, 349, 6992, 9375, 353, 3509, 29889, 24535, 8552, 29898, 9748, 29897, 13, 1678, 6206, 353, 5159, 13, 1678, 474, 29922, 29900, 13, 1678, 1550, 5852, 29901, 13, 4706, 23619, 353, 23160, 2521, 7373, 17990, 29898, 29886, 29892, 3291, 511, 282, 29892, 903, 2146, 617, 29898, 29886, 29892, 3291, 876, 363, 282, 297, 3291, 29962, 13, 4706, 22558, 353, 23160, 16622, 7373, 17990, 29898, 29886, 29892, 3291, 511, 282, 29892, 903, 2146, 617, 29898, 29886, 29892, 3291, 876, 363, 282, 297, 3291, 29962, 13, 4706, 2971, 2236, 353, 518, 29883, 29961, 29900, 29962, 363, 274, 297, 22558, 29962, 13, 4706, 19566, 536, 353, 7442, 29889, 2506, 6605, 3552, 3665, 2236, 29892, 23619, 876, 396, 5527, 4746, 408, 23927, 21274, 856, 13, 4706, 19566, 3317, 353, 19566, 536, 14352, 29896, 29962, 13, 4706, 14020, 353, 9423, 17990, 29898, 9748, 29961, 2506, 3317, 1402, 3291, 511, 13, 462, 268, 3291, 29961, 2506, 3317, 1402, 13, 462, 268, 903, 2146, 617, 29898, 9748, 29961, 2506, 3317, 1402, 3291, 876, 13, 4706, 565, 23619, 29961, 2506, 3317, 29962, 5277, 349, 29902, 29914, 29906, 29889, 29900, 29901, 13, 9651, 396, 2158, 703, 14131, 1312, 491, 3291, 29901, 6571, 1642, 4830, 29898, 29883, 5380, 403, 876, 13, 9651, 736, 903, 16622, 10456, 29883, 5380, 403, 511, 3291, 29892, 6206, 29892, 14020, 13, 4706, 1683, 29901, 13, 9651, 1018, 29901, 13, 18884, 6206, 29889, 4397, 3552, 9748, 29889, 7323, 29898, 2506, 3317, 511, 474, 876, 13, 9651, 5174, 11374, 2392, 29901, 13, 18884, 12020, 8960, 703, 12075, 4080, 310, 3080, 12539, 350, 12449, 27927, 5229, 29991, 1159, 13, 4706, 474, 23661, 29896, 13, 13, 1753, 903, 2521, 29898, 29886, 29892, 29939, 29892, 29878, 1125, 13, 1678, 9995, 13, 1678, 10272, 278, 6374, 10696, 8429, 491, 349, 29984, 29934, 13, 1678, 9995, 13, 1678, 736, 7442, 29889, 6897, 29898, 657, 29918, 2521, 29918, 14811, 29898, 29934, 388, 29898, 29939, 29892, 29886, 511, 29934, 388, 29898, 29939, 29892, 29878, 4961, 13, 13, 1753, 903, 17990, 29898, 29886, 29892, 29880, 1125, 13, 1678, 9995, 13, 1678, 10563, 278, 27978, 985, 272, 310, 282, 297, 1051, 301, 13, 1678, 9995, 13, 1678, 926, 353, 301, 29889, 2248, 29898, 29886, 29897, 13, 1678, 565, 926, 29899, 29896, 529, 29871, 29900, 29901, 13, 4706, 736, 301, 14352, 29896, 29962, 13, 1678, 1683, 29901, 13, 4706, 736, 301, 29961, 1066, 29899, 29896, 29962, 13, 13, 1753, 903, 2146, 617, 29898, 29886, 29892, 29880, 1125, 13, 1678, 9995, 13, 1678, 10563, 278, 29433, 310, 282, 297, 1051, 301, 13, 1678, 9995, 13, 1678, 926, 353, 301, 29889, 2248, 29898, 29886, 29897, 13, 1678, 565, 926, 29974, 29896, 6736, 7431, 29898, 29880, 1125, 13, 4706, 736, 301, 29961, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 736, 301, 29961, 1066, 29974, 29896, 29962, 13, 13, 1753, 903, 16622, 29898, 29886, 29892, 29939, 29892, 29878, 29892, 270, 16414, 29922, 5721, 29889, 29872, 27511, 1125, 13, 1678, 9995, 13, 1678, 16969, 313, 13471, 29892, 313, 5064, 29918, 29916, 29892, 4818, 29918, 29891, 876, 310, 278, 3449, 6762, 23059, 8607, 491, 278, 13, 1678, 17205, 282, 29939, 29878, 29889, 13, 13, 1678, 4443, 29892, 445, 947, 451, 5251, 393, 282, 19216, 29939, 19216, 29878, 13, 1678, 9995, 13, 1678, 282, 29916, 29892, 2272, 353, 282, 13, 1678, 3855, 29916, 29892, 29939, 29891, 353, 3855, 13, 1678, 364, 29916, 29892, 719, 353, 364, 13, 1678, 565, 7442, 29889, 497, 5358, 29898, 9302, 29889, 6897, 7373, 2521, 29898, 29886, 29892, 29939, 29892, 29878, 8243, 349, 29902, 1125, 13, 4706, 11855, 353, 270, 16414, 29898, 29886, 29892, 29878, 6802, 29906, 29889, 13, 4706, 4818, 29918, 29916, 353, 313, 1756, 718, 364, 29916, 6802, 29906, 29889, 13, 4706, 4818, 29918, 29891, 353, 313, 2272, 718, 24721, 6802, 29906, 29889, 13, 1678, 25342, 7442, 29889, 497, 5358, 29898, 9302, 29889, 6897, 7373, 2521, 29898, 29886, 29892, 29939, 29892, 29878, 8243, 29871, 29900, 1125, 13, 4706, 11855, 353, 270, 16414, 29898, 29886, 29892, 29939, 6802, 29906, 29889, 13, 4706, 4818, 29918, 29916, 353, 313, 1756, 718, 3855, 29916, 6802, 29906, 29889, 13, 4706, 4818, 29918, 29891, 353, 313, 2272, 718, 3855, 29891, 6802, 29906, 29889, 13, 1678, 1683, 29901, 13, 4706, 360, 353, 29871, 29906, 16395, 1756, 16395, 29939, 29891, 448, 24721, 29897, 718, 3855, 29916, 16395, 719, 448, 11451, 29897, 718, 364, 29916, 16395, 2272, 448, 3855, 29891, 876, 13, 4706, 4818, 29918, 29916, 353, 5135, 1756, 1068, 29906, 718, 11451, 1068, 29906, 11877, 29898, 29939, 29891, 29899, 719, 29897, 718, 313, 29939, 29916, 1068, 29906, 718, 3855, 29891, 1068, 29906, 11877, 29898, 719, 29899, 2272, 29897, 13, 462, 29871, 718, 313, 17697, 1068, 29906, 718, 24721, 1068, 29906, 11877, 29898, 2272, 29899, 29939, 29891, 876, 847, 5785, 29898, 29928, 29897, 13, 4706, 4818, 29918, 29891, 353, 5135, 1756, 1068, 29906, 718, 11451, 1068, 29906, 11877, 29898, 17697, 29899, 29939, 29916, 29897, 718, 313, 29939, 29916, 1068, 29906, 718, 3855, 29891, 1068, 29906, 11877, 29898, 1756, 29899, 17697, 29897, 13, 462, 29871, 718, 313, 17697, 1068, 29906, 718, 24721, 1068, 29906, 11877, 29898, 29939, 29916, 29899, 1756, 876, 847, 5785, 29898, 29928, 29897, 13, 4706, 11855, 353, 270, 16414, 3552, 5064, 29918, 29916, 29892, 4818, 29918, 29891, 511, 282, 29897, 13, 1678, 736, 11855, 29892, 313, 5064, 29918, 29916, 29892, 4818, 29918, 29891, 29897, 13, 2 ]
toutiao-backend/toutiao/resources/user/profile.py
weiyunfei520/toutiao
0
34324
from flask import current_app from flask import g from flask import request from flask_restful.reqparse import RequestParser from flask_restful import Resource from models import db from models.user import User from utils.decorators import login_required from utils.parser import image_file from utils.storage import upload_image class PhotoResource(Resource): # 使用装饰器验证用户 method_decorators = [login_required] def patch(self): print(request.__dict__) # 接收请求的参数,并做检查 rp = RequestParser() rp.add_argument('photo', type=image_file, required=True, location='files') args_dict = rp.parse_args() # 文件对象 photo = args_dict['photo'] # 上传图片到七牛云,获取图片key,就是图片的url名称 file_name = upload_image(photo.read()) # 把图片的名字保存到数据库 User.query.filter(User.id==g.user_id).update({'profile_photo': file_name}) db.session.commit() # 把图片的完整url返回 ret_dict = { 'photo_url': '{}/{}'.format(current_app.config['QINIU_DOMAIN'], file_name) } return ret_dict from cache.user import UserProfileCache class CurrentUserResource(Resource): # 检查登录 method_decorators = [login_required] # 请求钩子 utils.middlewares.jwt_authentication已经注册生效了:把token中的user_id写入g对象中 def get(self): # 返回当前用户信息 # 从缓存和持久化存储中获取 # 代码执行到这里时,就应该已经有g.user_id ret = UserProfileCache(user_id=g.user_id).get() print('=') print(ret) ret_dict = { 'user_id': g.user_id, 'user_name': ret['name'], 'user_mobile': ret['mobile'], 'user_photo': ret['profile_photo'], 'certificate': ret['certificate'], 'introduction': ret['introduction'], 'arts_count': 0, 'following_count': 0 } return ret_dict def delete(self): ret = UserProfileCache(user_id=g.user_id).exists() if ret: UserProfileCache(user_id=g.user_id).clear() return {'message': 'ok'}
[ 1, 515, 29784, 1053, 1857, 29918, 932, 13, 3166, 29784, 1053, 330, 13, 3166, 29784, 1053, 2009, 13, 3166, 29784, 29918, 5060, 1319, 29889, 7971, 5510, 1053, 10729, 11726, 13, 3166, 29784, 29918, 5060, 1319, 1053, 18981, 13, 13, 3166, 4733, 1053, 4833, 13, 3166, 4733, 29889, 1792, 1053, 4911, 13, 3166, 3667, 29879, 29889, 19557, 4097, 1053, 6464, 29918, 12403, 13, 3166, 3667, 29879, 29889, 16680, 1053, 1967, 29918, 1445, 13, 3166, 3667, 29879, 29889, 12925, 1053, 6441, 29918, 3027, 13, 13, 13, 1990, 1963, 3747, 6848, 29898, 6848, 1125, 13, 1678, 396, 29871, 30785, 30406, 31905, 236, 168, 179, 30943, 236, 173, 143, 235, 178, 132, 30406, 31229, 13, 1678, 1158, 29918, 19557, 4097, 353, 518, 7507, 29918, 12403, 29962, 13, 13, 1678, 822, 13261, 29898, 1311, 1125, 13, 4706, 1596, 29898, 3827, 17255, 8977, 1649, 29897, 13, 4706, 396, 29871, 31092, 31997, 31088, 31376, 30210, 31125, 30354, 29892, 31666, 232, 132, 157, 233, 166, 131, 31213, 13, 4706, 364, 29886, 353, 10729, 11726, 580, 13, 4706, 364, 29886, 29889, 1202, 29918, 23516, 877, 21596, 742, 1134, 29922, 3027, 29918, 1445, 29892, 3734, 29922, 5574, 29892, 4423, 2433, 5325, 1495, 13, 4706, 6389, 29918, 8977, 353, 364, 29886, 29889, 5510, 29918, 5085, 580, 13, 4706, 396, 29871, 30333, 30631, 30783, 31133, 13, 4706, 15373, 353, 6389, 29918, 8977, 1839, 21596, 2033, 13, 4706, 396, 29871, 30429, 31471, 30861, 31122, 30780, 31425, 234, 140, 158, 31784, 29892, 31024, 30683, 30861, 31122, 1989, 29892, 31238, 30392, 30861, 31122, 30210, 2271, 30548, 31685, 13, 4706, 934, 29918, 978, 353, 6441, 29918, 3027, 29898, 21596, 29889, 949, 3101, 13, 4706, 396, 29871, 233, 141, 141, 30861, 31122, 30210, 30548, 30578, 30982, 30946, 30780, 30354, 30763, 31700, 13, 4706, 4911, 29889, 1972, 29889, 4572, 29898, 2659, 29889, 333, 1360, 29887, 29889, 1792, 29918, 333, 467, 5504, 3319, 29915, 10185, 29918, 21596, 2396, 934, 29918, 978, 1800, 13, 4706, 4833, 29889, 7924, 29889, 15060, 580, 13, 4706, 396, 29871, 233, 141, 141, 30861, 31122, 30210, 31366, 233, 152, 183, 2271, 31086, 30742, 13, 4706, 3240, 29918, 8977, 353, 426, 13, 9651, 525, 21596, 29918, 2271, 2396, 22372, 6822, 8875, 4286, 4830, 29898, 3784, 29918, 932, 29889, 2917, 1839, 29984, 1177, 29902, 29965, 29918, 3970, 29032, 7464, 934, 29918, 978, 29897, 13, 4706, 500, 13, 4706, 736, 3240, 29918, 8977, 13, 13, 3166, 7090, 29889, 1792, 1053, 4911, 13909, 10408, 13, 1990, 9626, 2659, 6848, 29898, 6848, 1125, 13, 1678, 396, 29871, 233, 166, 131, 31213, 31451, 31283, 13, 1678, 1158, 29918, 19557, 4097, 353, 518, 7507, 29918, 12403, 29962, 13, 1678, 396, 29871, 31088, 31376, 236, 149, 172, 30319, 3667, 29879, 29889, 17662, 4495, 267, 29889, 29926, 14554, 29918, 23055, 31290, 31412, 31368, 232, 137, 143, 30486, 31944, 30743, 30383, 233, 141, 141, 6979, 30275, 30210, 1792, 29918, 333, 31479, 30752, 29887, 30783, 31133, 30275, 13, 1678, 822, 679, 29898, 1311, 1125, 13, 4706, 396, 29871, 31086, 30742, 30948, 30658, 30406, 31229, 30689, 31021, 13, 4706, 396, 29871, 31594, 234, 191, 150, 30946, 30503, 31695, 31347, 30705, 30946, 232, 133, 171, 30275, 31024, 30683, 13, 4706, 396, 29871, 30690, 31183, 233, 140, 170, 30448, 30780, 30810, 30755, 30594, 30214, 31238, 31370, 31751, 31290, 31412, 30417, 29887, 29889, 1792, 29918, 333, 13, 4706, 3240, 353, 4911, 13909, 10408, 29898, 1792, 29918, 333, 29922, 29887, 29889, 1792, 29918, 333, 467, 657, 580, 13, 4706, 1596, 877, 29922, 1495, 13, 4706, 1596, 29898, 2267, 29897, 13, 4706, 3240, 29918, 8977, 353, 426, 13, 9651, 525, 1792, 29918, 333, 2396, 330, 29889, 1792, 29918, 333, 29892, 13, 9651, 525, 1792, 29918, 978, 2396, 3240, 1839, 978, 7464, 13, 9651, 525, 1792, 29918, 16769, 2396, 3240, 1839, 16769, 7464, 13, 9651, 525, 1792, 29918, 21596, 2396, 3240, 1839, 10185, 29918, 21596, 7464, 13, 9651, 525, 6327, 8021, 2396, 3240, 1839, 6327, 8021, 7464, 13, 9651, 525, 524, 13210, 2396, 3240, 1839, 524, 13210, 7464, 13, 9651, 525, 5708, 29918, 2798, 2396, 29871, 29900, 29892, 13, 9651, 525, 23031, 292, 29918, 2798, 2396, 29871, 29900, 13, 4706, 500, 13, 4706, 736, 3240, 29918, 8977, 13, 13, 1678, 822, 5217, 29898, 1311, 1125, 13, 4706, 3240, 353, 4911, 13909, 10408, 29898, 1792, 29918, 333, 29922, 29887, 29889, 1792, 29918, 333, 467, 9933, 580, 13, 4706, 565, 3240, 29901, 13, 9651, 4911, 13909, 10408, 29898, 1792, 29918, 333, 29922, 29887, 29889, 1792, 29918, 333, 467, 8551, 580, 13, 4706, 736, 11117, 4906, 2396, 525, 554, 10827, 2 ]
code/4chan-scraper-api/4chan_catalog_scraper_custom.py
interimblue/idp
0
135159
""" Created on 26/05/2020 4chan-scraper v0.2 @author: <NAME> """ import requests import logging import json import os import datetime as dt import sys import time #=============================================================================== # Setup #=============================================================================== board = 'pol' url = "https://a.4cdn.org/" + board + "/catalog.json" datetime = dt.datetime.now().strftime("%Y-%m-%d_%H-%M-%S") dateMonth = dt.datetime.now().strftime("%Y-%m") path = '4chan-data/' + dateMonth filename = path +'/' + datetime + '_' + board + '.json' ### Logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d_T_%H:%M:%S', filename='4chan_catalog_scraper_custom.log', level=logging.DEBUG ) start = time.time() ### Thread attributes that we wish to preserve - image and file related attributes are excluded to save space ### For full list of attributes, see: ### https://github.com/4chan/4chan-API/blob/master/pages/Catalog.md ### https://github.com/4chan/4chan-API/blob/master/pages/Threads.md desiredAttributes = [ 'no', 'resto', 'sticky', 'closed', 'now', 'time', 'name', 'trip', 'id', 'capcode', 'country', 'country_name', 'sub', 'com', 'tim', 'replies', 'images', 'last_modified', 'tag', 'semantic_url', 'unique_ips', 'archived', 'archived_on', 'last_replies' ] if os.path.exists(path): logging.info("Directory %s exists, using existing directory" % path) else: try: logging.info("Directory %s not found, attepting to create directory" % path) os.makedirs(path) except OSError: logging.error("Failed to create directory: %s" % path) else: logging.info("Successfully created the directory %s. Proceeding to scrape..." % path) #=============================================================================== # Request #=============================================================================== ### Iterate through the catalog (list of page objects containing thread arrays) and ### rebuild the thread objects containing only the attributes we are interested in def filterCatalog(boardCatalog): logging.info("Filtering 4chan response...") customThreadCatalog = [] customPage = {} ### Loop through each page for page in boardCatalog: customThreads = [] ### Loop through each thread in page and create a new thread object containing ### exclusively the attributes we wish to collect for thread in page['threads']: customThread = {} for attribute in desiredAttributes: if attribute in thread: customThread[attribute] = thread[attribute] customThreads.append(customThread) ### Create a page with the new thread list customPage = { 'page': page['page'], 'threads': customThreads } ### Add the new page to our customized catalog customThreadCatalog.append(customPage) return customThreadCatalog ### Get the 4chan board catalog try: boardCatalog = requests.get(url).json() except Exception as e: logging.error("Fatal error when attempting to fetch 4chan data") logging.error(e) ### The thread JSON object contains many attributes we do not require. Therefore we filter these out try: customThreadCatalogJsonArray = filterCatalog(boardCatalog) except Exception as e: logging.error("Fatal error when filtering JSON response from 4chan") #=============================================================================== # Storage #=============================================================================== ### Append serialized submission object to the end of the JSON file try: logging.info("Writing filtered 4chan response to file...") with open(filename, 'w') as f: json.dump(customThreadCatalogJsonArray, f) except Exception as e: logging.error("Fatal error when attempting to write filtered JSON response from 4chan to file") logging.error(e) ### Logging: Timing consolidation end = time.time() timeElasped = end-start logging.info('=============== Time elasped: %s ==============='% timeElasped)
[ 1, 29871, 13, 15945, 29908, 13, 20399, 373, 29871, 29906, 29953, 29914, 29900, 29945, 29914, 29906, 29900, 29906, 29900, 13, 29946, 5083, 29899, 1557, 336, 546, 325, 29900, 29889, 29906, 13, 29992, 8921, 29901, 529, 5813, 29958, 13, 15945, 29908, 13, 13, 5215, 7274, 13, 5215, 12183, 13, 5215, 4390, 13, 5215, 2897, 13, 5215, 12865, 408, 11636, 13, 5215, 10876, 13, 5215, 931, 13, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 29937, 462, 965, 3789, 786, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 13, 3377, 353, 525, 3733, 29915, 13, 2271, 353, 376, 991, 597, 29874, 29889, 29946, 13687, 29889, 990, 12975, 718, 7613, 718, 5591, 28045, 29889, 3126, 29908, 13, 12673, 353, 11636, 29889, 12673, 29889, 3707, 2141, 710, 615, 603, 11702, 29979, 19222, 29885, 19222, 29881, 29918, 29995, 29950, 19222, 29924, 19222, 29903, 1159, 13, 1256, 13953, 353, 11636, 29889, 12673, 29889, 3707, 2141, 710, 615, 603, 11702, 29979, 19222, 29885, 1159, 13, 2084, 353, 525, 29946, 5083, 29899, 1272, 22208, 718, 2635, 13953, 13, 9507, 353, 2224, 718, 29915, 22208, 718, 12865, 718, 22868, 29915, 718, 7613, 718, 15300, 3126, 29915, 13, 13, 2277, 29937, 4522, 3460, 13, 21027, 29889, 16121, 3991, 29898, 13, 1678, 3402, 2433, 29995, 29898, 294, 312, 603, 29897, 29879, 1273, 29898, 5563, 978, 6817, 29947, 29879, 29871, 1273, 29898, 4906, 29897, 29879, 742, 13, 1678, 2635, 23479, 2433, 29995, 29979, 19222, 29885, 19222, 29881, 29918, 29911, 29918, 29995, 29950, 16664, 29924, 16664, 29903, 742, 13, 1678, 10422, 2433, 29946, 5083, 29918, 28045, 29918, 1557, 336, 546, 29918, 6341, 29889, 1188, 742, 13, 1678, 3233, 29922, 21027, 29889, 18525, 13, 1678, 1723, 13, 13, 2962, 353, 931, 29889, 2230, 580, 13, 13, 2277, 29937, 10480, 8393, 393, 591, 6398, 304, 19905, 448, 1967, 322, 934, 4475, 8393, 526, 429, 13347, 304, 4078, 2913, 13, 2277, 29937, 1152, 2989, 1051, 310, 8393, 29892, 1074, 29901, 29871, 13, 2277, 29937, 2045, 597, 3292, 29889, 510, 29914, 29946, 5083, 29914, 29946, 5083, 29899, 8787, 29914, 10054, 29914, 6207, 29914, 12292, 29914, 29907, 3968, 29889, 3487, 13, 2277, 29937, 2045, 597, 3292, 29889, 510, 29914, 29946, 5083, 29914, 29946, 5083, 29899, 8787, 29914, 10054, 29914, 6207, 29914, 12292, 29914, 4899, 29879, 29889, 3487, 13, 2783, 2859, 15801, 353, 518, 13, 1678, 525, 1217, 742, 13, 1678, 525, 29878, 4778, 742, 13, 1678, 525, 303, 18219, 742, 13, 1678, 525, 15603, 742, 13, 1678, 525, 3707, 742, 13, 1678, 525, 2230, 742, 13, 1678, 525, 978, 742, 13, 1678, 525, 3626, 29886, 742, 13, 1678, 525, 333, 742, 13, 1678, 525, 5030, 401, 742, 13, 1678, 525, 13509, 742, 13, 1678, 525, 13509, 29918, 978, 742, 13, 1678, 525, 1491, 742, 13, 1678, 525, 510, 742, 13, 1678, 525, 9346, 742, 13, 1678, 525, 3445, 3687, 742, 13, 1678, 525, 8346, 742, 13, 1678, 525, 4230, 29918, 1545, 2164, 742, 13, 1678, 525, 4039, 742, 13, 1678, 525, 12846, 7716, 29918, 2271, 742, 13, 1678, 525, 13092, 29918, 4512, 742, 13, 1678, 525, 1279, 2347, 742, 13, 1678, 525, 1279, 2347, 29918, 265, 742, 13, 1678, 525, 4230, 29918, 3445, 3687, 29915, 259, 13, 29962, 13, 13, 361, 2897, 29889, 2084, 29889, 9933, 29898, 2084, 1125, 13, 1678, 12183, 29889, 3888, 703, 9882, 1273, 29879, 4864, 29892, 773, 5923, 3884, 29908, 1273, 2224, 29897, 13, 2870, 29901, 13, 1678, 1018, 29901, 259, 13, 4706, 12183, 29889, 3888, 703, 9882, 1273, 29879, 451, 1476, 29892, 21609, 415, 292, 304, 1653, 3884, 29908, 1273, 2224, 29897, 13, 4706, 2897, 29889, 29885, 12535, 12935, 29898, 2084, 29897, 13, 1678, 5174, 438, 29173, 29901, 259, 13, 4706, 12183, 29889, 2704, 703, 17776, 304, 1653, 3884, 29901, 1273, 29879, 29908, 1273, 2224, 29897, 13, 1678, 1683, 29901, 259, 13, 4706, 12183, 29889, 3888, 703, 14191, 3730, 2825, 278, 3884, 1273, 29879, 29889, 1019, 3947, 292, 304, 24559, 412, 17794, 1273, 2224, 29897, 13, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 29937, 462, 1669, 10729, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 13, 2277, 29937, 20504, 403, 1549, 278, 16653, 313, 1761, 310, 1813, 3618, 6943, 3244, 7049, 29897, 322, 13, 2277, 29937, 337, 4282, 278, 3244, 3618, 6943, 871, 278, 8393, 591, 526, 8852, 297, 13, 1753, 4175, 29907, 3968, 29898, 3377, 29907, 3968, 1125, 13, 1678, 12183, 29889, 3888, 703, 5072, 292, 29871, 29946, 5083, 2933, 856, 1159, 13, 1678, 2888, 4899, 29907, 3968, 353, 5159, 13, 1678, 2888, 5074, 353, 6571, 13, 13, 1678, 835, 21493, 1549, 1269, 1813, 13, 1678, 363, 1813, 297, 7613, 29907, 3968, 29901, 13, 4706, 2888, 4899, 29879, 353, 5159, 13, 13, 4706, 835, 21493, 1549, 1269, 3244, 297, 1813, 322, 1653, 263, 716, 3244, 1203, 6943, 13, 4706, 835, 13489, 3598, 278, 8393, 591, 6398, 304, 6314, 13, 4706, 363, 3244, 297, 1813, 1839, 28993, 2033, 29901, 13, 9651, 2888, 4899, 353, 6571, 13, 9651, 363, 5352, 297, 7429, 15801, 29901, 13, 18884, 565, 5352, 297, 3244, 29901, 13, 462, 1678, 2888, 4899, 29961, 12715, 29962, 353, 3244, 29961, 12715, 29962, 13, 13, 9651, 2888, 4899, 29879, 29889, 4397, 29898, 6341, 4899, 29897, 13, 308, 13, 4706, 835, 6204, 263, 1813, 411, 278, 716, 3244, 1051, 29871, 13, 4706, 2888, 5074, 353, 426, 29871, 13, 9651, 525, 3488, 2396, 1813, 1839, 3488, 7464, 13, 9651, 525, 28993, 2396, 2888, 4899, 29879, 13, 4706, 500, 13, 13, 4706, 835, 3462, 278, 716, 1813, 304, 1749, 2888, 1891, 16653, 29871, 13, 4706, 2888, 4899, 29907, 3968, 29889, 4397, 29898, 6341, 5074, 29897, 13, 13, 1678, 736, 2888, 4899, 29907, 3968, 13, 13, 2277, 29937, 3617, 278, 29871, 29946, 5083, 7613, 16653, 13, 2202, 29901, 13, 1678, 7613, 29907, 3968, 353, 7274, 29889, 657, 29898, 2271, 467, 3126, 580, 13, 19499, 8960, 408, 321, 29901, 13, 1678, 12183, 29889, 2704, 703, 29943, 2075, 1059, 746, 15661, 304, 6699, 29871, 29946, 5083, 848, 1159, 13, 1678, 12183, 29889, 2704, 29898, 29872, 29897, 13, 13, 2277, 29937, 450, 3244, 4663, 1203, 3743, 1784, 8393, 591, 437, 451, 1996, 29889, 7857, 591, 4175, 1438, 714, 13, 2202, 29901, 13, 1678, 2888, 4899, 29907, 3968, 8148, 2588, 353, 4175, 29907, 3968, 29898, 3377, 29907, 3968, 29897, 13, 19499, 8960, 408, 321, 29901, 13, 1678, 12183, 29889, 2704, 703, 29943, 2075, 1059, 746, 21166, 4663, 2933, 515, 29871, 29946, 5083, 1159, 13, 13, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 29937, 462, 965, 26162, 13, 29937, 9166, 9166, 9166, 9166, 4936, 2751, 25512, 13, 13, 2277, 29937, 22871, 7797, 1891, 29240, 1203, 304, 278, 1095, 310, 278, 4663, 934, 13, 2202, 29901, 13, 1678, 12183, 29889, 3888, 703, 29956, 768, 292, 22289, 29871, 29946, 5083, 2933, 304, 934, 856, 1159, 13, 1678, 411, 1722, 29898, 9507, 29892, 525, 29893, 1495, 408, 285, 29901, 13, 4706, 4390, 29889, 15070, 29898, 6341, 4899, 29907, 3968, 8148, 2588, 29892, 285, 29897, 13, 19499, 8960, 408, 321, 29901, 13, 1678, 12183, 29889, 2704, 703, 29943, 2075, 1059, 746, 15661, 304, 2436, 22289, 4663, 2933, 515, 29871, 29946, 5083, 304, 934, 1159, 13, 1678, 12183, 29889, 2704, 29898, 29872, 29897, 13, 13, 2277, 29937, 4522, 3460, 29901, 7870, 292, 1136, 17211, 362, 13, 355, 353, 931, 29889, 2230, 580, 13, 2230, 29923, 3333, 9795, 353, 1095, 29899, 2962, 29871, 13, 21027, 29889, 3888, 877, 4936, 2751, 25512, 5974, 560, 4692, 287, 29901, 1273, 29879, 1275, 4936, 2751, 2433, 29995, 931, 29923, 3333, 9795, 29897, 2 ]
src/cosmic_ray/tools/filters/filter_app.py
XD-DENG/cosmic-ray
1
27937
<gh_stars>1-10 """A simple base for creating common types of work-db filters. """ import argparse import logging import sys from exit_codes import ExitCode from cosmic_ray.work_db import use_db class FilterApp: """Base class for simple WorkDB filters. This provides command-line handling for common filter options like the session and verbosity level. Subclasses can add their own arguments as well. This provides a `main()` function that open the session's WorkDB and passes it to the subclass's `filter()` function. """ def add_args(self, parser: argparse.ArgumentParser): """Add any arguments that the subclass needs to the parser. Args: parser: The ArgumentParser for command-line processing. """ def description(self): """The description of the filter. This is used for the command-line help message. """ return None def main(self, argv=None): """The main function for the app. Args: argv: Command line argument list of parse. """ if argv is None: argv = sys.argv[1:] parser = argparse.ArgumentParser( description=self.description(), ) parser.add_argument( 'session', help="Path to the session on which to operate") parser.add_argument( '--verbosity', help='Verbosity level for logging', default='WARNING') self.add_args(parser) args = parser.parse_args(argv) logging.basicConfig(level=getattr(logging, args.verbosity)) with use_db(args.session) as db: self.filter(db, args) return ExitCode.OK def filter(self, work_db, args): """Apply this filter to a WorkDB. This should modify the WorkDB in place. Args: work_db: An open WorkDB instance. args: The argparse Namespace for the command line. """ raise NotImplementedError()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 29909, 2560, 2967, 363, 4969, 3619, 4072, 310, 664, 29899, 2585, 18094, 29889, 13, 15945, 29908, 13, 5215, 1852, 5510, 13, 5215, 12183, 13, 5215, 10876, 13, 13, 3166, 6876, 29918, 18137, 1053, 25954, 3399, 13, 13, 3166, 6776, 13076, 29918, 764, 29889, 1287, 29918, 2585, 1053, 671, 29918, 2585, 13, 13, 13, 1990, 19916, 2052, 29901, 13, 1678, 9995, 5160, 770, 363, 2560, 5244, 4051, 18094, 29889, 13, 13, 1678, 910, 8128, 1899, 29899, 1220, 11415, 363, 3619, 4175, 3987, 763, 13, 1678, 278, 4867, 322, 9750, 359, 537, 3233, 29889, 3323, 13203, 508, 788, 1009, 1914, 6273, 13, 1678, 408, 1532, 29889, 910, 8128, 263, 421, 3396, 2555, 740, 393, 1722, 278, 4867, 29915, 29879, 5244, 4051, 13, 1678, 322, 14517, 372, 304, 278, 19481, 29915, 29879, 421, 4572, 2555, 740, 29889, 13, 1678, 9995, 13, 13, 1678, 822, 788, 29918, 5085, 29898, 1311, 29892, 13812, 29901, 1852, 5510, 29889, 15730, 11726, 1125, 13, 4706, 9995, 2528, 738, 6273, 393, 278, 19481, 4225, 304, 278, 13812, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 13812, 29901, 450, 23125, 11726, 363, 1899, 29899, 1220, 9068, 29889, 13, 4706, 9995, 13, 13, 1678, 822, 6139, 29898, 1311, 1125, 13, 4706, 9995, 1576, 6139, 310, 278, 4175, 29889, 13, 13, 4706, 910, 338, 1304, 363, 278, 1899, 29899, 1220, 1371, 2643, 29889, 13, 4706, 9995, 13, 4706, 736, 6213, 13, 13, 1678, 822, 1667, 29898, 1311, 29892, 1852, 29894, 29922, 8516, 1125, 13, 4706, 9995, 1576, 1667, 740, 363, 278, 623, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1852, 29894, 29901, 10516, 1196, 2980, 1051, 310, 6088, 29889, 13, 4706, 9995, 13, 4706, 565, 1852, 29894, 338, 6213, 29901, 13, 9651, 1852, 29894, 353, 10876, 29889, 19218, 29961, 29896, 17531, 13, 13, 4706, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 13, 9651, 6139, 29922, 1311, 29889, 8216, 3285, 13, 4706, 1723, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 7924, 742, 1371, 543, 2605, 304, 278, 4867, 373, 607, 304, 21994, 1159, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 525, 489, 18248, 359, 537, 742, 1371, 2433, 6565, 27737, 537, 3233, 363, 12183, 742, 2322, 2433, 29956, 25614, 1495, 13, 4706, 1583, 29889, 1202, 29918, 5085, 29898, 16680, 29897, 13, 4706, 6389, 353, 13812, 29889, 5510, 29918, 5085, 29898, 19218, 29897, 13, 13, 4706, 12183, 29889, 16121, 3991, 29898, 5563, 29922, 657, 5552, 29898, 21027, 29892, 6389, 29889, 18248, 359, 537, 876, 13, 13, 4706, 411, 671, 29918, 2585, 29898, 5085, 29889, 7924, 29897, 408, 4833, 29901, 13, 9651, 1583, 29889, 4572, 29898, 2585, 29892, 6389, 29897, 13, 13, 4706, 736, 25954, 3399, 29889, 8949, 13, 13, 1678, 822, 4175, 29898, 1311, 29892, 664, 29918, 2585, 29892, 6389, 1125, 13, 4706, 9995, 2052, 368, 445, 4175, 304, 263, 5244, 4051, 29889, 13, 13, 4706, 910, 881, 6623, 278, 5244, 4051, 297, 2058, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 664, 29918, 2585, 29901, 530, 1722, 5244, 4051, 2777, 29889, 13, 9651, 6389, 29901, 450, 1852, 5510, 14706, 3535, 363, 278, 1899, 1196, 29889, 13, 4706, 9995, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 580, 13, 2 ]
FaceSwapper/faceLandmarks.py
rahulsingh50/Computer-Vision-Projects
1
71412
import cv2 import dlib import numpy as np # Path to shape predictor file PATH = 'shape_predictor_68_face_landmarks.dat' # Our landpoints' predictor and detector objects predictor = dlib.shape_predictor(PATH) detector = dlib.get_frontal_face_detector() # Reading our image img = cv2.imread('images/mr_robot.jpg') # Defining classes for some exception class TooManyFaces(Exception): pass class NoFaces(Exception): pass # Detect landpoints' on input image def get_landmarks(image): points = detector(image, 1) if len(points) > 1: raise TooManyFaces if len(points) == 0: raise NoFaces return np.matrix([[t.x, t.y] for t in predictor(image, points[0]).parts()]) # Mark and point landmarks' on input image using numbers def mark_landmarks(image, landmarks): image = image.copy() for i, point in enumerate(landmarks): position = (point[0,0], point[0,1]) cv2.putText(image, str(i), (position), fontFace=cv2.FONT_ITALIC, fontScale=0.4, color=(0,0,0)) cv2.circle(image, position, 3, color=(0,255,0)) return image l = get_landmarks(img) marked_image = mark_landmarks(img, l) cv2.imshow("Landmarks", marked_image) cv2.waitKey(0) cv2.destroyAllWindows()
[ 1, 1053, 13850, 29906, 13, 5215, 270, 1982, 13, 5215, 12655, 408, 7442, 13, 13, 29937, 10802, 304, 8267, 8500, 272, 934, 13, 10145, 353, 525, 12181, 29918, 27711, 272, 29918, 29953, 29947, 29918, 2161, 29918, 1049, 22848, 29889, 4130, 29915, 13, 13, 29937, 8680, 2982, 9748, 29915, 8500, 272, 322, 1439, 3019, 3618, 13, 27711, 272, 353, 270, 1982, 29889, 12181, 29918, 27711, 272, 29898, 10145, 29897, 13, 4801, 3019, 353, 270, 1982, 29889, 657, 29918, 8862, 284, 29918, 2161, 29918, 4801, 3019, 580, 29871, 13, 13, 29937, 21439, 1749, 1967, 13, 2492, 353, 13850, 29906, 29889, 326, 949, 877, 8346, 29914, 29885, 29878, 29918, 307, 7451, 29889, 6173, 1495, 13, 13, 29937, 5282, 2827, 4413, 363, 777, 3682, 13, 1990, 1763, 29877, 14804, 29943, 3302, 29898, 2451, 1125, 13, 12, 3364, 13, 13, 1990, 1939, 29943, 3302, 29898, 2451, 1125, 13, 12, 3364, 13, 13, 29937, 5953, 522, 2982, 9748, 29915, 373, 1881, 1967, 13, 1753, 679, 29918, 1049, 22848, 29898, 3027, 1125, 13, 12, 9748, 353, 1439, 3019, 29898, 3027, 29892, 29871, 29896, 29897, 13, 13, 12, 361, 7431, 29898, 9748, 29897, 1405, 29871, 29896, 29901, 13, 12, 12, 22692, 1763, 29877, 14804, 29943, 3302, 13, 12, 361, 7431, 29898, 9748, 29897, 1275, 29871, 29900, 29901, 13, 12, 12, 22692, 1939, 29943, 3302, 13, 13, 12, 2457, 7442, 29889, 5344, 4197, 29961, 29873, 29889, 29916, 29892, 260, 29889, 29891, 29962, 363, 260, 297, 8500, 272, 29898, 3027, 29892, 3291, 29961, 29900, 14664, 20895, 580, 2314, 13, 13, 13, 29937, 4485, 322, 1298, 2982, 22848, 29915, 373, 1881, 1967, 773, 3694, 13, 1753, 2791, 29918, 1049, 22848, 29898, 3027, 29892, 2982, 22848, 1125, 13, 12, 3027, 353, 1967, 29889, 8552, 580, 13, 12, 1454, 474, 29892, 1298, 297, 26985, 29898, 1049, 22848, 1125, 13, 12, 12, 3283, 353, 313, 3149, 29961, 29900, 29892, 29900, 1402, 1298, 29961, 29900, 29892, 29896, 2314, 13, 12, 12, 11023, 29906, 29889, 649, 1626, 29898, 3027, 29892, 851, 29898, 29875, 511, 313, 3283, 511, 4079, 23360, 29922, 11023, 29906, 29889, 29943, 1164, 29911, 29918, 1806, 1964, 2965, 29892, 4079, 17185, 29922, 29900, 29889, 29946, 29892, 2927, 7607, 29900, 29892, 29900, 29892, 29900, 876, 13, 12, 12, 11023, 29906, 29889, 16622, 29898, 3027, 29892, 2602, 29892, 29871, 29941, 29892, 2927, 7607, 29900, 29892, 29906, 29945, 29945, 29892, 29900, 876, 13, 13, 12, 2457, 1967, 13, 13, 13, 29880, 353, 679, 29918, 1049, 22848, 29898, 2492, 29897, 13, 3502, 287, 29918, 3027, 353, 2791, 29918, 1049, 22848, 29898, 2492, 29892, 301, 29897, 13, 13, 11023, 29906, 29889, 326, 4294, 703, 22677, 22848, 613, 10902, 29918, 3027, 29897, 13, 11023, 29906, 29889, 10685, 2558, 29898, 29900, 29897, 13, 11023, 29906, 29889, 20524, 3596, 7685, 580, 12, 12, 12, 12, 12, 13, 2 ]
python/1931.py
zheedong/BaekJoon
0
2785
<filename>python/1931.py n = int(input()) conf_set = [] for _ in range(n): conf_set.append(tuple(map(int, input().split()))) conf_set.sort(key=lambda x : (x[1], x[0])) # 끝나는 시간을 기준으로 정렬 # 시작과 종료가 같은 경우를 포함하기 위해선, 시작 시간도 오름차순으로 정렬해 줘야 한다 solution_list = [conf_set[0]] # Greedy Algorithm for conf in conf_set[1:]: last_conf = solution_list[-1] _, last_end_time = last_conf new_start_time, _ = conf # 정렬된 회의의 list의 마지막 값의 시작 시간과, 정답 list 마지막의 종료 시간을 비교한다 if new_start_time >= last_end_time: solution_list.append(conf) print(len(solution_list))
[ 1, 529, 9507, 29958, 4691, 29914, 29896, 29929, 29941, 29896, 29889, 2272, 13, 29876, 353, 938, 29898, 2080, 3101, 13, 13, 5527, 29918, 842, 353, 5159, 13, 13, 1454, 903, 297, 3464, 29898, 29876, 1125, 13, 1678, 1970, 29918, 842, 29889, 4397, 29898, 23583, 29898, 1958, 29898, 524, 29892, 1881, 2141, 5451, 580, 4961, 13, 5527, 29918, 842, 29889, 6605, 29898, 1989, 29922, 2892, 921, 584, 313, 29916, 29961, 29896, 1402, 921, 29961, 29900, 12622, 13, 29937, 29871, 238, 132, 160, 31207, 31081, 29871, 30889, 237, 179, 135, 31286, 29871, 30827, 239, 167, 131, 239, 159, 191, 30906, 29871, 30852, 238, 163, 175, 13, 29937, 29871, 30889, 239, 161, 148, 31906, 29871, 31930, 238, 166, 143, 30903, 29871, 237, 179, 156, 31354, 29871, 31378, 31327, 31517, 29871, 240, 146, 175, 240, 152, 171, 30944, 30827, 29871, 31724, 31435, 31345, 29892, 29871, 30889, 239, 161, 148, 29871, 30889, 237, 179, 135, 31136, 29871, 31346, 238, 169, 135, 31817, 239, 139, 159, 239, 159, 191, 30906, 29871, 30852, 238, 163, 175, 31435, 29871, 239, 167, 155, 239, 152, 191, 29871, 30877, 30709, 13, 13, 2929, 918, 29918, 1761, 353, 518, 5527, 29918, 842, 29961, 29900, 5262, 13, 13, 29937, 4122, 7584, 29068, 13, 13, 1454, 1970, 297, 1970, 29918, 842, 29961, 29896, 29901, 5387, 13, 1678, 1833, 29918, 5527, 353, 1650, 29918, 1761, 14352, 29896, 29962, 13, 1678, 17117, 1833, 29918, 355, 29918, 2230, 353, 1833, 29918, 5527, 13, 1678, 716, 29918, 2962, 29918, 2230, 29892, 903, 353, 1970, 13, 268, 13, 1678, 396, 29871, 30852, 238, 163, 175, 238, 147, 159, 29871, 31953, 30708, 30708, 1051, 30708, 29871, 31417, 30811, 238, 170, 140, 29871, 237, 179, 149, 30708, 29871, 30889, 239, 161, 148, 29871, 30889, 237, 179, 135, 31906, 29892, 29871, 30852, 238, 142, 184, 1051, 29871, 31417, 30811, 238, 170, 140, 30708, 29871, 31930, 238, 166, 143, 29871, 30889, 237, 179, 135, 31286, 29871, 31487, 31972, 30877, 30709, 13, 1678, 565, 716, 29918, 2962, 29918, 2230, 6736, 1833, 29918, 355, 29918, 2230, 29901, 13, 4706, 1650, 29918, 1761, 29889, 4397, 29898, 5527, 29897, 13, 13, 2158, 29898, 2435, 29898, 2929, 918, 29918, 1761, 876, 2 ]
pulsar/apps/data/redis/store.py
goodboy/pulsar
1
5857
from functools import partial from pulsar import Connection, Pool, get_actor from pulsar.utils.pep import to_string from pulsar.apps.data import RemoteStore from pulsar.apps.ds import redis_parser from .client import RedisClient, Pipeline, Consumer, ResponseError from .pubsub import RedisPubSub, RedisChannels class RedisStoreConnection(Connection): def __init__(self, *args, **kw): super().__init__(*args, **kw) self.parser = self._producer._parser_class() async def execute(self, *args, **options): consumer = self.current_consumer() await consumer.start((args, options)) result = await consumer.on_finished if isinstance(result, ResponseError): raise result.exception return result async def execute_pipeline(self, commands, raise_on_error=True): consumer = self.current_consumer() consumer.start((commands, raise_on_error, [])) result = await consumer.on_finished if isinstance(result, ResponseError): raise result.exception return result class RedisStore(RemoteStore): '''Redis :class:`.Store` implementation. ''' protocol_factory = partial(RedisStoreConnection, Consumer) supported_queries = frozenset(('filter', 'exclude')) def _init(self, namespace=None, parser_class=None, pool_size=50, decode_responses=False, **kwargs): self._decode_responses = decode_responses if not parser_class: actor = get_actor() pyparser = actor.cfg.redis_py_parser if actor else False parser_class = redis_parser(pyparser) self._parser_class = parser_class if namespace: self._urlparams['namespace'] = namespace self._pool = Pool(self.connect, pool_size=pool_size, loop=self._loop) if self._database is None: self._database = 0 self._database = int(self._database) self.loaded_scripts = set() @property def pool(self): return self._pool @property def namespace(self): '''The prefix namespace to append to all transaction on keys ''' n = self._urlparams.get('namespace') return '%s:' % n if n else '' def key(self): return (self._dns, self._encoding) def client(self): '''Get a :class:`.RedisClient` for the Store''' return RedisClient(self) def pipeline(self): '''Get a :class:`.Pipeline` for the Store''' return Pipeline(self) def pubsub(self, protocol=None): return RedisPubSub(self, protocol=protocol) def channels(self, protocol=None, **kw): return RedisChannels(self.pubsub(protocol=protocol), **kw) def ping(self): return self.client().ping() async def execute(self, *args, **options): connection = await self._pool.connect() with connection: result = await connection.execute(*args, **options) return result async def execute_pipeline(self, commands, raise_on_error=True): conn = await self._pool.connect() with conn: result = await conn.execute_pipeline(commands, raise_on_error) return result async def connect(self, protocol_factory=None): protocol_factory = protocol_factory or self.create_protocol if isinstance(self._host, tuple): host, port = self._host transport, connection = await self._loop.create_connection( protocol_factory, host, port) else: raise NotImplementedError('Could not connect to %s' % str(self._host)) if self._password: await connection.execute('AUTH', self._password) if self._database: await connection.execute('SELECT', self._database) return connection def flush(self): return self.execute('flushdb') def close(self): '''Close all open connections.''' return self._pool.close() def has_query(self, query_type): return query_type in self.supported_queries def basekey(self, meta, *args): key = '%s%s' % (self.namespace, meta.table_name) postfix = ':'.join((to_string(p) for p in args if p is not None)) return '%s:%s' % (key, postfix) if postfix else key def meta(self, meta): '''Extract model metadata for lua script stdnet/lib/lua/odm.lua''' # indices = dict(((idx.attname, idx.unique) for idx in meta.indices)) data = meta.as_dict() data['namespace'] = self.basekey(meta) return data class CompiledQuery: def __init__(self, pipe, query): self.pipe = pipe
[ 1, 515, 2090, 312, 8789, 1053, 7687, 13, 13, 3166, 282, 7273, 279, 1053, 15160, 29892, 28625, 29892, 679, 29918, 7168, 13, 3166, 282, 7273, 279, 29889, 13239, 29889, 412, 29886, 1053, 304, 29918, 1807, 13, 3166, 282, 7273, 279, 29889, 13371, 29889, 1272, 1053, 5240, 866, 9044, 13, 3166, 282, 7273, 279, 29889, 13371, 29889, 6289, 1053, 29825, 29918, 16680, 13, 13, 3166, 869, 4645, 1053, 4367, 275, 4032, 29892, 349, 23828, 29892, 2138, 4680, 29892, 13291, 2392, 13, 3166, 869, 5467, 1491, 1053, 4367, 275, 21076, 4035, 29892, 4367, 275, 1451, 12629, 13, 13, 13, 1990, 4367, 275, 9044, 5350, 29898, 5350, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 11022, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 11022, 29897, 13, 4706, 1583, 29889, 16680, 353, 1583, 3032, 5498, 2265, 3032, 16680, 29918, 1990, 580, 13, 13, 1678, 7465, 822, 6222, 29898, 1311, 29892, 334, 5085, 29892, 3579, 6768, 1125, 13, 4706, 21691, 353, 1583, 29889, 3784, 29918, 25978, 261, 580, 13, 4706, 7272, 21691, 29889, 2962, 3552, 5085, 29892, 3987, 876, 13, 4706, 1121, 353, 7272, 21691, 29889, 265, 29918, 4951, 3276, 13, 4706, 565, 338, 8758, 29898, 2914, 29892, 13291, 2392, 1125, 13, 9651, 12020, 1121, 29889, 11739, 13, 4706, 736, 1121, 13, 13, 1678, 7465, 822, 6222, 29918, 13096, 5570, 29898, 1311, 29892, 8260, 29892, 12020, 29918, 265, 29918, 2704, 29922, 5574, 1125, 13, 4706, 21691, 353, 1583, 29889, 3784, 29918, 25978, 261, 580, 13, 4706, 21691, 29889, 2962, 3552, 26381, 29892, 12020, 29918, 265, 29918, 2704, 29892, 5159, 876, 13, 4706, 1121, 353, 7272, 21691, 29889, 265, 29918, 4951, 3276, 13, 4706, 565, 338, 8758, 29898, 2914, 29892, 13291, 2392, 1125, 13, 9651, 12020, 1121, 29889, 11739, 13, 4706, 736, 1121, 13, 13, 13, 1990, 4367, 275, 9044, 29898, 20224, 9044, 1125, 13, 1678, 14550, 9039, 275, 584, 1990, 29901, 1412, 9044, 29952, 5314, 29889, 13, 1678, 14550, 13, 1678, 9608, 29918, 14399, 353, 7687, 29898, 9039, 275, 9044, 5350, 29892, 2138, 4680, 29897, 13, 1678, 6969, 29918, 339, 6358, 353, 14671, 29920, 575, 300, 29898, 877, 4572, 742, 525, 735, 2325, 8785, 13, 13, 1678, 822, 903, 2344, 29898, 1311, 29892, 7397, 29922, 8516, 29892, 13812, 29918, 1990, 29922, 8516, 29892, 11565, 29918, 2311, 29922, 29945, 29900, 29892, 13, 795, 21822, 29918, 26679, 267, 29922, 8824, 29892, 3579, 19290, 1125, 13, 4706, 1583, 3032, 13808, 29918, 26679, 267, 353, 21822, 29918, 26679, 267, 13, 4706, 565, 451, 13812, 29918, 1990, 29901, 13, 9651, 11339, 353, 679, 29918, 7168, 580, 13, 9651, 11451, 16680, 353, 11339, 29889, 16859, 29889, 1127, 275, 29918, 2272, 29918, 16680, 565, 11339, 1683, 7700, 13, 9651, 13812, 29918, 1990, 353, 29825, 29918, 16680, 29898, 2272, 16680, 29897, 13, 4706, 1583, 3032, 16680, 29918, 1990, 353, 13812, 29918, 1990, 13, 4706, 565, 7397, 29901, 13, 9651, 1583, 3032, 2271, 7529, 1839, 22377, 2033, 353, 7397, 13, 4706, 1583, 3032, 10109, 353, 28625, 29898, 1311, 29889, 6915, 29892, 11565, 29918, 2311, 29922, 10109, 29918, 2311, 29892, 2425, 29922, 1311, 3032, 7888, 29897, 13, 4706, 565, 1583, 3032, 9803, 338, 6213, 29901, 13, 9651, 1583, 3032, 9803, 353, 29871, 29900, 13, 4706, 1583, 3032, 9803, 353, 938, 29898, 1311, 3032, 9803, 29897, 13, 4706, 1583, 29889, 15638, 29918, 16713, 353, 731, 580, 13, 13, 1678, 732, 6799, 13, 1678, 822, 11565, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 10109, 13, 13, 1678, 732, 6799, 13, 1678, 822, 7397, 29898, 1311, 1125, 13, 4706, 14550, 1576, 10944, 7397, 304, 9773, 304, 599, 10804, 373, 6611, 13, 4706, 14550, 13, 4706, 302, 353, 1583, 3032, 2271, 7529, 29889, 657, 877, 22377, 1495, 13, 4706, 736, 14210, 29879, 11283, 1273, 302, 565, 302, 1683, 6629, 13, 13, 1678, 822, 1820, 29898, 1311, 1125, 13, 4706, 736, 313, 1311, 3032, 29881, 1983, 29892, 1583, 3032, 22331, 29897, 13, 13, 1678, 822, 3132, 29898, 1311, 1125, 13, 4706, 14550, 2577, 263, 584, 1990, 29901, 1412, 9039, 275, 4032, 29952, 363, 278, 14491, 12008, 13, 4706, 736, 4367, 275, 4032, 29898, 1311, 29897, 13, 13, 1678, 822, 16439, 29898, 1311, 1125, 13, 4706, 14550, 2577, 263, 584, 1990, 29901, 1412, 29925, 23828, 29952, 363, 278, 14491, 12008, 13, 4706, 736, 349, 23828, 29898, 1311, 29897, 13, 13, 1678, 822, 2529, 1491, 29898, 1311, 29892, 9608, 29922, 8516, 1125, 13, 4706, 736, 4367, 275, 21076, 4035, 29898, 1311, 29892, 9608, 29922, 20464, 29897, 13, 13, 1678, 822, 18196, 29898, 1311, 29892, 9608, 29922, 8516, 29892, 3579, 11022, 1125, 13, 4706, 736, 4367, 275, 1451, 12629, 29898, 1311, 29889, 5467, 1491, 29898, 20464, 29922, 20464, 511, 3579, 11022, 29897, 13, 13, 1678, 822, 24543, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 4645, 2141, 15702, 580, 13, 13, 1678, 7465, 822, 6222, 29898, 1311, 29892, 334, 5085, 29892, 3579, 6768, 1125, 13, 4706, 3957, 353, 7272, 1583, 3032, 10109, 29889, 6915, 580, 13, 4706, 411, 3957, 29901, 13, 9651, 1121, 353, 7272, 3957, 29889, 7978, 10456, 5085, 29892, 3579, 6768, 29897, 13, 9651, 736, 1121, 13, 13, 1678, 7465, 822, 6222, 29918, 13096, 5570, 29898, 1311, 29892, 8260, 29892, 12020, 29918, 265, 29918, 2704, 29922, 5574, 1125, 13, 4706, 11009, 353, 7272, 1583, 3032, 10109, 29889, 6915, 580, 13, 4706, 411, 11009, 29901, 13, 9651, 1121, 353, 7272, 11009, 29889, 7978, 29918, 13096, 5570, 29898, 26381, 29892, 12020, 29918, 265, 29918, 2704, 29897, 13, 9651, 736, 1121, 13, 13, 1678, 7465, 822, 4511, 29898, 1311, 29892, 9608, 29918, 14399, 29922, 8516, 1125, 13, 4706, 9608, 29918, 14399, 353, 9608, 29918, 14399, 470, 1583, 29889, 3258, 29918, 20464, 13, 4706, 565, 338, 8758, 29898, 1311, 3032, 3069, 29892, 18761, 1125, 13, 9651, 3495, 29892, 2011, 353, 1583, 3032, 3069, 13, 9651, 8608, 29892, 3957, 353, 7272, 1583, 3032, 7888, 29889, 3258, 29918, 9965, 29898, 13, 18884, 9608, 29918, 14399, 29892, 3495, 29892, 2011, 29897, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 1888, 2037, 287, 2392, 877, 23323, 451, 4511, 304, 1273, 29879, 29915, 1273, 13, 462, 462, 418, 851, 29898, 1311, 3032, 3069, 876, 13, 4706, 565, 1583, 3032, 5630, 29901, 13, 9651, 7272, 3957, 29889, 7978, 877, 20656, 29950, 742, 1583, 3032, 5630, 29897, 13, 4706, 565, 1583, 3032, 9803, 29901, 13, 9651, 7272, 3957, 29889, 7978, 877, 6404, 742, 1583, 3032, 9803, 29897, 13, 4706, 736, 3957, 13, 13, 1678, 822, 28371, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 7978, 877, 23126, 2585, 1495, 13, 13, 1678, 822, 3802, 29898, 1311, 1125, 13, 4706, 14550, 11123, 599, 1722, 12368, 29889, 12008, 13, 4706, 736, 1583, 3032, 10109, 29889, 5358, 580, 13, 13, 1678, 822, 756, 29918, 1972, 29898, 1311, 29892, 2346, 29918, 1853, 1125, 13, 4706, 736, 2346, 29918, 1853, 297, 1583, 29889, 23765, 29918, 339, 6358, 13, 13, 1678, 822, 2967, 1989, 29898, 1311, 29892, 12700, 29892, 334, 5085, 1125, 13, 4706, 1820, 353, 14210, 29879, 29995, 29879, 29915, 1273, 313, 1311, 29889, 22377, 29892, 12700, 29889, 2371, 29918, 978, 29897, 13, 4706, 1400, 5878, 353, 525, 29901, 4286, 7122, 3552, 517, 29918, 1807, 29898, 29886, 29897, 363, 282, 297, 6389, 565, 282, 338, 451, 6213, 876, 13, 4706, 736, 14210, 29879, 16664, 29879, 29915, 1273, 313, 1989, 29892, 1400, 5878, 29897, 565, 1400, 5878, 1683, 1820, 13, 13, 1678, 822, 12700, 29898, 1311, 29892, 12700, 1125, 13, 4706, 14550, 5647, 1461, 1904, 15562, 363, 301, 3357, 2471, 3659, 1212, 29914, 1982, 29914, 29448, 29914, 397, 29885, 29889, 29448, 12008, 13, 4706, 396, 29871, 16285, 353, 9657, 3552, 29898, 13140, 29889, 1131, 978, 29892, 22645, 29889, 13092, 29897, 363, 22645, 297, 12700, 29889, 513, 1575, 876, 13, 4706, 848, 353, 12700, 29889, 294, 29918, 8977, 580, 13, 4706, 848, 1839, 22377, 2033, 353, 1583, 29889, 3188, 1989, 29898, 7299, 29897, 13, 4706, 736, 848, 13, 13, 13, 1990, 3831, 2356, 3010, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 14282, 29892, 2346, 1125, 13, 4706, 1583, 29889, 17760, 353, 14282, 13, 2 ]
script/rpi3-crowdmodel/init_reactions.py
ctuning/ck-rpi-optimization-results
22
87058
<reponame>ctuning/ck-rpi-optimization-results # # Collective Knowledge script # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: <NAME>, <EMAIL>, http://fursin.net, 2017 # import ck.kernel as ck import os import json improvement_threshold=1.05 r=ck.access({'action':'search', 'repo_uoa':'d0714418b5886022', 'module_uoa':'experiment', 'data_uoa':'rpi3-*', 'add_meta':'yes'}) if r['return']>0: ck.err(r) lst=r['lst'] im=len(lst) iq=0 ck.out('Found '+str(im)+' experiments ...') # Get unique values for all keys umeta={} for q in lst: meta=q['meta']['meta'] for k in meta: v=meta[k] x=umeta.get(k,[]) if v not in x: x.append(v) umeta[k]=x # Get optimizations per compiler compilers=umeta['compiler'] uopts={} iuopts={} classes={} improvements={} bench_index={} individual_flags={} ck.out('') ck.out('Trying to pre-load optimization numbers from previous analysis ...') for q in compilers: s='rpi3-snapshot-'+q.lower().replace(' ','-')+'-autotuning' # Find entry r=ck.access({'action':'load', 'module_uoa':'slide', 'data_uoa':s}) if r['return']>0: ck.err(r) p=r['path'] d=r['dict'] d1=d['slides'][0] p1=os.path.join(p,d1+'.json') r=ck.load_json_file({'json_file':p1}) if r['return']>0: ck.err(r) d2=r['dict'] classes[q]={'-O3':[]} uopts[q]={'-O3':0} improvements[q]={} individual_flags[q]={} for t in d2['table']: num=t['solution_num'] flags=t['best_flags'].strip() classes[q][flags]=[] uopts[q][flags]=num #for q in compilers: # classes[q]={'-O3':[]} # # uopts[q]={'-O3':0} # iuopts[q]=1 for comp in compilers: heatmap=[] iq=0 for q in sorted(lst, key=lambda x: x['data_uoa']): meta=q['meta']['meta'] compiler=meta['compiler'] if compiler==comp: iq+=1 duoa=q['data_uoa'] p=q['path'] cmd_key=meta['cmd_key'] ds_uoa=meta['dataset_uoa'] p_uoa=meta['program_uoa'] ck.out('') ind=p_uoa+' ; '+cmd_key #+' ; '+duoa ck.out('* '+compiler+' ; '+ind) bench_index[str(iq)]=ind # Process reactions (and calcluate speedup based on min values to see what hardware can achieve, later can use expected values) ld=os.listdir(p) reactions={} default_time=None for df in ld: if df.endswith('.flat.json'): # Load file pdf=os.path.join(p,df) r=ck.load_json_file({'json_file':pdf}) if r['return']>0: ck.err(r) d=r['dict'] opt=d['##characteristics#compile#joined_compiler_flags#min'].strip() if opt not in uopts[compiler]: continue # uopts[compiler][opt]=iuopts[compiler] # iuopts[compiler]+=1 t=d.get('##characteristics#run#execution_time_kernel_0#min',None) if t!=None: if opt=='-O3': default_time=t else: reactions[opt]=t # Calculate improvements/degradation if default_time!=None and default_time!=0.0: for k in reactions: t=reactions[k] if t==0.0: reactions[k]=0.0 else: s=default_time/t if t<0.5: s=0 reactions[k]=s # Sort by improvements opts=sorted(reactions, key=lambda v: reactions[v], reverse=True) ck.out('') for k in opts: ck.out((' %.2f' % reactions[k])+' : '+k) # Get highest improvement ohi=opts[0] hi=reactions[ohi] if hi>=improvement_threshold: if ohi in classes[compiler]: x=classes[compiler].get(ohi,[]) if ind not in x: x.append({"name":ind,"improvement":hi}) classes[compiler][ohi]=x improvements[compiler][ind]=hi else: classes[compiler]['-O3'].append({"name":ind,"improvement":1.0}) # Prepare heat map (unsorted) for opt in uopts[compiler]: if opt!='-O3': iopt=uopts[compiler][opt] x=[iq, iopt, reactions.get(opt,0.0)] heatmap.append(x) # Record heat map dd={'table':{"0":heatmap}} xx=[] iq=0 for k in uopts[comp]: xx.append(iq) iq+=1 dd['axis_y_labels']=xx r=ck.save_json_to_file({'json_file':'init_reactions_tmp_heatmap_'+comp.replace(' ','_')+'.json','dict':dd,'sort_keys':'yes'}) if r['return']>0: ck.err(r) # Sort classes for o in classes[comp]: b=classes[comp][o] b1=sorted(b, key=lambda k: k.get('improvement',0.0), reverse=True) classes[comp][o]=b1 # Prepare individual flags to predict (YES/NO) for opt in classes[comp]: benchs=classes[comp][opt] sopt=opt.split(' ') for o in sopt: ot=o.strip() x=individual_flags[comp].get(ot,[]) for b in benchs: if b not in x: x.append(b) individual_flags[comp][ot]=x # Save info info={'opts':uopts, 'classes':classes, 'improvements':improvements, 'bench_index':bench_index, 'individual_flags':individual_flags} r=ck.save_json_to_file({'json_file':'init_reactions_tmp_info.json','dict':info,'sort_keys':'yes'}) if r['return']>0: ck.err(r)
[ 1, 529, 276, 1112, 420, 29958, 312, 27964, 29914, 384, 29899, 29878, 1631, 29899, 20640, 2133, 29899, 9902, 13, 29937, 13, 29937, 24930, 573, 19320, 5485, 2471, 13, 29937, 13, 29937, 2823, 315, 29968, 365, 2965, 1430, 1660, 29889, 3945, 363, 7794, 575, 292, 4902, 13, 29937, 2823, 315, 29968, 315, 4590, 29979, 22789, 3912, 29889, 3945, 363, 3509, 1266, 4902, 13, 29937, 13, 29937, 10682, 261, 29901, 529, 5813, 10202, 529, 26862, 6227, 10202, 1732, 597, 29888, 1295, 262, 29889, 1212, 29892, 29871, 29906, 29900, 29896, 29955, 13, 29937, 13, 13, 5215, 274, 29895, 29889, 17460, 408, 274, 29895, 13, 5215, 2897, 13, 5215, 4390, 13, 13, 326, 16123, 882, 29918, 386, 12268, 29922, 29896, 29889, 29900, 29945, 13, 13, 29878, 29922, 384, 29889, 5943, 3319, 29915, 2467, 22099, 4478, 742, 13, 632, 525, 20095, 29918, 29884, 19807, 22099, 29881, 29900, 29955, 29896, 29946, 29946, 29896, 29947, 29890, 29945, 29947, 29947, 29953, 29900, 29906, 29906, 742, 13, 632, 525, 5453, 29918, 29884, 19807, 22099, 735, 15362, 742, 13, 632, 525, 1272, 29918, 29884, 19807, 22099, 29878, 1631, 29941, 29899, 29930, 742, 13, 632, 525, 1202, 29918, 7299, 22099, 3582, 29915, 1800, 13, 361, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 20155, 29922, 29878, 1839, 20155, 2033, 13, 13, 326, 29922, 2435, 29898, 20155, 29897, 13, 29875, 29939, 29922, 29900, 13, 13, 384, 29889, 449, 877, 9692, 525, 29974, 710, 29898, 326, 7240, 29915, 15729, 2023, 1495, 13, 13, 29937, 3617, 5412, 1819, 363, 599, 6611, 13, 398, 1187, 3790, 29913, 13, 1454, 3855, 297, 24471, 29901, 13, 1678, 12700, 29922, 29939, 1839, 7299, 16215, 7299, 2033, 13, 1678, 363, 413, 297, 12700, 29901, 13, 4706, 325, 29922, 7299, 29961, 29895, 29962, 13, 13, 4706, 921, 29922, 398, 1187, 29889, 657, 29898, 29895, 17094, 2314, 13, 4706, 565, 325, 451, 297, 921, 29901, 13, 965, 921, 29889, 4397, 29898, 29894, 29897, 13, 4706, 1922, 1187, 29961, 29895, 13192, 29916, 13, 13, 29937, 3617, 5994, 17063, 639, 6516, 13, 2388, 22058, 29922, 398, 1187, 1839, 21789, 2033, 13, 13, 29884, 25707, 3790, 29913, 13, 5871, 25707, 3790, 29913, 13, 13203, 3790, 29913, 13, 326, 16123, 4110, 3790, 29913, 13, 1785, 305, 29918, 2248, 3790, 29913, 13, 513, 23352, 29918, 15764, 3790, 29913, 13, 13, 384, 29889, 449, 877, 1495, 13, 384, 29889, 449, 877, 15870, 292, 304, 758, 29899, 1359, 13883, 3694, 515, 3517, 7418, 2023, 1495, 13, 13, 1454, 3855, 297, 752, 22058, 29901, 13, 1678, 269, 2433, 29878, 1631, 29941, 29899, 29879, 14551, 29899, 18717, 29939, 29889, 13609, 2141, 6506, 877, 525, 5501, 29899, 1495, 23097, 29899, 1300, 327, 27964, 29915, 13, 13, 1678, 396, 10987, 6251, 13, 1678, 364, 29922, 384, 29889, 5943, 3319, 29915, 2467, 22099, 1359, 742, 13, 462, 525, 5453, 29918, 29884, 19807, 22099, 19265, 742, 13, 462, 525, 1272, 29918, 29884, 19807, 2396, 29879, 1800, 13, 1678, 565, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 1678, 282, 29922, 29878, 1839, 2084, 2033, 13, 1678, 270, 29922, 29878, 1839, 8977, 2033, 13, 13, 1678, 270, 29896, 29922, 29881, 1839, 2536, 2247, 2033, 29961, 29900, 29962, 13, 13, 1678, 282, 29896, 29922, 359, 29889, 2084, 29889, 7122, 29898, 29886, 29892, 29881, 29896, 29974, 4286, 3126, 1495, 13, 268, 13, 1678, 364, 29922, 384, 29889, 1359, 29918, 3126, 29918, 1445, 3319, 29915, 3126, 29918, 1445, 2396, 29886, 29896, 1800, 13, 1678, 565, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 13, 1678, 270, 29906, 29922, 29878, 1839, 8977, 2033, 13, 13, 1678, 4413, 29961, 29939, 29962, 3790, 28560, 29949, 29941, 2396, 2636, 29913, 13, 1678, 318, 25707, 29961, 29939, 29962, 3790, 28560, 29949, 29941, 2396, 29900, 29913, 13, 1678, 28473, 29961, 29939, 29962, 3790, 29913, 13, 1678, 5375, 29918, 15764, 29961, 29939, 29962, 3790, 29913, 13, 13, 1678, 363, 260, 297, 270, 29906, 1839, 2371, 2033, 29901, 13, 4706, 954, 29922, 29873, 1839, 2929, 918, 29918, 1949, 2033, 13, 4706, 13449, 29922, 29873, 1839, 13318, 29918, 15764, 13359, 17010, 580, 13, 13, 4706, 4413, 29961, 29939, 3816, 15764, 13192, 2636, 13, 4706, 318, 25707, 29961, 29939, 3816, 15764, 13192, 1949, 13, 13, 29937, 1454, 3855, 297, 752, 22058, 29901, 13, 29937, 1678, 4413, 29961, 29939, 29962, 3790, 28560, 29949, 29941, 2396, 2636, 29913, 13, 29937, 13, 29937, 1678, 318, 25707, 29961, 29939, 29962, 3790, 28560, 29949, 29941, 2396, 29900, 29913, 13, 29937, 1678, 474, 29884, 25707, 29961, 29939, 13192, 29896, 13, 13, 1454, 752, 297, 752, 22058, 29901, 13, 1678, 12871, 1958, 29922, 2636, 13, 13, 1678, 474, 29939, 29922, 29900, 13, 1678, 363, 3855, 297, 12705, 29898, 20155, 29892, 1820, 29922, 2892, 921, 29901, 921, 1839, 1272, 29918, 29884, 19807, 2033, 1125, 13, 4706, 12700, 29922, 29939, 1839, 7299, 16215, 7299, 2033, 13, 13, 4706, 6516, 29922, 7299, 1839, 21789, 2033, 13, 4706, 565, 6516, 1360, 2388, 29901, 13, 965, 474, 29939, 23661, 29896, 13, 13, 965, 868, 19807, 29922, 29939, 1839, 1272, 29918, 29884, 19807, 2033, 13, 965, 282, 29922, 29939, 1839, 2084, 2033, 13, 13, 965, 9920, 29918, 1989, 29922, 7299, 1839, 9006, 29918, 1989, 2033, 13, 965, 18031, 29918, 29884, 19807, 29922, 7299, 1839, 24713, 29918, 29884, 19807, 2033, 13, 965, 282, 29918, 29884, 19807, 29922, 7299, 1839, 8860, 29918, 29884, 19807, 2033, 13, 13, 965, 274, 29895, 29889, 449, 877, 1495, 13, 965, 1399, 29922, 29886, 29918, 29884, 19807, 23097, 2056, 525, 29974, 9006, 29918, 1989, 396, 23097, 2056, 525, 29974, 700, 19807, 13, 965, 274, 29895, 29889, 449, 877, 29930, 525, 29974, 21789, 23097, 2056, 525, 29974, 513, 29897, 13, 13, 965, 3856, 305, 29918, 2248, 29961, 710, 29898, 29875, 29939, 4638, 29922, 513, 13, 13, 965, 396, 10554, 337, 7387, 313, 392, 1208, 695, 27240, 6210, 786, 2729, 373, 1375, 1819, 304, 1074, 825, 12837, 508, 6176, 29892, 2678, 508, 671, 3806, 1819, 29897, 13, 965, 301, 29881, 29922, 359, 29889, 1761, 3972, 29898, 29886, 29897, 13, 13, 965, 337, 7387, 3790, 29913, 13, 965, 2322, 29918, 2230, 29922, 8516, 13, 965, 363, 4489, 297, 301, 29881, 29901, 13, 1669, 565, 4489, 29889, 1975, 2541, 12839, 20620, 29889, 3126, 29374, 13, 462, 29871, 396, 16012, 934, 13, 462, 29871, 13552, 29922, 359, 29889, 2084, 29889, 7122, 29898, 29886, 29892, 2176, 29897, 13, 13, 462, 29871, 364, 29922, 384, 29889, 1359, 29918, 3126, 29918, 1445, 3319, 29915, 3126, 29918, 1445, 2396, 5140, 1800, 13, 462, 29871, 565, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 13, 462, 29871, 270, 29922, 29878, 1839, 8977, 2033, 13, 13, 462, 29871, 3523, 29922, 29881, 1839, 2277, 18609, 6765, 29937, 12198, 29937, 2212, 1312, 29918, 21789, 29918, 15764, 29937, 1195, 13359, 17010, 580, 13, 13, 462, 29871, 565, 3523, 451, 297, 318, 25707, 29961, 21789, 5387, 13, 462, 268, 6773, 13, 29937, 462, 268, 318, 25707, 29961, 21789, 3816, 3670, 13192, 5871, 25707, 29961, 21789, 29962, 13, 29937, 462, 268, 474, 29884, 25707, 29961, 21789, 10062, 29922, 29896, 13, 13, 462, 29871, 260, 29922, 29881, 29889, 657, 877, 2277, 18609, 6765, 29937, 3389, 29937, 22256, 29918, 2230, 29918, 17460, 29918, 29900, 29937, 1195, 742, 8516, 29897, 13, 13, 462, 29871, 565, 260, 19216, 8516, 29901, 13, 462, 268, 565, 3523, 1360, 28560, 29949, 29941, 2396, 13, 462, 4706, 2322, 29918, 2230, 29922, 29873, 13, 462, 268, 1683, 29901, 13, 462, 4706, 337, 7387, 29961, 3670, 13192, 29873, 13, 13, 965, 396, 20535, 403, 28473, 29914, 311, 5105, 362, 13, 965, 565, 2322, 29918, 2230, 19216, 8516, 322, 2322, 29918, 2230, 19216, 29900, 29889, 29900, 29901, 13, 795, 363, 413, 297, 337, 7387, 29901, 13, 462, 29871, 260, 29922, 5638, 1953, 29961, 29895, 29962, 13, 462, 29871, 565, 260, 1360, 29900, 29889, 29900, 29901, 13, 462, 268, 337, 7387, 29961, 29895, 13192, 29900, 29889, 29900, 13, 462, 29871, 1683, 29901, 13, 462, 268, 269, 29922, 4381, 29918, 2230, 29914, 29873, 13, 462, 268, 565, 260, 29966, 29900, 29889, 29945, 29901, 13, 462, 4706, 269, 29922, 29900, 13, 462, 268, 337, 7387, 29961, 29895, 13192, 29879, 13, 13, 795, 396, 20025, 491, 28473, 13, 795, 29111, 29922, 24582, 29898, 5638, 1953, 29892, 1820, 29922, 2892, 325, 29901, 337, 7387, 29961, 29894, 1402, 11837, 29922, 5574, 29897, 13, 13, 795, 274, 29895, 29889, 449, 877, 1495, 13, 795, 363, 413, 297, 29111, 29901, 13, 462, 29871, 274, 29895, 29889, 449, 29898, 877, 29871, 18695, 29906, 29888, 29915, 1273, 337, 7387, 29961, 29895, 2314, 23097, 584, 525, 29974, 29895, 29897, 13, 13, 795, 396, 3617, 9939, 20414, 13, 795, 288, 2918, 29922, 25707, 29961, 29900, 29962, 13, 795, 7251, 29922, 5638, 1953, 29961, 1148, 29875, 29962, 13, 13, 795, 565, 7251, 18572, 326, 16123, 882, 29918, 386, 12268, 29901, 13, 462, 565, 288, 2918, 297, 4413, 29961, 21789, 5387, 13, 462, 1678, 921, 29922, 13203, 29961, 21789, 1822, 657, 29898, 1148, 29875, 17094, 2314, 13, 462, 1678, 565, 1399, 451, 297, 921, 29901, 13, 462, 539, 921, 29889, 4397, 3319, 29908, 978, 1115, 513, 1699, 326, 16123, 882, 1115, 2918, 1800, 13, 462, 1678, 4413, 29961, 21789, 3816, 1148, 29875, 13192, 29916, 13, 462, 1678, 28473, 29961, 21789, 3816, 513, 13192, 2918, 13, 795, 1683, 29901, 13, 462, 4413, 29961, 21789, 22322, 29899, 29949, 29941, 13359, 4397, 3319, 29908, 978, 1115, 513, 1699, 326, 16123, 882, 1115, 29896, 29889, 29900, 1800, 13, 13, 795, 396, 349, 3445, 598, 12871, 2910, 313, 348, 24582, 29897, 13, 795, 363, 3523, 297, 318, 25707, 29961, 21789, 5387, 13, 462, 29871, 565, 3523, 29991, 2433, 29899, 29949, 29941, 2396, 13, 462, 268, 474, 3670, 29922, 29884, 25707, 29961, 21789, 3816, 3670, 29962, 13, 462, 268, 921, 11759, 29875, 29939, 29892, 474, 3670, 29892, 337, 7387, 29889, 657, 29898, 3670, 29892, 29900, 29889, 29900, 4638, 13, 13, 462, 268, 12871, 1958, 29889, 4397, 29898, 29916, 29897, 13, 13, 1678, 396, 14164, 12871, 2910, 13, 1678, 24488, 3790, 29915, 2371, 2396, 6377, 29900, 1115, 354, 271, 1958, 930, 13, 13, 1678, 15473, 29922, 2636, 13, 1678, 474, 29939, 29922, 29900, 13, 1678, 363, 413, 297, 318, 25707, 29961, 2388, 5387, 13, 4706, 15473, 29889, 4397, 29898, 29875, 29939, 29897, 13, 4706, 474, 29939, 23661, 29896, 13, 13, 1678, 24488, 1839, 8990, 29918, 29891, 29918, 21134, 2033, 29922, 4419, 13, 13, 1678, 364, 29922, 384, 29889, 7620, 29918, 3126, 29918, 517, 29918, 1445, 3319, 29915, 3126, 29918, 1445, 22099, 2344, 29918, 5638, 1953, 29918, 7050, 29918, 354, 271, 1958, 29918, 18717, 2388, 29889, 6506, 877, 525, 5501, 29918, 1495, 29974, 4286, 3126, 3788, 8977, 2396, 1289, 5501, 6605, 29918, 8149, 22099, 3582, 29915, 1800, 13, 1678, 565, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 13, 1678, 396, 20025, 4413, 13, 1678, 363, 288, 297, 4413, 29961, 2388, 5387, 13, 4706, 289, 29922, 13203, 29961, 2388, 3816, 29877, 29962, 13, 13, 4706, 289, 29896, 29922, 24582, 29898, 29890, 29892, 1820, 29922, 2892, 413, 29901, 413, 29889, 657, 877, 326, 16123, 882, 742, 29900, 29889, 29900, 511, 11837, 29922, 5574, 29897, 13, 13, 4706, 4413, 29961, 2388, 3816, 29877, 13192, 29890, 29896, 13, 13, 1678, 396, 349, 3445, 598, 5375, 13449, 304, 8500, 313, 21143, 29914, 6632, 29897, 13, 1678, 363, 3523, 297, 4413, 29961, 2388, 5387, 13, 4706, 3856, 12168, 29922, 13203, 29961, 2388, 3816, 3670, 29962, 13, 13, 4706, 577, 415, 29922, 3670, 29889, 5451, 877, 25710, 13, 4706, 363, 288, 297, 577, 415, 29901, 13, 9651, 4932, 29922, 29877, 29889, 17010, 580, 13, 795, 13, 9651, 921, 29922, 513, 23352, 29918, 15764, 29961, 2388, 1822, 657, 29898, 327, 17094, 2314, 13, 13, 9651, 363, 289, 297, 3856, 12168, 29901, 13, 18884, 565, 289, 451, 297, 921, 29901, 13, 462, 259, 921, 29889, 4397, 29898, 29890, 29897, 13, 13, 9651, 5375, 29918, 15764, 29961, 2388, 3816, 327, 13192, 29916, 13, 13, 29937, 16913, 5235, 13, 3888, 3790, 29915, 25707, 2396, 29884, 25707, 29892, 525, 13203, 2396, 13203, 29892, 525, 326, 16123, 4110, 2396, 326, 16123, 4110, 29892, 525, 1785, 305, 29918, 2248, 2396, 1785, 305, 29918, 2248, 29892, 525, 513, 23352, 29918, 15764, 2396, 513, 23352, 29918, 15764, 29913, 13, 13, 29878, 29922, 384, 29889, 7620, 29918, 3126, 29918, 517, 29918, 1445, 3319, 29915, 3126, 29918, 1445, 22099, 2344, 29918, 5638, 1953, 29918, 7050, 29918, 3888, 29889, 3126, 3788, 8977, 2396, 3888, 5501, 6605, 29918, 8149, 22099, 3582, 29915, 1800, 13, 361, 364, 1839, 2457, 2033, 29958, 29900, 29901, 274, 29895, 29889, 3127, 29898, 29878, 29897, 13, 2 ]
bender_service/bender_service/urls.py
Dreem-Organization/bender-api
0
83776
<reponame>Dreem-Organization/bender-api """bender URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from bender_service.social_login import FacebookLogin, GoogleLogin from django.views.generic import TemplateView from django.views.generic import RedirectView urlpatterns = [ url(r'^admin/', admin.site.urls), # Rest auth (login signup etc.) url(r'^', include('rest_auth.urls')), # This is not meant to be used, it just allows allauth to send email of reset url(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', TemplateView.as_view(), name='password_reset_confirm'), # https://github.com/Tivix/django-rest-auth/issues/63 # Registration url(r'^registration/', include('rest_auth.registration.urls')), url(r'^facebook/', FacebookLogin.as_view(), name='facebook_login'), url(r'^google/', GoogleLogin.as_view(), name='google_login'), # Necessary imports (profile seems useless for now.) url(r'^accounts/profile/$', RedirectView.as_view(url='/', permanent=True), name='profile-redirect'), url(r'^account/', include('allauth.urls')), # Bender import url(r'^api/', include('bender.urls')), ]
[ 1, 529, 276, 1112, 420, 29958, 29928, 276, 331, 29899, 27356, 2133, 29914, 29890, 1581, 29899, 2754, 13, 15945, 29908, 29890, 1581, 3988, 20999, 13, 13, 1576, 421, 2271, 11037, 29879, 29952, 1051, 12049, 24295, 304, 8386, 29889, 1152, 901, 2472, 3113, 1074, 29901, 13, 1678, 2045, 597, 2640, 29889, 19776, 574, 26555, 622, 29889, 510, 29914, 264, 29914, 29896, 29889, 29896, 29900, 29914, 3332, 1199, 29914, 1124, 29914, 26045, 29914, 13, 1252, 9422, 29901, 13, 6678, 8386, 13, 268, 29896, 29889, 3462, 385, 1053, 29901, 29871, 515, 590, 29918, 932, 1053, 8386, 13, 268, 29906, 29889, 3462, 263, 3988, 304, 3142, 11037, 29879, 29901, 29871, 3142, 29898, 29878, 29915, 29985, 29938, 742, 8386, 29889, 5184, 29892, 1024, 2433, 5184, 1495, 13, 2385, 29899, 6707, 8386, 13, 268, 29896, 29889, 3462, 385, 1053, 29901, 29871, 515, 916, 29918, 932, 29889, 7406, 1053, 8778, 13, 268, 29906, 29889, 3462, 263, 3988, 304, 3142, 11037, 29879, 29901, 29871, 3142, 29898, 29878, 29915, 29985, 29938, 742, 8778, 29889, 294, 29918, 1493, 3285, 1024, 2433, 5184, 1495, 13, 797, 22368, 1790, 3988, 5527, 13, 268, 29896, 29889, 16032, 278, 3160, 580, 740, 29901, 515, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 29892, 3160, 13, 268, 29906, 29889, 3462, 263, 3988, 304, 3142, 11037, 29879, 29901, 29871, 3142, 29898, 29878, 29915, 29985, 7312, 29914, 742, 3160, 877, 7312, 29889, 26045, 8785, 13, 15945, 29908, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 29892, 3160, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 289, 1581, 29918, 5509, 29889, 24911, 29918, 7507, 1053, 13327, 11049, 29892, 5087, 11049, 13, 3166, 9557, 29889, 7406, 29889, 19206, 1053, 25663, 1043, 13, 3166, 9557, 29889, 7406, 29889, 19206, 1053, 4367, 1088, 1043, 13, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 3142, 29898, 29878, 29915, 29985, 6406, 29914, 742, 4113, 29889, 2746, 29889, 26045, 511, 13, 13, 1678, 396, 11654, 4817, 313, 7507, 1804, 786, 2992, 1846, 13, 1678, 3142, 29898, 29878, 29915, 29985, 742, 3160, 877, 5060, 29918, 5150, 29889, 26045, 1495, 511, 13, 13, 1678, 396, 910, 338, 451, 6839, 304, 367, 1304, 29892, 372, 925, 6511, 4082, 2806, 304, 3638, 4876, 310, 10092, 13, 1678, 3142, 29898, 29878, 29915, 29985, 5630, 29914, 12071, 29914, 10780, 29925, 29966, 5416, 29890, 29953, 29946, 24566, 29900, 29899, 29929, 29909, 29899, 29999, 29874, 29899, 29920, 3187, 29899, 10062, 6802, 10780, 29925, 29966, 6979, 24566, 29900, 29899, 29929, 29909, 29899, 29999, 29874, 29899, 29920, 3199, 29896, 29892, 29896, 29941, 7402, 29961, 29900, 29899, 29929, 29909, 29899, 29999, 29874, 29899, 29920, 3199, 29896, 29892, 29906, 29900, 1800, 13346, 742, 13, 4706, 25663, 1043, 29889, 294, 29918, 1493, 3285, 13, 4706, 1024, 2433, 5630, 29918, 12071, 29918, 26897, 5477, 29871, 396, 2045, 597, 3292, 29889, 510, 29914, 29911, 440, 861, 29914, 14095, 29899, 5060, 29899, 5150, 29914, 12175, 29914, 29953, 29941, 13, 13, 1678, 396, 2169, 8306, 13, 1678, 3142, 29898, 29878, 29915, 29985, 1727, 8306, 29914, 742, 3160, 877, 5060, 29918, 5150, 29889, 1727, 8306, 29889, 26045, 1495, 511, 13, 1678, 3142, 29898, 29878, 29915, 29985, 15445, 29914, 742, 13327, 11049, 29889, 294, 29918, 1493, 3285, 1024, 2433, 15445, 29918, 7507, 5477, 13, 1678, 3142, 29898, 29878, 29915, 29985, 3608, 29914, 742, 5087, 11049, 29889, 294, 29918, 1493, 3285, 1024, 2433, 3608, 29918, 7507, 5477, 13, 13, 1678, 396, 405, 687, 404, 653, 24802, 313, 10185, 2444, 19315, 363, 1286, 1846, 13, 1678, 3142, 29898, 29878, 29915, 29985, 10149, 29879, 29914, 10185, 13346, 742, 13, 4706, 4367, 1088, 1043, 29889, 294, 29918, 1493, 29898, 2271, 2433, 29914, 742, 17667, 29922, 5574, 511, 13, 4706, 1024, 2433, 10185, 29899, 17886, 5477, 13, 1678, 3142, 29898, 29878, 29915, 29985, 10149, 29914, 742, 3160, 877, 9864, 2806, 29889, 26045, 1495, 511, 13, 13, 1678, 396, 350, 1581, 1053, 13, 1678, 3142, 29898, 29878, 29915, 29985, 2754, 29914, 742, 3160, 877, 29890, 1581, 29889, 26045, 1495, 511, 13, 29962, 13, 2 ]
investing_algorithm_framework/core/models/__init__.py
coding-kitties/investing-algorithm-framework
9
11277
from flask import Flask from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_all_tables(): db.create_all() def initialize_db(app: Flask): db.init_app(app) db.app = app from investing_algorithm_framework.core.models.order_status import OrderStatus from investing_algorithm_framework.core.models.order_type import OrderType from investing_algorithm_framework.core.models.order_side import OrderSide from investing_algorithm_framework.core.models.time_unit import TimeUnit from investing_algorithm_framework.core.models.order import Order from investing_algorithm_framework.core.models.portfolio import Portfolio from investing_algorithm_framework.core.models.position import Position __all__ = [ "db", "Portfolio", "Position", 'Order', "OrderType", 'OrderSide', "TimeUnit", "create_all_tables", "initialize_db", "OrderStatus" ]
[ 1, 515, 29784, 1053, 2379, 1278, 13, 3166, 29784, 29918, 2850, 284, 305, 6764, 1053, 3758, 2499, 305, 6764, 13, 13, 2585, 353, 3758, 2499, 305, 6764, 580, 13, 13, 13, 1753, 1653, 29918, 497, 29918, 24051, 7295, 13, 1678, 4833, 29889, 3258, 29918, 497, 580, 13, 13, 13, 1753, 11905, 29918, 2585, 29898, 932, 29901, 2379, 1278, 1125, 13, 1678, 4833, 29889, 2344, 29918, 932, 29898, 932, 29897, 13, 1678, 4833, 29889, 932, 353, 623, 13, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 2098, 29918, 4882, 1053, 8170, 5709, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 2098, 29918, 1853, 1053, 8170, 1542, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 2098, 29918, 2975, 1053, 8170, 23908, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 2230, 29918, 5441, 1053, 5974, 8325, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 2098, 1053, 8170, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 637, 25648, 1053, 3371, 25648, 13, 3166, 13258, 292, 29918, 20567, 29918, 4468, 29889, 3221, 29889, 9794, 29889, 3283, 1053, 20627, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 376, 2585, 613, 13, 1678, 376, 2290, 25648, 613, 13, 1678, 376, 8003, 613, 13, 1678, 525, 7514, 742, 13, 1678, 376, 7514, 1542, 613, 13, 1678, 525, 7514, 23908, 742, 13, 1678, 376, 2481, 8325, 613, 13, 1678, 376, 3258, 29918, 497, 29918, 24051, 613, 13, 1678, 376, 24926, 29918, 2585, 613, 13, 1678, 376, 7514, 5709, 29908, 13, 29962, 13, 2 ]
fudge-domain.py
jordantrc/domain-fudgery
0
27748
<filename>fudge-domain.py #!/usr/bin/env python3 # # fudge-domain.py # # Finds potentially useful domains # which are visually similar to the # target domain and ascertains whether # these domains are currently available # (not registered). Also checks if any TLDs # are not registered for the domain. # # Usage: # domain-fudgery.py [options] [domain] # Only works with second-level domain names, # e.g. google.com, amazon.co.uk # # OPTIONS: # # TLD Options: # --country-code-tlds check country code TLDs # --original-tlds check original TLDs (.com, .net, .org) # --custom-tlds check additional list of TLDS, comma separated # # General Options: # --file load domains from the given filename # one domain per line # --no-active use only passive checks # --no-whois do not perform whois checks # import argparse import itertools import os import sys from dns import name from dns import message CHARACTER_LOOK_ALIKES = { 'a': ['d'], 'A': ['4'], 'b': ['1o', 'lo'], 'B': ['8'], 'd': ['ol', 'o1'], 'E': ['3'], 'i': ['1', 'l'], 'I': ['1', 'l'], 'l': ['1', 'i'], 'm': ['rn'], 'o': ['0'], 'O': ['0'], 'Q': ['O'], 's': ['5'], 'S': ['5'], 'T': ['7'], 'w': ['vv'], 'W': ['VV'], 'z': ['2'], 'Z': ['2'], '0': ['O'], '1': ['l'], '2': ['Z'], '4': ['A'], '5': ['S'], '7': ['T'], '8': ['B'] } # original TLDs, does not include restricted-use # TLDs .edu, .gov, .mil, .int TLDS_ORIGINAL = ['.com', '.net', '.org'] # country code TLDs TLDS_COUNTRY_CODE = [ '.ac','.ad','.ae','.af','.ag','.ai','.al','.am','.ao','.aq','.ar','.as','.at','.au','.aw','.ax', '.az','.ba','.bb','.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm','.bn','.bo','.bq','.br','.bs', '.bt','.bw','.by','.bz','.ca','.cc','.cd','.cf','.cg','.ch','.ci','.ck','.cl','.cm','.cn','.co', '.cr','.cu','.cv','.cw','.cx','.cy','.cz','.de','.dj','.dk','.dm','.do','.dz','.ec','.ee','.eg', '.eh','.er','.es','.et','.eu','.fi','.fj','.fk','.fm','.fo','.fr','.ga','.gd','.ge','.gf','.gg', '.gh','.gi','.gl','.gm','.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gw','.gy','.hk','.hm','.hn', '.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io','.iq','.ir','.is','.it','.je','.jm','.jo', '.jp','.ke','.kg','.kh','.ki','.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li', '.lk','.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.me','.mg','.mh','.mk','.ml','.mm', '.mn','.mo','.mp','.mq','.mr','.ms','.mt','.mu','.mv','.mw','.mx','.my','.mz','.na','.nc','.ne', '.nf','.ng','.ni','.nl','.no','.np','.nr','.nu','.nz','.om','.pa','.pe','.pf','.pg','.ph','.pk', '.pl','.pm','.pn','.pr','.ps','.pt','.pw','.py','.qa','.re','.ro','.rs','.ru','.rw','.sa','.sb', '.sc','.sd','.se','.sg','.sh','.si','.sk','.sl','.sm','.sn','.so','.sr','.ss','.st','.su','.sv', '.sx','.sy','.sz','.tc','.td','.tf','.tg','.th','.tj','.tk','.tl','.tm','.tn','.to','.tr','.tt', '.tv','.tw','.tz','.ua','.ug','.uk','.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu', '.wf','.ws','.ye','.yt','.za','.zm' ] # country codes with restricted second level domains (individuals or companies can # only register third level domains) TLDS_COUNTRY_CODE_RESTRICTED_LVL2 = [ '.au','.bn','.bt','.cy','.et','.fk','.gh','.gn','.gu','.jm','.ke','.kh','.kp','.kw','.lb','.lr', '.ls','.mm','.mq','.mt','.mz','.ni','.np','.pa','.pg','.py','.qa','.sb','.sv','.sz','.th','.tz', '.ve','.ye' ] # the second level domains for those domains above that can be used # for third level domains TLDS_COUNTRY_CODE_UNRESTRICTED_LVL2 = [ '.com.au','.net.au','.org.au','.asn.au','.id.au','.com.bn','.edu.bn','.net.bn','.org.bn','.bt', '.com.bt','.edu.bt','.net.bt','.org.bt','.ac.cy','.net.cy','.org.cy','.pro.cy','.name.cy', '.ekloges.cy','.tm.cy','.ltd.cy','.biz.cy','.press.cy','.parliament.cy','.com.cy', '.centralbank.cy','.com.et','.org.et','.edu.et','.net.et','.name.et','.co.fk','.org.fk', '.ac.fk','.nom.fk','.net.fk','.com.gh','.edu.gh','.com.gn','.ac.gn','.org.gn','.net.gn', '.com.gu','.net.gu','.org.gu','.edu.gu','.com.jm','.net.jm','.org.jm','.edu.jm','.co.ke', '.or.ke','.ne.ke','.go.ke','.ac.ke','.sc.ke','.me.ke','.mobi.ke','.info.ke','.per.kh','.com.kh', '.edu.kh','.net.kh','.org.kh','.aca.kp','.com.kp','.edu.kp','.law.kp','.org.kp','.rep.kp', '.net.kp','.sca.kp','.com.kw','.ind.kw','.net.kw','.org.kw','.emb.kw','.edu.kw','.com.lb', '.edu.lb','.net.lb','.org.lb','.com.lr','.edu.lr','.org.lr','.net.lr','.ac.ls','.co.ls', '.net.ls','.nul.ls','.org.ls','.sc.ls','.net.mm','.com.mm','.edu.mm','.org.mm','.edu.mt', '.com.mt','.net.mt','.org.mt','.co.mz','.net.mz','.org.mz','.ac.mz','.edu.mz','.gob.ni', '.co.ni','.com.ni','.ac.ni','.edu.ni','.org.ni','.nom.ni','.net.ni','.edu.np','.com.np', '.org.np','.net.np','.aero.np','.asia.np','.biz.np','.coop.np','.info.np','.jobs.np','.mobi.np', '.museum.np','.name.np','.pro.np','.services.np','.travel.np','.net.pa','.com.pa','.ac.pa', '.sld.pa','.edu.pa','.org.pa','.abo.pa','.ing.pa','.med.pa','.nom.pa','.com.pg','.net.pg', '.ac.pg','.org.pg','.com.py','.coop.py','.edu.py','.org.py','.net.py','.una.py','.com.qa', '.edu.qa','.sch.qa','.net.qa','.org.qa','.com.sb','.net.sb','.edu.sv','.com.sv','.org.sv', '.red.sv','.co.sz','.ac.sz','.org.sz','.ac.th','.co.th','.or.th','.net.th','.in.th','.co.tz', '.ac.tz','.or.tz','.ne.tz','.hotel.tz','.mobi.tz','.tv.tz','.info.tz','.me.tz','.arts.ve', '.co.ve','.com.ve','.info.ve','.net.ve','.org.ve','.radio.ve','.web.ve','.com.ye','.co.ye', '.ltd.ye','.me.ye','.net.ye','.org.ye','.plc.ye' ] def replacement_combinations(indices): """returns a list of all possible replacement combinations for count instances of a character in a string""" result = [] for i in range(1, len(indices) + 1): for c in itertools.combinations(indices, i): result.append(c) return result def permutate_domain(domain, character, replacements): """returns all permutations of character replacements""" new_domains = [] indices = [ i for i, ltr in enumerate(domain) if ltr == character ] combinations = replacement_combinations(indices) for c in combinations: new_domain = domain for i in c: for r in replacements: new_domain = new_domain[:i] + r + new_domain[i + 1:] new_domains.append(new_domain) return new_domains def domain_permutations(domain, orig_tld, country_code_tlds=False, original_tlds=False, custom_tlds=[]): """returns a list of domains to check""" result = [] domains = [domain, domain.upper()] # character replacement for c in CHARACTER_LOOK_ALIKES.keys(): for d in domains: count = d.count(c) if count > 0: permutated_domains = permutate_domain(d, c, CHARACTER_LOOK_ALIKES[c]) for p in permutated_domains: print(p + orig_tld) def main(): """Main function.""" parser = argparse.ArgumentParser(description="Finds fudged domains.") parser.add_argument("--country-code-tlds", action='store_true', dest="country_code_tld", help="look for unregistered country code TLDs") parser.add_argument("--original-tlds", action='store_true', dest="original_tld", help="look for unregistered original TLDs") parser.add_argument("--custom-tlds", dest="custom_tld", help="look for custom list of TLDs") parser.add_argument("--no-whois", action='store_true', dest="no_whois", help="disable whois queries") parser.add_argument("--file", dest="file", help="file containing DNS names to load") parser.add_argument("--no-active", action='store_true', dest="no_active", help="disable active checks") parser.add_argument("domain", nargs='*', help="domain to fudge") args = parser.parse_args() # ensure at least one domain was provided if not args.file and not args.domain: print("[-] must provide a domain as argument or a file containing domains") sys.exit(1) domains = [] if args.file: if os.path.isfile(args.file): with open(args.file, "r") as fd: domains = fd.readlines() else: print("[-] file not found or permission denied") sys.exit(1) if args.domain is not None: domains.append(args.domain[0]) # for each domain, determine TLDs for domain for d in domains: domain_parts = d.split(".") domain = domain_parts[0] tld = "." + ".".join(domain_parts[1:]) domain_permutations(domain, tld) if __name__ == "__main__": main()
[ 1, 529, 9507, 29958, 29888, 566, 479, 29899, 7247, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 13, 29937, 285, 566, 479, 29899, 7247, 29889, 2272, 13, 29937, 13, 29937, 10987, 29879, 19998, 5407, 21904, 13, 29937, 607, 526, 1998, 1474, 2788, 304, 278, 29871, 13, 29937, 3646, 5354, 322, 408, 6327, 2708, 3692, 13, 29937, 1438, 21904, 526, 5279, 3625, 13, 29937, 313, 1333, 15443, 467, 3115, 12747, 565, 738, 323, 10249, 29879, 13, 29937, 526, 451, 15443, 363, 278, 5354, 29889, 13, 29937, 13, 29937, 10783, 482, 29901, 13, 29937, 5354, 29899, 29888, 566, 29887, 708, 29889, 2272, 518, 6768, 29962, 518, 7247, 29962, 13, 29937, 9333, 1736, 411, 1473, 29899, 5563, 5354, 2983, 29892, 29871, 13, 29937, 321, 29889, 29887, 29889, 5386, 29889, 510, 29892, 19249, 29889, 1111, 29889, 2679, 13, 29937, 13, 29937, 6418, 29911, 27946, 29901, 13, 29937, 13, 29937, 323, 10249, 25186, 29901, 13, 29937, 1678, 1192, 13509, 29899, 401, 29899, 29873, 430, 29879, 268, 1423, 4234, 775, 323, 10249, 29879, 13, 29937, 1678, 1192, 13492, 29899, 29873, 430, 29879, 308, 1423, 2441, 323, 10249, 29879, 14544, 510, 29892, 869, 1212, 29892, 869, 990, 29897, 13, 29937, 1678, 1192, 6341, 29899, 29873, 430, 29879, 965, 1423, 5684, 1051, 310, 323, 29931, 8452, 29892, 16694, 13055, 13, 29937, 13, 29937, 4593, 25186, 29901, 13, 29937, 1678, 1192, 1445, 462, 29871, 2254, 21904, 515, 278, 2183, 10422, 13, 29937, 462, 9651, 697, 5354, 639, 1196, 13, 29937, 1678, 1192, 1217, 29899, 4925, 632, 671, 871, 1209, 573, 12747, 13, 29937, 1678, 1192, 1217, 29899, 15970, 275, 795, 437, 451, 2189, 1058, 275, 12747, 13, 29937, 13, 13, 5215, 1852, 5510, 13, 5215, 4256, 8504, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 270, 1983, 1053, 1024, 13, 3166, 270, 1983, 1053, 2643, 13, 13, 13, 11282, 17923, 1001, 29918, 3927, 8949, 29918, 1964, 23328, 2890, 353, 426, 13, 1678, 525, 29874, 2396, 6024, 29881, 7464, 13, 1678, 525, 29909, 2396, 6024, 29946, 7464, 13, 1678, 525, 29890, 2396, 6024, 29896, 29877, 742, 525, 417, 7464, 13, 1678, 525, 29933, 2396, 6024, 29947, 7464, 13, 1678, 525, 29881, 2396, 6024, 324, 742, 525, 29877, 29896, 7464, 13, 1678, 525, 29923, 2396, 6024, 29941, 7464, 13, 1678, 525, 29875, 2396, 6024, 29896, 742, 525, 29880, 7464, 13, 1678, 525, 29902, 2396, 6024, 29896, 742, 525, 29880, 7464, 13, 1678, 525, 29880, 2396, 6024, 29896, 742, 525, 29875, 7464, 13, 1678, 525, 29885, 2396, 6024, 27539, 7464, 13, 1678, 525, 29877, 2396, 6024, 29900, 7464, 13, 1678, 525, 29949, 2396, 6024, 29900, 7464, 13, 1678, 525, 29984, 2396, 6024, 29949, 7464, 13, 1678, 525, 29879, 2396, 6024, 29945, 7464, 13, 1678, 525, 29903, 2396, 6024, 29945, 7464, 13, 1678, 525, 29911, 2396, 6024, 29955, 7464, 13, 1678, 525, 29893, 2396, 6024, 29894, 29894, 7464, 13, 1678, 525, 29956, 2396, 6024, 29963, 29963, 7464, 13, 1678, 525, 29920, 2396, 6024, 29906, 7464, 13, 1678, 525, 29999, 2396, 6024, 29906, 7464, 13, 1678, 525, 29900, 2396, 6024, 29949, 7464, 13, 1678, 525, 29896, 2396, 6024, 29880, 7464, 13, 1678, 525, 29906, 2396, 6024, 29999, 7464, 13, 1678, 525, 29946, 2396, 6024, 29909, 7464, 13, 1678, 525, 29945, 2396, 6024, 29903, 7464, 13, 1678, 525, 29955, 2396, 6024, 29911, 7464, 13, 1678, 525, 29947, 2396, 6024, 29933, 2033, 13, 29913, 13, 13, 29937, 2441, 323, 10249, 29879, 29892, 947, 451, 3160, 22078, 29899, 1509, 13, 29937, 323, 10249, 29879, 869, 6085, 29892, 869, 13513, 29892, 869, 23853, 29892, 869, 524, 13, 14632, 8452, 29918, 1955, 6259, 1177, 1964, 353, 518, 4286, 510, 742, 15300, 1212, 742, 15300, 990, 2033, 13, 13, 29937, 4234, 775, 323, 10249, 29879, 13, 14632, 8452, 29918, 3217, 3904, 5659, 29979, 29918, 16524, 353, 518, 13, 1678, 15300, 562, 3788, 29889, 328, 3788, 29889, 3660, 3788, 29889, 2142, 3788, 29889, 351, 3788, 29889, 1794, 3788, 29889, 284, 3788, 29889, 314, 3788, 29889, 6241, 3788, 29889, 29874, 29939, 3788, 29889, 279, 3788, 29889, 294, 3788, 29889, 271, 3788, 29889, 585, 3788, 29889, 1450, 3788, 29889, 1165, 742, 13, 1678, 15300, 834, 3788, 29889, 2291, 3788, 29889, 1327, 3788, 29889, 6448, 3788, 29889, 915, 3788, 29889, 1635, 3788, 29889, 16264, 3788, 29889, 29890, 29882, 3788, 29889, 5365, 3788, 29889, 29890, 29926, 3788, 29889, 5838, 3788, 29889, 11197, 3788, 29889, 833, 3788, 29889, 29890, 29939, 3788, 29889, 1182, 3788, 29889, 5824, 742, 13, 1678, 15300, 3116, 3788, 29889, 29890, 29893, 3788, 29889, 1609, 3788, 29889, 29890, 29920, 3788, 29889, 1113, 3788, 29889, 617, 3788, 29889, 2252, 3788, 29889, 6854, 3788, 29889, 29883, 29887, 3788, 29889, 305, 3788, 29889, 455, 3788, 29889, 384, 3788, 29889, 695, 3788, 29889, 4912, 3788, 29889, 18038, 3788, 29889, 1111, 742, 13, 1678, 15300, 7283, 3788, 29889, 4979, 3788, 29889, 11023, 3788, 29889, 29883, 29893, 3788, 29889, 18904, 3788, 29889, 1270, 3788, 29889, 2067, 3788, 29889, 311, 3788, 29889, 19776, 3788, 29889, 8181, 3788, 29889, 18933, 3788, 29889, 1867, 3788, 29889, 5601, 3788, 29889, 687, 3788, 29889, 3905, 3788, 29889, 387, 742, 13, 1678, 15300, 14797, 3788, 29889, 261, 3788, 29889, 267, 3788, 29889, 300, 3788, 29889, 12932, 3788, 29889, 7241, 3788, 29889, 29888, 29926, 3788, 29889, 29888, 29895, 3788, 29889, 24826, 3788, 29889, 1181, 3788, 29889, 1341, 3788, 29889, 3249, 3788, 29889, 29887, 29881, 3788, 29889, 479, 3788, 29889, 29887, 29888, 3788, 29889, 1505, 742, 13, 1678, 15300, 12443, 3788, 29889, 3146, 3788, 29889, 3820, 3788, 29889, 29887, 29885, 3788, 29889, 5138, 3788, 29889, 29887, 29886, 3788, 29889, 29887, 29939, 3788, 29889, 629, 3788, 29889, 3174, 3788, 29889, 4141, 3788, 29889, 2543, 3788, 29889, 29887, 29893, 3788, 29889, 1927, 3788, 29889, 29882, 29895, 3788, 29889, 7184, 3788, 29889, 3123, 742, 13, 1678, 15300, 1092, 3788, 29889, 400, 3788, 29889, 6905, 3788, 29889, 333, 3788, 29889, 347, 3788, 29889, 309, 3788, 29889, 326, 3788, 29889, 262, 3788, 29889, 601, 3788, 29889, 29875, 29939, 3788, 29889, 381, 3788, 29889, 275, 3788, 29889, 277, 3788, 29889, 1324, 3788, 29889, 21231, 3788, 29889, 2212, 742, 13, 1678, 15300, 16865, 3788, 29889, 446, 3788, 29889, 9415, 3788, 29889, 15339, 3788, 29889, 1984, 3788, 29889, 8848, 3788, 29889, 3959, 3788, 29889, 29895, 29886, 3788, 29889, 12748, 3788, 29889, 11022, 3788, 29889, 3459, 3788, 29889, 29895, 29920, 3788, 29889, 433, 3788, 29889, 27728, 3788, 29889, 29880, 29883, 3788, 29889, 492, 742, 13, 1678, 15300, 29880, 29895, 3788, 29889, 29212, 3788, 29889, 3137, 3788, 29889, 1896, 3788, 29889, 6092, 3788, 29889, 28463, 3788, 29889, 368, 3788, 29889, 655, 3788, 29889, 14047, 3788, 29889, 3487, 3788, 29889, 1004, 3788, 29889, 29885, 29887, 3788, 29889, 29885, 29882, 3788, 29889, 11256, 3788, 29889, 828, 3788, 29889, 4317, 742, 13, 1678, 15300, 23521, 3788, 29889, 4346, 3788, 29889, 1526, 3788, 29889, 28466, 3788, 29889, 29885, 29878, 3788, 29889, 1516, 3788, 29889, 4378, 3788, 29889, 2589, 3788, 29889, 29324, 3788, 29889, 29885, 29893, 3788, 29889, 16838, 3788, 29889, 1357, 3788, 29889, 29885, 29920, 3788, 29889, 1056, 3788, 29889, 17608, 3788, 29889, 484, 742, 13, 1678, 15300, 29876, 29888, 3788, 29889, 865, 3788, 29889, 1240, 3788, 29889, 12938, 3788, 29889, 1217, 3788, 29889, 9302, 3788, 29889, 22230, 3788, 29889, 3433, 3788, 29889, 29876, 29920, 3788, 29889, 290, 3788, 29889, 3274, 3788, 29889, 412, 3788, 29889, 7810, 3788, 29889, 4061, 3788, 29889, 561, 3788, 29889, 20571, 742, 13, 1678, 15300, 572, 3788, 29889, 3358, 3788, 29889, 21257, 3788, 29889, 558, 3788, 29889, 567, 3788, 29889, 415, 3788, 29889, 29886, 29893, 3788, 29889, 2272, 3788, 29889, 25621, 3788, 29889, 276, 3788, 29889, 307, 3788, 29889, 2288, 3788, 29889, 582, 3788, 29889, 13975, 3788, 29889, 4977, 3788, 29889, 20778, 742, 13, 1678, 15300, 1557, 3788, 29889, 4928, 3788, 29889, 344, 3788, 29889, 5311, 3788, 29889, 845, 3788, 29889, 1039, 3788, 29889, 808, 3788, 29889, 2536, 3788, 29889, 3844, 3788, 29889, 16586, 3788, 29889, 578, 3788, 29889, 21935, 3788, 29889, 893, 3788, 29889, 303, 3788, 29889, 2146, 3788, 29889, 4501, 742, 13, 1678, 15300, 29879, 29916, 3788, 29889, 29879, 29891, 3788, 29889, 3616, 3788, 29889, 14246, 3788, 29889, 1594, 3788, 29889, 13264, 3788, 29889, 29873, 29887, 3788, 29889, 386, 3788, 29889, 29873, 29926, 3788, 29889, 11178, 3788, 29889, 15206, 3788, 29889, 18276, 3788, 29889, 6277, 3788, 29889, 517, 3788, 29889, 509, 3788, 29889, 698, 742, 13, 1678, 15300, 12427, 3788, 29889, 7516, 3788, 29889, 17559, 3788, 29889, 3357, 3788, 29889, 688, 3788, 29889, 2679, 3788, 29889, 375, 3788, 29889, 8631, 3788, 29889, 3365, 3788, 29889, 1564, 3788, 29889, 7071, 3788, 29889, 345, 3788, 29889, 29894, 29887, 3788, 29889, 1403, 3788, 29889, 18564, 3788, 29889, 24845, 742, 13, 1678, 15300, 29893, 29888, 3788, 29889, 5652, 3788, 29889, 4099, 3788, 29889, 3637, 3788, 29889, 1362, 3788, 29889, 14018, 29915, 13, 1678, 4514, 13, 13, 29937, 4234, 11561, 411, 22078, 1473, 3233, 21904, 313, 513, 23352, 29879, 470, 14582, 508, 13, 29937, 871, 6036, 4654, 3233, 21904, 29897, 13, 14632, 8452, 29918, 3217, 3904, 5659, 29979, 29918, 16524, 29918, 1525, 1254, 3960, 1783, 3352, 29918, 29931, 29963, 29931, 29906, 353, 518, 13, 1678, 15300, 585, 3788, 29889, 11197, 3788, 29889, 3116, 3788, 29889, 1270, 3788, 29889, 300, 3788, 29889, 29888, 29895, 3788, 29889, 12443, 3788, 29889, 5138, 3788, 29889, 2543, 3788, 29889, 21231, 3788, 29889, 446, 3788, 29889, 15339, 3788, 29889, 29895, 29886, 3788, 29889, 11022, 3788, 29889, 27728, 3788, 29889, 29212, 742, 13, 1678, 15300, 3137, 3788, 29889, 4317, 3788, 29889, 28466, 3788, 29889, 4378, 3788, 29889, 29885, 29920, 3788, 29889, 1240, 3788, 29889, 9302, 3788, 29889, 3274, 3788, 29889, 4061, 3788, 29889, 2272, 3788, 29889, 25621, 3788, 29889, 20778, 3788, 29889, 4501, 3788, 29889, 3616, 3788, 29889, 386, 3788, 29889, 17559, 742, 13, 1678, 15300, 345, 3788, 29889, 4099, 29915, 13, 1678, 4514, 13, 13, 29937, 278, 1473, 3233, 21904, 363, 1906, 21904, 2038, 393, 508, 367, 1304, 13, 29937, 363, 4654, 3233, 21904, 13, 14632, 8452, 29918, 3217, 3904, 5659, 29979, 29918, 16524, 29918, 3904, 1525, 1254, 3960, 1783, 3352, 29918, 29931, 29963, 29931, 29906, 353, 518, 13, 1678, 15300, 510, 29889, 585, 3788, 29889, 1212, 29889, 585, 3788, 29889, 990, 29889, 585, 3788, 29889, 294, 29876, 29889, 585, 3788, 29889, 333, 29889, 585, 3788, 29889, 510, 29889, 11197, 3788, 29889, 6085, 29889, 11197, 3788, 29889, 1212, 29889, 11197, 3788, 29889, 990, 29889, 11197, 3788, 29889, 3116, 742, 13, 1678, 15300, 510, 29889, 3116, 3788, 29889, 6085, 29889, 3116, 3788, 29889, 1212, 29889, 3116, 3788, 29889, 990, 29889, 3116, 3788, 29889, 562, 29889, 1270, 3788, 29889, 1212, 29889, 1270, 3788, 29889, 990, 29889, 1270, 3788, 29889, 771, 29889, 1270, 3788, 29889, 978, 29889, 1270, 742, 13, 1678, 15300, 1416, 1188, 267, 29889, 1270, 3788, 29889, 18276, 29889, 1270, 3788, 29889, 29880, 1594, 29889, 1270, 3788, 29889, 29890, 466, 29889, 1270, 3788, 29889, 2139, 29889, 1270, 3788, 29889, 862, 9745, 29889, 1270, 3788, 29889, 510, 29889, 1270, 742, 13, 1678, 15300, 25171, 9157, 29889, 1270, 3788, 29889, 510, 29889, 300, 3788, 29889, 990, 29889, 300, 3788, 29889, 6085, 29889, 300, 3788, 29889, 1212, 29889, 300, 3788, 29889, 978, 29889, 300, 3788, 29889, 1111, 29889, 29888, 29895, 3788, 29889, 990, 29889, 29888, 29895, 742, 13, 1678, 15300, 562, 29889, 29888, 29895, 3788, 29889, 11522, 29889, 29888, 29895, 3788, 29889, 1212, 29889, 29888, 29895, 3788, 29889, 510, 29889, 12443, 3788, 29889, 6085, 29889, 12443, 3788, 29889, 510, 29889, 5138, 3788, 29889, 562, 29889, 5138, 3788, 29889, 990, 29889, 5138, 3788, 29889, 1212, 29889, 5138, 742, 13, 1678, 15300, 510, 29889, 2543, 3788, 29889, 1212, 29889, 2543, 3788, 29889, 990, 29889, 2543, 3788, 29889, 6085, 29889, 2543, 3788, 29889, 510, 29889, 21231, 3788, 29889, 1212, 29889, 21231, 3788, 29889, 990, 29889, 21231, 3788, 29889, 6085, 29889, 21231, 3788, 29889, 1111, 29889, 446, 742, 13, 1678, 15300, 272, 29889, 446, 3788, 29889, 484, 29889, 446, 3788, 29889, 1484, 29889, 446, 3788, 29889, 562, 29889, 446, 3788, 29889, 1557, 29889, 446, 3788, 29889, 1004, 29889, 446, 3788, 29889, 29885, 15647, 29889, 446, 3788, 29889, 3888, 29889, 446, 3788, 29889, 546, 29889, 15339, 3788, 29889, 510, 29889, 15339, 742, 13, 1678, 15300, 6085, 29889, 15339, 3788, 29889, 1212, 29889, 15339, 3788, 29889, 990, 29889, 15339, 3788, 29889, 11989, 29889, 29895, 29886, 3788, 29889, 510, 29889, 29895, 29886, 3788, 29889, 6085, 29889, 29895, 29886, 3788, 29889, 10653, 29889, 29895, 29886, 3788, 29889, 990, 29889, 29895, 29886, 3788, 29889, 3445, 29889, 29895, 29886, 742, 13, 1678, 15300, 1212, 29889, 29895, 29886, 3788, 29889, 29879, 1113, 29889, 29895, 29886, 3788, 29889, 510, 29889, 11022, 3788, 29889, 513, 29889, 11022, 3788, 29889, 1212, 29889, 11022, 3788, 29889, 990, 29889, 11022, 3788, 29889, 1590, 29889, 11022, 3788, 29889, 6085, 29889, 11022, 3788, 29889, 510, 29889, 27728, 742, 13, 1678, 15300, 6085, 29889, 27728, 3788, 29889, 1212, 29889, 27728, 3788, 29889, 990, 29889, 27728, 3788, 29889, 510, 29889, 29212, 3788, 29889, 6085, 29889, 29212, 3788, 29889, 990, 29889, 29212, 3788, 29889, 1212, 29889, 29212, 3788, 29889, 562, 29889, 3137, 3788, 29889, 1111, 29889, 3137, 742, 13, 1678, 15300, 1212, 29889, 3137, 3788, 29889, 29876, 352, 29889, 3137, 3788, 29889, 990, 29889, 3137, 3788, 29889, 1557, 29889, 3137, 3788, 29889, 1212, 29889, 4317, 3788, 29889, 510, 29889, 4317, 3788, 29889, 6085, 29889, 4317, 3788, 29889, 990, 29889, 4317, 3788, 29889, 6085, 29889, 4378, 742, 13, 1678, 15300, 510, 29889, 4378, 3788, 29889, 1212, 29889, 4378, 3788, 29889, 990, 29889, 4378, 3788, 29889, 1111, 29889, 29885, 29920, 3788, 29889, 1212, 29889, 29885, 29920, 3788, 29889, 990, 29889, 29885, 29920, 3788, 29889, 562, 29889, 29885, 29920, 3788, 29889, 6085, 29889, 29885, 29920, 3788, 29889, 29887, 711, 29889, 1240, 742, 13, 1678, 15300, 1111, 29889, 1240, 3788, 29889, 510, 29889, 1240, 3788, 29889, 562, 29889, 1240, 3788, 29889, 6085, 29889, 1240, 3788, 29889, 990, 29889, 1240, 3788, 29889, 11522, 29889, 1240, 3788, 29889, 1212, 29889, 1240, 3788, 29889, 6085, 29889, 9302, 3788, 29889, 510, 29889, 9302, 742, 13, 1678, 15300, 990, 29889, 9302, 3788, 29889, 1212, 29889, 9302, 3788, 29889, 29874, 1489, 29889, 9302, 3788, 29889, 26252, 29889, 9302, 3788, 29889, 29890, 466, 29889, 9302, 3788, 29889, 1111, 459, 29889, 9302, 3788, 29889, 3888, 29889, 9302, 3788, 29889, 9057, 29879, 29889, 9302, 3788, 29889, 29885, 15647, 29889, 9302, 742, 13, 1678, 15300, 25360, 29889, 9302, 3788, 29889, 978, 29889, 9302, 3788, 29889, 771, 29889, 9302, 3788, 29889, 9916, 29889, 9302, 3788, 29889, 3018, 955, 29889, 9302, 3788, 29889, 1212, 29889, 3274, 3788, 29889, 510, 29889, 3274, 3788, 29889, 562, 29889, 3274, 742, 13, 1678, 15300, 29879, 430, 29889, 3274, 3788, 29889, 6085, 29889, 3274, 3788, 29889, 990, 29889, 3274, 3788, 29889, 370, 29877, 29889, 3274, 3788, 29889, 292, 29889, 3274, 3788, 29889, 2168, 29889, 3274, 3788, 29889, 11522, 29889, 3274, 3788, 29889, 510, 29889, 4061, 3788, 29889, 1212, 29889, 4061, 742, 13, 1678, 15300, 562, 29889, 4061, 3788, 29889, 990, 29889, 4061, 3788, 29889, 510, 29889, 2272, 3788, 29889, 1111, 459, 29889, 2272, 3788, 29889, 6085, 29889, 2272, 3788, 29889, 990, 29889, 2272, 3788, 29889, 1212, 29889, 2272, 3788, 29889, 4347, 29889, 2272, 3788, 29889, 510, 29889, 25621, 742, 13, 1678, 15300, 6085, 29889, 25621, 3788, 29889, 816, 29889, 25621, 3788, 29889, 1212, 29889, 25621, 3788, 29889, 990, 29889, 25621, 3788, 29889, 510, 29889, 20778, 3788, 29889, 1212, 29889, 20778, 3788, 29889, 6085, 29889, 4501, 3788, 29889, 510, 29889, 4501, 3788, 29889, 990, 29889, 4501, 742, 13, 1678, 15300, 1127, 29889, 4501, 3788, 29889, 1111, 29889, 3616, 3788, 29889, 562, 29889, 3616, 3788, 29889, 990, 29889, 3616, 3788, 29889, 562, 29889, 386, 3788, 29889, 1111, 29889, 386, 3788, 29889, 272, 29889, 386, 3788, 29889, 1212, 29889, 386, 3788, 29889, 262, 29889, 386, 3788, 29889, 1111, 29889, 17559, 742, 13, 1678, 15300, 562, 29889, 17559, 3788, 29889, 272, 29889, 17559, 3788, 29889, 484, 29889, 17559, 3788, 29889, 8711, 295, 29889, 17559, 3788, 29889, 29885, 15647, 29889, 17559, 3788, 29889, 12427, 29889, 17559, 3788, 29889, 3888, 29889, 17559, 3788, 29889, 1004, 29889, 17559, 3788, 29889, 5708, 29889, 345, 742, 13, 1678, 15300, 1111, 29889, 345, 3788, 29889, 510, 29889, 345, 3788, 29889, 3888, 29889, 345, 3788, 29889, 1212, 29889, 345, 3788, 29889, 990, 29889, 345, 3788, 29889, 13399, 29889, 345, 3788, 29889, 2676, 29889, 345, 3788, 29889, 510, 29889, 4099, 3788, 29889, 1111, 29889, 4099, 742, 13, 1678, 15300, 29880, 1594, 29889, 4099, 3788, 29889, 1004, 29889, 4099, 3788, 29889, 1212, 29889, 4099, 3788, 29889, 990, 29889, 4099, 3788, 29889, 572, 29883, 29889, 4099, 29915, 13, 29962, 13, 13, 13, 1753, 16920, 29918, 510, 2109, 800, 29898, 513, 1575, 1125, 13, 1678, 9995, 18280, 263, 1051, 310, 599, 1950, 16920, 18240, 363, 2302, 13, 1678, 8871, 310, 263, 2931, 297, 263, 1347, 15945, 29908, 13, 1678, 1121, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 513, 1575, 29897, 718, 29871, 29896, 1125, 13, 4706, 363, 274, 297, 4256, 8504, 29889, 510, 2109, 800, 29898, 513, 1575, 29892, 474, 1125, 13, 9651, 1121, 29889, 4397, 29898, 29883, 29897, 13, 1678, 736, 1121, 13, 13, 13, 1753, 20005, 403, 29918, 7247, 29898, 7247, 29892, 2931, 29892, 1634, 4620, 4110, 1125, 13, 1678, 9995, 18280, 599, 20005, 800, 310, 2931, 1634, 4620, 4110, 15945, 29908, 13, 1678, 716, 29918, 3129, 2708, 353, 5159, 13, 1678, 16285, 353, 518, 474, 363, 474, 29892, 301, 509, 297, 26985, 29898, 7247, 29897, 565, 301, 509, 1275, 2931, 4514, 13, 1678, 18240, 353, 16920, 29918, 510, 2109, 800, 29898, 513, 1575, 29897, 13, 1678, 363, 274, 297, 18240, 29901, 13, 4706, 716, 29918, 7247, 353, 5354, 13, 4706, 363, 474, 297, 274, 29901, 13, 9651, 363, 364, 297, 1634, 4620, 4110, 29901, 13, 18884, 716, 29918, 7247, 353, 716, 29918, 7247, 7503, 29875, 29962, 718, 364, 718, 716, 29918, 7247, 29961, 29875, 718, 29871, 29896, 17531, 13, 4706, 716, 29918, 3129, 2708, 29889, 4397, 29898, 1482, 29918, 7247, 29897, 13, 1678, 736, 716, 29918, 3129, 2708, 13, 13, 13, 1753, 5354, 29918, 546, 6149, 800, 29898, 7247, 29892, 1677, 29918, 29873, 430, 29892, 4234, 29918, 401, 29918, 29873, 430, 29879, 29922, 8824, 29892, 2441, 29918, 29873, 430, 29879, 29922, 8824, 29892, 2888, 29918, 29873, 430, 29879, 29922, 2636, 1125, 13, 1678, 9995, 18280, 263, 1051, 310, 21904, 304, 1423, 15945, 29908, 13, 1678, 1121, 353, 5159, 13, 1678, 21904, 353, 518, 7247, 29892, 5354, 29889, 21064, 580, 29962, 13, 1678, 396, 2931, 16920, 13, 1678, 363, 274, 297, 26871, 17923, 1001, 29918, 3927, 8949, 29918, 1964, 23328, 2890, 29889, 8149, 7295, 13, 4706, 363, 270, 297, 21904, 29901, 13, 9651, 2302, 353, 270, 29889, 2798, 29898, 29883, 29897, 13, 9651, 565, 2302, 1405, 29871, 29900, 29901, 13, 18884, 20005, 630, 29918, 3129, 2708, 353, 20005, 403, 29918, 7247, 29898, 29881, 29892, 274, 29892, 26871, 17923, 1001, 29918, 3927, 8949, 29918, 1964, 23328, 2890, 29961, 29883, 2314, 13, 18884, 363, 282, 297, 20005, 630, 29918, 3129, 2708, 29901, 13, 462, 1678, 1596, 29898, 29886, 718, 1677, 29918, 29873, 430, 29897, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 9995, 6330, 740, 1213, 15945, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 8216, 543, 12542, 29879, 285, 566, 3192, 21904, 23157, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 13509, 29899, 401, 29899, 29873, 430, 29879, 613, 3158, 2433, 8899, 29918, 3009, 742, 2731, 543, 13509, 29918, 401, 29918, 29873, 430, 613, 1371, 543, 6914, 363, 443, 9573, 287, 4234, 775, 323, 10249, 29879, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 13492, 29899, 29873, 430, 29879, 613, 3158, 2433, 8899, 29918, 3009, 742, 2731, 543, 13492, 29918, 29873, 430, 613, 1371, 543, 6914, 363, 443, 9573, 287, 2441, 323, 10249, 29879, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 6341, 29899, 29873, 430, 29879, 613, 2731, 543, 6341, 29918, 29873, 430, 613, 1371, 543, 6914, 363, 2888, 1051, 310, 323, 10249, 29879, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 1217, 29899, 15970, 275, 613, 3158, 2433, 8899, 29918, 3009, 742, 2731, 543, 1217, 29918, 15970, 275, 613, 1371, 543, 20472, 1058, 275, 9365, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 1445, 613, 2731, 543, 1445, 613, 1371, 543, 1445, 6943, 16332, 2983, 304, 2254, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 489, 1217, 29899, 4925, 613, 3158, 2433, 8899, 29918, 3009, 742, 2731, 543, 1217, 29918, 4925, 613, 1371, 543, 20472, 6136, 12747, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 7247, 613, 302, 5085, 2433, 29930, 742, 1371, 543, 7247, 304, 285, 566, 479, 1159, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 1678, 396, 9801, 472, 3203, 697, 5354, 471, 4944, 13, 1678, 565, 451, 6389, 29889, 1445, 322, 451, 6389, 29889, 7247, 29901, 13, 4706, 1596, 703, 14352, 29962, 1818, 3867, 263, 5354, 408, 2980, 470, 263, 934, 6943, 21904, 1159, 13, 4706, 10876, 29889, 13322, 29898, 29896, 29897, 13, 13, 1678, 21904, 353, 5159, 13, 1678, 565, 6389, 29889, 1445, 29901, 13, 4706, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 5085, 29889, 1445, 1125, 13, 9651, 411, 1722, 29898, 5085, 29889, 1445, 29892, 376, 29878, 1159, 408, 285, 29881, 29901, 13, 18884, 21904, 353, 285, 29881, 29889, 949, 9012, 580, 9651, 13, 4706, 1683, 29901, 13, 9651, 1596, 703, 14352, 29962, 934, 451, 1476, 470, 10751, 17935, 1159, 13, 9651, 10876, 29889, 13322, 29898, 29896, 29897, 13, 1678, 565, 6389, 29889, 7247, 338, 451, 6213, 29901, 13, 4706, 21904, 29889, 4397, 29898, 5085, 29889, 7247, 29961, 29900, 2314, 13, 268, 13, 1678, 396, 363, 1269, 5354, 29892, 8161, 323, 10249, 29879, 363, 5354, 13, 1678, 363, 270, 297, 21904, 29901, 13, 4706, 5354, 29918, 20895, 353, 270, 29889, 5451, 17350, 1159, 13, 4706, 5354, 353, 5354, 29918, 20895, 29961, 29900, 29962, 13, 4706, 260, 430, 353, 376, 1213, 718, 376, 1213, 29889, 7122, 29898, 7247, 29918, 20895, 29961, 29896, 29901, 2314, 13, 4706, 5354, 29918, 546, 6149, 800, 29898, 7247, 29892, 260, 430, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 2 ]
common/doLoginOut.py
TamCharlene/automatic_testing
0
178747
import os import json import requests from common.doConfig import GetInfo class DoLoginOut: def getUrl(self): """ 从配置文件中接口url :return: 接口url """ cf = GetInfo(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + "/config/user_info.cfg") base_interface = cf.get_info_for_public('INTERFACE') return base_interface def getHeaders(self): """ :return: """ cf = GetInfo(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + "/config/user_info.cfg") base_headers = cf.get_info_for_public('HEADERS') return base_headers def getUser(self): """ :return: """ cf = GetInfo(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + "/config/user_info.cfg") user_info = cf.get_info_for_public('USER_INFO') return user_info def getBody(self): """ :return: """ cf = GetInfo(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + "/config/user_info.cfg") body = cf.get_info_for_public('BODY') return body def login(self): """ 1.获取验证码 2.登录 :return:返回json """ # 从配置文件中读取host cf = GetInfo(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + "/config/env_info.cfg") base_url = cf.get_info_for_public('TEST_HOST') base_url_re = base_url.get('fcb_app_host_c') #url data_code = { "phone": DoLoginOut().getUser().get('phone'), "type": DoLoginOut().getBody().get('type'), "by_voice_code": DoLoginOut().getBody().get('by_voice_code')} data_login = { "code": DoLoginOut().getUser().get('password'), "phone": DoLoginOut().getUser().get('phone'), "registerFrom": DoLoginOut().getBody().get('registerFrom'), "terminalVersion":DoLoginOut().getBody().get('terminalVersion'), "os_type": DoLoginOut().getBody().get('os_type'), "clientType": DoLoginOut().getBody().get('clientType') } res_code = requests.post(base_url_re+DoLoginOut().getUrl().get('getCode'), data=json.dumps(data_code), headers=DoLoginOut().getHeaders()) res_login = requests.post(base_url_re+DoLoginOut().getUrl().get('login'), data=json.dumps(data_login), headers=DoLoginOut().getHeaders()) return res_login.json() class TokenSet: def getToken(self): """ 获取全局变量 access_token :return: """ re = DoLoginOut().login() access_token = re['data'].get('access_token') return access_token def getCustomerId(self): """ 获取全局变量 customerId :return: """ re = DoLoginOut().login() customerId = re['data'].get('customerId') return customerId def getUnionId(self): """ 获取全局变量 union_id :return: """ re = DoLoginOut().login() union_id = re['data'].get('union_id') return union_id class GetToken: """ 设置三个全局变量,供所有class使用 """ global access_token, customerId, union_id access_token = TokenSet().getToken() customerId = TokenSet().getCustomerId() union_id = TokenSet().getUnionId() print(access_token) print(customerId) print(union_id) if __name__ == '__main__': re = DoLoginOut().login() print(re)
[ 1, 1053, 2897, 13, 5215, 4390, 13, 5215, 7274, 13, 3166, 3619, 29889, 1867, 3991, 1053, 3617, 3401, 13, 13, 13, 1990, 1938, 11049, 3744, 29901, 13, 13, 1678, 822, 679, 5983, 29898, 1311, 1125, 13, 4706, 9995, 13, 308, 31594, 31361, 30669, 30333, 30631, 30275, 31092, 30856, 2271, 13, 4706, 584, 2457, 29901, 29871, 31092, 30856, 2271, 13, 4706, 9995, 13, 4706, 274, 29888, 353, 3617, 3401, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 718, 5591, 2917, 29914, 1792, 29918, 3888, 29889, 16859, 1159, 13, 4706, 2967, 29918, 13248, 353, 274, 29888, 29889, 657, 29918, 3888, 29918, 1454, 29918, 3597, 877, 23845, 29943, 11538, 1495, 13, 4706, 736, 2967, 29918, 13248, 13, 13, 1678, 822, 679, 18163, 29898, 1311, 1125, 13, 4706, 9995, 13, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 274, 29888, 353, 3617, 3401, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 718, 5591, 2917, 29914, 1792, 29918, 3888, 29889, 16859, 1159, 13, 4706, 2967, 29918, 13662, 353, 274, 29888, 29889, 657, 29918, 3888, 29918, 1454, 29918, 3597, 877, 23252, 23598, 1495, 13, 4706, 736, 29871, 2967, 29918, 13662, 13, 13, 1678, 822, 679, 2659, 29898, 1311, 1125, 13, 4706, 9995, 13, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 274, 29888, 353, 3617, 3401, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 718, 5591, 2917, 29914, 1792, 29918, 3888, 29889, 16859, 1159, 13, 4706, 1404, 29918, 3888, 353, 274, 29888, 29889, 657, 29918, 3888, 29918, 1454, 29918, 3597, 877, 11889, 29918, 11690, 1495, 13, 4706, 736, 1404, 29918, 3888, 13, 13, 1678, 822, 679, 8434, 29898, 1311, 1125, 13, 4706, 9995, 13, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 274, 29888, 353, 3617, 3401, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 718, 5591, 2917, 29914, 1792, 29918, 3888, 29889, 16859, 1159, 13, 4706, 3573, 353, 274, 29888, 29889, 657, 29918, 3888, 29918, 1454, 29918, 3597, 877, 8456, 29928, 29979, 1495, 13, 4706, 736, 3573, 13, 13, 1678, 822, 6464, 29898, 1311, 1125, 13, 4706, 9995, 13, 308, 29896, 29889, 31024, 30683, 236, 173, 143, 235, 178, 132, 31183, 13, 308, 29906, 29889, 31451, 31283, 13, 4706, 584, 2457, 29901, 31086, 30742, 3126, 13, 4706, 9995, 13, 4706, 396, 29871, 31594, 31361, 30669, 30333, 30631, 30275, 235, 178, 190, 30683, 3069, 13, 4706, 274, 29888, 353, 3617, 3401, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 4961, 718, 5591, 2917, 29914, 6272, 29918, 3888, 29889, 16859, 1159, 13, 4706, 2967, 29918, 2271, 353, 274, 29888, 29889, 657, 29918, 3888, 29918, 1454, 29918, 3597, 877, 18267, 29918, 20832, 1495, 13, 4706, 2967, 29918, 2271, 29918, 276, 353, 2967, 29918, 2271, 29889, 657, 877, 29888, 10702, 29918, 932, 29918, 3069, 29918, 29883, 1495, 13, 13, 4706, 396, 2271, 13, 4706, 848, 29918, 401, 353, 426, 13, 462, 4706, 376, 6710, 1115, 1938, 11049, 3744, 2141, 657, 2659, 2141, 657, 877, 6710, 5477, 13, 462, 4706, 376, 1853, 1115, 1938, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 1853, 5477, 13, 462, 4706, 376, 1609, 29918, 14917, 29918, 401, 1115, 1938, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 1609, 29918, 14917, 29918, 401, 1495, 29913, 13, 4706, 848, 29918, 7507, 353, 426, 13, 462, 4706, 376, 401, 1115, 1938, 11049, 3744, 2141, 657, 2659, 2141, 657, 877, 5630, 5477, 13, 462, 4706, 376, 6710, 1115, 1938, 11049, 3744, 2141, 657, 2659, 2141, 657, 877, 6710, 5477, 13, 462, 4706, 376, 9573, 4591, 1115, 1938, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 9573, 4591, 5477, 13, 462, 4706, 376, 8489, 979, 6594, 1115, 6132, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 8489, 979, 6594, 5477, 13, 462, 4706, 376, 359, 29918, 1853, 1115, 1938, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 359, 29918, 1853, 5477, 13, 462, 4706, 376, 4645, 1542, 1115, 1938, 11049, 3744, 2141, 657, 8434, 2141, 657, 877, 4645, 1542, 1495, 13, 462, 1678, 500, 13, 4706, 620, 29918, 401, 353, 7274, 29889, 2490, 29898, 3188, 29918, 2271, 29918, 276, 29974, 6132, 11049, 3744, 2141, 657, 5983, 2141, 657, 877, 657, 3399, 5477, 848, 29922, 3126, 29889, 29881, 17204, 29898, 1272, 29918, 401, 511, 9066, 29922, 6132, 11049, 3744, 2141, 657, 18163, 3101, 13, 4706, 620, 29918, 7507, 353, 7274, 29889, 2490, 29898, 3188, 29918, 2271, 29918, 276, 29974, 6132, 11049, 3744, 2141, 657, 5983, 2141, 657, 877, 7507, 5477, 848, 29922, 3126, 29889, 29881, 17204, 29898, 1272, 29918, 7507, 511, 9066, 29922, 6132, 11049, 3744, 2141, 657, 18163, 3101, 13, 13, 4706, 736, 620, 29918, 7507, 29889, 3126, 580, 13, 13, 1990, 25159, 2697, 29901, 13, 13, 1678, 822, 679, 6066, 29898, 1311, 1125, 13, 4706, 9995, 13, 308, 31024, 30683, 30753, 31655, 31462, 31180, 2130, 29918, 6979, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 337, 353, 1938, 11049, 3744, 2141, 7507, 580, 13, 4706, 2130, 29918, 6979, 353, 337, 1839, 1272, 13359, 657, 877, 5943, 29918, 6979, 1495, 13, 4706, 736, 2130, 29918, 6979, 13, 13, 1678, 822, 679, 15122, 1204, 29898, 1311, 1125, 13, 4706, 9995, 13, 308, 31024, 30683, 30753, 31655, 31462, 31180, 11962, 1204, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 337, 353, 1938, 11049, 3744, 2141, 7507, 580, 13, 4706, 11962, 1204, 353, 337, 1839, 1272, 13359, 657, 877, 15539, 1204, 1495, 13, 4706, 736, 11962, 1204, 13, 13, 1678, 822, 679, 19986, 1204, 29898, 1311, 1125, 13, 4706, 9995, 13, 308, 31024, 30683, 30753, 31655, 31462, 31180, 9833, 29918, 333, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 337, 353, 1938, 11049, 3744, 2141, 7507, 580, 13, 4706, 9833, 29918, 333, 353, 337, 1839, 1272, 13359, 657, 877, 13094, 29918, 333, 1495, 13, 4706, 736, 9833, 29918, 333, 13, 13, 1990, 3617, 6066, 29901, 13, 1678, 9995, 13, 268, 30872, 30669, 30457, 30502, 30753, 31655, 31462, 31180, 30214, 231, 193, 158, 30744, 30417, 1990, 30785, 30406, 13, 1678, 9995, 13, 1678, 5534, 2130, 29918, 6979, 29892, 11962, 1204, 29892, 9833, 29918, 333, 13, 1678, 2130, 29918, 6979, 353, 25159, 2697, 2141, 657, 6066, 580, 13, 1678, 11962, 1204, 353, 25159, 2697, 2141, 657, 15122, 1204, 580, 13, 1678, 9833, 29918, 333, 353, 25159, 2697, 2141, 657, 19986, 1204, 580, 13, 1678, 1596, 29898, 5943, 29918, 6979, 29897, 13, 1678, 1596, 29898, 15539, 1204, 29897, 13, 1678, 1596, 29898, 13094, 29918, 333, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 337, 353, 1938, 11049, 3744, 2141, 7507, 580, 13, 1678, 1596, 29898, 276, 29897, 13, 13, 2 ]
tests/test_experiments/test_n3_base_no_slash_after_colon.py
octadocs/octadocs
1
75197
""" Test for GitHub issue: https://github.com/RDFLib/rdflib/issues/1216 """ import pytest import rdflib from octadocs.types import LOCAL DOCUMENT = f""" @base <{LOCAL}> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . <class_to_class> a rdfs:Class , <Category> ; <color> "blue" ; <priority> 4 . """ @pytest.mark.skip('https://github.com/RDFLib/rdflib/issues/1216') def test_no_slash_after_colon(): """Test @base directive with no slash after colon.""" graph = rdflib.ConjunctiveGraph() graph.parse( data=DOCUMENT, format='n3', ) # Raises ValueError: # Base <LOCAL> has no slash after colon - with relative 'class_to_class'.
[ 1, 9995, 13, 3057, 363, 25492, 2228, 29901, 2045, 597, 3292, 29889, 510, 29914, 29934, 4037, 14868, 29914, 29878, 2176, 1982, 29914, 12175, 29914, 29896, 29906, 29896, 29953, 13, 15945, 29908, 13, 5215, 11451, 1688, 13, 5215, 364, 2176, 1982, 13, 3166, 4725, 328, 12332, 29889, 8768, 1053, 11247, 29907, 1964, 13, 13, 28665, 5005, 3919, 353, 285, 15945, 29908, 13, 29992, 3188, 529, 29912, 16652, 1964, 17428, 869, 13, 29992, 13506, 364, 29069, 29901, 529, 1124, 597, 1636, 29889, 29893, 29941, 29889, 990, 29914, 29906, 29900, 29900, 29900, 29914, 29900, 29896, 29914, 29878, 2176, 29899, 11010, 29937, 29958, 869, 13, 13, 29966, 1990, 29918, 517, 29918, 1990, 29958, 13, 29871, 263, 13, 1678, 364, 29069, 29901, 2385, 1919, 13, 1678, 529, 10900, 29958, 2056, 13, 13, 29871, 529, 2780, 29958, 376, 9539, 29908, 2056, 13, 29871, 529, 29886, 21766, 29958, 29871, 29946, 869, 13, 15945, 29908, 13, 13, 13, 29992, 2272, 1688, 29889, 3502, 29889, 11014, 877, 991, 597, 3292, 29889, 510, 29914, 29934, 4037, 14868, 29914, 29878, 2176, 1982, 29914, 12175, 29914, 29896, 29906, 29896, 29953, 1495, 13, 1753, 1243, 29918, 1217, 29918, 17057, 29918, 7045, 29918, 17308, 7295, 13, 1678, 9995, 3057, 732, 3188, 17041, 411, 694, 24765, 1156, 8104, 1213, 15945, 13, 1678, 3983, 353, 364, 2176, 1982, 29889, 1168, 29926, 18049, 573, 9527, 580, 13, 1678, 3983, 29889, 5510, 29898, 13, 4706, 848, 29922, 28665, 5005, 3919, 29892, 13, 4706, 3402, 2433, 29876, 29941, 742, 13, 1678, 1723, 13, 13, 1678, 396, 390, 1759, 267, 7865, 2392, 29901, 13, 1678, 396, 259, 7399, 529, 16652, 1964, 29958, 756, 694, 24765, 1156, 8104, 448, 411, 6198, 525, 1990, 29918, 517, 29918, 1990, 4286, 13, 2 ]
backend/plugins/bs4_spacer/models.py
Guanch1/rep1
20
170409
from cms.models.pluginmodel import CMSPlugin from django.db import models class VerticalSpacerPlugin(CMSPlugin): smart_space = models.PositiveIntegerField( "Default Space", default=0, help_text="in px, for desktop, height on other devices is calculated automatically", ) space_xs = models.PositiveIntegerField( "All screens (default value)", default=0, help_text="in px for extra small screens and above", blank=True, null=True, ) space_sm = models.PositiveIntegerField( "small screens and above", help_text="in px for small screens and above", blank=True, null=True, ) space_md = models.PositiveIntegerField( "medium screens and above", help_text="in px for medium screens and above", blank=True, null=True, ) space_lg = models.PositiveIntegerField( "large screens and above", help_text="in px for large screens and above", blank=True, null=True, ) space_xl = models.PositiveIntegerField( "very large screens", help_text="in px for extra large screens", blank=True, null=True ) def has_advanced_settings(self): # 0 doesnt count return self.space_xs or self.space_sm or self.space_md or self.space_lg or self.space_xl def __str__(self): return "smart {}, xs {}, sm {}, md {}, lg {}, xl {}".format( self.smart_space, self.space_xs, self.space_sm, self.space_md, self.space_lg, self.space_xl, )
[ 1, 515, 274, 1516, 29889, 9794, 29889, 8582, 4299, 1053, 315, 4345, 16288, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 13, 13, 1990, 11198, 936, 5592, 562, 261, 16288, 29898, 29907, 4345, 16288, 1125, 13, 1678, 15040, 29918, 3493, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 4592, 14121, 613, 13, 4706, 2322, 29922, 29900, 29892, 13, 4706, 1371, 29918, 726, 543, 262, 282, 29916, 29892, 363, 14616, 29892, 3171, 373, 916, 9224, 338, 12833, 6336, 613, 13, 1678, 1723, 13, 13, 1678, 2913, 29918, 10351, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 3596, 11844, 313, 4381, 995, 19123, 13, 4706, 2322, 29922, 29900, 29892, 13, 4706, 1371, 29918, 726, 543, 262, 282, 29916, 363, 4805, 2319, 11844, 322, 2038, 613, 13, 4706, 9654, 29922, 5574, 29892, 13, 4706, 1870, 29922, 5574, 29892, 13, 1678, 1723, 13, 1678, 2913, 29918, 3844, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 9278, 11844, 322, 2038, 613, 13, 4706, 1371, 29918, 726, 543, 262, 282, 29916, 363, 2319, 11844, 322, 2038, 613, 13, 4706, 9654, 29922, 5574, 29892, 13, 4706, 1870, 29922, 5574, 29892, 13, 1678, 1723, 13, 1678, 2913, 29918, 3487, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 27891, 11844, 322, 2038, 613, 13, 4706, 1371, 29918, 726, 543, 262, 282, 29916, 363, 18350, 11844, 322, 2038, 613, 13, 4706, 9654, 29922, 5574, 29892, 13, 4706, 1870, 29922, 5574, 29892, 13, 1678, 1723, 13, 1678, 2913, 29918, 19920, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 16961, 11844, 322, 2038, 613, 13, 4706, 1371, 29918, 726, 543, 262, 282, 29916, 363, 2919, 11844, 322, 2038, 613, 13, 4706, 9654, 29922, 5574, 29892, 13, 4706, 1870, 29922, 5574, 29892, 13, 1678, 1723, 13, 1678, 2913, 29918, 15524, 353, 4733, 29889, 9135, 3321, 7798, 3073, 29898, 13, 4706, 376, 1201, 2919, 11844, 613, 1371, 29918, 726, 543, 262, 282, 29916, 363, 4805, 2919, 11844, 613, 9654, 29922, 5574, 29892, 1870, 29922, 5574, 13, 1678, 1723, 13, 13, 1678, 822, 756, 29918, 328, 16858, 29918, 11027, 29898, 1311, 1125, 13, 4706, 396, 29871, 29900, 19403, 2302, 13, 4706, 736, 1583, 29889, 3493, 29918, 10351, 470, 1583, 29889, 3493, 29918, 3844, 470, 1583, 29889, 3493, 29918, 3487, 470, 1583, 29889, 3493, 29918, 19920, 470, 1583, 29889, 3493, 29918, 15524, 13, 13, 1678, 822, 4770, 710, 12035, 1311, 1125, 13, 4706, 736, 376, 3844, 442, 24335, 14492, 24335, 1560, 24335, 22821, 24335, 301, 29887, 24335, 921, 29880, 6571, 1642, 4830, 29898, 13, 9651, 1583, 29889, 3844, 442, 29918, 3493, 29892, 13, 9651, 1583, 29889, 3493, 29918, 10351, 29892, 13, 9651, 1583, 29889, 3493, 29918, 3844, 29892, 13, 9651, 1583, 29889, 3493, 29918, 3487, 29892, 13, 9651, 1583, 29889, 3493, 29918, 19920, 29892, 13, 9651, 1583, 29889, 3493, 29918, 15524, 29892, 13, 4706, 1723, 13, 2 ]
polyaxon/scheduler/job_scheduler.py
wbuchwalter/polyaxon
0
78544
<filename>polyaxon/scheduler/job_scheduler.py<gh_stars>0 import logging from kubernetes.client.rest import ApiException from django.conf import settings from constants.jobs import JobLifeCycle from docker_images.image_info import get_image_info from libs.paths.exceptions import VolumeNotFoundError from polyaxon.config_manager import config from scheduler.spawners.job_spawner import JobSpawner from scheduler.spawners.utils import get_job_definition _logger = logging.getLogger('polyaxon.scheduler.notebook') def start_job(job): # Update job status to show that its started job.set_status(JobLifeCycle.SCHEDULED) try: image_name, image_tag = get_image_info(build_job=job.build_job) except ValueError as e: _logger.warning('Could not start the job, %s', e) job.set_status(JobLifeCycle.FAILED, message='External git repo was note found.') return job_docker_image = '{}:{}'.format(image_name, image_tag) _logger.info('Start job with built image `%s`', job_docker_image) spawner = JobSpawner( project_name=job.project.unique_name, project_uuid=job.project.uuid.hex, job_name=job.unique_name, job_uuid=job.uuid.hex, spec=job.specification, k8s_config=settings.K8S_CONFIG, namespace=settings.K8S_NAMESPACE, job_docker_image=job_docker_image, in_cluster=True, use_sidecar=True, sidecar_config=config.get_requested_params(to_str=True)) try: results = spawner.start_job(persistence_data=job.persistence_data, persistence_outputs=job.persistence_outputs, outputs_refs_jobs=job.outputs_refs_jobs, outputs_refs_experiments=job.outputs_refs_experiments, resources=job.resources, node_selectors=job.node_selectors) except ApiException as e: _logger.warning('Could not start job, please check your polyaxon spec %s', e) job.set_status( JobLifeCycle.FAILED, message='Could not start job, encountered a Kubernetes ApiException.') return except VolumeNotFoundError as e: _logger.warning('Could not start the job, please check your volume definitions %s', e) job.set_status( JobLifeCycle.FAILED, message='Could not start the job, ' 'encountered a volume definition problem. %s' % e) return False except Exception as e: _logger.warning('Could not start job, please check your polyaxon spec %s', e) job.set_status( JobLifeCycle.FAILED, message='Could not start job encountered an {} exception.'.format( e.__class__.__name__ )) return job.definition = get_job_definition(results) job.save() def stop_job(project_name, project_uuid, job_name, job_uuid, specification): spawner = JobSpawner( project_name=project_name, project_uuid=project_uuid, job_name=job_name, job_uuid=job_uuid, spec=specification, k8s_config=settings.K8S_CONFIG, namespace=settings.K8S_NAMESPACE, in_cluster=True) spawner.stop_job()
[ 1, 529, 9507, 29958, 22678, 1165, 265, 29914, 816, 14952, 29914, 9057, 29918, 816, 14952, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12183, 13, 13, 3166, 413, 17547, 29889, 4645, 29889, 5060, 1053, 29749, 2451, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 3166, 17727, 29889, 9057, 29879, 1053, 17163, 26754, 29907, 13317, 13, 3166, 10346, 29918, 8346, 29889, 3027, 29918, 3888, 1053, 679, 29918, 3027, 29918, 3888, 13, 3166, 4303, 29879, 29889, 24772, 29889, 11739, 29879, 1053, 16934, 17413, 2392, 13, 3166, 15680, 1165, 265, 29889, 2917, 29918, 12847, 1053, 2295, 13, 3166, 1364, 14952, 29889, 1028, 18101, 414, 29889, 9057, 29918, 1028, 1450, 1089, 1053, 17163, 5592, 1450, 1089, 13, 3166, 1364, 14952, 29889, 1028, 18101, 414, 29889, 13239, 1053, 679, 29918, 9057, 29918, 16553, 13, 13, 29918, 21707, 353, 12183, 29889, 657, 16363, 877, 22678, 1165, 265, 29889, 816, 14952, 29889, 1333, 19273, 1495, 13, 13, 13, 1753, 1369, 29918, 9057, 29898, 9057, 1125, 13, 1678, 396, 10318, 4982, 4660, 304, 1510, 393, 967, 4687, 13, 1678, 4982, 29889, 842, 29918, 4882, 29898, 11947, 26754, 29907, 13317, 29889, 29903, 3210, 3352, 29965, 20566, 29897, 13, 13, 1678, 1018, 29901, 13, 4706, 1967, 29918, 978, 29892, 1967, 29918, 4039, 353, 679, 29918, 3027, 29918, 3888, 29898, 4282, 29918, 9057, 29922, 9057, 29889, 4282, 29918, 9057, 29897, 13, 1678, 5174, 7865, 2392, 408, 321, 29901, 13, 4706, 903, 21707, 29889, 27392, 877, 23323, 451, 1369, 278, 4982, 29892, 1273, 29879, 742, 321, 29897, 13, 4706, 4982, 29889, 842, 29918, 4882, 29898, 11947, 26754, 29907, 13317, 29889, 4519, 29902, 20566, 29892, 2643, 2433, 25865, 6315, 13761, 471, 4443, 1476, 29889, 1495, 13, 4706, 736, 13, 1678, 4982, 29918, 14695, 29918, 3027, 353, 22372, 6177, 8875, 4286, 4830, 29898, 3027, 29918, 978, 29892, 1967, 29918, 4039, 29897, 13, 1678, 903, 21707, 29889, 3888, 877, 4763, 4982, 411, 4240, 1967, 22570, 29879, 29952, 742, 4982, 29918, 14695, 29918, 3027, 29897, 13, 13, 1678, 805, 1450, 1089, 353, 17163, 5592, 1450, 1089, 29898, 13, 4706, 2060, 29918, 978, 29922, 9057, 29889, 4836, 29889, 13092, 29918, 978, 29892, 13, 4706, 2060, 29918, 25118, 29922, 9057, 29889, 4836, 29889, 25118, 29889, 20970, 29892, 13, 4706, 4982, 29918, 978, 29922, 9057, 29889, 13092, 29918, 978, 29892, 13, 4706, 4982, 29918, 25118, 29922, 9057, 29889, 25118, 29889, 20970, 29892, 13, 4706, 1580, 29922, 9057, 29889, 6550, 2450, 29892, 13, 4706, 413, 29947, 29879, 29918, 2917, 29922, 11027, 29889, 29968, 29947, 29903, 29918, 25903, 29892, 13, 4706, 7397, 29922, 11027, 29889, 29968, 29947, 29903, 29918, 5813, 5550, 11538, 29892, 13, 4706, 4982, 29918, 14695, 29918, 3027, 29922, 9057, 29918, 14695, 29918, 3027, 29892, 13, 4706, 297, 29918, 19594, 29922, 5574, 29892, 13, 4706, 671, 29918, 2975, 4287, 29922, 5574, 29892, 13, 4706, 2625, 4287, 29918, 2917, 29922, 2917, 29889, 657, 29918, 3827, 287, 29918, 7529, 29898, 517, 29918, 710, 29922, 5574, 876, 13, 13, 1678, 1018, 29901, 13, 4706, 2582, 353, 805, 1450, 1089, 29889, 2962, 29918, 9057, 29898, 28249, 29918, 1272, 29922, 9057, 29889, 28249, 29918, 1272, 29892, 13, 462, 462, 1678, 3736, 11416, 29918, 4905, 29879, 29922, 9057, 29889, 28249, 29918, 4905, 29879, 29892, 13, 462, 462, 1678, 14391, 29918, 24539, 29918, 9057, 29879, 29922, 9057, 29889, 4905, 29879, 29918, 24539, 29918, 9057, 29879, 29892, 13, 462, 462, 1678, 14391, 29918, 24539, 29918, 735, 546, 7862, 29922, 9057, 29889, 4905, 29879, 29918, 24539, 29918, 735, 546, 7862, 29892, 13, 462, 462, 1678, 7788, 29922, 9057, 29889, 13237, 29892, 13, 462, 462, 1678, 2943, 29918, 2622, 943, 29922, 9057, 29889, 3177, 29918, 2622, 943, 29897, 13, 1678, 5174, 29749, 2451, 408, 321, 29901, 13, 4706, 903, 21707, 29889, 27392, 877, 23323, 451, 1369, 4982, 29892, 3113, 1423, 596, 15680, 1165, 265, 1580, 1273, 29879, 742, 321, 29897, 13, 4706, 4982, 29889, 842, 29918, 4882, 29898, 13, 9651, 17163, 26754, 29907, 13317, 29889, 4519, 29902, 20566, 29892, 13, 9651, 2643, 2433, 23323, 451, 1369, 4982, 29892, 18169, 263, 476, 17547, 29749, 2451, 29889, 1495, 13, 4706, 736, 13, 1678, 5174, 16934, 17413, 2392, 408, 321, 29901, 13, 4706, 903, 21707, 29889, 27392, 877, 23323, 451, 1369, 278, 4982, 29892, 3113, 1423, 596, 7977, 15848, 1273, 29879, 742, 321, 29897, 13, 4706, 4982, 29889, 842, 29918, 4882, 29898, 13, 9651, 17163, 26754, 29907, 13317, 29889, 4519, 29902, 20566, 29892, 13, 9651, 2643, 2433, 23323, 451, 1369, 278, 4982, 29892, 525, 13, 462, 1678, 525, 3977, 5336, 287, 263, 7977, 5023, 1108, 29889, 1273, 29879, 29915, 1273, 321, 29897, 13, 4706, 736, 7700, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 903, 21707, 29889, 27392, 877, 23323, 451, 1369, 4982, 29892, 3113, 1423, 596, 15680, 1165, 265, 1580, 1273, 29879, 742, 321, 29897, 13, 4706, 4982, 29889, 842, 29918, 4882, 29898, 13, 9651, 17163, 26754, 29907, 13317, 29889, 4519, 29902, 20566, 29892, 13, 9651, 2643, 2433, 23323, 451, 1369, 4982, 18169, 385, 6571, 3682, 29889, 4286, 4830, 29898, 13, 18884, 321, 17255, 1990, 1649, 17255, 978, 1649, 13, 632, 876, 13, 4706, 736, 13, 1678, 4982, 29889, 16553, 353, 679, 29918, 9057, 29918, 16553, 29898, 9902, 29897, 13, 1678, 4982, 29889, 7620, 580, 13, 13, 13, 1753, 5040, 29918, 9057, 29898, 4836, 29918, 978, 29892, 2060, 29918, 25118, 29892, 4982, 29918, 978, 29892, 4982, 29918, 25118, 29892, 21992, 1125, 13, 1678, 805, 1450, 1089, 353, 17163, 5592, 1450, 1089, 29898, 13, 4706, 2060, 29918, 978, 29922, 4836, 29918, 978, 29892, 13, 4706, 2060, 29918, 25118, 29922, 4836, 29918, 25118, 29892, 13, 4706, 4982, 29918, 978, 29922, 9057, 29918, 978, 29892, 13, 4706, 4982, 29918, 25118, 29922, 9057, 29918, 25118, 29892, 13, 4706, 1580, 29922, 6550, 2450, 29892, 13, 4706, 413, 29947, 29879, 29918, 2917, 29922, 11027, 29889, 29968, 29947, 29903, 29918, 25903, 29892, 13, 4706, 7397, 29922, 11027, 29889, 29968, 29947, 29903, 29918, 5813, 5550, 11538, 29892, 13, 4706, 297, 29918, 19594, 29922, 5574, 29897, 13, 13, 1678, 805, 1450, 1089, 29889, 9847, 29918, 9057, 580, 13, 2 ]
backend/medico/urls.py
danizavtz/desafiodrf
0
95319
<filename>backend/medico/urls.py from django.urls import include, path from rest_framework import routers from .views import MedicoViewSet, EspecialidadeViewSet router = routers.DefaultRouter() router.register(r'medicos', MedicoViewSet, basename='medicos') router.register(r'especialidades', EspecialidadeViewSet, basename='especialidades') urlpatterns = [ path(r'', include(router.urls)), ]
[ 1, 529, 9507, 29958, 27852, 29914, 2168, 1417, 29914, 26045, 29889, 2272, 13, 3166, 9557, 29889, 26045, 1053, 3160, 29892, 2224, 13, 3166, 1791, 29918, 4468, 1053, 16053, 2153, 13, 3166, 869, 7406, 1053, 3436, 1417, 1043, 2697, 29892, 3423, 412, 1455, 5558, 1043, 2697, 13, 13, 15140, 353, 16053, 2153, 29889, 4592, 23971, 580, 13, 15140, 29889, 9573, 29898, 29878, 29915, 2168, 4869, 742, 3436, 1417, 1043, 2697, 29892, 2362, 3871, 2433, 2168, 4869, 1495, 13, 15140, 29889, 9573, 29898, 29878, 29915, 267, 412, 1455, 7305, 742, 3423, 412, 1455, 5558, 1043, 2697, 29892, 2362, 3871, 2433, 267, 412, 1455, 7305, 1495, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 29898, 29878, 29915, 742, 3160, 29898, 15140, 29889, 26045, 8243, 13, 29962, 2 ]
features/steps/running.py
lstephen/construi
27
94355
import contextlib import os import re import shlex import subprocess from behave import * ANSI_ESCAPE = re.compile(r"\x1B\[[0-?]*[ -/]*[@-~]") def strip_ansi_codes(inp): return ANSI_ESCAPE.sub("", inp) @contextlib.contextmanager def pushd(new_dir): old_dir = os.getcwd() os.chdir(new_dir) yield os.chdir(old_dir) @given("a {file_name} file") def create_file(context, file_name): with pushd(context.working_directory): with open(file_name, "w") as f: f.write(context.text) @when("running {command}") def running(context, command): with pushd(context.working_directory): try: output = subprocess.check_output( shlex.split(command), stderr=subprocess.STDOUT ) context.exit_code = 0 except subprocess.CalledProcessError as err: output = err.output context.exit_code = err.returncode if isinstance(output, bytes): output = output.decode("utf-8") context.output = output @then("it has an exit code of {exit_code:d}") def exits_with(context, exit_code): assert context.exit_code == exit_code, "Expected: %d. Got %d. Output was: %s" % ( exit_code, context.exit_code, context.output, ) @then("it outputs the version") def outputs_version(context): with open("VERSION") as v: expected_version = v.read() assert context.output == expected_version, "Expected: '%s'. Got: '%s'." % ( expected_version, context.output, ) @then("the output is") @then("it outputs") def outputs(context): output = strip_ansi_codes(context.output) assert output == context.text, "Expected: '%s'. Got: '%s'." % (context.text, output) @then("the output contains") def output_contains(context): output = strip_ansi_codes(context.output) assert context.text in output, "Expected '%s' to contain '%s'." % ( output, context.text, ) @then("the output contains only once") def output_contains(context): output = strip_ansi_codes(context.output) needle = context.text idx = output.find(needle) assert idx > 0, "Expected '%s' to contain '%s'." % (output, needle) assert ( output[idx + 1 :].find(needle) < 0 ), "Expected '%s' to contain only once '%s'." % (output, needle)
[ 1, 1053, 3030, 1982, 13, 5215, 2897, 13, 5215, 337, 13, 5215, 528, 2506, 13, 5215, 1014, 5014, 13, 13, 3166, 23389, 1053, 334, 13, 13, 2190, 5425, 29918, 2890, 29907, 3301, 29923, 353, 337, 29889, 12198, 29898, 29878, 26732, 29916, 29896, 29933, 29905, 8999, 29900, 29899, 29973, 14178, 29961, 448, 29914, 14178, 17548, 29899, 30022, 29962, 1159, 13, 13, 13, 1753, 17820, 29918, 550, 29875, 29918, 18137, 29898, 262, 29886, 1125, 13, 1678, 736, 319, 3059, 29902, 29918, 2890, 29907, 3301, 29923, 29889, 1491, 703, 613, 297, 29886, 29897, 13, 13, 13, 29992, 4703, 1982, 29889, 4703, 12847, 13, 1753, 5503, 29881, 29898, 1482, 29918, 3972, 1125, 13, 1678, 2030, 29918, 3972, 353, 2897, 29889, 657, 29883, 9970, 580, 13, 1678, 2897, 29889, 305, 3972, 29898, 1482, 29918, 3972, 29897, 13, 1678, 7709, 13, 1678, 2897, 29889, 305, 3972, 29898, 1025, 29918, 3972, 29897, 13, 13, 13, 29992, 29887, 5428, 703, 29874, 426, 1445, 29918, 978, 29913, 934, 1159, 13, 1753, 1653, 29918, 1445, 29898, 4703, 29892, 934, 29918, 978, 1125, 13, 1678, 411, 5503, 29881, 29898, 4703, 29889, 22899, 29918, 12322, 1125, 13, 4706, 411, 1722, 29898, 1445, 29918, 978, 29892, 376, 29893, 1159, 408, 285, 29901, 13, 9651, 285, 29889, 3539, 29898, 4703, 29889, 726, 29897, 13, 13, 13, 29992, 8256, 703, 21094, 426, 6519, 27195, 13, 1753, 2734, 29898, 4703, 29892, 1899, 1125, 13, 1678, 411, 5503, 29881, 29898, 4703, 29889, 22899, 29918, 12322, 1125, 13, 4706, 1018, 29901, 13, 9651, 1962, 353, 1014, 5014, 29889, 3198, 29918, 4905, 29898, 13, 18884, 528, 2506, 29889, 5451, 29898, 6519, 511, 380, 20405, 29922, 1491, 5014, 29889, 1254, 3970, 2692, 13, 9651, 1723, 13, 9651, 3030, 29889, 13322, 29918, 401, 353, 29871, 29900, 13, 13, 4706, 5174, 1014, 5014, 29889, 29907, 4212, 7032, 2392, 408, 4589, 29901, 13, 9651, 1962, 353, 4589, 29889, 4905, 13, 9651, 3030, 29889, 13322, 29918, 401, 353, 4589, 29889, 2457, 401, 13, 13, 4706, 565, 338, 8758, 29898, 4905, 29892, 6262, 1125, 13, 9651, 1962, 353, 1962, 29889, 13808, 703, 9420, 29899, 29947, 1159, 13, 13, 4706, 3030, 29889, 4905, 353, 1962, 13, 13, 13, 29992, 6098, 703, 277, 756, 385, 6876, 775, 310, 426, 13322, 29918, 401, 29901, 29881, 27195, 13, 1753, 429, 1169, 29918, 2541, 29898, 4703, 29892, 6876, 29918, 401, 1125, 13, 1678, 4974, 3030, 29889, 13322, 29918, 401, 1275, 6876, 29918, 401, 29892, 376, 1252, 6021, 29901, 1273, 29881, 29889, 15992, 1273, 29881, 29889, 10604, 471, 29901, 1273, 29879, 29908, 1273, 313, 13, 4706, 6876, 29918, 401, 29892, 13, 4706, 3030, 29889, 13322, 29918, 401, 29892, 13, 4706, 3030, 29889, 4905, 29892, 13, 1678, 1723, 13, 13, 13, 29992, 6098, 703, 277, 14391, 278, 1873, 1159, 13, 1753, 14391, 29918, 3259, 29898, 4703, 1125, 13, 1678, 411, 1722, 703, 16358, 1159, 408, 325, 29901, 13, 4706, 3806, 29918, 3259, 353, 325, 29889, 949, 580, 13, 13, 1678, 4974, 3030, 29889, 4905, 1275, 3806, 29918, 3259, 29892, 376, 1252, 6021, 29901, 14210, 29879, 4286, 15992, 29901, 14210, 29879, 29915, 1213, 1273, 313, 13, 4706, 3806, 29918, 3259, 29892, 13, 4706, 3030, 29889, 4905, 29892, 13, 1678, 1723, 13, 13, 13, 29992, 6098, 703, 1552, 1962, 338, 1159, 13, 29992, 6098, 703, 277, 14391, 1159, 13, 1753, 14391, 29898, 4703, 1125, 13, 1678, 1962, 353, 17820, 29918, 550, 29875, 29918, 18137, 29898, 4703, 29889, 4905, 29897, 13, 1678, 4974, 1962, 1275, 3030, 29889, 726, 29892, 376, 1252, 6021, 29901, 14210, 29879, 4286, 15992, 29901, 14210, 29879, 29915, 1213, 1273, 313, 4703, 29889, 726, 29892, 1962, 29897, 13, 13, 13, 29992, 6098, 703, 1552, 1962, 3743, 1159, 13, 1753, 1962, 29918, 11516, 29898, 4703, 1125, 13, 1678, 1962, 353, 17820, 29918, 550, 29875, 29918, 18137, 29898, 4703, 29889, 4905, 29897, 13, 1678, 4974, 3030, 29889, 726, 297, 1962, 29892, 376, 1252, 6021, 14210, 29879, 29915, 304, 1712, 14210, 29879, 29915, 1213, 1273, 313, 13, 4706, 1962, 29892, 13, 4706, 3030, 29889, 726, 29892, 13, 1678, 1723, 13, 13, 13, 29992, 6098, 703, 1552, 1962, 3743, 871, 2748, 1159, 13, 1753, 1962, 29918, 11516, 29898, 4703, 1125, 13, 1678, 1962, 353, 17820, 29918, 550, 29875, 29918, 18137, 29898, 4703, 29889, 4905, 29897, 13, 1678, 817, 280, 353, 3030, 29889, 726, 13, 13, 1678, 22645, 353, 1962, 29889, 2886, 29898, 26180, 280, 29897, 13, 13, 1678, 4974, 22645, 1405, 29871, 29900, 29892, 376, 1252, 6021, 14210, 29879, 29915, 304, 1712, 14210, 29879, 29915, 1213, 1273, 313, 4905, 29892, 817, 280, 29897, 13, 13, 1678, 4974, 313, 13, 4706, 1962, 29961, 13140, 718, 29871, 29896, 584, 1822, 2886, 29898, 26180, 280, 29897, 529, 29871, 29900, 13, 1678, 10353, 376, 1252, 6021, 14210, 29879, 29915, 304, 1712, 871, 2748, 14210, 29879, 29915, 1213, 1273, 313, 4905, 29892, 817, 280, 29897, 13, 2 ]
exercicios/ex 061 a 070/ex063.py
CarlosWillian/python
0
36319
print('Sequência de Fibonacci') print('='*24) t = int(input('Número de termos da sequência: ')) print('='*24) c = 3 termo1 = 0 termo2 = 1 print('A sequência é ({}, {}, '.format(termo1, termo2), end='') while c <= t: termo3 = termo1 + termo2 print('{}'.format(termo3), end='') print(', ' if c < t else '', end='') c += 1 termo1 = termo2 termo2 = termo3 print(')')
[ 1, 1596, 877, 16941, 10544, 316, 383, 747, 265, 21566, 1495, 13, 2158, 877, 2433, 29930, 29906, 29946, 29897, 13, 29873, 353, 938, 29898, 2080, 877, 29940, 30030, 1050, 29877, 316, 1840, 359, 1146, 8617, 10544, 29901, 525, 876, 13, 2158, 877, 2433, 29930, 29906, 29946, 29897, 13, 29883, 353, 29871, 29941, 13, 357, 4346, 29896, 353, 29871, 29900, 13, 357, 4346, 29906, 353, 29871, 29896, 13, 2158, 877, 29909, 8617, 10544, 904, 21313, 1118, 24335, 15300, 4830, 29898, 357, 4346, 29896, 29892, 1840, 29877, 29906, 511, 1095, 2433, 1495, 13, 8000, 274, 5277, 260, 29901, 13, 1678, 1840, 29877, 29941, 353, 1840, 29877, 29896, 718, 1840, 29877, 29906, 13, 1678, 1596, 877, 8875, 4286, 4830, 29898, 357, 4346, 29941, 511, 1095, 2433, 1495, 13, 1678, 1596, 29317, 525, 565, 274, 529, 260, 1683, 15516, 1095, 2433, 1495, 13, 1678, 274, 4619, 29871, 29896, 13, 1678, 1840, 29877, 29896, 353, 1840, 29877, 29906, 13, 1678, 1840, 29877, 29906, 353, 1840, 29877, 29941, 13, 2158, 877, 29897, 1495, 13, 2 ]
xpanse/api/assets/v2/ip_range.py
PaloAltoNetworks/cortex-xpanse-python-sdk
3
12173
<reponame>PaloAltoNetworks/cortex-xpanse-python-sdk<gh_stars>1-10 from typing import Any, Dict, List from xpanse.const import V2_PREFIX from xpanse.endpoint import ExEndpoint from xpanse.iterator import ExResultIterator class IpRangeEndpoint(ExEndpoint): """ Part of the Assets v2 API for handling IP Ranges. See: https://api.expander.expanse.co/api/v1/docs/ """ def list(self, **kwargs: Any) -> ExResultIterator: """ Returns the list of IP Ranges. Arguments should be passed as keyword args using the names below. Args: limit (int, optional): Returns at most this many results in a single api call. Default is 100, max is 10000. offset (int, optional): Returns results starting at this offset. Default is 0. sort (str, optional): Comma-separated string; orders results by the given fields. If the field name is prefixed by a -, then the ordering will be descending for that field. Use a dotted notation to order by fields that are nested. business_units (str, optional): Comma-separated string; Returns only results whose Business Unit's ID falls in the provided list. NOTE: If omitted, API will return results for all Business Units the user has permissions to view. Also, cannot be used with the business-unit-names parameter. business_unit_names (str, optional): Comma-separated string; Returns only results whose Business Unit's name falls in the provided list. NOTE: If omitted, API will return results for all Business Units the user has permissions to view. Also, cannot be used with the business-units parameter. inet (str, optional): Search for given IP/CIDR block using a single IP (d.d.d.d), a dashed IP range (d.d.d.d-d.d.d.d), a CIDR block (d.d.d.d/m), a partial CIDR (d.d.), or a wildcard (d.d.*.d). Returns only results whose [startAddress, endAddress] range overlap with the given IP Address or CIDR. tags (str, optional): Comma-separated string; Returns only results who are associated with the provided Tag IDs. Cannot be used with the tag-names parameter. tag_names (str, optional): Comma-separated string; Returns only results who are associated with the provided Tag names. Cannot be used with the tags parameter. include (str, optional): Comma-separated string; Include the provided fields as part of the serialized result. Allowed values are `annotations`, `severityCounts`, `attributionReasons`, `relatedRegistrationInformation`, `certDetails`, and `locationInformation` Returns: :obj:`ExResultIterator`: An iterator containing all of the ip_range results. Results can be iterated or called by page using `<iterator>.next()`. Examples: >>> # Return all ip ranges and print each range: >>> for res in client.assets.ip_range.v2.list(): ... for ip_r in res: ... print(ip_r) """ return ExResultIterator(self._api, f"{V2_PREFIX}/ip-range", kwargs) def get(self, id: str, **kwargs: Any) -> Dict[str, Any]: """ Returns the details for a given IP Range. Arguments should be passed as keyword args using the names below. Args: id (str): ID for the ip-range. Should be a UUID. include (str, optional): Comma-separated string; Include the provided fields as part of the serialized result. Returns: :obj:`dict`: A dictionary containing all of the details about an IP Range. Examples: >>> # Return IP Range with severity counts >>> my_range = client.assets.ip_range.v2.get(<id>, include="severityCounts") """ return self._api.get(f"{V2_PREFIX}/ip-range/{id}", params=kwargs).json() def create( self, startAddress: str, endAddress: str, parentId: str, **kwargs: Any ) -> Dict[str, Any]: """ Creates a new custom IP Range. NOTE: A validation error will be returned if the start and end addresses of the custom range do not fit within a top level range defined by Xpanse. Args: startAddress (str): Start address of custom ip-range. endAddress (str): End address of custom ip-range. parentId (str): Id of parent ip-range. tags (list, optional): A list of tag annotation names. additionalNotes (str, optional): Any additional notes about the custom ip-range. pointOfContactIds (list, optional): A lost of point-of-contact annotation ids. Returns: :obj:`dict`: A dictionary containing all of the details about the newly created, custom IP Range. Examples: >>> # Create a new ip-range under a parent range >>> new_range = client.assets.ip_range.v2.create("172.16.31.10", "172.16.17.32", "43a5a569-27b0-39b5-98f4-22b9885546d7", additionalNotes="Business Unit X - Marketing website hosts") """ payload: Dict[str, Any] = { "startAddress": startAddress, "endAddress": endAddress, "parentId": parentId, "annotations": {}, } if "tags" in kwargs: payload["annotations"]["tags"] = kwargs["tags"] if "additionalNotes" in kwargs: payload["annotations"]["additionalNotes"] = kwargs["additionalNotes"] if "pointOfContactIds" in kwargs: payload["annotations"]["pointOfContactIds"] = kwargs["pointOfContactIds"] return self._api.post(f"{V2_PREFIX}/ip-range", json=payload).json() def delete(self, id: str) -> bool: """ Delete the given IP Range, and all connections to other data. NOTE: This will only work for user-defined IP Ranges. Args: id (str): ID for the ip-range. Should be a UUID. Returns: :obj:`boolean`: `True` if the range was successfully deleted, otherwise `False`. Examples: >>> # Deletes a user defined range >>> client.assets.ip_range.v2.delete("43a5a569-27b0-39b5-98f4-22b9885546d7") """ return ( True if self._api.delete(f"{V2_PREFIX}/ip-range/{id}").status_code == 204 else False ) def update(self, id: str, **kwargs: Any) -> Dict[str, Any]: """ Allows the partial update of the given IP Range. Args: id (str): ID for the ip-range. Should be a UUID. startAddress (str, optional): Start address of custom ip-range. endAddress (str, optional): End address of custom ip-range. parentId (str, optional): Id of parent ip-range. tags (list, optional): A list of tag annotation ids. additionalNotes (str, optional): Any additional notes about the custom ip-range. pointOfContactIds (list, optional): A lost of point-of-contact annotation ids. Returns: :obj:`dict`: A dictionary containing all of the details about the updated, custom IP Range. Examples: >>> # Update an ip-range under a parent range >>> new_range = client.assets.ip_range.v2.update("43a5a569-27b0-39b5-98f4-22b9885546d7", additionalNotes="Business Unit X - Development Environment") """ payload = {} if "startAddress" in kwargs: payload["startAddress"] = kwargs["startAddress"] if "endAddress" in kwargs: payload["endAddress"] = kwargs["endAddress"] if "parentId" in kwargs: payload["parentId"] = kwargs["parentId"] if any( arg in ("tags", "additionalNotes", "pointOfContactIds") for arg in kwargs ): payload["annotations"] = {} if "tags" in kwargs: payload["annotations"]["tags"] = kwargs["tags"] if "additionalNotes" in kwargs: payload["annotations"]["additionalNotes"] = kwargs["additionalNotes"] if "pointOfContactIds" in kwargs: payload["annotations"]["pointOfContactIds"] = kwargs["pointOfContactIds"] return self._api.patch(f"{V2_PREFIX}/ip-range/{id}", json=payload).json() def tag(self, ranges: List[str], tags: List[str]) -> bool: """ Adds the provided tags to all of the specified ip ranges. If the any of the provided tags do not exist, they will be created. Args: ranges (list): A list of ip-range IDs. Should be UUIDs. tags (list): A list of tag annotation names to add to an ip-range. Returns: :obj:`boolean`: `True` if the ranges were tagged successfully, otherwise `False`. """ payload = {"ipRangeIds": ranges, "tags": tags} return self._api.post(f"{V2_PREFIX}/ip-range/tag", json=payload)
[ 1, 529, 276, 1112, 420, 29958, 29925, 7003, 2499, 517, 13724, 29879, 29914, 2616, 4776, 29899, 29916, 8357, 344, 29899, 4691, 29899, 15348, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 29892, 2391, 13, 13, 3166, 921, 8357, 344, 29889, 3075, 1053, 478, 29906, 29918, 15094, 25634, 13, 3166, 921, 8357, 344, 29889, 29734, 1053, 1222, 25602, 13, 3166, 921, 8357, 344, 29889, 17609, 1053, 1222, 3591, 20277, 13, 13, 13, 1990, 306, 29886, 6069, 25602, 29898, 1252, 25602, 1125, 13, 1678, 9995, 13, 1678, 3455, 310, 278, 1094, 7224, 325, 29906, 3450, 363, 11415, 5641, 390, 6916, 29889, 13, 1678, 2823, 29901, 2045, 597, 2754, 29889, 4548, 3825, 29889, 4548, 12350, 29889, 1111, 29914, 2754, 29914, 29894, 29896, 29914, 2640, 29914, 13, 1678, 9995, 13, 13, 1678, 822, 1051, 29898, 1311, 29892, 3579, 19290, 29901, 3139, 29897, 1599, 1222, 3591, 20277, 29901, 13, 4706, 9995, 13, 4706, 16969, 278, 1051, 310, 5641, 390, 6916, 29889, 11842, 9331, 881, 367, 4502, 408, 13553, 6389, 773, 13, 4706, 278, 2983, 2400, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 4046, 313, 524, 29892, 13136, 1125, 13, 18884, 16969, 472, 1556, 445, 1784, 2582, 297, 263, 2323, 7882, 1246, 29889, 13, 18884, 13109, 338, 29871, 29896, 29900, 29900, 29892, 4236, 338, 29871, 29896, 29900, 29900, 29900, 29900, 29889, 13, 9651, 9210, 313, 524, 29892, 13136, 1125, 13, 18884, 16969, 2582, 6257, 472, 445, 9210, 29889, 13, 18884, 13109, 338, 29871, 29900, 29889, 13, 9651, 2656, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 11299, 2582, 491, 278, 2183, 4235, 29889, 960, 278, 1746, 1024, 338, 13, 18884, 10944, 287, 491, 263, 448, 29892, 769, 278, 20520, 674, 367, 5153, 2548, 363, 393, 1746, 29889, 13, 18884, 4803, 263, 270, 15048, 12640, 304, 1797, 491, 4235, 393, 526, 9322, 29889, 13, 9651, 5381, 29918, 348, 1169, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 16969, 871, 2582, 5069, 15197, 13223, 29915, 29879, 3553, 20074, 297, 278, 4944, 1051, 29889, 13, 18884, 6058, 29923, 29901, 960, 25811, 29892, 3450, 674, 736, 2582, 363, 599, 15197, 28386, 278, 1404, 756, 11239, 304, 1776, 29889, 13, 18884, 3115, 29892, 2609, 367, 1304, 411, 278, 5381, 29899, 5441, 29899, 7039, 3443, 29889, 13, 9651, 5381, 29918, 5441, 29918, 7039, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 16969, 871, 2582, 5069, 15197, 13223, 29915, 29879, 1024, 20074, 297, 278, 4944, 1051, 29889, 13, 18884, 6058, 29923, 29901, 960, 25811, 29892, 3450, 674, 736, 2582, 363, 599, 15197, 28386, 278, 1404, 756, 11239, 304, 1776, 29889, 13, 18884, 3115, 29892, 2609, 367, 1304, 411, 278, 5381, 29899, 348, 1169, 3443, 29889, 13, 9651, 297, 300, 313, 710, 29892, 13136, 1125, 13, 18884, 11856, 363, 2183, 5641, 29914, 29907, 1367, 29934, 2908, 773, 263, 2323, 5641, 313, 29881, 29889, 29881, 29889, 29881, 29889, 29881, 511, 263, 27526, 5641, 3464, 313, 29881, 29889, 29881, 29889, 29881, 29889, 29881, 29899, 29881, 29889, 29881, 29889, 29881, 29889, 29881, 511, 13, 18884, 263, 315, 1367, 29934, 2908, 313, 29881, 29889, 29881, 29889, 29881, 29889, 29881, 29914, 29885, 511, 263, 7687, 315, 1367, 29934, 313, 29881, 29889, 29881, 9774, 470, 263, 8775, 7543, 313, 29881, 29889, 29881, 5575, 29889, 29881, 467, 13, 18884, 16969, 871, 2582, 5069, 518, 2962, 7061, 29892, 1095, 7061, 29962, 3464, 25457, 411, 278, 2183, 5641, 16428, 470, 315, 1367, 29934, 29889, 13, 9651, 8282, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 16969, 871, 2582, 1058, 526, 6942, 411, 278, 4944, 10522, 23481, 29889, 13, 18884, 15808, 367, 1304, 411, 278, 4055, 29899, 7039, 3443, 29889, 13, 9651, 4055, 29918, 7039, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 16969, 871, 2582, 1058, 526, 6942, 411, 278, 4944, 10522, 2983, 29889, 13, 18884, 15808, 367, 1304, 411, 278, 8282, 3443, 29889, 13, 9651, 3160, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 512, 2325, 278, 4944, 4235, 408, 760, 310, 278, 7797, 1891, 1121, 29889, 2178, 20937, 1819, 526, 13, 18884, 421, 6735, 800, 1673, 421, 344, 369, 537, 3981, 29879, 1673, 421, 1131, 3224, 1123, 7040, 1673, 421, 12817, 4597, 8306, 20350, 1673, 421, 6327, 10602, 1673, 322, 421, 5479, 20350, 29952, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 1252, 3591, 20277, 6998, 13, 18884, 530, 20380, 6943, 599, 310, 278, 10377, 29918, 3881, 2582, 29889, 17212, 508, 367, 4256, 630, 13, 18884, 470, 2000, 491, 1813, 773, 14935, 17609, 15513, 4622, 13595, 13, 13, 4706, 1222, 9422, 29901, 13, 9651, 8653, 396, 7106, 599, 10377, 20238, 322, 1596, 1269, 3464, 29901, 13, 9651, 8653, 363, 620, 297, 3132, 29889, 16596, 29889, 666, 29918, 3881, 29889, 29894, 29906, 29889, 1761, 7295, 13, 9651, 2023, 268, 363, 10377, 29918, 29878, 297, 620, 29901, 13, 9651, 2023, 308, 1596, 29898, 666, 29918, 29878, 29897, 13, 4706, 9995, 13, 4706, 736, 1222, 3591, 20277, 29898, 1311, 3032, 2754, 29892, 285, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 613, 9049, 5085, 29897, 13, 13, 1678, 822, 679, 29898, 1311, 29892, 1178, 29901, 851, 29892, 3579, 19290, 29901, 3139, 29897, 1599, 360, 919, 29961, 710, 29892, 3139, 5387, 13, 4706, 9995, 13, 4706, 16969, 278, 4902, 363, 263, 2183, 5641, 12146, 29889, 11842, 9331, 881, 367, 4502, 408, 13553, 6389, 773, 13, 4706, 278, 2983, 2400, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1178, 313, 710, 1125, 13, 18884, 3553, 363, 278, 10377, 29899, 3881, 29889, 10575, 367, 263, 501, 11150, 29889, 13, 9651, 3160, 313, 710, 29892, 13136, 1125, 13, 18884, 422, 655, 29899, 25048, 630, 1347, 29936, 512, 2325, 278, 4944, 4235, 408, 760, 310, 278, 7797, 1891, 1121, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 8977, 6998, 13, 18884, 319, 8600, 6943, 599, 310, 278, 4902, 1048, 385, 5641, 12146, 29889, 13, 13, 4706, 1222, 9422, 29901, 13, 9651, 8653, 396, 7106, 5641, 12146, 411, 2775, 537, 18139, 13, 9651, 8653, 590, 29918, 3881, 353, 3132, 29889, 16596, 29889, 666, 29918, 3881, 29889, 29894, 29906, 29889, 657, 29898, 29966, 333, 10202, 3160, 543, 344, 369, 537, 3981, 29879, 1159, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 2754, 29889, 657, 29898, 29888, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 19248, 333, 17671, 8636, 29922, 19290, 467, 3126, 580, 13, 13, 1678, 822, 1653, 29898, 13, 4706, 1583, 29892, 1369, 7061, 29901, 851, 29892, 1095, 7061, 29901, 851, 29892, 3847, 1204, 29901, 851, 29892, 3579, 19290, 29901, 3139, 13, 1678, 1723, 1599, 360, 919, 29961, 710, 29892, 3139, 5387, 13, 4706, 9995, 13, 4706, 6760, 1078, 263, 716, 2888, 5641, 12146, 29889, 13, 4706, 6058, 29923, 29901, 319, 8845, 1059, 674, 367, 4133, 565, 278, 1369, 322, 1095, 14157, 310, 278, 2888, 3464, 437, 451, 6216, 2629, 263, 2246, 3233, 3464, 3342, 491, 1060, 8357, 344, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1369, 7061, 313, 710, 1125, 13, 18884, 7370, 3211, 310, 2888, 10377, 29899, 3881, 29889, 13, 9651, 1095, 7061, 313, 710, 1125, 13, 18884, 2796, 3211, 310, 2888, 10377, 29899, 3881, 29889, 13, 9651, 3847, 1204, 313, 710, 1125, 13, 18884, 5163, 310, 3847, 10377, 29899, 3881, 29889, 13, 9651, 8282, 313, 1761, 29892, 13136, 1125, 13, 18884, 319, 1051, 310, 4055, 17195, 2983, 29889, 13, 9651, 5684, 3664, 267, 313, 710, 29892, 13136, 1125, 13, 18884, 3139, 5684, 11486, 1048, 278, 2888, 10377, 29899, 3881, 29889, 13, 9651, 1298, 2776, 13443, 21943, 313, 1761, 29892, 13136, 1125, 13, 18884, 319, 5714, 310, 1298, 29899, 974, 29899, 12346, 17195, 18999, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 8977, 6998, 13, 18884, 319, 8600, 6943, 599, 310, 278, 4902, 1048, 278, 15141, 2825, 29892, 2888, 5641, 12146, 29889, 13, 13, 4706, 1222, 9422, 29901, 13, 9651, 8653, 396, 6204, 263, 716, 10377, 29899, 3881, 1090, 263, 3847, 3464, 13, 9651, 8653, 716, 29918, 3881, 353, 3132, 29889, 16596, 29889, 666, 29918, 3881, 29889, 29894, 29906, 29889, 3258, 703, 29896, 29955, 29906, 29889, 29896, 29953, 29889, 29941, 29896, 29889, 29896, 29900, 613, 376, 29896, 29955, 29906, 29889, 29896, 29953, 29889, 29896, 29955, 29889, 29941, 29906, 613, 376, 29946, 29941, 29874, 29945, 29874, 29945, 29953, 29929, 29899, 29906, 29955, 29890, 29900, 29899, 29941, 29929, 29890, 29945, 29899, 29929, 29947, 29888, 29946, 29899, 29906, 29906, 29890, 29929, 29947, 29947, 29945, 29945, 29946, 29953, 29881, 29955, 613, 5684, 3664, 267, 543, 16890, 3335, 13223, 1060, 448, 4485, 15133, 4700, 18982, 1159, 13, 4706, 9995, 13, 4706, 20092, 29901, 360, 919, 29961, 710, 29892, 3139, 29962, 353, 426, 13, 9651, 376, 2962, 7061, 1115, 1369, 7061, 29892, 13, 9651, 376, 355, 7061, 1115, 1095, 7061, 29892, 13, 9651, 376, 3560, 1204, 1115, 3847, 1204, 29892, 13, 9651, 376, 6735, 800, 1115, 24335, 13, 4706, 500, 13, 13, 4706, 565, 376, 11338, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 11338, 3108, 353, 9049, 5085, 3366, 11338, 3108, 13, 4706, 565, 376, 1202, 3245, 3664, 267, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 1202, 3245, 3664, 267, 3108, 353, 9049, 5085, 3366, 1202, 3245, 3664, 267, 3108, 13, 4706, 565, 376, 3149, 2776, 13443, 21943, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 3149, 2776, 13443, 21943, 3108, 353, 9049, 5085, 3366, 3149, 2776, 13443, 21943, 3108, 13, 4706, 736, 1583, 3032, 2754, 29889, 2490, 29898, 29888, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 613, 4390, 29922, 23813, 467, 3126, 580, 13, 13, 1678, 822, 5217, 29898, 1311, 29892, 1178, 29901, 851, 29897, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 21267, 278, 2183, 5641, 12146, 29892, 322, 599, 12368, 304, 916, 848, 29889, 13, 4706, 6058, 29923, 29901, 910, 674, 871, 664, 363, 1404, 29899, 12119, 5641, 390, 6916, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1178, 313, 710, 1125, 13, 18884, 3553, 363, 278, 10377, 29899, 3881, 29889, 10575, 367, 263, 501, 11150, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 20054, 6998, 13, 18884, 421, 5574, 29952, 565, 278, 3464, 471, 8472, 11132, 29892, 6467, 421, 8824, 1412, 13, 13, 4706, 1222, 9422, 29901, 13, 9651, 8653, 396, 897, 1026, 267, 263, 1404, 3342, 3464, 13, 9651, 8653, 3132, 29889, 16596, 29889, 666, 29918, 3881, 29889, 29894, 29906, 29889, 8143, 703, 29946, 29941, 29874, 29945, 29874, 29945, 29953, 29929, 29899, 29906, 29955, 29890, 29900, 29899, 29941, 29929, 29890, 29945, 29899, 29929, 29947, 29888, 29946, 29899, 29906, 29906, 29890, 29929, 29947, 29947, 29945, 29945, 29946, 29953, 29881, 29955, 1159, 13, 4706, 9995, 13, 4706, 736, 313, 13, 9651, 5852, 13, 9651, 565, 1583, 3032, 2754, 29889, 8143, 29898, 29888, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 19248, 333, 29913, 2564, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29946, 13, 9651, 1683, 7700, 13, 4706, 1723, 13, 13, 1678, 822, 2767, 29898, 1311, 29892, 1178, 29901, 851, 29892, 3579, 19290, 29901, 3139, 29897, 1599, 360, 919, 29961, 710, 29892, 3139, 5387, 13, 4706, 9995, 13, 4706, 2178, 1242, 278, 7687, 2767, 310, 278, 2183, 5641, 12146, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 1178, 313, 710, 1125, 13, 18884, 3553, 363, 278, 10377, 29899, 3881, 29889, 10575, 367, 263, 501, 11150, 29889, 13, 9651, 1369, 7061, 313, 710, 29892, 13136, 1125, 13, 18884, 7370, 3211, 310, 2888, 10377, 29899, 3881, 29889, 13, 9651, 1095, 7061, 313, 710, 29892, 13136, 1125, 13, 18884, 2796, 3211, 310, 2888, 10377, 29899, 3881, 29889, 13, 9651, 3847, 1204, 313, 710, 29892, 13136, 1125, 13, 18884, 5163, 310, 3847, 10377, 29899, 3881, 29889, 13, 9651, 8282, 313, 1761, 29892, 13136, 1125, 13, 18884, 319, 1051, 310, 4055, 17195, 18999, 29889, 13, 9651, 5684, 3664, 267, 313, 710, 29892, 13136, 1125, 13, 18884, 3139, 5684, 11486, 1048, 278, 2888, 10377, 29899, 3881, 29889, 13, 9651, 1298, 2776, 13443, 21943, 313, 1761, 29892, 13136, 1125, 13, 18884, 319, 5714, 310, 1298, 29899, 974, 29899, 12346, 17195, 18999, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 8977, 6998, 13, 18884, 319, 8600, 6943, 599, 310, 278, 4902, 1048, 278, 4784, 29892, 2888, 5641, 12146, 29889, 13, 13, 4706, 1222, 9422, 29901, 13, 9651, 8653, 396, 10318, 385, 10377, 29899, 3881, 1090, 263, 3847, 3464, 13, 9651, 8653, 716, 29918, 3881, 353, 3132, 29889, 16596, 29889, 666, 29918, 3881, 29889, 29894, 29906, 29889, 5504, 703, 29946, 29941, 29874, 29945, 29874, 29945, 29953, 29929, 29899, 29906, 29955, 29890, 29900, 29899, 29941, 29929, 29890, 29945, 29899, 29929, 29947, 29888, 29946, 29899, 29906, 29906, 29890, 29929, 29947, 29947, 29945, 29945, 29946, 29953, 29881, 29955, 613, 5684, 3664, 267, 543, 16890, 3335, 13223, 1060, 448, 14650, 16738, 1159, 13, 4706, 9995, 13, 4706, 20092, 353, 6571, 13, 4706, 565, 376, 2962, 7061, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 2962, 7061, 3108, 353, 9049, 5085, 3366, 2962, 7061, 3108, 13, 4706, 565, 376, 355, 7061, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 355, 7061, 3108, 353, 9049, 5085, 3366, 355, 7061, 3108, 13, 4706, 565, 376, 3560, 1204, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 3560, 1204, 3108, 353, 9049, 5085, 3366, 3560, 1204, 3108, 13, 13, 4706, 565, 738, 29898, 13, 9651, 1852, 297, 4852, 11338, 613, 376, 1202, 3245, 3664, 267, 613, 376, 3149, 2776, 13443, 21943, 1159, 363, 1852, 297, 9049, 5085, 13, 308, 1125, 13, 9651, 20092, 3366, 6735, 800, 3108, 353, 6571, 13, 4706, 565, 376, 11338, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 11338, 3108, 353, 9049, 5085, 3366, 11338, 3108, 13, 4706, 565, 376, 1202, 3245, 3664, 267, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 1202, 3245, 3664, 267, 3108, 353, 9049, 5085, 3366, 1202, 3245, 3664, 267, 3108, 13, 4706, 565, 376, 3149, 2776, 13443, 21943, 29908, 297, 9049, 5085, 29901, 13, 9651, 20092, 3366, 6735, 800, 3108, 3366, 3149, 2776, 13443, 21943, 3108, 353, 9049, 5085, 3366, 3149, 2776, 13443, 21943, 3108, 13, 4706, 736, 1583, 3032, 2754, 29889, 5041, 29898, 29888, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 19248, 333, 17671, 4390, 29922, 23813, 467, 3126, 580, 13, 13, 1678, 822, 4055, 29898, 1311, 29892, 20238, 29901, 2391, 29961, 710, 1402, 8282, 29901, 2391, 29961, 710, 2314, 1599, 6120, 29901, 13, 4706, 9995, 13, 4706, 3462, 29879, 278, 4944, 8282, 304, 599, 310, 278, 6790, 10377, 20238, 29889, 13, 4706, 960, 278, 738, 310, 278, 4944, 8282, 437, 451, 1863, 29892, 896, 674, 367, 2825, 29889, 13, 13, 4706, 826, 3174, 29901, 13, 9651, 20238, 313, 1761, 1125, 13, 18884, 319, 1051, 310, 10377, 29899, 3881, 23481, 29889, 10575, 367, 501, 11150, 29879, 29889, 13, 9651, 8282, 313, 1761, 1125, 13, 18884, 319, 1051, 310, 4055, 17195, 2983, 304, 788, 304, 385, 10377, 29899, 3881, 29889, 13, 13, 4706, 16969, 29901, 13, 9651, 584, 5415, 18078, 20054, 6998, 13, 18884, 421, 5574, 29952, 565, 278, 20238, 892, 4055, 3192, 8472, 29892, 6467, 421, 8824, 1412, 13, 4706, 9995, 13, 4706, 20092, 353, 8853, 666, 6069, 21943, 1115, 20238, 29892, 376, 11338, 1115, 8282, 29913, 13, 4706, 736, 1583, 3032, 2754, 29889, 2490, 29898, 29888, 29908, 29912, 29963, 29906, 29918, 15094, 25634, 6822, 666, 29899, 3881, 29914, 4039, 613, 4390, 29922, 23813, 29897, 13, 2 ]
bluebottle/events/serializers.py
jayvdb/bluebottle
0
141982
<filename>bluebottle/events/serializers.py<gh_stars>0 from builtins import object from rest_framework.validators import UniqueTogetherValidator from rest_framework import serializers from rest_framework_json_api.relations import ResourceRelatedField from bluebottle.activities.utils import ( BaseActivitySerializer, BaseContributionSerializer, BaseActivityListSerializer, BaseTinyActivitySerializer ) from bluebottle.events.filters import ParticipantListFilter from bluebottle.events.models import Event, Participant from bluebottle.utils.utils import reverse_signed from bluebottle.fsm.serializers import TransitionSerializer from bluebottle.utils.serializers import ResourcePermissionField, FilteredRelatedField from bluebottle.utils.serializers import NoCommitMixin class ParticipantListSerializer(BaseContributionSerializer): class Meta(BaseContributionSerializer.Meta): model = Participant fields = BaseContributionSerializer.Meta.fields + ('time_spent', ) class JSONAPIMeta(BaseContributionSerializer.JSONAPIMeta): resource_name = 'contributions/participants' included_resources = [ 'user', 'activity' ] included_serializers = { 'activity': 'bluebottle.events.serializers.TinyEventSerializer', 'user': 'bluebottle.initiatives.serializers.MemberSerializer', } class ParticipantSerializer(BaseContributionSerializer): class Meta(BaseContributionSerializer.Meta): model = Participant fields = BaseContributionSerializer.Meta.fields + ('time_spent', ) validators = [ UniqueTogetherValidator( queryset=Participant.objects.all(), fields=('activity', 'user') ) ] class JSONAPIMeta(BaseContributionSerializer.JSONAPIMeta): resource_name = 'contributions/participants' included_resources = [ 'user', 'activity' ] included_serializers = { 'activity': 'bluebottle.events.serializers.EventListSerializer', 'user': 'bluebottle.initiatives.serializers.MemberSerializer', } class ParticipantTransitionSerializer(TransitionSerializer): resource = ResourceRelatedField(queryset=Participant.objects.all()) field = 'states' included_serializers = { 'resource': 'bluebottle.events.serializers.ParticipantSerializer', 'resource.activity': 'bluebottle.events.serializers.EventSerializer', } class JSONAPIMeta(object): resource_name = 'contributions/participant-transitions' included_resources = [ 'resource', 'resource.activity' ] class EventListSerializer(BaseActivityListSerializer): permissions = ResourcePermissionField('event-detail', view_args=('pk',)) class Meta(BaseActivityListSerializer.Meta): model = Event fields = BaseActivityListSerializer.Meta.fields + ( 'capacity', 'start', 'local_start', 'duration', 'is_online', 'location', 'location_hint', 'permissions', 'registration_deadline', ) class JSONAPIMeta(BaseActivityListSerializer.JSONAPIMeta): included_resources = [ 'location', ] resource_name = 'activities/events' included_serializers = dict( BaseActivitySerializer.included_serializers, **{ 'location': 'bluebottle.geo.serializers.GeolocationSerializer', } ) class EventSerializer(NoCommitMixin, BaseActivitySerializer): permissions = ResourcePermissionField('event-detail', view_args=('pk',)) contributions = FilteredRelatedField(many=True, filter_backend=ParticipantListFilter) links = serializers.SerializerMethodField() def get_links(self, instance): return { 'ical': reverse_signed('event-ical', args=(instance.pk, )), 'google': instance.google_calendar_link, 'outlook': instance.outlook_link, } def get_fields(self): fields = super(EventSerializer, self).get_fields() user = self.context['request'].user if ( not user.is_authenticated or ( self.instance and ( user not in [ self.instance.owner, self.instance.initiative.owner, self.instance.initiative.activity_manager ] and not len(self.instance.participants.filter(user=user)) ) ) ): del fields['online_meeting_url'] return fields class Meta(BaseActivitySerializer.Meta): model = Event fields = BaseActivitySerializer.Meta.fields + ( 'capacity', 'start', 'local_start', 'duration', 'is_online', 'online_meeting_url', 'location', 'location_hint', 'permissions', 'registration_deadline', 'contributions', 'links' ) class JSONAPIMeta(BaseActivitySerializer.JSONAPIMeta): included_resources = BaseActivitySerializer.JSONAPIMeta.included_resources + [ 'location', 'contributions', 'contributions.user' ] resource_name = 'activities/events' included_serializers = dict( BaseActivitySerializer.included_serializers, **{ 'location': 'bluebottle.geo.serializers.GeolocationSerializer', 'contributions': 'bluebottle.events.serializers.ParticipantSerializer', } ) class TinyEventSerializer(BaseTinyActivitySerializer): class Meta(BaseTinyActivitySerializer.Meta): model = Event fields = BaseTinyActivitySerializer.Meta.fields + ('start', 'local_start', 'duration') class JSONAPIMeta(BaseTinyActivitySerializer.JSONAPIMeta): resource_name = 'activities/events' class EventTransitionSerializer(TransitionSerializer): resource = ResourceRelatedField(queryset=Event.objects.all()) field = 'states' included_serializers = { 'resource': 'bluebottle.events.serializers.EventSerializer', } class JSONAPIMeta(object): included_resources = ['resource', ] resource_name = 'event-transitions'
[ 1, 529, 9507, 29958, 9539, 29890, 1501, 280, 29914, 13604, 29914, 15550, 19427, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4240, 1144, 1053, 1203, 13, 3166, 1791, 29918, 4468, 29889, 3084, 4097, 1053, 853, 1387, 29911, 12966, 24204, 13, 3166, 1791, 29918, 4468, 1053, 7797, 19427, 13, 13, 3166, 1791, 29918, 4468, 29918, 3126, 29918, 2754, 29889, 2674, 800, 1053, 18981, 9662, 630, 3073, 13, 13, 3166, 7254, 29890, 1501, 280, 29889, 11236, 1907, 29889, 13239, 1053, 313, 13, 1678, 7399, 3886, 17679, 29892, 7399, 1323, 3224, 17679, 29892, 13, 1678, 7399, 3886, 1293, 17679, 29892, 7399, 29911, 4901, 3886, 17679, 13, 29897, 13, 3166, 7254, 29890, 1501, 280, 29889, 13604, 29889, 26705, 1053, 3455, 12654, 424, 1293, 5072, 13, 3166, 7254, 29890, 1501, 280, 29889, 13604, 29889, 9794, 1053, 6864, 29892, 3455, 12654, 424, 13, 3166, 7254, 29890, 1501, 280, 29889, 13239, 29889, 13239, 1053, 11837, 29918, 7433, 13, 3166, 7254, 29890, 1501, 280, 29889, 29888, 3844, 29889, 15550, 19427, 1053, 4103, 654, 17679, 13, 3166, 7254, 29890, 1501, 280, 29889, 13239, 29889, 15550, 19427, 1053, 18981, 27293, 3073, 29892, 19916, 287, 9662, 630, 3073, 13, 3166, 7254, 29890, 1501, 280, 29889, 13239, 29889, 15550, 19427, 1053, 1939, 1523, 2415, 29924, 861, 262, 13, 13, 13, 1990, 3455, 12654, 424, 1293, 17679, 29898, 5160, 1323, 3224, 17679, 1125, 13, 13, 1678, 770, 20553, 29898, 5160, 1323, 3224, 17679, 29889, 19346, 1125, 13, 4706, 1904, 353, 3455, 12654, 424, 13, 4706, 4235, 353, 7399, 1323, 3224, 17679, 29889, 19346, 29889, 9621, 718, 6702, 2230, 29918, 1028, 296, 742, 1723, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 5160, 1323, 3224, 17679, 29889, 7249, 8787, 19346, 1125, 13, 4706, 6503, 29918, 978, 353, 525, 1285, 3224, 29879, 29914, 1595, 12654, 1934, 29915, 13, 4706, 5134, 29918, 13237, 353, 518, 13, 9651, 525, 1792, 742, 13, 9651, 525, 10072, 29915, 13, 4706, 4514, 13, 13, 1678, 5134, 29918, 15550, 19427, 353, 426, 13, 4706, 525, 10072, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 29911, 4901, 2624, 17679, 742, 13, 4706, 525, 1792, 2396, 525, 9539, 29890, 1501, 280, 29889, 2344, 29875, 5056, 29889, 15550, 19427, 29889, 13404, 17679, 742, 13, 1678, 500, 13, 13, 13, 1990, 3455, 12654, 424, 17679, 29898, 5160, 1323, 3224, 17679, 1125, 13, 13, 1678, 770, 20553, 29898, 5160, 1323, 3224, 17679, 29889, 19346, 1125, 13, 4706, 1904, 353, 3455, 12654, 424, 13, 4706, 4235, 353, 7399, 1323, 3224, 17679, 29889, 19346, 29889, 9621, 718, 6702, 2230, 29918, 1028, 296, 742, 1723, 13, 13, 4706, 2854, 4097, 353, 518, 13, 9651, 853, 1387, 29911, 12966, 24204, 29898, 13, 18884, 2346, 842, 29922, 7439, 12654, 424, 29889, 12650, 29889, 497, 3285, 13, 18884, 4235, 29922, 877, 10072, 742, 525, 1792, 1495, 13, 9651, 1723, 13, 4706, 4514, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 5160, 1323, 3224, 17679, 29889, 7249, 8787, 19346, 1125, 13, 4706, 6503, 29918, 978, 353, 525, 1285, 3224, 29879, 29914, 1595, 12654, 1934, 29915, 13, 4706, 5134, 29918, 13237, 353, 518, 13, 9651, 525, 1792, 742, 13, 9651, 525, 10072, 29915, 13, 4706, 4514, 13, 13, 1678, 5134, 29918, 15550, 19427, 353, 426, 13, 4706, 525, 10072, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 2624, 1293, 17679, 742, 13, 4706, 525, 1792, 2396, 525, 9539, 29890, 1501, 280, 29889, 2344, 29875, 5056, 29889, 15550, 19427, 29889, 13404, 17679, 742, 13, 1678, 500, 13, 13, 13, 1990, 3455, 12654, 424, 4300, 654, 17679, 29898, 4300, 654, 17679, 1125, 13, 1678, 6503, 353, 18981, 9662, 630, 3073, 29898, 1972, 842, 29922, 7439, 12654, 424, 29889, 12650, 29889, 497, 3101, 13, 1678, 1746, 353, 525, 28631, 29915, 13, 1678, 5134, 29918, 15550, 19427, 353, 426, 13, 4706, 525, 10314, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 7439, 12654, 424, 17679, 742, 13, 4706, 525, 10314, 29889, 10072, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 2624, 17679, 742, 13, 1678, 500, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 3318, 1125, 13, 4706, 6503, 29918, 978, 353, 525, 1285, 3224, 29879, 29914, 1595, 12654, 424, 29899, 3286, 2187, 29915, 13, 4706, 5134, 29918, 13237, 353, 518, 13, 9651, 525, 10314, 742, 13, 9651, 525, 10314, 29889, 10072, 29915, 13, 4706, 4514, 13, 13, 13, 1990, 6864, 1293, 17679, 29898, 5160, 3886, 1293, 17679, 1125, 13, 1678, 11239, 353, 18981, 27293, 3073, 877, 3696, 29899, 16432, 742, 1776, 29918, 5085, 29922, 877, 20571, 742, 876, 13, 13, 1678, 770, 20553, 29898, 5160, 3886, 1293, 17679, 29889, 19346, 1125, 13, 4706, 1904, 353, 6864, 13, 4706, 4235, 353, 7399, 3886, 1293, 17679, 29889, 19346, 29889, 9621, 718, 313, 13, 9651, 525, 5030, 5946, 742, 13, 9651, 525, 2962, 742, 13, 9651, 525, 2997, 29918, 2962, 742, 13, 9651, 525, 19708, 742, 13, 9651, 525, 275, 29918, 14627, 742, 13, 9651, 525, 5479, 742, 13, 9651, 525, 5479, 29918, 29882, 524, 742, 13, 9651, 525, 17858, 6847, 742, 13, 9651, 525, 1727, 8306, 29918, 311, 328, 1220, 742, 13, 4706, 1723, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 5160, 3886, 1293, 17679, 29889, 7249, 8787, 19346, 1125, 13, 4706, 5134, 29918, 13237, 353, 518, 13, 9651, 525, 5479, 742, 13, 4706, 4514, 13, 4706, 6503, 29918, 978, 353, 525, 11236, 1907, 29914, 13604, 29915, 13, 13, 1678, 5134, 29918, 15550, 19427, 353, 9657, 29898, 13, 4706, 7399, 3886, 17679, 29889, 11707, 287, 29918, 15550, 19427, 29892, 13, 4706, 3579, 29912, 13, 9651, 525, 5479, 2396, 525, 9539, 29890, 1501, 280, 29889, 24756, 29889, 15550, 19427, 29889, 7999, 324, 10610, 17679, 742, 13, 4706, 500, 13, 1678, 1723, 13, 13, 13, 1990, 6864, 17679, 29898, 3782, 1523, 2415, 29924, 861, 262, 29892, 7399, 3886, 17679, 1125, 13, 1678, 11239, 353, 18981, 27293, 3073, 877, 3696, 29899, 16432, 742, 1776, 29918, 5085, 29922, 877, 20571, 742, 876, 13, 1678, 20706, 353, 19916, 287, 9662, 630, 3073, 29898, 13011, 29922, 5574, 29892, 4175, 29918, 27852, 29922, 7439, 12654, 424, 1293, 5072, 29897, 13, 1678, 2988, 353, 7797, 19427, 29889, 17679, 4062, 3073, 580, 13, 13, 1678, 822, 679, 29918, 4965, 29898, 1311, 29892, 2777, 1125, 13, 4706, 736, 426, 13, 9651, 525, 936, 2396, 11837, 29918, 7433, 877, 3696, 29899, 936, 742, 6389, 7607, 8758, 29889, 20571, 29892, 1723, 511, 13, 9651, 525, 3608, 2396, 2777, 29889, 3608, 29918, 23392, 29918, 2324, 29892, 13, 9651, 525, 449, 6914, 2396, 2777, 29889, 449, 6914, 29918, 2324, 29892, 13, 4706, 500, 13, 13, 1678, 822, 679, 29918, 9621, 29898, 1311, 1125, 13, 4706, 4235, 353, 2428, 29898, 2624, 17679, 29892, 1583, 467, 657, 29918, 9621, 580, 13, 4706, 1404, 353, 1583, 29889, 4703, 1839, 3827, 13359, 1792, 13, 13, 4706, 565, 313, 13, 9651, 451, 1404, 29889, 275, 29918, 27218, 630, 470, 313, 13, 18884, 1583, 29889, 8758, 322, 313, 13, 462, 1678, 1404, 451, 297, 518, 13, 462, 4706, 1583, 29889, 8758, 29889, 20348, 29892, 13, 462, 4706, 1583, 29889, 8758, 29889, 2344, 29875, 1230, 29889, 20348, 29892, 13, 462, 4706, 1583, 29889, 8758, 29889, 2344, 29875, 1230, 29889, 10072, 29918, 12847, 13, 462, 1678, 4514, 322, 13, 462, 1678, 451, 7431, 29898, 1311, 29889, 8758, 29889, 1595, 12654, 1934, 29889, 4572, 29898, 1792, 29922, 1792, 876, 13, 18884, 1723, 13, 9651, 1723, 13, 308, 1125, 13, 9651, 628, 4235, 1839, 14627, 29918, 1004, 15133, 29918, 2271, 2033, 13, 13, 4706, 736, 4235, 13, 13, 1678, 770, 20553, 29898, 5160, 3886, 17679, 29889, 19346, 1125, 13, 4706, 1904, 353, 6864, 13, 4706, 4235, 353, 7399, 3886, 17679, 29889, 19346, 29889, 9621, 718, 313, 13, 9651, 525, 5030, 5946, 742, 13, 9651, 525, 2962, 742, 13, 9651, 525, 2997, 29918, 2962, 742, 13, 9651, 525, 19708, 742, 13, 9651, 525, 275, 29918, 14627, 742, 13, 9651, 525, 14627, 29918, 1004, 15133, 29918, 2271, 742, 13, 9651, 525, 5479, 742, 13, 9651, 525, 5479, 29918, 29882, 524, 742, 13, 9651, 525, 17858, 6847, 742, 13, 9651, 525, 1727, 8306, 29918, 311, 328, 1220, 742, 13, 9651, 525, 1285, 3224, 29879, 742, 13, 9651, 525, 4965, 29915, 13, 4706, 1723, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 5160, 3886, 17679, 29889, 7249, 8787, 19346, 1125, 13, 4706, 5134, 29918, 13237, 353, 7399, 3886, 17679, 29889, 7249, 8787, 19346, 29889, 11707, 287, 29918, 13237, 718, 518, 13, 9651, 525, 5479, 742, 13, 9651, 525, 1285, 3224, 29879, 742, 13, 9651, 525, 1285, 3224, 29879, 29889, 1792, 29915, 13, 4706, 4514, 13, 4706, 6503, 29918, 978, 353, 525, 11236, 1907, 29914, 13604, 29915, 13, 13, 1678, 5134, 29918, 15550, 19427, 353, 9657, 29898, 13, 4706, 7399, 3886, 17679, 29889, 11707, 287, 29918, 15550, 19427, 29892, 13, 4706, 3579, 29912, 13, 9651, 525, 5479, 2396, 525, 9539, 29890, 1501, 280, 29889, 24756, 29889, 15550, 19427, 29889, 7999, 324, 10610, 17679, 742, 13, 9651, 525, 1285, 3224, 29879, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 7439, 12654, 424, 17679, 742, 13, 4706, 500, 13, 1678, 1723, 13, 13, 13, 1990, 323, 4901, 2624, 17679, 29898, 5160, 29911, 4901, 3886, 17679, 1125, 13, 13, 1678, 770, 20553, 29898, 5160, 29911, 4901, 3886, 17679, 29889, 19346, 1125, 13, 4706, 1904, 353, 6864, 13, 4706, 4235, 353, 7399, 29911, 4901, 3886, 17679, 29889, 19346, 29889, 9621, 718, 6702, 2962, 742, 525, 2997, 29918, 2962, 742, 525, 19708, 1495, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 5160, 29911, 4901, 3886, 17679, 29889, 7249, 8787, 19346, 1125, 13, 4706, 6503, 29918, 978, 353, 525, 11236, 1907, 29914, 13604, 29915, 13, 13, 13, 1990, 6864, 4300, 654, 17679, 29898, 4300, 654, 17679, 1125, 13, 1678, 6503, 353, 18981, 9662, 630, 3073, 29898, 1972, 842, 29922, 2624, 29889, 12650, 29889, 497, 3101, 13, 1678, 1746, 353, 525, 28631, 29915, 13, 1678, 5134, 29918, 15550, 19427, 353, 426, 13, 4706, 525, 10314, 2396, 525, 9539, 29890, 1501, 280, 29889, 13604, 29889, 15550, 19427, 29889, 2624, 17679, 742, 13, 1678, 500, 13, 13, 1678, 770, 4663, 8787, 19346, 29898, 3318, 1125, 13, 4706, 5134, 29918, 13237, 353, 6024, 10314, 742, 4514, 13, 4706, 6503, 29918, 978, 353, 525, 3696, 29899, 3286, 2187, 29915, 13, 2 ]
classes_and_testsTest/DocumentationFromUnitTestsTestData/DataSet1_py_ClassFile.py
anconaesselmann/LiveUnit
0
44045
<reponame>anconaesselmann/LiveUnit<filename>classes_and_testsTest/DocumentationFromUnitTestsTestData/DataSet1_py_ClassFile.py class DataClassFile(): def functionName1(self): """ One Function (without parameters) with one test function (with single line comments) where the documentation had not been generated. """ say = "say" fu = "fu" return say + " " + fu
[ 1, 529, 276, 1112, 420, 29958, 273, 535, 29874, 25583, 4403, 29914, 23859, 8325, 29966, 9507, 29958, 13203, 29918, 392, 29918, 21150, 3057, 29914, 6268, 362, 4591, 8325, 24376, 3057, 1469, 29914, 28449, 29896, 29918, 2272, 29918, 2385, 2283, 29889, 2272, 13, 1990, 3630, 2385, 2283, 7295, 13, 1678, 822, 740, 1170, 29896, 29898, 1311, 1125, 13, 4706, 9995, 3118, 6680, 313, 14037, 4128, 29897, 411, 697, 1243, 740, 313, 2541, 2323, 1196, 6589, 29897, 13, 4706, 988, 278, 5106, 750, 451, 1063, 5759, 29889, 13, 4706, 9995, 13, 4706, 1827, 353, 376, 20834, 29908, 13, 4706, 4084, 353, 376, 21154, 29908, 13, 4706, 736, 1827, 718, 376, 376, 718, 4084, 2 ]
src/complete_analysis.py
joigno/cloudlight
3
58184
#!/usr/bin/python import sys from cloudlight.classes.graph import Graph from cloudlight.algorithms.plot import Plot import cloudlight.tests.data_enc1 graph = Graph() graph.debug = True graph.input_debug_links = 200000 graph.output_debug_nodes = 100 graph.max_links_input = 5*10**7 graph.max_nodes_analysis = 10000 filename = len(sys.argv) > 1 and sys.argv[1] or None filename = '/media/truecrypt1/temp/livejournal-links.txt-symmetric.snowball.10k' if not filename: print 'Error: first argument missing, input filename with space separated graph!' exit(-1) folder = len(sys.argv) > 2 and sys.argv[2] or None folder = '/media/truecrypt1/temp/lj/' if not folder: print 'Error: second argument missing, output folder name!' exit(-1) user_params = len(sys.argv) > 3 and sys.argv[3] or None if not user_params: user_params = 'degree,clustering,knn' graph.load_edgelist(open(filename), num=True) graph.create_index_degree() p = Plot() p.debug = True sample_size = 1000 bins = 8 compute_data = True params = { 'degree' : 10, #17, 'clustering' : 10,#15, 'knn' : 10,#12, 'kcore' : 5,#10, 'eccentricity' : 10,#15, 'path_len' : 15,#30, 'scaling' : 8,#10, 'connectivity' : 8,#10, } params = dict([(param,params[param]) for param in user_params.split(',')]) p.init_complete_analysis(graph, folder, sample_size, bins, 666, params ) if compute_data: p.complete_analysis(graph) p.plot_graph_params()
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 13, 5215, 10876, 13, 13, 3166, 9570, 4366, 29889, 13203, 29889, 4262, 1053, 12367, 13, 3166, 9570, 4366, 29889, 9564, 12404, 29889, 5317, 1053, 18399, 13, 5215, 9570, 4366, 29889, 21150, 29889, 1272, 29918, 3977, 29896, 13, 13, 4262, 353, 12367, 580, 13, 13, 4262, 29889, 8382, 353, 5852, 13, 4262, 29889, 2080, 29918, 8382, 29918, 4965, 353, 29871, 29906, 29900, 29900, 29900, 29900, 29900, 13, 4262, 29889, 4905, 29918, 8382, 29918, 18010, 353, 29871, 29896, 29900, 29900, 13, 13, 4262, 29889, 3317, 29918, 4965, 29918, 2080, 353, 29871, 29945, 29930, 29896, 29900, 1068, 29955, 13, 4262, 29889, 3317, 29918, 18010, 29918, 15916, 353, 29871, 29896, 29900, 29900, 29900, 29900, 13, 13, 9507, 353, 29871, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29896, 322, 10876, 29889, 19218, 29961, 29896, 29962, 470, 6213, 29871, 13, 13, 9507, 353, 8207, 9799, 29914, 3009, 29883, 4641, 29896, 29914, 7382, 29914, 9258, 29926, 4659, 29899, 4965, 29889, 3945, 29899, 11967, 16414, 29889, 29879, 3707, 2135, 29889, 29896, 29900, 29895, 29915, 13, 13, 361, 451, 10422, 29901, 13, 1678, 1596, 525, 2392, 29901, 937, 2980, 4567, 29892, 1881, 10422, 411, 2913, 13055, 3983, 20714, 13, 1678, 6876, 6278, 29896, 29897, 13, 13, 12083, 353, 29871, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29906, 322, 10876, 29889, 19218, 29961, 29906, 29962, 470, 6213, 29871, 13, 13, 12083, 353, 8207, 9799, 29914, 3009, 29883, 4641, 29896, 29914, 7382, 29914, 14042, 22208, 13, 13, 361, 451, 4138, 29901, 13, 1678, 1596, 525, 2392, 29901, 1473, 2980, 4567, 29892, 1962, 4138, 1024, 20714, 13, 1678, 6876, 6278, 29896, 29897, 13, 632, 13, 1792, 29918, 7529, 353, 29871, 7431, 29898, 9675, 29889, 19218, 29897, 1405, 29871, 29941, 322, 10876, 29889, 19218, 29961, 29941, 29962, 470, 6213, 29871, 13, 13, 361, 451, 1404, 29918, 7529, 29901, 13, 1678, 1404, 29918, 7529, 353, 525, 12163, 929, 29892, 695, 504, 3241, 29892, 3959, 29876, 29915, 13, 13, 13, 4262, 29889, 1359, 29918, 287, 7467, 391, 29898, 3150, 29898, 9507, 511, 954, 29922, 5574, 29897, 13, 4262, 29889, 3258, 29918, 2248, 29918, 12163, 929, 580, 13, 13, 29886, 353, 18399, 580, 13, 13, 29886, 29889, 8382, 353, 5852, 13, 11249, 29918, 2311, 353, 29871, 29896, 29900, 29900, 29900, 13, 29890, 1144, 353, 29871, 29947, 13, 26017, 29918, 1272, 353, 5852, 13, 13, 7529, 353, 426, 13, 462, 29871, 525, 12163, 929, 29915, 584, 29871, 29896, 29900, 29892, 396, 29896, 29955, 29892, 13, 462, 29871, 525, 695, 504, 3241, 29915, 584, 29871, 29896, 29900, 29892, 29937, 29896, 29945, 29892, 13, 462, 29871, 525, 3959, 29876, 29915, 584, 29871, 29896, 29900, 29892, 29937, 29896, 29906, 29892, 13, 462, 29871, 525, 29895, 3221, 29915, 584, 29871, 29945, 29892, 29937, 29896, 29900, 29892, 13, 462, 29871, 525, 29872, 617, 296, 2200, 537, 29915, 584, 29871, 29896, 29900, 29892, 29937, 29896, 29945, 29892, 13, 462, 29871, 525, 2084, 29918, 2435, 29915, 584, 29871, 29896, 29945, 29892, 29937, 29941, 29900, 29892, 13, 462, 29871, 525, 19529, 292, 29915, 584, 29871, 29947, 29892, 29937, 29896, 29900, 29892, 13, 462, 29871, 525, 6915, 2068, 29915, 584, 29871, 29947, 29892, 29937, 29896, 29900, 29892, 13, 462, 29871, 500, 13, 13, 7529, 353, 9657, 4197, 29898, 3207, 29892, 7529, 29961, 3207, 2314, 363, 1828, 297, 1404, 29918, 7529, 29889, 5451, 29317, 1495, 2314, 13, 13, 29886, 29889, 2344, 29918, 8835, 29918, 15916, 29898, 4262, 29892, 4138, 29892, 4559, 29918, 2311, 29892, 289, 1144, 29892, 29871, 29953, 29953, 29953, 29892, 8636, 1723, 13, 361, 10272, 29918, 1272, 29901, 13, 1678, 282, 29889, 8835, 29918, 15916, 29898, 4262, 29897, 13, 29886, 29889, 5317, 29918, 4262, 29918, 7529, 580, 268, 13, 2 ]
lagom/core/transform/centralize.py
dkorduban/lagom
0
46269
<filename>lagom/core/transform/centralize.py import numpy as np from .base_transform import BaseTransform class Centralize(BaseTransform): r"""Centralize the input data to zero-centered. Let :math:`x_1, \dots, x_N` be :math:`N` samples, the centralization does the following: .. math:: \hat{x}_i = x_i - \frac{1}{N}\sum_{j=1}^{N} x_j, \forall i\in \{ 1, \dots, N \} .. warning:: The mean is calculated over the first dimension. This allows to deal with batched data with shape ``[N, ...]`` where ``N`` is the batch size. However, be careful when you want to centralize a multidimensional array with mean over all elements. This is not supported. Example:: >>> centralize = Centralize() >>> centralize([1, 2, 3, 4]) array([-1.5, -0.5, 0.5, 1.5], dtype=float32) >>> centralize([[1, 3], [2, 11]]) array([[-0.5, -4. ], [ 0.5, 4. ]], dtype=float32) """ def __call__(self, x, mean=None): r"""Centralize the input data. Args: x (object): input data mean (ndarray): If not ``None``, then use this specific mean to centralize the input. Returns ------- out : ndarray centralized data """ assert not np.isscalar(x), 'does not support scalar value !' # Convert input to ndarray x = self.to_numpy(x, np.float32) # Get mean if mean is None: # compute the mean # keepdims=True very important ! otherwise wrong value mean = x.mean(0, keepdims=True) # over first dimension e.g. batch dim else: # use provided mean mean = np.asarray(mean).astype(x.dtype) # Centralize the data out = x - mean return out
[ 1, 529, 9507, 29958, 3110, 290, 29914, 3221, 29914, 9067, 29914, 25171, 675, 29889, 2272, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 869, 3188, 29918, 9067, 1053, 7399, 13372, 13, 13, 13, 1990, 8068, 675, 29898, 5160, 13372, 1125, 13, 1678, 364, 15945, 29908, 23369, 1705, 675, 278, 1881, 848, 304, 5225, 29899, 5064, 287, 29889, 29871, 13, 268, 13, 1678, 2803, 584, 755, 18078, 29916, 29918, 29896, 29892, 320, 7778, 29892, 921, 29918, 29940, 29952, 367, 584, 755, 18078, 29940, 29952, 11916, 29892, 278, 6555, 2133, 947, 278, 1494, 29901, 13, 268, 13, 1678, 6317, 5844, 1057, 13, 4706, 320, 2455, 29912, 29916, 2403, 29875, 353, 921, 29918, 29875, 448, 320, 1154, 29912, 29896, 1157, 29940, 1012, 2083, 648, 29926, 29922, 29896, 2844, 29940, 29913, 921, 29918, 29926, 29892, 320, 10956, 474, 29905, 262, 9991, 29871, 29896, 29892, 320, 7778, 29892, 405, 320, 29913, 13, 268, 13, 1678, 6317, 9177, 1057, 13, 268, 13, 4706, 450, 2099, 338, 12833, 975, 278, 937, 9927, 29889, 910, 6511, 304, 5376, 411, 9853, 287, 848, 411, 13, 4706, 8267, 4954, 29961, 29940, 29892, 2023, 7961, 29952, 988, 4954, 29940, 16159, 338, 278, 9853, 2159, 29889, 2398, 29892, 367, 16010, 746, 366, 864, 304, 6555, 675, 13, 4706, 263, 1773, 333, 326, 8180, 1409, 411, 2099, 975, 599, 3161, 29889, 910, 338, 451, 6969, 29889, 29871, 13, 268, 13, 1678, 8741, 1057, 13, 268, 13, 4706, 8653, 6555, 675, 353, 8068, 675, 580, 13, 4706, 8653, 6555, 675, 4197, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29892, 29871, 29946, 2314, 13, 4706, 1409, 4197, 29899, 29896, 29889, 29945, 29892, 448, 29900, 29889, 29945, 29892, 259, 29900, 29889, 29945, 29892, 259, 29896, 29889, 29945, 1402, 26688, 29922, 7411, 29941, 29906, 29897, 13, 308, 13, 4706, 8653, 6555, 675, 4197, 29961, 29896, 29892, 29871, 29941, 1402, 518, 29906, 29892, 29871, 29896, 29896, 24960, 13, 4706, 1409, 4197, 14352, 29900, 29889, 29945, 29892, 448, 29946, 29889, 21251, 13, 1669, 518, 29871, 29900, 29889, 29945, 29892, 259, 29946, 29889, 4514, 1402, 26688, 29922, 7411, 29941, 29906, 29897, 13, 1678, 13, 1678, 9995, 13, 1678, 822, 4770, 4804, 12035, 1311, 29892, 921, 29892, 2099, 29922, 8516, 1125, 13, 4706, 364, 15945, 29908, 23369, 1705, 675, 278, 1881, 848, 29889, 29871, 13, 308, 13, 4706, 826, 3174, 29901, 13, 9651, 921, 313, 3318, 1125, 1881, 848, 13, 9651, 2099, 313, 299, 2378, 1125, 960, 451, 4954, 8516, 29952, 1673, 769, 671, 445, 2702, 2099, 304, 6555, 675, 278, 1881, 29889, 29871, 13, 632, 13, 4706, 16969, 13, 4706, 448, 22158, 13, 4706, 714, 584, 29871, 299, 2378, 13, 9651, 6555, 1891, 848, 13, 4706, 9995, 13, 4706, 4974, 451, 7442, 29889, 790, 1052, 279, 29898, 29916, 511, 525, 13221, 451, 2304, 17336, 995, 1738, 29915, 13, 308, 13, 4706, 396, 14806, 1881, 304, 29871, 299, 2378, 13, 4706, 921, 353, 1583, 29889, 517, 29918, 23749, 29898, 29916, 29892, 7442, 29889, 7411, 29941, 29906, 29897, 13, 308, 13, 4706, 396, 3617, 2099, 13, 4706, 565, 2099, 338, 6213, 29901, 29871, 396, 10272, 278, 2099, 13, 9651, 396, 3013, 6229, 29879, 29922, 5574, 1407, 4100, 1738, 6467, 2743, 995, 13, 9651, 2099, 353, 921, 29889, 12676, 29898, 29900, 29892, 3013, 6229, 29879, 29922, 5574, 29897, 29871, 396, 975, 937, 9927, 321, 29889, 29887, 29889, 9853, 3964, 13, 4706, 1683, 29901, 29871, 396, 671, 4944, 2099, 13, 9651, 2099, 353, 7442, 29889, 294, 2378, 29898, 12676, 467, 579, 668, 29898, 29916, 29889, 29881, 1853, 29897, 13, 632, 13, 4706, 396, 8068, 675, 278, 848, 13, 4706, 714, 353, 921, 448, 2099, 13, 308, 13, 4706, 736, 714, 13, 2 ]
tests/test_schwefel26_1981.py
kyawlin/smlb
0
78304
"""Schefel26 1981 dataset tests. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. (c) <NAME> 2020, Citrine Informatics. """ import pytest import numpy as np import smlb def test_schwefel26_1981_examples(): """Tests instantiating and evaluating Schwefel26 (1981) datasets.""" from datasets.synthetic.schwefel26_1981.schwefel26_1981 import Schwefel261981Data s1 = Schwefel261981Data(dimensions=1) s2 = Schwefel261981Data(dimensions=2) s9 = Schwefel261981Data(dimensions=9) assert (s1.dimensions, s2.dimensions, s9.dimensions) == (1, 2, 9) # results from Mathematica reference implementation # minima inp = np.asfarray([[420.9687] * 9]) assert np.allclose(s1.labels(inp[:,:1]), [0], atol=1e-4) assert np.allclose(s2.labels(inp[:,:2]), [0], atol=1e-4) assert np.allclose(s9.labels(inp[:,:9]), [0], atol=1e-3) inp = np.asfarray( [ [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], [0.5, 0.4, 0.3, 0.2, 0.1, 0.9, 0.8, 0.7, 0.6], ] ) assert np.allclose(s1.labels(inp[:,:1]), [418.9518016407093, 418.6580815304599], atol=1e-6) assert np.allclose(s2.labels(inp[:,:2]), [837.8482106729184, 837.4045306835739], atol=1e-6) assert np.allclose(s9.labels(inp[:,:9]), [3767.716410053263, 3767.716410053263], atol=1e-6) # invalid inputs with pytest.raises(smlb.InvalidParameterError): s2.labels(inp)
[ 1, 9995, 29903, 1173, 13287, 29906, 29953, 29871, 29896, 29929, 29947, 29896, 8783, 6987, 29889, 13, 13, 29903, 15566, 928, 6189, 29257, 4111, 16580, 29901, 29871, 13, 29909, 23513, 310, 17855, 4733, 297, 8950, 29899, 322, 17279, 1871, 271, 1199, 29889, 13, 29898, 29883, 29897, 529, 5813, 29958, 29871, 29906, 29900, 29906, 29900, 29892, 21353, 29878, 457, 512, 4830, 1199, 29889, 13, 15945, 29908, 13, 13, 5215, 11451, 1688, 13, 13, 5215, 12655, 408, 7442, 13, 13, 5215, 269, 828, 29890, 13, 13, 13, 1753, 1243, 29918, 816, 705, 13287, 29906, 29953, 29918, 29896, 29929, 29947, 29896, 29918, 19057, 7295, 13, 1678, 9995, 24376, 13213, 1218, 322, 6161, 1218, 10445, 13287, 29906, 29953, 313, 29896, 29929, 29947, 29896, 29897, 20035, 1213, 15945, 13, 13, 1678, 515, 20035, 29889, 19274, 386, 7492, 29889, 816, 705, 13287, 29906, 29953, 29918, 29896, 29929, 29947, 29896, 29889, 816, 705, 13287, 29906, 29953, 29918, 29896, 29929, 29947, 29896, 1053, 10445, 13287, 29906, 29953, 29896, 29929, 29947, 29896, 1469, 13, 13, 1678, 269, 29896, 353, 10445, 13287, 29906, 29953, 29896, 29929, 29947, 29896, 1469, 29898, 6229, 5580, 29922, 29896, 29897, 13, 1678, 269, 29906, 353, 10445, 13287, 29906, 29953, 29896, 29929, 29947, 29896, 1469, 29898, 6229, 5580, 29922, 29906, 29897, 13, 1678, 269, 29929, 353, 10445, 13287, 29906, 29953, 29896, 29929, 29947, 29896, 1469, 29898, 6229, 5580, 29922, 29929, 29897, 13, 13, 1678, 4974, 313, 29879, 29896, 29889, 6229, 5580, 29892, 269, 29906, 29889, 6229, 5580, 29892, 269, 29929, 29889, 6229, 5580, 29897, 1275, 313, 29896, 29892, 29871, 29906, 29892, 29871, 29929, 29897, 13, 13, 1678, 396, 2582, 515, 13486, 983, 3407, 5314, 13, 13, 1678, 396, 1375, 2946, 13, 1678, 297, 29886, 353, 7442, 29889, 294, 29888, 2378, 4197, 29961, 29946, 29906, 29900, 29889, 29929, 29953, 29947, 29955, 29962, 334, 29871, 29929, 2314, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29896, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29896, 11724, 518, 29900, 1402, 472, 324, 29922, 29896, 29872, 29899, 29946, 29897, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29906, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29906, 11724, 518, 29900, 1402, 472, 324, 29922, 29896, 29872, 29899, 29946, 29897, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29929, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29929, 11724, 518, 29900, 1402, 472, 324, 29922, 29896, 29872, 29899, 29941, 29897, 13, 268, 13, 1678, 297, 29886, 353, 7442, 29889, 294, 29888, 2378, 29898, 13, 4706, 518, 13, 9651, 518, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29906, 29892, 29871, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29946, 29892, 29871, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29953, 29892, 29871, 29900, 29889, 29955, 29892, 29871, 29900, 29889, 29947, 29892, 29871, 29900, 29889, 29929, 1402, 13, 9651, 518, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29946, 29892, 29871, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29906, 29892, 29871, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29929, 29892, 29871, 29900, 29889, 29947, 29892, 29871, 29900, 29889, 29955, 29892, 29871, 29900, 29889, 29953, 1402, 13, 4706, 4514, 13, 1678, 1723, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29896, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29896, 11724, 518, 29946, 29896, 29947, 29889, 29929, 29945, 29896, 29947, 29900, 29896, 29953, 29946, 29900, 29955, 29900, 29929, 29941, 29892, 29871, 29946, 29896, 29947, 29889, 29953, 29945, 29947, 29900, 29947, 29896, 29945, 29941, 29900, 29946, 29945, 29929, 29929, 1402, 472, 324, 29922, 29896, 29872, 29899, 29953, 29897, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29906, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29906, 11724, 518, 29947, 29941, 29955, 29889, 29947, 29946, 29947, 29906, 29896, 29900, 29953, 29955, 29906, 29929, 29896, 29947, 29946, 29892, 29871, 29947, 29941, 29955, 29889, 29946, 29900, 29946, 29945, 29941, 29900, 29953, 29947, 29941, 29945, 29955, 29941, 29929, 1402, 472, 324, 29922, 29896, 29872, 29899, 29953, 29897, 13, 1678, 4974, 7442, 29889, 497, 5358, 29898, 29879, 29929, 29889, 21134, 29898, 262, 29886, 7503, 29892, 29901, 29929, 11724, 518, 29941, 29955, 29953, 29955, 29889, 29955, 29896, 29953, 29946, 29896, 29900, 29900, 29945, 29941, 29906, 29953, 29941, 29892, 29871, 29941, 29955, 29953, 29955, 29889, 29955, 29896, 29953, 29946, 29896, 29900, 29900, 29945, 29941, 29906, 29953, 29941, 1402, 472, 324, 29922, 29896, 29872, 29899, 29953, 29897, 13, 13, 1678, 396, 8340, 10970, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 29879, 828, 29890, 29889, 13919, 9329, 2392, 1125, 13, 4706, 269, 29906, 29889, 21134, 29898, 262, 29886, 29897, 13, 2 ]
demos/wqztemplate/app.py
13871433675/helloflask
0
127877
from flask import Flask, render_template app = Flask(__name__) namelist = ['chengli', 'qizhi', 'zhangsan', 'wangqizhi'] name2 = 'wangqizhi' user = { 'username': 'Grey Li', 'bio': 'A boy who loves movies and music.', } movies = [ {'name': 'My Neighbor Totoro', 'year': '1988'}, {'name': 'Three Colours trilogy', 'year': '1993'}, {'name': 'Forrest Gump', 'year': '1994'}, {'name': 'Perfect Blue', 'year': '1997'}, {'name': 'The Matrix', 'year': '1999'}, {'name': 'Memento', 'year': '2000'}, {'name': 'The Bucket list', 'year': '2007'}, {'name': 'Black Swan', 'year': '2010'}, {'name': 'Gone Girl', 'year': '2014'}, {'name': 'CoCo', 'year': '2017'}, ] mylist = ['list01', 'list02'] mydic = {'name': 'dicname'} @app.route('/') def index(): return render_template('index.html', movies=movies, name2=name2, mylist=mylist, mydic=mydic) @app.template_global() def test(): return "method test!"
[ 1, 515, 29784, 1053, 2379, 1278, 29892, 4050, 29918, 6886, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29897, 13, 13, 8588, 295, 391, 353, 6024, 305, 996, 492, 742, 525, 29939, 466, 2918, 742, 525, 29920, 11895, 28455, 742, 525, 29893, 574, 29939, 466, 2918, 2033, 13, 13, 978, 29906, 353, 525, 29893, 574, 29939, 466, 2918, 29915, 13, 13, 1792, 353, 426, 13, 1678, 525, 6786, 2396, 525, 29954, 8903, 2718, 742, 13, 1678, 525, 24840, 2396, 525, 29909, 8023, 1058, 12355, 267, 2351, 583, 322, 4696, 29889, 742, 13, 29913, 13, 13529, 583, 353, 518, 13, 1678, 11117, 978, 2396, 525, 3421, 2448, 1141, 4089, 19013, 5801, 742, 525, 6360, 2396, 525, 29896, 29929, 29947, 29947, 16675, 13, 1678, 11117, 978, 2396, 525, 28575, 1530, 2470, 534, 309, 6933, 742, 525, 6360, 2396, 525, 29896, 29929, 29929, 29941, 16675, 13, 1678, 11117, 978, 2396, 525, 2831, 5060, 402, 3427, 742, 525, 6360, 2396, 525, 29896, 29929, 29929, 29946, 16675, 13, 1678, 11117, 978, 2396, 525, 5894, 3647, 10924, 742, 525, 6360, 2396, 525, 29896, 29929, 29929, 29955, 16675, 13, 1678, 11117, 978, 2396, 525, 1576, 22513, 742, 525, 6360, 2396, 525, 29896, 29929, 29929, 29929, 16675, 13, 1678, 11117, 978, 2396, 525, 13922, 742, 525, 6360, 2396, 525, 29906, 29900, 29900, 29900, 16675, 13, 1678, 11117, 978, 2396, 525, 1576, 16281, 300, 1051, 742, 525, 6360, 2396, 525, 29906, 29900, 29900, 29955, 16675, 13, 1678, 11117, 978, 2396, 525, 18700, 3925, 273, 742, 525, 6360, 2396, 525, 29906, 29900, 29896, 29900, 16675, 13, 1678, 11117, 978, 2396, 525, 29954, 650, 18620, 742, 525, 6360, 2396, 525, 29906, 29900, 29896, 29946, 16675, 13, 1678, 11117, 978, 2396, 525, 7967, 7967, 742, 525, 6360, 2396, 525, 29906, 29900, 29896, 29955, 16675, 13, 29962, 13, 13, 1357, 1761, 353, 6024, 1761, 29900, 29896, 742, 525, 1761, 29900, 29906, 2033, 13, 1357, 27774, 353, 11117, 978, 2396, 525, 27774, 978, 10827, 13, 13, 13, 29992, 932, 29889, 13134, 11219, 1495, 13, 1753, 2380, 7295, 13, 1678, 736, 4050, 29918, 6886, 877, 2248, 29889, 1420, 742, 2351, 583, 29922, 13529, 583, 29892, 1024, 29906, 29922, 978, 29906, 29892, 590, 1761, 29922, 1357, 1761, 29892, 590, 27774, 29922, 1357, 27774, 29897, 13, 13, 13, 29992, 932, 29889, 6886, 29918, 10945, 580, 13, 1753, 1243, 7295, 13, 1678, 736, 376, 5696, 1243, 3850, 13, 2 ]
setup.py
BerkeleyGW/BGWpy
27
71104
from __future__ import print_function import sys import os from glob import glob import shutil try: import setuptools except ImportError: sys.stderr.write( "Please install setuptools before running this script. Exiting.") sys.exit(1) from setuptools import setup, find_packages # --------------------------------------------------------------------------- # # Basic project information # --------------------------------------------------------------------------- # name = 'BGWpy' description = 'Interface BerkeleyGW flows in python.' license = 'BSD' url = 'https://github.com/BerkeleyGW/BGWpy' __version__ = '3.1.4' # author and author_email should be a single string, not a list, but we can put # multiple authors / emails by separating them by commas inside the string. # If you contributed to this package, add your name and email. Don't be shy! author = '<NAME>' author_email = '<EMAIL>' # Requirements install_requires = [ 'numpy >=1.6', 'pymatgen >=2020', ] # --------------------------------------------------------------------------- # # Helper functions # --------------------------------------------------------------------------- # def find_package_data(): package_data={'BGWpy': ['data/structures/*', 'data/pseudos/*']} return package_data def find_data_files(): return [('config', ['config/BGWpyrc'])] def find_scripts(): scripts = [] scripts.extend(glob(os.path.join('BGWpy', 'scripts', "*.py"))) return scripts def cleanup(): print('Cleaning up') shutil.rmtree('BGWpy.egg-info', ignore_errors=True) shutil.rmtree('build', ignore_errors=True) shutil.rmtree('__pycache__', ignore_errors=True) # --------------------------------------------------------------------------- # # Setup # --------------------------------------------------------------------------- # setup_args = dict( name = name, version = __version__, description = description, author = author, author_email = author_email, license = license, url = url, install_requires = install_requires, packages = find_packages(), package_data = find_package_data(), data_files = find_data_files(), scripts = find_scripts(), ) if __name__ == "__main__": setup(**setup_args)
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 5215, 10876, 13, 5215, 2897, 13, 3166, 13149, 1053, 13149, 13, 5215, 528, 4422, 13, 13, 2202, 29901, 13, 1678, 1053, 731, 21245, 8789, 13, 19499, 16032, 2392, 29901, 13, 1678, 10876, 29889, 303, 20405, 29889, 3539, 29898, 13, 1678, 376, 12148, 2601, 731, 21245, 8789, 1434, 2734, 445, 2471, 29889, 1222, 11407, 23157, 13, 1678, 10876, 29889, 13322, 29898, 29896, 29897, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 29937, 19219, 2060, 2472, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 13, 978, 353, 525, 29933, 29954, 29956, 2272, 29915, 13, 8216, 353, 525, 10448, 2292, 27279, 29954, 29956, 24536, 297, 3017, 6169, 13, 506, 1947, 353, 525, 29933, 7230, 29915, 13, 2271, 353, 525, 991, 597, 3292, 29889, 510, 29914, 17104, 27279, 29954, 29956, 29914, 29933, 29954, 29956, 2272, 29915, 13, 1649, 3259, 1649, 353, 525, 29941, 29889, 29896, 29889, 29946, 29915, 13, 13, 29937, 4148, 322, 4148, 29918, 5269, 881, 367, 263, 2323, 1347, 29892, 451, 263, 1051, 29892, 541, 591, 508, 1925, 13, 29937, 2999, 15717, 847, 24609, 491, 2903, 1218, 963, 491, 844, 294, 2768, 278, 1347, 29889, 13, 29937, 960, 366, 26869, 304, 445, 3577, 29892, 788, 596, 1024, 322, 4876, 29889, 3872, 29915, 29873, 367, 528, 29891, 29991, 13, 8921, 353, 12801, 5813, 16299, 13, 8921, 29918, 5269, 353, 12801, 26862, 6227, 16299, 13, 13, 13, 29937, 830, 1548, 1860, 13, 6252, 29918, 276, 339, 2658, 353, 518, 13, 1678, 525, 23749, 6736, 29896, 29889, 29953, 742, 13, 1678, 525, 29886, 962, 271, 1885, 6736, 29906, 29900, 29906, 29900, 742, 13, 1678, 4514, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 29937, 6162, 546, 3168, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 13, 1753, 1284, 29918, 5113, 29918, 1272, 7295, 13, 1678, 3577, 29918, 1272, 3790, 29915, 29933, 29954, 29956, 2272, 2396, 6024, 1272, 29914, 4984, 1973, 5515, 742, 525, 1272, 29914, 27358, 566, 359, 5515, 2033, 29913, 13, 1678, 736, 3577, 29918, 1272, 13, 13, 1753, 1284, 29918, 1272, 29918, 5325, 7295, 13, 1678, 736, 518, 877, 2917, 742, 6024, 2917, 29914, 29933, 29954, 29956, 2272, 2214, 2033, 4638, 13, 13, 1753, 1284, 29918, 16713, 7295, 13, 1678, 12078, 353, 5159, 13, 1678, 12078, 29889, 21843, 29898, 23705, 29898, 359, 29889, 2084, 29889, 7122, 877, 29933, 29954, 29956, 2272, 742, 525, 16713, 742, 376, 10521, 2272, 29908, 4961, 13, 1678, 736, 12078, 13, 13, 1753, 5941, 786, 7295, 13, 1678, 1596, 877, 29907, 14044, 292, 701, 1495, 13, 1678, 528, 4422, 29889, 1758, 8336, 877, 29933, 29954, 29956, 2272, 29889, 387, 29887, 29899, 3888, 742, 11455, 29918, 12523, 29922, 5574, 29897, 13, 1678, 528, 4422, 29889, 1758, 8336, 877, 4282, 742, 11455, 29918, 12523, 29922, 5574, 29897, 13, 1678, 528, 4422, 29889, 1758, 8336, 877, 1649, 2272, 8173, 1649, 742, 11455, 29918, 12523, 29922, 5574, 29897, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 29937, 3789, 786, 13, 29937, 448, 2683, 2683, 2683, 2683, 28400, 396, 13, 13, 14669, 29918, 5085, 353, 9657, 29898, 13, 418, 1024, 795, 353, 1024, 29892, 13, 418, 1873, 965, 353, 4770, 3259, 1649, 29892, 13, 418, 6139, 539, 353, 6139, 29892, 13, 418, 4148, 9651, 353, 4148, 29892, 13, 418, 4148, 29918, 5269, 418, 353, 4148, 29918, 5269, 29892, 13, 418, 19405, 965, 353, 19405, 29892, 13, 418, 3142, 1669, 353, 3142, 29892, 13, 418, 2601, 29918, 276, 339, 2658, 29871, 353, 2601, 29918, 276, 339, 2658, 29892, 13, 418, 9741, 3986, 353, 1284, 29918, 8318, 3285, 13, 418, 3577, 29918, 1272, 418, 353, 1284, 29918, 5113, 29918, 1272, 3285, 13, 418, 848, 29918, 5325, 4706, 353, 1284, 29918, 1272, 29918, 5325, 3285, 13, 418, 12078, 965, 353, 1284, 29918, 16713, 3285, 29871, 13, 418, 1723, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 6230, 29898, 1068, 14669, 29918, 5085, 29897, 13, 13, 2 ]
data/ebmnlp/stream.py
bepnye/tf_ner
0
19647
import os import data_utils from pathlib import Path top_path = Path(os.path.dirname(os.path.abspath(__file__))) EBM_NLP = Path('/Users/ben/Desktop/ebm_nlp/repo/ebm_nlp_2_00/') NO_LABEL = '0' def overwrite_tags(new_tags, tags): for i, t in enumerate(new_tags): if t != NO_LABEL: tags[i] = t def get_tags(d): pmid_tags = {} for e in ['participants', 'interventions', 'outcomes']: for a in (EBM_NLP / 'annotations' / 'aggregated' / 'starting_spans' / e / d).glob('*.ann'): pmid = a.stem.split('.')[0] tags = a.open().read().split() tags = [e[0] if t == '1' else NO_LABEL for t in tags] if pmid not in pmid_tags: pmid_tags[pmid] = tags else: overwrite_tags(tags, pmid_tags[pmid]) return pmid_tags def get_words(pmids): return { pmid: (EBM_NLP / 'documents' / '{}.tokens'.format(pmid)).open().read().split() for pmid in pmids } def get_seqs(tag_d, word_d, keys): tag_seqs = [] word_seqs = [] for k in keys: words, tags = data_utils.generate_seqs(word_d[k], tag_d[k]) tag_seqs += tags word_seqs += words return word_seqs, tag_seqs TRAIN_TAG_D = get_tags(Path('train/')) TRAIN_PMIDS = sorted(TRAIN_TAG_D.keys()) TRAIN_WORD_D = get_words(TRAIN_PMIDS) TRAIN_WORDS, TRAIN_TAGS = get_seqs(TRAIN_TAG_D, TRAIN_WORD_D, TRAIN_PMIDS) TEST_TAG_D = get_tags(Path('test/gold/')) TEST_PMIDS = sorted(TEST_TAG_D.keys()) TEST_WORD_D = get_words(TEST_PMIDS) TEST_WORDS, TEST_TAGS = get_seqs(TEST_TAG_D, TEST_WORD_D, TEST_PMIDS) def train_words(): return TRAIN_WORDS def train_tags(): return TRAIN_TAGS def test_words(): return TEST_WORDS def test_tags(): return TEST_TAGS def word_embeddings(): return ((top_path / '..' / 'embeddings' / 'glove.840B.300d.txt').open(), 300)
[ 1, 1053, 2897, 13, 5215, 848, 29918, 13239, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 3332, 29918, 2084, 353, 10802, 29898, 359, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 4961, 13, 25752, 29924, 29918, 29940, 13208, 353, 10802, 11219, 5959, 29914, 1785, 29914, 17600, 29914, 774, 29885, 29918, 12938, 29886, 29914, 20095, 29914, 774, 29885, 29918, 12938, 29886, 29918, 29906, 29918, 29900, 29900, 29914, 1495, 13, 6632, 29918, 24461, 6670, 353, 525, 29900, 29915, 13, 13, 1753, 26556, 29918, 11338, 29898, 1482, 29918, 11338, 29892, 8282, 1125, 13, 29871, 363, 474, 29892, 260, 297, 26985, 29898, 1482, 29918, 11338, 1125, 13, 1678, 565, 260, 2804, 11698, 29918, 24461, 6670, 29901, 13, 418, 8282, 29961, 29875, 29962, 353, 260, 13, 13, 1753, 679, 29918, 11338, 29898, 29881, 1125, 13, 29871, 282, 6563, 29918, 11338, 353, 6571, 13, 29871, 363, 321, 297, 6024, 1595, 12654, 1934, 742, 525, 1639, 794, 1080, 742, 525, 449, 26807, 2033, 29901, 13, 1678, 363, 263, 297, 313, 25752, 29924, 29918, 29940, 13208, 847, 525, 6735, 800, 29915, 847, 525, 26193, 630, 29915, 847, 525, 2962, 292, 29918, 1028, 550, 29915, 847, 321, 847, 270, 467, 23705, 877, 10521, 812, 29374, 13, 418, 282, 6563, 353, 263, 29889, 303, 331, 29889, 5451, 12839, 29861, 29900, 29962, 13, 418, 8282, 353, 263, 29889, 3150, 2141, 949, 2141, 5451, 580, 13, 418, 8282, 353, 518, 29872, 29961, 29900, 29962, 565, 260, 1275, 525, 29896, 29915, 1683, 11698, 29918, 24461, 6670, 363, 260, 297, 8282, 29962, 13, 418, 565, 282, 6563, 451, 297, 282, 6563, 29918, 11338, 29901, 13, 4706, 282, 6563, 29918, 11338, 29961, 3358, 333, 29962, 353, 8282, 13, 418, 1683, 29901, 13, 4706, 26556, 29918, 11338, 29898, 11338, 29892, 282, 6563, 29918, 11338, 29961, 3358, 333, 2314, 13, 29871, 736, 282, 6563, 29918, 11338, 13, 13, 1753, 679, 29918, 9303, 29898, 3358, 4841, 1125, 13, 29871, 736, 426, 282, 6563, 29901, 313, 25752, 29924, 29918, 29940, 13208, 847, 525, 3225, 29879, 29915, 847, 22372, 1836, 517, 12360, 4286, 4830, 29898, 3358, 333, 8106, 3150, 2141, 949, 2141, 5451, 580, 363, 282, 6563, 297, 26354, 4841, 500, 13, 13, 1753, 679, 29918, 11762, 29879, 29898, 4039, 29918, 29881, 29892, 1734, 29918, 29881, 29892, 6611, 1125, 13, 29871, 4055, 29918, 11762, 29879, 353, 5159, 13, 29871, 1734, 29918, 11762, 29879, 353, 5159, 13, 29871, 363, 413, 297, 6611, 29901, 13, 1678, 3838, 29892, 8282, 353, 848, 29918, 13239, 29889, 17158, 29918, 11762, 29879, 29898, 1742, 29918, 29881, 29961, 29895, 1402, 4055, 29918, 29881, 29961, 29895, 2314, 13, 1678, 4055, 29918, 11762, 29879, 4619, 8282, 13, 1678, 1734, 29918, 11762, 29879, 4619, 3838, 13, 29871, 736, 1734, 29918, 11762, 29879, 29892, 4055, 29918, 11762, 29879, 13, 13, 29911, 4717, 1177, 29918, 16881, 29918, 29928, 353, 679, 29918, 11338, 29898, 2605, 877, 14968, 29914, 8785, 13, 29911, 4717, 1177, 29918, 13427, 1367, 29903, 353, 12705, 29898, 29911, 4717, 1177, 29918, 16881, 29918, 29928, 29889, 8149, 3101, 13, 29911, 4717, 1177, 29918, 17013, 29918, 29928, 353, 679, 29918, 9303, 29898, 29911, 4717, 1177, 29918, 13427, 1367, 29903, 29897, 13, 13, 29911, 4717, 1177, 29918, 11686, 8452, 29892, 323, 4717, 1177, 29918, 6040, 10749, 353, 679, 29918, 11762, 29879, 29898, 29911, 4717, 1177, 29918, 16881, 29918, 29928, 29892, 323, 4717, 1177, 29918, 17013, 29918, 29928, 29892, 323, 4717, 1177, 29918, 13427, 1367, 29903, 29897, 13, 13, 18267, 29918, 16881, 29918, 29928, 353, 679, 29918, 11338, 29898, 2605, 877, 1688, 29914, 29887, 1025, 29914, 8785, 13, 18267, 29918, 13427, 1367, 29903, 353, 12705, 29898, 18267, 29918, 16881, 29918, 29928, 29889, 8149, 3101, 13, 18267, 29918, 17013, 29918, 29928, 353, 679, 29918, 9303, 29898, 18267, 29918, 13427, 1367, 29903, 29897, 13, 13, 18267, 29918, 11686, 8452, 29892, 17067, 1254, 29918, 6040, 10749, 353, 679, 29918, 11762, 29879, 29898, 18267, 29918, 16881, 29918, 29928, 29892, 17067, 1254, 29918, 17013, 29918, 29928, 29892, 17067, 1254, 29918, 13427, 1367, 29903, 29897, 13, 13, 1753, 7945, 29918, 9303, 7295, 13, 29871, 736, 323, 4717, 1177, 29918, 11686, 8452, 13, 1753, 7945, 29918, 11338, 7295, 13, 29871, 736, 323, 4717, 1177, 29918, 6040, 10749, 13, 1753, 1243, 29918, 9303, 7295, 13, 29871, 736, 17067, 1254, 29918, 11686, 8452, 13, 1753, 1243, 29918, 11338, 7295, 13, 29871, 736, 17067, 1254, 29918, 6040, 10749, 13, 13, 1753, 1734, 29918, 17987, 29881, 886, 7295, 13, 29871, 736, 29871, 5135, 3332, 29918, 2084, 847, 525, 636, 29915, 847, 525, 17987, 29881, 886, 29915, 847, 525, 29887, 417, 345, 29889, 29947, 29946, 29900, 29933, 29889, 29941, 29900, 29900, 29881, 29889, 3945, 2824, 3150, 3285, 29871, 29941, 29900, 29900, 29897, 13, 2 ]
noxfile.py
Juh10/pytd
16
191865
<filename>noxfile.py import nox @nox.session def lint(session): lint_tools = ["black", "isort", "flake8"] targets = ["pytd", "setup.py", "noxfile.py"] session.install(*lint_tools) session.run("flake8", *targets) session.run("black", "--diff", "--check", *targets) session.run("isort", "--diff", "--check", *targets) @nox.session @nox.parametrize("pandas", ["0.25.3", "1.0.1"]) def tests(session, pandas): session.install(".[test,spark]") session.install(f"pandas=={pandas}") session.run("pytest", "-v")
[ 1, 529, 9507, 29958, 1217, 29916, 1445, 29889, 2272, 13, 5215, 694, 29916, 13, 13, 13, 29992, 1217, 29916, 29889, 7924, 13, 1753, 301, 524, 29898, 7924, 1125, 13, 1678, 301, 524, 29918, 8504, 353, 6796, 8517, 613, 376, 275, 441, 613, 376, 29888, 433, 446, 29947, 3108, 13, 1678, 22525, 353, 6796, 2272, 1594, 613, 376, 14669, 29889, 2272, 613, 376, 1217, 29916, 1445, 29889, 2272, 3108, 13, 1678, 4867, 29889, 6252, 10456, 27854, 29918, 8504, 29897, 13, 1678, 4867, 29889, 3389, 703, 29888, 433, 446, 29947, 613, 334, 5182, 29879, 29897, 13, 1678, 4867, 29889, 3389, 703, 8517, 613, 376, 489, 12765, 613, 376, 489, 3198, 613, 334, 5182, 29879, 29897, 13, 1678, 4867, 29889, 3389, 703, 275, 441, 613, 376, 489, 12765, 613, 376, 489, 3198, 613, 334, 5182, 29879, 29897, 13, 13, 13, 29992, 1217, 29916, 29889, 7924, 13, 29992, 1217, 29916, 29889, 3207, 300, 374, 911, 703, 15112, 613, 6796, 29900, 29889, 29906, 29945, 29889, 29941, 613, 376, 29896, 29889, 29900, 29889, 29896, 20068, 13, 1753, 6987, 29898, 7924, 29892, 11701, 1125, 13, 1678, 4867, 29889, 6252, 703, 7226, 1688, 29892, 12597, 29962, 1159, 13, 1678, 4867, 29889, 6252, 29898, 29888, 29908, 15112, 1360, 29912, 15112, 27195, 13, 1678, 4867, 29889, 3389, 703, 2272, 1688, 613, 11663, 29894, 1159, 13, 2 ]
BinaryImageRec/2-class+Demo.py
apur27/public
1
109063
<filename>BinaryImageRec/2-class+Demo.py<gh_stars>1-10 # coding: utf-8 # In[ ]: # In[5]: # Building the CNN from keras.models import Sequential from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense # Initializing the CNN classifier = Sequential() # Step 1 - Convolution classifier.add(Convolution2D(32, 3, 3, input_shape = (64, 64, 3),activation = 'relu')) # Step 2 - Max Pooling classifier.add(MaxPooling2D(pool_size = (2,2))) # Adding a second convolution layer classifier.add(Convolution2D(32, 3, 3, activation = 'relu')) classifier.add(MaxPooling2D(pool_size = (2,2))) # Adding a third convolution layer classifier.add(Convolution2D(64, 3, 3, activation = 'relu')) classifier.add(MaxPooling2D(pool_size = (2,2))) # Step 3 - Flattening classifier.add(Flatten()) # Step 4 - Full Connection classifier.add(Dense(output_dim = 128, activation= 'relu')) classifier.add(Dense(output_dim = 1, activation= 'sigmoid')) # Compiling the CNN classifier.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy']) # Part 2 - Fitting the CNN to the image from keras.preprocessing.image import ImageDataGenerator train_datagen = ImageDataGenerator( rescale=1./255, shear_range=0.2, zoom_range=0.2, horizontal_flip=True) test_datagen = ImageDataGenerator(rescale=1./255) train_generator = train_datagen.flow_from_directory( '/home/demo/TrainingData', target_size=(64, 64), batch_size=10, class_mode='binary') validation_generator = test_datagen.flow_from_directory( '/home/demo/ValidationData', target_size=(64, 64), batch_size=5, class_mode='binary') classifier.fit_generator( train_generator, samples_per_epoch=2000, epochs=5, validation_data=validation_generator, validation_steps=800) import numpy as np from keras.preprocessing import image test_image = image.load_img( '/home/Prediction/325109432-4_3_Q25_00200559_000009.jpg',target_size=(64, 64)) test_image = image.img_to_array(test_image) test_image = np.expand_dims(test_image, axis = 0) result = classifier.predict(test_image) print (result) print (train_generator.class_indices) # In[6]: test_image = image.load_img( '/home/demo/Prediction/325047821-3_3_Q39_00204704_000015.jpg',target_size=(64, 64)) test_image = image.img_to_array(test_image) test_image = np.expand_dims(test_image, axis = 0) result = classifier.predict(test_image) print (result) print (train_generator.class_indices) # In[7]: test_image = image.load_img( '/home/demo/Prediction/325047821-3_3_Q39_00204704_000015.jpg',target_size=(64, 64)) test_image = image.img_to_array(test_image) test_image = np.expand_dims(test_image, axis = 0) result = classifier.predict(test_image) print (result) print (train_generator.class_indices) # In[8]: test_image = image.load_img( '/home/demo/Prediction/325109299-1_3_Q25_00205691_000031.jpg',target_size=(64, 64)) test_image = image.img_to_array(test_image) test_image = np.expand_dims(test_image, axis = 0) result = classifier.predict(test_image) print (result) print (train_generator.class_indices)
[ 1, 529, 9507, 29958, 25196, 2940, 4789, 29914, 29906, 29899, 1990, 29974, 23444, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 512, 29961, 4514, 29901, 13, 13, 13, 13, 13, 13, 29937, 512, 29961, 29945, 5387, 13, 13, 13, 29937, 17166, 278, 29696, 13, 13, 3166, 13023, 294, 29889, 9794, 1053, 922, 339, 2556, 13, 3166, 13023, 294, 29889, 29277, 1053, 1281, 4068, 29906, 29928, 13, 3166, 13023, 294, 29889, 29277, 1053, 5918, 11426, 292, 29906, 29928, 13, 3166, 13023, 294, 29889, 29277, 1053, 2379, 8606, 13, 3166, 13023, 294, 29889, 29277, 1053, 360, 1947, 13, 13, 29937, 17250, 5281, 278, 29696, 13, 1990, 3709, 353, 922, 339, 2556, 580, 13, 13, 29937, 16696, 29871, 29896, 448, 1281, 4068, 13, 1990, 3709, 29889, 1202, 29898, 1168, 4068, 29906, 29928, 29898, 29941, 29906, 29892, 29871, 29941, 29892, 29871, 29941, 29892, 1881, 29918, 12181, 353, 313, 29953, 29946, 29892, 29871, 29953, 29946, 29892, 29871, 29941, 511, 11236, 362, 353, 525, 2674, 29884, 8785, 13, 13, 13, 29937, 16696, 29871, 29906, 448, 5918, 28625, 292, 13, 1990, 3709, 29889, 1202, 29898, 7976, 11426, 292, 29906, 29928, 29898, 10109, 29918, 2311, 353, 313, 29906, 29892, 29906, 4961, 13, 13, 29937, 18804, 263, 1473, 26851, 7546, 13, 1990, 3709, 29889, 1202, 29898, 1168, 4068, 29906, 29928, 29898, 29941, 29906, 29892, 29871, 29941, 29892, 29871, 29941, 29892, 26229, 353, 525, 2674, 29884, 8785, 13, 1990, 3709, 29889, 1202, 29898, 7976, 11426, 292, 29906, 29928, 29898, 10109, 29918, 2311, 353, 313, 29906, 29892, 29906, 4961, 13, 13, 29937, 18804, 263, 4654, 26851, 7546, 13, 1990, 3709, 29889, 1202, 29898, 1168, 4068, 29906, 29928, 29898, 29953, 29946, 29892, 29871, 29941, 29892, 29871, 29941, 29892, 26229, 353, 525, 2674, 29884, 8785, 13, 1990, 3709, 29889, 1202, 29898, 7976, 11426, 292, 29906, 29928, 29898, 10109, 29918, 2311, 353, 313, 29906, 29892, 29906, 4961, 13, 13, 29937, 16696, 29871, 29941, 448, 2379, 8606, 292, 13, 1990, 3709, 29889, 1202, 29898, 29943, 5066, 841, 3101, 13, 13, 29937, 16696, 29871, 29946, 448, 14846, 15160, 13, 1990, 3709, 29889, 1202, 29898, 29928, 1947, 29898, 4905, 29918, 6229, 353, 29871, 29896, 29906, 29947, 29892, 26229, 29922, 525, 2674, 29884, 8785, 13, 1990, 3709, 29889, 1202, 29898, 29928, 1947, 29898, 4905, 29918, 6229, 353, 29871, 29896, 29892, 26229, 29922, 525, 18816, 29885, 3398, 8785, 13, 13, 13, 29937, 3831, 6504, 278, 29696, 13, 1990, 3709, 29889, 12198, 29898, 20640, 3950, 353, 525, 328, 314, 742, 6410, 353, 525, 19541, 29918, 19128, 296, 14441, 742, 21556, 353, 6024, 562, 2764, 4135, 11287, 13, 13, 29937, 3455, 29871, 29906, 448, 383, 5367, 278, 29696, 304, 278, 1967, 13, 3166, 13023, 294, 29889, 1457, 19170, 29889, 3027, 1053, 7084, 1469, 21575, 13, 13, 14968, 29918, 4130, 5370, 353, 7084, 1469, 21575, 29898, 13, 4706, 620, 29883, 744, 29922, 29896, 6904, 29906, 29945, 29945, 29892, 13, 4706, 1183, 279, 29918, 3881, 29922, 29900, 29889, 29906, 29892, 13, 4706, 19342, 29918, 3881, 29922, 29900, 29889, 29906, 29892, 13, 4706, 14698, 29918, 29888, 3466, 29922, 5574, 29897, 13, 13, 1688, 29918, 4130, 5370, 353, 7084, 1469, 21575, 29898, 690, 29883, 744, 29922, 29896, 6904, 29906, 29945, 29945, 29897, 13, 13, 14968, 29918, 27959, 353, 7945, 29918, 4130, 5370, 29889, 1731, 29918, 3166, 29918, 12322, 29898, 13, 4706, 8207, 5184, 29914, 17482, 29914, 5323, 2827, 1469, 742, 13, 4706, 3646, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 511, 13, 4706, 9853, 29918, 2311, 29922, 29896, 29900, 29892, 13, 4706, 770, 29918, 8513, 2433, 19541, 1495, 13, 13, 18157, 29918, 27959, 353, 1243, 29918, 4130, 5370, 29889, 1731, 29918, 3166, 29918, 12322, 29898, 13, 4706, 8207, 5184, 29914, 17482, 29914, 19448, 1469, 742, 13, 4706, 3646, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 511, 13, 4706, 9853, 29918, 2311, 29922, 29945, 29892, 13, 4706, 770, 29918, 8513, 2433, 19541, 1495, 13, 13, 1990, 3709, 29889, 9202, 29918, 27959, 29898, 13, 4706, 7945, 29918, 27959, 29892, 13, 4706, 11916, 29918, 546, 29918, 1022, 2878, 29922, 29906, 29900, 29900, 29900, 29892, 13, 4706, 21502, 12168, 29922, 29945, 29892, 13, 4706, 8845, 29918, 1272, 29922, 18157, 29918, 27959, 29892, 13, 4706, 8845, 29918, 24530, 29922, 29947, 29900, 29900, 29897, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 13023, 294, 29889, 1457, 19170, 1053, 1967, 13, 1688, 29918, 3027, 353, 1967, 29889, 1359, 29918, 2492, 29898, 8207, 5184, 29914, 23084, 2463, 29914, 29941, 29906, 29945, 29896, 29900, 29929, 29946, 29941, 29906, 29899, 29946, 29918, 29941, 29918, 29984, 29906, 29945, 29918, 29900, 29900, 29906, 29900, 29900, 29945, 29945, 29929, 29918, 29900, 29900, 29900, 29900, 29900, 29929, 29889, 6173, 742, 5182, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 876, 13, 1688, 29918, 3027, 353, 1967, 29889, 2492, 29918, 517, 29918, 2378, 29898, 1688, 29918, 3027, 29897, 13, 1688, 29918, 3027, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 1688, 29918, 3027, 29892, 9685, 353, 29871, 29900, 29897, 13, 2914, 353, 770, 3709, 29889, 27711, 29898, 1688, 29918, 3027, 29897, 13, 2158, 313, 2914, 29897, 13, 2158, 313, 14968, 29918, 27959, 29889, 1990, 29918, 513, 1575, 29897, 13, 13, 13, 29937, 512, 29961, 29953, 5387, 13, 13, 13, 1688, 29918, 3027, 353, 1967, 29889, 1359, 29918, 2492, 29898, 8207, 5184, 29914, 17482, 29914, 23084, 2463, 29914, 29941, 29906, 29945, 29900, 29946, 29955, 29947, 29906, 29896, 29899, 29941, 29918, 29941, 29918, 29984, 29941, 29929, 29918, 29900, 29900, 29906, 29900, 29946, 29955, 29900, 29946, 29918, 29900, 29900, 29900, 29900, 29896, 29945, 29889, 6173, 742, 5182, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 876, 13, 1688, 29918, 3027, 353, 1967, 29889, 2492, 29918, 517, 29918, 2378, 29898, 1688, 29918, 3027, 29897, 13, 1688, 29918, 3027, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 1688, 29918, 3027, 29892, 9685, 353, 29871, 29900, 29897, 13, 2914, 353, 770, 3709, 29889, 27711, 29898, 1688, 29918, 3027, 29897, 13, 2158, 313, 2914, 29897, 13, 2158, 313, 14968, 29918, 27959, 29889, 1990, 29918, 513, 1575, 29897, 13, 13, 13, 29937, 512, 29961, 29955, 5387, 13, 13, 13, 1688, 29918, 3027, 353, 1967, 29889, 1359, 29918, 2492, 29898, 8207, 5184, 29914, 17482, 29914, 23084, 2463, 29914, 29941, 29906, 29945, 29900, 29946, 29955, 29947, 29906, 29896, 29899, 29941, 29918, 29941, 29918, 29984, 29941, 29929, 29918, 29900, 29900, 29906, 29900, 29946, 29955, 29900, 29946, 29918, 29900, 29900, 29900, 29900, 29896, 29945, 29889, 6173, 742, 5182, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 876, 13, 1688, 29918, 3027, 353, 1967, 29889, 2492, 29918, 517, 29918, 2378, 29898, 1688, 29918, 3027, 29897, 13, 1688, 29918, 3027, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 1688, 29918, 3027, 29892, 9685, 353, 29871, 29900, 29897, 13, 2914, 353, 770, 3709, 29889, 27711, 29898, 1688, 29918, 3027, 29897, 13, 2158, 313, 2914, 29897, 13, 2158, 313, 14968, 29918, 27959, 29889, 1990, 29918, 513, 1575, 29897, 13, 13, 13, 29937, 512, 29961, 29947, 5387, 13, 13, 13, 1688, 29918, 3027, 353, 1967, 29889, 1359, 29918, 2492, 29898, 8207, 5184, 29914, 17482, 29914, 23084, 2463, 29914, 29941, 29906, 29945, 29896, 29900, 29929, 29906, 29929, 29929, 29899, 29896, 29918, 29941, 29918, 29984, 29906, 29945, 29918, 29900, 29900, 29906, 29900, 29945, 29953, 29929, 29896, 29918, 29900, 29900, 29900, 29900, 29941, 29896, 29889, 6173, 742, 5182, 29918, 2311, 7607, 29953, 29946, 29892, 29871, 29953, 29946, 876, 13, 1688, 29918, 3027, 353, 1967, 29889, 2492, 29918, 517, 29918, 2378, 29898, 1688, 29918, 3027, 29897, 13, 1688, 29918, 3027, 353, 7442, 29889, 18837, 29918, 6229, 29879, 29898, 1688, 29918, 3027, 29892, 9685, 353, 29871, 29900, 29897, 13, 2914, 353, 770, 3709, 29889, 27711, 29898, 1688, 29918, 3027, 29897, 13, 2158, 313, 2914, 29897, 13, 2158, 313, 14968, 29918, 27959, 29889, 1990, 29918, 513, 1575, 29897, 13, 13, 2 ]
teacher/admin.py
Swarda6/TCS-Project
0
153135
<reponame>Swarda6/TCS-Project from django.contrib import admin from .models import Teacher admin.site.register(Teacher) # Register your models here.
[ 1, 529, 276, 1112, 420, 29958, 29903, 1328, 29874, 29953, 29914, 29911, 9295, 29899, 7653, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 869, 9794, 1053, 1920, 11665, 13, 6406, 29889, 2746, 29889, 9573, 29898, 29911, 4204, 261, 29897, 13, 13, 13, 29937, 12577, 596, 4733, 1244, 29889, 13, 2 ]
src/geni.py
hhugo/General
7
138473
<reponame>hhugo/General import itertools import functools import os import sys import textwrap max_arity = 6 def generate(*element, **kwds): p = functools.partial(print, file=kwds.get("file")) previous_line_was_end = False for line in indent(element, kwds.get("indent", 0)): line_is_end = line.strip() == "end" if previous_line_was_end and not line_is_end: p("") p(line) previous_line_was_end = line_is_end def indent(element, levels=1): if isinstance(element, str): yield f"{' ' * levels}{element}" else: for sub in element: yield from indent(sub, levels) class Facets: def __init__( self, *, prefix, name, variadic, bases, values, extensions, test_examples, test_requirements, ): self.prefix = prefix self.name = name self.bases = list(bases) self.max_arity = min(itertools.chain([max_arity], (i.max_arity for i in self.bases))) if variadic else 1 self.arities = list(range(self.max_arity)) self.non_zero_arities = list(range(1, self.max_arity)) self.values = list(values) self.extensions = list(extensions) self.all_items = list(itertools.chain( self.values, itertools.chain.from_iterable(extension.members for extension in self.extensions), )) self.operators = [item for item in self.all_items if item.operator is not None] self.test_examples = list(test_examples) self.test_requirements = list(test_requirements) @property def graphviz_label(self): parts = [self.name] if len(self.values) > 0: parts.append("") parts += [val.name for val in self.values] exts = [val.name for extension in self.extensions for val in extension.members] if len(exts) > 0: parts.append("") parts += exts return "\\n".join(parts) @property def specification(self): return mod_spec(self.name, self.specification_items) @property def implementation(self): return mod_impl(self.name, self.implementation_items) @property def specification_items(self): if self.__has_operators(): yield self.__operators_specification() if self.__is_basic(): yield self.__basic_specification_items() else: yield self.__extended_specification_items() yield self.__extension_makers_specification_items() yield self.__tests_specification() @property def implementation_items(self): if self.__has_operators(): yield self.__operators_implementation() if self.__is_basic(): yield self.__basic_implementation_items() else: yield self.__extended_implementation_items() yield self.__extensions_makers_implementation_items() yield self.__tests_implementation() def __contextualized_name(self, prefix): if prefix == self.prefix: return self.name else: return f"{self.prefix}.{self.name}" # Operators def __has_operators(self): return self.__has_own_operators() or self.__inherits_operators() def __has_own_operators(self): return len(self.operators) > 0 def __inherits_operators(self): return any(base.__has_operators() for base in self.bases) def __operators_specification(self): return mod_spec("Operators", self.__operators_specification_items()) def __operators_implementation(self): return mod_impl("Operators", self.__operators_implementation_items()) def __operators_specification_items(self): yield self.__operators_s0_mod_type() if len(self.operators) > 0: yield self.__operators_make0_specification() def __operators_implementation_items(self): yield self.__operators_s0_mod_type() if len(self.operators) > 0: yield self.__operators_make0_implementation() def __operators_s0_mod_type(self): return mod_type("S0", self.__operators_s0_mod_type_items()) def __operators_s0_mod_type_items(self): yield "type t" for base in self.bases: if base.__has_operators(): yield f"include {base.__contextualized_name(self.prefix)}.Operators.S0 with type t := t" for operator in self.operators: yield f"val ( {operator.operator} ): { operator.value_type(0, 't')}" def __operators_make0_specification(self): yield "module Make0(M: sig" yield " type t" for operator in self.operators: yield f" val {operator.name}: {operator.value_type(0, 't')}" yield "end): sig" for operator in self.operators: yield f" val ( {operator.operator} ): {operator.value_type(0, 'M.t')}" yield "end" def __operators_make0_implementation(self): yield "module Make0(M: sig" yield " type t" for operator in self.operators: yield f" val {operator.name}: {operator.value_type(0, f'{type_params(0)}t')}" yield "end) = struct" for operator in self.operators: yield f" let ( {operator.operator} ) = M.{operator.name}" yield "end" # Core contents: basic def __is_basic(self): return len(list(itertools.chain.from_iterable(extension.members for extension in self.extensions))) == 0 def __basic_specification_items(self): yield self.__basic_signature_mod_types() yield self.__basic_specialize_specifications() def __basic_implementation_items(self): yield self.__basic_signature_mod_types() yield self.__basic_specialize_implementations() def __basic_signature_mod_types(self): for arity in self.arities: yield mod_type(f"S{arity}", self.__basic_signature_mod_type_items(arity)) def __basic_signature_mod_type_items(self, arity): t = f"{type_params(arity)}t" yield f"type {t}" if arity == 0 and self.__has_operators() and self.__is_basic(): yield "module O: Operators.S0 with type t := t" for base in self.bases: if arity == 0 and base.__has_operators(): operators_constraint = " and module O := O" else: operators_constraint = "" yield f"include {base.__contextualized_name(self.prefix)}.S{arity} with type {t} := {t}{operators_constraint}" for value in self.values: yield f"val {value.name}: {value.value_type(arity, t)}" def __basic_specialize_specifications(self): for arity in self.non_zero_arities: functor_params = "".join(f"({a.upper()}: S0)" for a in abcd(arity)) yield mod_spec(f"Specialize{arity}(M: S{arity}){functor_params}", self.__specialize_specification_items(arity)) def __basic_specialize_implementations(self): for arity in self.non_zero_arities: functor_params = "".join(f"({a.upper()}: S0)" for a in abcd(arity)) yield mod_impl(f"Specialize{arity}(M: S{arity}){functor_params}", self.__basic_specialize_implementation_items(arity)) def __specialize_specification_items(self, arity): yield f"type t = {type_args(arity)}M.t", yield "include S0 with type t := t", def __basic_specialize_implementation_items(self, arity): yield f"type t = {type_args(arity)}M.t" functor_args = "".join(f"({a.upper()})" for a in abcd(arity)) for base in self.bases: yield f"module {base.name}_ = {base.__contextualized_name(self.prefix)}.Specialize{arity}(M){functor_args}" if self.__inherits_operators(): yield mod_impl("O", (f"include {base.name}_.O" for base in self.bases if base.__has_operators())) for base in self.bases: if base.__has_operators(): operators_constraint = " and module O := O" else: operators_constraint = "" yield f"include ({base.name}_: {base.__contextualized_name(self.prefix)}.S0 with type t := t{operators_constraint})" for value in self.values: yield value.value_specialization(arity) # Core contents: extended def __extended_specification_items(self): yield mod_spec("Basic", self.__basic_specification_items()) yield self.__extended_signature_mod_types() yield self.__extended_specialize_specifications() def __extended_implementation_items(self): yield mod_impl("Basic", self.__basic_implementation_items()) yield self.__extended_signature_mod_types() yield self.__extended_specialize_implementations() def __extended_signature_mod_types(self): for arity in self.arities: yield mod_type(f"S{arity}", self.__extended_signature_mod_type_items(arity)) def __extended_signature_mod_type_items(self, arity): yield f"include Basic.S{arity}" if arity == 0: yield "module O: Operators.S0 with type t := t" for extension in self.extensions: for value in extension.members: yield f"val {value.name}: {value.value_type(arity, f'{type_params(arity)}t')}" def __extended_specialize_specifications(self): for arity in self.non_zero_arities: functor_params = "".join(f"({a.upper()}: Basic.S0)" for a in abcd(arity)) yield mod_spec(f"Specialize{arity}(M: S{arity}){functor_params}", self.__specialize_specification_items(arity)) def __extended_specialize_implementations(self): for arity in self.non_zero_arities: functor_params = "".join(f"({a.upper()}: Basic.S0)" for a in abcd(arity)) yield mod_impl(f"Specialize{arity}(M: S{arity}){functor_params}", self.__extended_specialize_implementation_items(arity)) def __extended_specialize_implementation_items(self, arity): functor_args = "".join(f"({a.upper()})" for a in abcd(arity)) yield mod_impl("Self", f"include Basic.Specialize{arity}(M){functor_args}", (value.value_specialization(arity) for extension in self.extensions for value in extension.members) ) yield "module O = Operators.Make0(Self)" yield "include Self" # Extension makers def __extension_makers_specification_items(self): for extension in self.extensions: yield mod_spec(extension.name, extension.extension_makers_specification(self.arities)) def __extensions_makers_implementation_items(self): for extension in self.extensions: yield mod_impl(f"{extension.name}_", extension.extension_makers_implementation(self.arities)) # Tests def __tests_specification(self): yield mod_spec("Tests", self.__tests_specification_items()) def __tests_implementation(self): yield mod_impl("Tests_", self.__tests_implementation_items()) def __tests_specification_items(self): yield self.__tests_examples_specification() yield mod_spec("Testable", self.__tests_testable_items()) yield self.__tests_makers_specifications() def __tests_implementation_items(self): yield self.__tests_examples_implementation() yield mod_impl("Testable", self.__tests_testable_items()) yield self.__tests_makers_implementations() def __tests_examples_specification(self): yield mod_spec("Examples", self.__tests_examples_items()) def __tests_examples_implementation(self): yield mod_impl("Examples", self.__tests_examples_items()) def __tests_examples_items(self): if self.max_arity > 1: yield mod_type("Element", self.__tests_examples_element_mod_type_items()) for arity in self.arities: yield mod_type(f"S{arity}", self.__tests_examples_mod_type_items(arity)) def __tests_examples_element_mod_type_items(self): yield "type t" basic = "" if self.__is_basic() else "Basic." yield f"include {basic}S0 with type t := t" for req in self.test_requirements: basic = "" if req.__is_basic() else "Basic." yield f"include {req.name}.{basic}S0 with type t := t" def __tests_examples_mod_type_items(self, arity): yield f"type {type_params(arity)}t" for a in abcd(arity): yield f"module {a.upper()}: Element" for base in self.bases: yield ( f"include {base.__contextualized_name(self.prefix)}.Tests.Examples.S{arity} with type {type_params(arity)}t := {type_params(arity)}t" + "".join(f" and module {a.upper()} := {a.upper()}" for a in abcd(arity)) ) t = f"{type_args(arity)}t" for item in self.test_examples: yield f"val {item.name}: {item.value_type(0, t)}" def __tests_testable_items(self): for arity in self.arities: yield mod_type(f"S{arity}", self.__tests_testable_mod_type_items(arity)) def __tests_testable_mod_type_items(self, arity): yield f"include S{arity}" for req in self.test_requirements: basic = "" if req.__is_basic() else "Basic." yield f"include {req.__contextualized_name(self.prefix)}.{basic}S{arity} with type {type_params(arity)}t := {type_params(arity)}t" def __tests_makers_specifications(self): for arity in self.arities: yield mod_spec( f"Make{arity}(M: Testable.S{arity})(E: Examples.S{arity} with type {type_params(arity)}t := {type_params(arity)}M.t)", "val test: Test.t", ) def __tests_makers_implementations(self): yield mod_impl( "MakeMakers(MakeExamples: functor (M: Testable.S0) -> functor (E: Examples.S0 with type t := M.t) -> Examples.S0 with type t := M.t)(MakeTests: functor (M: Testable.S0) -> functor (E: Examples.S0 with type t := M.t) -> sig val tests: Test.t list end)", self.__tests_makers_implementations_items(), ) def __tests_makers_implementations_items(self): yield mod_impl( "Make0(M: Testable.S0)(E: Examples.S0 with type t := M.t)", self.__tests_make0_implementation_items(), ) for arity in self.non_zero_arities: yield mod_impl( f"Make{arity}(M: Testable.S{arity})(E: Examples.S{arity} with type {type_params(arity)}t := {type_params(arity)}M.t)", self.__tests_maker_implementation_items(arity), ) def __tests_make0_implementation_items(self): yield "open Testing" yield "module E = MakeExamples(M)(E)" yield f'let test = "{self.name}" >:: [' for base in self.bases: yield f" (let module T = {base.__contextualized_name(self.prefix)}.Tests.Make0(M)(E) in T.test);" yield "] @ (let module T = MakeTests(M)(E) in T.tests)" def __tests_maker_implementation_items(self, arity): yield "include Make0(struct", functor_args = "".join(f"(E.{a.upper()})" for a in abcd(arity)) yield indent(f"include Specialize{arity}(M){functor_args}"), for req in self.test_requirements: basic = "" if req.__is_basic() else "Basic." yield indent(f"include ({req.__contextualized_name(self.prefix)}.{basic}Specialize{arity}(M){functor_args}: {req.__contextualized_name(self.prefix)}.{basic}S0 with type t := t)") yield "end)(E)", def mod_spec(name, *items): yield f"module {name}: sig" yield indent(items) yield "end" def mod_impl(name, *items): yield f"module {name} = struct" yield indent(items) yield "end" def mod_type(name, *items): yield f"module type {name} = sig" yield indent(items) yield "end" def type_params(arity): if arity == 0: return "" elif arity == 1: return "'a " else: return "({}) ".format(', '.join(f"'{a}" for a in abcd(arity))) def type_args(arity): if arity == 0: return "" elif arity == 1: return "A.t " else: return "({}) ".format(', '.join(f"{a.upper()}.t" for a in abcd(arity))) def abcd(arity): return list("abcdefghijkl"[:arity]) class Extension: def __init__(self, *, name, members, requirements, basic_production): self.__name = name self.__members = list(members) self.__requirements = list(requirements) self.__basic_production = list(basic_production) @property def name(self): return self.__name @property def members(self): return list(self.__members) def extension_makers_specification(self, arities): for arity in arities: yield f"module Make{arity}(M: sig" yield f" type {type_params(arity)}t" for requirement in self.__requirements: yield f" val {requirement.name}: {requirement.value_type(arity, f'{type_params(arity)}t')}" yield "end): sig" for value in itertools.chain(self.members, self.__basic_production): yield f" val {value.name}: {value.value_type(arity, f'{type_params(arity)}M.t')}" yield "end" def extension_makers_implementation(self, arities): yield "module MakeMakers(Implementation: sig" additional_prefix_params = "" for requirement in self.__requirements: additional_prefix_params += LabelledParameter(requirement.name, requirement.value_type(0, "'a")).param_type(0, "t") + " -> " t = "'a" for value in itertools.chain(self.members, self.__basic_production): yield f" val {value.name}: {additional_prefix_params}{value.value_type(0, t)}" yield "end) = struct" for arity in arities: yield f" module Make{arity}(M: sig" yield f" type {type_params(arity)}t" requirement_names = [] for requirement in self.__requirements: yield f" val {requirement.name}: {requirement.value_type(arity, f'{type_params(arity)}t')}" requirement_names.append(requirement.name) yield " end) = struct" for value in itertools.chain(self.members, self.__basic_production): yield indent(value.value_extension(requirement_names, arity), levels=2) yield " end" yield "end" variadic_type_marker = "THIS_VARIADIC_TYPE_MARKER_SHOULD_NEVER_APPEAR_IN_GENERATED_CODE" class UnlabelledParameter: def __init__(self, type_): self.__type = type_ def param_type(self, _arity, t): return self.__type.replace(variadic_type_marker, t) def param_pattern(self, _arity, index): return "xyzuvw"[index] param_specialization = param_pattern param_extension = param_pattern class LabelledParameter: def __init__(self, label, type_): self.__label = label self.__type = type_ def param_type(self, _arity, t): return f"{self.__label}:({self.__type.replace(variadic_type_marker, t)})" def param_pattern(self, _arity, _index): return f"~{self.__label}" param_specialization = param_pattern param_extension = param_pattern class DelegateParameter: def __init__(self, values, delegate_name): self.__values = values self.__delegate_name = delegate_name @property def name(self): return self.__delegate_name def param_type(self, arity, t): if arity == 0: return None else: return " -> ".join( f"{self.name}_{a}:(" + self.__values[self.__delegate_name].value_type(0, f"'{a}") + ")" for a in abcd(arity) ) def param_pattern(self, arity, _index): if arity == 0: return None else: return " ".join(f"~{self.name}_{a}" for a in abcd(arity)) def param_specialization(self, arity, _index): if arity == 0: return None else: return " ".join(f"~{self.name}_{a}:{a.upper()}.{self.name}" for a in abcd(arity)) def param_extension(self, _arity, _index): return None class Value: def __init__(self, *, name, type_chain, operator): self.__name = name self.__type_chain = list(type_chain) assert len(self.__type_chain) > 0 self.__parameters = self.__type_chain[:-1] self.__operator = operator @property def name(self): return self.__name @property def operator(self): return self.__operator def value_type(self, arity, t): return " -> ".join(filter(None, (param.param_type(arity, t) for param in self.__type_chain))) def value_specialization(self, arity): yield ( f"let {self.name} " + " ".join(filter(None, (p.param_pattern(0, i) for (i, p) in enumerate(self.__parameters)))) + f" = M.{self.name} " + " ".join(p.param_specialization(arity, i) for (i, p) in enumerate(self.__parameters)) ) def value_extension(self, requirements, arity): for param in self.__parameters: if isinstance(param, DelegateParameter): delegate_ = param break else: delegate_ = None yield ( f"let {self.name} " + " ".join(filter(None, (p.param_pattern(arity, i) for (i, p) in enumerate(self.__parameters)))) + f" = Implementation.{self.name} " + "".join( f"~{req}:(M.{req}" + "".join([] if delegate_ is None else (f" ~{delegate_.name}_{a}" for a in abcd(arity))) + ") " for req in requirements ) + " ".join(filter(None, (p.param_extension(arity, i) for (i, p) in enumerate(self.__parameters)))) ) values = {} def val(name, *type_chain, operator=None): def make_param(param): if isinstance(param, str): return UnlabelledParameter(param) elif isinstance(param, dict): [(label, type_)] = param.items() return LabelledParameter(label, type_) elif isinstance(param, tuple): if param[0] is DelegateParameter: return DelegateParameter(values, param[1]) else: assert False else: assert False value = Value( name=name, type_chain=(make_param(param) for param in type_chain), operator=operator, ) assert name not in values values[name] = value return value def ext(name, *, members, requirements): def make_requirement(req): if isinstance(req, str): return values[req] elif isinstance(req, Value): return req else: assert False members = list(members) return Extension( name=name, members=(member for member in members if isinstance(member, Value)), requirements=(make_requirement(requirement) for requirement in requirements), basic_production=(values[member] for member in members if isinstance(member, str)), ) def deleg(name): return (DelegateParameter, name) t = variadic_type_marker traits = [] def trait( name, variadic=True, values=[], extensions=[], test_examples=[], test_requirements=[], ): trait = Facets( prefix="Traits", name=name, variadic=variadic, bases=[], values=values, extensions=extensions, test_examples=test_examples, test_requirements=test_requirements, ) traits.append(trait) return trait concepts = [] def concept( name, bases, values=[], test_requirements=[], ): concept = Facets( prefix="Concepts", name=name, variadic=True, bases=bases, values=values, extensions=[], test_examples=[], test_requirements=test_requirements, ) concepts.append(concept) return concept ###### TRAITS ###### # @feature (?) Add trait Testable with val test: Test.t # A *representation* is a string representing a value for a software developer audience. # When possible, it should be a valid OCaml expression for the value. representable = trait( "Representable", values=[val("repr", t, deleg("repr"), "string")], test_examples=[val("representations", f"({t} * string) list")], ) equalities = val("equalities", f"{t} list list") equatable = trait( "Equatable", values=[val("equal", t, t, deleg("equal"), "bool", operator="=")], extensions=[ ext( "Different", members=[val("different", t, t, deleg("equal"), "bool", operator="<>")], requirements=["equal"], ), ], test_examples=[ equalities, val("differences", f"({t} * {t}) list"), ], test_requirements=[representable], ) displayable = trait( "Displayable", variadic=False, values=[val("to_string", t, "string")], test_examples=[val("displays", f"({t} * string) list")], ) # @feature Traits.Hashable with val hash: t -> int, Poly using Hashtbl.hash parsable = trait( "Parsable", variadic=False, values=[ val("try_of_string", "string", f"{t} option"), val("of_string", "string", t), ], test_examples=[val("literals", f"(string * {t}) list")], test_requirements=[equatable, representable], ) comparable = trait( "Comparable", values=[val("compare", t, t, deleg("compare"), "Compare.t")], extensions=[ ext( "GreaterLessThan", members=[ val("less_than", t, t, deleg("compare"), "bool", operator="<"), val("less_or_equal", t, t, deleg("compare"), "bool", operator="<="), val("greater_than", t, t, deleg("compare"), "bool", operator=">"), val("greater_or_equal", t, t, deleg("compare"), "bool", operator=">="), ], requirements=["compare"], ), ext( "Between", members=[ val("between", t, {"low": t}, {"high": t}, deleg("compare"), "bool"), val("between_or_equal", t, {"low": t}, {"high": t}, deleg("compare"), "bool") ], requirements=["less_than", "less_or_equal", "greater_than", "greater_or_equal"], ), ext( "MinMax", members=[ val("min", t, t, deleg("compare"), t), val("max", t, t, deleg("compare"), t), val("min_max", t, t, deleg("compare"), f"{t} * {t}"), ], requirements=["compare"], ), ], test_examples=[ val("orders", f"{t} list list"), equalities, ], test_requirements=[equatable, representable], ) ringoid = trait( "Ringoid", variadic=False, values=[ val("zero", t), val("one", t), # val("posate", t, t, operator="~+"), val("negate", t, t, operator="~-"), val("add", t, t, t, operator="+"), val("subtract", t, t, t, operator="-"), val("multiply", t, t, t, operator="*"), val("divide", t, t, t, operator="/"), ], extensions=[ ext( "Subtract", members=["subtract"], requirements=["negate", "add"], ), ext( "Square", members=[val("square", t, t)], requirements=["multiply"], ), ext( "Exponentiate", members=[val("exponentiate", t, "int", t, operator="**")], requirements=[ "one", "square", "multiply", val("exponentiate_negative_exponent", {"exponentiate": f"{t} -> int -> {t}"}, t, "int", t), ], ), ], test_examples=[ val("additions", f"({t} * {t} * {t}) list"), val("negations", f"({t} * {t}) list"), val("multiplications", f"({t} * {t} * {t}) list"), val("divisions", f"({t} * {t} * {t}) list"), val("exponentiations", f"({t} * int * {t}) list"), ], test_requirements=[equatable, representable], ) of_standard_numbers = trait( "OfStandardNumbers", variadic=False, values=[ val("of_int", "int", t), val("of_float", "float", t), ], ) to_standard_numbers = trait( "ToStandardNumbers", variadic=False, values=[ val("to_int", t, "int"), val("to_float", t, "float"), ], ) pred_succ = trait( "PredSucc", variadic=False, values=[ val("pred", t, t), val("succ", t, t), ], extensions=[ ext( "PredSucc", members=["pred", "succ"], requirements=["one", "add", "subtract"], ), ], test_examples=[val("successions", f"({t} * {t}) list")], test_requirements=[equatable, representable], ) ###### CONCEPTS ###### # @feature Concepts for iterables and collections. Something like Collection, Container, MonoBag, MultiBag, LinearContainer identifiable = concept( "Identifiable", bases=[equatable, representable], ) able = concept( "Able", bases=[identifiable, comparable], ) stringable = concept( "Stringable", bases=[displayable, parsable], test_requirements=[representable, equatable], # @todo Deduce from parsable's test requirements ) number = concept( "Number", bases=[identifiable, stringable, ringoid, of_standard_numbers], ) real_number = concept( "RealNumber", # @feature sign bases=[number, comparable, to_standard_numbers], values=[ val("abs", t, t), val("modulo", t, t, t, operator="mod"), ], ) integer = concept( "Integer", # @feature Bitwise? # @feature gcd, lcm, quomod # @feature width: like Sys.int_size bases=[real_number, pred_succ], ) if __name__ == "__main__": destination = sys.argv[1] assert os.path.isdir(destination) def gen(name, *items): with open(os.path.join(destination, name), "w") as f: generate(items, file = f) gen( "Facets.dot", 'digraph {', ' rankdir="BT"', ' node [shape="box"]', ' subgraph cluster_Traits {', ' label="Traits";', (f' {trait.name.lower()} [label="{trait.graphviz_label}"];' for trait in traits), ' }', ' subgraph cluster_Concepts {', ' label="Concepts";', (f' {concept.name.lower()} [label="{concept.graphviz_label}"];' for concept in concepts), ' }', (f' {concept.name.lower()} -> {base.name.lower()}' for concept in concepts for base in concept.bases), '}', ) gen("Traits.mli", (trait.specification for trait in traits)) gen("Concepts.mli", (concept.specification for concept in concepts)) destination = os.path.join(sys.argv[1], "Traits") os.mkdir(destination) for trait in traits: gen(f"{trait.name}.ml", trait.implementation_items) destination = os.path.join(sys.argv[1], "Concepts") os.mkdir(destination) for concept in concepts: gen(f"{concept.name}.ml", concept.implementation_items)
[ 1, 529, 276, 1112, 420, 29958, 25446, 15490, 29914, 15263, 13, 5215, 4256, 8504, 13, 5215, 2090, 312, 8789, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 1426, 6312, 13, 13, 13, 3317, 29918, 279, 537, 353, 29871, 29953, 13, 13, 13, 1753, 5706, 10456, 5029, 29892, 3579, 11022, 6289, 1125, 13, 1678, 282, 353, 2090, 312, 8789, 29889, 3846, 29898, 2158, 29892, 934, 29922, 11022, 6289, 29889, 657, 703, 1445, 5783, 13, 1678, 3517, 29918, 1220, 29918, 11102, 29918, 355, 353, 7700, 13, 1678, 363, 1196, 297, 29536, 29898, 5029, 29892, 9049, 6289, 29889, 657, 703, 12860, 613, 29871, 29900, 22164, 13, 4706, 1196, 29918, 275, 29918, 355, 353, 1196, 29889, 17010, 580, 1275, 376, 355, 29908, 13, 4706, 565, 3517, 29918, 1220, 29918, 11102, 29918, 355, 322, 451, 1196, 29918, 275, 29918, 355, 29901, 13, 9651, 282, 703, 1159, 13, 4706, 282, 29898, 1220, 29897, 13, 4706, 3517, 29918, 1220, 29918, 11102, 29918, 355, 353, 1196, 29918, 275, 29918, 355, 13, 13, 13, 1753, 29536, 29898, 5029, 29892, 11174, 29922, 29896, 1125, 13, 1678, 565, 338, 8758, 29898, 5029, 29892, 851, 1125, 13, 4706, 7709, 285, 29908, 10998, 29871, 525, 334, 11174, 1157, 5029, 5038, 13, 1678, 1683, 29901, 13, 4706, 363, 1014, 297, 1543, 29901, 13, 9651, 7709, 515, 29536, 29898, 1491, 29892, 11174, 29897, 13, 13, 13, 1990, 14184, 1691, 29901, 13, 1678, 822, 4770, 2344, 12035, 13, 9651, 1583, 29892, 334, 29892, 13, 9651, 10944, 29892, 1024, 29892, 13, 9651, 1197, 26538, 29892, 13, 9651, 22561, 29892, 1819, 29892, 17752, 29892, 13, 9651, 1243, 29918, 19057, 29892, 1243, 29918, 12277, 1860, 29892, 13, 308, 1125, 13, 4706, 1583, 29889, 13506, 353, 10944, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 4706, 1583, 29889, 29890, 2129, 353, 1051, 29898, 29890, 2129, 29897, 13, 4706, 1583, 29889, 3317, 29918, 279, 537, 353, 1375, 29898, 1524, 8504, 29889, 14153, 4197, 3317, 29918, 279, 537, 1402, 313, 29875, 29889, 3317, 29918, 279, 537, 363, 474, 297, 1583, 29889, 29890, 2129, 4961, 565, 1197, 26538, 1683, 29871, 29896, 13, 4706, 1583, 29889, 279, 1907, 353, 1051, 29898, 3881, 29898, 1311, 29889, 3317, 29918, 279, 537, 876, 13, 4706, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 353, 1051, 29898, 3881, 29898, 29896, 29892, 1583, 29889, 3317, 29918, 279, 537, 876, 13, 4706, 1583, 29889, 5975, 353, 1051, 29898, 5975, 29897, 13, 4706, 1583, 29889, 24299, 353, 1051, 29898, 24299, 29897, 13, 4706, 1583, 29889, 497, 29918, 7076, 353, 1051, 29898, 1524, 8504, 29889, 14153, 29898, 13, 9651, 1583, 29889, 5975, 29892, 13, 9651, 4256, 8504, 29889, 14153, 29889, 3166, 29918, 1524, 519, 29898, 17588, 29889, 28109, 363, 6081, 297, 1583, 29889, 24299, 511, 13, 308, 876, 13, 4706, 1583, 29889, 3372, 4097, 353, 518, 667, 363, 2944, 297, 1583, 29889, 497, 29918, 7076, 565, 2944, 29889, 6891, 338, 451, 6213, 29962, 13, 4706, 1583, 29889, 1688, 29918, 19057, 353, 1051, 29898, 1688, 29918, 19057, 29897, 13, 4706, 1583, 29889, 1688, 29918, 12277, 1860, 353, 1051, 29898, 1688, 29918, 12277, 1860, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 3983, 29894, 466, 29918, 1643, 29898, 1311, 1125, 13, 4706, 5633, 353, 518, 1311, 29889, 978, 29962, 13, 4706, 565, 7431, 29898, 1311, 29889, 5975, 29897, 1405, 29871, 29900, 29901, 13, 9651, 5633, 29889, 4397, 703, 1159, 13, 9651, 5633, 4619, 518, 791, 29889, 978, 363, 659, 297, 1583, 29889, 5975, 29962, 13, 4706, 1294, 29879, 353, 518, 791, 29889, 978, 363, 6081, 297, 1583, 29889, 24299, 363, 659, 297, 6081, 29889, 28109, 29962, 13, 4706, 565, 7431, 29898, 1062, 29879, 29897, 1405, 29871, 29900, 29901, 13, 9651, 5633, 29889, 4397, 703, 1159, 13, 9651, 5633, 4619, 1294, 29879, 13, 4706, 736, 376, 1966, 29876, 1642, 7122, 29898, 20895, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 21992, 29898, 1311, 1125, 13, 4706, 736, 878, 29918, 6550, 29898, 1311, 29889, 978, 29892, 1583, 29889, 6550, 2450, 29918, 7076, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5314, 29898, 1311, 1125, 13, 4706, 736, 878, 29918, 13699, 29898, 1311, 29889, 978, 29892, 1583, 29889, 21382, 29918, 7076, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 21992, 29918, 7076, 29898, 1311, 1125, 13, 4706, 565, 1583, 17255, 5349, 29918, 3372, 4097, 7295, 13, 9651, 7709, 1583, 17255, 3372, 4097, 29918, 6550, 2450, 580, 13, 13, 4706, 565, 1583, 17255, 275, 29918, 16121, 7295, 13, 9651, 7709, 1583, 17255, 16121, 29918, 6550, 2450, 29918, 7076, 580, 13, 4706, 1683, 29901, 13, 9651, 7709, 1583, 17255, 1062, 2760, 29918, 6550, 2450, 29918, 7076, 580, 13, 13, 4706, 7709, 1583, 17255, 17588, 29918, 29885, 21079, 29918, 6550, 2450, 29918, 7076, 580, 13, 13, 4706, 7709, 1583, 17255, 21150, 29918, 6550, 2450, 580, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5314, 29918, 7076, 29898, 1311, 1125, 13, 4706, 565, 1583, 17255, 5349, 29918, 3372, 4097, 7295, 13, 9651, 7709, 1583, 17255, 3372, 4097, 29918, 21382, 580, 13, 13, 4706, 565, 1583, 17255, 275, 29918, 16121, 7295, 13, 9651, 7709, 1583, 17255, 16121, 29918, 21382, 29918, 7076, 580, 13, 4706, 1683, 29901, 13, 9651, 7709, 1583, 17255, 1062, 2760, 29918, 21382, 29918, 7076, 580, 13, 13, 4706, 7709, 1583, 17255, 24299, 29918, 29885, 21079, 29918, 21382, 29918, 7076, 580, 13, 13, 4706, 7709, 1583, 17255, 21150, 29918, 21382, 580, 13, 13, 1678, 822, 4770, 4703, 950, 1891, 29918, 978, 29898, 1311, 29892, 10944, 1125, 13, 4706, 565, 10944, 1275, 1583, 29889, 13506, 29901, 13, 9651, 736, 1583, 29889, 978, 13, 4706, 1683, 29901, 13, 9651, 736, 285, 29908, 29912, 1311, 29889, 13506, 1836, 29912, 1311, 29889, 978, 5038, 13, 13, 1678, 396, 6607, 4097, 13, 13, 1678, 822, 4770, 5349, 29918, 3372, 4097, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 5349, 29918, 776, 29918, 3372, 4097, 580, 470, 1583, 17255, 262, 2276, 1169, 29918, 3372, 4097, 580, 13, 13, 1678, 822, 4770, 5349, 29918, 776, 29918, 3372, 4097, 29898, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 29889, 3372, 4097, 29897, 1405, 29871, 29900, 13, 13, 1678, 822, 4770, 262, 2276, 1169, 29918, 3372, 4097, 29898, 1311, 1125, 13, 4706, 736, 738, 29898, 3188, 17255, 5349, 29918, 3372, 4097, 580, 363, 2967, 297, 1583, 29889, 29890, 2129, 29897, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 6550, 2450, 29898, 1311, 1125, 13, 4706, 736, 878, 29918, 6550, 703, 7094, 4097, 613, 1583, 17255, 3372, 4097, 29918, 6550, 2450, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 21382, 29898, 1311, 1125, 13, 4706, 736, 878, 29918, 13699, 703, 7094, 4097, 613, 1583, 17255, 3372, 4097, 29918, 21382, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 3372, 4097, 29918, 29879, 29900, 29918, 1545, 29918, 1853, 580, 13, 4706, 565, 7431, 29898, 1311, 29889, 3372, 4097, 29897, 1405, 29871, 29900, 29901, 13, 9651, 7709, 1583, 17255, 3372, 4097, 29918, 5675, 29900, 29918, 6550, 2450, 580, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 3372, 4097, 29918, 29879, 29900, 29918, 1545, 29918, 1853, 580, 13, 4706, 565, 7431, 29898, 1311, 29889, 3372, 4097, 29897, 1405, 29871, 29900, 29901, 13, 9651, 7709, 1583, 17255, 3372, 4097, 29918, 5675, 29900, 29918, 21382, 580, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 29879, 29900, 29918, 1545, 29918, 1853, 29898, 1311, 1125, 13, 4706, 736, 878, 29918, 1853, 703, 29903, 29900, 613, 1583, 17255, 3372, 4097, 29918, 29879, 29900, 29918, 1545, 29918, 1853, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 29879, 29900, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 376, 1853, 260, 29908, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 565, 2967, 17255, 5349, 29918, 3372, 4097, 7295, 13, 18884, 7709, 285, 29908, 2856, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 7094, 4097, 29889, 29903, 29900, 411, 1134, 260, 3490, 260, 29908, 13, 4706, 363, 5455, 297, 1583, 29889, 3372, 4097, 29901, 13, 9651, 7709, 285, 29908, 791, 313, 426, 6891, 29889, 6891, 29913, 29871, 1125, 426, 5455, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 525, 29873, 1495, 5038, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 5675, 29900, 29918, 6550, 2450, 29898, 1311, 1125, 13, 4706, 7709, 376, 5453, 8561, 29900, 29898, 29924, 29901, 4365, 29908, 13, 4706, 7709, 376, 29871, 1134, 260, 29908, 13, 4706, 363, 5455, 297, 1583, 29889, 3372, 4097, 29901, 13, 9651, 7709, 285, 29908, 29871, 659, 426, 6891, 29889, 978, 6177, 426, 6891, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 525, 29873, 1495, 5038, 13, 4706, 7709, 376, 355, 1125, 4365, 29908, 13, 4706, 363, 5455, 297, 1583, 29889, 3372, 4097, 29901, 13, 9651, 7709, 285, 29908, 29871, 659, 313, 426, 6891, 29889, 6891, 29913, 29871, 1125, 426, 6891, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 525, 29924, 29889, 29873, 1495, 5038, 13, 4706, 7709, 376, 355, 29908, 13, 13, 1678, 822, 4770, 3372, 4097, 29918, 5675, 29900, 29918, 21382, 29898, 1311, 1125, 13, 4706, 7709, 376, 5453, 8561, 29900, 29898, 29924, 29901, 4365, 29908, 13, 4706, 7709, 376, 29871, 1134, 260, 29908, 13, 4706, 363, 5455, 297, 1583, 29889, 3372, 4097, 29901, 13, 9651, 7709, 285, 29908, 29871, 659, 426, 6891, 29889, 978, 6177, 426, 6891, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 285, 29915, 29912, 1853, 29918, 7529, 29898, 29900, 2915, 29873, 1495, 5038, 13, 4706, 7709, 376, 355, 29897, 353, 2281, 29908, 13, 4706, 363, 5455, 297, 1583, 29889, 3372, 4097, 29901, 13, 9651, 7709, 285, 29908, 29871, 1235, 313, 426, 6891, 29889, 6891, 29913, 1723, 353, 341, 29889, 29912, 6891, 29889, 978, 5038, 13, 4706, 7709, 376, 355, 29908, 13, 13, 1678, 396, 10239, 8118, 29901, 6996, 13, 13, 1678, 822, 4770, 275, 29918, 16121, 29898, 1311, 1125, 13, 4706, 736, 7431, 29898, 1761, 29898, 1524, 8504, 29889, 14153, 29889, 3166, 29918, 1524, 519, 29898, 17588, 29889, 28109, 363, 6081, 297, 1583, 29889, 24299, 4961, 1275, 29871, 29900, 13, 13, 1678, 822, 4770, 16121, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 16121, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 580, 13, 4706, 7709, 1583, 17255, 16121, 29918, 18732, 675, 29918, 6550, 8232, 580, 13, 13, 1678, 822, 4770, 16121, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 16121, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 580, 13, 4706, 7709, 1583, 17255, 16121, 29918, 18732, 675, 29918, 326, 2037, 800, 580, 13, 13, 1678, 822, 4770, 16121, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 1853, 29898, 29888, 29908, 29903, 29912, 279, 537, 17671, 1583, 17255, 16121, 29918, 4530, 1535, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 16121, 29918, 4530, 1535, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 260, 353, 285, 29908, 29912, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 4706, 7709, 285, 29908, 1853, 426, 29873, 5038, 13, 4706, 565, 564, 537, 1275, 29871, 29900, 322, 1583, 17255, 5349, 29918, 3372, 4097, 580, 322, 1583, 17255, 275, 29918, 16121, 7295, 13, 9651, 7709, 376, 5453, 438, 29901, 6607, 4097, 29889, 29903, 29900, 411, 1134, 260, 3490, 260, 29908, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 565, 564, 537, 1275, 29871, 29900, 322, 2967, 17255, 5349, 29918, 3372, 4097, 7295, 13, 18884, 12768, 29918, 13646, 353, 376, 322, 3883, 438, 3490, 438, 29908, 13, 9651, 1683, 29901, 13, 18884, 12768, 29918, 13646, 353, 5124, 13, 9651, 7709, 285, 29908, 2856, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 29903, 29912, 279, 537, 29913, 411, 1134, 426, 29873, 29913, 3490, 426, 29873, 1157, 3372, 4097, 29918, 13646, 5038, 13, 4706, 363, 995, 297, 1583, 29889, 5975, 29901, 13, 9651, 7709, 285, 29908, 791, 426, 1767, 29889, 978, 6177, 426, 1767, 29889, 1767, 29918, 1853, 29898, 279, 537, 29892, 260, 2915, 29908, 13, 13, 1678, 822, 4770, 16121, 29918, 18732, 675, 29918, 6550, 8232, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 29901, 13, 9651, 2090, 2801, 29918, 7529, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 6177, 317, 29900, 5513, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 9651, 7709, 878, 29918, 6550, 29898, 29888, 29908, 24780, 675, 29912, 279, 537, 2119, 29924, 29901, 317, 29912, 279, 537, 1800, 29912, 7692, 2801, 29918, 7529, 17671, 1583, 17255, 18732, 675, 29918, 6550, 2450, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 16121, 29918, 18732, 675, 29918, 326, 2037, 800, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 29901, 13, 9651, 2090, 2801, 29918, 7529, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 6177, 317, 29900, 5513, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 9651, 7709, 878, 29918, 13699, 29898, 29888, 29908, 24780, 675, 29912, 279, 537, 2119, 29924, 29901, 317, 29912, 279, 537, 1800, 29912, 7692, 2801, 29918, 7529, 17671, 1583, 17255, 16121, 29918, 18732, 675, 29918, 21382, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 18732, 675, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 285, 29908, 1853, 260, 353, 426, 1853, 29918, 5085, 29898, 279, 537, 2915, 29924, 29889, 29873, 613, 13, 4706, 7709, 376, 2856, 317, 29900, 411, 1134, 260, 3490, 260, 613, 13, 13, 1678, 822, 4770, 16121, 29918, 18732, 675, 29918, 21382, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 285, 29908, 1853, 260, 353, 426, 1853, 29918, 5085, 29898, 279, 537, 2915, 29924, 29889, 29873, 29908, 13, 4706, 2090, 2801, 29918, 5085, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 1800, 29908, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 7709, 285, 29908, 5453, 426, 3188, 29889, 978, 2403, 353, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 24780, 675, 29912, 279, 537, 2119, 29924, 2597, 7692, 2801, 29918, 5085, 5038, 13, 4706, 565, 1583, 17255, 262, 2276, 1169, 29918, 3372, 4097, 7295, 13, 9651, 7709, 878, 29918, 13699, 703, 29949, 613, 313, 29888, 29908, 2856, 426, 3188, 29889, 978, 2403, 29889, 29949, 29908, 363, 2967, 297, 1583, 29889, 29890, 2129, 565, 2967, 17255, 5349, 29918, 3372, 4097, 22130, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 565, 2967, 17255, 5349, 29918, 3372, 4097, 7295, 13, 18884, 12768, 29918, 13646, 353, 376, 322, 3883, 438, 3490, 438, 29908, 13, 9651, 1683, 29901, 13, 18884, 12768, 29918, 13646, 353, 5124, 13, 9651, 7709, 285, 29908, 2856, 21313, 3188, 29889, 978, 2403, 29901, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 29903, 29900, 411, 1134, 260, 3490, 260, 29912, 3372, 4097, 29918, 13646, 1800, 29908, 13, 4706, 363, 995, 297, 1583, 29889, 5975, 29901, 13, 9651, 7709, 995, 29889, 1767, 29918, 18732, 2133, 29898, 279, 537, 29897, 13, 13, 1678, 396, 10239, 8118, 29901, 10410, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 6550, 703, 16616, 613, 1583, 17255, 16121, 29918, 6550, 2450, 29918, 7076, 3101, 13, 4706, 7709, 1583, 17255, 1062, 2760, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 580, 13, 4706, 7709, 1583, 17255, 1062, 2760, 29918, 18732, 675, 29918, 6550, 8232, 580, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 13699, 703, 16616, 613, 1583, 17255, 16121, 29918, 21382, 29918, 7076, 3101, 13, 4706, 7709, 1583, 17255, 1062, 2760, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 580, 13, 4706, 7709, 1583, 17255, 1062, 2760, 29918, 18732, 675, 29918, 326, 2037, 800, 580, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 4530, 1535, 29918, 1545, 29918, 8768, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 1853, 29898, 29888, 29908, 29903, 29912, 279, 537, 17671, 1583, 17255, 1062, 2760, 29918, 4530, 1535, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 4530, 1535, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 285, 29908, 2856, 19219, 29889, 29903, 29912, 279, 537, 5038, 13, 4706, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 9651, 7709, 376, 5453, 438, 29901, 6607, 4097, 29889, 29903, 29900, 411, 1134, 260, 3490, 260, 29908, 13, 4706, 363, 6081, 297, 1583, 29889, 24299, 29901, 13, 9651, 363, 995, 297, 6081, 29889, 28109, 29901, 13, 18884, 7709, 285, 29908, 791, 426, 1767, 29889, 978, 6177, 426, 1767, 29889, 1767, 29918, 1853, 29898, 279, 537, 29892, 285, 29915, 29912, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 1495, 5038, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 18732, 675, 29918, 6550, 8232, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 29901, 13, 9651, 2090, 2801, 29918, 7529, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 6177, 19219, 29889, 29903, 29900, 5513, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 9651, 7709, 878, 29918, 6550, 29898, 29888, 29908, 24780, 675, 29912, 279, 537, 2119, 29924, 29901, 317, 29912, 279, 537, 1800, 29912, 7692, 2801, 29918, 7529, 17671, 1583, 17255, 18732, 675, 29918, 6550, 2450, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 18732, 675, 29918, 326, 2037, 800, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 29901, 13, 9651, 2090, 2801, 29918, 7529, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 6177, 19219, 29889, 29903, 29900, 5513, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 9651, 7709, 878, 29918, 13699, 29898, 29888, 29908, 24780, 675, 29912, 279, 537, 2119, 29924, 29901, 317, 29912, 279, 537, 1800, 29912, 7692, 2801, 29918, 7529, 17671, 1583, 17255, 1062, 2760, 29918, 18732, 675, 29918, 21382, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 1062, 2760, 29918, 18732, 675, 29918, 21382, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 2090, 2801, 29918, 5085, 353, 376, 1642, 7122, 29898, 29888, 29908, 3319, 29874, 29889, 21064, 580, 1800, 29908, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 4706, 7709, 878, 29918, 13699, 703, 24313, 613, 13, 9651, 285, 29908, 2856, 19219, 29889, 24780, 675, 29912, 279, 537, 2119, 29924, 2597, 7692, 2801, 29918, 5085, 17671, 13, 9651, 313, 1767, 29889, 1767, 29918, 18732, 2133, 29898, 279, 537, 29897, 363, 6081, 297, 1583, 29889, 24299, 363, 995, 297, 6081, 29889, 28109, 29897, 13, 4706, 1723, 13, 4706, 7709, 376, 5453, 438, 353, 6607, 4097, 29889, 9984, 29900, 29898, 24313, 5513, 13, 4706, 7709, 376, 2856, 21782, 29908, 13, 13, 1678, 396, 7338, 2673, 2136, 414, 13, 13, 1678, 822, 4770, 17588, 29918, 29885, 21079, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 1125, 13, 4706, 363, 6081, 297, 1583, 29889, 24299, 29901, 13, 9651, 7709, 878, 29918, 6550, 29898, 17588, 29889, 978, 29892, 6081, 29889, 17588, 29918, 29885, 21079, 29918, 6550, 2450, 29898, 1311, 29889, 279, 1907, 876, 13, 13, 1678, 822, 4770, 24299, 29918, 29885, 21079, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 363, 6081, 297, 1583, 29889, 24299, 29901, 13, 9651, 7709, 878, 29918, 13699, 29898, 29888, 29908, 29912, 17588, 29889, 978, 2403, 613, 6081, 29889, 17588, 29918, 29885, 21079, 29918, 21382, 29898, 1311, 29889, 279, 1907, 876, 13, 13, 1678, 396, 4321, 29879, 13, 13, 1678, 822, 4770, 21150, 29918, 6550, 2450, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 6550, 703, 24376, 613, 1583, 17255, 21150, 29918, 6550, 2450, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 21150, 29918, 21382, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 13699, 703, 24376, 29918, 613, 1583, 17255, 21150, 29918, 21382, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 21150, 29918, 6550, 2450, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 21150, 29918, 19057, 29918, 6550, 2450, 580, 13, 4706, 7709, 878, 29918, 6550, 703, 3057, 519, 613, 1583, 17255, 21150, 29918, 1688, 519, 29918, 7076, 3101, 13, 4706, 7709, 1583, 17255, 21150, 29918, 29885, 21079, 29918, 6550, 8232, 580, 13, 13, 1678, 822, 4770, 21150, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 1583, 17255, 21150, 29918, 19057, 29918, 21382, 580, 13, 4706, 7709, 878, 29918, 13699, 703, 3057, 519, 613, 1583, 17255, 21150, 29918, 1688, 519, 29918, 7076, 3101, 13, 4706, 7709, 1583, 17255, 21150, 29918, 29885, 21079, 29918, 326, 2037, 800, 580, 13, 13, 1678, 822, 4770, 21150, 29918, 19057, 29918, 6550, 2450, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 6550, 703, 1252, 9422, 613, 1583, 17255, 21150, 29918, 19057, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 21150, 29918, 19057, 29918, 21382, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 13699, 703, 1252, 9422, 613, 1583, 17255, 21150, 29918, 19057, 29918, 7076, 3101, 13, 13, 1678, 822, 4770, 21150, 29918, 19057, 29918, 7076, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 3317, 29918, 279, 537, 1405, 29871, 29896, 29901, 13, 9651, 7709, 878, 29918, 1853, 703, 2642, 613, 1583, 17255, 21150, 29918, 19057, 29918, 5029, 29918, 1545, 29918, 1853, 29918, 7076, 3101, 13, 4706, 363, 564, 537, 297, 1583, 29889, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 1853, 29898, 29888, 29908, 29903, 29912, 279, 537, 17671, 1583, 17255, 21150, 29918, 19057, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 21150, 29918, 19057, 29918, 5029, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 376, 1853, 260, 29908, 13, 4706, 6996, 353, 5124, 565, 1583, 17255, 275, 29918, 16121, 580, 1683, 376, 16616, 1213, 13, 4706, 7709, 285, 29908, 2856, 426, 16121, 29913, 29903, 29900, 411, 1134, 260, 3490, 260, 29908, 13, 4706, 363, 12428, 297, 1583, 29889, 1688, 29918, 12277, 1860, 29901, 13, 9651, 6996, 353, 5124, 565, 12428, 17255, 275, 29918, 16121, 580, 1683, 376, 16616, 1213, 13, 9651, 7709, 285, 29908, 2856, 426, 7971, 29889, 978, 1836, 29912, 16121, 29913, 29903, 29900, 411, 1134, 260, 3490, 260, 29908, 13, 13, 1678, 822, 4770, 21150, 29918, 19057, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 285, 29908, 1853, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 4706, 363, 263, 297, 633, 2252, 29898, 279, 537, 1125, 13, 9651, 7709, 285, 29908, 5453, 426, 29874, 29889, 21064, 580, 6177, 10619, 29908, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 7709, 313, 13, 18884, 285, 29908, 2856, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 24376, 29889, 1252, 9422, 29889, 29903, 29912, 279, 537, 29913, 411, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 3490, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 18884, 718, 376, 1642, 7122, 29898, 29888, 29908, 322, 3883, 426, 29874, 29889, 21064, 28296, 3490, 426, 29874, 29889, 21064, 580, 5038, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 9651, 1723, 13, 4706, 260, 353, 285, 29908, 29912, 1853, 29918, 5085, 29898, 279, 537, 2915, 29873, 29908, 13, 4706, 363, 2944, 297, 1583, 29889, 1688, 29918, 19057, 29901, 13, 9651, 7709, 285, 29908, 791, 426, 667, 29889, 978, 6177, 426, 667, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 260, 2915, 29908, 13, 13, 1678, 822, 4770, 21150, 29918, 1688, 519, 29918, 7076, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 1853, 29898, 29888, 29908, 29903, 29912, 279, 537, 17671, 1583, 17255, 21150, 29918, 1688, 519, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 279, 537, 876, 13, 13, 1678, 822, 4770, 21150, 29918, 1688, 519, 29918, 1545, 29918, 1853, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 9651, 7709, 285, 29908, 2856, 317, 29912, 279, 537, 5038, 13, 9651, 363, 12428, 297, 1583, 29889, 1688, 29918, 12277, 1860, 29901, 13, 18884, 6996, 353, 5124, 565, 12428, 17255, 275, 29918, 16121, 580, 1683, 376, 16616, 1213, 13, 18884, 7709, 285, 29908, 2856, 426, 7971, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 29912, 16121, 29913, 29903, 29912, 279, 537, 29913, 411, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 3490, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 13, 1678, 822, 4770, 21150, 29918, 29885, 21079, 29918, 6550, 8232, 29898, 1311, 1125, 13, 4706, 363, 564, 537, 297, 1583, 29889, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 6550, 29898, 13, 18884, 285, 29908, 9984, 29912, 279, 537, 2119, 29924, 29901, 4321, 519, 29889, 29903, 29912, 279, 537, 1800, 29898, 29923, 29901, 1222, 9422, 29889, 29903, 29912, 279, 537, 29913, 411, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 3490, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29924, 29889, 29873, 19123, 13, 18884, 376, 791, 1243, 29901, 4321, 29889, 29873, 613, 13, 9651, 1723, 13, 13, 1678, 822, 4770, 21150, 29918, 29885, 21079, 29918, 326, 2037, 800, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 13699, 29898, 13, 9651, 376, 9984, 29924, 21079, 29898, 9984, 1252, 9422, 29901, 2090, 2801, 313, 29924, 29901, 4321, 519, 29889, 29903, 29900, 29897, 1599, 2090, 2801, 313, 29923, 29901, 1222, 9422, 29889, 29903, 29900, 411, 1134, 260, 3490, 341, 29889, 29873, 29897, 1599, 1222, 9422, 29889, 29903, 29900, 411, 1134, 260, 3490, 341, 29889, 29873, 5033, 9984, 24376, 29901, 2090, 2801, 313, 29924, 29901, 4321, 519, 29889, 29903, 29900, 29897, 1599, 2090, 2801, 313, 29923, 29901, 1222, 9422, 29889, 29903, 29900, 411, 1134, 260, 3490, 341, 29889, 29873, 29897, 1599, 4365, 659, 6987, 29901, 4321, 29889, 29873, 1051, 1095, 19123, 13, 9651, 1583, 17255, 21150, 29918, 29885, 21079, 29918, 326, 2037, 800, 29918, 7076, 3285, 13, 4706, 1723, 13, 13, 1678, 822, 4770, 21150, 29918, 29885, 21079, 29918, 326, 2037, 800, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 878, 29918, 13699, 29898, 13, 9651, 376, 9984, 29900, 29898, 29924, 29901, 4321, 519, 29889, 29903, 29900, 5033, 29923, 29901, 1222, 9422, 29889, 29903, 29900, 411, 1134, 260, 3490, 341, 29889, 29873, 19123, 13, 9651, 1583, 17255, 21150, 29918, 5675, 29900, 29918, 21382, 29918, 7076, 3285, 13, 4706, 1723, 13, 4706, 363, 564, 537, 297, 1583, 29889, 5464, 29918, 9171, 29918, 279, 1907, 29901, 13, 9651, 7709, 878, 29918, 13699, 29898, 13, 18884, 285, 29908, 9984, 29912, 279, 537, 2119, 29924, 29901, 4321, 519, 29889, 29903, 29912, 279, 537, 1800, 29898, 29923, 29901, 1222, 9422, 29889, 29903, 29912, 279, 537, 29913, 411, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 3490, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29924, 29889, 29873, 19123, 13, 18884, 1583, 17255, 21150, 29918, 28107, 29918, 21382, 29918, 7076, 29898, 279, 537, 511, 13, 9651, 1723, 13, 13, 1678, 822, 4770, 21150, 29918, 5675, 29900, 29918, 21382, 29918, 7076, 29898, 1311, 1125, 13, 4706, 7709, 376, 3150, 4321, 292, 29908, 13, 4706, 7709, 376, 5453, 382, 353, 8561, 1252, 9422, 29898, 29924, 5033, 29923, 5513, 13, 4706, 7709, 285, 29915, 1026, 1243, 353, 29850, 1311, 29889, 978, 5038, 1405, 1057, 6024, 13, 4706, 363, 2967, 297, 1583, 29889, 29890, 2129, 29901, 13, 9651, 7709, 285, 29908, 29871, 313, 1026, 3883, 323, 353, 426, 3188, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 24376, 29889, 9984, 29900, 29898, 29924, 5033, 29923, 29897, 297, 323, 29889, 1688, 416, 29908, 13, 4706, 7709, 376, 29962, 732, 313, 1026, 3883, 323, 353, 8561, 24376, 29898, 29924, 5033, 29923, 29897, 297, 323, 29889, 21150, 5513, 13, 13, 1678, 822, 4770, 21150, 29918, 28107, 29918, 21382, 29918, 7076, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 376, 2856, 8561, 29900, 29898, 4984, 613, 13, 4706, 2090, 2801, 29918, 5085, 353, 376, 1642, 7122, 29898, 29888, 29908, 29898, 29923, 29889, 29912, 29874, 29889, 21064, 580, 1800, 29908, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 4706, 7709, 29536, 29898, 29888, 29908, 2856, 12630, 675, 29912, 279, 537, 2119, 29924, 2597, 7692, 2801, 29918, 5085, 29913, 4968, 13, 4706, 363, 12428, 297, 1583, 29889, 1688, 29918, 12277, 1860, 29901, 13, 9651, 6996, 353, 5124, 565, 12428, 17255, 275, 29918, 16121, 580, 1683, 376, 16616, 1213, 13, 9651, 7709, 29536, 29898, 29888, 29908, 2856, 21313, 7971, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 29912, 16121, 29913, 24780, 675, 29912, 279, 537, 2119, 29924, 2597, 7692, 2801, 29918, 5085, 6177, 426, 7971, 17255, 4703, 950, 1891, 29918, 978, 29898, 1311, 29889, 13506, 29512, 29912, 16121, 29913, 29903, 29900, 411, 1134, 260, 3490, 260, 25760, 13, 4706, 7709, 376, 355, 5033, 29923, 19123, 13, 13, 13, 1753, 878, 29918, 6550, 29898, 978, 29892, 334, 7076, 1125, 13, 1678, 7709, 285, 29908, 5453, 426, 978, 6177, 4365, 29908, 13, 1678, 7709, 29536, 29898, 7076, 29897, 13, 1678, 7709, 376, 355, 29908, 13, 13, 13, 1753, 878, 29918, 13699, 29898, 978, 29892, 334, 7076, 1125, 13, 1678, 7709, 285, 29908, 5453, 426, 978, 29913, 353, 2281, 29908, 13, 1678, 7709, 29536, 29898, 7076, 29897, 13, 1678, 7709, 376, 355, 29908, 13, 13, 13, 1753, 878, 29918, 1853, 29898, 978, 29892, 334, 7076, 1125, 13, 1678, 7709, 285, 29908, 5453, 1134, 426, 978, 29913, 353, 4365, 29908, 13, 1678, 7709, 29536, 29898, 7076, 29897, 13, 1678, 7709, 376, 355, 29908, 13, 13, 13, 1753, 1134, 29918, 7529, 29898, 279, 537, 1125, 13, 1678, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 4706, 736, 5124, 13, 1678, 25342, 564, 537, 1275, 29871, 29896, 29901, 13, 4706, 736, 13577, 29874, 376, 13, 1678, 1683, 29901, 13, 4706, 736, 376, 3319, 1800, 11393, 4830, 29317, 15300, 7122, 29898, 29888, 29908, 29915, 29912, 29874, 5038, 363, 263, 297, 633, 2252, 29898, 279, 537, 4961, 13, 13, 13, 1753, 1134, 29918, 5085, 29898, 279, 537, 1125, 13, 1678, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 4706, 736, 5124, 13, 1678, 25342, 564, 537, 1275, 29871, 29896, 29901, 13, 4706, 736, 376, 29909, 29889, 29873, 376, 13, 1678, 1683, 29901, 13, 4706, 736, 376, 3319, 1800, 11393, 4830, 29317, 15300, 7122, 29898, 29888, 29908, 29912, 29874, 29889, 21064, 580, 1836, 29873, 29908, 363, 263, 297, 633, 2252, 29898, 279, 537, 4961, 13, 13, 13, 1753, 633, 2252, 29898, 279, 537, 1125, 13, 1678, 736, 1051, 703, 10736, 1753, 12443, 823, 6321, 29908, 7503, 279, 537, 2314, 13, 13, 13, 1990, 7338, 2673, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 29892, 1024, 29892, 5144, 29892, 11780, 29892, 6996, 29918, 24601, 1125, 13, 4706, 1583, 17255, 978, 353, 1024, 13, 4706, 1583, 17255, 28109, 353, 1051, 29898, 28109, 29897, 13, 4706, 1583, 17255, 12277, 1860, 353, 1051, 29898, 12277, 1860, 29897, 13, 4706, 1583, 17255, 16121, 29918, 24601, 353, 1051, 29898, 16121, 29918, 24601, 29897, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 978, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5144, 29898, 1311, 1125, 13, 4706, 736, 1051, 29898, 1311, 17255, 28109, 29897, 13, 13, 1678, 822, 6081, 29918, 29885, 21079, 29918, 6550, 2450, 29898, 1311, 29892, 564, 1907, 1125, 13, 4706, 363, 564, 537, 297, 564, 1907, 29901, 13, 9651, 7709, 285, 29908, 5453, 8561, 29912, 279, 537, 2119, 29924, 29901, 4365, 29908, 13, 9651, 7709, 285, 29908, 29871, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 9651, 363, 11809, 297, 1583, 17255, 12277, 1860, 29901, 13, 18884, 7709, 285, 29908, 29871, 659, 426, 12277, 358, 29889, 978, 6177, 426, 12277, 358, 29889, 1767, 29918, 1853, 29898, 279, 537, 29892, 285, 29915, 29912, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 1495, 5038, 13, 9651, 7709, 376, 355, 1125, 4365, 29908, 13, 9651, 363, 995, 297, 4256, 8504, 29889, 14153, 29898, 1311, 29889, 28109, 29892, 1583, 17255, 16121, 29918, 24601, 1125, 13, 18884, 7709, 285, 29908, 29871, 659, 426, 1767, 29889, 978, 6177, 426, 1767, 29889, 1767, 29918, 1853, 29898, 279, 537, 29892, 285, 29915, 29912, 1853, 29918, 7529, 29898, 279, 537, 2915, 29924, 29889, 29873, 1495, 5038, 13, 9651, 7709, 376, 355, 29908, 13, 13, 1678, 822, 6081, 29918, 29885, 21079, 29918, 21382, 29898, 1311, 29892, 564, 1907, 1125, 13, 4706, 7709, 376, 5453, 8561, 29924, 21079, 29898, 1888, 14607, 29901, 4365, 29908, 13, 4706, 5684, 29918, 13506, 29918, 7529, 353, 5124, 13, 4706, 363, 11809, 297, 1583, 17255, 12277, 1860, 29901, 13, 9651, 5684, 29918, 13506, 29918, 7529, 4619, 15796, 839, 9329, 29898, 12277, 358, 29889, 978, 29892, 11809, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 13577, 29874, 1159, 467, 3207, 29918, 1853, 29898, 29900, 29892, 376, 29873, 1159, 718, 376, 1599, 376, 13, 4706, 260, 353, 13577, 29874, 29908, 13, 4706, 363, 995, 297, 4256, 8504, 29889, 14153, 29898, 1311, 29889, 28109, 29892, 1583, 17255, 16121, 29918, 24601, 1125, 13, 9651, 7709, 285, 29908, 29871, 659, 426, 1767, 29889, 978, 6177, 426, 1202, 3245, 29918, 13506, 29918, 7529, 1157, 1767, 29889, 1767, 29918, 1853, 29898, 29900, 29892, 260, 2915, 29908, 13, 4706, 7709, 376, 355, 29897, 353, 2281, 29908, 13, 4706, 363, 564, 537, 297, 564, 1907, 29901, 13, 9651, 7709, 285, 29908, 29871, 3883, 8561, 29912, 279, 537, 2119, 29924, 29901, 4365, 29908, 13, 9651, 7709, 285, 29908, 1678, 1134, 426, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 29908, 13, 9651, 11809, 29918, 7039, 353, 5159, 13, 9651, 363, 11809, 297, 1583, 17255, 12277, 1860, 29901, 13, 18884, 7709, 285, 29908, 1678, 659, 426, 12277, 358, 29889, 978, 6177, 426, 12277, 358, 29889, 1767, 29918, 1853, 29898, 279, 537, 29892, 285, 29915, 29912, 1853, 29918, 7529, 29898, 279, 537, 2915, 29873, 1495, 5038, 13, 18884, 11809, 29918, 7039, 29889, 4397, 29898, 12277, 358, 29889, 978, 29897, 13, 9651, 7709, 376, 29871, 1095, 29897, 353, 2281, 29908, 13, 9651, 363, 995, 297, 4256, 8504, 29889, 14153, 29898, 1311, 29889, 28109, 29892, 1583, 17255, 16121, 29918, 24601, 1125, 13, 18884, 7709, 29536, 29898, 1767, 29889, 1767, 29918, 17588, 29898, 12277, 358, 29918, 7039, 29892, 564, 537, 511, 11174, 29922, 29906, 29897, 13, 9651, 7709, 376, 29871, 1095, 29908, 13, 4706, 7709, 376, 355, 29908, 13, 13, 13, 5927, 26538, 29918, 1853, 29918, 22976, 353, 376, 4690, 3235, 29918, 26865, 29902, 3035, 2965, 29918, 11116, 29918, 1529, 29934, 29968, 1001, 29918, 7068, 27269, 10249, 29918, 8186, 5348, 29918, 3301, 4162, 1718, 29918, 1177, 29918, 24647, 1001, 3040, 29928, 29918, 16524, 29908, 13, 13, 13, 1990, 853, 1643, 839, 9329, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1134, 29918, 1125, 13, 4706, 1583, 17255, 1853, 353, 1134, 29918, 13, 13, 1678, 822, 1828, 29918, 1853, 29898, 1311, 29892, 903, 279, 537, 29892, 260, 1125, 13, 4706, 736, 1583, 17255, 1853, 29889, 6506, 29898, 5927, 26538, 29918, 1853, 29918, 22976, 29892, 260, 29897, 13, 13, 1678, 822, 1828, 29918, 11037, 29898, 1311, 29892, 903, 279, 537, 29892, 2380, 1125, 13, 4706, 736, 376, 20230, 4090, 29893, 29908, 29961, 2248, 29962, 13, 13, 1678, 1828, 29918, 18732, 2133, 353, 1828, 29918, 11037, 13, 13, 1678, 1828, 29918, 17588, 353, 1828, 29918, 11037, 13, 13, 13, 1990, 15796, 839, 9329, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3858, 29892, 1134, 29918, 1125, 13, 4706, 1583, 17255, 1643, 353, 3858, 13, 4706, 1583, 17255, 1853, 353, 1134, 29918, 13, 13, 1678, 822, 1828, 29918, 1853, 29898, 1311, 29892, 903, 279, 537, 29892, 260, 1125, 13, 4706, 736, 285, 29908, 29912, 1311, 17255, 1643, 6177, 3319, 1311, 17255, 1853, 29889, 6506, 29898, 5927, 26538, 29918, 1853, 29918, 22976, 29892, 260, 26972, 29908, 13, 13, 1678, 822, 1828, 29918, 11037, 29898, 1311, 29892, 903, 279, 537, 29892, 903, 2248, 1125, 13, 4706, 736, 285, 29908, 30022, 29912, 1311, 17255, 1643, 5038, 13, 13, 1678, 1828, 29918, 18732, 2133, 353, 1828, 29918, 11037, 13, 13, 1678, 1828, 29918, 17588, 353, 1828, 29918, 11037, 13, 13, 13, 1990, 897, 6045, 9329, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1819, 29892, 13341, 29918, 978, 1125, 13, 4706, 1583, 17255, 5975, 353, 1819, 13, 4706, 1583, 17255, 21234, 29918, 978, 353, 13341, 29918, 978, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 21234, 29918, 978, 13, 13, 1678, 822, 1828, 29918, 1853, 29898, 1311, 29892, 564, 537, 29892, 260, 1125, 13, 4706, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 9651, 736, 6213, 13, 4706, 1683, 29901, 13, 9651, 736, 376, 1599, 11393, 7122, 29898, 13, 18884, 285, 29908, 29912, 1311, 29889, 978, 3227, 29874, 6177, 703, 718, 1583, 17255, 5975, 29961, 1311, 17255, 21234, 29918, 978, 1822, 1767, 29918, 1853, 29898, 29900, 29892, 285, 29908, 29915, 29912, 29874, 27195, 718, 376, 5513, 13, 18884, 363, 263, 297, 633, 2252, 29898, 279, 537, 29897, 13, 9651, 1723, 13, 13, 1678, 822, 1828, 29918, 11037, 29898, 1311, 29892, 564, 537, 29892, 903, 2248, 1125, 13, 4706, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 9651, 736, 6213, 13, 4706, 1683, 29901, 13, 9651, 736, 376, 11393, 7122, 29898, 29888, 29908, 30022, 29912, 1311, 29889, 978, 3227, 29874, 5038, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 13, 1678, 822, 1828, 29918, 18732, 2133, 29898, 1311, 29892, 564, 537, 29892, 903, 2248, 1125, 13, 4706, 565, 564, 537, 1275, 29871, 29900, 29901, 13, 9651, 736, 6213, 13, 4706, 1683, 29901, 13, 9651, 736, 376, 11393, 7122, 29898, 29888, 29908, 30022, 29912, 1311, 29889, 978, 3227, 29874, 6177, 29912, 29874, 29889, 21064, 580, 1836, 29912, 1311, 29889, 978, 5038, 363, 263, 297, 633, 2252, 29898, 279, 537, 876, 13, 13, 1678, 822, 1828, 29918, 17588, 29898, 1311, 29892, 903, 279, 537, 29892, 903, 2248, 1125, 13, 4706, 736, 6213, 13, 13, 13, 1990, 7865, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 29892, 1024, 29892, 1134, 29918, 14153, 29892, 5455, 1125, 13, 4706, 1583, 17255, 978, 353, 1024, 13, 4706, 1583, 17255, 1853, 29918, 14153, 353, 1051, 29898, 1853, 29918, 14153, 29897, 13, 4706, 4974, 7431, 29898, 1311, 17255, 1853, 29918, 14153, 29897, 1405, 29871, 29900, 13, 4706, 1583, 17255, 16744, 353, 1583, 17255, 1853, 29918, 14153, 7503, 29899, 29896, 29962, 13, 4706, 1583, 17255, 6891, 353, 5455, 13, 13, 1678, 732, 6799, 13, 1678, 822, 1024, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 978, 13, 13, 1678, 732, 6799, 13, 1678, 822, 5455, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 6891, 13, 13, 1678, 822, 995, 29918, 1853, 29898, 1311, 29892, 564, 537, 29892, 260, 1125, 13, 4706, 736, 376, 1599, 11393, 7122, 29898, 4572, 29898, 8516, 29892, 313, 3207, 29889, 3207, 29918, 1853, 29898, 279, 537, 29892, 260, 29897, 363, 1828, 297, 1583, 17255, 1853, 29918, 14153, 4961, 13, 13, 1678, 822, 995, 29918, 18732, 2133, 29898, 1311, 29892, 564, 537, 1125, 13, 4706, 7709, 313, 13, 9651, 285, 29908, 1026, 426, 1311, 29889, 978, 29913, 376, 13, 9651, 718, 376, 11393, 7122, 29898, 4572, 29898, 8516, 29892, 313, 29886, 29889, 3207, 29918, 11037, 29898, 29900, 29892, 474, 29897, 363, 313, 29875, 29892, 282, 29897, 297, 26985, 29898, 1311, 17255, 16744, 13697, 13, 9651, 718, 285, 29908, 353, 341, 29889, 29912, 1311, 29889, 978, 29913, 376, 13, 9651, 718, 376, 11393, 7122, 29898, 29886, 29889, 3207, 29918, 18732, 2133, 29898, 279, 537, 29892, 474, 29897, 363, 313, 29875, 29892, 282, 29897, 297, 26985, 29898, 1311, 17255, 16744, 876, 13, 4706, 1723, 13, 13, 1678, 822, 995, 29918, 17588, 29898, 1311, 29892, 11780, 29892, 564, 537, 1125, 13, 4706, 363, 1828, 297, 1583, 17255, 16744, 29901, 13, 9651, 565, 338, 8758, 29898, 3207, 29892, 897, 6045, 9329, 1125, 13, 18884, 13341, 29918, 353, 1828, 13, 18884, 2867, 13, 4706, 1683, 29901, 13, 9651, 13341, 29918, 353, 6213, 13, 4706, 7709, 313, 13, 9651, 285, 29908, 1026, 426, 1311, 29889, 978, 29913, 376, 13, 9651, 718, 376, 11393, 7122, 29898, 4572, 29898, 8516, 29892, 313, 29886, 29889, 3207, 29918, 11037, 29898, 279, 537, 29892, 474, 29897, 363, 313, 29875, 29892, 282, 29897, 297, 26985, 29898, 1311, 17255, 16744, 13697, 13, 9651, 718, 285, 29908, 353, 1954, 14607, 29889, 29912, 1311, 29889, 978, 29913, 376, 13, 9651, 718, 376, 1642, 7122, 29898, 13, 18884, 285, 29908, 30022, 29912, 7971, 29913, 5919, 29924, 29889, 29912, 7971, 5038, 718, 376, 1642, 7122, 29898, 2636, 565, 13341, 29918, 338, 6213, 1683, 313, 29888, 29908, 3695, 29912, 21234, 5396, 978, 3227, 29874, 5038, 363, 263, 297, 633, 2252, 29898, 279, 537, 4961, 718, 16521, 376, 13, 18884, 363, 12428, 297, 11780, 13, 9651, 1723, 13, 9651, 718, 376, 11393, 7122, 29898, 4572, 29898, 8516, 29892, 313, 29886, 29889, 3207, 29918, 17588, 29898, 279, 537, 29892, 474, 29897, 363, 313, 29875, 29892, 282, 29897, 297, 26985, 29898, 1311, 17255, 16744, 13697, 13, 4706, 1723, 13, 13, 13, 5975, 353, 6571, 13, 13, 1753, 659, 29898, 978, 29892, 334, 1853, 29918, 14153, 29892, 5455, 29922, 8516, 1125, 13, 1678, 822, 1207, 29918, 3207, 29898, 3207, 1125, 13, 4706, 565, 338, 8758, 29898, 3207, 29892, 851, 1125, 13, 9651, 736, 853, 1643, 839, 9329, 29898, 3207, 29897, 13, 4706, 25342, 338, 8758, 29898, 3207, 29892, 9657, 1125, 13, 9651, 17288, 1643, 29892, 1134, 29918, 4638, 353, 1828, 29889, 7076, 580, 13, 9651, 736, 15796, 839, 9329, 29898, 1643, 29892, 1134, 19925, 13, 4706, 25342, 338, 8758, 29898, 3207, 29892, 18761, 1125, 13, 9651, 565, 1828, 29961, 29900, 29962, 338, 897, 6045, 9329, 29901, 13, 18884, 736, 897, 6045, 9329, 29898, 5975, 29892, 1828, 29961, 29896, 2314, 13, 9651, 1683, 29901, 13, 18884, 4974, 7700, 13, 4706, 1683, 29901, 13, 9651, 4974, 7700, 13, 13, 1678, 995, 353, 7865, 29898, 13, 4706, 1024, 29922, 978, 29892, 13, 4706, 1134, 29918, 14153, 7607, 5675, 29918, 3207, 29898, 3207, 29897, 363, 1828, 297, 1134, 29918, 14153, 511, 13, 4706, 5455, 29922, 6891, 29892, 13, 1678, 1723, 13, 1678, 4974, 1024, 451, 297, 1819, 13, 1678, 1819, 29961, 978, 29962, 353, 995, 13, 1678, 736, 995, 13, 13, 13, 1753, 1294, 29898, 978, 29892, 334, 29892, 5144, 29892, 11780, 1125, 13, 1678, 822, 1207, 29918, 12277, 358, 29898, 7971, 1125, 13, 4706, 565, 338, 8758, 29898, 7971, 29892, 851, 1125, 13, 9651, 736, 1819, 29961, 7971, 29962, 13, 4706, 25342, 338, 8758, 29898, 7971, 29892, 7865, 1125, 13, 9651, 736, 12428, 13, 4706, 1683, 29901, 13, 9651, 4974, 7700, 13, 13, 1678, 5144, 353, 1051, 29898, 28109, 29897, 13, 13, 1678, 736, 7338, 2673, 29898, 13, 4706, 1024, 29922, 978, 29892, 13, 4706, 5144, 7607, 14242, 363, 4509, 297, 5144, 565, 338, 8758, 29898, 14242, 29892, 7865, 8243, 13, 4706, 11780, 7607, 5675, 29918, 12277, 358, 29898, 12277, 358, 29897, 363, 11809, 297, 11780, 511, 13, 4706, 6996, 29918, 24601, 7607, 5975, 29961, 14242, 29962, 363, 4509, 297, 5144, 565, 338, 8758, 29898, 14242, 29892, 851, 8243, 13, 1678, 1723, 13, 13, 13, 1753, 16000, 29898, 978, 1125, 13, 1678, 736, 313, 11494, 9329, 29892, 1024, 29897, 13, 13, 13, 29873, 353, 1197, 26538, 29918, 1853, 29918, 22976, 13, 13, 13, 3018, 1169, 353, 5159, 13, 13, 1753, 22917, 29898, 13, 4706, 1024, 29892, 13, 4706, 1197, 26538, 29922, 5574, 29892, 13, 4706, 1819, 11759, 1402, 13, 4706, 17752, 11759, 1402, 13, 4706, 1243, 29918, 19057, 11759, 1402, 13, 4706, 1243, 29918, 12277, 1860, 11759, 1402, 13, 1125, 13, 1678, 22917, 353, 14184, 1691, 29898, 13, 4706, 10944, 543, 5323, 1169, 613, 13, 4706, 1024, 29922, 978, 29892, 13, 4706, 1197, 26538, 29922, 5927, 26538, 29892, 13, 4706, 22561, 11759, 1402, 13, 4706, 1819, 29922, 5975, 29892, 13, 4706, 17752, 29922, 24299, 29892, 13, 4706, 1243, 29918, 19057, 29922, 1688, 29918, 19057, 29892, 13, 4706, 1243, 29918, 12277, 1860, 29922, 1688, 29918, 12277, 1860, 29892, 13, 1678, 1723, 13, 1678, 1020, 1169, 29889, 4397, 29898, 3018, 277, 29897, 13, 1678, 736, 22917, 13, 13, 13, 535, 1547, 29879, 353, 5159, 13, 13, 1753, 6964, 29898, 13, 4706, 1024, 29892, 13, 4706, 22561, 29892, 13, 4706, 1819, 11759, 1402, 13, 4706, 1243, 29918, 12277, 1860, 11759, 1402, 13, 1125, 13, 1678, 6964, 353, 14184, 1691, 29898, 13, 4706, 10944, 543, 1168, 1547, 29879, 613, 13, 4706, 1024, 29922, 978, 29892, 13, 4706, 1197, 26538, 29922, 5574, 29892, 13, 4706, 22561, 29922, 29890, 2129, 29892, 13, 4706, 1819, 29922, 5975, 29892, 13, 4706, 17752, 11759, 1402, 13, 4706, 1243, 29918, 19057, 11759, 1402, 13, 4706, 1243, 29918, 12277, 1860, 29922, 1688, 29918, 12277, 1860, 29892, 13, 1678, 1723, 13, 1678, 22001, 29889, 4397, 29898, 535, 1547, 29897, 13, 1678, 736, 6964, 13, 13, 13, 4136, 2277, 323, 4717, 1806, 29903, 16101, 29937, 13, 13, 29937, 732, 14394, 313, 7897, 3462, 22917, 4321, 519, 411, 659, 1243, 29901, 4321, 29889, 29873, 13, 13, 29937, 319, 334, 276, 26081, 29930, 338, 263, 1347, 15783, 263, 995, 363, 263, 7047, 13897, 20026, 29889, 13, 29937, 1932, 1950, 29892, 372, 881, 367, 263, 2854, 438, 29907, 8807, 4603, 363, 278, 995, 29889, 13, 276, 6338, 519, 353, 22917, 29898, 13, 1678, 376, 1123, 6338, 519, 613, 13, 1678, 1819, 11759, 791, 703, 276, 558, 613, 260, 29892, 16000, 703, 276, 558, 4968, 376, 1807, 1159, 1402, 13, 1678, 1243, 29918, 19057, 11759, 791, 703, 276, 6338, 800, 613, 285, 29908, 3319, 29873, 29913, 334, 1347, 29897, 1051, 1159, 1402, 13, 29897, 13, 13, 11745, 1907, 353, 659, 703, 11745, 1907, 613, 285, 29908, 29912, 29873, 29913, 1051, 1051, 1159, 13, 13, 1686, 17219, 353, 22917, 29898, 13, 1678, 376, 6108, 17219, 613, 13, 1678, 1819, 11759, 791, 703, 11745, 613, 260, 29892, 260, 29892, 16000, 703, 11745, 4968, 376, 11227, 613, 5455, 543, 543, 29897, 1402, 13, 1678, 17752, 11759, 13, 4706, 1294, 29898, 13, 9651, 376, 29928, 15622, 613, 13, 9651, 5144, 11759, 791, 703, 29881, 15622, 613, 260, 29892, 260, 29892, 16000, 703, 11745, 4968, 376, 11227, 613, 5455, 543, 25299, 1159, 1402, 13, 9651, 11780, 29922, 3366, 11745, 12436, 13, 4706, 10353, 13, 1678, 21251, 13, 1678, 1243, 29918, 19057, 11759, 13, 4706, 5186, 1907, 29892, 13, 4706, 659, 703, 29881, 8349, 2063, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 1800, 1051, 4968, 13, 1678, 21251, 13, 1678, 1243, 29918, 12277, 1860, 11759, 276, 6338, 519, 1402, 13, 29897, 13, 13, 4990, 519, 353, 22917, 29898, 13, 1678, 376, 9323, 519, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 791, 703, 517, 29918, 1807, 613, 260, 29892, 376, 1807, 1159, 1402, 13, 1678, 1243, 29918, 19057, 11759, 791, 703, 2218, 12922, 613, 285, 29908, 3319, 29873, 29913, 334, 1347, 29897, 1051, 1159, 1402, 13, 29897, 13, 13, 29937, 732, 14394, 3201, 1169, 29889, 10438, 519, 411, 659, 6608, 29901, 260, 1599, 938, 29892, 21755, 773, 11699, 400, 2204, 29889, 8568, 13, 13, 862, 29879, 519, 353, 22917, 29898, 13, 1678, 376, 29925, 1503, 519, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 2202, 29918, 974, 29918, 1807, 613, 376, 1807, 613, 285, 29908, 29912, 29873, 29913, 2984, 4968, 13, 4706, 659, 703, 974, 29918, 1807, 613, 376, 1807, 613, 260, 511, 13, 1678, 21251, 13, 1678, 1243, 29918, 19057, 11759, 791, 703, 20889, 1338, 613, 285, 29908, 29898, 1807, 334, 426, 29873, 1800, 1051, 1159, 1402, 13, 1678, 1243, 29918, 12277, 1860, 11759, 1686, 17219, 29892, 2755, 519, 1402, 13, 29897, 13, 13, 510, 862, 519, 353, 22917, 29898, 13, 1678, 376, 1523, 862, 519, 613, 13, 1678, 1819, 11759, 791, 703, 18307, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 376, 6843, 598, 29889, 29873, 1159, 1402, 13, 1678, 17752, 11759, 13, 4706, 1294, 29898, 13, 9651, 376, 25120, 1008, 29931, 404, 1349, 273, 613, 13, 9651, 5144, 11759, 13, 18884, 659, 703, 2222, 29918, 27603, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 376, 11227, 613, 5455, 543, 29966, 4968, 13, 18884, 659, 703, 2222, 29918, 272, 29918, 11745, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 376, 11227, 613, 5455, 543, 29966, 543, 511, 13, 18884, 659, 703, 7979, 1008, 29918, 27603, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 376, 11227, 613, 5455, 543, 29958, 4968, 13, 18884, 659, 703, 7979, 1008, 29918, 272, 29918, 11745, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 376, 11227, 613, 5455, 543, 29958, 543, 511, 13, 9651, 21251, 13, 9651, 11780, 29922, 3366, 18307, 12436, 13, 4706, 10353, 13, 4706, 1294, 29898, 13, 9651, 376, 29933, 300, 1452, 613, 13, 9651, 5144, 11759, 13, 18884, 659, 703, 14811, 613, 260, 29892, 8853, 677, 1115, 260, 1118, 8853, 9812, 1115, 260, 1118, 16000, 703, 18307, 4968, 376, 11227, 4968, 13, 18884, 659, 703, 14811, 29918, 272, 29918, 11745, 613, 260, 29892, 8853, 677, 1115, 260, 1118, 8853, 9812, 1115, 260, 1118, 16000, 703, 18307, 4968, 376, 11227, 1159, 13, 9651, 21251, 13, 9651, 11780, 29922, 3366, 2222, 29918, 27603, 613, 376, 2222, 29918, 272, 29918, 11745, 613, 376, 7979, 1008, 29918, 27603, 613, 376, 7979, 1008, 29918, 272, 29918, 11745, 12436, 13, 4706, 10353, 13, 4706, 1294, 29898, 13, 9651, 376, 8140, 7976, 613, 13, 9651, 5144, 11759, 13, 18884, 659, 703, 1195, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 260, 511, 13, 18884, 659, 703, 3317, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 260, 511, 13, 18884, 659, 703, 1195, 29918, 3317, 613, 260, 29892, 260, 29892, 16000, 703, 18307, 4968, 285, 29908, 29912, 29873, 29913, 334, 426, 29873, 29913, 4968, 13, 9651, 21251, 13, 9651, 11780, 29922, 3366, 18307, 12436, 13, 4706, 10353, 13, 1678, 21251, 13, 1678, 1243, 29918, 19057, 11759, 13, 4706, 659, 703, 20488, 613, 285, 29908, 29912, 29873, 29913, 1051, 1051, 4968, 13, 4706, 5186, 1907, 29892, 13, 1678, 21251, 13, 1678, 1243, 29918, 12277, 1860, 11759, 1686, 17219, 29892, 2755, 519, 1402, 13, 29897, 13, 13, 5393, 3398, 353, 22917, 29898, 13, 1678, 376, 29934, 292, 3398, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 9171, 613, 260, 511, 13, 4706, 659, 703, 650, 613, 260, 511, 13, 4706, 396, 659, 703, 1066, 403, 613, 260, 29892, 260, 29892, 5455, 543, 30022, 29974, 4968, 13, 4706, 659, 703, 10052, 403, 613, 260, 29892, 260, 29892, 5455, 543, 30022, 29899, 4968, 13, 4706, 659, 703, 1202, 613, 260, 29892, 260, 29892, 260, 29892, 5455, 543, 29974, 4968, 13, 4706, 659, 703, 1491, 29873, 1461, 613, 260, 29892, 260, 29892, 260, 29892, 5455, 543, 29899, 4968, 13, 4706, 659, 703, 18056, 368, 613, 260, 29892, 260, 29892, 260, 29892, 5455, 543, 29930, 4968, 13, 4706, 659, 703, 4563, 680, 613, 260, 29892, 260, 29892, 260, 29892, 5455, 13802, 4968, 13, 1678, 21251, 13, 1678, 17752, 11759, 13, 4706, 1294, 29898, 13, 9651, 376, 4035, 29873, 1461, 613, 13, 9651, 5144, 29922, 3366, 1491, 29873, 1461, 12436, 13, 9651, 11780, 29922, 3366, 10052, 403, 613, 376, 1202, 12436, 13, 4706, 10353, 13, 4706, 1294, 29898, 13, 9651, 376, 29903, 4718, 613, 13, 9651, 5144, 11759, 791, 703, 17619, 613, 260, 29892, 260, 29897, 1402, 13, 9651, 11780, 29922, 3366, 18056, 368, 12436, 13, 4706, 10353, 13, 4706, 1294, 29898, 13, 9651, 376, 1252, 3296, 29347, 613, 13, 9651, 5144, 11759, 791, 703, 735, 3296, 29347, 613, 260, 29892, 376, 524, 613, 260, 29892, 5455, 543, 1068, 1159, 1402, 13, 9651, 11780, 11759, 13, 18884, 376, 650, 613, 13, 18884, 376, 17619, 613, 13, 18884, 376, 18056, 368, 613, 13, 18884, 659, 703, 735, 3296, 29347, 29918, 22198, 29918, 735, 3296, 613, 8853, 735, 3296, 29347, 1115, 285, 29908, 29912, 29873, 29913, 1599, 938, 1599, 426, 29873, 5038, 1118, 260, 29892, 376, 524, 613, 260, 511, 13, 9651, 21251, 13, 4706, 10353, 13, 1678, 21251, 13, 1678, 1243, 29918, 19057, 11759, 13, 4706, 659, 703, 1202, 2187, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 29913, 334, 426, 29873, 1800, 1051, 4968, 13, 4706, 659, 703, 10052, 800, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 1800, 1051, 4968, 13, 4706, 659, 703, 18056, 5795, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 29913, 334, 426, 29873, 1800, 1051, 4968, 13, 4706, 659, 703, 4563, 12112, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 29913, 334, 426, 29873, 1800, 1051, 4968, 13, 4706, 659, 703, 735, 3296, 29875, 800, 613, 285, 29908, 3319, 29873, 29913, 334, 938, 334, 426, 29873, 1800, 1051, 4968, 13, 1678, 21251, 13, 1678, 1243, 29918, 12277, 1860, 11759, 1686, 17219, 29892, 2755, 519, 1402, 13, 29897, 13, 13, 974, 29918, 15770, 29918, 20326, 353, 22917, 29898, 13, 1678, 376, 2776, 15449, 29478, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 974, 29918, 524, 613, 376, 524, 613, 260, 511, 13, 4706, 659, 703, 974, 29918, 7411, 613, 376, 7411, 613, 260, 511, 13, 1678, 21251, 13, 29897, 13, 13, 517, 29918, 15770, 29918, 20326, 353, 22917, 29898, 13, 1678, 376, 1762, 15449, 29478, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 517, 29918, 524, 613, 260, 29892, 376, 524, 4968, 13, 4706, 659, 703, 517, 29918, 7411, 613, 260, 29892, 376, 7411, 4968, 13, 1678, 21251, 13, 29897, 13, 13, 11965, 29918, 2146, 617, 353, 22917, 29898, 13, 1678, 376, 23084, 5091, 617, 613, 13, 1678, 1197, 26538, 29922, 8824, 29892, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 11965, 613, 260, 29892, 260, 511, 13, 4706, 659, 703, 2146, 617, 613, 260, 29892, 260, 511, 13, 1678, 21251, 13, 1678, 17752, 11759, 13, 4706, 1294, 29898, 13, 9651, 376, 23084, 5091, 617, 613, 13, 9651, 5144, 29922, 3366, 11965, 613, 376, 2146, 617, 12436, 13, 9651, 11780, 29922, 3366, 650, 613, 376, 1202, 613, 376, 1491, 29873, 1461, 12436, 13, 4706, 10353, 13, 1678, 21251, 13, 1678, 1243, 29918, 19057, 11759, 791, 703, 8698, 1080, 613, 285, 29908, 3319, 29873, 29913, 334, 426, 29873, 1800, 1051, 1159, 1402, 13, 1678, 1243, 29918, 12277, 1860, 11759, 1686, 17219, 29892, 2755, 519, 1402, 13, 29897, 13, 13, 13, 4136, 2277, 8707, 4741, 7982, 29903, 16101, 29937, 13, 13, 29937, 732, 14394, 1281, 1547, 29879, 363, 4256, 1849, 322, 16250, 29889, 12538, 763, 14348, 29892, 21679, 29892, 2598, 29877, 23544, 29892, 14974, 23544, 29892, 22985, 7895, 13, 13, 1693, 28677, 353, 6964, 29898, 13, 1678, 376, 7648, 28677, 613, 13, 1678, 22561, 11759, 1686, 17219, 29892, 2755, 519, 1402, 13, 29897, 13, 13, 519, 353, 6964, 29898, 13, 1678, 376, 29909, 569, 613, 13, 1678, 22561, 11759, 1693, 28677, 29892, 5734, 519, 1402, 13, 29897, 13, 13, 1807, 519, 353, 6964, 29898, 13, 1678, 376, 1231, 519, 613, 13, 1678, 22561, 11759, 4990, 519, 29892, 610, 29879, 519, 1402, 13, 1678, 1243, 29918, 12277, 1860, 11759, 276, 6338, 519, 29892, 1592, 17219, 1402, 29871, 396, 732, 29873, 8144, 360, 6085, 346, 515, 610, 29879, 519, 29915, 29879, 1243, 11780, 13, 29897, 13, 13, 4537, 353, 6964, 29898, 13, 1678, 376, 4557, 613, 13, 1678, 22561, 11759, 1693, 28677, 29892, 1347, 519, 29892, 9228, 3398, 29892, 310, 29918, 15770, 29918, 20326, 1402, 13, 29897, 13, 13, 6370, 29918, 4537, 353, 6964, 29898, 13, 1678, 376, 21713, 4557, 613, 13, 1678, 396, 732, 14394, 1804, 13, 1678, 22561, 11759, 4537, 29892, 5734, 519, 29892, 304, 29918, 15770, 29918, 20326, 1402, 13, 1678, 1819, 11759, 13, 4706, 659, 703, 6897, 613, 260, 29892, 260, 511, 13, 4706, 659, 703, 1545, 7207, 613, 260, 29892, 260, 29892, 260, 29892, 5455, 543, 1545, 4968, 13, 1678, 21251, 13, 29897, 13, 13, 16031, 353, 6964, 29898, 13, 1678, 376, 7798, 613, 13, 1678, 396, 732, 14394, 18531, 3538, 29973, 13, 1678, 396, 732, 14394, 330, 2252, 29892, 301, 4912, 29892, 439, 290, 397, 13, 1678, 396, 732, 14394, 2920, 29901, 763, 317, 952, 29889, 524, 29918, 2311, 13, 1678, 22561, 11759, 6370, 29918, 4537, 29892, 4450, 29918, 2146, 617, 1402, 13, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 12551, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 1678, 4974, 2897, 29889, 2084, 29889, 275, 3972, 29898, 23848, 29897, 13, 13, 1678, 822, 2531, 29898, 978, 29892, 334, 7076, 1125, 13, 4706, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 29898, 23848, 29892, 1024, 511, 376, 29893, 1159, 408, 285, 29901, 13, 9651, 5706, 29898, 7076, 29892, 934, 353, 285, 29897, 13, 13, 1678, 2531, 29898, 13, 4706, 376, 29943, 562, 1691, 29889, 6333, 613, 13, 4706, 525, 7501, 1140, 426, 742, 13, 4706, 525, 29871, 7115, 3972, 543, 29933, 29911, 29908, 742, 13, 4706, 525, 29871, 2943, 518, 12181, 543, 1884, 3108, 742, 13, 4706, 525, 29871, 1014, 4262, 9867, 29918, 5323, 1169, 426, 742, 13, 4706, 525, 1678, 3858, 543, 5323, 1169, 1769, 742, 13, 4706, 313, 29888, 29915, 1678, 426, 3018, 277, 29889, 978, 29889, 13609, 28296, 518, 1643, 10724, 3018, 277, 29889, 4262, 29894, 466, 29918, 1643, 5038, 1385, 29915, 363, 22917, 297, 1020, 1169, 511, 13, 4706, 525, 29871, 500, 742, 13, 4706, 525, 29871, 1014, 4262, 9867, 29918, 1168, 1547, 29879, 426, 742, 13, 4706, 525, 1678, 3858, 543, 1168, 1547, 29879, 1769, 742, 13, 4706, 313, 29888, 29915, 1678, 426, 535, 1547, 29889, 978, 29889, 13609, 28296, 518, 1643, 10724, 535, 1547, 29889, 4262, 29894, 466, 29918, 1643, 5038, 1385, 29915, 363, 6964, 297, 22001, 511, 13, 4706, 525, 29871, 500, 742, 13, 4706, 313, 29888, 29915, 29871, 426, 535, 1547, 29889, 978, 29889, 13609, 28296, 1599, 426, 3188, 29889, 978, 29889, 13609, 580, 10162, 363, 6964, 297, 22001, 363, 2967, 297, 6964, 29889, 29890, 2129, 511, 13, 4706, 525, 29913, 742, 13, 1678, 1723, 13, 13, 1678, 2531, 703, 5323, 1169, 29889, 29885, 492, 613, 313, 3018, 277, 29889, 6550, 2450, 363, 22917, 297, 1020, 1169, 876, 13, 1678, 2531, 703, 1168, 1547, 29879, 29889, 29885, 492, 613, 313, 535, 1547, 29889, 6550, 2450, 363, 6964, 297, 22001, 876, 13, 13, 1678, 12551, 353, 2897, 29889, 2084, 29889, 7122, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 376, 5323, 1169, 1159, 13, 1678, 2897, 29889, 11256, 3972, 29898, 23848, 29897, 13, 13, 1678, 363, 22917, 297, 1020, 1169, 29901, 13, 4706, 2531, 29898, 29888, 29908, 29912, 3018, 277, 29889, 978, 1836, 828, 613, 22917, 29889, 21382, 29918, 7076, 29897, 13, 13, 1678, 12551, 353, 2897, 29889, 2084, 29889, 7122, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 376, 1168, 1547, 29879, 1159, 13, 1678, 2897, 29889, 11256, 3972, 29898, 23848, 29897, 13, 13, 1678, 363, 6964, 297, 22001, 29901, 13, 4706, 2531, 29898, 29888, 29908, 29912, 535, 1547, 29889, 978, 1836, 828, 613, 6964, 29889, 21382, 29918, 7076, 29897, 13, 2 ]