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
|
---|---|---|---|---|---|
FGR/utils/visual.py | weiyithu/FGR | 27 | 119242 | <filename>FGR/utils/visual.py<gh_stars>10-100
from .kitti_utils_official import *
import traceback
def draw_bbox_3d_to_2d_gt(img, corner, AverageValue_x, AverageValue_y):
gt_box_3d = corner.copy()
for point in gt_box_3d:
point[0] = point[0] * 100 + 250 - AverageValue_x
point[2] = point[2] * 100 + 250 - AverageValue_y
cv2.line(img, (int(gt_box_3d[0][0]), int(gt_box_3d[0][2])), (int(gt_box_3d[1][0]), int(gt_box_3d[1][2])), (0, 255, 255), 1, 4)
cv2.line(img, (int(gt_box_3d[1][0]), int(gt_box_3d[1][2])), (int(gt_box_3d[2][0]), int(gt_box_3d[2][2])), (0, 255, 255), 1, 4)
cv2.line(img, (int(gt_box_3d[2][0]), int(gt_box_3d[2][2])), (int(gt_box_3d[3][0]), int(gt_box_3d[3][2])), (0, 255, 255), 1, 4)
cv2.line(img, (int(gt_box_3d[3][0]), int(gt_box_3d[3][2])), (int(gt_box_3d[0][0]), int(gt_box_3d[0][2])), (0, 255, 255), 1, 4)
return img
def draw_frustum_lr_line(img, left_point, right_point, AverageValue_x, AverageValue_y):
left_point_draw = np.array([0., 0.])
left_point_draw[0] = (left_point[0] * 20000 + 250 - AverageValue_x)
left_point_draw[1] = (left_point[1] * 20000 + 250 - AverageValue_y)
right_point_draw = np.array([0., 0.])
right_point_draw[0] = (right_point[0] * 20000 + 250 - AverageValue_x)
right_point_draw[1] = (right_point[1] * 20000 + 250 - AverageValue_y)
initial_point_draw = np.array([0., 0.])
initial_point_draw[0] = 250 - AverageValue_x
initial_point_draw[1] = 250 - AverageValue_y
cv2.line(img, tuple(initial_point_draw.astype(np.float32)), tuple(left_point_draw.astype(np.float32)),
(255, 255, 0), 1, 4)
cv2.line(img, tuple(initial_point_draw.astype(np.float32)), tuple(right_point_draw.astype(np.float32)),
(255, 255, 0), 1, 4)
return img
def draw_bbox_3d_to_2d_psuedo_no_intersection(img, box_no_intersection, AverageValue_x, AverageValue_y):
box_draw = box_no_intersection.copy()
for var in box_draw:
var[0] = var[0] * 100 + 250 - AverageValue_x
var[1] = var[1] * 100 + 250 - AverageValue_y
cv2.line(img, tuple(box_draw[0]), tuple(box_draw[1]), (255, 0, 255), 1, 4)
cv2.line(img, tuple(box_draw[1]), tuple(box_draw[2]), (255, 0, 255), 1, 4)
cv2.line(img, tuple(box_draw[2]), tuple(box_draw[3]), (255, 0, 255), 1, 4)
cv2.line(img, tuple(box_draw[3]), tuple(box_draw[0]), (255, 0, 255), 1, 4)
return img
def draw_bbox_3d_to_2d_psuedo_with_key_vertex(img, FinalPoint, loc1, loc2, loc3, AverageValue_x, AverageValue_y):
loc1_draw = np.array([0., 0.])
loc2_draw = np.array([0., 0.])
loc3_draw = np.array([0., 0.])
loc1_draw[0] = loc1[0] * 100 + 250 - AverageValue_x
loc1_draw[1] = loc1[1] * 100 + 250 - AverageValue_y
loc2_draw[0] = loc2[0] * 100 + 250 - AverageValue_x
loc2_draw[1] = loc2[1] * 100 + 250 - AverageValue_y
loc3_draw[0] = loc3[0] * 100 + 250 - AverageValue_x
loc3_draw[1] = loc3[1] * 100 + 250 - AverageValue_y
# draw key vertex with larger point than normal point cloud
FinalPoint_draw = np.array([0., 0.])
FinalPoint_draw[0] = FinalPoint[0] * 100 + 250 - AverageValue_x
FinalPoint_draw[1] = FinalPoint[1] * 100 + 250 - AverageValue_y
cv2.circle(img, tuple(FinalPoint_draw.astype(np.float32)), 3, (0, 255, 0), 4)
cv2.line(img, tuple(loc1_draw.astype(np.float32)), tuple(FinalPoint_draw.astype(np.float32)), (0, 0, 255), 1, 4)
cv2.line(img, tuple(loc1_draw.astype(np.float32)), tuple(loc3_draw.astype(np.float32)), (0, 0, 255), 1, 4)
cv2.line(img, tuple(loc3_draw.astype(np.float32)), tuple(loc2_draw.astype(np.float32)), (0, 0, 255), 1, 4)
cv2.line(img, tuple(loc2_draw.astype(np.float32)), tuple(FinalPoint_draw.astype(np.float32)), (0, 0, 255), 1, 4)
return img
def draw_point_clouds(img, KeyPoint_for_draw, AverageValue_x, AverageValue_y):
for point in KeyPoint_for_draw:
a = point[0] * 100 + 250 - AverageValue_x
b = point[1] * 100 + 250 - AverageValue_y
cv2.circle(img, (int(a), int(b)), 1, (255, 255, 255), 2)
return img
def draw_2d_box_in_2d_image(KeyPoint_3d, box_2d, p2):
img = np.zeros((1000, 1000, 3), 'f4')
KeyPoint_for_draw = np.copy(KeyPoint_3d[:, [0, 2]])
KeyPoint = KeyPoint_3d[:, [0, 2]]
AverageValue_x = np.mean(KeyPoint[:, 0]) * 100
AverageValue_y = np.mean(KeyPoint[:, 1]) * 100
for point in KeyPoint_for_draw:
a = point[0] * 50 + 500 - AverageValue_x
b = point[1] * 50 + 100 - AverageValue_y
cv2.circle(img, (int(a), int(b)), 1, (255, 255, 255), 0)
left_point = np.array([box_2d[0], 0, 1])
right_point = np.array([box_2d[2], 0, 1])
left_point = np.linalg.inv(p2[:, [0, 1, 2]]).dot(left_point.T)
right_point = np.linalg.inv(p2[:, [0, 1, 2]]).dot(right_point.T)
left_point = left_point[[0, 2]]
right_point = right_point[[0, 2]]
left_point_draw = np.array([0., 0.])
right_point_draw = np.array([0., 0.])
while True:
zoom_factor = 60000
try:
left_point_draw[0] = (left_point[0] * zoom_factor + 100 - AverageValue_x)
left_point_draw[1] = (left_point[1] * zoom_factor + 100 - AverageValue_y)
right_point_draw[0] = (right_point[0] * zoom_factor + 100 - AverageValue_x)
right_point_draw[1] = (right_point[1] * zoom_factor + 100 - AverageValue_y)
except OverflowError:
zoom_factor /= 6
continue
else:
break
initial_point_draw = np.array([0., 0.])
initial_point_draw[0] = 500 - AverageValue_x
initial_point_draw[1] = 100 - AverageValue_y
cv2.line(img, tuple(initial_point_draw.astype(np.float32)), tuple(left_point_draw.astype(np.float32)),
(255, 255, 0), 1, 4)
cv2.line(img, tuple(initial_point_draw.astype(np.float32)), tuple(right_point_draw.astype(np.float32)),
(255, 255, 0), 1, 4)
return img
def draw_3d_box_in_2d_image(img, box):
# draw 3D box in 2D RGB image, if needed
cv2.line(img, (int(box[0][0]), int(box[0][1])), (int(box[1][0]), int(box[1][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[1][0]), int(box[1][1])), (int(box[2][0]), int(box[2][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[2][0]), int(box[2][1])), (int(box[3][0]), int(box[3][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[3][0]), int(box[3][1])), (int(box[0][0]), int(box[0][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[0][0]), int(box[0][1])), (int(box[4][0]), int(box[4][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[1][0]), int(box[1][1])), (int(box[5][0]), int(box[5][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[2][0]), int(box[2][1])), (int(box[6][0]), int(box[6][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[3][0]), int(box[3][1])), (int(box[7][0]), int(box[7][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[4][0]), int(box[4][1])), (int(box[5][0]), int(box[5][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[5][0]), int(box[5][1])), (int(box[6][0]), int(box[6][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[6][0]), int(box[6][1])), (int(box[7][0]), int(box[7][1])), (0, 0, 255), 1, 4)
cv2.line(img, (int(box[7][0]), int(box[7][1])), (int(box[4][0]), int(box[4][1])), (0, 0, 255), 1, 4)
return img
def show_velodyne_in_camera(loc0, loc1, loc2, loc3, y_min, y_max):
# use mayavi to draw 3D bbox
corners = np.array([[[loc0[0], loc1[0], loc2[0], loc3[0], loc0[0], loc1[0], loc2[0], loc3[0]],
[loc0[1], loc1[1], loc2[1], loc3[1], loc0[1], loc1[1], loc2[1], loc3[1]],
[y_min, y_min, y_min, y_min, y_max, y_max, y_max, y_max]]],
dtype=np.float32)
for i in range(corners.shape[0]):
corner = corners[i]
idx = np.array([0, 1, 2, 3, 0, 4, 5, 6, 7, 4, 5, 1, 2, 6, 7, 3])
x = corner[0, idx]
y = corner[1, idx]
z = corner[2, idx]
mayavi.mlab.plot3d(x, y, z, color=(0.23, 0.6, 1), colormap='Spectral', representation='wireframe', line_width=5) | [
1,
529,
9507,
29958,
29943,
14345,
29914,
13239,
29914,
20119,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
869,
29895,
986,
29875,
29918,
13239,
29918,
29877,
7880,
1053,
334,
13,
5215,
9637,
1627,
13,
13,
13,
1753,
4216,
29918,
29890,
1884,
29918,
29941,
29881,
29918,
517,
29918,
29906,
29881,
29918,
4141,
29898,
2492,
29892,
11155,
29892,
319,
19698,
1917,
29918,
29916,
29892,
319,
19698,
1917,
29918,
29891,
1125,
13,
268,
13,
1678,
330,
29873,
29918,
1884,
29918,
29941,
29881,
353,
11155,
29889,
8552,
580,
13,
1678,
363,
1298,
297,
330,
29873,
29918,
1884,
29918,
29941,
29881,
29901,
13,
4706,
1298,
29961,
29900,
29962,
353,
1298,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
4706,
1298,
29961,
29906,
29962,
353,
1298,
29961,
29906,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29900,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29900,
3816,
29906,
2314,
511,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29896,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29896,
3816,
29906,
2314,
511,
313,
29900,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29896,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29896,
3816,
29906,
2314,
511,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29906,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29906,
3816,
29906,
2314,
511,
313,
29900,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29906,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29906,
3816,
29906,
2314,
511,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29941,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29941,
3816,
29906,
2314,
511,
313,
29900,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29941,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29941,
3816,
29906,
2314,
511,
313,
524,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29900,
3816,
29900,
11724,
938,
29898,
4141,
29918,
1884,
29918,
29941,
29881,
29961,
29900,
3816,
29906,
2314,
511,
313,
29900,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
268,
13,
1678,
736,
10153,
13,
13,
13,
1753,
4216,
29918,
1341,
504,
398,
29918,
29212,
29918,
1220,
29898,
2492,
29892,
2175,
29918,
3149,
29892,
1492,
29918,
3149,
29892,
319,
19698,
1917,
29918,
29916,
29892,
319,
19698,
1917,
29918,
29891,
1125,
13,
268,
13,
1678,
2175,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
2175,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
313,
1563,
29918,
3149,
29961,
29900,
29962,
334,
29871,
29906,
29900,
29900,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
29897,
13,
1678,
2175,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
313,
1563,
29918,
3149,
29961,
29896,
29962,
334,
29871,
29906,
29900,
29900,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
29897,
13,
13,
1678,
1492,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
1492,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
313,
1266,
29918,
3149,
29961,
29900,
29962,
334,
29871,
29906,
29900,
29900,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
29897,
13,
1678,
1492,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
313,
1266,
29918,
3149,
29961,
29896,
29962,
334,
29871,
29906,
29900,
29900,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
29897,
13,
13,
1678,
2847,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
2847,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
2847,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
11228,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
1563,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
13,
632,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29900,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
11228,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
1266,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
13,
632,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29900,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
13,
1678,
736,
10153,
13,
13,
13,
1753,
4216,
29918,
29890,
1884,
29918,
29941,
29881,
29918,
517,
29918,
29906,
29881,
29918,
567,
6742,
29877,
29918,
1217,
29918,
1639,
2042,
29898,
2492,
29892,
3800,
29918,
1217,
29918,
1639,
2042,
29892,
319,
19698,
1917,
29918,
29916,
29892,
319,
19698,
1917,
29918,
29891,
1125,
13,
268,
13,
1678,
3800,
29918,
4012,
353,
3800,
29918,
1217,
29918,
1639,
2042,
29889,
8552,
580,
13,
268,
13,
1678,
363,
722,
297,
3800,
29918,
4012,
29901,
13,
4706,
722,
29961,
29900,
29962,
353,
722,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
4706,
722,
29961,
29896,
29962,
353,
722,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
268,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
1884,
29918,
4012,
29961,
29900,
11724,
18761,
29898,
1884,
29918,
4012,
29961,
29896,
11724,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
1884,
29918,
4012,
29961,
29896,
11724,
18761,
29898,
1884,
29918,
4012,
29961,
29906,
11724,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
1884,
29918,
4012,
29961,
29906,
11724,
18761,
29898,
1884,
29918,
4012,
29961,
29941,
11724,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
1884,
29918,
4012,
29961,
29941,
11724,
18761,
29898,
1884,
29918,
4012,
29961,
29900,
11724,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
268,
13,
1678,
736,
10153,
13,
13,
13,
1753,
4216,
29918,
29890,
1884,
29918,
29941,
29881,
29918,
517,
29918,
29906,
29881,
29918,
567,
6742,
29877,
29918,
2541,
29918,
1989,
29918,
369,
4776,
29898,
2492,
29892,
9550,
5228,
29892,
1180,
29896,
29892,
1180,
29906,
29892,
1180,
29941,
29892,
319,
19698,
1917,
29918,
29916,
29892,
319,
19698,
1917,
29918,
29891,
1125,
13,
268,
13,
1678,
1180,
29896,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
1180,
29906,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
1180,
29941,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
1180,
29896,
29918,
4012,
29961,
29900,
29962,
353,
1180,
29896,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
1180,
29896,
29918,
4012,
29961,
29896,
29962,
353,
1180,
29896,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
1678,
1180,
29906,
29918,
4012,
29961,
29900,
29962,
353,
1180,
29906,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
1180,
29906,
29918,
4012,
29961,
29896,
29962,
353,
1180,
29906,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
1678,
1180,
29941,
29918,
4012,
29961,
29900,
29962,
353,
1180,
29941,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
1180,
29941,
29918,
4012,
29961,
29896,
29962,
353,
1180,
29941,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
268,
13,
1678,
396,
4216,
1820,
12688,
411,
7200,
1298,
1135,
4226,
1298,
9570,
13,
1678,
9550,
5228,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
9550,
5228,
29918,
4012,
29961,
29900,
29962,
353,
9550,
5228,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
9550,
5228,
29918,
4012,
29961,
29896,
29962,
353,
9550,
5228,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
1678,
13850,
29906,
29889,
16622,
29898,
2492,
29892,
18761,
29898,
15790,
5228,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
29871,
29941,
29892,
313,
29900,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29900,
511,
29871,
29946,
29897,
13,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
2029,
29896,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
15790,
5228,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
2029,
29896,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
2029,
29941,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
2029,
29941,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
2029,
29906,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
2029,
29906,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
15790,
5228,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
268,
13,
1678,
736,
10153,
13,
13,
1753,
4216,
29918,
3149,
29918,
9274,
29879,
29898,
2492,
29892,
7670,
5228,
29918,
1454,
29918,
4012,
29892,
319,
19698,
1917,
29918,
29916,
29892,
319,
19698,
1917,
29918,
29891,
1125,
13,
13,
1678,
363,
1298,
297,
7670,
5228,
29918,
1454,
29918,
4012,
29901,
13,
4706,
263,
353,
1298,
29961,
29900,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
4706,
289,
353,
1298,
29961,
29896,
29962,
334,
29871,
29896,
29900,
29900,
718,
29871,
29906,
29945,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
4706,
13850,
29906,
29889,
16622,
29898,
2492,
29892,
313,
524,
29898,
29874,
511,
938,
29898,
29890,
8243,
29871,
29896,
29892,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29906,
29897,
13,
268,
13,
1678,
736,
10153,
13,
13,
13,
1753,
4216,
29918,
29906,
29881,
29918,
1884,
29918,
262,
29918,
29906,
29881,
29918,
3027,
29898,
2558,
5228,
29918,
29941,
29881,
29892,
3800,
29918,
29906,
29881,
29892,
282,
29906,
1125,
13,
13,
1678,
10153,
353,
7442,
29889,
3298,
359,
3552,
29896,
29900,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
29892,
29871,
29941,
511,
525,
29888,
29946,
1495,
13,
13,
1678,
7670,
5228,
29918,
1454,
29918,
4012,
353,
7442,
29889,
8552,
29898,
2558,
5228,
29918,
29941,
29881,
7503,
29892,
518,
29900,
29892,
29871,
29906,
24960,
13,
1678,
7670,
5228,
353,
7670,
5228,
29918,
29941,
29881,
7503,
29892,
518,
29900,
29892,
29871,
29906,
5262,
13,
13,
1678,
319,
19698,
1917,
29918,
29916,
353,
7442,
29889,
12676,
29898,
2558,
5228,
7503,
29892,
29871,
29900,
2314,
334,
29871,
29896,
29900,
29900,
13,
1678,
319,
19698,
1917,
29918,
29891,
353,
7442,
29889,
12676,
29898,
2558,
5228,
7503,
29892,
29871,
29896,
2314,
334,
29871,
29896,
29900,
29900,
13,
13,
1678,
363,
1298,
297,
7670,
5228,
29918,
1454,
29918,
4012,
29901,
13,
4706,
263,
353,
1298,
29961,
29900,
29962,
334,
29871,
29945,
29900,
718,
29871,
29945,
29900,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
4706,
289,
353,
1298,
29961,
29896,
29962,
334,
29871,
29945,
29900,
718,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
4706,
13850,
29906,
29889,
16622,
29898,
2492,
29892,
313,
524,
29898,
29874,
511,
938,
29898,
29890,
8243,
29871,
29896,
29892,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29900,
29897,
13,
13,
1678,
2175,
29918,
3149,
353,
7442,
29889,
2378,
4197,
1884,
29918,
29906,
29881,
29961,
29900,
1402,
29871,
29900,
29892,
29871,
29896,
2314,
13,
1678,
1492,
29918,
3149,
353,
7442,
29889,
2378,
4197,
1884,
29918,
29906,
29881,
29961,
29906,
1402,
29871,
29900,
29892,
29871,
29896,
2314,
13,
13,
1678,
2175,
29918,
3149,
353,
7442,
29889,
29880,
979,
29887,
29889,
11569,
29898,
29886,
29906,
7503,
29892,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
5262,
467,
6333,
29898,
1563,
29918,
3149,
29889,
29911,
29897,
13,
1678,
1492,
29918,
3149,
353,
7442,
29889,
29880,
979,
29887,
29889,
11569,
29898,
29886,
29906,
7503,
29892,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
5262,
467,
6333,
29898,
1266,
29918,
3149,
29889,
29911,
29897,
13,
13,
1678,
2175,
29918,
3149,
353,
2175,
29918,
3149,
8999,
29900,
29892,
29871,
29906,
5262,
13,
1678,
1492,
29918,
3149,
353,
1492,
29918,
3149,
8999,
29900,
29892,
29871,
29906,
5262,
13,
13,
1678,
2175,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
1492,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
13,
1678,
1550,
5852,
29901,
13,
4706,
19342,
29918,
19790,
353,
29871,
29953,
29900,
29900,
29900,
29900,
13,
4706,
1018,
29901,
13,
9651,
2175,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
313,
1563,
29918,
3149,
29961,
29900,
29962,
334,
19342,
29918,
19790,
718,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29916,
29897,
13,
9651,
2175,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
313,
1563,
29918,
3149,
29961,
29896,
29962,
334,
19342,
29918,
19790,
718,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29891,
29897,
13,
13,
9651,
1492,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
313,
1266,
29918,
3149,
29961,
29900,
29962,
334,
19342,
29918,
19790,
718,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29916,
29897,
13,
9651,
1492,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
313,
1266,
29918,
3149,
29961,
29896,
29962,
334,
19342,
29918,
19790,
718,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29891,
29897,
13,
4706,
5174,
28845,
2392,
29901,
13,
9651,
19342,
29918,
19790,
847,
29922,
29871,
29953,
13,
9651,
6773,
13,
4706,
1683,
29901,
13,
9651,
2867,
13,
13,
1678,
2847,
29918,
3149,
29918,
4012,
353,
7442,
29889,
2378,
4197,
29900,
1696,
29871,
29900,
29889,
2314,
13,
1678,
2847,
29918,
3149,
29918,
4012,
29961,
29900,
29962,
353,
29871,
29945,
29900,
29900,
448,
319,
19698,
1917,
29918,
29916,
13,
1678,
2847,
29918,
3149,
29918,
4012,
29961,
29896,
29962,
353,
29871,
29896,
29900,
29900,
448,
319,
19698,
1917,
29918,
29891,
13,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
11228,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
1563,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
13,
632,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29900,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
18761,
29898,
11228,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
18761,
29898,
1266,
29918,
3149,
29918,
4012,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
8243,
13,
632,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29900,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
13,
1678,
736,
10153,
13,
13,
1753,
4216,
29918,
29941,
29881,
29918,
1884,
29918,
262,
29918,
29906,
29881,
29918,
3027,
29898,
2492,
29892,
3800,
1125,
13,
13,
1678,
396,
4216,
29871,
29941,
29928,
3800,
297,
29871,
29906,
29928,
390,
7210,
1967,
29892,
565,
4312,
13,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29900,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29900,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29896,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29896,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29896,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29896,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29906,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29906,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29906,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29906,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29941,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29941,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29941,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29941,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29900,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29900,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29900,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29900,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29946,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29946,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29896,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29896,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29945,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29945,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29906,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29906,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29953,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29953,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29941,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29941,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29955,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29955,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29946,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29946,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29945,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29945,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29945,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29945,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29953,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29953,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29953,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29953,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29955,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29955,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
1678,
13850,
29906,
29889,
1220,
29898,
2492,
29892,
313,
524,
29898,
1884,
29961,
29955,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29955,
3816,
29896,
2314,
511,
313,
524,
29898,
1884,
29961,
29946,
3816,
29900,
11724,
938,
29898,
1884,
29961,
29946,
3816,
29896,
2314,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
511,
29871,
29896,
29892,
29871,
29946,
29897,
13,
13,
1678,
736,
10153,
13,
13,
1753,
1510,
29918,
955,
1486,
484,
29918,
262,
29918,
26065,
29898,
2029,
29900,
29892,
1180,
29896,
29892,
1180,
29906,
29892,
1180,
29941,
29892,
343,
29918,
1195,
29892,
343,
29918,
3317,
1125,
13,
13,
1678,
396,
671,
1122,
17345,
304,
4216,
29871,
29941,
29928,
289,
1884,
29871,
13,
1678,
26995,
353,
7442,
29889,
2378,
4197,
8999,
2029,
29900,
29961,
29900,
1402,
1180,
29896,
29961,
29900,
1402,
1180,
29906,
29961,
29900,
1402,
1180,
29941,
29961,
29900,
1402,
1180,
29900,
29961,
29900,
1402,
1180,
29896,
29961,
29900,
1402,
1180,
29906,
29961,
29900,
1402,
1180,
29941,
29961,
29900,
20526,
13,
462,
308,
518,
2029,
29900,
29961,
29896,
1402,
1180,
29896,
29961,
29896,
1402,
1180,
29906,
29961,
29896,
1402,
1180,
29941,
29961,
29896,
1402,
1180,
29900,
29961,
29896,
1402,
1180,
29896,
29961,
29896,
1402,
1180,
29906,
29961,
29896,
1402,
1180,
29941,
29961,
29896,
20526,
13,
462,
308,
518,
29891,
29918,
1195,
29892,
343,
29918,
1195,
29892,
343,
29918,
1195,
29892,
343,
29918,
1195,
29892,
343,
29918,
3317,
29892,
343,
29918,
3317,
29892,
343,
29918,
3317,
29892,
343,
29918,
3317,
5262,
1402,
13,
462,
539,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
13,
1678,
363,
474,
297,
3464,
29898,
29883,
1398,
414,
29889,
12181,
29961,
29900,
29962,
1125,
13,
4706,
11155,
353,
26995,
29961,
29875,
29962,
13,
4706,
22645,
353,
7442,
29889,
2378,
4197,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29900,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29941,
2314,
13,
4706,
921,
353,
11155,
29961,
29900,
29892,
22645,
29962,
13,
4706,
343,
353,
11155,
29961,
29896,
29892,
22645,
29962,
13,
4706,
503,
353,
11155,
29961,
29906,
29892,
22645,
29962,
13,
4706,
1122,
17345,
29889,
828,
370,
29889,
5317,
29941,
29881,
29898,
29916,
29892,
343,
29892,
503,
29892,
2927,
7607,
29900,
29889,
29906,
29941,
29892,
29871,
29900,
29889,
29953,
29892,
29871,
29896,
511,
784,
555,
481,
2433,
29903,
1103,
1705,
742,
8954,
2433,
22376,
2557,
742,
1196,
29918,
2103,
29922,
29945,
29897,
2
] |
tests/factorys.py | 2h4dl/pymilvus | 0 | 17967 | # STL imports
import random
import logging
import string
import time
import datetime
import random
import struct
import sys
from functools import wraps
# Third party imports
import numpy as np
import faker
from faker.providers import BaseProvider
logging.getLogger('faker').setLevel(logging.ERROR)
sys.path.append('.')
# grpc
from milvus.grpc_gen import milvus_pb2
def gen_vectors(num, dim):
return [[random.random() for _ in range(dim)] for _ in range(num)]
def gen_single_vector(dim):
return [[random.random() for _ in range(dim)]]
def gen_vector(nb, d, seed=np.random.RandomState(1234)):
xb = seed.rand(nb, d).astype("float32")
return xb.tolist()
def gen_unique_str(str=None):
prefix = "".join(random.choice(string.ascii_letters + string.digits) for _ in range(8))
return prefix if str is None else str + "_" + prefix
def get_current_day():
return time.strftime('%Y-%m-%d', time.localtime())
def get_last_day(day):
tmp = datetime.datetime.now() - datetime.timedelta(days=day)
return tmp.strftime('%Y-%m-%d')
def get_next_day(day):
tmp = datetime.datetime.now() + datetime.timedelta(days=day)
return tmp.strftime('%Y-%m-%d')
def gen_long_str(num):
string = ''
for _ in range(num):
char = random.choice('tomorrow')
string += char
def gen_one_binary(topk):
ids = [random.randrange(10000000, 99999999) for _ in range(topk)]
distances = [random.random() for _ in range(topk)]
return milvus_pb2.TopKQueryResult(struct.pack(str(topk) + 'l', *ids), struct.pack(str(topk) + 'd', *distances))
def gen_nq_binaries(nq, topk):
return [gen_one_binary(topk) for _ in range(nq)]
def fake_query_bin_result(nq, topk):
return gen_nq_binaries(nq, topk)
class FakerProvider(BaseProvider):
def collection_name(self):
return 'collection_names' + str(random.randint(1000, 9999))
def name(self):
return 'name' + str(random.randint(1000, 9999))
def dim(self):
return random.randint(0, 999)
fake = faker.Faker()
fake.add_provider(FakerProvider)
def collection_name_factory():
return fake.collection_name()
def records_factory(dimension, nq):
return [[random.random() for _ in range(dimension)] for _ in range(nq)]
def binary_records_factory(dimension, nq):
def binary_record(bsize):
s_m = "abcdefghijklmnopqrstuvwxyz"
s_list = [s_m[random.randint(0, 25)] for _ in range(bsize)]
s = "".join(s_list)
return bytes(s, encoding="ASCII")
bs = dimension // 8
return [binary_record(bs) for _ in range(nq)]
def integer_factory(nq):
return [random.randint(0, 128) for _ in range(nq)]
def time_it(func):
@wraps(func)
def inner(*args, **kwrgs):
pref = time.perf_counter()
result = func(*args, **kwrgs)
delt = time.perf_counter() - pref
print(f"[{func.__name__}][{delt:.4}s]")
return result
return inner
| [
1,
396,
6850,
29931,
24802,
13,
5215,
4036,
13,
5215,
12183,
13,
5215,
1347,
13,
5215,
931,
13,
5215,
12865,
13,
5215,
4036,
13,
5215,
2281,
13,
5215,
10876,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
13,
29937,
18008,
6263,
24802,
13,
5215,
12655,
408,
7442,
13,
5215,
285,
5790,
13,
3166,
285,
5790,
29889,
771,
29454,
1053,
7399,
6980,
13,
13,
21027,
29889,
657,
16363,
877,
29888,
5790,
2824,
842,
10108,
29898,
21027,
29889,
11432,
29897,
13,
13,
9675,
29889,
2084,
29889,
4397,
12839,
1495,
13,
29937,
867,
6739,
13,
3166,
2316,
29894,
375,
29889,
629,
6739,
29918,
1885,
1053,
2316,
29894,
375,
29918,
24381,
29906,
13,
13,
13,
1753,
2531,
29918,
345,
14359,
29898,
1949,
29892,
3964,
1125,
13,
1678,
736,
5519,
8172,
29889,
8172,
580,
363,
903,
297,
3464,
29898,
6229,
4638,
363,
903,
297,
3464,
29898,
1949,
4638,
13,
13,
13,
1753,
2531,
29918,
14369,
29918,
8111,
29898,
6229,
1125,
13,
1678,
736,
5519,
8172,
29889,
8172,
580,
363,
903,
297,
3464,
29898,
6229,
4638,
29962,
13,
13,
13,
1753,
2531,
29918,
8111,
29898,
9877,
29892,
270,
29892,
16717,
29922,
9302,
29889,
8172,
29889,
17875,
2792,
29898,
29896,
29906,
29941,
29946,
22164,
13,
1678,
921,
29890,
353,
16717,
29889,
9502,
29898,
9877,
29892,
270,
467,
579,
668,
703,
7411,
29941,
29906,
1159,
13,
1678,
736,
921,
29890,
29889,
25027,
391,
580,
13,
13,
13,
1753,
2531,
29918,
13092,
29918,
710,
29898,
710,
29922,
8516,
1125,
13,
1678,
10944,
353,
376,
1642,
7122,
29898,
8172,
29889,
16957,
29898,
1807,
29889,
294,
18869,
29918,
1026,
2153,
718,
1347,
29889,
7501,
1169,
29897,
363,
903,
297,
3464,
29898,
29947,
876,
13,
1678,
736,
10944,
565,
851,
338,
6213,
1683,
851,
718,
11119,
29908,
718,
10944,
13,
13,
13,
1753,
679,
29918,
3784,
29918,
3250,
7295,
13,
1678,
736,
931,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
742,
931,
29889,
2997,
2230,
3101,
13,
13,
13,
1753,
679,
29918,
4230,
29918,
3250,
29898,
3250,
1125,
13,
1678,
13128,
353,
12865,
29889,
12673,
29889,
3707,
580,
448,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
3250,
29897,
13,
1678,
736,
13128,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
1495,
13,
13,
13,
1753,
679,
29918,
4622,
29918,
3250,
29898,
3250,
1125,
13,
1678,
13128,
353,
12865,
29889,
12673,
29889,
3707,
580,
718,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
3250,
29897,
13,
1678,
736,
13128,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
1495,
13,
13,
13,
1753,
2531,
29918,
5426,
29918,
710,
29898,
1949,
1125,
13,
1678,
1347,
353,
6629,
13,
1678,
363,
903,
297,
3464,
29898,
1949,
1125,
13,
4706,
1373,
353,
4036,
29889,
16957,
877,
15135,
22396,
1495,
13,
4706,
1347,
4619,
1373,
13,
13,
13,
1753,
2531,
29918,
650,
29918,
19541,
29898,
3332,
29895,
1125,
13,
1678,
18999,
353,
518,
8172,
29889,
9502,
3881,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29892,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29897,
363,
903,
297,
3464,
29898,
3332,
29895,
4638,
13,
1678,
24610,
353,
518,
8172,
29889,
8172,
580,
363,
903,
297,
3464,
29898,
3332,
29895,
4638,
13,
1678,
736,
2316,
29894,
375,
29918,
24381,
29906,
29889,
7031,
29968,
3010,
3591,
29898,
4984,
29889,
4058,
29898,
710,
29898,
3332,
29895,
29897,
718,
525,
29880,
742,
334,
4841,
511,
2281,
29889,
4058,
29898,
710,
29898,
3332,
29895,
29897,
718,
525,
29881,
742,
334,
5721,
2925,
876,
13,
13,
13,
1753,
2531,
29918,
29876,
29939,
29918,
2109,
4314,
29898,
29876,
29939,
29892,
2246,
29895,
1125,
13,
1678,
736,
518,
1885,
29918,
650,
29918,
19541,
29898,
3332,
29895,
29897,
363,
903,
297,
3464,
29898,
29876,
29939,
4638,
13,
13,
13,
1753,
25713,
29918,
1972,
29918,
2109,
29918,
2914,
29898,
29876,
29939,
29892,
2246,
29895,
1125,
13,
1678,
736,
2531,
29918,
29876,
29939,
29918,
2109,
4314,
29898,
29876,
29939,
29892,
2246,
29895,
29897,
13,
13,
13,
1990,
383,
5790,
6980,
29898,
5160,
6980,
1125,
13,
13,
1678,
822,
4333,
29918,
978,
29898,
1311,
1125,
13,
4706,
736,
525,
10855,
29918,
7039,
29915,
718,
851,
29898,
8172,
29889,
9502,
524,
29898,
29896,
29900,
29900,
29900,
29892,
29871,
29929,
29929,
29929,
29929,
876,
13,
13,
1678,
822,
1024,
29898,
1311,
1125,
13,
4706,
736,
525,
978,
29915,
718,
851,
29898,
8172,
29889,
9502,
524,
29898,
29896,
29900,
29900,
29900,
29892,
29871,
29929,
29929,
29929,
29929,
876,
13,
13,
1678,
822,
3964,
29898,
1311,
1125,
13,
4706,
736,
4036,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29929,
29929,
29929,
29897,
13,
13,
13,
29888,
1296,
353,
285,
5790,
29889,
29943,
5790,
580,
13,
29888,
1296,
29889,
1202,
29918,
18121,
29898,
29943,
5790,
6980,
29897,
13,
13,
13,
1753,
4333,
29918,
978,
29918,
14399,
7295,
13,
1678,
736,
25713,
29889,
10855,
29918,
978,
580,
13,
13,
13,
1753,
6475,
29918,
14399,
29898,
6229,
2673,
29892,
302,
29939,
1125,
13,
1678,
736,
5519,
8172,
29889,
8172,
580,
363,
903,
297,
3464,
29898,
6229,
2673,
4638,
363,
903,
297,
3464,
29898,
29876,
29939,
4638,
13,
13,
13,
1753,
7581,
29918,
3757,
4339,
29918,
14399,
29898,
6229,
2673,
29892,
302,
29939,
1125,
13,
1678,
822,
7581,
29918,
11651,
29898,
29890,
2311,
1125,
13,
4706,
269,
29918,
29885,
353,
376,
10736,
1753,
12443,
823,
6321,
23521,
459,
29939,
29878,
303,
4090,
29893,
20230,
29908,
13,
4706,
269,
29918,
1761,
353,
518,
29879,
29918,
29885,
29961,
8172,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29906,
29945,
4638,
363,
903,
297,
3464,
29898,
29890,
2311,
4638,
13,
4706,
269,
353,
376,
1642,
7122,
29898,
29879,
29918,
1761,
29897,
13,
4706,
736,
6262,
29898,
29879,
29892,
8025,
543,
28599,
2687,
1159,
13,
13,
1678,
24512,
353,
9927,
849,
29871,
29947,
13,
1678,
736,
518,
19541,
29918,
11651,
29898,
5824,
29897,
363,
903,
297,
3464,
29898,
29876,
29939,
4638,
13,
13,
13,
1753,
6043,
29918,
14399,
29898,
29876,
29939,
1125,
13,
1678,
736,
518,
8172,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29906,
29947,
29897,
363,
903,
297,
3464,
29898,
29876,
29939,
4638,
13,
13,
13,
1753,
931,
29918,
277,
29898,
9891,
1125,
13,
1678,
732,
29893,
336,
567,
29898,
9891,
29897,
13,
1678,
822,
6426,
10456,
5085,
29892,
3579,
11022,
29878,
3174,
1125,
13,
4706,
758,
29888,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
13,
4706,
1121,
353,
3653,
10456,
5085,
29892,
3579,
11022,
29878,
3174,
29897,
13,
4706,
628,
29873,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
448,
758,
29888,
13,
4706,
1596,
29898,
29888,
29908,
19660,
9891,
17255,
978,
1649,
29913,
3816,
29912,
29881,
2152,
29901,
29889,
29946,
29913,
29879,
29962,
1159,
13,
4706,
736,
1121,
13,
13,
1678,
736,
6426,
13,
2
] |
app/__init__.py | oOo0oOo/FoodWorld | 0 | 42142 | from flask import Flask, Blueprint
from flask_ask import Ask
from flask_sqlalchemy import SQLAlchemy
from config import config
# Extensions
db = SQLAlchemy()
alexa = Ask(route = '/')
# Main blueprint
main = Blueprint('main', __name__)
from . import models, views
def create_app(config_name = 'development'):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
db.init_app(app)
alexa.init_app(app)
from . import main as main_blueprint
app.register_blueprint(main_blueprint)
return app | [
1,
515,
29784,
1053,
2379,
1278,
29892,
10924,
2158,
13,
3166,
29784,
29918,
1278,
1053,
26579,
13,
13,
3166,
29784,
29918,
2850,
284,
305,
6764,
1053,
3758,
2499,
305,
6764,
13,
3166,
2295,
1053,
2295,
13,
13,
29937,
7338,
5580,
13,
2585,
353,
3758,
2499,
305,
6764,
580,
13,
744,
17367,
353,
26579,
29898,
13134,
353,
8207,
1495,
13,
13,
29937,
4241,
7254,
2158,
13,
3396,
353,
10924,
2158,
877,
3396,
742,
4770,
978,
1649,
29897,
13,
13,
3166,
869,
1053,
4733,
29892,
8386,
13,
13,
1753,
1653,
29918,
932,
29898,
2917,
29918,
978,
353,
525,
25431,
29374,
13,
1678,
623,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
1678,
623,
29889,
2917,
29889,
3166,
29918,
3318,
29898,
2917,
29961,
2917,
29918,
978,
2314,
13,
1678,
2295,
29961,
2917,
29918,
978,
1822,
2344,
29918,
932,
29898,
932,
29897,
13,
13,
1678,
4833,
29889,
2344,
29918,
932,
29898,
932,
29897,
13,
1678,
263,
2506,
29874,
29889,
2344,
29918,
932,
29898,
932,
29897,
13,
13,
1678,
515,
869,
1053,
1667,
408,
1667,
29918,
9539,
2158,
13,
1678,
623,
29889,
9573,
29918,
9539,
2158,
29898,
3396,
29918,
9539,
2158,
29897,
13,
13,
1678,
736,
623,
2
] |
Books/PythonCookBook/P02_String_Text.py | Tim232/Python-Things | 2 | 89247 | # Chapter 2. 문자열과 텍스트
# 2.1 여러 구분자로 문자열 나누기
# ▣ 문제 : 문자열을 필드로 나누고 싶지만 구분자가 문자열에 일관적이지 않다.
# ▣ 해결 : 문자열 객체의 split() 메소드는 아주 간단한 상황에 사용하도록 설계되었고 여러 개의 구분자나 구분자 주변의
# 공백까지 고려하지는 않는다. 좀 더 유연해져야 할 필요가 있다면 re.split() 메소드를 사용한다.
line = 'asdf fjdk; afed, fjek,asdf, foo'
import re
print(re.split(r'[;,\s]\s*', line))
# ▣ 토론 : re.split() 함수는 분리 구문마다 여러 패턴을 명시할 수 있다는 점이 유리하다.
# - re.split() 을 사용할 때는 괄호 안에 묶인 정규 표현식 패턴이 캡처 그룹이 된다.
fields = re.split(r'(;|,|\s)\s*', line)
print(fields)
# - 구분 문자만 출력하는 경우.
values = fields[::2]
delimiters = fields[1::2] + ['']
print(values, delimiters)
# - 동일한 구분자로 라인을 구성한다.
print(''.join(v+d for v, d in zip(values, delimiters)))
# - 분리 구문을 결과에 포함시키고 싶지 않지만 정규 표현식에 괄호를 사용해야 할 필요가 있다면 논캡처 그룹을 사용한다.
print(re.split('(?:,|;|\s)\s*', line))
# 2.2 문자열 처음이나 마지막에 텍스트 매칭
# ▣ 문제 : 문자열의 처음이나 마지막에 파일 확장자, URL scheme 등 특정 텍스트 패턴이 포함되었는지 검사하고 싶다.
# ▣ 해결 : 문자열의 처음이나 마지막에 패턴이 포함되었는지 확인하는 간단한 방법으로 str.startswith() 나 str.endswith() 메소드가 있다.
filename = 'spam.txt'
print(filename.endswith('.txt'))
print(filename.startswith('file:'))
url = 'http://www.python.org'
print(url.startswith('http:'))
# - 여러 개의 선택지를 검사해야 한다면 검사하고 싶은 값을 튜플에 담아 startswith() 나 endswith() 에 전달한다.
import os
filenames = os.listdir('.')
print(filenames)
print([name for name in filenames if name.endswith(('.c', '.h'))])
from urllib.request import urlopen
def read_data(name):
if name.startswith(('http:', 'https:', 'ftp:')):
return urlopen(name).read()
else:
with open(name) as f:
return f.read()
# - startswith() 메소드는 튜플만을 입력으로 받는다.
choices = ['http:', 'ftp:']
url = 'http://www.python.org'
url.startswith(choices)
url.startswith(tuple(choices))
# ▣ 토론 : startswith() 와 endswith() 메소드는 접두어와 접미어를 검사할 때 매우 편리하다.
# 슬라이스를 사용하면 비슷한 동작을 할 수 있지만 코드의 가독성이 많이 떨어진다.
filename = 'spam.txt'
print(filename[-4:] == '.txt')
url = 'http://www.python.org'
print(url[:5] == 'http:' or url[:6] == 'https:' or url[:4] == 'ftp:')
# - 정규 표현식을 사용해도 된다.
import re
url = 'http://www.python.org'
print(re.match('http:|https:|ftp:', url))
# - startswith() 와 endswith() 메소드는 일반적인 데이터 감소와 같은 다른 동작에 함께 사용하기에도 좋다.
if any(name.endswith(('.c', '.h')) for name in os.listdir('.')):
pass
# 2.3 쉘 와일드카드 패턴으로 문자열 매칭
# ▣ 문제 : Unix 쉘에 사용하는 것과 동일한 와일드카드 패턴을 텍스트 매칭에 사용하고 싶다.(예: *.py, Dat[0-9]*.csv 등)
# ▣ 해결 : fnmatch 모듈에 두 함수 fnmatch() 와 fnmatchcase() 를 사용하면 된다.
from fnmatch import fnmatch, fnmatchcase
print(fnmatch('foo.txt', '*.txt'))
print(fnmatch('foo.txt', '?oo.txt'))
print(fnmatch('Dat45.csv', 'Dat[0-9]*'))
names = ['Dat1.csv', 'Dat2.csv', 'config.ini', 'foo.py']
print([name for name in names if fnmatch(name, 'Dat*.csv')])
# - 일반적으로 fnmatch() 는 시스템의 파일 시스템과 동일한 대소문자 구문 규칙을 따른다.
print(fnmatch('foo.txt', '*.TXT')) # Mac : True
print(fnmatch('foo.txt', '*.TXT')) # window : True
# - 이런 차이점이 없는 것을 사용하려면 fnmatchcase() 를 사용한다.
print(fnmatchcase('foo.txt', '*.TXT'))
# - 파일 이름이 아닌 데이터 프로세싱에도 사용할 수 있다.
addresses = ['5412 N CLARK ST',
'1060 W ADDISON ST',
'1039 W GRANVILLE AVE',
'2122 N CLARK ST',
'4802 N BROADWAY']
from fnmatch import fnmatchcase
print([addr for addr in addresses if fnmatchcase(addr, '* ST')])
print([addr for addr in addresses if fnmatchcase(addr, '54[0-9][0-9] *CLARK*')])
# ▣ 토론 : fnmatch 가 수행하는 매칭은 간단한 문자열 메소드의 기능과 정규 표현식의 중간쯤 위치하고 있다.
# 데이터 프로세싱을 할 때 간단한 와일드카드를 사용할 생각이라면 이 함수를 사용하는 것이 괜찮은 선택이다.
# 2.4 텍스트 패턴 매칭과 검색
# ▣ 문제 : 특정 패턴에 대한 텍스트 매칭이나 검색을 하고 싶다.
# ▣ 해결 : 매칭하려는 텍스트가 간단하다면 str.find(), str.endswith(), str.startswith() 와 같은 기본적인 문자열 메소드만으로도
# 충분하다.
text = 'yeah, but no, but yeah, but no, but yeah'
# - 정확한 매칭
print(text == 'yeah')
# - 처음이나 끝에 매칭
print(text.startswith('yeah'))
print(text.endswith('no'))
# - 처음 나타난 곳 검색
print(text.find('no')) # 해당 값이 처음 나온 인덱스를 리턴.
# - 좀 더 복잡한 매칭을 위해 정규 표현식과 re 모듈을 사용한다.
# match() : 항상 문자열 처음에서 찾기를 시도.
# findall() : 텍스트 전체에 걸쳐 찾기를 시도.
text1 = '11/27/2012'
text2 = 'Nov 27, 2012'
import re
# - 간단한 매칭: \d+는 하나 이상의 숫자를 의미
if re.match(r'\d+/\d+/\d+', text1):
print('yes')
else:
print('no')
if re.match(r'\d+/\d+/\d+', text2):
print('yes')
else:
print('no')
# - 동일한 패턴으로 매칭을 많이 수행할 예정이라면 정규 표현식을 미리 컴파일해서 패턴 객체로 만들어 놓는다.
datepat = re.compile(r'\d+/\d+/\d+')
if datepat.match(text1):
print('yes')
else:
print('no')
if datepat.match(text2):
print('yes')
else:
print('no')
# - 텍스트 전체에 걸쳐 패턴을 찾으려면 findall() 메소드를 사용한다.
text = 'Today is 11/27/2012. PyCon starts 3/13/2013.'
print(datepat.findall(text))
# - 정규 표현식을 정의할 때 괄호를 사용해 캡처 그룹을 만드는 것이 일반적이다.
datepat = re.compile(r'(\d+)/(\d+)/(\d+)')
m = datepat.match('11/27/2012')
print(m.group(0), m.group(1), m.group(2), m.group(3), m.groups()) # 그룹별로 출력 가능 (0 은 전체 출력)
month, day, year = m.groups()
for month, day, year in datepat.findall(text):
print('{}-{}-{}'.format(year, month, day))
# - 한 번에 결과를 얻지 않고 텍스트를 순환하며 찾으려면 finditer() 를 사용한다.
for m in datepat.finditer(text):
print(m.groups())
# ▣ 토론 : 핵심이 되는 기능은 re.compile() 을 사용해 패턴을 컴파일하고 그것을 match(), findall(), finditer() 등에 사용한다.
# 패턴을 명시할 때 r'(\d+)/(\d+)/(\d+)'와 같이 raw string 을 그대로 쓰는것이 일반적이다.
# 이 형식은 백슬래시 문자를 해석하지 않고 남겨 두기 때문에 정규 표현식과 같은 곳에 유용하다.
# - match() 메소드는 문자열의 처음만 확인하므로, 예상치 못한 것에 매칭할 확률도 있다.
m = datepat.match('11/27/2012abcdef')
print(m)
print(m.group())
datepat = re.compile(r'(\d+)/(\d+)/(\d+)$')
print(datepat.match('11/27/2012abcdef'))
print(datepat.match('11/27/2012'))
# 2.5 텍스트 검색과 치환
# ▣ 문제 : 문자열에서 텍스트 패턴을 검색하고 치환하고 싶다.
# ▣ 해결 : 간단한 패턴이라면 str.replace() 메소드를 사용한다.
# 조금 더 복잡한 패턴을 사용하려면 re 모듈의 sub() 함수/메소드를 사용한다.
text = 'yeah, but no, but yeah, but no, but yeah'
print(text.replace('yeah', 'yep'))
text = 'Today is 11/27/2012. PyCon starts 3/13/2013.'
import re
print(re.sub(r'(\d+)/(\d+)/(\d+)', r'\3-\1-\2', text))
# - 동일한 패턴을 사용한 치환을 계속해야 한다면 성능 향상을 위해 컴파일링을 고려해 보는 것이 좋다.
import re
datepat = re.compile(r'(\d+)/(\d+)/(\d+)')
print(datepat.sub(r'\3-\1-\2', text))
# - 더 복잡한 치환을 위한 콜백 함수 명시.
from calendar import month_abbr
def change_date(m):
mon_name = month_abbr[int(m.group(1))]
return '{} {} {}'.format(m.group(2), mon_name, m.group(3))
print(datepat.sub(change_date, text))
# - 치환이 몇 번 발생했는지 알고 싶다면 re.subn() 을 사용한다.
newtext, n = datepat.subn(r'\3-\1-\2', text)
print(newtext, n)
# ▣ 토론 : 앞서 살펴본 sub() 메소드에 정규 표현식 검색과 치환 이외에 어려운 것은 없다.
# 2.6 대소문자를 구별하지 않는 검색과 치환
# ▣ 문제 : 텍스트를 검색하고 치환할 때 대소문자를 구별하지 않고 싶다.
# ▣ 해결 : 텍스트 관련 작업을 할 때 대소문자를 구별하지 않기 위해서는 re 모듈을 사용해야 하고 re.IGNORECASE 플래그를 지정해야 한다.
text = 'UPPER PYTHON, lower python, Mixed Python'
print(re.findall('python', text, flags=re.IGNORECASE))
print(re.sub('python', 'snake', text, flags=re.IGNORECASE))
def matchcase(word):
def replace(m):
text = m.group()
if text.isupper():
return word.upper()
elif text.islower():
return word.lower()
elif text[0].isupper():
return word.capitalize()
else:
return word
return replace
print(re.sub('python', matchcase('snake'), text, flags=re.IGNORECASE))
# ▣ 토론 : 대개의 경우 re.IGNORECASE 를 사용하는 것만으로 대소문자를 무시한 텍스트 작업에 무리가 없다.
# 하지만 유니코드가 포함된 작업을 하기에는 부족할 수도 있다.
# 2.7 가장 짧은 매칭을 위한 정규 표현식
# ▣ 문제 : 정규 표현식을 사용한 텍스트 매칭을 하고 싶지만 텍스트에서 가장 긴 부분을 찾아낸다.
# 만약 가장 짧은 부분을 찾아내고 싶다면 어떻게 해야 할까?
# ▣ 해결 : * 뒤에 ? 를 붙이면 된다.
import re
str_pat = re.compile(r'\"(.*)\"')
text1 = 'Computer says "no."'
print(str_pat.findall(text1))
text2 = 'Computer says "no." Phone says "yes."'
print(str_pat.findall(text2))
str_pat = re.compile(r'\"(.*?)\"')
print(str_pat.findall(text2))
# ▣ 토론 : 패턴에서 점은 개행문을 제외한 모든 문제에 매칭하므로, ? 를 * 나 + 뒤에 붙여준다.
# 2.8 여러 줄에 걸친 정규 표현식 사용
# ▣ 문제 : 여러 줄에 걸친 정규 표현식 매칭을 사용하고 싶다.
# ▣ 해결 : 패턴에서 (?:.|\n)인 논캡처 그룹을 명시한다.
comment = re.compile(r'/\*(.*?)\*/')
text1 = '/* this is a comment */'
text2 = '''/* this is a
multiline comment */
'''
print(comment.findall(text1))
print(comment.findall(text2))
comment = re.compile(r'/\*((?:.|\n)*?)\*/')
print(comment.findall(text2))
# ▣ 토론 : re.compile() 함수에 re.DOTALL 이라는 유용한 플래그를 사용할 수 있다.
comment = re.compile(r'/\*(.*?)\*/', re.DOTALL)
print(comment.findall(text2))
# 2.9 유니코드 텍스트 노멀화
# ▣ 문제 : 유니코드 모든 문자열에 동일한 표현식을 갖도록 보장해주자.
# ▣ 해결 : unicodedata 모듈로 텍스트를 노멀화해서 표준 표현식으로 바꿔야 한다.
s1 = 'Spicy Jalape\u00f1o'
s2 = 'Spicy Jalapen\u0303o'
print(s1, s2)
print(s1 == s2, len(s1), len(s2))
# - 위의 경우 같은 문자이지만 표현 방식이 달라 다른 문자열로 인식하였다.
# 따라서. 텍스트 노멀화를 통해 표준 표현식으로 변경해주어야 한다.
import unicodedata
t1 = unicodedata.normalize('NFC', s1)
t2 = unicodedata.normalize('NFC', s2)
print(t1 == t2)
print(ascii(t1))
t3 = unicodedata.normalize('NFD', s1)
t4 = unicodedata.normalize('NFD', s2)
print(t3 == t4)
print(ascii(t3))
# - 파이썬은 특정 문자를 다룰 수 있도록 추가적인 호환성을 부여하는 NFKC 와 NFKD 노멀화도 지원한다.
s = '\ufb01'
print(s)
print(unicodedata.normalize('NFD', s))
print(unicodedata.normalize('NFKD', s)) # 개별 문자로 분리
print(unicodedata.normalize('NFKC', s)) # 개별 문자로 분리
# ▣ 토론 : 일관적이고 안전한 유니코드 텍스트 작업을 위해서 노멀화는 아주 중요하다.
# 특히 인코딩을 조절할 수 없는 상황에서 사용자에게 문자열 입력을 받는 경우에는 특히 조심해야 한다.
t1 = unicodedata.normalize('NFD', s1)
print(''.join(c for c in t1 if not unicodedata.combining(c))) # combining() 함수는 문자가 결합 문자인지 확인한다.
# 2.10 정규 표현식에 유니코드 사용
# ▣ 문제 : 텍스트 프로세싱에 정규 표현식을 사용 중이다. 하지만 유니코드 문자 처리가 걱정된다.
# ▣ 해결 : 기본적인 유니코드 처리를 위한 대부분의 기능을 re 모듈이 제공한다.
import re
num = re.compile('\d+')
print(num.match('123')) # 아스키 숫자
print(num.match('\u0661\u0662\u0663')) # 아라비아 숫자
# - 특정 유니코드 문자를 패턴에 포함하고 싶으면, 유니코드 문자에 이스케이프 시퀀스를 사용한다.
arabic = re.compile('[\u0600-\u06ff\u0750-\u077f\u08a0-\u08ff]+')
# - 대소문자를 무시하는 매칭에 대소문자 변환을 합친 코드는 다음과 같다.
pat = re.compile('stra\u00dfe', re.IGNORECASE)
s = 'straße'
print(pat.match(s))
print(pat.match(s.upper()), s.upper())
# ▣ 토론 : 유니코드와 정규 표현식을 같이 사용하려면 서드파티 regex 라이브러리를 설치하고 유니코드 대소문자 변환 등을 기본으로
# 제공하는 많은 기능을 이용하는 것이 좋다.
# 2.11 문자열에서 문자 잘라내기
# ▣ 문제 : 텍스트의 처음, 끝, 중간에서 원하지 않는 공백문 등을 잘라내고 싶다.
# ▣ 해결 : strip() 메소드를 사용하면 문자열의 처음과 끝에서 문자를 잘라낼 수 있다.
# 기본적으로 공백이나 \n 을 잘라내지만 원하는 문자를 지정할 수도 있다.
s = ' hello world \n'
print(s.strip())
print(s.lstrip())
print(s.rstrip())
t = '-----hello====='
print(t.strip('-'))
print(t.strip('='))
print(t.strip('-='))
# ▣ 토론 : 데이터를 보기 좋게 만들기 위한 용도로 여러 strip() 메소드를 일반적으로 사용한다.
# 하지만 텍스트의 중간에서 잘라내기를 할 수는 없다.
s = ' hello world \n'
print(s.strip())
# - 중간의 공백을 없애기 위해서는 replace() 메소드나 정규 표현식의 치환과 같은 다른 기술을 사용해야 한다.
print(s.replace(' ', ''))
import re
print(re.sub('\s+', ' ', s).strip())
with open('files\\somefile.txt') as f: # 파일 전체 compile 해야 경로 인식.
lines = (line.strip() for line in f)
for line in lines:
print(re.sub('\s+', ' ', line).strip())
# 2.12 텍스트 정리
# ▣ 문제 : 당신의 웹 페이지에 어떤 사람이 장난스럽게 "python" 이라는 특수문자를 입력했다. 이를 정리하고 싶다.
# ▣ 해결 : 특정 범위의 문자나 발음 구별 구호를 없애려고 할 때는 str.translate() 메소드를 사용해야 한다.
s = 'pýtĥöñ\fis\tawesome\r\n'
print(s)
# - 우선 문자열에서 공백문을 잘라내기 위해 작은 변환 테이블을 만들어 놓고 translate() 를 사용한다.
remap = {
ord('\t'): ' ', # ord() : 하나의 문자열에 대해 유니코드를 나타내는 의미로 변환.
ord('\f'): ' ',
ord('\r'): None # 삭제됨
}
a = s.translate(remap)
print(a)
# - 결합 문자를 없애는 방법.
import unicodedata
import sys
cmb_chrs = dict.fromkeys(c for c in range(sys.maxunicode) if unicodedata.combining(chr(c))) # combining() : 유니코드 중에 조합된 것을 추출.
print(cmb_chrs)
b = unicodedata.normalize('NFD', a)
print(b)
print(b.translate(cmb_chrs))
# - 유니코드 숫자 문자를 이와 관련 있는 아스키 숫자에 매핑하도록 변환 테이블을 작성한다.
digitmap = {
c: ord('0') + unicodedata.digit(chr(c)) for c in range(sys.maxunicode) if unicodedata.category(chr(c)) == 'Nd'
}
print(len(digitmap), digitmap)
x = '\u0661\u0662\u0663'
print(x.translate(digitmap))
# - 또 다른 텍스트 정리 기술로 I/O 인코딩, 디코딩 함수가 있다. 이 방식은 텍스트를 우선 정리해 놓고 encode() 나 decode() 를
# 실행해서 잘라내거나 변경한다.
print(a)
b = unicodedata.normalize('NFD', a)
print(b.encode('ascii', 'ignore').decode('ascii')) # ascii 형태로 인코딩 및 디코딩
# ▣ 토론 : 텍스트 정리를 하다 보면 실행 성능 문제에 직면하기도 한다.
# 간단한 치환을 위해서는 str.replace() 함수를 사용하는 것이 빠르고 복잡한 치환을 하는 경우에는 str.translate() 함수를
# 사용하는 것이 좋다.
# 2.13 텍스트 정렬
# ▣ 문제 : 텍스트를 특정 형식에 맞추어 정렬하고 싶다.
# ▣ 해결 : ljust(), rjust(), center() 등이 있다.
text = 'Hello World'
print(text.ljust(20))
print(text.rjust(20))
print(text.center(20))
# - 세 개의 메소드는 별도의 채워 넣기 문자를 사용할 수 있다.
print(text.rjust(20, '='))
print(text.center(20, '*'))
# - format() 함수를 사용하면 인자로 <, >, ^ 를 적절하게 사용해 주면 된다.
print(format(text, '>20')) # rjust 와 동일
print(format(text, '<20')) # ljust 와 동일
print(format(text, '^20')) # center 와 동일
# - 공백 대신 특정 문자를 채워 넣고 싶다면 정렬 문자 앞에 그 문자를 지정한다.
print(format(text, '=>20'))
print(format(text, '*^20'))
# - 포맷 코드는 format() 메소드에 사용해 여러 값을 서식화할 수도 있다.
print('{:>10} {:>10}'.format('Hello', 'World'))
# - format() 을 사용하면 문자열뿐만 아니라 숫자 값 등 모든 값에 동작한다.
x = 1.2345
print(format(x, '>10')) # str 타입으로 변환
print(format(x, '^10.2f')) # 소수점 자리수 지정 가능
# ▣ 토론 : 오래된 코드를 보면 % 연산자를 사용해 텍스트를 서식화하기도 했다.
print('%-20s ' % text)
print('%20s ' % text)
# 2.14 문자열 합치기
# ▣ 문제 : 작은 문자열 여러 개를 합쳐 하나의 긴 문자열을 만들고 싶다.
# ▣ 해결 : 합치고자 하는 문자열이 시퀀스나 순환 객체 안에 있다면 join() 메소드를 사용하는 것이 가장 빠르다.
parts = ['Is', 'Chicago', 'Not', 'Chicago?']
print(' '.join(parts))
print(','.join(parts))
print(''.join(parts))
# - 합치려고 하는 문자열의 수가 아주 적다면 + 를 사용하면 된다.
a = 'Is Chicago'
b = 'Not Chicago?'
print(a + ' ' + b)
# - + 연산자는 조금 더 복잡한 문자열 서식 연산에 사용해도 잘 동작한다.
print('{} {}'.format(a, b))
print(a + ' ' + b)
a = 'Hello' 'World'
print(a)
# ▣ 토론 : 명심해야 할 부분은, + 연산자로 많은 문자열을 합치려고 하면 메모리 복사와 가비지 컬렉션으로 인해 매우 비효율적이라는 점이다.
s = ''
for p in parts:
s += p
# - 생성자 표현식으로 합치는 방법이 있다.
data = ['ACME', 50, 91.1]
print(' '.join(str(v) for v in data))
# - 불필요한 문자열 합치기를 하고 있지 않은지도 주의하자.
a = 'qwer'
b = 'asdf'
c = 'zxcv'
print(a + ':' + b + ':' + c) # 좋지 않은 방식
print(':'.join([a, b, c])) # 개선된 방식
print(a, b, c, sep=':') # 좋은 방식
# - 수많은 짧은 문자열을 하나로 합쳐 문자열을 만드는 코드를 작성한다면, yeild 를 사용한 생성자 함수를 고려하자.
def sample():
yield 'Is'
yield 'Chicago'
yield 'Not'
yield 'Chicago?'
text = ''.join(sample())
print(text)
# - 문자열을 입출력(I/O)으로 리다이렉트 할 수 있다.
for part in sample():
f.write(part)
# - 입출력을 조합한 하이브리드 방식 구현도 가능하다.
f = open('D:\\KYH\\02.PYTHON\\data\\combine.txt', 'a')
def combine(source, maxsize):
parts = []
size = 0
for part in source:
parts.append(part)
size += len(part)
if size >= maxsize:
yield ''.join(parts)
parts = []
size = 0
yield ''.join(parts)
for part in combine(sample(), 32768):
f.write(part)
# 2.15 문자열에 변수 사용
# ▣ 문제 : 문자열에 변수를 사용하고 이 변수에 맞는 값을 채우고 싶다.
# ▣ 해결 : 파이썬 문자열에 변수 값을 치환하는 간단한 방법은 존재하지 않는다.
# 하지만 format() 메소드를 사용하면 비슷하게 흉내 낼 수 있다.
s = '{name} hash {n} messages.'
print(s.format(name='Guido', n=37))
# - 치환할 값이 변수에 들어 있다면 format_map() 과 vars() 를 함께 사용하면 된다.
name = 'Guido'
n = 37
print(s.format_map(vars()))
# - vars() 에는 인스턴스를 사용할 수도 있다.
class Info:
def __init__(self, name, n):
self.name = name
self.n = n
a = Info('Guido', 37)
print(s.format_map(vars(a)))
# - format() 또는 format_map() 사용시 빠진 값은 __missing__() 메소드가 있는 딕셔너리 클래스를 정의해서 피할 수 있다.
class safesub(dict):
def __missing__(self, key):
return '{' + key + '}'
del n
print(s.format_map(safesub(vars())))
# - 코드에서 변수 치환을 빈번히 사용할 것 같다면 치환하는 작업을 유틸리티 함수에 모아 놓고 소위 "프레임 핵(frame hack)"으로 사용할 수 있다.
import sys
def sub(text):
return text.format_map(safesub(sys._getframe(1).f_locals))
name = 'Guido'
n = 37
print(sub('Hello {name}'))
print(sub('You have {n} messages.'))
print(sub('Your favorite color is {color}'))
# ▣ 토론 : 파이썬 자체에서 변수 보간법이 존재하지 않아서 다양한 대안이 생겼다.
name = 'Guido'
n = 37
print('%(name) has %(n) messages.' % vars())
import string
s = string.Template('$name has $n messages.')
print(s.substitute(vars()))
# 2.16 텍스트 열의 개수 고정
# ▣ 문제 : 긴 문자열의 서식을 바꿔 열의 개수를 조절하고 싶다.
# ▣ 해결 : textwrap 모듈을 사용해서 텍스트를 재서식화 한다.
s = 'Look into my eyes, look into my eyes, the eyes, the eyes,' \
"the eyes, not around the eyes, don't look around the eyes," \
"look into my eyes, you're under."
import textwrap
print(textwrap.fill(s, 70))
print(textwrap.fill(s, 40))
print(textwrap.fill(s, 40, initial_indent=' '))
print(textwrap.fill(s, 40, subsequent_indent=' '))
# ▣ 토론 : 텍스트를 출력하기 전에 textwrap 모듈을 사용하면 깔끔하게 서식을 맞출 수 있다.
# 특히 터미널에 사용할 텍스트에 적합하다.
# 터미널의 크기를 얻으려면 os.get_terminal_size() 를 사용한다.
import os
print(os.get_terminal_size().columns)
# 2.17 HTML 과 XML 엔티티 처리
# ▣ 문제 : &entity; 나 &#code; 와 같은 HTML, XML 엔터티를 이에 일치하는 문자로 치환하고 싶다.
# 혹은 텍스트를 생성할 때 특정 문자(<, >, & 등)를 피하고 싶다.
# ▣ 해결 : 텍스트를 생성할 때 <나>와 같은 특수 문자를 치환하는 것은 html.escape() 함수를 사용하면 상대적으로 간단히 처리할 수 있다.
s = 'Elements are written as "<tag>text</tag>".'
import html
print(s)
print(html.escape(s))
# - 따옴표는 남겨 두도록 지정
print(html.escape(s, quote=False))
# - 텍스트를 아스키로 만들고 캐릭터 코드를 아스키가 아닌 문자에 끼워 넣고 싶으면 errors='xmlcharrefreplace' 인자를 입출력 관련 함수에 사용한다.
s = 'Spicy Jalapeño'
print(s.encode('ascii', errors='xmlcharrefreplace'))
# - 수동으로 치환을 해야 한다면 HTML, XML 파서에 내장되어 있는 여러 유틸리티 함수나 메소드를 사용한다.
s = 'Spicy "Jalapeño".'
from html.parser import HTMLParser
p = HTMLParser()
print(p.unescape(s)) # 파이썬 3.5 버전부터 deprecated 됨.
print(html.unescape(s))
t = 'The prompt is >>>'
from xml.sax.saxutils import unescape
print(unescape(t))
# ▣ 토론 : HTML, XML 을 생성할 때 특수 문자를 제대로 이스케이핑하는 과정을 간과하기 쉽다.
# print() 로 결과물을 생성하거나 기본적인 문자열 서식 기능을 사용할 때 특히 더 그렇다.
# 가장 쉬운 해결책은 html.escape() 와 같은 유틸리티 함수를 사용하는 것이다.
# 2.18 텍스트 토큰화
# ▣ 문제 : 문자열을 파싱해서 토큰화하고 싶다.
# ▣ 해결 : 정규 표현식과 scanner() 메소드를 사용한다.
# - 정규 표현식을 사용.(이름 있는 캡처 그룹)
text = 'foo = 23 + 42 * 10'
import re
NAME = r'(?P<NAME>[a-zA-Z_][a-zA-Z_0-9]*)'
NUM = r'(?P<NUM>\d+)'
PLUS = r'(?P<PLUS>\+)'
TIMES = r'(?P<TIMES>\*)'
EQ = r'(?P<EQ>=)'
WS = r'(?P<WS>\s+)'
master_pat = re.compile('|'.join([NAME, NUM, PLUS, TIMES, EQ, WS]))
# - scanner() 메소드를 사용.
scanner = master_pat.scanner('foo = 42')
scanner.match()
print(_.lastgroup, _.group()) # _ 는 파이썬 2.x 버전에서 사용 가능함.
scanner.match()
print(_.lastgroup, _.group())
scanner.match()
print(_.lastgroup, _.group())
scanner.match()
print(_.lastgroup, _.group())
scanner.match()
print(_.lastgroup, _.group())
# - 이 기술을 사용해 간결한 생성자를 만들 수 있다.
from collections import namedtuple
Token = namedtuple('Token', ['type', 'value'])
def generate_tokens(pat, text):
scanner = pat.scanner(text)
for m in iter(scanner.match, None):
yield Token(m.lastgroup, m.group())
for tok in generate_tokens(master_pat, 'foo = 42'):
print(tok)
tokens = (tok for tok in generate_tokens(master_pat, text) if tok.type != 'WS')
for tok in tokens:
print(tok)
# ▣ 토론 : 보통 더 복잡한 텍스트 파싱이나 처리를 하기 전에 토큰화를 한다.
# 매칭할 때 re 는 명시한 순서대로 패턴을 매칭한다. 따라서 한 패턴이 다른 패턴의 부분이 되는 경우가 있다면
# 항상 더 긴 패턴을 먼저 넣어야 한다.
LT = r'(?P<LT><)'
LE = r'(?P<LE><=)'
EQ = r'(?P<EQ>=)'
master_pat = re.compile('|'.join([LE, LT, EQ])) # 올바름
master_pat = re.compile('|'.join([LT, LE, EQ])) # 틀림
for tok in generate_tokens(master_pat, '<='):
print(tok)
# - 패턴이 부분 문자열을 형성하는 경우도 조심해야 한다.
PRINT = r'(?P<PRINT>print)'
NAME = r'(?P<NAME>[a-zA-Z_][a-zA-Z_0-9]*)'
master_pat = re.compile('|'.join([PRINT, NAME]))
for tok in generate_tokens(master_pat, 'printer'):
print(tok)
# 2.19 간단한 재귀 파서 작성
# ▣ 문제 : 주어진 문법 규칙에 따라 텍스트를 파싱하고 동작을 수행하거나 입력된 텍스트를 추상 신택스 트리로 나타내야 한다.
# 문법은 간단하지만 프레임워크를 사용하지 않고 파서를 직접 작성하고 싶다.
# ▣ 해결 : 이 문제는 특정 문법에 따라 텍스트를 파싱하는 데 집중한다.
# 우선 문법의 정규 스펙을 BNF 나 EBNF 로 하는 데서 시작한다.
import re
import collections
# - 토큰 스펙화.
NUM = r'(?P<NUM>\d+)'
PLUS = r'(?P<PLUS>\+)'
MINUS = r'(?P<MINUS>-)'
TIMES = r'(?P<TIMES>\*)'
DIVIDE = r'(?P<DIVIDE>/)'
LPAREN = r'(?P<LPAREN>\()'
RPAREN = r'(?P<RPAREN>\))'
WS = r'(?P<WS>\s+)'
master_pat = re.compile('|'.join([NUM, PLUS, MINUS, TIMES, DIVIDE, LPAREN, RPAREN, WS]))
# - 토큰화.
Token = collections.namedtuple('Token', ['type', 'value'])
def generate_tokens(text):
scanner = master_pat.scanner(text)
for m in iter(scanner.match, None):
tok = Token(m.lastgroup, m.group())
if tok.type != 'WS':
yield tok
# - 파서.
class ExpressionEvaluator:
'''
재귀 파서 구현, 모든 메소드는 하나의 문법 규칙을 구현한다.
현재 룩어헤드 토큰을 받고 테스트하는 용도로 ._accept()를 사용한다.
입력 받은 내역에 완벽히 매칭하고 다음 토큰을 무시할 때는
._expect()를 사용한다. (혹시 매칭하지 않는 경우에는 SyntaxError 를 발생한다.)
'''
def parse(self, text):
self.tokens = generate_tokens(text)
self.tok = None # 마지막 심볼 소비
self.nexttok = None # 다음 심볼 토큰화
self._advance() # 처음 룩어헤드 토큰 불러오기
return self.expr()
# generate_tokens() 메서드에서 가져온 토큰을 순차적으로 설정하는 함수
def _advance(self):
'Advance one token ahead'
self.tok, self.nexttok = self.nexttok, next(self.tokens, None) # next 함수는 iterator 를 순차적으로 리턴시켜주는 함수
# 다음 토큰이 원하는 토큰인 경우 self.tok 에 다음 토큰을 담고 True 를 리턴하는 함수
def _accept(self, toktype):
'Test and consume the next token if it matches toktype'
if self.nexttok and self.nexttok.type == toktype:
self._advance()
return True
else:
return False
def _expect(self, toktype):
'Consume next token if it matches toktype or raise SyntaxError'
if not self._accept(toktype):
raise SyntaxError('Expected ' + toktype)
# - 문법 규칙.
def expr(self):
"expression ::= term { ('+'|'-') term }*"
exprval = self.term()
while self._accept('PLUS') or self._accept('MINUS'):
op = self.tok.type
right = self.term()
if op == 'PLUS':
exprval += right
elif op == 'MINUS':
exprval -= right
return exprval
def term(self):
"term ::= factor { ('*'|'/') factor }*"
termval = self.factor()
while self._accept('TIMES') or self._accept('DIVIDE'):
op = self.tok.type
right = self.factor()
if op == 'TIMES':
termval *= right
elif op == 'DIVIDE':
termval /= right
return termval
def factor(self):
"factor ::= NUM | ( expr )"
if self._accept('NUM'):
return int(self.tok.value)
elif self._accept('LPAREN'):
exprval = self.expr()
self._expect('RPAREN')
return exprval
else:
raise SyntaxError('Expected NUMBER or LPAREN')
e = ExpressionEvaluator()
print(e.parse('2'))
print(e.parse('2 + 3'))
print(e.parse('2 + 3 * 4'))
print(e.parse('2 + (3 + 4) * 5'))
# print(e.parse('2 + (3 + * 4)'))
class ExpressionTreeBuilder(ExpressionEvaluator):
def expr(self):
"expression ::= term { ('+'|'-') term }"
exprval = self.term()
while self._accept('PLUS') or self._accept('MINUS'):
op = self.tok.type
right = self.term()
if op == 'PLUS':
exprval = ('+', exprval, right)
elif op == 'MINUS':
exprval = ('-', exprval, right)
return exprval
def term(self):
"term ::= factor { ('*'|'/') factor }"
termval = self.factor()
while self._accept('TIMES') or self._accept('DIVIDE'):
op = self.tok.type
right = self.factor()
if op == 'TIMES':
termval = ('*', termval, right)
elif op == 'DIVIDE':
termval = ('/', termval, right)
return termval
def factor(self):
'factor ::= NUM | ( expr )'
if self._accept('NUM'):
return int(self.tok.value)
elif self._accept('LPAREN'):
exprval = self.expr()
self._expect('RPAREN')
return exprval
else:
raise SyntaxError('Expected NUMBER or LPAREN')
e = ExpressionTreeBuilder()
print(e.parse('2 + 3'))
print(e.parse('2 + 3 * 4'))
print(e.parse('2 + (3 + 4) * 5'))
print(e.parse('2 + 3 + 4'))
# ▣ 토론 : 파싱은 컴파일러 과목에서 3주 이상을 할애해서 배우는 쉽지 않은 주제이다.
# 파싱 알고리즘이나 문법과 같은 기본적인 지식을 좀 더 알고 싶다면 우선 컴파일러 책을 한 권 읽어야 한다.
# 재귀 파서의 한 가지 제약으로 좌측 재귀가 포함된 어떠한 문법 규칙에 대해서도 사용할 수 없다.
# - 정말 복잡한 문법이 있다면 PyParsing 이나 PLY 와 같은 파싱 도구를 사용하는 것이 더 좋다.
from ply.lex import lex
from ply.yacc import yacc
# 토큰 리스트
tokens = ['NUM', 'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'LPAREN', 'RPAREN']
# 무시 문자
t_ignore = '\t\n'
# 토큰 스펙 (정규 표현식으로)
t_PLUS = r'\+'
t_MINUS = r'-'
t_TIMES = r'\*'
t_DIVIDE = r'/'
t_LPAREN = r'\('
t_RPAREN = r'\)'
# 토큰화 함수
def t_NUM(t):
r'\d+'
t.value = int(t.value)
return t
# 에러 핸들러
def t_error(t):
print('Bad character: {!r}'.format(t.value[0]))
t.skip(1)
# 렉서(lexer) 만들기
lexer = lex()
# 문법 규칙과 핸들러 함수
def p_expr(p):
'''
expr : expr PLUS term
| expr MINUS term
'''
if p[2] == '+':
p[0] = p[1] + p[3]
elif p[2] == '-':
p[0] = p[1] - p[3]
def p_expr_term(p):
'''
expr : term
'''
p[0] = p[1]
def p_term(p):
'''
term : term TIMES factor
| term DIVIDE factor
'''
if p[2] == '*':
p[0] = p[1] * p[3]
elif p[2] == '/':
p[0] = p[1] / p[3]
def p_term_factor(p):
'''
term : factor
'''
p[0] = p[1]
def p_factor(p):
'''
factor : NUM
'''
p[0] = p[1]
def p_factor_group(p):
'''
factor : LPAREN expr RPAREN
'''
p[0] = p[2]
def p_error(p):
print('Syntax error')
parser = yacc()
print(parser.parse('2'))
# 2.20 바이트 문자열에 텍스트 연산 수행
# ▣ 문제 : 바이트 문자열(byte string)에 일반적인 텍스트 연산(잘라내기, 검색, 치환 등)을 수행하고 싶다.
# ▣ 해결 : 바이트 문자열도 텍스트 문자열과 마찬가지로 대부분의 연산을 내장하고 있다.
data = b'Hello World'
print(data[0:5])
print(data.startswith(b'Hello'))
print(data.split())
print(data.replace(b'Hello', b'Hello Cruel'))
# - 바이트 배열에도 사용 가능하다.
data = bytearray(b'Hello World')
print(data[0:5])
print(data.startswith(b'Hello'))
print(data.split())
print(data.replace(b'Hello', b'Hello Cruel'))
# - 바이트 배열에서도 정규 표현식이 가능하다.
data = b'FOO:BAR,SPAM'
import re
print(re.split(b'[:,]', data)) # 패턴도 바이트로 나타내야 한다.
# ▣ 토론 : 대개의 경우 텍스트 문자열에 있는 연산 기능은 바이트 문자열에도 내장되어 있다.
# 하지만 주의해야 할 차이점이 몇 가지 있다.
# - 첫째. 바이트 문자열에 인덱스를 사용하면 개별 문자가 아니라 정수를 가리킨다.
a = 'Hello World'
print(a[0], a[1])
b = b'Hello World'
print(b[0], b[1])
# - 둘째. 바이트 문자열은 보기 좋은 표현식을 지원하지 않으며, 텍스트 문자열로 변환하지 않으면 깔끔하게 출력할 수도 없다.
s = b'Hello World'
print(s)
print(s.decode('ascii'))
# - 셋째. 바이트 문자열은 서식화를 지원하지 않는다.
# print(b'%10s %10d %10.2f' %(b'ACME', 100, 490.1))
# print(b'{} {} {}'.format(b'ACME', 100, 490.1))
print('{:10s} {:10d} {:10.2f}'.format('ACME', 100, 490.1).encode('ascii'))
# - 넷째. 바이트 문자열을 사용하면 특정 연산의 문법에 영향을 주기도 한다.
with open('files/somefile.txt', 'w') as f:
f.write('spicy')
import os
print(os.listdir('.'))
print(os.listdir(b'.'))
# ※ 바이트 데이터가 성능상 더 빠르더라도, 코드가 매우 지저분하고 이해하기 어려워지므로 텍스트 데이터를 사용하는 것이 좋다. | [
1,
396,
23040,
29871,
29906,
29889,
29871,
31406,
31013,
239,
154,
183,
31906,
29871,
240,
136,
144,
30784,
31177,
13,
29937,
259,
29906,
29889,
29896,
29871,
31457,
238,
162,
175,
29871,
31231,
238,
185,
135,
31013,
30906,
29871,
31406,
31013,
239,
154,
183,
29871,
31207,
238,
139,
135,
30827,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
240,
152,
135,
31493,
30906,
29871,
31207,
238,
139,
135,
31137,
29871,
239,
142,
185,
30811,
31826,
29871,
31231,
238,
185,
135,
31013,
30903,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
31153,
237,
183,
131,
239,
163,
132,
30393,
30811,
29871,
239,
152,
141,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
31406,
31013,
239,
154,
183,
29871,
237,
179,
160,
239,
181,
183,
30708,
6219,
580,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
30860,
30981,
29871,
237,
179,
135,
31746,
30877,
29871,
31158,
240,
156,
172,
31054,
29871,
30791,
31737,
30944,
31136,
238,
164,
160,
29871,
239,
135,
167,
237,
182,
135,
238,
147,
155,
239,
154,
139,
31137,
29871,
31457,
238,
162,
175,
29871,
31789,
30708,
29871,
31231,
238,
185,
135,
31013,
31207,
29871,
31231,
238,
185,
135,
31013,
29871,
30981,
238,
182,
131,
30708,
13,
29937,
632,
31334,
31989,
237,
188,
143,
30811,
29871,
31137,
238,
163,
167,
30944,
30811,
31081,
29871,
239,
152,
141,
31081,
30709,
29889,
29871,
239,
165,
131,
29871,
238,
144,
151,
29871,
31533,
31285,
31435,
239,
163,
187,
239,
152,
191,
29871,
240,
152,
163,
29871,
240,
152,
135,
31527,
30903,
29871,
239,
161,
139,
30709,
31747,
337,
29889,
5451,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
1220,
353,
525,
294,
2176,
285,
24255,
29936,
2511,
287,
29892,
29871,
285,
1324,
29895,
29892,
294,
2176,
29892,
418,
7953,
29915,
13,
5215,
337,
13,
2158,
29898,
276,
29889,
5451,
29898,
29878,
29915,
29961,
29936,
2053,
29879,
10725,
29879,
29930,
742,
1196,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
337,
29889,
5451,
580,
29871,
240,
152,
171,
30970,
31081,
29871,
238,
185,
135,
30826,
29871,
31231,
31406,
31417,
30709,
29871,
31457,
238,
162,
175,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
31976,
30889,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
31081,
29871,
239,
163,
147,
30393,
29871,
31533,
30826,
30944,
30709,
29889,
13,
29937,
259,
448,
337,
29889,
5451,
580,
29871,
31286,
29871,
30791,
31737,
240,
152,
163,
29871,
238,
152,
143,
31081,
29871,
237,
183,
135,
31603,
29871,
31734,
31054,
29871,
238,
175,
185,
30918,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
29871,
240,
143,
171,
240,
135,
183,
30393,
29871,
239,
189,
164,
239,
181,
155,
29871,
31607,
238,
166,
188,
30393,
29871,
238,
147,
159,
30709,
29889,
13,
9621,
353,
337,
29889,
5451,
29898,
29878,
12215,
29936,
29989,
29892,
4295,
29879,
2144,
29879,
29930,
742,
1196,
29897,
13,
2158,
29898,
9621,
29897,
13,
13,
29937,
259,
448,
29871,
31231,
238,
185,
135,
29871,
31406,
31013,
31826,
29871,
239,
185,
159,
238,
163,
168,
30944,
31081,
29871,
31378,
31327,
29889,
13,
5975,
353,
4235,
29961,
1057,
29906,
29962,
13,
6144,
13083,
414,
353,
4235,
29961,
29896,
1057,
29906,
29962,
718,
6024,
2033,
13,
2158,
29898,
5975,
29892,
628,
13083,
414,
29897,
13,
13,
29937,
259,
448,
29871,
31000,
31153,
30877,
29871,
31231,
238,
185,
135,
31013,
30906,
29871,
31197,
30918,
31286,
29871,
31231,
31126,
30877,
30709,
29889,
13,
2158,
877,
4286,
7122,
29898,
29894,
29974,
29881,
363,
325,
29892,
270,
297,
14319,
29898,
5975,
29892,
628,
13083,
414,
4961,
13,
13,
29937,
259,
448,
29871,
238,
185,
135,
30826,
29871,
31231,
31406,
31286,
29871,
237,
181,
179,
31906,
31054,
29871,
240,
146,
175,
240,
152,
171,
30889,
240,
133,
167,
31137,
29871,
239,
142,
185,
30811,
29871,
239,
152,
141,
30811,
31826,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31054,
29871,
237,
183,
135,
31603,
31517,
29871,
30791,
31737,
31435,
239,
152,
191,
29871,
240,
152,
163,
29871,
240,
152,
135,
31527,
30903,
29871,
239,
161,
139,
30709,
31747,
29871,
238,
136,
191,
239,
189,
164,
239,
181,
155,
29871,
31607,
238,
166,
188,
31286,
29871,
30791,
31737,
30877,
30709,
29889,
13,
2158,
29898,
276,
29889,
5451,
877,
10780,
29901,
29892,
29989,
29936,
4295,
29879,
2144,
29879,
29930,
742,
1196,
876,
13,
13,
13,
29937,
259,
29906,
29889,
29906,
29871,
31406,
31013,
239,
154,
183,
29871,
239,
181,
155,
31966,
30393,
31207,
29871,
31417,
30811,
238,
170,
140,
31054,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
170,
167,
239,
188,
176,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
239,
181,
155,
31966,
30393,
31207,
29871,
31417,
30811,
238,
170,
140,
31054,
29871,
240,
143,
143,
31153,
29871,
240,
156,
152,
31299,
31013,
29892,
3988,
11380,
29871,
238,
150,
180,
29871,
240,
141,
188,
30852,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
143,
171,
240,
135,
183,
30393,
29871,
240,
146,
175,
240,
152,
171,
238,
147,
155,
239,
154,
139,
31081,
30811,
29871,
237,
181,
131,
30791,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
239,
181,
155,
31966,
30393,
31207,
29871,
31417,
30811,
238,
170,
140,
31054,
29871,
240,
143,
171,
240,
135,
183,
30393,
29871,
240,
146,
175,
240,
152,
171,
238,
147,
155,
239,
154,
139,
31081,
30811,
29871,
240,
156,
152,
30918,
30944,
31081,
29871,
237,
179,
135,
31746,
30877,
29871,
31945,
238,
181,
152,
239,
159,
191,
30906,
851,
29889,
27382,
2541,
580,
29871,
31207,
851,
29889,
1975,
2541,
580,
29871,
238,
172,
151,
31189,
31493,
30903,
29871,
239,
161,
139,
30709,
29889,
13,
9507,
353,
525,
1028,
314,
29889,
3945,
29915,
13,
2158,
29898,
9507,
29889,
1975,
2541,
12839,
3945,
8785,
13,
2158,
29898,
9507,
29889,
27382,
2541,
877,
1445,
29901,
8785,
13,
2271,
353,
525,
1124,
597,
1636,
29889,
4691,
29889,
990,
29915,
13,
2158,
29898,
2271,
29889,
27382,
2541,
877,
1124,
29901,
8785,
13,
13,
29937,
259,
448,
29871,
31457,
238,
162,
175,
29871,
31789,
30708,
29871,
31345,
240,
134,
160,
30811,
31517,
29871,
237,
181,
131,
30791,
31435,
239,
152,
191,
29871,
30877,
30709,
31747,
29871,
237,
181,
131,
30791,
30944,
31137,
29871,
239,
142,
185,
31354,
29871,
237,
179,
149,
31286,
29871,
240,
141,
159,
240,
151,
143,
31054,
29871,
238,
142,
183,
30860,
8665,
2541,
580,
29871,
31207,
10614,
2541,
580,
29871,
31054,
29871,
31170,
238,
142,
175,
30877,
30709,
29889,
13,
5215,
2897,
13,
1777,
264,
1280,
353,
2897,
29889,
1761,
3972,
12839,
1495,
13,
2158,
29898,
1777,
264,
1280,
29897,
13,
2158,
4197,
978,
363,
1024,
297,
977,
264,
1280,
565,
1024,
29889,
1975,
2541,
29898,
12839,
29883,
742,
15300,
29882,
8785,
2314,
13,
13,
3166,
3142,
1982,
29889,
3827,
1053,
5065,
417,
2238,
13,
13,
1753,
1303,
29918,
1272,
29898,
978,
1125,
13,
1678,
565,
1024,
29889,
27382,
2541,
29898,
877,
1124,
29901,
742,
525,
991,
29901,
742,
525,
23102,
29901,
8785,
29901,
13,
4706,
736,
5065,
417,
2238,
29898,
978,
467,
949,
580,
13,
1678,
1683,
29901,
13,
4706,
411,
1722,
29898,
978,
29897,
408,
285,
29901,
13,
9651,
736,
285,
29889,
949,
580,
13,
13,
29937,
259,
448,
8665,
2541,
580,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
240,
141,
159,
240,
151,
143,
31826,
31286,
29871,
239,
161,
136,
238,
163,
168,
239,
159,
191,
30906,
29871,
238,
179,
158,
31081,
30709,
29889,
13,
1859,
1575,
353,
6024,
1124,
29901,
742,
525,
23102,
29901,
2033,
13,
2271,
353,
525,
1124,
597,
1636,
29889,
4691,
29889,
990,
29915,
13,
2271,
29889,
27382,
2541,
29898,
1859,
1575,
29897,
13,
2271,
29889,
27382,
2541,
29898,
23583,
29898,
1859,
1575,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
8665,
2541,
580,
29871,
239,
156,
131,
10614,
2541,
580,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
239,
163,
148,
238,
148,
147,
31129,
239,
156,
131,
29871,
239,
163,
148,
31362,
31129,
31517,
29871,
237,
181,
131,
30791,
240,
152,
163,
29871,
238,
152,
143,
29871,
238,
170,
167,
31327,
29871,
240,
145,
187,
30826,
30944,
30709,
29889,
13,
29937,
632,
239,
141,
175,
31197,
30393,
30784,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
31487,
239,
141,
186,
30877,
29871,
31000,
239,
161,
148,
31286,
29871,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30811,
31826,
29871,
239,
192,
151,
31493,
30708,
29871,
30903,
238,
146,
136,
31126,
30393,
29871,
238,
170,
145,
30393,
29871,
238,
153,
171,
31129,
31536,
30709,
29889,
13,
9507,
353,
525,
1028,
314,
29889,
3945,
29915,
13,
2158,
29898,
9507,
14352,
29946,
17531,
1275,
15300,
3945,
1495,
13,
2271,
353,
525,
1124,
597,
1636,
29889,
4691,
29889,
990,
29915,
13,
2158,
29898,
2271,
7503,
29945,
29962,
1275,
525,
1124,
11283,
470,
3142,
7503,
29953,
29962,
1275,
525,
991,
11283,
470,
3142,
7503,
29946,
29962,
1275,
525,
23102,
29901,
1495,
13,
13,
29937,
259,
448,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30791,
31737,
31435,
31136,
29871,
238,
147,
159,
30709,
29889,
13,
5215,
337,
13,
2271,
353,
525,
1124,
597,
1636,
29889,
4691,
29889,
990,
29915,
13,
2158,
29898,
276,
29889,
4352,
877,
1124,
29901,
29989,
991,
29901,
29989,
23102,
29901,
742,
3142,
876,
13,
13,
29937,
259,
448,
8665,
2541,
580,
29871,
239,
156,
131,
10614,
2541,
580,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
31153,
238,
179,
155,
239,
163,
132,
30918,
29871,
238,
144,
179,
30393,
31856,
29871,
237,
179,
147,
31189,
239,
156,
131,
29871,
237,
179,
156,
31354,
29871,
30709,
238,
168,
187,
29871,
31000,
239,
161,
148,
31054,
29871,
240,
152,
171,
237,
190,
155,
29871,
30791,
31737,
30944,
30827,
31054,
31136,
29871,
239,
165,
142,
30709,
29889,
13,
361,
738,
29898,
978,
29889,
1975,
2541,
29898,
12839,
29883,
742,
15300,
29882,
8785,
363,
1024,
297,
2897,
29889,
1761,
3972,
877,
6169,
22164,
13,
1678,
1209,
13,
13,
13,
29937,
259,
29906,
29889,
29941,
29871,
239,
140,
155,
29871,
239,
156,
131,
31153,
31493,
239,
188,
183,
31493,
29871,
240,
143,
171,
240,
135,
183,
239,
159,
191,
30906,
29871,
31406,
31013,
239,
154,
183,
29871,
238,
170,
167,
239,
188,
176,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
26663,
29871,
239,
140,
155,
31054,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
31906,
29871,
31000,
31153,
30877,
29871,
239,
156,
131,
31153,
31493,
239,
188,
183,
31493,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
170,
167,
239,
188,
176,
31054,
29871,
30791,
31737,
30944,
31137,
29871,
239,
142,
185,
30709,
14030,
239,
155,
139,
29901,
20611,
2272,
29892,
13373,
29961,
29900,
29899,
29929,
29962,
10521,
7638,
29871,
238,
150,
180,
29897,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
7876,
4352,
29871,
31962,
238,
150,
139,
31054,
29871,
238,
148,
147,
29871,
240,
152,
171,
30970,
7876,
4352,
580,
29871,
239,
156,
131,
7876,
4352,
4878,
580,
29871,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
238,
147,
159,
30709,
29889,
13,
3166,
7876,
4352,
1053,
7876,
4352,
29892,
7876,
4352,
4878,
13,
2158,
29898,
9144,
4352,
877,
5431,
29889,
3945,
742,
525,
10521,
3945,
8785,
13,
2158,
29898,
9144,
4352,
877,
5431,
29889,
3945,
742,
525,
29973,
3634,
29889,
3945,
8785,
13,
2158,
29898,
9144,
4352,
877,
16390,
29946,
29945,
29889,
7638,
742,
525,
16390,
29961,
29900,
29899,
29929,
14178,
8785,
13,
7039,
353,
6024,
16390,
29896,
29889,
7638,
742,
525,
16390,
29906,
29889,
7638,
742,
525,
2917,
29889,
2172,
742,
525,
5431,
29889,
2272,
2033,
13,
2158,
4197,
978,
363,
1024,
297,
2983,
565,
7876,
4352,
29898,
978,
29892,
525,
16390,
10521,
7638,
1495,
2314,
13,
13,
29937,
259,
448,
29871,
31153,
238,
179,
155,
239,
163,
132,
239,
159,
191,
30906,
7876,
4352,
580,
29871,
31081,
29871,
30889,
30784,
240,
136,
159,
30708,
29871,
240,
143,
143,
31153,
29871,
30889,
30784,
240,
136,
159,
31906,
29871,
31000,
31153,
30877,
29871,
30890,
31189,
31406,
31013,
29871,
31231,
31406,
29871,
237,
186,
159,
239,
188,
156,
31286,
29871,
238,
151,
179,
238,
168,
187,
30709,
29889,
13,
2158,
29898,
9144,
4352,
877,
5431,
29889,
3945,
742,
525,
10521,
29911,
12188,
8785,
29871,
396,
4326,
1678,
584,
5852,
13,
2158,
29898,
9144,
4352,
877,
5431,
29889,
3945,
742,
525,
10521,
29911,
12188,
8785,
29871,
396,
3474,
584,
5852,
13,
13,
29937,
259,
448,
29871,
30393,
238,
162,
179,
29871,
31817,
30393,
239,
163,
147,
30393,
29871,
239,
154,
137,
31081,
29871,
237,
181,
134,
31286,
29871,
30791,
31737,
30944,
238,
163,
167,
31747,
7876,
4352,
4878,
580,
29871,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
2158,
29898,
9144,
4352,
4878,
877,
5431,
29889,
3945,
742,
525,
10521,
29911,
12188,
8785,
13,
13,
29937,
259,
448,
29871,
240,
143,
143,
31153,
29871,
30393,
238,
169,
135,
30393,
29871,
30860,
238,
142,
143,
29871,
238,
144,
179,
30393,
31856,
29871,
240,
151,
135,
30906,
31578,
239,
142,
180,
31054,
31136,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
7328,
267,
353,
6024,
29945,
29946,
29896,
29906,
405,
17332,
1718,
29968,
6850,
742,
13,
632,
525,
29896,
29900,
29953,
29900,
399,
11033,
4571,
3094,
6850,
742,
13,
632,
525,
29896,
29900,
29941,
29929,
399,
18016,
2190,
29963,
6227,
1307,
319,
12064,
742,
13,
632,
525,
29906,
29896,
29906,
29906,
405,
17332,
1718,
29968,
6850,
742,
13,
632,
525,
29946,
29947,
29900,
29906,
405,
350,
1672,
3035,
12982,
29979,
2033,
13,
3166,
7876,
4352,
1053,
7876,
4352,
4878,
13,
2158,
4197,
10030,
363,
28915,
297,
14157,
565,
7876,
4352,
4878,
29898,
10030,
29892,
525,
29930,
6850,
1495,
2314,
13,
2158,
4197,
10030,
363,
28915,
297,
14157,
565,
7876,
4352,
4878,
29898,
10030,
29892,
525,
29945,
29946,
29961,
29900,
29899,
29929,
3816,
29900,
29899,
29929,
29962,
334,
6154,
1718,
29968,
29930,
1495,
2314,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
7876,
4352,
29871,
30903,
29871,
30970,
240,
153,
140,
30944,
31081,
29871,
238,
170,
167,
239,
188,
176,
31354,
29871,
237,
179,
135,
31746,
30877,
29871,
31406,
31013,
239,
154,
183,
29871,
238,
172,
151,
31189,
31493,
30708,
29871,
30827,
238,
141,
168,
31906,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
30708,
29871,
31941,
237,
179,
135,
239,
178,
167,
29871,
31724,
239,
188,
155,
30944,
31137,
29871,
239,
161,
139,
30709,
29889,
13,
29937,
9651,
238,
144,
179,
30393,
31856,
29871,
240,
151,
135,
30906,
31578,
239,
142,
180,
31286,
29871,
240,
152,
163,
29871,
238,
152,
143,
29871,
237,
179,
135,
31746,
30877,
29871,
239,
156,
131,
31153,
31493,
239,
188,
183,
31493,
31517,
29871,
30791,
31737,
240,
152,
163,
29871,
239,
134,
160,
237,
179,
132,
30393,
31197,
31747,
29871,
30393,
29871,
240,
152,
171,
30970,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
237,
183,
159,
239,
179,
177,
31354,
29871,
31345,
240,
134,
160,
30393,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29946,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
143,
171,
240,
135,
183,
29871,
238,
170,
167,
239,
188,
176,
31906,
29871,
237,
181,
131,
239,
134,
140,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
240,
141,
188,
30852,
29871,
240,
143,
171,
240,
135,
183,
31054,
29871,
30890,
30877,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
170,
167,
239,
188,
176,
30393,
31207,
29871,
237,
181,
131,
239,
134,
140,
31286,
29871,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
238,
170,
167,
239,
188,
176,
30944,
238,
163,
167,
31081,
29871,
240,
136,
144,
30784,
31177,
30903,
29871,
237,
179,
135,
31746,
30944,
30709,
31747,
851,
29889,
2886,
3285,
851,
29889,
1975,
2541,
3285,
851,
29889,
27382,
2541,
580,
29871,
239,
156,
131,
29871,
237,
179,
156,
31354,
29871,
30827,
238,
182,
187,
239,
163,
132,
30918,
29871,
31406,
31013,
239,
154,
183,
29871,
238,
172,
151,
31189,
31493,
31826,
239,
159,
191,
30906,
31136,
13,
29937,
9651,
239,
185,
172,
238,
185,
135,
30944,
30709,
29889,
13,
726,
353,
525,
4099,
801,
29892,
541,
694,
29892,
541,
21915,
29892,
541,
694,
29892,
541,
21915,
29915,
13,
13,
29937,
259,
448,
29871,
30852,
240,
156,
152,
30877,
29871,
238,
170,
167,
239,
188,
176,
13,
2158,
29898,
726,
1275,
525,
4099,
801,
1495,
13,
13,
29937,
259,
448,
29871,
239,
181,
155,
31966,
30393,
31207,
29871,
238,
132,
160,
31054,
29871,
238,
170,
167,
239,
188,
176,
13,
2158,
29898,
726,
29889,
27382,
2541,
877,
4099,
801,
8785,
13,
2158,
29898,
726,
29889,
1975,
2541,
877,
1217,
8785,
13,
13,
29937,
259,
448,
29871,
239,
181,
155,
31966,
29871,
31207,
31925,
238,
133,
159,
29871,
237,
182,
182,
29871,
237,
181,
131,
239,
134,
140,
13,
2158,
29898,
726,
29889,
2886,
877,
1217,
8785,
29871,
396,
29871,
31435,
238,
142,
188,
29871,
237,
179,
149,
30393,
29871,
239,
181,
155,
31966,
29871,
31207,
239,
155,
171,
29871,
30918,
238,
144,
180,
30784,
31517,
29871,
30826,
240,
135,
183,
29889,
13,
13,
29937,
259,
448,
29871,
239,
165,
131,
29871,
238,
144,
151,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
238,
170,
167,
239,
188,
176,
31286,
29871,
31724,
31435,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31906,
337,
29871,
31962,
238,
150,
139,
31286,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29937,
268,
1993,
580,
584,
29871,
240,
152,
176,
31158,
29871,
31406,
31013,
239,
154,
183,
29871,
239,
181,
155,
31966,
31054,
31093,
29871,
239,
179,
193,
30827,
31517,
29871,
30889,
31136,
29889,
13,
29937,
268,
1284,
497,
580,
584,
29871,
240,
136,
144,
30784,
31177,
29871,
31170,
239,
181,
183,
31054,
29871,
237,
180,
187,
239,
182,
147,
29871,
239,
179,
193,
30827,
31517,
29871,
30889,
31136,
29889,
13,
726,
29896,
353,
525,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
29915,
13,
726,
29906,
353,
525,
25363,
29871,
29906,
29955,
29892,
29871,
29906,
29900,
29896,
29906,
29915,
13,
13,
5215,
337,
13,
29937,
259,
448,
29871,
237,
179,
135,
31746,
30877,
29871,
238,
170,
167,
239,
188,
176,
29901,
320,
29881,
29974,
31081,
29871,
30944,
31207,
29871,
30393,
31158,
30708,
29871,
239,
139,
174,
31013,
31517,
29871,
30708,
31362,
13,
361,
337,
29889,
4352,
29898,
29878,
12764,
29881,
29974,
7998,
29881,
29974,
7998,
29881,
29974,
742,
1426,
29896,
1125,
13,
1678,
1596,
877,
3582,
1495,
13,
2870,
29901,
13,
1678,
1596,
877,
1217,
1495,
13,
13,
361,
337,
29889,
4352,
29898,
29878,
12764,
29881,
29974,
7998,
29881,
29974,
7998,
29881,
29974,
742,
1426,
29906,
1125,
13,
1678,
1596,
877,
3582,
1495,
13,
2870,
29901,
13,
1678,
1596,
877,
1217,
1495,
13,
13,
29937,
259,
448,
29871,
31000,
31153,
30877,
29871,
240,
143,
171,
240,
135,
183,
239,
159,
191,
30906,
29871,
238,
170,
167,
239,
188,
176,
31286,
29871,
238,
170,
145,
30393,
29871,
30970,
240,
153,
140,
240,
152,
163,
29871,
239,
155,
139,
30852,
30393,
31197,
31747,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
31362,
30826,
29871,
239,
190,
183,
240,
143,
143,
31153,
31435,
31093,
29871,
240,
143,
171,
240,
135,
183,
29871,
237,
179,
160,
239,
181,
183,
30906,
29871,
31826,
31804,
31129,
29871,
238,
137,
150,
31081,
30709,
29889,
13,
1256,
5031,
353,
337,
29889,
12198,
29898,
29878,
12764,
29881,
29974,
7998,
29881,
29974,
7998,
29881,
29974,
1495,
13,
361,
2635,
5031,
29889,
4352,
29898,
726,
29896,
1125,
13,
1678,
1596,
877,
3582,
1495,
13,
2870,
29901,
13,
1678,
1596,
877,
1217,
1495,
13,
13,
361,
2635,
5031,
29889,
4352,
29898,
726,
29906,
1125,
13,
1678,
1596,
877,
3582,
1495,
13,
2870,
29901,
13,
1678,
1596,
877,
1217,
1495,
13,
13,
29937,
259,
448,
29871,
240,
136,
144,
30784,
31177,
29871,
31170,
239,
181,
183,
31054,
29871,
237,
180,
187,
239,
182,
147,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
239,
179,
193,
239,
159,
191,
238,
163,
167,
31747,
1284,
497,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
726,
353,
525,
29911,
397,
388,
338,
29871,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
29889,
10772,
1168,
8665,
29871,
29941,
29914,
29896,
29941,
29914,
29906,
29900,
29896,
29941,
6169,
13,
2158,
29898,
1256,
5031,
29889,
2886,
497,
29898,
726,
876,
13,
13,
29937,
259,
448,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30852,
30708,
240,
152,
163,
29871,
238,
152,
143,
29871,
237,
183,
135,
31603,
31517,
29871,
30791,
31737,
31435,
29871,
239,
189,
164,
239,
181,
155,
29871,
31607,
238,
166,
188,
31286,
29871,
31826,
31493,
31081,
29871,
237,
181,
134,
30393,
29871,
31153,
238,
179,
155,
239,
163,
132,
30393,
30709,
29889,
13,
1256,
5031,
353,
337,
29889,
12198,
29898,
29878,
29915,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
6802,
1194,
29881,
28135,
1495,
13,
29885,
353,
2635,
5031,
29889,
4352,
877,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
1495,
13,
2158,
29898,
29885,
29889,
2972,
29898,
29900,
511,
286,
29889,
2972,
29898,
29896,
511,
286,
29889,
2972,
29898,
29906,
511,
286,
29889,
2972,
29898,
29941,
511,
286,
29889,
13155,
3101,
29871,
396,
29871,
31607,
238,
166,
188,
238,
182,
135,
30906,
29871,
239,
185,
159,
238,
163,
168,
29871,
30903,
238,
141,
168,
313,
29900,
29871,
31354,
29871,
31170,
239,
181,
183,
29871,
239,
185,
159,
238,
163,
168,
29897,
13,
10874,
29892,
2462,
29892,
1629,
353,
286,
29889,
13155,
580,
13,
1454,
4098,
29892,
2462,
29892,
1629,
297,
2635,
5031,
29889,
2886,
497,
29898,
726,
1125,
13,
1678,
1596,
877,
29912,
7402,
29912,
7402,
8875,
4286,
4830,
29898,
6360,
29892,
4098,
29892,
2462,
876,
13,
13,
29937,
259,
448,
29871,
30877,
29871,
238,
181,
139,
31054,
29871,
237,
181,
179,
31906,
31517,
29871,
239,
153,
190,
30811,
29871,
239,
152,
141,
31137,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
239,
139,
159,
240,
156,
155,
30944,
238,
172,
179,
29871,
239,
179,
193,
239,
159,
191,
238,
163,
167,
31747,
1284,
1524,
580,
29871,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
1454,
286,
297,
2635,
5031,
29889,
2886,
1524,
29898,
726,
1125,
13,
1678,
1596,
29898,
29885,
29889,
13155,
3101,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
152,
184,
239,
142,
175,
30393,
29871,
238,
147,
155,
31081,
29871,
30827,
238,
141,
168,
31354,
337,
29889,
12198,
580,
29871,
31286,
29871,
30791,
31737,
31435,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
239,
190,
183,
240,
143,
143,
31153,
30944,
31137,
29871,
31607,
237,
181,
134,
31286,
1993,
3285,
1284,
497,
3285,
1284,
1524,
580,
29871,
238,
150,
180,
31054,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29937,
9651,
240,
143,
171,
240,
135,
183,
31286,
29871,
31976,
30889,
240,
152,
163,
29871,
238,
152,
143,
364,
29915,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
16029,
239,
156,
131,
29871,
237,
179,
156,
30393,
10650,
1347,
29871,
31286,
29871,
31607,
30890,
30906,
29871,
239,
150,
179,
31081,
237,
181,
134,
30393,
29871,
31153,
238,
179,
155,
239,
163,
132,
30393,
30709,
29889,
13,
29937,
9651,
30393,
29871,
240,
155,
152,
31895,
31354,
29871,
31989,
239,
141,
175,
238,
161,
155,
30889,
29871,
31406,
31013,
31517,
29871,
31435,
239,
135,
160,
30944,
30811,
29871,
239,
152,
141,
31137,
29871,
31754,
237,
181,
171,
29871,
238,
148,
147,
30827,
29871,
238,
152,
143,
31406,
31054,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31906,
29871,
237,
179,
156,
31354,
29871,
237,
182,
182,
31054,
29871,
31533,
31737,
30944,
30709,
29889,
13,
13,
29937,
259,
448,
1993,
580,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
239,
181,
155,
31966,
31826,
29871,
240,
156,
152,
30918,
30944,
238,
178,
131,
30906,
29892,
29871,
239,
155,
139,
31158,
239,
188,
155,
29871,
238,
173,
190,
30877,
29871,
237,
181,
134,
31054,
29871,
238,
170,
167,
239,
188,
176,
240,
152,
163,
29871,
240,
156,
152,
238,
168,
163,
31136,
29871,
239,
161,
139,
30709,
29889,
13,
29885,
353,
2635,
5031,
29889,
4352,
877,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
10736,
1753,
1495,
13,
2158,
29898,
29885,
29897,
13,
2158,
29898,
29885,
29889,
2972,
3101,
13,
13,
1256,
5031,
353,
337,
29889,
12198,
29898,
29878,
29915,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
1262,
1495,
13,
2158,
29898,
1256,
5031,
29889,
4352,
877,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
10736,
1753,
8785,
13,
2158,
29898,
1256,
5031,
29889,
4352,
877,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
8785,
13,
13,
13,
29937,
259,
29906,
29889,
29945,
29871,
240,
136,
144,
30784,
31177,
29871,
237,
181,
131,
239,
134,
140,
31906,
29871,
239,
188,
155,
240,
156,
155,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31406,
31013,
239,
154,
183,
31054,
31093,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
237,
181,
131,
239,
134,
140,
30944,
31137,
29871,
239,
188,
155,
240,
156,
155,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
237,
179,
135,
31746,
30877,
29871,
240,
143,
171,
240,
135,
183,
30393,
31197,
31747,
851,
29889,
6506,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29937,
9651,
31408,
237,
187,
139,
29871,
238,
144,
151,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
30791,
31737,
30944,
238,
163,
167,
31747,
337,
29871,
31962,
238,
150,
139,
30708,
1014,
580,
29871,
240,
152,
171,
30970,
29914,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
726,
353,
525,
4099,
801,
29892,
541,
694,
29892,
541,
21915,
29892,
541,
694,
29892,
541,
21915,
29915,
13,
2158,
29898,
726,
29889,
6506,
877,
4099,
801,
742,
525,
29891,
1022,
8785,
13,
13,
726,
353,
525,
29911,
397,
388,
338,
29871,
29896,
29896,
29914,
29906,
29955,
29914,
29906,
29900,
29896,
29906,
29889,
10772,
1168,
8665,
29871,
29941,
29914,
29896,
29941,
29914,
29906,
29900,
29896,
29941,
6169,
13,
5215,
337,
13,
2158,
29898,
276,
29889,
1491,
29898,
29878,
29915,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
6802,
1194,
29881,
28135,
742,
364,
12764,
29941,
2612,
29896,
2612,
29906,
742,
1426,
876,
13,
13,
29937,
259,
448,
29871,
31000,
31153,
30877,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
30791,
31737,
30877,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
237,
182,
135,
239,
137,
144,
31435,
239,
152,
191,
29871,
30877,
30709,
31747,
29871,
31126,
238,
141,
168,
29871,
240,
153,
168,
31158,
31286,
29871,
31724,
31435,
29871,
239,
190,
183,
240,
143,
143,
31153,
238,
170,
132,
31286,
29871,
31137,
238,
163,
167,
31435,
29871,
31199,
31081,
29871,
237,
181,
134,
30393,
29871,
239,
165,
142,
30709,
29889,
13,
5215,
337,
13,
1256,
5031,
353,
337,
29889,
12198,
29898,
29878,
29915,
1194,
29881,
29974,
6802,
1194,
29881,
29974,
6802,
1194,
29881,
28135,
1495,
13,
2158,
29898,
1256,
5031,
29889,
1491,
29898,
29878,
12764,
29941,
2612,
29896,
2612,
29906,
742,
1426,
876,
13,
13,
29937,
259,
448,
29871,
238,
144,
151,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
31724,
30877,
29871,
239,
192,
159,
31989,
29871,
240,
152,
171,
30970,
29871,
31976,
30889,
29889,
13,
3166,
17684,
1053,
4098,
29918,
370,
1182,
13,
1753,
1735,
29918,
1256,
29898,
29885,
1125,
13,
1678,
1601,
29918,
978,
353,
4098,
29918,
370,
1182,
29961,
524,
29898,
29885,
29889,
2972,
29898,
29896,
28166,
13,
1678,
736,
525,
8875,
6571,
6571,
4286,
4830,
29898,
29885,
29889,
2972,
29898,
29906,
511,
1601,
29918,
978,
29892,
286,
29889,
2972,
29898,
29941,
876,
13,
13,
2158,
29898,
1256,
5031,
29889,
1491,
29898,
3167,
29918,
1256,
29892,
1426,
876,
13,
13,
29937,
259,
448,
29871,
239,
188,
155,
240,
156,
155,
30393,
29871,
238,
173,
138,
29871,
238,
181,
139,
29871,
238,
179,
159,
239,
134,
160,
240,
153,
139,
31081,
30811,
29871,
239,
152,
143,
31137,
29871,
239,
142,
185,
30709,
31747,
337,
29889,
1491,
29876,
580,
29871,
31286,
29871,
30791,
31737,
30877,
30709,
29889,
13,
1482,
726,
29892,
302,
353,
2635,
5031,
29889,
1491,
29876,
29898,
29878,
12764,
29941,
2612,
29896,
2612,
29906,
742,
1426,
29897,
13,
2158,
29898,
1482,
726,
29892,
302,
29897,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
239,
152,
161,
31093,
29871,
239,
133,
183,
240,
145,
183,
238,
182,
187,
1014,
580,
29871,
238,
172,
151,
31189,
31493,
31054,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
29871,
237,
181,
131,
239,
134,
140,
31906,
29871,
239,
188,
155,
240,
156,
155,
29871,
30393,
239,
156,
187,
31054,
29871,
31129,
238,
163,
167,
239,
157,
183,
29871,
237,
181,
134,
31354,
29871,
239,
154,
137,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29953,
29871,
30890,
31189,
31406,
31013,
31517,
29871,
31231,
238,
182,
135,
30944,
30811,
29871,
239,
152,
141,
31081,
29871,
237,
181,
131,
239,
134,
140,
31906,
29871,
239,
188,
155,
240,
156,
155,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
237,
181,
131,
239,
134,
140,
30944,
31137,
29871,
239,
188,
155,
240,
156,
155,
240,
152,
163,
29871,
238,
152,
143,
29871,
30890,
31189,
31406,
31013,
31517,
29871,
31231,
238,
182,
135,
30944,
30811,
29871,
239,
152,
141,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
240,
136,
144,
30784,
31177,
29871,
237,
183,
131,
238,
163,
171,
29871,
239,
161,
148,
239,
154,
136,
31286,
29871,
240,
152,
163,
29871,
238,
152,
143,
29871,
30890,
31189,
31406,
31013,
31517,
29871,
31231,
238,
182,
135,
30944,
30811,
29871,
239,
152,
141,
30827,
29871,
31724,
31435,
31093,
31081,
337,
29871,
31962,
238,
150,
139,
31286,
29871,
30791,
31737,
31435,
239,
152,
191,
29871,
30944,
31137,
337,
29889,
6259,
6632,
1525,
23487,
29871,
240,
151,
143,
238,
161,
155,
31607,
31517,
29871,
30811,
30852,
31435,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
726,
353,
525,
4897,
13171,
349,
29979,
4690,
1164,
29892,
5224,
3017,
29892,
341,
11925,
5132,
29915,
13,
2158,
29898,
276,
29889,
2886,
497,
877,
4691,
742,
1426,
29892,
13449,
29922,
276,
29889,
6259,
6632,
1525,
23487,
876,
13,
2158,
29898,
276,
29889,
1491,
877,
4691,
742,
525,
29879,
21040,
742,
1426,
29892,
13449,
29922,
276,
29889,
6259,
6632,
1525,
23487,
876,
13,
13,
1753,
1993,
4878,
29898,
1742,
1125,
13,
1678,
822,
5191,
29898,
29885,
1125,
13,
4706,
1426,
353,
286,
29889,
2972,
580,
13,
4706,
565,
1426,
29889,
275,
21064,
7295,
13,
9651,
736,
1734,
29889,
21064,
580,
13,
4706,
25342,
1426,
29889,
275,
13609,
7295,
13,
9651,
736,
1734,
29889,
13609,
580,
13,
4706,
25342,
1426,
29961,
29900,
1822,
275,
21064,
7295,
13,
9651,
736,
1734,
29889,
5030,
2410,
675,
580,
13,
4706,
1683,
29901,
13,
9651,
736,
1734,
13,
1678,
736,
5191,
13,
13,
2158,
29898,
276,
29889,
1491,
877,
4691,
742,
1993,
4878,
877,
29879,
21040,
5477,
1426,
29892,
13449,
29922,
276,
29889,
6259,
6632,
1525,
23487,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
30890,
31789,
30708,
29871,
31378,
31327,
337,
29889,
6259,
6632,
1525,
23487,
29871,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
31826,
239,
159,
191,
30906,
29871,
30890,
31189,
31406,
31013,
31517,
29871,
31716,
30889,
30877,
29871,
240,
136,
144,
30784,
31177,
29871,
239,
161,
148,
239,
154,
136,
31054,
29871,
31716,
30826,
30903,
29871,
239,
154,
137,
30709,
29889,
13,
29937,
632,
30944,
30811,
31826,
29871,
31533,
31063,
239,
192,
151,
31493,
30903,
29871,
240,
146,
175,
240,
152,
171,
238,
147,
159,
29871,
239,
161,
148,
239,
154,
136,
31286,
29871,
30944,
30827,
31054,
31081,
29871,
31279,
239,
164,
180,
240,
152,
163,
29871,
30970,
31136,
29871,
239,
161,
139,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29955,
29871,
30903,
31299,
29871,
239,
170,
170,
31354,
29871,
238,
170,
167,
239,
188,
176,
31286,
29871,
31724,
30877,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30791,
31737,
30877,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
170,
167,
239,
188,
176,
31286,
29871,
30944,
31137,
29871,
239,
142,
185,
30811,
31826,
29871,
240,
136,
144,
30784,
31177,
31054,
31093,
29871,
30903,
31299,
29871,
237,
187,
183,
29871,
31279,
238,
185,
135,
31286,
29871,
239,
179,
193,
30860,
238,
133,
187,
30709,
29889,
13,
29937,
632,
31826,
239,
152,
192,
29871,
30903,
31299,
29871,
239,
170,
170,
31354,
29871,
31279,
238,
185,
135,
31286,
29871,
239,
179,
193,
30860,
31940,
31137,
29871,
239,
142,
185,
30709,
31747,
29871,
31129,
238,
153,
190,
237,
181,
143,
29871,
31435,
239,
152,
191,
29871,
240,
152,
163,
237,
188,
143,
29973,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
334,
29871,
238,
149,
167,
31054,
1577,
29871,
31517,
29871,
238,
185,
156,
30393,
31747,
29871,
238,
147,
159,
30709,
29889,
13,
5215,
337,
13,
710,
29918,
5031,
353,
337,
29889,
12198,
29898,
29878,
29915,
5931,
28104,
2144,
29908,
1495,
13,
726,
29896,
353,
525,
20606,
261,
4083,
376,
1217,
1213,
29915,
13,
2158,
29898,
710,
29918,
5031,
29889,
2886,
497,
29898,
726,
29896,
876,
13,
726,
29906,
353,
525,
20606,
261,
4083,
376,
1217,
1213,
24323,
4083,
376,
3582,
1213,
29915,
13,
2158,
29898,
710,
29918,
5031,
29889,
2886,
497,
29898,
726,
29906,
876,
13,
710,
29918,
5031,
353,
337,
29889,
12198,
29898,
29878,
29915,
5931,
28104,
29973,
2144,
29908,
1495,
13,
2158,
29898,
710,
29918,
5031,
29889,
2886,
497,
29898,
726,
29906,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
143,
171,
240,
135,
183,
31054,
31093,
29871,
239,
163,
147,
31354,
29871,
31789,
240,
153,
140,
31406,
31286,
29871,
31306,
239,
156,
187,
30877,
29871,
31962,
238,
150,
163,
29871,
31406,
31306,
31054,
29871,
238,
170,
167,
239,
188,
176,
30944,
238,
178,
131,
30906,
29892,
1577,
29871,
31517,
334,
29871,
31207,
718,
29871,
238,
149,
167,
31054,
29871,
238,
185,
156,
31457,
239,
167,
131,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29947,
29871,
31457,
238,
162,
175,
29871,
239,
167,
135,
31054,
29871,
237,
180,
187,
239,
188,
159,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
29871,
30791,
31737,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31457,
238,
162,
175,
29871,
239,
167,
135,
31054,
29871,
237,
180,
187,
239,
188,
159,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
29871,
238,
170,
167,
239,
188,
176,
31286,
29871,
30791,
31737,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
240,
143,
171,
240,
135,
183,
31054,
31093,
22308,
29901,
29889,
4295,
29876,
29897,
30918,
29871,
238,
136,
191,
239,
189,
164,
239,
181,
155,
29871,
31607,
238,
166,
188,
31286,
29871,
31976,
30889,
30877,
30709,
29889,
13,
9342,
353,
337,
29889,
12198,
29898,
29878,
29915,
7998,
16395,
5575,
29973,
2144,
3877,
1495,
13,
726,
29896,
353,
525,
5515,
445,
338,
263,
3440,
3776,
29915,
13,
726,
29906,
353,
14550,
5515,
445,
338,
263,
13,
795,
1773,
309,
457,
3440,
3776,
13,
12008,
13,
2158,
29898,
9342,
29889,
2886,
497,
29898,
726,
29896,
876,
13,
2158,
29898,
9342,
29889,
2886,
497,
29898,
726,
29906,
876,
13,
9342,
353,
337,
29889,
12198,
29898,
29878,
29915,
7998,
29930,
3552,
25825,
29889,
4295,
29876,
11877,
29973,
2144,
3877,
1495,
13,
2158,
29898,
9342,
29889,
2886,
497,
29898,
726,
29906,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
337,
29889,
12198,
580,
29871,
240,
152,
171,
30970,
31054,
337,
29889,
29928,
2891,
9818,
29871,
30393,
31197,
31081,
29871,
31533,
31737,
30877,
29871,
240,
151,
143,
238,
161,
155,
31607,
31517,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
9342,
353,
337,
29889,
12198,
29898,
29878,
29915,
7998,
16395,
5575,
29973,
2144,
3877,
742,
337,
29889,
29928,
2891,
9818,
29897,
13,
2158,
29898,
9342,
29889,
2886,
497,
29898,
726,
29906,
876,
13,
13,
13,
29937,
259,
29906,
29889,
29929,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
136,
187,
238,
172,
131,
31225,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
31962,
238,
150,
163,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
31000,
31153,
30877,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
237,
179,
153,
31136,
238,
164,
160,
29871,
31199,
31299,
31435,
30981,
31013,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
443,
293,
6797,
532,
29871,
31962,
238,
150,
139,
30906,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
238,
136,
187,
238,
172,
131,
31225,
31435,
31093,
29871,
240,
148,
159,
239,
167,
131,
29871,
240,
148,
159,
31680,
31895,
239,
159,
191,
30906,
29871,
31963,
237,
194,
151,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
29879,
29896,
353,
525,
5592,
4245,
435,
2883,
412,
29905,
29884,
29900,
29900,
29888,
29896,
29877,
29915,
13,
29879,
29906,
353,
525,
5592,
4245,
435,
284,
481,
264,
29905,
29884,
29900,
29941,
29900,
29941,
29877,
29915,
13,
2158,
29898,
29879,
29896,
29892,
269,
29906,
29897,
13,
2158,
29898,
29879,
29896,
1275,
269,
29906,
29892,
7431,
29898,
29879,
29896,
511,
7431,
29898,
29879,
29906,
876,
13,
13,
29937,
259,
448,
29871,
31724,
30708,
29871,
31378,
31327,
29871,
237,
179,
156,
31354,
29871,
31406,
31013,
30393,
30811,
31826,
29871,
240,
148,
159,
31680,
29871,
31945,
31895,
30393,
29871,
238,
142,
175,
31197,
29871,
30709,
238,
168,
187,
29871,
31406,
31013,
239,
154,
183,
30906,
29871,
30918,
31895,
30944,
239,
155,
131,
30709,
29889,
13,
29937,
418,
238,
151,
179,
31197,
31093,
29889,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
136,
187,
238,
172,
131,
31225,
31517,
29871,
240,
137,
184,
31435,
29871,
240,
148,
159,
239,
167,
131,
29871,
240,
148,
159,
31680,
31895,
239,
159,
191,
30906,
29871,
238,
182,
131,
31378,
31435,
30981,
31129,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
5215,
443,
293,
6797,
532,
13,
29873,
29896,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
29940,
8610,
742,
269,
29896,
29897,
13,
29873,
29906,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
29940,
8610,
742,
269,
29906,
29897,
13,
2158,
29898,
29873,
29896,
1275,
260,
29906,
29897,
13,
2158,
29898,
294,
18869,
29898,
29873,
29896,
876,
13,
13,
29873,
29941,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
269,
29896,
29897,
13,
29873,
29946,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
269,
29906,
29897,
13,
2158,
29898,
29873,
29941,
1275,
260,
29946,
29897,
13,
2158,
29898,
294,
18869,
29898,
29873,
29941,
876,
13,
13,
29937,
259,
448,
29871,
240,
143,
143,
30393,
239,
144,
175,
31354,
29871,
240,
141,
188,
30852,
29871,
31406,
31013,
31517,
29871,
30709,
238,
166,
179,
29871,
30970,
29871,
239,
161,
139,
31136,
238,
164,
160,
29871,
239,
185,
151,
30903,
239,
163,
132,
30918,
29871,
31603,
240,
156,
155,
31126,
31286,
29871,
31279,
31457,
30944,
31081,
405,
29943,
29968,
29907,
29871,
239,
156,
131,
405,
29943,
29968,
29928,
29871,
238,
136,
187,
238,
172,
131,
31225,
31136,
29871,
30811,
31198,
30877,
30709,
29889,
13,
29879,
353,
11297,
1137,
29890,
29900,
29896,
29915,
13,
2158,
29898,
29879,
29897,
13,
2158,
29898,
2523,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
269,
876,
13,
2158,
29898,
2523,
6797,
532,
29889,
8945,
675,
877,
22498,
29968,
29928,
742,
269,
876,
29871,
396,
29871,
31789,
238,
182,
135,
29871,
31406,
31013,
30906,
29871,
238,
185,
135,
30826,
13,
2158,
29898,
2523,
6797,
532,
29889,
8945,
675,
877,
22498,
29968,
29907,
742,
269,
876,
29871,
396,
29871,
31789,
238,
182,
135,
29871,
31406,
31013,
30906,
29871,
238,
185,
135,
30826,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
31153,
237,
183,
131,
239,
163,
132,
30393,
31137,
29871,
31734,
31170,
30877,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
240,
136,
144,
30784,
31177,
29871,
239,
161,
148,
239,
154,
136,
31286,
29871,
31724,
31435,
31093,
29871,
238,
136,
187,
238,
172,
131,
31225,
31081,
29871,
30860,
30981,
29871,
31941,
31527,
30944,
30709,
29889,
13,
29937,
632,
240,
141,
188,
240,
161,
139,
29871,
30918,
239,
192,
151,
238,
151,
172,
31286,
29871,
31408,
239,
163,
139,
240,
152,
163,
29871,
30970,
29871,
239,
154,
137,
31081,
29871,
31158,
240,
156,
172,
31054,
31093,
29871,
30791,
31737,
31013,
31054,
237,
181,
143,
29871,
31406,
31013,
239,
154,
183,
29871,
239,
161,
136,
238,
163,
168,
31286,
29871,
238,
179,
158,
31081,
29871,
31378,
31327,
31054,
31081,
29871,
240,
141,
188,
240,
161,
139,
29871,
31408,
239,
142,
175,
31435,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
29873,
29896,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
269,
29896,
29897,
13,
2158,
877,
4286,
7122,
29898,
29883,
363,
274,
297,
260,
29896,
565,
451,
443,
293,
6797,
532,
29889,
510,
2109,
292,
29898,
29883,
4961,
29871,
396,
29299,
580,
29871,
240,
152,
171,
30970,
31081,
29871,
31406,
31013,
30903,
29871,
237,
181,
179,
31980,
29871,
31406,
31013,
30918,
30811,
29871,
240,
156,
152,
30918,
30877,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29900,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31054,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
30791,
31737,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
151,
135,
30906,
31578,
239,
142,
180,
31054,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30791,
31737,
29871,
31941,
30393,
30709,
29889,
29871,
30944,
30811,
31826,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
31406,
31013,
29871,
239,
181,
155,
30826,
30903,
29871,
237,
180,
180,
30852,
238,
147,
159,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
30827,
238,
182,
187,
239,
163,
132,
30918,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
239,
181,
155,
30826,
31517,
29871,
31724,
30877,
29871,
30890,
31279,
238,
185,
135,
30708,
29871,
30827,
238,
141,
168,
31286,
337,
29871,
31962,
238,
150,
139,
30393,
29871,
31306,
31334,
30877,
30709,
29889,
13,
5215,
337,
13,
1949,
353,
337,
29889,
12198,
28909,
29881,
29974,
1495,
13,
2158,
29898,
1949,
29889,
4352,
877,
29896,
29906,
29941,
8785,
29871,
396,
29871,
30860,
30784,
240,
133,
167,
29871,
239,
139,
174,
31013,
13,
2158,
29898,
1949,
29889,
4352,
28909,
29884,
29900,
29953,
29953,
29896,
29905,
29884,
29900,
29953,
29953,
29906,
29905,
29884,
29900,
29953,
29953,
29941,
8785,
29871,
396,
29871,
30860,
31197,
31487,
30860,
29871,
239,
139,
174,
31013,
13,
13,
29937,
259,
448,
29871,
240,
141,
188,
30852,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
31406,
31013,
31517,
29871,
240,
143,
171,
240,
135,
183,
31054,
29871,
240,
146,
175,
240,
152,
171,
30944,
31137,
29871,
239,
142,
185,
239,
159,
191,
31747,
29892,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
31406,
31013,
31054,
29871,
30393,
30784,
239,
191,
131,
30393,
240,
151,
135,
29871,
30889,
240,
131,
131,
30784,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
25822,
293,
353,
337,
29889,
12198,
877,
7110,
29884,
29900,
29953,
29900,
29900,
2612,
29884,
29900,
29953,
600,
29905,
29884,
29900,
29955,
29945,
29900,
2612,
29884,
29900,
29955,
29955,
29888,
29905,
29884,
29900,
29947,
29874,
29900,
2612,
29884,
29900,
29947,
600,
10062,
1495,
13,
13,
29937,
259,
448,
29871,
30890,
31189,
31406,
31013,
31517,
29871,
31716,
30889,
30944,
31081,
29871,
238,
170,
167,
239,
188,
176,
31054,
29871,
30890,
31189,
31406,
31013,
29871,
238,
182,
131,
240,
156,
155,
31286,
29871,
31980,
239,
188,
159,
29871,
239,
192,
151,
31493,
31081,
29871,
30709,
31966,
31906,
29871,
237,
179,
156,
30709,
29889,
13,
5031,
353,
337,
29889,
12198,
877,
4151,
29905,
29884,
29900,
29900,
29881,
1725,
742,
337,
29889,
6259,
6632,
1525,
23487,
29897,
13,
29879,
353,
525,
13759,
29915,
13,
2158,
29898,
5031,
29889,
4352,
29898,
29879,
876,
13,
2158,
29898,
5031,
29889,
4352,
29898,
29879,
29889,
21064,
25739,
269,
29889,
21064,
3101,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
31533,
31063,
239,
192,
151,
31493,
239,
156,
131,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
237,
179,
156,
30393,
29871,
30791,
31737,
30944,
238,
163,
167,
31747,
29871,
31093,
31493,
240,
143,
143,
240,
142,
179,
6528,
29871,
31197,
30393,
238,
187,
143,
238,
162,
175,
30826,
31517,
29871,
239,
135,
167,
239,
188,
155,
30944,
31137,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
30890,
31189,
31406,
31013,
29871,
238,
182,
131,
240,
156,
155,
29871,
238,
150,
180,
31286,
29871,
30827,
238,
182,
187,
239,
159,
191,
30906,
13,
29937,
632,
31306,
31334,
30944,
31081,
29871,
238,
170,
145,
31354,
29871,
30827,
238,
141,
168,
31286,
29871,
30393,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
239,
165,
142,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29896,
29871,
31406,
31013,
239,
154,
183,
31054,
31093,
29871,
31406,
31013,
29871,
239,
161,
155,
31197,
31940,
30827,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
240,
136,
144,
30784,
31177,
30708,
29871,
239,
181,
155,
31966,
29892,
29871,
238,
132,
160,
29892,
29871,
31941,
237,
179,
135,
31054,
31093,
29871,
31198,
30944,
30811,
29871,
239,
152,
141,
31081,
29871,
31334,
31989,
31406,
29871,
238,
150,
180,
31286,
29871,
239,
161,
155,
31197,
31940,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
17820,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
239,
181,
155,
31966,
31906,
29871,
238,
132,
160,
31054,
31093,
29871,
31406,
31013,
31517,
29871,
239,
161,
155,
31197,
238,
133,
191,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
29937,
632,
30827,
238,
182,
187,
239,
163,
132,
239,
159,
191,
30906,
29871,
31334,
31989,
30393,
31207,
320,
29876,
29871,
31286,
29871,
239,
161,
155,
31197,
31940,
30811,
31826,
29871,
31198,
30944,
31081,
29871,
31406,
31013,
31517,
29871,
30811,
30852,
240,
152,
163,
29871,
30970,
31136,
29871,
239,
161,
139,
30709,
29889,
13,
29879,
353,
525,
268,
22172,
3186,
320,
29876,
29915,
13,
2158,
29898,
29879,
29889,
17010,
3101,
13,
2158,
29898,
29879,
29889,
29880,
17010,
3101,
13,
2158,
29898,
29879,
29889,
29878,
17010,
3101,
13,
29873,
353,
525,
23648,
12199,
2751,
2433,
13,
2158,
29898,
29873,
29889,
17010,
877,
29899,
8785,
13,
2158,
29898,
29873,
29889,
17010,
877,
2433,
876,
13,
2158,
29898,
29873,
29889,
17010,
877,
29899,
2433,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
238,
144,
179,
30393,
31856,
31517,
29871,
31199,
30827,
29871,
239,
165,
142,
237,
181,
143,
29871,
31826,
31804,
30827,
29871,
31724,
30877,
29871,
31737,
31136,
30906,
29871,
31457,
238,
162,
175,
17820,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
31153,
238,
179,
155,
239,
163,
132,
239,
159,
191,
30906,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29937,
632,
30944,
30811,
31826,
29871,
240,
136,
144,
30784,
31177,
30708,
29871,
31941,
237,
179,
135,
31054,
31093,
29871,
239,
161,
155,
31197,
31940,
30827,
31517,
29871,
240,
152,
163,
29871,
30970,
31081,
29871,
239,
154,
137,
30709,
29889,
13,
29879,
353,
525,
22172,
4706,
3186,
1678,
320,
29876,
29915,
13,
2158,
29898,
29879,
29889,
17010,
3101,
13,
13,
29937,
259,
448,
29871,
31941,
237,
179,
135,
30708,
29871,
31334,
31989,
31286,
29871,
239,
154,
137,
239,
152,
163,
30827,
29871,
31724,
31435,
31093,
31081,
5191,
580,
29871,
238,
172,
151,
31189,
31493,
31207,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
30708,
29871,
239,
188,
155,
240,
156,
155,
31906,
29871,
237,
179,
156,
31354,
29871,
30709,
238,
168,
187,
29871,
30827,
239,
139,
163,
31286,
29871,
30791,
31737,
31435,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
2158,
29898,
29879,
29889,
6506,
877,
13420,
6629,
876,
13,
5215,
337,
13,
2158,
29898,
276,
29889,
1491,
28909,
29879,
29974,
742,
525,
13420,
269,
467,
17010,
3101,
13,
13,
2541,
1722,
877,
5325,
1966,
5372,
1445,
29889,
3945,
1495,
408,
285,
29901,
29871,
396,
29871,
240,
143,
143,
31153,
29871,
31170,
239,
181,
183,
6633,
29871,
31435,
239,
152,
191,
29871,
31378,
30906,
29871,
30918,
31895,
29889,
13,
1678,
3454,
353,
313,
1220,
29889,
17010,
580,
363,
1196,
297,
285,
29897,
13,
1678,
363,
1196,
297,
3454,
29901,
13,
4706,
1596,
29898,
276,
29889,
1491,
28909,
29879,
29974,
742,
525,
13420,
1196,
467,
17010,
3101,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29906,
29871,
240,
136,
144,
30784,
31177,
29871,
30852,
30826,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
238,
142,
188,
31262,
30708,
29871,
239,
158,
188,
29871,
240,
145,
155,
30393,
30811,
31054,
29871,
31129,
238,
153,
167,
29871,
30791,
238,
161,
143,
30393,
29871,
31299,
238,
133,
159,
30784,
238,
162,
192,
237,
181,
143,
376,
4691,
29908,
29871,
30393,
31197,
31081,
29871,
240,
141,
188,
30970,
31406,
31013,
31517,
29871,
239,
161,
136,
238,
163,
168,
240,
153,
139,
30709,
29889,
29871,
30393,
31517,
29871,
30852,
30826,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
240,
141,
188,
30852,
29871,
238,
181,
151,
31724,
30708,
29871,
31406,
31013,
31207,
29871,
238,
179,
159,
31966,
29871,
31231,
238,
182,
135,
29871,
31231,
31603,
31517,
29871,
239,
154,
137,
239,
152,
163,
238,
163,
167,
31137,
29871,
240,
152,
163,
29871,
238,
152,
143,
31081,
851,
29889,
21652,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
31435,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
29879,
353,
525,
29886,
30052,
29873,
199,
168,
29997,
30046,
29905,
29888,
275,
29905,
941,
29893,
14151,
29905,
29878,
29905,
29876,
29915,
13,
2158,
29898,
29879,
29897,
13,
13,
29937,
259,
448,
29871,
31327,
31345,
29871,
31406,
31013,
239,
154,
183,
31054,
31093,
29871,
31334,
31989,
31406,
31286,
29871,
239,
161,
155,
31197,
31940,
30827,
29871,
31724,
31435,
29871,
239,
161,
148,
31354,
29871,
238,
182,
131,
240,
156,
155,
29871,
240,
136,
143,
30393,
238,
187,
151,
31286,
29871,
31826,
31804,
31129,
29871,
238,
137,
150,
31137,
14240,
580,
29871,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
1745,
481,
353,
426,
13,
1678,
4356,
28909,
29873,
29374,
525,
13420,
29871,
396,
4356,
580,
584,
29871,
30944,
31207,
30708,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
30890,
31435,
29871,
31533,
31063,
239,
192,
151,
31493,
31517,
29871,
31207,
31925,
31940,
31081,
29871,
30708,
31362,
30906,
29871,
238,
182,
131,
240,
156,
155,
29889,
13,
1678,
4356,
28909,
29888,
29374,
525,
13420,
13,
1678,
4356,
28909,
29878,
29374,
6213,
29871,
396,
29871,
239,
133,
176,
31306,
238,
147,
171,
13,
29913,
13,
29874,
353,
269,
29889,
21652,
29898,
1745,
481,
29897,
13,
2158,
29898,
29874,
29897,
13,
13,
29937,
259,
448,
29871,
237,
181,
179,
31980,
29871,
31406,
31013,
31517,
29871,
239,
154,
137,
239,
152,
163,
31081,
29871,
31945,
238,
181,
152,
29889,
13,
5215,
443,
293,
6797,
532,
13,
5215,
10876,
13,
4912,
29890,
29918,
305,
2288,
353,
9657,
29889,
3166,
8149,
29898,
29883,
363,
274,
297,
3464,
29898,
9675,
29889,
3317,
2523,
356,
29897,
565,
443,
293,
6797,
532,
29889,
510,
2109,
292,
29898,
22495,
29898,
29883,
4961,
29871,
396,
29299,
580,
584,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
31941,
31054,
29871,
31408,
31980,
238,
147,
159,
29871,
237,
181,
134,
31286,
29871,
239,
185,
151,
239,
185,
159,
29889,
13,
2158,
29898,
4912,
29890,
29918,
305,
2288,
29897,
13,
29890,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
263,
29897,
13,
2158,
29898,
29890,
29897,
13,
2158,
29898,
29890,
29889,
21652,
29898,
4912,
29890,
29918,
305,
2288,
876,
13,
13,
29937,
259,
448,
29871,
31533,
31063,
239,
192,
151,
31493,
29871,
239,
139,
174,
31013,
29871,
31406,
31013,
31517,
29871,
30393,
239,
156,
131,
29871,
237,
183,
131,
238,
163,
171,
29871,
239,
161,
139,
31081,
29871,
30860,
30784,
240,
133,
167,
29871,
239,
139,
174,
31013,
31054,
29871,
238,
170,
167,
240,
152,
148,
30944,
31136,
238,
164,
160,
29871,
238,
182,
131,
240,
156,
155,
29871,
240,
136,
143,
30393,
238,
187,
151,
31286,
29871,
239,
161,
148,
31126,
30877,
30709,
29889,
13,
7501,
10137,
353,
426,
13,
1678,
274,
29901,
4356,
877,
29900,
1495,
718,
443,
293,
6797,
532,
29889,
26204,
29898,
22495,
29898,
29883,
876,
363,
274,
297,
3464,
29898,
9675,
29889,
3317,
2523,
356,
29897,
565,
443,
293,
6797,
532,
29889,
7320,
29898,
22495,
29898,
29883,
876,
1275,
525,
29940,
29881,
29915,
13,
29913,
13,
2158,
29898,
2435,
29898,
7501,
10137,
511,
4697,
10137,
29897,
13,
29916,
353,
11297,
29884,
29900,
29953,
29953,
29896,
29905,
29884,
29900,
29953,
29953,
29906,
29905,
29884,
29900,
29953,
29953,
29941,
29915,
13,
2158,
29898,
29916,
29889,
21652,
29898,
7501,
10137,
876,
13,
13,
29937,
259,
448,
29871,
238,
155,
147,
29871,
30709,
238,
168,
187,
29871,
240,
136,
144,
30784,
31177,
29871,
30852,
30826,
29871,
30827,
239,
139,
163,
30906,
306,
29914,
29949,
29871,
30918,
239,
192,
151,
238,
151,
172,
29892,
29871,
238,
151,
151,
239,
192,
151,
238,
151,
172,
29871,
240,
152,
171,
30970,
30903,
29871,
239,
161,
139,
30709,
29889,
29871,
30393,
29871,
31945,
31895,
31354,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
31327,
31345,
29871,
30852,
30826,
31435,
29871,
238,
137,
150,
31137,
19750,
580,
29871,
31207,
21822,
580,
29871,
31517,
13,
29937,
418,
239,
142,
167,
240,
153,
140,
31435,
31093,
29871,
239,
161,
155,
31197,
31940,
237,
180,
179,
31207,
29871,
238,
182,
131,
31378,
30877,
30709,
29889,
13,
2158,
29898,
29874,
29897,
13,
29890,
353,
443,
293,
6797,
532,
29889,
8945,
675,
877,
22498,
29928,
742,
263,
29897,
13,
2158,
29898,
29890,
29889,
12508,
877,
294,
18869,
742,
525,
17281,
2824,
13808,
877,
294,
18869,
8785,
29871,
396,
408,
18869,
29871,
240,
155,
152,
240,
134,
159,
30906,
29871,
30918,
239,
192,
151,
238,
151,
172,
29871,
238,
179,
146,
29871,
238,
151,
151,
239,
192,
151,
238,
151,
172,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
136,
144,
30784,
31177,
29871,
30852,
30826,
31517,
29871,
30944,
30709,
29871,
31199,
31747,
29871,
239,
142,
167,
240,
153,
140,
29871,
31126,
238,
141,
168,
29871,
31406,
31306,
31054,
29871,
239,
170,
132,
31747,
30944,
30827,
31136,
29871,
30877,
30709,
29889,
13,
29937,
632,
237,
179,
135,
31746,
30877,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
31724,
31435,
31093,
31081,
851,
29889,
6506,
580,
29871,
240,
152,
171,
30970,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
238,
188,
163,
238,
168,
183,
31137,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
30944,
31081,
29871,
31378,
31327,
31054,
31081,
851,
29889,
21652,
580,
29871,
240,
152,
171,
30970,
31517,
13,
29937,
632,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
239,
165,
142,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29941,
29871,
240,
136,
144,
30784,
31177,
29871,
30852,
238,
163,
175,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
240,
141,
188,
30852,
29871,
240,
155,
152,
31895,
31054,
29871,
238,
170,
161,
239,
185,
151,
31129,
29871,
30852,
238,
163,
175,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
301,
5143,
3285,
364,
5143,
3285,
4818,
580,
29871,
238,
150,
180,
30393,
29871,
239,
161,
139,
30709,
29889,
13,
726,
353,
525,
10994,
2787,
29915,
13,
2158,
29898,
726,
29889,
29880,
5143,
29898,
29906,
29900,
876,
13,
2158,
29898,
726,
29889,
29878,
5143,
29898,
29906,
29900,
876,
13,
2158,
29898,
726,
29889,
5064,
29898,
29906,
29900,
876,
13,
13,
29937,
259,
448,
29871,
31578,
29871,
31789,
30708,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
238,
182,
135,
31136,
30708,
29871,
239,
180,
135,
239,
158,
143,
29871,
238,
135,
166,
30827,
29871,
31406,
31013,
31517,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
2158,
29898,
726,
29889,
29878,
5143,
29898,
29906,
29900,
29892,
525,
2433,
876,
13,
2158,
29898,
726,
29889,
5064,
29898,
29906,
29900,
29892,
525,
29930,
8785,
13,
13,
29937,
259,
448,
3402,
580,
29871,
240,
152,
171,
30970,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
30918,
31013,
30906,
529,
29892,
1405,
29892,
6228,
29871,
31517,
29871,
239,
163,
132,
239,
163,
139,
30944,
237,
181,
143,
29871,
30791,
31737,
31435,
29871,
30981,
31747,
29871,
238,
147,
159,
30709,
29889,
13,
2158,
29898,
4830,
29898,
726,
29892,
525,
29958,
29906,
29900,
8785,
29871,
396,
364,
5143,
29871,
239,
156,
131,
29871,
31000,
31153,
13,
2158,
29898,
4830,
29898,
726,
29892,
12801,
29906,
29900,
8785,
29871,
396,
301,
5143,
29871,
239,
156,
131,
29871,
31000,
31153,
13,
2158,
29898,
4830,
29898,
726,
29892,
525,
29985,
29906,
29900,
8785,
29871,
396,
4818,
29871,
239,
156,
131,
29871,
31000,
31153,
13,
13,
29937,
259,
448,
29871,
31334,
31989,
29871,
30890,
31262,
29871,
240,
141,
188,
30852,
29871,
31406,
31013,
31517,
29871,
239,
180,
135,
239,
158,
143,
29871,
238,
135,
166,
31137,
29871,
239,
142,
185,
30709,
31747,
29871,
30852,
238,
163,
175,
29871,
31406,
31013,
29871,
239,
152,
161,
31054,
29871,
31607,
29871,
31406,
31013,
31517,
29871,
30811,
30852,
30877,
30709,
29889,
13,
2158,
29898,
4830,
29898,
726,
29892,
525,
4261,
29906,
29900,
8785,
13,
2158,
29898,
4830,
29898,
726,
29892,
525,
29930,
29985,
29906,
29900,
8785,
13,
13,
29937,
259,
448,
29871,
240,
146,
175,
238,
170,
186,
29871,
239,
192,
151,
31493,
31081,
3402,
580,
29871,
238,
172,
151,
31189,
31493,
31054,
29871,
30791,
31737,
31435,
29871,
31457,
238,
162,
175,
29871,
237,
179,
149,
31286,
29871,
31093,
31895,
31225,
240,
152,
163,
29871,
30970,
31136,
29871,
239,
161,
139,
30709,
29889,
13,
2158,
877,
25641,
29958,
29896,
29900,
29913,
12365,
29958,
29896,
29900,
29913,
4286,
4830,
877,
10994,
742,
525,
14058,
8785,
13,
13,
29937,
259,
448,
3402,
580,
29871,
31286,
29871,
30791,
31737,
30944,
31747,
29871,
31406,
31013,
239,
154,
183,
238,
194,
147,
31826,
29871,
30860,
31063,
31197,
29871,
239,
139,
174,
31013,
29871,
237,
179,
149,
29871,
238,
150,
180,
29871,
31962,
238,
150,
163,
29871,
237,
179,
149,
31054,
29871,
31000,
239,
161,
148,
30877,
30709,
29889,
13,
29916,
353,
29871,
29896,
29889,
29906,
29941,
29946,
29945,
13,
2158,
29898,
4830,
29898,
29916,
29892,
525,
29958,
29896,
29900,
8785,
29871,
396,
851,
29871,
31925,
239,
161,
136,
239,
159,
191,
30906,
29871,
238,
182,
131,
240,
156,
155,
13,
2158,
29898,
4830,
29898,
29916,
29892,
525,
29985,
29896,
29900,
29889,
29906,
29888,
8785,
29871,
396,
29871,
31189,
30970,
239,
163,
147,
29871,
31013,
30826,
30970,
29871,
30811,
30852,
29871,
30903,
238,
141,
168,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
31346,
238,
161,
155,
238,
147,
159,
29871,
239,
192,
151,
31493,
31517,
29871,
31199,
31747,
1273,
29871,
31285,
31458,
31013,
31517,
29871,
30791,
31737,
31435,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
31093,
31895,
31225,
30944,
30827,
31136,
29871,
240,
153,
139,
30709,
29889,
13,
2158,
877,
29995,
29899,
29906,
29900,
29879,
525,
1273,
1426,
29897,
13,
2158,
877,
29995,
29906,
29900,
29879,
525,
1273,
1426,
29897,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29946,
29871,
31406,
31013,
239,
154,
183,
29871,
31980,
239,
188,
155,
30827,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
239,
161,
148,
31354,
29871,
31406,
31013,
239,
154,
183,
29871,
31457,
238,
162,
175,
29871,
31789,
31517,
29871,
31980,
239,
182,
147,
29871,
30944,
31207,
30708,
29871,
237,
187,
183,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
31826,
31804,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
31980,
239,
188,
155,
31137,
31013,
29871,
30944,
31081,
29871,
31406,
31013,
239,
154,
183,
30393,
29871,
30889,
240,
131,
131,
30784,
31207,
29871,
239,
139,
159,
240,
156,
155,
29871,
237,
179,
160,
239,
181,
183,
29871,
31734,
31054,
29871,
239,
161,
139,
30709,
31747,
5988,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
30903,
31299,
29871,
238,
188,
163,
238,
168,
183,
30709,
29889,
13,
20895,
353,
6024,
3624,
742,
525,
1451,
9384,
742,
525,
3664,
742,
525,
1451,
9384,
29973,
2033,
13,
2158,
877,
15300,
7122,
29898,
20895,
876,
13,
2158,
29898,
3788,
29889,
7122,
29898,
20895,
876,
13,
2158,
877,
4286,
7122,
29898,
20895,
876,
13,
13,
29937,
259,
448,
29871,
31980,
239,
188,
155,
238,
163,
167,
31137,
29871,
30944,
31081,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
30970,
30903,
29871,
30860,
30981,
29871,
239,
163,
132,
30709,
31747,
718,
29871,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
238,
147,
159,
30709,
29889,
13,
29874,
353,
525,
3624,
10059,
29915,
13,
29890,
353,
525,
3664,
10059,
17901,
13,
2158,
29898,
29874,
718,
525,
525,
718,
289,
29897,
13,
13,
29937,
259,
448,
718,
29871,
31285,
31458,
31013,
31081,
29871,
31408,
237,
187,
139,
29871,
238,
144,
151,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
31406,
31013,
239,
154,
183,
29871,
31093,
31895,
29871,
31285,
31458,
31054,
29871,
30791,
31737,
31435,
31136,
29871,
239,
161,
155,
29871,
31000,
239,
161,
148,
30877,
30709,
29889,
13,
2158,
877,
8875,
6571,
4286,
4830,
29898,
29874,
29892,
289,
876,
13,
2158,
29898,
29874,
718,
525,
525,
718,
289,
29897,
13,
13,
29874,
353,
525,
10994,
29915,
525,
14058,
29915,
13,
2158,
29898,
29874,
29897,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
31976,
239,
142,
175,
31435,
239,
152,
191,
29871,
240,
152,
163,
29871,
31279,
238,
185,
135,
31354,
29892,
718,
29871,
31285,
31458,
31013,
30906,
29871,
238,
170,
145,
31354,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
31980,
239,
188,
155,
238,
163,
167,
31137,
29871,
30944,
31747,
29871,
238,
172,
151,
31962,
30826,
29871,
238,
182,
184,
30791,
239,
156,
131,
29871,
30903,
31487,
30811,
29871,
239,
190,
175,
238,
163,
140,
239,
136,
155,
239,
159,
191,
30906,
29871,
30918,
31435,
29871,
238,
170,
167,
31327,
29871,
31487,
240,
157,
171,
239,
159,
171,
239,
163,
132,
30393,
31197,
31081,
29871,
239,
163,
147,
30393,
30709,
29889,
13,
29879,
353,
6629,
13,
1454,
282,
297,
5633,
29901,
13,
1678,
269,
4619,
282,
13,
13,
29937,
259,
448,
29871,
239,
134,
160,
31126,
31013,
29871,
240,
148,
159,
31680,
31895,
239,
159,
191,
30906,
29871,
31980,
239,
188,
155,
31081,
29871,
31945,
238,
181,
152,
30393,
29871,
239,
161,
139,
30709,
29889,
13,
1272,
353,
6024,
2477,
2303,
742,
29871,
29945,
29900,
29892,
29871,
29929,
29896,
29889,
29896,
29962,
13,
2158,
877,
15300,
7122,
29898,
710,
29898,
29894,
29897,
363,
325,
297,
848,
876,
13,
13,
29937,
259,
448,
29871,
238,
185,
139,
240,
152,
135,
31527,
30877,
29871,
31406,
31013,
239,
154,
183,
29871,
31980,
239,
188,
155,
30827,
31517,
29871,
30944,
31137,
29871,
239,
161,
139,
30811,
29871,
239,
152,
141,
31354,
30811,
31136,
29871,
30981,
30708,
30944,
31013,
29889,
13,
29874,
353,
525,
29939,
556,
29915,
13,
29890,
353,
525,
294,
2176,
29915,
13,
29883,
353,
525,
29920,
29916,
11023,
29915,
13,
2158,
29898,
29874,
718,
525,
11283,
718,
289,
718,
525,
11283,
718,
274,
29897,
29871,
396,
29871,
239,
165,
142,
30811,
29871,
239,
152,
141,
31354,
29871,
31945,
31895,
13,
2158,
877,
29901,
4286,
7122,
4197,
29874,
29892,
289,
29892,
274,
12622,
29871,
396,
29871,
31789,
31345,
238,
147,
159,
29871,
31945,
31895,
13,
2158,
29898,
29874,
29892,
289,
29892,
274,
29892,
16345,
29922,
2396,
1495,
29871,
396,
29871,
239,
165,
142,
31354,
29871,
31945,
31895,
13,
13,
29937,
259,
448,
29871,
30970,
238,
170,
145,
31354,
29871,
239,
170,
170,
31354,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
30944,
31207,
30906,
29871,
31980,
239,
182,
147,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
31826,
31493,
31081,
29871,
239,
192,
151,
31493,
31517,
29871,
239,
161,
148,
31126,
30877,
30709,
31747,
29892,
8007,
789,
29871,
31517,
29871,
30791,
31737,
30877,
29871,
239,
134,
160,
31126,
31013,
29871,
240,
152,
171,
30970,
31517,
29871,
31137,
238,
163,
167,
30944,
31013,
29889,
13,
1753,
4559,
7295,
13,
1678,
7709,
525,
3624,
29915,
13,
1678,
7709,
525,
1451,
9384,
29915,
13,
1678,
7709,
525,
3664,
29915,
13,
1678,
7709,
525,
1451,
9384,
17901,
13,
13,
726,
353,
525,
4286,
7122,
29898,
11249,
3101,
13,
2158,
29898,
726,
29897,
13,
13,
29937,
259,
448,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
239,
161,
136,
239,
185,
159,
238,
163,
168,
29898,
29902,
29914,
29949,
29897,
239,
159,
191,
30906,
29871,
30826,
30709,
30393,
238,
163,
140,
31177,
29871,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
1454,
760,
297,
4559,
7295,
13,
1678,
285,
29889,
3539,
29898,
1595,
29897,
13,
13,
29937,
259,
448,
29871,
239,
161,
136,
239,
185,
159,
238,
163,
168,
31286,
29871,
31408,
31980,
30877,
29871,
30944,
30393,
238,
187,
143,
30826,
31493,
29871,
31945,
31895,
29871,
31231,
31680,
31136,
29871,
30903,
238,
141,
168,
30944,
30709,
29889,
13,
29888,
353,
1722,
877,
29928,
22298,
29968,
29979,
29950,
1966,
29900,
29906,
29889,
20055,
4690,
1164,
1966,
1272,
1966,
17743,
457,
29889,
3945,
742,
525,
29874,
1495,
13,
13,
1753,
14405,
29898,
4993,
29892,
4236,
2311,
1125,
13,
1678,
5633,
353,
5159,
13,
1678,
2159,
353,
29871,
29900,
13,
1678,
363,
760,
297,
2752,
29901,
13,
4706,
5633,
29889,
4397,
29898,
1595,
29897,
13,
4706,
2159,
4619,
7431,
29898,
1595,
29897,
13,
4706,
565,
2159,
6736,
4236,
2311,
29901,
13,
9651,
7709,
525,
4286,
7122,
29898,
20895,
29897,
13,
9651,
5633,
353,
5159,
13,
9651,
2159,
353,
29871,
29900,
13,
1678,
7709,
525,
4286,
7122,
29898,
20895,
29897,
13,
13,
1454,
760,
297,
14405,
29898,
11249,
3285,
29871,
29941,
29906,
29955,
29953,
29947,
1125,
13,
1678,
285,
29889,
3539,
29898,
1595,
29897,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29945,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
238,
182,
131,
30970,
29871,
30791,
31737,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
238,
182,
131,
30970,
31517,
29871,
30791,
31737,
30944,
31137,
29871,
30393,
29871,
238,
182,
131,
30970,
31054,
29871,
238,
170,
161,
31081,
29871,
237,
179,
149,
31286,
29871,
239,
180,
135,
31327,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
240,
143,
143,
30393,
239,
144,
175,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
238,
182,
131,
30970,
29871,
237,
179,
149,
31286,
29871,
239,
188,
155,
240,
156,
155,
30944,
31081,
29871,
237,
179,
135,
31746,
30877,
29871,
31945,
238,
181,
152,
31354,
29871,
239,
164,
183,
31973,
30944,
30811,
29871,
239,
152,
141,
31081,
30709,
29889,
13,
29937,
632,
30944,
30811,
31826,
3402,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
31487,
239,
141,
186,
30944,
237,
181,
143,
29871,
240,
160,
140,
31940,
29871,
238,
133,
191,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
29879,
353,
22372,
978,
29913,
6608,
426,
29876,
29913,
7191,
6169,
13,
2158,
29898,
29879,
29889,
4830,
29898,
978,
2433,
9485,
1941,
742,
302,
29922,
29941,
29955,
876,
13,
13,
29937,
259,
448,
29871,
239,
188,
155,
240,
156,
155,
240,
152,
163,
29871,
237,
179,
149,
30393,
29871,
238,
182,
131,
30970,
31054,
29871,
31804,
31129,
29871,
239,
161,
139,
30709,
31747,
3402,
29918,
1958,
580,
29871,
31906,
24987,
580,
29871,
31517,
29871,
240,
152,
171,
237,
190,
155,
29871,
30791,
31737,
30944,
31747,
29871,
238,
147,
159,
30709,
29889,
13,
978,
353,
525,
9485,
1941,
29915,
13,
29876,
353,
29871,
29941,
29955,
13,
2158,
29898,
29879,
29889,
4830,
29918,
1958,
29898,
16908,
22130,
13,
13,
29937,
259,
448,
24987,
580,
29871,
31054,
31081,
29871,
30918,
30784,
240,
135,
183,
30784,
31517,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
31136,
29871,
239,
161,
139,
30709,
29889,
13,
1990,
22140,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
302,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
29876,
353,
302,
13,
13,
29874,
353,
22140,
877,
9485,
1941,
742,
29871,
29941,
29955,
29897,
13,
2158,
29898,
29879,
29889,
4830,
29918,
1958,
29898,
16908,
29898,
29874,
4961,
13,
13,
29937,
259,
448,
3402,
580,
29871,
238,
155,
147,
31081,
3402,
29918,
1958,
580,
29871,
30791,
31737,
30889,
29871,
238,
188,
163,
31536,
29871,
237,
179,
149,
31354,
4770,
27259,
1649,
580,
29871,
238,
172,
151,
31189,
31493,
30903,
29871,
239,
161,
139,
31081,
29871,
238,
151,
152,
239,
136,
151,
238,
135,
139,
30826,
29871,
240,
132,
183,
238,
161,
155,
30784,
31517,
29871,
30852,
30708,
31435,
31093,
29871,
240,
151,
191,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
1990,
9437,
267,
431,
29898,
8977,
1125,
13,
1678,
822,
4770,
27259,
12035,
1311,
29892,
1820,
1125,
13,
4706,
736,
525,
10998,
718,
1820,
718,
525,
10162,
13,
13,
6144,
302,
13,
2158,
29898,
29879,
29889,
4830,
29918,
1958,
29898,
29879,
2142,
267,
431,
29898,
16908,
580,
4961,
13,
13,
29937,
259,
448,
29871,
239,
192,
151,
31493,
31054,
31093,
29871,
238,
182,
131,
30970,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
238,
188,
139,
238,
181,
139,
240,
161,
139,
29871,
30791,
31737,
240,
152,
163,
29871,
237,
181,
134,
29871,
237,
179,
156,
30709,
31747,
29871,
239,
188,
155,
240,
156,
155,
30944,
31081,
29871,
239,
161,
148,
239,
154,
136,
31286,
29871,
31533,
240,
142,
187,
30826,
240,
142,
179,
29871,
240,
152,
171,
30970,
31054,
29871,
31962,
30860,
29871,
238,
137,
150,
31137,
29871,
31189,
31724,
376,
240,
151,
135,
238,
163,
139,
239,
161,
135,
29871,
240,
152,
184,
29898,
2557,
15833,
5513,
239,
159,
191,
30906,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
5215,
10876,
13,
13,
1753,
1014,
29898,
726,
1125,
13,
1678,
736,
1426,
29889,
4830,
29918,
1958,
29898,
29879,
2142,
267,
431,
29898,
9675,
3032,
657,
2557,
29898,
29896,
467,
29888,
29918,
2997,
29879,
876,
13,
13,
978,
353,
525,
9485,
1941,
29915,
13,
29876,
353,
29871,
29941,
29955,
13,
2158,
29898,
1491,
877,
10994,
426,
978,
29913,
8785,
13,
2158,
29898,
1491,
877,
3492,
505,
426,
29876,
29913,
7191,
6169,
876,
13,
2158,
29898,
1491,
877,
10858,
25448,
2927,
338,
426,
2780,
29913,
8785,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
143,
143,
30393,
239,
144,
175,
29871,
31013,
239,
181,
183,
31054,
31093,
29871,
238,
182,
131,
30970,
29871,
31199,
237,
179,
135,
238,
181,
152,
30393,
29871,
239,
164,
183,
31973,
30944,
30811,
29871,
239,
152,
141,
30860,
31093,
29871,
30709,
239,
153,
148,
30877,
29871,
30890,
31734,
30393,
29871,
239,
134,
160,
237,
181,
191,
30709,
29889,
13,
978,
353,
525,
9485,
1941,
29915,
13,
29876,
353,
29871,
29941,
29955,
13,
2158,
877,
29995,
29898,
978,
29897,
756,
1273,
29898,
29876,
29897,
7191,
6169,
1273,
24987,
3101,
13,
13,
5215,
1347,
13,
29879,
353,
1347,
29889,
6733,
877,
29938,
978,
756,
395,
29876,
7191,
29889,
1495,
13,
2158,
29898,
29879,
29889,
22492,
12356,
29898,
16908,
22130,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29953,
29871,
240,
136,
144,
30784,
31177,
29871,
239,
154,
183,
30708,
29871,
31789,
30970,
29871,
31137,
30852,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
237,
187,
183,
29871,
31406,
31013,
239,
154,
183,
30708,
29871,
31093,
31895,
31286,
29871,
31963,
237,
194,
151,
29871,
239,
154,
183,
30708,
29871,
31789,
30970,
31517,
29871,
31408,
239,
163,
139,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
1426,
6312,
29871,
31962,
238,
150,
139,
31286,
29871,
30791,
31737,
31435,
31093,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
31973,
31093,
31895,
31225,
29871,
30877,
30709,
29889,
13,
29879,
353,
525,
14959,
964,
590,
5076,
29892,
1106,
964,
590,
5076,
29892,
278,
5076,
29892,
278,
5076,
5501,
320,
13,
1678,
376,
1552,
5076,
29892,
451,
2820,
278,
5076,
29892,
1016,
29915,
29873,
1106,
2820,
278,
5076,
1699,
320,
13,
1678,
376,
6914,
964,
590,
5076,
29892,
366,
29915,
276,
1090,
1213,
13,
5215,
1426,
6312,
13,
2158,
29898,
726,
6312,
29889,
5589,
29898,
29879,
29892,
29871,
29955,
29900,
876,
13,
2158,
29898,
726,
6312,
29889,
5589,
29898,
29879,
29892,
29871,
29946,
29900,
876,
13,
2158,
29898,
726,
6312,
29889,
5589,
29898,
29879,
29892,
29871,
29946,
29900,
29892,
2847,
29918,
12860,
2433,
539,
525,
876,
13,
2158,
29898,
726,
6312,
29889,
5589,
29898,
29879,
29892,
29871,
29946,
29900,
29892,
15352,
29918,
12860,
2433,
539,
525,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
239,
185,
159,
238,
163,
168,
30944,
30827,
29871,
31170,
31054,
1426,
6312,
29871,
31962,
238,
150,
139,
31286,
29871,
30791,
31737,
30944,
31747,
29871,
237,
188,
151,
238,
132,
151,
30944,
237,
181,
143,
29871,
31093,
31895,
31286,
29871,
238,
170,
161,
239,
185,
159,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
29937,
9651,
240,
141,
188,
240,
161,
139,
29871,
31856,
31362,
238,
135,
147,
31054,
29871,
30791,
31737,
240,
152,
163,
29871,
240,
136,
144,
30784,
31177,
31054,
29871,
239,
163,
132,
31980,
30944,
30709,
29889,
13,
29937,
9651,
31856,
31362,
238,
135,
147,
30708,
29871,
240,
132,
175,
30827,
31517,
29871,
239,
153,
190,
239,
159,
191,
238,
163,
167,
31747,
2897,
29889,
657,
29918,
8489,
979,
29918,
2311,
580,
29871,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
5215,
2897,
13,
2158,
29898,
359,
29889,
657,
29918,
8489,
979,
29918,
2311,
2141,
13099,
29897,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29955,
4544,
29871,
31906,
6560,
29871,
239,
154,
151,
240,
142,
179,
240,
142,
179,
29871,
239,
181,
155,
30826,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
669,
10041,
29936,
29871,
31207,
669,
29937,
401,
29936,
29871,
239,
156,
131,
29871,
237,
179,
156,
31354,
4544,
29892,
6560,
29871,
239,
154,
151,
31856,
240,
142,
179,
31517,
29871,
30393,
31054,
29871,
31153,
239,
188,
155,
30944,
31081,
29871,
31406,
31013,
30906,
29871,
239,
188,
155,
240,
156,
155,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
9651,
240,
155,
188,
31354,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
239,
134,
160,
31126,
240,
152,
163,
29871,
238,
152,
143,
29871,
240,
141,
188,
30852,
29871,
31406,
31013,
29898,
29966,
29892,
1405,
29892,
669,
29871,
238,
150,
180,
29897,
31517,
29871,
240,
151,
191,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
239,
134,
160,
31126,
240,
152,
163,
29871,
238,
152,
143,
529,
31207,
29958,
239,
156,
131,
29871,
237,
179,
156,
31354,
29871,
240,
141,
188,
30970,
29871,
31406,
31013,
31517,
29871,
239,
188,
155,
240,
156,
155,
30944,
31081,
29871,
237,
181,
134,
31354,
3472,
29889,
21587,
580,
29871,
240,
152,
171,
30970,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
31158,
30890,
239,
163,
132,
239,
159,
191,
30906,
29871,
237,
179,
135,
31746,
240,
161,
139,
29871,
239,
181,
155,
30826,
240,
152,
163,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
29879,
353,
525,
18868,
526,
3971,
408,
9872,
4039,
29958,
726,
829,
4039,
29958,
1642,
29915,
13,
5215,
3472,
13,
2158,
29898,
29879,
29897,
13,
2158,
29898,
1420,
29889,
21587,
29898,
29879,
876,
13,
13,
29937,
259,
448,
29871,
238,
151,
179,
239,
155,
183,
240,
148,
159,
31081,
29871,
31754,
237,
181,
171,
29871,
238,
148,
147,
31136,
238,
164,
160,
29871,
30811,
30852,
13,
2158,
29898,
1420,
29889,
21587,
29898,
29879,
29892,
14978,
29922,
8824,
876,
13,
13,
29937,
259,
448,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
30860,
30784,
240,
133,
167,
30906,
29871,
31826,
31804,
31137,
29871,
239,
189,
147,
238,
169,
176,
31856,
29871,
239,
192,
151,
31493,
31517,
29871,
30860,
30784,
240,
133,
167,
30903,
29871,
30860,
238,
142,
143,
29871,
31406,
31013,
31054,
29871,
238,
132,
191,
239,
158,
143,
29871,
238,
135,
166,
31137,
29871,
239,
142,
185,
239,
159,
191,
31747,
4436,
2433,
3134,
3090,
999,
6506,
29915,
29871,
30918,
31013,
31517,
29871,
239,
161,
136,
239,
185,
159,
238,
163,
168,
29871,
237,
183,
131,
238,
163,
171,
29871,
240,
152,
171,
30970,
31054,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29879,
353,
525,
5592,
4245,
435,
2883,
412,
8266,
29915,
13,
2158,
29898,
29879,
29889,
12508,
877,
294,
18869,
742,
4436,
2433,
3134,
3090,
999,
6506,
8785,
13,
13,
29937,
259,
448,
29871,
30970,
31000,
239,
159,
191,
30906,
29871,
239,
188,
155,
240,
156,
155,
31286,
29871,
31435,
239,
152,
191,
29871,
30877,
30709,
31747,
4544,
29892,
6560,
29871,
240,
143,
143,
31093,
31054,
29871,
31940,
31299,
238,
147,
155,
31129,
29871,
239,
161,
139,
31081,
29871,
31457,
238,
162,
175,
29871,
31533,
240,
142,
187,
30826,
240,
142,
179,
29871,
240,
152,
171,
30970,
31207,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
29879,
353,
525,
5592,
4245,
669,
23083,
29936,
29967,
2883,
412,
9137,
29906,
29946,
29896,
29936,
29877,
29987,
23083,
6169,
13,
3166,
3472,
29889,
16680,
1053,
4544,
11726,
13,
29886,
353,
4544,
11726,
580,
13,
2158,
29898,
29886,
29889,
7844,
5738,
29898,
29879,
876,
29871,
396,
29871,
240,
143,
143,
30393,
239,
144,
175,
29871,
29941,
29889,
29945,
29871,
238,
181,
135,
31170,
31279,
31856,
18164,
29871,
238,
147,
171,
29889,
13,
2158,
29898,
1420,
29889,
7844,
5738,
29898,
29879,
876,
13,
13,
29873,
353,
525,
1576,
9508,
338,
669,
4141,
25359,
4141,
25359,
4141,
29936,
29915,
13,
3166,
4903,
29889,
29879,
1165,
29889,
29879,
1165,
13239,
1053,
443,
21587,
13,
2158,
29898,
7844,
5738,
29898,
29873,
876,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
4544,
29892,
6560,
29871,
31286,
29871,
239,
134,
160,
31126,
240,
152,
163,
29871,
238,
152,
143,
29871,
240,
141,
188,
30970,
29871,
31406,
31013,
31517,
29871,
31306,
30890,
30906,
29871,
30393,
30784,
239,
191,
131,
30393,
240,
152,
148,
30944,
31081,
29871,
31906,
30852,
31286,
29871,
237,
179,
135,
31906,
30944,
30827,
29871,
239,
140,
192,
30709,
29889,
13,
29937,
9651,
1596,
580,
29871,
30906,
29871,
237,
181,
179,
31906,
238,
175,
191,
31286,
29871,
239,
134,
160,
31126,
30944,
237,
180,
179,
31207,
29871,
30827,
238,
182,
187,
239,
163,
132,
30918,
29871,
31406,
31013,
239,
154,
183,
29871,
31093,
31895,
29871,
30827,
238,
141,
168,
31286,
29871,
30791,
31737,
240,
152,
163,
29871,
238,
152,
143,
29871,
240,
141,
188,
240,
161,
139,
29871,
238,
144,
151,
29871,
31607,
238,
163,
138,
30709,
29889,
13,
29937,
632,
30903,
31299,
29871,
239,
140,
175,
239,
157,
183,
29871,
31435,
237,
181,
179,
239,
180,
136,
31354,
3472,
29889,
21587,
580,
29871,
239,
156,
131,
29871,
237,
179,
156,
31354,
29871,
31533,
240,
142,
187,
30826,
240,
142,
179,
29871,
240,
152,
171,
30970,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
30709,
29889,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29947,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
137,
163,
240,
132,
179,
31225,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
240,
143,
143,
239,
142,
180,
31435,
31093,
29871,
240,
137,
163,
240,
132,
179,
31225,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31906,
885,
7310,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
13,
29937,
259,
448,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30791,
31737,
14030,
30393,
238,
169,
135,
29871,
239,
161,
139,
31081,
29871,
239,
189,
164,
239,
181,
155,
29871,
31607,
238,
166,
188,
29897,
13,
726,
353,
525,
5431,
353,
29871,
29906,
29941,
718,
29871,
29946,
29906,
334,
29871,
29896,
29900,
29915,
13,
13,
5215,
337,
13,
5813,
353,
364,
29915,
10780,
29925,
29966,
5813,
24566,
29874,
29899,
25265,
29899,
29999,
29918,
3816,
29874,
29899,
25265,
29899,
29999,
29918,
29900,
29899,
29929,
29962,
7528,
29915,
13,
13967,
353,
364,
29915,
10780,
29925,
29966,
13967,
14247,
29881,
29974,
16029,
13,
7390,
3308,
353,
364,
29915,
10780,
29925,
29966,
7390,
3308,
14247,
29974,
16029,
13,
15307,
29903,
353,
364,
29915,
10780,
29925,
29966,
15307,
29903,
14247,
7528,
29915,
13,
28879,
353,
364,
29915,
10780,
29925,
29966,
28879,
18572,
16029,
13,
7811,
353,
364,
29915,
10780,
29925,
29966,
7811,
14247,
29879,
29974,
16029,
13,
13,
6207,
29918,
5031,
353,
337,
29889,
12198,
877,
29989,
4286,
7122,
4197,
5813,
29892,
28019,
29892,
16507,
3308,
29892,
323,
8890,
29903,
29892,
382,
29984,
29892,
399,
29903,
12622,
13,
13,
29937,
259,
448,
885,
7310,
580,
29871,
238,
172,
151,
31189,
31493,
31517,
29871,
30791,
31737,
29889,
13,
1557,
7310,
353,
5835,
29918,
5031,
29889,
1557,
7310,
877,
5431,
353,
29871,
29946,
29906,
1495,
13,
1557,
7310,
29889,
4352,
580,
13,
2158,
29898,
5396,
4230,
2972,
29892,
903,
29889,
2972,
3101,
29871,
396,
903,
29871,
31081,
29871,
240,
143,
143,
30393,
239,
144,
175,
29871,
29906,
29889,
29916,
29871,
238,
181,
135,
31170,
31054,
31093,
29871,
30791,
31737,
29871,
30903,
238,
141,
168,
240,
152,
171,
29889,
13,
1557,
7310,
29889,
4352,
580,
13,
2158,
29898,
5396,
4230,
2972,
29892,
903,
29889,
2972,
3101,
13,
1557,
7310,
29889,
4352,
580,
13,
2158,
29898,
5396,
4230,
2972,
29892,
903,
29889,
2972,
3101,
13,
1557,
7310,
29889,
4352,
580,
13,
2158,
29898,
5396,
4230,
2972,
29892,
903,
29889,
2972,
3101,
13,
1557,
7310,
29889,
4352,
580,
13,
2158,
29898,
5396,
4230,
2972,
29892,
903,
29889,
2972,
3101,
13,
13,
29937,
259,
448,
29871,
30393,
29871,
30827,
239,
139,
163,
31286,
29871,
30791,
31737,
31435,
29871,
237,
179,
135,
237,
181,
179,
30877,
29871,
239,
134,
160,
31126,
31013,
31517,
29871,
31826,
31804,
29871,
30970,
29871,
239,
161,
139,
30709,
29889,
13,
3166,
16250,
1053,
4257,
23583,
13,
6066,
353,
4257,
23583,
877,
6066,
742,
6024,
1853,
742,
525,
1767,
11287,
13,
13,
1753,
5706,
29918,
517,
12360,
29898,
5031,
29892,
1426,
1125,
13,
1678,
885,
7310,
353,
2373,
29889,
1557,
7310,
29898,
726,
29897,
13,
1678,
363,
286,
297,
4256,
29898,
1557,
7310,
29889,
4352,
29892,
6213,
1125,
13,
4706,
7709,
25159,
29898,
29885,
29889,
4230,
2972,
29892,
286,
29889,
2972,
3101,
13,
13,
1454,
304,
29895,
297,
5706,
29918,
517,
12360,
29898,
6207,
29918,
5031,
29892,
525,
5431,
353,
29871,
29946,
29906,
29374,
13,
1678,
1596,
29898,
17082,
29897,
13,
13,
517,
12360,
353,
313,
17082,
363,
304,
29895,
297,
5706,
29918,
517,
12360,
29898,
6207,
29918,
5031,
29892,
1426,
29897,
565,
304,
29895,
29889,
1853,
2804,
525,
7811,
1495,
13,
1454,
304,
29895,
297,
18897,
29901,
13,
1678,
1596,
29898,
17082,
29897,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
31199,
240,
137,
184,
29871,
238,
144,
151,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
240,
136,
144,
30784,
31177,
29871,
240,
143,
143,
239,
142,
180,
30393,
31207,
29871,
239,
181,
155,
30826,
31517,
29871,
30944,
30827,
29871,
31170,
31054,
29871,
240,
137,
163,
240,
132,
179,
31225,
31517,
29871,
30877,
30709,
29889,
13,
29937,
632,
238,
170,
167,
239,
188,
176,
240,
152,
163,
29871,
238,
152,
143,
337,
29871,
31081,
29871,
31976,
30889,
30877,
29871,
239,
139,
159,
31093,
30890,
30906,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
238,
170,
167,
239,
188,
176,
30877,
30709,
29889,
29871,
238,
151,
179,
31197,
31093,
29871,
30877,
29871,
240,
143,
171,
240,
135,
183,
30393,
29871,
30709,
238,
168,
187,
29871,
240,
143,
171,
240,
135,
183,
30708,
29871,
31279,
238,
185,
135,
30393,
29871,
238,
147,
155,
31081,
29871,
31378,
31327,
30903,
29871,
239,
161,
139,
30709,
31747,
13,
29937,
632,
240,
152,
176,
31158,
29871,
238,
144,
151,
29871,
237,
187,
183,
29871,
240,
143,
171,
240,
135,
183,
31286,
29871,
238,
171,
191,
239,
163,
131,
29871,
238,
135,
166,
31129,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
5850,
353,
364,
29915,
10780,
29925,
29966,
5850,
5299,
16029,
13,
1307,
353,
364,
29915,
10780,
29925,
29966,
1307,
5299,
29922,
16029,
13,
28879,
353,
364,
29915,
10780,
29925,
29966,
28879,
18572,
16029,
13,
13,
6207,
29918,
5031,
353,
337,
29889,
12198,
877,
29989,
4286,
7122,
4197,
1307,
29892,
365,
29911,
29892,
382,
29984,
12622,
29871,
396,
29871,
239,
155,
175,
31963,
238,
169,
135,
13,
6207,
29918,
5031,
353,
337,
29889,
12198,
877,
29989,
4286,
7122,
4197,
5850,
29892,
11060,
29892,
382,
29984,
12622,
29871,
396,
29871,
240,
142,
131,
238,
169,
191,
13,
13,
1454,
304,
29895,
297,
5706,
29918,
517,
12360,
29898,
6207,
29918,
5031,
29892,
12801,
2433,
1125,
13,
1678,
1596,
29898,
17082,
29897,
13,
13,
29937,
259,
448,
29871,
240,
143,
171,
240,
135,
183,
30393,
29871,
31279,
238,
185,
135,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
240,
155,
152,
31126,
30944,
31081,
29871,
31378,
31327,
31136,
29871,
31408,
239,
142,
175,
31435,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
10593,
10192,
353,
364,
29915,
10780,
29925,
29966,
10593,
10192,
29958,
2158,
16029,
13,
5813,
353,
364,
29915,
10780,
29925,
29966,
5813,
24566,
29874,
29899,
25265,
29899,
29999,
29918,
3816,
29874,
29899,
25265,
29899,
29999,
29918,
29900,
29899,
29929,
29962,
7528,
29915,
13,
13,
6207,
29918,
5031,
353,
337,
29889,
12198,
877,
29989,
4286,
7122,
4197,
10593,
10192,
29892,
27085,
12622,
13,
13,
1454,
304,
29895,
297,
5706,
29918,
517,
12360,
29898,
6207,
29918,
5031,
29892,
525,
558,
1639,
29374,
13,
1678,
1596,
29898,
17082,
29897,
13,
13,
13,
29937,
259,
29906,
29889,
29896,
29929,
29871,
237,
179,
135,
31746,
30877,
29871,
31973,
237,
186,
131,
29871,
240,
143,
143,
31093,
29871,
239,
161,
148,
31126,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
30981,
31129,
31536,
29871,
31406,
238,
181,
152,
29871,
237,
186,
159,
239,
188,
156,
31054,
29871,
238,
151,
179,
31197,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
240,
143,
143,
239,
142,
180,
30944,
31137,
29871,
31000,
239,
161,
148,
31286,
29871,
30970,
240,
153,
140,
30944,
237,
180,
179,
31207,
29871,
239,
161,
136,
238,
163,
168,
238,
147,
159,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
239,
185,
151,
31158,
29871,
31262,
240,
134,
160,
30784,
29871,
31177,
30826,
30906,
29871,
31207,
31925,
31940,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
29937,
632,
31406,
238,
181,
152,
31354,
29871,
237,
179,
135,
31746,
30944,
30811,
31826,
29871,
240,
151,
135,
238,
163,
139,
239,
161,
135,
239,
158,
143,
240,
132,
175,
31517,
29871,
30791,
31737,
30944,
30811,
29871,
239,
152,
141,
31137,
29871,
240,
143,
143,
31093,
31517,
29871,
239,
170,
132,
239,
163,
148,
29871,
239,
161,
148,
31126,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
30393,
29871,
31406,
31306,
31081,
29871,
240,
141,
188,
30852,
29871,
31406,
238,
181,
152,
31054,
29871,
238,
151,
179,
31197,
29871,
240,
136,
144,
30784,
31177,
31517,
29871,
240,
143,
143,
239,
142,
180,
30944,
31081,
29871,
238,
144,
179,
29871,
239,
170,
148,
31941,
30877,
30709,
29889,
13,
29937,
632,
31327,
31345,
29871,
31406,
238,
181,
152,
30708,
29871,
30852,
237,
186,
159,
29871,
30784,
240,
145,
156,
31286,
350,
22498,
29871,
31207,
382,
29933,
22498,
29871,
30906,
29871,
30944,
31081,
29871,
238,
144,
179,
31093,
29871,
30889,
239,
161,
148,
30877,
30709,
29889,
13,
5215,
337,
13,
5215,
16250,
13,
13,
29937,
259,
448,
29871,
240,
137,
163,
240,
132,
179,
29871,
30784,
240,
145,
156,
31225,
29889,
13,
13967,
1678,
353,
364,
29915,
10780,
29925,
29966,
13967,
14247,
29881,
29974,
16029,
13,
7390,
3308,
259,
353,
364,
29915,
10780,
29925,
29966,
7390,
3308,
14247,
29974,
16029,
13,
16173,
3308,
29871,
353,
364,
29915,
10780,
29925,
29966,
16173,
3308,
29958,
15805,
29915,
13,
15307,
29903,
29871,
353,
364,
29915,
10780,
29925,
29966,
15307,
29903,
14247,
7528,
29915,
13,
4571,
13044,
29923,
353,
364,
29915,
10780,
29925,
29966,
4571,
13044,
29923,
29958,
4551,
29915,
13,
13208,
1718,
1430,
353,
364,
29915,
10780,
29925,
29966,
13208,
1718,
1430,
14247,
580,
29915,
13,
29934,
16320,
1430,
353,
364,
29915,
10780,
29925,
29966,
29934,
16320,
1430,
14247,
876,
29915,
13,
7811,
268,
353,
364,
29915,
10780,
29925,
29966,
7811,
14247,
29879,
29974,
16029,
13,
13,
6207,
29918,
5031,
353,
337,
29889,
12198,
877,
29989,
4286,
7122,
4197,
13967,
29892,
16507,
3308,
29892,
341,
1177,
3308,
29892,
323,
8890,
29903,
29892,
360,
5667,
22027,
29892,
365,
16320,
1430,
29892,
390,
16320,
1430,
29892,
399,
29903,
12622,
13,
13,
29937,
259,
448,
29871,
240,
137,
163,
240,
132,
179,
31225,
29889,
13,
6066,
353,
16250,
29889,
17514,
23583,
877,
6066,
742,
6024,
1853,
742,
525,
1767,
11287,
13,
13,
1753,
5706,
29918,
517,
12360,
29898,
726,
1125,
13,
1678,
885,
7310,
353,
5835,
29918,
5031,
29889,
1557,
7310,
29898,
726,
29897,
13,
1678,
363,
286,
297,
4256,
29898,
1557,
7310,
29889,
4352,
29892,
6213,
1125,
13,
4706,
304,
29895,
353,
25159,
29898,
29885,
29889,
4230,
2972,
29892,
286,
29889,
2972,
3101,
13,
4706,
565,
304,
29895,
29889,
1853,
2804,
525,
7811,
2396,
13,
9651,
7709,
304,
29895,
13,
13,
29937,
259,
448,
29871,
240,
143,
143,
31093,
29889,
13,
1990,
21444,
29923,
4387,
1061,
29901,
13,
1678,
14550,
13,
308,
31973,
237,
186,
131,
29871,
240,
143,
143,
31093,
29871,
31231,
31680,
29892,
29871,
31962,
238,
150,
163,
29871,
238,
172,
151,
31189,
31493,
31081,
29871,
30944,
31207,
30708,
29871,
31406,
238,
181,
152,
29871,
237,
186,
159,
239,
188,
156,
31286,
29871,
31231,
31680,
30877,
30709,
29889,
13,
308,
31680,
31973,
29871,
238,
166,
172,
31129,
240,
154,
167,
31493,
29871,
240,
137,
163,
240,
132,
179,
31286,
29871,
238,
179,
158,
31137,
29871,
240,
136,
143,
30784,
31177,
30944,
31081,
29871,
31737,
31136,
30906,
869,
29918,
16044,
580,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
13,
308,
239,
161,
136,
238,
163,
168,
29871,
238,
179,
158,
31354,
29871,
31940,
31987,
31054,
29871,
239,
156,
135,
238,
181,
192,
240,
161,
139,
29871,
238,
170,
167,
239,
188,
176,
30944,
31137,
29871,
30709,
31966,
29871,
240,
137,
163,
240,
132,
179,
31286,
29871,
31716,
30889,
240,
152,
163,
29871,
238,
152,
143,
31081,
13,
4706,
869,
29918,
17854,
580,
31517,
29871,
30791,
31737,
30877,
30709,
29889,
313,
240,
155,
188,
30889,
29871,
238,
170,
167,
239,
188,
176,
30944,
30811,
29871,
239,
152,
141,
31081,
29871,
31378,
31327,
31054,
31081,
21306,
2392,
29871,
31517,
29871,
238,
179,
159,
239,
134,
160,
30877,
30709,
1846,
13,
1678,
14550,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
1426,
1125,
13,
4706,
1583,
29889,
517,
12360,
353,
5706,
29918,
517,
12360,
29898,
726,
29897,
13,
4706,
1583,
29889,
17082,
353,
6213,
4706,
396,
29871,
31417,
30811,
238,
170,
140,
29871,
239,
142,
175,
238,
182,
191,
29871,
31189,
31487,
13,
4706,
1583,
29889,
4622,
17082,
353,
6213,
1678,
396,
29871,
30709,
31966,
29871,
239,
142,
175,
238,
182,
191,
29871,
240,
137,
163,
240,
132,
179,
31225,
13,
4706,
1583,
3032,
17263,
749,
580,
308,
396,
29871,
239,
181,
155,
31966,
29871,
238,
166,
172,
31129,
240,
154,
167,
31493,
29871,
240,
137,
163,
240,
132,
179,
29871,
238,
185,
139,
238,
162,
175,
31346,
30827,
13,
4706,
736,
1583,
29889,
13338,
580,
13,
13,
1678,
396,
5706,
29918,
517,
12360,
580,
29871,
238,
172,
151,
31093,
31493,
31054,
31093,
29871,
30903,
239,
163,
187,
239,
155,
171,
29871,
240,
137,
163,
240,
132,
179,
31286,
29871,
239,
139,
159,
31817,
239,
163,
132,
239,
159,
191,
30906,
29871,
239,
135,
167,
30852,
30944,
31081,
29871,
240,
152,
171,
30970,
13,
1678,
822,
903,
17263,
749,
29898,
1311,
1125,
13,
4706,
525,
3253,
29894,
749,
697,
5993,
14432,
29915,
13,
4706,
1583,
29889,
17082,
29892,
1583,
29889,
4622,
17082,
353,
1583,
29889,
4622,
17082,
29892,
2446,
29898,
1311,
29889,
517,
12360,
29892,
6213,
29897,
29871,
396,
2446,
29871,
240,
152,
171,
30970,
31081,
20380,
29871,
31517,
29871,
239,
139,
159,
31817,
239,
163,
132,
239,
159,
191,
30906,
29871,
30826,
240,
135,
183,
30889,
239,
191,
159,
30981,
31081,
29871,
240,
152,
171,
30970,
13,
13,
1678,
396,
29871,
30709,
31966,
29871,
240,
137,
163,
240,
132,
179,
30393,
29871,
31198,
30944,
31081,
29871,
240,
137,
163,
240,
132,
179,
30918,
29871,
31378,
31327,
1583,
29889,
17082,
29871,
31054,
29871,
30709,
31966,
29871,
240,
137,
163,
240,
132,
179,
31286,
29871,
238,
142,
183,
31137,
5852,
29871,
31517,
29871,
30826,
240,
135,
183,
30944,
31081,
29871,
240,
152,
171,
30970,
13,
1678,
822,
903,
16044,
29898,
1311,
29892,
304,
1193,
668,
1125,
13,
4706,
525,
3057,
322,
29151,
278,
2446,
5993,
565,
372,
7087,
304,
1193,
668,
29915,
13,
4706,
565,
1583,
29889,
4622,
17082,
322,
1583,
29889,
4622,
17082,
29889,
1853,
1275,
304,
1193,
668,
29901,
13,
9651,
1583,
3032,
17263,
749,
580,
13,
9651,
736,
5852,
13,
4706,
1683,
29901,
13,
9651,
736,
7700,
13,
13,
1678,
822,
903,
17854,
29898,
1311,
29892,
304,
1193,
668,
1125,
13,
4706,
525,
13696,
2017,
2446,
5993,
565,
372,
7087,
304,
1193,
668,
470,
12020,
21306,
2392,
29915,
13,
4706,
565,
451,
1583,
3032,
16044,
29898,
517,
1193,
668,
1125,
13,
9651,
12020,
21306,
2392,
877,
1252,
6021,
525,
718,
304,
1193,
668,
29897,
13,
13,
1678,
396,
259,
448,
29871,
31406,
238,
181,
152,
29871,
237,
186,
159,
239,
188,
156,
29889,
13,
1678,
822,
22010,
29898,
1311,
1125,
13,
4706,
376,
17471,
4761,
29922,
1840,
426,
6702,
23097,
29989,
28560,
1495,
1840,
500,
20605,
13,
13,
4706,
22010,
791,
353,
1583,
29889,
8489,
580,
13,
4706,
1550,
1583,
3032,
16044,
877,
7390,
3308,
1495,
470,
1583,
3032,
16044,
877,
16173,
3308,
29374,
13,
9651,
1015,
353,
1583,
29889,
17082,
29889,
1853,
13,
9651,
1492,
353,
1583,
29889,
8489,
580,
13,
9651,
565,
1015,
1275,
525,
7390,
3308,
2396,
13,
18884,
22010,
791,
4619,
1492,
13,
9651,
25342,
1015,
1275,
525,
16173,
3308,
2396,
13,
18884,
22010,
791,
22361,
1492,
13,
4706,
736,
22010,
791,
13,
13,
1678,
822,
1840,
29898,
1311,
1125,
13,
4706,
376,
8489,
4761,
29922,
7329,
426,
6702,
29930,
29915,
29989,
29915,
29914,
1495,
7329,
500,
20605,
13,
13,
4706,
1840,
791,
353,
1583,
29889,
19790,
580,
13,
4706,
1550,
1583,
3032,
16044,
877,
15307,
29903,
1495,
470,
1583,
3032,
16044,
877,
4571,
13044,
29923,
29374,
13,
9651,
1015,
353,
1583,
29889,
17082,
29889,
1853,
13,
9651,
1492,
353,
1583,
29889,
19790,
580,
13,
9651,
565,
1015,
1275,
525,
15307,
29903,
2396,
13,
18884,
1840,
791,
334,
29922,
1492,
13,
9651,
25342,
1015,
1275,
525,
4571,
13044,
29923,
2396,
13,
18884,
1840,
791,
847,
29922,
1492,
13,
4706,
736,
1840,
791,
13,
13,
1678,
822,
7329,
29898,
1311,
1125,
13,
4706,
376,
19790,
4761,
29922,
28019,
891,
313,
22010,
1723,
29908,
13,
13,
4706,
565,
1583,
3032,
16044,
877,
13967,
29374,
13,
9651,
736,
938,
29898,
1311,
29889,
17082,
29889,
1767,
29897,
13,
4706,
25342,
1583,
3032,
16044,
877,
13208,
1718,
1430,
29374,
13,
9651,
22010,
791,
353,
1583,
29889,
13338,
580,
13,
9651,
1583,
3032,
17854,
877,
29934,
16320,
1430,
1495,
13,
9651,
736,
22010,
791,
13,
4706,
1683,
29901,
13,
9651,
12020,
21306,
2392,
877,
1252,
6021,
28019,
13635,
470,
365,
16320,
1430,
1495,
13,
13,
29872,
353,
21444,
29923,
4387,
1061,
580,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
29871,
29941,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
29871,
29941,
334,
29871,
29946,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
313,
29941,
718,
29871,
29946,
29897,
334,
29871,
29945,
8785,
13,
29937,
1596,
29898,
29872,
29889,
5510,
877,
29906,
718,
313,
29941,
718,
334,
29871,
29946,
29897,
8785,
13,
13,
13,
1990,
21444,
9643,
5627,
29898,
10960,
29923,
4387,
1061,
1125,
13,
1678,
822,
22010,
29898,
1311,
1125,
13,
4706,
376,
17471,
4761,
29922,
1840,
426,
6702,
23097,
29989,
28560,
1495,
1840,
500,
29908,
13,
13,
4706,
22010,
791,
353,
1583,
29889,
8489,
580,
13,
4706,
1550,
1583,
3032,
16044,
877,
7390,
3308,
1495,
470,
1583,
3032,
16044,
877,
16173,
3308,
29374,
13,
9651,
1015,
353,
1583,
29889,
17082,
29889,
1853,
13,
9651,
1492,
353,
1583,
29889,
8489,
580,
13,
9651,
565,
1015,
1275,
525,
7390,
3308,
2396,
13,
18884,
22010,
791,
353,
6702,
29974,
742,
22010,
791,
29892,
1492,
29897,
13,
9651,
25342,
1015,
1275,
525,
16173,
3308,
2396,
13,
18884,
22010,
791,
353,
6702,
29899,
742,
22010,
791,
29892,
1492,
29897,
13,
4706,
736,
22010,
791,
13,
13,
1678,
822,
1840,
29898,
1311,
1125,
13,
4706,
376,
8489,
4761,
29922,
7329,
426,
6702,
29930,
29915,
29989,
29915,
29914,
1495,
7329,
500,
29908,
13,
13,
4706,
1840,
791,
353,
1583,
29889,
19790,
580,
13,
4706,
1550,
1583,
3032,
16044,
877,
15307,
29903,
1495,
470,
1583,
3032,
16044,
877,
4571,
13044,
29923,
29374,
13,
9651,
1015,
353,
1583,
29889,
17082,
29889,
1853,
13,
9651,
1492,
353,
1583,
29889,
19790,
580,
13,
9651,
565,
1015,
1275,
525,
15307,
29903,
2396,
13,
18884,
1840,
791,
353,
6702,
29930,
742,
1840,
791,
29892,
1492,
29897,
13,
9651,
25342,
1015,
1275,
525,
4571,
13044,
29923,
2396,
13,
18884,
1840,
791,
353,
6702,
29914,
742,
1840,
791,
29892,
1492,
29897,
13,
4706,
736,
1840,
791,
13,
13,
1678,
822,
7329,
29898,
1311,
1125,
13,
4706,
525,
19790,
4761,
29922,
28019,
891,
313,
22010,
1723,
29915,
13,
13,
4706,
565,
1583,
3032,
16044,
877,
13967,
29374,
13,
9651,
736,
938,
29898,
1311,
29889,
17082,
29889,
1767,
29897,
13,
4706,
25342,
1583,
3032,
16044,
877,
13208,
1718,
1430,
29374,
13,
9651,
22010,
791,
353,
1583,
29889,
13338,
580,
13,
9651,
1583,
3032,
17854,
877,
29934,
16320,
1430,
1495,
13,
9651,
736,
22010,
791,
13,
4706,
1683,
29901,
13,
9651,
12020,
21306,
2392,
877,
1252,
6021,
28019,
13635,
470,
365,
16320,
1430,
1495,
13,
13,
29872,
353,
21444,
9643,
5627,
580,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
29871,
29941,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
29871,
29941,
334,
29871,
29946,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
313,
29941,
718,
29871,
29946,
29897,
334,
29871,
29945,
8785,
13,
2158,
29898,
29872,
29889,
5510,
877,
29906,
718,
29871,
29941,
718,
29871,
29946,
8785,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
240,
143,
143,
239,
142,
180,
31354,
29871,
239,
190,
183,
240,
143,
143,
31153,
238,
162,
175,
29871,
31906,
238,
173,
172,
31054,
31093,
29871,
29941,
30981,
29871,
30393,
31158,
31286,
29871,
240,
152,
163,
239,
152,
163,
31435,
31093,
29871,
238,
179,
179,
31327,
31081,
29871,
239,
140,
192,
30811,
29871,
239,
152,
141,
31354,
29871,
30981,
31306,
30393,
30709,
29889,
13,
29937,
632,
240,
143,
143,
239,
142,
180,
29871,
239,
152,
143,
31137,
30826,
239,
169,
155,
30393,
31207,
29871,
31406,
238,
181,
152,
31906,
29871,
237,
179,
156,
31354,
29871,
30827,
238,
182,
187,
239,
163,
132,
30918,
29871,
30811,
31895,
31286,
29871,
239,
165,
131,
29871,
238,
144,
151,
29871,
239,
152,
143,
31137,
29871,
239,
142,
185,
30709,
31747,
29871,
31327,
31345,
29871,
239,
190,
183,
240,
143,
143,
31153,
238,
162,
175,
29871,
239,
180,
136,
31286,
29871,
30877,
29871,
237,
185,
143,
29871,
239,
160,
192,
31129,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
29937,
632,
31973,
237,
186,
131,
29871,
240,
143,
143,
31093,
30708,
29871,
30877,
29871,
30903,
30811,
29871,
31306,
239,
152,
192,
239,
159,
191,
30906,
29871,
239,
165,
143,
239,
187,
164,
29871,
31973,
237,
186,
131,
30903,
29871,
240,
146,
175,
240,
152,
171,
238,
147,
159,
29871,
31129,
238,
153,
163,
30877,
29871,
31406,
238,
181,
152,
29871,
237,
186,
159,
239,
188,
156,
31054,
29871,
30890,
31435,
31093,
31136,
29871,
30791,
31737,
240,
152,
163,
29871,
30970,
29871,
239,
154,
137,
30709,
29889,
13,
13,
29937,
259,
448,
29871,
30852,
238,
170,
147,
29871,
238,
182,
184,
239,
161,
164,
30877,
29871,
31406,
238,
181,
152,
30393,
29871,
239,
161,
139,
30709,
31747,
10772,
29925,
1503,
292,
29871,
30393,
31207,
16507,
29979,
29871,
239,
156,
131,
29871,
237,
179,
156,
31354,
29871,
240,
143,
143,
239,
142,
180,
29871,
31136,
31231,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
238,
144,
151,
29871,
239,
165,
142,
30709,
29889,
13,
3166,
282,
368,
29889,
2506,
1053,
19566,
13,
3166,
282,
368,
29889,
29891,
5753,
1053,
343,
5753,
13,
13,
29937,
29871,
240,
137,
163,
240,
132,
179,
29871,
30826,
30784,
31177,
13,
517,
12360,
353,
6024,
13967,
742,
525,
7390,
3308,
742,
525,
16173,
3308,
742,
525,
15307,
29903,
742,
525,
4571,
13044,
29923,
742,
525,
13208,
1718,
1430,
742,
525,
29934,
16320,
1430,
2033,
13,
13,
29937,
29871,
31716,
30889,
29871,
31406,
31013,
13,
29873,
29918,
17281,
353,
11297,
29873,
29905,
29876,
29915,
13,
13,
29937,
29871,
240,
137,
163,
240,
132,
179,
29871,
30784,
240,
145,
156,
313,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
239,
159,
191,
30906,
29897,
13,
29873,
29918,
7390,
3308,
353,
364,
12764,
23097,
13,
29873,
29918,
16173,
3308,
353,
364,
28560,
29915,
13,
29873,
29918,
15307,
29903,
353,
364,
12764,
29930,
29915,
13,
29873,
29918,
4571,
13044,
29923,
353,
364,
29915,
22208,
13,
29873,
29918,
13208,
1718,
1430,
353,
364,
12764,
877,
13,
29873,
29918,
29934,
16320,
1430,
353,
364,
29915,
7244,
29915,
13,
13,
29937,
29871,
240,
137,
163,
240,
132,
179,
31225,
29871,
240,
152,
171,
30970,
13,
1753,
260,
29918,
13967,
29898,
29873,
1125,
13,
1678,
364,
12764,
29881,
23097,
13,
1678,
260,
29889,
1767,
353,
938,
29898,
29873,
29889,
1767,
29897,
13,
1678,
736,
260,
13,
13,
29937,
29871,
31054,
238,
162,
175,
29871,
240,
152,
187,
31804,
238,
162,
175,
13,
1753,
260,
29918,
2704,
29898,
29873,
1125,
13,
1678,
1596,
877,
22050,
2931,
29901,
426,
29991,
29878,
29913,
4286,
4830,
29898,
29873,
29889,
1767,
29961,
29900,
12622,
13,
1678,
260,
29889,
11014,
29898,
29896,
29897,
13,
13,
29937,
29871,
238,
163,
140,
31093,
29898,
2506,
261,
29897,
29871,
31826,
31804,
30827,
13,
2506,
261,
353,
19566,
580,
13,
13,
29937,
29871,
31406,
238,
181,
152,
29871,
237,
186,
159,
239,
188,
156,
31906,
29871,
240,
152,
187,
31804,
238,
162,
175,
29871,
240,
152,
171,
30970,
13,
1753,
282,
29918,
13338,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
22010,
584,
22010,
16507,
3308,
1840,
13,
632,
891,
22010,
341,
1177,
3308,
1840,
13,
1678,
14550,
13,
1678,
565,
282,
29961,
29906,
29962,
1275,
525,
29974,
2396,
13,
4706,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
718,
282,
29961,
29941,
29962,
13,
1678,
25342,
282,
29961,
29906,
29962,
1275,
17411,
2396,
13,
4706,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
448,
282,
29961,
29941,
29962,
13,
13,
1753,
282,
29918,
13338,
29918,
8489,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
22010,
584,
1840,
13,
1678,
14550,
13,
1678,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
13,
13,
1753,
282,
29918,
8489,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
1840,
584,
1840,
323,
8890,
29903,
7329,
13,
632,
891,
1840,
360,
5667,
22027,
7329,
13,
1678,
14550,
13,
1678,
565,
282,
29961,
29906,
29962,
1275,
525,
29930,
2396,
13,
4706,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
334,
282,
29961,
29941,
29962,
13,
1678,
25342,
282,
29961,
29906,
29962,
1275,
8207,
2396,
13,
4706,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
847,
282,
29961,
29941,
29962,
13,
13,
1753,
282,
29918,
8489,
29918,
19790,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
1840,
584,
7329,
13,
1678,
14550,
13,
1678,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
13,
13,
1753,
282,
29918,
19790,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
7329,
584,
28019,
13,
1678,
14550,
13,
1678,
282,
29961,
29900,
29962,
353,
282,
29961,
29896,
29962,
13,
13,
1753,
282,
29918,
19790,
29918,
2972,
29898,
29886,
1125,
13,
1678,
14550,
13,
4706,
7329,
584,
365,
16320,
1430,
22010,
390,
16320,
1430,
13,
1678,
14550,
13,
1678,
282,
29961,
29900,
29962,
353,
282,
29961,
29906,
29962,
13,
13,
1753,
282,
29918,
2704,
29898,
29886,
1125,
13,
1678,
1596,
877,
16676,
1059,
1495,
13,
13,
16680,
353,
343,
5753,
580,
13,
2158,
29898,
16680,
29889,
5510,
877,
29906,
8785,
13,
13,
13,
29937,
259,
29906,
29889,
29906,
29900,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
240,
136,
144,
30784,
31177,
29871,
31285,
31458,
29871,
30970,
240,
153,
140,
13,
29937,
259,
229,
153,
166,
29871,
31406,
31306,
584,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
29898,
10389,
1347,
29897,
31054,
29871,
31153,
238,
179,
155,
239,
163,
132,
30918,
29871,
240,
136,
144,
30784,
31177,
29871,
31285,
31458,
29898,
239,
161,
155,
31197,
31940,
30827,
29892,
29871,
237,
181,
131,
239,
134,
140,
29892,
29871,
239,
188,
155,
240,
156,
155,
29871,
238,
150,
180,
29897,
31286,
29871,
30970,
240,
153,
140,
30944,
31137,
29871,
239,
142,
185,
30709,
29889,
13,
29937,
259,
229,
153,
166,
29871,
31435,
237,
181,
179,
584,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31136,
29871,
240,
136,
144,
30784,
31177,
29871,
31406,
31013,
239,
154,
183,
31906,
29871,
31417,
239,
179,
175,
30903,
30811,
30906,
29871,
30890,
31279,
238,
185,
135,
30708,
29871,
31285,
31458,
31286,
29871,
31940,
31299,
30944,
31137,
29871,
239,
161,
139,
30709,
29889,
13,
1272,
353,
289,
29915,
10994,
2787,
29915,
13,
2158,
29898,
1272,
29961,
29900,
29901,
29945,
2314,
13,
2158,
29898,
1272,
29889,
27382,
2541,
29898,
29890,
29915,
10994,
8785,
13,
2158,
29898,
1272,
29889,
5451,
3101,
13,
2158,
29898,
1272,
29889,
6506,
29898,
29890,
29915,
10994,
742,
289,
29915,
10994,
11263,
295,
8785,
13,
13,
29937,
259,
448,
29871,
31963,
30393,
31177,
29871,
238,
179,
179,
239,
154,
183,
31054,
31136,
29871,
30791,
31737,
29871,
30903,
238,
141,
168,
30944,
30709,
29889,
13,
1272,
353,
7023,
2378,
29898,
29890,
29915,
10994,
2787,
1495,
13,
2158,
29898,
1272,
29961,
29900,
29901,
29945,
2314,
13,
2158,
29898,
1272,
29889,
27382,
2541,
29898,
29890,
29915,
10994,
8785,
13,
2158,
29898,
1272,
29889,
5451,
3101,
13,
2158,
29898,
1272,
29889,
6506,
29898,
29890,
29915,
10994,
742,
289,
29915,
10994,
11263,
295,
8785,
13,
13,
29937,
259,
448,
29871,
31963,
30393,
31177,
29871,
238,
179,
179,
239,
154,
183,
31054,
31093,
31136,
29871,
30852,
237,
186,
159,
29871,
240,
148,
159,
31680,
31895,
30393,
29871,
30903,
238,
141,
168,
30944,
30709,
29889,
13,
1272,
353,
289,
29915,
5800,
29949,
29901,
29933,
1718,
29892,
5550,
5194,
29915,
13,
5215,
337,
13,
2158,
29898,
276,
29889,
5451,
29898,
29890,
29915,
7503,
26073,
742,
848,
876,
29871,
396,
29871,
240,
143,
171,
240,
135,
183,
31136,
29871,
31963,
30393,
31177,
30906,
29871,
31207,
31925,
31940,
239,
152,
191,
29871,
30877,
30709,
29889,
13,
13,
29937,
259,
229,
153,
166,
29871,
240,
137,
163,
238,
164,
163,
584,
29871,
30890,
31789,
30708,
29871,
31378,
31327,
29871,
240,
136,
144,
30784,
31177,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
239,
161,
139,
31081,
29871,
31285,
31458,
29871,
30827,
238,
141,
168,
31354,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31054,
31136,
29871,
31940,
31299,
238,
147,
155,
31129,
29871,
239,
161,
139,
30709,
29889,
13,
29937,
632,
30944,
30811,
31826,
29871,
30981,
30708,
31435,
239,
152,
191,
29871,
240,
152,
163,
29871,
31817,
30393,
239,
163,
147,
30393,
29871,
238,
173,
138,
29871,
30903,
30811,
29871,
239,
161,
139,
30709,
29889,
13,
13,
29937,
259,
448,
29871,
239,
181,
174,
239,
170,
187,
29889,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31054,
29871,
30918,
238,
144,
180,
30784,
31517,
29871,
30791,
31737,
30944,
31747,
29871,
31789,
238,
182,
135,
29871,
31406,
31013,
30903,
29871,
30860,
31063,
31197,
29871,
30852,
30970,
31517,
29871,
30903,
30826,
240,
133,
171,
30709,
29889,
13,
29874,
353,
525,
10994,
2787,
29915,
13,
2158,
29898,
29874,
29961,
29900,
1402,
263,
29961,
29896,
2314,
13,
13,
29890,
353,
289,
29915,
10994,
2787,
29915,
13,
2158,
29898,
29890,
29961,
29900,
1402,
289,
29961,
29896,
2314,
13,
13,
29937,
259,
448,
29871,
238,
148,
155,
239,
170,
187,
29889,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31354,
29871,
31199,
30827,
29871,
239,
165,
142,
31354,
29871,
240,
148,
159,
31680,
31895,
31286,
29871,
30811,
31198,
30944,
30811,
29871,
239,
152,
141,
239,
159,
191,
238,
172,
179,
29892,
29871,
240,
136,
144,
30784,
31177,
29871,
31406,
31013,
239,
154,
183,
30906,
29871,
238,
182,
131,
240,
156,
155,
30944,
30811,
29871,
239,
152,
141,
239,
159,
191,
31747,
29871,
237,
188,
151,
238,
132,
151,
30944,
237,
181,
143,
29871,
239,
185,
159,
238,
163,
168,
240,
152,
163,
29871,
30970,
31136,
29871,
239,
154,
137,
30709,
29889,
13,
29879,
353,
289,
29915,
10994,
2787,
29915,
13,
2158,
29898,
29879,
29897,
13,
2158,
29898,
29879,
29889,
13808,
877,
294,
18869,
8785,
13,
13,
29937,
259,
448,
29871,
239,
136,
142,
239,
170,
187,
29889,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31354,
29871,
31093,
31895,
31225,
31517,
29871,
30811,
31198,
30944,
30811,
29871,
239,
152,
141,
31081,
30709,
29889,
13,
29937,
1596,
29898,
29890,
29915,
29995,
29896,
29900,
29879,
1273,
29896,
29900,
29881,
1273,
29896,
29900,
29889,
29906,
29888,
29915,
1273,
29898,
29890,
29915,
2477,
2303,
742,
29871,
29896,
29900,
29900,
29892,
29871,
29946,
29929,
29900,
29889,
29896,
876,
13,
29937,
1596,
29898,
29890,
29915,
8875,
6571,
6571,
4286,
4830,
29898,
29890,
29915,
2477,
2303,
742,
29871,
29896,
29900,
29900,
29892,
29871,
29946,
29929,
29900,
29889,
29896,
876,
13,
2158,
877,
25641,
29896,
29900,
29879,
29913,
12365,
29896,
29900,
29881,
29913,
12365,
29896,
29900,
29889,
29906,
29888,
29913,
4286,
4830,
877,
2477,
2303,
742,
29871,
29896,
29900,
29900,
29892,
29871,
29946,
29929,
29900,
29889,
29896,
467,
12508,
877,
294,
18869,
8785,
13,
13,
29937,
259,
448,
29871,
238,
135,
186,
239,
170,
187,
29889,
29871,
31963,
30393,
31177,
29871,
31406,
31013,
239,
154,
183,
31286,
29871,
30791,
31737,
30944,
31747,
29871,
240,
141,
188,
30852,
29871,
31285,
31458,
30708,
29871,
31406,
238,
181,
152,
31054,
29871,
31288,
240,
153,
168,
31286,
29871,
30981,
30827,
31136,
29871,
30877,
30709,
29889,
13,
2541,
1722,
877,
5325,
29914,
5372,
1445,
29889,
3945,
742,
525,
29893,
1495,
408,
285,
29901,
13,
1678,
285,
29889,
3539,
877,
1028,
4245,
1495,
13,
13,
5215,
2897,
13,
2158,
29898,
359,
29889,
1761,
3972,
877,
6169,
876,
13,
2158,
29898,
359,
29889,
1761,
3972,
29898,
29890,
4286,
8785,
13,
29937,
1678,
229,
131,
190,
29871,
31963,
30393,
31177,
29871,
238,
144,
179,
30393,
31856,
30903,
29871,
31126,
238,
141,
168,
31158,
29871,
238,
144,
151,
29871,
238,
188,
163,
238,
168,
183,
238,
144,
151,
31197,
31136,
29892,
29871,
239,
192,
151,
31493,
30903,
29871,
238,
170,
167,
31327,
29871,
30811,
239,
163,
131,
238,
185,
135,
30944,
31137,
29871,
30393,
31435,
30944,
30827,
29871,
31129,
238,
163,
167,
239,
158,
143,
30811,
238,
178,
131,
30906,
29871,
240,
136,
144,
30784,
31177,
29871,
238,
144,
179,
30393,
31856,
31517,
29871,
30791,
31737,
30944,
31081,
29871,
237,
181,
134,
30393,
29871,
239,
165,
142,
30709,
29889,
2
] |
backend/app/services.py | lfvilella/b2blue-challenge | 2 | 59842 | """ Services
This module is reponsible to handle all interactions to the database
and bussiness rules
"""
import typing
import environs
import dotenv
import requests
import sqlalchemy.orm
from . import models, schemas, cache
env = environs.Env()
dotenv.load_dotenv()
SECRET_KEY_RECAPTCHA = env("RECAPTCHA_SECRET_KEY", "")
VALIDATE_RECAPTCHA = env.bool("VALIDATE_RECAPTCHA", True)
class ServiceException(Exception):
""" Service Exception
This error is raised when data passed to the function is not valid
"""
class ValidationError(ServiceException):
pass
_cache = cache.get_cache()
class CityService:
""" City Service
Service class designed to provide reusable functionalities relate to city
"""
_db: sqlalchemy.orm.Session
def __init__(self, db: sqlalchemy.orm.Session):
"""
This constructor set database to others methods
"""
self._db = db
def __getstate__(self):
"""
Prevent database connection to be cached
"""
state = self.__dict__.copy()
state.pop("_db") # do not pickle _db session
return state
def get_city_by_id(self, name: str, state: str) -> models.City:
""" Get City By ID
This method is used to get City
Args:
name (str): City's name
state (str): City's state
Returns:
Instance of models.City
"""
db_city = (
self._db.query(models.City)
.filter_by(id=models.City.generate_id(name=name, state=state))
.first()
)
return db_city
def create_city(self, city: schemas.CityBase) -> models.City:
""" Create City
This method is used to create a City
Args:
city (schemas.CityInput): City's fields
Returns:
models.City
"""
if None in city.dict().values():
raise ValidationError("Invalid Post")
db_city = self.get_city_by_id(name=city.name, state=city.state)
if db_city:
raise ValidationError("City already exist")
city = models.City(**city.dict())
city.id = models.City.generate_id(name=city.name, state=city.state)
self._db.add(city)
self._db.commit()
self._db.flush()
self.cached_filter_city.invalidate_all()
return city
def filter_city(self, name: str) -> typing.List[models.City]:
""" Filter City
This method is used to filter a Cities
Args:
name (str): City's name
Returns:
list of cities
"""
query = self._db.query(models.City).filter(
models.City.name.contains(name)
)
return query.all()
@_cache.cache(ttl=60)
def cached_filter_city(self, name: str):
""" Cached Filter City
Cached version of filter_city it prevents from hitting
database for alredy cached queries
Args:
name (str): City's name
Returns:
list of cities
"""
return self.filter_city(name)
class GoogleService:
_RECAPTCHA_SITEVERIFY_URL = (
"https://www.google.com/recaptcha/api/siteverify"
)
def validate_recaptcha(self, response_token: str) -> bool:
if not VALIDATE_RECAPTCHA:
return True
data = {
"response": response_token,
"secret": SECRET_KEY_RECAPTCHA,
}
response = requests.post(self._RECAPTCHA_SITEVERIFY_URL, data=data)
if response.json().get("success") is not True:
return False
return True
| [
1,
9995,
15538,
13,
13,
4013,
3883,
338,
1634,
787,
1821,
304,
4386,
599,
22060,
304,
278,
2566,
13,
322,
289,
1558,
3335,
6865,
13,
15945,
29908,
13,
13,
5215,
19229,
13,
13,
5215,
427,
2405,
787,
13,
5215,
8329,
6272,
13,
5215,
7274,
13,
5215,
4576,
284,
305,
6764,
29889,
555,
13,
13,
3166,
869,
1053,
4733,
29892,
1364,
8609,
29892,
7090,
13,
13,
6272,
353,
427,
2405,
787,
29889,
21745,
580,
13,
6333,
6272,
29889,
1359,
29918,
6333,
6272,
580,
13,
13,
1660,
22245,
29911,
29918,
10818,
29918,
1525,
29907,
3301,
29911,
3210,
29909,
353,
8829,
703,
1525,
29907,
3301,
29911,
3210,
29909,
29918,
1660,
22245,
29911,
29918,
10818,
613,
20569,
13,
26707,
3040,
29918,
1525,
29907,
3301,
29911,
3210,
29909,
353,
8829,
29889,
11227,
703,
26707,
3040,
29918,
1525,
29907,
3301,
29911,
3210,
29909,
613,
5852,
29897,
13,
13,
13,
1990,
6692,
2451,
29898,
2451,
1125,
13,
1678,
9995,
6692,
8960,
13,
13,
1678,
910,
1059,
338,
10425,
746,
848,
4502,
304,
278,
740,
338,
451,
2854,
13,
1678,
9995,
13,
13,
13,
1990,
15758,
362,
2392,
29898,
3170,
2451,
1125,
13,
1678,
1209,
13,
13,
13,
29918,
8173,
353,
7090,
29889,
657,
29918,
8173,
580,
13,
13,
13,
1990,
4412,
3170,
29901,
13,
1678,
9995,
4412,
6692,
13,
13,
1678,
6692,
770,
8688,
304,
3867,
337,
27979,
13303,
1907,
29279,
304,
4272,
13,
1678,
9995,
13,
13,
1678,
903,
2585,
29901,
4576,
284,
305,
6764,
29889,
555,
29889,
7317,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4833,
29901,
4576,
284,
305,
6764,
29889,
555,
29889,
7317,
1125,
13,
4706,
9995,
13,
4706,
910,
5823,
731,
2566,
304,
4045,
3519,
13,
4706,
9995,
13,
4706,
1583,
3032,
2585,
353,
4833,
13,
13,
1678,
822,
4770,
657,
3859,
12035,
1311,
1125,
13,
4706,
9995,
13,
4706,
4721,
794,
2566,
3957,
304,
367,
22152,
13,
4706,
9995,
13,
4706,
2106,
353,
1583,
17255,
8977,
26914,
8552,
580,
13,
4706,
2106,
29889,
7323,
703,
29918,
2585,
1159,
29871,
396,
437,
451,
5839,
280,
903,
2585,
4867,
13,
4706,
736,
2106,
13,
13,
1678,
822,
679,
29918,
12690,
29918,
1609,
29918,
333,
29898,
1311,
29892,
1024,
29901,
851,
29892,
2106,
29901,
851,
29897,
1599,
4733,
29889,
16885,
29901,
13,
4706,
9995,
3617,
4412,
2648,
3553,
13,
13,
4706,
910,
1158,
338,
1304,
304,
679,
4412,
13,
4706,
826,
3174,
29901,
13,
9651,
1024,
313,
710,
1125,
4412,
29915,
29879,
1024,
13,
9651,
2106,
313,
710,
1125,
4412,
29915,
29879,
2106,
13,
4706,
16969,
29901,
13,
9651,
2799,
749,
310,
4733,
29889,
16885,
13,
4706,
9995,
13,
13,
4706,
4833,
29918,
12690,
353,
313,
13,
9651,
1583,
3032,
2585,
29889,
1972,
29898,
9794,
29889,
16885,
29897,
13,
9651,
869,
4572,
29918,
1609,
29898,
333,
29922,
9794,
29889,
16885,
29889,
17158,
29918,
333,
29898,
978,
29922,
978,
29892,
2106,
29922,
3859,
876,
13,
9651,
869,
4102,
580,
13,
4706,
1723,
13,
13,
4706,
736,
4833,
29918,
12690,
13,
13,
1678,
822,
1653,
29918,
12690,
29898,
1311,
29892,
4272,
29901,
1364,
8609,
29889,
16885,
5160,
29897,
1599,
4733,
29889,
16885,
29901,
13,
4706,
9995,
6204,
4412,
13,
13,
4706,
910,
1158,
338,
1304,
304,
1653,
263,
4412,
13,
4706,
826,
3174,
29901,
13,
9651,
4272,
313,
11993,
29889,
16885,
4290,
1125,
4412,
29915,
29879,
4235,
13,
4706,
16969,
29901,
13,
9651,
4733,
29889,
16885,
13,
4706,
9995,
13,
4706,
565,
6213,
297,
4272,
29889,
8977,
2141,
5975,
7295,
13,
9651,
12020,
15758,
362,
2392,
703,
13919,
4918,
1159,
13,
13,
4706,
4833,
29918,
12690,
353,
1583,
29889,
657,
29918,
12690,
29918,
1609,
29918,
333,
29898,
978,
29922,
12690,
29889,
978,
29892,
2106,
29922,
12690,
29889,
3859,
29897,
13,
4706,
565,
4833,
29918,
12690,
29901,
13,
9651,
12020,
15758,
362,
2392,
703,
16885,
2307,
1863,
1159,
13,
13,
4706,
4272,
353,
4733,
29889,
16885,
29898,
1068,
12690,
29889,
8977,
3101,
13,
4706,
4272,
29889,
333,
353,
4733,
29889,
16885,
29889,
17158,
29918,
333,
29898,
978,
29922,
12690,
29889,
978,
29892,
2106,
29922,
12690,
29889,
3859,
29897,
13,
13,
4706,
1583,
3032,
2585,
29889,
1202,
29898,
12690,
29897,
13,
4706,
1583,
3032,
2585,
29889,
15060,
580,
13,
4706,
1583,
3032,
2585,
29889,
23126,
580,
13,
13,
4706,
1583,
29889,
29883,
3791,
29918,
4572,
29918,
12690,
29889,
262,
15480,
29918,
497,
580,
13,
13,
4706,
736,
4272,
13,
13,
1678,
822,
4175,
29918,
12690,
29898,
1311,
29892,
1024,
29901,
851,
29897,
1599,
19229,
29889,
1293,
29961,
9794,
29889,
16885,
5387,
13,
4706,
9995,
19916,
4412,
13,
13,
4706,
910,
1158,
338,
1304,
304,
4175,
263,
315,
1907,
13,
4706,
826,
3174,
29901,
13,
9651,
1024,
313,
710,
1125,
4412,
29915,
29879,
1024,
13,
4706,
16969,
29901,
13,
9651,
1051,
310,
14368,
13,
4706,
9995,
13,
4706,
2346,
353,
1583,
3032,
2585,
29889,
1972,
29898,
9794,
29889,
16885,
467,
4572,
29898,
13,
9651,
4733,
29889,
16885,
29889,
978,
29889,
11516,
29898,
978,
29897,
13,
4706,
1723,
13,
4706,
736,
2346,
29889,
497,
580,
13,
13,
1678,
732,
29918,
8173,
29889,
8173,
29898,
698,
29880,
29922,
29953,
29900,
29897,
13,
1678,
822,
22152,
29918,
4572,
29918,
12690,
29898,
1311,
29892,
1024,
29901,
851,
1125,
13,
4706,
9995,
315,
3791,
19916,
4412,
13,
13,
4706,
315,
3791,
1873,
310,
4175,
29918,
12690,
372,
28057,
515,
29425,
13,
308,
2566,
363,
394,
1127,
29891,
22152,
9365,
13,
4706,
826,
3174,
29901,
13,
9651,
1024,
313,
710,
1125,
4412,
29915,
29879,
1024,
13,
4706,
16969,
29901,
13,
9651,
1051,
310,
14368,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
4572,
29918,
12690,
29898,
978,
29897,
13,
13,
13,
1990,
5087,
3170,
29901,
13,
1678,
903,
1525,
29907,
3301,
29911,
3210,
29909,
29918,
29903,
9094,
5348,
6545,
29979,
29918,
4219,
353,
313,
13,
4706,
376,
991,
597,
1636,
29889,
3608,
29889,
510,
29914,
276,
17885,
5815,
29914,
2754,
29914,
2746,
27902,
29908,
13,
1678,
1723,
13,
13,
1678,
822,
12725,
29918,
276,
17885,
5815,
29898,
1311,
29892,
2933,
29918,
6979,
29901,
851,
29897,
1599,
6120,
29901,
13,
4706,
565,
451,
12599,
1367,
3040,
29918,
1525,
29907,
3301,
29911,
3210,
29909,
29901,
13,
9651,
736,
5852,
13,
13,
4706,
848,
353,
426,
13,
9651,
376,
5327,
1115,
2933,
29918,
6979,
29892,
13,
9651,
376,
19024,
1115,
3725,
22245,
29911,
29918,
10818,
29918,
1525,
29907,
3301,
29911,
3210,
29909,
29892,
13,
4706,
500,
13,
4706,
2933,
353,
7274,
29889,
2490,
29898,
1311,
3032,
1525,
29907,
3301,
29911,
3210,
29909,
29918,
29903,
9094,
5348,
6545,
29979,
29918,
4219,
29892,
848,
29922,
1272,
29897,
13,
13,
4706,
565,
2933,
29889,
3126,
2141,
657,
703,
8698,
1159,
338,
451,
5852,
29901,
13,
9651,
736,
7700,
13,
13,
4706,
736,
5852,
13,
2
] |
pylighter/annotation.py | infinex/PyLighter | 0 | 147837 | <reponame>infinex/PyLighter
import os
import threading
import pandas as pd
import spacy
from pylighter import config
from pylighter import display as display_helper
from pylighter import utils
from pylighter.chunk_models import Chunk, Chunks
from pylighter.shortcut_helper import shortcut_helper
from pylighter.tokenizer import SpacyTokenizer
class Annotation:
"""
Class used to annotate datasets.
"""
# --------------------------------------------
# Initialization
# --------------------------------------------
def __init__(
self,
corpus,
labels=None,
start_index=0,
save_path=config.ANNOTATION_SAVE_PATH,
labels_names=config.LABELS_NAMES,
labels_colors=config.DEFAULT_COLORS,
additional_infos=None,
additional_outputs_values=None,
additional_outputs_elements=None,
standard_shortcuts=config.SHORTCUTS,
labels_shortcuts=None,
char_params=config.CHAR_PARAMS,
):
"""
Class that starts the user interface to annotate the given corpus.
Parameters
----------
corpus : List[str]
The corpus to annotate.
labels : List[List[str]], optional
The labels of the documents. It must have the same length as documents.
Moreover, the i-th label must have the same length as the number of
characters of the i-th document.
By default, none of the documents are annotated.
start_index : int, optional
The index of the document to start on. Default value is 0.
save_path : str, optional
Path to store the annotated corpus into a csv when clicking the save button.
By default, the (document, labels) are stored in config.ANNOTATION_SAVE_PATH.
labels_names : List[str], optional
The names of your labels. Default value is config.LABELS_NAMES.
labels_colors : List[str], optional
The colors for your labels in hex format (ex: "#2DA9D5").
The first label in labels_names will have the first color in labels_colors.
By default, the labels colors are defined in config.DEFAULT_COLORS.
labels_shortcuts : List[Shortcut], optional
Keyboard shortcuts to use to select a given label. A shortcut is linked to
one of the label button only if they share the same name.
By default, none of the labels buttons have keyboard shortcuts.
additional_infos : pd.DataFrame, optional
Dataframe of size (size of the corpus, n) containing additional infos to
display for each document. By default, no additional infos are displayed.
additional_outputs_elements : List[AdditionalOutputElement], optional
List containing additional elements to display. 5 elements type are supported:
checkbox, int_text, float_text, text, text_area. By default, there won't be
any additional outputs.
additional_outputs_values : pandas.DataFrame, optional
DataFrame of size (size of the corpus, n) containing the values of additional
outputs for each document. If additional_outputs_elements are given, then the
columns of this DataFrame must match the names of the elements given.
By default, it will be initialized with default values given by the
additional_outputs_elements if it exists.
shortcuts : List[Shortcut], optional
Keyboard shortcuts for the different buttons (Next, Previous, Skip and Save).
By default, it uses the keyboard shortcuts defined in config.SHORTCUTS
char_params : Dict[str, str], optional
Parameters to modify the display of the characters in the document.
The correct values are:
min_width_between_chars -- Min distance between two chars. Expects a css
value as string (ex: "4px").
width_white_space -- Size of a white space. Expects a css value as
string (ex: "10px").
font_size -- Size of the font. Expects a css value as string (ex:"large").
"""
# Check input consistency
utils.assert_input_consistency(corpus, labels, start_index)
# Init "global" variables
self.start_index = start_index
self.current_index = start_index
self.corpus = corpus
self.tk = SpacyTokenizer()
self.toggle_click_annotation = False
self.labels = self._init_labels(labels)
self.save_path = save_path
self.char_params = char_params
self.additional_infos = additional_infos
self._init_additional_outputs(
additional_outputs_values, additional_outputs_elements
)
self.labels_names = labels_names
self.labels_colors = self._init_labels_colors(labels_colors)
self.threads = []
display_helper.start_display()
all_shortcuts = standard_shortcuts[:]
if labels_shortcuts:
all_shortcuts += labels_shortcuts
self.shortcuts_displays_helpers = (
shortcut_helper.create_shortcuts_displays_helpers(all_shortcuts)
)
display_helper.define_keyboard_shortcuts(
all_shortcuts, self.shortcuts_displays_helpers
)
self.preloaded_displays = utils.PreloadedDisplays()
# Start annotating
self._annotate()
def _init_labels(self, labels):
"""
Init labels as "empty" if not labels are given
"""
if not labels:
labels = []
for document in self.corpus:
labels.append(["O"] * len(document))
return labels
def _init_additional_outputs(
self, additional_outputs_values, additional_outputs_elements
):
self.additional_outputs_elements = additional_outputs_elements
if (
additional_outputs_elements is not None
and additional_outputs_values is None
):
# Create empty dataframe if none is given
columns = [element.name for element in additional_outputs_elements]
self.additional_outputs_values = pd.DataFrame(
columns=columns, index=range(len(self.corpus))
)
else:
# Use given data
self.additional_outputs_values = additional_outputs_values
def _init_labels_colors(self, labels_colors_hex):
labels_colors = []
for index, label_name in enumerate(self.labels_names):
labels_colors.append(
utils.LabelColor(
name=label_name,
text_color="white",
background_color=labels_colors_hex[index % len(labels_colors_hex)],
)
)
return labels_colors
# --------------------------------------------
# Main
# --------------------------------------------
def _annotate(self):
"""
Method to annotate the current document. It is responsible for setting up the
user interface and the variables needed on buttons clicked.
"""
# Init variables specific to the current document
self.document = self.corpus[self.current_index]
_, token_spans_lookup = self.tk.word_tokenizer(self.document)
self.token_spans_lookup = token_spans_lookup
self.chunks = Chunks(labels=self.labels[self.current_index])
self.selected_labeliser = self.labels_names[0]
self.label_start_index = None
self.additional_outputs_elements_displays = None
# Display loader until the display is finished
loader = display_helper.display_loader()
# Load current core if not preloaded
self._async_load(self.preloaded_displays.current, 0)
# Define custom styles
display_helper.define_custom_styles(self.labels_colors, self.char_params)
# Display header
display_helper.display_header(
self.current_index,
len(self.corpus),
self._change_document,
self.additional_infos,
)
# Display moving buttons
display_helper.display_top_buttons(
self._change_document,
self._clear_current,
self.shortcuts_displays_helpers,
)
# Display document, toolbox and chunk area
utils.wait_for_threads(self.threads)
display_helper.display_core(self.preloaded_displays.current["core_display"])
self.char_buttons = self.preloaded_displays.current["char_buttons"]
self.labels_buttons = self.preloaded_displays.current["labels_buttons"]
self.toggle_button = self.preloaded_displays.current["toggle_button"]
# Display current chunks
for chunk in self.chunks.chunks:
self._sync_chunks(
chunk, self.document[chunk.start_index : chunk.end_index + 1] # noqa
)
if self.additional_outputs_elements:
self.additional_outputs_elements_displays = (
display_helper.display_additional_outputs(
self.additional_outputs_elements,
self.additional_outputs_values.iloc[self.current_index],
)
)
# Display footer
display_helper.display_footer(
self._save,
self._quit,
self.shortcuts_displays_helpers,
)
# Remove loader
display_helper.remove_loader(loader)
# Prepare toast for on_save
display_helper.prepare_toast()
# Preload missing displays
self._async_load(self.preloaded_displays.next, 1)
self._async_load(self.preloaded_displays.previous, -1)
# sync ui with data
self._sync_toggle_labeliser()
def _async_load(self, preloaded, direction):
"""
Compute the core display (ie toolbox, document and chunk area) and stores it in
the preloaded object if not already precomputed. The displays are computed in
other threads, so make sure to join the threads before accessing/updating any
value in the preloaded object.
Parameters
----------
preloaded : Dict[str, ...]
Object for storing the values returned by the display if the dict is empty.
Values are:
- core_display {ipywidgets.Box}: The widget that represents the core display.
- char_buttons {List[ipywidgets.Button]}: The buttons for every char.
- labels_buttons {List[ipywidgets.Button]}: The buttons for every label.
direction : int
Represents the direction (and the distance) to the next document.
For instance, if the direction equals 2 then it preloads the document at
current index + 2.
"""
if (
not preloaded
and self.current_index + direction < len(self.corpus)
and self.current_index + direction >= 0
):
thread = threading.Thread(
target=display_helper.preload_core,
kwargs={
"obj": preloaded,
"document": self.corpus[self.current_index + direction],
"char_params": self.char_params,
"char_on_click": self._labelise,
"labels_names": self.labels_names,
"selected_labeliser": self.labels_names[0],
"shortcuts_displays_helpers": self.shortcuts_displays_helpers,
"label_on_click": self._select_new_labeliser,
"label_on_toggle": self._toggle_labeliser,
},
)
thread.start()
self.threads.append(thread)
# --------------------------------------------
# On click functions
# --------------------------------------------
def _sync_toggle_labeliser(self):
description = (self.toggle_button.description or self.toggle_button.icon)
if not self.toggle_click_annotation:
self.toggle_button.add_class(f"{description}_color_selected")
else:
self.toggle_button.remove_class(f"{description}_color_selected")
def _toggle_labeliser(self, button, button_index):
description = (self.toggle_button.description or self.toggle_button.icon)
self.toggle_button.remove_class(f"{description}_color_selected")
self.toggle_click_annotation = not self.toggle_click_annotation
self._sync_toggle_labeliser()
def _select_new_labeliser(self, button, button_index):
# Remove selected class from all buttons
for labeliser_button in self.labels_buttons:
labeliser_button.remove_class(
f"{labeliser_button.description or labeliser_button.icon}_color_selected"
)
labeliser_button.add_class(
f"{labeliser_button.description or labeliser_button.icon}_color"
)
# Add selected class to the current selected labeliser
description = (
self.labels_buttons[button_index].description
or self.labels_buttons[button_index].icon
)
self.labels_buttons[button_index].add_class(f"{description}_color_selected")
self.selected_labeliser = self.labels_buttons[button_index].description
if button_index == len(self.labels_buttons) - 1:
# Selects the eraser
self.selected_labeliser = None
# Restart the index to none
self.label_start_index = None
def _labelise(self, button, char_index):
# Selecting the first part and create chunks accordingly
if not self.toggle_click_annotation:
if self.label_start_index is None:
chunk = Chunk(
start_index=char_index,
end_index=char_index,
label=self.selected_labeliser,
)
self.label_start_index = char_index
# Selecting the second part and create chunks accordingly
else:
start_index = self.label_start_index
end_index = char_index
if end_index < start_index:
start_index, end_index = end_index, start_index
chunk = Chunk(
start_index=start_index,
end_index=end_index,
label=self.selected_labeliser,
)
self.label_start_index = None
else:
start_end_index = self.token_spans_lookup.get(char_index)
if start_end_index:
chunk = Chunk(
start_index=start_end_index[0],
end_index=start_end_index[1] - 1,
label=self.selected_labeliser,
)
self.label_start_index = None
else:
return
# Update chunks with the new chunk
chunk_text = self.document[chunk.start_index : chunk.end_index + 1] # noqa
updated_chunks, removed_chunks = self.chunks.add_new_chunk_and_update(chunk)
# Remove the freshly created chunk if the eraser is selected
display_new_chunk = True
if self.selected_labeliser is None:
self.chunks.remove_chunk_by_id(chunk.id)
display_new_chunk = False
chunk.display_id = None
# Sync the display with the chunks
self._sync_chunks(
chunk, chunk_text, updated_chunks, removed_chunks, display_new_chunk
)
def _sync_chunks(
self,
chunk,
chunk_text,
updated_chunks=[],
removed_chunks=[],
display_chunk=True,
):
"""
Sync the given chunk display with the current state of the chunks.
"""
# Display new char highlight
display_helper.highlight_chars(
char_buttons=self.char_buttons[
chunk.start_index : chunk.end_index + 1 # noqa
],
selected_labeliser=chunk.label,
labels_names=self.labels_names,
undo=False,
)
# Remove chunks from display
for chunk_removed in removed_chunks:
display_helper.remove_chunk(chunk_removed)
# Update chunks text
for chunk_updated in updated_chunks:
display_helper.update_chunk_text(
self.document[
chunk_updated.start_index : chunk_updated.end_index + 1 # noqa
],
chunk_updated,
delete_chunk_on_click=self._delete_chunk,
)
# Display new chunk
if display_chunk:
display_helper.display_chunk(
chunk,
chunk_text,
self._delete_chunk,
)
def _delete_chunk(self, button, chunk):
# Remove chunk from chunks
self.chunks.remove_chunk_by_id(chunk.id)
# Remove chunk
display_helper.remove_chunk(chunk)
# Remove char chunk highlight
display_helper.highlight_chars(
char_buttons=self.char_buttons[
chunk.start_index : chunk.end_index + 1 # noqa
],
selected_labeliser=chunk.label,
labels_names=self.labels_names,
undo=True,
)
def _change_document(self, button, direction, skip=False):
"""
Go from the current document at index i to the document at index i + direction.
If skip is True, the current annotation is not added to the labels.
"""
# Add current annotation to the labels if skip is False
if not skip:
self.labels[self.current_index] = self.chunks.to_labels()
# Update additional outputs values
if self.additional_outputs_elements:
for index, element in enumerate(self.additional_outputs_elements):
self.additional_outputs_values.iloc[self.current_index][
element.name
] = self.additional_outputs_elements_displays[index].value
if self.current_index + direction < 0:
return
# Move to the next document
self.current_index += direction
# Clear the current display
display_helper.clear_display()
if self.current_index >= len(self.corpus):
# All done
self._save()
self._quit()
else:
# Continue annotation
utils.wait_for_threads(self.threads)
self.preloaded_displays.update(direction)
self._annotate()
def _clear_current(self, button):
# Clearing the current document <=> Using the eraser on the whole document.
current_labeliser = self.selected_labeliser
self.selected_labeliser = None
self.label_start_index = 0
self._labelise(None, len(self.document) - 1)
self.selected_labeliser = current_labeliser
def _save(self, button=None, file_path=None):
"""
Saves the current state of the corpus and the labels into a csv.
"""
try:
# Save file in path
if not file_path:
file_path = self.save_path
file_path = os.path.abspath(file_path)
utils.annotation_to_csv(
self.corpus, self.labels, self.additional_outputs_values, file_path
)
# Display success toast
display_helper.show_toast(
msg=f"File successfully saved in <b>{file_path}</b> !", success=True
)
except Exception as err:
# Display error toast with error message
display_helper.show_toast(msg=str(err), success=False)
def _quit(self, button=None):
# Display end screen
display_helper.clear_display()
display_helper.display_quit_text(
self.current_index, len(self.corpus), self.start_index
)
| [
1,
529,
276,
1112,
420,
29958,
7192,
457,
29916,
29914,
19737,
29931,
14643,
13,
5215,
2897,
13,
5215,
3244,
292,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
805,
4135,
13,
13,
3166,
282,
2904,
14643,
1053,
2295,
13,
3166,
282,
2904,
14643,
1053,
2479,
408,
2479,
29918,
20907,
13,
3166,
282,
2904,
14643,
1053,
3667,
29879,
13,
3166,
282,
2904,
14643,
29889,
29812,
29918,
9794,
1053,
678,
2960,
29892,
678,
18801,
13,
3166,
282,
2904,
14643,
29889,
12759,
7582,
29918,
20907,
1053,
21697,
29918,
20907,
13,
3166,
282,
2904,
14643,
29889,
6979,
3950,
1053,
1706,
4135,
6066,
3950,
13,
13,
13,
1990,
530,
16666,
29901,
13,
1678,
9995,
13,
1678,
4134,
1304,
304,
9732,
403,
20035,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
1678,
396,
17250,
2133,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
1034,
13364,
29892,
13,
4706,
11073,
29922,
8516,
29892,
13,
4706,
1369,
29918,
2248,
29922,
29900,
29892,
13,
4706,
4078,
29918,
2084,
29922,
2917,
29889,
2190,
12256,
8098,
29918,
29903,
7520,
29923,
29918,
10145,
29892,
13,
4706,
11073,
29918,
7039,
29922,
2917,
29889,
24461,
6670,
29903,
29918,
5813,
29903,
29892,
13,
4706,
11073,
29918,
27703,
29922,
2917,
29889,
23397,
29918,
15032,
24125,
29892,
13,
4706,
5684,
29918,
7192,
359,
29922,
8516,
29892,
13,
4706,
5684,
29918,
4905,
29879,
29918,
5975,
29922,
8516,
29892,
13,
4706,
5684,
29918,
4905,
29879,
29918,
17664,
29922,
8516,
29892,
13,
4706,
3918,
29918,
12759,
7582,
29879,
29922,
2917,
29889,
7068,
8476,
29907,
2692,
29903,
29892,
13,
4706,
11073,
29918,
12759,
7582,
29879,
29922,
8516,
29892,
13,
4706,
1373,
29918,
7529,
29922,
2917,
29889,
11282,
29918,
16320,
29909,
4345,
29892,
13,
268,
1125,
13,
4706,
9995,
13,
4706,
4134,
393,
8665,
278,
1404,
5067,
304,
9732,
403,
278,
2183,
1034,
13364,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
1034,
13364,
584,
2391,
29961,
710,
29962,
13,
632,
450,
1034,
13364,
304,
9732,
403,
29889,
13,
4706,
11073,
584,
2391,
29961,
1293,
29961,
710,
20526,
13136,
13,
9651,
450,
11073,
310,
278,
10701,
29889,
739,
1818,
505,
278,
1021,
3309,
408,
10701,
29889,
13,
9651,
12808,
29892,
278,
474,
29899,
386,
3858,
1818,
505,
278,
1021,
3309,
408,
278,
1353,
310,
13,
9651,
4890,
310,
278,
474,
29899,
386,
1842,
29889,
13,
9651,
2648,
2322,
29892,
5642,
310,
278,
10701,
526,
9732,
630,
29889,
13,
4706,
1369,
29918,
2248,
584,
938,
29892,
13136,
13,
9651,
450,
2380,
310,
278,
1842,
304,
1369,
373,
29889,
13109,
995,
338,
29871,
29900,
29889,
13,
4706,
4078,
29918,
2084,
584,
851,
29892,
13136,
13,
9651,
10802,
304,
3787,
278,
9732,
630,
1034,
13364,
964,
263,
11799,
746,
14855,
278,
4078,
2826,
29889,
13,
9651,
2648,
2322,
29892,
278,
313,
3225,
29892,
11073,
29897,
526,
6087,
297,
2295,
29889,
2190,
12256,
8098,
29918,
29903,
7520,
29923,
29918,
10145,
29889,
13,
4706,
11073,
29918,
7039,
584,
2391,
29961,
710,
1402,
13136,
13,
9651,
450,
2983,
310,
596,
11073,
29889,
13109,
995,
338,
2295,
29889,
24461,
6670,
29903,
29918,
5813,
29903,
29889,
13,
4706,
11073,
29918,
27703,
584,
2391,
29961,
710,
1402,
13136,
13,
9651,
450,
11955,
363,
596,
11073,
297,
15090,
3402,
313,
735,
29901,
12305,
29906,
7698,
29929,
29928,
29945,
2564,
13,
9651,
450,
937,
3858,
297,
11073,
29918,
7039,
674,
505,
278,
937,
2927,
297,
11073,
29918,
27703,
29889,
13,
9651,
2648,
2322,
29892,
278,
11073,
11955,
526,
3342,
297,
2295,
29889,
23397,
29918,
15032,
24125,
29889,
13,
4706,
11073,
29918,
12759,
7582,
29879,
584,
2391,
29961,
21322,
7582,
1402,
13136,
13,
9651,
7670,
3377,
21697,
29879,
304,
671,
304,
1831,
263,
2183,
3858,
29889,
319,
21697,
338,
9024,
304,
13,
9651,
697,
310,
278,
3858,
2826,
871,
565,
896,
6232,
278,
1021,
1024,
29889,
13,
9651,
2648,
2322,
29892,
5642,
310,
278,
11073,
9828,
505,
12247,
21697,
29879,
29889,
13,
4706,
5684,
29918,
7192,
359,
584,
10518,
29889,
17271,
29892,
13136,
13,
9651,
3630,
2557,
310,
2159,
313,
2311,
310,
278,
1034,
13364,
29892,
302,
29897,
6943,
5684,
3041,
359,
304,
13,
9651,
2479,
363,
1269,
1842,
29889,
2648,
2322,
29892,
694,
5684,
3041,
359,
526,
8833,
29889,
13,
4706,
5684,
29918,
4905,
29879,
29918,
17664,
584,
2391,
29961,
2528,
3245,
6466,
2642,
1402,
13136,
13,
9651,
2391,
6943,
5684,
3161,
304,
2479,
29889,
29871,
29945,
3161,
1134,
526,
6969,
29901,
13,
9651,
12527,
29892,
938,
29918,
726,
29892,
5785,
29918,
726,
29892,
1426,
29892,
1426,
29918,
6203,
29889,
2648,
2322,
29892,
727,
2113,
29915,
29873,
367,
13,
9651,
738,
5684,
14391,
29889,
13,
4706,
5684,
29918,
4905,
29879,
29918,
5975,
584,
11701,
29889,
17271,
29892,
13136,
13,
9651,
3630,
4308,
310,
2159,
313,
2311,
310,
278,
1034,
13364,
29892,
302,
29897,
6943,
278,
1819,
310,
5684,
13,
9651,
14391,
363,
1269,
1842,
29889,
960,
5684,
29918,
4905,
29879,
29918,
17664,
526,
2183,
29892,
769,
278,
13,
9651,
4341,
310,
445,
3630,
4308,
1818,
1993,
278,
2983,
310,
278,
3161,
2183,
29889,
13,
9651,
2648,
2322,
29892,
372,
674,
367,
16601,
411,
2322,
1819,
2183,
491,
278,
13,
9651,
5684,
29918,
4905,
29879,
29918,
17664,
565,
372,
4864,
29889,
13,
4706,
21697,
29879,
584,
2391,
29961,
21322,
7582,
1402,
13136,
13,
9651,
7670,
3377,
21697,
29879,
363,
278,
1422,
9828,
313,
9190,
29892,
4721,
2366,
29892,
4971,
666,
322,
16913,
467,
13,
9651,
2648,
2322,
29892,
372,
3913,
278,
12247,
21697,
29879,
3342,
297,
2295,
29889,
7068,
8476,
29907,
2692,
29903,
13,
4706,
1373,
29918,
7529,
584,
360,
919,
29961,
710,
29892,
851,
1402,
13136,
13,
9651,
12662,
2699,
304,
6623,
278,
2479,
310,
278,
4890,
297,
278,
1842,
29889,
13,
9651,
450,
1959,
1819,
526,
29901,
13,
18884,
1375,
29918,
2103,
29918,
14811,
29918,
305,
1503,
1192,
3080,
5418,
1546,
1023,
22524,
29889,
1222,
1103,
29879,
263,
5997,
13,
462,
462,
9651,
995,
408,
1347,
313,
735,
29901,
376,
29946,
1756,
2564,
13,
18884,
2920,
29918,
10921,
29918,
3493,
1192,
21179,
310,
263,
4796,
2913,
29889,
1222,
1103,
29879,
263,
5997,
995,
408,
13,
462,
462,
9651,
1347,
313,
735,
29901,
376,
29896,
29900,
1756,
2564,
13,
18884,
4079,
29918,
2311,
1192,
21179,
310,
278,
4079,
29889,
1222,
1103,
29879,
263,
5997,
995,
408,
1347,
313,
735,
6160,
16961,
2564,
13,
4706,
9995,
13,
4706,
396,
5399,
1881,
5718,
3819,
13,
4706,
3667,
29879,
29889,
9294,
29918,
2080,
29918,
3200,
391,
3819,
29898,
2616,
13364,
29892,
11073,
29892,
1369,
29918,
2248,
29897,
13,
13,
4706,
396,
10886,
376,
10945,
29908,
3651,
13,
4706,
1583,
29889,
2962,
29918,
2248,
353,
1369,
29918,
2248,
13,
4706,
1583,
29889,
3784,
29918,
2248,
353,
1369,
29918,
2248,
13,
4706,
1583,
29889,
2616,
13364,
353,
1034,
13364,
13,
4706,
1583,
29889,
11178,
353,
1706,
4135,
6066,
3950,
580,
13,
4706,
1583,
29889,
13270,
29918,
3808,
29918,
18317,
353,
7700,
13,
4706,
1583,
29889,
21134,
353,
1583,
3032,
2344,
29918,
21134,
29898,
21134,
29897,
13,
4706,
1583,
29889,
7620,
29918,
2084,
353,
4078,
29918,
2084,
13,
4706,
1583,
29889,
3090,
29918,
7529,
353,
1373,
29918,
7529,
13,
4706,
1583,
29889,
1202,
3245,
29918,
7192,
359,
353,
5684,
29918,
7192,
359,
13,
4706,
1583,
3032,
2344,
29918,
1202,
3245,
29918,
4905,
29879,
29898,
13,
9651,
5684,
29918,
4905,
29879,
29918,
5975,
29892,
5684,
29918,
4905,
29879,
29918,
17664,
13,
4706,
1723,
13,
4706,
1583,
29889,
21134,
29918,
7039,
353,
11073,
29918,
7039,
13,
4706,
1583,
29889,
21134,
29918,
27703,
353,
1583,
3032,
2344,
29918,
21134,
29918,
27703,
29898,
21134,
29918,
27703,
29897,
13,
4706,
1583,
29889,
28993,
353,
5159,
13,
13,
4706,
2479,
29918,
20907,
29889,
2962,
29918,
4990,
580,
13,
13,
4706,
599,
29918,
12759,
7582,
29879,
353,
3918,
29918,
12759,
7582,
29879,
7503,
29962,
13,
4706,
565,
11073,
29918,
12759,
7582,
29879,
29901,
13,
9651,
599,
29918,
12759,
7582,
29879,
4619,
11073,
29918,
12759,
7582,
29879,
13,
4706,
1583,
29889,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
353,
313,
13,
9651,
21697,
29918,
20907,
29889,
3258,
29918,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
29898,
497,
29918,
12759,
7582,
29879,
29897,
13,
4706,
1723,
13,
4706,
2479,
29918,
20907,
29889,
7922,
29918,
1989,
3377,
29918,
12759,
7582,
29879,
29898,
13,
9651,
599,
29918,
12759,
7582,
29879,
29892,
1583,
29889,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
1457,
15638,
29918,
2218,
12922,
353,
3667,
29879,
29889,
6572,
15638,
4205,
12922,
580,
13,
13,
4706,
396,
7370,
9732,
1218,
13,
4706,
1583,
3032,
6735,
403,
580,
13,
13,
1678,
822,
903,
2344,
29918,
21134,
29898,
1311,
29892,
11073,
1125,
13,
4706,
9995,
13,
4706,
10886,
11073,
408,
376,
6310,
29908,
565,
451,
11073,
526,
2183,
13,
4706,
9995,
13,
4706,
565,
451,
11073,
29901,
13,
9651,
11073,
353,
5159,
13,
9651,
363,
1842,
297,
1583,
29889,
2616,
13364,
29901,
13,
18884,
11073,
29889,
4397,
29898,
3366,
29949,
3108,
334,
7431,
29898,
3225,
876,
13,
13,
4706,
736,
11073,
13,
13,
1678,
822,
903,
2344,
29918,
1202,
3245,
29918,
4905,
29879,
29898,
13,
4706,
1583,
29892,
5684,
29918,
4905,
29879,
29918,
5975,
29892,
5684,
29918,
4905,
29879,
29918,
17664,
13,
268,
1125,
13,
4706,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
353,
5684,
29918,
4905,
29879,
29918,
17664,
13,
4706,
565,
313,
13,
9651,
5684,
29918,
4905,
29879,
29918,
17664,
338,
451,
6213,
13,
9651,
322,
5684,
29918,
4905,
29879,
29918,
5975,
338,
6213,
13,
308,
1125,
13,
9651,
396,
6204,
4069,
12205,
565,
5642,
338,
2183,
13,
9651,
4341,
353,
518,
5029,
29889,
978,
363,
1543,
297,
5684,
29918,
4905,
29879,
29918,
17664,
29962,
13,
9651,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
5975,
353,
10518,
29889,
17271,
29898,
13,
18884,
4341,
29922,
13099,
29892,
2380,
29922,
3881,
29898,
2435,
29898,
1311,
29889,
2616,
13364,
876,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
396,
4803,
2183,
848,
13,
9651,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
5975,
353,
5684,
29918,
4905,
29879,
29918,
5975,
13,
13,
1678,
822,
903,
2344,
29918,
21134,
29918,
27703,
29898,
1311,
29892,
11073,
29918,
27703,
29918,
20970,
1125,
13,
4706,
11073,
29918,
27703,
353,
5159,
13,
4706,
363,
2380,
29892,
3858,
29918,
978,
297,
26985,
29898,
1311,
29889,
21134,
29918,
7039,
1125,
13,
9651,
11073,
29918,
27703,
29889,
4397,
29898,
13,
18884,
3667,
29879,
29889,
4775,
3306,
29898,
13,
462,
1678,
1024,
29922,
1643,
29918,
978,
29892,
13,
462,
1678,
1426,
29918,
2780,
543,
10921,
613,
13,
462,
1678,
3239,
29918,
2780,
29922,
21134,
29918,
27703,
29918,
20970,
29961,
2248,
1273,
7431,
29898,
21134,
29918,
27703,
29918,
20970,
29897,
1402,
13,
18884,
1723,
13,
9651,
1723,
13,
4706,
736,
11073,
29918,
27703,
13,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
1678,
396,
4241,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
13,
1678,
822,
903,
6735,
403,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
8108,
304,
9732,
403,
278,
1857,
1842,
29889,
739,
338,
14040,
363,
4444,
701,
278,
13,
4706,
1404,
5067,
322,
278,
3651,
4312,
373,
9828,
11484,
29889,
13,
4706,
9995,
13,
13,
4706,
396,
10886,
3651,
2702,
304,
278,
1857,
1842,
13,
4706,
1583,
29889,
3225,
353,
1583,
29889,
2616,
13364,
29961,
1311,
29889,
3784,
29918,
2248,
29962,
13,
4706,
17117,
5993,
29918,
1028,
550,
29918,
20401,
353,
1583,
29889,
11178,
29889,
1742,
29918,
6979,
3950,
29898,
1311,
29889,
3225,
29897,
13,
4706,
1583,
29889,
6979,
29918,
1028,
550,
29918,
20401,
353,
5993,
29918,
1028,
550,
29918,
20401,
13,
4706,
1583,
29889,
305,
18801,
353,
678,
18801,
29898,
21134,
29922,
1311,
29889,
21134,
29961,
1311,
29889,
3784,
29918,
2248,
2314,
13,
4706,
1583,
29889,
8391,
29918,
1643,
7608,
353,
1583,
29889,
21134,
29918,
7039,
29961,
29900,
29962,
13,
4706,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
6213,
13,
4706,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29918,
2218,
12922,
353,
6213,
13,
13,
4706,
396,
17440,
23466,
2745,
278,
2479,
338,
7743,
13,
4706,
23466,
353,
2479,
29918,
20907,
29889,
4990,
29918,
12657,
580,
13,
13,
4706,
396,
16012,
1857,
7136,
565,
451,
758,
15638,
13,
4706,
1583,
3032,
12674,
29918,
1359,
29898,
1311,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
3784,
29892,
29871,
29900,
29897,
13,
13,
4706,
396,
22402,
2888,
11949,
13,
4706,
2479,
29918,
20907,
29889,
7922,
29918,
6341,
29918,
9783,
29898,
1311,
29889,
21134,
29918,
27703,
29892,
1583,
29889,
3090,
29918,
7529,
29897,
13,
13,
4706,
396,
17440,
4839,
13,
4706,
2479,
29918,
20907,
29889,
4990,
29918,
6672,
29898,
13,
9651,
1583,
29889,
3784,
29918,
2248,
29892,
13,
9651,
7431,
29898,
1311,
29889,
2616,
13364,
511,
13,
9651,
1583,
3032,
3167,
29918,
3225,
29892,
13,
9651,
1583,
29889,
1202,
3245,
29918,
7192,
359,
29892,
13,
4706,
1723,
13,
13,
4706,
396,
17440,
8401,
9828,
13,
4706,
2479,
29918,
20907,
29889,
4990,
29918,
3332,
29918,
4187,
7453,
29898,
13,
9651,
1583,
3032,
3167,
29918,
3225,
29892,
13,
9651,
1583,
3032,
8551,
29918,
3784,
29892,
13,
9651,
1583,
29889,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
29892,
13,
4706,
1723,
13,
13,
4706,
396,
17440,
1842,
29892,
5780,
1884,
322,
19875,
4038,
13,
4706,
3667,
29879,
29889,
10685,
29918,
1454,
29918,
28993,
29898,
1311,
29889,
28993,
29897,
13,
4706,
2479,
29918,
20907,
29889,
4990,
29918,
3221,
29898,
1311,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
3784,
3366,
3221,
29918,
4990,
20068,
13,
4706,
1583,
29889,
3090,
29918,
4187,
7453,
353,
1583,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
3784,
3366,
3090,
29918,
4187,
7453,
3108,
13,
4706,
1583,
29889,
21134,
29918,
4187,
7453,
353,
1583,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
3784,
3366,
21134,
29918,
4187,
7453,
3108,
13,
4706,
1583,
29889,
13270,
29918,
3092,
353,
1583,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
3784,
3366,
13270,
29918,
3092,
3108,
13,
13,
4706,
396,
17440,
1857,
521,
18801,
13,
4706,
363,
19875,
297,
1583,
29889,
305,
18801,
29889,
305,
18801,
29901,
13,
9651,
1583,
3032,
16593,
29918,
305,
18801,
29898,
13,
18884,
19875,
29892,
1583,
29889,
3225,
29961,
29812,
29889,
2962,
29918,
2248,
584,
19875,
29889,
355,
29918,
2248,
718,
29871,
29896,
29962,
29871,
396,
694,
25621,
13,
9651,
1723,
13,
13,
4706,
565,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29901,
13,
9651,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29918,
2218,
12922,
353,
313,
13,
18884,
2479,
29918,
20907,
29889,
4990,
29918,
1202,
3245,
29918,
4905,
29879,
29898,
13,
462,
1678,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29892,
13,
462,
1678,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
5975,
29889,
309,
542,
29961,
1311,
29889,
3784,
29918,
2248,
1402,
13,
18884,
1723,
13,
9651,
1723,
13,
13,
4706,
396,
17440,
24166,
13,
4706,
2479,
29918,
20907,
29889,
4990,
29918,
21720,
29898,
13,
9651,
1583,
3032,
7620,
29892,
13,
9651,
1583,
3032,
28358,
29892,
13,
9651,
1583,
29889,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
29892,
13,
4706,
1723,
13,
13,
4706,
396,
15154,
23466,
13,
4706,
2479,
29918,
20907,
29889,
5992,
29918,
12657,
29898,
12657,
29897,
13,
13,
4706,
396,
349,
3445,
598,
304,
579,
363,
373,
29918,
7620,
13,
4706,
2479,
29918,
20907,
29889,
19125,
29918,
517,
579,
580,
13,
13,
4706,
396,
4721,
1359,
4567,
14423,
13,
4706,
1583,
3032,
12674,
29918,
1359,
29898,
1311,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
4622,
29892,
29871,
29896,
29897,
13,
4706,
1583,
3032,
12674,
29918,
1359,
29898,
1311,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
24957,
29892,
448,
29896,
29897,
13,
13,
4706,
396,
16523,
14313,
411,
848,
13,
4706,
1583,
3032,
16593,
29918,
13270,
29918,
1643,
7608,
580,
13,
13,
13,
1678,
822,
903,
12674,
29918,
1359,
29898,
1311,
29892,
758,
15638,
29892,
5305,
1125,
13,
4706,
9995,
13,
4706,
11796,
29872,
278,
7136,
2479,
313,
347,
5780,
1884,
29892,
1842,
322,
19875,
4038,
29897,
322,
14422,
372,
297,
13,
4706,
278,
758,
15638,
1203,
565,
451,
2307,
758,
12097,
287,
29889,
450,
14423,
526,
15712,
297,
13,
4706,
916,
9717,
29892,
577,
1207,
1854,
304,
5988,
278,
9717,
1434,
17378,
29914,
786,
26747,
738,
13,
4706,
995,
297,
278,
758,
15638,
1203,
29889,
13,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
758,
15638,
584,
360,
919,
29961,
710,
29892,
2023,
29962,
13,
9651,
4669,
363,
15446,
278,
1819,
4133,
491,
278,
2479,
565,
278,
9657,
338,
4069,
29889,
13,
9651,
2630,
1041,
526,
29901,
13,
9651,
448,
7136,
29918,
4990,
426,
666,
5693,
3690,
29879,
29889,
3313,
6177,
450,
11109,
393,
11524,
278,
7136,
2479,
29889,
13,
9651,
448,
1373,
29918,
4187,
7453,
426,
1293,
29961,
666,
5693,
3690,
29879,
29889,
3125,
29962,
6177,
450,
9828,
363,
1432,
1373,
29889,
13,
9651,
448,
11073,
29918,
4187,
7453,
426,
1293,
29961,
666,
5693,
3690,
29879,
29889,
3125,
29962,
6177,
450,
9828,
363,
1432,
3858,
29889,
13,
4706,
5305,
584,
938,
13,
9651,
830,
4569,
1237,
278,
5305,
313,
392,
278,
5418,
29897,
304,
278,
2446,
1842,
29889,
13,
9651,
1152,
2777,
29892,
565,
278,
5305,
15743,
29871,
29906,
769,
372,
758,
18132,
278,
1842,
472,
13,
9651,
1857,
2380,
718,
29871,
29906,
29889,
13,
4706,
9995,
13,
4706,
565,
313,
13,
9651,
451,
758,
15638,
13,
9651,
322,
1583,
29889,
3784,
29918,
2248,
718,
5305,
529,
7431,
29898,
1311,
29889,
2616,
13364,
29897,
13,
9651,
322,
1583,
29889,
3784,
29918,
2248,
718,
5305,
6736,
29871,
29900,
13,
308,
1125,
13,
9651,
3244,
353,
3244,
292,
29889,
4899,
29898,
13,
18884,
3646,
29922,
4990,
29918,
20907,
29889,
1457,
1359,
29918,
3221,
29892,
13,
18884,
9049,
5085,
3790,
13,
462,
1678,
376,
5415,
1115,
758,
15638,
29892,
13,
462,
1678,
376,
3225,
1115,
1583,
29889,
2616,
13364,
29961,
1311,
29889,
3784,
29918,
2248,
718,
5305,
1402,
13,
462,
1678,
376,
3090,
29918,
7529,
1115,
1583,
29889,
3090,
29918,
7529,
29892,
13,
462,
1678,
376,
3090,
29918,
265,
29918,
3808,
1115,
1583,
3032,
1643,
895,
29892,
13,
462,
1678,
376,
21134,
29918,
7039,
1115,
1583,
29889,
21134,
29918,
7039,
29892,
13,
462,
1678,
376,
8391,
29918,
1643,
7608,
1115,
1583,
29889,
21134,
29918,
7039,
29961,
29900,
1402,
13,
462,
1678,
376,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
1115,
1583,
29889,
12759,
7582,
29879,
29918,
2218,
12922,
29918,
3952,
6774,
29892,
13,
462,
1678,
376,
1643,
29918,
265,
29918,
3808,
1115,
1583,
3032,
2622,
29918,
1482,
29918,
1643,
7608,
29892,
13,
462,
1678,
376,
1643,
29918,
265,
29918,
13270,
1115,
1583,
3032,
13270,
29918,
1643,
7608,
29892,
13,
18884,
2981,
13,
9651,
1723,
13,
9651,
3244,
29889,
2962,
580,
13,
9651,
1583,
29889,
28993,
29889,
4397,
29898,
7097,
29897,
13,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
1678,
396,
1551,
2828,
3168,
13,
1678,
396,
448,
2683,
2683,
1378,
5634,
13,
13,
1678,
822,
903,
16593,
29918,
13270,
29918,
1643,
7608,
29898,
1311,
1125,
13,
4706,
6139,
353,
313,
1311,
29889,
13270,
29918,
3092,
29889,
8216,
470,
1583,
29889,
13270,
29918,
3092,
29889,
4144,
29897,
13,
4706,
565,
451,
1583,
29889,
13270,
29918,
3808,
29918,
18317,
29901,
13,
9651,
1583,
29889,
13270,
29918,
3092,
29889,
1202,
29918,
1990,
29898,
29888,
29908,
29912,
8216,
2403,
2780,
29918,
8391,
1159,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
13270,
29918,
3092,
29889,
5992,
29918,
1990,
29898,
29888,
29908,
29912,
8216,
2403,
2780,
29918,
8391,
1159,
13,
13,
13,
1678,
822,
903,
13270,
29918,
1643,
7608,
29898,
1311,
29892,
2826,
29892,
2826,
29918,
2248,
1125,
13,
4706,
6139,
353,
313,
1311,
29889,
13270,
29918,
3092,
29889,
8216,
470,
1583,
29889,
13270,
29918,
3092,
29889,
4144,
29897,
13,
4706,
1583,
29889,
13270,
29918,
3092,
29889,
5992,
29918,
1990,
29898,
29888,
29908,
29912,
8216,
2403,
2780,
29918,
8391,
1159,
13,
4706,
1583,
29889,
13270,
29918,
3808,
29918,
18317,
353,
451,
1583,
29889,
13270,
29918,
3808,
29918,
18317,
13,
4706,
1583,
3032,
16593,
29918,
13270,
29918,
1643,
7608,
580,
13,
13,
1678,
822,
903,
2622,
29918,
1482,
29918,
1643,
7608,
29898,
1311,
29892,
2826,
29892,
2826,
29918,
2248,
1125,
13,
4706,
396,
15154,
4629,
770,
515,
599,
9828,
13,
4706,
363,
3858,
7608,
29918,
3092,
297,
1583,
29889,
21134,
29918,
4187,
7453,
29901,
13,
9651,
3858,
7608,
29918,
3092,
29889,
5992,
29918,
1990,
29898,
13,
18884,
285,
29908,
29912,
1643,
7608,
29918,
3092,
29889,
8216,
470,
3858,
7608,
29918,
3092,
29889,
4144,
2403,
2780,
29918,
8391,
29908,
13,
9651,
1723,
13,
9651,
3858,
7608,
29918,
3092,
29889,
1202,
29918,
1990,
29898,
13,
18884,
285,
29908,
29912,
1643,
7608,
29918,
3092,
29889,
8216,
470,
3858,
7608,
29918,
3092,
29889,
4144,
2403,
2780,
29908,
13,
9651,
1723,
13,
13,
4706,
396,
3462,
4629,
770,
304,
278,
1857,
4629,
3858,
7608,
13,
4706,
6139,
353,
313,
13,
9651,
1583,
29889,
21134,
29918,
4187,
7453,
29961,
3092,
29918,
2248,
1822,
8216,
13,
9651,
470,
1583,
29889,
21134,
29918,
4187,
7453,
29961,
3092,
29918,
2248,
1822,
4144,
13,
4706,
1723,
13,
4706,
1583,
29889,
21134,
29918,
4187,
7453,
29961,
3092,
29918,
2248,
1822,
1202,
29918,
1990,
29898,
29888,
29908,
29912,
8216,
2403,
2780,
29918,
8391,
1159,
13,
4706,
1583,
29889,
8391,
29918,
1643,
7608,
353,
1583,
29889,
21134,
29918,
4187,
7453,
29961,
3092,
29918,
2248,
1822,
8216,
13,
4706,
565,
2826,
29918,
2248,
1275,
7431,
29898,
1311,
29889,
21134,
29918,
4187,
7453,
29897,
448,
29871,
29896,
29901,
13,
9651,
396,
7605,
29879,
278,
604,
29440,
13,
9651,
1583,
29889,
8391,
29918,
1643,
7608,
353,
6213,
13,
13,
4706,
396,
11654,
442,
278,
2380,
304,
5642,
13,
4706,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
6213,
13,
13,
1678,
822,
903,
1643,
895,
29898,
1311,
29892,
2826,
29892,
1373,
29918,
2248,
1125,
13,
4706,
396,
7605,
292,
278,
937,
760,
322,
1653,
521,
18801,
16205,
13,
4706,
565,
451,
1583,
29889,
13270,
29918,
3808,
29918,
18317,
29901,
13,
9651,
565,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
338,
6213,
29901,
13,
18884,
19875,
353,
678,
2960,
29898,
13,
462,
1678,
1369,
29918,
2248,
29922,
3090,
29918,
2248,
29892,
13,
462,
1678,
1095,
29918,
2248,
29922,
3090,
29918,
2248,
29892,
13,
462,
1678,
3858,
29922,
1311,
29889,
8391,
29918,
1643,
7608,
29892,
13,
18884,
1723,
13,
18884,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
1373,
29918,
2248,
13,
13,
9651,
396,
7605,
292,
278,
1473,
760,
322,
1653,
521,
18801,
16205,
13,
9651,
1683,
29901,
13,
18884,
1369,
29918,
2248,
353,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
13,
18884,
1095,
29918,
2248,
353,
1373,
29918,
2248,
13,
18884,
565,
1095,
29918,
2248,
529,
1369,
29918,
2248,
29901,
13,
462,
1678,
1369,
29918,
2248,
29892,
1095,
29918,
2248,
353,
1095,
29918,
2248,
29892,
1369,
29918,
2248,
13,
13,
18884,
19875,
353,
678,
2960,
29898,
13,
462,
1678,
1369,
29918,
2248,
29922,
2962,
29918,
2248,
29892,
13,
462,
1678,
1095,
29918,
2248,
29922,
355,
29918,
2248,
29892,
13,
462,
1678,
3858,
29922,
1311,
29889,
8391,
29918,
1643,
7608,
29892,
13,
18884,
1723,
13,
18884,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
6213,
13,
4706,
1683,
29901,
13,
9651,
1369,
29918,
355,
29918,
2248,
353,
1583,
29889,
6979,
29918,
1028,
550,
29918,
20401,
29889,
657,
29898,
3090,
29918,
2248,
29897,
13,
9651,
565,
1369,
29918,
355,
29918,
2248,
29901,
13,
18884,
19875,
353,
678,
2960,
29898,
13,
462,
1678,
1369,
29918,
2248,
29922,
2962,
29918,
355,
29918,
2248,
29961,
29900,
1402,
13,
462,
1678,
1095,
29918,
2248,
29922,
2962,
29918,
355,
29918,
2248,
29961,
29896,
29962,
448,
29871,
29896,
29892,
13,
462,
1678,
3858,
29922,
1311,
29889,
8391,
29918,
1643,
7608,
29892,
13,
18884,
1723,
13,
18884,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
6213,
13,
9651,
1683,
29901,
13,
18884,
736,
13,
13,
13,
4706,
396,
10318,
521,
18801,
411,
278,
716,
19875,
13,
4706,
19875,
29918,
726,
353,
1583,
29889,
3225,
29961,
29812,
29889,
2962,
29918,
2248,
584,
19875,
29889,
355,
29918,
2248,
718,
29871,
29896,
29962,
29871,
396,
694,
25621,
13,
4706,
4784,
29918,
305,
18801,
29892,
6206,
29918,
305,
18801,
353,
1583,
29889,
305,
18801,
29889,
1202,
29918,
1482,
29918,
29812,
29918,
392,
29918,
5504,
29898,
29812,
29897,
13,
13,
4706,
396,
15154,
278,
10849,
368,
2825,
19875,
565,
278,
604,
29440,
338,
4629,
13,
4706,
2479,
29918,
1482,
29918,
29812,
353,
5852,
13,
4706,
565,
1583,
29889,
8391,
29918,
1643,
7608,
338,
6213,
29901,
13,
9651,
1583,
29889,
305,
18801,
29889,
5992,
29918,
29812,
29918,
1609,
29918,
333,
29898,
29812,
29889,
333,
29897,
13,
9651,
2479,
29918,
1482,
29918,
29812,
353,
7700,
13,
9651,
19875,
29889,
4990,
29918,
333,
353,
6213,
13,
13,
4706,
396,
317,
2720,
278,
2479,
411,
278,
521,
18801,
13,
4706,
1583,
3032,
16593,
29918,
305,
18801,
29898,
13,
9651,
19875,
29892,
19875,
29918,
726,
29892,
4784,
29918,
305,
18801,
29892,
6206,
29918,
305,
18801,
29892,
2479,
29918,
1482,
29918,
29812,
13,
4706,
1723,
13,
13,
1678,
822,
903,
16593,
29918,
305,
18801,
29898,
13,
4706,
1583,
29892,
13,
4706,
19875,
29892,
13,
4706,
19875,
29918,
726,
29892,
13,
4706,
4784,
29918,
305,
18801,
11759,
1402,
13,
4706,
6206,
29918,
305,
18801,
11759,
1402,
13,
4706,
2479,
29918,
29812,
29922,
5574,
29892,
13,
268,
1125,
13,
4706,
9995,
13,
4706,
317,
2720,
278,
2183,
19875,
2479,
411,
278,
1857,
2106,
310,
278,
521,
18801,
29889,
13,
4706,
9995,
13,
4706,
396,
17440,
716,
1373,
12141,
13,
4706,
2479,
29918,
20907,
29889,
28970,
29918,
305,
1503,
29898,
13,
9651,
1373,
29918,
4187,
7453,
29922,
1311,
29889,
3090,
29918,
4187,
7453,
29961,
13,
18884,
19875,
29889,
2962,
29918,
2248,
584,
19875,
29889,
355,
29918,
2248,
718,
29871,
29896,
29871,
396,
694,
25621,
13,
9651,
21251,
13,
9651,
4629,
29918,
1643,
7608,
29922,
29812,
29889,
1643,
29892,
13,
9651,
11073,
29918,
7039,
29922,
1311,
29889,
21134,
29918,
7039,
29892,
13,
9651,
563,
29877,
29922,
8824,
29892,
13,
4706,
1723,
13,
13,
4706,
396,
15154,
521,
18801,
515,
2479,
13,
4706,
363,
19875,
29918,
1745,
8238,
297,
6206,
29918,
305,
18801,
29901,
13,
9651,
2479,
29918,
20907,
29889,
5992,
29918,
29812,
29898,
29812,
29918,
1745,
8238,
29897,
13,
13,
4706,
396,
10318,
521,
18801,
1426,
13,
4706,
363,
19875,
29918,
21402,
297,
4784,
29918,
305,
18801,
29901,
13,
9651,
2479,
29918,
20907,
29889,
5504,
29918,
29812,
29918,
726,
29898,
13,
18884,
1583,
29889,
3225,
29961,
13,
462,
1678,
19875,
29918,
21402,
29889,
2962,
29918,
2248,
584,
19875,
29918,
21402,
29889,
355,
29918,
2248,
718,
29871,
29896,
29871,
396,
694,
25621,
13,
18884,
21251,
13,
18884,
19875,
29918,
21402,
29892,
13,
18884,
5217,
29918,
29812,
29918,
265,
29918,
3808,
29922,
1311,
3032,
8143,
29918,
29812,
29892,
13,
9651,
1723,
13,
13,
4706,
396,
17440,
716,
19875,
13,
4706,
565,
2479,
29918,
29812,
29901,
13,
9651,
2479,
29918,
20907,
29889,
4990,
29918,
29812,
29898,
13,
18884,
19875,
29892,
13,
18884,
19875,
29918,
726,
29892,
13,
18884,
1583,
3032,
8143,
29918,
29812,
29892,
13,
9651,
1723,
13,
13,
1678,
822,
903,
8143,
29918,
29812,
29898,
1311,
29892,
2826,
29892,
19875,
1125,
13,
4706,
396,
15154,
19875,
515,
521,
18801,
13,
4706,
1583,
29889,
305,
18801,
29889,
5992,
29918,
29812,
29918,
1609,
29918,
333,
29898,
29812,
29889,
333,
29897,
13,
13,
4706,
396,
15154,
19875,
13,
4706,
2479,
29918,
20907,
29889,
5992,
29918,
29812,
29898,
29812,
29897,
13,
13,
4706,
396,
15154,
1373,
19875,
12141,
13,
4706,
2479,
29918,
20907,
29889,
28970,
29918,
305,
1503,
29898,
13,
9651,
1373,
29918,
4187,
7453,
29922,
1311,
29889,
3090,
29918,
4187,
7453,
29961,
13,
18884,
19875,
29889,
2962,
29918,
2248,
584,
19875,
29889,
355,
29918,
2248,
718,
29871,
29896,
29871,
396,
694,
25621,
13,
9651,
21251,
13,
9651,
4629,
29918,
1643,
7608,
29922,
29812,
29889,
1643,
29892,
13,
9651,
11073,
29918,
7039,
29922,
1311,
29889,
21134,
29918,
7039,
29892,
13,
9651,
563,
29877,
29922,
5574,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
903,
3167,
29918,
3225,
29898,
1311,
29892,
2826,
29892,
5305,
29892,
14383,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
2921,
515,
278,
1857,
1842,
472,
2380,
474,
304,
278,
1842,
472,
2380,
474,
718,
5305,
29889,
13,
4706,
960,
14383,
338,
5852,
29892,
278,
1857,
17195,
338,
451,
2715,
304,
278,
11073,
29889,
13,
4706,
9995,
13,
4706,
396,
3462,
1857,
17195,
304,
278,
11073,
565,
14383,
338,
7700,
13,
4706,
565,
451,
14383,
29901,
13,
9651,
1583,
29889,
21134,
29961,
1311,
29889,
3784,
29918,
2248,
29962,
353,
1583,
29889,
305,
18801,
29889,
517,
29918,
21134,
580,
13,
13,
9651,
396,
10318,
5684,
14391,
1819,
13,
9651,
565,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29901,
13,
18884,
363,
2380,
29892,
1543,
297,
26985,
29898,
1311,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
1125,
13,
462,
1678,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
5975,
29889,
309,
542,
29961,
1311,
29889,
3784,
29918,
2248,
3816,
13,
462,
4706,
1543,
29889,
978,
13,
462,
1678,
4514,
353,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
17664,
29918,
2218,
12922,
29961,
2248,
1822,
1767,
13,
13,
4706,
565,
1583,
29889,
3784,
29918,
2248,
718,
5305,
529,
29871,
29900,
29901,
13,
9651,
736,
13,
13,
4706,
396,
25249,
304,
278,
2446,
1842,
13,
4706,
1583,
29889,
3784,
29918,
2248,
4619,
5305,
13,
13,
4706,
396,
17732,
278,
1857,
2479,
13,
4706,
2479,
29918,
20907,
29889,
8551,
29918,
4990,
580,
13,
13,
4706,
565,
1583,
29889,
3784,
29918,
2248,
6736,
7431,
29898,
1311,
29889,
2616,
13364,
1125,
13,
9651,
396,
2178,
2309,
13,
9651,
1583,
3032,
7620,
580,
13,
9651,
1583,
3032,
28358,
580,
13,
4706,
1683,
29901,
13,
9651,
396,
2866,
14150,
17195,
13,
9651,
3667,
29879,
29889,
10685,
29918,
1454,
29918,
28993,
29898,
1311,
29889,
28993,
29897,
13,
9651,
1583,
29889,
1457,
15638,
29918,
2218,
12922,
29889,
5504,
29898,
20845,
29897,
13,
9651,
1583,
3032,
6735,
403,
580,
13,
13,
1678,
822,
903,
8551,
29918,
3784,
29898,
1311,
29892,
2826,
1125,
13,
4706,
396,
17732,
292,
278,
1857,
1842,
529,
4261,
5293,
278,
604,
29440,
373,
278,
3353,
1842,
29889,
13,
4706,
1857,
29918,
1643,
7608,
353,
1583,
29889,
8391,
29918,
1643,
7608,
13,
4706,
1583,
29889,
8391,
29918,
1643,
7608,
353,
6213,
13,
4706,
1583,
29889,
1643,
29918,
2962,
29918,
2248,
353,
29871,
29900,
13,
4706,
1583,
3032,
1643,
895,
29898,
8516,
29892,
7431,
29898,
1311,
29889,
3225,
29897,
448,
29871,
29896,
29897,
13,
4706,
1583,
29889,
8391,
29918,
1643,
7608,
353,
1857,
29918,
1643,
7608,
13,
13,
1678,
822,
903,
7620,
29898,
1311,
29892,
2826,
29922,
8516,
29892,
934,
29918,
2084,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
317,
5989,
278,
1857,
2106,
310,
278,
1034,
13364,
322,
278,
11073,
964,
263,
11799,
29889,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
396,
16913,
934,
297,
2224,
13,
9651,
565,
451,
934,
29918,
2084,
29901,
13,
18884,
934,
29918,
2084,
353,
1583,
29889,
7620,
29918,
2084,
13,
9651,
934,
29918,
2084,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
1445,
29918,
2084,
29897,
13,
9651,
3667,
29879,
29889,
18317,
29918,
517,
29918,
7638,
29898,
13,
18884,
1583,
29889,
2616,
13364,
29892,
1583,
29889,
21134,
29892,
1583,
29889,
1202,
3245,
29918,
4905,
29879,
29918,
5975,
29892,
934,
29918,
2084,
13,
9651,
1723,
13,
13,
9651,
396,
17440,
2551,
304,
579,
13,
9651,
2479,
29918,
20907,
29889,
4294,
29918,
517,
579,
29898,
13,
18884,
10191,
29922,
29888,
29908,
2283,
8472,
7160,
297,
529,
29890,
26208,
1445,
29918,
2084,
16040,
29890,
29958,
1738,
613,
2551,
29922,
5574,
13,
9651,
1723,
13,
4706,
5174,
8960,
408,
4589,
29901,
13,
9651,
396,
17440,
1059,
304,
579,
411,
1059,
2643,
13,
9651,
2479,
29918,
20907,
29889,
4294,
29918,
517,
579,
29898,
7645,
29922,
710,
29898,
3127,
511,
2551,
29922,
8824,
29897,
13,
13,
1678,
822,
903,
28358,
29898,
1311,
29892,
2826,
29922,
8516,
1125,
13,
4706,
396,
17440,
1095,
4315,
13,
4706,
2479,
29918,
20907,
29889,
8551,
29918,
4990,
580,
13,
4706,
2479,
29918,
20907,
29889,
4990,
29918,
28358,
29918,
726,
29898,
13,
9651,
1583,
29889,
3784,
29918,
2248,
29892,
7431,
29898,
1311,
29889,
2616,
13364,
511,
1583,
29889,
2962,
29918,
2248,
13,
4706,
1723,
13,
2
] |
beanstalktop.py | OldhamMade/beanstalktop | 4 | 1600019 | <reponame>OldhamMade/beanstalktop
#!/bin/python
import curses
import optparse
import select
import sys
import errno
import beanstalkc
class BeanstalkTopUI(object):
def __init__(self, win, options):
self.win = win
self.options = options
self.resize()
try:
curses.use_default_colors()
curses.start_color()
curses.curs_set(0)
except curses.error:
pass
self._connection = None
self.default_overview = dict(
(i, '-') for i in (
'pid',
'total-jobs',
'current-connections',
'current-producers',
'current-workers',
'current-tubes',
'current-jobs-ready',
'current-jobs-urgent',
'current-jobs-buried',
'current-jobs-reserved'
))
self.default_row = dict(
(i, '-') for i in (
'current-jobs-buried',
'current-jobs-delayed',
'current-jobs-ready',
'current-jobs-reserved',
'current-jobs-urgent'
))
self.default_row.update({'name': 'default'})
def _get_connection(self):
return beanstalkc.Connection(host=self.options.host, port=int(self.options.port))
if not self._connection:
try:
self._connection = beanstalkc.Connection(host=self.options.host, port=int(self.options.port))
except beanstalkc.SocketError:
self.win.erase()
raise SystemExit('Host {0} not contactable on port {1}'.format(
self.options.host,
self.options.port
))
return self._connection
connection = property(_get_connection)
def _format_uptime(self, seconds):
hours, remainder = divmod(seconds, 3600)
minutes, seconds = divmod(remainder, 60)
return '{0}h {1}m {2}s'.format(hours, minutes, seconds)
def run(self):
poll = select.poll()
poll.register(sys.stdin.fileno(), select.POLLIN | select.POLLPRI)
while 1:
self.resize()
self.refresh_display()
try:
events = poll.poll(self.options.delay_seconds * 1000.0)
except select.error as e:
if e.args and e.args[0] == errno.EINTR:
events = 0
else:
raise
except KeyboardInterrupt:
break
if events:
key = self.win.getch()
self.handle_key(key)
def handle_key(self, key):
key_bindings = {
ord('q'): lambda: sys.exit(0),
ord('Q'): lambda: sys.exit(0),
}
action = key_bindings.get(key, lambda: None)
action()
def resize(self):
self.height, self.width = self.win.getmaxyx()
def refresh_display(self):
self.win.erase()
titles = (
'TUBE',
'READY',
'URGENT',
'RESRVD',
'DELAYD',
'BURIED',
)
overview, lines = self.get_data()
try:
overview['uptime'] = self._format_uptime(overview.get('uptime', 0))
except:
overview['uptime'] = self._format_uptime(0)
summary_items = [item.format(**overview) for item in (
'PID: {pid}',
'Uptime: {uptime}',
'Total Jobs: {total-jobs}',
'Connections: {current-connections} ({current-producers}:{current-workers})',
'Cur. Tubes: {current-tubes}',
'Cur. Ready: {current-jobs-ready}',
'Cur. Urgent: {current-jobs-urgent}',
'Cur. Buried: {current-jobs-buried}',
'Cur. Reserved: {current-jobs-reserved}',
)]
summary_lines = [
summary_items[0:3],
summary_items[3:6],
summary_items[6:],
]
summarywidth = self.width // max(len(i) for i in summary_lines)
for item in summary_lines:
line = ''.join(s.ljust(summarywidth) for s in item)
self.win.addstr(line.ljust(self.width))
self.win.addstr(' ' * self.width)
colwidth = self.width // len(titles) + 1
titlelen = 0
for i in range(len(titles)):
attr = curses.A_REVERSE
if i is 0:
title = (' ' + titles[i]).ljust(colwidth - 1)
else:
title = (titles[i] + ' ').rjust(colwidth - 1)
titlelen += len(title)
self.win.addstr(title, attr)
self.win.addstr(' ' * (self.width - titlelen), curses.A_REVERSE)
columns = (
'name',
'current-jobs-ready',
'current-jobs-urgent',
'current-jobs-reserved',
'current-jobs-delayed',
'current-jobs-buried',
)
max_lines = self.height - (len(summary_lines) + 1)
sortedlines = sorted(lines, key=lambda x: x['current-jobs-ready'])[::-1]
for i in range(max_lines):
try:
line = sortedlines[i]
except IndexError:
break
row = ''
for c, column in enumerate(columns):
try:
if c is 0:
row += (' ' + str(line[column])).ljust(colwidth - 1)
else:
row += (str(line[column]) + ' ').rjust(colwidth - 1)
except curses.error:
pass
try:
self.win.addstr(row.ljust(self.width))
except curses.error:
pass
self.win.refresh()
def get_data(self):
"""
Main statistics
{
'binlog-current-index': 0,
'binlog-max-size': 10485760,
'binlog-oldest-index': 0,
'binlog-records-migrated': 0,
'binlog-records-written': 0,
'cmd-bury': 580,
'cmd-delete': 15291,
'cmd-ignore': 3,
'cmd-kick': 0,
'cmd-list-tube-used': 0,
'cmd-list-tubes': 1,
'cmd-list-tubes-watched': 0,
'cmd-pause-tube': 0,
'cmd-peek': 0,
'cmd-peek-buried': 0,
'cmd-peek-delayed': 0,
'cmd-peek-ready': 0,
'cmd-put': 19623,
'cmd-release': 0,
'cmd-reserve': 0,
'cmd-reserve-with-timeout': 15873,
'cmd-stats': 1,
'cmd-stats-job': 22719,
'cmd-stats-tube': 0,
'cmd-touch': 0,
'cmd-use': 10603,
'cmd-watch': 5,
'current-connections': 8,
'current-jobs-buried': 580,
'current-jobs-delayed': 0,
'current-jobs-ready': 3750,
'current-jobs-reserved': 2,
'current-jobs-urgent': 0,
'current-producers': 3,
'current-tubes': 8,
'current-waiting': 0,
'current-workers': 3,
'job-timeouts': 0,
'max-job-size': 65535,
'pid': 78938,
'rusage-stime': 2.585616,
'rusage-utime': 1.005601,
'total-connections': 8,
'total-jobs': 19623,
'uptime': 156,
'version': 1.6,
}
Tube-specific statistics
{
'cmd-delete': 892,
'cmd-pause-tube': 0,
'current-jobs-buried': 685,
'current-jobs-delayed': 0,
'current-jobs-ready': 1001,
'current-jobs-reserved': 1,
'current-jobs-urgent': 0
'current-using': 0,
'current-waiting': 0,
'current-watching': 1,
'name': 'default',
'pause': 0,
'pause-time-left': 0,
'total-jobs': 2579,
}
"""
try:
return self.connection.stats(), [self.connection.stats_tube(tube) for tube in self.connection.tubes()]
except (TypeError, beanstalkc.SocketError, beanstalkc.CommandFailed):
return self.default_overview, [self.default_row]
def run_beanstalktop_window(win, options):
ui = BeanstalkTopUI(win, options)
ui.run()
def run_beanstalktop(options):
return curses.wrapper(run_beanstalktop_window, options)
def main():
parser = optparse.OptionParser()
parser.add_option('--host',
dest="host",
default="0.0.0.0",
help="beanstalkd host [0.0.0.0]"
)
parser.add_option('-p', '--port',
dest="port",
default=11300,
help="beanstalkd port [11300]"
)
parser.add_option('-d', '--delay',
dest="delay_seconds",
default=1,
metavar='NUM',
help="delay between refreshes [1s]"
)
options, args = parser.parse_args()
if args:
parser.error('Unexpected arguments: ' + ' '.join(args))
main_loop = lambda: run_beanstalktop(options)
main_loop()
if __name__ == '__main__':
main()
| [
1,
529,
276,
1112,
420,
29958,
21648,
3391,
29924,
1943,
29914,
14471,
11195,
6883,
13,
29937,
14708,
2109,
29914,
4691,
13,
13,
5215,
18580,
267,
13,
5215,
3523,
5510,
13,
5215,
1831,
13,
5215,
10876,
13,
5215,
4589,
1217,
13,
5215,
367,
16220,
2235,
29883,
13,
13,
13,
1990,
1522,
16220,
2235,
7031,
3120,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5401,
29892,
3987,
1125,
13,
4706,
1583,
29889,
5080,
353,
5401,
13,
4706,
1583,
29889,
6768,
353,
3987,
13,
4706,
1583,
29889,
21476,
580,
13,
4706,
1018,
29901,
13,
9651,
18580,
267,
29889,
1509,
29918,
4381,
29918,
27703,
580,
13,
9651,
18580,
267,
29889,
2962,
29918,
2780,
580,
13,
9651,
18580,
267,
29889,
29883,
1295,
29918,
842,
29898,
29900,
29897,
13,
4706,
5174,
18580,
267,
29889,
2704,
29901,
13,
9651,
1209,
13,
13,
4706,
1583,
3032,
9965,
353,
6213,
13,
13,
4706,
1583,
29889,
4381,
29918,
957,
1493,
353,
9657,
29898,
13,
9651,
313,
29875,
29892,
17411,
1495,
363,
474,
297,
313,
13,
18884,
525,
5935,
742,
13,
18884,
525,
7827,
29899,
9057,
29879,
742,
13,
18884,
525,
3784,
29899,
11958,
1953,
742,
13,
18884,
525,
3784,
29899,
5498,
22543,
742,
13,
18884,
525,
3784,
29899,
1287,
414,
742,
13,
18884,
525,
3784,
29899,
29873,
431,
267,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
2040,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
2007,
296,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
690,
9841,
29915,
13,
462,
876,
13,
13,
4706,
1583,
29889,
4381,
29918,
798,
353,
9657,
29898,
13,
9651,
313,
29875,
29892,
17411,
1495,
363,
474,
297,
313,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
18829,
287,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
2040,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
690,
9841,
742,
13,
18884,
525,
3784,
29899,
9057,
29879,
29899,
2007,
296,
29915,
13,
462,
876,
13,
13,
4706,
1583,
29889,
4381,
29918,
798,
29889,
5504,
3319,
29915,
978,
2396,
525,
4381,
29915,
1800,
13,
13,
13,
1678,
822,
903,
657,
29918,
9965,
29898,
1311,
1125,
13,
4706,
736,
367,
16220,
2235,
29883,
29889,
5350,
29898,
3069,
29922,
1311,
29889,
6768,
29889,
3069,
29892,
2011,
29922,
524,
29898,
1311,
29889,
6768,
29889,
637,
876,
13,
4706,
565,
451,
1583,
3032,
9965,
29901,
13,
9651,
1018,
29901,
13,
18884,
1583,
3032,
9965,
353,
367,
16220,
2235,
29883,
29889,
5350,
29898,
3069,
29922,
1311,
29889,
6768,
29889,
3069,
29892,
2011,
29922,
524,
29898,
1311,
29889,
6768,
29889,
637,
876,
13,
9651,
5174,
367,
16220,
2235,
29883,
29889,
11373,
2392,
29901,
13,
18884,
1583,
29889,
5080,
29889,
261,
559,
580,
13,
18884,
12020,
2184,
24365,
877,
8514,
426,
29900,
29913,
451,
6958,
519,
373,
2011,
426,
29896,
29913,
4286,
4830,
29898,
13,
462,
1678,
1583,
29889,
6768,
29889,
3069,
29892,
13,
462,
1678,
1583,
29889,
6768,
29889,
637,
13,
462,
268,
876,
13,
4706,
736,
1583,
3032,
9965,
13,
13,
1678,
3957,
353,
2875,
7373,
657,
29918,
9965,
29897,
13,
13,
13,
1678,
822,
903,
4830,
29918,
21245,
603,
29898,
1311,
29892,
6923,
1125,
13,
4706,
6199,
29892,
21162,
353,
1933,
1545,
29898,
23128,
29892,
29871,
29941,
29953,
29900,
29900,
29897,
13,
4706,
6233,
29892,
6923,
353,
1933,
1545,
29898,
1745,
475,
672,
29892,
29871,
29953,
29900,
29897,
13,
4706,
736,
22372,
29900,
29913,
29882,
426,
29896,
29913,
29885,
426,
29906,
29913,
29879,
4286,
4830,
29898,
29882,
2470,
29892,
6233,
29892,
6923,
29897,
13,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
21180,
353,
1831,
29889,
29886,
3028,
580,
13,
4706,
21180,
29889,
9573,
29898,
9675,
29889,
4172,
262,
29889,
1777,
8154,
3285,
1831,
29889,
13152,
2208,
1177,
891,
1831,
29889,
13152,
2208,
29829,
29897,
13,
4706,
1550,
29871,
29896,
29901,
13,
9651,
1583,
29889,
21476,
580,
13,
9651,
1583,
29889,
22379,
29918,
4990,
580,
13,
13,
9651,
1018,
29901,
13,
18884,
4959,
353,
21180,
29889,
29886,
3028,
29898,
1311,
29889,
6768,
29889,
18829,
29918,
23128,
334,
29871,
29896,
29900,
29900,
29900,
29889,
29900,
29897,
13,
9651,
5174,
1831,
29889,
2704,
408,
321,
29901,
13,
18884,
565,
321,
29889,
5085,
322,
321,
29889,
5085,
29961,
29900,
29962,
1275,
4589,
1217,
29889,
29923,
1177,
5659,
29901,
13,
462,
1678,
4959,
353,
29871,
29900,
13,
18884,
1683,
29901,
13,
462,
1678,
12020,
13,
9651,
5174,
7670,
3377,
4074,
6685,
29901,
13,
18884,
2867,
13,
13,
9651,
565,
4959,
29901,
13,
18884,
1820,
353,
1583,
29889,
5080,
29889,
657,
305,
580,
13,
18884,
1583,
29889,
8411,
29918,
1989,
29898,
1989,
29897,
13,
13,
13,
1678,
822,
4386,
29918,
1989,
29898,
1311,
29892,
1820,
1125,
13,
4706,
1820,
29918,
5355,
886,
353,
426,
13,
9651,
4356,
877,
29939,
29374,
14013,
29901,
10876,
29889,
13322,
29898,
29900,
511,
13,
9651,
4356,
877,
29984,
29374,
14013,
29901,
10876,
29889,
13322,
29898,
29900,
511,
13,
9651,
500,
13,
13,
4706,
3158,
353,
1820,
29918,
5355,
886,
29889,
657,
29898,
1989,
29892,
14013,
29901,
6213,
29897,
13,
4706,
3158,
580,
13,
13,
13,
1678,
822,
19490,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3545,
29892,
1583,
29889,
2103,
353,
1583,
29889,
5080,
29889,
657,
3317,
29891,
29916,
580,
13,
13,
13,
1678,
822,
11086,
29918,
4990,
29898,
1311,
1125,
13,
4706,
1583,
29889,
5080,
29889,
261,
559,
580,
13,
13,
4706,
17735,
353,
313,
13,
9651,
525,
29911,
7466,
29923,
742,
13,
9651,
525,
16310,
29979,
742,
13,
9651,
525,
4574,
29954,
3919,
742,
13,
9651,
525,
1525,
14098,
10699,
742,
13,
9651,
525,
2287,
18799,
29928,
742,
13,
9651,
525,
7838,
3960,
3352,
742,
13,
9651,
1723,
13,
13,
4706,
975,
1493,
29892,
3454,
353,
1583,
29889,
657,
29918,
1272,
580,
13,
13,
4706,
1018,
29901,
13,
9651,
975,
1493,
1839,
21245,
603,
2033,
353,
1583,
3032,
4830,
29918,
21245,
603,
29898,
957,
1493,
29889,
657,
877,
21245,
603,
742,
29871,
29900,
876,
13,
4706,
5174,
29901,
13,
9651,
975,
1493,
1839,
21245,
603,
2033,
353,
1583,
3032,
4830,
29918,
21245,
603,
29898,
29900,
29897,
13,
13,
4706,
15837,
29918,
7076,
353,
518,
667,
29889,
4830,
29898,
1068,
957,
1493,
29897,
363,
2944,
297,
313,
13,
9651,
525,
29925,
1367,
29901,
426,
5935,
29913,
742,
13,
9651,
525,
29965,
415,
603,
29901,
426,
21245,
603,
29913,
742,
13,
9651,
525,
11536,
17163,
29879,
29901,
426,
7827,
29899,
9057,
29879,
29913,
742,
13,
9651,
525,
20971,
1953,
29901,
426,
3784,
29899,
11958,
1953,
29913,
21313,
3784,
29899,
5498,
22543,
6177,
29912,
3784,
29899,
1287,
414,
1800,
742,
13,
9651,
525,
23902,
29889,
323,
431,
267,
29901,
426,
3784,
29899,
29873,
431,
267,
29913,
742,
13,
9651,
525,
23902,
29889,
830,
3714,
29901,
426,
3784,
29899,
9057,
29879,
29899,
2040,
29913,
742,
13,
9651,
525,
23902,
29889,
8918,
5362,
29901,
426,
3784,
29899,
9057,
29879,
29899,
2007,
296,
29913,
742,
13,
9651,
525,
23902,
29889,
6640,
1000,
29901,
426,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
29913,
742,
13,
9651,
525,
23902,
29889,
2538,
9841,
29901,
426,
3784,
29899,
9057,
29879,
29899,
690,
9841,
29913,
742,
13,
9651,
1723,
29962,
13,
13,
4706,
15837,
29918,
9012,
353,
518,
13,
9651,
15837,
29918,
7076,
29961,
29900,
29901,
29941,
1402,
13,
9651,
15837,
29918,
7076,
29961,
29941,
29901,
29953,
1402,
13,
9651,
15837,
29918,
7076,
29961,
29953,
29901,
1402,
13,
9651,
4514,
13,
13,
4706,
15837,
2103,
353,
1583,
29889,
2103,
849,
4236,
29898,
2435,
29898,
29875,
29897,
363,
474,
297,
15837,
29918,
9012,
29897,
13,
13,
4706,
363,
2944,
297,
15837,
29918,
9012,
29901,
13,
9651,
1196,
353,
525,
4286,
7122,
29898,
29879,
29889,
29880,
5143,
29898,
7727,
2103,
29897,
363,
269,
297,
2944,
29897,
13,
9651,
1583,
29889,
5080,
29889,
1202,
710,
29898,
1220,
29889,
29880,
5143,
29898,
1311,
29889,
2103,
876,
13,
13,
4706,
1583,
29889,
5080,
29889,
1202,
710,
877,
525,
334,
1583,
29889,
2103,
29897,
13,
13,
4706,
784,
2103,
353,
1583,
29889,
2103,
849,
7431,
29898,
23545,
793,
29897,
718,
29871,
29896,
13,
13,
4706,
3611,
2435,
353,
29871,
29900,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
23545,
793,
22164,
13,
9651,
12421,
353,
18580,
267,
29889,
29909,
29918,
1525,
5348,
1660,
13,
13,
9651,
565,
474,
338,
29871,
29900,
29901,
13,
18884,
3611,
353,
6702,
525,
718,
17735,
29961,
29875,
14664,
29880,
5143,
29898,
1054,
2103,
448,
29871,
29896,
29897,
13,
9651,
1683,
29901,
13,
18884,
3611,
353,
313,
23545,
793,
29961,
29875,
29962,
718,
525,
525,
467,
29878,
5143,
29898,
1054,
2103,
448,
29871,
29896,
29897,
13,
13,
9651,
3611,
2435,
4619,
7431,
29898,
3257,
29897,
13,
9651,
1583,
29889,
5080,
29889,
1202,
710,
29898,
3257,
29892,
12421,
29897,
13,
13,
4706,
1583,
29889,
5080,
29889,
1202,
710,
877,
525,
334,
313,
1311,
29889,
2103,
448,
3611,
2435,
511,
18580,
267,
29889,
29909,
29918,
1525,
5348,
1660,
29897,
13,
13,
4706,
4341,
353,
313,
13,
9651,
525,
978,
742,
13,
9651,
525,
3784,
29899,
9057,
29879,
29899,
2040,
742,
13,
9651,
525,
3784,
29899,
9057,
29879,
29899,
2007,
296,
742,
13,
9651,
525,
3784,
29899,
9057,
29879,
29899,
690,
9841,
742,
13,
9651,
525,
3784,
29899,
9057,
29879,
29899,
18829,
287,
742,
13,
9651,
525,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
742,
13,
9651,
1723,
13,
13,
4706,
4236,
29918,
9012,
353,
1583,
29889,
3545,
448,
313,
2435,
29898,
7727,
29918,
9012,
29897,
718,
29871,
29896,
29897,
13,
13,
4706,
12705,
9012,
353,
12705,
29898,
9012,
29892,
1820,
29922,
2892,
921,
29901,
921,
1839,
3784,
29899,
9057,
29879,
29899,
2040,
2033,
9601,
1057,
29899,
29896,
29962,
13,
13,
4706,
363,
474,
297,
3464,
29898,
3317,
29918,
9012,
1125,
13,
9651,
1018,
29901,
13,
18884,
1196,
353,
12705,
9012,
29961,
29875,
29962,
13,
9651,
5174,
11374,
2392,
29901,
13,
18884,
2867,
13,
9651,
1948,
353,
6629,
13,
9651,
363,
274,
29892,
1897,
297,
26985,
29898,
13099,
1125,
13,
18884,
1018,
29901,
13,
462,
1678,
565,
274,
338,
29871,
29900,
29901,
13,
462,
4706,
1948,
4619,
6702,
525,
718,
851,
29898,
1220,
29961,
4914,
2314,
467,
29880,
5143,
29898,
1054,
2103,
448,
29871,
29896,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1948,
4619,
313,
710,
29898,
1220,
29961,
4914,
2314,
718,
525,
525,
467,
29878,
5143,
29898,
1054,
2103,
448,
29871,
29896,
29897,
13,
13,
18884,
5174,
18580,
267,
29889,
2704,
29901,
13,
462,
1678,
1209,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
5080,
29889,
1202,
710,
29898,
798,
29889,
29880,
5143,
29898,
1311,
29889,
2103,
876,
13,
9651,
5174,
18580,
267,
29889,
2704,
29901,
13,
18884,
1209,
13,
13,
13,
4706,
1583,
29889,
5080,
29889,
22379,
580,
13,
13,
13,
1678,
822,
679,
29918,
1272,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
4241,
13964,
13,
4706,
426,
13,
4706,
525,
2109,
1188,
29899,
3784,
29899,
2248,
2396,
29871,
29900,
29892,
13,
4706,
525,
2109,
1188,
29899,
3317,
29899,
2311,
2396,
29871,
29896,
29900,
29946,
29947,
29945,
29955,
29953,
29900,
29892,
13,
4706,
525,
2109,
1188,
29899,
1025,
342,
29899,
2248,
2396,
29871,
29900,
29892,
13,
4706,
525,
2109,
1188,
29899,
3757,
4339,
29899,
26983,
630,
2396,
29871,
29900,
29892,
13,
4706,
525,
2109,
1188,
29899,
3757,
4339,
29899,
17625,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
11059,
2396,
29871,
29945,
29947,
29900,
29892,
13,
4706,
525,
9006,
29899,
8143,
2396,
29871,
29896,
29945,
29906,
29929,
29896,
29892,
13,
4706,
525,
9006,
29899,
17281,
2396,
29871,
29941,
29892,
13,
4706,
525,
9006,
29899,
29895,
860,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
1761,
29899,
29873,
4003,
29899,
3880,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
1761,
29899,
29873,
431,
267,
2396,
29871,
29896,
29892,
13,
4706,
525,
9006,
29899,
1761,
29899,
29873,
431,
267,
29899,
12344,
287,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
29886,
1071,
29899,
29873,
4003,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
412,
1416,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
412,
1416,
29899,
8399,
1000,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
412,
1416,
29899,
18829,
287,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
412,
1416,
29899,
2040,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
649,
2396,
29871,
29896,
29929,
29953,
29906,
29941,
29892,
13,
4706,
525,
9006,
29899,
14096,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
690,
7143,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
690,
7143,
29899,
2541,
29899,
15619,
2396,
29871,
29896,
29945,
29947,
29955,
29941,
29892,
13,
4706,
525,
9006,
29899,
16202,
2396,
29871,
29896,
29892,
13,
4706,
525,
9006,
29899,
16202,
29899,
9057,
2396,
29871,
29906,
29906,
29955,
29896,
29929,
29892,
13,
4706,
525,
9006,
29899,
16202,
29899,
29873,
4003,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
16747,
2396,
29871,
29900,
29892,
13,
4706,
525,
9006,
29899,
1509,
2396,
29871,
29896,
29900,
29953,
29900,
29941,
29892,
13,
4706,
525,
9006,
29899,
12344,
2396,
29871,
29945,
29892,
13,
4706,
525,
3784,
29899,
11958,
1953,
2396,
29871,
29947,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
2396,
29871,
29945,
29947,
29900,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
18829,
287,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
2040,
2396,
29871,
29941,
29955,
29945,
29900,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
690,
9841,
2396,
29871,
29906,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
2007,
296,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
5498,
22543,
2396,
29871,
29941,
29892,
13,
4706,
525,
3784,
29899,
29873,
431,
267,
2396,
29871,
29947,
29892,
13,
4706,
525,
3784,
29899,
10685,
292,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
1287,
414,
2396,
29871,
29941,
29892,
13,
4706,
525,
9057,
29899,
15619,
29879,
2396,
29871,
29900,
29892,
13,
4706,
525,
3317,
29899,
9057,
29899,
2311,
2396,
29871,
29953,
29945,
29945,
29941,
29945,
29892,
13,
4706,
525,
5935,
2396,
29871,
29955,
29947,
29929,
29941,
29947,
29892,
13,
4706,
525,
15816,
482,
29899,
303,
603,
2396,
29871,
29906,
29889,
29945,
29947,
29945,
29953,
29896,
29953,
29892,
13,
4706,
525,
15816,
482,
29899,
329,
603,
2396,
29871,
29896,
29889,
29900,
29900,
29945,
29953,
29900,
29896,
29892,
13,
4706,
525,
7827,
29899,
11958,
1953,
2396,
29871,
29947,
29892,
13,
4706,
525,
7827,
29899,
9057,
29879,
2396,
29871,
29896,
29929,
29953,
29906,
29941,
29892,
13,
4706,
525,
21245,
603,
2396,
29871,
29896,
29945,
29953,
29892,
13,
4706,
525,
3259,
2396,
29871,
29896,
29889,
29953,
29892,
13,
4706,
500,
13,
13,
4706,
323,
4003,
29899,
14940,
13964,
13,
4706,
426,
13,
4706,
525,
9006,
29899,
8143,
2396,
29871,
29947,
29929,
29906,
29892,
13,
4706,
525,
9006,
29899,
29886,
1071,
29899,
29873,
4003,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
8399,
1000,
2396,
29871,
29953,
29947,
29945,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
18829,
287,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
2040,
2396,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
690,
9841,
2396,
29871,
29896,
29892,
13,
4706,
525,
3784,
29899,
9057,
29879,
29899,
2007,
296,
2396,
29871,
29900,
13,
4706,
525,
3784,
29899,
4746,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
10685,
292,
2396,
29871,
29900,
29892,
13,
4706,
525,
3784,
29899,
12344,
292,
2396,
29871,
29896,
29892,
13,
4706,
525,
978,
2396,
525,
4381,
742,
13,
4706,
525,
29886,
1071,
2396,
29871,
29900,
29892,
13,
4706,
525,
29886,
1071,
29899,
2230,
29899,
1563,
2396,
29871,
29900,
29892,
13,
4706,
525,
7827,
29899,
9057,
29879,
2396,
29871,
29906,
29945,
29955,
29929,
29892,
13,
4706,
500,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
29889,
9965,
29889,
16202,
3285,
518,
1311,
29889,
9965,
29889,
16202,
29918,
29873,
4003,
29898,
29873,
4003,
29897,
363,
260,
4003,
297,
1583,
29889,
9965,
29889,
29873,
431,
267,
580,
29962,
13,
4706,
5174,
313,
1542,
2392,
29892,
367,
16220,
2235,
29883,
29889,
11373,
2392,
29892,
367,
16220,
2235,
29883,
29889,
6255,
17776,
1125,
13,
9651,
736,
1583,
29889,
4381,
29918,
957,
1493,
29892,
518,
1311,
29889,
4381,
29918,
798,
29962,
13,
13,
13,
13,
1753,
1065,
29918,
14471,
11195,
6883,
29918,
7165,
29898,
5080,
29892,
3987,
1125,
13,
1678,
14313,
353,
1522,
16220,
2235,
7031,
3120,
29898,
5080,
29892,
3987,
29897,
13,
1678,
14313,
29889,
3389,
580,
13,
13,
13,
1753,
1065,
29918,
14471,
11195,
6883,
29898,
6768,
1125,
13,
1678,
736,
18580,
267,
29889,
17699,
29898,
3389,
29918,
14471,
11195,
6883,
29918,
7165,
29892,
3987,
29897,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
13812,
353,
3523,
5510,
29889,
8375,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
3385,
877,
489,
3069,
742,
13,
462,
418,
2731,
543,
3069,
613,
13,
462,
418,
2322,
543,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
613,
13,
462,
418,
1371,
543,
14471,
303,
2235,
29881,
3495,
518,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
18017,
13,
462,
418,
1723,
13,
1678,
13812,
29889,
1202,
29918,
3385,
877,
29899,
29886,
742,
525,
489,
637,
742,
13,
462,
418,
2731,
543,
637,
613,
13,
462,
418,
2322,
29922,
29896,
29896,
29941,
29900,
29900,
29892,
13,
462,
418,
1371,
543,
14471,
303,
2235,
29881,
2011,
518,
29896,
29896,
29941,
29900,
29900,
18017,
13,
462,
418,
1723,
13,
1678,
13812,
29889,
1202,
29918,
3385,
877,
29899,
29881,
742,
525,
489,
18829,
742,
13,
462,
418,
2731,
543,
18829,
29918,
23128,
613,
13,
462,
418,
2322,
29922,
29896,
29892,
13,
462,
418,
1539,
485,
279,
2433,
13967,
742,
13,
462,
418,
1371,
543,
18829,
1546,
11086,
267,
518,
29896,
29879,
18017,
13,
462,
418,
1723,
13,
13,
1678,
3987,
29892,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
565,
6389,
29901,
13,
4706,
13812,
29889,
2704,
877,
29965,
13996,
6021,
6273,
29901,
525,
718,
525,
15300,
7122,
29898,
5085,
876,
13,
13,
1678,
1667,
29918,
7888,
353,
14013,
29901,
1065,
29918,
14471,
11195,
6883,
29898,
6768,
29897,
13,
1678,
1667,
29918,
7888,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
tinyq/__init__.py | mozillazg/tinyq | 14 | 19808 | # -*- coding: utf-8 -*-
from tinyq.app import Application # noqa
__version__ = '0.3.0'
__author__ = 'mozillazg'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2017 mozillazg'
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
21577,
29939,
29889,
932,
1053,
8427,
29871,
396,
694,
25621,
13,
13,
1649,
3259,
1649,
353,
525,
29900,
29889,
29941,
29889,
29900,
29915,
13,
1649,
8921,
1649,
353,
525,
13025,
29920,
29887,
29915,
13,
1649,
506,
1947,
1649,
353,
525,
26349,
29915,
13,
1649,
8552,
1266,
1649,
353,
525,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
286,
2112,
2911,
29920,
29887,
29915,
13,
2
] |
mic/hej.py | safl/offload | 0 | 1611093 | #!/usr/bin/env python
import numpy as np
import time
if "flush" in dir(np):
np.flush()
begin = time.time()
#a = np.sum(((np.ones(100)+1.0)*2.0)/2.0)
a = np.sum(np.random.random(50000000))
#a = np.multiply.accumulate(np.ones((8,8), dtype=np.float32))
print(a)
if "flush" in dir(np):
np.flush()
end = time.time() - begin
print(end)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
12655,
408,
7442,
13,
5215,
931,
13,
13,
361,
376,
23126,
29908,
297,
4516,
29898,
9302,
1125,
13,
1678,
7442,
29889,
23126,
580,
13,
463,
353,
931,
29889,
2230,
580,
13,
13,
29937,
29874,
353,
7442,
29889,
2083,
3552,
29898,
9302,
29889,
2873,
29898,
29896,
29900,
29900,
7240,
29896,
29889,
29900,
11877,
29906,
29889,
29900,
6802,
29906,
29889,
29900,
29897,
13,
29874,
353,
7442,
29889,
2083,
29898,
9302,
29889,
8172,
29889,
8172,
29898,
29945,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
876,
13,
29937,
29874,
353,
7442,
29889,
18056,
368,
29889,
5753,
398,
5987,
29898,
9302,
29889,
2873,
3552,
29947,
29892,
29947,
511,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
876,
13,
2158,
29898,
29874,
29897,
13,
13,
361,
376,
23126,
29908,
297,
4516,
29898,
9302,
1125,
13,
1678,
7442,
29889,
23126,
580,
13,
13,
355,
353,
931,
29889,
2230,
580,
448,
3380,
13,
13,
2158,
29898,
355,
29897,
13,
2
] |
catalog/bindings/gmd/vertical_cs_2.py | NIVANorge/s-enda-playground | 0 | 101559 | from dataclasses import dataclass
from bindings.gmd.vertical_csproperty_type import VerticalCspropertyType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class VerticalCs2(VerticalCspropertyType):
"""
gml:verticalCS is an association role to the vertical coordinate system
used by this CRS.
"""
class Meta:
name = "verticalCS"
namespace = "http://www.opengis.net/gml"
| [
1,
515,
848,
13203,
1053,
848,
1990,
13,
3166,
7868,
886,
29889,
29887,
3487,
29889,
18575,
29918,
2395,
6799,
29918,
1853,
1053,
11198,
936,
29907,
29879,
6799,
1542,
13,
13,
1649,
5813,
5550,
11538,
1649,
353,
376,
1124,
597,
1636,
29889,
459,
996,
275,
29889,
1212,
29914,
29887,
828,
29908,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
11198,
936,
29907,
29879,
29906,
29898,
29270,
29907,
29879,
6799,
1542,
1125,
13,
1678,
9995,
13,
1678,
330,
828,
29901,
18575,
9295,
338,
385,
15477,
6297,
304,
278,
11408,
14821,
1788,
13,
1678,
1304,
491,
445,
315,
12445,
29889,
13,
1678,
9995,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
1024,
353,
376,
18575,
9295,
29908,
13,
4706,
7397,
353,
376,
1124,
597,
1636,
29889,
459,
996,
275,
29889,
1212,
29914,
29887,
828,
29908,
13,
2
] |
nwswx/exceptions.py | stacybrock/nws-wx-client | 1 | 95565 | """
WxAPI Exceptions
"""
class WxAPIException(Exception):
"""Base class for exceptions in this module"""
def __init__(self, message):
self.message = message
class InvalidFormat(WxAPIException):
"""The format provided is invalid"""
class FormatNotAllowed(WxAPIException):
"""The format provided is not allowed by this endpoint"""
class APIError(WxAPIException):
"""The API returned an error"""
| [
1,
9995,
13,
29956,
29916,
8787,
8960,
29879,
13,
15945,
29908,
13,
13,
1990,
399,
29916,
8787,
2451,
29898,
2451,
1125,
13,
1678,
9995,
5160,
770,
363,
15283,
297,
445,
3883,
15945,
29908,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2643,
1125,
13,
4706,
1583,
29889,
4906,
353,
2643,
13,
13,
1990,
21403,
5809,
29898,
29956,
29916,
8787,
2451,
1125,
13,
1678,
9995,
1576,
3402,
4944,
338,
8340,
15945,
29908,
13,
13,
1990,
19191,
3664,
15930,
287,
29898,
29956,
29916,
8787,
2451,
1125,
13,
1678,
9995,
1576,
3402,
4944,
338,
451,
6068,
491,
445,
16248,
15945,
29908,
13,
13,
1990,
3450,
2392,
29898,
29956,
29916,
8787,
2451,
1125,
13,
1678,
9995,
1576,
3450,
4133,
385,
1059,
15945,
29908,
13,
2
] |
cryptoPortfolioManager.py | srivathsanvenkateswaran/CryptoPortfolioManager | 5 | 189664 | import csv
from termcolor import colored
from pycoingecko import CoinGeckoAPI
import sys
# Handling system args
if(len(sys.argv) > 1):
if(sys.argv[1] in ['-h', '--help']):
print(
'''Usage: python3 cryptoPortfolioManager.py [OPTION]...
Crypto Portfolio Manager - A CLI Tool to keep track of your crypto Portfolio.
List of supported long options and short options.
-h, --help Display the Help command.
-w, --weightage Show the crypto Portfolio along with Coin Weightage.
'''
)
sys.exit()
cg = CoinGeckoAPI()
sheetPath = '/home/srivathsan/Documents/Important Documents/crypto_portfolio.csv'
fiatCurrency = 'inr'
def getUSTaxBacket(totalProfits):
if totalProfits <= 40400:
return 1
elif totalProfits >= 40401 and totalProfits <= 445850:
return 0.85
elif totalProfits >= 445851:
return 0.8
def getTaxMultiplier(totalProfits):
if fiatCurrency == 'inr':
taxMultiplier = 0.4
elif fiatCurrency == 'usd':
taxMultiplier = getUSTaxBacket(totalProfits=totalProfits)
def getPrice(cryptoId):
return cg.get_price(ids=cryptoId, vs_currencies=fiatCurrency)
fields = []
rows = []
with open(sheetPath, 'r') as file:
csvreader = csv.reader(file)
fields = next(csvreader)
fields[0] = 'Coin'
for row in csvreader:
rows.append(row)
colors = ['yellow', 'green', 'red', 'white', 'cyan']
spaces = []
fields.append('Invested')
fields.append('Current Value')
fields.append('Gains (%)')
for field in fields:
if len(field) < 5:
spaces.append(5)
elif len(field) < 10:
spaces.append(10)
else:
spaces.append(15)
for field in fields:
if field == 'Coingecko ID':
continue
print(colored(" "*(spaces[fields.index(field)]-len(field)) + field + " |", colors[0]), end='')
print('\n')
ticker = []
coins = []
quantity = []
buyingAverage = []
for row in rows:
ticker.append(row[0])
coins.append(row[1])
quantity.append(float(row[2]))
buyingAverage.append(float(row[3]))
current = [round(quantity[i]*getPrice(coins[i])[coins[i]][fiatCurrency], 2) for i in range(len(coins))]
invested = [round(quantity[i]*buyingAverage[i], 2) for i in range(len(coins))]
profits = [current[i]-invested[i] for i in range(len(coins))]
gains = [round(profits[i]/invested[i] * 100, 2) for i in range(len(coins))]
for i in range(len(coins)):
if profits[i]>0:
color = colors[1]
elif profits[i] == 0:
color = colors[3]
else:
color = colors[2]
print(colored(ticker[i] + " "*(spaces[0]-len(ticker[i])) + ' |' + " "*(spaces[2]-len(str(quantity[i]))) + str(quantity[i]) + ' |' + " "*(spaces[3]-len(str(buyingAverage[i]))) + str(buyingAverage[i]) + ' |' + " "*(spaces[4]-len(str(invested[i]))) + str(invested[i]) + ' |' + " "*(spaces[5]-len(str(current[i]))) + str(current[i]) + ' |' + " "*(spaces[6]-len(str(gains[i]) + '%')) + str(gains[i]) + '%' + ' |', color=color))
print('')
totalInvested = round(sum(invested), 2)
totalCurrent = round(sum(current), 2)
totalProfits = round(totalCurrent - totalInvested, 2)
print(colored(' '*20 + f'Total Invested: {totalInvested}', colors[0]))
print(colored(' '*20 + f'Total Current: {totalCurrent}', colors[0]))
if totalProfits > 0:
clr = colors[1]
upOrDown = 'up'
else:
clr = colors[2]
upOrDown = 'down'
print(colored(' '*20 + f'Total Profits: {totalProfits}', clr))
print(colored(' '*20 + f'Portfolio {upOrDown} by ', colors[0]), end="")
print(colored(f'{round(totalProfits/totalInvested * 100, 2)} %', clr))
print()
netProfit = totalProfits
if upOrDown == 'up':
netProfit *= getTaxMultiplier(totalProfits=totalProfits)
print(colored(' '*20 + f'Net Profits: {netProfit}', clr))
print(colored(' '*20 + f'Net Portfolio {upOrDown} by ', colors[0]), end="")
print(colored(f'{round(netProfit/totalInvested * 100, 2)} %', clr))
print()
if(len(sys.argv) > 1):
if(sys.argv[1] in ['-w', '--weightage']):
investedDict = {}
for i in range(0, len(ticker)):
investedDict[ticker[i]] = invested[i]
investedDict = dict(sorted(investedDict.items(), key=lambda item: item[1]))
investedDict = dict(reversed(list(investedDict.items())))
print(colored(' '*10 + 'Portfolio Weightage: ', colors[1]))
print()
print(' '*10 + 'Coin | Invested | Share ')
for key, value in investedDict.items():
coinShare = str(round(value/totalInvested * 100, 2))
print(colored(' '*10 + key + ' '*(6-len(key)), colors[0]) + '|' + colored(' '*(10-len(str(value))) + str(value), colors[0]), end = " ")
print('|' + colored(' '*(7-len(coinShare)) + coinShare + ' %', colors[4]))
| [
1,
1053,
11799,
13,
3166,
1840,
2780,
1053,
28684,
13,
3166,
11451,
1111,
19144,
27604,
1053,
3189,
262,
7999,
27604,
8787,
13,
5215,
10876,
13,
13,
29937,
5166,
1847,
1788,
6389,
13,
361,
29898,
2435,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29896,
1125,
13,
1678,
565,
29898,
9675,
29889,
19218,
29961,
29896,
29962,
297,
6024,
29899,
29882,
742,
525,
489,
8477,
2033,
1125,
13,
4706,
1596,
29898,
13,
9651,
14550,
27573,
29901,
3017,
29941,
274,
17929,
2290,
25648,
3260,
29889,
2272,
518,
14094,
2725,
29962,
856,
308,
13,
29907,
17929,
3371,
25648,
15629,
448,
319,
24492,
21704,
304,
3013,
5702,
310,
596,
274,
17929,
3371,
25648,
29889,
13,
13,
1293,
310,
6969,
1472,
3987,
322,
3273,
3987,
29889,
13,
29871,
448,
29882,
29892,
29871,
1192,
8477,
308,
17440,
278,
22305,
1899,
29889,
13,
29871,
448,
29893,
29892,
1192,
7915,
482,
268,
7704,
278,
274,
17929,
3371,
25648,
3412,
411,
3189,
262,
1334,
523,
482,
29889,
13,
9651,
14550,
13,
4706,
1723,
13,
4706,
10876,
29889,
13322,
580,
13,
13,
29883,
29887,
353,
3189,
262,
7999,
27604,
8787,
580,
13,
9855,
2605,
353,
8207,
5184,
29914,
29879,
1150,
493,
28455,
29914,
20128,
29914,
17518,
424,
10854,
29879,
29914,
29883,
17929,
29918,
637,
25648,
29889,
7638,
29915,
13,
29888,
7163,
29907,
10880,
353,
525,
262,
29878,
29915,
13,
13,
1753,
679,
17321,
1165,
5841,
300,
29898,
7827,
1184,
29888,
1169,
1125,
13,
1678,
565,
3001,
1184,
29888,
1169,
5277,
29871,
29946,
29900,
29946,
29900,
29900,
29901,
13,
4706,
736,
29871,
29896,
13,
1678,
25342,
3001,
1184,
29888,
1169,
6736,
29871,
29946,
29900,
29946,
29900,
29896,
322,
3001,
1184,
29888,
1169,
5277,
29871,
29946,
29946,
29945,
29947,
29945,
29900,
29901,
13,
4706,
736,
29871,
29900,
29889,
29947,
29945,
13,
1678,
25342,
3001,
1184,
29888,
1169,
6736,
29871,
29946,
29946,
29945,
29947,
29945,
29896,
29901,
13,
4706,
736,
29871,
29900,
29889,
29947,
13,
13,
1753,
679,
29911,
1165,
6857,
666,
4926,
29898,
7827,
1184,
29888,
1169,
1125,
13,
1678,
565,
5713,
271,
29907,
10880,
1275,
525,
262,
29878,
2396,
13,
4706,
8818,
6857,
666,
4926,
353,
29871,
29900,
29889,
29946,
13,
1678,
25342,
5713,
271,
29907,
10880,
1275,
525,
375,
29881,
2396,
13,
4706,
8818,
6857,
666,
4926,
353,
679,
17321,
1165,
5841,
300,
29898,
7827,
1184,
29888,
1169,
29922,
7827,
1184,
29888,
1169,
29897,
13,
13,
1753,
679,
13026,
29898,
29883,
17929,
1204,
1125,
13,
1678,
736,
274,
29887,
29889,
657,
29918,
9175,
29898,
4841,
29922,
29883,
17929,
1204,
29892,
7186,
29918,
21962,
15942,
29922,
29888,
7163,
29907,
10880,
29897,
13,
13,
9621,
353,
5159,
13,
5727,
353,
5159,
13,
2541,
1722,
29898,
9855,
2605,
29892,
525,
29878,
1495,
408,
934,
29901,
13,
1678,
11799,
16950,
353,
11799,
29889,
16950,
29898,
1445,
29897,
13,
1678,
4235,
353,
2446,
29898,
7638,
16950,
29897,
13,
1678,
4235,
29961,
29900,
29962,
353,
525,
7967,
262,
29915,
13,
1678,
363,
1948,
297,
11799,
16950,
29901,
13,
4706,
4206,
29889,
4397,
29898,
798,
29897,
13,
13,
27703,
353,
6024,
29136,
742,
525,
12692,
742,
525,
1127,
742,
525,
10921,
742,
525,
1270,
273,
2033,
13,
22854,
353,
5159,
13,
9621,
29889,
4397,
877,
12165,
2868,
1495,
13,
9621,
29889,
4397,
877,
7583,
7865,
1495,
13,
9621,
29889,
4397,
877,
29954,
2708,
313,
10997,
1495,
13,
1454,
1746,
297,
4235,
29901,
13,
1678,
565,
7431,
29898,
2671,
29897,
529,
29871,
29945,
29901,
13,
4706,
8162,
29889,
4397,
29898,
29945,
29897,
13,
1678,
25342,
7431,
29898,
2671,
29897,
529,
29871,
29896,
29900,
29901,
13,
4706,
8162,
29889,
4397,
29898,
29896,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
8162,
29889,
4397,
29898,
29896,
29945,
29897,
13,
13,
1454,
1746,
297,
4235,
29901,
13,
1678,
565,
1746,
1275,
525,
7967,
19144,
27604,
3553,
2396,
13,
4706,
6773,
13,
1678,
1596,
29898,
2780,
287,
703,
376,
16395,
22854,
29961,
9621,
29889,
2248,
29898,
2671,
4638,
29899,
2435,
29898,
2671,
876,
718,
1746,
718,
376,
891,
613,
11955,
29961,
29900,
11724,
1095,
2433,
1495,
13,
13,
2158,
28909,
29876,
1495,
13,
13,
29873,
6541,
353,
5159,
13,
1111,
1144,
353,
5159,
13,
22640,
353,
5159,
13,
2423,
5414,
29909,
19698,
353,
5159,
13,
13,
1454,
1948,
297,
4206,
29901,
13,
1678,
260,
6541,
29889,
4397,
29898,
798,
29961,
29900,
2314,
13,
1678,
1302,
1144,
29889,
4397,
29898,
798,
29961,
29896,
2314,
13,
1678,
14728,
29889,
4397,
29898,
7411,
29898,
798,
29961,
29906,
12622,
13,
1678,
1321,
5414,
29909,
19698,
29889,
4397,
29898,
7411,
29898,
798,
29961,
29941,
12622,
13,
13,
3784,
353,
518,
14486,
29898,
22640,
29961,
29875,
14178,
657,
13026,
29898,
1111,
1144,
29961,
29875,
2314,
29961,
1111,
1144,
29961,
29875,
29962,
3816,
29888,
7163,
29907,
10880,
1402,
29871,
29906,
29897,
363,
474,
297,
3464,
29898,
2435,
29898,
1111,
1144,
28166,
13,
11569,
2868,
353,
518,
14486,
29898,
22640,
29961,
29875,
14178,
2423,
5414,
29909,
19698,
29961,
29875,
1402,
29871,
29906,
29897,
363,
474,
297,
3464,
29898,
2435,
29898,
1111,
1144,
28166,
13,
23221,
1169,
353,
518,
3784,
29961,
29875,
29962,
29899,
11569,
2868,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
2435,
29898,
1111,
1144,
28166,
13,
29887,
2708,
353,
518,
14486,
29898,
23221,
1169,
29961,
29875,
16261,
11569,
2868,
29961,
29875,
29962,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
29897,
363,
474,
297,
3464,
29898,
2435,
29898,
1111,
1144,
28166,
13,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
1111,
1144,
22164,
13,
1678,
565,
2600,
1169,
29961,
29875,
29962,
29958,
29900,
29901,
13,
4706,
2927,
353,
11955,
29961,
29896,
29962,
13,
1678,
25342,
2600,
1169,
29961,
29875,
29962,
1275,
29871,
29900,
29901,
13,
4706,
2927,
353,
11955,
29961,
29941,
29962,
13,
1678,
1683,
29901,
13,
4706,
2927,
353,
11955,
29961,
29906,
29962,
13,
1678,
1596,
29898,
2780,
287,
29898,
29873,
6541,
29961,
29875,
29962,
718,
376,
376,
16395,
22854,
29961,
29900,
29962,
29899,
2435,
29898,
29873,
6541,
29961,
29875,
12622,
718,
525,
891,
29915,
718,
376,
376,
16395,
22854,
29961,
29906,
29962,
29899,
2435,
29898,
710,
29898,
22640,
29961,
29875,
29962,
4961,
718,
851,
29898,
22640,
29961,
29875,
2314,
718,
525,
891,
29915,
718,
376,
376,
16395,
22854,
29961,
29941,
29962,
29899,
2435,
29898,
710,
29898,
2423,
5414,
29909,
19698,
29961,
29875,
29962,
4961,
718,
851,
29898,
2423,
5414,
29909,
19698,
29961,
29875,
2314,
718,
525,
891,
29915,
718,
376,
376,
16395,
22854,
29961,
29946,
29962,
29899,
2435,
29898,
710,
29898,
11569,
2868,
29961,
29875,
29962,
4961,
718,
851,
29898,
11569,
2868,
29961,
29875,
2314,
718,
525,
891,
29915,
718,
376,
376,
16395,
22854,
29961,
29945,
29962,
29899,
2435,
29898,
710,
29898,
3784,
29961,
29875,
29962,
4961,
718,
851,
29898,
3784,
29961,
29875,
2314,
718,
525,
891,
29915,
718,
376,
376,
16395,
22854,
29961,
29953,
29962,
29899,
2435,
29898,
710,
29898,
29887,
2708,
29961,
29875,
2314,
718,
14210,
8785,
718,
851,
29898,
29887,
2708,
29961,
29875,
2314,
718,
14210,
29915,
718,
525,
891,
742,
2927,
29922,
2780,
876,
13,
13,
2158,
877,
1495,
13,
13,
7827,
12165,
2868,
353,
4513,
29898,
2083,
29898,
11569,
2868,
511,
29871,
29906,
29897,
13,
7827,
7583,
353,
4513,
29898,
2083,
29898,
3784,
511,
29871,
29906,
29897,
13,
7827,
1184,
29888,
1169,
353,
4513,
29898,
7827,
7583,
448,
3001,
12165,
2868,
29892,
29871,
29906,
29897,
13,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
11536,
15518,
2868,
29901,
426,
7827,
12165,
2868,
29913,
742,
11955,
29961,
29900,
12622,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
11536,
9626,
29901,
426,
7827,
7583,
29913,
742,
11955,
29961,
29900,
12622,
13,
361,
3001,
1184,
29888,
1169,
1405,
29871,
29900,
29901,
13,
1678,
1067,
29878,
353,
11955,
29961,
29896,
29962,
13,
1678,
701,
2816,
6767,
353,
525,
786,
29915,
13,
2870,
29901,
13,
1678,
1067,
29878,
353,
11955,
29961,
29906,
29962,
13,
1678,
701,
2816,
6767,
353,
525,
3204,
29915,
13,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
11536,
6175,
1169,
29901,
426,
7827,
1184,
29888,
1169,
29913,
742,
1067,
29878,
876,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
2290,
25648,
426,
786,
2816,
6767,
29913,
491,
13420,
11955,
29961,
29900,
11724,
1095,
543,
1159,
13,
2158,
29898,
2780,
287,
29898,
29888,
29915,
29912,
14486,
29898,
7827,
1184,
29888,
1169,
29914,
7827,
12165,
2868,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
2915,
1273,
742,
1067,
29878,
876,
13,
2158,
580,
13,
13,
1212,
1184,
9202,
353,
3001,
1184,
29888,
1169,
13,
361,
701,
2816,
6767,
1275,
525,
786,
2396,
13,
1678,
7787,
1184,
9202,
334,
29922,
679,
29911,
1165,
6857,
666,
4926,
29898,
7827,
1184,
29888,
1169,
29922,
7827,
1184,
29888,
1169,
29897,
13,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
6779,
6175,
1169,
29901,
426,
1212,
1184,
9202,
29913,
742,
1067,
29878,
876,
13,
2158,
29898,
2780,
287,
877,
525,
29930,
29906,
29900,
718,
285,
29915,
6779,
3371,
25648,
426,
786,
2816,
6767,
29913,
491,
13420,
11955,
29961,
29900,
11724,
1095,
543,
1159,
13,
2158,
29898,
2780,
287,
29898,
29888,
29915,
29912,
14486,
29898,
1212,
1184,
9202,
29914,
7827,
12165,
2868,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
2915,
1273,
742,
1067,
29878,
876,
13,
2158,
580,
13,
13,
361,
29898,
2435,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29896,
1125,
13,
1678,
565,
29898,
9675,
29889,
19218,
29961,
29896,
29962,
297,
6024,
29899,
29893,
742,
525,
489,
7915,
482,
2033,
1125,
13,
4706,
2437,
2868,
21533,
353,
6571,
13,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
29873,
6541,
22164,
13,
9651,
2437,
2868,
21533,
29961,
29873,
6541,
29961,
29875,
5262,
353,
2437,
2868,
29961,
29875,
29962,
13,
13,
4706,
2437,
2868,
21533,
353,
9657,
29898,
24582,
29898,
11569,
2868,
21533,
29889,
7076,
3285,
1820,
29922,
2892,
2944,
29901,
2944,
29961,
29896,
12622,
13,
4706,
2437,
2868,
21533,
353,
9657,
29898,
276,
874,
287,
29898,
1761,
29898,
11569,
2868,
21533,
29889,
7076,
580,
4961,
13,
13,
4706,
1596,
29898,
2780,
287,
877,
525,
29930,
29896,
29900,
718,
525,
2290,
25648,
1334,
523,
482,
29901,
13420,
11955,
29961,
29896,
12622,
13,
4706,
1596,
580,
13,
13,
4706,
1596,
877,
525,
29930,
29896,
29900,
718,
525,
7967,
262,
29871,
891,
29871,
15518,
2868,
891,
29871,
26849,
25710,
13,
13,
4706,
363,
1820,
29892,
995,
297,
2437,
2868,
21533,
29889,
7076,
7295,
13,
9651,
19480,
2713,
598,
353,
851,
29898,
14486,
29898,
1767,
29914,
7827,
12165,
2868,
334,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
876,
13,
9651,
1596,
29898,
2780,
287,
877,
525,
29930,
29896,
29900,
718,
1820,
718,
525,
525,
16395,
29953,
29899,
2435,
29898,
1989,
8243,
11955,
29961,
29900,
2314,
718,
525,
29989,
29915,
718,
28684,
877,
525,
16395,
29896,
29900,
29899,
2435,
29898,
710,
29898,
1767,
4961,
718,
851,
29898,
1767,
511,
11955,
29961,
29900,
11724,
1095,
353,
376,
16521,
13,
9651,
1596,
877,
29989,
29915,
718,
28684,
877,
525,
16395,
29955,
29899,
2435,
29898,
1111,
262,
2713,
598,
876,
718,
19480,
2713,
598,
718,
525,
1273,
742,
11955,
29961,
29946,
12622,
13,
2
] |
src/waldur_mastermind/marketplace_openstack/migrations/0006_change_billing_type_for_volumes.py | geant-multicloud/MCMS-mastermind | 26 | 69264 | from django.db import migrations
INSTANCE_TYPE = 'OpenStackTenant.Instance'
VOLUME_TYPE = 'OpenStackTenant.Volume'
def change_billing_types(apps, schema_editor):
Offering = apps.get_model('marketplace', 'Offering')
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
for offering in Offering.objects.filter(
type__in=(INSTANCE_TYPE, VOLUME_TYPE)
).all():
components = offering.components.filter(type__startswith='gigabytes_')
if components:
for component in components:
component.type = OfferingComponent.BillingTypes.FIXED
component.save(update_fields=['type'])
class Migration(migrations.Migration):
dependencies = [
('marketplace_openstack', '0005_change_private_offerings_customers')
]
operations = [migrations.RunPython(change_billing_types)]
| [
1,
515,
9557,
29889,
2585,
1053,
9725,
800,
13,
13,
25580,
23219,
29918,
11116,
353,
525,
6585,
7264,
29911,
27153,
29889,
4998,
29915,
13,
13,
29963,
5607,
29965,
2303,
29918,
11116,
353,
525,
6585,
7264,
29911,
27153,
29889,
24679,
29915,
13,
13,
13,
1753,
1735,
29918,
29890,
8873,
29918,
8768,
29898,
13371,
29892,
10938,
29918,
15204,
1125,
13,
1678,
4587,
571,
292,
353,
11446,
29889,
657,
29918,
4299,
877,
28549,
6689,
742,
525,
2776,
571,
292,
1495,
13,
1678,
4587,
571,
292,
5308,
353,
11446,
29889,
657,
29918,
4299,
877,
28549,
6689,
742,
525,
2776,
571,
292,
5308,
1495,
13,
13,
1678,
363,
27032,
297,
4587,
571,
292,
29889,
12650,
29889,
4572,
29898,
13,
4706,
1134,
1649,
262,
7607,
25580,
23219,
29918,
11116,
29892,
478,
5607,
29965,
2303,
29918,
11116,
29897,
13,
1678,
13742,
497,
7295,
13,
4706,
7117,
353,
27032,
29889,
14036,
29889,
4572,
29898,
1853,
1649,
27382,
2541,
2433,
29887,
335,
10798,
2167,
29918,
1495,
13,
4706,
565,
7117,
29901,
13,
9651,
363,
4163,
297,
7117,
29901,
13,
18884,
4163,
29889,
1853,
353,
4587,
571,
292,
5308,
29889,
29933,
8873,
10562,
29889,
25634,
3352,
13,
18884,
4163,
29889,
7620,
29898,
5504,
29918,
9621,
29922,
1839,
1853,
11287,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
28549,
6689,
29918,
3150,
1429,
742,
525,
29900,
29900,
29900,
29945,
29918,
3167,
29918,
9053,
29918,
974,
571,
886,
29918,
6341,
414,
1495,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
26983,
800,
29889,
6558,
11980,
29898,
3167,
29918,
29890,
8873,
29918,
8768,
4638,
13,
2
] |
Desafio 70.py | MoomenEltelbany/PythonDesafios | 0 | 191999 | <reponame>MoomenEltelbany/PythonDesafios
print('-' * 30)
print(f'{"Lojas do Moomen":^30}')
print('-' * 30)
soma = totmais = menor = cont = 0
while True:
produto = str(input('Nome do produto: '))
preco = float(input('Preço: R$'))
soma += preco
cont += 1
if cont == 1 or preco < menor:
menor = preco
prodmenor = produto
if preco > 1000:
totmais += 1
resp = ' '
while resp not in 'SN':
resp = str(input('Quer Continuar [S/N]: ')).upper().strip()[0]
print('-' * 40)
if resp == 'N':
break
print(f'{"Fim do Programa":-^40}')
print(f'O total de compra foi R${soma:.2f}')
print(f'Temos {totmais} produtos que custam mais de R$1000.00')
print(f'O produto mais barato foi a/o {prodmenor} que custa R${menor:.2f}')
| [
1,
529,
276,
1112,
420,
29958,
22638,
2770,
29923,
1896,
295,
29890,
1384,
29914,
11980,
4002,
2142,
2363,
13,
2158,
877,
29899,
29915,
334,
29871,
29941,
29900,
29897,
13,
2158,
29898,
29888,
29915,
6377,
3410,
14196,
437,
4546,
2770,
1115,
29985,
29941,
29900,
29913,
1495,
13,
2158,
877,
29899,
29915,
334,
29871,
29941,
29900,
29897,
13,
29879,
4125,
353,
2025,
655,
275,
353,
26764,
353,
640,
353,
29871,
29900,
13,
8000,
5852,
29901,
13,
1678,
11859,
3066,
353,
851,
29898,
2080,
877,
29940,
608,
437,
11859,
3066,
29901,
525,
876,
13,
1678,
758,
1111,
353,
5785,
29898,
2080,
877,
6572,
6102,
29901,
390,
29938,
8785,
13,
1678,
1047,
29874,
4619,
758,
1111,
13,
1678,
640,
4619,
29871,
29896,
13,
1678,
565,
640,
1275,
29871,
29896,
470,
758,
1111,
529,
26764,
29901,
13,
4706,
26764,
353,
758,
1111,
13,
4706,
11859,
1527,
272,
353,
11859,
3066,
13,
1678,
565,
758,
1111,
1405,
29871,
29896,
29900,
29900,
29900,
29901,
13,
4706,
2025,
655,
275,
4619,
29871,
29896,
13,
1678,
4613,
353,
525,
525,
13,
1678,
1550,
4613,
451,
297,
525,
19296,
2396,
13,
4706,
4613,
353,
851,
29898,
2080,
877,
2182,
261,
2866,
8675,
279,
518,
29903,
29914,
29940,
5387,
525,
8106,
21064,
2141,
17010,
580,
29961,
29900,
29962,
13,
1678,
1596,
877,
29899,
29915,
334,
29871,
29946,
29900,
29897,
13,
1678,
565,
4613,
1275,
525,
29940,
2396,
13,
4706,
2867,
13,
2158,
29898,
29888,
29915,
6377,
29943,
326,
437,
7835,
29874,
1115,
29899,
29985,
29946,
29900,
29913,
1495,
13,
2158,
29898,
29888,
29915,
29949,
3001,
316,
752,
336,
4732,
390,
5303,
29879,
4125,
29901,
29889,
29906,
29888,
29913,
1495,
13,
2158,
29898,
29888,
29915,
5776,
359,
426,
4260,
655,
275,
29913,
11859,
20864,
712,
25387,
314,
3503,
316,
390,
29938,
29896,
29900,
29900,
29900,
29889,
29900,
29900,
1495,
13,
2158,
29898,
29888,
29915,
29949,
11859,
3066,
3503,
2594,
1219,
4732,
263,
29914,
29877,
426,
10633,
1527,
272,
29913,
712,
25387,
29874,
390,
5303,
1527,
272,
29901,
29889,
29906,
29888,
29913,
1495,
13,
13,
13,
13,
13,
13,
13,
13,
13,
2
] |
solutions/Interview-04.12-Paths-with-Sum-LCCI/0412.py | Wonz5130/LeetCode-Solutions | 12 | 91941 | <gh_stars>10-100
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def pathSum(self, root: TreeNode, sum: int) -> int:
if not root:
return 0
return self.dfs(root, sum) + self.pathSum(root.left, sum) + self.pathSum(root.right, sum)
def dfs(self, root, sum):
# 要特判为空,否则下面 sum == root.val 会报错
if not root:
return 0
res = 0
if sum == root.val:
res += 1
res += self.dfs(root.left, sum - root.val)
res += self.dfs(root.right, sum - root.val)
return res | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
21940,
363,
263,
7581,
5447,
2943,
29889,
13,
29937,
770,
15472,
4247,
29901,
13,
29937,
268,
822,
4770,
2344,
12035,
1311,
29892,
921,
1125,
13,
29937,
308,
1583,
29889,
791,
353,
921,
13,
29937,
308,
1583,
29889,
1563,
353,
6213,
13,
29937,
308,
1583,
29889,
1266,
353,
6213,
13,
13,
1990,
24380,
29901,
13,
1678,
822,
2224,
11139,
29898,
1311,
29892,
3876,
29901,
15472,
4247,
29892,
2533,
29901,
938,
29897,
1599,
938,
29901,
13,
4706,
565,
451,
3876,
29901,
13,
9651,
736,
29871,
29900,
13,
4706,
736,
1583,
29889,
29069,
29898,
4632,
29892,
2533,
29897,
718,
1583,
29889,
2084,
11139,
29898,
4632,
29889,
1563,
29892,
2533,
29897,
718,
1583,
29889,
2084,
11139,
29898,
4632,
29889,
1266,
29892,
2533,
29897,
13,
308,
13,
1678,
822,
4489,
29879,
29898,
1311,
29892,
3876,
29892,
2533,
1125,
13,
4706,
396,
29871,
30698,
31141,
31791,
30573,
30816,
30214,
31191,
31403,
30557,
30806,
2533,
1275,
3876,
29889,
791,
29871,
30437,
233,
141,
168,
31745,
13,
4706,
565,
451,
3876,
29901,
13,
9651,
736,
29871,
29900,
13,
13,
4706,
620,
353,
29871,
29900,
13,
4706,
565,
2533,
1275,
3876,
29889,
791,
29901,
13,
9651,
620,
4619,
29871,
29896,
13,
4706,
620,
4619,
1583,
29889,
29069,
29898,
4632,
29889,
1563,
29892,
2533,
448,
3876,
29889,
791,
29897,
13,
4706,
620,
4619,
1583,
29889,
29069,
29898,
4632,
29889,
1266,
29892,
2533,
448,
3876,
29889,
791,
29897,
13,
4706,
736,
620,
2
] |
examples/vault-consul-ami/auth/sign-request.py | crowd-ai/terraform-aws-vault | 651 | 157093 | #!/usr/bin/env python
# -What-------------------------------------------------------------------------
# This script creates a request to the AWS Security Token Service API
# with the action "GetCallerIdentity" and then signs the request using the
# AWS credentials. It was modified from the python 2.x example published by
# <NAME>, the author of the Vault IAM auth method, at the vault support
# mailing list. https://groups.google.com/forum/#!topic/vault-tool/Mfi3O-lW60I
# -Why--------------------------------------------------------------------------
# We are using python here instead of bash to take advantage of the boto3 library
# which facilitates this work by an order of magnitude
# -What-for---------------------------------------------------------------------
# This is useful for authenticating to Vault, because a client can use
# this script to generate this request and this request is sent with the
# login attempt to the Vault server. Vault then executes this request and gets
# the response from GetCallerIdentity, which tells who is trying to authenticate
# ------------------------------------------------------------------------------
import botocore.session
from botocore.awsrequest import create_request_object
import json
import base64
import sys
def headers_to_go_style(headers):
retval = {}
for k, v in headers.iteritems():
retval[k] = [v]
return retval
def generate_vault_request(awsIamServerId):
session = botocore.session.get_session()
client = session.create_client('sts')
endpoint = client._endpoint
operation_model = client._service_model.operation_model('GetCallerIdentity')
request_dict = client._convert_to_request_dict({}, operation_model)
request_dict['headers']['X-Vault-AWS-IAM-Server-ID'] = awsIamServerId
request = endpoint.create_request(request_dict, operation_model)
return {
'iam_http_request_method': request.method,
'iam_request_url': base64.b64encode(request.url),
'iam_request_body': base64.b64encode(request.body),
'iam_request_headers': base64.b64encode(json.dumps(headers_to_go_style(dict(request.headers)))), # It's a CaseInsensitiveDict, which is not JSON-serializable
}
if __name__ == "__main__":
awsIamServerId = sys.argv[1]
print json.dumps(generate_vault_request(awsIamServerId))
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
5618,
2683,
2683,
2683,
2683,
1378,
29899,
13,
29937,
910,
2471,
10017,
263,
2009,
304,
278,
15540,
14223,
25159,
6692,
3450,
13,
29937,
411,
278,
3158,
376,
2577,
5594,
261,
18415,
29908,
322,
769,
18906,
278,
2009,
773,
278,
13,
29937,
15540,
16140,
29889,
739,
471,
9120,
515,
278,
3017,
29871,
29906,
29889,
29916,
1342,
6369,
491,
13,
29937,
529,
5813,
10202,
278,
4148,
310,
278,
478,
1292,
306,
5194,
4817,
1158,
29892,
472,
278,
325,
1292,
2304,
13,
29937,
611,
6504,
1051,
29889,
2045,
597,
13155,
29889,
3608,
29889,
510,
29914,
23343,
8484,
29991,
13010,
29914,
29894,
1292,
29899,
10154,
29914,
29924,
7241,
29941,
29949,
29899,
29880,
29956,
29953,
29900,
29902,
13,
29937,
448,
11008,
2683,
2683,
2683,
2683,
28400,
13,
29937,
1334,
526,
773,
3017,
1244,
2012,
310,
10891,
304,
2125,
10631,
310,
278,
289,
3747,
29941,
3489,
13,
29937,
607,
16089,
277,
1078,
445,
664,
491,
385,
1797,
310,
18497,
13,
29937,
448,
5618,
29899,
1454,
2683,
2683,
2683,
2683,
23648,
13,
29937,
910,
338,
5407,
363,
15585,
1218,
304,
478,
1292,
29892,
1363,
263,
3132,
508,
671,
13,
29937,
445,
2471,
304,
5706,
445,
2009,
322,
445,
2009,
338,
2665,
411,
278,
13,
29937,
6464,
4218,
304,
278,
478,
1292,
1923,
29889,
478,
1292,
769,
24138,
445,
2009,
322,
4947,
13,
29937,
278,
2933,
515,
3617,
5594,
261,
18415,
29892,
607,
10603,
1058,
338,
1811,
304,
15585,
403,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
13,
5215,
9225,
542,
487,
29889,
7924,
13,
3166,
9225,
542,
487,
29889,
10467,
3827,
1053,
1653,
29918,
3827,
29918,
3318,
13,
5215,
4390,
13,
5215,
2967,
29953,
29946,
13,
5215,
10876,
13,
13,
1753,
9066,
29918,
517,
29918,
1484,
29918,
3293,
29898,
13662,
1125,
13,
1678,
3240,
791,
353,
6571,
13,
1678,
363,
413,
29892,
325,
297,
9066,
29889,
1524,
7076,
7295,
13,
4706,
3240,
791,
29961,
29895,
29962,
353,
518,
29894,
29962,
13,
1678,
736,
3240,
791,
13,
13,
1753,
5706,
29918,
29894,
1292,
29918,
3827,
29898,
10467,
29902,
314,
6004,
1204,
1125,
13,
1678,
4867,
353,
9225,
542,
487,
29889,
7924,
29889,
657,
29918,
7924,
580,
13,
1678,
3132,
353,
4867,
29889,
3258,
29918,
4645,
877,
303,
29879,
1495,
13,
1678,
16248,
353,
3132,
3032,
29734,
13,
1678,
5858,
29918,
4299,
353,
3132,
3032,
5509,
29918,
4299,
29889,
16453,
29918,
4299,
877,
2577,
5594,
261,
18415,
1495,
13,
1678,
2009,
29918,
8977,
353,
3132,
3032,
13441,
29918,
517,
29918,
3827,
29918,
8977,
3319,
1118,
5858,
29918,
4299,
29897,
13,
13,
1678,
2009,
29918,
8977,
1839,
13662,
16215,
29990,
29899,
29963,
1292,
29899,
29909,
7811,
29899,
29902,
5194,
29899,
6004,
29899,
1367,
2033,
353,
25879,
29902,
314,
6004,
1204,
13,
13,
1678,
2009,
353,
16248,
29889,
3258,
29918,
3827,
29898,
3827,
29918,
8977,
29892,
5858,
29918,
4299,
29897,
13,
13,
1678,
736,
426,
13,
4706,
525,
2829,
29918,
1124,
29918,
3827,
29918,
5696,
2396,
2009,
29889,
5696,
29892,
13,
4706,
525,
2829,
29918,
3827,
29918,
2271,
2396,
308,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3827,
29889,
2271,
511,
13,
4706,
525,
2829,
29918,
3827,
29918,
2587,
2396,
4706,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3827,
29889,
2587,
511,
13,
4706,
525,
2829,
29918,
3827,
29918,
13662,
2396,
268,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3126,
29889,
29881,
17204,
29898,
13662,
29918,
517,
29918,
1484,
29918,
3293,
29898,
8977,
29898,
3827,
29889,
13662,
4961,
511,
396,
739,
29915,
29879,
263,
11733,
797,
23149,
3321,
21533,
29892,
607,
338,
451,
4663,
29899,
15550,
13902,
13,
1678,
500,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
25879,
29902,
314,
6004,
1204,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
1678,
1596,
4390,
29889,
29881,
17204,
29898,
17158,
29918,
29894,
1292,
29918,
3827,
29898,
10467,
29902,
314,
6004,
1204,
876,
13,
2
] |
bitquant/sql/stmt.py | rosspalmer/bitQuant | 27 | 67123 | <gh_stars>10-100
from ..data import tools
from sqlalchemy.sql import select
def auth():
txt = open('auth_sql', 'r')
typ = int(txt.readline().rstrip('\n'))
if typ == 1:
file_path = txt.readline().rstrip('\n')
engine_str = 'sqlite+pysqlite:///%s' % file_path
if typ == 2:
host = txt.readline().rstrip('\n')
user = txt.readline().rstrip('\n')
password = txt.readline().rstrip('\n')
name = txt.readline().rstrip('\n')
engine_str = 'mysql+pymysql://%s:%s@%s/%s' % (user, password, host, name)
return engine_str
def insert(tbl, sql_type):
if sql_type == 'mysql':
stmt = tbl.insert().prefix_with('IGNORE')
if sql_type == 'sqlite':
stmt = tbl.insert().prefix_with('OR IGNORE')
return stmt
#|Currently broken
def select(tbl, exchange='', symbol='', start='',
end='', source='', freq=''):
sel = select([tbl])
if exchange <> '':
sel = sel.where(tbl.c.exchange == exchange)
if symbol <> '':
sel = sel.where(tbl.c.symbol == symbol)
if start <> '':
if isinstance(start, str):
start = tools.dateconv(start)
sel = sel.where(tbl.c.timestamp >= start)
if end <> '':
if isinstance(end, str):
end = tools.dateconv(end)
sel = sel.where(tbl.c.timestamp <= end)
if source <> '':
sel = sel.where(tbl.c.source == source)
if freq <> '':
sel = sel.where(tbl.c.freq == freq)
return sel
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
6317,
1272,
1053,
8492,
13,
13,
3166,
4576,
284,
305,
6764,
29889,
2850,
1053,
1831,
13,
13,
1753,
4817,
7295,
13,
1678,
13872,
353,
1722,
877,
5150,
29918,
2850,
742,
525,
29878,
1495,
13,
1678,
2393,
353,
938,
29898,
3945,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
8785,
13,
1678,
565,
2393,
1275,
29871,
29896,
29901,
13,
4706,
934,
29918,
2084,
353,
13872,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
1495,
13,
4706,
6012,
29918,
710,
353,
525,
22793,
29974,
29886,
952,
1519,
568,
597,
22584,
29879,
29915,
1273,
934,
29918,
2084,
13,
1678,
565,
2393,
1275,
29871,
29906,
29901,
13,
4706,
3495,
353,
13872,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
1495,
13,
4706,
1404,
353,
13872,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
1495,
13,
4706,
4800,
353,
13872,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
1495,
13,
4706,
1024,
353,
13872,
29889,
949,
1220,
2141,
29878,
17010,
28909,
29876,
1495,
13,
4706,
6012,
29918,
710,
353,
525,
7938,
29974,
29886,
962,
952,
1519,
597,
29995,
29879,
16664,
29879,
29992,
29995,
29879,
22584,
29879,
29915,
1273,
313,
1792,
29892,
4800,
29892,
3495,
29892,
1024,
29897,
13,
1678,
736,
6012,
29918,
710,
13,
13,
1753,
4635,
29898,
16400,
29892,
4576,
29918,
1853,
1125,
13,
1678,
565,
4576,
29918,
1853,
1275,
525,
7938,
2396,
13,
4706,
380,
4378,
353,
19018,
29889,
7851,
2141,
13506,
29918,
2541,
877,
6259,
6632,
1525,
1495,
13,
1678,
565,
4576,
29918,
1853,
1275,
525,
22793,
2396,
13,
4706,
380,
4378,
353,
19018,
29889,
7851,
2141,
13506,
29918,
2541,
877,
1955,
306,
29954,
6632,
1525,
1495,
13,
1678,
736,
380,
4378,
13,
13,
29937,
29989,
7583,
368,
9391,
13,
1753,
1831,
29898,
16400,
29892,
14523,
2433,
742,
29871,
5829,
2433,
742,
1369,
2433,
742,
13,
9651,
1095,
2433,
742,
2752,
2433,
742,
3005,
29939,
2433,
29374,
13,
1678,
5535,
353,
1831,
4197,
16400,
2314,
13,
1678,
565,
14523,
15271,
525,
2396,
13,
4706,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
6543,
1275,
14523,
29897,
13,
1678,
565,
5829,
15271,
525,
2396,
13,
4706,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
18098,
1275,
5829,
29897,
13,
1678,
565,
1369,
15271,
525,
2396,
13,
4706,
565,
338,
8758,
29898,
2962,
29892,
851,
1125,
13,
9651,
1369,
353,
8492,
29889,
1256,
20580,
29898,
2962,
29897,
13,
4706,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
16394,
6736,
1369,
29897,
13,
1678,
565,
1095,
15271,
525,
2396,
13,
4706,
565,
338,
8758,
29898,
355,
29892,
851,
1125,
13,
9651,
1095,
353,
8492,
29889,
1256,
20580,
29898,
355,
29897,
13,
9651,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
16394,
5277,
1095,
29897,
13,
4706,
565,
2752,
15271,
525,
2396,
13,
9651,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
4993,
1275,
2752,
29897,
13,
4706,
565,
3005,
29939,
15271,
525,
2396,
13,
9651,
5535,
353,
5535,
29889,
3062,
29898,
16400,
29889,
29883,
29889,
29888,
7971,
1275,
3005,
29939,
29897,
13,
1678,
736,
5535,
13,
13,
2
] |
layers/functions/sph_prior_box.py | BoChenUIUC/realtime-action-detection | 0 | 185839 | <gh_stars>0
""" Generates prior boxes for SSD netowrk
Original author: <NAME>, <NAME> for VOC dataset
https://github.com/amdegroot/ssd.pytorch
"""
import torch
from math import sqrt as sqrt
from itertools import product as product
class SphPriorBox(object):
"""Compute priorbox coordinates in center-offset form for each source
feature map.
Note:
This 'layer' has changed between versions of the original SSD
paper, so we include both versions, but note v2 is the most tested and most
recent version of the paper.
"""
def __init__(self, cfg):
super(SphPriorBox, self).__init__()
# self.type = cfg.name
self.image_size = cfg['min_dim']
# number of priors for feature map location (either 4 or 6)
self.num_priors = len(cfg['aspect_ratios'])
self.variance = cfg['variance'] or [0.1]
self.feature_maps = cfg['feature_maps']
self.min_sizes = cfg['min_sizes']
self.max_sizes = cfg['max_sizes']
self.steps = cfg['steps']
self.aspect_ratios = cfg['aspect_ratios']
self.clip = cfg['clip']
self.version = cfg['name']
for v in self.variance:
if v <= 0:
raise ValueError('Variances must be greater than 0')
def forward(self):
mean = []
# TODO merge these
for k, f in enumerate(self.feature_maps):
h,w = f
for i in range(h):
for j in range(w):
boxes = []
f_kx = self.image_size[1] * 1. / self.steps[k][1]
f_ky = self.image_size[0] * 1. / self.steps[k][0]
# unit center x,y
cx = (j + 0.5) / f_kx
cy = (i + 0.5) / f_ky
# aspect_ratio: 1
# rel size: min_size
s_kx = self.min_sizes[k] * 1. /self.image_size[1]
s_ky = self.min_sizes[k] * 1. /self.image_size[0]
boxes.append([cx, cy, s_kx, s_ky])
# aspect_ratio: 1
# rel size: sqrt(s_k * s_(k+1))
s_kx_prime = sqrt(s_kx * (self.max_sizes[k] * 1. /self.image_size[1]))
s_ky_prime = sqrt(s_ky * (self.max_sizes[k] * 1. /self.image_size[0]))
boxes.append([cx, cy, s_kx_prime, s_ky_prime])
# rest of aspect ratios
for ar in self.aspect_ratios[k]:
boxes.append([cx, cy, s_kx*sqrt(ar), s_ky/sqrt(ar)])
boxes.append([cx, cy, s_kx/sqrt(ar), s_ky*sqrt(ar)])
for box in boxes:
mean += box
# back to torch land
output = torch.Tensor(mean).view(-1, 4)
if self.clip:
output.clamp_(max=1, min=0)
return output | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
3251,
1078,
7536,
16273,
363,
5886,
29928,
7787,
340,
29878,
29895,
13,
13,
26036,
4148,
29901,
529,
5813,
10202,
529,
5813,
29958,
363,
478,
20166,
8783,
13,
991,
597,
3292,
29889,
510,
29914,
314,
12163,
4632,
29914,
893,
29881,
29889,
2272,
7345,
305,
13,
13,
15945,
29908,
13,
13,
5215,
4842,
305,
13,
3166,
5844,
1053,
18074,
2273,
408,
18074,
2273,
13,
3166,
4256,
8504,
1053,
3234,
408,
3234,
13,
13,
1990,
317,
561,
29925,
13479,
3313,
29898,
3318,
1125,
13,
1678,
9995,
20606,
29872,
7536,
1884,
10350,
297,
4818,
29899,
10289,
883,
363,
1269,
2752,
13,
1678,
4682,
2910,
29889,
13,
1678,
3940,
29901,
13,
1678,
910,
525,
13148,
29915,
756,
3939,
1546,
6910,
310,
278,
2441,
5886,
29928,
13,
1678,
5650,
29892,
577,
591,
3160,
1716,
6910,
29892,
541,
4443,
325,
29906,
338,
278,
1556,
9528,
322,
1556,
13,
1678,
7786,
1873,
310,
278,
5650,
29889,
13,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
274,
16434,
1125,
13,
4706,
2428,
29898,
29903,
561,
29925,
13479,
3313,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
396,
1583,
29889,
1853,
353,
274,
16434,
29889,
978,
13,
4706,
1583,
29889,
3027,
29918,
2311,
353,
274,
16434,
1839,
1195,
29918,
6229,
2033,
13,
4706,
396,
1353,
310,
3691,
943,
363,
4682,
2910,
4423,
313,
29872,
2121,
29871,
29946,
470,
29871,
29953,
29897,
13,
4706,
1583,
29889,
1949,
29918,
29886,
28739,
353,
7431,
29898,
16859,
1839,
294,
1103,
29918,
29878,
2219,
359,
11287,
13,
4706,
1583,
29889,
1707,
8837,
353,
274,
16434,
1839,
1707,
8837,
2033,
470,
518,
29900,
29889,
29896,
29962,
13,
4706,
1583,
29889,
14394,
29918,
10339,
353,
274,
16434,
1839,
14394,
29918,
10339,
2033,
13,
4706,
1583,
29889,
1195,
29918,
29879,
7093,
353,
274,
16434,
1839,
1195,
29918,
29879,
7093,
2033,
13,
4706,
1583,
29889,
3317,
29918,
29879,
7093,
353,
274,
16434,
1839,
3317,
29918,
29879,
7093,
2033,
13,
4706,
1583,
29889,
24530,
353,
274,
16434,
1839,
24530,
2033,
13,
4706,
1583,
29889,
294,
1103,
29918,
29878,
2219,
359,
353,
274,
16434,
1839,
294,
1103,
29918,
29878,
2219,
359,
2033,
13,
4706,
1583,
29889,
24049,
353,
274,
16434,
1839,
24049,
2033,
13,
4706,
1583,
29889,
3259,
353,
274,
16434,
1839,
978,
2033,
13,
4706,
363,
325,
297,
1583,
29889,
1707,
8837,
29901,
13,
9651,
565,
325,
5277,
29871,
29900,
29901,
13,
18884,
12020,
7865,
2392,
877,
9037,
713,
778,
1818,
367,
7621,
1135,
29871,
29900,
1495,
13,
13,
1678,
822,
6375,
29898,
1311,
1125,
13,
4706,
2099,
353,
5159,
13,
4706,
396,
14402,
10366,
1438,
13,
4706,
363,
413,
29892,
285,
297,
26985,
29898,
1311,
29889,
14394,
29918,
10339,
1125,
13,
9651,
298,
29892,
29893,
353,
285,
13,
9651,
363,
474,
297,
3464,
29898,
29882,
1125,
13,
18884,
363,
432,
297,
3464,
29898,
29893,
1125,
13,
462,
1678,
16273,
353,
5159,
13,
462,
1678,
285,
29918,
29895,
29916,
353,
1583,
29889,
3027,
29918,
2311,
29961,
29896,
29962,
334,
29871,
29896,
29889,
847,
1583,
29889,
24530,
29961,
29895,
3816,
29896,
29962,
13,
462,
1678,
285,
29918,
3459,
353,
1583,
29889,
3027,
29918,
2311,
29961,
29900,
29962,
334,
29871,
29896,
29889,
847,
1583,
29889,
24530,
29961,
29895,
3816,
29900,
29962,
13,
462,
1678,
396,
5190,
4818,
921,
29892,
29891,
13,
462,
1678,
28232,
353,
313,
29926,
718,
29871,
29900,
29889,
29945,
29897,
847,
285,
29918,
29895,
29916,
13,
462,
1678,
5094,
353,
313,
29875,
718,
29871,
29900,
29889,
29945,
29897,
847,
285,
29918,
3459,
13,
13,
462,
1678,
396,
9565,
29918,
3605,
601,
29901,
29871,
29896,
13,
462,
1678,
396,
1104,
2159,
29901,
1375,
29918,
2311,
13,
462,
1678,
269,
29918,
29895,
29916,
353,
1583,
29889,
1195,
29918,
29879,
7093,
29961,
29895,
29962,
334,
29871,
29896,
29889,
847,
1311,
29889,
3027,
29918,
2311,
29961,
29896,
29962,
13,
462,
1678,
269,
29918,
3459,
353,
1583,
29889,
1195,
29918,
29879,
7093,
29961,
29895,
29962,
334,
29871,
29896,
29889,
847,
1311,
29889,
3027,
29918,
2311,
29961,
29900,
29962,
13,
462,
1678,
16273,
29889,
4397,
4197,
18904,
29892,
5094,
29892,
269,
29918,
29895,
29916,
29892,
269,
29918,
3459,
2314,
13,
13,
462,
1678,
396,
9565,
29918,
3605,
601,
29901,
29871,
29896,
13,
462,
1678,
396,
1104,
2159,
29901,
18074,
2273,
29898,
29879,
29918,
29895,
334,
269,
23538,
29895,
29974,
29896,
876,
13,
462,
1678,
269,
29918,
29895,
29916,
29918,
10080,
353,
18074,
2273,
29898,
29879,
29918,
29895,
29916,
334,
313,
1311,
29889,
3317,
29918,
29879,
7093,
29961,
29895,
29962,
334,
29871,
29896,
29889,
847,
1311,
29889,
3027,
29918,
2311,
29961,
29896,
12622,
13,
462,
1678,
269,
29918,
3459,
29918,
10080,
353,
18074,
2273,
29898,
29879,
29918,
3459,
334,
313,
1311,
29889,
3317,
29918,
29879,
7093,
29961,
29895,
29962,
334,
29871,
29896,
29889,
847,
1311,
29889,
3027,
29918,
2311,
29961,
29900,
12622,
13,
462,
1678,
16273,
29889,
4397,
4197,
18904,
29892,
5094,
29892,
269,
29918,
29895,
29916,
29918,
10080,
29892,
269,
29918,
3459,
29918,
10080,
2314,
13,
13,
462,
1678,
396,
1791,
310,
9565,
364,
2219,
359,
13,
462,
1678,
363,
564,
297,
1583,
29889,
294,
1103,
29918,
29878,
2219,
359,
29961,
29895,
5387,
13,
462,
4706,
16273,
29889,
4397,
4197,
18904,
29892,
5094,
29892,
269,
29918,
29895,
29916,
29930,
3676,
29898,
279,
511,
269,
29918,
3459,
29914,
3676,
29898,
279,
29897,
2314,
13,
462,
4706,
16273,
29889,
4397,
4197,
18904,
29892,
5094,
29892,
269,
29918,
29895,
29916,
29914,
3676,
29898,
279,
511,
269,
29918,
3459,
29930,
3676,
29898,
279,
29897,
2314,
13,
13,
462,
1678,
363,
3800,
297,
16273,
29901,
13,
462,
4706,
2099,
4619,
3800,
13,
462,
268,
13,
4706,
396,
1250,
304,
4842,
305,
2982,
13,
4706,
1962,
353,
4842,
305,
29889,
29911,
6073,
29898,
12676,
467,
1493,
6278,
29896,
29892,
29871,
29946,
29897,
13,
4706,
565,
1583,
29889,
24049,
29901,
13,
9651,
1962,
29889,
695,
1160,
23538,
3317,
29922,
29896,
29892,
1375,
29922,
29900,
29897,
13,
4706,
736,
1962,
2
] |
env/lib/python3.6/site-packages/dipy/denoise/tests/test_non_local_means.py | Raniac/NEURO-LEARN | 8 | 1612803 | <filename>env/lib/python3.6/site-packages/dipy/denoise/tests/test_non_local_means.py
import numpy as np
from numpy.testing import (run_module_suite,
assert_,
assert_equal,
assert_array_almost_equal,
assert_raises)
from dipy.denoise.non_local_means import non_local_means
def test_nlmeans_static():
S0 = 100 * np.ones((20, 20, 20), dtype='f8')
S0nb = non_local_means(S0, sigma=1.0, rician=False)
assert_array_almost_equal(S0, S0nb)
def test_nlmeans_random_noise():
S0 = 100 + 2 * np.random.standard_normal((22, 23, 30))
masker = np.zeros(S0.shape[:3]).astype(bool)
masker[8:15, 8:15, 8:15] = 1
for mask in [None, masker]:
S0nb = non_local_means(S0, sigma=np.std(S0), rician=False, mask=mask)
assert_(S0nb[mask].min() > S0[mask].min())
assert_(S0nb[mask].max() < S0[mask].max())
assert_equal(np.round(S0nb[mask].mean()), 100)
S0nb = non_local_means(S0, sigma=np.std(S0), rician=False, mask=mask)
assert_(S0nb[mask].min() > S0[mask].min())
assert_(S0nb[mask].max() < S0[mask].max())
assert_equal(np.round(S0nb[mask].mean()), 100)
def test_scalar_sigma():
S0 = 100 + np.zeros((20, 20, 20))
noise = 2 * np.random.standard_normal((20, 20, 20))
S0 += noise
S0[:10, :10, :10] = 300 + noise[:10, :10, :10]
assert_raises(
ValueError, non_local_means, S0, sigma=noise, rician=False)
def test_nlmeans_boundary():
# nlmeans preserves boundaries
S0 = 100 + np.zeros((20, 20, 20))
noise = 2 * np.random.standard_normal((20, 20, 20))
S0 += noise
S0[:10, :10, :10] = 300 + noise[:10, :10, :10]
non_local_means(S0, sigma=np.std(noise), rician=False)
assert_(S0[9, 9, 9] > 290)
assert_(S0[10, 10, 10] < 110)
def test_nlmeans_wrong():
S0 = 100 + np.zeros((10, 10, 10, 10, 10))
assert_raises(ValueError, non_local_means, S0, 1.0)
S0 = 100 + np.zeros((20, 20, 20))
mask = np.ones((10, 10))
assert_raises(ValueError, non_local_means, S0, 1.0, mask)
def test_nlmeans_4D_and_mask():
S0 = 200 * np.ones((20, 20, 20, 3), dtype='f8')
mask = np.zeros((20, 20, 20))
mask[10, 10, 10] = 1
S0n = non_local_means(S0, sigma=1, mask=mask, rician=True)
assert_equal(S0.shape, S0n.shape)
assert_equal(np.round(S0n[10, 10, 10]), 200)
assert_equal(S0n[8, 8, 8], 0)
def test_nlmeans_dtype():
S0 = 200 * np.ones((20, 20, 20, 3), dtype='f4')
mask = np.zeros((20, 20, 20))
mask[10:14, 10:14, 10:14] = 1
S0n = non_local_means(S0, sigma=1, mask=mask, rician=True)
assert_equal(S0.dtype, S0n.dtype)
S0 = 200 * np.ones((20, 20, 20), dtype=np.uint16)
mask = np.zeros((20, 20, 20))
mask[10:14, 10:14, 10:14] = 1
S0n = non_local_means(S0, sigma=1, mask=mask, rician=True)
assert_equal(S0.dtype, S0n.dtype)
if __name__ == '__main__':
run_module_suite()
| [
1,
529,
9507,
29958,
6272,
29914,
1982,
29914,
4691,
29941,
29889,
29953,
29914,
2746,
29899,
8318,
29914,
29881,
666,
29891,
29914,
1145,
29877,
895,
29914,
21150,
29914,
1688,
29918,
5464,
29918,
2997,
29918,
1004,
550,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
3166,
12655,
29889,
13424,
1053,
313,
3389,
29918,
5453,
29918,
13495,
29892,
13,
462,
965,
4974,
3383,
13,
462,
965,
4974,
29918,
11745,
29892,
13,
462,
965,
4974,
29918,
2378,
29918,
284,
3242,
29918,
11745,
29892,
13,
462,
965,
4974,
29918,
336,
4637,
29897,
13,
3166,
652,
2272,
29889,
1145,
29877,
895,
29889,
5464,
29918,
2997,
29918,
1004,
550,
1053,
1661,
29918,
2997,
29918,
1004,
550,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
7959,
7295,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
334,
7442,
29889,
2873,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
511,
26688,
2433,
29888,
29947,
1495,
13,
1678,
317,
29900,
9877,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
29896,
29889,
29900,
29892,
364,
8910,
29922,
8824,
29897,
13,
1678,
4974,
29918,
2378,
29918,
284,
3242,
29918,
11745,
29898,
29903,
29900,
29892,
317,
29900,
9877,
29897,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
8172,
29918,
1217,
895,
7295,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
718,
29871,
29906,
334,
7442,
29889,
8172,
29889,
15770,
29918,
8945,
3552,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29941,
29900,
876,
13,
13,
1678,
11105,
261,
353,
7442,
29889,
3298,
359,
29898,
29903,
29900,
29889,
12181,
7503,
29941,
14664,
579,
668,
29898,
11227,
29897,
13,
1678,
11105,
261,
29961,
29947,
29901,
29896,
29945,
29892,
29871,
29947,
29901,
29896,
29945,
29892,
29871,
29947,
29901,
29896,
29945,
29962,
353,
29871,
29896,
13,
1678,
363,
11105,
297,
518,
8516,
29892,
11105,
261,
5387,
13,
4706,
317,
29900,
9877,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
9302,
29889,
4172,
29898,
29903,
29900,
511,
364,
8910,
29922,
8824,
29892,
11105,
29922,
13168,
29897,
13,
13,
4706,
4974,
23538,
29903,
29900,
9877,
29961,
13168,
1822,
1195,
580,
1405,
317,
29900,
29961,
13168,
1822,
1195,
3101,
13,
4706,
4974,
23538,
29903,
29900,
9877,
29961,
13168,
1822,
3317,
580,
529,
317,
29900,
29961,
13168,
1822,
3317,
3101,
13,
4706,
4974,
29918,
11745,
29898,
9302,
29889,
14486,
29898,
29903,
29900,
9877,
29961,
13168,
1822,
12676,
25739,
29871,
29896,
29900,
29900,
29897,
13,
13,
4706,
317,
29900,
9877,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
9302,
29889,
4172,
29898,
29903,
29900,
511,
364,
8910,
29922,
8824,
29892,
11105,
29922,
13168,
29897,
13,
13,
4706,
4974,
23538,
29903,
29900,
9877,
29961,
13168,
1822,
1195,
580,
1405,
317,
29900,
29961,
13168,
1822,
1195,
3101,
13,
4706,
4974,
23538,
29903,
29900,
9877,
29961,
13168,
1822,
3317,
580,
529,
317,
29900,
29961,
13168,
1822,
3317,
3101,
13,
4706,
4974,
29918,
11745,
29898,
9302,
29889,
14486,
29898,
29903,
29900,
9877,
29961,
13168,
1822,
12676,
25739,
29871,
29896,
29900,
29900,
29897,
13,
13,
13,
1753,
1243,
29918,
19529,
279,
29918,
3754,
7295,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
718,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11462,
353,
29871,
29906,
334,
7442,
29889,
8172,
29889,
15770,
29918,
8945,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
317,
29900,
4619,
11462,
13,
1678,
317,
29900,
7503,
29896,
29900,
29892,
584,
29896,
29900,
29892,
584,
29896,
29900,
29962,
353,
29871,
29941,
29900,
29900,
718,
11462,
7503,
29896,
29900,
29892,
584,
29896,
29900,
29892,
584,
29896,
29900,
29962,
13,
13,
1678,
4974,
29918,
336,
4637,
29898,
13,
4706,
7865,
2392,
29892,
1661,
29918,
2997,
29918,
1004,
550,
29892,
317,
29900,
29892,
269,
2934,
29922,
1217,
895,
29892,
364,
8910,
29922,
8824,
29897,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
9917,
653,
7295,
13,
1678,
396,
302,
29880,
1004,
550,
2225,
20098,
24371,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
718,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11462,
353,
29871,
29906,
334,
7442,
29889,
8172,
29889,
15770,
29918,
8945,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
317,
29900,
4619,
11462,
13,
1678,
317,
29900,
7503,
29896,
29900,
29892,
584,
29896,
29900,
29892,
584,
29896,
29900,
29962,
353,
29871,
29941,
29900,
29900,
718,
11462,
7503,
29896,
29900,
29892,
584,
29896,
29900,
29892,
584,
29896,
29900,
29962,
13,
1678,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
9302,
29889,
4172,
29898,
1217,
895,
511,
364,
8910,
29922,
8824,
29897,
13,
1678,
4974,
23538,
29903,
29900,
29961,
29929,
29892,
29871,
29929,
29892,
29871,
29929,
29962,
1405,
29871,
29906,
29929,
29900,
29897,
13,
1678,
4974,
23538,
29903,
29900,
29961,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29962,
529,
29871,
29896,
29896,
29900,
29897,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
15866,
549,
7295,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
718,
7442,
29889,
3298,
359,
3552,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
876,
13,
1678,
4974,
29918,
336,
4637,
29898,
1917,
2392,
29892,
1661,
29918,
2997,
29918,
1004,
550,
29892,
317,
29900,
29892,
29871,
29896,
29889,
29900,
29897,
13,
1678,
317,
29900,
353,
29871,
29896,
29900,
29900,
718,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11105,
353,
7442,
29889,
2873,
3552,
29896,
29900,
29892,
29871,
29896,
29900,
876,
13,
1678,
4974,
29918,
336,
4637,
29898,
1917,
2392,
29892,
1661,
29918,
2997,
29918,
1004,
550,
29892,
317,
29900,
29892,
29871,
29896,
29889,
29900,
29892,
11105,
29897,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
29946,
29928,
29918,
392,
29918,
13168,
7295,
13,
1678,
317,
29900,
353,
29871,
29906,
29900,
29900,
334,
7442,
29889,
2873,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
511,
26688,
2433,
29888,
29947,
1495,
13,
1678,
11105,
353,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11105,
29961,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29962,
353,
29871,
29896,
13,
1678,
317,
29900,
29876,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
29896,
29892,
11105,
29922,
13168,
29892,
364,
8910,
29922,
5574,
29897,
13,
1678,
4974,
29918,
11745,
29898,
29903,
29900,
29889,
12181,
29892,
317,
29900,
29876,
29889,
12181,
29897,
13,
1678,
4974,
29918,
11745,
29898,
9302,
29889,
14486,
29898,
29903,
29900,
29876,
29961,
29896,
29900,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
11724,
29871,
29906,
29900,
29900,
29897,
13,
1678,
4974,
29918,
11745,
29898,
29903,
29900,
29876,
29961,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29897,
13,
13,
13,
1753,
1243,
29918,
12938,
1004,
550,
29918,
29881,
1853,
7295,
13,
13,
1678,
317,
29900,
353,
29871,
29906,
29900,
29900,
334,
7442,
29889,
2873,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
511,
26688,
2433,
29888,
29946,
1495,
13,
1678,
11105,
353,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11105,
29961,
29896,
29900,
29901,
29896,
29946,
29892,
29871,
29896,
29900,
29901,
29896,
29946,
29892,
29871,
29896,
29900,
29901,
29896,
29946,
29962,
353,
29871,
29896,
13,
1678,
317,
29900,
29876,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
29896,
29892,
11105,
29922,
13168,
29892,
364,
8910,
29922,
5574,
29897,
13,
1678,
4974,
29918,
11745,
29898,
29903,
29900,
29889,
29881,
1853,
29892,
317,
29900,
29876,
29889,
29881,
1853,
29897,
13,
1678,
317,
29900,
353,
29871,
29906,
29900,
29900,
334,
7442,
29889,
2873,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
511,
26688,
29922,
9302,
29889,
13470,
29896,
29953,
29897,
13,
1678,
11105,
353,
7442,
29889,
3298,
359,
3552,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
876,
13,
1678,
11105,
29961,
29896,
29900,
29901,
29896,
29946,
29892,
29871,
29896,
29900,
29901,
29896,
29946,
29892,
29871,
29896,
29900,
29901,
29896,
29946,
29962,
353,
29871,
29896,
13,
1678,
317,
29900,
29876,
353,
1661,
29918,
2997,
29918,
1004,
550,
29898,
29903,
29900,
29892,
269,
2934,
29922,
29896,
29892,
11105,
29922,
13168,
29892,
364,
8910,
29922,
5574,
29897,
13,
1678,
4974,
29918,
11745,
29898,
29903,
29900,
29889,
29881,
1853,
29892,
317,
29900,
29876,
29889,
29881,
1853,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1065,
29918,
5453,
29918,
13495,
580,
13,
2
] |
preprocess_data/data_preparation_gan.py | tamlhp/dfd_benchmark | 7 | 91486 | # Copyright (c) 2018, <NAME>. All rights reserved.
#
# This work is licensed under the Creative Commons Attribution-NonCommercial
# 4.0 International License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
# Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
import os
import glob
import argparse
import numpy as np
import tensorflow as tf
import PIL.Image
import scipy.ndimage
from PIL import ImageEnhance,Image
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
#----------------------------------------------------------------------------
def error(msg):
print('Error: ' + msg)
exit(1)
#----------------------------------------------------------------------------
class TFRecordExporter:
def __init__(self, tfrecord_dir, expected_images, print_progress=True, progress_interval=10, Gaussian_down=0):
self.tfrecord_dir = tfrecord_dir
self.tfr_prefix = os.path.join(self.tfrecord_dir, os.path.basename(self.tfrecord_dir))
self.expected_images = expected_images
self.cur_images = 0
self.shape = None
self.resolution_log2 = None
self.tfr_writers = []
self.print_progress = print_progress
self.progress_interval = progress_interval
self.Gaussian_down = Gaussian_down
if self.print_progress:
print('Creating dataset "%s"' % tfrecord_dir)
if not os.path.isdir(self.tfrecord_dir):
os.makedirs(self.tfrecord_dir)
assert(os.path.isdir(self.tfrecord_dir))
def close(self):
if self.print_progress:
print('%-40s\r' % 'Flushing data...', end='', flush=True)
for tfr_writer in self.tfr_writers:
tfr_writer.close()
self.tfr_writers = []
if self.print_progress:
print('%-40s\r' % '', end='', flush=True)
print('Added %d images.' % self.cur_images)
def choose_shuffled_order(self): # Note: Images and labels must be added in shuffled order.
order = np.arange(self.expected_images)
np.random.RandomState(123).shuffle(order)
return order
def add_image(self, img):
if self.print_progress and self.cur_images % self.progress_interval == 0:
print('%d / %d\r' % (self.cur_images, self.expected_images), end='', flush=True)
if self.shape is None:
self.shape = img.shape
self.resolution_log2 = int(np.log2(self.shape[1]))
assert self.shape[0] in [1, 3]
assert self.shape[1] == self.shape[2]
assert self.shape[1] == 2**self.resolution_log2
tfr_opt = tf.python_io.TFRecordOptions(tf.python_io.TFRecordCompressionType.NONE)
#for lod in range(self.resolution_log2 - 1):
for lod in [0]:
tfr_file = self.tfr_prefix + '-r%02d.tfrecords' % (self.resolution_log2 - lod)
self.tfr_writers.append(tf.python_io.TFRecordWriter(tfr_file, tfr_opt))
assert img.shape == self.shape
for lod, tfr_writer in enumerate(self.tfr_writers):
if lod:
img = img.astype(np.float32)
if self.Gaussian_down:
img = scipy.ndimage.convolve(img, gaussian_filter[np.newaxis, :, :], mode='mirror')[:, ::2, ::2]
else:
img = (img[:, fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b, 0::2] + img[:, fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b, 1::2] + img[:, fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b, 0::2] + img[:, fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b, fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b]) * 0.25
quant = np.rint(img).clip(0, 255).astype(np.uint8)
ex = tf.train.Example(features=tf.train.Features(feature={
'shape': tf.train.Feature(int64_list=tf.train.Int64List(value=quant.shape)),
'data': tf.train.Feature(bytes_list=tf.train.BytesList(value=[quant.tostring()]))}))
tfr_writer.write(ex.SerializeToString())
self.cur_images += 1
def add_labels(self, labels):
if self.print_progress:
print('%-40s\r' % 'Saving labels...', end='', flush=True)
assert labels.shape[0] == self.cur_images
with open(self.tfr_prefix + '-rxx.labels', 'wb') as f:
np.save(f, labels.astype(np.float32))
def __enter__(self):
return self
def __exit__(self, *args):
self.close()
#----------------------------------------------------------------------------
def data_preparation(image_dir, tfrecord_dir, resolution=128, shuffle=1, export_labels=1, percentage_samples=100):
print('Loading images from "%s"' % image_dir)
sources_dir = os.listdir(image_dir)
image_filenames = []
for source_dir in sources_dir:
image_filenames_temp = sorted(glob.glob(os.path.join(image_dir, source_dir, '*.png'))\
+glob.glob(os.path.join(image_dir, source_dir, '*.jpeg')) \
+ glob.glob(os.path.join(image_dir, source_dir, '*.jpg'))\
)
image_filenames += image_filenames_temp[:int(float(len(image_filenames_temp))*float(percentage_samples)/100.0)]
if len(image_filenames) == 0:
error('No input images found')
img = np.asarray(PIL.Image.open(image_filenames[0]))
size = img.shape[0]
channels = img.shape[2] if img.ndim == 3 else 1
if channels not in [1, 3]:
error('Input images must be stored as RGB or grayscale')
with TFRecordExporter(tfrecord_dir, len(image_filenames)) as tfr:
order = tfr.choose_shuffled_order() if shuffle else np.arange(len(image_filenames))
for idx in range(order.size):
img = np.asarray(PIL.Image.open(image_filenames[order[idx]]))
if channels == 1:
img = img[:, :, np.newaxis] # HW => HWC
img = PIL.Image.fromarray(img, 'RGB')
img = img.resize((resolution, resolution), PIL.Image.ANTIALIAS)
contrast = ImageEnhance.Contrast(img)
img = contrast.enhance(1.0)
brightness = ImageEnhance.Brightness(img)
img = brightness.enhance(1.0)
img = np.asarray(img)
img = img.transpose(2, 0, 1) # HWC => CHW
tfr.add_image(img)
if export_labels:
labels = []
for file in image_filenames:
name_list = file.split('/')
file_source = name_list[-2]
for label, source in enumerate(sources_dir):
if source == file_source:
labels.append(np.uint32(label))
break
labels = np.array(labels)
onehot = np.zeros((labels.size, np.max(labels) + 1), dtype=np.float32)
onehot[np.arange(labels.size), labels] = 1.0
tfr.add_labels(onehot[order])
#----------------------------------------------------------------------------
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--in_dir', type=str, default=' ') # The input directory containing subdirectories of images. Each subdirectory represents a data source, either from the real dataset or generated by a GAN
parser.add_argument('--out_dir', type=str, default=' ') # The output directory containing the prepared data format that enables efficient streaming
parser.add_argument('--resolution', type=int, default=128) # The resolution to which images are resized
parser.add_argument('--shuffle', type=int, default=1) # Shuffle the order of images when streaming?
parser.add_argument('--export_labels', type=int, default=1) # Export image source labels?
parser.add_argument('--percentage_samples', type=int, default=100) # The percentage of images used for data preparation
args = parser.parse_args()
import time
begin = time.time()
data_preparation(args.in_dir, args.out_dir, args.resolution, args.shuffle, args.export_labels, args.percentage_samples)
print("Time : ", time.time()-begin)
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29892,
529,
5813,
15513,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
910,
664,
338,
7794,
21144,
1090,
278,
26635,
3468,
6212,
3224,
29899,
12283,
1523,
1050,
1455,
13,
29937,
29871,
29946,
29889,
29900,
4623,
19245,
29889,
1763,
1776,
263,
3509,
310,
445,
19405,
29892,
6493,
13,
29937,
1732,
597,
1037,
1230,
22382,
29889,
990,
29914,
506,
11259,
29914,
1609,
29899,
17608,
29914,
29946,
29889,
29900,
29914,
470,
3638,
263,
5497,
304,
13,
29937,
26635,
3468,
29892,
21521,
11773,
29871,
29896,
29947,
29953,
29953,
29892,
18204,
4533,
29892,
12766,
29871,
29929,
29946,
29900,
29946,
29906,
29892,
8278,
29889,
13,
13,
5215,
2897,
13,
5215,
13149,
13,
5215,
1852,
5510,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
5215,
349,
6227,
29889,
2940,
13,
13,
5215,
4560,
2272,
29889,
299,
3027,
13,
3166,
349,
6227,
1053,
7084,
2369,
29882,
749,
29892,
2940,
13,
3166,
349,
6227,
1053,
7084,
2283,
13,
13,
2940,
2283,
29889,
29428,
29918,
5659,
3904,
29907,
3040,
29928,
29918,
2382,
29903,
353,
5852,
13,
13,
29937,
2683,
2683,
2683,
2683,
9072,
13,
13,
1753,
1059,
29898,
7645,
1125,
13,
1678,
1596,
877,
2392,
29901,
525,
718,
10191,
29897,
13,
1678,
6876,
29898,
29896,
29897,
13,
13,
29937,
2683,
2683,
2683,
2683,
9072,
13,
13,
1990,
323,
29943,
9182,
1252,
18505,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
15886,
11651,
29918,
3972,
29892,
3806,
29918,
8346,
29892,
1596,
29918,
18035,
29922,
5574,
29892,
6728,
29918,
19207,
29922,
29896,
29900,
29892,
22477,
29918,
3204,
29922,
29900,
1125,
13,
4706,
1583,
29889,
13264,
11651,
29918,
3972,
539,
353,
15886,
11651,
29918,
3972,
13,
4706,
1583,
29889,
29873,
1341,
29918,
13506,
308,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
13264,
11651,
29918,
3972,
29892,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
1311,
29889,
13264,
11651,
29918,
3972,
876,
13,
4706,
1583,
29889,
9684,
29918,
8346,
1678,
353,
3806,
29918,
8346,
13,
4706,
1583,
29889,
2764,
29918,
8346,
308,
353,
29871,
29900,
13,
4706,
1583,
29889,
12181,
795,
353,
6213,
13,
4706,
1583,
29889,
9778,
918,
29918,
1188,
29906,
1678,
353,
6213,
13,
4706,
1583,
29889,
29873,
1341,
29918,
8231,
414,
4706,
353,
5159,
13,
4706,
1583,
29889,
2158,
29918,
18035,
268,
353,
1596,
29918,
18035,
13,
4706,
1583,
29889,
18035,
29918,
19207,
29871,
353,
6728,
29918,
19207,
13,
4706,
1583,
29889,
29954,
17019,
29918,
3204,
418,
353,
22477,
29918,
3204,
13,
4706,
565,
1583,
29889,
2158,
29918,
18035,
29901,
13,
9651,
1596,
877,
9832,
1218,
8783,
11860,
29879,
29908,
29915,
1273,
15886,
11651,
29918,
3972,
29897,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
275,
3972,
29898,
1311,
29889,
13264,
11651,
29918,
3972,
1125,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
13264,
11651,
29918,
3972,
29897,
13,
4706,
4974,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
1311,
29889,
13264,
11651,
29918,
3972,
876,
13,
308,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
2158,
29918,
18035,
29901,
13,
9651,
1596,
877,
29995,
29899,
29946,
29900,
29879,
29905,
29878,
29915,
1273,
525,
8754,
21616,
848,
856,
742,
1095,
2433,
742,
28371,
29922,
5574,
29897,
13,
4706,
363,
260,
1341,
29918,
13236,
297,
1583,
29889,
29873,
1341,
29918,
8231,
414,
29901,
13,
9651,
260,
1341,
29918,
13236,
29889,
5358,
580,
13,
4706,
1583,
29889,
29873,
1341,
29918,
8231,
414,
353,
5159,
13,
4706,
565,
1583,
29889,
2158,
29918,
18035,
29901,
13,
9651,
1596,
877,
29995,
29899,
29946,
29900,
29879,
29905,
29878,
29915,
1273,
15516,
1095,
2433,
742,
28371,
29922,
5574,
29897,
13,
9651,
1596,
877,
2528,
287,
1273,
29881,
4558,
6169,
1273,
1583,
29889,
2764,
29918,
8346,
29897,
13,
13,
1678,
822,
6755,
29918,
845,
3096,
839,
29918,
2098,
29898,
1311,
1125,
396,
3940,
29901,
1954,
1179,
322,
11073,
1818,
367,
2715,
297,
528,
3096,
839,
1797,
29889,
13,
4706,
1797,
353,
7442,
29889,
279,
927,
29898,
1311,
29889,
9684,
29918,
8346,
29897,
13,
4706,
7442,
29889,
8172,
29889,
17875,
2792,
29898,
29896,
29906,
29941,
467,
845,
21897,
29898,
2098,
29897,
13,
4706,
736,
1797,
13,
13,
1678,
822,
788,
29918,
3027,
29898,
1311,
29892,
10153,
1125,
13,
4706,
565,
1583,
29889,
2158,
29918,
18035,
322,
1583,
29889,
2764,
29918,
8346,
1273,
1583,
29889,
18035,
29918,
19207,
1275,
29871,
29900,
29901,
13,
9651,
1596,
877,
29995,
29881,
847,
1273,
29881,
29905,
29878,
29915,
1273,
313,
1311,
29889,
2764,
29918,
8346,
29892,
1583,
29889,
9684,
29918,
8346,
511,
1095,
2433,
742,
28371,
29922,
5574,
29897,
13,
4706,
565,
1583,
29889,
12181,
338,
6213,
29901,
13,
9651,
1583,
29889,
12181,
353,
10153,
29889,
12181,
13,
9651,
1583,
29889,
9778,
918,
29918,
1188,
29906,
353,
938,
29898,
9302,
29889,
1188,
29906,
29898,
1311,
29889,
12181,
29961,
29896,
12622,
13,
9651,
4974,
1583,
29889,
12181,
29961,
29900,
29962,
297,
518,
29896,
29892,
29871,
29941,
29962,
13,
9651,
4974,
1583,
29889,
12181,
29961,
29896,
29962,
1275,
1583,
29889,
12181,
29961,
29906,
29962,
13,
9651,
4974,
1583,
29889,
12181,
29961,
29896,
29962,
1275,
29871,
29906,
1068,
1311,
29889,
9778,
918,
29918,
1188,
29906,
13,
9651,
260,
1341,
29918,
3670,
353,
15886,
29889,
4691,
29918,
601,
29889,
8969,
9182,
5856,
29898,
13264,
29889,
4691,
29918,
601,
29889,
8969,
9182,
1523,
2590,
1542,
29889,
29940,
12413,
29897,
13,
9651,
396,
1454,
21896,
297,
3464,
29898,
1311,
29889,
9778,
918,
29918,
1188,
29906,
448,
29871,
29896,
1125,
13,
9651,
363,
21896,
297,
518,
29900,
5387,
13,
18884,
260,
1341,
29918,
1445,
353,
1583,
29889,
29873,
1341,
29918,
13506,
718,
17411,
29878,
29995,
29900,
29906,
29881,
29889,
13264,
3757,
4339,
29915,
1273,
313,
1311,
29889,
9778,
918,
29918,
1188,
29906,
448,
21896,
29897,
13,
18884,
1583,
29889,
29873,
1341,
29918,
8231,
414,
29889,
4397,
29898,
13264,
29889,
4691,
29918,
601,
29889,
8969,
9182,
10507,
29898,
29873,
1341,
29918,
1445,
29892,
260,
1341,
29918,
3670,
876,
13,
4706,
4974,
10153,
29889,
12181,
1275,
1583,
29889,
12181,
13,
4706,
363,
21896,
29892,
260,
1341,
29918,
13236,
297,
26985,
29898,
1311,
29889,
29873,
1341,
29918,
8231,
414,
1125,
13,
9651,
565,
21896,
29901,
13,
18884,
10153,
353,
10153,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
18884,
565,
1583,
29889,
29954,
17019,
29918,
3204,
29901,
13,
462,
1678,
10153,
353,
4560,
2272,
29889,
299,
3027,
29889,
535,
1555,
345,
29898,
2492,
29892,
330,
17019,
29918,
4572,
29961,
9302,
29889,
1482,
8990,
29892,
584,
29892,
584,
1402,
4464,
2433,
11038,
729,
1495,
7503,
29892,
4761,
29906,
29892,
4761,
29906,
29962,
13,
18884,
1683,
29901,
13,
462,
1678,
10153,
353,
313,
2492,
7503,
29892,
285,
29881,
29900,
29900,
29901,
29883,
29906,
29890,
29953,
29901,
29890,
29906,
29946,
29890,
29901,
915,
29953,
29955,
29901,
29906,
29947,
29906,
29955,
29901,
29953,
29947,
29947,
29881,
29901,
29872,
29953,
29874,
29896,
29901,
29953,
29874,
29941,
29890,
29892,
29871,
29900,
1057,
29906,
29962,
718,
10153,
7503,
29892,
285,
29881,
29900,
29900,
29901,
29883,
29906,
29890,
29953,
29901,
29890,
29906,
29946,
29890,
29901,
915,
29953,
29955,
29901,
29906,
29947,
29906,
29955,
29901,
29953,
29947,
29947,
29881,
29901,
29872,
29953,
29874,
29896,
29901,
29953,
29874,
29941,
29890,
29892,
29871,
29896,
1057,
29906,
29962,
718,
10153,
7503,
29892,
285,
29881,
29900,
29900,
29901,
29883,
29906,
29890,
29953,
29901,
29890,
29906,
29946,
29890,
29901,
915,
29953,
29955,
29901,
29906,
29947,
29906,
29955,
29901,
29953,
29947,
29947,
29881,
29901,
29872,
29953,
29874,
29896,
29901,
29953,
29874,
29941,
29890,
29892,
29871,
29900,
1057,
29906,
29962,
718,
10153,
7503,
29892,
285,
29881,
29900,
29900,
29901,
29883,
29906,
29890,
29953,
29901,
29890,
29906,
29946,
29890,
29901,
915,
29953,
29955,
29901,
29906,
29947,
29906,
29955,
29901,
29953,
29947,
29947,
29881,
29901,
29872,
29953,
29874,
29896,
29901,
29953,
29874,
29941,
29890,
29892,
285,
29881,
29900,
29900,
29901,
29883,
29906,
29890,
29953,
29901,
29890,
29906,
29946,
29890,
29901,
915,
29953,
29955,
29901,
29906,
29947,
29906,
29955,
29901,
29953,
29947,
29947,
29881,
29901,
29872,
29953,
29874,
29896,
29901,
29953,
29874,
29941,
29890,
2314,
334,
29871,
29900,
29889,
29906,
29945,
13,
9651,
4323,
353,
7442,
29889,
29878,
524,
29898,
2492,
467,
24049,
29898,
29900,
29892,
29871,
29906,
29945,
29945,
467,
579,
668,
29898,
9302,
29889,
13470,
29947,
29897,
13,
9651,
429,
353,
15886,
29889,
14968,
29889,
14023,
29898,
22100,
29922,
13264,
29889,
14968,
29889,
8263,
3698,
29898,
14394,
3790,
13,
18884,
525,
12181,
2396,
15886,
29889,
14968,
29889,
19132,
29898,
524,
29953,
29946,
29918,
1761,
29922,
13264,
29889,
14968,
29889,
2928,
29953,
29946,
1293,
29898,
1767,
29922,
12150,
29889,
12181,
8243,
13,
18884,
525,
1272,
2396,
15886,
29889,
14968,
29889,
19132,
29898,
13193,
29918,
1761,
29922,
13264,
29889,
14968,
29889,
11207,
1293,
29898,
1767,
11759,
12150,
29889,
517,
1807,
580,
12622,
20073,
13,
9651,
260,
1341,
29918,
13236,
29889,
3539,
29898,
735,
29889,
1748,
6646,
8246,
3101,
13,
4706,
1583,
29889,
2764,
29918,
8346,
4619,
29871,
29896,
13,
13,
1678,
822,
788,
29918,
21134,
29898,
1311,
29892,
11073,
1125,
13,
4706,
565,
1583,
29889,
2158,
29918,
18035,
29901,
13,
9651,
1596,
877,
29995,
29899,
29946,
29900,
29879,
29905,
29878,
29915,
1273,
525,
29903,
5555,
11073,
856,
742,
1095,
2433,
742,
28371,
29922,
5574,
29897,
13,
4706,
4974,
11073,
29889,
12181,
29961,
29900,
29962,
1275,
1583,
29889,
2764,
29918,
8346,
13,
4706,
411,
1722,
29898,
1311,
29889,
29873,
1341,
29918,
13506,
718,
17411,
29878,
4419,
29889,
21134,
742,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
9651,
7442,
29889,
7620,
29898,
29888,
29892,
11073,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
876,
13,
632,
13,
1678,
822,
4770,
5893,
12035,
1311,
1125,
13,
4706,
736,
1583,
13,
268,
13,
1678,
822,
4770,
13322,
12035,
1311,
29892,
334,
5085,
1125,
13,
4706,
1583,
29889,
5358,
580,
13,
13,
29937,
2683,
2683,
2683,
2683,
9072,
13,
13,
1753,
848,
29918,
1457,
862,
362,
29898,
3027,
29918,
3972,
29892,
15886,
11651,
29918,
3972,
29892,
10104,
29922,
29896,
29906,
29947,
29892,
528,
21897,
29922,
29896,
29892,
5609,
29918,
21134,
29922,
29896,
29892,
19649,
29918,
27736,
29922,
29896,
29900,
29900,
1125,
13,
1678,
1596,
877,
23456,
4558,
515,
11860,
29879,
29908,
29915,
1273,
1967,
29918,
3972,
29897,
13,
1678,
8974,
29918,
3972,
353,
2897,
29889,
1761,
3972,
29898,
3027,
29918,
3972,
29897,
13,
1678,
1967,
29918,
1777,
264,
1280,
353,
5159,
13,
1678,
363,
2752,
29918,
3972,
297,
8974,
29918,
3972,
29901,
13,
4706,
1967,
29918,
1777,
264,
1280,
29918,
7382,
353,
12705,
29898,
23705,
29889,
23705,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3027,
29918,
3972,
29892,
2752,
29918,
3972,
29892,
525,
10521,
2732,
8785,
29905,
13,
462,
462,
418,
718,
23705,
29889,
23705,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3027,
29918,
3972,
29892,
2752,
29918,
3972,
29892,
525,
10521,
26568,
8785,
320,
13,
462,
462,
418,
718,
13149,
29889,
23705,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3027,
29918,
3972,
29892,
2752,
29918,
3972,
29892,
525,
10521,
6173,
8785,
29905,
13,
462,
462,
418,
1723,
13,
4706,
1967,
29918,
1777,
264,
1280,
4619,
1967,
29918,
1777,
264,
1280,
29918,
7382,
7503,
524,
29898,
7411,
29898,
2435,
29898,
3027,
29918,
1777,
264,
1280,
29918,
7382,
876,
29930,
7411,
29898,
25376,
482,
29918,
27736,
6802,
29896,
29900,
29900,
29889,
29900,
4638,
13,
1678,
565,
7431,
29898,
3027,
29918,
1777,
264,
1280,
29897,
1275,
29871,
29900,
29901,
13,
4706,
1059,
877,
3782,
1881,
4558,
1476,
1495,
13,
308,
13,
1678,
10153,
353,
7442,
29889,
294,
2378,
29898,
2227,
29931,
29889,
2940,
29889,
3150,
29898,
3027,
29918,
1777,
264,
1280,
29961,
29900,
12622,
13,
1678,
2159,
353,
10153,
29889,
12181,
29961,
29900,
29962,
13,
1678,
18196,
353,
10153,
29889,
12181,
29961,
29906,
29962,
565,
10153,
29889,
299,
326,
1275,
29871,
29941,
1683,
29871,
29896,
13,
1678,
565,
18196,
451,
297,
518,
29896,
29892,
29871,
29941,
5387,
13,
4706,
1059,
877,
4290,
4558,
1818,
367,
6087,
408,
390,
7210,
470,
16749,
7052,
1495,
13,
268,
13,
1678,
411,
323,
29943,
9182,
1252,
18505,
29898,
13264,
11651,
29918,
3972,
29892,
7431,
29898,
3027,
29918,
1777,
264,
1280,
876,
408,
260,
1341,
29901,
13,
4706,
1797,
353,
260,
1341,
29889,
21803,
29918,
845,
3096,
839,
29918,
2098,
580,
565,
528,
21897,
1683,
7442,
29889,
279,
927,
29898,
2435,
29898,
3027,
29918,
1777,
264,
1280,
876,
13,
4706,
363,
22645,
297,
3464,
29898,
2098,
29889,
2311,
1125,
13,
9651,
10153,
353,
7442,
29889,
294,
2378,
29898,
2227,
29931,
29889,
2940,
29889,
3150,
29898,
3027,
29918,
1777,
264,
1280,
29961,
2098,
29961,
13140,
5262,
876,
13,
9651,
565,
18196,
1275,
29871,
29896,
29901,
13,
18884,
10153,
353,
10153,
7503,
29892,
584,
29892,
7442,
29889,
1482,
8990,
29962,
396,
379,
29956,
1149,
379,
29956,
29907,
13,
9651,
10153,
353,
349,
6227,
29889,
2940,
29889,
3166,
2378,
29898,
2492,
29892,
525,
28212,
1495,
13,
9651,
10153,
353,
10153,
29889,
21476,
3552,
9778,
918,
29892,
10104,
511,
349,
6227,
29889,
2940,
29889,
13566,
25758,
29902,
3289,
29897,
13,
13,
9651,
12814,
353,
7084,
2369,
29882,
749,
29889,
1168,
509,
579,
29898,
2492,
29897,
13,
9651,
10153,
353,
12814,
29889,
264,
29882,
749,
29898,
29896,
29889,
29900,
29897,
13,
9651,
11785,
2264,
353,
7084,
2369,
29882,
749,
29889,
29933,
1266,
2264,
29898,
2492,
29897,
13,
9651,
10153,
353,
11785,
2264,
29889,
264,
29882,
749,
29898,
29896,
29889,
29900,
29897,
13,
9651,
10153,
353,
7442,
29889,
294,
2378,
29898,
2492,
29897,
13,
9651,
10153,
353,
10153,
29889,
3286,
4220,
29898,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
29897,
396,
379,
29956,
29907,
1149,
5868,
29956,
13,
9651,
260,
1341,
29889,
1202,
29918,
3027,
29898,
2492,
29897,
13,
4706,
565,
5609,
29918,
21134,
29901,
13,
9651,
11073,
353,
5159,
13,
9651,
363,
934,
297,
1967,
29918,
1777,
264,
1280,
29901,
13,
18884,
1024,
29918,
1761,
353,
934,
29889,
5451,
11219,
1495,
13,
18884,
934,
29918,
4993,
353,
1024,
29918,
1761,
14352,
29906,
29962,
13,
18884,
363,
3858,
29892,
2752,
297,
26985,
29898,
29879,
2863,
29918,
3972,
1125,
13,
462,
1678,
565,
2752,
1275,
934,
29918,
4993,
29901,
13,
462,
4706,
11073,
29889,
4397,
29898,
9302,
29889,
13470,
29941,
29906,
29898,
1643,
876,
13,
462,
4706,
2867,
13,
9651,
11073,
353,
7442,
29889,
2378,
29898,
21134,
29897,
13,
9651,
697,
8711,
353,
7442,
29889,
3298,
359,
3552,
21134,
29889,
2311,
29892,
7442,
29889,
3317,
29898,
21134,
29897,
718,
29871,
29896,
511,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
9651,
697,
8711,
29961,
9302,
29889,
279,
927,
29898,
21134,
29889,
2311,
511,
11073,
29962,
353,
29871,
29896,
29889,
29900,
13,
9651,
260,
1341,
29889,
1202,
29918,
21134,
29898,
650,
8711,
29961,
2098,
2314,
13,
13,
29937,
2683,
2683,
2683,
2683,
9072,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
262,
29918,
3972,
742,
1134,
29922,
710,
29892,
2322,
2433,
25710,
396,
450,
1881,
3884,
6943,
1014,
11851,
3842,
310,
4558,
29889,
7806,
1014,
12322,
11524,
263,
848,
2752,
29892,
2845,
515,
278,
1855,
8783,
470,
5759,
491,
263,
402,
2190,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
449,
29918,
3972,
742,
1134,
29922,
710,
29892,
2322,
2433,
25710,
396,
29871,
450,
1962,
3884,
6943,
278,
13240,
848,
3402,
393,
28936,
8543,
24820,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
9778,
918,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29906,
29947,
29897,
396,
450,
10104,
304,
607,
4558,
526,
620,
1891,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
845,
21897,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29897,
396,
1383,
21897,
278,
1797,
310,
4558,
746,
24820,
29973,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
15843,
29918,
21134,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29897,
396,
1222,
637,
1967,
2752,
11073,
29973,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
25376,
482,
29918,
27736,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29900,
29900,
29897,
396,
450,
19649,
310,
4558,
1304,
363,
848,
10223,
362,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
1053,
931,
13,
1678,
3380,
353,
931,
29889,
2230,
580,
13,
1678,
848,
29918,
1457,
862,
362,
29898,
5085,
29889,
262,
29918,
3972,
29892,
6389,
29889,
449,
29918,
3972,
29892,
6389,
29889,
9778,
918,
29892,
6389,
29889,
845,
21897,
29892,
6389,
29889,
15843,
29918,
21134,
29892,
6389,
29889,
25376,
482,
29918,
27736,
29897,
13,
1678,
1596,
703,
2481,
584,
9162,
931,
29889,
2230,
580,
29899,
463,
29897,
13,
2
] |
sort/mysteryAlgorithm.py | udohsolomon/LearnAlgorithms | 0 | 125583 | #!/usr/bin/env python3
def mysteryAlgorithm(lst):
for i in range(1,len(lst)):
while i > 0 and lst[i-1] > lst[i]:
lst[i], lst[i-1] = lst[i-1], lst[i]
i -= 1
return lst
print(mysteryAlgorithm([6, 4, 3, 8, 5])) | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
1753,
29236,
22461,
4540,
29898,
20155,
1125,
268,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
2435,
29898,
20155,
22164,
308,
13,
4706,
1550,
474,
1405,
29871,
29900,
322,
24471,
29961,
29875,
29899,
29896,
29962,
1405,
24471,
29961,
29875,
5387,
13,
9651,
24471,
29961,
29875,
1402,
24471,
29961,
29875,
29899,
29896,
29962,
353,
24471,
29961,
29875,
29899,
29896,
1402,
24471,
29961,
29875,
29962,
13,
9651,
474,
22361,
29871,
29896,
13,
1678,
736,
24471,
13,
2158,
29898,
29885,
858,
708,
22461,
4540,
4197,
29953,
29892,
29871,
29946,
29892,
29871,
29941,
29892,
29871,
29947,
29892,
29871,
29945,
12622,
2
] |
opensfm/rig.py | cojosef96/OpenSfM | 0 | 68277 | """Tool for handling rigs"""
import logging
import re
from collections import defaultdict
from itertools import combinations
import networkx as nx
import numpy as np
from opensfm import actions, pygeometry, pymap
from opensfm.dataset import DataSet, DataSetBase
logger = logging.getLogger(__name__)
def find_image_rig(image, rig_patterns):
"""Given an image and candidates rig model patterns, return the
RigID/RigCameraID/Instance Member ID this image belongs to.
"""
for rig_id, patterns in rig_patterns.items():
for rig_camera_id, pattern in patterns.items():
instance_member_id = re.sub(pattern, "", image)
if instance_member_id == "":
continue
if instance_member_id != image:
return (rig_id, rig_camera_id, instance_member_id)
return None, None, None
def create_instances_with_patterns(images, rig_patterns):
"""Using the provided patterns, group images that should belong to the same rig instances.
Incomplete rig instances wrt. the expected size are not considered.
Returns :
A dict of list of list of images, each list being an instances being aggregated by Rig ID
"""
per_pattern = defaultdict(dict)
for image in images:
rig_id, rig_camera_id, instance_member_id = find_image_rig(image, rig_patterns)
if not rig_id:
continue
if instance_member_id not in per_pattern[rig_id]:
per_pattern[rig_id][instance_member_id] = []
per_pattern[rig_id][instance_member_id].append((image, rig_camera_id))
complete_instances = defaultdict(list)
problematic_images = []
for rig_id, patterns in per_pattern.items():
for pattern_images in patterns.values():
expected_size = len(rig_patterns[rig_id])
if len(pattern_images) != expected_size:
problematic_images += [im[0] for im in pattern_images]
else:
complete_instances[rig_id].append(pattern_images)
if problematic_images:
logger.warning(
(
"The following images are part of an incomplete rig, thus"
f"won't be considered of being part of a rig\n {problematic_images}"
)
)
return complete_instances
def create_subset_dataset_from_instances(data: DataSet, instances_per_rig, name):
"""Given a list of images grouped by rigs instances, pick a subset of images
and create a dataset subset with the provided name from them.
Returns :
A DataSet containing a subset of images containing enough rig instances
"""
subset_images = []
for instances in instances_per_rig.values():
instances_sorted = sorted(
instances, key=lambda x: data.load_exif(x[0][0])["capture_time"]
)
subset_size = data.config["rig_calibration_subset_size"]
middle = len(instances_sorted) / 2
instances_calibrate = instances_sorted[
max([0, middle - int(subset_size / 2)]) : min(
[middle + int(subset_size / 2), len(instances_sorted) - 1]
)
]
for instance in instances_calibrate:
subset_images += [x[0] for x in instance]
return data.subset(name, subset_images)
def compute_relative_pose(rig_id, pose_instances):
""" Compute a rig model relatives poses given poses grouped by rig instance. """
# Put all poses instances into some canonical frame taken as the mean of their R|t
centered_pose_instances = []
for instance in pose_instances:
origin_center = np.zeros(3)
rotation_center = np.zeros(3)
for shot, _ in instance:
rotation_center += shot.pose.rotation
origin_center += shot.pose.get_origin()
origin_center /= len(instance)
rotation_center /= len(instance)
centered_pose_instance = []
for shot, rig_camera_id in instance:
instance_pose = pygeometry.Pose(rotation_center)
instance_pose.set_origin(origin_center)
instance_pose_camera = shot.pose.relative_to(instance_pose)
centered_pose_instance.append(
(
instance_pose_camera,
rig_camera_id,
shot.camera.id,
)
)
centered_pose_instances.append(centered_pose_instance)
# Average canonical poses per RigCamera ID
average_origin, average_rotation, count_poses, camera_ids = {}, {}, {}, {}
for centered_pose_instance in centered_pose_instances:
for pose, rig_camera_id, camera_id in centered_pose_instance:
if rig_camera_id not in average_origin:
average_origin[rig_camera_id] = np.zeros(3)
average_rotation[rig_camera_id] = np.zeros(3)
count_poses[rig_camera_id] = 0
average_origin[rig_camera_id] += pose.get_origin()
average_rotation[rig_camera_id] += pose.rotation
camera_ids[rig_camera_id] = camera_id
count_poses[rig_camera_id] += 1
# Construct final rig_model results
rig_model = pymap.RigModel(rig_id)
for rig_camera_id, count in count_poses.items():
o = average_origin[rig_camera_id] / count
r = average_rotation[rig_camera_id] / count
pose = pygeometry.Pose(r)
pose.set_origin(o)
rig_model.add_rig_camera(pymap.RigCamera(pose, rig_camera_id))
return rig_model
def create_rig_models_from_reconstruction(reconstruction, instances_per_rig):
""" Computed rig model's, given a reconstruction and rig instances's shots. """
rig_models = {}
reconstructions_shots = set(reconstruction.shots)
for rig_id, instances in instances_per_rig.items():
pose_groups = []
for instance in instances:
if any(
True if shot_id not in reconstructions_shots else False
for shot_id, _ in instance
):
continue
pose_groups.append(
[
(reconstruction.shots[shot_id], rig_camera_id)
for shot_id, rig_camera_id in instance
]
)
rig_models[rig_id] = compute_relative_pose(rig_id, pose_groups)
return rig_models
def create_rigs_with_pattern(data: DataSet, patterns):
"""Create rig data (`rig_models.json` and `rig_assignments.json`) by performing
pattern matching to group images belonging to the same instances, followed
by a bit of ad-hoc SfM to find some initial relative poses.
"""
# Construct instances assignments for each rig
instances_per_rig = create_instances_with_patterns(data.images(), patterns)
for rig_id, instances in instances_per_rig.items():
logger.info(
f"Found {len(instances)} rig instances for rig {rig_id} using pattern matching."
)
# Create some subset DataSet with enough images from each rig
subset_data = create_subset_dataset_from_instances(
data, instances_per_rig, "rig_calibration"
)
# # Run a bit of SfM without any rig
logger.info(f"Running SfM on a subset of {len(subset_data.images())} images.")
actions.extract_metadata.run_dataset(subset_data)
actions.detect_features.run_dataset(subset_data)
actions.match_features.run_dataset(subset_data)
actions.create_tracks.run_dataset(subset_data)
actions.reconstruct.run_dataset(subset_data)
# Compute some relative poses
rig_models = create_rig_models_from_reconstruction(
subset_data.load_reconstruction()[0], instances_per_rig
)
data.save_rig_models(rig_models)
data.save_rig_assignments(instances_per_rig)
def same_rig_shot(meta1, meta2):
"""True if shots taken at the same time on a rig."""
have_gps = (
"gps" in meta1
and "gps" in meta2
and "latitude" in meta1["gps"]
and "latitude" in meta2["gps"]
)
same_gps = (
have_gps
and meta1["gps"]["latitude"] == meta2["gps"]["latitude"]
and meta1["gps"]["longitude"] == meta2["gps"]["longitude"]
)
same_time = meta1["capture_time"] == meta2["capture_time"]
return same_gps and same_time
def detect_rigs(images, data: DataSetBase):
"""Search for rigs in a set of images.
For each image on a rig, returns rig, rig_camera and rig_pose ids.
"""
# Build graph of connected images and sequences
image_graph = nx.Graph()
sequence_graph = nx.Graph()
for im1, im2 in combinations(images, 2):
meta1 = data.load_exif(im1)
meta2 = data.load_exif(im2)
if same_rig_shot(meta1, meta2):
image_graph.add_edge(im1, im2)
sequence_graph.add_edge(meta1["skey"], meta2["skey"])
# Build rigs
# pyre-fixme[16]: Module `nx` has no attribute `connected_components`.
sequence_cc = nx.connected_components(sequence_graph)
sequence_rig_info = {}
for i, cc in enumerate(sequence_cc):
for j, sequence in enumerate(cc):
sequence_rig_info[sequence] = {"rig": i, "rig_camera": j}
# Build rig poses
# pyre-fixme[16]: Module `nx` has no attribute `connected_components`.
image_cc = nx.connected_components(image_graph)
rig_info = {}
for i, cc in enumerate(image_cc):
for image in cc:
meta = data.load_exif(image)
sr = sequence_rig_info[meta["skey"]]
rig_info[image] = {
"rig": sr["rig"],
"rig_camera": sr["rig_camera"],
"rig_pose": i,
}
return rig_info
def pose_kernel(x, y, rotation_std, translation_std):
"""Gaussian kernel on the diff between two poses."""
diff = x.relative_to(y)
dr = sum(diff.rotation ** 2)
dt = sum(diff.translation ** 2)
return np.exp(-dr / rotation_std ** 2 - dt / translation_std ** 2)
def pose_mode(poses, rotation_std, translation_std):
"""Find the most popular pose.
Popular is defined by a Parzen estimatior with the given
Gaussian kernel standard deviations.
"""
best_score = 0
best_pose = None
for pose in poses:
score = 0
for other in poses:
score += pose_kernel(pose, other, rotation_std, translation_std)
if score > best_score:
best_score = score
best_pose = pose
return best_pose
| [
1,
9995,
12229,
363,
11415,
12912,
29879,
15945,
29908,
13,
13,
5215,
12183,
13,
5215,
337,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
4256,
8504,
1053,
18240,
13,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
5215,
12655,
408,
7442,
13,
3166,
13246,
24826,
1053,
8820,
29892,
11451,
19156,
29892,
282,
962,
481,
13,
3166,
13246,
24826,
29889,
24713,
1053,
3630,
2697,
29892,
3630,
2697,
5160,
13,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1753,
1284,
29918,
3027,
29918,
8966,
29898,
3027,
29892,
12912,
29918,
11037,
29879,
1125,
13,
1678,
9995,
29954,
5428,
385,
1967,
322,
21669,
12912,
1904,
15038,
29892,
736,
278,
13,
1678,
390,
335,
1367,
29914,
29934,
335,
20717,
1367,
29914,
4998,
19495,
3553,
445,
1967,
14393,
304,
29889,
13,
1678,
9995,
13,
1678,
363,
12912,
29918,
333,
29892,
15038,
297,
12912,
29918,
11037,
29879,
29889,
7076,
7295,
13,
4706,
363,
12912,
29918,
26065,
29918,
333,
29892,
4766,
297,
15038,
29889,
7076,
7295,
13,
9651,
2777,
29918,
14242,
29918,
333,
353,
337,
29889,
1491,
29898,
11037,
29892,
12633,
1967,
29897,
13,
9651,
565,
2777,
29918,
14242,
29918,
333,
1275,
376,
1115,
13,
18884,
6773,
13,
9651,
565,
2777,
29918,
14242,
29918,
333,
2804,
1967,
29901,
13,
18884,
736,
313,
8966,
29918,
333,
29892,
12912,
29918,
26065,
29918,
333,
29892,
2777,
29918,
14242,
29918,
333,
29897,
13,
1678,
736,
6213,
29892,
6213,
29892,
6213,
13,
13,
13,
1753,
1653,
29918,
2611,
2925,
29918,
2541,
29918,
11037,
29879,
29898,
8346,
29892,
12912,
29918,
11037,
29879,
1125,
13,
1678,
9995,
15156,
278,
4944,
15038,
29892,
2318,
4558,
393,
881,
6852,
304,
278,
1021,
12912,
8871,
29889,
13,
4706,
512,
8835,
12912,
8871,
281,
2273,
29889,
278,
3806,
2159,
526,
451,
5545,
29889,
13,
13,
1678,
16969,
584,
13,
4706,
319,
9657,
310,
1051,
310,
1051,
310,
4558,
29892,
1269,
1051,
1641,
385,
8871,
1641,
11404,
630,
491,
390,
335,
3553,
13,
1678,
9995,
13,
1678,
639,
29918,
11037,
353,
2322,
8977,
29898,
8977,
29897,
13,
1678,
363,
1967,
297,
4558,
29901,
13,
4706,
12912,
29918,
333,
29892,
12912,
29918,
26065,
29918,
333,
29892,
2777,
29918,
14242,
29918,
333,
353,
1284,
29918,
3027,
29918,
8966,
29898,
3027,
29892,
12912,
29918,
11037,
29879,
29897,
13,
4706,
565,
451,
12912,
29918,
333,
29901,
13,
9651,
6773,
13,
4706,
565,
2777,
29918,
14242,
29918,
333,
451,
297,
639,
29918,
11037,
29961,
8966,
29918,
333,
5387,
13,
9651,
639,
29918,
11037,
29961,
8966,
29918,
333,
3816,
8758,
29918,
14242,
29918,
333,
29962,
353,
5159,
13,
4706,
639,
29918,
11037,
29961,
8966,
29918,
333,
3816,
8758,
29918,
14242,
29918,
333,
1822,
4397,
3552,
3027,
29892,
12912,
29918,
26065,
29918,
333,
876,
13,
13,
1678,
4866,
29918,
2611,
2925,
353,
2322,
8977,
29898,
1761,
29897,
13,
1678,
1108,
2454,
29918,
8346,
353,
5159,
13,
1678,
363,
12912,
29918,
333,
29892,
15038,
297,
639,
29918,
11037,
29889,
7076,
7295,
13,
4706,
363,
4766,
29918,
8346,
297,
15038,
29889,
5975,
7295,
13,
9651,
3806,
29918,
2311,
353,
7431,
29898,
8966,
29918,
11037,
29879,
29961,
8966,
29918,
333,
2314,
13,
9651,
565,
7431,
29898,
11037,
29918,
8346,
29897,
2804,
3806,
29918,
2311,
29901,
13,
18884,
1108,
2454,
29918,
8346,
4619,
518,
326,
29961,
29900,
29962,
363,
527,
297,
4766,
29918,
8346,
29962,
13,
9651,
1683,
29901,
13,
18884,
4866,
29918,
2611,
2925,
29961,
8966,
29918,
333,
1822,
4397,
29898,
11037,
29918,
8346,
29897,
13,
13,
1678,
565,
1108,
2454,
29918,
8346,
29901,
13,
4706,
17927,
29889,
27392,
29898,
13,
9651,
313,
13,
18884,
376,
1576,
1494,
4558,
526,
760,
310,
385,
28907,
12912,
29892,
4550,
29908,
13,
18884,
285,
29908,
12620,
29915,
29873,
367,
5545,
310,
1641,
760,
310,
263,
12912,
29905,
29876,
426,
17199,
2454,
29918,
8346,
5038,
13,
9651,
1723,
13,
4706,
1723,
13,
13,
1678,
736,
4866,
29918,
2611,
2925,
13,
13,
13,
1753,
1653,
29918,
6484,
29918,
24713,
29918,
3166,
29918,
2611,
2925,
29898,
1272,
29901,
3630,
2697,
29892,
8871,
29918,
546,
29918,
8966,
29892,
1024,
1125,
13,
1678,
9995,
29954,
5428,
263,
1051,
310,
4558,
27831,
491,
12912,
29879,
8871,
29892,
5839,
263,
11306,
310,
4558,
13,
4706,
322,
1653,
263,
8783,
11306,
411,
278,
4944,
1024,
515,
963,
29889,
13,
13,
1678,
16969,
584,
13,
4706,
319,
3630,
2697,
6943,
263,
11306,
310,
4558,
6943,
3307,
12912,
8871,
13,
1678,
9995,
13,
1678,
11306,
29918,
8346,
353,
5159,
13,
1678,
363,
8871,
297,
8871,
29918,
546,
29918,
8966,
29889,
5975,
7295,
13,
4706,
8871,
29918,
24582,
353,
12705,
29898,
13,
9651,
8871,
29892,
1820,
29922,
2892,
921,
29901,
848,
29889,
1359,
29918,
735,
361,
29898,
29916,
29961,
29900,
3816,
29900,
2314,
3366,
17885,
545,
29918,
2230,
3108,
13,
4706,
1723,
13,
13,
4706,
11306,
29918,
2311,
353,
848,
29889,
2917,
3366,
8966,
29918,
1052,
26218,
29918,
6484,
29918,
2311,
3108,
13,
4706,
7256,
353,
7431,
29898,
2611,
2925,
29918,
24582,
29897,
847,
29871,
29906,
13,
4706,
8871,
29918,
1052,
4626,
403,
353,
8871,
29918,
24582,
29961,
13,
9651,
4236,
4197,
29900,
29892,
7256,
448,
938,
29898,
6484,
29918,
2311,
847,
29871,
29906,
29897,
2314,
584,
1375,
29898,
13,
18884,
518,
17662,
718,
938,
29898,
6484,
29918,
2311,
847,
29871,
29906,
511,
7431,
29898,
2611,
2925,
29918,
24582,
29897,
448,
29871,
29896,
29962,
13,
9651,
1723,
13,
4706,
4514,
13,
13,
4706,
363,
2777,
297,
8871,
29918,
1052,
4626,
403,
29901,
13,
9651,
11306,
29918,
8346,
4619,
518,
29916,
29961,
29900,
29962,
363,
921,
297,
2777,
29962,
13,
13,
1678,
736,
848,
29889,
6484,
29898,
978,
29892,
11306,
29918,
8346,
29897,
13,
13,
13,
1753,
10272,
29918,
22925,
29918,
4220,
29898,
8966,
29918,
333,
29892,
18593,
29918,
2611,
2925,
1125,
13,
1678,
9995,
11796,
29872,
263,
12912,
1904,
14576,
926,
267,
2183,
926,
267,
27831,
491,
12912,
2777,
29889,
9995,
13,
13,
1678,
396,
12065,
599,
926,
267,
8871,
964,
777,
24420,
3515,
4586,
408,
278,
2099,
310,
1009,
390,
29989,
29873,
13,
1678,
24764,
29918,
4220,
29918,
2611,
2925,
353,
5159,
13,
1678,
363,
2777,
297,
18593,
29918,
2611,
2925,
29901,
13,
4706,
3978,
29918,
5064,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
13733,
29918,
5064,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
4706,
363,
10322,
29892,
903,
297,
2777,
29901,
13,
9651,
13733,
29918,
5064,
4619,
10322,
29889,
4220,
29889,
5450,
362,
13,
9651,
3978,
29918,
5064,
4619,
10322,
29889,
4220,
29889,
657,
29918,
12574,
580,
13,
4706,
3978,
29918,
5064,
847,
29922,
7431,
29898,
8758,
29897,
13,
4706,
13733,
29918,
5064,
847,
29922,
7431,
29898,
8758,
29897,
13,
13,
4706,
24764,
29918,
4220,
29918,
8758,
353,
5159,
13,
4706,
363,
10322,
29892,
12912,
29918,
26065,
29918,
333,
297,
2777,
29901,
13,
9651,
2777,
29918,
4220,
353,
11451,
19156,
29889,
29925,
852,
29898,
5450,
362,
29918,
5064,
29897,
13,
9651,
2777,
29918,
4220,
29889,
842,
29918,
12574,
29898,
12574,
29918,
5064,
29897,
13,
9651,
2777,
29918,
4220,
29918,
26065,
353,
10322,
29889,
4220,
29889,
22925,
29918,
517,
29898,
8758,
29918,
4220,
29897,
13,
9651,
24764,
29918,
4220,
29918,
8758,
29889,
4397,
29898,
13,
18884,
313,
13,
462,
1678,
2777,
29918,
4220,
29918,
26065,
29892,
13,
462,
1678,
12912,
29918,
26065,
29918,
333,
29892,
13,
462,
1678,
10322,
29889,
26065,
29889,
333,
29892,
13,
18884,
1723,
13,
9651,
1723,
13,
4706,
24764,
29918,
4220,
29918,
2611,
2925,
29889,
4397,
29898,
5064,
287,
29918,
4220,
29918,
8758,
29897,
13,
13,
1678,
396,
319,
19698,
24420,
926,
267,
639,
390,
335,
20717,
3553,
13,
1678,
6588,
29918,
12574,
29892,
6588,
29918,
5450,
362,
29892,
2302,
29918,
10590,
29892,
10656,
29918,
4841,
353,
24335,
24335,
24335,
6571,
13,
1678,
363,
24764,
29918,
4220,
29918,
8758,
297,
24764,
29918,
4220,
29918,
2611,
2925,
29901,
13,
4706,
363,
18593,
29892,
12912,
29918,
26065,
29918,
333,
29892,
10656,
29918,
333,
297,
24764,
29918,
4220,
29918,
8758,
29901,
13,
9651,
565,
12912,
29918,
26065,
29918,
333,
451,
297,
6588,
29918,
12574,
29901,
13,
18884,
6588,
29918,
12574,
29961,
8966,
29918,
26065,
29918,
333,
29962,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
18884,
6588,
29918,
5450,
362,
29961,
8966,
29918,
26065,
29918,
333,
29962,
353,
7442,
29889,
3298,
359,
29898,
29941,
29897,
13,
18884,
2302,
29918,
10590,
29961,
8966,
29918,
26065,
29918,
333,
29962,
353,
29871,
29900,
13,
9651,
6588,
29918,
12574,
29961,
8966,
29918,
26065,
29918,
333,
29962,
4619,
18593,
29889,
657,
29918,
12574,
580,
13,
9651,
6588,
29918,
5450,
362,
29961,
8966,
29918,
26065,
29918,
333,
29962,
4619,
18593,
29889,
5450,
362,
13,
9651,
10656,
29918,
4841,
29961,
8966,
29918,
26065,
29918,
333,
29962,
353,
10656,
29918,
333,
13,
9651,
2302,
29918,
10590,
29961,
8966,
29918,
26065,
29918,
333,
29962,
4619,
29871,
29896,
13,
13,
1678,
396,
1281,
4984,
2186,
12912,
29918,
4299,
2582,
13,
1678,
12912,
29918,
4299,
353,
282,
962,
481,
29889,
29934,
335,
3195,
29898,
8966,
29918,
333,
29897,
13,
1678,
363,
12912,
29918,
26065,
29918,
333,
29892,
2302,
297,
2302,
29918,
10590,
29889,
7076,
7295,
13,
4706,
288,
353,
6588,
29918,
12574,
29961,
8966,
29918,
26065,
29918,
333,
29962,
847,
2302,
13,
4706,
364,
353,
6588,
29918,
5450,
362,
29961,
8966,
29918,
26065,
29918,
333,
29962,
847,
2302,
13,
4706,
18593,
353,
11451,
19156,
29889,
29925,
852,
29898,
29878,
29897,
13,
4706,
18593,
29889,
842,
29918,
12574,
29898,
29877,
29897,
13,
4706,
12912,
29918,
4299,
29889,
1202,
29918,
8966,
29918,
26065,
29898,
29886,
962,
481,
29889,
29934,
335,
20717,
29898,
4220,
29892,
12912,
29918,
26065,
29918,
333,
876,
13,
1678,
736,
12912,
29918,
4299,
13,
13,
13,
1753,
1653,
29918,
8966,
29918,
9794,
29918,
3166,
29918,
276,
3075,
4080,
29898,
276,
3075,
4080,
29892,
8871,
29918,
546,
29918,
8966,
1125,
13,
1678,
9995,
11796,
287,
12912,
1904,
29915,
29879,
29892,
2183,
263,
17789,
4080,
322,
12912,
8871,
29915,
29879,
528,
1862,
29889,
9995,
13,
1678,
12912,
29918,
9794,
353,
6571,
13,
1678,
17789,
582,
1953,
29918,
845,
1862,
353,
731,
29898,
276,
3075,
4080,
29889,
845,
1862,
29897,
13,
1678,
363,
12912,
29918,
333,
29892,
8871,
297,
8871,
29918,
546,
29918,
8966,
29889,
7076,
7295,
13,
4706,
18593,
29918,
13155,
353,
5159,
13,
4706,
363,
2777,
297,
8871,
29901,
13,
9651,
565,
738,
29898,
13,
18884,
5852,
565,
10322,
29918,
333,
451,
297,
17789,
582,
1953,
29918,
845,
1862,
1683,
7700,
13,
18884,
363,
10322,
29918,
333,
29892,
903,
297,
2777,
13,
632,
1125,
13,
18884,
6773,
13,
9651,
18593,
29918,
13155,
29889,
4397,
29898,
13,
18884,
518,
13,
462,
1678,
313,
276,
3075,
4080,
29889,
845,
1862,
29961,
8962,
29918,
333,
1402,
12912,
29918,
26065,
29918,
333,
29897,
13,
462,
1678,
363,
10322,
29918,
333,
29892,
12912,
29918,
26065,
29918,
333,
297,
2777,
13,
18884,
4514,
13,
9651,
1723,
13,
4706,
12912,
29918,
9794,
29961,
8966,
29918,
333,
29962,
353,
10272,
29918,
22925,
29918,
4220,
29898,
8966,
29918,
333,
29892,
18593,
29918,
13155,
29897,
13,
1678,
736,
12912,
29918,
9794,
13,
13,
13,
1753,
1653,
29918,
8966,
29879,
29918,
2541,
29918,
11037,
29898,
1272,
29901,
3630,
2697,
29892,
15038,
1125,
13,
1678,
9995,
4391,
12912,
848,
6695,
8966,
29918,
9794,
29889,
3126,
29952,
322,
421,
8966,
29918,
16645,
1860,
29889,
3126,
6348,
491,
15859,
13,
1678,
4766,
9686,
304,
2318,
4558,
23329,
304,
278,
1021,
8871,
29892,
5643,
13,
1678,
491,
263,
2586,
310,
594,
29899,
29882,
542,
317,
29888,
29924,
304,
1284,
777,
2847,
6198,
926,
267,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
1281,
4984,
8871,
3566,
1860,
363,
1269,
12912,
13,
1678,
8871,
29918,
546,
29918,
8966,
353,
1653,
29918,
2611,
2925,
29918,
2541,
29918,
11037,
29879,
29898,
1272,
29889,
8346,
3285,
15038,
29897,
13,
1678,
363,
12912,
29918,
333,
29892,
8871,
297,
8871,
29918,
546,
29918,
8966,
29889,
7076,
7295,
13,
4706,
17927,
29889,
3888,
29898,
13,
9651,
285,
29908,
9692,
426,
2435,
29898,
2611,
2925,
2915,
12912,
8871,
363,
12912,
426,
8966,
29918,
333,
29913,
773,
4766,
9686,
1213,
13,
4706,
1723,
13,
13,
1678,
396,
6204,
777,
11306,
3630,
2697,
411,
3307,
4558,
515,
1269,
12912,
13,
1678,
11306,
29918,
1272,
353,
1653,
29918,
6484,
29918,
24713,
29918,
3166,
29918,
2611,
2925,
29898,
13,
4706,
848,
29892,
8871,
29918,
546,
29918,
8966,
29892,
376,
8966,
29918,
1052,
26218,
29908,
13,
1678,
1723,
13,
13,
1678,
396,
396,
7525,
263,
2586,
310,
317,
29888,
29924,
1728,
738,
12912,
13,
1678,
17927,
29889,
3888,
29898,
29888,
29908,
27795,
317,
29888,
29924,
373,
263,
11306,
310,
426,
2435,
29898,
6484,
29918,
1272,
29889,
8346,
580,
2915,
4558,
23157,
13,
1678,
8820,
29889,
21111,
29918,
19635,
29889,
3389,
29918,
24713,
29898,
6484,
29918,
1272,
29897,
13,
1678,
8820,
29889,
4801,
522,
29918,
22100,
29889,
3389,
29918,
24713,
29898,
6484,
29918,
1272,
29897,
13,
1678,
8820,
29889,
4352,
29918,
22100,
29889,
3389,
29918,
24713,
29898,
6484,
29918,
1272,
29897,
13,
1678,
8820,
29889,
3258,
29918,
3018,
4684,
29889,
3389,
29918,
24713,
29898,
6484,
29918,
1272,
29897,
13,
1678,
8820,
29889,
276,
11433,
29889,
3389,
29918,
24713,
29898,
6484,
29918,
1272,
29897,
13,
13,
1678,
396,
11796,
29872,
777,
6198,
926,
267,
13,
1678,
12912,
29918,
9794,
353,
1653,
29918,
8966,
29918,
9794,
29918,
3166,
29918,
276,
3075,
4080,
29898,
13,
4706,
11306,
29918,
1272,
29889,
1359,
29918,
276,
3075,
4080,
580,
29961,
29900,
1402,
8871,
29918,
546,
29918,
8966,
13,
1678,
1723,
13,
13,
1678,
848,
29889,
7620,
29918,
8966,
29918,
9794,
29898,
8966,
29918,
9794,
29897,
13,
1678,
848,
29889,
7620,
29918,
8966,
29918,
16645,
1860,
29898,
2611,
2925,
29918,
546,
29918,
8966,
29897,
13,
13,
13,
1753,
1021,
29918,
8966,
29918,
8962,
29898,
7299,
29896,
29892,
12700,
29906,
1125,
13,
1678,
9995,
5574,
565,
528,
1862,
4586,
472,
278,
1021,
931,
373,
263,
12912,
1213,
15945,
13,
1678,
505,
29918,
29887,
567,
353,
313,
13,
4706,
376,
29887,
567,
29908,
297,
12700,
29896,
13,
4706,
322,
376,
29887,
567,
29908,
297,
12700,
29906,
13,
4706,
322,
376,
5066,
4279,
29908,
297,
12700,
29896,
3366,
29887,
567,
3108,
13,
4706,
322,
376,
5066,
4279,
29908,
297,
12700,
29906,
3366,
29887,
567,
3108,
13,
1678,
1723,
13,
1678,
1021,
29918,
29887,
567,
353,
313,
13,
4706,
505,
29918,
29887,
567,
13,
4706,
322,
12700,
29896,
3366,
29887,
567,
3108,
3366,
5066,
4279,
3108,
1275,
12700,
29906,
3366,
29887,
567,
3108,
3366,
5066,
4279,
3108,
13,
4706,
322,
12700,
29896,
3366,
29887,
567,
3108,
3366,
5426,
4279,
3108,
1275,
12700,
29906,
3366,
29887,
567,
3108,
3366,
5426,
4279,
3108,
13,
1678,
1723,
13,
1678,
1021,
29918,
2230,
353,
12700,
29896,
3366,
17885,
545,
29918,
2230,
3108,
1275,
12700,
29906,
3366,
17885,
545,
29918,
2230,
3108,
13,
1678,
736,
1021,
29918,
29887,
567,
322,
1021,
29918,
2230,
13,
13,
13,
1753,
6459,
29918,
8966,
29879,
29898,
8346,
29892,
848,
29901,
3630,
2697,
5160,
1125,
13,
1678,
9995,
7974,
363,
12912,
29879,
297,
263,
731,
310,
4558,
29889,
13,
13,
1678,
1152,
1269,
1967,
373,
263,
12912,
29892,
3639,
12912,
29892,
12912,
29918,
26065,
322,
12912,
29918,
4220,
18999,
29889,
13,
1678,
9995,
13,
1678,
396,
8878,
3983,
310,
6631,
4558,
322,
15602,
13,
1678,
1967,
29918,
4262,
353,
302,
29916,
29889,
9527,
580,
13,
1678,
5665,
29918,
4262,
353,
302,
29916,
29889,
9527,
580,
13,
1678,
363,
527,
29896,
29892,
527,
29906,
297,
18240,
29898,
8346,
29892,
29871,
29906,
1125,
13,
4706,
12700,
29896,
353,
848,
29889,
1359,
29918,
735,
361,
29898,
326,
29896,
29897,
13,
4706,
12700,
29906,
353,
848,
29889,
1359,
29918,
735,
361,
29898,
326,
29906,
29897,
13,
4706,
565,
1021,
29918,
8966,
29918,
8962,
29898,
7299,
29896,
29892,
12700,
29906,
1125,
13,
9651,
1967,
29918,
4262,
29889,
1202,
29918,
12864,
29898,
326,
29896,
29892,
527,
29906,
29897,
13,
9651,
5665,
29918,
4262,
29889,
1202,
29918,
12864,
29898,
7299,
29896,
3366,
29879,
1989,
12436,
12700,
29906,
3366,
29879,
1989,
20068,
13,
13,
1678,
396,
8878,
12912,
29879,
13,
1678,
396,
11451,
276,
29899,
5878,
1004,
29961,
29896,
29953,
5387,
15591,
421,
23818,
29952,
756,
694,
5352,
421,
18045,
29918,
14036,
1412,
13,
1678,
5665,
29918,
617,
353,
302,
29916,
29889,
18045,
29918,
14036,
29898,
16506,
29918,
4262,
29897,
13,
1678,
5665,
29918,
8966,
29918,
3888,
353,
6571,
13,
1678,
363,
474,
29892,
21759,
297,
26985,
29898,
16506,
29918,
617,
1125,
13,
4706,
363,
432,
29892,
5665,
297,
26985,
29898,
617,
1125,
13,
9651,
5665,
29918,
8966,
29918,
3888,
29961,
16506,
29962,
353,
8853,
8966,
1115,
474,
29892,
376,
8966,
29918,
26065,
1115,
432,
29913,
13,
13,
1678,
396,
8878,
12912,
926,
267,
13,
1678,
396,
11451,
276,
29899,
5878,
1004,
29961,
29896,
29953,
5387,
15591,
421,
23818,
29952,
756,
694,
5352,
421,
18045,
29918,
14036,
1412,
13,
1678,
1967,
29918,
617,
353,
302,
29916,
29889,
18045,
29918,
14036,
29898,
3027,
29918,
4262,
29897,
13,
1678,
12912,
29918,
3888,
353,
6571,
13,
1678,
363,
474,
29892,
21759,
297,
26985,
29898,
3027,
29918,
617,
1125,
13,
4706,
363,
1967,
297,
21759,
29901,
13,
9651,
12700,
353,
848,
29889,
1359,
29918,
735,
361,
29898,
3027,
29897,
13,
9651,
27236,
353,
5665,
29918,
8966,
29918,
3888,
29961,
7299,
3366,
29879,
1989,
3108,
29962,
13,
9651,
12912,
29918,
3888,
29961,
3027,
29962,
353,
426,
13,
18884,
376,
8966,
1115,
27236,
3366,
8966,
12436,
13,
18884,
376,
8966,
29918,
26065,
1115,
27236,
3366,
8966,
29918,
26065,
12436,
13,
18884,
376,
8966,
29918,
4220,
1115,
474,
29892,
13,
9651,
500,
13,
13,
1678,
736,
12912,
29918,
3888,
13,
13,
13,
1753,
18593,
29918,
17460,
29898,
29916,
29892,
343,
29892,
13733,
29918,
4172,
29892,
13962,
29918,
4172,
1125,
13,
1678,
9995,
29954,
17019,
8466,
373,
278,
2923,
1546,
1023,
926,
267,
1213,
15945,
13,
1678,
2923,
353,
921,
29889,
22925,
29918,
517,
29898,
29891,
29897,
13,
1678,
4192,
353,
2533,
29898,
12765,
29889,
5450,
362,
3579,
29871,
29906,
29897,
13,
1678,
11636,
353,
2533,
29898,
12765,
29889,
3286,
18411,
3579,
29871,
29906,
29897,
13,
1678,
736,
7442,
29889,
4548,
6278,
7707,
847,
13733,
29918,
4172,
3579,
29871,
29906,
448,
11636,
847,
13962,
29918,
4172,
3579,
29871,
29906,
29897,
13,
13,
13,
1753,
18593,
29918,
8513,
29898,
10590,
29892,
13733,
29918,
4172,
29892,
13962,
29918,
4172,
1125,
13,
1678,
9995,
12542,
278,
1556,
5972,
18593,
29889,
13,
13,
1678,
23691,
338,
3342,
491,
263,
1459,
2256,
4844,
271,
1611,
411,
278,
2183,
13,
1678,
22477,
8466,
3918,
29668,
800,
29889,
13,
1678,
9995,
13,
1678,
1900,
29918,
13628,
353,
29871,
29900,
13,
1678,
1900,
29918,
4220,
353,
6213,
13,
1678,
363,
18593,
297,
926,
267,
29901,
13,
4706,
8158,
353,
29871,
29900,
13,
4706,
363,
916,
297,
926,
267,
29901,
13,
9651,
8158,
4619,
18593,
29918,
17460,
29898,
4220,
29892,
916,
29892,
13733,
29918,
4172,
29892,
13962,
29918,
4172,
29897,
13,
4706,
565,
8158,
1405,
1900,
29918,
13628,
29901,
13,
9651,
1900,
29918,
13628,
353,
8158,
13,
9651,
1900,
29918,
4220,
353,
18593,
13,
1678,
736,
1900,
29918,
4220,
13,
2
] |
action_controller/scripts/ActionControllerNode.py | FablabHome/The_Essense_of_the_Grey_Region | 1 | 20737 | <gh_stars>1-10
#!/usr/bin/env python3
"""
MIT License
Copyright (c) 2020 rootadminWalker
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 json
import rospy
from core.Nodes import ActionEvaluator
class ActionControllerNode(ActionEvaluator):
def __init__(self):
# Initialize the intent to callback map, must have NotRecognized situation
self.intent2callback = {
'Introduce': self.__introduce,
'GiveMenu': self.__show_menu,
'OrderFood': self.__order_food,
'OrderFoodTakeOut': self.__order_food,
'NotRecognized': self.__not_recognized
}
super(ActionControllerNode, self).__init__()
def __introduce(self, intent, slots, raw_text, session):
introduce_dialog = '''
Ah, Forgive me for not introducing myself, masters.
I'm snippy, your virtual assistant in this restaurant,
I'm still under development, so you could only see me talking
right now.
'''
self.speaker.say_until_end(introduce_dialog)
@staticmethod
def __show_menu(intent, slots, raw_text, session):
menu = '''
Menu Price
-------------------------------------
French Fries $7
meat salad $20
spaghetti $23
hot chocolate $14
cappucino $19
tea $0
water $0
Hamburger $19
Ketchup $0
Tacos $15
Marshmellos $10
Steak $27
hot dog $10
'''
print(f"Sorry for your inconvenience, here's the menu\n\n{menu}")
def __order_food(self, intent, slots, raw_text, session):
order_what = False
orders = {}
i = 0
if session is not None:
rospy.loginfo(json.loads(session.custom_data))
while i < len(slots):
if slots[i]['slotName'] == 'amount':
amount = int(slots[i]['value']['value'])
try:
next_slot = slots[i + 1]
if next_slot['slotName'] == 'food':
orders[next_slot['value']['value']] = amount
i += 2
elif next_slot['slotName'] == 'amount':
orders[f'Unknown{i}'] = amount
i += 1
order_what = True
except IndexError:
order_what = True
orders[f'Unknown{i}'] = amount
i += 1
elif slots[i]['slotName'] == 'food':
orders[slots[i]['value']['value']] = 1
i += 1
if order_what or len(slots) == 0:
self.speaker.say_until_end("I'm sorry, but could you repeat it again?")
self.start_session(next_intents=['OrderFood', 'NotRecognized'], custom_data=orders)
return
if self.on_session():
if set(session.possible_next_intents) == {'OrderFood'}:
if not order_what:
self.stop_session()
self.speaker.say_until_end('Ok, Gotcha')
print(orders)
def __not_recognized(self, intent, slots, raw_text, session):
if len(session) == 0:
rospy.loginfo(f"Currently there isn't an action for '{raw_text}'")
elif session[0] == 'OrderFood':
rospy.loginfo('Sorry, I could not understand what do you want to order, please say it again')
self.stop_session()
def reset(self):
pass
if __name__ == '__main__':
node = ActionControllerNode()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
13,
26349,
19245,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
3876,
6406,
29956,
2235,
261,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
974,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
13,
262,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
13,
517,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
13,
9708,
583,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
338,
13,
29888,
595,
3276,
304,
437,
577,
29892,
4967,
304,
278,
1494,
5855,
29901,
13,
13,
1576,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
5134,
297,
599,
13,
9708,
583,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
13,
28350,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
613,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29979,
8079,
13764,
29979,
476,
22255,
29892,
8528,
15094,
1799,
6323,
13,
29902,
3580,
5265,
3352,
29892,
2672,
6154,
15789,
4214,
350,
2692,
6058,
27848,
3352,
7495,
6093,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
13,
29943,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
5300,
405,
1164,
1177,
15860,
1177,
1692,
13780,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
13,
20656,
29950,
24125,
6323,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
20700,
17705,
6181,
15842,
13764,
29979,
315,
4375,
7833,
29892,
21330,
1529,
1692,
29903,
6323,
438,
29911,
4448,
13,
5265,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13764,
319,
9838,
8079,
8707,
29911,
4717,
1783,
29892,
323,
8476,
6323,
438,
29911,
4448,
22119,
1660,
29892,
9033,
3235,
4214,
3895,
29892,
13,
12015,
8079,
6323,
2672,
8707,
8186,
9838,
22659,
6093,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
6093,
13,
6156,
7818,
12982,
1525,
29889,
13,
13,
15945,
29908,
13,
5215,
4390,
13,
13,
5215,
696,
1028,
29891,
13,
13,
3166,
7136,
29889,
20284,
1053,
9123,
29923,
4387,
1061,
13,
13,
13,
1990,
9123,
2956,
4247,
29898,
4276,
29923,
4387,
1061,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
396,
25455,
278,
7609,
304,
6939,
2910,
29892,
1818,
505,
2216,
23122,
1891,
6434,
13,
4706,
1583,
29889,
14029,
29906,
14035,
353,
426,
13,
9651,
525,
2928,
3518,
346,
2396,
1583,
17255,
524,
3518,
346,
29892,
13,
9651,
525,
29954,
573,
6823,
2396,
1583,
17255,
4294,
29918,
6510,
29892,
13,
9651,
525,
7514,
29943,
2092,
2396,
1583,
17255,
2098,
29918,
1181,
397,
29892,
13,
9651,
525,
7514,
29943,
2092,
26772,
3744,
2396,
1583,
17255,
2098,
29918,
1181,
397,
29892,
13,
9651,
525,
3664,
23122,
1891,
2396,
1583,
17255,
1333,
29918,
29423,
1891,
13,
4706,
500,
13,
13,
4706,
2428,
29898,
4276,
2956,
4247,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
4770,
524,
3518,
346,
29898,
1311,
29892,
7609,
29892,
2243,
1862,
29892,
10650,
29918,
726,
29892,
4867,
1125,
13,
4706,
14944,
29918,
15901,
353,
14550,
13,
4706,
9070,
29892,
383,
990,
573,
592,
363,
451,
4547,
3277,
6142,
29892,
5835,
29879,
29889,
13,
4706,
306,
29915,
29885,
9830,
23717,
29892,
596,
6901,
20255,
297,
445,
27144,
29892,
13,
4706,
306,
29915,
29885,
1603,
1090,
5849,
29892,
577,
366,
1033,
871,
1074,
592,
9963,
13,
4706,
1492,
1286,
29889,
13,
4706,
14550,
13,
4706,
1583,
29889,
5965,
5790,
29889,
20834,
29918,
29305,
29918,
355,
29898,
524,
3518,
346,
29918,
15901,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4770,
4294,
29918,
6510,
29898,
14029,
29892,
2243,
1862,
29892,
10650,
29918,
726,
29892,
4867,
1125,
13,
4706,
6143,
353,
14550,
13,
4706,
20019,
462,
3986,
20743,
13,
4706,
448,
2683,
2683,
807,
13,
4706,
5176,
383,
2722,
462,
1678,
395,
29955,
13,
4706,
27654,
4497,
328,
462,
268,
395,
29906,
29900,
13,
4706,
805,
21705,
9890,
462,
418,
395,
29906,
29941,
13,
4706,
7375,
521,
542,
23167,
462,
29871,
395,
29896,
29946,
13,
4706,
274,
932,
1682,
1789,
462,
418,
395,
29896,
29929,
13,
4706,
23429,
462,
632,
395,
29900,
13,
4706,
4094,
462,
965,
395,
29900,
13,
4706,
11610,
26120,
462,
418,
395,
29896,
29929,
13,
4706,
476,
3486,
786,
462,
308,
395,
29900,
13,
4706,
323,
562,
359,
462,
3986,
395,
29896,
29945,
13,
4706,
13216,
29885,
514,
359,
462,
1678,
395,
29896,
29900,
13,
4706,
2443,
557,
462,
3986,
395,
29906,
29955,
13,
4706,
7375,
11203,
462,
4706,
395,
29896,
29900,
13,
4706,
14550,
13,
4706,
1596,
29898,
29888,
29908,
29903,
3818,
363,
596,
22629,
854,
5597,
29892,
1244,
29915,
29879,
278,
6143,
29905,
29876,
29905,
29876,
29912,
6510,
27195,
13,
13,
1678,
822,
4770,
2098,
29918,
1181,
397,
29898,
1311,
29892,
7609,
29892,
2243,
1862,
29892,
10650,
29918,
726,
29892,
4867,
1125,
13,
4706,
1797,
29918,
5816,
353,
7700,
13,
4706,
11299,
353,
6571,
13,
4706,
474,
353,
29871,
29900,
13,
4706,
565,
4867,
338,
451,
6213,
29901,
13,
9651,
696,
1028,
29891,
29889,
1188,
3888,
29898,
3126,
29889,
18132,
29898,
7924,
29889,
6341,
29918,
1272,
876,
13,
4706,
1550,
474,
529,
7431,
29898,
2536,
1862,
1125,
13,
9651,
565,
2243,
1862,
29961,
29875,
22322,
2536,
327,
1170,
2033,
1275,
525,
14506,
2396,
13,
18884,
5253,
353,
938,
29898,
2536,
1862,
29961,
29875,
22322,
1767,
16215,
1767,
11287,
13,
18884,
1018,
29901,
13,
462,
1678,
2446,
29918,
2536,
327,
353,
2243,
1862,
29961,
29875,
718,
29871,
29896,
29962,
13,
462,
1678,
565,
2446,
29918,
2536,
327,
1839,
2536,
327,
1170,
2033,
1275,
525,
1181,
397,
2396,
13,
462,
4706,
11299,
29961,
4622,
29918,
2536,
327,
1839,
1767,
16215,
1767,
2033,
29962,
353,
5253,
13,
462,
4706,
474,
4619,
29871,
29906,
13,
462,
1678,
25342,
2446,
29918,
2536,
327,
1839,
2536,
327,
1170,
2033,
1275,
525,
14506,
2396,
13,
462,
4706,
11299,
29961,
29888,
29915,
14148,
29912,
29875,
29913,
2033,
353,
5253,
13,
462,
4706,
474,
4619,
29871,
29896,
13,
462,
4706,
1797,
29918,
5816,
353,
5852,
13,
13,
18884,
5174,
11374,
2392,
29901,
13,
462,
1678,
1797,
29918,
5816,
353,
5852,
13,
462,
1678,
11299,
29961,
29888,
29915,
14148,
29912,
29875,
29913,
2033,
353,
5253,
13,
462,
1678,
474,
4619,
29871,
29896,
13,
9651,
25342,
2243,
1862,
29961,
29875,
22322,
2536,
327,
1170,
2033,
1275,
525,
1181,
397,
2396,
13,
18884,
11299,
29961,
2536,
1862,
29961,
29875,
22322,
1767,
16215,
1767,
2033,
29962,
353,
29871,
29896,
13,
18884,
474,
4619,
29871,
29896,
13,
13,
4706,
565,
1797,
29918,
5816,
470,
7431,
29898,
2536,
1862,
29897,
1275,
29871,
29900,
29901,
13,
9651,
1583,
29889,
5965,
5790,
29889,
20834,
29918,
29305,
29918,
355,
703,
29902,
29915,
29885,
7423,
29892,
541,
1033,
366,
12312,
372,
1449,
29973,
1159,
13,
9651,
1583,
29889,
2962,
29918,
7924,
29898,
4622,
29918,
524,
1237,
29922,
1839,
7514,
29943,
2092,
742,
525,
3664,
23122,
1891,
7464,
2888,
29918,
1272,
29922,
20488,
29897,
13,
9651,
736,
13,
13,
4706,
565,
1583,
29889,
265,
29918,
7924,
7295,
13,
9651,
565,
731,
29898,
7924,
29889,
27338,
29918,
4622,
29918,
524,
1237,
29897,
1275,
11117,
7514,
29943,
2092,
29915,
6177,
13,
18884,
565,
451,
1797,
29918,
5816,
29901,
13,
462,
1678,
1583,
29889,
9847,
29918,
7924,
580,
13,
13,
4706,
1583,
29889,
5965,
5790,
29889,
20834,
29918,
29305,
29918,
355,
877,
20434,
29892,
15992,
5815,
1495,
13,
4706,
1596,
29898,
20488,
29897,
13,
13,
1678,
822,
4770,
1333,
29918,
29423,
1891,
29898,
1311,
29892,
7609,
29892,
2243,
1862,
29892,
10650,
29918,
726,
29892,
4867,
1125,
13,
4706,
565,
7431,
29898,
7924,
29897,
1275,
29871,
29900,
29901,
13,
9651,
696,
1028,
29891,
29889,
1188,
3888,
29898,
29888,
29908,
7583,
368,
727,
3508,
29915,
29873,
385,
3158,
363,
22372,
1610,
29918,
726,
10162,
1159,
13,
4706,
25342,
4867,
29961,
29900,
29962,
1275,
525,
7514,
29943,
2092,
2396,
13,
9651,
696,
1028,
29891,
29889,
1188,
3888,
877,
29903,
3818,
29892,
306,
1033,
451,
2274,
825,
437,
366,
864,
304,
1797,
29892,
3113,
1827,
372,
1449,
1495,
13,
9651,
1583,
29889,
9847,
29918,
7924,
580,
13,
13,
1678,
822,
10092,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
2943,
353,
9123,
2956,
4247,
580,
13,
2
] |
weapon/__init__.py | dannl/hunter-sim-classic | 0 | 146605 | <gh_stars>0
import random
import config
class Weapon:
def __init__(self, min_d, max_d, speed):
self.min_d = min_d
self.max_d = max_d
self.speed = speed
def rand_dmg(self):
if config.USE_AVERAGE:
return self.avr_dmg()
return random.randint(self.min_d, self.max_d)
def avr_dmg(self):
return (self.min_d + self.max_d) / 2
CJ = Weapon(124, 186, 3.4)
KL = Weapon(128, 238, 3.2)
SS = Weapon(89, 223, 2.7)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
13,
5215,
2295,
13,
13,
13,
1990,
1334,
481,
265,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1375,
29918,
29881,
29892,
4236,
29918,
29881,
29892,
6210,
1125,
13,
4706,
1583,
29889,
1195,
29918,
29881,
353,
1375,
29918,
29881,
13,
4706,
1583,
29889,
3317,
29918,
29881,
353,
4236,
29918,
29881,
13,
4706,
1583,
29889,
19322,
353,
6210,
13,
13,
1678,
822,
20088,
29918,
18933,
29887,
29898,
1311,
1125,
13,
4706,
565,
2295,
29889,
17171,
29918,
29909,
5348,
10461,
29901,
13,
9651,
736,
1583,
29889,
485,
29878,
29918,
18933,
29887,
580,
13,
4706,
736,
4036,
29889,
9502,
524,
29898,
1311,
29889,
1195,
29918,
29881,
29892,
1583,
29889,
3317,
29918,
29881,
29897,
13,
13,
1678,
822,
1029,
29878,
29918,
18933,
29887,
29898,
1311,
1125,
13,
4706,
736,
313,
1311,
29889,
1195,
29918,
29881,
718,
1583,
29889,
3317,
29918,
29881,
29897,
847,
29871,
29906,
13,
13,
13,
29907,
29967,
353,
1334,
481,
265,
29898,
29896,
29906,
29946,
29892,
29871,
29896,
29947,
29953,
29892,
29871,
29941,
29889,
29946,
29897,
13,
29968,
29931,
353,
1334,
481,
265,
29898,
29896,
29906,
29947,
29892,
29871,
29906,
29941,
29947,
29892,
29871,
29941,
29889,
29906,
29897,
13,
1799,
353,
1334,
481,
265,
29898,
29947,
29929,
29892,
29871,
29906,
29906,
29941,
29892,
29871,
29906,
29889,
29955,
29897,
13,
2
] |
segmentation_models_pytorch/encoders/dpn.py | coolcat647/segmentation_models.pytorch | 0 | 193787 | <filename>segmentation_models_pytorch/encoders/dpn.py
""" Each encoder should have following attributes and methods and be inherited from `_base.EncoderMixin`
Attributes:
_out_channels (list of int): specify number of channels for each encoder feature tensor
_depth (int): specify number of stages in decoder (in other words number of downsampling operations)
_in_channels (int): default number of input channels in first Conv2d layer for encoder (usually 3)
Methods:
forward(self, x: torch.Tensor)
produce list of features of different spatial resolutions, each feature is a 4D torch.tensor of
shape NCHW (features should be sorted in descending order according to spatial resolution, starting
with resolution same as input `x` tensor).
Input: `x` with shape (1, 3, 64, 64)
Output: [f0, f1, f2, f3, f4, f5] - features with corresponding shapes
[(1, 3, 64, 64), (1, 64, 32, 32), (1, 128, 16, 16), (1, 256, 8, 8),
(1, 512, 4, 4), (1, 1024, 2, 2)] (C - dim may differ)
also should support number of features according to specified depth, e.g. if depth = 5,
number of feature tensors = 6 (one with same resolution as input and 5 downsampled),
depth = 3 -> number of feature tensors = 4 (one with same resolution as input and 3 downsampled).
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from pretrainedmodels.models.dpn import DPN
from pretrainedmodels.models.dpn import pretrained_settings
from ._base import EncoderMixin
class DPNEncorder(DPN, EncoderMixin):
def __init__(self, stage_idxs, out_channels, depth=5, **kwargs):
super(DPNEncorder, self).__init__(**kwargs)
self._stage_idxs = stage_idxs
self._depth = depth
self._out_channels = out_channels
self._in_channels = 3
del self.last_linear
def get_stages(self):
return [
nn.Identity(),
nn.Sequential(self.features[0].conv, self.features[0].bn, self.features[0].act),
nn.Sequential(self.features[0].pool, self.features[1 : self._stage_idxs[0]]),
self.features[self._stage_idxs[0] : self._stage_idxs[1]],
self.features[self._stage_idxs[1] : self._stage_idxs[2]],
self.features[self._stage_idxs[2] : self._stage_idxs[3]],
]
def forward(self, x):
stages = self.get_stages()
features = []
for i in range(self._depth + 1):
x = stages[i](x)
if isinstance(x, (list, tuple)):
features.append(F.relu(torch.cat(x, dim=1), inplace=True))
else:
features.append(x)
return features
def load_state_dict(self, state_dict, **kwargs):
state_dict.pop("last_linear.bias")
state_dict.pop("last_linear.weight")
super(DPNEncorder, self).load_state_dict(state_dict, **kwargs)
dpn_encoders = {
"dpn68": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn68"],
"params": {
"stage_idxs": (4, 8, 20, 24),
"out_channels": (3, 10, 144, 320, 704, 832),
"groups": 32,
"inc_sec": (16, 32, 32, 64),
"k_r": 128,
"k_sec": (3, 4, 12, 3),
"num_classes": 1000,
"num_init_features": 10,
"small": True,
"test_time_pool": True,
},
},
"dpn68b": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn68b"],
"params": {
"stage_idxs": (4, 8, 20, 24),
"out_channels": (3, 10, 144, 320, 704, 832),
"b": True,
"groups": 32,
"inc_sec": (16, 32, 32, 64),
"k_r": 128,
"k_sec": (3, 4, 12, 3),
"num_classes": 1000,
"num_init_features": 10,
"small": True,
"test_time_pool": True,
},
},
"dpn92": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn92"],
"params": {
"stage_idxs": (4, 8, 28, 32),
"out_channels": (3, 64, 336, 704, 1552, 2688),
"groups": 32,
"inc_sec": (16, 32, 24, 128),
"k_r": 96,
"k_sec": (3, 4, 20, 3),
"num_classes": 1000,
"num_init_features": 64,
"test_time_pool": True,
},
},
"dpn98": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn98"],
"params": {
"stage_idxs": (4, 10, 30, 34),
"out_channels": (3, 96, 336, 768, 1728, 2688),
"groups": 40,
"inc_sec": (16, 32, 32, 128),
"k_r": 160,
"k_sec": (3, 6, 20, 3),
"num_classes": 1000,
"num_init_features": 96,
"test_time_pool": True,
},
},
"dpn107": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn107"],
"params": {
"stage_idxs": (5, 13, 33, 37),
"out_channels": (3, 128, 376, 1152, 2432, 2688),
"groups": 50,
"inc_sec": (20, 64, 64, 128),
"k_r": 200,
"k_sec": (4, 8, 20, 3),
"num_classes": 1000,
"num_init_features": 128,
"test_time_pool": True,
},
},
"dpn131": {
"encoder": DPNEncorder,
"pretrained_settings": pretrained_settings["dpn131"],
"params": {
"stage_idxs": (5, 13, 41, 45),
"out_channels": (3, 128, 352, 832, 1984, 2688),
"groups": 40,
"inc_sec": (16, 32, 32, 128),
"k_r": 160,
"k_sec": (4, 8, 28, 3),
"num_classes": 1000,
"num_init_features": 128,
"test_time_pool": True,
},
},
}
| [
1,
529,
9507,
29958,
28192,
362,
29918,
9794,
29918,
2272,
7345,
305,
29914,
3977,
397,
414,
29914,
6099,
29876,
29889,
2272,
13,
15945,
29908,
7806,
2094,
6119,
881,
505,
1494,
8393,
322,
3519,
322,
367,
23878,
515,
19392,
3188,
29889,
8566,
6119,
29924,
861,
262,
29952,
13,
13,
15801,
29901,
13,
13,
1678,
903,
449,
29918,
305,
12629,
313,
1761,
310,
938,
1125,
6084,
1353,
310,
18196,
363,
1269,
2094,
6119,
4682,
12489,
13,
1678,
903,
19488,
313,
524,
1125,
6084,
1353,
310,
22950,
297,
1602,
6119,
313,
262,
916,
3838,
1353,
310,
1623,
13445,
10335,
6931,
29897,
13,
1678,
903,
262,
29918,
305,
12629,
313,
524,
1125,
2322,
1353,
310,
1881,
18196,
297,
937,
1281,
29894,
29906,
29881,
7546,
363,
2094,
6119,
313,
375,
1474,
29871,
29941,
29897,
13,
13,
26112,
29901,
13,
13,
1678,
6375,
29898,
1311,
29892,
921,
29901,
4842,
305,
29889,
29911,
6073,
29897,
13,
4706,
7738,
1051,
310,
5680,
310,
1422,
18652,
10104,
29879,
29892,
1269,
4682,
338,
263,
29871,
29946,
29928,
4842,
305,
29889,
20158,
310,
13,
4706,
8267,
405,
3210,
29956,
313,
22100,
881,
367,
12705,
297,
5153,
2548,
1797,
5034,
304,
18652,
10104,
29892,
6257,
13,
4706,
411,
10104,
1021,
408,
1881,
421,
29916,
29952,
12489,
467,
13,
13,
4706,
10567,
29901,
421,
29916,
29952,
411,
8267,
313,
29896,
29892,
29871,
29941,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
29897,
13,
4706,
10604,
29901,
518,
29888,
29900,
29892,
285,
29896,
29892,
285,
29906,
29892,
285,
29941,
29892,
285,
29946,
29892,
285,
29945,
29962,
448,
5680,
411,
6590,
25834,
13,
18884,
17288,
29896,
29892,
29871,
29941,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
511,
313,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
511,
313,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
511,
313,
29896,
29892,
29871,
29906,
29945,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
511,
13,
18884,
313,
29896,
29892,
29871,
29945,
29896,
29906,
29892,
29871,
29946,
29892,
29871,
29946,
511,
313,
29896,
29892,
29871,
29896,
29900,
29906,
29946,
29892,
29871,
29906,
29892,
29871,
29906,
4638,
313,
29907,
448,
3964,
1122,
1163,
29897,
13,
13,
4706,
884,
881,
2304,
1353,
310,
5680,
5034,
304,
6790,
10809,
29892,
321,
29889,
29887,
29889,
565,
10809,
353,
29871,
29945,
29892,
13,
4706,
1353,
310,
4682,
25187,
943,
353,
29871,
29953,
313,
650,
411,
1021,
10104,
408,
1881,
322,
29871,
29945,
1623,
11249,
29881,
511,
13,
4706,
10809,
353,
29871,
29941,
1599,
1353,
310,
4682,
25187,
943,
353,
29871,
29946,
313,
650,
411,
1021,
10104,
408,
1881,
322,
29871,
29941,
1623,
11249,
29881,
467,
13,
15945,
29908,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
13,
3166,
758,
3018,
1312,
9794,
29889,
9794,
29889,
6099,
29876,
1053,
360,
15695,
13,
3166,
758,
3018,
1312,
9794,
29889,
9794,
29889,
6099,
29876,
1053,
758,
3018,
1312,
29918,
11027,
13,
13,
3166,
869,
29918,
3188,
1053,
11346,
6119,
29924,
861,
262,
13,
13,
13,
1990,
360,
15695,
8566,
2098,
29898,
11191,
29940,
29892,
11346,
6119,
29924,
861,
262,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7408,
29918,
333,
10351,
29892,
714,
29918,
305,
12629,
29892,
10809,
29922,
29945,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
11191,
29940,
8566,
2098,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
3032,
19190,
29918,
333,
10351,
353,
7408,
29918,
333,
10351,
13,
4706,
1583,
3032,
19488,
353,
10809,
13,
4706,
1583,
3032,
449,
29918,
305,
12629,
353,
714,
29918,
305,
12629,
13,
4706,
1583,
3032,
262,
29918,
305,
12629,
353,
29871,
29941,
13,
13,
4706,
628,
1583,
29889,
4230,
29918,
10660,
13,
13,
1678,
822,
679,
29918,
303,
1179,
29898,
1311,
1125,
13,
4706,
736,
518,
13,
9651,
302,
29876,
29889,
18415,
3285,
13,
9651,
302,
29876,
29889,
16941,
2556,
29898,
1311,
29889,
22100,
29961,
29900,
1822,
20580,
29892,
1583,
29889,
22100,
29961,
29900,
1822,
11197,
29892,
1583,
29889,
22100,
29961,
29900,
1822,
627,
511,
13,
9651,
302,
29876,
29889,
16941,
2556,
29898,
1311,
29889,
22100,
29961,
29900,
1822,
10109,
29892,
1583,
29889,
22100,
29961,
29896,
584,
1583,
3032,
19190,
29918,
333,
10351,
29961,
29900,
5262,
511,
13,
9651,
1583,
29889,
22100,
29961,
1311,
3032,
19190,
29918,
333,
10351,
29961,
29900,
29962,
584,
1583,
3032,
19190,
29918,
333,
10351,
29961,
29896,
20526,
13,
9651,
1583,
29889,
22100,
29961,
1311,
3032,
19190,
29918,
333,
10351,
29961,
29896,
29962,
584,
1583,
3032,
19190,
29918,
333,
10351,
29961,
29906,
20526,
13,
9651,
1583,
29889,
22100,
29961,
1311,
3032,
19190,
29918,
333,
10351,
29961,
29906,
29962,
584,
1583,
3032,
19190,
29918,
333,
10351,
29961,
29941,
20526,
13,
4706,
4514,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
1125,
13,
13,
4706,
22950,
353,
1583,
29889,
657,
29918,
303,
1179,
580,
13,
13,
4706,
5680,
353,
5159,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
3032,
19488,
718,
29871,
29896,
1125,
13,
9651,
921,
353,
22950,
29961,
29875,
850,
29916,
29897,
13,
9651,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
18884,
5680,
29889,
4397,
29898,
29943,
29889,
2674,
29884,
29898,
7345,
305,
29889,
4117,
29898,
29916,
29892,
3964,
29922,
29896,
511,
297,
6689,
29922,
5574,
876,
13,
9651,
1683,
29901,
13,
18884,
5680,
29889,
4397,
29898,
29916,
29897,
13,
13,
4706,
736,
5680,
13,
13,
1678,
822,
2254,
29918,
3859,
29918,
8977,
29898,
1311,
29892,
2106,
29918,
8977,
29892,
3579,
19290,
1125,
13,
4706,
2106,
29918,
8977,
29889,
7323,
703,
4230,
29918,
10660,
29889,
29890,
3173,
1159,
13,
4706,
2106,
29918,
8977,
29889,
7323,
703,
4230,
29918,
10660,
29889,
7915,
1159,
13,
4706,
2428,
29898,
11191,
29940,
8566,
2098,
29892,
1583,
467,
1359,
29918,
3859,
29918,
8977,
29898,
3859,
29918,
8977,
29892,
3579,
19290,
29897,
13,
13,
13,
6099,
29876,
29918,
3977,
397,
414,
353,
426,
13,
1678,
376,
6099,
29876,
29953,
29947,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29953,
29947,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29946,
29892,
29871,
29947,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29946,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29946,
29946,
29892,
29871,
29941,
29906,
29900,
29892,
29871,
29955,
29900,
29946,
29892,
29871,
29947,
29941,
29906,
511,
13,
9651,
376,
13155,
1115,
29871,
29941,
29906,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
29892,
29871,
29953,
29946,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29896,
29906,
29947,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29941,
29892,
29871,
29946,
29892,
29871,
29896,
29906,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29896,
29900,
29892,
13,
9651,
376,
9278,
1115,
5852,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
6099,
29876,
29953,
29947,
29890,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29953,
29947,
29890,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29946,
29892,
29871,
29947,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29946,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29946,
29946,
29892,
29871,
29941,
29906,
29900,
29892,
29871,
29955,
29900,
29946,
29892,
29871,
29947,
29941,
29906,
511,
13,
9651,
376,
29890,
1115,
5852,
29892,
13,
9651,
376,
13155,
1115,
29871,
29941,
29906,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
29892,
29871,
29953,
29946,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29896,
29906,
29947,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29941,
29892,
29871,
29946,
29892,
29871,
29896,
29906,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29896,
29900,
29892,
13,
9651,
376,
9278,
1115,
5852,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
6099,
29876,
29929,
29906,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29929,
29906,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29946,
29892,
29871,
29947,
29892,
29871,
29906,
29947,
29892,
29871,
29941,
29906,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29953,
29946,
29892,
29871,
29941,
29941,
29953,
29892,
29871,
29955,
29900,
29946,
29892,
29871,
29896,
29945,
29945,
29906,
29892,
29871,
29906,
29953,
29947,
29947,
511,
13,
9651,
376,
13155,
1115,
29871,
29941,
29906,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29906,
29946,
29892,
29871,
29896,
29906,
29947,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29929,
29953,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29941,
29892,
29871,
29946,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29953,
29946,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
6099,
29876,
29929,
29947,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29929,
29947,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29946,
29892,
29871,
29896,
29900,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29946,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29929,
29953,
29892,
29871,
29941,
29941,
29953,
29892,
29871,
29955,
29953,
29947,
29892,
29871,
29896,
29955,
29906,
29947,
29892,
29871,
29906,
29953,
29947,
29947,
511,
13,
9651,
376,
13155,
1115,
29871,
29946,
29900,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
29892,
29871,
29896,
29906,
29947,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29896,
29953,
29900,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29941,
29892,
29871,
29953,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29929,
29953,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
6099,
29876,
29896,
29900,
29955,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29896,
29900,
29955,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29945,
29892,
29871,
29896,
29941,
29892,
29871,
29941,
29941,
29892,
29871,
29941,
29955,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29941,
29955,
29953,
29892,
29871,
29896,
29896,
29945,
29906,
29892,
29871,
29906,
29946,
29941,
29906,
29892,
29871,
29906,
29953,
29947,
29947,
511,
13,
9651,
376,
13155,
1115,
29871,
29945,
29900,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29906,
29900,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29906,
29900,
29900,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29946,
29892,
29871,
29947,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29896,
29906,
29947,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
6099,
29876,
29896,
29941,
29896,
1115,
426,
13,
4706,
376,
3977,
6119,
1115,
360,
15695,
8566,
2098,
29892,
13,
4706,
376,
1457,
3018,
1312,
29918,
11027,
1115,
758,
3018,
1312,
29918,
11027,
3366,
6099,
29876,
29896,
29941,
29896,
12436,
13,
4706,
376,
7529,
1115,
426,
13,
9651,
376,
19190,
29918,
333,
10351,
1115,
313,
29945,
29892,
29871,
29896,
29941,
29892,
29871,
29946,
29896,
29892,
29871,
29946,
29945,
511,
13,
9651,
376,
449,
29918,
305,
12629,
1115,
313,
29941,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29941,
29945,
29906,
29892,
29871,
29947,
29941,
29906,
29892,
29871,
29896,
29929,
29947,
29946,
29892,
29871,
29906,
29953,
29947,
29947,
511,
13,
9651,
376,
13155,
1115,
29871,
29946,
29900,
29892,
13,
9651,
376,
3742,
29918,
3471,
1115,
313,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
29892,
29871,
29896,
29906,
29947,
511,
13,
9651,
376,
29895,
29918,
29878,
1115,
29871,
29896,
29953,
29900,
29892,
13,
9651,
376,
29895,
29918,
3471,
1115,
313,
29946,
29892,
29871,
29947,
29892,
29871,
29906,
29947,
29892,
29871,
29941,
511,
13,
9651,
376,
1949,
29918,
13203,
1115,
29871,
29896,
29900,
29900,
29900,
29892,
13,
9651,
376,
1949,
29918,
2344,
29918,
22100,
1115,
29871,
29896,
29906,
29947,
29892,
13,
9651,
376,
1688,
29918,
2230,
29918,
10109,
1115,
5852,
29892,
13,
4706,
2981,
13,
1678,
2981,
13,
29913,
13,
2
] |
pype/hosts/fusion/plugins/publish/increment_current_file_deadline.py | simonebarbieri/pype | 0 | 14196 | <filename>pype/hosts/fusion/plugins/publish/increment_current_file_deadline.py
import pyblish.api
class FusionIncrementCurrentFile(pyblish.api.ContextPlugin):
"""Increment the current file.
Saves the current file with an increased version number.
"""
label = "Increment current file"
order = pyblish.api.IntegratorOrder + 9.0
hosts = ["fusion"]
families = ["render.farm"]
optional = True
def process(self, context):
from pype.lib import version_up
from pype.action import get_errored_plugins_from_data
errored_plugins = get_errored_plugins_from_data(context)
if any(plugin.__name__ == "FusionSubmitDeadline"
for plugin in errored_plugins):
raise RuntimeError("Skipping incrementing current file because "
"submission to render farm failed.")
comp = context.data.get("currentComp")
assert comp, "Must have comp"
current_filepath = context.data["currentFile"]
new_filepath = version_up(current_filepath)
comp.Save(new_filepath)
| [
1,
529,
9507,
29958,
29886,
668,
29914,
23525,
29914,
29888,
3958,
29914,
12800,
29914,
23679,
29914,
25629,
29918,
3784,
29918,
1445,
29918,
311,
328,
1220,
29889,
2272,
13,
5215,
11451,
29890,
1674,
29889,
2754,
13,
13,
13,
1990,
383,
3958,
797,
17053,
7583,
2283,
29898,
2272,
29890,
1674,
29889,
2754,
29889,
2677,
16288,
1125,
13,
1678,
9995,
797,
17053,
278,
1857,
934,
29889,
13,
13,
1678,
317,
5989,
278,
1857,
934,
411,
385,
11664,
1873,
1353,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
3858,
353,
376,
797,
17053,
1857,
934,
29908,
13,
1678,
1797,
353,
11451,
29890,
1674,
29889,
2754,
29889,
23573,
1061,
7514,
718,
29871,
29929,
29889,
29900,
13,
1678,
18982,
353,
6796,
29888,
3958,
3108,
13,
1678,
13175,
353,
6796,
9482,
29889,
29888,
2817,
3108,
13,
1678,
13136,
353,
5852,
13,
13,
1678,
822,
1889,
29898,
1311,
29892,
3030,
1125,
13,
13,
4706,
515,
282,
668,
29889,
1982,
1053,
1873,
29918,
786,
13,
4706,
515,
282,
668,
29889,
2467,
1053,
679,
29918,
2704,
287,
29918,
12800,
29918,
3166,
29918,
1272,
13,
13,
4706,
1059,
287,
29918,
12800,
353,
679,
29918,
2704,
287,
29918,
12800,
29918,
3166,
29918,
1272,
29898,
4703,
29897,
13,
4706,
565,
738,
29898,
8582,
17255,
978,
1649,
1275,
376,
29943,
3958,
16228,
29928,
1479,
1220,
29908,
13,
18884,
363,
7079,
297,
1059,
287,
29918,
12800,
1125,
13,
9651,
12020,
24875,
2392,
703,
29903,
1984,
3262,
11924,
292,
1857,
934,
1363,
376,
13,
462,
1669,
376,
1491,
6737,
304,
4050,
17888,
5229,
23157,
13,
13,
4706,
752,
353,
3030,
29889,
1272,
29889,
657,
703,
3784,
6843,
1159,
13,
4706,
4974,
752,
29892,
376,
29924,
504,
505,
752,
29908,
13,
13,
4706,
1857,
29918,
1445,
2084,
353,
3030,
29889,
1272,
3366,
3784,
2283,
3108,
13,
4706,
716,
29918,
1445,
2084,
353,
1873,
29918,
786,
29898,
3784,
29918,
1445,
2084,
29897,
13,
13,
4706,
752,
29889,
11371,
29898,
1482,
29918,
1445,
2084,
29897,
13,
2
] |
test.py | Tweetsched/tweetsched-publisher | 1 | 16707 | <reponame>Tweetsched/tweetsched-publisher<filename>test.py
from base64 import b64encode
from app import app
import unittest
from mock import patch
import os
import json
from twython import Twython
class TestApp(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
os.environ['SERVICE_KEY'] = 'test-key'
os.environ['SERVICE_PASS'] = '<PASSWORD>'
os.environ['APP_KEY'] = 'test-key'
os.environ['APP_SECRET'] = 'test-secret'
os.environ['OAUTH_TOKEN'] = 'test-oauth-token'
os.environ['OAUTH_TOKEN_SECRET'] = 'test-oauth-token-secret'
@patch('app.Twython.update_status')
def test_publish_tweet(self, update_status_mock):
update_status_mock.return_value = True
auth = (os.environ['SERVICE_KEY'] + ':' + os.environ['SERVICE_PASS']).encode('utf-8')
headers = {
'Authorization': 'Basic ' + b64encode(auth).decode()
}
rv = self.app.post('/api/v1/tweets',
data = json.dumps(dict(id = 3, message = 'test tweet', profileId = '1')),
content_type = 'application/json',
headers = headers)
self.assertEqual(rv.status_code, 200)
self.assertEqual(update_status_mock.call_count, 1)
update_status_mock.assert_called_once()
def test_404(self):
auth = (os.environ['SERVICE_KEY'] + ':' + os.environ['SERVICE_PASS']).encode('utf-8')
headers = {
'Authorization': 'Basic ' + b64encode(auth).decode()
}
rv = self.app.get('/i-am-not-found', headers=headers)
self.assertEqual(rv.status_code, 404)
if __name__ == '__main__':
unittest.main()
| [
1,
529,
276,
1112,
420,
29958,
29911,
16668,
816,
287,
29914,
29873,
16668,
816,
287,
29899,
23679,
261,
29966,
9507,
29958,
1688,
29889,
2272,
13,
3166,
2967,
29953,
29946,
1053,
289,
29953,
29946,
12508,
13,
3166,
623,
1053,
623,
13,
5215,
443,
27958,
13,
3166,
11187,
1053,
13261,
13,
5215,
2897,
13,
5215,
4390,
13,
3166,
3252,
1656,
1053,
8168,
1656,
13,
13,
1990,
4321,
2052,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
932,
353,
623,
29889,
1688,
29918,
4645,
580,
13,
4706,
2897,
29889,
21813,
1839,
6304,
19059,
29918,
10818,
2033,
353,
525,
1688,
29899,
1989,
29915,
13,
4706,
2897,
29889,
21813,
1839,
6304,
19059,
29918,
25711,
2033,
353,
12801,
25711,
17013,
16299,
13,
4706,
2897,
29889,
21813,
1839,
20576,
29918,
10818,
2033,
353,
525,
1688,
29899,
1989,
29915,
13,
4706,
2897,
29889,
21813,
1839,
20576,
29918,
1660,
22245,
29911,
2033,
353,
525,
1688,
29899,
19024,
29915,
13,
4706,
2897,
29889,
21813,
1839,
29949,
20656,
29950,
29918,
4986,
29968,
1430,
2033,
353,
525,
1688,
29899,
23106,
29899,
6979,
29915,
13,
4706,
2897,
29889,
21813,
1839,
29949,
20656,
29950,
29918,
4986,
29968,
1430,
29918,
1660,
22245,
29911,
2033,
353,
525,
1688,
29899,
23106,
29899,
6979,
29899,
19024,
29915,
13,
13,
1678,
732,
5041,
877,
932,
29889,
27418,
1656,
29889,
5504,
29918,
4882,
1495,
13,
1678,
822,
1243,
29918,
23679,
29918,
29873,
16668,
29898,
1311,
29892,
2767,
29918,
4882,
29918,
17640,
1125,
13,
4706,
2767,
29918,
4882,
29918,
17640,
29889,
2457,
29918,
1767,
353,
5852,
13,
13,
4706,
4817,
353,
313,
359,
29889,
21813,
1839,
6304,
19059,
29918,
10818,
2033,
718,
525,
11283,
718,
2897,
29889,
21813,
1839,
6304,
19059,
29918,
25711,
2033,
467,
12508,
877,
9420,
29899,
29947,
1495,
13,
4706,
9066,
353,
426,
13,
9651,
525,
25471,
2396,
525,
16616,
525,
718,
289,
29953,
29946,
12508,
29898,
5150,
467,
13808,
580,
13,
4706,
500,
13,
4706,
364,
29894,
353,
1583,
29889,
932,
29889,
2490,
11219,
2754,
29914,
29894,
29896,
29914,
29873,
705,
1691,
742,
13,
462,
965,
848,
353,
4390,
29889,
29881,
17204,
29898,
8977,
29898,
333,
353,
29871,
29941,
29892,
2643,
353,
525,
1688,
7780,
300,
742,
8722,
1204,
353,
525,
29896,
1495,
511,
13,
462,
965,
2793,
29918,
1853,
353,
525,
6214,
29914,
3126,
742,
13,
462,
965,
9066,
353,
9066,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
15291,
29889,
4882,
29918,
401,
29892,
29871,
29906,
29900,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5504,
29918,
4882,
29918,
17640,
29889,
4804,
29918,
2798,
29892,
29871,
29896,
29897,
13,
4706,
2767,
29918,
4882,
29918,
17640,
29889,
9294,
29918,
13998,
29918,
10646,
580,
13,
13,
1678,
822,
1243,
29918,
29946,
29900,
29946,
29898,
1311,
1125,
13,
4706,
4817,
353,
313,
359,
29889,
21813,
1839,
6304,
19059,
29918,
10818,
2033,
718,
525,
11283,
718,
2897,
29889,
21813,
1839,
6304,
19059,
29918,
25711,
2033,
467,
12508,
877,
9420,
29899,
29947,
1495,
13,
4706,
9066,
353,
426,
13,
9651,
525,
25471,
2396,
525,
16616,
525,
718,
289,
29953,
29946,
12508,
29898,
5150,
467,
13808,
580,
13,
4706,
500,
13,
4706,
364,
29894,
353,
1583,
29889,
932,
29889,
657,
11219,
29875,
29899,
314,
29899,
1333,
29899,
11940,
742,
9066,
29922,
13662,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
15291,
29889,
4882,
29918,
401,
29892,
29871,
29946,
29900,
29946,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
opennem/spiders/nem/dispatch_is.py | tourdownunder/opennem | 0 | 58337 | <filename>opennem/spiders/nem/dispatch_is.py
from opennem.pipelines.nem.opennem import NemwebUnitScadaOpenNEMStorePipeline
from opennem.spiders.nemweb import NemwebSpider
class NemwebCurrentDispatchIS(NemwebSpider):
name = "au.nem.current.dispatch_is"
start_url = "http://nemweb.com.au/Reports/Current/DispatchIS_Reports/"
limit = 0
pipelines_extra = set([NemwebUnitScadaOpenNEMStorePipeline,])
class NemwebArchiveDispatchIS(NemwebSpider):
name = "au.nem.archive.dispatch_is"
start_url = "http://nemweb.com.au/Reports/Archive/DispatchIS_Reports/"
limit = 0
pipelines_extra = set([NemwebUnitScadaOpenNEMStorePipeline,])
# Archives tend to contain large zips of embedded zips so throttle
# to limit memory use
custom_settings = {
"CONCURRENT_REQUESTS": 1,
"CONCURRENT_ITEMS": 1,
}
| [
1,
529,
9507,
29958,
459,
2108,
331,
29914,
1028,
11376,
29914,
15344,
29914,
13369,
29918,
275,
29889,
2272,
13,
3166,
1722,
15344,
29889,
13096,
24210,
29889,
15344,
29889,
459,
2108,
331,
1053,
18268,
2676,
8325,
4421,
1114,
6585,
8186,
29924,
9044,
29925,
23828,
13,
3166,
1722,
15344,
29889,
1028,
11376,
29889,
15344,
2676,
1053,
18268,
2676,
5592,
1241,
13,
13,
13,
1990,
18268,
2676,
7583,
14777,
3235,
29898,
29940,
331,
2676,
5592,
1241,
1125,
13,
1678,
1024,
353,
376,
585,
29889,
15344,
29889,
3784,
29889,
13369,
29918,
275,
29908,
13,
1678,
1369,
29918,
2271,
353,
376,
1124,
597,
15344,
2676,
29889,
510,
29889,
585,
29914,
1123,
4011,
29914,
7583,
29914,
14777,
3235,
29918,
1123,
4011,
12975,
13,
1678,
4046,
353,
29871,
29900,
13,
13,
1678,
8450,
24210,
29918,
17833,
353,
731,
4197,
29940,
331,
2676,
8325,
4421,
1114,
6585,
8186,
29924,
9044,
29925,
23828,
29892,
2314,
13,
13,
13,
1990,
18268,
2676,
13197,
573,
14777,
3235,
29898,
29940,
331,
2676,
5592,
1241,
1125,
13,
1678,
1024,
353,
376,
585,
29889,
15344,
29889,
10867,
29889,
13369,
29918,
275,
29908,
13,
1678,
1369,
29918,
2271,
353,
376,
1124,
597,
15344,
2676,
29889,
510,
29889,
585,
29914,
1123,
4011,
29914,
13197,
573,
29914,
14777,
3235,
29918,
1123,
4011,
12975,
13,
1678,
4046,
353,
29871,
29900,
13,
13,
1678,
8450,
24210,
29918,
17833,
353,
731,
4197,
29940,
331,
2676,
8325,
4421,
1114,
6585,
8186,
29924,
9044,
29925,
23828,
29892,
2314,
13,
13,
1678,
396,
28320,
10331,
304,
1712,
2919,
503,
4512,
310,
15685,
503,
4512,
577,
20961,
698,
280,
13,
1678,
396,
304,
4046,
3370,
671,
13,
1678,
2888,
29918,
11027,
353,
426,
13,
4706,
376,
6007,
22484,
29450,
29918,
16244,
29903,
1115,
29871,
29896,
29892,
13,
4706,
376,
6007,
22484,
29450,
29918,
9094,
4345,
1115,
29871,
29896,
29892,
13,
1678,
500,
13,
2
] |
pyunsplash/examples/example_iteration.py | dantuluri/pyunsplash | 0 | 170037 | ###############################################################################
# Copyright (c) 2016 <NAME> <<EMAIL>>
#
# File: example_iteration.py
#
# Author: <NAME> <<EMAIL>>
# Date: 14 Dec 2016
# Purpose: How to get to every photo in every collection
#
# Revision: 2
# Comment: What's new in revision 2
# Add application level logging and interaction with
# library logging example
#
# Comment: What's new in revision 1
# Show the use of the different objects
# To get every photo, you could just use Photos
#
#
###############################################################################
import logging
import os
from pyunsplash import PyUnsplash
api_key = os.environ.get('APPLICATION_ID', None) or 'DUMMY_APPLICATION_ID'
# Initialize app logging
logger = logging.getLogger()
logging.basicConfig(filename='app.log', level=logging.DEBUG)
# pyunsplash logger defaults to level logging.ERROR
# If you need to change that, use getLogger/setLevel
# on the module logger, like this:
logging.getLogger(PyUnsplash.logger_name).setLevel(logging.DEBUG)
# instantiate PyUnsplash object
py_un = PyUnsplash(api_key=api_key)
# Start with the generic collection, maximize number of items
# note: this will run until all photos of all collections have
# been visited, unless a connection error occurs.
# Typically the API hourly limit gets hit during this
#
collections = py_un.collections(per_page=30)
while collections.has_next:
for collection in collections.entries:
photos = collection.photos()
for photo in photos.entries:
print(collection.title, photo.link_download)
# no need to specify per_page: will take from original object
collections = collections.get_next_page()
| [
1,
835,
13383,
13383,
13383,
13383,
7346,
4136,
13,
29937,
1678,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
13,
29937,
418,
3497,
29901,
1342,
29918,
1524,
362,
29889,
2272,
13,
29937,
13,
29937,
1678,
13361,
29901,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
418,
4712,
29901,
29871,
29896,
29946,
3826,
29871,
29906,
29900,
29896,
29953,
13,
29937,
259,
15247,
4220,
29901,
1128,
304,
679,
304,
1432,
15373,
297,
1432,
4333,
13,
29937,
13,
29937,
29871,
830,
4924,
29901,
29871,
29906,
13,
29937,
259,
461,
29901,
1724,
29915,
29879,
716,
297,
26554,
29871,
29906,
13,
29937,
9651,
3462,
2280,
3233,
12183,
322,
14881,
411,
13,
29937,
9651,
3489,
12183,
1342,
13,
29937,
13,
29937,
259,
461,
29901,
1724,
29915,
29879,
716,
297,
26554,
29871,
29896,
13,
29937,
9651,
7704,
278,
671,
310,
278,
1422,
3618,
13,
29937,
9651,
1763,
679,
1432,
15373,
29892,
366,
1033,
925,
671,
1963,
15788,
13,
29937,
13,
29937,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
5215,
12183,
13,
5215,
2897,
13,
3166,
11451,
6948,
572,
1161,
1053,
10772,
25807,
572,
1161,
13,
2754,
29918,
1989,
353,
2897,
29889,
21813,
29889,
657,
877,
3301,
7390,
28541,
29918,
1367,
742,
6213,
29897,
470,
525,
29928,
5005,
17870,
29918,
3301,
7390,
28541,
29918,
1367,
29915,
13,
13,
13,
29937,
25455,
623,
12183,
13,
21707,
353,
12183,
29889,
657,
16363,
580,
13,
21027,
29889,
16121,
3991,
29898,
9507,
2433,
932,
29889,
1188,
742,
3233,
29922,
21027,
29889,
18525,
29897,
13,
13,
29937,
11451,
6948,
572,
1161,
17927,
21274,
304,
3233,
12183,
29889,
11432,
13,
29937,
960,
366,
817,
304,
1735,
393,
29892,
671,
679,
16363,
29914,
842,
10108,
13,
29937,
373,
278,
3883,
17927,
29892,
763,
445,
29901,
13,
21027,
29889,
657,
16363,
29898,
19737,
25807,
572,
1161,
29889,
21707,
29918,
978,
467,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
13,
13,
29937,
25112,
10772,
25807,
572,
1161,
1203,
13,
2272,
29918,
348,
353,
10772,
25807,
572,
1161,
29898,
2754,
29918,
1989,
29922,
2754,
29918,
1989,
29897,
13,
13,
29937,
7370,
411,
278,
10035,
4333,
29892,
5256,
675,
1353,
310,
4452,
13,
29937,
4443,
29901,
445,
674,
1065,
2745,
599,
20612,
310,
599,
16250,
505,
13,
29937,
539,
1063,
16669,
29892,
6521,
263,
3957,
1059,
10008,
29889,
13,
29937,
539,
14213,
1711,
278,
3450,
7234,
368,
4046,
4947,
7124,
2645,
445,
13,
29937,
13,
29027,
353,
11451,
29918,
348,
29889,
29027,
29898,
546,
29918,
3488,
29922,
29941,
29900,
29897,
13,
8000,
16250,
29889,
5349,
29918,
4622,
29901,
13,
1678,
363,
4333,
297,
16250,
29889,
26586,
29901,
13,
4706,
20612,
353,
4333,
29889,
561,
15788,
580,
13,
4706,
363,
15373,
297,
20612,
29889,
26586,
29901,
13,
9651,
1596,
29898,
10855,
29889,
3257,
29892,
15373,
29889,
2324,
29918,
10382,
29897,
13,
13,
1678,
396,
694,
817,
304,
6084,
639,
29918,
3488,
29901,
674,
2125,
515,
2441,
1203,
13,
1678,
16250,
353,
16250,
29889,
657,
29918,
4622,
29918,
3488,
580,
13,
2
] |
delta/utils/metrics/py_metrics_test.py | didichuxing/delta | 1,442 | 195330 | <gh_stars>1000+
# Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
# 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.
# ==============================================================================
''' python metric unittest '''
import os
from pathlib import Path
import tempfile
import numpy as np
import delta.compat as tf
from delta import utils
from delta.utils import metrics
from delta import PACKAGE_ROOT_DIR
#pylint: disable=too-many-instance-attributes
class MetricTest(tf.test.TestCase):
''' python metrix unittest '''
def setUp(self):
super().setUp()
''' setup '''
package_root = Path(PACKAGE_ROOT_DIR)
self.config_file_crf = \
package_root.joinpath('../egs/mock_text_seq_label_data/seq-label/v1/config/seq-label-mock.yml')
self.conf_str = '''
solver:
metrics:
pos_label: 1 # int, same to sklearn
cals:
- name: AccuracyCal
arguments: null
- name: ConfusionMatrixCal
arguments: null
- name: PrecisionCal
arguments:
average: 'micro'
- name: RecallCal
arguments:
average: 'micro'
- name: F1ScoreCal
arguments:
average: 'micro'
'''
self.conf_file = tempfile.mktemp(suffix='metric.yaml')
with open(self.conf_file, 'w', encoding='utf-8') as f: #pylint: disable=invalid-name
f.write(self.conf_str)
self.true_label = np.array([1, 1, 2, 3, 4, 6, 5])
self.pred1 = np.array([1, 1, 2, 3, 4, 6, 5])
self.pred2 = np.array([2, 2, 1, 1, 1, 1, 1])
# config for test token error metircs
self.token_conf_str = '''
solver:
metrics:
pos_label: 1 # int, same to sklearn
cals:
- name: TokenErrCal
arguments:
eos_id: 0
'''
self.token_conf_file = tempfile.mktemp(suffix='token.yaml')
with open(self.token_conf_file, 'w', encoding='utf-8') as f: #pylint: disable=invalid-name
f.write(self.token_conf_str)
self.token_true_label = [[1, 1, 1, 1], [1, 3, 4, 5]]
self.token_pred1 = [[1, 1, 1, 1], [1, 3, 4, 5]]
self.token_pred2 = [[1, 2, 2, 2], [1, 0, 0, 0]]
def tearDown(self):
''' tear down '''
if os.path.exists(self.conf_file):
os.unlink(self.conf_file)
def test_metric(self):
''' test get_metrics function '''
config = utils.load_config(self.conf_file)
metrics1 = metrics.get_metrics(
config, y_true=self.true_label, y_pred=self.pred1)
self.assertEqual(1.0, metrics1['AccuracyCal'])
self.assertEqual(1.0, metrics1['PrecisionCal'])
self.assertEqual(1.0, metrics1['RecallCal'])
self.assertEqual(1.0, metrics1['F1ScoreCal'])
metrics2 = metrics.get_metrics(
config, y_true=self.true_label, y_pred=self.pred2)
self.assertEqual(0.0, metrics2['AccuracyCal'])
self.assertEqual(0.0, metrics2['PrecisionCal'])
self.assertEqual(0.0, metrics2['RecallCal'])
self.assertEqual(0.0, metrics2['F1ScoreCal'])
def test_token_err(self):
''' test tooken error rate '''
config = utils.load_config(self.token_conf_file)
metrics1 = metrics.get_metrics(
config, y_true=self.token_true_label, y_pred=self.token_pred1)
self.assertEqual(0.0, metrics1['TokenErrCal'])
metrics2 = metrics.get_metrics(
config, y_true=self.token_true_label, y_pred=self.token_pred2)
self.assertEqual(0.75, metrics2['TokenErrCal'])
def test_crf_metrics(self):
''' test crf metrics '''
config = utils.load_config(self.config_file_crf)
metrics3 = metrics.get_metrics(
config, y_true=[self.true_label], y_pred=[self.pred1])
# metrics3: one string. Text summary of the precision, recall, F1 score for each class.
# res3 = metrics3['CrfCal']
# print(res3)
# for i, s in enumerate(res3):
# print(i, s)
self.assertEqual('1.0000', metrics3['CrfCal'][67:73])
metrics4 = metrics.get_metrics(
config, y_true=[self.true_label], y_pred=[self.pred2])
self.assertEqual('0.0000', metrics4['CrfCal'][67:73])
if __name__ == "__main__":
tf.test.main()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29955,
1522,
823,
292,
7440,
29875,
512,
4951,
537,
17968,
322,
14650,
3189,
1696,
29931,
1594,
29889,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
1275,
9166,
9166,
9166,
9166,
4936,
2751,
13,
12008,
3017,
12714,
443,
27958,
14550,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
5694,
1445,
13,
5215,
12655,
408,
7442,
13,
5215,
19471,
29889,
12667,
408,
15886,
13,
13,
3166,
19471,
1053,
3667,
29879,
13,
3166,
19471,
29889,
13239,
1053,
21556,
13,
3166,
19471,
1053,
349,
11375,
10461,
29918,
21289,
29918,
9464,
13,
13,
13,
29937,
2272,
27854,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
8758,
29899,
15697,
13,
1990,
4737,
2200,
3057,
29898,
13264,
29889,
1688,
29889,
3057,
8259,
1125,
13,
29871,
14550,
3017,
1539,
2126,
443,
27958,
14550,
13,
13,
29871,
822,
731,
3373,
29898,
1311,
1125,
13,
1678,
2428,
2141,
842,
3373,
580,
13,
1678,
14550,
6230,
14550,
13,
1678,
3577,
29918,
4632,
353,
10802,
29898,
29925,
11375,
10461,
29918,
21289,
29918,
9464,
29897,
13,
1678,
1583,
29889,
2917,
29918,
1445,
29918,
7283,
29888,
353,
320,
13,
418,
3577,
29918,
4632,
29889,
7122,
2084,
877,
6995,
387,
29879,
29914,
17640,
29918,
726,
29918,
11762,
29918,
1643,
29918,
1272,
29914,
11762,
29899,
1643,
29914,
29894,
29896,
29914,
2917,
29914,
11762,
29899,
1643,
29899,
17640,
29889,
21053,
1495,
13,
13,
1678,
1583,
29889,
5527,
29918,
710,
353,
14550,
13,
418,
899,
369,
29901,
13,
4706,
21556,
29901,
13,
3986,
926,
29918,
1643,
29901,
29871,
29896,
396,
938,
29892,
1021,
304,
2071,
19668,
13,
3986,
1208,
29879,
29901,
13,
3986,
448,
1024,
29901,
4831,
332,
4135,
7856,
13,
9651,
6273,
29901,
1870,
29871,
13,
3986,
448,
1024,
29901,
10811,
3958,
14609,
7856,
13,
9651,
6273,
29901,
1870,
13,
3986,
448,
1024,
29901,
349,
3757,
2459,
7856,
13,
9651,
6273,
29901,
13,
795,
6588,
29901,
525,
29885,
2357,
29915,
13,
3986,
448,
1024,
29901,
3599,
497,
7856,
13,
9651,
6273,
29901,
13,
795,
6588,
29901,
525,
29885,
2357,
29915,
13,
3986,
448,
1024,
29901,
383,
29896,
20097,
7856,
13,
9651,
6273,
29901,
13,
795,
6588,
29901,
525,
29885,
2357,
29915,
13,
1678,
14550,
13,
13,
1678,
1583,
29889,
5527,
29918,
1445,
353,
5694,
1445,
29889,
29885,
1193,
3451,
29898,
2146,
600,
861,
2433,
16414,
29889,
25162,
1495,
13,
1678,
411,
1722,
29898,
1311,
29889,
5527,
29918,
1445,
29892,
525,
29893,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
29871,
396,
2272,
27854,
29901,
11262,
29922,
20965,
29899,
978,
13,
418,
285,
29889,
3539,
29898,
1311,
29889,
5527,
29918,
710,
29897,
13,
13,
1678,
1583,
29889,
3009,
29918,
1643,
353,
7442,
29889,
2378,
4197,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29945,
2314,
13,
1678,
1583,
29889,
11965,
29896,
353,
7442,
29889,
2378,
4197,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29945,
2314,
13,
1678,
1583,
29889,
11965,
29906,
353,
7442,
29889,
2378,
4197,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
2314,
13,
13,
1678,
396,
2295,
363,
1243,
5993,
1059,
1539,
2076,
29879,
13,
1678,
1583,
29889,
6979,
29918,
5527,
29918,
710,
353,
14550,
13,
418,
899,
369,
29901,
13,
4706,
21556,
29901,
13,
3986,
926,
29918,
1643,
29901,
29871,
29896,
396,
938,
29892,
1021,
304,
2071,
19668,
13,
3986,
1208,
29879,
29901,
13,
3986,
448,
1024,
29901,
25159,
19212,
7856,
13,
9651,
6273,
29901,
13,
795,
321,
359,
29918,
333,
29901,
29871,
29900,
13,
1678,
14550,
13,
13,
1678,
1583,
29889,
6979,
29918,
5527,
29918,
1445,
353,
5694,
1445,
29889,
29885,
1193,
3451,
29898,
2146,
600,
861,
2433,
6979,
29889,
25162,
1495,
13,
1678,
411,
1722,
29898,
1311,
29889,
6979,
29918,
5527,
29918,
1445,
29892,
525,
29893,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
29871,
396,
2272,
27854,
29901,
11262,
29922,
20965,
29899,
978,
13,
418,
285,
29889,
3539,
29898,
1311,
29889,
6979,
29918,
5527,
29918,
710,
29897,
13,
13,
1678,
1583,
29889,
6979,
29918,
3009,
29918,
1643,
353,
5519,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
5262,
13,
1678,
1583,
29889,
6979,
29918,
11965,
29896,
353,
5519,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
5262,
13,
1678,
1583,
29889,
6979,
29918,
11965,
29906,
353,
5519,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29906,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
5262,
13,
13,
29871,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
1678,
14550,
734,
279,
1623,
14550,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
5527,
29918,
1445,
1125,
13,
418,
2897,
29889,
348,
2324,
29898,
1311,
29889,
5527,
29918,
1445,
29897,
13,
13,
29871,
822,
1243,
29918,
16414,
29898,
1311,
1125,
13,
1678,
14550,
1243,
679,
29918,
2527,
10817,
740,
14550,
13,
1678,
2295,
353,
3667,
29879,
29889,
1359,
29918,
2917,
29898,
1311,
29889,
5527,
29918,
1445,
29897,
13,
13,
1678,
21556,
29896,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
29922,
1311,
29889,
3009,
29918,
1643,
29892,
343,
29918,
11965,
29922,
1311,
29889,
11965,
29896,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29896,
29889,
29900,
29892,
21556,
29896,
1839,
7504,
332,
4135,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29896,
29889,
29900,
29892,
21556,
29896,
1839,
29925,
3757,
2459,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29896,
29889,
29900,
29892,
21556,
29896,
1839,
4789,
497,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29896,
29889,
29900,
29892,
21556,
29896,
1839,
29943,
29896,
20097,
7856,
11287,
13,
13,
1678,
21556,
29906,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
29922,
1311,
29889,
3009,
29918,
1643,
29892,
343,
29918,
11965,
29922,
1311,
29889,
11965,
29906,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29900,
29892,
21556,
29906,
1839,
7504,
332,
4135,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29900,
29892,
21556,
29906,
1839,
29925,
3757,
2459,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29900,
29892,
21556,
29906,
1839,
4789,
497,
7856,
11287,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29900,
29892,
21556,
29906,
1839,
29943,
29896,
20097,
7856,
11287,
13,
13,
29871,
822,
1243,
29918,
6979,
29918,
3127,
29898,
1311,
1125,
13,
1678,
14550,
1243,
3614,
264,
1059,
6554,
14550,
13,
1678,
2295,
353,
3667,
29879,
29889,
1359,
29918,
2917,
29898,
1311,
29889,
6979,
29918,
5527,
29918,
1445,
29897,
13,
13,
1678,
21556,
29896,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
29922,
1311,
29889,
6979,
29918,
3009,
29918,
1643,
29892,
343,
29918,
11965,
29922,
1311,
29889,
6979,
29918,
11965,
29896,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29900,
29892,
21556,
29896,
1839,
6066,
19212,
7856,
11287,
13,
13,
1678,
21556,
29906,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
29922,
1311,
29889,
6979,
29918,
3009,
29918,
1643,
29892,
343,
29918,
11965,
29922,
1311,
29889,
6979,
29918,
11965,
29906,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29900,
29889,
29955,
29945,
29892,
21556,
29906,
1839,
6066,
19212,
7856,
11287,
13,
13,
29871,
822,
1243,
29918,
7283,
29888,
29918,
2527,
10817,
29898,
1311,
1125,
13,
1678,
14550,
1243,
2181,
29888,
21556,
14550,
13,
1678,
2295,
353,
3667,
29879,
29889,
1359,
29918,
2917,
29898,
1311,
29889,
2917,
29918,
1445,
29918,
7283,
29888,
29897,
13,
1678,
21556,
29941,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
11759,
1311,
29889,
3009,
29918,
1643,
1402,
343,
29918,
11965,
11759,
1311,
29889,
11965,
29896,
2314,
13,
1678,
396,
21556,
29941,
29901,
697,
1347,
29889,
3992,
15837,
310,
278,
16716,
29892,
17386,
29892,
383,
29896,
8158,
363,
1269,
770,
29889,
13,
1678,
396,
620,
29941,
353,
21556,
29941,
1839,
29907,
9600,
7856,
2033,
13,
1678,
396,
1596,
29898,
690,
29941,
29897,
13,
1678,
396,
363,
474,
29892,
269,
297,
26985,
29898,
690,
29941,
1125,
13,
1678,
396,
259,
1596,
29898,
29875,
29892,
269,
29897,
13,
1678,
1583,
29889,
9294,
9843,
877,
29896,
29889,
29900,
29900,
29900,
29900,
742,
21556,
29941,
1839,
29907,
9600,
7856,
2033,
29961,
29953,
29955,
29901,
29955,
29941,
2314,
13,
13,
1678,
21556,
29946,
353,
21556,
29889,
657,
29918,
2527,
10817,
29898,
13,
4706,
2295,
29892,
343,
29918,
3009,
11759,
1311,
29889,
3009,
29918,
1643,
1402,
343,
29918,
11965,
11759,
1311,
29889,
11965,
29906,
2314,
13,
1678,
1583,
29889,
9294,
9843,
877,
29900,
29889,
29900,
29900,
29900,
29900,
742,
21556,
29946,
1839,
29907,
9600,
7856,
2033,
29961,
29953,
29955,
29901,
29955,
29941,
2314,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
29871,
15886,
29889,
1688,
29889,
3396,
580,
13,
2
] |
tests/data_sources/test_topographic_data_source.py | lenassero/nowcasting_dataset | 0 | 159557 | <filename>tests/data_sources/test_topographic_data_source.py<gh_stars>0
import numpy as np
import pandas as pd
import pytest
from nowcasting_dataset.data_sources import TopographicDataSource
@pytest.mark.parametrize(
"x, y, left, right, top, bottom",
[
(0, 0, -128_000, 126_000, 128_000, -126_000),
(10, 0, -126_000, 128_000, 128_000, -126_000),
(30, 0, -126_000, 128_000, 128_000, -126_000),
(1000, 0, -126_000, 128_000, 128_000, -126_000),
(0, 1000, -128_000, 126_000, 128_000, -126_000),
(1000, 1000, -126_000, 128_000, 128_000, -126_000),
(2000, 2000, -126_000, 128_000, 130_000, -124_000),
(2000, 1000, -126_000, 128_000, 128_000, -126_000),
(2001, 2001, -124_000, 130_000, 130_000, -124_000),
],
)
def test_get_example_2km(x, y, left, right, top, bottom):
size = 2000 # meters
topo_source = TopographicDataSource(
filename="tests/data/europe_dem_2km_osgb.tif",
image_size_pixels=128,
meters_per_pixel=size,
forecast_minutes=300,
history_minutes=10,
)
t0_dt = pd.Timestamp("2019-01-01T13:00")
topo_data = topo_source.get_example(t0_dt=t0_dt, x_meters_center=x, y_meters_center=y)
assert topo_data.data.shape == (128, 128)
assert len(topo_data.x) == 128
assert len(topo_data.y) == 128
assert not np.isnan(topo_data.data).any()
# Topo x and y coords are not exactly set on the edges, but the center of the pixels
assert np.isclose(left, topo_data.x.values[0], atol=size)
assert np.isclose(right, topo_data.x.values[-1], atol=size)
assert np.isclose(top, topo_data.y.values[0], atol=size)
assert np.isclose(bottom, topo_data.y.values[-1], atol=size)
@pytest.mark.skip("CD does not have access to GCS")
def test_get_example_gcs():
"""Note this test takes ~5 seconds as the topo data has to be downloaded locally"""
filename = "gs://solar-pv-nowcasting-data/Topographic/europe_dem_1km_osgb.tif"
size = 2000 # meters
topo_source = TopographicDataSource(
filename=filename,
image_size_pixels=128,
meters_per_pixel=size,
forecast_minutes=300,
history_minutes=10,
)
t0_dt = pd.Timestamp("2019-01-01T13:00")
_ = topo_source.get_example(t0_dt=t0_dt, x_meters_center=0, y_meters_center=0)
| [
1,
529,
9507,
29958,
21150,
29914,
1272,
29918,
29879,
2863,
29914,
1688,
29918,
3332,
12122,
29918,
1272,
29918,
4993,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
11451,
1688,
13,
13,
3166,
1286,
4384,
292,
29918,
24713,
29889,
1272,
29918,
29879,
2863,
1053,
7488,
12122,
15559,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
29916,
29892,
343,
29892,
2175,
29892,
1492,
29892,
2246,
29892,
5970,
613,
13,
1678,
518,
13,
4706,
313,
29900,
29892,
29871,
29900,
29892,
448,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29896,
29900,
29892,
29871,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29941,
29900,
29892,
29871,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29896,
29900,
29900,
29900,
29892,
29871,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29896,
29900,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29906,
29900,
29900,
29900,
29892,
29871,
29906,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29941,
29900,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29946,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29906,
29900,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29947,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29953,
29918,
29900,
29900,
29900,
511,
13,
4706,
313,
29906,
29900,
29900,
29896,
29892,
29871,
29906,
29900,
29900,
29896,
29892,
448,
29896,
29906,
29946,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29941,
29900,
29918,
29900,
29900,
29900,
29892,
29871,
29896,
29941,
29900,
29918,
29900,
29900,
29900,
29892,
448,
29896,
29906,
29946,
29918,
29900,
29900,
29900,
511,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
657,
29918,
4773,
29918,
29906,
8848,
29898,
29916,
29892,
343,
29892,
2175,
29892,
1492,
29892,
2246,
29892,
5970,
1125,
13,
1678,
2159,
353,
29871,
29906,
29900,
29900,
29900,
29871,
396,
27881,
13,
1678,
304,
1129,
29918,
4993,
353,
7488,
12122,
15559,
29898,
13,
4706,
10422,
543,
21150,
29914,
1272,
29914,
29872,
3214,
29918,
2310,
29918,
29906,
8848,
29918,
359,
26300,
29889,
29873,
361,
613,
13,
4706,
1967,
29918,
2311,
29918,
29886,
861,
1379,
29922,
29896,
29906,
29947,
29892,
13,
4706,
27881,
29918,
546,
29918,
29886,
15711,
29922,
2311,
29892,
13,
4706,
29821,
579,
29918,
1195,
2667,
29922,
29941,
29900,
29900,
29892,
13,
4706,
4955,
29918,
1195,
2667,
29922,
29896,
29900,
29892,
13,
1678,
1723,
13,
1678,
260,
29900,
29918,
6008,
353,
10518,
29889,
27939,
703,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
29900,
29896,
29911,
29896,
29941,
29901,
29900,
29900,
1159,
13,
1678,
304,
1129,
29918,
1272,
353,
304,
1129,
29918,
4993,
29889,
657,
29918,
4773,
29898,
29873,
29900,
29918,
6008,
29922,
29873,
29900,
29918,
6008,
29892,
921,
29918,
2527,
414,
29918,
5064,
29922,
29916,
29892,
343,
29918,
2527,
414,
29918,
5064,
29922,
29891,
29897,
13,
1678,
4974,
304,
1129,
29918,
1272,
29889,
1272,
29889,
12181,
1275,
313,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
29897,
13,
1678,
4974,
7431,
29898,
3332,
29877,
29918,
1272,
29889,
29916,
29897,
1275,
29871,
29896,
29906,
29947,
13,
1678,
4974,
7431,
29898,
3332,
29877,
29918,
1272,
29889,
29891,
29897,
1275,
29871,
29896,
29906,
29947,
13,
1678,
4974,
451,
7442,
29889,
275,
13707,
29898,
3332,
29877,
29918,
1272,
29889,
1272,
467,
1384,
580,
13,
1678,
396,
7488,
29877,
921,
322,
343,
1302,
4339,
526,
451,
3721,
731,
373,
278,
12770,
29892,
541,
278,
4818,
310,
278,
17036,
13,
1678,
4974,
7442,
29889,
275,
5358,
29898,
1563,
29892,
304,
1129,
29918,
1272,
29889,
29916,
29889,
5975,
29961,
29900,
1402,
472,
324,
29922,
2311,
29897,
13,
1678,
4974,
7442,
29889,
275,
5358,
29898,
1266,
29892,
304,
1129,
29918,
1272,
29889,
29916,
29889,
5975,
14352,
29896,
1402,
472,
324,
29922,
2311,
29897,
13,
1678,
4974,
7442,
29889,
275,
5358,
29898,
3332,
29892,
304,
1129,
29918,
1272,
29889,
29891,
29889,
5975,
29961,
29900,
1402,
472,
324,
29922,
2311,
29897,
13,
1678,
4974,
7442,
29889,
275,
5358,
29898,
8968,
29892,
304,
1129,
29918,
1272,
29889,
29891,
29889,
5975,
14352,
29896,
1402,
472,
324,
29922,
2311,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
703,
6530,
947,
451,
505,
2130,
304,
402,
9295,
1159,
13,
1753,
1243,
29918,
657,
29918,
4773,
29918,
29887,
2395,
7295,
13,
1678,
9995,
9842,
445,
1243,
4893,
3695,
29945,
6923,
408,
278,
304,
1129,
848,
756,
304,
367,
16532,
12430,
15945,
29908,
13,
13,
1678,
10422,
353,
376,
3174,
597,
2929,
279,
29899,
29886,
29894,
29899,
3707,
4384,
292,
29899,
1272,
29914,
7031,
12122,
29914,
29872,
3214,
29918,
2310,
29918,
29896,
8848,
29918,
359,
26300,
29889,
29873,
361,
29908,
13,
13,
1678,
2159,
353,
29871,
29906,
29900,
29900,
29900,
29871,
396,
27881,
13,
1678,
304,
1129,
29918,
4993,
353,
7488,
12122,
15559,
29898,
13,
4706,
10422,
29922,
9507,
29892,
13,
4706,
1967,
29918,
2311,
29918,
29886,
861,
1379,
29922,
29896,
29906,
29947,
29892,
13,
4706,
27881,
29918,
546,
29918,
29886,
15711,
29922,
2311,
29892,
13,
4706,
29821,
579,
29918,
1195,
2667,
29922,
29941,
29900,
29900,
29892,
13,
4706,
4955,
29918,
1195,
2667,
29922,
29896,
29900,
29892,
13,
1678,
1723,
13,
1678,
260,
29900,
29918,
6008,
353,
10518,
29889,
27939,
703,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
29900,
29896,
29911,
29896,
29941,
29901,
29900,
29900,
1159,
13,
1678,
903,
353,
304,
1129,
29918,
4993,
29889,
657,
29918,
4773,
29898,
29873,
29900,
29918,
6008,
29922,
29873,
29900,
29918,
6008,
29892,
921,
29918,
2527,
414,
29918,
5064,
29922,
29900,
29892,
343,
29918,
2527,
414,
29918,
5064,
29922,
29900,
29897,
13,
2
] |
macrosynergy/management/shape_dfs.py | macrosynergy/macrosynergy | 3 | 190088 | import numpy as np
import pandas as pd
from typing import List, Union, Tuple
import random
from macrosynergy.management.simulate_quantamental_data import make_qdf
def reduce_df(df: pd.DataFrame, xcats: List[str] = None, cids: List[str] = None,
start: str = None, end: str = None, blacklist: dict = None,
out_all: bool = False, intersect: bool = False):
"""
Filter dataframe by xcats and cids and notify about missing xcats and cids.
:param <pd.Dataframe> df: standardized dataframe with the following necessary columns:
'cid', 'xcats', 'real_date'.
:param <List[str]> xcats: extended categories to be checked on. Default is all in the
dataframe.
:param <List[str]> cids: cross sections to be checked on. Default is all in the
dataframe.
:param <str> start: string representing earliest date. Default is None.
:param <str> end: string representing the latest date. Default is None.
:param <dict> blacklist: cross sections with date ranges that should be excluded from
the data frame. If one cross section has several blacklist periods append numbers
to the cross-section code.
:param <bool> out_all: if True the function returns reduced dataframe and selected/
available xcats and cids.
Default is False, i.e. only the dataframe is returned
:param <bool> intersect: if True only retains cids that are available for all xcats.
Default is False.
:return <pd.Dataframe>: reduced dataframe that also removes duplicates or
(for out_all True) dataframe and available and selected xcats and cids.
"""
dfx = df[df['real_date'] >= pd.to_datetime(start)] if start is not None else df
dfx = dfx[dfx['real_date'] <= pd.to_datetime(end)] if end is not None else dfx
if blacklist is not None:
for key, value in blacklist.items():
filt1 = dfx['cid'] == key[:3]
filt2 = dfx['real_date'] >= pd.to_datetime(value[0])
filt3 = dfx['real_date'] <= pd.to_datetime(value[1])
dfx = dfx[~(filt1 & filt2 & filt3)]
xcats_in_df = dfx['xcat'].unique()
if xcats is None:
xcats = sorted(xcats_in_df)
else:
missing = sorted(set(xcats) - set(xcats_in_df))
if len(missing) > 0:
print(f"Missing categories: {missing}.")
xcats.remove(missing)
dfx = dfx[dfx['xcat'].isin(xcats)]
if intersect:
df_uns = dfx.groupby('xcat')['cid'].unique()
cids_in_df = list(df_uns[0])
for i in range(1, len(df_uns)):
cids_in_df = [cid for cid in df_uns[i] if cid in cids_in_df]
else:
cids_in_df = dfx['cid'].unique()
if cids is None:
cids = sorted(cids_in_df)
else:
if not isinstance(cids, list):
cids = [cids]
missing = sorted(set(cids) - set(cids_in_df))
if len(missing) > 0:
print(f'Missing cross sections: {missing}')
cids = sorted(list(set(cids).intersection(set(cids_in_df))))
dfx = dfx[dfx['cid'].isin(cids)]
if out_all:
return dfx.drop_duplicates(), xcats, cids
else:
return dfx.drop_duplicates()
def reduce_df_by_ticker(df: pd.DataFrame, ticks: List[str] = None, start: str = None,
end: str = None, blacklist: dict = None):
"""
Filter dataframe by xcats and cids and notify about missing xcats and cids
:param <pd.Dataframe> df: standardized dataframe with the following columns:
'cid', 'xcats', 'real_date'.
:param <List[str]> ticks: tickers (cross sections + base categories)
:param <str> start: string in ISO 8601 representing earliest date. Default is None.
:param <str> end: string ISO 8601 representing the latest date. Default is None.
:param <dict> blacklist: cross sections with date ranges that should be excluded from
the dataframe. If one cross section has several blacklist
periods append numbers to the cross section code.
:return <pd.Dataframe>: reduced dataframe that also removes duplicates
"""
dfx = df[df["real_date"] >= pd.to_datetime(start)] if start is not None else df
dfx = dfx[dfx["real_date"] <= pd.to_datetime(end)] if end is not None else dfx
if blacklist is not None: # blacklisting by cross-section
for key, value in blacklist.items():
filt1 = dfx["cid"] == key[:3]
filt2 = dfx["real_date"] >= pd.to_datetime(value[0])
filt3 = dfx["real_date"] <= pd.to_datetime(value[1])
dfx = dfx[~(filt1 & filt2 & filt3)]
dfx["ticker"] = df["cid"] + '_' + df["xcat"]
ticks_in_df = dfx["ticker"].unique()
if ticks is None:
ticks = sorted(ticks_in_df)
else:
missing = sorted(set(ticks) - set(ticks_in_df))
if len(missing) > 0:
print(f'Missing tickers: {missing}')
ticks.remove(missing)
dfx = dfx[dfx["ticker"].isin(ticks)]
return dfx.drop_duplicates()
def categories_df(df: pd.DataFrame, xcats: List[str], cids: List[str] = None,
val: str = 'value', start: str = None, end: str = None,
blacklist: dict = None, years: int = None, freq: str = 'M',
lag: int = 0, fwin: int = 1, xcat_aggs: List[str] = ('mean', 'mean')):
"""Create custom two-categories dataframe with appropriate frequency and lags
suitable for analysis.
:param <pd.Dataframe> df: standardized dataframe with the following necessary columns:
'cid', 'xcats', 'real_date' and at least one column with values of interest.
:param <List[str]> xcats: exactly two extended categories whose relationship is to be
analyzed.
:param <List[str]> cids: cross sections to be included. Default is all in the
dataframe.
:param <str> start: earliest date in ISO 8601 format. Default is None, i.e. earliest
date in data frame is used.
:param <str> end: latest date in ISO 8601 format. Default is None, i.e. latest date
in data frame is used.
:param <dict> blacklist: cross sections with date ranges that should be excluded from
the data frame. If one cross section has several blacklist periods append numbers
to the cross section code.
:param <int> years: Number of years over which data are aggregated. Supersedes freq
and does not allow lags, Default is None, i.e. no multi-year aggregation.
:param <str> val: name of column that contains the values of interest. Default is
'value'.
:param <str> freq: letter denoting frequency at which the series are to be sampled.
This must be one of 'D', 'W', 'M', 'Q', 'A'. Default is 'M'.
:param <int> lag: Lag (delay of arrival) of second category in periods as set by
freq. Default is 0.
Note: for analyses with dependent and explanatory categories, the second takes
the role of the explanatory.
:param <int> fwin: Forward moving average window of first category. Default is 1,
i.e no average.
Note: This parameter is used mainly for target returns as dependent variables.
:param <List[str]> xcat_aggs: Exactly two aggregation methods. Default is 'mean' for
both.
:return <pd.Dataframe>: custom data frame with two category columns
"""
assert freq in ['D', 'W', 'M', 'Q', 'A']
assert not (years is not None) & (lag != 0), 'Lags cannot be applied to year groups.'
if years is not None:
assert isinstance(start, str), 'Year aggregation requires a start date.'
df, xcats, cids = reduce_df(df, xcats, cids, start, end, blacklist, out_all=True)
col_names = ['cid', 'xcat', 'real_date', val]
dfc = pd.DataFrame(columns=col_names)
if years is None:
for i in range(2):
dfw = df[df['xcat'] == xcats[i]].pivot(index='real_date', columns='cid',
values=val)
dfw = dfw.resample(freq).agg(xcat_aggs[i])
if (i == 0) & (fwin > 1):
dfw = dfw.rolling(window=fwin).mean().shift(1 - fwin)
if (i == 1) & (lag > 0):
dfw = dfw.shift(lag)
dfx = pd.melt(dfw.reset_index(), id_vars=['real_date'],
value_vars=cids, value_name=val)
dfx['xcat'] = xcats[i]
dfc = dfc.append(dfx[col_names])
else:
s_year = pd.to_datetime(start).year
e_year = df['real_date'].max().year + 1
grouping = int((e_year - s_year) / years)
remainder = (e_year - s_year) % years
year_groups = {}
for group in range(grouping):
value = [i for i in range(s_year, s_year + years)]
key = f"{s_year} - {s_year + (years - 1)}"
year_groups[key] = value
s_year += years
v = [i for i in range(s_year, s_year + (remainder + 1))]
year_groups[f"{s_year} - now"] = v
list_y_groups = list(year_groups.keys())
translate_ = lambda year: list_y_groups[int((year % 2000) / years)]
df['custom_date'] = df['real_date'].dt.year.apply(translate_)
for i in range(2):
dfx = df[df['xcat'] == xcats[i]]
dfx = dfx.groupby(['xcat', 'cid',
'custom_date']).agg(xcat_aggs[i]).reset_index()
dfx = dfx.rename(columns={"custom_date": "real_date"})
dfc = dfc.append(dfx[col_names])
return dfc.pivot(index=('cid', 'real_date'), columns='xcat',
values=val).dropna()[xcats]
if __name__ == "__main__":
cids = ['NZD', 'AUD', 'GBP', 'CAD']
xcats = ['XR', 'CRY', 'GROWTH', 'INFL']
df_cids = pd.DataFrame(index=cids, columns=['earliest', 'latest', 'mean_add',
'sd_mult'])
df_cids.loc['AUD'] = ['2000-01-01', '2020-12-31', 0.1, 1]
df_cids.loc['CAD'] = ['2001-01-01', '2020-11-30', 0, 1]
df_cids.loc['GBP'] = ['2002-01-01', '2020-11-30', 0, 2]
df_cids.loc['NZD'] = ['2002-01-01', '2020-09-30', -0.1, 2]
df_xcats = pd.DataFrame(index=xcats, columns=['earliest', 'latest', 'mean_add',
'sd_mult', 'ar_coef', 'back_coef'])
df_xcats.loc['XR'] = ['2000-01-01', '2020-12-31', 0.1, 1, 0, 0.3]
df_xcats.loc['CRY'] = ['2000-01-01', '2020-10-30', 1, 2, 0.95, 1]
df_xcats.loc['GROWTH'] = ['2001-01-01', '2020-10-30', 1, 2, 0.9, 1]
df_xcats.loc['INFL'] = ['2001-01-01', '2020-10-30', 1, 2, 0.8, 0.5]
black = {'AUD': ['2000-01-01', '2003-12-31'], 'GBP': ['2018-01-01', '2100-01-01']}
random.seed(2)
dfd = make_qdf(df_cids, df_xcats, back_ar=0.75)
dfd_x1 = reduce_df(dfd, xcats=xcats[:-1], cids=cids[0],
start='2012-01-01', end='2018-01-31')
print(dfd_x1['xcat'].unique())
dfd_x2 = reduce_df(dfd, xcats=xcats, cids=cids, start='2012-01-01', end='2018-01-31')
dfd_x3 = reduce_df(dfd, xcats=xcats, cids=cids, blacklist=black)
tickers = [cid + "_XR" for cid in cids]
dfd_xt = reduce_df_by_ticker(dfd, ticks=tickers, blacklist=black)
# Testing categories_df().
dfc1 = categories_df(dfd, xcats=['GROWTH', 'CRY'], cids=cids, freq='M', lag=0,
xcat_aggs=['mean', 'mean'], start='2000-01-01', blacklist=black)
dfc2 = categories_df(dfd, xcats=['GROWTH', 'CRY'], cids=cids, freq='M', lag=0,
fwin=3, xcat_aggs=['mean', 'mean'],
start='2000-01-01', blacklist=black)
dfc3 = categories_df(dfd, xcats=['GROWTH', 'CRY'], cids=cids, freq='M', lag=0,
xcat_aggs=['mean', 'mean'], start='2000-01-01', blacklist=black,
years=10)
# Testing reduce_df()
filt1 = ~((dfd['cid'] == 'AUD') & (dfd['xcat'] == 'XR'))
filt2 = ~((dfd['cid'] == 'NZD') & (dfd['xcat'] == 'INFL'))
dfdx = dfd[filt1 & filt2] # simulate missing cross sections
dfd_x1, xctx, cidx = reduce_df(dfdx, xcats=['XR', 'CRY', 'INFL'], cids=cids,
intersect=True, out_all=True) | [
1,
1053,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
19229,
1053,
2391,
29892,
7761,
29892,
12603,
552,
13,
5215,
4036,
13,
13,
3166,
5825,
1883,
948,
261,
1927,
29889,
21895,
29889,
3601,
5987,
29918,
12150,
11491,
29918,
1272,
1053,
1207,
29918,
29939,
2176,
13,
13,
13,
1753,
10032,
29918,
2176,
29898,
2176,
29901,
10518,
29889,
17271,
29892,
921,
29883,
1446,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
29871,
274,
4841,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
13,
795,
1369,
29901,
851,
353,
6213,
29892,
1095,
29901,
851,
353,
6213,
29892,
4628,
1761,
29901,
9657,
353,
6213,
29892,
13,
795,
714,
29918,
497,
29901,
6120,
353,
7700,
29892,
25869,
29901,
6120,
353,
7700,
1125,
13,
1678,
9995,
13,
1678,
19916,
12205,
491,
921,
29883,
1446,
322,
274,
4841,
322,
26051,
1048,
4567,
921,
29883,
1446,
322,
274,
4841,
29889,
13,
13,
1678,
584,
3207,
529,
15926,
29889,
1469,
2557,
29958,
4489,
29901,
3918,
1891,
12205,
411,
278,
1494,
5181,
4341,
29901,
13,
4706,
525,
25232,
742,
525,
21791,
1446,
742,
525,
6370,
29918,
1256,
4286,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
921,
29883,
1446,
29901,
10410,
13997,
304,
367,
7120,
373,
29889,
13109,
338,
599,
297,
278,
13,
4706,
12205,
29889,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
274,
4841,
29901,
4891,
13926,
304,
367,
7120,
373,
29889,
13109,
338,
599,
297,
278,
13,
4706,
12205,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
1369,
29901,
1347,
15783,
24577,
2635,
29889,
13109,
338,
6213,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
1095,
29901,
1347,
15783,
278,
9281,
2635,
29889,
13109,
338,
6213,
29889,
13,
1678,
584,
3207,
529,
8977,
29958,
4628,
1761,
29901,
4891,
13926,
411,
2635,
20238,
393,
881,
367,
429,
13347,
515,
13,
4706,
278,
848,
3515,
29889,
960,
697,
4891,
4004,
756,
3196,
4628,
1761,
23704,
9773,
3694,
13,
4706,
304,
278,
4891,
29899,
2042,
775,
29889,
13,
1678,
584,
3207,
529,
11227,
29958,
714,
29918,
497,
29901,
565,
5852,
278,
740,
3639,
12212,
12205,
322,
4629,
29914,
13,
4706,
3625,
921,
29883,
1446,
322,
274,
4841,
29889,
13,
4706,
13109,
338,
7700,
29892,
474,
29889,
29872,
29889,
871,
278,
12205,
338,
4133,
13,
1678,
584,
3207,
529,
11227,
29958,
25869,
29901,
565,
5852,
871,
11551,
29879,
274,
4841,
393,
526,
3625,
363,
599,
921,
29883,
1446,
29889,
13,
4706,
13109,
338,
7700,
29889,
13,
13,
1678,
584,
2457,
529,
15926,
29889,
1469,
2557,
23917,
12212,
12205,
393,
884,
25388,
20955,
470,
13,
4706,
313,
1454,
714,
29918,
497,
5852,
29897,
12205,
322,
3625,
322,
4629,
921,
29883,
1446,
322,
274,
4841,
29889,
13,
1678,
9995,
13,
13,
1678,
4489,
29916,
353,
4489,
29961,
2176,
1839,
6370,
29918,
1256,
2033,
6736,
10518,
29889,
517,
29918,
12673,
29898,
2962,
4638,
565,
1369,
338,
451,
6213,
1683,
4489,
13,
1678,
4489,
29916,
353,
4489,
29916,
29961,
2176,
29916,
1839,
6370,
29918,
1256,
2033,
5277,
10518,
29889,
517,
29918,
12673,
29898,
355,
4638,
565,
1095,
338,
451,
6213,
1683,
4489,
29916,
13,
13,
1678,
565,
4628,
1761,
338,
451,
6213,
29901,
13,
4706,
363,
1820,
29892,
995,
297,
4628,
1761,
29889,
7076,
7295,
13,
9651,
977,
29873,
29896,
353,
4489,
29916,
1839,
25232,
2033,
1275,
1820,
7503,
29941,
29962,
13,
9651,
977,
29873,
29906,
353,
4489,
29916,
1839,
6370,
29918,
1256,
2033,
6736,
10518,
29889,
517,
29918,
12673,
29898,
1767,
29961,
29900,
2314,
13,
9651,
977,
29873,
29941,
353,
4489,
29916,
1839,
6370,
29918,
1256,
2033,
5277,
10518,
29889,
517,
29918,
12673,
29898,
1767,
29961,
29896,
2314,
13,
9651,
4489,
29916,
353,
4489,
29916,
29961,
30022,
29898,
1777,
29873,
29896,
669,
977,
29873,
29906,
669,
977,
29873,
29941,
4638,
13,
13,
1678,
921,
29883,
1446,
29918,
262,
29918,
2176,
353,
4489,
29916,
1839,
29916,
4117,
13359,
13092,
580,
13,
1678,
565,
921,
29883,
1446,
338,
6213,
29901,
13,
4706,
921,
29883,
1446,
353,
12705,
29898,
21791,
1446,
29918,
262,
29918,
2176,
29897,
13,
1678,
1683,
29901,
13,
4706,
4567,
353,
12705,
29898,
842,
29898,
21791,
1446,
29897,
448,
731,
29898,
21791,
1446,
29918,
262,
29918,
2176,
876,
13,
4706,
565,
7431,
29898,
27259,
29897,
1405,
29871,
29900,
29901,
13,
9651,
1596,
29898,
29888,
29908,
18552,
292,
13997,
29901,
426,
27259,
1836,
1159,
13,
9651,
921,
29883,
1446,
29889,
5992,
29898,
27259,
29897,
13,
13,
1678,
4489,
29916,
353,
4489,
29916,
29961,
2176,
29916,
1839,
29916,
4117,
13359,
275,
262,
29898,
21791,
1446,
4638,
13,
13,
1678,
565,
25869,
29901,
13,
4706,
4489,
29918,
6948,
353,
4489,
29916,
29889,
27789,
877,
29916,
4117,
1495,
1839,
25232,
13359,
13092,
580,
13,
4706,
274,
4841,
29918,
262,
29918,
2176,
353,
1051,
29898,
2176,
29918,
6948,
29961,
29900,
2314,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
7431,
29898,
2176,
29918,
6948,
22164,
13,
9651,
274,
4841,
29918,
262,
29918,
2176,
353,
518,
25232,
363,
274,
333,
297,
4489,
29918,
6948,
29961,
29875,
29962,
565,
274,
333,
297,
274,
4841,
29918,
262,
29918,
2176,
29962,
13,
1678,
1683,
29901,
13,
4706,
274,
4841,
29918,
262,
29918,
2176,
353,
4489,
29916,
1839,
25232,
13359,
13092,
580,
13,
13,
1678,
565,
274,
4841,
338,
6213,
29901,
13,
4706,
274,
4841,
353,
12705,
29898,
29883,
4841,
29918,
262,
29918,
2176,
29897,
13,
1678,
1683,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
29883,
4841,
29892,
1051,
1125,
13,
965,
274,
4841,
353,
518,
29883,
4841,
29962,
13,
4706,
4567,
353,
12705,
29898,
842,
29898,
29883,
4841,
29897,
448,
731,
29898,
29883,
4841,
29918,
262,
29918,
2176,
876,
13,
4706,
565,
7431,
29898,
27259,
29897,
1405,
29871,
29900,
29901,
13,
9651,
1596,
29898,
29888,
29915,
18552,
292,
4891,
13926,
29901,
426,
27259,
29913,
1495,
13,
4706,
274,
4841,
353,
12705,
29898,
1761,
29898,
842,
29898,
29883,
4841,
467,
1639,
2042,
29898,
842,
29898,
29883,
4841,
29918,
262,
29918,
2176,
13697,
13,
4706,
4489,
29916,
353,
4489,
29916,
29961,
2176,
29916,
1839,
25232,
13359,
275,
262,
29898,
29883,
4841,
4638,
13,
13,
1678,
565,
714,
29918,
497,
29901,
13,
4706,
736,
4489,
29916,
29889,
8865,
29918,
20908,
15815,
3285,
921,
29883,
1446,
29892,
274,
4841,
13,
1678,
1683,
29901,
13,
4706,
736,
4489,
29916,
29889,
8865,
29918,
20908,
15815,
580,
13,
13,
13,
1753,
10032,
29918,
2176,
29918,
1609,
29918,
29873,
6541,
29898,
2176,
29901,
10518,
29889,
17271,
29892,
260,
7358,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
29871,
1369,
29901,
851,
353,
6213,
29892,
13,
462,
4706,
1095,
29901,
851,
353,
6213,
29892,
4628,
1761,
29901,
9657,
353,
6213,
1125,
13,
1678,
9995,
13,
1678,
19916,
12205,
491,
921,
29883,
1446,
322,
274,
4841,
322,
26051,
1048,
4567,
921,
29883,
1446,
322,
274,
4841,
13,
13,
1678,
584,
3207,
529,
15926,
29889,
1469,
2557,
29958,
4489,
29901,
3918,
1891,
12205,
411,
278,
1494,
4341,
29901,
13,
462,
795,
525,
25232,
742,
525,
21791,
1446,
742,
525,
6370,
29918,
1256,
4286,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
260,
7358,
29901,
16892,
414,
313,
19128,
13926,
718,
2967,
13997,
29897,
13,
1678,
584,
3207,
529,
710,
29958,
1369,
29901,
1347,
297,
17723,
29871,
29947,
29953,
29900,
29896,
15783,
24577,
2635,
29889,
13109,
338,
6213,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
1095,
29901,
1347,
17723,
29871,
29947,
29953,
29900,
29896,
15783,
278,
9281,
2635,
29889,
13109,
338,
6213,
29889,
13,
1678,
584,
3207,
529,
8977,
29958,
4628,
1761,
29901,
4891,
13926,
411,
2635,
20238,
393,
881,
367,
429,
13347,
515,
13,
462,
632,
278,
12205,
29889,
960,
697,
4891,
4004,
756,
3196,
4628,
1761,
13,
462,
632,
23704,
9773,
3694,
304,
278,
4891,
4004,
775,
29889,
13,
13,
1678,
584,
2457,
529,
15926,
29889,
1469,
2557,
23917,
12212,
12205,
393,
884,
25388,
20955,
13,
1678,
9995,
13,
13,
1678,
4489,
29916,
353,
4489,
29961,
2176,
3366,
6370,
29918,
1256,
3108,
6736,
10518,
29889,
517,
29918,
12673,
29898,
2962,
4638,
565,
1369,
338,
451,
6213,
1683,
4489,
13,
1678,
4489,
29916,
353,
4489,
29916,
29961,
2176,
29916,
3366,
6370,
29918,
1256,
3108,
5277,
10518,
29889,
517,
29918,
12673,
29898,
355,
4638,
565,
1095,
338,
451,
6213,
1683,
4489,
29916,
13,
13,
1678,
565,
4628,
1761,
338,
451,
6213,
29901,
29871,
396,
4628,
1761,
292,
491,
4891,
29899,
2042,
13,
4706,
363,
1820,
29892,
995,
297,
4628,
1761,
29889,
7076,
7295,
13,
9651,
977,
29873,
29896,
353,
4489,
29916,
3366,
25232,
3108,
1275,
1820,
7503,
29941,
29962,
13,
9651,
977,
29873,
29906,
353,
4489,
29916,
3366,
6370,
29918,
1256,
3108,
6736,
10518,
29889,
517,
29918,
12673,
29898,
1767,
29961,
29900,
2314,
13,
9651,
977,
29873,
29941,
353,
4489,
29916,
3366,
6370,
29918,
1256,
3108,
5277,
10518,
29889,
517,
29918,
12673,
29898,
1767,
29961,
29896,
2314,
13,
9651,
4489,
29916,
353,
4489,
29916,
29961,
30022,
29898,
1777,
29873,
29896,
669,
977,
29873,
29906,
669,
977,
29873,
29941,
4638,
13,
13,
1678,
4489,
29916,
3366,
29873,
6541,
3108,
353,
4489,
3366,
25232,
3108,
718,
22868,
29915,
718,
4489,
3366,
29916,
4117,
3108,
13,
1678,
260,
7358,
29918,
262,
29918,
2176,
353,
4489,
29916,
3366,
29873,
6541,
16862,
13092,
580,
13,
1678,
565,
260,
7358,
338,
6213,
29901,
13,
4706,
260,
7358,
353,
12705,
29898,
29873,
7358,
29918,
262,
29918,
2176,
29897,
13,
1678,
1683,
29901,
13,
4706,
4567,
353,
12705,
29898,
842,
29898,
29873,
7358,
29897,
448,
731,
29898,
29873,
7358,
29918,
262,
29918,
2176,
876,
13,
4706,
565,
7431,
29898,
27259,
29897,
1405,
29871,
29900,
29901,
13,
9651,
1596,
29898,
29888,
29915,
18552,
292,
16892,
414,
29901,
426,
27259,
29913,
1495,
13,
9651,
260,
7358,
29889,
5992,
29898,
27259,
29897,
13,
13,
1678,
4489,
29916,
353,
4489,
29916,
29961,
2176,
29916,
3366,
29873,
6541,
16862,
275,
262,
29898,
29873,
7358,
4638,
13,
13,
1678,
736,
4489,
29916,
29889,
8865,
29918,
20908,
15815,
580,
13,
13,
1753,
13997,
29918,
2176,
29898,
2176,
29901,
10518,
29889,
17271,
29892,
921,
29883,
1446,
29901,
2391,
29961,
710,
1402,
274,
4841,
29901,
2391,
29961,
710,
29962,
353,
6213,
29892,
13,
462,
29871,
659,
29901,
851,
353,
525,
1767,
742,
1369,
29901,
851,
353,
6213,
29892,
1095,
29901,
851,
353,
6213,
29892,
13,
462,
29871,
4628,
1761,
29901,
9657,
353,
6213,
29892,
2440,
29901,
938,
353,
6213,
29892,
3005,
29939,
29901,
851,
353,
525,
29924,
742,
13,
462,
29871,
11755,
29901,
938,
353,
29871,
29900,
29892,
285,
5080,
29901,
938,
353,
29871,
29896,
29892,
921,
4117,
29918,
351,
3174,
29901,
2391,
29961,
710,
29962,
353,
6702,
12676,
742,
525,
12676,
8785,
29901,
13,
13,
1678,
9995,
4391,
2888,
1023,
29899,
20683,
12205,
411,
8210,
10868,
322,
301,
810,
13,
539,
13907,
363,
7418,
29889,
13,
13,
1678,
584,
3207,
529,
15926,
29889,
1469,
2557,
29958,
4489,
29901,
3918,
1891,
12205,
411,
278,
1494,
5181,
4341,
29901,
13,
4706,
525,
25232,
742,
525,
21791,
1446,
742,
525,
6370,
29918,
1256,
29915,
322,
472,
3203,
697,
1897,
411,
1819,
310,
4066,
29889,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
921,
29883,
1446,
29901,
3721,
1023,
10410,
13997,
5069,
9443,
338,
304,
367,
13,
4706,
29537,
287,
29889,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
274,
4841,
29901,
4891,
13926,
304,
367,
5134,
29889,
13109,
338,
599,
297,
278,
13,
4706,
12205,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
1369,
29901,
24577,
2635,
297,
17723,
29871,
29947,
29953,
29900,
29896,
3402,
29889,
13109,
338,
6213,
29892,
474,
29889,
29872,
29889,
24577,
13,
4706,
2635,
297,
848,
3515,
338,
1304,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
1095,
29901,
9281,
2635,
297,
17723,
29871,
29947,
29953,
29900,
29896,
3402,
29889,
13109,
338,
6213,
29892,
474,
29889,
29872,
29889,
9281,
2635,
13,
4706,
297,
848,
3515,
338,
1304,
29889,
13,
1678,
584,
3207,
529,
8977,
29958,
4628,
1761,
29901,
4891,
13926,
411,
2635,
20238,
393,
881,
367,
429,
13347,
515,
13,
4706,
278,
848,
3515,
29889,
960,
697,
4891,
4004,
756,
3196,
4628,
1761,
23704,
9773,
3694,
13,
4706,
304,
278,
4891,
4004,
775,
29889,
13,
1678,
584,
3207,
529,
524,
29958,
2440,
29901,
9681,
310,
2440,
975,
607,
848,
526,
11404,
630,
29889,
13786,
414,
11696,
3005,
29939,
13,
4706,
322,
947,
451,
2758,
301,
810,
29892,
13109,
338,
6213,
29892,
474,
29889,
29872,
29889,
694,
2473,
29899,
6360,
11404,
362,
29889,
13,
1678,
584,
3207,
529,
710,
29958,
659,
29901,
1024,
310,
1897,
393,
3743,
278,
1819,
310,
4066,
29889,
13109,
338,
13,
4706,
525,
1767,
4286,
13,
1678,
584,
3207,
529,
710,
29958,
3005,
29939,
29901,
5497,
972,
11427,
10868,
472,
607,
278,
3652,
526,
304,
367,
4559,
29881,
29889,
13,
4706,
910,
1818,
367,
697,
310,
525,
29928,
742,
525,
29956,
742,
525,
29924,
742,
525,
29984,
742,
525,
29909,
4286,
13109,
338,
525,
29924,
4286,
13,
1678,
584,
3207,
529,
524,
29958,
11755,
29901,
16952,
313,
18829,
310,
18517,
29897,
310,
1473,
7663,
297,
23704,
408,
731,
491,
13,
4706,
3005,
29939,
29889,
13109,
338,
29871,
29900,
29889,
13,
4706,
3940,
29901,
363,
3483,
952,
267,
411,
14278,
322,
7309,
7606,
13997,
29892,
278,
1473,
4893,
13,
4706,
278,
6297,
310,
278,
7309,
7606,
29889,
13,
1678,
584,
3207,
529,
524,
29958,
285,
5080,
29901,
1152,
1328,
8401,
6588,
3474,
310,
937,
7663,
29889,
13109,
338,
29871,
29896,
29892,
13,
4706,
474,
29889,
29872,
694,
6588,
29889,
13,
4706,
3940,
29901,
910,
3443,
338,
1304,
14364,
363,
3646,
3639,
408,
14278,
3651,
29889,
13,
1678,
584,
3207,
529,
1293,
29961,
710,
29962,
29958,
921,
4117,
29918,
351,
3174,
29901,
1222,
23617,
1023,
11404,
362,
3519,
29889,
13109,
338,
525,
12676,
29915,
363,
13,
4706,
1716,
29889,
13,
13,
1678,
584,
2457,
529,
15926,
29889,
1469,
2557,
23917,
2888,
848,
3515,
411,
1023,
7663,
4341,
13,
1678,
9995,
13,
13,
1678,
4974,
3005,
29939,
297,
6024,
29928,
742,
525,
29956,
742,
525,
29924,
742,
525,
29984,
742,
525,
29909,
2033,
13,
1678,
4974,
451,
313,
6360,
29879,
338,
451,
6213,
29897,
669,
313,
3110,
2804,
29871,
29900,
511,
525,
29931,
810,
2609,
367,
7436,
304,
1629,
6471,
6169,
13,
1678,
565,
2440,
338,
451,
6213,
29901,
13,
4706,
4974,
338,
8758,
29898,
2962,
29892,
851,
511,
525,
12883,
11404,
362,
6858,
263,
1369,
2635,
6169,
13,
13,
1678,
4489,
29892,
921,
29883,
1446,
29892,
274,
4841,
353,
10032,
29918,
2176,
29898,
2176,
29892,
921,
29883,
1446,
29892,
274,
4841,
29892,
1369,
29892,
1095,
29892,
4628,
1761,
29892,
714,
29918,
497,
29922,
5574,
29897,
13,
13,
1678,
784,
29918,
7039,
353,
6024,
25232,
742,
525,
29916,
4117,
742,
525,
6370,
29918,
1256,
742,
659,
29962,
13,
1678,
4489,
29883,
353,
10518,
29889,
17271,
29898,
13099,
29922,
1054,
29918,
7039,
29897,
13,
13,
1678,
565,
2440,
338,
6213,
29901,
13,
4706,
363,
474,
297,
3464,
29898,
29906,
1125,
13,
9651,
4489,
29893,
353,
4489,
29961,
2176,
1839,
29916,
4117,
2033,
1275,
921,
29883,
1446,
29961,
29875,
29962,
1822,
29886,
11002,
29898,
2248,
2433,
6370,
29918,
1256,
742,
4341,
2433,
25232,
742,
13,
462,
462,
462,
259,
1819,
29922,
791,
29897,
13,
9651,
4489,
29893,
353,
4489,
29893,
29889,
690,
981,
29898,
29888,
7971,
467,
16170,
29898,
29916,
4117,
29918,
351,
3174,
29961,
29875,
2314,
13,
9651,
565,
313,
29875,
1275,
29871,
29900,
29897,
669,
313,
29888,
5080,
1405,
29871,
29896,
1125,
13,
18884,
4489,
29893,
353,
4489,
29893,
29889,
22155,
29898,
7165,
29922,
29888,
5080,
467,
12676,
2141,
10889,
29898,
29896,
448,
285,
5080,
29897,
13,
9651,
565,
313,
29875,
1275,
29871,
29896,
29897,
669,
313,
3110,
1405,
29871,
29900,
1125,
13,
18884,
4489,
29893,
353,
4489,
29893,
29889,
10889,
29898,
3110,
29897,
13,
9651,
4489,
29916,
353,
10518,
29889,
29885,
2152,
29898,
2176,
29893,
29889,
12071,
29918,
2248,
3285,
1178,
29918,
16908,
29922,
1839,
6370,
29918,
1256,
7464,
13,
462,
3986,
995,
29918,
16908,
29922,
29883,
4841,
29892,
995,
29918,
978,
29922,
791,
29897,
13,
9651,
4489,
29916,
1839,
29916,
4117,
2033,
353,
921,
29883,
1446,
29961,
29875,
29962,
13,
9651,
4489,
29883,
353,
4489,
29883,
29889,
4397,
29898,
2176,
29916,
29961,
1054,
29918,
7039,
2314,
13,
1678,
1683,
29901,
13,
4706,
269,
29918,
6360,
353,
10518,
29889,
517,
29918,
12673,
29898,
2962,
467,
6360,
13,
4706,
321,
29918,
6360,
353,
4489,
1839,
6370,
29918,
1256,
13359,
3317,
2141,
6360,
718,
29871,
29896,
13,
13,
4706,
27270,
353,
938,
3552,
29872,
29918,
6360,
448,
269,
29918,
6360,
29897,
847,
2440,
29897,
13,
4706,
21162,
353,
313,
29872,
29918,
6360,
448,
269,
29918,
6360,
29897,
1273,
2440,
13,
13,
4706,
1629,
29918,
13155,
353,
6571,
13,
4706,
363,
2318,
297,
3464,
29898,
2972,
292,
1125,
13,
9651,
995,
353,
518,
29875,
363,
474,
297,
3464,
29898,
29879,
29918,
6360,
29892,
269,
29918,
6360,
718,
2440,
4638,
13,
9651,
1820,
353,
285,
29908,
29912,
29879,
29918,
6360,
29913,
448,
426,
29879,
29918,
6360,
718,
313,
6360,
29879,
448,
29871,
29896,
2915,
29908,
13,
9651,
1629,
29918,
13155,
29961,
1989,
29962,
353,
995,
13,
13,
9651,
269,
29918,
6360,
4619,
2440,
13,
13,
4706,
325,
353,
518,
29875,
363,
474,
297,
3464,
29898,
29879,
29918,
6360,
29892,
269,
29918,
6360,
718,
313,
1745,
475,
672,
718,
29871,
29896,
28166,
13,
4706,
1629,
29918,
13155,
29961,
29888,
29908,
29912,
29879,
29918,
6360,
29913,
448,
1286,
3108,
353,
325,
13,
4706,
1051,
29918,
29891,
29918,
13155,
353,
1051,
29898,
6360,
29918,
13155,
29889,
8149,
3101,
13,
13,
4706,
14240,
29918,
353,
14013,
1629,
29901,
1051,
29918,
29891,
29918,
13155,
29961,
524,
3552,
6360,
1273,
29871,
29906,
29900,
29900,
29900,
29897,
847,
2440,
4638,
13,
4706,
4489,
1839,
6341,
29918,
1256,
2033,
353,
4489,
1839,
6370,
29918,
1256,
13359,
6008,
29889,
6360,
29889,
7302,
29898,
21652,
19925,
13,
4706,
363,
474,
297,
3464,
29898,
29906,
1125,
13,
9651,
4489,
29916,
353,
4489,
29961,
2176,
1839,
29916,
4117,
2033,
1275,
921,
29883,
1446,
29961,
29875,
5262,
13,
9651,
4489,
29916,
353,
4489,
29916,
29889,
27789,
18959,
29916,
4117,
742,
525,
25232,
742,
13,
462,
1669,
525,
6341,
29918,
1256,
2033,
467,
16170,
29898,
29916,
4117,
29918,
351,
3174,
29961,
29875,
14664,
12071,
29918,
2248,
580,
13,
9651,
4489,
29916,
353,
4489,
29916,
29889,
1267,
420,
29898,
13099,
3790,
29908,
6341,
29918,
1256,
1115,
376,
6370,
29918,
1256,
29908,
1800,
13,
9651,
4489,
29883,
353,
4489,
29883,
29889,
4397,
29898,
2176,
29916,
29961,
1054,
29918,
7039,
2314,
13,
13,
1678,
736,
4489,
29883,
29889,
29886,
11002,
29898,
2248,
29922,
877,
25232,
742,
525,
6370,
29918,
1256,
5477,
4341,
2433,
29916,
4117,
742,
13,
462,
268,
1819,
29922,
791,
467,
8865,
1056,
580,
29961,
21791,
1446,
29962,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
274,
4841,
353,
6024,
29940,
29999,
29928,
742,
525,
29909,
15789,
742,
525,
7210,
29925,
742,
525,
29907,
3035,
2033,
13,
1678,
921,
29883,
1446,
353,
6024,
29990,
29934,
742,
525,
11341,
29979,
742,
525,
29954,
25180,
4690,
742,
525,
1177,
10536,
2033,
13,
1678,
4489,
29918,
29883,
4841,
353,
10518,
29889,
17271,
29898,
2248,
29922,
29883,
4841,
29892,
4341,
29922,
1839,
799,
20409,
742,
525,
12333,
742,
525,
12676,
29918,
1202,
742,
13,
462,
462,
18884,
525,
4928,
29918,
4713,
11287,
13,
1678,
4489,
29918,
29883,
4841,
29889,
2029,
1839,
29909,
15789,
2033,
353,
6024,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29906,
29899,
29941,
29896,
742,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29962,
13,
1678,
4489,
29918,
29883,
4841,
29889,
2029,
1839,
29907,
3035,
2033,
353,
6024,
29906,
29900,
29900,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29896,
29899,
29941,
29900,
742,
29871,
29900,
29892,
29871,
29896,
29962,
13,
1678,
4489,
29918,
29883,
4841,
29889,
2029,
1839,
7210,
29925,
2033,
353,
6024,
29906,
29900,
29900,
29906,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29896,
29899,
29941,
29900,
742,
29871,
29900,
29892,
29871,
29906,
29962,
13,
1678,
4489,
29918,
29883,
4841,
29889,
2029,
1839,
29940,
29999,
29928,
2033,
353,
6024,
29906,
29900,
29900,
29906,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29900,
29929,
29899,
29941,
29900,
742,
448,
29900,
29889,
29896,
29892,
29871,
29906,
29962,
13,
13,
1678,
4489,
29918,
21791,
1446,
353,
10518,
29889,
17271,
29898,
2248,
29922,
21791,
1446,
29892,
4341,
29922,
1839,
799,
20409,
742,
525,
12333,
742,
525,
12676,
29918,
1202,
742,
13,
462,
462,
462,
29871,
525,
4928,
29918,
4713,
742,
525,
279,
29918,
1111,
1389,
742,
525,
1627,
29918,
1111,
1389,
11287,
13,
1678,
4489,
29918,
21791,
1446,
29889,
2029,
1839,
29990,
29934,
2033,
353,
6024,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29906,
29899,
29941,
29896,
742,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29889,
29941,
29962,
13,
1678,
4489,
29918,
21791,
1446,
29889,
2029,
1839,
11341,
29979,
2033,
353,
6024,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29900,
29899,
29941,
29900,
742,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29889,
29929,
29945,
29892,
29871,
29896,
29962,
13,
1678,
4489,
29918,
21791,
1446,
29889,
2029,
1839,
29954,
25180,
4690,
2033,
353,
6024,
29906,
29900,
29900,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29900,
29899,
29941,
29900,
742,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29889,
29929,
29892,
29871,
29896,
29962,
13,
1678,
4489,
29918,
21791,
1446,
29889,
2029,
1839,
1177,
10536,
2033,
353,
6024,
29906,
29900,
29900,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29906,
29900,
29899,
29896,
29900,
29899,
29941,
29900,
742,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29945,
29962,
13,
13,
1678,
4628,
353,
11117,
29909,
15789,
2396,
6024,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29900,
29900,
29941,
29899,
29896,
29906,
29899,
29941,
29896,
7464,
525,
7210,
29925,
2396,
6024,
29906,
29900,
29896,
29947,
29899,
29900,
29896,
29899,
29900,
29896,
742,
525,
29906,
29896,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
2033,
29913,
13,
13,
1678,
4036,
29889,
26776,
29898,
29906,
29897,
13,
1678,
4489,
29881,
353,
1207,
29918,
29939,
2176,
29898,
2176,
29918,
29883,
4841,
29892,
4489,
29918,
21791,
1446,
29892,
1250,
29918,
279,
29922,
29900,
29889,
29955,
29945,
29897,
13,
13,
1678,
4489,
29881,
29918,
29916,
29896,
353,
10032,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
21791,
1446,
7503,
29899,
29896,
1402,
274,
4841,
29922,
29883,
4841,
29961,
29900,
1402,
13,
462,
539,
1369,
2433,
29906,
29900,
29896,
29906,
29899,
29900,
29896,
29899,
29900,
29896,
742,
1095,
2433,
29906,
29900,
29896,
29947,
29899,
29900,
29896,
29899,
29941,
29896,
1495,
13,
1678,
1596,
29898,
2176,
29881,
29918,
29916,
29896,
1839,
29916,
4117,
13359,
13092,
3101,
13,
13,
1678,
4489,
29881,
29918,
29916,
29906,
353,
10032,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
21791,
1446,
29892,
274,
4841,
29922,
29883,
4841,
29892,
1369,
2433,
29906,
29900,
29896,
29906,
29899,
29900,
29896,
29899,
29900,
29896,
742,
1095,
2433,
29906,
29900,
29896,
29947,
29899,
29900,
29896,
29899,
29941,
29896,
1495,
13,
1678,
4489,
29881,
29918,
29916,
29941,
353,
10032,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
21791,
1446,
29892,
274,
4841,
29922,
29883,
4841,
29892,
4628,
1761,
29922,
8517,
29897,
13,
13,
1678,
16892,
414,
353,
518,
25232,
718,
11119,
29990,
29934,
29908,
363,
274,
333,
297,
274,
4841,
29962,
13,
1678,
4489,
29881,
29918,
486,
353,
10032,
29918,
2176,
29918,
1609,
29918,
29873,
6541,
29898,
2176,
29881,
29892,
260,
7358,
29922,
24667,
414,
29892,
4628,
1761,
29922,
8517,
29897,
13,
13,
1678,
396,
4321,
292,
13997,
29918,
2176,
2141,
13,
1678,
4489,
29883,
29896,
353,
13997,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
1839,
29954,
25180,
4690,
742,
525,
11341,
29979,
7464,
274,
4841,
29922,
29883,
4841,
29892,
3005,
29939,
2433,
29924,
742,
11755,
29922,
29900,
29892,
13,
462,
308,
921,
4117,
29918,
351,
3174,
29922,
1839,
12676,
742,
525,
12676,
7464,
1369,
2433,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
4628,
1761,
29922,
8517,
29897,
13,
13,
1678,
4489,
29883,
29906,
353,
13997,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
1839,
29954,
25180,
4690,
742,
525,
11341,
29979,
7464,
274,
4841,
29922,
29883,
4841,
29892,
3005,
29939,
2433,
29924,
742,
11755,
29922,
29900,
29892,
13,
462,
308,
285,
5080,
29922,
29941,
29892,
921,
4117,
29918,
351,
3174,
29922,
1839,
12676,
742,
525,
12676,
7464,
13,
462,
308,
1369,
2433,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
4628,
1761,
29922,
8517,
29897,
13,
13,
1678,
4489,
29883,
29941,
353,
13997,
29918,
2176,
29898,
2176,
29881,
29892,
921,
29883,
1446,
29922,
1839,
29954,
25180,
4690,
742,
525,
11341,
29979,
7464,
274,
4841,
29922,
29883,
4841,
29892,
3005,
29939,
2433,
29924,
742,
11755,
29922,
29900,
29892,
13,
462,
308,
921,
4117,
29918,
351,
3174,
29922,
1839,
12676,
742,
525,
12676,
7464,
1369,
2433,
29906,
29900,
29900,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
742,
4628,
1761,
29922,
8517,
29892,
13,
462,
308,
2440,
29922,
29896,
29900,
29897,
13,
13,
1678,
396,
4321,
292,
10032,
29918,
2176,
580,
13,
1678,
977,
29873,
29896,
353,
3695,
3552,
2176,
29881,
1839,
25232,
2033,
1275,
525,
29909,
15789,
1495,
669,
313,
2176,
29881,
1839,
29916,
4117,
2033,
1275,
525,
29990,
29934,
8785,
13,
1678,
977,
29873,
29906,
353,
3695,
3552,
2176,
29881,
1839,
25232,
2033,
1275,
525,
29940,
29999,
29928,
1495,
669,
313,
2176,
29881,
1839,
29916,
4117,
2033,
1275,
525,
1177,
10536,
8785,
13,
1678,
4489,
8235,
353,
4489,
29881,
29961,
1777,
29873,
29896,
669,
977,
29873,
29906,
29962,
29871,
396,
29611,
4567,
4891,
13926,
13,
1678,
4489,
29881,
29918,
29916,
29896,
29892,
921,
13073,
29892,
274,
13140,
353,
10032,
29918,
2176,
29898,
2176,
8235,
29892,
921,
29883,
1446,
29922,
1839,
29990,
29934,
742,
525,
11341,
29979,
742,
525,
1177,
10536,
7464,
274,
4841,
29922,
29883,
4841,
29892,
13,
462,
462,
259,
25869,
29922,
5574,
29892,
714,
29918,
497,
29922,
5574,
29897,
2
] |
lofti_gaia/lofti.py | logan-pearce/lofti_gaia | 2 | 23857 | import astropy.units as u
import numpy as np
from lofti_gaia.loftitools import *
from lofti_gaia.cFunctions import calcOFTI_C
#from loftitools import *
import pickle
import time
import matplotlib.pyplot as plt
# Astroquery throws some warnings we can ignore:
import warnings
warnings.filterwarnings("ignore")
'''This module obtaines measurements from Gaia EDR3 (Gaia DR2 is also available as a secondary option) and runs through the LOFTI Gaia/OFTI
wide stellar binary orbit fitting technique.
'''
class Fitter(object):
'''Initialize the Fitter object for the binary system, and compute observational constraints
to be used in the orbit fit. User must provide Gaia source ids, tuples of mass estimates for
both objects, specify the number of desired orbits in posterior sample. Fit will be
for object 2 relative to object 1.
Attributes are tuples of (value,uncertainty) unless otherwise indicated. Attributes
with astropy units are retrieved from Gaia archive, attributes without units are
computed from Gaia values. All relative values are for object 2 relative to object 1.
Args:
sourceid1, sourceid2 (int): Gaia source ids for the two objects, fit will be for motion of \
object 2 relative to object 1
mass1, mass2 (tuple, flt): tuple os mass estimate for object 1 and 2, of the form (value, uncertainty)
Norbits (int): Number of desired orbits in posterior sample. Default = 100000
results_filename (str): Filename for fit results files. If none, results will be written to files \
named FitResults.yr.mo.day.hr.min.s
astrometry (dict): User-supplied astrometric measurements. Must be dictionary or table or pandas dataframe with\
column names "sep,seperr,pa,paerr,dates" or "ra,raerr,dec,decerr,dates". May be same as the rv table. \
Sep, deltaRA, and deltaDEC must be in arcseconds, PA in degrees, dates in decimal years. \
Default = None
user_rv (dict): User-supplied radial velocity measurements. Must be dictionary or table or pandas dataframe with\
column names "rv,rverr,rv_dates". May be same as the astrometry table. Default = None.
catalog (str): name of Gaia catalog to query. Default = 'gaiaedr3.gaia_source'
ruwe1, ruwe2 (flt): RUWE value from Gaia archive
ref_epoch (flt): reference epoch in decimal years. For Gaia DR2 this is 2015.5, for Gaia EDR3 it is 2016.0
plx1, plx2 (flt): parallax from Gaia in mas
RA1, RA2 (flt): right ascension from Gaia; RA in deg, uncertainty in mas
Dec1, Dec2 (flt): declination from Gaia; Dec in deg, uncertainty in mas
pmRA1, pmRA2 (flt): proper motion in RA in mas yr^-1 from Gaia
pmDec1, pmDec2 (flt): proper motion in DEC in mas yr^-1 from Gaia
rv1, rv2 (flt, optional): radial velocity in km s^-1 from Gaia
rv (flt, optional): relative RV of 2 relative to 1, if both are present in Gaia
plx (flt): weighted mean parallax for the binary system in mas
distance (flt): distance of system in pc, computed from Gaia parallax using method \
of Bailer-Jones et. al 2018.
deltaRA, deltaDec (flt): relative separation in RA and Dec directions, in mas
pmRA, pmDec (flt): relative proper motion in RA/Dec directions in km s^-1
sep (flt): total separation vector in mas
pa (flt): postion angle of separation vector in degrees from North
sep_au (flt): separation in AU
sep_km (flt): separation in km
total_vel (flt): total velocity vector in km s^-1. If RV is available for both, \
this is the 3d velocity vector; if not it is just the plane of sky velocity.
total_planeofsky_vel (flt): total velocity in the plane of sky in km s^-1. \
In the absence of RV this is equivalent to the total velocity vector.
deltaGmag (flt): relative contrast in Gaia G magnitude. Does not include uncertainty.
inflateProperMOtionError (flt): an optional factor to mulitply default gaia proper motion error by.
Written by <NAME>, 2020
'''
def __init__(self, sourceid1, sourceid2, mass1, mass2, Norbits = 100000, \
results_filename = None,
astrometry = None,
user_rv = None,
catalog = 'gaiaedr3.gaia_source',
inflateProperMotionError=1
):
self.sourceid1 = sourceid1
self.sourceid2 = sourceid2
try:
self.mass1 = mass1[0]
self.mass1err = mass1[1]
self.mass2 = mass2[0]
self.mass2err = mass2[1]
self.mtot = [self.mass1 + self.mass2, np.sqrt((self.mass1err**2) + (self.mass2err**2))]
except:
raise ValueError('Masses must be tuples of (value,error), ex: mass1 = (1.0,0.05)')
self.Norbits = Norbits
if not results_filename:
self.results_filename = 'FitResults.'+time.strftime("%Y.%m.%d.%H.%M.%S")+'.txt'
self.stats_filename = 'FitResults.Stats.'+time.strftime("%Y.%m.%d.%H.%M.%S")+'.txt'
else:
self.results_filename = results_filename
self.stats_filename = results_filename+'.Stats.txt'
self.astrometry = False
# check if user supplied astrometry:
if astrometry is not None:
# if so, set astrometric flag to True:
self.astrometry = True
# store observation dates:
self.astrometric_dates = astrometry['dates']
# if in sep/pa, convert to ra/dec:
if 'sep' in astrometry:
try:
astr_ra = [MonteCarloIt([astrometry['sep'][i],astrometry['seperr'][i]]) * \
np.sin(np.radians(MonteCarloIt([astrometry['pa'][i],astrometry['paerr'][i]]))) \
for i in range(len(astrometry['sep']))]
astr_dec = [MonteCarloIt([astrometry['sep'][i],astrometry['seperr'][i]]) * \
np.cos(np.radians(MonteCarloIt([astrometry['pa'][i],astrometry['paerr'][i]]))) \
for i in range(len(astrometry['sep']))]
self.astrometric_ra = np.array([
[np.mean(astr_ra[i]) for i in range(len(astrometry['sep']))],
[np.std(astr_ra[i]) for i in range(len(astrometry['sep']))]
])
self.astrometric_dec = np.array([
[np.mean(astr_dec[i]) for i in range(len(astrometry['sep']))],
[np.std(astr_dec[i]) for i in range(len(astrometry['sep']))]
])
except:
raise ValueError('Astrometry keys not recognized. Please provide dictionary or table or pandas dataframe with\
column names "sep,seperr,pa,paerr,dates" or "ra,raerr,dec,decerr,dates"')
elif 'ra' in astrometry:
# else store the ra/dec as attributes:
try:
self.astrometric_ra = np.array([astrometry['ra'], astrometry['raerr']])
self.astrometric_dec = np.array([astrometry['dec'], astrometry['decerr']])
except:
raise ValueError('Astrometry keys not recognized. Please provide dictionary or table or pandas dataframe with\
column names "sep,seperr,pa,paerr,dates" or "ra,raerr,dec,decerr,dates"')
else:
raise ValueError('Astrometry keys not recognized. Please provide dictionary or table or pandas dataframe with\
column names "sep,seperr,pa,paerr,dates" or "ra,raerr,dec,decerr,dates"')
# Check if user supplied rv:
self.use_user_rv = False
if user_rv is not None:
# set user rv flag to true:
self.use_user_rv = True
try:
# set attributes; multiply rv by -1 due to difference in coordinate systems:
self.user_rv = np.array([user_rv['rv']*-1,user_rv['rverr']])
self.user_rv_dates = np.array(user_rv['rv_dates'])
except:
raise ValueError('RV keys not recognized. Please use column names "rv,rverr,rv_dates"')
self.catalog = catalog
# Get Gaia measurements, compute needed constraints, and add to object:
self.PrepareConstraints(catalog=self.catalog,inflateFactor=inflateProperMotionError)
def edr3ToICRF(self,pmra,pmdec,ra,dec,G):
''' Corrects for biases in proper motion. The function is from https://arxiv.org/pdf/2103.07432.pdf
Args:
pmra,pmdec (float): proper motion
ra, dec (float): right ascension and declination
G (float): G magnitude
Written by <NAME>, 2021
'''
if G>=13:
return pmra , pmdec
import numpy as np
def sind(x):
return np.sin(np.radians(x))
def cosd(x):
return np.cos(np.radians(x))
table1="""
0.0 9.0 9.0 9.5 9.5 10.0 10.0 10.5 10.5 11.0 11.0 11.5 11.5 11.75 11.75 12.0 12.0 12.25 12.25 12.5 12.5 12.75 12.75 13.0
18.4 33.8 -11.3 14.0 30.7 -19.4 12.8 31.4 -11.8 13.6 35.7 -10.5 16.2 50.0 2.1 19.4 59.9 0.2 21.8 64.2 1.0 17.7 65.6 -1.9 21.3 74.8 2.1 25.7 73.6 1.0 27.3 76.6 0.5
34.9 68.9 -2.9 """
table1 = np.fromstring(table1,sep=" ").reshape((12,5)).T
Gmin = table1[0]
Gmax = table1[1]
#pick the appropriate omegaXYZ for the source’s magnitude:
omegaX = table1[2][(Gmin<=G)&(Gmax>G)][0]
omegaY = table1[3][(Gmin<=G)&(Gmax>G)][0]
omegaZ = table1[4][(Gmin<=G)&(Gmax>G)][0]
pmraCorr = -1*sind(dec)*cosd(ra)*omegaX -sind(dec)*sind(ra)*omegaY + cosd(dec)*omegaZ
pmdecCorr = sind(ra)*omegaX -cosd(ra)*omegaY
return pmra-pmraCorr/1000., pmdec-pmdecCorr/1000.
def PrepareConstraints(self, rv=False, catalog='gaiaedr3.gaia_source', inflateFactor=1.):
'''Retrieves parameters for both objects from Gaia EDR3 archive and computes system attriubtes,
and assigns them to the Fitter object class.
Args:
rv (bool): flag for handling the presence or absence of RV measurements for both objects \
in EDR3. Gets set to True if both objects have Gaia RV measurements. Default = False
catalog (str): name of Gaia catalog to query. Default = 'gaiaedr3.gaia_source'
inflateFactor (flt): Factor by which to inflate the errors on Gaia proper motions to \
account for improper uncertainty estimates. Default = 1.0
Written by <NAME>, 2020
'''
from astroquery.gaia import Gaia
deg_to_mas = 3600000.
mas_to_deg = 1./3600000.
# Retrieve astrometric solution from Gaia EDR3
job = Gaia.launch_job("SELECT * FROM "+catalog+" WHERE source_id = "+str(self.sourceid1))
j = job.get_results()
job = Gaia.launch_job("SELECT * FROM "+catalog+" WHERE source_id = "+str(self.sourceid2))
k = job.get_results()
if catalog == 'gaiadr2.gaia_source':
# Retrieve RUWE from RUWE catalog for both sources and add to object state:
job = Gaia.launch_job("SELECT * FROM gaiadr2.ruwe WHERE source_id = "+str(self.sourceid1))
jruwe = job.get_results()
job = Gaia.launch_job("SELECT * FROM gaiadr2.ruwe WHERE source_id = "+str(self.sourceid2))
kruwe = job.get_results()
self.ruwe1 = jruwe['ruwe'][0]
self.ruwe2 = kruwe['ruwe'][0]
else:
# EDR3 contains ruwe in the main catalog:
self.ruwe1 = j['ruwe'][0]
self.ruwe2 = k['ruwe'][0]
# Check RUWE for both objects and warn if too high:
if self.ruwe1>1.2 or self.ruwe2>1.2:
print('''WARNING: RUWE for one or more of your solutions is greater than 1.2. This indicates
that the source might be an unresolved binary or experiencing acceleration
during the observation. Orbit fit results may not be trustworthy.''')
# reference epoch:
self.ref_epoch = j['ref_epoch'][0]
# parallax:
self.plx1 = [j[0]['parallax']*u.mas, j[0]['parallax_error']*u.mas]
self.plx2 = [k[0]['parallax']*u.mas, k[0]['parallax_error']*u.mas]
# RA/DEC
self.RA1 = [j[0]['ra']*u.deg, j[0]['ra_error']*mas_to_deg*u.deg]
self.RA2 = [k[0]['ra']*u.deg, k[0]['ra_error']*mas_to_deg*u.deg]
self.Dec1 = [j[0]['dec']*u.deg, j[0]['dec_error']*mas_to_deg*u.deg]
self.Dec2 = [k[0]['dec']*u.deg, k[0]['dec_error']*mas_to_deg*u.deg]
# Proper motions
pmRACorrected1,pmDecCorrected1 = self.edr3ToICRF(j[0]['pmra'],j[0]['pmdec'],j[0]['ra'],j[0]['dec'],j[0]["phot_g_mean_mag"])
pmRACorrected2,pmDecCorrected2 = self.edr3ToICRF(k[0]['pmra'],k[0]['pmdec'],k[0]['ra'],k[0]['dec'],k[0]["phot_g_mean_mag"])
self.pmRA1 = [pmRACorrected1*u.mas/u.yr, j[0]['pmra_error']*u.mas/u.yr*inflateFactor]
self.pmRA2 = [pmRACorrected2*u.mas/u.yr, k[0]['pmra_error']*u.mas/u.yr*inflateFactor]
self.pmDec1 = [pmDecCorrected1*u.mas/u.yr, j[0]['pmdec_error']*u.mas/u.yr*inflateFactor]
self.pmDec2 = [pmDecCorrected2*u.mas/u.yr, k[0]['pmdec_error']*u.mas/u.yr*inflateFactor]
# See if both objects have RV's in DR2:
if catalog == 'gaiaedr3.gaia_source':
key = 'dr2_radial_velocity'
error_key = 'dr2_radial_velocity_error'
elif catalog == 'gaiadr2.gaia_source':
key = 'radial_velocity'
error_key = 'radial_velocity_error'
if type(k[0][key]) == np.float64 and type(j[0][key]) == np.float64 or type(k[0][key]) == np.float32 and type(j[0][key]) == np.float32:
rv = True
self.rv1 = [j[0][key]*u.km/u.s,j[0][error_key]*u.km/u.s]
self.rv2 = [k[0][key]*u.km/u.s,k[0][error_key]*u.km/u.s]
rv1 = MonteCarloIt(self.rv1)
rv2 = MonteCarloIt(self.rv2)
self.rv = [ -np.mean(rv2-rv1) , np.std(rv2-rv1) ] # km/s
# negative to relfect change in coordinate system from RV measurements to lofti
# pos RV = towards observer in this coord system
else:
self.rv = [0,0]
# weighted mean of parallax values:
plx = np.average([self.plx1[0].value,self.plx2[0].value], weights = [self.plx1[1].value,self.plx2[1].value])
plxerr = np.max([self.plx1[1].value,self.plx2[1].value])
self.plx = [plx,plxerr] # mas
self.distance = distance(*self.plx) # pc
# Compute separations of component 2 relative to 1:
r1 = MonteCarloIt(self.RA1)
r2 = MonteCarloIt(self.RA2)
d1 = MonteCarloIt(self.Dec1)
d2 = MonteCarloIt(self.Dec2)
ra = (r2*deg_to_mas - r1*deg_to_mas) * np.cos(np.radians(np.mean([self.Dec1[0].value,self.Dec2[0].value])))
dec = ((d2 - d1)*u.deg).to(u.mas).value
self.deltaRA = [np.mean(ra),np.std(ra)] # mas
self.deltaDec = [np.mean(dec),np.std(dec)] # mas
# compute relative proper motion:
pr1 = MonteCarloIt(self.pmRA1)
pr2 = MonteCarloIt(self.pmRA2)
pd1 = MonteCarloIt(self.pmDec1)
pd2 = MonteCarloIt(self.pmDec2)
pmRA = [np.mean(pr2 - pr1), np.std(pr2-pr1)] # mas/yr
pmDec = [np.mean(pd2 - pd1), np.std(pd2 - pd1)] # mas/yr
self.pmRA = masyr_to_kms(pmRA,self.plx) # km/s
self.pmDec = masyr_to_kms(pmDec,self.plx) # km/s
# Compute separation/position angle:
r, p = to_polar(r1,r2,d1,d2)
self.sep = tuple([np.mean(r).value, np.std(r).value]) # mas
self.pa = tuple([np.mean(p).value, np.std(p).value]) # deg
self.sep_au = tuple([((self.sep[0]/1000)*self.distance[0]), ((self.sep[1]/1000)*self.distance[0])])
self.sep_km = tuple([ self.sep_au[0]*u.au.to(u.km) , self.sep_au[1]*u.au.to(u.km)])
# compute total velocities:
if rv:
self.total_vel = [ add_in_quad([self.pmRA[0],self.pmDec[0],self.rv[0]]) ,
add_in_quad([self.pmRA[1],self.pmDec[1],self.rv[1]]) ] # km/s
self.total_planeofsky_vel = [ add_in_quad([self.pmRA[0],self.pmDec[0]]) ,
add_in_quad([self.pmRA[1],self.pmDec[1]]) ] # km/s
else:
self.total_vel = [ add_in_quad([self.pmRA[0],self.pmDec[0]]) ,
add_in_quad([self.pmRA[1],self.pmDec[1]]) ] # km/s
self.total_planeofsky_vel = self.total_vel.copy() # km/s
# compute deltamag:
self.deltaGmag = j[0]['phot_g_mean_mag'] - k[0]['phot_g_mean_mag']
class FitOrbit(object):
''' Object for performing an orbit fit. Takes attributes from Fitter class.
ex: orbits = FitOrbit(fitterobject)
Args:
fitterobject (Fitter object): Fitter object initialized from the Fitter class
write_stats (bool): If True, write out summary statistics of orbit sample at \
conclusion of fit. Default = True.
write_results (bool): If True, write out the fit results to a pickle file \
in addition to the text file created during the fit. Default = True.
deltaRA, deltaDec (flt): relative separation in RA and Dec directions, in mas
pmRA, pmDec (flt): relative proper motion in RA/Dec directions in km s^-1
rv (flt, optional): relative RV of 2 relative to 1, if both are present in Gaia EDR3
mtot_init (flt): initial total system mass in Msun from user input
distance (flt): distance of system in pc, computed from Gaia parallax using method of Bailer-Jones et. al 2018.
sep (flt): separation vector in mas
pa (flt): postion angle of separation vector in degrees from North
ref_epoch (flt): epoch of the measurement, 2016.0 for Gaia EDR3 and 2015.5 for Gaia DR2.
Norbits (int): number of desired orbit samples
write_stats (bool): if True, write summary of sample statistics to human-readable file at end of run. Default = True
write_results (bool): if True, write out current state of sample orbits in pickle file in periodic intervals during \
run, and again at the end of the run. RECOMMENDED. Default = True
results_filename (str): name of file for saving pickled results to disk. If not supplied, \
defaul name is FitResults.y.mo.d.h.m.s.pkl, saved in same directory as fit was run.
stats_filename (str): name of file for saving human-readable file of stats of sample results. If not supplied, \
defaul name is FitResults.Stats.y.mo.d.h.m.s.pkl, saved in same directory as fit was run.
run_time (flt): run time for the last fit. astropy units object
Written by <NAME>, 2020
'''
def __init__(self, fitterobject, write_stats = True, write_results = True, python_version=False, \
use_pm_cross_term = False, corr_coeff = None):
# establish fit parameters:
self.deltaRA = fitterobject.deltaRA
self.deltaDec = fitterobject.deltaDec
self.pmRA = fitterobject.pmRA
self.pmDec = fitterobject.pmDec
self.rv = fitterobject.rv
self.mtot_init = fitterobject.mtot
self.distance = fitterobject.distance
self.sep = fitterobject.sep
self.pa = fitterobject.pa
self.ref_epoch = fitterobject.ref_epoch
self.Norbits = fitterobject.Norbits
self.write_results = write_results
self.write_stats = write_stats
self.results_filename = fitterobject.results_filename
self.stats_filename = fitterobject.stats_filename
self.astrometry = fitterobject.astrometry
if self.astrometry:
self.astrometric_ra = fitterobject.astrometric_ra
self.astrometric_dec = fitterobject.astrometric_dec
self.astrometric_dates = fitterobject.astrometric_dates
self.use_user_rv = fitterobject.use_user_rv
if self.use_user_rv:
self.user_rv = fitterobject.user_rv
self.user_rv_dates = fitterobject.user_rv_dates
# run orbit fitter:
self.fitorbit(python_fitOFTI=python_version, use_pm_cross_term = use_pm_cross_term, corr_coeff = corr_coeff)
def fitorbit(self, save_results_every_X_loops = 100, python_fitOFTI=False, use_pm_cross_term = False, corr_coeff = None):
'''Run the OFTI fitting run on the Fitter object. Called when FitOrbit object
is created.
Args:
save_results_every_X_loops (int): on every Xth loop, save status of the \
orbit sample arrays to a pickle file, if write_results = True (Default)
python_fitOFTI (bool): If True, fit using python only without using C Kepler's equation solver. Default = False
use_pm_cross_term (bool): If True, include the proper motion correlation cross term in the Chi^2 computation \
Default = False
Written by <NAME>, 2020
'''
# write header:
print('Saving orbits in',self.results_filename)
k = open(self.results_filename, 'w')
output_file_header = '# sma [arcsec] period [yrs] orbit phase t_0 [yr] ecc incl [deg]\
argp [deg] lan [deg] m_tot [Msun] dist [pc] chi^2 ln(prob) ln(randn)'
k.write(output_file_header + "\n")
k.close()
import time as tm
########### Perform initial run to get initial chi-squared: #############
# Draw random orbits:
#parameters = a,T,const,to,e,i,w,O,m1,dist
numSamples = 10000
parameters_init = draw_samples(numSamples, self.mtot_init, self.distance, self.ref_epoch)
# Compute positions and velocities:
if(python_fitOFTI):
X,Y,Z,Xdot,Ydot,Zdot,Xddot,Yddot,Zddot,parameters=calc_OFTI(parameters_init,self.ref_epoch,self.sep,self.pa)
else:
returnArray = np.zeros((19,numSamples))
returnArray = calcOFTI_C(parameters_init,self.ref_epoch,self.sep,self.pa,returnArray.copy())
X,Y,Z,Xdot,Ydot,Zdot,Xddot,Yddot,Zddot = returnArray[0:9]
parameters = returnArray[9:]
# Compute chi squared:
if self.rv[0] != 0:
model = np.array([Y,X,Ydot,Xdot,Zdot])
data = np.array([self.deltaRA, self.deltaDec, self.pmRA, self.pmDec, self.rv])
else:
model = np.array([Y,X,Ydot,Xdot])
data = np.array([self.deltaRA, self.deltaDec, self.pmRA, self.pmDec])
chi2 = ComputeChi2(data,model)
if use_pm_cross_term:
chi2 -= ( 2 * corr_coeff * (data[2][0] - model[2]) * (data[3][0] - model[3]) ) / (data[2][1] * data[3][1])
if self.astrometry:
p = parameters.copy()
a,T,const,to,e,i,w,O,m1,dist = p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9]
chi2_astr = np.zeros(10000)
# Calculate predicted positions at astr observation dates for each orbit:
for j in range(self.astrometric_ra.shape[1]):
# for each date, compute XYZ for each 10000 trial orbit. We can
# skip scale and rotate because that was accomplished in the calc_OFTI call above.
X1,Y1,Z1,E1 = calc_XYZ(a,T,to,e,i,w,O,self.astrometric_dates[j])
# Place astrometry into data array where: data[0][0]=ra obs, data[0][1]=ra err, etc:
data = np.array([self.astrometric_ra[:,j], self.astrometric_dec[:,j]])
# place corresponding predicited positions at that date for each trial orbit in arcsec:
model = np.array([Y1*1000,X1*1000])
# compute chi2 for trial orbits at that date and add to the total chi2 sum:
chi2_astr += ComputeChi2(data,model)
chi2 = chi2 + chi2_astr
if self.use_user_rv:
p = parameters.copy()
a,T,const,to,e,i,w,O,m1,dist = p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9]
chi2_rv = np.zeros(10000)
for j in range(self.user_rv.shape[1]):
# compute ecc anomaly at that date:
X1,Y1,Z1,E1 = calc_XYZ(a,T,to,e,i,w,O,self.user_rv_dates[j])
# compute velocities at that ecc anom:
Xdot,Ydot,Zdot = calc_velocities(a,T,to,e,i,w,O,dist,E1)
# compute chi2:
chi2_rv += ComputeChi2(np.array([self.user_rv[:,j]]),np.array([Zdot]))
chi2 = chi2 + chi2_rv
print('inital chi min',np.nanmin(chi2))
self.chi_min = np.nanmin(chi2)
# Accept/reject:
accepted, lnprob, lnrand = AcceptOrReject(chi2,self.chi_min)
# count number accepted:
number_orbits_accepted = np.size(accepted)
# tack on chi2, log probability, log random unif number to parameters array:
parameters = np.concatenate((parameters,chi2[None,:],lnprob[None,:],lnrand[None,:]), axis = 0)
# transpose:
parameters=np.transpose(parameters)
# write results to file:
k = open(self.results_filename, 'a')
for params in parameters[accepted]:
string = ' '.join([str(p) for p in params])
k.write(string + "\n")
k.close()
###### start loop ########
# initialize:
loop_count = 0
start=tm.time()
while number_orbits_accepted < self.Norbits:
# Draw random orbits:
numSamples = 10000
parameters_init = draw_samples(numSamples, self.mtot_init, self.distance, self.ref_epoch)
# Compute positions and velocities and new parameters array with scaled and rotated values:
if(python_fitOFTI):
X,Y,Z,Xdot,Ydot,Zdot,Xddot,Yddot,Zddot,parameters=calc_OFTI(parameters_init,self.ref_epoch,self.sep,self.pa)
else:
returnArray = np.zeros((19,numSamples))
returnArray = calcOFTI_C(parameters_init,self.ref_epoch,self.sep,self.pa,returnArray.copy())
X,Y,Z,Xdot,Ydot,Zdot,Xddot,Yddot,Zddot = returnArray[0:9]
parameters = returnArray[9:]
returnArray = None
# compute chi2 for orbits using Gaia observations:
if self.rv[0] != 0:
model = np.array([Y,X,Ydot,Xdot,Zdot])
data = np.array([self.deltaRA, self.deltaDec, self.pmRA, self.pmDec, self.rv])
else:
model = np.array([Y,X,Ydot,Xdot])
data = np.array([self.deltaRA, self.deltaDec, self.pmRA, self.pmDec])
chi2 = ComputeChi2(data,model)
if use_pm_cross_term:
chi2 -= ( 2 * (data[2][0] - model[2]) * (data[3][0] - model[3]) ) / (data[2][1] * data[3][1])
# add user astrometry if given:
if self.astrometry:
p = parameters.copy()
a,T,const,to,e,i,w,O,m1,dist = p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9]
chi2_astr = np.zeros(10000)
# Calculate predicted positions at astr observation dates for each orbit:
for j in range(self.astrometric_ra.shape[1]):
# for each date, compute XYZ for each 10000 trial orbit. We can
# skip scale and rotate because that was accomplished in the calc_OFTI call above.
X1,Y1,Z1,E1 = calc_XYZ(a,T,to,e,i,w,O,self.astrometric_dates[j])
# Place astrometry into data array where: data[0][0]=ra obs, data[0][1]=ra err, etc:
data = np.array([self.astrometric_ra[:,j], self.astrometric_dec[:,j]])
# place corresponding predicited positions at that date for each trial orbit:
model = np.array([Y1*1000,X1*1000])
# compute chi2 for trial orbits at that date and add to the total chi2 sum:
chi2_astr += ComputeChi2(data,model)
chi2 = chi2 + chi2_astr
# add user rv if given:
if self.use_user_rv:
p = parameters.copy()
a,T,const,to,e,i,w,O,m1,dist = p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9]
chi2_rv = np.zeros(10000)
for j in range(self.user_rv.shape[1]):
# compute ecc anomaly at that date:
X1,Y1,Z1,E1 = calc_XYZ(a,T,to,e,i,w,O,self.user_rv_dates[j])
# compute velocities at that ecc anom:
Xdot,Ydot,Zdot = calc_velocities(a,T,to,e,i,w,O,dist,E1)
# compute chi2:
chi2_rv += ComputeChi2(np.array([self.user_rv[:,j]]),np.array([Zdot]))
chi2 = chi2 + chi2_rv
# Accept/reject:
accepted, lnprob, lnrand = AcceptOrReject(chi2,self.chi_min)
if np.size(accepted) == 0:
pass
else:
# count num accepted
p = parameters.copy()
a,T,const,to,e,i,w,O,m1,dist = p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9]
sampleResults = calc_XYZ(a,T,to,e,i/180*np.pi,w/180*np.pi,O/180*np.pi,2016.0)
number_orbits_accepted += np.size(accepted)
parameters = np.concatenate((parameters,chi2[None,:],lnprob[None,:],lnrand[None,:]), axis = 0)
parameters=np.transpose(parameters)
k = open(self.results_filename, 'a')
for params in parameters[accepted]:
string = ' '.join([str(p) for p in params])
k.write(string + "\n")
k.close()
if np.nanmin(chi2) < self.chi_min:
# If there is a new min chi2:
self.chi_min = np.nanmin(chi2)
#print('found new chi min:',self.chi_min)
# re-evaluate to accept/reject with new chi_min:
if number_orbits_accepted != 0:
dat = np.loadtxt(open(self.results_filename,"r"),delimiter=' ',ndmin=2)
lnprob = -(dat[:,10]-self.chi_min)/2.0
dat[:,11] = lnprob
accepted_retest = np.where(lnprob > dat[:,12])
q = open(self.results_filename, 'w')
q.write(output_file_header + "\n")
for data in dat[accepted_retest]:
string = ' '.join([str(d) for d in data])
q.write(string + "\n")
q.close()
dat2 = np.loadtxt(open(self.results_filename,"r"),delimiter=' ',ndmin=2)
number_orbits_accepted=dat2.shape[0]
loop_count += 1
#print('loop count',loop_count)
update_progress(number_orbits_accepted,self.Norbits)
# one last accept/reject with final chi_min value:
dat = np.loadtxt(open(self.results_filename,"r"),delimiter=' ',ndmin=2)
lnprob = -(dat[:,10]-self.chi_min)/2.0
dat[:,11] = lnprob
accepted_retest = np.where(lnprob > dat[:,12])
q = open(self.results_filename, 'w')
q.write(output_file_header + "\n")
for data in dat[accepted_retest]:
string = ' '.join([str(d) for d in data])
q.write(string + "\n")
q.close()
# when finished, upload results and store in object:
dat = np.loadtxt(open(self.results_filename,"r"),delimiter=' ',ndmin=2)
number_orbits_accepted=dat.shape[0]
print('Final Norbits:', number_orbits_accepted)
# intialise results object and store accepted orbits:
if self.rv[0] != 0:
self.results = Results(orbits = dat, limit_lan = False, limit_aop = False)
else:
self.results = Results(orbits = dat, limit_lan = True, limit_aop = False)
self.results.Update(self.results.orbits)
# pickle dump the results attribute:
if self.write_results:
self.results.SaveResults(self.results_filename.replace(".txt", ".pkl"), write_text_file = False)
stop = tm.time()
self.results.run_time = (stop - start)*u.s
# compute stats and write to file:
self.results.stats = Stats(orbits = self.results.orbits, write_to_file = self.write_stats, filename = self.stats_filename)
class Results(object):
'''A class for storing and manipulating the results of the orbit fit.
Args:
orbits (Norbits x 13 array): array of accepted orbits from \
OFTI fit in the same order as the following attributes
sma (1 x Norbits array): semi-major axis in arcsec
period (1 x Norbits array): period in years
orbit_fraction (1 x Norbits array): fraction of orbit past periastron \
passage the observation (2016) occured on. Values: [0,1)
t0 (1 x Norbits array): date of periastron passage in decimal years
ecc (1 x Norbits array): eccentricity
inc (1 x Norbits array): inclination relative to plane of the sky in deg
aop (1 x Norbits array): arguement of periastron in deg
lan (1 x Norbits array): longitude of ascending node in deg
mtot (1 x Norbits array): total system mass in Msun
distance (1 x Norbits array): distance to system in parsecs
chi2 (1 x Norbits array): chi^2 value for the orbit
lnprob (1 x Norbits array): log probability of orbit
lnrand (1 x Norbits array): log of random "dice roll" for \
orbit acceptance
limit_aop, limit_lan (bool): In the absence of radial velocity info, \
there is a degeneracy between arg of periastron and long of ascending \
node. Common practice is to limit one to the interval [0,180] deg. \
By default, lofti limits lan to this interval if rv = False. The user can \
choose to limit aop instead by setting limit_aop = True, limit_lan = False. \
The orbits[:,6] (aop) and orbits[:,7] (lan) arrays preserve the original values. \
Written by <NAME>, 2020
'''
def __init__(self, orbits = [], limit_aop = False, limit_lan = True):
self.orbits = orbits
self.limit_lan = limit_lan
self.limit_aop = limit_aop
def Update(self, orbits):
'''Take elements of the "orbits" attribute and populate
the orbital element attributes
Args:
orbits (arr): orbits array from Results class
Written by <NAME>, 2020
'''
self.sma = orbits[:,0]
self.period = orbits[:,1]
self.orbit_fraction = orbits[:,2]
self.t0 = orbits[:,3]
self.ecc = orbits[:,4]
self.inc = orbits[:,5]
self.aop = orbits[:,6]
if self.limit_aop:
self.aop = limit_to_180deg(self.aop)
self.lan = orbits[:,7] % 360
if self.limit_lan:
self.lan = limit_to_180deg(self.lan)
self.mtot = orbits[:,8]
self.distance = orbits[:,9]
self.chi2 = orbits[:,10]
self.lnprob = orbits[:,11]
self.lnrand = orbits[:,12]
def SaveResults(self, filename, write_text_file = False, text_filename = None):
'''Save the orbits and orbital parameters attributes in a pickle file
Args:
filename (str): filename for pickle file
write_text_file (bool): if True, also write out the accepted orbits to a \
human readable text file
text_filename (bool): if write_to_text = True, specifify filename for text file
Written by <NAME>, 2020
'''
pickle.dump(self, open( filename, "wb" ) )
# write results to file:
if write_text_file:
k = open(text_filename, 'a')
for params in self.orbits:
string = ' '.join([str(p) for p in params])
k.write(string + "\n")
k.close()
def LoadResults(self, filename, append = False):
'''Read in the orbits and orbital parameters attributes from a pickle file
Args:
filename (str): filename of pickle file to load
append (bool): if True, append read in orbit samples to another Results \
object. Default = False.
Written by <NAME>, 2020
'''
results_in = pickle.load( open( filename, "rb" ) )
if append == False:
self.orbits = results_in.orbits
self.Update(self.orbits)
else:
self.orbits = np.vstack((self.orbits,results_in.orbits))
self.Update(self.orbits)
# plotting results:
def PlotHists(self):
'''Plot 1-d histograms of orbital elements 'sma','ecc','inc','aop','lan','t0' from fit results.
Written by <NAME>, 2020
'''
if len(self.sma < 50):
bins = 50
else:
bins = 'fd'
fig = plt.figure(figsize=(30, 5.5))
params = np.array([self.sma,self.ecc,self.inc,self.aop,self.lan,self.t0])
names = np.array(['sma','ecc','inc','aop','lan','t0'])
for i in range(len(params)):
ax = plt.subplot2grid((1,len(params)), (0,i))
plt.hist(params[i],bins=bins,edgecolor='none',alpha=0.8)
plt.tick_params(axis='both', left=False, top=False, right=False, bottom=True, \
labelleft=False, labeltop=False, labelright=False, labelbottom=True)
plt.xticks(rotation=45, fontsize = 20)
plt.xlabel(names[i], fontsize = 25)
plt.tight_layout()
return fig
def PlotOrbits(self, color = True, colorbar = True, ref_epoch = 2016.0, size = 100, plot3d = False, cmap = 'viridis',xlim=False,ylim=False):
'''Plot a random selection of orbits from the sample in the plane of the sky.
Args:
color (bool): if True, plot orbit tracks using a colormap scale to orbit fraction (phase) \
past observation date (2015.5). If False, orbit tracks will be black. Default = True
colorbar (bool): if True and color = True, plot colorbar for orbit phase
ref_epoch (flt): reference epoch for drawing orbits. Default = 2015.5
size (int): Number of orbits to plot. Default = True
plot3d (bool): If True, return a plot of orbits in 3D space. Default = False
cmap (str): colormap for orbit phase plot
Written by <NAME>, 2020
'''
# Random selection of orbits to plot:
if len(self.sma) > size:
# if there are more orbits than desired size, randomly select orbits from
# the posterior sample:
ind = np.random.choice(range(0,len(self.sma)),replace=False,size=size)
else:
# if there are fewer orbits than desired size, take all of them:
ind = np.random.choice(range(0,len(self.sma)),replace=False,size=len(self.sma))
from numpy import tan, arctan, sqrt, cos, sin, arccos
# label for colormap axis:
colorlabel = 'Phase'
# create figure:
fig = plt.figure(figsize = (7.5, 6.))
plt.grid(ls=':')
# invert X axis for RA:
plt.gca().invert_xaxis()
if plot3d:
# Make 3d axis object:
ax = fig.add_subplot(111, projection='3d')
# plot central star:
ax.scatter(0,0,0,color='orange',marker='*',s=300,zorder=10)
ax.set_zlabel('Z (")',fontsize=20)
else:
# plot central star:
plt.scatter(0,0,color='orange',marker='*',s=300,zorder=10)
# For each orbit in the random selection from the posterior samples:
for a,T,to,e,i,w,O in zip(self.sma[ind],self.period[ind],self.t0[ind],self.ecc[ind],np.radians(self.inc[ind]),\
np.radians(self.aop[ind]),np.radians(self.lan[ind])):
# define an array of times along orbit:
times = np.linspace(ref_epoch,ref_epoch+T,5000)
X,Y,Z = np.array([]),np.array([]),np.array([])
E = np.array([])
# Compute X,Y,Z positions for each time:
for t in times:
n = (2*np.pi)/T
M = n*(t-to)
nextE = [danby_solve(eccentricity_anomaly, varM,vare, 0.001) for varM,vare in zip([M],[e])]
E = np.append(E,nextE)
r1 = a*(1.-e*cos(E))
f1 = sqrt(1.+e)*sin(E/2.)
f2 = sqrt(1.-e)*cos(E/2.)
f = 2.*np.arctan2(f1,f2)
r = (a*(1.-e**2))/(1.+(e*cos(f)))
X1 = r * ( cos(O)*cos(w+f) - sin(O)*sin(w+f)*cos(i) )
Y1 = r * ( sin(O)*cos(w+f) + cos(O)*sin(w+f)*cos(i) )
Z1 = r * sin(w+f) * sin(i)
X,Y,Z = np.append(X,X1),np.append(Y,Y1),np.append(Z,Z1)
# Plot the X,Y(Z) positions:
if not plot3d:
if color:
plt.scatter(Y,X,c=((times-ref_epoch)/T),cmap=cmap,s=3,lw=0)
plt.gca().set_aspect('equal', adjustable='datalim')
else:
plt.plot(Y,X, color='black',alpha=0.3)
plt.gca().set_aspect('equal', adjustable='datalim')
if plot3d:
from mpl_toolkits.mplot3d import Axes3D
if color:
ax.scatter(Y,X,Z,c=((times-ref_epoch)/T),cmap=cmap,s=3,lw=0)
else:
ax.plot(Y,X,Z, color='black',alpha=0.3)
# plot colorbar:
if not plot3d:
if color:
if colorbar == True:
cb = plt.colorbar().set_label(colorlabel, fontsize=20)
plt.gca().tick_params(labelsize=14)
plt.ylabel('Dec (")',fontsize=20)
plt.xlabel('RA (")',fontsize=20)
plt.gca().tick_params(labelsize=14)
if(xlim):
plt.xlim(xlim)
if(ylim):
plt.ylim(ylim)
return fig
def PlotSepPA(self, ref_epoch = 2016.0, size = 100, timespan = [20,20], orbitcolor = 'skyblue'):
'''Plot a random selection of orbits from the sample in separation and position angle as
a function of time.
Args:
ref_epoch (flt): reference epoch for drawing orbits. Default = 2015.5
size (int): Number of orbits to plot. Default = True
timespan (tuple, int): number of years before [0] and after [1] the ref epoch to \
plot sep and pa
orbitcolor (str): color to use to plot the orbits
Written by <NAME>, 2020
'''
# Random selection of orbits to plot:
if len(self.sma) > size:
# if there are more orbits than desired size, randomly select orbits from
# the posterior sample:
ind = np.random.choice(range(0,len(self.sma)),replace=False,size=size)
else:
# if there are fewer orbits than desired size, take all of them:
ind = np.random.choice(range(0,len(self.sma)),replace=False,size=len(self.sma))
from numpy import tan, arctan, sqrt, cos, sin, arccos
# make figure
fig = plt.figure(figsize = (8, 10))
# define subplots:
plt.subplot(2,1,1)
plt.gca().tick_params(labelsize=14)
plt.grid(ls=':')
# define times to compute sep/pa:
tmin,tmax = ref_epoch - timespan[0],ref_epoch + timespan[1]
t = np.linspace(tmin,tmax,2000)
date_ticks = np.arange(tmin,tmax,10)
# for each selected orbit from the sample:
for a,T,to,e,i,w,O in zip(self.sma[ind],self.period[ind],self.t0[ind],self.ecc[ind],np.radians(self.inc[ind]),\
np.radians(self.aop[ind]),np.radians(self.lan[ind])):
X = np.array([])
Y = np.array([])
# compute X,Y at each time point:
X1,Y1 = orbits_for_plotting(a,T,to,e,i,w,O,t)
X = np.append(X, X1)
Y = np.append(Y,Y1)
# compute sep:
r=np.sqrt((X**2)+(Y**2))
# plot sep in mas:
plt.plot(t,r*1000,color=orbitcolor,alpha=0.5)
plt.ylabel(r'$\rho$ (mas)',fontsize=20)
# next suplot:
plt.subplot(2,1,2)
plt.grid(ls=':')
# for each selected orbit from the sample:
for a,T,to,e,i,w,O in zip(self.sma[ind],self.period[ind],self.t0[ind],self.ecc[ind],np.radians(self.inc[ind]),\
np.radians(self.aop[ind]),np.radians(self.lan[ind])):
X = np.array([])
Y = np.array([])
X1,Y1 = orbits_for_plotting(a,T,to,e,i,w,O,t)
X = np.append(X, X1)
Y = np.append(Y,Y1)
# compute pa:
theta=np.arctan2(X,-Y)
theta=(np.degrees(theta)+270.)%360
# plot it:
plt.plot(t,theta,color=orbitcolor,alpha=0.5)
plt.ylabel(r'P.A. (deg)',fontsize=19)
plt.xlabel('Years',fontsize=19)
plt.gca().tick_params(labelsize=14)
plt.tight_layout()
return fig
class Stats(object):
'''A class for storing and manipulating the statistics of the results of the orbit fit.
For every parameter, there is a series of stats computed and saved as stats.param.stat
Examples:
stats.sma.mean = mean of semimajor axis
stats.ecc.ci68 = 68% confidence interval for eccentricity
stats.aop.std = standard deviation of arg of periastron
Args:
orbits (Norbits x 13 array): array of accepted orbits from \
OFTI fit in the same order as the following attributes
param.mean (flt): mean of parameter computed using np.mean
param.median (flt): np.median of parameter
param.mode (flt): mode of parameter
param.std (flt): standard deviation from np.std
param.ci68 (tuple,flt): 68% minimum credible interval of form (lower bound, upper bound)
param.ci95 (tuple,flt): 95% minimum credible interval
write_to_file (bool): If True, write stats to a human-readbale text file.
filename (str): filename for saving stats file. If not supplied, default \
name is FitResults.Stats.y.mo.d.h.m.s.pkl, saved in same directory as fit was run.
Written by <NAME>, 2020
'''
def __init__(self, orbits = [], write_to_file = False, filename = None):
self.orbits = orbits
# Compute stats on parameter arrays and save as attributes:
self.sma = StatsSubclass(self.orbits[:,0])
self.period = StatsSubclass(self.orbits[:,1])
self.orbit_fraction = StatsSubclass(self.orbits[:,2])
self.t0 = StatsSubclass(self.orbits[:,3])
self.ecc = StatsSubclass(self.orbits[:,4])
self.inc = StatsSubclass(self.orbits[:,5])
self.aop = StatsSubclass(self.orbits[:,6])
self.lan = StatsSubclass(self.orbits[:,7])
self.mtot = StatsSubclass(self.orbits[:,8])
self.distance = StatsSubclass(self.orbits[:,9])
if write_to_file:
params = np.array([self.sma,self.period,self.orbit_fraction,self.t0,self.ecc,self.inc,\
self.aop,self.lan,self.mtot,self.distance])
names = np.array(['sma','period','orbit fraction','t0','ecc','inc','aop','lan','mtot','distance'])
if not filename:
filename = 'FitResults.Stats.'+time.strftime("%Y.%m.%d.%H.%M.%S")+'.txt'
k = open(filename, 'w')
string = 'Parameter Mean Median Mode Std 68% Min Cred Int 95% Min Cred Int'
k.write(string + "\n")
for i in range(len(params)):
string = make_parameter_string(params[i],names[i])
k.write(string + "\n")
k.close()
class StatsSubclass(Stats):
'''Subclass for computing and storing statistics
Args:
array (arr): array for which to compute statistics
'''
def __init__(self, array):
self.mean,self.median,self.mode,self.std,self.ci68,self.ci95 = compute_statistics(array)
| [
1,
1053,
8717,
14441,
29889,
348,
1169,
408,
318,
13,
5215,
12655,
408,
7442,
13,
3166,
658,
615,
29875,
29918,
3249,
423,
29889,
417,
615,
277,
8789,
1053,
334,
13,
3166,
658,
615,
29875,
29918,
3249,
423,
29889,
29883,
6678,
29879,
1053,
22235,
29949,
7818,
29902,
29918,
29907,
13,
29937,
3166,
658,
615,
277,
8789,
1053,
334,
13,
5215,
5839,
280,
13,
5215,
931,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
29937,
10186,
307,
1972,
8026,
777,
18116,
591,
508,
11455,
29901,
13,
5215,
18116,
13,
25442,
886,
29889,
4572,
25442,
886,
703,
17281,
1159,
13,
13,
12008,
4013,
3883,
4017,
267,
20398,
515,
10415,
423,
382,
8353,
29941,
313,
29954,
29874,
423,
26900,
29906,
338,
884,
3625,
408,
263,
16723,
2984,
29897,
322,
6057,
1549,
278,
11247,
7818,
29902,
10415,
423,
29914,
29949,
7818,
29902,
29871,
13,
8157,
14781,
279,
7581,
16980,
28221,
11043,
29889,
13,
12008,
13,
13,
1990,
383,
5171,
29898,
3318,
1125,
13,
1678,
14550,
6644,
6646,
278,
383,
5171,
1203,
363,
278,
7581,
1788,
29892,
322,
10272,
5820,
1288,
11938,
29871,
13,
1678,
304,
367,
1304,
297,
278,
16980,
6216,
29889,
29871,
4911,
1818,
3867,
10415,
423,
2752,
18999,
29892,
5291,
2701,
310,
4158,
21875,
363,
29871,
13,
1678,
1716,
3618,
29892,
6084,
278,
1353,
310,
7429,
470,
14836,
297,
13446,
4559,
29889,
29871,
383,
277,
674,
367,
13,
1678,
363,
1203,
29871,
29906,
6198,
304,
1203,
29871,
29896,
29889,
13,
13,
1678,
6212,
5026,
526,
5291,
2701,
310,
313,
1767,
29892,
4661,
13946,
1017,
29897,
6521,
6467,
18694,
29889,
29871,
6212,
5026,
13,
1678,
411,
8717,
14441,
10340,
526,
27387,
515,
10415,
423,
18871,
29892,
8393,
1728,
10340,
526,
13,
1678,
15712,
515,
10415,
423,
1819,
29889,
29871,
2178,
6198,
1819,
526,
363,
1203,
29871,
29906,
6198,
304,
1203,
29871,
29896,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
2752,
333,
29896,
29892,
2752,
333,
29906,
313,
524,
1125,
10415,
423,
2752,
18999,
363,
278,
1023,
3618,
29892,
6216,
674,
367,
363,
10884,
310,
320,
13,
9651,
1203,
29871,
29906,
6198,
304,
1203,
29871,
29896,
13,
4706,
4158,
29896,
29892,
4158,
29906,
313,
23583,
29892,
1652,
29873,
1125,
18761,
2897,
4158,
12678,
363,
1203,
29871,
29896,
322,
29871,
29906,
29892,
310,
278,
883,
313,
1767,
29892,
25812,
29897,
13,
4706,
4186,
14836,
313,
524,
1125,
9681,
310,
7429,
470,
14836,
297,
13446,
4559,
29889,
29871,
13109,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
13,
4706,
2582,
29918,
9507,
313,
710,
1125,
2514,
3871,
363,
6216,
2582,
2066,
29889,
29871,
960,
5642,
29892,
2582,
674,
367,
3971,
304,
2066,
320,
13,
9651,
4257,
383,
277,
12191,
29889,
4316,
29889,
4346,
29889,
3250,
29889,
1092,
29889,
1195,
29889,
29879,
13,
4706,
8717,
456,
27184,
313,
8977,
1125,
4911,
29899,
19303,
2957,
8717,
456,
300,
2200,
20398,
29889,
19928,
367,
8600,
470,
1591,
470,
11701,
12205,
411,
29905,
13,
9651,
1897,
2983,
376,
19570,
29892,
344,
546,
29878,
29892,
3274,
29892,
3274,
3127,
29892,
15190,
29908,
470,
376,
336,
29892,
336,
3127,
29892,
7099,
29892,
311,
2265,
29878,
29892,
15190,
1642,
2610,
367,
1021,
408,
278,
364,
29894,
1591,
29889,
320,
13,
9651,
29639,
29892,
19471,
4717,
29892,
322,
19471,
2287,
29907,
1818,
367,
297,
15232,
23128,
29892,
17687,
297,
14496,
29892,
10116,
297,
13677,
2440,
29889,
320,
13,
9651,
13109,
353,
6213,
13,
4706,
1404,
29918,
15291,
313,
8977,
1125,
4911,
29899,
19303,
2957,
28373,
12885,
20398,
29889,
19928,
367,
8600,
470,
1591,
470,
11701,
12205,
411,
29905,
13,
9651,
1897,
2983,
376,
15291,
29892,
29878,
369,
29878,
29892,
15291,
29918,
15190,
1642,
2610,
367,
1021,
408,
278,
8717,
456,
27184,
1591,
29889,
13109,
353,
6213,
29889,
13,
4706,
16653,
313,
710,
1125,
1024,
310,
10415,
423,
16653,
304,
2346,
29889,
13109,
353,
525,
3249,
423,
287,
29878,
29941,
29889,
3249,
423,
29918,
4993,
29915,
29871,
13,
4706,
5796,
705,
29896,
29892,
5796,
705,
29906,
313,
1579,
29873,
1125,
390,
29965,
8851,
995,
515,
10415,
423,
18871,
13,
4706,
2143,
29918,
1022,
2878,
313,
1579,
29873,
1125,
3407,
21502,
305,
297,
13677,
2440,
29889,
1152,
10415,
423,
26900,
29906,
445,
338,
29871,
29906,
29900,
29896,
29945,
29889,
29945,
29892,
363,
10415,
423,
382,
8353,
29941,
372,
338,
29871,
29906,
29900,
29896,
29953,
29889,
29900,
13,
4706,
715,
29916,
29896,
29892,
715,
29916,
29906,
313,
1579,
29873,
1125,
610,
9864,
29916,
515,
10415,
423,
297,
5516,
13,
4706,
18865,
29896,
29892,
18865,
29906,
313,
1579,
29873,
1125,
1492,
12066,
2673,
515,
10415,
423,
29936,
18865,
297,
3587,
29892,
25812,
297,
5516,
13,
4706,
3826,
29896,
29892,
3826,
29906,
313,
1579,
29873,
1125,
4845,
3381,
515,
10415,
423,
29936,
3826,
297,
3587,
29892,
25812,
297,
5516,
13,
4706,
26354,
4717,
29896,
29892,
26354,
4717,
29906,
313,
1579,
29873,
1125,
1571,
10884,
297,
18865,
297,
5516,
343,
29878,
21583,
29896,
515,
10415,
423,
13,
4706,
26354,
6185,
29896,
29892,
26354,
6185,
29906,
313,
1579,
29873,
1125,
1571,
10884,
297,
5012,
29907,
297,
5516,
343,
29878,
21583,
29896,
515,
10415,
423,
13,
4706,
364,
29894,
29896,
29892,
364,
29894,
29906,
313,
1579,
29873,
29892,
13136,
1125,
28373,
12885,
297,
2383,
269,
21583,
29896,
515,
10415,
423,
13,
4706,
364,
29894,
313,
1579,
29873,
29892,
13136,
1125,
6198,
390,
29963,
310,
29871,
29906,
6198,
304,
29871,
29896,
29892,
565,
1716,
526,
2198,
297,
10415,
423,
13,
4706,
715,
29916,
313,
1579,
29873,
1125,
7688,
287,
2099,
610,
9864,
29916,
363,
278,
7581,
1788,
297,
5516,
13,
4706,
5418,
313,
1579,
29873,
1125,
5418,
310,
1788,
297,
22844,
29892,
15712,
515,
10415,
423,
610,
9864,
29916,
773,
1158,
320,
13,
9651,
310,
350,
737,
261,
29899,
29967,
2873,
634,
29889,
394,
29871,
29906,
29900,
29896,
29947,
29889,
13,
4706,
19471,
4717,
29892,
19471,
6185,
313,
1579,
29873,
1125,
6198,
23683,
297,
18865,
322,
3826,
18112,
29892,
297,
5516,
13,
4706,
26354,
4717,
29892,
26354,
6185,
313,
1579,
29873,
1125,
6198,
1571,
10884,
297,
18865,
29914,
6185,
18112,
297,
2383,
269,
21583,
29896,
13,
4706,
16345,
313,
1579,
29873,
1125,
3001,
23683,
4608,
297,
5516,
13,
4706,
3300,
313,
1579,
29873,
1125,
1400,
291,
10696,
310,
23683,
4608,
297,
14496,
515,
4644,
13,
4706,
16345,
29918,
585,
313,
1579,
29873,
1125,
23683,
297,
319,
29965,
13,
4706,
16345,
29918,
8848,
313,
1579,
29873,
1125,
23683,
297,
2383,
13,
4706,
3001,
29918,
955,
313,
1579,
29873,
1125,
3001,
12885,
4608,
297,
2383,
269,
21583,
29896,
29889,
29871,
960,
390,
29963,
338,
3625,
363,
1716,
29892,
320,
13,
9651,
445,
338,
278,
29871,
29941,
29881,
12885,
4608,
29936,
565,
451,
372,
338,
925,
278,
10694,
310,
14744,
12885,
29889,
29871,
13,
4706,
3001,
29918,
22116,
974,
7912,
29918,
955,
313,
1579,
29873,
1125,
3001,
12885,
297,
278,
10694,
310,
14744,
297,
2383,
269,
21583,
29896,
29889,
320,
13,
9651,
512,
278,
18070,
310,
390,
29963,
445,
338,
7126,
304,
278,
3001,
12885,
4608,
29889,
13,
4706,
19471,
29954,
11082,
313,
1579,
29873,
1125,
6198,
12814,
297,
10415,
423,
402,
18497,
29889,
29871,
5538,
451,
3160,
25812,
29889,
13,
4706,
4414,
403,
1184,
546,
6720,
12757,
2392,
313,
1579,
29873,
1125,
385,
13136,
7329,
304,
15065,
277,
17632,
2322,
10364,
423,
1571,
10884,
1059,
491,
29889,
13,
13,
1678,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2752,
333,
29896,
29892,
2752,
333,
29906,
29892,
4158,
29896,
29892,
4158,
29906,
29892,
4186,
14836,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29892,
320,
13,
4706,
2582,
29918,
9507,
353,
6213,
29892,
29871,
13,
4706,
8717,
456,
27184,
353,
6213,
29892,
13,
4706,
1404,
29918,
15291,
353,
6213,
29892,
13,
4706,
16653,
353,
525,
3249,
423,
287,
29878,
29941,
29889,
3249,
423,
29918,
4993,
742,
13,
4706,
4414,
403,
1184,
546,
29924,
8194,
2392,
29922,
29896,
13,
308,
1125,
13,
308,
13,
4706,
1583,
29889,
4993,
333,
29896,
353,
2752,
333,
29896,
13,
4706,
1583,
29889,
4993,
333,
29906,
353,
2752,
333,
29906,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
25379,
29896,
353,
4158,
29896,
29961,
29900,
29962,
13,
9651,
1583,
29889,
25379,
29896,
3127,
353,
4158,
29896,
29961,
29896,
29962,
13,
9651,
1583,
29889,
25379,
29906,
353,
4158,
29906,
29961,
29900,
29962,
13,
9651,
1583,
29889,
25379,
29906,
3127,
353,
4158,
29906,
29961,
29896,
29962,
13,
9651,
1583,
29889,
29885,
4260,
353,
518,
1311,
29889,
25379,
29896,
718,
1583,
29889,
25379,
29906,
29892,
7442,
29889,
3676,
3552,
1311,
29889,
25379,
29896,
3127,
1068,
29906,
29897,
718,
313,
1311,
29889,
25379,
29906,
3127,
1068,
29906,
28166,
13,
4706,
5174,
29901,
13,
9651,
12020,
7865,
2392,
877,
29924,
465,
267,
1818,
367,
5291,
2701,
310,
313,
1767,
29892,
2704,
511,
429,
29901,
4158,
29896,
353,
313,
29896,
29889,
29900,
29892,
29900,
29889,
29900,
29945,
29897,
1495,
13,
4706,
1583,
29889,
29940,
11831,
1169,
353,
4186,
14836,
13,
4706,
565,
451,
2582,
29918,
9507,
29901,
13,
9651,
1583,
29889,
9902,
29918,
9507,
353,
525,
29943,
277,
12191,
6169,
29974,
2230,
29889,
710,
615,
603,
11702,
29979,
29889,
29995,
29885,
29889,
29995,
29881,
29889,
29995,
29950,
29889,
29995,
29924,
29889,
29995,
29903,
1159,
29974,
4286,
3945,
29915,
13,
9651,
1583,
29889,
16202,
29918,
9507,
353,
525,
29943,
277,
12191,
29889,
25060,
6169,
29974,
2230,
29889,
710,
615,
603,
11702,
29979,
29889,
29995,
29885,
29889,
29995,
29881,
29889,
29995,
29950,
29889,
29995,
29924,
29889,
29995,
29903,
1159,
29974,
4286,
3945,
29915,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
9902,
29918,
9507,
353,
2582,
29918,
9507,
13,
9651,
1583,
29889,
16202,
29918,
9507,
353,
2582,
29918,
9507,
29974,
4286,
25060,
29889,
3945,
29915,
13,
13,
4706,
1583,
29889,
579,
456,
27184,
353,
7700,
13,
4706,
396,
1423,
565,
1404,
19056,
8717,
456,
27184,
29901,
13,
4706,
565,
8717,
456,
27184,
338,
451,
6213,
29901,
13,
9651,
396,
565,
577,
29892,
731,
8717,
456,
300,
2200,
7353,
304,
5852,
29901,
13,
9651,
1583,
29889,
579,
456,
27184,
353,
5852,
13,
9651,
396,
3787,
15500,
10116,
29901,
13,
9651,
1583,
29889,
579,
456,
300,
2200,
29918,
15190,
353,
8717,
456,
27184,
1839,
15190,
2033,
13,
9651,
396,
565,
297,
16345,
29914,
3274,
29892,
3588,
304,
1153,
29914,
7099,
29901,
13,
9651,
565,
525,
19570,
29915,
297,
8717,
456,
27184,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
29132,
29918,
336,
353,
518,
7185,
371,
8179,
417,
3112,
4197,
579,
456,
27184,
1839,
19570,
2033,
29961,
29875,
1402,
579,
456,
27184,
1839,
344,
546,
29878,
2033,
29961,
29875,
24960,
334,
320,
13,
462,
4706,
7442,
29889,
5223,
29898,
9302,
29889,
3665,
5834,
29898,
7185,
371,
8179,
417,
3112,
4197,
579,
456,
27184,
1839,
3274,
2033,
29961,
29875,
1402,
579,
456,
27184,
1839,
3274,
3127,
2033,
29961,
29875,
5262,
4961,
320,
13,
462,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
29962,
13,
462,
1678,
29132,
29918,
7099,
353,
518,
7185,
371,
8179,
417,
3112,
4197,
579,
456,
27184,
1839,
19570,
2033,
29961,
29875,
1402,
579,
456,
27184,
1839,
344,
546,
29878,
2033,
29961,
29875,
24960,
334,
320,
13,
462,
4706,
7442,
29889,
3944,
29898,
9302,
29889,
3665,
5834,
29898,
7185,
371,
8179,
417,
3112,
4197,
579,
456,
27184,
1839,
3274,
2033,
29961,
29875,
1402,
579,
456,
27184,
1839,
3274,
3127,
2033,
29961,
29875,
5262,
4961,
320,
13,
462,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
29962,
13,
13,
462,
1678,
1583,
29889,
579,
456,
300,
2200,
29918,
336,
353,
7442,
29889,
2378,
4197,
13,
462,
4706,
518,
9302,
29889,
12676,
29898,
7614,
29918,
336,
29961,
29875,
2314,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
1402,
13,
462,
4706,
518,
9302,
29889,
4172,
29898,
7614,
29918,
336,
29961,
29875,
2314,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
29962,
13,
462,
308,
2314,
13,
462,
1678,
1583,
29889,
579,
456,
300,
2200,
29918,
7099,
353,
7442,
29889,
2378,
4197,
13,
462,
4706,
518,
9302,
29889,
12676,
29898,
7614,
29918,
7099,
29961,
29875,
2314,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
1402,
13,
462,
4706,
518,
9302,
29889,
4172,
29898,
7614,
29918,
7099,
29961,
29875,
2314,
363,
474,
297,
3464,
29898,
2435,
29898,
579,
456,
27184,
1839,
19570,
25901,
29962,
13,
462,
308,
2314,
13,
18884,
5174,
29901,
13,
462,
1678,
12020,
7865,
2392,
877,
29909,
303,
456,
27184,
6611,
451,
14831,
29889,
3529,
3867,
8600,
470,
1591,
470,
11701,
12205,
411,
29905,
13,
462,
268,
1897,
2983,
376,
19570,
29892,
344,
546,
29878,
29892,
3274,
29892,
3274,
3127,
29892,
15190,
29908,
470,
376,
336,
29892,
336,
3127,
29892,
7099,
29892,
311,
2265,
29878,
29892,
15190,
29908,
1495,
13,
9651,
25342,
525,
336,
29915,
297,
8717,
456,
27184,
29901,
13,
18884,
396,
1683,
3787,
278,
1153,
29914,
7099,
408,
8393,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1583,
29889,
579,
456,
300,
2200,
29918,
336,
353,
7442,
29889,
2378,
4197,
579,
456,
27184,
1839,
336,
7464,
8717,
456,
27184,
1839,
336,
3127,
2033,
2314,
13,
462,
1678,
1583,
29889,
579,
456,
300,
2200,
29918,
7099,
353,
7442,
29889,
2378,
4197,
579,
456,
27184,
1839,
7099,
7464,
8717,
456,
27184,
1839,
311,
2265,
29878,
2033,
2314,
13,
18884,
5174,
29901,
13,
462,
1678,
12020,
7865,
2392,
877,
29909,
303,
456,
27184,
6611,
451,
14831,
29889,
3529,
3867,
8600,
470,
1591,
470,
11701,
12205,
411,
29905,
13,
462,
268,
1897,
2983,
376,
19570,
29892,
344,
546,
29878,
29892,
3274,
29892,
3274,
3127,
29892,
15190,
29908,
470,
376,
336,
29892,
336,
3127,
29892,
7099,
29892,
311,
2265,
29878,
29892,
15190,
29908,
1495,
13,
9651,
1683,
29901,
13,
18884,
12020,
7865,
2392,
877,
29909,
303,
456,
27184,
6611,
451,
14831,
29889,
3529,
3867,
8600,
470,
1591,
470,
11701,
12205,
411,
29905,
13,
462,
268,
1897,
2983,
376,
19570,
29892,
344,
546,
29878,
29892,
3274,
29892,
3274,
3127,
29892,
15190,
29908,
470,
376,
336,
29892,
336,
3127,
29892,
7099,
29892,
311,
2265,
29878,
29892,
15190,
29908,
1495,
13,
13,
4706,
396,
5399,
565,
1404,
19056,
364,
29894,
29901,
13,
4706,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
353,
7700,
13,
4706,
565,
1404,
29918,
15291,
338,
451,
6213,
29901,
13,
9651,
396,
731,
1404,
364,
29894,
7353,
304,
1565,
29901,
13,
9651,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
353,
5852,
13,
9651,
1018,
29901,
13,
18884,
396,
731,
8393,
29936,
22932,
364,
29894,
491,
448,
29896,
2861,
304,
4328,
297,
14821,
6757,
29901,
13,
18884,
1583,
29889,
1792,
29918,
15291,
353,
7442,
29889,
2378,
4197,
1792,
29918,
15291,
1839,
15291,
2033,
29930,
29899,
29896,
29892,
1792,
29918,
15291,
1839,
29878,
369,
29878,
2033,
2314,
13,
18884,
1583,
29889,
1792,
29918,
15291,
29918,
15190,
353,
7442,
29889,
2378,
29898,
1792,
29918,
15291,
1839,
15291,
29918,
15190,
11287,
13,
9651,
5174,
29901,
13,
18884,
12020,
7865,
2392,
877,
29934,
29963,
6611,
451,
14831,
29889,
29871,
3529,
671,
1897,
2983,
376,
15291,
29892,
29878,
369,
29878,
29892,
15291,
29918,
15190,
29908,
1495,
13,
4706,
1583,
29889,
28045,
353,
16653,
13,
13,
4706,
396,
3617,
10415,
423,
20398,
29892,
10272,
4312,
11938,
29892,
322,
788,
304,
1203,
29901,
13,
4706,
1583,
29889,
29925,
3445,
598,
27427,
29898,
28045,
29922,
1311,
29889,
28045,
29892,
26512,
29943,
7168,
29922,
26512,
1184,
546,
29924,
8194,
2392,
29897,
13,
268,
13,
1678,
822,
1226,
29878,
29941,
1762,
2965,
29934,
29943,
29898,
1311,
29892,
3358,
336,
29892,
3358,
7099,
29892,
336,
29892,
7099,
29892,
29954,
1125,
13,
4706,
14550,
28518,
29879,
363,
4768,
2129,
297,
1571,
10884,
29889,
450,
740,
338,
515,
2045,
597,
279,
26560,
29889,
990,
29914,
5140,
29914,
29906,
29896,
29900,
29941,
29889,
29900,
29955,
29946,
29941,
29906,
29889,
5140,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
26354,
336,
29892,
3358,
7099,
313,
7411,
1125,
1571,
10884,
13,
9651,
1153,
29892,
1602,
313,
7411,
1125,
1492,
12066,
2673,
322,
4845,
3381,
13,
9651,
402,
313,
7411,
1125,
402,
18497,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29896,
13,
4706,
14550,
13,
4706,
565,
402,
18572,
29896,
29941,
29901,
13,
9651,
736,
26354,
336,
1919,
26354,
7099,
13,
4706,
1053,
12655,
408,
7442,
13,
4706,
822,
3937,
29898,
29916,
1125,
13,
9651,
736,
7442,
29889,
5223,
29898,
9302,
29889,
3665,
5834,
29898,
29916,
876,
13,
4706,
822,
6776,
29881,
29898,
29916,
1125,
13,
9651,
736,
7442,
29889,
3944,
29898,
9302,
29889,
3665,
5834,
29898,
29916,
876,
13,
4706,
1591,
29896,
13776,
29908,
13,
308,
29900,
29889,
29900,
29871,
29929,
29889,
29900,
29871,
29929,
29889,
29900,
29871,
29929,
29889,
29945,
29871,
29929,
29889,
29945,
29871,
29896,
29900,
29889,
29900,
29871,
29896,
29900,
29889,
29900,
29871,
29896,
29900,
29889,
29945,
29871,
29896,
29900,
29889,
29945,
29871,
29896,
29896,
29889,
29900,
29871,
29896,
29896,
29889,
29900,
29871,
29896,
29896,
29889,
29945,
29871,
29896,
29896,
29889,
29945,
29871,
29896,
29896,
29889,
29955,
29945,
29871,
29896,
29896,
29889,
29955,
29945,
29871,
29896,
29906,
29889,
29900,
29871,
29896,
29906,
29889,
29900,
29871,
29896,
29906,
29889,
29906,
29945,
29871,
29896,
29906,
29889,
29906,
29945,
29871,
29896,
29906,
29889,
29945,
29871,
29896,
29906,
29889,
29945,
29871,
29896,
29906,
29889,
29955,
29945,
29871,
29896,
29906,
29889,
29955,
29945,
29871,
29896,
29941,
29889,
29900,
13,
308,
29896,
29947,
29889,
29946,
29871,
29941,
29941,
29889,
29947,
448,
29896,
29896,
29889,
29941,
29871,
29896,
29946,
29889,
29900,
29871,
29941,
29900,
29889,
29955,
448,
29896,
29929,
29889,
29946,
29871,
29896,
29906,
29889,
29947,
29871,
29941,
29896,
29889,
29946,
448,
29896,
29896,
29889,
29947,
29871,
29896,
29941,
29889,
29953,
29871,
29941,
29945,
29889,
29955,
448,
29896,
29900,
29889,
29945,
29871,
29896,
29953,
29889,
29906,
29871,
29945,
29900,
29889,
29900,
29871,
29906,
29889,
29896,
29871,
29896,
29929,
29889,
29946,
29871,
29945,
29929,
29889,
29929,
29871,
29900,
29889,
29906,
29871,
29906,
29896,
29889,
29947,
29871,
29953,
29946,
29889,
29906,
29871,
29896,
29889,
29900,
29871,
29896,
29955,
29889,
29955,
29871,
29953,
29945,
29889,
29953,
448,
29896,
29889,
29929,
29871,
29906,
29896,
29889,
29941,
29871,
29955,
29946,
29889,
29947,
29871,
29906,
29889,
29896,
29871,
29906,
29945,
29889,
29955,
29871,
29955,
29941,
29889,
29953,
29871,
29896,
29889,
29900,
29871,
29906,
29955,
29889,
29941,
29871,
29955,
29953,
29889,
29953,
29871,
29900,
29889,
29945,
13,
308,
29941,
29946,
29889,
29929,
29871,
29953,
29947,
29889,
29929,
448,
29906,
29889,
29929,
9995,
13,
4706,
1591,
29896,
353,
7442,
29889,
3166,
1807,
29898,
2371,
29896,
29892,
19570,
543,
376,
467,
690,
14443,
3552,
29896,
29906,
29892,
29945,
8106,
29911,
13,
4706,
402,
1195,
353,
1591,
29896,
29961,
29900,
29962,
13,
4706,
402,
3317,
353,
1591,
29896,
29961,
29896,
29962,
13,
4706,
396,
23945,
278,
8210,
2703,
2442,
18454,
29999,
363,
278,
2752,
30010,
29879,
18497,
29901,
13,
4706,
2703,
2442,
29990,
353,
1591,
29896,
29961,
29906,
3816,
29898,
29954,
1195,
14065,
29954,
26927,
29898,
29954,
3317,
29958,
29954,
29897,
3816,
29900,
29962,
13,
4706,
2703,
2442,
29979,
353,
1591,
29896,
29961,
29941,
3816,
29898,
29954,
1195,
14065,
29954,
26927,
29898,
29954,
3317,
29958,
29954,
29897,
3816,
29900,
29962,
29871,
13,
4706,
2703,
2442,
29999,
353,
1591,
29896,
29961,
29946,
3816,
29898,
29954,
1195,
14065,
29954,
26927,
29898,
29954,
3317,
29958,
29954,
29897,
3816,
29900,
29962,
13,
4706,
26354,
336,
12521,
29878,
353,
448,
29896,
29930,
29879,
513,
29898,
7099,
11877,
3944,
29881,
29898,
336,
11877,
4787,
29990,
448,
29879,
513,
29898,
7099,
11877,
29879,
513,
29898,
336,
11877,
4787,
29979,
718,
6776,
29881,
29898,
7099,
11877,
4787,
29999,
13,
4706,
26354,
7099,
12521,
29878,
353,
3937,
29898,
336,
11877,
4787,
29990,
448,
3944,
29881,
29898,
336,
11877,
4787,
29979,
13,
4706,
736,
26354,
336,
29899,
3358,
336,
12521,
29878,
29914,
29896,
29900,
29900,
29900,
1696,
26354,
7099,
29899,
3358,
7099,
12521,
29878,
29914,
29896,
29900,
29900,
29900,
29889,
13,
13,
1678,
822,
349,
3445,
598,
27427,
29898,
1311,
29892,
364,
29894,
29922,
8824,
29892,
16653,
2433,
3249,
423,
287,
29878,
29941,
29889,
3249,
423,
29918,
4993,
742,
4414,
403,
29943,
7168,
29922,
29896,
9575,
13,
4706,
14550,
8015,
2546,
1960,
4128,
363,
1716,
3618,
515,
10415,
423,
382,
8353,
29941,
18871,
322,
2912,
267,
1788,
1098,
374,
431,
2167,
29892,
13,
4706,
322,
3566,
29879,
963,
304,
278,
383,
5171,
1203,
770,
29889,
13,
308,
13,
4706,
826,
3174,
29901,
13,
9651,
364,
29894,
313,
11227,
1125,
7353,
363,
11415,
278,
10122,
470,
18070,
310,
390,
29963,
20398,
363,
1716,
3618,
320,
13,
18884,
297,
382,
8353,
29941,
29889,
29871,
402,
1691,
731,
304,
5852,
565,
1716,
3618,
505,
10415,
423,
390,
29963,
20398,
29889,
13109,
353,
7700,
13,
9651,
16653,
313,
710,
1125,
1024,
310,
10415,
423,
16653,
304,
2346,
29889,
13109,
353,
525,
3249,
423,
287,
29878,
29941,
29889,
3249,
423,
29918,
4993,
29915,
13,
9651,
4414,
403,
29943,
7168,
313,
1579,
29873,
1125,
383,
7168,
491,
607,
304,
4414,
403,
278,
4436,
373,
10415,
423,
1571,
3184,
1080,
304,
320,
13,
18884,
3633,
363,
4857,
546,
25812,
21875,
29889,
29871,
13109,
353,
29871,
29896,
29889,
29900,
13,
308,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
4706,
14550,
13,
4706,
515,
8717,
307,
1972,
29889,
3249,
423,
1053,
10415,
423,
13,
4706,
3587,
29918,
517,
29918,
8247,
353,
29871,
29941,
29953,
29900,
29900,
29900,
29900,
29900,
29889,
13,
4706,
5516,
29918,
517,
29918,
12163,
353,
29871,
29896,
6904,
29941,
29953,
29900,
29900,
29900,
29900,
29900,
29889,
13,
308,
13,
4706,
396,
4649,
29878,
2418,
8717,
456,
300,
2200,
1650,
515,
10415,
423,
382,
8353,
29941,
13,
4706,
4982,
353,
10415,
423,
29889,
15343,
29918,
9057,
703,
6404,
334,
3895,
15691,
28045,
13578,
5754,
2752,
29918,
333,
353,
15691,
710,
29898,
1311,
29889,
4993,
333,
29896,
876,
13,
4706,
432,
353,
4982,
29889,
657,
29918,
9902,
580,
13,
13,
4706,
4982,
353,
10415,
423,
29889,
15343,
29918,
9057,
703,
6404,
334,
3895,
15691,
28045,
13578,
5754,
2752,
29918,
333,
353,
15691,
710,
29898,
1311,
29889,
4993,
333,
29906,
876,
13,
4706,
413,
353,
4982,
29889,
657,
29918,
9902,
580,
13,
13,
4706,
565,
16653,
1275,
525,
29887,
1794,
7887,
29906,
29889,
3249,
423,
29918,
4993,
2396,
13,
9651,
396,
4649,
29878,
2418,
390,
29965,
8851,
515,
390,
29965,
8851,
16653,
363,
1716,
8974,
322,
788,
304,
1203,
2106,
29901,
13,
9651,
4982,
353,
10415,
423,
29889,
15343,
29918,
9057,
703,
6404,
334,
3895,
330,
1794,
7887,
29906,
29889,
582,
705,
5754,
2752,
29918,
333,
353,
15691,
710,
29898,
1311,
29889,
4993,
333,
29896,
876,
13,
9651,
432,
582,
705,
353,
4982,
29889,
657,
29918,
9902,
580,
13,
13,
9651,
4982,
353,
10415,
423,
29889,
15343,
29918,
9057,
703,
6404,
334,
3895,
330,
1794,
7887,
29906,
29889,
582,
705,
5754,
2752,
29918,
333,
353,
15691,
710,
29898,
1311,
29889,
4993,
333,
29906,
876,
13,
9651,
413,
582,
705,
353,
4982,
29889,
657,
29918,
9902,
580,
13,
13,
9651,
1583,
29889,
582,
705,
29896,
353,
432,
582,
705,
1839,
582,
705,
2033,
29961,
29900,
29962,
13,
9651,
1583,
29889,
582,
705,
29906,
353,
413,
582,
705,
1839,
582,
705,
2033,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
396,
382,
8353,
29941,
3743,
5796,
705,
297,
278,
1667,
16653,
29901,
13,
9651,
1583,
29889,
582,
705,
29896,
353,
432,
1839,
582,
705,
2033,
29961,
29900,
29962,
13,
9651,
1583,
29889,
582,
705,
29906,
353,
413,
1839,
582,
705,
2033,
29961,
29900,
29962,
13,
13,
4706,
396,
5399,
390,
29965,
8851,
363,
1716,
3618,
322,
29383,
565,
2086,
1880,
29901,
13,
4706,
565,
1583,
29889,
582,
705,
29896,
29958,
29896,
29889,
29906,
470,
1583,
29889,
582,
705,
29906,
29958,
29896,
29889,
29906,
29901,
13,
9651,
1596,
877,
4907,
29956,
25614,
29901,
390,
29965,
8851,
363,
697,
470,
901,
310,
596,
6851,
338,
7621,
1135,
29871,
29896,
29889,
29906,
29889,
910,
14088,
29871,
13,
9651,
393,
278,
2752,
1795,
367,
385,
443,
9778,
1490,
7581,
470,
10623,
3277,
28178,
29871,
13,
9651,
2645,
278,
15500,
29889,
29871,
1394,
2966,
6216,
2582,
1122,
451,
367,
9311,
12554,
29891,
29889,
4907,
1495,
13,
13,
4706,
396,
3407,
21502,
305,
29901,
13,
4706,
1583,
29889,
999,
29918,
1022,
2878,
353,
432,
1839,
999,
29918,
1022,
2878,
2033,
29961,
29900,
29962,
13,
13,
4706,
396,
610,
9864,
29916,
29901,
13,
4706,
1583,
29889,
572,
29916,
29896,
353,
518,
29926,
29961,
29900,
22322,
862,
9864,
29916,
2033,
29930,
29884,
29889,
8247,
29892,
432,
29961,
29900,
22322,
862,
9864,
29916,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29962,
13,
4706,
1583,
29889,
572,
29916,
29906,
353,
518,
29895,
29961,
29900,
22322,
862,
9864,
29916,
2033,
29930,
29884,
29889,
8247,
29892,
413,
29961,
29900,
22322,
862,
9864,
29916,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29962,
13,
4706,
396,
18865,
29914,
2287,
29907,
13,
4706,
1583,
29889,
4717,
29896,
353,
518,
29926,
29961,
29900,
22322,
336,
2033,
29930,
29884,
29889,
12163,
29892,
432,
29961,
29900,
22322,
336,
29918,
2704,
2033,
29930,
8247,
29918,
517,
29918,
12163,
29930,
29884,
29889,
12163,
29962,
13,
4706,
1583,
29889,
4717,
29906,
353,
518,
29895,
29961,
29900,
22322,
336,
2033,
29930,
29884,
29889,
12163,
29892,
413,
29961,
29900,
22322,
336,
29918,
2704,
2033,
29930,
8247,
29918,
517,
29918,
12163,
29930,
29884,
29889,
12163,
29962,
13,
4706,
1583,
29889,
6185,
29896,
353,
518,
29926,
29961,
29900,
22322,
7099,
2033,
29930,
29884,
29889,
12163,
29892,
432,
29961,
29900,
22322,
7099,
29918,
2704,
2033,
29930,
8247,
29918,
517,
29918,
12163,
29930,
29884,
29889,
12163,
29962,
13,
4706,
1583,
29889,
6185,
29906,
353,
518,
29895,
29961,
29900,
22322,
7099,
2033,
29930,
29884,
29889,
12163,
29892,
413,
29961,
29900,
22322,
7099,
29918,
2704,
2033,
29930,
8247,
29918,
517,
29918,
12163,
29930,
29884,
29889,
12163,
29962,
13,
4706,
396,
1019,
546,
3184,
1080,
13,
4706,
26354,
29934,
2477,
272,
1621,
287,
29896,
29892,
3358,
6185,
12521,
1621,
287,
29896,
353,
1583,
29889,
287,
29878,
29941,
1762,
2965,
29934,
29943,
29898,
29926,
29961,
29900,
22322,
3358,
336,
7464,
29926,
29961,
29900,
22322,
3358,
7099,
7464,
29926,
29961,
29900,
22322,
336,
7464,
29926,
29961,
29900,
22322,
7099,
7464,
29926,
29961,
29900,
29962,
3366,
561,
327,
29918,
29887,
29918,
12676,
29918,
11082,
20068,
13,
4706,
26354,
29934,
2477,
272,
1621,
287,
29906,
29892,
3358,
6185,
12521,
1621,
287,
29906,
353,
1583,
29889,
287,
29878,
29941,
1762,
2965,
29934,
29943,
29898,
29895,
29961,
29900,
22322,
3358,
336,
7464,
29895,
29961,
29900,
22322,
3358,
7099,
7464,
29895,
29961,
29900,
22322,
336,
7464,
29895,
29961,
29900,
22322,
7099,
7464,
29895,
29961,
29900,
29962,
3366,
561,
327,
29918,
29887,
29918,
12676,
29918,
11082,
20068,
13,
4706,
1583,
29889,
3358,
4717,
29896,
353,
518,
3358,
29934,
2477,
272,
1621,
287,
29896,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29892,
432,
29961,
29900,
22322,
3358,
336,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29930,
26512,
29943,
7168,
29962,
13,
4706,
1583,
29889,
3358,
4717,
29906,
353,
518,
3358,
29934,
2477,
272,
1621,
287,
29906,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29892,
413,
29961,
29900,
22322,
3358,
336,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29930,
26512,
29943,
7168,
29962,
13,
4706,
1583,
29889,
3358,
6185,
29896,
353,
518,
3358,
6185,
12521,
1621,
287,
29896,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29892,
432,
29961,
29900,
22322,
3358,
7099,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29930,
26512,
29943,
7168,
29962,
13,
4706,
1583,
29889,
3358,
6185,
29906,
353,
518,
3358,
6185,
12521,
1621,
287,
29906,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29892,
413,
29961,
29900,
22322,
3358,
7099,
29918,
2704,
2033,
29930,
29884,
29889,
8247,
29914,
29884,
29889,
4316,
29930,
26512,
29943,
7168,
29962,
13,
4706,
396,
2823,
565,
1716,
3618,
505,
390,
29963,
29915,
29879,
297,
26900,
29906,
29901,
13,
4706,
565,
16653,
1275,
525,
3249,
423,
287,
29878,
29941,
29889,
3249,
423,
29918,
4993,
2396,
13,
9651,
1820,
353,
525,
7707,
29906,
29918,
3665,
616,
29918,
955,
25245,
29915,
13,
9651,
1059,
29918,
1989,
353,
525,
7707,
29906,
29918,
3665,
616,
29918,
955,
25245,
29918,
2704,
29915,
13,
4706,
25342,
16653,
1275,
525,
29887,
1794,
7887,
29906,
29889,
3249,
423,
29918,
4993,
2396,
13,
9651,
1820,
353,
525,
3665,
616,
29918,
955,
25245,
29915,
13,
9651,
1059,
29918,
1989,
353,
525,
3665,
616,
29918,
955,
25245,
29918,
2704,
29915,
13,
4706,
565,
1134,
29898,
29895,
29961,
29900,
3816,
1989,
2314,
1275,
7442,
29889,
7411,
29953,
29946,
322,
1134,
29898,
29926,
29961,
29900,
3816,
1989,
2314,
1275,
7442,
29889,
7411,
29953,
29946,
470,
1134,
29898,
29895,
29961,
29900,
3816,
1989,
2314,
1275,
7442,
29889,
7411,
29941,
29906,
322,
1134,
29898,
29926,
29961,
29900,
3816,
1989,
2314,
1275,
7442,
29889,
7411,
29941,
29906,
29901,
13,
9651,
364,
29894,
353,
5852,
13,
9651,
1583,
29889,
15291,
29896,
353,
518,
29926,
29961,
29900,
3816,
1989,
14178,
29884,
29889,
8848,
29914,
29884,
29889,
29879,
29892,
29926,
29961,
29900,
3816,
2704,
29918,
1989,
14178,
29884,
29889,
8848,
29914,
29884,
29889,
29879,
29962,
13,
9651,
1583,
29889,
15291,
29906,
353,
518,
29895,
29961,
29900,
3816,
1989,
14178,
29884,
29889,
8848,
29914,
29884,
29889,
29879,
29892,
29895,
29961,
29900,
3816,
2704,
29918,
1989,
14178,
29884,
29889,
8848,
29914,
29884,
29889,
29879,
29962,
13,
9651,
364,
29894,
29896,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
15291,
29896,
29897,
13,
9651,
364,
29894,
29906,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
15291,
29906,
29897,
13,
9651,
1583,
29889,
15291,
353,
518,
448,
9302,
29889,
12676,
29898,
15291,
29906,
29899,
15291,
29896,
29897,
1919,
7442,
29889,
4172,
29898,
15291,
29906,
29899,
15291,
29896,
29897,
4514,
259,
396,
2383,
29914,
29879,
13,
9651,
396,
8178,
304,
1104,
3647,
1735,
297,
14821,
1788,
515,
390,
29963,
20398,
304,
658,
615,
29875,
13,
9651,
396,
926,
390,
29963,
353,
7113,
22944,
297,
445,
29311,
1788,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
15291,
353,
518,
29900,
29892,
29900,
29962,
13,
13,
4706,
396,
7688,
287,
2099,
310,
610,
9864,
29916,
1819,
29901,
13,
4706,
715,
29916,
353,
7442,
29889,
12483,
482,
4197,
1311,
29889,
572,
29916,
29896,
29961,
29900,
1822,
1767,
29892,
1311,
29889,
572,
29916,
29906,
29961,
29900,
1822,
1767,
1402,
18177,
353,
518,
1311,
29889,
572,
29916,
29896,
29961,
29896,
1822,
1767,
29892,
1311,
29889,
572,
29916,
29906,
29961,
29896,
1822,
1767,
2314,
13,
4706,
715,
29916,
3127,
353,
7442,
29889,
3317,
4197,
1311,
29889,
572,
29916,
29896,
29961,
29896,
1822,
1767,
29892,
1311,
29889,
572,
29916,
29906,
29961,
29896,
1822,
1767,
2314,
13,
4706,
1583,
29889,
572,
29916,
353,
518,
572,
29916,
29892,
572,
29916,
3127,
29962,
462,
308,
396,
5516,
13,
4706,
1583,
29889,
19244,
353,
5418,
10456,
1311,
29889,
572,
29916,
29897,
632,
396,
22844,
13,
13,
4706,
396,
11796,
29872,
2903,
800,
310,
4163,
29871,
29906,
6198,
304,
29871,
29896,
29901,
13,
4706,
364,
29896,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
4717,
29896,
29897,
13,
4706,
364,
29906,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
4717,
29906,
29897,
13,
4706,
270,
29896,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
6185,
29896,
29897,
13,
4706,
270,
29906,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
6185,
29906,
29897,
13,
4706,
1153,
353,
313,
29878,
29906,
29930,
12163,
29918,
517,
29918,
8247,
448,
364,
29896,
29930,
12163,
29918,
517,
29918,
8247,
29897,
334,
7442,
29889,
3944,
29898,
9302,
29889,
3665,
5834,
29898,
9302,
29889,
12676,
4197,
1311,
29889,
6185,
29896,
29961,
29900,
1822,
1767,
29892,
1311,
29889,
6185,
29906,
29961,
29900,
1822,
1767,
29962,
4961,
13,
4706,
1602,
353,
5135,
29881,
29906,
448,
270,
29896,
11877,
29884,
29889,
12163,
467,
517,
29898,
29884,
29889,
8247,
467,
1767,
13,
4706,
1583,
29889,
4181,
4717,
353,
518,
9302,
29889,
12676,
29898,
336,
511,
9302,
29889,
4172,
29898,
336,
4638,
308,
396,
5516,
13,
4706,
1583,
29889,
4181,
6185,
353,
518,
9302,
29889,
12676,
29898,
7099,
511,
9302,
29889,
4172,
29898,
7099,
4638,
418,
396,
5516,
13,
13,
4706,
396,
10272,
6198,
1571,
10884,
29901,
13,
4706,
544,
29896,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
3358,
4717,
29896,
29897,
13,
4706,
544,
29906,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
3358,
4717,
29906,
29897,
13,
4706,
10518,
29896,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
3358,
6185,
29896,
29897,
13,
4706,
10518,
29906,
353,
11240,
8179,
417,
3112,
29898,
1311,
29889,
3358,
6185,
29906,
29897,
13,
4706,
26354,
4717,
353,
518,
9302,
29889,
12676,
29898,
558,
29906,
448,
544,
29896,
511,
7442,
29889,
4172,
29898,
558,
29906,
29899,
558,
29896,
4638,
1678,
396,
5516,
29914,
4316,
13,
4706,
26354,
6185,
353,
518,
9302,
29889,
12676,
29898,
15926,
29906,
448,
10518,
29896,
511,
7442,
29889,
4172,
29898,
15926,
29906,
448,
10518,
29896,
4638,
396,
5516,
29914,
4316,
13,
4706,
1583,
29889,
3358,
4717,
353,
5516,
4316,
29918,
517,
29918,
29895,
1516,
29898,
3358,
4717,
29892,
1311,
29889,
572,
29916,
29897,
308,
396,
2383,
29914,
29879,
13,
4706,
1583,
29889,
3358,
6185,
353,
5516,
4316,
29918,
517,
29918,
29895,
1516,
29898,
3358,
6185,
29892,
1311,
29889,
572,
29916,
29897,
539,
396,
2383,
29914,
29879,
13,
13,
4706,
396,
11796,
29872,
23683,
29914,
3283,
10696,
29901,
13,
4706,
364,
29892,
282,
353,
304,
29918,
3733,
279,
29898,
29878,
29896,
29892,
29878,
29906,
29892,
29881,
29896,
29892,
29881,
29906,
29897,
13,
4706,
1583,
29889,
19570,
353,
18761,
4197,
9302,
29889,
12676,
29898,
29878,
467,
1767,
29892,
7442,
29889,
4172,
29898,
29878,
467,
1767,
2314,
632,
396,
5516,
13,
4706,
1583,
29889,
3274,
353,
18761,
4197,
9302,
29889,
12676,
29898,
29886,
467,
1767,
29892,
7442,
29889,
4172,
29898,
29886,
467,
1767,
2314,
1669,
396,
3587,
13,
13,
4706,
1583,
29889,
19570,
29918,
585,
353,
18761,
4197,
3552,
1311,
29889,
19570,
29961,
29900,
16261,
29896,
29900,
29900,
29900,
11877,
1311,
29889,
19244,
29961,
29900,
11724,
5135,
1311,
29889,
19570,
29961,
29896,
16261,
29896,
29900,
29900,
29900,
11877,
1311,
29889,
19244,
29961,
29900,
2314,
2314,
13,
4706,
1583,
29889,
19570,
29918,
8848,
353,
18761,
4197,
1583,
29889,
19570,
29918,
585,
29961,
29900,
14178,
29884,
29889,
585,
29889,
517,
29898,
29884,
29889,
8848,
29897,
1919,
1583,
29889,
19570,
29918,
585,
29961,
29896,
14178,
29884,
29889,
585,
29889,
517,
29898,
29884,
29889,
8848,
29897,
2314,
13,
13,
4706,
396,
10272,
3001,
9110,
1907,
29901,
13,
4706,
565,
364,
29894,
29901,
13,
9651,
1583,
29889,
7827,
29918,
955,
353,
518,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29900,
1402,
1311,
29889,
3358,
6185,
29961,
29900,
1402,
1311,
29889,
15291,
29961,
29900,
24960,
1919,
29871,
13,
462,
9651,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29896,
1402,
1311,
29889,
3358,
6185,
29961,
29896,
1402,
1311,
29889,
15291,
29961,
29896,
24960,
4514,
29871,
396,
2383,
29914,
29879,
13,
9651,
1583,
29889,
7827,
29918,
22116,
974,
7912,
29918,
955,
353,
518,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29900,
1402,
1311,
29889,
3358,
6185,
29961,
29900,
24960,
1919,
29871,
13,
462,
9651,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29896,
1402,
1311,
29889,
3358,
6185,
29961,
29896,
24960,
4514,
632,
396,
2383,
29914,
29879,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
7827,
29918,
955,
353,
518,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29900,
1402,
1311,
29889,
3358,
6185,
29961,
29900,
24960,
1919,
29871,
13,
462,
9651,
788,
29918,
262,
29918,
3425,
4197,
1311,
29889,
3358,
4717,
29961,
29896,
1402,
1311,
29889,
3358,
6185,
29961,
29896,
24960,
4514,
632,
396,
2383,
29914,
29879,
13,
9651,
1583,
29889,
7827,
29918,
22116,
974,
7912,
29918,
955,
353,
1583,
29889,
7827,
29918,
955,
29889,
8552,
580,
462,
539,
396,
2383,
29914,
29879,
13,
13,
4706,
396,
10272,
628,
29873,
314,
351,
29901,
13,
4706,
1583,
29889,
4181,
29954,
11082,
353,
432,
29961,
29900,
22322,
561,
327,
29918,
29887,
29918,
12676,
29918,
11082,
2033,
448,
413,
29961,
29900,
22322,
561,
327,
29918,
29887,
29918,
12676,
29918,
11082,
2033,
13,
268,
13,
13,
1990,
383,
277,
2816,
2966,
29898,
3318,
1125,
13,
1678,
14550,
4669,
363,
15859,
385,
16980,
6216,
29889,
29871,
323,
6926,
8393,
515,
383,
5171,
770,
29889,
13,
13,
1678,
429,
29901,
470,
14836,
353,
383,
277,
2816,
2966,
29898,
29888,
5171,
3318,
29897,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
285,
5171,
3318,
313,
29943,
5171,
1203,
1125,
383,
5171,
1203,
16601,
515,
278,
383,
5171,
770,
13,
4706,
2436,
29918,
16202,
313,
11227,
1125,
960,
5852,
29892,
2436,
714,
15837,
13964,
310,
16980,
4559,
472,
320,
13,
9651,
15997,
310,
6216,
29889,
29871,
13109,
353,
5852,
29889,
13,
4706,
2436,
29918,
9902,
313,
11227,
1125,
29871,
960,
5852,
29892,
2436,
714,
278,
6216,
2582,
304,
263,
5839,
280,
934,
320,
13,
9651,
297,
6124,
304,
278,
1426,
934,
2825,
2645,
278,
6216,
29889,
29871,
13109,
353,
5852,
29889,
13,
4706,
19471,
4717,
29892,
19471,
6185,
313,
1579,
29873,
1125,
6198,
23683,
297,
18865,
322,
3826,
18112,
29892,
297,
5516,
13,
4706,
26354,
4717,
29892,
26354,
6185,
313,
1579,
29873,
1125,
6198,
1571,
10884,
297,
18865,
29914,
6185,
18112,
297,
2383,
269,
21583,
29896,
13,
4706,
364,
29894,
313,
1579,
29873,
29892,
13136,
1125,
6198,
390,
29963,
310,
29871,
29906,
6198,
304,
29871,
29896,
29892,
565,
1716,
526,
2198,
297,
10415,
423,
382,
8353,
29941,
13,
4706,
286,
4260,
29918,
2344,
313,
1579,
29873,
1125,
2847,
3001,
1788,
4158,
297,
341,
11445,
515,
1404,
1881,
13,
4706,
5418,
313,
1579,
29873,
1125,
5418,
310,
1788,
297,
22844,
29892,
15712,
515,
10415,
423,
610,
9864,
29916,
773,
1158,
310,
350,
737,
261,
29899,
29967,
2873,
634,
29889,
394,
29871,
29906,
29900,
29896,
29947,
29889,
13,
4706,
16345,
313,
1579,
29873,
1125,
23683,
4608,
297,
5516,
13,
4706,
3300,
313,
1579,
29873,
1125,
1400,
291,
10696,
310,
23683,
4608,
297,
14496,
515,
4644,
13,
4706,
2143,
29918,
1022,
2878,
313,
1579,
29873,
1125,
21502,
305,
310,
278,
20039,
29892,
29871,
29906,
29900,
29896,
29953,
29889,
29900,
363,
10415,
423,
382,
8353,
29941,
322,
29871,
29906,
29900,
29896,
29945,
29889,
29945,
363,
10415,
423,
26900,
29906,
29889,
13,
4706,
4186,
14836,
313,
524,
1125,
1353,
310,
7429,
16980,
11916,
13,
4706,
2436,
29918,
16202,
313,
11227,
1125,
565,
5852,
29892,
2436,
15837,
310,
4559,
13964,
304,
5199,
29899,
949,
519,
934,
472,
1095,
310,
1065,
29889,
29871,
13109,
353,
5852,
13,
4706,
2436,
29918,
9902,
313,
11227,
1125,
565,
5852,
29892,
2436,
714,
1857,
2106,
310,
4559,
470,
14836,
297,
5839,
280,
934,
297,
29591,
18747,
2645,
320,
13,
9651,
1065,
29892,
322,
1449,
472,
278,
1095,
310,
278,
1065,
29889,
29871,
5195,
3217,
7428,
1430,
2287,
29928,
29889,
29871,
13109,
353,
5852,
13,
4706,
2582,
29918,
9507,
313,
710,
1125,
1024,
310,
934,
363,
14238,
5839,
839,
2582,
304,
8086,
29889,
29871,
960,
451,
19056,
29892,
320,
13,
9651,
822,
29874,
352,
1024,
338,
383,
277,
12191,
29889,
29891,
29889,
4346,
29889,
29881,
29889,
29882,
29889,
29885,
29889,
29879,
29889,
29886,
6321,
29892,
7160,
297,
1021,
3884,
408,
6216,
471,
1065,
29889,
13,
4706,
22663,
29918,
9507,
313,
710,
1125,
1024,
310,
934,
363,
14238,
5199,
29899,
949,
519,
934,
310,
22663,
310,
4559,
2582,
29889,
960,
451,
19056,
29892,
320,
13,
9651,
822,
29874,
352,
1024,
338,
383,
277,
12191,
29889,
25060,
29889,
29891,
29889,
4346,
29889,
29881,
29889,
29882,
29889,
29885,
29889,
29879,
29889,
29886,
6321,
29892,
7160,
297,
1021,
3884,
408,
6216,
471,
1065,
29889,
13,
4706,
1065,
29918,
2230,
313,
1579,
29873,
1125,
1065,
931,
363,
278,
1833,
6216,
29889,
29871,
8717,
14441,
10340,
1203,
13,
13,
13,
1678,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
285,
5171,
3318,
29892,
2436,
29918,
16202,
353,
5852,
29892,
2436,
29918,
9902,
353,
5852,
29892,
3017,
29918,
3259,
29922,
8824,
29892,
320,
13,
18884,
671,
29918,
3358,
29918,
19128,
29918,
8489,
353,
7700,
29892,
27760,
29918,
1111,
12352,
353,
6213,
1125,
13,
4706,
396,
10127,
6216,
4128,
29901,
13,
4706,
1583,
29889,
4181,
4717,
353,
285,
5171,
3318,
29889,
4181,
4717,
13,
4706,
1583,
29889,
4181,
6185,
353,
285,
5171,
3318,
29889,
4181,
6185,
13,
4706,
1583,
29889,
3358,
4717,
353,
285,
5171,
3318,
29889,
3358,
4717,
13,
4706,
1583,
29889,
3358,
6185,
353,
285,
5171,
3318,
29889,
3358,
6185,
13,
4706,
1583,
29889,
15291,
353,
285,
5171,
3318,
29889,
15291,
13,
4706,
1583,
29889,
29885,
4260,
29918,
2344,
353,
285,
5171,
3318,
29889,
29885,
4260,
13,
4706,
1583,
29889,
19244,
353,
285,
5171,
3318,
29889,
19244,
13,
4706,
1583,
29889,
19570,
353,
285,
5171,
3318,
29889,
19570,
13,
4706,
1583,
29889,
3274,
353,
285,
5171,
3318,
29889,
3274,
13,
4706,
1583,
29889,
999,
29918,
1022,
2878,
353,
285,
5171,
3318,
29889,
999,
29918,
1022,
2878,
13,
4706,
1583,
29889,
29940,
11831,
1169,
353,
285,
5171,
3318,
29889,
29940,
11831,
1169,
13,
4706,
1583,
29889,
3539,
29918,
9902,
353,
2436,
29918,
9902,
13,
4706,
1583,
29889,
3539,
29918,
16202,
353,
2436,
29918,
16202,
13,
4706,
1583,
29889,
9902,
29918,
9507,
353,
285,
5171,
3318,
29889,
9902,
29918,
9507,
13,
4706,
1583,
29889,
16202,
29918,
9507,
353,
285,
5171,
3318,
29889,
16202,
29918,
9507,
13,
4706,
1583,
29889,
579,
456,
27184,
353,
285,
5171,
3318,
29889,
579,
456,
27184,
13,
4706,
565,
1583,
29889,
579,
456,
27184,
29901,
13,
9651,
1583,
29889,
579,
456,
300,
2200,
29918,
336,
353,
285,
5171,
3318,
29889,
579,
456,
300,
2200,
29918,
336,
13,
9651,
1583,
29889,
579,
456,
300,
2200,
29918,
7099,
353,
285,
5171,
3318,
29889,
579,
456,
300,
2200,
29918,
7099,
13,
9651,
1583,
29889,
579,
456,
300,
2200,
29918,
15190,
353,
285,
5171,
3318,
29889,
579,
456,
300,
2200,
29918,
15190,
13,
4706,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
353,
285,
5171,
3318,
29889,
1509,
29918,
1792,
29918,
15291,
13,
4706,
565,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
29901,
13,
9651,
1583,
29889,
1792,
29918,
15291,
353,
285,
5171,
3318,
29889,
1792,
29918,
15291,
13,
9651,
1583,
29889,
1792,
29918,
15291,
29918,
15190,
353,
285,
5171,
3318,
29889,
1792,
29918,
15291,
29918,
15190,
13,
13,
4706,
396,
1065,
16980,
285,
5171,
29901,
13,
4706,
1583,
29889,
29888,
2105,
2966,
29898,
4691,
29918,
9202,
29949,
7818,
29902,
29922,
4691,
29918,
3259,
29892,
671,
29918,
3358,
29918,
19128,
29918,
8489,
353,
671,
29918,
3358,
29918,
19128,
29918,
8489,
29892,
27760,
29918,
1111,
12352,
353,
27760,
29918,
1111,
12352,
29897,
13,
13,
1678,
822,
285,
2105,
2966,
29898,
1311,
29892,
4078,
29918,
9902,
29918,
17991,
29918,
29990,
29918,
417,
3554,
353,
29871,
29896,
29900,
29900,
29892,
3017,
29918,
9202,
29949,
7818,
29902,
29922,
8824,
29892,
671,
29918,
3358,
29918,
19128,
29918,
8489,
353,
7700,
29892,
27760,
29918,
1111,
12352,
353,
6213,
1125,
13,
4706,
14550,
6558,
278,
438,
7818,
29902,
28221,
1065,
373,
278,
383,
5171,
1203,
29889,
29871,
3037,
839,
746,
383,
277,
2816,
2966,
1203,
13,
4706,
338,
2825,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
4078,
29918,
9902,
29918,
17991,
29918,
29990,
29918,
417,
3554,
313,
524,
1125,
373,
1432,
1060,
386,
2425,
29892,
4078,
4660,
310,
278,
320,
13,
18884,
16980,
4559,
7049,
304,
263,
5839,
280,
934,
29892,
565,
2436,
29918,
9902,
353,
5852,
313,
4592,
29897,
13,
9651,
3017,
29918,
9202,
29949,
7818,
29902,
313,
11227,
1125,
960,
5852,
29892,
6216,
773,
3017,
871,
1728,
773,
315,
4813,
20069,
29915,
29879,
6306,
899,
369,
29889,
13109,
353,
7700,
13,
9651,
671,
29918,
3358,
29918,
19128,
29918,
8489,
313,
11227,
1125,
960,
5852,
29892,
3160,
278,
1571,
10884,
19869,
4891,
1840,
297,
278,
18168,
29985,
29906,
16287,
320,
13,
18884,
13109,
353,
7700,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
396,
2436,
4839,
29901,
13,
4706,
1596,
877,
29903,
5555,
470,
14836,
297,
742,
1311,
29889,
9902,
29918,
9507,
29897,
13,
4706,
413,
353,
1722,
29898,
1311,
29889,
9902,
29918,
9507,
29892,
525,
29893,
1495,
13,
4706,
1962,
29918,
1445,
29918,
6672,
353,
16321,
269,
655,
518,
5666,
3471,
29962,
1678,
3785,
518,
29891,
2288,
29962,
1678,
16980,
8576,
1678,
260,
29918,
29900,
518,
4316,
29962,
1678,
16882,
1678,
1343,
518,
12163,
10725,
13,
4706,
1852,
29886,
518,
12163,
29962,
259,
10906,
518,
12163,
29962,
1678,
286,
29918,
4260,
518,
29924,
11445,
29962,
1678,
1320,
518,
6739,
29962,
1678,
18558,
29985,
29906,
1678,
301,
29876,
29898,
22795,
29897,
1678,
301,
29876,
29898,
9502,
29876,
16029,
13,
4706,
413,
29889,
3539,
29898,
4905,
29918,
1445,
29918,
6672,
718,
6634,
29876,
1159,
13,
4706,
413,
29889,
5358,
580,
13,
13,
4706,
1053,
931,
408,
27702,
13,
4706,
835,
7346,
27313,
2847,
1065,
304,
679,
2847,
18558,
29899,
26613,
1965,
29901,
835,
7346,
2277,
13,
4706,
396,
18492,
4036,
470,
14836,
29901,
13,
4706,
396,
16744,
353,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
13,
4706,
954,
29903,
9422,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
4706,
4128,
29918,
2344,
353,
4216,
29918,
27736,
29898,
1949,
29903,
9422,
29892,
1583,
29889,
29885,
4260,
29918,
2344,
29892,
1583,
29889,
19244,
29892,
1583,
29889,
999,
29918,
1022,
2878,
29897,
13,
4706,
396,
11796,
29872,
11909,
322,
9110,
1907,
29901,
13,
4706,
565,
29898,
4691,
29918,
9202,
29949,
7818,
29902,
1125,
13,
18884,
1060,
29892,
29979,
29892,
29999,
29892,
29990,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
29892,
29990,
1289,
327,
29892,
29979,
1289,
327,
29892,
29999,
1289,
327,
29892,
16744,
29922,
28667,
29918,
29949,
7818,
29902,
29898,
16744,
29918,
2344,
29892,
1311,
29889,
999,
29918,
1022,
2878,
29892,
1311,
29889,
19570,
29892,
1311,
29889,
3274,
29897,
13,
4706,
1683,
29901,
13,
18884,
736,
2588,
353,
7442,
29889,
3298,
359,
3552,
29896,
29929,
29892,
1949,
29903,
9422,
876,
13,
18884,
736,
2588,
353,
22235,
29949,
7818,
29902,
29918,
29907,
29898,
16744,
29918,
2344,
29892,
1311,
29889,
999,
29918,
1022,
2878,
29892,
1311,
29889,
19570,
29892,
1311,
29889,
3274,
29892,
2457,
2588,
29889,
8552,
3101,
13,
18884,
1060,
29892,
29979,
29892,
29999,
29892,
29990,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
29892,
29990,
1289,
327,
29892,
29979,
1289,
327,
29892,
29999,
1289,
327,
353,
736,
2588,
29961,
29900,
29901,
29929,
29962,
13,
18884,
4128,
353,
736,
2588,
29961,
29929,
17531,
13,
13,
4706,
396,
11796,
29872,
18558,
10674,
1965,
29901,
13,
4706,
565,
1583,
29889,
15291,
29961,
29900,
29962,
2804,
29871,
29900,
29901,
13,
9651,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29892,
29990,
29892,
29979,
6333,
29892,
29990,
6333,
29892,
29999,
6333,
2314,
13,
9651,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
4181,
4717,
29892,
1583,
29889,
4181,
6185,
29892,
1583,
29889,
3358,
4717,
29892,
1583,
29889,
3358,
6185,
29892,
1583,
29889,
15291,
2314,
13,
4706,
1683,
29901,
13,
9651,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29892,
29990,
29892,
29979,
6333,
29892,
29990,
6333,
2314,
13,
9651,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
4181,
4717,
29892,
1583,
29889,
4181,
6185,
29892,
1583,
29889,
3358,
4717,
29892,
1583,
29889,
3358,
6185,
2314,
13,
4706,
18558,
29906,
353,
11796,
29872,
1451,
29875,
29906,
29898,
1272,
29892,
4299,
29897,
13,
4706,
565,
671,
29918,
3358,
29918,
19128,
29918,
8489,
29901,
13,
9651,
18558,
29906,
22361,
313,
29871,
29906,
334,
27760,
29918,
1111,
12352,
334,
313,
1272,
29961,
29906,
3816,
29900,
29962,
448,
1904,
29961,
29906,
2314,
334,
313,
1272,
29961,
29941,
3816,
29900,
29962,
448,
1904,
29961,
29941,
2314,
1723,
847,
313,
1272,
29961,
29906,
3816,
29896,
29962,
334,
848,
29961,
29941,
3816,
29896,
2314,
29871,
13,
632,
13,
13,
4706,
565,
1583,
29889,
579,
456,
27184,
29901,
13,
9651,
282,
353,
4128,
29889,
8552,
580,
13,
9651,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
353,
282,
29961,
29900,
1402,
29886,
29961,
29896,
1402,
29886,
29961,
29906,
1402,
29886,
29961,
29941,
1402,
29886,
29961,
29946,
1402,
29886,
29961,
29945,
1402,
29886,
29961,
29953,
1402,
29886,
29961,
29955,
1402,
29886,
29961,
29947,
1402,
29886,
29961,
29929,
29962,
13,
9651,
18558,
29906,
29918,
7614,
353,
7442,
29889,
3298,
359,
29898,
29896,
29900,
29900,
29900,
29900,
29897,
13,
9651,
396,
20535,
403,
25383,
11909,
472,
29132,
15500,
10116,
363,
1269,
16980,
29901,
13,
9651,
363,
432,
297,
3464,
29898,
1311,
29889,
579,
456,
300,
2200,
29918,
336,
29889,
12181,
29961,
29896,
29962,
1125,
13,
18884,
396,
363,
1269,
2635,
29892,
10272,
1060,
29979,
29999,
363,
1269,
29871,
29896,
29900,
29900,
29900,
29900,
14260,
16980,
29889,
29871,
1334,
508,
13,
18884,
396,
14383,
6287,
322,
16734,
1363,
393,
471,
24799,
297,
278,
22235,
29918,
29949,
7818,
29902,
1246,
2038,
29889,
13,
18884,
1060,
29896,
29892,
29979,
29896,
29892,
29999,
29896,
29892,
29923,
29896,
353,
22235,
29918,
18454,
29999,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
1311,
29889,
579,
456,
300,
2200,
29918,
15190,
29961,
29926,
2314,
13,
18884,
396,
15484,
8717,
456,
27184,
964,
848,
1409,
988,
29901,
848,
29961,
29900,
3816,
29900,
13192,
336,
20881,
29892,
848,
29961,
29900,
3816,
29896,
13192,
336,
4589,
29892,
2992,
29901,
13,
18884,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
579,
456,
300,
2200,
29918,
336,
7503,
29892,
29926,
1402,
1583,
29889,
579,
456,
300,
2200,
29918,
7099,
7503,
29892,
29926,
24960,
13,
18884,
396,
2058,
6590,
4450,
293,
1573,
11909,
472,
393,
2635,
363,
1269,
14260,
16980,
297,
15232,
3471,
29901,
13,
18884,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29896,
29930,
29896,
29900,
29900,
29900,
29892,
29990,
29896,
29930,
29896,
29900,
29900,
29900,
2314,
13,
18884,
396,
10272,
18558,
29906,
363,
14260,
470,
14836,
472,
393,
2635,
322,
788,
304,
278,
3001,
18558,
29906,
2533,
29901,
13,
18884,
18558,
29906,
29918,
7614,
4619,
11796,
29872,
1451,
29875,
29906,
29898,
1272,
29892,
4299,
29897,
13,
9651,
18558,
29906,
353,
18558,
29906,
718,
18558,
29906,
29918,
7614,
13,
4706,
565,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
29901,
13,
9651,
282,
353,
4128,
29889,
8552,
580,
13,
9651,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
353,
282,
29961,
29900,
1402,
29886,
29961,
29896,
1402,
29886,
29961,
29906,
1402,
29886,
29961,
29941,
1402,
29886,
29961,
29946,
1402,
29886,
29961,
29945,
1402,
29886,
29961,
29953,
1402,
29886,
29961,
29955,
1402,
29886,
29961,
29947,
1402,
29886,
29961,
29929,
29962,
13,
9651,
18558,
29906,
29918,
15291,
353,
7442,
29889,
3298,
359,
29898,
29896,
29900,
29900,
29900,
29900,
29897,
13,
9651,
363,
432,
297,
3464,
29898,
1311,
29889,
1792,
29918,
15291,
29889,
12181,
29961,
29896,
29962,
1125,
13,
18884,
396,
10272,
16882,
29342,
14997,
472,
393,
2635,
29901,
13,
18884,
1060,
29896,
29892,
29979,
29896,
29892,
29999,
29896,
29892,
29923,
29896,
353,
22235,
29918,
18454,
29999,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
1311,
29889,
1792,
29918,
15291,
29918,
15190,
29961,
29926,
2314,
13,
18884,
396,
10272,
9110,
1907,
472,
393,
16882,
29342,
29901,
13,
18884,
1060,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
353,
22235,
29918,
955,
542,
1907,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
5721,
29892,
29923,
29896,
29897,
13,
18884,
396,
10272,
18558,
29906,
29901,
13,
18884,
18558,
29906,
29918,
15291,
4619,
11796,
29872,
1451,
29875,
29906,
29898,
9302,
29889,
2378,
4197,
1311,
29889,
1792,
29918,
15291,
7503,
29892,
29926,
5262,
511,
9302,
29889,
2378,
4197,
29999,
6333,
12622,
13,
9651,
18558,
29906,
353,
18558,
29906,
718,
18558,
29906,
29918,
15291,
13,
4706,
1596,
877,
2344,
284,
18558,
1375,
742,
9302,
29889,
13707,
1195,
29898,
4161,
29906,
876,
13,
13,
4706,
1583,
29889,
4161,
29918,
1195,
353,
7442,
29889,
13707,
1195,
29898,
4161,
29906,
29897,
13,
13,
4706,
396,
29848,
29914,
276,
622,
29901,
13,
4706,
9259,
29892,
301,
29876,
22795,
29892,
301,
29876,
9502,
353,
29848,
2816,
1123,
622,
29898,
4161,
29906,
29892,
1311,
29889,
4161,
29918,
1195,
29897,
13,
4706,
396,
2302,
1353,
9259,
29901,
13,
4706,
1353,
29918,
11831,
1169,
29918,
16044,
287,
353,
7442,
29889,
2311,
29898,
16044,
287,
29897,
13,
4706,
396,
22002,
373,
18558,
29906,
29892,
1480,
6976,
29892,
1480,
4036,
443,
361,
1353,
304,
4128,
1409,
29901,
13,
4706,
4128,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
16744,
29892,
4161,
29906,
29961,
8516,
29892,
29901,
1402,
3083,
22795,
29961,
8516,
29892,
29901,
1402,
3083,
9502,
29961,
8516,
29892,
29901,
11724,
9685,
353,
29871,
29900,
29897,
13,
4706,
396,
1301,
4220,
29901,
13,
4706,
4128,
29922,
9302,
29889,
3286,
4220,
29898,
16744,
29897,
13,
4706,
396,
2436,
2582,
304,
934,
29901,
13,
4706,
413,
353,
1722,
29898,
1311,
29889,
9902,
29918,
9507,
29892,
525,
29874,
1495,
13,
4706,
363,
8636,
297,
4128,
29961,
16044,
287,
5387,
13,
9651,
1347,
353,
525,
259,
15300,
7122,
4197,
710,
29898,
29886,
29897,
363,
282,
297,
8636,
2314,
13,
9651,
413,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
4706,
413,
29889,
5358,
580,
13,
308,
13,
4706,
16101,
29937,
1369,
2425,
835,
4136,
29937,
13,
4706,
396,
11905,
29901,
13,
4706,
2425,
29918,
2798,
353,
29871,
29900,
13,
4706,
1369,
29922,
18276,
29889,
2230,
580,
13,
308,
13,
4706,
1550,
1353,
29918,
11831,
1169,
29918,
16044,
287,
529,
1583,
29889,
29940,
11831,
1169,
29901,
13,
9651,
396,
18492,
4036,
470,
14836,
29901,
13,
9651,
954,
29903,
9422,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
9651,
4128,
29918,
2344,
353,
4216,
29918,
27736,
29898,
1949,
29903,
9422,
29892,
1583,
29889,
29885,
4260,
29918,
2344,
29892,
1583,
29889,
19244,
29892,
1583,
29889,
999,
29918,
1022,
2878,
29897,
13,
9651,
396,
11796,
29872,
11909,
322,
9110,
1907,
322,
716,
4128,
1409,
411,
6287,
29881,
322,
5731,
630,
1819,
29901,
13,
9651,
565,
29898,
4691,
29918,
9202,
29949,
7818,
29902,
1125,
13,
18884,
1060,
29892,
29979,
29892,
29999,
29892,
29990,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
29892,
29990,
1289,
327,
29892,
29979,
1289,
327,
29892,
29999,
1289,
327,
29892,
16744,
29922,
28667,
29918,
29949,
7818,
29902,
29898,
16744,
29918,
2344,
29892,
1311,
29889,
999,
29918,
1022,
2878,
29892,
1311,
29889,
19570,
29892,
1311,
29889,
3274,
29897,
13,
9651,
1683,
29901,
13,
18884,
736,
2588,
353,
7442,
29889,
3298,
359,
3552,
29896,
29929,
29892,
1949,
29903,
9422,
876,
13,
18884,
736,
2588,
353,
22235,
29949,
7818,
29902,
29918,
29907,
29898,
16744,
29918,
2344,
29892,
1311,
29889,
999,
29918,
1022,
2878,
29892,
1311,
29889,
19570,
29892,
1311,
29889,
3274,
29892,
2457,
2588,
29889,
8552,
3101,
13,
18884,
1060,
29892,
29979,
29892,
29999,
29892,
29990,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
29892,
29990,
1289,
327,
29892,
29979,
1289,
327,
29892,
29999,
1289,
327,
353,
736,
2588,
29961,
29900,
29901,
29929,
29962,
13,
18884,
4128,
353,
736,
2588,
29961,
29929,
17531,
13,
18884,
736,
2588,
353,
6213,
13,
9651,
396,
10272,
18558,
29906,
363,
470,
14836,
773,
10415,
423,
13917,
29901,
13,
9651,
565,
1583,
29889,
15291,
29961,
29900,
29962,
2804,
29871,
29900,
29901,
13,
18884,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29892,
29990,
29892,
29979,
6333,
29892,
29990,
6333,
29892,
29999,
6333,
2314,
13,
18884,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
4181,
4717,
29892,
1583,
29889,
4181,
6185,
29892,
1583,
29889,
3358,
4717,
29892,
1583,
29889,
3358,
6185,
29892,
1583,
29889,
15291,
2314,
13,
9651,
1683,
29901,
13,
18884,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29892,
29990,
29892,
29979,
6333,
29892,
29990,
6333,
2314,
13,
18884,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
4181,
4717,
29892,
1583,
29889,
4181,
6185,
29892,
1583,
29889,
3358,
4717,
29892,
1583,
29889,
3358,
6185,
2314,
13,
9651,
18558,
29906,
353,
11796,
29872,
1451,
29875,
29906,
29898,
1272,
29892,
4299,
29897,
13,
9651,
565,
671,
29918,
3358,
29918,
19128,
29918,
8489,
29901,
13,
18884,
18558,
29906,
22361,
313,
29871,
29906,
334,
313,
1272,
29961,
29906,
3816,
29900,
29962,
448,
1904,
29961,
29906,
2314,
334,
313,
1272,
29961,
29941,
3816,
29900,
29962,
448,
1904,
29961,
29941,
2314,
1723,
847,
313,
1272,
29961,
29906,
3816,
29896,
29962,
334,
848,
29961,
29941,
3816,
29896,
2314,
29871,
13,
13,
9651,
396,
788,
1404,
8717,
456,
27184,
565,
2183,
29901,
13,
9651,
565,
1583,
29889,
579,
456,
27184,
29901,
13,
18884,
282,
353,
4128,
29889,
8552,
580,
13,
18884,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
353,
282,
29961,
29900,
1402,
29886,
29961,
29896,
1402,
29886,
29961,
29906,
1402,
29886,
29961,
29941,
1402,
29886,
29961,
29946,
1402,
29886,
29961,
29945,
1402,
29886,
29961,
29953,
1402,
29886,
29961,
29955,
1402,
29886,
29961,
29947,
1402,
29886,
29961,
29929,
29962,
13,
18884,
18558,
29906,
29918,
7614,
353,
7442,
29889,
3298,
359,
29898,
29896,
29900,
29900,
29900,
29900,
29897,
13,
18884,
396,
20535,
403,
25383,
11909,
472,
29132,
15500,
10116,
363,
1269,
16980,
29901,
13,
18884,
363,
432,
297,
3464,
29898,
1311,
29889,
579,
456,
300,
2200,
29918,
336,
29889,
12181,
29961,
29896,
29962,
1125,
13,
462,
1678,
396,
363,
1269,
2635,
29892,
10272,
1060,
29979,
29999,
363,
1269,
29871,
29896,
29900,
29900,
29900,
29900,
14260,
16980,
29889,
29871,
1334,
508,
13,
462,
1678,
396,
14383,
6287,
322,
16734,
1363,
393,
471,
24799,
297,
278,
22235,
29918,
29949,
7818,
29902,
1246,
2038,
29889,
13,
462,
1678,
1060,
29896,
29892,
29979,
29896,
29892,
29999,
29896,
29892,
29923,
29896,
353,
22235,
29918,
18454,
29999,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
1311,
29889,
579,
456,
300,
2200,
29918,
15190,
29961,
29926,
2314,
13,
462,
1678,
396,
15484,
8717,
456,
27184,
964,
848,
1409,
988,
29901,
848,
29961,
29900,
3816,
29900,
13192,
336,
20881,
29892,
848,
29961,
29900,
3816,
29896,
13192,
336,
4589,
29892,
2992,
29901,
13,
462,
1678,
848,
353,
7442,
29889,
2378,
4197,
1311,
29889,
579,
456,
300,
2200,
29918,
336,
7503,
29892,
29926,
1402,
1583,
29889,
579,
456,
300,
2200,
29918,
7099,
7503,
29892,
29926,
24960,
13,
462,
1678,
396,
2058,
6590,
4450,
293,
1573,
11909,
472,
393,
2635,
363,
1269,
14260,
16980,
29901,
13,
462,
1678,
1904,
353,
7442,
29889,
2378,
4197,
29979,
29896,
29930,
29896,
29900,
29900,
29900,
29892,
29990,
29896,
29930,
29896,
29900,
29900,
29900,
2314,
13,
462,
1678,
396,
10272,
18558,
29906,
363,
14260,
470,
14836,
472,
393,
2635,
322,
788,
304,
278,
3001,
18558,
29906,
2533,
29901,
13,
462,
1678,
18558,
29906,
29918,
7614,
4619,
11796,
29872,
1451,
29875,
29906,
29898,
1272,
29892,
4299,
29897,
13,
18884,
18558,
29906,
353,
18558,
29906,
718,
18558,
29906,
29918,
7614,
13,
632,
13,
9651,
396,
788,
1404,
364,
29894,
565,
2183,
29901,
13,
9651,
565,
1583,
29889,
1509,
29918,
1792,
29918,
15291,
29901,
13,
18884,
282,
353,
4128,
29889,
8552,
580,
13,
18884,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
353,
282,
29961,
29900,
1402,
29886,
29961,
29896,
1402,
29886,
29961,
29906,
1402,
29886,
29961,
29941,
1402,
29886,
29961,
29946,
1402,
29886,
29961,
29945,
1402,
29886,
29961,
29953,
1402,
29886,
29961,
29955,
1402,
29886,
29961,
29947,
1402,
29886,
29961,
29929,
29962,
13,
18884,
18558,
29906,
29918,
15291,
353,
7442,
29889,
3298,
359,
29898,
29896,
29900,
29900,
29900,
29900,
29897,
13,
18884,
363,
432,
297,
3464,
29898,
1311,
29889,
1792,
29918,
15291,
29889,
12181,
29961,
29896,
29962,
1125,
13,
462,
1678,
396,
10272,
16882,
29342,
14997,
472,
393,
2635,
29901,
13,
462,
1678,
1060,
29896,
29892,
29979,
29896,
29892,
29999,
29896,
29892,
29923,
29896,
353,
22235,
29918,
18454,
29999,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
1311,
29889,
1792,
29918,
15291,
29918,
15190,
29961,
29926,
2314,
13,
462,
1678,
396,
10272,
9110,
1907,
472,
393,
16882,
29342,
29901,
13,
462,
1678,
1060,
6333,
29892,
29979,
6333,
29892,
29999,
6333,
353,
22235,
29918,
955,
542,
1907,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
5721,
29892,
29923,
29896,
29897,
13,
462,
1678,
396,
10272,
18558,
29906,
29901,
13,
462,
1678,
18558,
29906,
29918,
15291,
4619,
11796,
29872,
1451,
29875,
29906,
29898,
9302,
29889,
2378,
4197,
1311,
29889,
1792,
29918,
15291,
7503,
29892,
29926,
5262,
511,
9302,
29889,
2378,
4197,
29999,
6333,
12622,
13,
18884,
18558,
29906,
353,
18558,
29906,
718,
18558,
29906,
29918,
15291,
13,
632,
13,
9651,
396,
29848,
29914,
276,
622,
29901,
13,
9651,
9259,
29892,
301,
29876,
22795,
29892,
301,
29876,
9502,
353,
29848,
2816,
1123,
622,
29898,
4161,
29906,
29892,
1311,
29889,
4161,
29918,
1195,
29897,
13,
632,
13,
9651,
565,
7442,
29889,
2311,
29898,
16044,
287,
29897,
1275,
29871,
29900,
29901,
13,
18884,
1209,
13,
9651,
1683,
29901,
13,
18884,
396,
2302,
954,
9259,
13,
18884,
282,
353,
4128,
29889,
8552,
580,
13,
18884,
263,
29892,
29911,
29892,
3075,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29885,
29896,
29892,
5721,
353,
282,
29961,
29900,
1402,
29886,
29961,
29896,
1402,
29886,
29961,
29906,
1402,
29886,
29961,
29941,
1402,
29886,
29961,
29946,
1402,
29886,
29961,
29945,
1402,
29886,
29961,
29953,
1402,
29886,
29961,
29955,
1402,
29886,
29961,
29947,
1402,
29886,
29961,
29929,
29962,
13,
18884,
4559,
12191,
353,
22235,
29918,
18454,
29999,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29914,
29896,
29947,
29900,
29930,
9302,
29889,
1631,
29892,
29893,
29914,
29896,
29947,
29900,
29930,
9302,
29889,
1631,
29892,
29949,
29914,
29896,
29947,
29900,
29930,
9302,
29889,
1631,
29892,
29906,
29900,
29896,
29953,
29889,
29900,
29897,
13,
18884,
1353,
29918,
11831,
1169,
29918,
16044,
287,
4619,
7442,
29889,
2311,
29898,
16044,
287,
29897,
13,
18884,
4128,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
16744,
29892,
4161,
29906,
29961,
8516,
29892,
29901,
1402,
3083,
22795,
29961,
8516,
29892,
29901,
1402,
3083,
9502,
29961,
8516,
29892,
29901,
11724,
9685,
353,
29871,
29900,
29897,
13,
18884,
4128,
29922,
9302,
29889,
3286,
4220,
29898,
16744,
29897,
13,
462,
13,
13,
18884,
413,
353,
1722,
29898,
1311,
29889,
9902,
29918,
9507,
29892,
525,
29874,
1495,
13,
18884,
363,
8636,
297,
4128,
29961,
16044,
287,
5387,
13,
462,
1678,
1347,
353,
525,
259,
15300,
7122,
4197,
710,
29898,
29886,
29897,
363,
282,
297,
8636,
2314,
13,
462,
1678,
413,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
18884,
413,
29889,
5358,
580,
13,
13,
9651,
565,
7442,
29889,
13707,
1195,
29898,
4161,
29906,
29897,
529,
1583,
29889,
4161,
29918,
1195,
29901,
13,
18884,
396,
960,
727,
338,
263,
716,
1375,
18558,
29906,
29901,
13,
18884,
1583,
29889,
4161,
29918,
1195,
353,
7442,
29889,
13707,
1195,
29898,
4161,
29906,
29897,
13,
18884,
396,
2158,
877,
11940,
716,
18558,
1375,
29901,
742,
1311,
29889,
4161,
29918,
1195,
29897,
13,
18884,
396,
337,
29899,
24219,
403,
304,
3544,
29914,
276,
622,
411,
716,
18558,
29918,
1195,
29901,
13,
462,
13,
18884,
565,
1353,
29918,
11831,
1169,
29918,
16044,
287,
2804,
29871,
29900,
29901,
13,
462,
1678,
1418,
353,
7442,
29889,
1359,
3945,
29898,
3150,
29898,
1311,
29889,
9902,
29918,
9507,
1699,
29878,
4968,
6144,
19657,
2433,
259,
13420,
299,
1195,
29922,
29906,
29897,
13,
462,
1678,
301,
29876,
22795,
353,
19691,
4130,
7503,
29892,
29896,
29900,
29962,
29899,
1311,
29889,
4161,
29918,
1195,
6802,
29906,
29889,
29900,
13,
462,
1678,
1418,
7503,
29892,
29896,
29896,
29962,
353,
301,
29876,
22795,
13,
462,
1678,
9259,
29918,
276,
1688,
353,
7442,
29889,
3062,
29898,
3083,
22795,
1405,
1418,
7503,
29892,
29896,
29906,
2314,
13,
462,
1678,
3855,
353,
1722,
29898,
1311,
29889,
9902,
29918,
9507,
29892,
525,
29893,
1495,
13,
462,
1678,
3855,
29889,
3539,
29898,
4905,
29918,
1445,
29918,
6672,
718,
6634,
29876,
1159,
13,
462,
1678,
363,
848,
297,
1418,
29961,
16044,
287,
29918,
276,
1688,
5387,
13,
462,
4706,
1347,
353,
525,
259,
15300,
7122,
4197,
710,
29898,
29881,
29897,
363,
270,
297,
848,
2314,
13,
462,
4706,
3855,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
462,
1678,
3855,
29889,
5358,
580,
13,
462,
1678,
1418,
29906,
353,
7442,
29889,
1359,
3945,
29898,
3150,
29898,
1311,
29889,
9902,
29918,
9507,
1699,
29878,
4968,
6144,
19657,
2433,
259,
13420,
299,
1195,
29922,
29906,
29897,
13,
462,
1678,
1353,
29918,
11831,
1169,
29918,
16044,
287,
29922,
4130,
29906,
29889,
12181,
29961,
29900,
29962,
13,
632,
13,
9651,
2425,
29918,
2798,
4619,
29871,
29896,
13,
9651,
396,
2158,
877,
7888,
2302,
742,
7888,
29918,
2798,
29897,
13,
9651,
2767,
29918,
18035,
29898,
4537,
29918,
11831,
1169,
29918,
16044,
287,
29892,
1311,
29889,
29940,
11831,
1169,
29897,
13,
13,
4706,
396,
697,
1833,
3544,
29914,
276,
622,
411,
2186,
18558,
29918,
1195,
995,
29901,
13,
4706,
1418,
353,
7442,
29889,
1359,
3945,
29898,
3150,
29898,
1311,
29889,
9902,
29918,
9507,
1699,
29878,
4968,
6144,
19657,
2433,
259,
13420,
299,
1195,
29922,
29906,
29897,
13,
4706,
301,
29876,
22795,
353,
19691,
4130,
7503,
29892,
29896,
29900,
29962,
29899,
1311,
29889,
4161,
29918,
1195,
6802,
29906,
29889,
29900,
13,
4706,
1418,
7503,
29892,
29896,
29896,
29962,
353,
301,
29876,
22795,
13,
4706,
9259,
29918,
276,
1688,
353,
7442,
29889,
3062,
29898,
3083,
22795,
1405,
1418,
7503,
29892,
29896,
29906,
2314,
13,
4706,
3855,
353,
1722,
29898,
1311,
29889,
9902,
29918,
9507,
29892,
525,
29893,
1495,
13,
4706,
3855,
29889,
3539,
29898,
4905,
29918,
1445,
29918,
6672,
718,
6634,
29876,
1159,
13,
4706,
363,
848,
297,
1418,
29961,
16044,
287,
29918,
276,
1688,
5387,
13,
9651,
1347,
353,
525,
259,
15300,
7122,
4197,
710,
29898,
29881,
29897,
363,
270,
297,
848,
2314,
13,
9651,
3855,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
4706,
3855,
29889,
5358,
580,
13,
13,
4706,
396,
746,
7743,
29892,
6441,
2582,
322,
3787,
297,
1203,
29901,
13,
4706,
1418,
353,
7442,
29889,
1359,
3945,
29898,
3150,
29898,
1311,
29889,
9902,
29918,
9507,
1699,
29878,
4968,
6144,
19657,
2433,
259,
13420,
299,
1195,
29922,
29906,
29897,
13,
4706,
1353,
29918,
11831,
1169,
29918,
16044,
287,
29922,
4130,
29889,
12181,
29961,
29900,
29962,
13,
4706,
1596,
877,
15790,
4186,
14836,
29901,
742,
1353,
29918,
11831,
1169,
29918,
16044,
287,
29897,
13,
4706,
396,
938,
616,
895,
2582,
1203,
322,
3787,
9259,
470,
14836,
29901,
13,
4706,
565,
1583,
29889,
15291,
29961,
29900,
29962,
2804,
29871,
29900,
29901,
13,
9651,
1583,
29889,
9902,
353,
17212,
29898,
11831,
1169,
353,
1418,
29892,
4046,
29918,
6468,
353,
7700,
29892,
4046,
29918,
29874,
459,
353,
7700,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
9902,
353,
17212,
29898,
11831,
1169,
353,
1418,
29892,
4046,
29918,
6468,
353,
5852,
29892,
4046,
29918,
29874,
459,
353,
7700,
29897,
13,
4706,
1583,
29889,
9902,
29889,
6422,
29898,
1311,
29889,
9902,
29889,
11831,
1169,
29897,
13,
13,
4706,
396,
5839,
280,
16766,
278,
2582,
5352,
29901,
13,
4706,
565,
1583,
29889,
3539,
29918,
9902,
29901,
13,
9651,
1583,
29889,
9902,
29889,
11371,
12191,
29898,
1311,
29889,
9902,
29918,
9507,
29889,
6506,
17350,
3945,
613,
11393,
29886,
6321,
4968,
2436,
29918,
726,
29918,
1445,
353,
7700,
29897,
13,
4706,
5040,
353,
27702,
29889,
2230,
580,
13,
4706,
1583,
29889,
9902,
29889,
3389,
29918,
2230,
353,
313,
9847,
448,
1369,
11877,
29884,
29889,
29879,
13,
4706,
396,
10272,
22663,
322,
2436,
304,
934,
29901,
13,
4706,
1583,
29889,
9902,
29889,
16202,
353,
624,
1446,
29898,
11831,
1169,
353,
1583,
29889,
9902,
29889,
11831,
1169,
29892,
2436,
29918,
517,
29918,
1445,
353,
1583,
29889,
3539,
29918,
16202,
29892,
10422,
353,
1583,
29889,
16202,
29918,
9507,
29897,
13,
632,
13,
1990,
17212,
29898,
3318,
1125,
13,
1678,
14550,
29909,
770,
363,
15446,
322,
11525,
18099,
278,
2582,
310,
278,
16980,
6216,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
470,
14836,
313,
29940,
11831,
1169,
921,
29871,
29896,
29941,
1409,
1125,
1409,
310,
9259,
470,
14836,
515,
320,
13,
9651,
438,
7818,
29902,
6216,
297,
278,
1021,
1797,
408,
278,
1494,
8393,
13,
4706,
269,
655,
313,
29896,
921,
4186,
14836,
1409,
1125,
12647,
29899,
21355,
9685,
297,
15232,
3471,
13,
4706,
3785,
313,
29896,
921,
4186,
14836,
1409,
1125,
3785,
297,
2440,
13,
4706,
16980,
29918,
29888,
13857,
313,
29896,
921,
4186,
14836,
1409,
1125,
15958,
310,
16980,
4940,
639,
3173,
509,
265,
320,
13,
9651,
13382,
278,
15500,
313,
29906,
29900,
29896,
29953,
29897,
2179,
2955,
373,
29889,
29871,
2630,
1041,
29901,
518,
29900,
29892,
29896,
29897,
13,
4706,
260,
29900,
313,
29896,
921,
4186,
14836,
1409,
1125,
2635,
310,
639,
3173,
509,
265,
13382,
297,
13677,
2440,
13,
4706,
16882,
313,
29896,
921,
4186,
14836,
1409,
1125,
16882,
296,
2200,
537,
13,
4706,
5528,
313,
29896,
921,
4186,
14836,
1409,
1125,
1343,
3381,
6198,
304,
10694,
310,
278,
14744,
297,
3587,
13,
4706,
263,
459,
313,
29896,
921,
4186,
14836,
1409,
1125,
1852,
29884,
882,
310,
639,
3173,
509,
265,
297,
3587,
13,
4706,
10906,
313,
29896,
921,
4186,
14836,
1409,
1125,
28745,
310,
12066,
2548,
2943,
297,
3587,
13,
4706,
286,
4260,
313,
29896,
921,
4186,
14836,
1409,
1125,
3001,
1788,
4158,
297,
341,
11445,
13,
4706,
5418,
313,
29896,
921,
4186,
14836,
1409,
1125,
5418,
304,
1788,
297,
6088,
2395,
13,
4706,
18558,
29906,
313,
29896,
921,
4186,
14836,
1409,
1125,
18558,
29985,
29906,
995,
363,
278,
16980,
13,
4706,
301,
29876,
22795,
313,
29896,
921,
4186,
14836,
1409,
1125,
1480,
6976,
310,
16980,
13,
4706,
301,
29876,
9502,
313,
29896,
921,
4186,
14836,
1409,
1125,
1480,
310,
4036,
376,
29881,
625,
9679,
29908,
363,
320,
13,
9651,
16980,
3544,
749,
29871,
13,
4706,
4046,
29918,
29874,
459,
29892,
4046,
29918,
6468,
313,
11227,
1125,
512,
278,
18070,
310,
28373,
12885,
5235,
29892,
320,
13,
9651,
727,
338,
263,
3587,
759,
4135,
1546,
1852,
310,
639,
3173,
509,
265,
322,
1472,
310,
12066,
2548,
320,
13,
9651,
2943,
29889,
29871,
13103,
6944,
338,
304,
4046,
697,
304,
278,
7292,
518,
29900,
29892,
29896,
29947,
29900,
29962,
3587,
29889,
320,
13,
9651,
2648,
2322,
29892,
658,
615,
29875,
13071,
10906,
304,
445,
7292,
565,
364,
29894,
353,
7700,
29889,
29871,
450,
1404,
508,
320,
13,
9651,
6755,
304,
4046,
263,
459,
2012,
491,
4444,
4046,
29918,
29874,
459,
353,
5852,
29892,
4046,
29918,
6468,
353,
7700,
29889,
320,
13,
9651,
450,
470,
14836,
7503,
29892,
29953,
29962,
313,
29874,
459,
29897,
322,
470,
14836,
7503,
29892,
29955,
29962,
313,
6468,
29897,
7049,
19905,
278,
2441,
1819,
29889,
320,
13,
13,
1678,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
470,
14836,
353,
19997,
4046,
29918,
29874,
459,
353,
7700,
29892,
4046,
29918,
6468,
353,
5852,
1125,
13,
4706,
1583,
29889,
11831,
1169,
353,
470,
14836,
13,
4706,
1583,
29889,
13400,
29918,
6468,
353,
4046,
29918,
6468,
13,
4706,
1583,
29889,
13400,
29918,
29874,
459,
353,
4046,
29918,
29874,
459,
13,
13,
1678,
822,
10318,
29898,
1311,
29892,
470,
14836,
1125,
13,
4706,
14550,
26772,
3161,
310,
278,
376,
11831,
1169,
29908,
5352,
322,
19450,
13,
4706,
278,
19528,
2410,
1543,
8393,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
470,
14836,
313,
2749,
1125,
470,
14836,
1409,
515,
17212,
770,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
1583,
29889,
29879,
655,
353,
470,
14836,
7503,
29892,
29900,
29962,
13,
4706,
1583,
29889,
19145,
353,
470,
14836,
7503,
29892,
29896,
29962,
13,
4706,
1583,
29889,
272,
2966,
29918,
29888,
13857,
353,
470,
14836,
7503,
29892,
29906,
29962,
13,
4706,
1583,
29889,
29873,
29900,
353,
470,
14836,
7503,
29892,
29941,
29962,
13,
4706,
1583,
29889,
29872,
617,
353,
470,
14836,
7503,
29892,
29946,
29962,
13,
4706,
1583,
29889,
3742,
353,
470,
14836,
7503,
29892,
29945,
29962,
13,
4706,
1583,
29889,
29874,
459,
353,
470,
14836,
7503,
29892,
29953,
29962,
13,
4706,
565,
1583,
29889,
13400,
29918,
29874,
459,
29901,
13,
9651,
1583,
29889,
29874,
459,
353,
4046,
29918,
517,
29918,
29896,
29947,
29900,
12163,
29898,
1311,
29889,
29874,
459,
29897,
13,
4706,
1583,
29889,
6468,
353,
470,
14836,
7503,
29892,
29955,
29962,
1273,
29871,
29941,
29953,
29900,
13,
4706,
565,
1583,
29889,
13400,
29918,
6468,
29901,
13,
9651,
1583,
29889,
6468,
353,
4046,
29918,
517,
29918,
29896,
29947,
29900,
12163,
29898,
1311,
29889,
6468,
29897,
13,
4706,
1583,
29889,
29885,
4260,
353,
470,
14836,
7503,
29892,
29947,
29962,
13,
4706,
1583,
29889,
19244,
353,
470,
14836,
7503,
29892,
29929,
29962,
13,
4706,
1583,
29889,
4161,
29906,
353,
470,
14836,
7503,
29892,
29896,
29900,
29962,
13,
4706,
1583,
29889,
3083,
22795,
353,
470,
14836,
7503,
29892,
29896,
29896,
29962,
13,
4706,
1583,
29889,
3083,
9502,
353,
470,
14836,
7503,
29892,
29896,
29906,
29962,
13,
13,
1678,
822,
16913,
12191,
29898,
1311,
29892,
10422,
29892,
2436,
29918,
726,
29918,
1445,
353,
7700,
29892,
1426,
29918,
9507,
353,
6213,
1125,
13,
4706,
14550,
11371,
278,
470,
14836,
322,
19528,
2410,
4128,
8393,
297,
263,
5839,
280,
934,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
10422,
313,
710,
1125,
10422,
363,
5839,
280,
934,
13,
9651,
2436,
29918,
726,
29918,
1445,
313,
11227,
1125,
565,
5852,
29892,
884,
2436,
714,
278,
9259,
470,
14836,
304,
263,
320,
13,
18884,
5199,
19909,
1426,
934,
13,
9651,
1426,
29918,
9507,
313,
11227,
1125,
565,
2436,
29918,
517,
29918,
726,
353,
5852,
29892,
1580,
361,
1598,
10422,
363,
1426,
934,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
5839,
280,
29889,
15070,
29898,
1311,
29892,
1722,
29898,
10422,
29892,
376,
29893,
29890,
29908,
1723,
1723,
13,
13,
4706,
396,
2436,
2582,
304,
934,
29901,
13,
4706,
565,
2436,
29918,
726,
29918,
1445,
29901,
13,
9651,
413,
353,
1722,
29898,
726,
29918,
9507,
29892,
525,
29874,
1495,
13,
9651,
363,
8636,
297,
1583,
29889,
11831,
1169,
29901,
13,
18884,
1347,
353,
525,
259,
15300,
7122,
4197,
710,
29898,
29886,
29897,
363,
282,
297,
8636,
2314,
13,
18884,
413,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
9651,
413,
29889,
5358,
580,
13,
13,
1678,
822,
16012,
12191,
29898,
1311,
29892,
10422,
29892,
9773,
353,
7700,
1125,
13,
4706,
14550,
6359,
297,
278,
470,
14836,
322,
19528,
2410,
4128,
8393,
515,
263,
5839,
280,
934,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
10422,
313,
710,
1125,
10422,
310,
5839,
280,
934,
304,
2254,
13,
9651,
9773,
313,
11227,
1125,
565,
5852,
29892,
9773,
1303,
297,
16980,
11916,
304,
1790,
17212,
320,
13,
18884,
1203,
29889,
29871,
13109,
353,
7700,
29889,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
2582,
29918,
262,
353,
5839,
280,
29889,
1359,
29898,
1722,
29898,
10422,
29892,
376,
6050,
29908,
1723,
1723,
13,
4706,
565,
9773,
1275,
7700,
29901,
13,
9651,
1583,
29889,
11831,
1169,
353,
2582,
29918,
262,
29889,
11831,
1169,
13,
9651,
1583,
29889,
6422,
29898,
1311,
29889,
11831,
1169,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
11831,
1169,
353,
7442,
29889,
29894,
1429,
3552,
1311,
29889,
11831,
1169,
29892,
9902,
29918,
262,
29889,
11831,
1169,
876,
13,
9651,
1583,
29889,
6422,
29898,
1311,
29889,
11831,
1169,
29897,
13,
13,
1678,
396,
6492,
1259,
2582,
29901,
13,
1678,
822,
18399,
29950,
2879,
29898,
1311,
1125,
13,
4706,
14550,
20867,
29871,
29896,
29899,
29881,
9825,
468,
25402,
310,
19528,
2410,
3161,
525,
29879,
655,
3788,
29872,
617,
3788,
3742,
3788,
29874,
459,
3788,
6468,
3788,
29873,
29900,
29915,
515,
6216,
2582,
29889,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
565,
7431,
29898,
1311,
29889,
29879,
655,
529,
29871,
29945,
29900,
1125,
13,
9651,
289,
1144,
353,
29871,
29945,
29900,
13,
4706,
1683,
29901,
13,
9651,
289,
1144,
353,
525,
11512,
29915,
13,
4706,
2537,
353,
14770,
29889,
4532,
29898,
1003,
2311,
7607,
29941,
29900,
29892,
29871,
29945,
29889,
29945,
876,
13,
4706,
8636,
353,
7442,
29889,
2378,
4197,
1311,
29889,
29879,
655,
29892,
1311,
29889,
29872,
617,
29892,
1311,
29889,
3742,
29892,
1311,
29889,
29874,
459,
29892,
1311,
29889,
6468,
29892,
1311,
29889,
29873,
29900,
2314,
13,
4706,
2983,
353,
7442,
29889,
2378,
18959,
29879,
655,
3788,
29872,
617,
3788,
3742,
3788,
29874,
459,
3788,
6468,
3788,
29873,
29900,
11287,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
7529,
22164,
13,
9651,
4853,
353,
14770,
29889,
1491,
5317,
29906,
7720,
3552,
29896,
29892,
2435,
29898,
7529,
8243,
313,
29900,
29892,
29875,
876,
13,
9651,
14770,
29889,
29882,
391,
29898,
7529,
29961,
29875,
1402,
29890,
1144,
29922,
29890,
1144,
29892,
12864,
2780,
2433,
9290,
742,
2312,
29922,
29900,
29889,
29947,
29897,
13,
9651,
14770,
29889,
24667,
29918,
7529,
29898,
8990,
2433,
20313,
742,
2175,
29922,
8824,
29892,
2246,
29922,
8824,
29892,
1492,
29922,
8824,
29892,
5970,
29922,
5574,
29892,
320,
13,
462,
1678,
3858,
1563,
29922,
8824,
29892,
3858,
3332,
29922,
8824,
29892,
3858,
1266,
29922,
8824,
29892,
3858,
8968,
29922,
5574,
29897,
13,
9651,
14770,
29889,
486,
7358,
29898,
5450,
362,
29922,
29946,
29945,
29892,
4079,
2311,
353,
29871,
29906,
29900,
29897,
13,
9651,
14770,
29889,
29916,
1643,
29898,
7039,
29961,
29875,
1402,
4079,
2311,
353,
29871,
29906,
29945,
29897,
13,
4706,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
4706,
736,
2537,
13,
13,
1678,
822,
18399,
2816,
14836,
29898,
1311,
29892,
2927,
353,
5852,
29892,
2927,
1646,
353,
5852,
29892,
2143,
29918,
1022,
2878,
353,
29871,
29906,
29900,
29896,
29953,
29889,
29900,
29892,
2159,
353,
29871,
29896,
29900,
29900,
29892,
6492,
29941,
29881,
353,
7700,
29892,
274,
1958,
353,
525,
2405,
333,
275,
742,
29916,
2576,
29922,
8824,
29892,
29891,
2576,
29922,
8824,
1125,
13,
4706,
14550,
20867,
263,
4036,
9262,
310,
470,
14836,
515,
278,
4559,
297,
278,
10694,
310,
278,
14744,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2927,
313,
11227,
1125,
565,
5852,
29892,
6492,
16980,
16257,
773,
263,
784,
555,
481,
6287,
304,
16980,
15958,
313,
21646,
29897,
320,
13,
18884,
4940,
15500,
2635,
313,
29906,
29900,
29896,
29945,
29889,
29945,
467,
29871,
960,
7700,
29892,
16980,
16257,
674,
367,
4628,
29889,
29871,
13109,
353,
5852,
13,
9651,
2927,
1646,
313,
11227,
1125,
565,
5852,
322,
2927,
353,
5852,
29892,
6492,
2927,
1646,
363,
16980,
8576,
13,
9651,
2143,
29918,
1022,
2878,
313,
1579,
29873,
1125,
3407,
21502,
305,
363,
11580,
470,
14836,
29889,
29871,
13109,
353,
29871,
29906,
29900,
29896,
29945,
29889,
29945,
29871,
13,
9651,
2159,
313,
524,
1125,
9681,
310,
470,
14836,
304,
6492,
29889,
29871,
13109,
353,
5852,
13,
9651,
6492,
29941,
29881,
313,
11227,
1125,
960,
5852,
29892,
736,
263,
6492,
310,
470,
14836,
297,
29871,
29941,
29928,
2913,
29889,
13109,
353,
7700,
13,
9651,
274,
1958,
313,
710,
1125,
784,
555,
481,
363,
16980,
8576,
6492,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
396,
16968,
9262,
310,
470,
14836,
304,
6492,
29901,
13,
4706,
565,
7431,
29898,
1311,
29889,
29879,
655,
29897,
1405,
2159,
29901,
13,
9651,
396,
565,
727,
526,
901,
470,
14836,
1135,
7429,
2159,
29892,
20459,
1831,
470,
14836,
515,
13,
9651,
396,
278,
13446,
4559,
29901,
13,
9651,
1399,
353,
7442,
29889,
8172,
29889,
16957,
29898,
3881,
29898,
29900,
29892,
2435,
29898,
1311,
29889,
29879,
655,
8243,
6506,
29922,
8824,
29892,
2311,
29922,
2311,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
565,
727,
526,
28145,
470,
14836,
1135,
7429,
2159,
29892,
2125,
599,
310,
963,
29901,
13,
9651,
1399,
353,
7442,
29889,
8172,
29889,
16957,
29898,
3881,
29898,
29900,
29892,
2435,
29898,
1311,
29889,
29879,
655,
8243,
6506,
29922,
8824,
29892,
2311,
29922,
2435,
29898,
1311,
29889,
29879,
655,
876,
13,
13,
4706,
515,
12655,
1053,
10345,
29892,
564,
312,
273,
29892,
18074,
2273,
29892,
6776,
29892,
4457,
29892,
564,
617,
359,
13,
4706,
396,
3858,
363,
784,
555,
481,
9685,
29901,
13,
4706,
2927,
1643,
353,
525,
4819,
559,
29915,
13,
4706,
396,
1653,
4377,
29901,
13,
4706,
2537,
353,
14770,
29889,
4532,
29898,
1003,
2311,
353,
313,
29955,
29889,
29945,
29892,
29871,
29953,
29889,
876,
13,
4706,
14770,
29889,
7720,
29898,
3137,
29922,
2396,
1495,
13,
4706,
396,
21292,
1060,
9685,
363,
18865,
29901,
13,
4706,
14770,
29889,
29887,
1113,
2141,
262,
1765,
29918,
29916,
8990,
580,
13,
4706,
565,
6492,
29941,
29881,
29901,
13,
9651,
396,
8561,
29871,
29941,
29881,
9685,
1203,
29901,
13,
9651,
4853,
353,
2537,
29889,
1202,
29918,
1491,
5317,
29898,
29896,
29896,
29896,
29892,
18246,
2433,
29941,
29881,
1495,
13,
9651,
396,
6492,
6555,
5810,
29901,
13,
9651,
4853,
29889,
1557,
2620,
29898,
29900,
29892,
29900,
29892,
29900,
29892,
2780,
2433,
272,
927,
742,
22976,
2433,
29930,
742,
29879,
29922,
29941,
29900,
29900,
29892,
29920,
2098,
29922,
29896,
29900,
29897,
13,
9651,
4853,
29889,
842,
29918,
29920,
1643,
877,
29999,
313,
1159,
742,
5657,
2311,
29922,
29906,
29900,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
6492,
6555,
5810,
29901,
13,
9651,
14770,
29889,
1557,
2620,
29898,
29900,
29892,
29900,
29892,
2780,
2433,
272,
927,
742,
22976,
2433,
29930,
742,
29879,
29922,
29941,
29900,
29900,
29892,
29920,
2098,
29922,
29896,
29900,
29897,
13,
4706,
396,
1152,
1269,
16980,
297,
278,
4036,
9262,
515,
278,
13446,
11916,
29901,
13,
4706,
363,
263,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
297,
14319,
29898,
1311,
29889,
29879,
655,
29961,
513,
1402,
1311,
29889,
19145,
29961,
513,
1402,
1311,
29889,
29873,
29900,
29961,
513,
1402,
1311,
29889,
29872,
617,
29961,
513,
1402,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
3742,
29961,
513,
11724,
29905,
13,
462,
1678,
7442,
29889,
3665,
5834,
29898,
1311,
29889,
29874,
459,
29961,
513,
11724,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
6468,
29961,
513,
12622,
29901,
13,
9651,
396,
4529,
385,
1409,
310,
3064,
3412,
16980,
29901,
13,
9651,
3064,
353,
7442,
29889,
1915,
3493,
29898,
999,
29918,
1022,
2878,
29892,
999,
29918,
1022,
2878,
29974,
29911,
29892,
29945,
29900,
29900,
29900,
29897,
13,
9651,
1060,
29892,
29979,
29892,
29999,
353,
7442,
29889,
2378,
29898,
2636,
511,
9302,
29889,
2378,
29898,
2636,
511,
9302,
29889,
2378,
4197,
2314,
13,
9651,
382,
353,
7442,
29889,
2378,
4197,
2314,
13,
9651,
396,
11796,
29872,
1060,
29892,
29979,
29892,
29999,
11909,
363,
1269,
931,
29901,
13,
9651,
363,
260,
297,
3064,
29901,
13,
18884,
302,
353,
313,
29906,
29930,
9302,
29889,
1631,
6802,
29911,
13,
18884,
341,
353,
302,
16395,
29873,
29899,
517,
29897,
13,
18884,
2446,
29923,
353,
518,
18386,
1609,
29918,
2929,
345,
29898,
29872,
617,
296,
2200,
537,
29918,
273,
290,
14997,
29892,
722,
29924,
29892,
5280,
29892,
29871,
29900,
29889,
29900,
29900,
29896,
29897,
363,
722,
29924,
29892,
5280,
297,
14319,
4197,
29924,
16272,
29872,
2314,
29962,
13,
18884,
382,
353,
7442,
29889,
4397,
29898,
29923,
29892,
4622,
29923,
29897,
13,
9651,
364,
29896,
353,
263,
16395,
29896,
9229,
29872,
29930,
3944,
29898,
29923,
876,
13,
9651,
285,
29896,
353,
18074,
2273,
29898,
29896,
29889,
29974,
29872,
11877,
5223,
29898,
29923,
29914,
29906,
1846,
13,
9651,
285,
29906,
353,
18074,
2273,
29898,
29896,
9229,
29872,
11877,
3944,
29898,
29923,
29914,
29906,
1846,
13,
9651,
285,
353,
29871,
29906,
5575,
9302,
29889,
27014,
273,
29906,
29898,
29888,
29896,
29892,
29888,
29906,
29897,
13,
9651,
364,
353,
313,
29874,
16395,
29896,
9229,
29872,
1068,
29906,
876,
14571,
29896,
29889,
17108,
29872,
29930,
3944,
29898,
29888,
4961,
13,
9651,
1060,
29896,
353,
364,
334,
313,
6776,
29898,
29949,
11877,
3944,
29898,
29893,
29974,
29888,
29897,
448,
4457,
29898,
29949,
11877,
5223,
29898,
29893,
29974,
29888,
11877,
3944,
29898,
29875,
29897,
1723,
13,
9651,
612,
29896,
353,
364,
334,
313,
4457,
29898,
29949,
11877,
3944,
29898,
29893,
29974,
29888,
29897,
718,
6776,
29898,
29949,
11877,
5223,
29898,
29893,
29974,
29888,
11877,
3944,
29898,
29875,
29897,
1723,
13,
9651,
796,
29896,
353,
364,
334,
4457,
29898,
29893,
29974,
29888,
29897,
334,
4457,
29898,
29875,
29897,
13,
9651,
1060,
29892,
29979,
29892,
29999,
353,
7442,
29889,
4397,
29898,
29990,
29892,
29990,
29896,
511,
9302,
29889,
4397,
29898,
29979,
29892,
29979,
29896,
511,
9302,
29889,
4397,
29898,
29999,
29892,
29999,
29896,
29897,
13,
9651,
396,
18399,
278,
1060,
29892,
29979,
29898,
29999,
29897,
11909,
29901,
13,
9651,
565,
451,
6492,
29941,
29881,
29901,
13,
18884,
565,
2927,
29901,
13,
462,
1678,
14770,
29889,
1557,
2620,
29898,
29979,
29892,
29990,
29892,
29883,
29922,
3552,
3706,
29899,
999,
29918,
1022,
2878,
6802,
29911,
511,
29883,
1958,
29922,
29883,
1958,
29892,
29879,
29922,
29941,
29892,
29880,
29893,
29922,
29900,
29897,
13,
462,
1678,
14770,
29889,
29887,
1113,
2141,
842,
29918,
294,
1103,
877,
11745,
742,
10365,
519,
2433,
29881,
2075,
326,
1495,
13,
18884,
1683,
29901,
13,
462,
1678,
14770,
29889,
5317,
29898,
29979,
29892,
29990,
29892,
2927,
2433,
8517,
742,
2312,
29922,
29900,
29889,
29941,
29897,
13,
462,
1678,
14770,
29889,
29887,
1113,
2141,
842,
29918,
294,
1103,
877,
11745,
742,
10365,
519,
2433,
29881,
2075,
326,
1495,
13,
9651,
565,
6492,
29941,
29881,
29901,
13,
18884,
515,
286,
572,
29918,
10154,
29895,
1169,
29889,
29885,
5317,
29941,
29881,
1053,
319,
9100,
29941,
29928,
13,
18884,
565,
2927,
29901,
13,
462,
1678,
4853,
29889,
1557,
2620,
29898,
29979,
29892,
29990,
29892,
29999,
29892,
29883,
29922,
3552,
3706,
29899,
999,
29918,
1022,
2878,
6802,
29911,
511,
29883,
1958,
29922,
29883,
1958,
29892,
29879,
29922,
29941,
29892,
29880,
29893,
29922,
29900,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
4853,
29889,
5317,
29898,
29979,
29892,
29990,
29892,
29999,
29892,
2927,
2433,
8517,
742,
2312,
29922,
29900,
29889,
29941,
29897,
13,
4706,
396,
6492,
2927,
1646,
29901,
13,
4706,
565,
451,
6492,
29941,
29881,
29901,
13,
9651,
565,
2927,
29901,
13,
18884,
565,
2927,
1646,
1275,
5852,
29901,
13,
462,
1678,
26324,
353,
14770,
29889,
2780,
1646,
2141,
842,
29918,
1643,
29898,
2780,
1643,
29892,
4079,
2311,
29922,
29906,
29900,
29897,
13,
462,
1678,
14770,
29889,
29887,
1113,
2141,
24667,
29918,
7529,
29898,
1643,
2311,
29922,
29896,
29946,
29897,
13,
13,
4706,
14770,
29889,
29891,
1643,
877,
6185,
313,
1159,
742,
5657,
2311,
29922,
29906,
29900,
29897,
13,
4706,
14770,
29889,
29916,
1643,
877,
4717,
313,
1159,
742,
5657,
2311,
29922,
29906,
29900,
29897,
13,
4706,
14770,
29889,
29887,
1113,
2141,
24667,
29918,
7529,
29898,
1643,
2311,
29922,
29896,
29946,
29897,
13,
4706,
565,
29898,
29916,
2576,
1125,
13,
9651,
14770,
29889,
29916,
2576,
29898,
29916,
2576,
29897,
13,
4706,
565,
29898,
29891,
2576,
1125,
13,
9651,
14770,
29889,
29891,
2576,
29898,
29891,
2576,
29897,
13,
4706,
736,
2537,
13,
13,
1678,
822,
18399,
29903,
1022,
7228,
29898,
1311,
29892,
2143,
29918,
1022,
2878,
353,
29871,
29906,
29900,
29896,
29953,
29889,
29900,
29892,
2159,
353,
29871,
29896,
29900,
29900,
29892,
3064,
8357,
353,
518,
29906,
29900,
29892,
29906,
29900,
1402,
16980,
2780,
353,
525,
7912,
9539,
29374,
13,
4706,
14550,
20867,
263,
4036,
9262,
310,
470,
14836,
515,
278,
4559,
297,
23683,
322,
2602,
10696,
408,
29871,
13,
4706,
263,
740,
310,
931,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2143,
29918,
1022,
2878,
313,
1579,
29873,
1125,
3407,
21502,
305,
363,
11580,
470,
14836,
29889,
29871,
13109,
353,
29871,
29906,
29900,
29896,
29945,
29889,
29945,
29871,
13,
9651,
2159,
313,
524,
1125,
9681,
310,
470,
14836,
304,
6492,
29889,
29871,
13109,
353,
5852,
13,
9651,
3064,
8357,
313,
23583,
29892,
938,
1125,
1353,
310,
2440,
1434,
518,
29900,
29962,
322,
1156,
518,
29896,
29962,
278,
2143,
21502,
305,
304,
320,
13,
18884,
6492,
16345,
322,
3300,
13,
9651,
16980,
2780,
313,
710,
1125,
2927,
304,
671,
304,
6492,
278,
470,
14836,
13,
13,
4706,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
4706,
14550,
13,
4706,
396,
16968,
9262,
310,
470,
14836,
304,
6492,
29901,
13,
4706,
565,
7431,
29898,
1311,
29889,
29879,
655,
29897,
1405,
2159,
29901,
13,
9651,
396,
565,
727,
526,
901,
470,
14836,
1135,
7429,
2159,
29892,
20459,
1831,
470,
14836,
515,
13,
9651,
396,
278,
13446,
4559,
29901,
13,
9651,
1399,
353,
7442,
29889,
8172,
29889,
16957,
29898,
3881,
29898,
29900,
29892,
2435,
29898,
1311,
29889,
29879,
655,
8243,
6506,
29922,
8824,
29892,
2311,
29922,
2311,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
565,
727,
526,
28145,
470,
14836,
1135,
7429,
2159,
29892,
2125,
599,
310,
963,
29901,
13,
9651,
1399,
353,
7442,
29889,
8172,
29889,
16957,
29898,
3881,
29898,
29900,
29892,
2435,
29898,
1311,
29889,
29879,
655,
8243,
6506,
29922,
8824,
29892,
2311,
29922,
2435,
29898,
1311,
29889,
29879,
655,
876,
13,
13,
4706,
515,
12655,
1053,
10345,
29892,
564,
312,
273,
29892,
18074,
2273,
29892,
6776,
29892,
4457,
29892,
564,
617,
359,
13,
4706,
396,
1207,
4377,
13,
4706,
2537,
353,
14770,
29889,
4532,
29898,
1003,
2311,
353,
313,
29947,
29892,
29871,
29896,
29900,
876,
13,
4706,
396,
4529,
1014,
26762,
29901,
13,
4706,
14770,
29889,
1491,
5317,
29898,
29906,
29892,
29896,
29892,
29896,
29897,
13,
4706,
14770,
29889,
29887,
1113,
2141,
24667,
29918,
7529,
29898,
1643,
2311,
29922,
29896,
29946,
29897,
13,
4706,
14770,
29889,
7720,
29898,
3137,
29922,
2396,
1495,
13,
4706,
396,
4529,
3064,
304,
10272,
16345,
29914,
3274,
29901,
13,
4706,
260,
1195,
29892,
29873,
3317,
353,
2143,
29918,
1022,
2878,
448,
3064,
8357,
29961,
29900,
1402,
999,
29918,
1022,
2878,
718,
3064,
8357,
29961,
29896,
29962,
13,
4706,
260,
353,
7442,
29889,
1915,
3493,
29898,
29873,
1195,
29892,
29873,
3317,
29892,
29906,
29900,
29900,
29900,
29897,
13,
4706,
2635,
29918,
29873,
7358,
353,
7442,
29889,
279,
927,
29898,
29873,
1195,
29892,
29873,
3317,
29892,
29896,
29900,
29897,
13,
4706,
396,
363,
1269,
4629,
16980,
515,
278,
4559,
29901,
13,
4706,
363,
263,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
297,
14319,
29898,
1311,
29889,
29879,
655,
29961,
513,
1402,
1311,
29889,
19145,
29961,
513,
1402,
1311,
29889,
29873,
29900,
29961,
513,
1402,
1311,
29889,
29872,
617,
29961,
513,
1402,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
3742,
29961,
513,
11724,
29905,
13,
462,
1678,
7442,
29889,
3665,
5834,
29898,
1311,
29889,
29874,
459,
29961,
513,
11724,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
6468,
29961,
513,
12622,
29901,
13,
9651,
1060,
353,
7442,
29889,
2378,
4197,
2314,
13,
9651,
612,
353,
7442,
29889,
2378,
4197,
2314,
13,
9651,
396,
10272,
1060,
29892,
29979,
472,
1269,
931,
1298,
29901,
13,
9651,
1060,
29896,
29892,
29979,
29896,
353,
470,
14836,
29918,
1454,
29918,
5317,
1259,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29873,
29897,
13,
9651,
1060,
353,
7442,
29889,
4397,
29898,
29990,
29892,
1060,
29896,
29897,
13,
9651,
612,
353,
7442,
29889,
4397,
29898,
29979,
29892,
29979,
29896,
29897,
13,
9651,
396,
10272,
16345,
29901,
13,
9651,
364,
29922,
9302,
29889,
3676,
3552,
29990,
1068,
29906,
7240,
29898,
29979,
1068,
29906,
876,
13,
9651,
396,
6492,
16345,
297,
5516,
29901,
13,
9651,
14770,
29889,
5317,
29898,
29873,
29892,
29878,
29930,
29896,
29900,
29900,
29900,
29892,
2780,
29922,
272,
2966,
2780,
29892,
2312,
29922,
29900,
29889,
29945,
29897,
13,
4706,
14770,
29889,
29891,
1643,
29898,
29878,
29915,
4535,
4650,
29938,
313,
8247,
29897,
742,
5657,
2311,
29922,
29906,
29900,
29897,
13,
13,
4706,
396,
2446,
480,
5317,
29901,
13,
4706,
14770,
29889,
1491,
5317,
29898,
29906,
29892,
29896,
29892,
29906,
29897,
13,
4706,
14770,
29889,
7720,
29898,
3137,
29922,
2396,
1495,
13,
4706,
396,
363,
1269,
4629,
16980,
515,
278,
4559,
29901,
13,
4706,
363,
263,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
297,
14319,
29898,
1311,
29889,
29879,
655,
29961,
513,
1402,
1311,
29889,
19145,
29961,
513,
1402,
1311,
29889,
29873,
29900,
29961,
513,
1402,
1311,
29889,
29872,
617,
29961,
513,
1402,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
3742,
29961,
513,
11724,
29905,
13,
462,
1678,
7442,
29889,
3665,
5834,
29898,
1311,
29889,
29874,
459,
29961,
513,
11724,
9302,
29889,
3665,
5834,
29898,
1311,
29889,
6468,
29961,
513,
12622,
29901,
13,
9651,
1060,
353,
7442,
29889,
2378,
4197,
2314,
13,
9651,
612,
353,
7442,
29889,
2378,
4197,
2314,
13,
9651,
1060,
29896,
29892,
29979,
29896,
353,
470,
14836,
29918,
1454,
29918,
5317,
1259,
29898,
29874,
29892,
29911,
29892,
517,
29892,
29872,
29892,
29875,
29892,
29893,
29892,
29949,
29892,
29873,
29897,
13,
9651,
1060,
353,
7442,
29889,
4397,
29898,
29990,
29892,
1060,
29896,
29897,
13,
9651,
612,
353,
7442,
29889,
4397,
29898,
29979,
29892,
29979,
29896,
29897,
13,
9651,
396,
10272,
3300,
29901,
13,
9651,
278,
941,
29922,
9302,
29889,
27014,
273,
29906,
29898,
29990,
6653,
29979,
29897,
13,
9651,
278,
941,
7607,
9302,
29889,
311,
7979,
267,
29898,
3416,
7240,
29906,
29955,
29900,
1846,
29995,
29941,
29953,
29900,
13,
9651,
396,
6492,
372,
29901,
13,
9651,
14770,
29889,
5317,
29898,
29873,
29892,
3416,
29892,
2780,
29922,
272,
2966,
2780,
29892,
2312,
29922,
29900,
29889,
29945,
29897,
13,
4706,
14770,
29889,
29891,
1643,
29898,
29878,
29915,
29925,
29889,
29909,
29889,
313,
12163,
29897,
742,
5657,
2311,
29922,
29896,
29929,
29897,
13,
4706,
14770,
29889,
29916,
1643,
877,
12883,
29879,
742,
5657,
2311,
29922,
29896,
29929,
29897,
13,
4706,
14770,
29889,
29887,
1113,
2141,
24667,
29918,
7529,
29898,
1643,
2311,
29922,
29896,
29946,
29897,
13,
4706,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
4706,
736,
2537,
13,
632,
13,
1990,
624,
1446,
29898,
3318,
1125,
13,
1678,
14550,
29909,
770,
363,
15446,
322,
11525,
18099,
278,
13964,
310,
278,
2582,
310,
278,
16980,
6216,
29889,
13,
13,
1678,
1152,
1432,
3443,
29892,
727,
338,
263,
3652,
310,
22663,
15712,
322,
7160,
408,
22663,
29889,
3207,
29889,
6112,
13,
13,
1678,
1222,
9422,
29901,
13,
4706,
22663,
29889,
29879,
655,
29889,
12676,
353,
2099,
310,
3031,
326,
1175,
272,
9685,
13,
4706,
22663,
29889,
29872,
617,
29889,
455,
29953,
29947,
353,
29871,
29953,
29947,
29995,
16420,
7292,
363,
16882,
296,
2200,
537,
13,
4706,
22663,
29889,
29874,
459,
29889,
4172,
353,
3918,
29522,
310,
1852,
310,
639,
3173,
509,
265,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
470,
14836,
313,
29940,
11831,
1169,
921,
29871,
29896,
29941,
1409,
1125,
1409,
310,
9259,
470,
14836,
515,
320,
13,
9651,
438,
7818,
29902,
6216,
297,
278,
1021,
1797,
408,
278,
1494,
8393,
13,
4706,
1828,
29889,
12676,
313,
1579,
29873,
1125,
2099,
310,
3443,
15712,
773,
7442,
29889,
12676,
13,
4706,
1828,
29889,
2168,
713,
313,
1579,
29873,
1125,
7442,
29889,
2168,
713,
310,
3443,
13,
4706,
1828,
29889,
8513,
313,
1579,
29873,
1125,
4464,
310,
3443,
13,
4706,
1828,
29889,
4172,
313,
1579,
29873,
1125,
3918,
29522,
515,
7442,
29889,
4172,
13,
4706,
1828,
29889,
455,
29953,
29947,
313,
23583,
29892,
1579,
29873,
1125,
29871,
29953,
29947,
29995,
9212,
6625,
1821,
7292,
310,
883,
313,
13609,
3216,
29892,
7568,
3216,
29897,
13,
4706,
1828,
29889,
455,
29929,
29945,
313,
23583,
29892,
1579,
29873,
1125,
29871,
29929,
29945,
29995,
9212,
6625,
1821,
7292,
13,
4706,
2436,
29918,
517,
29918,
1445,
313,
11227,
1125,
960,
5852,
29892,
2436,
22663,
304,
263,
5199,
29899,
949,
29890,
744,
1426,
934,
29889,
13,
4706,
10422,
313,
710,
1125,
10422,
363,
14238,
22663,
934,
29889,
29871,
960,
451,
19056,
29892,
2322,
320,
13,
9651,
1024,
338,
383,
277,
12191,
29889,
25060,
29889,
29891,
29889,
4346,
29889,
29881,
29889,
29882,
29889,
29885,
29889,
29879,
29889,
29886,
6321,
29892,
7160,
297,
1021,
3884,
408,
6216,
471,
1065,
29889,
13,
13,
308,
13,
1678,
16849,
841,
491,
529,
5813,
10202,
29871,
29906,
29900,
29906,
29900,
13,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
470,
14836,
353,
19997,
2436,
29918,
517,
29918,
1445,
353,
7700,
29892,
10422,
353,
6213,
1125,
13,
4706,
1583,
29889,
11831,
1169,
353,
470,
14836,
13,
4706,
396,
11796,
29872,
22663,
373,
3443,
7049,
322,
4078,
408,
8393,
29901,
13,
4706,
1583,
29889,
29879,
655,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29900,
2314,
13,
4706,
1583,
29889,
19145,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29896,
2314,
13,
4706,
1583,
29889,
272,
2966,
29918,
29888,
13857,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29906,
2314,
13,
4706,
1583,
29889,
29873,
29900,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29941,
2314,
13,
4706,
1583,
29889,
29872,
617,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29946,
2314,
13,
4706,
1583,
29889,
3742,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29945,
2314,
13,
4706,
1583,
29889,
29874,
459,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29953,
2314,
13,
4706,
1583,
29889,
6468,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29955,
2314,
13,
4706,
1583,
29889,
29885,
4260,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29947,
2314,
13,
4706,
1583,
29889,
19244,
353,
624,
1446,
4035,
1990,
29898,
1311,
29889,
11831,
1169,
7503,
29892,
29929,
2314,
13,
13,
4706,
565,
2436,
29918,
517,
29918,
1445,
29901,
13,
9651,
8636,
353,
7442,
29889,
2378,
4197,
1311,
29889,
29879,
655,
29892,
1311,
29889,
19145,
29892,
1311,
29889,
272,
2966,
29918,
29888,
13857,
29892,
1311,
29889,
29873,
29900,
29892,
1311,
29889,
29872,
617,
29892,
1311,
29889,
3742,
2053,
13,
18884,
1583,
29889,
29874,
459,
29892,
1311,
29889,
6468,
29892,
1311,
29889,
29885,
4260,
29892,
1311,
29889,
19244,
2314,
13,
9651,
2983,
353,
7442,
29889,
2378,
18959,
29879,
655,
3788,
19145,
3788,
272,
2966,
15958,
3788,
29873,
29900,
3788,
29872,
617,
3788,
3742,
3788,
29874,
459,
3788,
6468,
3788,
29885,
4260,
3788,
19244,
11287,
13,
9651,
565,
451,
10422,
29901,
13,
18884,
10422,
353,
525,
29943,
277,
12191,
29889,
25060,
6169,
29974,
2230,
29889,
710,
615,
603,
11702,
29979,
29889,
29995,
29885,
29889,
29995,
29881,
29889,
29995,
29950,
29889,
29995,
29924,
29889,
29995,
29903,
1159,
29974,
4286,
3945,
29915,
13,
9651,
413,
353,
1722,
29898,
9507,
29892,
525,
29893,
1495,
13,
9651,
1347,
353,
525,
9329,
1678,
16316,
1678,
3436,
713,
1678,
21864,
1678,
624,
29881,
268,
29953,
29947,
29995,
3080,
24596,
3159,
268,
29929,
29945,
29995,
3080,
24596,
3159,
29915,
13,
9651,
413,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
9651,
363,
474,
297,
3464,
29898,
2435,
29898,
7529,
22164,
13,
18884,
1347,
353,
1207,
29918,
15501,
29918,
1807,
29898,
7529,
29961,
29875,
1402,
7039,
29961,
29875,
2314,
13,
18884,
413,
29889,
3539,
29898,
1807,
718,
6634,
29876,
1159,
13,
9651,
413,
29889,
5358,
580,
13,
13,
1990,
624,
1446,
4035,
1990,
29898,
25060,
1125,
13,
1678,
14550,
4035,
1990,
363,
20602,
322,
15446,
13964,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
1409,
313,
2749,
1125,
1409,
363,
607,
304,
10272,
13964,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1409,
1125,
13,
4706,
1583,
29889,
12676,
29892,
1311,
29889,
2168,
713,
29892,
1311,
29889,
8513,
29892,
1311,
29889,
4172,
29892,
1311,
29889,
455,
29953,
29947,
29892,
1311,
29889,
455,
29929,
29945,
353,
10272,
29918,
6112,
6765,
29898,
2378,
29897,
13,
13,
13,
13,
13,
13,
308,
13,
308,
13,
13,
13,
13,
2
] |
support/compute-powers.py | ldanko/fmt | 13,148 | 137832 | <gh_stars>1000+
#!/usr/bin/env python
# Compute 10 ** exp with exp in the range [min_exponent, max_exponent] and print
# normalized (with most-significant bit equal to 1) significands in hexadecimal.
from __future__ import print_function
min_exponent = -348
max_exponent = 340
step = 8
significand_size = 64
exp_offset = 2000
class fp:
pass
powers = []
for i, exp in enumerate(range(min_exponent, max_exponent + 1, step)):
result = fp()
n = 10 ** exp if exp >= 0 else 2 ** exp_offset / 10 ** -exp
k = significand_size + 1
# Convert to binary and round.
binary = '{:b}'.format(n)
result.f = (int('{:0<{}}'.format(binary[:k], k), 2) + 1) / 2
result.e = len(binary) - (exp_offset if exp < 0 else 0) - significand_size
powers.append(result)
# Sanity check.
exp_offset10 = 400
actual = result.f * 10 ** exp_offset10
if result.e > 0:
actual *= 2 ** result.e
else:
for j in range(-result.e):
actual /= 2
expected = 10 ** (exp_offset10 + exp)
precision = len('{}'.format(expected)) - len('{}'.format(actual - expected))
if precision < 19:
print('low precision:', precision)
exit(1)
print('Significands:', end='')
for i, fp in enumerate(powers):
if i % 3 == 0:
print(end='\n ')
print(' {:0<#16x}'.format(fp.f, ), end=',')
print('\n\nExponents:', end='')
for i, fp in enumerate(powers):
if i % 11 == 0:
print(end='\n ')
print(' {:5}'.format(fp.e), end=',')
print('\n\nMax exponent difference:',
max([x.e - powers[i - 1].e for i, x in enumerate(powers)][1:]))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
11796,
29872,
29871,
29896,
29900,
3579,
1518,
411,
1518,
297,
278,
3464,
518,
1195,
29918,
735,
3296,
29892,
4236,
29918,
735,
3296,
29962,
322,
1596,
13,
29937,
4226,
1891,
313,
2541,
1556,
29899,
4530,
928,
424,
2586,
5186,
304,
29871,
29896,
29897,
4991,
4167,
297,
15090,
1943,
29883,
3039,
29889,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
1195,
29918,
735,
3296,
353,
448,
29941,
29946,
29947,
13,
3317,
29918,
735,
3296,
353,
29871,
29941,
29946,
29900,
13,
10568,
353,
29871,
29947,
13,
4530,
928,
392,
29918,
2311,
353,
29871,
29953,
29946,
13,
4548,
29918,
10289,
353,
29871,
29906,
29900,
29900,
29900,
13,
13,
1990,
285,
29886,
29901,
13,
1678,
1209,
13,
13,
12248,
414,
353,
5159,
13,
1454,
474,
29892,
1518,
297,
26985,
29898,
3881,
29898,
1195,
29918,
735,
3296,
29892,
4236,
29918,
735,
3296,
718,
29871,
29896,
29892,
4331,
22164,
13,
1678,
1121,
353,
285,
29886,
580,
13,
1678,
302,
353,
29871,
29896,
29900,
3579,
1518,
565,
1518,
6736,
29871,
29900,
1683,
29871,
29906,
3579,
1518,
29918,
10289,
847,
29871,
29896,
29900,
3579,
448,
4548,
13,
1678,
413,
353,
4991,
392,
29918,
2311,
718,
29871,
29896,
13,
1678,
396,
14806,
304,
7581,
322,
4513,
29889,
13,
1678,
7581,
353,
22372,
29901,
29890,
29913,
4286,
4830,
29898,
29876,
29897,
13,
1678,
1121,
29889,
29888,
353,
313,
524,
877,
25641,
29900,
29966,
29912,
930,
4286,
4830,
29898,
19541,
7503,
29895,
1402,
413,
511,
29871,
29906,
29897,
718,
29871,
29896,
29897,
847,
29871,
29906,
13,
1678,
1121,
29889,
29872,
353,
7431,
29898,
19541,
29897,
448,
313,
4548,
29918,
10289,
565,
1518,
529,
29871,
29900,
1683,
29871,
29900,
29897,
448,
4991,
392,
29918,
2311,
13,
1678,
10801,
29889,
4397,
29898,
2914,
29897,
13,
1678,
396,
3087,
537,
1423,
29889,
13,
1678,
1518,
29918,
10289,
29896,
29900,
353,
29871,
29946,
29900,
29900,
13,
1678,
3935,
353,
1121,
29889,
29888,
334,
29871,
29896,
29900,
3579,
1518,
29918,
10289,
29896,
29900,
13,
1678,
565,
1121,
29889,
29872,
1405,
29871,
29900,
29901,
13,
4706,
3935,
334,
29922,
29871,
29906,
3579,
1121,
29889,
29872,
13,
1678,
1683,
29901,
13,
4706,
363,
432,
297,
3464,
6278,
2914,
29889,
29872,
1125,
13,
9651,
3935,
847,
29922,
29871,
29906,
13,
1678,
3806,
353,
29871,
29896,
29900,
3579,
313,
4548,
29918,
10289,
29896,
29900,
718,
1518,
29897,
13,
1678,
16716,
353,
7431,
877,
8875,
4286,
4830,
29898,
9684,
876,
448,
7431,
877,
8875,
4286,
4830,
29898,
19304,
448,
3806,
876,
13,
1678,
565,
16716,
529,
29871,
29896,
29929,
29901,
13,
4706,
1596,
877,
677,
16716,
29901,
742,
16716,
29897,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
2158,
877,
10140,
928,
4167,
29901,
742,
1095,
2433,
1495,
13,
1454,
474,
29892,
285,
29886,
297,
26985,
29898,
12248,
414,
1125,
13,
1678,
565,
474,
1273,
29871,
29941,
1275,
29871,
29900,
29901,
13,
4706,
1596,
29898,
355,
2433,
29905,
29876,
25710,
13,
1678,
1596,
877,
12365,
29900,
29966,
29937,
29896,
29953,
29916,
29913,
4286,
4830,
29898,
18091,
29889,
29888,
29892,
10353,
1095,
29922,
742,
1495,
13,
13,
2158,
28909,
29876,
29905,
29876,
1252,
9340,
29901,
742,
1095,
2433,
1495,
13,
1454,
474,
29892,
285,
29886,
297,
26985,
29898,
12248,
414,
1125,
13,
1678,
565,
474,
1273,
29871,
29896,
29896,
1275,
29871,
29900,
29901,
13,
4706,
1596,
29898,
355,
2433,
29905,
29876,
25710,
13,
1678,
1596,
877,
12365,
29945,
29913,
4286,
4830,
29898,
18091,
29889,
29872,
511,
1095,
29922,
742,
1495,
13,
13,
2158,
28909,
29876,
29905,
29876,
7976,
28869,
4328,
29901,
742,
13,
418,
4236,
4197,
29916,
29889,
29872,
448,
10801,
29961,
29875,
448,
29871,
29896,
1822,
29872,
363,
474,
29892,
921,
297,
26985,
29898,
12248,
414,
29897,
3816,
29896,
29901,
12622,
13,
2
] |
bluebottle/assignments/migrations/0002_auto_20190529_0858.py | terrameijar/bluebottle | 10 | 192060 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-05-29 06:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('assignments', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='assignment',
old_name='end',
new_name='deadline',
),
]
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29896,
29889,
29896,
29945,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29945,
29899,
29906,
29929,
29871,
29900,
29953,
29901,
29945,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
16645,
1860,
742,
525,
29900,
29900,
29900,
29896,
29918,
11228,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
465,
10194,
742,
13,
9651,
2030,
29918,
978,
2433,
355,
742,
13,
9651,
716,
29918,
978,
2433,
311,
328,
1220,
742,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
LC/263.py | szhu3210/LeetCode_Solutions | 2 | 18959 | class Solution(object):
def isUgly(self, num):
"""
:type num: int
:rtype: bool
"""
if num <= 0:
return False
for x in [2,3,5]:
while(num % x ==0):
num /= x
return num==1 | [
1,
770,
24380,
29898,
3318,
1125,
13,
1678,
822,
338,
29965,
16808,
29898,
1311,
29892,
954,
1125,
13,
4706,
9995,
13,
4706,
584,
1853,
954,
29901,
938,
13,
4706,
584,
29878,
1853,
29901,
6120,
13,
4706,
9995,
13,
4706,
565,
954,
5277,
29871,
29900,
29901,
13,
9651,
736,
7700,
13,
4706,
363,
921,
297,
518,
29906,
29892,
29941,
29892,
29945,
5387,
13,
9651,
1550,
29898,
1949,
1273,
921,
1275,
29900,
1125,
13,
18884,
954,
847,
29922,
921,
13,
4706,
736,
954,
1360,
29896,
2
] |
zoondb/analysis/__init__.py | gord02/Zooniverse-DB | 1 | 187129 | #!/usr/bin/env python
"""
Analysis consists of general purpose functions.
Note
----
Function from either alpha or beta are not imported here, since they are not
required by default.
"""
from . import seed # noqa: F401
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
21067,
4848,
11624,
310,
2498,
6437,
3168,
29889,
13,
13,
9842,
13,
807,
13,
6678,
515,
2845,
15595,
470,
21762,
526,
451,
19673,
1244,
29892,
1951,
896,
526,
451,
13,
12403,
491,
2322,
29889,
13,
15945,
29908,
13,
13,
3166,
869,
1053,
16717,
29871,
396,
694,
25621,
29901,
383,
29946,
29900,
29896,
13,
2
] |
package/meross_iot/cloud/devices/subdevices/thermostats.py | armandofox/alexa-marantz-py | 4 | 194619 | from enum import Enum
from typing import Union
from meross_iot.cloud.timeouts import LONG_TIMEOUT
from meross_iot.cloud.abilities import HUB_MTS100_ALL, HUB_MTS100_TEMPERATURE, HUB_MTS100_MODE, HUB_TOGGLEX, HUB_ONLINE
from meross_iot.cloud.devices.subdevices.generic import GenericSubDevice
from meross_iot.logger import VALVES_LOGGER as l
from meross_iot.meross_event import DeviceSwitchStatusEvent, ThermostatTemperatureChange, ThermostatModeChange, \
DeviceOnlineStatusEvent
class ThermostatMode(Enum):
COMFORT = 1
CUSTOM = 0
ECONOMY = 2
SCHEDULE = 3
class ThermostatV3Mode(Enum):
AUTO = 3
COOL = 2
CUSTOM = 0
ECONOMY = 4
HEAT = 1
class ValveSubDevice(GenericSubDevice):
def __init__(self, cloud_client, subdevice_id, parent_hub, **kwords):
super().__init__(cloud_client, subdevice_id, parent_hub, **kwords)
def _handle_push_notification(self, namespace, payload, from_myself=False):
# Let the Generic handler to handle the common events.
handled = super()._handle_push_notification(namespace=namespace, payload=payload, from_myself=from_myself)
if handled:
return True
# If the parent handler was unable to parse it, we do it here.
evt = None
if namespace == HUB_MTS100_ALL:
self._raw_state.update(payload)
return True
elif namespace == HUB_TOGGLEX:
togglex = self._raw_state.get('togglex')
if togglex is None:
togglex = {}
self._raw_state['togglex'] = togglex
togglex.update(payload)
evt = DeviceSwitchStatusEvent(self, 0, self.onoff, from_myself)
self.fire_event(evt)
return True
elif namespace == HUB_MTS100_MODE:
mode = self._raw_state.get('mode')
if mode is None:
mode = {}
self._raw_state['mode'] = mode
mode.update(payload)
evt = ThermostatModeChange(device=self, mode=self.mode, generated_by_myself=from_myself)
self.fire_event(evt)
return True
elif namespace == HUB_MTS100_TEMPERATURE:
temp = self._raw_state.get('temperature')
if temp is None:
temp = {}
self._raw_state['temperature'] = temp
temp.update(payload)
evt = ThermostatTemperatureChange(device=self,
temperature_state=self._raw_state.get('temperature'),
generated_by_myself=from_myself)
self.fire_event(evt)
return True
# TODO: handle TIME SYNC event?
# elif namespace == HUB_TIME_SYNC:
# self._state.get('??').update(payload)
else:
l.warn("Unsupported/unhandled event: %s" % namespace)
l.debug("Namespace: %s, Data: %s" % (namespace, payload))
return False
@property
def onoff(self):
onoff = self._get_property('togglex', 'onoff')
return onoff
@property
def heating(self):
heating = self._get_property('temperature', 'heating')
if heating is None:
return None
else:
return heating == 1
@property
def room_temperature(self):
temp = self._get_property('temperature', 'room')
if temp is None:
return None
else:
return temp / 10
@property
def target_temperature(self):
"""
Returns the current target temperature
:return:
"""
# The API returns the temperature in decimals.
# For this reason, we convert it to integers.
temp = self._get_property('temperature', 'currentSet')
if temp is None:
return None
else:
return temp / 10
def set_target_temperature(self,
target_temp: float = None,
timeout : float = LONG_TIMEOUT,
callback: callable = None):
"""
Sets the target temperature of the thermostat
:param target_temp: temperature to be set
:param callback:
:return:
"""
# The API expects the target temperature in DECIMALS, so we need to multiply the user's input by 10
value = target_temp * 10
payload = {'temperature': [{'id': self.subdevice_id, 'custom': value}]}
return self.execute_command(command='SET',
namespace=HUB_MTS100_TEMPERATURE,
payload=payload,
timeout=timeout,
callback=callback)
def set_preset_temperature(self,
away: float = None,
comfort: float = None,
economy: float = None,
timeout: float = LONG_TIMEOUT,
callback: callable = None):
"""
Configures the preset temperature values. The temperature values should be expressed in
Celsius degrees.
:param away: Target temperature for away preset
:param comfort: Target temperature for comfort preset
:param economy: Target temperature for economy preset
:param callback:
:return:
"""
# The API expects the celsius degrees in DECIMALS, so we need to multiply the user's input by 10
temperature_conf = {'id': self.subdevice_id}
if away is not None:
temperature_conf['away'] = away * 10
if comfort is not None:
temperature_conf['comfort'] = comfort * 10
if economy is not None:
temperature_conf['economy'] = economy * 10
payload = {'temperature': [temperature_conf]}
return self.execute_command(command='SET',
namespace=HUB_MTS100_TEMPERATURE,
payload=payload,
timeout=timeout,
callback=callback)
@property
def mode(self):
state = self._get_property('mode', 'state')
if state is None:
return None
else:
# Parse the mode according to the current device type
if self.type == 'mts100v3':
return ThermostatV3Mode(state)
elif self.type == 'mts100':
return ThermostatMode(state)
else:
l.error("The current thermostat mode is not supported.")
return None
def set_mode(self,
mode: Union[ThermostatV3Mode, ThermostatMode, int],
timeout=LONG_TIMEOUT,
callback=None
):
"""
Sets the temperature mode for the thermostat
:param mode:
:return:
"""
# Make sure we are passing correct values
if self.type == 'mts100v3' and not isinstance(mode, ThermostatV3Mode):
raise ValueError("This thermostat only supports ThermostatV3Mode modes")
elif self.type == 'mts100' and not isinstance(mode, ThermostatMode):
raise ValueError("This thermostat only supports ThermostatMode modes")
elif isinstance(mode, int):
l.warning("Setting a raw integer value as mode. This is not recommended. "
"Please use ThermostatMode or ThermostatV3Mode")
self.execute_command('SET', HUB_MTS100_MODE, {'mode': [{'id': self.subdevice_id, 'state': mode.value}]},
timeout=timeout, callback=callback)
def _togglex(self, onoff, channel=0, timeout=LONG_TIMEOUT, callback=None):
payload = {'togglex': [{'channel': channel, 'id': self.subdevice_id, 'onoff': onoff}]}
return self.execute_command('SET', HUB_TOGGLEX, payload, timeout=timeout, callback=callback)
def turn_on(self, timeout=LONG_TIMEOUT, callback=None):
return self._togglex(onoff=1, timeout=timeout, callback=callback)
def turn_off(self, timeout=LONG_TIMEOUT, callback=None):
return self._togglex(onoff=0, timeout=timeout, callback=callback)
| [
1,
515,
14115,
1053,
1174,
398,
13,
3166,
19229,
1053,
7761,
13,
13,
3166,
2778,
2209,
29918,
24414,
29889,
9274,
29889,
15619,
29879,
1053,
365,
20614,
29918,
15307,
12015,
13,
13,
3166,
2778,
2209,
29918,
24414,
29889,
9274,
29889,
11614,
1053,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
9818,
29892,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
4330,
3580,
1001,
1299,
11499,
29892,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
20387,
29892,
379,
7466,
29918,
4986,
26788,
1307,
29990,
29892,
379,
7466,
29918,
1164,
18521,
13,
3166,
2778,
2209,
29918,
24414,
29889,
9274,
29889,
3359,
1575,
29889,
1491,
3359,
1575,
29889,
19206,
1053,
3251,
293,
4035,
11501,
13,
3166,
2778,
2209,
29918,
24414,
29889,
21707,
1053,
12599,
29963,
2890,
29918,
14480,
17070,
408,
301,
13,
3166,
2778,
2209,
29918,
24414,
29889,
1050,
2209,
29918,
3696,
1053,
21830,
24995,
5709,
2624,
29892,
498,
837,
520,
271,
5776,
546,
1535,
7277,
29892,
498,
837,
520,
271,
6818,
7277,
29892,
320,
13,
1678,
21830,
2951,
1220,
5709,
2624,
13,
13,
13,
1990,
498,
837,
520,
271,
6818,
29898,
16854,
1125,
13,
1678,
23353,
29943,
8476,
353,
29871,
29896,
13,
1678,
315,
17321,
6488,
353,
29871,
29900,
13,
1678,
382,
6007,
6488,
29979,
353,
29871,
29906,
13,
1678,
317,
3210,
3352,
29965,
1307,
353,
29871,
29941,
13,
13,
13,
1990,
498,
837,
520,
271,
29963,
29941,
6818,
29898,
16854,
1125,
13,
1678,
26524,
29949,
353,
29871,
29941,
13,
1678,
4810,
5607,
353,
29871,
29906,
13,
1678,
315,
17321,
6488,
353,
29871,
29900,
13,
1678,
382,
6007,
6488,
29979,
353,
29871,
29946,
13,
1678,
17714,
1299,
353,
29871,
29896,
13,
13,
13,
1990,
2630,
345,
4035,
11501,
29898,
15809,
4035,
11501,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9570,
29918,
4645,
29892,
1014,
10141,
29918,
333,
29892,
3847,
29918,
29882,
431,
29892,
3579,
29895,
9303,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
9274,
29918,
4645,
29892,
1014,
10141,
29918,
333,
29892,
3847,
29918,
29882,
431,
29892,
3579,
29895,
9303,
29897,
13,
13,
1678,
822,
903,
8411,
29918,
5910,
29918,
24671,
29898,
1311,
29892,
7397,
29892,
20092,
29892,
515,
29918,
5781,
761,
29922,
8824,
1125,
13,
4706,
396,
2803,
278,
3251,
293,
7834,
304,
4386,
278,
3619,
4959,
29889,
13,
4706,
16459,
353,
2428,
2141,
29918,
8411,
29918,
5910,
29918,
24671,
29898,
22377,
29922,
22377,
29892,
20092,
29922,
23813,
29892,
515,
29918,
5781,
761,
29922,
3166,
29918,
5781,
761,
29897,
13,
4706,
565,
16459,
29901,
13,
9651,
736,
5852,
13,
13,
4706,
396,
960,
278,
3847,
7834,
471,
9368,
304,
6088,
372,
29892,
591,
437,
372,
1244,
29889,
13,
4706,
3415,
29873,
353,
6213,
13,
4706,
565,
7397,
1275,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
9818,
29901,
13,
9651,
1583,
3032,
1610,
29918,
3859,
29889,
5504,
29898,
23813,
29897,
13,
9651,
736,
5852,
13,
13,
4706,
25342,
7397,
1275,
379,
7466,
29918,
4986,
26788,
1307,
29990,
29901,
13,
9651,
17304,
2506,
353,
1583,
3032,
1610,
29918,
3859,
29889,
657,
877,
29873,
468,
29887,
2506,
1495,
13,
9651,
565,
17304,
2506,
338,
6213,
29901,
13,
18884,
17304,
2506,
353,
6571,
13,
18884,
1583,
3032,
1610,
29918,
3859,
1839,
29873,
468,
29887,
2506,
2033,
353,
17304,
2506,
13,
9651,
17304,
2506,
29889,
5504,
29898,
23813,
29897,
13,
9651,
3415,
29873,
353,
21830,
24995,
5709,
2624,
29898,
1311,
29892,
29871,
29900,
29892,
1583,
29889,
265,
2696,
29892,
515,
29918,
5781,
761,
29897,
13,
9651,
1583,
29889,
8696,
29918,
3696,
29898,
5750,
29873,
29897,
13,
9651,
736,
5852,
13,
13,
4706,
25342,
7397,
1275,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
20387,
29901,
13,
9651,
4464,
353,
1583,
3032,
1610,
29918,
3859,
29889,
657,
877,
8513,
1495,
13,
9651,
565,
4464,
338,
6213,
29901,
13,
18884,
4464,
353,
6571,
13,
18884,
1583,
3032,
1610,
29918,
3859,
1839,
8513,
2033,
353,
4464,
13,
13,
9651,
4464,
29889,
5504,
29898,
23813,
29897,
13,
9651,
3415,
29873,
353,
498,
837,
520,
271,
6818,
7277,
29898,
10141,
29922,
1311,
29892,
4464,
29922,
1311,
29889,
8513,
29892,
5759,
29918,
1609,
29918,
5781,
761,
29922,
3166,
29918,
5781,
761,
29897,
13,
9651,
1583,
29889,
8696,
29918,
3696,
29898,
5750,
29873,
29897,
13,
9651,
736,
5852,
13,
13,
4706,
25342,
7397,
1275,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
4330,
3580,
1001,
1299,
11499,
29901,
13,
9651,
5694,
353,
1583,
3032,
1610,
29918,
3859,
29889,
657,
877,
12863,
1535,
1495,
13,
9651,
565,
5694,
338,
6213,
29901,
13,
18884,
5694,
353,
6571,
13,
18884,
1583,
3032,
1610,
29918,
3859,
1839,
12863,
1535,
2033,
353,
5694,
13,
13,
9651,
5694,
29889,
5504,
29898,
23813,
29897,
13,
9651,
3415,
29873,
353,
498,
837,
520,
271,
5776,
546,
1535,
7277,
29898,
10141,
29922,
1311,
29892,
13,
462,
462,
795,
10430,
29918,
3859,
29922,
1311,
3032,
1610,
29918,
3859,
29889,
657,
877,
12863,
1535,
5477,
13,
462,
462,
795,
5759,
29918,
1609,
29918,
5781,
761,
29922,
3166,
29918,
5781,
761,
29897,
13,
9651,
1583,
29889,
8696,
29918,
3696,
29898,
5750,
29873,
29897,
13,
9651,
736,
5852,
13,
13,
4706,
396,
14402,
29901,
4386,
323,
8890,
28962,
15868,
1741,
29973,
13,
4706,
396,
25342,
7397,
1275,
379,
7466,
29918,
15307,
29918,
14816,
15868,
29901,
13,
4706,
396,
1678,
1583,
3032,
3859,
29889,
657,
877,
8773,
2824,
5504,
29898,
23813,
29897,
13,
13,
4706,
1683,
29901,
13,
9651,
301,
29889,
25442,
703,
25807,
29884,
3016,
287,
29914,
348,
3179,
839,
1741,
29901,
1273,
29879,
29908,
1273,
7397,
29897,
13,
9651,
301,
29889,
8382,
703,
23335,
29901,
1273,
29879,
29892,
3630,
29901,
1273,
29879,
29908,
1273,
313,
22377,
29892,
20092,
876,
13,
9651,
736,
7700,
13,
13,
1678,
732,
6799,
13,
1678,
822,
373,
2696,
29898,
1311,
1125,
13,
4706,
373,
2696,
353,
1583,
3032,
657,
29918,
6799,
877,
29873,
468,
29887,
2506,
742,
525,
265,
2696,
1495,
13,
4706,
736,
373,
2696,
13,
13,
1678,
732,
6799,
13,
1678,
822,
540,
1218,
29898,
1311,
1125,
13,
4706,
540,
1218,
353,
1583,
3032,
657,
29918,
6799,
877,
12863,
1535,
742,
525,
354,
1218,
1495,
13,
4706,
565,
540,
1218,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
4706,
1683,
29901,
13,
9651,
736,
540,
1218,
1275,
29871,
29896,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5716,
29918,
12863,
1535,
29898,
1311,
1125,
13,
4706,
5694,
353,
1583,
3032,
657,
29918,
6799,
877,
12863,
1535,
742,
525,
8345,
1495,
13,
4706,
565,
5694,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
4706,
1683,
29901,
13,
9651,
736,
5694,
847,
29871,
29896,
29900,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3646,
29918,
12863,
1535,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
16969,
278,
1857,
3646,
10430,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
396,
450,
3450,
3639,
278,
10430,
297,
1602,
326,
1338,
29889,
13,
4706,
396,
1152,
445,
2769,
29892,
591,
3588,
372,
304,
11920,
29889,
13,
4706,
5694,
353,
1583,
3032,
657,
29918,
6799,
877,
12863,
1535,
742,
525,
3784,
2697,
1495,
13,
4706,
565,
5694,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
4706,
1683,
29901,
13,
9651,
736,
5694,
847,
29871,
29896,
29900,
13,
13,
1678,
822,
731,
29918,
5182,
29918,
12863,
1535,
29898,
1311,
29892,
13,
462,
1669,
3646,
29918,
7382,
29901,
5785,
353,
6213,
29892,
13,
462,
1669,
11815,
584,
5785,
353,
365,
20614,
29918,
15307,
12015,
29892,
13,
462,
1669,
6939,
29901,
1246,
519,
353,
6213,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
3646,
10430,
310,
278,
14563,
520,
271,
13,
4706,
584,
3207,
3646,
29918,
7382,
29901,
10430,
304,
367,
731,
13,
4706,
584,
3207,
6939,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
396,
450,
3450,
23347,
278,
3646,
10430,
297,
5012,
29907,
2260,
8547,
29892,
577,
591,
817,
304,
22932,
278,
1404,
29915,
29879,
1881,
491,
29871,
29896,
29900,
13,
4706,
995,
353,
3646,
29918,
7382,
334,
29871,
29896,
29900,
13,
4706,
20092,
353,
11117,
12863,
1535,
2396,
518,
10998,
333,
2396,
1583,
29889,
1491,
10141,
29918,
333,
29892,
525,
6341,
2396,
995,
6525,
29913,
13,
4706,
736,
1583,
29889,
7978,
29918,
6519,
29898,
6519,
2433,
10490,
742,
13,
462,
462,
1678,
7397,
29922,
29950,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
4330,
3580,
1001,
1299,
11499,
29892,
13,
462,
462,
1678,
20092,
29922,
23813,
29892,
13,
462,
462,
1678,
11815,
29922,
15619,
29892,
13,
462,
462,
1678,
6939,
29922,
14035,
29897,
13,
13,
1678,
822,
731,
29918,
4569,
300,
29918,
12863,
1535,
29898,
1311,
29892,
13,
462,
1669,
3448,
29901,
5785,
353,
6213,
29892,
13,
462,
1669,
13016,
29901,
5785,
353,
6213,
29892,
13,
462,
1669,
26504,
29901,
5785,
353,
6213,
29892,
13,
462,
1669,
11815,
29901,
5785,
353,
365,
20614,
29918,
15307,
12015,
29892,
13,
462,
1669,
6939,
29901,
1246,
519,
353,
6213,
1125,
13,
4706,
9995,
13,
4706,
12782,
1973,
278,
2225,
300,
10430,
1819,
29889,
450,
10430,
1819,
881,
367,
13384,
297,
13,
4706,
14227,
1039,
375,
14496,
29889,
13,
4706,
584,
3207,
3448,
29901,
17157,
10430,
363,
3448,
2225,
300,
13,
4706,
584,
3207,
13016,
29901,
17157,
10430,
363,
13016,
2225,
300,
13,
4706,
584,
3207,
26504,
29901,
17157,
10430,
363,
26504,
2225,
300,
13,
4706,
584,
3207,
6939,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
396,
450,
3450,
23347,
278,
6432,
1039,
375,
14496,
297,
5012,
29907,
2260,
8547,
29892,
577,
591,
817,
304,
22932,
278,
1404,
29915,
29879,
1881,
491,
29871,
29896,
29900,
13,
4706,
10430,
29918,
5527,
353,
11117,
333,
2396,
1583,
29889,
1491,
10141,
29918,
333,
29913,
13,
4706,
565,
3448,
338,
451,
6213,
29901,
13,
9651,
10430,
29918,
5527,
1839,
21694,
2033,
353,
3448,
334,
29871,
29896,
29900,
13,
4706,
565,
13016,
338,
451,
6213,
29901,
13,
9651,
10430,
29918,
5527,
1839,
510,
3921,
2033,
353,
13016,
334,
29871,
29896,
29900,
13,
4706,
565,
26504,
338,
451,
6213,
29901,
13,
9651,
10430,
29918,
5527,
1839,
29872,
4599,
29891,
2033,
353,
26504,
334,
29871,
29896,
29900,
13,
13,
4706,
20092,
353,
11117,
12863,
1535,
2396,
518,
12863,
1535,
29918,
5527,
12258,
13,
4706,
736,
1583,
29889,
7978,
29918,
6519,
29898,
6519,
2433,
10490,
742,
13,
462,
462,
1678,
7397,
29922,
29950,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
4330,
3580,
1001,
1299,
11499,
29892,
13,
462,
462,
1678,
20092,
29922,
23813,
29892,
13,
462,
462,
1678,
11815,
29922,
15619,
29892,
13,
462,
462,
1678,
6939,
29922,
14035,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4464,
29898,
1311,
1125,
13,
4706,
2106,
353,
1583,
3032,
657,
29918,
6799,
877,
8513,
742,
525,
3859,
1495,
13,
4706,
565,
2106,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
4706,
1683,
29901,
13,
9651,
396,
20969,
278,
4464,
5034,
304,
278,
1857,
4742,
1134,
13,
9651,
565,
1583,
29889,
1853,
1275,
525,
29885,
1372,
29896,
29900,
29900,
29894,
29941,
2396,
13,
18884,
736,
498,
837,
520,
271,
29963,
29941,
6818,
29898,
3859,
29897,
13,
9651,
25342,
1583,
29889,
1853,
1275,
525,
29885,
1372,
29896,
29900,
29900,
2396,
13,
18884,
736,
498,
837,
520,
271,
6818,
29898,
3859,
29897,
13,
9651,
1683,
29901,
13,
18884,
301,
29889,
2704,
703,
1576,
1857,
14563,
520,
271,
4464,
338,
451,
6969,
23157,
13,
18884,
736,
6213,
13,
13,
1678,
822,
731,
29918,
8513,
29898,
1311,
29892,
13,
462,
4464,
29901,
7761,
29961,
1349,
837,
520,
271,
29963,
29941,
6818,
29892,
498,
837,
520,
271,
6818,
29892,
938,
1402,
13,
462,
11815,
29922,
29931,
20614,
29918,
15307,
12015,
29892,
13,
462,
6939,
29922,
8516,
13,
462,
29871,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
278,
10430,
4464,
363,
278,
14563,
520,
271,
13,
4706,
584,
3207,
4464,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
396,
8561,
1854,
591,
526,
6819,
1959,
1819,
13,
4706,
565,
1583,
29889,
1853,
1275,
525,
29885,
1372,
29896,
29900,
29900,
29894,
29941,
29915,
322,
451,
338,
8758,
29898,
8513,
29892,
498,
837,
520,
271,
29963,
29941,
6818,
1125,
13,
9651,
12020,
7865,
2392,
703,
4013,
14563,
520,
271,
871,
11286,
498,
837,
520,
271,
29963,
29941,
6818,
18893,
1159,
13,
4706,
25342,
1583,
29889,
1853,
1275,
525,
29885,
1372,
29896,
29900,
29900,
29915,
322,
451,
338,
8758,
29898,
8513,
29892,
498,
837,
520,
271,
6818,
1125,
13,
9651,
12020,
7865,
2392,
703,
4013,
14563,
520,
271,
871,
11286,
498,
837,
520,
271,
6818,
18893,
1159,
13,
4706,
25342,
338,
8758,
29898,
8513,
29892,
938,
1125,
13,
9651,
301,
29889,
27392,
703,
29020,
263,
10650,
6043,
995,
408,
4464,
29889,
910,
338,
451,
13622,
29889,
376,
13,
462,
418,
376,
12148,
671,
498,
837,
520,
271,
6818,
470,
498,
837,
520,
271,
29963,
29941,
6818,
1159,
13,
4706,
1583,
29889,
7978,
29918,
6519,
877,
10490,
742,
379,
7466,
29918,
29924,
9375,
29896,
29900,
29900,
29918,
20387,
29892,
11117,
8513,
2396,
518,
10998,
333,
2396,
1583,
29889,
1491,
10141,
29918,
333,
29892,
525,
3859,
2396,
4464,
29889,
1767,
6525,
1118,
13,
462,
632,
11815,
29922,
15619,
29892,
6939,
29922,
14035,
29897,
13,
13,
1678,
822,
903,
29873,
468,
29887,
2506,
29898,
1311,
29892,
373,
2696,
29892,
8242,
29922,
29900,
29892,
11815,
29922,
29931,
20614,
29918,
15307,
12015,
29892,
6939,
29922,
8516,
1125,
13,
4706,
20092,
353,
11117,
29873,
468,
29887,
2506,
2396,
518,
10998,
12719,
2396,
8242,
29892,
525,
333,
2396,
1583,
29889,
1491,
10141,
29918,
333,
29892,
525,
265,
2696,
2396,
373,
2696,
6525,
29913,
13,
4706,
736,
1583,
29889,
7978,
29918,
6519,
877,
10490,
742,
379,
7466,
29918,
4986,
26788,
1307,
29990,
29892,
20092,
29892,
11815,
29922,
15619,
29892,
6939,
29922,
14035,
29897,
13,
13,
1678,
822,
2507,
29918,
265,
29898,
1311,
29892,
11815,
29922,
29931,
20614,
29918,
15307,
12015,
29892,
6939,
29922,
8516,
1125,
13,
4706,
736,
1583,
3032,
29873,
468,
29887,
2506,
29898,
265,
2696,
29922,
29896,
29892,
11815,
29922,
15619,
29892,
6939,
29922,
14035,
29897,
13,
13,
1678,
822,
2507,
29918,
2696,
29898,
1311,
29892,
11815,
29922,
29931,
20614,
29918,
15307,
12015,
29892,
6939,
29922,
8516,
1125,
13,
4706,
736,
1583,
3032,
29873,
468,
29887,
2506,
29898,
265,
2696,
29922,
29900,
29892,
11815,
29922,
15619,
29892,
6939,
29922,
14035,
29897,
13,
2
] |
swim_backend/events.py | eurocontrol-swim/swim-backend | 0 | 24800 | <reponame>eurocontrol-swim/swim-backend<filename>swim_backend/events.py
"""
Copyright 2019 EUROCONTROL
==========================================
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
3. 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.
==========================================
Editorial note: this license is an instance of the BSD license template as provided by the Open Source Initiative:
http://opensource.org/licenses/BSD-3-Clause
Details on EUROCONTROL: http://www.eurocontrol.int
"""
import abc
__author__ = "EUROCONTROL (SWIM)"
class Event(list):
"""
Simplistic implementation of event handling.
A list of callable objects. Calling an instance of this will cause a
call to each item in the list in ascending order by index.
"""
_type = 'Generic'
def __call__(self, *args, **kwargs):
for handler in self:
handler(*args, **kwargs)
def __repr__(self):
return f"{self._type} Event({list.__repr__(self)})"
class EventSafe(list):
def __call__(self, *args, **kwargs):
handlers = [handler_class(*args, **kwargs) for handler_class in self]
processed_handlers = []
for handler in handlers:
try:
handler.do()
processed_handlers.append(handler)
except:
handler.undo()
processed_handlers.reverse()
for processed_handler in processed_handlers:
processed_handler.undo()
raise
class EventHandler(abc.ABC):
@abc.abstractmethod
def do(self, *args, **kwargs):
pass
@abc.abstractmethod
def undo(self, *args, **kwargs):
pass
| [
1,
529,
276,
1112,
420,
29958,
29872,
2192,
6451,
29899,
2774,
326,
29914,
2774,
326,
29899,
27852,
29966,
9507,
29958,
2774,
326,
29918,
27852,
29914,
13604,
29889,
2272,
13,
15945,
29908,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29929,
19007,
1672,
22412,
1672,
29931,
13,
9166,
9166,
4936,
1360,
13,
13,
9039,
391,
3224,
322,
671,
297,
2752,
322,
7581,
7190,
29892,
411,
470,
1728,
21733,
29892,
526,
21905,
4944,
393,
278,
29871,
13,
23031,
292,
5855,
526,
1539,
29901,
13,
13,
29896,
29889,
4367,
391,
3224,
29879,
310,
2752,
775,
1818,
11551,
278,
2038,
3509,
1266,
8369,
29892,
445,
1051,
310,
5855,
322,
278,
1494,
29871,
13,
259,
2313,
433,
4193,
29889,
13,
29906,
29889,
4367,
391,
3224,
29879,
297,
7581,
883,
1818,
18532,
278,
2038,
3509,
1266,
8369,
29892,
445,
1051,
310,
5855,
322,
278,
1494,
29871,
13,
259,
2313,
433,
4193,
297,
278,
5106,
322,
29914,
272,
916,
17279,
4944,
411,
278,
4978,
29889,
13,
29941,
29889,
2448,
2121,
278,
1024,
310,
278,
3509,
1266,
19464,
3643,
278,
2983,
310,
967,
17737,
29560,
1122,
367,
1304,
304,
1095,
272,
344,
470,
27391,
9316,
29871,
13,
259,
10723,
515,
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,
5300,
13764,
29979,
8528,
15094,
1799,
6323,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
29892,
29871,
13,
1177,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
6093,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
5300,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
319,
1525,
29871,
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,
15842,
13764,
29979,
22471,
26282,
29892,
2672,
4571,
26282,
29892,
2672,
29907,
1367,
3919,
1964,
29892,
29871,
13,
29903,
4162,
8426,
1964,
29892,
8528,
29923,
3580,
29931,
19926,
29892,
6323,
8707,
1660,
13356,
3919,
25758,
21330,
1529,
1692,
29903,
313,
1177,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
13756,
29907,
11499,
13780,
8079,
27092,
1254,
1806,
26027,
21947,
29949,
8452,
6323,
29871,
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,
12766,
17171,
29928,
5300,
6732,
13764,
29979,
6093,
18929,
8079,
17705,
2882,
6227,
11937,
29892,
29871,
13,
25039,
2544,
4448,
2672,
8707,
29911,
4717,
1783,
29892,
6850,
3960,
1783,
17705,
2882,
6227,
11937,
29892,
6323,
323,
8476,
313,
1177,
6154,
15789,
4214,
405,
11787,
5265,
24647,
4741,
6323,
438,
29911,
4448,
22119,
1660,
29897,
9033,
3235,
4214,
2672,
13764,
29979,
399,
29909,
29979,
19474,
8079,
6093,
29871,
13,
17171,
8079,
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,
13,
9166,
9166,
4936,
1360,
13,
13,
15280,
616,
4443,
29901,
445,
19405,
338,
385,
2777,
310,
278,
350,
7230,
19405,
4472,
408,
4944,
491,
278,
4673,
7562,
512,
4812,
1230,
29901,
29871,
13,
1124,
597,
22156,
1167,
29889,
990,
29914,
506,
11259,
29914,
29933,
7230,
29899,
29941,
29899,
20216,
1509,
13,
13,
10602,
373,
19007,
1672,
22412,
1672,
29931,
29901,
1732,
597,
1636,
29889,
29872,
2192,
6451,
29889,
524,
13,
15945,
29908,
13,
5215,
25638,
13,
13,
1649,
8921,
1649,
353,
376,
29923,
29965,
1672,
22412,
1672,
29931,
313,
23066,
7833,
5513,
13,
13,
13,
1990,
6864,
29898,
1761,
1125,
13,
1678,
9995,
13,
1678,
3439,
572,
4695,
5314,
310,
1741,
11415,
29889,
13,
13,
1678,
319,
1051,
310,
1246,
519,
3618,
29889,
8251,
292,
385,
2777,
310,
445,
674,
4556,
263,
13,
1678,
1246,
304,
1269,
2944,
297,
278,
1051,
297,
12066,
2548,
1797,
491,
2380,
29889,
13,
1678,
9995,
13,
1678,
903,
1853,
353,
525,
15809,
29915,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
363,
7834,
297,
1583,
29901,
13,
9651,
7834,
10456,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
285,
29908,
29912,
1311,
3032,
1853,
29913,
6864,
3319,
1761,
17255,
276,
558,
12035,
1311,
26972,
29908,
13,
13,
13,
1990,
6864,
17618,
1725,
29898,
1761,
1125,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
25795,
353,
518,
13789,
29918,
1990,
10456,
5085,
29892,
3579,
19290,
29897,
363,
7834,
29918,
1990,
297,
1583,
29962,
13,
4706,
19356,
29918,
3179,
9306,
353,
5159,
13,
13,
4706,
363,
7834,
297,
25795,
29901,
13,
9651,
1018,
29901,
13,
18884,
7834,
29889,
1867,
580,
13,
18884,
19356,
29918,
3179,
9306,
29889,
4397,
29898,
13789,
29897,
13,
9651,
5174,
29901,
13,
18884,
7834,
29889,
6201,
580,
13,
13,
18884,
19356,
29918,
3179,
9306,
29889,
24244,
580,
13,
18884,
363,
19356,
29918,
13789,
297,
19356,
29918,
3179,
9306,
29901,
13,
462,
1678,
19356,
29918,
13789,
29889,
6201,
580,
13,
13,
18884,
12020,
13,
13,
13,
1990,
6864,
4598,
29898,
10736,
29889,
19658,
1125,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
437,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
1209,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
563,
29877,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
1209,
13,
2
] |
legacy/extract_feature.py | Tommy-Liu/MovieQA_Contest | 0 | 140619 | <filename>legacy/extract_feature.py
import argparse
import os
from functools import partial
from math import ceil
from multiprocessing import Pool
from os.path import join, exists
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
from numpy.lib.format import read_array_header_1_0, read_magic
from tqdm import tqdm
from config import MovieQAPath
from legacy.inception_preprocessing import preprocess_image
from legacy.inception_resnet_v2 import inception_resnet_v2_arg_scope, inception_resnet_v2
from utils import data_utils as du
from utils import func_utils as fu
_mp = MovieQAPath()
def make_parallel(model, num_gpus, imgs):
out_split = []
for i in range(num_gpus):
with tf.device(tf.DeviceSpec(device_type="GPU", device_index=i)):
with tf.variable_scope(tf.get_variable_scope(), reuse=i > 0):
out_split.append(model(images=imgs[i]))
# return tf.concat(out_split, axis=0)
return out_split
def models(images):
with slim.arg_scope(inception_resnet_v2_arg_scope()):
logits, end_points = inception_resnet_v2(images, num_classes=1001, is_training=False)
# return tf.nn.max_pool(end_points['Conv2d_7b_1x1'], [1, 2, 2, 1], [1, 2, 2, 1], 'VALID')
return end_points['Conv2d_7b_1x1']
def load_shape(n):
with open(n, 'rb') as f:
major, minor = read_magic(f)
shape, fortran, dtype = read_array_header_1_0(f)
if len(shape) != 4:
raise TypeError('Errr! Single image... %s' % n)
return shape
def collect(video_data, k):
imgs = [join(_mp.image_dir, k, '%s_%05d.jpg' % (k, i + 1))
for i in range(0, video_data[k]['real_frames'], 10)]
npy_name = join(_mp.feature_dir, k + '.npy')
if not exists(npy_name) or load_shape(npy_name)[0] != len(imgs):
return npy_name, len(imgs), imgs
else:
return None
def get_images_path():
file_names, capacity, npy_names = [], [], []
video_data = dict(item for v in du.json_load(_mp.video_data_file).values() for item in v.items())
func = partial(collect, video_data)
with Pool(16) as pool, tqdm(total=len(video_data), desc='Collect images') as pbar:
for ins in pool.imap_unordered(func, list(video_data.keys())):
if ins:
npy_names.append(ins[0])
capacity.append(ins[1])
file_names.extend(ins[2])
pbar.update()
return file_names, capacity, npy_names
def get_images_path_v2():
file_names, capacity, npy_names = [], [], []
video_data = du.json_load(_mp.video_data_file)
for imdb_key in tqdm(video_data, desc='Collect Images'):
npy_names.append(join(_mp.feature_dir, imdb_key + '.npy'))
videos = list(video_data[imdb_key].keys())
videos.sort()
num = 0
for v in tqdm(videos):
images = [join(_mp.image_dir, v, '%s_%05d.jpg' % (v, i + 1))
for i in range(0, video_data[imdb_key][v]['real_frames'], 15)]
file_names.extend(images)
num += len(images)
capacity.append(num)
print(capacity, npy_names)
return file_names, capacity, npy_names
def get_images_path_v3():
file_names, capacity, npy_names = [], [], []
sample = du.json_load(_mp.sample_frame_file)
for imdb_key in tqdm(sample, desc='Collect Images'):
# if not exists(join(_mp.feature_dir, imdb_key + '.npy')):
npy_names.append(join(_mp.feature_dir, imdb_key + '.npy'))
videos = list(sample[imdb_key].keys())
videos.sort()
num = 0
for v in tqdm(videos):
images = [join(_mp.image_dir, v, '%s_%05d.jpg' % (v, i + 1))
for i in sample[imdb_key][v]]
file_names.extend(images)
num += len(images)
capacity.append(num)
# print(capacity, npy_names)
return file_names, capacity, npy_names
def count_num(features_list):
num = 0
for features in features_list:
num += features.shape[0]
return num
def writer_worker(queue, capacity, npy_names):
video_idx = 0
local_feature = []
local_filename = []
with tqdm(total=len(npy_names)) as pbar:
while len(capacity) > video_idx:
item = queue.get()
if item:
f, n = item
local_feature.append(f)
local_filename.extend(n)
local_size = len(local_filename)
while len(capacity) > video_idx and local_size >= capacity[video_idx]:
concat_feature = np.concatenate(local_feature, axis=0)
final_features = concat_feature[:capacity[video_idx]]
final_filename = local_filename[:capacity[video_idx]]
assert final_features.shape[0] == capacity[video_idx], \
"%s Both frames are not same!" % npy_names[video_idx]
for i in range(len(final_features)):
assert fu.basename_wo_ext(npy_names[video_idx]) == \
fu.basename_wo_ext(final_filename[i]).split('.')[0], \
"Wrong images! %s\n%s" % (npy_names[video_idx], final_filename[i])
try:
np.save(npy_names[video_idx], final_features)
except Exception as e:
np.save(npy_names[video_idx], final_features)
raise e
pbar.set_description(' '.join([fu.basename_wo_ext(npy_names[video_idx]),
str(len(final_features))]))
del local_feature[:]
local_feature.append(concat_feature[capacity[video_idx]:])
local_filename = local_filename[capacity[video_idx]:]
local_size = len(local_filename)
video_idx += 1
pbar.update()
else:
break
def parse_func(filename):
raw_image = tf.read_file(filename)
image = tf.image.decode_jpeg(raw_image, channels=3)
return image, filename
def preprocess_func(image, filename):
image = preprocess_image(image, 299, 299, is_training=False)
return image, filename
def input_pipeline(filename_placeholder, batch_size=32, num_worker=4):
dataset = tf.data.Dataset.from_tensor_slices(filename_placeholder)
dataset = dataset.repeat(1)
images, names_, iterator = [], [], []
if args.num_gpu > 1:
for i in range(args.num_gpu):
dd = dataset.shard(args.num_gpu, i)
dd = dd.map(parse_func, num_parallel_calls=num_worker)
dd = dd.map(preprocess_func, num_parallel_calls=num_worker)
dd = dd.batch(batch_size)
dd = dd.prefetch(16)
itit = dd.make_initializable_iterator()
im, n_ = itit.get_next()
images.append(im)
names_.append(n_)
iterator.append(itit)
else:
dataset = dataset.map(parse_func, num_parallel_calls=num_worker)
dataset = dataset.batch(batch_size)
dataset = dataset.prefetch(1000)
iterator = dataset.make_initializable_iterator()
images, names_ = iterator.get_next()
return images, names_, iterator
def args_parse():
parser = argparse.ArgumentParser()
parser.add_argument('--num_gpu', default=1, type=int, help='Number of GPU going to be used')
parser.add_argument('--batch_size', default=8, type=int, help='Batch size of images')
parser.add_argument('--num_worker', default=2, type=int, help='Number of worker reading data.')
parser.add_argument('--reset', action='store_true', help='Reset all the extracted features.')
return parser.parse_args()
if __name__ == '__main__':
args = args_parse()
bsize = args.batch_size
num_w = args.num_worker
reset = args.reset
if reset:
os.system('rm -rf %s' % _mp.feature_dir)
fu.make_dirs(_mp.feature_dir)
fn, cap, npy_n = get_images_path_v3()
num_step = int(ceil(len(fn) / bsize))
fp = tf.placeholder(tf.string, shape=[None])
img, names, it = input_pipeline(fp, bsize, num_w)
if args.num_gpu > 1:
feature_tensor = make_parallel(models, args.num_gpu, img)
else:
feature_tensor = models(img)
print('Pipeline setup done !!')
saver = tf.train.Saver(tf.global_variables())
print('Start extract !!')
config = tf.ConfigProto(allow_soft_placement=True)
config.gpu_options.allow_growth = True
# config.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1
with tf.Session(config=config) as sess:
# q = Queue()
# p = Process(target=writer_worker, args=(q, cap, npy_n))
# p.start()
tf.global_variables_initializer().run()
tf.local_variables_initializer().run()
saver.restore(sess, './inception_resnet_v2_2016_08_30.ckpt')
sess.run([iit.initializer for iit in it], feed_dict={fp: fn})
# print(sess.run(feature_tensor).shape)
try:
for _ in range(num_step):
feature, name = sess.run([feature_tensor, names])
# q.put((feature, [i.decode() for i in name]))
# q.put(None)
except KeyboardInterrupt:
print()
# p.terminate()
finally:
pass
# p.join()
# q.close()
| [
1,
529,
9507,
29958,
1397,
4135,
29914,
21111,
29918,
14394,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
3166,
5844,
1053,
2257,
309,
13,
3166,
6674,
307,
985,
292,
1053,
28625,
13,
3166,
2897,
29889,
2084,
1053,
5988,
29892,
4864,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
5215,
26110,
29889,
21570,
29889,
2536,
326,
408,
2243,
326,
13,
3166,
12655,
29889,
1982,
29889,
4830,
1053,
1303,
29918,
2378,
29918,
6672,
29918,
29896,
29918,
29900,
29892,
1303,
29918,
11082,
293,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
3166,
2295,
1053,
7871,
29984,
29909,
2605,
13,
3166,
25000,
29889,
1239,
683,
29918,
1457,
19170,
1053,
758,
5014,
29918,
3027,
13,
3166,
25000,
29889,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
1053,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
29918,
1191,
29918,
6078,
29892,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
13,
3166,
3667,
29879,
1053,
848,
29918,
13239,
408,
868,
13,
3166,
3667,
29879,
1053,
3653,
29918,
13239,
408,
4084,
13,
13,
29918,
1526,
353,
7871,
29984,
29909,
2605,
580,
13,
13,
13,
1753,
1207,
29918,
23482,
29898,
4299,
29892,
954,
29918,
29887,
13364,
29892,
527,
3174,
1125,
13,
1678,
714,
29918,
5451,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
1949,
29918,
29887,
13364,
1125,
13,
4706,
411,
15886,
29889,
10141,
29898,
13264,
29889,
11501,
10299,
29898,
10141,
29918,
1853,
543,
29954,
7056,
613,
4742,
29918,
2248,
29922,
29875,
22164,
13,
9651,
411,
15886,
29889,
11918,
29918,
6078,
29898,
13264,
29889,
657,
29918,
11918,
29918,
6078,
3285,
24270,
29922,
29875,
1405,
29871,
29900,
1125,
13,
18884,
714,
29918,
5451,
29889,
4397,
29898,
4299,
29898,
8346,
29922,
2492,
29879,
29961,
29875,
12622,
13,
1678,
396,
736,
15886,
29889,
17685,
29898,
449,
29918,
5451,
29892,
9685,
29922,
29900,
29897,
13,
1678,
736,
714,
29918,
5451,
13,
13,
13,
1753,
4733,
29898,
8346,
1125,
13,
1678,
411,
2243,
326,
29889,
1191,
29918,
6078,
29898,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29918,
1191,
29918,
6078,
580,
1125,
13,
4706,
1480,
1169,
29892,
1095,
29918,
9748,
353,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
29898,
8346,
29892,
954,
29918,
13203,
29922,
29896,
29900,
29900,
29896,
29892,
338,
29918,
26495,
29922,
8824,
29897,
13,
13,
1678,
396,
736,
15886,
29889,
15755,
29889,
3317,
29918,
10109,
29898,
355,
29918,
9748,
1839,
1168,
29894,
29906,
29881,
29918,
29955,
29890,
29918,
29896,
29916,
29896,
7464,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
1402,
525,
26707,
1495,
13,
1678,
736,
1095,
29918,
9748,
1839,
1168,
29894,
29906,
29881,
29918,
29955,
29890,
29918,
29896,
29916,
29896,
2033,
13,
13,
13,
1753,
2254,
29918,
12181,
29898,
29876,
1125,
13,
1678,
411,
1722,
29898,
29876,
29892,
525,
6050,
1495,
408,
285,
29901,
13,
4706,
4655,
29892,
9461,
353,
1303,
29918,
11082,
293,
29898,
29888,
29897,
13,
4706,
8267,
29892,
363,
509,
273,
29892,
26688,
353,
1303,
29918,
2378,
29918,
6672,
29918,
29896,
29918,
29900,
29898,
29888,
29897,
13,
1678,
565,
7431,
29898,
12181,
29897,
2804,
29871,
29946,
29901,
13,
4706,
12020,
20948,
877,
19212,
29878,
29991,
16740,
1967,
856,
1273,
29879,
29915,
1273,
302,
29897,
13,
1678,
736,
8267,
13,
13,
13,
1753,
6314,
29898,
9641,
29918,
1272,
29892,
413,
1125,
13,
1678,
527,
3174,
353,
518,
7122,
7373,
1526,
29889,
3027,
29918,
3972,
29892,
413,
29892,
14210,
29879,
29918,
29995,
29900,
29945,
29881,
29889,
6173,
29915,
1273,
313,
29895,
29892,
474,
718,
29871,
29896,
876,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
4863,
29918,
1272,
29961,
29895,
22322,
6370,
29918,
19935,
7464,
29871,
29896,
29900,
4638,
13,
1678,
302,
2272,
29918,
978,
353,
5988,
7373,
1526,
29889,
14394,
29918,
3972,
29892,
413,
718,
15300,
29876,
2272,
1495,
13,
1678,
565,
451,
4864,
29898,
29876,
2272,
29918,
978,
29897,
470,
2254,
29918,
12181,
29898,
29876,
2272,
29918,
978,
9601,
29900,
29962,
2804,
7431,
29898,
2492,
29879,
1125,
13,
4706,
736,
302,
2272,
29918,
978,
29892,
7431,
29898,
2492,
29879,
511,
527,
3174,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
13,
1753,
679,
29918,
8346,
29918,
2084,
7295,
13,
1678,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
353,
19997,
19997,
5159,
13,
1678,
4863,
29918,
1272,
353,
9657,
29898,
667,
363,
325,
297,
868,
29889,
3126,
29918,
1359,
7373,
1526,
29889,
9641,
29918,
1272,
29918,
1445,
467,
5975,
580,
363,
2944,
297,
325,
29889,
7076,
3101,
13,
13,
1678,
3653,
353,
7687,
29898,
15914,
29892,
4863,
29918,
1272,
29897,
13,
1678,
411,
28625,
29898,
29896,
29953,
29897,
408,
11565,
29892,
260,
29939,
18933,
29898,
7827,
29922,
2435,
29898,
9641,
29918,
1272,
511,
5153,
2433,
28916,
4558,
1495,
408,
282,
1646,
29901,
13,
4706,
363,
1663,
297,
11565,
29889,
326,
481,
29918,
348,
21693,
29898,
9891,
29892,
1051,
29898,
9641,
29918,
1272,
29889,
8149,
22130,
29901,
13,
9651,
565,
1663,
29901,
13,
18884,
302,
2272,
29918,
7039,
29889,
4397,
29898,
1144,
29961,
29900,
2314,
13,
18884,
13284,
29889,
4397,
29898,
1144,
29961,
29896,
2314,
13,
18884,
934,
29918,
7039,
29889,
21843,
29898,
1144,
29961,
29906,
2314,
13,
9651,
282,
1646,
29889,
5504,
580,
13,
1678,
736,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
13,
13,
13,
1753,
679,
29918,
8346,
29918,
2084,
29918,
29894,
29906,
7295,
13,
1678,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
353,
19997,
19997,
5159,
13,
1678,
4863,
29918,
1272,
353,
868,
29889,
3126,
29918,
1359,
7373,
1526,
29889,
9641,
29918,
1272,
29918,
1445,
29897,
13,
13,
1678,
363,
527,
2585,
29918,
1989,
297,
260,
29939,
18933,
29898,
9641,
29918,
1272,
29892,
5153,
2433,
28916,
1954,
1179,
29374,
13,
4706,
302,
2272,
29918,
7039,
29889,
4397,
29898,
7122,
7373,
1526,
29889,
14394,
29918,
3972,
29892,
527,
2585,
29918,
1989,
718,
15300,
29876,
2272,
8785,
13,
4706,
19707,
353,
1051,
29898,
9641,
29918,
1272,
29961,
326,
2585,
29918,
1989,
1822,
8149,
3101,
13,
4706,
19707,
29889,
6605,
580,
13,
4706,
954,
353,
29871,
29900,
13,
4706,
363,
325,
297,
260,
29939,
18933,
29898,
29894,
7958,
1125,
13,
9651,
4558,
353,
518,
7122,
7373,
1526,
29889,
3027,
29918,
3972,
29892,
325,
29892,
14210,
29879,
29918,
29995,
29900,
29945,
29881,
29889,
6173,
29915,
1273,
313,
29894,
29892,
474,
718,
29871,
29896,
876,
13,
462,
418,
363,
474,
297,
3464,
29898,
29900,
29892,
4863,
29918,
1272,
29961,
326,
2585,
29918,
1989,
3816,
29894,
22322,
6370,
29918,
19935,
7464,
29871,
29896,
29945,
4638,
13,
9651,
934,
29918,
7039,
29889,
21843,
29898,
8346,
29897,
13,
9651,
954,
4619,
7431,
29898,
8346,
29897,
13,
4706,
13284,
29889,
4397,
29898,
1949,
29897,
13,
13,
1678,
1596,
29898,
5030,
5946,
29892,
302,
2272,
29918,
7039,
29897,
13,
1678,
736,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
13,
13,
13,
1753,
679,
29918,
8346,
29918,
2084,
29918,
29894,
29941,
7295,
13,
1678,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
353,
19997,
19997,
5159,
13,
1678,
4559,
353,
868,
29889,
3126,
29918,
1359,
7373,
1526,
29889,
11249,
29918,
2557,
29918,
1445,
29897,
13,
13,
1678,
363,
527,
2585,
29918,
1989,
297,
260,
29939,
18933,
29898,
11249,
29892,
5153,
2433,
28916,
1954,
1179,
29374,
13,
4706,
396,
565,
451,
4864,
29898,
7122,
7373,
1526,
29889,
14394,
29918,
3972,
29892,
527,
2585,
29918,
1989,
718,
15300,
29876,
2272,
8785,
29901,
13,
4706,
302,
2272,
29918,
7039,
29889,
4397,
29898,
7122,
7373,
1526,
29889,
14394,
29918,
3972,
29892,
527,
2585,
29918,
1989,
718,
15300,
29876,
2272,
8785,
13,
4706,
19707,
353,
1051,
29898,
11249,
29961,
326,
2585,
29918,
1989,
1822,
8149,
3101,
13,
4706,
19707,
29889,
6605,
580,
13,
4706,
954,
353,
29871,
29900,
13,
4706,
363,
325,
297,
260,
29939,
18933,
29898,
29894,
7958,
1125,
13,
9651,
4558,
353,
518,
7122,
7373,
1526,
29889,
3027,
29918,
3972,
29892,
325,
29892,
14210,
29879,
29918,
29995,
29900,
29945,
29881,
29889,
6173,
29915,
1273,
313,
29894,
29892,
474,
718,
29871,
29896,
876,
13,
462,
418,
363,
474,
297,
4559,
29961,
326,
2585,
29918,
1989,
3816,
29894,
5262,
13,
9651,
934,
29918,
7039,
29889,
21843,
29898,
8346,
29897,
13,
9651,
954,
4619,
7431,
29898,
8346,
29897,
13,
4706,
13284,
29889,
4397,
29898,
1949,
29897,
13,
1678,
396,
1596,
29898,
5030,
5946,
29892,
302,
2272,
29918,
7039,
29897,
13,
1678,
736,
934,
29918,
7039,
29892,
13284,
29892,
302,
2272,
29918,
7039,
13,
13,
13,
1753,
2302,
29918,
1949,
29898,
22100,
29918,
1761,
1125,
13,
1678,
954,
353,
29871,
29900,
13,
1678,
363,
5680,
297,
5680,
29918,
1761,
29901,
13,
4706,
954,
4619,
5680,
29889,
12181,
29961,
29900,
29962,
13,
1678,
736,
954,
13,
13,
13,
1753,
9227,
29918,
24602,
29898,
9990,
29892,
13284,
29892,
302,
2272,
29918,
7039,
1125,
13,
1678,
4863,
29918,
13140,
353,
29871,
29900,
13,
1678,
1887,
29918,
14394,
353,
5159,
13,
1678,
1887,
29918,
9507,
353,
5159,
13,
1678,
411,
260,
29939,
18933,
29898,
7827,
29922,
2435,
29898,
29876,
2272,
29918,
7039,
876,
408,
282,
1646,
29901,
13,
4706,
1550,
7431,
29898,
5030,
5946,
29897,
1405,
4863,
29918,
13140,
29901,
13,
9651,
2944,
353,
9521,
29889,
657,
580,
13,
9651,
565,
2944,
29901,
13,
18884,
285,
29892,
302,
353,
2944,
13,
18884,
1887,
29918,
14394,
29889,
4397,
29898,
29888,
29897,
13,
18884,
1887,
29918,
9507,
29889,
21843,
29898,
29876,
29897,
13,
18884,
1887,
29918,
2311,
353,
7431,
29898,
2997,
29918,
9507,
29897,
13,
18884,
1550,
7431,
29898,
5030,
5946,
29897,
1405,
4863,
29918,
13140,
322,
1887,
29918,
2311,
6736,
13284,
29961,
9641,
29918,
13140,
5387,
13,
13,
462,
1678,
3022,
271,
29918,
14394,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
2997,
29918,
14394,
29892,
9685,
29922,
29900,
29897,
13,
462,
1678,
2186,
29918,
22100,
353,
3022,
271,
29918,
14394,
7503,
5030,
5946,
29961,
9641,
29918,
13140,
5262,
13,
462,
1678,
2186,
29918,
9507,
353,
1887,
29918,
9507,
7503,
5030,
5946,
29961,
9641,
29918,
13140,
5262,
13,
13,
462,
1678,
4974,
2186,
29918,
22100,
29889,
12181,
29961,
29900,
29962,
1275,
13284,
29961,
9641,
29918,
13140,
1402,
320,
13,
462,
4706,
11860,
29879,
9134,
16608,
526,
451,
1021,
3850,
1273,
302,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
29962,
13,
462,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
8394,
29918,
22100,
22164,
13,
462,
4706,
4974,
4084,
29889,
6500,
3871,
29918,
827,
29918,
1062,
29898,
29876,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
2314,
1275,
320,
13,
462,
1669,
4084,
29889,
6500,
3871,
29918,
827,
29918,
1062,
29898,
8394,
29918,
9507,
29961,
29875,
14664,
5451,
12839,
29861,
29900,
1402,
320,
13,
462,
9651,
376,
29956,
29373,
4558,
29991,
1273,
29879,
29905,
29876,
29995,
29879,
29908,
1273,
313,
29876,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
1402,
2186,
29918,
9507,
29961,
29875,
2314,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
7442,
29889,
7620,
29898,
29876,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
1402,
2186,
29918,
22100,
29897,
13,
462,
1678,
5174,
8960,
408,
321,
29901,
13,
462,
4706,
7442,
29889,
7620,
29898,
29876,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
1402,
2186,
29918,
22100,
29897,
13,
462,
4706,
12020,
321,
13,
462,
1678,
282,
1646,
29889,
842,
29918,
8216,
877,
15300,
7122,
4197,
21154,
29889,
6500,
3871,
29918,
827,
29918,
1062,
29898,
29876,
2272,
29918,
7039,
29961,
9641,
29918,
13140,
11724,
13,
462,
462,
462,
259,
851,
29898,
2435,
29898,
8394,
29918,
22100,
876,
12622,
13,
462,
1678,
628,
1887,
29918,
14394,
7503,
29962,
13,
462,
1678,
1887,
29918,
14394,
29889,
4397,
29898,
17685,
29918,
14394,
29961,
5030,
5946,
29961,
9641,
29918,
13140,
5387,
2314,
13,
462,
1678,
1887,
29918,
9507,
353,
1887,
29918,
9507,
29961,
5030,
5946,
29961,
9641,
29918,
13140,
5387,
29962,
13,
462,
1678,
1887,
29918,
2311,
353,
7431,
29898,
2997,
29918,
9507,
29897,
13,
462,
1678,
4863,
29918,
13140,
4619,
29871,
29896,
13,
462,
1678,
282,
1646,
29889,
5504,
580,
13,
9651,
1683,
29901,
13,
18884,
2867,
13,
13,
13,
1753,
6088,
29918,
9891,
29898,
9507,
1125,
13,
1678,
10650,
29918,
3027,
353,
15886,
29889,
949,
29918,
1445,
29898,
9507,
29897,
13,
1678,
1967,
353,
15886,
29889,
3027,
29889,
13808,
29918,
26568,
29898,
1610,
29918,
3027,
29892,
18196,
29922,
29941,
29897,
13,
1678,
736,
1967,
29892,
10422,
13,
13,
13,
1753,
758,
5014,
29918,
9891,
29898,
3027,
29892,
10422,
1125,
13,
1678,
1967,
353,
758,
5014,
29918,
3027,
29898,
3027,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
338,
29918,
26495,
29922,
8824,
29897,
13,
1678,
736,
1967,
29892,
10422,
13,
13,
13,
1753,
1881,
29918,
13096,
5570,
29898,
9507,
29918,
27074,
29892,
9853,
29918,
2311,
29922,
29941,
29906,
29892,
954,
29918,
24602,
29922,
29946,
1125,
13,
1678,
8783,
353,
15886,
29889,
1272,
29889,
16390,
24541,
29889,
3166,
29918,
20158,
29918,
29879,
29399,
29898,
9507,
29918,
27074,
29897,
13,
1678,
8783,
353,
8783,
29889,
14358,
29898,
29896,
29897,
13,
1678,
4558,
29892,
2983,
3383,
20380,
353,
19997,
19997,
5159,
13,
1678,
565,
6389,
29889,
1949,
29918,
29887,
3746,
1405,
29871,
29896,
29901,
13,
4706,
363,
474,
297,
3464,
29898,
5085,
29889,
1949,
29918,
29887,
3746,
1125,
13,
9651,
24488,
353,
8783,
29889,
845,
538,
29898,
5085,
29889,
1949,
29918,
29887,
3746,
29892,
474,
29897,
13,
9651,
24488,
353,
24488,
29889,
1958,
29898,
5510,
29918,
9891,
29892,
954,
29918,
23482,
29918,
29883,
4293,
29922,
1949,
29918,
24602,
29897,
13,
9651,
24488,
353,
24488,
29889,
1958,
29898,
1457,
5014,
29918,
9891,
29892,
954,
29918,
23482,
29918,
29883,
4293,
29922,
1949,
29918,
24602,
29897,
13,
9651,
24488,
353,
24488,
29889,
16175,
29898,
16175,
29918,
2311,
29897,
13,
9651,
24488,
353,
24488,
29889,
29886,
999,
3486,
29898,
29896,
29953,
29897,
13,
9651,
372,
277,
353,
24488,
29889,
5675,
29918,
11228,
13902,
29918,
17609,
580,
13,
9651,
527,
29892,
302,
29918,
353,
372,
277,
29889,
657,
29918,
4622,
580,
13,
9651,
4558,
29889,
4397,
29898,
326,
29897,
13,
9651,
2983,
5396,
4397,
29898,
29876,
19925,
13,
9651,
20380,
29889,
4397,
29898,
277,
277,
29897,
13,
1678,
1683,
29901,
13,
4706,
8783,
353,
8783,
29889,
1958,
29898,
5510,
29918,
9891,
29892,
954,
29918,
23482,
29918,
29883,
4293,
29922,
1949,
29918,
24602,
29897,
13,
4706,
8783,
353,
8783,
29889,
16175,
29898,
16175,
29918,
2311,
29897,
13,
4706,
8783,
353,
8783,
29889,
29886,
999,
3486,
29898,
29896,
29900,
29900,
29900,
29897,
13,
4706,
20380,
353,
8783,
29889,
5675,
29918,
11228,
13902,
29918,
17609,
580,
13,
4706,
4558,
29892,
2983,
29918,
353,
20380,
29889,
657,
29918,
4622,
580,
13,
1678,
736,
4558,
29892,
2983,
3383,
20380,
13,
13,
13,
1753,
6389,
29918,
5510,
7295,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
29887,
3746,
742,
2322,
29922,
29896,
29892,
1134,
29922,
524,
29892,
1371,
2433,
4557,
310,
22796,
2675,
304,
367,
1304,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
16175,
29918,
2311,
742,
2322,
29922,
29947,
29892,
1134,
29922,
524,
29892,
1371,
2433,
23145,
2159,
310,
4558,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
24602,
742,
2322,
29922,
29906,
29892,
1134,
29922,
524,
29892,
1371,
2433,
4557,
310,
15645,
5183,
848,
29889,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
12071,
742,
3158,
2433,
8899,
29918,
3009,
742,
1371,
2433,
27175,
599,
278,
23892,
5680,
29889,
1495,
13,
1678,
736,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
6389,
353,
6389,
29918,
5510,
580,
13,
1678,
289,
2311,
353,
6389,
29889,
16175,
29918,
2311,
13,
1678,
954,
29918,
29893,
353,
6389,
29889,
1949,
29918,
24602,
13,
1678,
10092,
353,
6389,
29889,
12071,
13,
1678,
565,
10092,
29901,
13,
4706,
2897,
29889,
5205,
877,
1758,
448,
9600,
1273,
29879,
29915,
1273,
903,
1526,
29889,
14394,
29918,
3972,
29897,
13,
1678,
4084,
29889,
5675,
29918,
3972,
29879,
7373,
1526,
29889,
14394,
29918,
3972,
29897,
13,
1678,
7876,
29892,
2117,
29892,
302,
2272,
29918,
29876,
353,
679,
29918,
8346,
29918,
2084,
29918,
29894,
29941,
580,
13,
13,
1678,
954,
29918,
10568,
353,
938,
29898,
27696,
29898,
2435,
29898,
9144,
29897,
847,
289,
2311,
876,
13,
1678,
285,
29886,
353,
15886,
29889,
27074,
29898,
13264,
29889,
1807,
29892,
8267,
11759,
8516,
2314,
13,
1678,
10153,
29892,
2983,
29892,
372,
353,
1881,
29918,
13096,
5570,
29898,
18091,
29892,
289,
2311,
29892,
954,
29918,
29893,
29897,
13,
1678,
565,
6389,
29889,
1949,
29918,
29887,
3746,
1405,
29871,
29896,
29901,
13,
4706,
4682,
29918,
20158,
353,
1207,
29918,
23482,
29898,
9794,
29892,
6389,
29889,
1949,
29918,
29887,
3746,
29892,
10153,
29897,
13,
1678,
1683,
29901,
13,
4706,
4682,
29918,
20158,
353,
4733,
29898,
2492,
29897,
13,
13,
1678,
1596,
877,
29925,
23828,
6230,
2309,
21443,
1495,
13,
13,
1678,
872,
369,
353,
15886,
29889,
14968,
29889,
29903,
12483,
29898,
13264,
29889,
10945,
29918,
20897,
3101,
13,
13,
1678,
1596,
877,
4763,
6597,
21443,
1495,
13,
13,
1678,
2295,
353,
15886,
29889,
3991,
1184,
517,
29898,
9536,
29918,
2695,
29918,
29886,
9552,
29922,
5574,
29897,
13,
1678,
2295,
29889,
29887,
3746,
29918,
6768,
29889,
9536,
29918,
29887,
798,
386,
353,
5852,
13,
1678,
396,
2295,
29889,
4262,
29918,
6768,
29889,
20640,
3950,
29918,
6768,
29889,
10945,
29918,
29926,
277,
29918,
5563,
353,
15886,
29889,
20624,
326,
3950,
5856,
29889,
1164,
29918,
29896,
13,
13,
1678,
411,
15886,
29889,
7317,
29898,
2917,
29922,
2917,
29897,
408,
27937,
29901,
13,
4706,
396,
3855,
353,
5462,
434,
580,
13,
4706,
396,
282,
353,
10554,
29898,
5182,
29922,
13236,
29918,
24602,
29892,
6389,
7607,
29939,
29892,
2117,
29892,
302,
2272,
29918,
29876,
876,
13,
4706,
396,
282,
29889,
2962,
580,
13,
4706,
15886,
29889,
10945,
29918,
20897,
29918,
11228,
3950,
2141,
3389,
580,
13,
4706,
15886,
29889,
2997,
29918,
20897,
29918,
11228,
3950,
2141,
3389,
580,
13,
4706,
872,
369,
29889,
5060,
487,
29898,
29879,
404,
29892,
19283,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29941,
29900,
29889,
384,
415,
1495,
13,
4706,
27937,
29889,
3389,
4197,
29875,
277,
29889,
11228,
3950,
363,
474,
277,
297,
372,
1402,
8343,
29918,
8977,
3790,
18091,
29901,
7876,
1800,
13,
4706,
396,
1596,
29898,
29879,
404,
29889,
3389,
29898,
14394,
29918,
20158,
467,
12181,
29897,
13,
4706,
1018,
29901,
13,
9651,
363,
903,
297,
3464,
29898,
1949,
29918,
10568,
1125,
13,
18884,
4682,
29892,
1024,
353,
27937,
29889,
3389,
4197,
14394,
29918,
20158,
29892,
2983,
2314,
13,
18884,
396,
3855,
29889,
649,
3552,
14394,
29892,
518,
29875,
29889,
13808,
580,
363,
474,
297,
1024,
12622,
13,
9651,
396,
3855,
29889,
649,
29898,
8516,
29897,
13,
4706,
5174,
7670,
3377,
4074,
6685,
29901,
13,
9651,
1596,
580,
13,
9651,
396,
282,
29889,
18821,
403,
580,
13,
4706,
7146,
29901,
13,
9651,
1209,
13,
9651,
396,
282,
29889,
7122,
580,
13,
9651,
396,
3855,
29889,
5358,
580,
13,
2
] |
R function.py | haideraheem/Simple-Python-Programs | 0 | 26322 | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 6 17:11:11 2018
@author: <NAME>
"""
a= float(input("Type a : "))
b= float(input("Type b : "))
c= float(input("Type c : "))
x= (a*b)+(b*c)+(c*a)
y= (a+b+c)
r= x/y
print( )
print("The result of the calculation is {0:.2f}".format(r)) | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
15945,
19451,
13,
20399,
373,
12178,
4756,
259,
29953,
29871,
29896,
29955,
29901,
29896,
29896,
29901,
29896,
29896,
29871,
29906,
29900,
29896,
29947,
30004,
13,
30004,
13,
29992,
8921,
29901,
529,
5813,
3238,
13,
15945,
19451,
13,
30004,
13,
29874,
29922,
5785,
29898,
2080,
703,
1542,
263,
584,
376,
876,
30004,
13,
29890,
29922,
5785,
29898,
2080,
703,
1542,
289,
584,
376,
876,
30004,
13,
29883,
29922,
5785,
29898,
2080,
703,
1542,
274,
584,
376,
876,
30004,
13,
29916,
29922,
313,
29874,
29930,
29890,
7240,
29898,
29890,
29930,
29883,
7240,
29898,
29883,
29930,
29874,
8443,
13,
29891,
29922,
313,
29874,
29974,
29890,
29974,
29883,
8443,
13,
29878,
29922,
921,
29914,
29891,
6756,
13,
2158,
29898,
1723,
30004,
13,
2158,
703,
1576,
1121,
310,
278,
13944,
338,
426,
29900,
29901,
29889,
29906,
29888,
29913,
1642,
4830,
29898,
29878,
876,
2
] |
configs/semantic_segmentation/common/optims/ep30.py | voldemortX/DeeplabV3_PyTorch1.3_Codebase | 1 | 100109 | <gh_stars>1-10
lr_scheduler = dict(
name='poly_scheduler',
epochs=30,
power=0.9
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29212,
29918,
816,
14952,
353,
9657,
29898,
13,
1678,
1024,
2433,
22678,
29918,
816,
14952,
742,
13,
1678,
21502,
12168,
29922,
29941,
29900,
29892,
13,
1678,
3081,
29922,
29900,
29889,
29929,
13,
29897,
13,
2
] |
Gds/src/fprime_gds/wxgui/tools/PexpectRunnerConsolGUI.py | hunterpaulson/fprime | 0 | 32742 | <reponame>hunterpaulson/fprime
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version May 29 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
###########################################################################
## Class PexpectRunnerGUI
###########################################################################
class PexpectRunnerGUI(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(
self,
parent,
id=wx.ID_ANY,
title=u"Pexpect Output",
pos=wx.DefaultPosition,
size=wx.Size(500, 300),
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
)
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
bSizer3 = wx.BoxSizer(wx.VERTICAL)
self.TextCtrlConsol = wx.TextCtrl(
self,
wx.ID_ANY,
wx.EmptyString,
wx.DefaultPosition,
wx.DefaultSize,
wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_WORDWRAP,
)
bSizer3.Add(self.TextCtrlConsol, 1, wx.ALL | wx.EXPAND, 5)
self.SetSizer(bSizer3)
self.Layout()
self.Centre(wx.BOTH)
# Connect Events
self.Bind(wx.EVT_CLOSE, self.onWindowClose)
self.TextCtrlConsol.Bind(wx.EVT_MOUSEWHEEL, self.onMouseWheel)
def __del__(self):
pass
# Virtual event handlers, overide them in your derived class
def onWindowClose(self, event):
event.Skip()
def onMouseWheel(self, event):
event.Skip()
| [
1,
529,
276,
1112,
420,
29958,
29882,
8428,
3274,
352,
1100,
29914,
29888,
10080,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
2277,
5132,
775,
5759,
411,
26437,
2500,
5627,
313,
3259,
2610,
29871,
29906,
29929,
29871,
29906,
29900,
29896,
29947,
29897,
13,
2277,
1732,
597,
1636,
29889,
23310,
689,
16409,
29889,
990,
29914,
13,
2277,
13,
2277,
349,
14063,
11662,
334,
12256,
29930,
11488,
3446,
3235,
24080,
29991,
13,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
13,
5215,
26437,
13,
5215,
26437,
29889,
29916,
2214,
13,
13,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
2277,
4134,
349,
17854,
16802,
29954,
3120,
13,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
13,
13,
1990,
349,
17854,
16802,
29954,
3120,
29898,
23310,
29889,
4308,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3847,
1125,
13,
4706,
26437,
29889,
4308,
17255,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
3847,
29892,
13,
9651,
1178,
29922,
23310,
29889,
1367,
29918,
2190,
29979,
29892,
13,
9651,
3611,
29922,
29884,
29908,
29925,
17854,
10604,
613,
13,
9651,
926,
29922,
23310,
29889,
4592,
8003,
29892,
13,
9651,
2159,
29922,
23310,
29889,
3505,
29898,
29945,
29900,
29900,
29892,
29871,
29941,
29900,
29900,
511,
13,
9651,
3114,
29922,
23310,
29889,
23397,
29918,
29943,
4717,
2303,
29918,
1254,
29979,
1307,
891,
26437,
29889,
29911,
2882,
29918,
29911,
4717,
5348,
29903,
1964,
29892,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
2697,
3505,
29950,
9466,
29898,
23310,
29889,
4592,
3505,
29892,
26437,
29889,
4592,
3505,
29897,
13,
13,
4706,
289,
29903,
3950,
29941,
353,
26437,
29889,
3313,
29903,
3950,
29898,
23310,
29889,
5348,
29911,
2965,
1964,
29897,
13,
13,
4706,
1583,
29889,
1626,
18069,
13696,
324,
353,
26437,
29889,
1626,
18069,
29898,
13,
9651,
1583,
29892,
13,
9651,
26437,
29889,
1367,
29918,
2190,
29979,
29892,
13,
9651,
26437,
29889,
8915,
1231,
29892,
13,
9651,
26437,
29889,
4592,
8003,
29892,
13,
9651,
26437,
29889,
4592,
3505,
29892,
13,
9651,
26437,
29889,
4330,
29918,
29924,
8647,
6227,
8895,
891,
26437,
29889,
4330,
29918,
16310,
1164,
16786,
891,
26437,
29889,
4330,
29918,
17013,
9980,
3301,
29892,
13,
4706,
1723,
13,
4706,
289,
29903,
3950,
29941,
29889,
2528,
29898,
1311,
29889,
1626,
18069,
13696,
324,
29892,
29871,
29896,
29892,
26437,
29889,
9818,
891,
26437,
29889,
5746,
29925,
9468,
29892,
29871,
29945,
29897,
13,
13,
4706,
1583,
29889,
2697,
29903,
3950,
29898,
29890,
29903,
3950,
29941,
29897,
13,
4706,
1583,
29889,
3453,
580,
13,
13,
4706,
1583,
29889,
29907,
14056,
29898,
23310,
29889,
29933,
2891,
29950,
29897,
13,
13,
4706,
396,
14971,
28488,
13,
4706,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
29907,
3927,
1660,
29892,
1583,
29889,
265,
5907,
11123,
29897,
13,
4706,
1583,
29889,
1626,
18069,
13696,
324,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
6720,
17171,
29956,
9606,
6670,
29892,
1583,
29889,
265,
14346,
29956,
10552,
29897,
13,
13,
1678,
822,
4770,
6144,
12035,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
396,
19181,
1741,
25795,
29892,
975,
680,
963,
297,
596,
10723,
770,
13,
1678,
822,
373,
5907,
11123,
29898,
1311,
29892,
1741,
1125,
13,
4706,
1741,
29889,
15797,
666,
580,
13,
13,
1678,
822,
373,
14346,
29956,
10552,
29898,
1311,
29892,
1741,
1125,
13,
4706,
1741,
29889,
15797,
666,
580,
13,
2
] |
AREMApy/v2018/ch_15.py | mwhit74/AREMApy | 2 | 95824 | <reponame>mwhit74/AREMApy
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 14 12:51:05 2020
@author: mwhitten
"""
import math
def eq13141(fax, fa_ax, fb1, fa_b1, fb2, fa_b2, k1, l1, r1,
k2, l2, r2, e):
"""Axial Compression and Bending
AREMA 2018 Section 1.3.14.1
Member subject to both axial compression and bending stresses shall be
proportioned to satisfy the following requirements:
if f_axial/fa_axial <= 0.15:
IR = fa/Fa + fb1/Fb1 + fb2/Fb2
else:
moment_mag1 = 1-f_axial/(0.514*math.pow(math.pi,2)*e)*math.pow(klr1,2)
moment_mag2 = 1-f_axial/(0.514*math.pow(math.pi,2)*e)*math.pow(klr2,2)
IR = fa/Fa + fb1/(Fb1*moment_mag1) + fb2/(Fb2*moment_mag2)
Args:
fax (float): calculated axial stress [psi]
fb1 (float): calculated bending stess about axis 1-1 [psi]
fb2 (float): calculated bending stress about axis 2-2 [psi]
fa_ax (flaot): allowable axial stress if axial force alone
existed [psi]
fa_b1 (float): allowable compression bending stress about axis 1-1,
that would be permitted if bending alone existed [psi]
fa_b2 (float): allowable compression bending stress about axis 2-2,
that would be permitted if bending alone existed [psi]
k1 (float): effective length factor about 1-1 axis
l1 (float): unbraced length about 1-1 axis [inches]
r1 (float): radius of gyration about 1-1 axis [inches]
k2 (float): effective length factor about 2-2 axis
l2 (float): unbraced length about 2-2 axis [inches]
r2 (float): radius of gyration about 2-2 axis [inches]
e (float): modulus of elasticity [psi]
Returns:
ir (tuple(float, str)): interaction ratio of the axial stress and
bi-axail bending stress per the prescribed
equations
Notes:
1. Units are in lbs and inches.
2. To ignore moment magnification factors enter k1 = k2 = 0.0.
Secondary effects, where they are determined to be significant,
should be considered elsewhere in the analysis or design if the
moment magnification is ignored here.
"""
ref_text = "AREMA 2018 Section 1.3.14.1 \n\n"
user_input = (f'fax = {fax:.2f}, fa_ax = {fa_ax:.2f},' +
f'fb1 = {fb1:.2f}, fa_b1 = {fa_b1:.2f},' +
f'fb2 = {fb2:.2f}, fa_b2 = {fa_b2:.2f},' +
f'k1 = {k1:.2f}, l1 = {l1:.2f}, r1 = {r1:.2f},' +
f'k2 = {k2:.2f}, l2 = {l2:.2f}, r2 = {r2:.2f},' +
f'E = {e:.2f} \n\n')
fax_ir = fax/fa_ax
fb1_ir = fb1/fa_b1
fb2_ir = fb2/fa_b2
text1 = (f'fa/Fa = {fax:.2f}/{fa_ax:.2f} \n' +
f'fa/Fa = {fax_ir:.2f} \n\n')
text2 = (f'fb1/Fb1 = {fb1:.2f}/{fa_b1:.2f} \n' +
f'fb1/Fb1 = {fb1_ir:.3f} \n\n')
text3 = (f'fb2/Fb2 = {fb2:.2f}/{fa_b2:.2f} \n' +
f'fb2/Fb2 = {fb2_ir:.3f} \n\n')
if fax_ir <= 0.15:
ir = fax_ir + fb1_ir + fb2_ir
text4 = (f'IR = fax/Fax + fb1/Fb1 + fb2/Fb2 \n'
f'IR = {fax_ir:.2f} + {fb1_ir:.2f} + {fb2_ir:.2f} \n'
f'IR = {ir:.3f}')
text = text1 + text2 + text3 + text4
else:
klr1 = k1*l1/r1
klr2 = k2*l2/r2
moment_mag1 = 1-fax/(0.514*math.pow(math.pi,2)*e)*math.pow(klr1,2)
moment_mag2 = 1-fax/(0.514*math.pow(math.pi,2)*e)*math.pow(klr2,2)
ir = fax_ir + fb1_ir/moment_mag1 + fb2/moment_mag2
text5 = f'k1*l1/r1 = {klr1:.2f} \n'
text6 = f'k2*l2/r2 = {klr2:.2f} \n\n'
text7 = (f'Moment Mag. 1 = 1-fax/' +
f'(0.514*math.pow(math.pi,2)*e)*math.pow(k1*l1/r1,2) \n' +
f'Moment Mag. 1 = 1-{fax:.2f}/' +
f'(0.514*math.pow(math.pi,2)*{e:.1f})'
f'*math.pow({klr1:.2f},2) \n' +
f'Moment Mag. 1 = {moment_mag1:.3f} \n\n')
text8 = (f'Moment Mag. 2 = 1-fax/' +
f'(0.514*math.pow(math.pi,2)*e)*math.pow(k2*l2/r2,2) \n' +
f'Moment Mag. 2 = 1-{fax:.2f}/' +
f'(0.514*math.pow(math.pi,2)*{e:.1f})'
f'*math.pow({klr2:.2f},2) \n' +
f'Moment Mag. 2 = {moment_mag2:.3f} \n\n')
text9 = (f'IR = fax/Fax + fb1/(Fb1*Moment Mag. 1)'
f' + fb2/(Fb2*Moment Mag. 2) \n'
f'IR = {fax_ir:.2f} + {fb1_ir/moment_mag1:.2f}'
f' + {fb2_ir/moment_mag1:.2f} \n'
f'IR = {ir:.3f} \n')
text = text1 + text2 + text3 + text5 + text6 + text7 + text8 + text9
text = ref_text + user_input + text
return ir, text
def eq141d1(stress_condition, fy, fu):
"""Axial tension allowable stress subject to direct tensile load
AREMA 2018 Table 15-1-11 Row 1 Equations
if stress_condition == 1:
fa_t = 0.55*fy
elif stress_condition == 2:
fa_tn = 0.47*fu
elif stress_condition == 3:
fa_tnp = 0.45*fy
Args:
stress_condition (int):
1 - Axial tension, structural steel, gross section
2 - Axial tension, structural steel, effective net section
(see articles 1.5.8 and 1.6.5)
3 - Axial tension, structural steel, effective net area
at cross-section of pin hole of pin-connected members
fy (float): yield stress [psi]
fu (float): ultimate stress [psi]
Returns:
fa_t (tuple(float, str)): allowable tension stress on gross
section [psi]
-OR-
fa_tn (tuple(float, str)): allowable tension stress on net
section [psi]
-OR-
fa_tnp (tuple(float, str)): allowable tension stress on net section at
cross-section of pin hole of pin-connected
members [psi]
Notes:
1. Units in lbs and inches.
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 1 \n\n"
user_input = (f'Stress Condition = {stress_condition:d},' +
f'Fy = {fy:.2f}, Fu = {fu:.2f} \n')
if stress_condition == 1:
fa = 0.55*fy
text = (f'1 - Axial tension, structural steel, gross section \n' +
f'fa_tg = 0.55*fy \n' +
f'fa_tg = 0.55*{fy:.1f} \n' +
f'fa_tg = {fa:.1f}')
elif stress_condition == 2:
fa = 0.47*fu
text = (f'2 - Axial tension, structural steel, effective net section' +
f'(see articles 1.5.8 and 1.6.5) \n'
f'fa_tn = 0.47*fu \n' +
f'fa_tn = 0.47*{fu:.1f} \n' +
f'fa_tn = {fa:.1f}')
elif stress_condition == 3:
fa = 0.45*fy
text = (f'3 - Axial tension, structural steel, effective net area' +
f'at cross-section of pin hole of pin-connected members \n'
f'fa_tnp = 0.45*fy \n' +
f'fa_tnp = 0.45*{fy:.1f} \n' +
f'fa_tnp = {fa:.1f}')
text = ref_text + user_input + text
return fa, text
def eq141d2():
pass
def eq141d3(fy):
"""Tension in extreme fibers subject to bending, net section
AREMA 2018 Table 15-1-11 Row 3 Equations
Tension in extreme fibers of rolled shapes, girders and built-up section,
subject to bending, net section
fa_bt = 0.55*fy
Args:
fy (float): yield stress [psi]
Returns:
fa_bt (tuple(float, str)): allowable bending tensile stress [psi]
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 3 \n\n"
user_input = f'Fy = {fy:.2f} \n'
fa_bt = 0.55*fy
text = (f'Tension in extreme fibers of rolled shapes, girder and \n' +
f'built-up section, subject to bending, net section \n' +
f'fa_bt = 0.55*fy \n' +
f'fa_bt = 0.55*{fy:.1f} \n' +
f'fa_bt = {fa_bt:.1f}')
text = ref_text + user_input + text
return fa_bt, text
def eq141d4():
pass
def eq141d5(k, l, r, fy, e):
"""Axial compression allowable stress, gross section
AREMA 2018 Table 15-1-11 Row 5 Equations
(Except for stiffeners of beams and girders, and splice material)
klr = k*l/r
elastic_limit = 0.629*math.sqrt(fy/e)
plastic_limit = 5.034*math.sqrt(fy/e)
if klr <= elastic_limit:
fa_ac = 0.55*fy
elif klr > elastic_limit and klr <= plastic_limit:
fa_ac = 0.60*fy-math.pow(17500.0*fy/e,3/2)*klr
elif klr > plastic_limit:
fa_ac = 0.514*math.pow(math.pi, 2)*e/math.pow(klr,2)
Args:
k (float): effective length factor in the axis considered
k = 7/8 for members with pin-end connections
k = 3/4 for members with bolted or welded end connections
l (float): unbraced length in the axis considered [inches]
r (float): radius of gyration in the axis considered [inches]
fy (float): yield stress [psi]
e (float): modulus of elasticity [psi]
Returns:
fa_ac (tuple(float, str)): allowable axial compression on gross section
Notes:
1. Units are in lbs and inches.
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 5 \n\n"
user_input = (f'k = {k:.2f}, l = {l:.2f}, r = {r:.2f}, Fy = {fy:.2f},' +
f'E = {e:.2f} \n')
klr = k*l/r
elastic_limit = 0.629/math.sqrt(fy/e)
plastic_limit = 5.034/math.sqrt(fy/e)
if klr <= elastic_limit:
fa_ac = 0.55*fy
text = (f'kl/r <= 0.629/math.sqrt(fy/e) \n' +
f'{klr:.2f} <= {elastic_limit:.2f} \n' +
f'fa_ac = 0.55*fy \n' +
f'fa_ac = 0.55*{fy:.1f} \n' +
f'fa_ac = {fa_ac:.1f}')
elif klr > elastic_limit and klr <= plastic_limit:
fa_ac = 0.60*fy-math.pow(17500.0*fy/e,3/2)*klr
text = (f'kl/r > 0.629/math.sqrt(fy/e)'
f'and kl/r <= 5.034/math.sqrt(fy/e) \n' +
f'{klr:.2f} > {elastic_limit:.2f}'
f'and {klr:.2f} <= {plastic_limit:.2f} \n' +
f'fa_ac = 0.60*fy-math.pow(17500.0*fy/e,3/2)*kl/r \n' +
f'fa_ac = 0.60*{fy:.1f}-'
f'math.pow(17500.0*{fy:.1f}/{e:.1f},3/2)*{klr:.2f} \n' +
f'fa_ac = {fa_ac:.1f}')
elif klr > plastic_limit:
fa_ac = 0.514*math.pow(math.pi, 2)*e/math.pow(klr,2)
text = (f'kl/r > 5.034/math.sqrt(fy/e) \n' +
f'{klr:.2f} > {plastic_limit:.2f} \n' +
f'fa_ac = 0.514*math.pow(math.pi, 2)*e/math.pow(kl/r,2) \n' +
f'fa_ac = 0.514*math.pow(math.pi, 2)*{e:.2f}' +
f'/math.pow({klr:.2f},2) \n' +
f'fa_ac = {fa_ac:.1f}')
text = ref_text + user_input + text
return fa_ac, text
def eq141d6(fy):
"""Compression in extreme fibers of I-type section bending about weak axis
AREMA 2018 Section 1.4.1 Table 15-1-11 Row 6
Compression in extreme fibers of I-type members subjected to loading
perpendicular to the web.
fa_b = 0.55*fy
Args:
fy (float): yield stress [psi]
Return:
fa_bt (tuple(float, str)): allowable bending tensile stress [psi]
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 6 \n\n"
user_input = (f'Fy = {fy:.2f} \n\n')
fa_b = 0.55*fy
text = (f'fa_b = 0.55*fy \n' +
f'fa_b = 0.55*{fy:.1f} \n' +
f'fa_b = {fa_b:.1f}')
text = ref_text + user_input + text
return fa_b, text
def eq141d7(l, ryc, afc, d, fy, e):
"""Compression in extreme fibers of flexural members allowable stress
AREMA 2018 Table 15-1-11 Row 7 Equations
Compression in extreme fibers of flexural members symmertical about the
principal axis in the plane of the web (other than box-type flexural
members) that are rolled beams or welded built-up members with solid
rectangular flanges, the larger of the values computer by the following
fa_bc1 = (0.55*fy - 0.55*math.pow(fy,2)/
(6.3*math.pow(math.pi,2)*e)*math.pow(l/ryc,2)
fa_bc2 = 0.131*math.pi*e/(l*d*math.sqrt(1+mu)/afc)
fa_bc3 = 0.55*fy
fa_bc = min(max(fa1, fa2), fa3)
Args:
l (float): distance bwteen points of lateral support for the
compression flange, unbraced length [inches]
ryc (float): minimum radius of gyration of the compression flange and
that portion of the web area on the compression side of the
axis of bending, about an axis in the plane of the
web [inches]
afc (float): area of the smaller flange excluding any portion of the
web [inches^2]
d (float): overall dpeth of the member [inches]
fy (float): yield stress [psi]
e (float): modulus of elasticity [psi]
Returns:
fa_bc (float): allowable compression stress in extreme fibers of
flexural members [psi]
Notes:
1. Units are in lbs and inches.
2. Poisson's ratio, mu, is taken as 0.3.
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 7 \n\n"
user_input = (f'l = {l:.2f}, ryc = {ryc:.2f}, afc = {afc:.2f}, ' +
f'd = {d:.2f}, Fy = {fy:.2f}, E = {e:.2f} \n\n')
mu = 0.3
fa_bc1 = (0.55*fy - 0.55*math.pow(fy,2)/
(6.3*math.pow(math.pi,2)*e)*math.pow(l/ryc,2))
fa_bc2 = 0.131*math.pi*e/(l*d*math.sqrt(1+mu)/afc)
fa_bc3 = 0.55*fy
fa_bc = min(max(fa_bc1, fa_bc2), fa_bc3)
text1 = (f'fa_bc1 = 0.55*fy - 0.55*math.pow(fy,2)/' +
f'(6.3*math.pow(math.pi,2)*e)*math.pow(l/ryc,2) \n' +
f'fa_bc1 = 0.55*{fy:.1f} - 0.55*math.pow({fy:.1f},2)/' +
f'(6.3*math.pow(math.pi,2)*{e:.1f})' +
f'*math.pow({l:.2f}/{ryc:.2f},2) \n' +
f"""fa_bc1 = {fa_bc1:.1f} \n\n""")
text2 = (f'fa_bc2 = 0.131*math.pi*e/(l*d*math.sqrt(1+mu)/afc) \n' +
f'fa_bc2 = 0.131*math.pi*{e:.1f}/' +
f'({l:.2f}*{d:.2f}*math.sqrt(1+{mu:.2f})/{afc:.2f}) \n' +
f'fa_bc2 = {fa_bc2:.1f} \n\n')
text3 = (f'fa_bc3 = 0.55*fy \n' +
f'fa_bc3 = 0.55*{fy:.2f} \n' +
f'fa_bc3 = {fa_bc3:.1f} \n\n')
text4 = (f'fa_bc = min(max(fa_bc1, fa_bc2), fa_bc3) \n' +
f'fa_bc = min(max({fa_bc1:.2f}, {fa_bc2:.2f}), {fa_bc3:.2f}) \n' +
f'fa_bc = min({max(fa_bc1, fa_bc2):.2f}, {fa_bc3:.2f}) \n' +
f'fa_bc = {min(max(fa_bc1, fa_bc2), fa_bc3):.1f} \n')
text = ref_text + user_input + text1 + text2 + text3 + text4
return fa_bc, text
def eq141d10(l, sx, a, sum_st, iy, fy, e):
"""Compression in extreme fibers of box type flexural members
AREMA 2018 Section 1.4.1 Table 15-1-11 Row 10
Compression in the extreme fibers of box type welded or bolted flexural
members symmetrical about the principal axis midway between the webs
(l/r)e = math.sqrt(1.105*math.pi/sxx*sqrt(sum(s/t))/
a*math.sqrt(i_yy/(1+mu)))
fa_bc = 0.55*fy - 0.55*math.pow(fy,2)/(6.3*math.pow(math.pi,2)*e)*
math.pow((l/r)e,2)
Args:
l (float): distance between points of lateral support for the
compression flange, unbraced length [inches]
sx (float): section modulus of the box type member about its
major axis [inches^3]
a (float): total area enclosed within the center lines of the box
type member webs and flanges [inches^2]
sum_st (float): sum of the ratio width-to-thickness of each flange and
ratio of the depth to thickness of each web (neglect
any portion of the flange which projects beyond the
box section)
iy (float): second moment of area of the box type member about its
minor axis, [inches^4]
Returns:
fa_bc (float): allowable compression stress in extreme fibers of
box type flexure members
Notes:
1. Units in lbs and inches.
2. Poisson's ratio, mu, is taken as 0.3.
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 10 \n\n"
user_input = (f'l = {l:.2f}, Sx = {sx:.2f}, a = {a:.2f}, ' +
f'sum_st = {sum_st:.2f}, Iy = {iy:.2f}, Fy = {fy:.1f}, ' +
f'E = {e:.1f} \n\n')
mu = 0.3
lre = math.sqrt((1.105*math.pi/sx*math.sqrt(sum_st))/
(a*math.sqrt(iy/(1+mu))))
fa_bc = (0.55*fy-0.55*math.pow(fy,2)/
(6.3*math.pow(math.pi,2)*e)*math.pow(lre,2))
text1 = (f'(l/r)e = math.sqrt((1.105*math.pi/sx*math.sqrt(sum_st))/' +
f'(a*math.sqrt(iy/(1+mu)))) \n' +
f'(l/r)e = math.sqrt((1.105*math.pi/{sx:.2f}*math.sqrt({sum_st:.2f}))/' +
f'({a:.2f}*math.sqrt({iy:.2f}/(1+{mu:.2f})))) \n' +
f'(l/r)e = {lre:.2f} \n')
text2 = (f'fa_bc = (0.55*fy-0.55*math.pow(fy,2)/' +
f'(6.3*math.pow(math.pi,2)*e)*math.pow(lre,2)) \n' +
f'fa_bc = (0.55*{fy:.1f}-0.55*math.pow({fy:.1f},2)/' +
f'(6.3*math.pow(math.pi,2)*{e:.1f})*math.pow({lre:.2f},2)) \n' +
f'fa_bc = {fa_bc:.1f}')
text = ref_text + user_input + text1 + text2
return fa_bc, text
def eq141d13(fy):
"""Shear in webs of rolled beams and plate girders, gross section
AREMA 2018 Table 15-1-11 Row 13 Equations
fa = 0.35*fy
Args:
fy (float): yield stress
Returns:
fa (tuple(float, str)): Allowable shear stress in webs
"""
ref_text = "AREMA 2018 Section 1.4.1 Table 15-1-11 Row 13 \n\n"
user_input = f'fy = {fy:.1f} psi \n\n'
fa_v = 0.35*fy
text = (f'fa_v = 0.35*fy \n' +
f'fa_v = 0.35*{fy:.2f} \n' +
f'fa_v = {fa_v:.2f} \n')
text = ref_text + user_input + text
return fa_v, text
def eq141d17(l, d, fu):
"""Bearing on F3125 Grade A325 and Grade A490 bolts
AREMA 2018 Section 1.4.1 Table 15-1-11 Row 17
Allowable stress of bearing material on F3125 Gr A325 and Gr A490 bolts.
fa_bolt_brg = min(l*fu/(2*d), 1.2*fu)
Args:
l (float): distance measured in the line of the force form the center
line of a bolt to the nearest edge of an adjacent bolt or to
the end of the connected part toward which the force is
directed [inches]
d (float): diameter of bolt [inches]
fu (float): lowest specified minimum tensile strength of the
connected part [psi]
Returns:
fa_bolt_brg (tuple(float, str)): allowable bearing stress
"""
ref_text = 'AREMA 2018 Section 1.4.1 Table 15-1-11 Row 17 \n\n'
user_input = f'l = {l:.2f}, d = {d:.2f}, fu = {fu:.1f} \n\n'
fa_brg_bolt = min(l*fu/(2*d), 1.2*fu)
text = (f'fa_brg_bolt = min(l*fu/(2*d), 1.2*fu) \n' +
f'fa_brg_bolt = min({l:.2f}*{fu:.1f}/(2*{d:.2f}),'
f'1.2*{fu:.1f}) \n'+
f'fa_brg_bolt = min({l*fu/(2*d):.1f}, {1.2*fu:.1f}) \n' +
f'fa_brg_bolt = {fa_brg_bolt:.1f}')
text = ref_text + user_input + text
return fa_brg_bolt, text
def tb15111a(hole_type, surface_type, bolt_grade):
"""Allowable stress for slip-critical connections
Allowable stress for slip-critical connections
(Slip Load per Unit Area of Bolt)
Args:
hole_type (int):
1 - standard and short slotted perpendicular to the direction
of load
2 - Oversize and short slotted parallel to the direction of load
3 - Long slotted any direction
surface_type (str):
A - Class A (slip coefficient 0.30) Uncoated clean mill scale and
blast-cleaned surfaces with Class A coatings
B - Class B (slip coefficient 0.50) Uncoated blast-cleaned surfaces
with Class B coatings and unsealed thermal-sprayed surfaces
C - Class C (slip coefficient 0.30) Hot-dip galvanized
D - Class D (slip coefficient 0.45) Blast-cleaned surfaces with
Class D coatings
bolt_grade (int):
1 - F3125 Grade A325
2 - F3125 Grade A490
Returns:
fa_bolt (tuple(float, str)): allowable stress for slip
critical connection [psi]
"""
fa_code = str(bolt_grade) + surface_type + str(hole_type)
fa_bolt = {'1A1':12900,'1B1':21500,'1C1':12900,'1D1':19300,
'2A1':11000,'2B1':18300,'2C1':11000,'2D1':16500,
'3A1':9000,'3B1':15000,'3C1':9000,'3D1':13500,
'1A2':16200,'1B2':26900,'1C2':16200,'1D2':24200,
'2A2':13800,'2B2':23000,'2C2':13800,'2D2':20700,
'3A2':11300,'3B2':18900,'3C2':11300,'3D2':17000,}
ht_text = {1:('1 - standard and short slotted perpendicular to the '+
'direction of load'),
2:('2 - Oversize and short slotted parallel to the direction ' +
'of load'),
3:'3 - Long slotted any direction'}
def eq162a(element_type, case, t, fy, e):
"""Outstanding element in compression
The width of outstanding elements of members in compression shall not
exceed the following, where t, inches, is the thickness of the element:
"""
pass
| [
1,
529,
276,
1112,
420,
29958,
29885,
1332,
277,
29955,
29946,
29914,
29909,
1525,
1529,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
323,
434,
2627,
29871,
29896,
29946,
29871,
29896,
29906,
29901,
29945,
29896,
29901,
29900,
29945,
29871,
29906,
29900,
29906,
29900,
13,
13,
29992,
8921,
29901,
286,
1332,
16097,
13,
15945,
29908,
13,
13,
5215,
5844,
13,
13,
1753,
11594,
29896,
29941,
29896,
29946,
29896,
29898,
29888,
1165,
29892,
2258,
29918,
1165,
29892,
285,
29890,
29896,
29892,
2258,
29918,
29890,
29896,
29892,
285,
29890,
29906,
29892,
2258,
29918,
29890,
29906,
29892,
413,
29896,
29892,
301,
29896,
29892,
364,
29896,
29892,
29871,
13,
9651,
413,
29906,
29892,
301,
29906,
29892,
364,
29906,
29892,
321,
1125,
13,
1678,
9995,
29909,
29916,
616,
422,
2590,
322,
350,
2548,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29941,
29889,
29896,
29946,
29889,
29896,
13,
268,
13,
1678,
19495,
4967,
304,
1716,
4853,
616,
24221,
322,
289,
2548,
851,
15322,
4091,
367,
13,
1678,
18618,
287,
304,
15523,
278,
1494,
11780,
29901,
13,
308,
13,
308,
13,
1678,
565,
285,
29918,
1165,
616,
29914,
5444,
29918,
1165,
616,
5277,
29871,
29900,
29889,
29896,
29945,
29901,
13,
4706,
23292,
353,
2258,
29914,
14206,
718,
285,
29890,
29896,
29914,
29943,
29890,
29896,
718,
285,
29890,
29906,
29914,
29943,
29890,
29906,
13,
1678,
1683,
29901,
13,
4706,
3256,
29918,
11082,
29896,
353,
29871,
29896,
29899,
29888,
29918,
1165,
616,
14571,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
6321,
29878,
29896,
29892,
29906,
29897,
13,
4706,
3256,
29918,
11082,
29906,
353,
29871,
29896,
29899,
29888,
29918,
1165,
616,
14571,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
6321,
29878,
29906,
29892,
29906,
29897,
13,
308,
13,
4706,
23292,
353,
2258,
29914,
14206,
718,
285,
29890,
29896,
14571,
29943,
29890,
29896,
29930,
29885,
2932,
29918,
11082,
29896,
29897,
718,
285,
29890,
29906,
14571,
29943,
29890,
29906,
29930,
29885,
2932,
29918,
11082,
29906,
29897,
13,
308,
13,
308,
13,
1678,
826,
3174,
29901,
13,
4706,
285,
1165,
313,
7411,
1125,
12833,
4853,
616,
22884,
518,
6134,
29962,
13,
308,
13,
4706,
285,
29890,
29896,
313,
7411,
1125,
12833,
289,
2548,
380,
404,
1048,
9685,
29871,
29896,
29899,
29896,
518,
6134,
29962,
13,
308,
13,
4706,
285,
29890,
29906,
313,
7411,
1125,
12833,
289,
2548,
22884,
1048,
9685,
29871,
29906,
29899,
29906,
518,
6134,
29962,
13,
308,
13,
4706,
2258,
29918,
1165,
313,
29888,
433,
327,
1125,
2758,
519,
4853,
616,
22884,
565,
4853,
616,
4889,
7432,
29871,
13,
462,
539,
22856,
518,
6134,
29962,
13,
462,
965,
13,
4706,
2258,
29918,
29890,
29896,
313,
7411,
1125,
2758,
519,
24221,
289,
2548,
22884,
1048,
9685,
29871,
29896,
29899,
29896,
29892,
13,
462,
539,
393,
723,
367,
21905,
565,
289,
2548,
7432,
22856,
518,
6134,
29962,
13,
462,
4706,
13,
4706,
2258,
29918,
29890,
29906,
313,
7411,
1125,
2758,
519,
24221,
289,
2548,
22884,
1048,
9685,
29871,
29906,
29899,
29906,
29892,
13,
462,
539,
393,
723,
367,
21905,
565,
289,
2548,
7432,
22856,
518,
6134,
29962,
13,
462,
4706,
13,
4706,
413,
29896,
313,
7411,
1125,
11828,
3309,
7329,
1048,
29871,
29896,
29899,
29896,
9685,
13,
308,
13,
4706,
301,
29896,
313,
7411,
1125,
443,
29890,
945,
287,
3309,
1048,
29871,
29896,
29899,
29896,
9685,
518,
262,
6609,
29962,
13,
308,
13,
4706,
364,
29896,
313,
7411,
1125,
11855,
310,
330,
4316,
362,
1048,
29871,
29896,
29899,
29896,
9685,
518,
262,
6609,
29962,
13,
308,
13,
4706,
413,
29906,
313,
7411,
1125,
11828,
3309,
7329,
1048,
29871,
29906,
29899,
29906,
9685,
13,
308,
13,
4706,
301,
29906,
313,
7411,
1125,
443,
29890,
945,
287,
3309,
1048,
29871,
29906,
29899,
29906,
9685,
518,
262,
6609,
29962,
13,
308,
13,
4706,
364,
29906,
313,
7411,
1125,
11855,
310,
330,
4316,
362,
1048,
29871,
29906,
29899,
29906,
9685,
518,
262,
6609,
29962,
13,
308,
13,
4706,
321,
313,
7411,
1125,
878,
14999,
310,
560,
6288,
537,
518,
6134,
29962,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
3805,
313,
23583,
29898,
7411,
29892,
851,
22164,
14881,
11959,
310,
278,
4853,
616,
22884,
322,
29871,
13,
462,
18884,
4768,
29899,
1165,
737,
289,
2548,
22884,
639,
278,
2225,
23059,
29871,
13,
462,
18884,
10693,
13,
268,
13,
1678,
8695,
29901,
13,
308,
29896,
29889,
28386,
526,
297,
301,
5824,
322,
22831,
29889,
13,
308,
29906,
29889,
1763,
11455,
3256,
9119,
2450,
13879,
3896,
413,
29896,
353,
413,
29906,
353,
29871,
29900,
29889,
29900,
29889,
13,
965,
6440,
653,
9545,
29892,
988,
896,
526,
10087,
304,
367,
7282,
29892,
13,
965,
881,
367,
5545,
17551,
297,
278,
7418,
470,
2874,
565,
278,
29871,
13,
965,
3256,
9119,
2450,
338,
17262,
1244,
29889,
29871,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29941,
29889,
29896,
29946,
29889,
29896,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
29888,
1165,
353,
426,
29888,
1165,
29901,
29889,
29906,
29888,
1118,
2258,
29918,
1165,
353,
426,
5444,
29918,
1165,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
259,
285,
29915,
14943,
29896,
353,
426,
14943,
29896,
29901,
29889,
29906,
29888,
1118,
2258,
29918,
29890,
29896,
353,
426,
5444,
29918,
29890,
29896,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
259,
285,
29915,
14943,
29906,
353,
426,
14943,
29906,
29901,
29889,
29906,
29888,
1118,
2258,
29918,
29890,
29906,
353,
426,
5444,
29918,
29890,
29906,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
259,
285,
29915,
29895,
29896,
353,
426,
29895,
29896,
29901,
29889,
29906,
29888,
1118,
301,
29896,
353,
426,
29880,
29896,
29901,
29889,
29906,
29888,
1118,
364,
29896,
353,
426,
29878,
29896,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
259,
285,
29915,
29895,
29906,
353,
426,
29895,
29906,
29901,
29889,
29906,
29888,
1118,
301,
29906,
353,
426,
29880,
29906,
29901,
29889,
29906,
29888,
1118,
364,
29906,
353,
426,
29878,
29906,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
259,
285,
29915,
29923,
353,
426,
29872,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
285,
1165,
29918,
381,
353,
285,
1165,
29914,
5444,
29918,
1165,
13,
1678,
285,
29890,
29896,
29918,
381,
353,
285,
29890,
29896,
29914,
5444,
29918,
29890,
29896,
13,
1678,
285,
29890,
29906,
29918,
381,
353,
285,
29890,
29906,
29914,
5444,
29918,
29890,
29906,
13,
268,
13,
1678,
1426,
29896,
353,
313,
29888,
29915,
5444,
29914,
14206,
353,
426,
29888,
1165,
29901,
29889,
29906,
29888,
6822,
29912,
5444,
29918,
1165,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29914,
14206,
353,
426,
29888,
1165,
29918,
381,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
1678,
1426,
29906,
353,
313,
29888,
29915,
14943,
29896,
29914,
29943,
29890,
29896,
353,
426,
14943,
29896,
29901,
29889,
29906,
29888,
6822,
29912,
5444,
29918,
29890,
29896,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
632,
285,
29915,
14943,
29896,
29914,
29943,
29890,
29896,
353,
426,
14943,
29896,
29918,
381,
29901,
29889,
29941,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
1678,
1426,
29941,
353,
313,
29888,
29915,
14943,
29906,
29914,
29943,
29890,
29906,
353,
426,
14943,
29906,
29901,
29889,
29906,
29888,
6822,
29912,
5444,
29918,
29890,
29906,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
632,
285,
29915,
14943,
29906,
29914,
29943,
29890,
29906,
353,
426,
14943,
29906,
29918,
381,
29901,
29889,
29941,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
565,
285,
1165,
29918,
381,
5277,
29871,
29900,
29889,
29896,
29945,
29901,
13,
4706,
3805,
353,
285,
1165,
29918,
381,
718,
285,
29890,
29896,
29918,
381,
718,
285,
29890,
29906,
29918,
381,
13,
308,
13,
4706,
1426,
29946,
353,
313,
29888,
29915,
8193,
353,
285,
1165,
29914,
29943,
1165,
718,
285,
29890,
29896,
29914,
29943,
29890,
29896,
718,
285,
29890,
29906,
29914,
29943,
29890,
29906,
320,
29876,
29915,
13,
462,
285,
29915,
8193,
353,
426,
29888,
1165,
29918,
381,
29901,
29889,
29906,
29888,
29913,
718,
426,
14943,
29896,
29918,
381,
29901,
29889,
29906,
29888,
29913,
718,
426,
14943,
29906,
29918,
381,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
13,
462,
285,
29915,
8193,
353,
426,
381,
29901,
29889,
29941,
29888,
29913,
1495,
13,
308,
13,
4706,
1426,
353,
1426,
29896,
718,
1426,
29906,
718,
1426,
29941,
718,
1426,
29946,
13,
308,
13,
1678,
1683,
29901,
29871,
13,
4706,
9489,
29878,
29896,
353,
413,
29896,
29930,
29880,
29896,
29914,
29878,
29896,
13,
4706,
9489,
29878,
29906,
353,
413,
29906,
29930,
29880,
29906,
29914,
29878,
29906,
13,
268,
13,
4706,
3256,
29918,
11082,
29896,
353,
29871,
29896,
29899,
29888,
1165,
14571,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
6321,
29878,
29896,
29892,
29906,
29897,
13,
4706,
3256,
29918,
11082,
29906,
353,
29871,
29896,
29899,
29888,
1165,
14571,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
6321,
29878,
29906,
29892,
29906,
29897,
13,
308,
13,
4706,
3805,
353,
285,
1165,
29918,
381,
718,
285,
29890,
29896,
29918,
381,
29914,
29885,
2932,
29918,
11082,
29896,
718,
285,
29890,
29906,
29914,
29885,
2932,
29918,
11082,
29906,
13,
308,
13,
4706,
1426,
29945,
353,
285,
29915,
29895,
29896,
29930,
29880,
29896,
29914,
29878,
29896,
353,
426,
6321,
29878,
29896,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
13,
4706,
1426,
29953,
353,
285,
29915,
29895,
29906,
29930,
29880,
29906,
29914,
29878,
29906,
353,
426,
6321,
29878,
29906,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29905,
29876,
29915,
13,
268,
13,
4706,
1426,
29955,
353,
313,
29888,
29915,
29924,
2932,
3561,
29889,
29871,
29896,
353,
29871,
29896,
29899,
29888,
1165,
22208,
718,
13,
462,
285,
12215,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29895,
29896,
29930,
29880,
29896,
29914,
29878,
29896,
29892,
29906,
29897,
320,
29876,
29915,
718,
13,
462,
285,
29915,
29924,
2932,
3561,
29889,
29871,
29896,
353,
29871,
29896,
29899,
29912,
29888,
1165,
29901,
29889,
29906,
29888,
6822,
29915,
718,
29871,
13,
462,
285,
12215,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29912,
29872,
29901,
29889,
29896,
29888,
1800,
29915,
13,
462,
285,
29915,
29930,
755,
29889,
12248,
3319,
6321,
29878,
29896,
29901,
29889,
29906,
29888,
1118,
29906,
29897,
320,
29876,
29915,
718,
13,
462,
285,
29915,
29924,
2932,
3561,
29889,
29871,
29896,
353,
426,
29885,
2932,
29918,
11082,
29896,
29901,
29889,
29941,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
4706,
1426,
29947,
353,
313,
29888,
29915,
29924,
2932,
3561,
29889,
29871,
29906,
353,
29871,
29896,
29899,
29888,
1165,
22208,
718,
13,
462,
285,
12215,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29895,
29906,
29930,
29880,
29906,
29914,
29878,
29906,
29892,
29906,
29897,
320,
29876,
29915,
718,
13,
462,
285,
29915,
29924,
2932,
3561,
29889,
29871,
29906,
353,
29871,
29896,
29899,
29912,
29888,
1165,
29901,
29889,
29906,
29888,
6822,
29915,
718,
29871,
13,
462,
285,
12215,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29912,
29872,
29901,
29889,
29896,
29888,
1800,
29915,
13,
462,
285,
29915,
29930,
755,
29889,
12248,
3319,
6321,
29878,
29906,
29901,
29889,
29906,
29888,
1118,
29906,
29897,
320,
29876,
29915,
718,
13,
462,
285,
29915,
29924,
2932,
3561,
29889,
29871,
29906,
353,
426,
29885,
2932,
29918,
11082,
29906,
29901,
29889,
29941,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
308,
13,
4706,
1426,
29929,
353,
313,
29888,
29915,
8193,
353,
285,
1165,
29914,
29943,
1165,
718,
285,
29890,
29896,
14571,
29943,
29890,
29896,
29930,
29924,
2932,
3561,
29889,
29871,
29896,
16029,
13,
462,
285,
29915,
718,
285,
29890,
29906,
14571,
29943,
29890,
29906,
29930,
29924,
2932,
3561,
29889,
29871,
29906,
29897,
320,
29876,
29915,
13,
462,
285,
29915,
8193,
353,
426,
29888,
1165,
29918,
381,
29901,
29889,
29906,
29888,
29913,
718,
426,
14943,
29896,
29918,
381,
29914,
29885,
2932,
29918,
11082,
29896,
29901,
29889,
29906,
29888,
10162,
13,
462,
285,
29915,
718,
426,
14943,
29906,
29918,
381,
29914,
29885,
2932,
29918,
11082,
29896,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
13,
462,
285,
29915,
8193,
353,
426,
381,
29901,
29889,
29941,
29888,
29913,
320,
29876,
1495,
13,
308,
13,
4706,
1426,
353,
1426,
29896,
718,
1426,
29906,
718,
1426,
29941,
718,
1426,
29945,
718,
1426,
29953,
718,
1426,
29955,
718,
1426,
29947,
718,
1426,
29929,
13,
308,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
308,
13,
1678,
736,
3805,
29892,
1426,
13,
308,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29896,
29898,
710,
404,
29918,
16122,
29892,
285,
29891,
29892,
4084,
1125,
13,
1678,
9995,
29909,
29916,
616,
260,
2673,
2758,
519,
22884,
4967,
304,
1513,
25187,
488,
2254,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
11243,
800,
13,
268,
13,
268,
13,
1678,
565,
22884,
29918,
16122,
1275,
29871,
29896,
29901,
13,
4706,
2258,
29918,
29873,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
1678,
25342,
22884,
29918,
16122,
1275,
29871,
29906,
29901,
13,
4706,
2258,
29918,
6277,
353,
29871,
29900,
29889,
29946,
29955,
29930,
21154,
13,
1678,
25342,
22884,
29918,
16122,
1275,
29871,
29941,
29901,
13,
4706,
2258,
29918,
6277,
29886,
353,
29871,
29900,
29889,
29946,
29945,
29930,
29888,
29891,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
22884,
29918,
16122,
313,
524,
1125,
29871,
13,
632,
29896,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
22683,
4004,
13,
632,
29906,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
11828,
7787,
4004,
13,
18884,
313,
4149,
7456,
29871,
29896,
29889,
29945,
29889,
29947,
322,
29871,
29896,
29889,
29953,
29889,
29945,
29897,
13,
632,
29941,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
11828,
7787,
4038,
13,
18884,
472,
4891,
29899,
2042,
310,
12534,
16188,
310,
12534,
29899,
18045,
5144,
13,
462,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
518,
6134,
29962,
13,
308,
13,
4706,
4084,
313,
7411,
1125,
8494,
6490,
22884,
518,
6134,
29962,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
29873,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
260,
2673,
22884,
373,
22683,
29871,
13,
462,
462,
29871,
4004,
518,
6134,
29962,
13,
308,
13,
4706,
448,
1955,
29899,
13,
308,
13,
4706,
2258,
29918,
6277,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
260,
2673,
22884,
373,
7787,
29871,
13,
462,
462,
259,
4004,
518,
6134,
29962,
13,
308,
13,
4706,
448,
1955,
29899,
13,
308,
13,
4706,
2258,
29918,
6277,
29886,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
260,
2673,
22884,
373,
7787,
4004,
472,
13,
462,
462,
1678,
4891,
29899,
2042,
310,
12534,
16188,
310,
12534,
29899,
18045,
13,
462,
462,
1678,
5144,
518,
6134,
29962,
13,
462,
462,
268,
13,
1678,
8695,
29901,
13,
308,
29896,
29889,
28386,
297,
301,
5824,
322,
22831,
29889,
13,
268,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
5015,
404,
11790,
654,
353,
426,
710,
404,
29918,
16122,
29901,
29881,
1118,
29915,
718,
13,
462,
29871,
285,
29915,
29943,
29891,
353,
426,
29888,
29891,
29901,
29889,
29906,
29888,
1118,
11871,
353,
426,
21154,
29901,
29889,
29906,
29888,
29913,
320,
29876,
1495,
13,
268,
13,
1678,
565,
22884,
29918,
16122,
1275,
29871,
29896,
29901,
13,
4706,
2258,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
4706,
1426,
353,
313,
29888,
29915,
29896,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
22683,
4004,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
29873,
29887,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
29873,
29887,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
29873,
29887,
353,
426,
5444,
29901,
29889,
29896,
29888,
29913,
1495,
13,
1678,
25342,
22884,
29918,
16122,
1275,
29871,
29906,
29901,
13,
4706,
2258,
353,
29871,
29900,
29889,
29946,
29955,
29930,
21154,
13,
4706,
1426,
353,
313,
29888,
29915,
29906,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
11828,
7787,
4004,
29915,
718,
13,
18884,
285,
12215,
4149,
7456,
29871,
29896,
29889,
29945,
29889,
29947,
322,
29871,
29896,
29889,
29953,
29889,
29945,
29897,
320,
29876,
29915,
13,
18884,
285,
29915,
5444,
29918,
6277,
353,
29871,
29900,
29889,
29946,
29955,
29930,
21154,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
6277,
353,
29871,
29900,
29889,
29946,
29955,
19740,
21154,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
6277,
353,
426,
5444,
29901,
29889,
29896,
29888,
29913,
1495,
13,
1678,
25342,
22884,
29918,
16122,
1275,
29871,
29941,
29901,
13,
4706,
2258,
353,
29871,
29900,
29889,
29946,
29945,
29930,
29888,
29891,
13,
4706,
1426,
353,
313,
29888,
29915,
29941,
448,
22523,
616,
260,
2673,
29892,
2281,
3631,
22973,
29892,
11828,
7787,
4038,
29915,
718,
13,
18884,
285,
29915,
271,
4891,
29899,
2042,
310,
12534,
16188,
310,
12534,
29899,
18045,
5144,
320,
29876,
29915,
13,
18884,
285,
29915,
5444,
29918,
6277,
29886,
353,
29871,
29900,
29889,
29946,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
6277,
29886,
353,
29871,
29900,
29889,
29946,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
6277,
29886,
353,
426,
5444,
29901,
29889,
29896,
29888,
29913,
1495,
13,
308,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
308,
13,
1678,
736,
2258,
29892,
1426,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29906,
7295,
13,
1678,
1209,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29941,
29898,
29888,
29891,
1125,
13,
1678,
9995,
29911,
2673,
297,
18677,
18755,
414,
4967,
304,
289,
2548,
29892,
7787,
4004,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29941,
11243,
800,
13,
268,
13,
1678,
323,
2673,
297,
18677,
18755,
414,
310,
29081,
25834,
29892,
330,
1823,
414,
322,
4240,
29899,
786,
4004,
29892,
29871,
13,
1678,
4967,
304,
289,
2548,
29892,
7787,
4004,
13,
268,
13,
268,
13,
1678,
2258,
29918,
3116,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
462,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
518,
6134,
29962,
13,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
3116,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
289,
2548,
25187,
488,
22884,
518,
6134,
29962,
13,
268,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29941,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
285,
29915,
29943,
29891,
353,
426,
29888,
29891,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
13,
268,
13,
1678,
2258,
29918,
3116,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
1678,
1426,
353,
313,
29888,
29915,
29911,
2673,
297,
18677,
18755,
414,
310,
29081,
25834,
29892,
27016,
672,
322,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
16145,
29899,
786,
4004,
29892,
4967,
304,
289,
2548,
29892,
7787,
4004,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
3116,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
3116,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
3116,
353,
426,
5444,
29918,
3116,
29901,
29889,
29896,
29888,
29913,
1495,
13,
268,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
268,
13,
1678,
736,
2258,
29918,
3116,
29892,
1426,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29946,
7295,
13,
1678,
1209,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29945,
29898,
29895,
29892,
301,
29892,
364,
29892,
285,
29891,
29892,
321,
1125,
13,
1678,
9995,
29909,
29916,
616,
24221,
2758,
519,
22884,
29892,
22683,
4004,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29945,
11243,
800,
13,
1678,
313,
1252,
1547,
363,
380,
2593,
264,
414,
310,
367,
2232,
322,
330,
1823,
414,
29892,
322,
805,
5897,
5518,
29897,
13,
268,
13,
268,
13,
1678,
9489,
29878,
353,
413,
29930,
29880,
29914,
29878,
13,
1678,
560,
6288,
29918,
13400,
353,
29871,
29900,
29889,
29953,
29906,
29929,
29930,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
13,
1678,
715,
6288,
29918,
13400,
353,
29871,
29945,
29889,
29900,
29941,
29946,
29930,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
13,
268,
13,
1678,
565,
9489,
29878,
5277,
560,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
1678,
25342,
9489,
29878,
1405,
560,
6288,
29918,
13400,
322,
9489,
29878,
5277,
715,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29953,
29900,
29930,
29888,
29891,
29899,
755,
29889,
12248,
29898,
29896,
29955,
29945,
29900,
29900,
29889,
29900,
29930,
29888,
29891,
29914,
29872,
29892,
29941,
29914,
29906,
11877,
6321,
29878,
13,
1678,
25342,
9489,
29878,
1405,
715,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29871,
29906,
11877,
29872,
29914,
755,
29889,
12248,
29898,
6321,
29878,
29892,
29906,
29897,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
413,
313,
7411,
1125,
11828,
3309,
7329,
297,
278,
9685,
5545,
13,
462,
259,
413,
353,
29871,
29955,
29914,
29947,
363,
5144,
411,
12534,
29899,
355,
12368,
13,
462,
259,
413,
353,
29871,
29941,
29914,
29946,
363,
5144,
411,
15772,
9446,
470,
281,
2495,
287,
1095,
12368,
13,
308,
13,
4706,
301,
313,
7411,
1125,
443,
29890,
945,
287,
3309,
297,
278,
9685,
5545,
518,
262,
6609,
29962,
13,
308,
13,
4706,
364,
313,
7411,
1125,
11855,
310,
330,
4316,
362,
297,
278,
9685,
5545,
518,
262,
6609,
29962,
13,
308,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
518,
6134,
29962,
13,
308,
13,
4706,
321,
313,
7411,
1125,
878,
14999,
310,
560,
6288,
537,
518,
6134,
29962,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
562,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
4853,
616,
24221,
373,
22683,
4004,
13,
268,
13,
1678,
8695,
29901,
13,
308,
29896,
29889,
28386,
526,
297,
301,
5824,
322,
22831,
29889,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29945,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
29895,
353,
426,
29895,
29901,
29889,
29906,
29888,
1118,
301,
353,
426,
29880,
29901,
29889,
29906,
29888,
1118,
364,
353,
426,
29878,
29901,
29889,
29906,
29888,
1118,
383,
29891,
353,
426,
29888,
29891,
29901,
29889,
29906,
29888,
1118,
29915,
718,
13,
462,
29871,
285,
29915,
29923,
353,
426,
29872,
29901,
29889,
29906,
29888,
29913,
320,
29876,
1495,
13,
268,
13,
1678,
9489,
29878,
353,
413,
29930,
29880,
29914,
29878,
13,
1678,
560,
6288,
29918,
13400,
353,
29871,
29900,
29889,
29953,
29906,
29929,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
13,
1678,
715,
6288,
29918,
13400,
353,
29871,
29945,
29889,
29900,
29941,
29946,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
13,
268,
13,
1678,
565,
9489,
29878,
5277,
560,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
4706,
1426,
353,
313,
29888,
29915,
6321,
29914,
29878,
5277,
29871,
29900,
29889,
29953,
29906,
29929,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
29912,
6321,
29878,
29901,
29889,
29906,
29888,
29913,
5277,
426,
295,
6288,
29918,
13400,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
29871,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
29871,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
426,
5444,
29918,
562,
29901,
29889,
29896,
29888,
29913,
1495,
13,
1678,
25342,
9489,
29878,
1405,
560,
6288,
29918,
13400,
322,
9489,
29878,
5277,
715,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29953,
29900,
29930,
29888,
29891,
29899,
755,
29889,
12248,
29898,
29896,
29955,
29945,
29900,
29900,
29889,
29900,
29930,
29888,
29891,
29914,
29872,
29892,
29941,
29914,
29906,
11877,
6321,
29878,
13,
4706,
1426,
353,
313,
29888,
29915,
6321,
29914,
29878,
1405,
29871,
29900,
29889,
29953,
29906,
29929,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
16029,
13,
18884,
285,
29915,
392,
9489,
29914,
29878,
5277,
29871,
29945,
29889,
29900,
29941,
29946,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
320,
29876,
29915,
718,
29871,
13,
18884,
285,
29915,
29912,
6321,
29878,
29901,
29889,
29906,
29888,
29913,
1405,
426,
295,
6288,
29918,
13400,
29901,
29889,
29906,
29888,
10162,
13,
18884,
285,
29915,
392,
426,
6321,
29878,
29901,
29889,
29906,
29888,
29913,
5277,
426,
572,
6288,
29918,
13400,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
795,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29953,
29900,
29930,
29888,
29891,
29899,
755,
29889,
12248,
29898,
29896,
29955,
29945,
29900,
29900,
29889,
29900,
29930,
29888,
29891,
29914,
29872,
29892,
29941,
29914,
29906,
11877,
6321,
29914,
29878,
320,
29876,
29915,
718,
29871,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29953,
29900,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
7402,
29915,
13,
18884,
285,
29915,
755,
29889,
12248,
29898,
29896,
29955,
29945,
29900,
29900,
29889,
29900,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
6822,
29912,
29872,
29901,
29889,
29896,
29888,
1118,
29941,
29914,
29906,
11877,
29912,
6321,
29878,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
426,
5444,
29918,
562,
29901,
29889,
29896,
29888,
29913,
1495,
13,
1678,
25342,
9489,
29878,
1405,
715,
6288,
29918,
13400,
29901,
13,
4706,
2258,
29918,
562,
353,
29871,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29871,
29906,
11877,
29872,
29914,
755,
29889,
12248,
29898,
6321,
29878,
29892,
29906,
29897,
13,
4706,
1426,
353,
313,
29888,
29915,
6321,
29914,
29878,
1405,
29871,
29945,
29889,
29900,
29941,
29946,
29914,
755,
29889,
3676,
29898,
29888,
29891,
29914,
29872,
29897,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
29912,
6321,
29878,
29901,
29889,
29906,
29888,
29913,
1405,
426,
572,
6288,
29918,
13400,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29871,
29906,
11877,
29872,
29914,
755,
29889,
12248,
29898,
6321,
29914,
29878,
29892,
29906,
29897,
320,
29876,
29915,
718,
29871,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
29871,
29900,
29889,
29945,
29896,
29946,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29871,
29906,
11877,
29912,
29872,
29901,
29889,
29906,
29888,
10162,
718,
13,
18884,
285,
29915,
29914,
755,
29889,
12248,
3319,
6321,
29878,
29901,
29889,
29906,
29888,
1118,
29906,
29897,
320,
29876,
29915,
718,
13,
18884,
285,
29915,
5444,
29918,
562,
353,
426,
5444,
29918,
562,
29901,
29889,
29896,
29888,
29913,
1495,
13,
308,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
268,
13,
1678,
736,
2258,
29918,
562,
29892,
1426,
13,
308,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29953,
29898,
29888,
29891,
1125,
13,
1678,
9995,
1523,
2590,
297,
18677,
18755,
414,
310,
306,
29899,
1853,
4004,
289,
2548,
1048,
8062,
9685,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29953,
13,
268,
13,
1678,
422,
2590,
297,
18677,
18755,
414,
310,
306,
29899,
1853,
5144,
4967,
287,
304,
8363,
13,
1678,
639,
14081,
16311,
304,
278,
1856,
29889,
13,
268,
13,
268,
13,
1678,
2258,
29918,
29890,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
518,
6134,
29962,
13,
308,
13,
1678,
7106,
29901,
13,
4706,
2258,
29918,
3116,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
289,
2548,
25187,
488,
22884,
518,
6134,
29962,
13,
268,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29953,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
29943,
29891,
353,
426,
29888,
29891,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
13,
13,
1678,
2258,
29918,
29890,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
268,
13,
1678,
1426,
353,
313,
29888,
29915,
5444,
29918,
29890,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
29890,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
29890,
353,
426,
5444,
29918,
29890,
29901,
29889,
29896,
29888,
29913,
1495,
13,
268,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
268,
13,
1678,
736,
2258,
29918,
29890,
29892,
1426,
13,
268,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29955,
29898,
29880,
29892,
364,
11078,
29892,
2511,
29883,
29892,
270,
29892,
285,
29891,
29892,
321,
1125,
13,
1678,
9995,
1523,
2590,
297,
18677,
18755,
414,
310,
8525,
3631,
5144,
2758,
519,
22884,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29955,
11243,
800,
13,
268,
13,
1678,
422,
2590,
297,
18677,
18755,
414,
310,
8525,
3631,
5144,
5016,
29885,
814,
936,
1048,
278,
13,
1678,
5882,
9685,
297,
278,
10694,
310,
278,
1856,
313,
1228,
1135,
3800,
29899,
1853,
8525,
3631,
29871,
13,
1678,
5144,
29897,
393,
526,
29081,
367,
2232,
470,
281,
2495,
287,
4240,
29899,
786,
5144,
411,
7773,
13,
1678,
7705,
6825,
1652,
6916,
29892,
278,
7200,
310,
278,
1819,
6601,
491,
278,
1494,
13,
268,
13,
268,
13,
1678,
2258,
29918,
12328,
29896,
353,
313,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
448,
29871,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
13,
965,
313,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29880,
29914,
719,
29883,
29892,
29906,
29897,
13,
9651,
13,
1678,
2258,
29918,
12328,
29906,
353,
29871,
29900,
29889,
29896,
29941,
29896,
29930,
755,
29889,
1631,
29930,
29872,
14571,
29880,
29930,
29881,
29930,
755,
29889,
3676,
29898,
29896,
29974,
2589,
6802,
2142,
29883,
29897,
13,
268,
13,
1678,
2258,
29918,
12328,
29941,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
1678,
2258,
29918,
12328,
353,
1375,
29898,
3317,
29898,
5444,
29896,
29892,
2258,
29906,
511,
2258,
29941,
29897,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
301,
313,
7411,
1125,
5418,
289,
29893,
9404,
3291,
310,
2678,
284,
2304,
363,
278,
13,
462,
259,
24221,
1652,
927,
29892,
443,
29890,
945,
287,
3309,
518,
262,
6609,
29962,
13,
308,
13,
4706,
364,
11078,
313,
7411,
1125,
9212,
11855,
310,
330,
4316,
362,
310,
278,
24221,
1652,
927,
322,
13,
462,
1678,
393,
11910,
310,
278,
1856,
4038,
373,
278,
24221,
2625,
310,
278,
13,
462,
1678,
9685,
310,
289,
2548,
29892,
1048,
385,
9685,
297,
278,
10694,
310,
278,
29871,
13,
462,
1678,
1856,
518,
262,
6609,
29962,
13,
462,
268,
13,
4706,
2511,
29883,
313,
7411,
1125,
4038,
310,
278,
7968,
1652,
927,
429,
22368,
738,
11910,
310,
278,
29871,
13,
462,
1678,
1856,
518,
262,
6609,
29985,
29906,
29962,
13,
308,
13,
4706,
270,
313,
7411,
1125,
12463,
270,
29886,
621,
310,
278,
4509,
518,
262,
6609,
29962,
13,
308,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
518,
6134,
29962,
13,
308,
13,
4706,
321,
313,
7411,
1125,
878,
14999,
310,
560,
6288,
537,
518,
6134,
29962,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
12328,
313,
7411,
1125,
2758,
519,
24221,
22884,
297,
18677,
18755,
414,
310,
29871,
13,
462,
1678,
8525,
3631,
5144,
518,
6134,
29962,
13,
308,
13,
1678,
8695,
29901,
13,
308,
29896,
29889,
28386,
526,
297,
301,
5824,
322,
22831,
29889,
13,
308,
29906,
29889,
3929,
17387,
29915,
29879,
11959,
29892,
3887,
29892,
338,
4586,
408,
29871,
29900,
29889,
29941,
29889,
13,
268,
13,
1678,
9995,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29955,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
29880,
353,
426,
29880,
29901,
29889,
29906,
29888,
1118,
364,
11078,
353,
426,
719,
29883,
29901,
29889,
29906,
29888,
1118,
2511,
29883,
353,
426,
2142,
29883,
29901,
29889,
29906,
29888,
1118,
525,
718,
13,
462,
29871,
285,
29915,
29881,
353,
426,
29881,
29901,
29889,
29906,
29888,
1118,
383,
29891,
353,
426,
29888,
29891,
29901,
29889,
29906,
29888,
1118,
382,
353,
426,
29872,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
3887,
353,
29871,
29900,
29889,
29941,
13,
268,
13,
1678,
2258,
29918,
12328,
29896,
353,
313,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
448,
29871,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
13,
965,
313,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29880,
29914,
719,
29883,
29892,
29906,
876,
13,
9651,
13,
1678,
2258,
29918,
12328,
29906,
353,
29871,
29900,
29889,
29896,
29941,
29896,
29930,
755,
29889,
1631,
29930,
29872,
14571,
29880,
29930,
29881,
29930,
755,
29889,
3676,
29898,
29896,
29974,
2589,
6802,
2142,
29883,
29897,
13,
268,
13,
1678,
2258,
29918,
12328,
29941,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
13,
268,
13,
1678,
2258,
29918,
12328,
353,
1375,
29898,
3317,
29898,
5444,
29918,
12328,
29896,
29892,
2258,
29918,
12328,
29906,
511,
2258,
29918,
12328,
29941,
29897,
13,
268,
13,
1678,
1426,
29896,
353,
313,
29888,
29915,
5444,
29918,
12328,
29896,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
448,
29871,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
29915,
718,
13,
632,
285,
12215,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29880,
29914,
719,
29883,
29892,
29906,
29897,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
29896,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
448,
29871,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
3319,
29888,
29891,
29901,
29889,
29896,
29888,
1118,
29906,
6802,
29915,
718,
13,
632,
285,
12215,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29912,
29872,
29901,
29889,
29896,
29888,
1800,
29915,
718,
13,
632,
285,
29915,
29930,
755,
29889,
12248,
3319,
29880,
29901,
29889,
29906,
29888,
6822,
29912,
719,
29883,
29901,
29889,
29906,
29888,
1118,
29906,
29897,
320,
29876,
29915,
718,
13,
632,
285,
15945,
29908,
5444,
29918,
12328,
29896,
353,
426,
5444,
29918,
12328,
29896,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29905,
29876,
15945,
1159,
13,
268,
13,
1678,
1426,
29906,
353,
313,
29888,
29915,
5444,
29918,
12328,
29906,
353,
29871,
29900,
29889,
29896,
29941,
29896,
29930,
755,
29889,
1631,
29930,
29872,
14571,
29880,
29930,
29881,
29930,
755,
29889,
3676,
29898,
29896,
29974,
2589,
6802,
2142,
29883,
29897,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
29906,
353,
29871,
29900,
29889,
29896,
29941,
29896,
29930,
755,
29889,
1631,
19740,
29872,
29901,
29889,
29896,
29888,
6822,
29915,
718,
13,
632,
285,
29915,
3319,
29880,
29901,
29889,
29906,
29888,
29913,
19740,
29881,
29901,
29889,
29906,
29888,
29913,
29930,
755,
29889,
3676,
29898,
29896,
29974,
29912,
2589,
29901,
29889,
29906,
29888,
1800,
19248,
2142,
29883,
29901,
29889,
29906,
29888,
1800,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
29906,
353,
426,
5444,
29918,
12328,
29906,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
1426,
29941,
353,
313,
29888,
29915,
5444,
29918,
12328,
29941,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
29941,
353,
29871,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
29941,
353,
426,
5444,
29918,
12328,
29941,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
1426,
29946,
353,
313,
29888,
29915,
5444,
29918,
12328,
353,
1375,
29898,
3317,
29898,
5444,
29918,
12328,
29896,
29892,
2258,
29918,
12328,
29906,
511,
2258,
29918,
12328,
29941,
29897,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
353,
1375,
29898,
3317,
3319,
5444,
29918,
12328,
29896,
29901,
29889,
29906,
29888,
1118,
426,
5444,
29918,
12328,
29906,
29901,
29889,
29906,
29888,
9594,
426,
5444,
29918,
12328,
29941,
29901,
29889,
29906,
29888,
1800,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
353,
1375,
3319,
3317,
29898,
5444,
29918,
12328,
29896,
29892,
2258,
29918,
12328,
29906,
1125,
29889,
29906,
29888,
1118,
426,
5444,
29918,
12328,
29941,
29901,
29889,
29906,
29888,
1800,
320,
29876,
29915,
718,
13,
632,
285,
29915,
5444,
29918,
12328,
353,
426,
1195,
29898,
3317,
29898,
5444,
29918,
12328,
29896,
29892,
2258,
29918,
12328,
29906,
511,
2258,
29918,
12328,
29941,
1125,
29889,
29896,
29888,
29913,
320,
29876,
1495,
13,
268,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
29896,
29871,
718,
1426,
29906,
718,
1426,
29941,
718,
1426,
29946,
13,
268,
13,
1678,
736,
2258,
29918,
12328,
29892,
1426,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29896,
29900,
29898,
29880,
29892,
269,
29916,
29892,
263,
29892,
2533,
29918,
303,
29892,
474,
29891,
29892,
285,
29891,
29892,
321,
1125,
13,
1678,
9995,
1523,
2590,
297,
18677,
18755,
414,
310,
3800,
1134,
8525,
3631,
5144,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29900,
13,
268,
13,
1678,
422,
2590,
297,
278,
18677,
18755,
414,
310,
3800,
1134,
281,
2495,
287,
470,
15772,
9446,
8525,
3631,
13,
1678,
5144,
9682,
16888,
1048,
278,
5882,
9685,
7145,
1582,
1546,
278,
1856,
29879,
13,
268,
13,
268,
13,
1678,
313,
29880,
29914,
29878,
29897,
29872,
353,
5844,
29889,
3676,
29898,
29896,
29889,
29896,
29900,
29945,
29930,
755,
29889,
1631,
29914,
29879,
4419,
29930,
3676,
29898,
2083,
29898,
29879,
29914,
29873,
876,
29914,
13,
632,
263,
29930,
755,
29889,
3676,
29898,
29875,
29918,
8071,
14571,
29896,
29974,
2589,
4961,
13,
268,
13,
1678,
2258,
29918,
12328,
353,
29871,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
448,
29871,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
29898,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
13,
9651,
5844,
29889,
12248,
3552,
29880,
29914,
29878,
29897,
29872,
29892,
29906,
29897,
13,
632,
13,
632,
13,
1678,
826,
3174,
29901,
13,
4706,
301,
313,
7411,
1125,
5418,
1546,
3291,
310,
2678,
284,
2304,
363,
278,
13,
462,
259,
24221,
1652,
927,
29892,
443,
29890,
945,
287,
3309,
518,
262,
6609,
29962,
13,
462,
259,
13,
4706,
269,
29916,
313,
7411,
1125,
4004,
878,
14999,
310,
278,
3800,
1134,
4509,
1048,
967,
13,
462,
1678,
4655,
9685,
518,
262,
6609,
29985,
29941,
29962,
13,
462,
268,
13,
4706,
263,
313,
7411,
1125,
3001,
4038,
427,
15603,
2629,
278,
4818,
3454,
310,
278,
3800,
13,
462,
259,
1134,
4509,
1856,
29879,
322,
1652,
6916,
518,
262,
6609,
29985,
29906,
29962,
13,
462,
1678,
13,
4706,
2533,
29918,
303,
313,
7411,
1125,
2533,
310,
278,
11959,
2920,
29899,
517,
29899,
27996,
2264,
310,
1269,
1652,
927,
322,
29871,
13,
462,
4706,
11959,
310,
278,
10809,
304,
12003,
2264,
310,
1269,
1856,
313,
10052,
781,
13,
462,
4706,
738,
11910,
310,
278,
1652,
927,
607,
9279,
8724,
278,
29871,
13,
462,
4706,
3800,
4004,
29897,
13,
462,
308,
13,
4706,
474,
29891,
313,
7411,
1125,
1473,
3256,
310,
4038,
310,
278,
29871,
3800,
1134,
4509,
1048,
967,
13,
462,
1678,
9461,
9685,
29892,
518,
262,
6609,
29985,
29946,
29962,
13,
632,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
12328,
313,
7411,
1125,
2758,
519,
24221,
22884,
297,
18677,
18755,
414,
310,
13,
462,
539,
3800,
1134,
8525,
545,
5144,
13,
268,
13,
1678,
8695,
29901,
13,
308,
29896,
29889,
28386,
297,
301,
5824,
322,
22831,
29889,
13,
308,
29906,
29889,
3929,
17387,
29915,
29879,
11959,
29892,
3887,
29892,
338,
4586,
408,
29871,
29900,
29889,
29941,
29889,
13,
1678,
9995,
13,
268,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29900,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
313,
29888,
29915,
29880,
353,
426,
29880,
29901,
29889,
29906,
29888,
1118,
317,
29916,
353,
426,
29879,
29916,
29901,
29889,
29906,
29888,
1118,
263,
353,
426,
29874,
29901,
29889,
29906,
29888,
1118,
525,
718,
29871,
13,
462,
285,
29915,
2083,
29918,
303,
353,
426,
2083,
29918,
303,
29901,
29889,
29906,
29888,
1118,
306,
29891,
353,
426,
19881,
29901,
29889,
29906,
29888,
1118,
383,
29891,
353,
426,
29888,
29891,
29901,
29889,
29896,
29888,
1118,
525,
718,
13,
462,
285,
29915,
29923,
353,
426,
29872,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29905,
29876,
1495,
13,
268,
13,
1678,
3887,
353,
29871,
29900,
29889,
29941,
13,
13,
1678,
301,
276,
353,
5844,
29889,
3676,
3552,
29896,
29889,
29896,
29900,
29945,
29930,
755,
29889,
1631,
29914,
29879,
29916,
29930,
755,
29889,
3676,
29898,
2083,
29918,
303,
876,
29914,
13,
462,
1678,
313,
29874,
29930,
755,
29889,
3676,
29898,
19881,
14571,
29896,
29974,
2589,
13697,
13,
268,
13,
1678,
2258,
29918,
12328,
353,
313,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
29899,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
13,
632,
313,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29880,
276,
29892,
29906,
876,
13,
268,
13,
1678,
1426,
29896,
353,
313,
29888,
12215,
29880,
29914,
29878,
29897,
29872,
353,
5844,
29889,
3676,
3552,
29896,
29889,
29896,
29900,
29945,
29930,
755,
29889,
1631,
29914,
29879,
29916,
29930,
755,
29889,
3676,
29898,
2083,
29918,
303,
876,
22208,
718,
13,
9651,
285,
12215,
29874,
29930,
755,
29889,
3676,
29898,
19881,
14571,
29896,
29974,
2589,
13697,
320,
29876,
29915,
718,
13,
9651,
285,
12215,
29880,
29914,
29878,
29897,
29872,
353,
5844,
29889,
3676,
3552,
29896,
29889,
29896,
29900,
29945,
29930,
755,
29889,
1631,
19248,
29879,
29916,
29901,
29889,
29906,
29888,
29913,
29930,
755,
29889,
3676,
3319,
2083,
29918,
303,
29901,
29889,
29906,
29888,
20073,
22208,
718,
13,
9651,
285,
29915,
3319,
29874,
29901,
29889,
29906,
29888,
29913,
29930,
755,
29889,
3676,
3319,
19881,
29901,
29889,
29906,
29888,
6822,
29898,
29896,
29974,
29912,
2589,
29901,
29889,
29906,
29888,
29913,
13697,
320,
29876,
29915,
718,
13,
9651,
285,
12215,
29880,
29914,
29878,
29897,
29872,
353,
426,
29880,
276,
29901,
29889,
29906,
29888,
29913,
320,
29876,
1495,
13,
632,
13,
1678,
1426,
29906,
353,
313,
29888,
29915,
5444,
29918,
12328,
353,
313,
29900,
29889,
29945,
29945,
29930,
29888,
29891,
29899,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
29898,
29888,
29891,
29892,
29906,
6802,
29915,
718,
13,
9651,
285,
12215,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29872,
11877,
755,
29889,
12248,
29898,
29880,
276,
29892,
29906,
876,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
12328,
353,
313,
29900,
29889,
29945,
29945,
19740,
29888,
29891,
29901,
29889,
29896,
29888,
7402,
29900,
29889,
29945,
29945,
29930,
755,
29889,
12248,
3319,
29888,
29891,
29901,
29889,
29896,
29888,
1118,
29906,
6802,
29915,
718,
13,
9651,
285,
12215,
29953,
29889,
29941,
29930,
755,
29889,
12248,
29898,
755,
29889,
1631,
29892,
29906,
11877,
29912,
29872,
29901,
29889,
29896,
29888,
1800,
29930,
755,
29889,
12248,
3319,
29880,
276,
29901,
29889,
29906,
29888,
1118,
29906,
876,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
12328,
353,
426,
5444,
29918,
12328,
29901,
29889,
29896,
29888,
29913,
1495,
13,
632,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
29896,
718,
1426,
29906,
13,
632,
13,
1678,
736,
2258,
29918,
12328,
29892,
1426,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29896,
29941,
29898,
29888,
29891,
1125,
13,
1678,
9995,
13468,
279,
297,
1856,
29879,
310,
29081,
367,
2232,
322,
15284,
330,
1823,
414,
29892,
22683,
4004,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29941,
11243,
800,
29871,
13,
268,
13,
268,
13,
1678,
2258,
353,
29871,
29900,
29889,
29941,
29945,
29930,
29888,
29891,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
285,
29891,
313,
7411,
1125,
7709,
22884,
13,
308,
13,
1678,
16969,
29901,
13,
4706,
2258,
313,
23583,
29898,
7411,
29892,
851,
22164,
29408,
519,
1183,
279,
22884,
297,
1856,
29879,
13,
268,
13,
1678,
9995,
13,
1678,
2143,
29918,
726,
353,
376,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29941,
320,
29876,
29905,
29876,
29908,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
285,
29915,
29888,
29891,
353,
426,
29888,
29891,
29901,
29889,
29896,
29888,
29913,
282,
1039,
320,
29876,
29905,
29876,
29915,
29871,
13,
268,
13,
1678,
2258,
29918,
29894,
353,
29871,
29900,
29889,
29941,
29945,
29930,
29888,
29891,
13,
268,
13,
1678,
1426,
353,
313,
29888,
29915,
5444,
29918,
29894,
353,
29871,
29900,
29889,
29941,
29945,
29930,
29888,
29891,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
29894,
353,
29871,
29900,
29889,
29941,
29945,
19740,
29888,
29891,
29901,
29889,
29906,
29888,
29913,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
29894,
353,
426,
5444,
29918,
29894,
29901,
29889,
29906,
29888,
29913,
320,
29876,
1495,
13,
268,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
268,
13,
1678,
736,
2258,
29918,
29894,
29892,
1426,
13,
13,
1753,
11594,
29896,
29946,
29896,
29881,
29896,
29955,
29898,
29880,
29892,
270,
29892,
4084,
1125,
13,
1678,
9995,
29933,
799,
292,
373,
383,
29941,
29896,
29906,
29945,
4989,
311,
319,
29941,
29906,
29945,
322,
4989,
311,
319,
29946,
29929,
29900,
15772,
1372,
13,
268,
13,
1678,
319,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29955,
13,
268,
13,
1678,
29408,
519,
22884,
310,
24638,
5518,
373,
383,
29941,
29896,
29906,
29945,
1632,
319,
29941,
29906,
29945,
322,
1632,
319,
29946,
29929,
29900,
15772,
1372,
29889,
13,
268,
13,
268,
13,
1678,
2258,
29918,
2095,
29873,
29918,
1182,
29887,
353,
1375,
29898,
29880,
29930,
21154,
14571,
29906,
29930,
29881,
511,
29871,
29896,
29889,
29906,
29930,
21154,
29897,
13,
268,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
301,
313,
7411,
1125,
5418,
17005,
297,
278,
1196,
310,
278,
4889,
883,
278,
4818,
29871,
13,
462,
259,
1196,
310,
263,
289,
14339,
304,
278,
20471,
7636,
310,
385,
20114,
289,
14339,
470,
304,
13,
462,
259,
278,
1095,
310,
278,
6631,
760,
11183,
607,
278,
4889,
338,
13,
462,
259,
10624,
518,
262,
6609,
29962,
13,
308,
13,
4706,
270,
313,
7411,
1125,
24235,
310,
289,
14339,
518,
262,
6609,
29962,
13,
308,
13,
4706,
4084,
313,
7411,
1125,
19604,
6790,
9212,
25187,
488,
9324,
310,
278,
13,
462,
1678,
6631,
760,
518,
6134,
29962,
13,
462,
268,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
2095,
29873,
29918,
1182,
29887,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
24638,
22884,
29871,
13,
308,
13,
1678,
9995,
13,
1678,
2143,
29918,
726,
353,
525,
29909,
1525,
1529,
29871,
29906,
29900,
29896,
29947,
9779,
29871,
29896,
29889,
29946,
29889,
29896,
6137,
29871,
29896,
29945,
29899,
29896,
29899,
29896,
29896,
11438,
29871,
29896,
29955,
29871,
320,
29876,
29905,
29876,
29915,
13,
268,
13,
1678,
1404,
29918,
2080,
353,
285,
29915,
29880,
353,
426,
29880,
29901,
29889,
29906,
29888,
1118,
270,
353,
426,
29881,
29901,
29889,
29906,
29888,
1118,
4084,
353,
426,
21154,
29901,
29889,
29896,
29888,
29913,
320,
29876,
29905,
29876,
29915,
13,
268,
13,
1678,
2258,
29918,
1182,
29887,
29918,
2095,
29873,
353,
1375,
29898,
29880,
29930,
21154,
14571,
29906,
29930,
29881,
511,
29871,
29896,
29889,
29906,
29930,
21154,
29897,
13,
268,
13,
1678,
1426,
353,
313,
29888,
29915,
5444,
29918,
1182,
29887,
29918,
2095,
29873,
353,
1375,
29898,
29880,
29930,
21154,
14571,
29906,
29930,
29881,
511,
29871,
29896,
29889,
29906,
29930,
21154,
29897,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
1182,
29887,
29918,
2095,
29873,
353,
1375,
3319,
29880,
29901,
29889,
29906,
29888,
29913,
19740,
21154,
29901,
29889,
29896,
29888,
6822,
29898,
29906,
19740,
29881,
29901,
29889,
29906,
29888,
9594,
29915,
29871,
13,
9651,
285,
29915,
29896,
29889,
29906,
19740,
21154,
29901,
29889,
29896,
29888,
1800,
320,
29876,
18717,
13,
9651,
285,
29915,
5444,
29918,
1182,
29887,
29918,
2095,
29873,
353,
1375,
3319,
29880,
29930,
21154,
14571,
29906,
29930,
29881,
1125,
29889,
29896,
29888,
1118,
426,
29896,
29889,
29906,
29930,
21154,
29901,
29889,
29896,
29888,
1800,
320,
29876,
29915,
718,
13,
9651,
285,
29915,
5444,
29918,
1182,
29887,
29918,
2095,
29873,
353,
426,
5444,
29918,
1182,
29887,
29918,
2095,
29873,
29901,
29889,
29896,
29888,
29913,
1495,
13,
268,
13,
1678,
1426,
353,
2143,
29918,
726,
718,
1404,
29918,
2080,
718,
1426,
13,
13,
1678,
736,
2258,
29918,
1182,
29887,
29918,
2095,
29873,
29892,
1426,
13,
268,
13,
13,
1753,
260,
29890,
29896,
29945,
29896,
29896,
29896,
29874,
29898,
29716,
29918,
1853,
29892,
7101,
29918,
1853,
29892,
289,
14339,
29918,
8228,
1125,
13,
1678,
9995,
15930,
519,
22884,
363,
269,
3466,
29899,
9695,
936,
12368,
13,
268,
13,
1678,
29408,
519,
22884,
363,
269,
3466,
29899,
9695,
936,
12368,
13,
1678,
313,
29903,
3466,
16012,
639,
13223,
18320,
310,
8922,
29873,
29897,
13,
268,
13,
1678,
826,
3174,
29901,
13,
4706,
16188,
29918,
1853,
313,
524,
1125,
13,
632,
29896,
448,
3918,
322,
3273,
2243,
15048,
639,
14081,
16311,
304,
278,
5305,
13,
18884,
310,
2254,
13,
632,
29906,
448,
438,
874,
675,
322,
3273,
2243,
15048,
8943,
304,
278,
5305,
310,
2254,
13,
632,
29941,
448,
6242,
2243,
15048,
738,
5305,
13,
4706,
7101,
29918,
1853,
313,
710,
1125,
13,
9651,
319,
448,
4134,
319,
313,
29879,
3466,
10825,
29871,
29900,
29889,
29941,
29900,
29897,
853,
1111,
630,
5941,
3533,
6287,
322,
13,
18884,
1999,
579,
29899,
14941,
287,
28001,
411,
4134,
319,
24296,
886,
13,
9651,
350,
448,
4134,
350,
313,
29879,
3466,
10825,
29871,
29900,
29889,
29945,
29900,
29897,
853,
1111,
630,
1999,
579,
29899,
14941,
287,
28001,
13,
18884,
411,
4134,
350,
24296,
886,
322,
443,
344,
7943,
26963,
29899,
1028,
25724,
28001,
13,
9651,
315,
448,
4134,
315,
313,
29879,
3466,
10825,
29871,
29900,
29889,
29941,
29900,
29897,
8843,
29899,
29881,
666,
6898,
3703,
1891,
13,
9651,
360,
448,
4134,
360,
313,
29879,
3466,
10825,
29871,
29900,
29889,
29946,
29945,
29897,
3164,
579,
29899,
14941,
287,
28001,
411,
29871,
13,
18884,
4134,
360,
24296,
886,
13,
4706,
289,
14339,
29918,
8228,
313,
524,
1125,
13,
632,
29896,
448,
383,
29941,
29896,
29906,
29945,
4989,
311,
319,
29941,
29906,
29945,
13,
632,
29906,
448,
383,
29941,
29896,
29906,
29945,
4989,
311,
319,
29946,
29929,
29900,
13,
632,
13,
1678,
16969,
29901,
13,
4706,
2258,
29918,
2095,
29873,
313,
23583,
29898,
7411,
29892,
851,
22164,
2758,
519,
22884,
363,
269,
3466,
29871,
13,
462,
462,
259,
12187,
3957,
518,
6134,
29962,
13,
268,
13,
1678,
9995,
13,
268,
13,
1678,
2258,
29918,
401,
353,
851,
29898,
2095,
29873,
29918,
8228,
29897,
718,
7101,
29918,
1853,
718,
851,
29898,
29716,
29918,
1853,
29897,
13,
268,
13,
1678,
2258,
29918,
2095,
29873,
353,
11117,
29896,
29909,
29896,
2396,
29896,
29906,
29929,
29900,
29900,
5501,
29896,
29933,
29896,
2396,
29906,
29896,
29945,
29900,
29900,
5501,
29896,
29907,
29896,
2396,
29896,
29906,
29929,
29900,
29900,
5501,
29896,
29928,
29896,
2396,
29896,
29929,
29941,
29900,
29900,
29892,
13,
1669,
525,
29906,
29909,
29896,
2396,
29896,
29896,
29900,
29900,
29900,
5501,
29906,
29933,
29896,
2396,
29896,
29947,
29941,
29900,
29900,
5501,
29906,
29907,
29896,
2396,
29896,
29896,
29900,
29900,
29900,
5501,
29906,
29928,
29896,
2396,
29896,
29953,
29945,
29900,
29900,
29892,
13,
1669,
525,
29941,
29909,
29896,
2396,
29929,
29900,
29900,
29900,
5501,
29941,
29933,
29896,
2396,
29896,
29945,
29900,
29900,
29900,
5501,
29941,
29907,
29896,
2396,
29929,
29900,
29900,
29900,
5501,
29941,
29928,
29896,
2396,
29896,
29941,
29945,
29900,
29900,
29892,
13,
1669,
525,
29896,
29909,
29906,
2396,
29896,
29953,
29906,
29900,
29900,
5501,
29896,
29933,
29906,
2396,
29906,
29953,
29929,
29900,
29900,
5501,
29896,
29907,
29906,
2396,
29896,
29953,
29906,
29900,
29900,
5501,
29896,
29928,
29906,
2396,
29906,
29946,
29906,
29900,
29900,
29892,
13,
1669,
525,
29906,
29909,
29906,
2396,
29896,
29941,
29947,
29900,
29900,
5501,
29906,
29933,
29906,
2396,
29906,
29941,
29900,
29900,
29900,
5501,
29906,
29907,
29906,
2396,
29896,
29941,
29947,
29900,
29900,
5501,
29906,
29928,
29906,
2396,
29906,
29900,
29955,
29900,
29900,
29892,
13,
1669,
525,
29941,
29909,
29906,
2396,
29896,
29896,
29941,
29900,
29900,
5501,
29941,
29933,
29906,
2396,
29896,
29947,
29929,
29900,
29900,
5501,
29941,
29907,
29906,
2396,
29896,
29896,
29941,
29900,
29900,
5501,
29941,
29928,
29906,
2396,
29896,
29955,
29900,
29900,
29900,
29892,
29913,
13,
268,
13,
1678,
298,
29873,
29918,
726,
353,
426,
29896,
29901,
877,
29896,
448,
3918,
322,
3273,
2243,
15048,
639,
14081,
16311,
304,
278,
525,
29974,
13,
462,
525,
20845,
310,
2254,
5477,
13,
18884,
29906,
29901,
877,
29906,
448,
438,
874,
675,
322,
3273,
2243,
15048,
8943,
304,
278,
5305,
525,
718,
13,
462,
525,
974,
2254,
5477,
13,
18884,
29941,
11283,
29941,
448,
6242,
2243,
15048,
738,
5305,
10827,
13,
268,
13,
1753,
11594,
29896,
29953,
29906,
29874,
29898,
5029,
29918,
1853,
29892,
1206,
29892,
260,
29892,
285,
29891,
29892,
321,
1125,
13,
1678,
9995,
3744,
11235,
1543,
297,
24221,
13,
268,
13,
1678,
450,
2920,
310,
714,
11235,
3161,
310,
5144,
297,
24221,
4091,
451,
29871,
13,
1678,
13461,
278,
1494,
29892,
988,
260,
29892,
22831,
29892,
338,
278,
12003,
2264,
310,
278,
1543,
29901,
13,
308,
13,
1678,
9995,
13,
1678,
1209,
13,
268,
2
] |
spiketoolkit/validation/quality_metrics.py | teristam/spiketoolk | 55 | 76413 | <gh_stars>10-100
from .quality_metric_classes.metric_data import MetricData
from .quality_metric_classes.amplitude_cutoff import AmplitudeCutoff
from .quality_metric_classes.silhouette_score import SilhouetteScore
from .quality_metric_classes.num_spikes import NumSpikes
from .quality_metric_classes.firing_rate import FiringRate
from .quality_metric_classes.d_prime import DPrime
from .quality_metric_classes.l_ratio import LRatio
from .quality_metric_classes.presence_ratio import PresenceRatio
from .quality_metric_classes.isi_violation import ISIViolation
from .quality_metric_classes.snr import SNR
from .quality_metric_classes.isolation_distance import IsolationDistance
from .quality_metric_classes.noise_overlap import NoiseOverlap
from .quality_metric_classes.nearest_neighbor import NearestNeighbor
from .quality_metric_classes.drift_metric import DriftMetric
from .quality_metric_classes.parameter_dictionaries import update_all_param_dicts_with_kwargs
from collections import OrderedDict
from copy import deepcopy
import pandas
all_metrics_list = ["num_spikes", "firing_rate", "presence_ratio", "isi_violation", "amplitude_cutoff", "snr",
"max_drift", "cumulative_drift", "silhouette_score", "isolation_distance", "l_ratio",
"d_prime", "noise_overlap", "nn_hit_rate", "nn_miss_rate"]
def get_quality_metrics_list():
return all_metrics_list
def compute_num_spikes(
sorting,
sampling_frequency=None,
unit_ids=None,
**kwargs
):
"""
Computes and returns the num spikes for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated
sampling_frequency: float
The sampling frequency of the result. If None, will check to see if sampling frequency is in sorting extractor
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
save_property_or_features: bool
If True, the metric is saved as sorting property
verbose: bool
If True, will be verbose in metric computation
Returns
----------
num_spikes: np.ndarray
The number of spikes of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=sampling_frequency, recording=None,
apply_filter=False, freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'], raise_if_empty=False)
ns = NumSpikes(metric_data=md)
num_spikes = ns.compute_metric(**kwargs)
return num_spikes
def compute_firing_rates(
sorting,
duration_in_frames,
sampling_frequency=None,
unit_ids=None,
**kwargs
):
"""
Computes and returns the firing rates for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
duration_in_frames: int
Length of recording (in frames).
sampling_frequency: float
The sampling frequency of the result. If None, will check to see if sampling frequency is in sorting extractor
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
save_property_or_features: bool
If True, the metric is saved as sorting property
verbose: bool
If True, will be verbose in metric computation
Returns
----------
firing_rates: np.ndarray
The firing rates of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=sampling_frequency, recording=None,
apply_filter=False, freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=duration_in_frames, verbose=params_dict['verbose'])
fr = FiringRate(metric_data=md)
firing_rates = fr.compute_metric(**kwargs)
return firing_rates
def compute_presence_ratios(
sorting,
duration_in_frames,
sampling_frequency=None,
unit_ids=None,
**kwargs
):
"""
Computes and returns the presence ratios for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
duration_in_frames: int
Length of recording (in frames).
sampling_frequency: float
The sampling frequency of the result. If None, will check to see if sampling frequency is in sorting extractor
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
save_property_or_features: bool
If True, the metric is saved as sorting property
verbose: bool
If True, will be verbose in metric computation
Returns
----------
presence_ratios: np.ndarray
The presence ratios of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=sampling_frequency, recording=None,
apply_filter=False, freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=duration_in_frames, verbose=params_dict['verbose'])
pr = PresenceRatio(metric_data=md)
presence_ratios = pr.compute_metric(**kwargs)
return presence_ratios
def compute_isi_violations(
sorting,
duration_in_frames,
isi_threshold=ISIViolation.params['isi_threshold'],
min_isi=ISIViolation.params['min_isi'],
sampling_frequency=None,
unit_ids=None,
**kwargs
):
"""
Computes and returns the isi violations for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
duration_in_frames: int
Length of recording (in frames).
isi_threshold: float
The isi threshold for calculating isi violations
min_isi: float
The minimum expected isi value
sampling_frequency: float
The sampling frequency of the result. If None, will check to see if sampling frequency is in sorting extractor
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
save_property_or_features: bool
If True, the metric is saved as sorting property
verbose: bool
If True, will be verbose in metric computation
Returns
----------
isi_violations: np.ndarray
The isi violations of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=sampling_frequency, recording=None,
apply_filter=False, freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=duration_in_frames, verbose=params_dict['verbose'])
iv = ISIViolation(metric_data=md)
isi_violations = iv.compute_metric(isi_threshold, min_isi, **kwargs)
return isi_violations
def compute_amplitude_cutoffs(
sorting,
recording,
unit_ids=None,
**kwargs
):
"""
Computes and returns the amplitude cutoffs for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
apply_filter: bool
If True, recording is bandpass-filtered.
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
save_property_or_features: bool
If true, it will save amplitudes in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes.
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: float
Frames after peak to compute amplitude
save_property_or_features: bool
If True, the metric is saved as sorting property
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
amplitude_cutoffs: np.ndarray
The amplitude cutoffs of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_amplitudes(**kwargs)
ac = AmplitudeCutoff(metric_data=md)
amplitude_cutoffs = ac.compute_metric(**kwargs)
return amplitude_cutoffs
def compute_snrs(
sorting,
recording,
snr_mode=SNR.params['snr_mode'],
snr_noise_duration=SNR.params['snr_noise_duration'],
max_spikes_per_unit_for_snr=SNR.params['max_spikes_per_unit_for_snr'],
template_mode=SNR.params['template_mode'],
max_channel_peak=SNR.params['max_channel_peak'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the snrs in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
snr_mode: str
Mode to compute noise SNR ('mad' | 'std' - default 'mad')
snr_noise_duration: float
Number of seconds to compute noise level from (default 10.0)
max_spikes_per_unit_for_snr: int
Maximum number of spikes to compute templates from (default 1000)
template_mode: str
Use 'mean' or 'median' to compute templates
max_channel_peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or both ('both' - default)
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
snrs: np.ndarray
The snrs of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
duration_in_frames=None, freq_max=params_dict["freq_max"], unit_ids=unit_ids,
verbose=params_dict['verbose'])
snr = SNR(metric_data=md)
snrs = snr.compute_metric(snr_mode, snr_noise_duration, max_spikes_per_unit_for_snr,
template_mode, max_channel_peak, **kwargs)
return snrs
def compute_noise_overlaps(
sorting,
recording,
num_channels_to_compare=NoiseOverlap.params['num_channels_to_compare'],
num_features=NoiseOverlap.params['num_features'],
num_knn=NoiseOverlap.params['num_knn'],
max_spikes_per_unit_for_noise_overlap=NoiseOverlap.params['max_spikes_per_unit_for_noise_overlap'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the noise overlaps in the sorted dataset.
Noise overlap estimates the fraction of ‘‘noise events’’ in a cluster, i.e., above-threshold events not associated
with true firings of this or any of the other clustered units. A large noise overlap implies a high false-positive
rate.
Implementation from ml_ms4alg. For more information see https://doi.org/10.1016/j.neuron.2017.08.030
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
num_features: int
Number of features to use for PCA
num_knn: int
Number of nearest neighbors
max_spikes_per_unit_for_noise_overlap: int
Number of waveforms to use for noise overlaps estimation
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
noise_overlaps: np.ndarray
The noise_overlaps of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
duration_in_frames=None, freq_max=params_dict["freq_max"], unit_ids=unit_ids,
verbose=params_dict['verbose'])
noise_overlap = NoiseOverlap(metric_data=md)
noise_overlaps = noise_overlap.compute_metric(num_channels_to_compare,
max_spikes_per_unit_for_noise_overlap,
num_features, num_knn, **kwargs)
return noise_overlaps
def compute_silhouette_scores(
sorting,
recording,
max_spikes_for_silhouette=SilhouetteScore.params['max_spikes_for_silhouette'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the silhouette scores in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
max_spikes_for_silhouette: int
Max spikes to be used for silhouette metric
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
silhouette_scores: np.ndarray
The sihouette scores of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
duration_in_frames=None, freq_max=params_dict["freq_max"], unit_ids=unit_ids,
verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
silhouette_score = SilhouetteScore(metric_data=md)
silhouette_scores = silhouette_score.compute_metric(max_spikes_for_silhouette, **kwargs)
return silhouette_scores
def compute_d_primes(
sorting,
recording,
num_channels_to_compare=DPrime.params['num_channels_to_compare'],
max_spikes_per_cluster=DPrime.params['max_spikes_per_cluster'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the d primes in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
num_channels_to_compare: int
The number of channels to be used for the PC extraction and comparison
max_spikes_per_cluster: int
Max spikes to be used from each unit
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
d_primes: np.ndarray
The d primes of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
d_prime = DPrime(metric_data=md)
d_primes = d_prime.compute_metric(num_channels_to_compare, max_spikes_per_cluster, **kwargs)
return d_primes
def compute_l_ratios(
sorting,
recording,
num_channels_to_compare=LRatio.params['num_channels_to_compare'],
max_spikes_per_cluster=LRatio.params['max_spikes_per_cluster'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the l ratios in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
num_channels_to_compare: int
The number of channels to be used for the PC extraction and comparison
max_spikes_per_cluster: int
Max spikes to be used from each unit
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
l_ratios: np.ndarray
The l ratios of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
l_ratio = LRatio(metric_data=md)
l_ratios = l_ratio.compute_metric(num_channels_to_compare, max_spikes_per_cluster, **kwargs)
return l_ratios
def compute_isolation_distances(
sorting,
recording,
num_channels_to_compare=IsolationDistance.params['num_channels_to_compare'],
max_spikes_per_cluster=IsolationDistance.params['max_spikes_per_cluster'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the isolation distances in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
num_channels_to_compare: int
The number of channels to be used for the PC extraction and comparison
max_spikes_per_cluster: int
Max spikes to be used from each unit
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
isolation_distances: np.ndarray
The isolation distances of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
isolation_distance = IsolationDistance(metric_data=md)
isolation_distances = isolation_distance.compute_metric(num_channels_to_compare, max_spikes_per_cluster,
**kwargs)
return isolation_distances
def compute_nn_metrics(
sorting,
recording,
num_channels_to_compare=NearestNeighbor.params['num_channels_to_compare'],
max_spikes_per_cluster=NearestNeighbor.params['max_spikes_per_cluster'],
max_spikes_for_nn=NearestNeighbor.params['max_spikes_for_nn'],
n_neighbors=NearestNeighbor.params['n_neighbors'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the nearest neighbor metrics in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
num_channels_to_compare: int
The number of channels to be used for the PC extraction and comparison
max_spikes_per_cluster: int
Max spikes to be used from each unit
max_spikes_for_nn: int
Max spikes to be used for nearest-neighbors calculation
n_neighbors: int
Number of neighbors to compare
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
nn_metrics: np.ndarray
The nearest neighbor metrics of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
nn = NearestNeighbor(metric_data=md)
nn_metrics = nn.compute_metric(num_channels_to_compare, max_spikes_per_cluster,
max_spikes_for_nn, n_neighbors, **kwargs)
return nn_metrics
def compute_drift_metrics(
sorting,
recording,
drift_metrics_interval_s=DriftMetric.params['drift_metrics_interval_s'],
drift_metrics_min_spikes_per_interval=DriftMetric.params['drift_metrics_min_spikes_per_interval'],
unit_ids=None,
**kwargs
):
"""
Computes and returns the drift metrics in the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
drift_metrics_interval_s: float
Time period for evaluating drift.
drift_metrics_min_spikes_per_interval: int
Minimum number of spikes for evaluating drift metrics per interval.
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
dm_metrics: np.ndarray
The drift metrics of the sorted units.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=recording.get_sampling_frequency(), recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=None, verbose=params_dict['verbose'])
md.compute_pca_scores(**kwargs)
dm = DriftMetric(metric_data=md)
dm_metrics = dm.compute_metric(drift_metrics_interval_s, drift_metrics_min_spikes_per_interval, **kwargs)
return dm_metrics
def compute_quality_metrics(
sorting,
recording=None,
duration_in_frames=None,
sampling_frequency=None,
metric_names=None,
unit_ids=None,
as_dataframe=False,
isi_threshold=ISIViolation.params['isi_threshold'],
min_isi=ISIViolation.params['min_isi'],
snr_mode=SNR.params['snr_mode'],
snr_noise_duration=SNR.params['snr_noise_duration'],
max_spikes_per_unit_for_snr=SNR.params['max_spikes_per_unit_for_snr'],
template_mode=SNR.params['template_mode'],
max_channel_peak=SNR.params['max_channel_peak'],
max_spikes_per_unit_for_noise_overlap=NoiseOverlap.params['max_spikes_per_unit_for_noise_overlap'],
noise_overlap_num_features=NoiseOverlap.params['num_features'],
noise_overlap_num_knn=NoiseOverlap.params['num_knn'],
drift_metrics_interval_s=DriftMetric.params['drift_metrics_interval_s'],
drift_metrics_min_spikes_per_interval=DriftMetric.params['drift_metrics_min_spikes_per_interval'],
max_spikes_for_silhouette=SilhouetteScore.params['max_spikes_for_silhouette'],
num_channels_to_compare=13,
max_spikes_per_cluster=500,
max_spikes_for_nn=NearestNeighbor.params['max_spikes_for_nn'],
n_neighbors=NearestNeighbor.params['n_neighbors'],
**kwargs
):
"""
Computes and returns all specified metrics for the sorted dataset.
Parameters
----------
sorting: SortingExtractor
The sorting result to be evaluated.
recording: RecordingExtractor
The given recording extractor from which to extract amplitudes
duration_in_frames: int
Length of recording (in frames).
sampling_frequency: float
The sampling frequency of the result. If None, will check to see if sampling frequency is in sorting extractor
metric_names: list
List of metric names to be computed
unit_ids: list
List of unit ids to compute metric for. If not specified, all units are used
as_dataframe: bool
If True, will return dataframe of metrics. If False, will return dictionary.
isi_threshold: float
The isi threshold for calculating isi violations
min_isi: float
The minimum expected isi value
snr_mode: str
Mode to compute noise SNR ('mad' | 'std' - default 'mad')
snr_noise_duration: float
Number of seconds to compute noise level from (default 10.0)
max_spikes_per_unit_for_snr: int
Maximum number of spikes to compute templates for SNR from (default 1000)
template_mode: str
Use 'mean' or 'median' to compute templates
max_channel_peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or both ('both' - default)
max_spikes_per_unit_for_noise_overlap: int
Maximum number of spikes to compute templates for noise overlap from (default 1000)
noise_overlap_num_features: int
Number of features to use for PCA for noise overlap
noise_overlap_num_knn: int
Number of nearest neighbors for noise overlap
drift_metrics_interval_s: float
Time period for evaluating drift.
drift_metrics_min_spikes_per_interval: int
Minimum number of spikes for evaluating drift metrics per interval
max_spikes_for_silhouette: int
Max spikes to be used for silhouette metric
num_channels_to_compare: int
The number of channels to be used for the PC extraction and comparison
max_spikes_per_cluster: int
Max spikes to be used from each unit
max_spikes_for_nn: int
Max spikes to be used for nearest-neighbors calculation
n_neighbors: int
Number of neighbors to compare
**kwargs: keyword arguments
Keyword arguments among the following:
method: str
If 'absolute' (default), amplitudes are absolute amplitudes in uV are returned.
If 'relative', amplitudes are returned as ratios between waveform amplitudes and template amplitudes
peak: str
If maximum channel has to be found among negative peaks ('neg'), positive ('pos') or
both ('both' - default)
frames_before: int
Frames before peak to compute amplitude
frames_after: int
Frames after peak to compute amplitude
apply_filter: bool
If True, recording is bandpass-filtered
freq_min: float
High-pass frequency for optional filter (default 300 Hz)
freq_max: float
Low-pass frequency for optional filter (default 6000 Hz)
grouping_property: str
Property to group channels. E.g. if the recording extractor has the 'group' property and
'grouping_property' is 'group', then waveforms are computed group-wise.
ms_before: float
Time period in ms to cut waveforms before the spike events
ms_after: float
Time period in ms to cut waveforms after the spike events
dtype: dtype
The numpy dtype of the waveforms
compute_property_from_recording: bool
If True and 'grouping_property' is given, the property of each unit is assigned as the corresponding
property of the recording extractor channel on which the average waveform is the largest
max_channels_per_waveforms: int or None
Maximum channels per waveforms to return. If None, all channels are returned
n_jobs: int
Number of parallel jobs (default 1)
memmap: bool
If True, waveforms are saved as memmap object (recommended for long recordings with many channels)
save_property_or_features: bool
If true, it will save features in the sorting extractor
recompute_info: bool
If True, waveforms are recomputed
max_spikes_per_unit: int
The maximum number of spikes to extract per unit
seed: int
Random seed for reproducibility
verbose: bool
If True, will be verbose in metric computation
Returns
----------
metrics: dictionary OR pandas.dataframe
Dictionary or pandas.dataframe of metrics.
"""
params_dict = update_all_param_dicts_with_kwargs(kwargs)
metrics_dict = OrderedDict()
if metric_names is None:
metric_names = all_metrics_list
else:
bad_metrics = []
for m in metric_names:
if m not in all_metrics_list:
bad_metrics.append(m)
if len(bad_metrics) > 0:
raise ValueError(f"Improper feature names: {str(bad_metrics)}. The following features names can be "
f"calculated: {str(all_metrics_list)}")
if unit_ids is None:
unit_ids = sorting.get_unit_ids()
md = MetricData(sorting=sorting, sampling_frequency=sampling_frequency, recording=recording,
apply_filter=params_dict["apply_filter"], freq_min=params_dict["freq_min"],
freq_max=params_dict["freq_max"], unit_ids=unit_ids,
duration_in_frames=duration_in_frames, verbose=params_dict['verbose'])
if "firing_rate" in metric_names or "presence_ratio" in metric_names or "isi_violation" in metric_names:
if recording is None and duration_in_frames is None:
raise ValueError(
"duration_in_frames and recording cannot both be None when computing firing_rate, "
"presence_ratio, and isi_violation")
if "max_drift" in metric_names or "cumulative_drift" in metric_names or "silhouette_score" in metric_names \
or "isolation_distance" in metric_names or "l_ratio" in metric_names or "d_prime" in metric_names \
or "nn_hit_rate" in metric_names or "nn_miss_rate" in metric_names:
if recording is None:
raise ValueError("The recording cannot be None when computing max_drift, cumulative_drift, "
"silhouette_score isolation_distance, l_ratio, d_prime, nn_hit_rate, or amplitude_cutoff.")
else:
md.compute_pca_scores(**kwargs)
if "amplitude_cutoff" in metric_names:
if recording is None:
raise ValueError("The recording cannot be None when computing amplitude cutoffs.")
else:
md.compute_amplitudes(**kwargs)
if "snr" in metric_names:
if recording is None:
raise ValueError("The recording cannot be None when computing snr.")
if "num_spikes" in metric_names:
ns = NumSpikes(metric_data=md)
num_spikes = ns.compute_metric(**kwargs)
metrics_dict['num_spikes'] = num_spikes
if "firing_rate" in metric_names:
fr = FiringRate(metric_data=md)
firing_rates = fr.compute_metric(**kwargs)
metrics_dict['firing_rate'] = firing_rates
if "presence_ratio" in metric_names:
pr = PresenceRatio(metric_data=md)
presence_ratios = pr.compute_metric(**kwargs)
metrics_dict['presence_ratio'] = presence_ratios
if "isi_violation" in metric_names:
iv = ISIViolation(metric_data=md)
isi_violations = iv.compute_metric(isi_threshold, min_isi, **kwargs)
metrics_dict['isi_violation'] = isi_violations
if "amplitude_cutoff" in metric_names:
ac = AmplitudeCutoff(metric_data=md)
amplitude_cutoffs = ac.compute_metric(**kwargs)
metrics_dict['amplitude_cutoff'] = amplitude_cutoffs
if "snr" in metric_names:
snr = SNR(metric_data=md)
snrs = snr.compute_metric(snr_mode, snr_noise_duration, max_spikes_per_unit_for_snr,
template_mode, max_channel_peak, **kwargs)
metrics_dict['snr'] = snrs
if "max_drift" in metric_names or "cumulative_drift" in metric_names:
dm = DriftMetric(metric_data=md)
max_drifts, cumulative_drifts = dm.compute_metric(drift_metrics_interval_s,
drift_metrics_min_spikes_per_interval, **kwargs)
if "max_drift" in metric_names:
metrics_dict['max_drift'] = max_drifts
if "cumulative_drift" in metric_names:
metrics_dict['cumulative_drift'] = cumulative_drifts
if "silhouette_score" in metric_names:
silhouette_score = SilhouetteScore(metric_data=md)
silhouette_scores = silhouette_score.compute_metric(max_spikes_for_silhouette, **kwargs)
metrics_dict['silhouette_score'] = silhouette_scores
if "isolation_distance" in metric_names:
isolation_distance = IsolationDistance(metric_data=md)
isolation_distances = isolation_distance.compute_metric(num_channels_to_compare, max_spikes_per_cluster,
**kwargs)
metrics_dict['isolation_distance'] = isolation_distances
if "noise_overlap" in metric_names:
noise_overlap = NoiseOverlap(metric_data=md)
noise_overlaps = noise_overlap.compute_metric(num_channels_to_compare,
max_spikes_per_unit_for_noise_overlap,
noise_overlap_num_features,
noise_overlap_num_knn,
**kwargs)
metrics_dict['noise_overlap'] = noise_overlaps
if "l_ratio" in metric_names:
l_ratio = LRatio(metric_data=md)
l_ratios = l_ratio.compute_metric(num_channels_to_compare, max_spikes_per_cluster, **kwargs)
metrics_dict['l_ratio'] = l_ratios
if "d_prime" in metric_names:
d_prime = DPrime(metric_data=md)
d_primes = d_prime.compute_metric(num_channels_to_compare, max_spikes_per_cluster, **kwargs)
metrics_dict['d_prime'] = d_primes
if "nn_hit_rate" in metric_names or "nn_miss_rate" in metric_names:
nn = NearestNeighbor(metric_data=md)
nn_hit_rates, nn_miss_rates = nn.compute_metric(num_channels_to_compare, max_spikes_per_cluster,
max_spikes_for_nn, n_neighbors, **kwargs)
if "nn_hit_rate" in metric_names:
metrics_dict['nn_hit_rate'] = nn_hit_rates
if "nn_miss_rate" in metric_names:
metrics_dict['nn_miss_rate'] = nn_miss_rates
if as_dataframe:
metrics = pandas.DataFrame.from_dict(metrics_dict)
metrics = metrics.rename(index={original_idx: unit_ids[i] for
i, original_idx in enumerate(range(len(metrics)))})
else:
metrics = metrics_dict
return metrics
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
16414,
29918,
1272,
1053,
4737,
2200,
1469,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
314,
2830,
1151,
29918,
7582,
2696,
1053,
1913,
2830,
1151,
29907,
329,
2696,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
25590,
10774,
2353,
29918,
13628,
1053,
5664,
10774,
2353,
20097,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
1949,
29918,
1028,
29379,
1053,
11848,
5592,
29379,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
29888,
8491,
29918,
10492,
1053,
383,
8491,
19907,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
29881,
29918,
10080,
1053,
360,
4040,
603,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
29880,
29918,
3605,
601,
1053,
365,
29934,
20819,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
4569,
663,
29918,
3605,
601,
1053,
4360,
663,
29934,
20819,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
10770,
29918,
1403,
22671,
1053,
306,
5425,
29963,
29875,
22671,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
16586,
29878,
1053,
317,
16514,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
275,
22671,
29918,
19244,
1053,
1317,
22671,
27469,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
1217,
895,
29918,
957,
6984,
1053,
1939,
895,
3563,
6984,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
28502,
342,
29918,
484,
1141,
4089,
1053,
26206,
342,
8139,
1141,
4089,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
29881,
7532,
29918,
16414,
1053,
4942,
2027,
10095,
2200,
13,
3166,
869,
29567,
29918,
16414,
29918,
13203,
29889,
15501,
29918,
29467,
4314,
1053,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
3166,
3509,
1053,
6483,
8552,
13,
5215,
11701,
13,
13,
497,
29918,
2527,
10817,
29918,
1761,
353,
6796,
1949,
29918,
1028,
29379,
613,
376,
29888,
8491,
29918,
10492,
613,
376,
4569,
663,
29918,
3605,
601,
613,
376,
10770,
29918,
1403,
22671,
613,
376,
314,
2830,
1151,
29918,
7582,
2696,
613,
376,
16586,
29878,
613,
13,
462,
1678,
376,
3317,
29918,
29881,
7532,
613,
376,
29883,
398,
28524,
29918,
29881,
7532,
613,
376,
25590,
10774,
2353,
29918,
13628,
613,
376,
275,
22671,
29918,
19244,
613,
376,
29880,
29918,
3605,
601,
613,
13,
462,
1678,
376,
29881,
29918,
10080,
613,
376,
1217,
895,
29918,
957,
6984,
613,
376,
15755,
29918,
27342,
29918,
10492,
613,
376,
15755,
29918,
9894,
29918,
10492,
3108,
13,
13,
13,
1753,
679,
29918,
29567,
29918,
2527,
10817,
29918,
1761,
7295,
13,
1678,
736,
599,
29918,
2527,
10817,
29918,
1761,
13,
13,
13,
1753,
10272,
29918,
1949,
29918,
1028,
29379,
29898,
13,
4706,
16548,
29892,
13,
4706,
23460,
29918,
10745,
23860,
29922,
8516,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
954,
805,
29379,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
13,
1678,
23460,
29918,
10745,
23860,
29901,
5785,
13,
4706,
450,
23460,
10868,
310,
278,
1121,
29889,
960,
6213,
29892,
674,
1423,
304,
1074,
565,
23460,
10868,
338,
297,
16548,
6597,
272,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
5852,
29892,
278,
12714,
338,
7160,
408,
16548,
2875,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
954,
29918,
1028,
29379,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
1353,
310,
805,
29379,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
13445,
10335,
29918,
10745,
23860,
29892,
16867,
29922,
8516,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
8824,
29892,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
7464,
12020,
29918,
361,
29918,
6310,
29922,
8824,
29897,
13,
13,
1678,
17534,
353,
11848,
5592,
29379,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
954,
29918,
1028,
29379,
353,
17534,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
1678,
736,
954,
29918,
1028,
29379,
13,
13,
13,
1753,
10272,
29918,
29888,
8491,
29918,
29878,
1078,
29898,
13,
4706,
16548,
29892,
13,
4706,
14385,
29918,
262,
29918,
19935,
29892,
13,
4706,
23460,
29918,
10745,
23860,
29922,
8516,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
25948,
19257,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
14385,
29918,
262,
29918,
19935,
29901,
938,
13,
4706,
365,
1477,
310,
16867,
313,
262,
16608,
467,
13,
1678,
23460,
29918,
10745,
23860,
29901,
5785,
13,
4706,
450,
23460,
10868,
310,
278,
1121,
29889,
960,
6213,
29892,
674,
1423,
304,
1074,
565,
23460,
10868,
338,
297,
16548,
6597,
272,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
5852,
29892,
278,
12714,
338,
7160,
408,
16548,
2875,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
25948,
29918,
29878,
1078,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
25948,
19257,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
13445,
10335,
29918,
10745,
23860,
29892,
16867,
29922,
8516,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
8824,
29892,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
19708,
29918,
262,
29918,
19935,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
1424,
353,
383,
8491,
19907,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
25948,
29918,
29878,
1078,
353,
1424,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
1678,
736,
25948,
29918,
29878,
1078,
13,
13,
13,
1753,
10272,
29918,
4569,
663,
29918,
29878,
2219,
359,
29898,
13,
4706,
16548,
29892,
13,
4706,
14385,
29918,
262,
29918,
19935,
29892,
13,
4706,
23460,
29918,
10745,
23860,
29922,
8516,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
10122,
364,
2219,
359,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
14385,
29918,
262,
29918,
19935,
29901,
938,
13,
4706,
365,
1477,
310,
16867,
313,
262,
16608,
467,
13,
1678,
23460,
29918,
10745,
23860,
29901,
5785,
13,
4706,
450,
23460,
10868,
310,
278,
1121,
29889,
960,
6213,
29892,
674,
1423,
304,
1074,
565,
23460,
10868,
338,
297,
16548,
6597,
272,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
5852,
29892,
278,
12714,
338,
7160,
408,
16548,
2875,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
10122,
29918,
29878,
2219,
359,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
10122,
364,
2219,
359,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
13445,
10335,
29918,
10745,
23860,
29892,
16867,
29922,
8516,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
8824,
29892,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
19708,
29918,
262,
29918,
19935,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
544,
353,
4360,
663,
29934,
20819,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
10122,
29918,
29878,
2219,
359,
353,
544,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
1678,
736,
10122,
29918,
29878,
2219,
359,
13,
13,
13,
1753,
10272,
29918,
10770,
29918,
1403,
324,
800,
29898,
13,
4706,
16548,
29892,
13,
4706,
14385,
29918,
262,
29918,
19935,
29892,
13,
4706,
338,
29875,
29918,
386,
12268,
29922,
3235,
5667,
29875,
22671,
29889,
7529,
1839,
10770,
29918,
386,
12268,
7464,
13,
4706,
1375,
29918,
10770,
29922,
3235,
5667,
29875,
22671,
29889,
7529,
1839,
1195,
29918,
10770,
7464,
13,
4706,
23460,
29918,
10745,
23860,
29922,
8516,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
338,
29875,
5537,
800,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
14385,
29918,
262,
29918,
19935,
29901,
938,
13,
4706,
365,
1477,
310,
16867,
313,
262,
16608,
467,
13,
1678,
338,
29875,
29918,
386,
12268,
29901,
5785,
13,
4706,
450,
338,
29875,
16897,
363,
25202,
338,
29875,
5537,
800,
13,
1678,
1375,
29918,
10770,
29901,
5785,
13,
4706,
450,
9212,
3806,
338,
29875,
995,
13,
1678,
23460,
29918,
10745,
23860,
29901,
5785,
13,
4706,
450,
23460,
10868,
310,
278,
1121,
29889,
960,
6213,
29892,
674,
1423,
304,
1074,
565,
23460,
10868,
338,
297,
16548,
6597,
272,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
5852,
29892,
278,
12714,
338,
7160,
408,
16548,
2875,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
338,
29875,
29918,
1403,
324,
800,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
338,
29875,
5537,
800,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
13445,
10335,
29918,
10745,
23860,
29892,
16867,
29922,
8516,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
8824,
29892,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
19708,
29918,
262,
29918,
19935,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
20444,
353,
306,
5425,
29963,
29875,
22671,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
338,
29875,
29918,
1403,
324,
800,
353,
20444,
29889,
26017,
29918,
16414,
29898,
10770,
29918,
386,
12268,
29892,
1375,
29918,
10770,
29892,
3579,
19290,
29897,
13,
1678,
736,
338,
29875,
29918,
1403,
324,
800,
13,
13,
13,
1753,
10272,
29918,
314,
2830,
1151,
29918,
7582,
22450,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
28347,
5700,
22450,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
29889,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
22252,
8192,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
29889,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
5785,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
5852,
29892,
278,
12714,
338,
7160,
408,
16548,
2875,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
28347,
29918,
7582,
22450,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
28347,
5700,
22450,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
314,
2830,
8192,
29898,
1068,
19290,
29897,
13,
1678,
1274,
353,
1913,
2830,
1151,
29907,
329,
2696,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
28347,
29918,
7582,
22450,
353,
1274,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
1678,
736,
28347,
29918,
7582,
22450,
13,
13,
13,
1753,
10272,
29918,
16586,
2288,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
5807,
29878,
29918,
8513,
29922,
29903,
16514,
29889,
7529,
1839,
16586,
29878,
29918,
8513,
7464,
13,
4706,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29922,
29903,
16514,
29889,
7529,
1839,
16586,
29878,
29918,
1217,
895,
29918,
19708,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29922,
29903,
16514,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
7464,
13,
4706,
4472,
29918,
8513,
29922,
29903,
16514,
29889,
7529,
1839,
6886,
29918,
8513,
7464,
13,
4706,
4236,
29918,
12719,
29918,
412,
557,
29922,
29903,
16514,
29889,
7529,
1839,
3317,
29918,
12719,
29918,
412,
557,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
5807,
2288,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
5807,
29878,
29918,
8513,
29901,
851,
13,
9651,
21864,
304,
10272,
11462,
317,
16514,
6702,
19581,
29915,
891,
525,
4172,
29915,
448,
2322,
525,
19581,
1495,
13,
1678,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29901,
5785,
13,
4706,
9681,
310,
6923,
304,
10272,
11462,
3233,
515,
313,
4381,
29871,
29896,
29900,
29889,
29900,
29897,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29901,
938,
13,
4706,
5918,
12539,
1353,
310,
805,
29379,
304,
10272,
17475,
515,
313,
4381,
29871,
29896,
29900,
29900,
29900,
29897,
13,
1678,
4472,
29918,
8513,
29901,
851,
13,
4706,
4803,
525,
12676,
29915,
470,
525,
2168,
713,
29915,
304,
10272,
17475,
13,
1678,
4236,
29918,
12719,
29918,
412,
557,
29901,
851,
13,
4706,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
5807,
2288,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
5807,
2288,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
5807,
29878,
353,
317,
16514,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
5807,
2288,
353,
5807,
29878,
29889,
26017,
29918,
16414,
29898,
16586,
29878,
29918,
8513,
29892,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29892,
13,
462,
795,
4472,
29918,
8513,
29892,
4236,
29918,
12719,
29918,
412,
557,
29892,
3579,
19290,
29897,
13,
1678,
736,
5807,
2288,
13,
13,
13,
1753,
10272,
29918,
1217,
895,
29918,
957,
14128,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
7464,
13,
4706,
954,
29918,
22100,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
1949,
29918,
22100,
7464,
13,
4706,
954,
29918,
3959,
29876,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
1949,
29918,
3959,
29876,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
11462,
975,
14128,
297,
278,
12705,
8783,
29889,
13,
1678,
1939,
895,
25457,
21875,
278,
15958,
310,
5129,
30086,
1217,
895,
4959,
30010,
30010,
297,
263,
9867,
29892,
474,
29889,
29872,
1696,
2038,
29899,
386,
12268,
4959,
451,
6942,
13,
1678,
411,
1565,
13734,
886,
310,
445,
470,
738,
310,
278,
916,
9867,
287,
10340,
29889,
319,
2919,
11462,
25457,
10469,
263,
1880,
2089,
29899,
1066,
3321,
13,
1678,
6554,
29889,
13,
13,
1678,
1954,
14607,
515,
286,
29880,
29918,
1516,
29946,
9564,
29889,
1152,
901,
2472,
1074,
2045,
597,
1867,
29875,
29889,
990,
29914,
29896,
29900,
29889,
29896,
29900,
29896,
29953,
29914,
29926,
29889,
16115,
265,
29889,
29906,
29900,
29896,
29955,
29889,
29900,
29947,
29889,
29900,
29941,
29900,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
954,
29918,
22100,
29901,
938,
13,
4706,
9681,
310,
5680,
304,
671,
363,
349,
5454,
13,
1678,
954,
29918,
3959,
29876,
29901,
938,
13,
4706,
9681,
310,
20471,
22092,
943,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29901,
938,
13,
4706,
9681,
310,
10742,
9514,
304,
671,
363,
11462,
975,
14128,
23248,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
11462,
29918,
957,
14128,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
11462,
29918,
957,
14128,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
11462,
29918,
957,
6984,
353,
1939,
895,
3563,
6984,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
11462,
29918,
957,
14128,
353,
11462,
29918,
957,
6984,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
13,
462,
462,
462,
29871,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29892,
13,
462,
462,
462,
29871,
954,
29918,
22100,
29892,
954,
29918,
3959,
29876,
29892,
3579,
19290,
29897,
13,
1678,
736,
11462,
29918,
957,
14128,
13,
13,
13,
1753,
10272,
29918,
25590,
10774,
2353,
29918,
1557,
2361,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29922,
26729,
10774,
2353,
20097,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
4047,
10774,
2353,
19435,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
363,
4047,
10774,
2353,
12714,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
4047,
10774,
2353,
29918,
1557,
2361,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
1354,
10774,
2353,
19435,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
4047,
10774,
2353,
29918,
13628,
353,
5664,
10774,
2353,
20097,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
4047,
10774,
2353,
29918,
1557,
2361,
353,
4047,
10774,
2353,
29918,
13628,
29889,
26017,
29918,
16414,
29898,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29892,
3579,
19290,
29897,
13,
1678,
736,
4047,
10774,
2353,
29918,
1557,
2361,
13,
13,
13,
1753,
10272,
29918,
29881,
29918,
558,
1355,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
29928,
4040,
603,
29889,
7529,
1839,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29922,
29928,
4040,
603,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
19594,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
270,
544,
1355,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29901,
938,
13,
4706,
450,
1353,
310,
18196,
304,
367,
1304,
363,
278,
9609,
4805,
428,
322,
10230,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
515,
1269,
5190,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
270,
29918,
558,
1355,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
270,
544,
1355,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
270,
29918,
10080,
353,
360,
4040,
603,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
270,
29918,
558,
1355,
353,
270,
29918,
10080,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
3579,
19290,
29897,
13,
1678,
736,
270,
29918,
558,
1355,
13,
13,
13,
1753,
10272,
29918,
29880,
29918,
29878,
2219,
359,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
29519,
20819,
29889,
7529,
1839,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29922,
29519,
20819,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
19594,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
301,
364,
2219,
359,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29901,
938,
13,
4706,
450,
1353,
310,
18196,
304,
367,
1304,
363,
278,
9609,
4805,
428,
322,
10230,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
515,
1269,
5190,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
301,
29918,
29878,
2219,
359,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
301,
364,
2219,
359,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
301,
29918,
3605,
601,
353,
365,
29934,
20819,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
301,
29918,
29878,
2219,
359,
353,
301,
29918,
3605,
601,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
3579,
19290,
29897,
13,
1678,
736,
301,
29918,
29878,
2219,
359,
13,
13,
13,
1753,
10272,
29918,
275,
22671,
29918,
5721,
2925,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
29902,
2929,
362,
27469,
29889,
7529,
1839,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29922,
29902,
2929,
362,
27469,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
19594,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
11695,
362,
24610,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29901,
938,
13,
4706,
450,
1353,
310,
18196,
304,
367,
1304,
363,
278,
9609,
4805,
428,
322,
10230,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
515,
1269,
5190,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
11695,
362,
29918,
5721,
2925,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
11695,
362,
24610,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
11695,
362,
29918,
19244,
353,
1317,
22671,
27469,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
11695,
362,
29918,
5721,
2925,
353,
11695,
362,
29918,
19244,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
13,
462,
462,
462,
9651,
3579,
19290,
29897,
13,
1678,
736,
11695,
362,
29918,
5721,
2925,
13,
13,
13,
1753,
10272,
29918,
15755,
29918,
2527,
10817,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
19594,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
7464,
13,
4706,
302,
29918,
484,
1141,
29890,
943,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
29876,
29918,
484,
1141,
29890,
943,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
20471,
12307,
21556,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29901,
938,
13,
4706,
450,
1353,
310,
18196,
304,
367,
1304,
363,
278,
9609,
4805,
428,
322,
10230,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
515,
1269,
5190,
13,
1678,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
363,
20471,
29899,
484,
1141,
29890,
943,
13944,
13,
1678,
302,
29918,
484,
1141,
29890,
943,
29901,
938,
13,
4706,
9681,
310,
22092,
943,
304,
7252,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
302,
29876,
29918,
2527,
10817,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
20471,
12307,
21556,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
302,
29876,
353,
26206,
342,
8139,
1141,
4089,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
302,
29876,
29918,
2527,
10817,
353,
302,
29876,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
13,
462,
462,
259,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29892,
302,
29918,
484,
1141,
29890,
943,
29892,
3579,
19290,
29897,
13,
1678,
736,
302,
29876,
29918,
2527,
10817,
13,
13,
13,
1753,
10272,
29918,
29881,
7532,
29918,
2527,
10817,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29892,
13,
4706,
4192,
2027,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29922,
29928,
7532,
10095,
2200,
29889,
7529,
1839,
29881,
7532,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
7464,
13,
4706,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29922,
29928,
7532,
10095,
2200,
29889,
7529,
1839,
29881,
7532,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
7464,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
278,
4192,
2027,
21556,
297,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
4192,
2027,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29901,
5785,
13,
4706,
5974,
3785,
363,
6161,
1218,
4192,
2027,
29889,
13,
1678,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29901,
938,
13,
4706,
3080,
12539,
1353,
310,
805,
29379,
363,
6161,
1218,
4192,
2027,
21556,
639,
7292,
29889,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
270,
29885,
29918,
2527,
10817,
29901,
7442,
29889,
299,
2378,
13,
4706,
450,
4192,
2027,
21556,
310,
278,
12705,
10340,
29889,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
3757,
3278,
29889,
657,
29918,
13445,
10335,
29918,
10745,
23860,
3285,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
270,
29885,
353,
4942,
2027,
10095,
2200,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
1678,
270,
29885,
29918,
2527,
10817,
353,
270,
29885,
29889,
26017,
29918,
16414,
29898,
29881,
7532,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29892,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29892,
3579,
19290,
29897,
13,
1678,
736,
270,
29885,
29918,
2527,
10817,
13,
13,
13,
1753,
10272,
29918,
29567,
29918,
2527,
10817,
29898,
13,
4706,
16548,
29892,
13,
4706,
16867,
29922,
8516,
29892,
13,
4706,
14385,
29918,
262,
29918,
19935,
29922,
8516,
29892,
13,
4706,
23460,
29918,
10745,
23860,
29922,
8516,
29892,
13,
4706,
12714,
29918,
7039,
29922,
8516,
29892,
13,
4706,
5190,
29918,
4841,
29922,
8516,
29892,
13,
4706,
408,
29918,
1272,
2557,
29922,
8824,
29892,
13,
4706,
338,
29875,
29918,
386,
12268,
29922,
3235,
5667,
29875,
22671,
29889,
7529,
1839,
10770,
29918,
386,
12268,
7464,
13,
4706,
1375,
29918,
10770,
29922,
3235,
5667,
29875,
22671,
29889,
7529,
1839,
1195,
29918,
10770,
7464,
13,
4706,
5807,
29878,
29918,
8513,
29922,
29903,
16514,
29889,
7529,
1839,
16586,
29878,
29918,
8513,
7464,
13,
4706,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29922,
29903,
16514,
29889,
7529,
1839,
16586,
29878,
29918,
1217,
895,
29918,
19708,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29922,
29903,
16514,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
7464,
13,
4706,
4472,
29918,
8513,
29922,
29903,
16514,
29889,
7529,
1839,
6886,
29918,
8513,
7464,
13,
4706,
4236,
29918,
12719,
29918,
412,
557,
29922,
29903,
16514,
29889,
7529,
1839,
3317,
29918,
12719,
29918,
412,
557,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
7464,
13,
4706,
11462,
29918,
957,
6984,
29918,
1949,
29918,
22100,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
1949,
29918,
22100,
7464,
13,
4706,
11462,
29918,
957,
6984,
29918,
1949,
29918,
3959,
29876,
29922,
3782,
895,
3563,
6984,
29889,
7529,
1839,
1949,
29918,
3959,
29876,
7464,
13,
4706,
4192,
2027,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29922,
29928,
7532,
10095,
2200,
29889,
7529,
1839,
29881,
7532,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
7464,
13,
4706,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29922,
29928,
7532,
10095,
2200,
29889,
7529,
1839,
29881,
7532,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
7464,
13,
4706,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29922,
26729,
10774,
2353,
20097,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
7464,
13,
4706,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29922,
29896,
29941,
29892,
13,
4706,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29922,
29945,
29900,
29900,
29892,
13,
4706,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
7464,
13,
4706,
302,
29918,
484,
1141,
29890,
943,
29922,
29940,
799,
342,
8139,
1141,
4089,
29889,
7529,
1839,
29876,
29918,
484,
1141,
29890,
943,
7464,
13,
4706,
3579,
19290,
13,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
322,
3639,
599,
6790,
21556,
363,
278,
12705,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
16548,
29901,
20025,
292,
5647,
28891,
13,
4706,
450,
16548,
1121,
304,
367,
19030,
29889,
13,
1678,
16867,
29901,
3599,
3278,
5647,
28891,
13,
4706,
450,
2183,
16867,
6597,
272,
515,
607,
304,
6597,
22252,
8192,
13,
1678,
14385,
29918,
262,
29918,
19935,
29901,
938,
13,
4706,
365,
1477,
310,
16867,
313,
262,
16608,
467,
13,
1678,
23460,
29918,
10745,
23860,
29901,
5785,
13,
4706,
450,
23460,
10868,
310,
278,
1121,
29889,
960,
6213,
29892,
674,
1423,
304,
1074,
565,
23460,
10868,
338,
297,
16548,
6597,
272,
13,
1678,
12714,
29918,
7039,
29901,
1051,
13,
4706,
2391,
310,
12714,
2983,
304,
367,
15712,
13,
1678,
5190,
29918,
4841,
29901,
1051,
13,
4706,
2391,
310,
5190,
18999,
304,
10272,
12714,
363,
29889,
960,
451,
6790,
29892,
599,
10340,
526,
1304,
13,
1678,
408,
29918,
1272,
2557,
29901,
6120,
13,
4706,
960,
5852,
29892,
674,
736,
12205,
310,
21556,
29889,
960,
7700,
29892,
674,
736,
8600,
29889,
13,
1678,
338,
29875,
29918,
386,
12268,
29901,
5785,
13,
4706,
450,
338,
29875,
16897,
363,
25202,
338,
29875,
5537,
800,
13,
1678,
1375,
29918,
10770,
29901,
5785,
13,
4706,
450,
9212,
3806,
338,
29875,
995,
13,
1678,
5807,
29878,
29918,
8513,
29901,
851,
13,
9651,
21864,
304,
10272,
11462,
317,
16514,
6702,
19581,
29915,
891,
525,
4172,
29915,
448,
2322,
525,
19581,
1495,
13,
1678,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29901,
5785,
13,
4706,
9681,
310,
6923,
304,
10272,
11462,
3233,
515,
313,
4381,
29871,
29896,
29900,
29889,
29900,
29897,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29901,
938,
13,
4706,
5918,
12539,
1353,
310,
805,
29379,
304,
10272,
17475,
363,
317,
16514,
515,
313,
4381,
29871,
29896,
29900,
29900,
29900,
29897,
13,
1678,
4472,
29918,
8513,
29901,
851,
13,
4706,
4803,
525,
12676,
29915,
470,
525,
2168,
713,
29915,
304,
10272,
17475,
13,
1678,
4236,
29918,
12719,
29918,
412,
557,
29901,
851,
13,
4706,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29901,
938,
13,
4706,
5918,
12539,
1353,
310,
805,
29379,
304,
10272,
17475,
363,
11462,
25457,
515,
313,
4381,
29871,
29896,
29900,
29900,
29900,
29897,
13,
1678,
11462,
29918,
957,
6984,
29918,
1949,
29918,
22100,
29901,
938,
13,
4706,
9681,
310,
5680,
304,
671,
363,
349,
5454,
363,
11462,
25457,
13,
1678,
11462,
29918,
957,
6984,
29918,
1949,
29918,
3959,
29876,
29901,
938,
13,
4706,
9681,
310,
20471,
22092,
943,
363,
11462,
25457,
13,
1678,
4192,
2027,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29901,
5785,
13,
4706,
5974,
3785,
363,
6161,
1218,
4192,
2027,
29889,
13,
1678,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29901,
938,
13,
4706,
3080,
12539,
1353,
310,
805,
29379,
363,
6161,
1218,
4192,
2027,
21556,
639,
7292,
13,
1678,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
363,
4047,
10774,
2353,
12714,
13,
1678,
954,
29918,
305,
12629,
29918,
517,
29918,
18307,
29901,
938,
13,
4706,
450,
1353,
310,
18196,
304,
367,
1304,
363,
278,
9609,
4805,
428,
322,
10230,
13,
1678,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
515,
1269,
5190,
13,
1678,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29901,
938,
13,
4706,
5918,
805,
29379,
304,
367,
1304,
363,
20471,
29899,
484,
1141,
29890,
943,
13944,
13,
1678,
302,
29918,
484,
1141,
29890,
943,
29901,
938,
13,
4706,
9681,
310,
22092,
943,
304,
7252,
13,
1678,
3579,
19290,
29901,
13553,
6273,
13,
4706,
7670,
1742,
6273,
4249,
278,
1494,
29901,
13,
9651,
1158,
29901,
851,
13,
18884,
960,
525,
23552,
29915,
313,
4381,
511,
22252,
8192,
526,
8380,
22252,
8192,
297,
318,
29963,
526,
4133,
29889,
13,
18884,
960,
525,
22925,
742,
22252,
8192,
526,
4133,
408,
364,
2219,
359,
1546,
10742,
689,
22252,
8192,
322,
4472,
22252,
8192,
13,
9651,
19224,
29901,
851,
13,
18884,
960,
7472,
8242,
756,
304,
367,
1476,
4249,
8178,
1236,
10327,
6702,
10052,
5477,
6374,
6702,
1066,
1495,
470,
13,
18884,
1716,
6702,
20313,
29915,
448,
2322,
29897,
13,
9651,
16608,
29918,
11083,
29901,
938,
13,
18884,
4693,
1280,
1434,
19224,
304,
10272,
28347,
13,
9651,
16608,
29918,
7045,
29901,
938,
13,
18884,
4693,
1280,
1156,
19224,
304,
10272,
28347,
13,
9651,
3394,
29918,
4572,
29901,
6120,
13,
18884,
960,
5852,
29892,
16867,
338,
3719,
3364,
29899,
4572,
287,
13,
9651,
3005,
29939,
29918,
1195,
29901,
5785,
13,
18884,
5057,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29941,
29900,
29900,
379,
29920,
29897,
13,
9651,
3005,
29939,
29918,
3317,
29901,
5785,
13,
18884,
17511,
29899,
3364,
10868,
363,
13136,
4175,
313,
4381,
29871,
29953,
29900,
29900,
29900,
379,
29920,
29897,
13,
9651,
27270,
29918,
6799,
29901,
851,
13,
18884,
9079,
304,
2318,
18196,
29889,
382,
29889,
29887,
29889,
565,
278,
16867,
6597,
272,
756,
278,
525,
2972,
29915,
2875,
322,
13,
18884,
525,
2972,
292,
29918,
6799,
29915,
338,
525,
2972,
742,
769,
10742,
9514,
526,
15712,
2318,
29899,
3538,
29889,
13,
9651,
10887,
29918,
11083,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1434,
278,
805,
9345,
4959,
13,
9651,
10887,
29918,
7045,
29901,
5785,
13,
18884,
5974,
3785,
297,
10887,
304,
5700,
10742,
9514,
1156,
278,
805,
9345,
4959,
13,
9651,
26688,
29901,
26688,
13,
18884,
450,
12655,
26688,
310,
278,
10742,
9514,
13,
9651,
10272,
29918,
6799,
29918,
3166,
29918,
3757,
3278,
29901,
6120,
13,
18884,
960,
5852,
322,
525,
2972,
292,
29918,
6799,
29915,
338,
2183,
29892,
278,
2875,
310,
1269,
5190,
338,
9859,
408,
278,
6590,
13,
18884,
2875,
310,
278,
16867,
6597,
272,
8242,
373,
607,
278,
6588,
10742,
689,
338,
278,
10150,
13,
9651,
4236,
29918,
305,
12629,
29918,
546,
29918,
27766,
9514,
29901,
938,
470,
6213,
13,
18884,
5918,
12539,
18196,
639,
10742,
9514,
304,
736,
29889,
960,
6213,
29892,
599,
18196,
526,
4133,
13,
9651,
302,
29918,
9057,
29879,
29901,
938,
13,
18884,
9681,
310,
8943,
17643,
313,
4381,
29871,
29896,
29897,
13,
9651,
2626,
1958,
29901,
6120,
13,
18884,
960,
5852,
29892,
10742,
9514,
526,
7160,
408,
2626,
1958,
1203,
313,
276,
2055,
2760,
363,
1472,
2407,
886,
411,
1784,
18196,
29897,
13,
9651,
4078,
29918,
6799,
29918,
272,
29918,
22100,
29901,
6120,
13,
18884,
960,
1565,
29892,
372,
674,
4078,
5680,
297,
278,
16548,
6597,
272,
13,
9651,
337,
26017,
29918,
3888,
29901,
6120,
13,
462,
1678,
960,
5852,
29892,
10742,
9514,
526,
337,
12097,
287,
13,
9651,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29901,
938,
13,
18884,
450,
7472,
1353,
310,
805,
29379,
304,
6597,
639,
5190,
13,
9651,
16717,
29901,
938,
13,
18884,
16968,
16717,
363,
9483,
455,
29890,
1793,
13,
9651,
26952,
29901,
6120,
13,
18884,
960,
5852,
29892,
674,
367,
26952,
297,
12714,
16287,
13,
13,
1678,
16969,
13,
1678,
448,
1378,
29899,
13,
1678,
21556,
29901,
8600,
6323,
11701,
29889,
1272,
2557,
13,
4706,
13343,
470,
11701,
29889,
1272,
2557,
310,
21556,
29889,
13,
13,
1678,
9995,
13,
1678,
8636,
29918,
8977,
353,
2767,
29918,
497,
29918,
3207,
29918,
8977,
29879,
29918,
2541,
29918,
19290,
29898,
19290,
29897,
13,
1678,
21556,
29918,
8977,
353,
8170,
287,
21533,
580,
13,
13,
1678,
565,
12714,
29918,
7039,
338,
6213,
29901,
13,
4706,
12714,
29918,
7039,
353,
599,
29918,
2527,
10817,
29918,
1761,
13,
1678,
1683,
29901,
13,
4706,
4319,
29918,
2527,
10817,
353,
5159,
13,
4706,
363,
286,
297,
12714,
29918,
7039,
29901,
13,
9651,
565,
286,
451,
297,
599,
29918,
2527,
10817,
29918,
1761,
29901,
13,
18884,
4319,
29918,
2527,
10817,
29889,
4397,
29898,
29885,
29897,
13,
4706,
565,
7431,
29898,
12313,
29918,
2527,
10817,
29897,
1405,
29871,
29900,
29901,
13,
9651,
12020,
7865,
2392,
29898,
29888,
29908,
1888,
771,
546,
4682,
2983,
29901,
426,
710,
29898,
12313,
29918,
2527,
10817,
29512,
450,
1494,
5680,
2983,
508,
367,
376,
13,
462,
632,
285,
29908,
15807,
630,
29901,
426,
710,
29898,
497,
29918,
2527,
10817,
29918,
1761,
2915,
1159,
13,
13,
1678,
565,
5190,
29918,
4841,
338,
6213,
29901,
13,
4706,
5190,
29918,
4841,
353,
16548,
29889,
657,
29918,
5441,
29918,
4841,
580,
13,
13,
1678,
22821,
353,
4737,
2200,
1469,
29898,
6605,
292,
29922,
6605,
292,
29892,
23460,
29918,
10745,
23860,
29922,
13445,
10335,
29918,
10745,
23860,
29892,
16867,
29922,
3757,
3278,
29892,
13,
462,
1678,
3394,
29918,
4572,
29922,
7529,
29918,
8977,
3366,
7302,
29918,
4572,
12436,
3005,
29939,
29918,
1195,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
1195,
12436,
13,
462,
1678,
3005,
29939,
29918,
3317,
29922,
7529,
29918,
8977,
3366,
29888,
7971,
29918,
3317,
12436,
5190,
29918,
4841,
29922,
5441,
29918,
4841,
29892,
13,
462,
1678,
14385,
29918,
262,
29918,
19935,
29922,
19708,
29918,
262,
29918,
19935,
29892,
26952,
29922,
7529,
29918,
8977,
1839,
369,
15828,
11287,
13,
13,
1678,
565,
376,
29888,
8491,
29918,
10492,
29908,
297,
12714,
29918,
7039,
470,
376,
4569,
663,
29918,
3605,
601,
29908,
297,
12714,
29918,
7039,
470,
376,
10770,
29918,
1403,
22671,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
565,
16867,
338,
6213,
322,
14385,
29918,
262,
29918,
19935,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
376,
19708,
29918,
262,
29918,
19935,
322,
16867,
2609,
1716,
367,
6213,
746,
20602,
25948,
29918,
10492,
29892,
376,
13,
18884,
376,
4569,
663,
29918,
3605,
601,
29892,
322,
338,
29875,
29918,
1403,
22671,
1159,
13,
13,
1678,
565,
376,
3317,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
470,
376,
29883,
398,
28524,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
470,
376,
25590,
10774,
2353,
29918,
13628,
29908,
297,
12714,
29918,
7039,
320,
13,
9651,
470,
376,
275,
22671,
29918,
19244,
29908,
297,
12714,
29918,
7039,
470,
376,
29880,
29918,
3605,
601,
29908,
297,
12714,
29918,
7039,
470,
376,
29881,
29918,
10080,
29908,
297,
12714,
29918,
7039,
320,
13,
9651,
470,
376,
15755,
29918,
27342,
29918,
10492,
29908,
297,
12714,
29918,
7039,
470,
376,
15755,
29918,
9894,
29918,
10492,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
565,
16867,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
1576,
16867,
2609,
367,
6213,
746,
20602,
4236,
29918,
29881,
7532,
29892,
13299,
28524,
29918,
29881,
7532,
29892,
376,
13,
462,
632,
376,
25590,
10774,
2353,
29918,
13628,
11695,
362,
29918,
19244,
29892,
301,
29918,
3605,
601,
29892,
270,
29918,
10080,
29892,
302,
29876,
29918,
27342,
29918,
10492,
29892,
470,
28347,
29918,
7582,
2696,
23157,
13,
4706,
1683,
29901,
13,
9651,
22821,
29889,
26017,
29918,
29886,
1113,
29918,
1557,
2361,
29898,
1068,
19290,
29897,
13,
13,
1678,
565,
376,
314,
2830,
1151,
29918,
7582,
2696,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
565,
16867,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
1576,
16867,
2609,
367,
6213,
746,
20602,
28347,
5700,
22450,
23157,
13,
4706,
1683,
29901,
13,
9651,
22821,
29889,
26017,
29918,
314,
2830,
8192,
29898,
1068,
19290,
29897,
13,
1678,
565,
376,
16586,
29878,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
565,
16867,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
1576,
16867,
2609,
367,
6213,
746,
20602,
5807,
29878,
23157,
13,
13,
1678,
565,
376,
1949,
29918,
1028,
29379,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
17534,
353,
11848,
5592,
29379,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
954,
29918,
1028,
29379,
353,
17534,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
1949,
29918,
1028,
29379,
2033,
353,
954,
29918,
1028,
29379,
13,
13,
1678,
565,
376,
29888,
8491,
29918,
10492,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
1424,
353,
383,
8491,
19907,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
25948,
29918,
29878,
1078,
353,
1424,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
29888,
8491,
29918,
10492,
2033,
353,
25948,
29918,
29878,
1078,
13,
13,
1678,
565,
376,
4569,
663,
29918,
3605,
601,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
544,
353,
4360,
663,
29934,
20819,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
10122,
29918,
29878,
2219,
359,
353,
544,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
4569,
663,
29918,
3605,
601,
2033,
353,
10122,
29918,
29878,
2219,
359,
13,
13,
1678,
565,
376,
10770,
29918,
1403,
22671,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
20444,
353,
306,
5425,
29963,
29875,
22671,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
338,
29875,
29918,
1403,
324,
800,
353,
20444,
29889,
26017,
29918,
16414,
29898,
10770,
29918,
386,
12268,
29892,
1375,
29918,
10770,
29892,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
10770,
29918,
1403,
22671,
2033,
353,
338,
29875,
29918,
1403,
324,
800,
13,
13,
1678,
565,
376,
314,
2830,
1151,
29918,
7582,
2696,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
1274,
353,
1913,
2830,
1151,
29907,
329,
2696,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
28347,
29918,
7582,
22450,
353,
1274,
29889,
26017,
29918,
16414,
29898,
1068,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
314,
2830,
1151,
29918,
7582,
2696,
2033,
353,
28347,
29918,
7582,
22450,
13,
13,
1678,
565,
376,
16586,
29878,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
5807,
29878,
353,
317,
16514,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
5807,
2288,
353,
5807,
29878,
29889,
26017,
29918,
16414,
29898,
16586,
29878,
29918,
8513,
29892,
5807,
29878,
29918,
1217,
895,
29918,
19708,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
16586,
29878,
29892,
13,
462,
462,
29871,
4472,
29918,
8513,
29892,
4236,
29918,
12719,
29918,
412,
557,
29892,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
16586,
29878,
2033,
353,
5807,
2288,
13,
13,
1678,
565,
376,
3317,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
470,
376,
29883,
398,
28524,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
270,
29885,
353,
4942,
2027,
10095,
2200,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
4236,
29918,
7707,
17741,
29892,
13299,
28524,
29918,
7707,
17741,
353,
270,
29885,
29889,
26017,
29918,
16414,
29898,
29881,
7532,
29918,
2527,
10817,
29918,
19207,
29918,
29879,
29892,
13,
462,
462,
462,
3986,
4192,
2027,
29918,
2527,
10817,
29918,
1195,
29918,
1028,
29379,
29918,
546,
29918,
19207,
29892,
3579,
19290,
29897,
13,
4706,
565,
376,
3317,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
29901,
13,
9651,
21556,
29918,
8977,
1839,
3317,
29918,
29881,
7532,
2033,
353,
4236,
29918,
7707,
17741,
13,
4706,
565,
376,
29883,
398,
28524,
29918,
29881,
7532,
29908,
297,
12714,
29918,
7039,
29901,
13,
9651,
21556,
29918,
8977,
1839,
29883,
398,
28524,
29918,
29881,
7532,
2033,
353,
13299,
28524,
29918,
7707,
17741,
13,
13,
1678,
565,
376,
25590,
10774,
2353,
29918,
13628,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
4047,
10774,
2353,
29918,
13628,
353,
5664,
10774,
2353,
20097,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
4047,
10774,
2353,
29918,
1557,
2361,
353,
4047,
10774,
2353,
29918,
13628,
29889,
26017,
29918,
16414,
29898,
3317,
29918,
1028,
29379,
29918,
1454,
29918,
25590,
10774,
2353,
29892,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
25590,
10774,
2353,
29918,
13628,
2033,
353,
4047,
10774,
2353,
29918,
1557,
2361,
13,
13,
1678,
565,
376,
275,
22671,
29918,
19244,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
11695,
362,
29918,
19244,
353,
1317,
22671,
27469,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
11695,
362,
29918,
5721,
2925,
353,
11695,
362,
29918,
19244,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
13,
462,
462,
462,
18884,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
275,
22671,
29918,
19244,
2033,
353,
11695,
362,
29918,
5721,
2925,
13,
13,
1678,
565,
376,
1217,
895,
29918,
957,
6984,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
11462,
29918,
957,
6984,
353,
1939,
895,
3563,
6984,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
11462,
29918,
957,
14128,
353,
11462,
29918,
957,
6984,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
13,
462,
462,
462,
418,
4236,
29918,
1028,
29379,
29918,
546,
29918,
5441,
29918,
1454,
29918,
1217,
895,
29918,
957,
6984,
29892,
13,
462,
462,
462,
418,
11462,
29918,
957,
6984,
29918,
1949,
29918,
22100,
29892,
13,
462,
462,
462,
418,
11462,
29918,
957,
6984,
29918,
1949,
29918,
3959,
29876,
29892,
13,
462,
462,
462,
418,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
1217,
895,
29918,
957,
6984,
2033,
353,
11462,
29918,
957,
14128,
13,
13,
1678,
565,
376,
29880,
29918,
3605,
601,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
301,
29918,
3605,
601,
353,
365,
29934,
20819,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
301,
29918,
29878,
2219,
359,
353,
301,
29918,
3605,
601,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
29880,
29918,
3605,
601,
2033,
353,
301,
29918,
29878,
2219,
359,
13,
13,
1678,
565,
376,
29881,
29918,
10080,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
270,
29918,
10080,
353,
360,
4040,
603,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
270,
29918,
558,
1355,
353,
270,
29918,
10080,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
3579,
19290,
29897,
13,
4706,
21556,
29918,
8977,
1839,
29881,
29918,
10080,
2033,
353,
270,
29918,
558,
1355,
13,
13,
1678,
565,
376,
15755,
29918,
27342,
29918,
10492,
29908,
297,
12714,
29918,
7039,
470,
376,
15755,
29918,
9894,
29918,
10492,
29908,
297,
12714,
29918,
7039,
29901,
13,
4706,
302,
29876,
353,
26206,
342,
8139,
1141,
4089,
29898,
16414,
29918,
1272,
29922,
3487,
29897,
13,
4706,
302,
29876,
29918,
27342,
29918,
29878,
1078,
29892,
302,
29876,
29918,
9894,
29918,
29878,
1078,
353,
302,
29876,
29889,
26017,
29918,
16414,
29898,
1949,
29918,
305,
12629,
29918,
517,
29918,
18307,
29892,
4236,
29918,
1028,
29379,
29918,
546,
29918,
19594,
29892,
13,
462,
462,
462,
4706,
4236,
29918,
1028,
29379,
29918,
1454,
29918,
15755,
29892,
302,
29918,
484,
1141,
29890,
943,
29892,
3579,
19290,
29897,
13,
4706,
565,
376,
15755,
29918,
27342,
29918,
10492,
29908,
297,
12714,
29918,
7039,
29901,
13,
9651,
21556,
29918,
8977,
1839,
15755,
29918,
27342,
29918,
10492,
2033,
353,
302,
29876,
29918,
27342,
29918,
29878,
1078,
13,
4706,
565,
376,
15755,
29918,
9894,
29918,
10492,
29908,
297,
12714,
29918,
7039,
29901,
13,
9651,
21556,
29918,
8977,
1839,
15755,
29918,
9894,
29918,
10492,
2033,
353,
302,
29876,
29918,
9894,
29918,
29878,
1078,
13,
13,
1678,
565,
408,
29918,
1272,
2557,
29901,
13,
4706,
21556,
353,
11701,
29889,
17271,
29889,
3166,
29918,
8977,
29898,
2527,
10817,
29918,
8977,
29897,
13,
4706,
21556,
353,
21556,
29889,
1267,
420,
29898,
2248,
3790,
13492,
29918,
13140,
29901,
5190,
29918,
4841,
29961,
29875,
29962,
363,
13,
462,
462,
4706,
474,
29892,
2441,
29918,
13140,
297,
26985,
29898,
3881,
29898,
2435,
29898,
2527,
10817,
4961,
1800,
13,
1678,
1683,
29901,
13,
4706,
21556,
353,
21556,
29918,
8977,
13,
1678,
736,
21556,
13,
2
] |
yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py | mythwm/yardstick | 0 | 102238 | ##############################################################################
# Copyright (c) 2016 <NAME> and others
# <EMAIL>
# 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
##############################################################################
import mock
import unittest
from yardstick.benchmark.scenarios.availability import scenario_general
class ScenarioGeneralTestCase(unittest.TestCase):
def setUp(self):
self.scenario_cfg = {
'type': "general_scenario",
'options': {
'attackers': [{
'fault_type': "general-attacker",
'key': "kill-process"}],
'monitors': [{
'monitor_type': "general-monitor",
'key': "service-status"}],
'steps': [
{
'actionKey': "kill-process",
'actionType': "attacker",
'index': 1},
{
'actionKey': "service-status",
'actionType': "monitor",
'index': 2}]
}
}
self.instance = scenario_general.ScenarioGeneral(self.scenario_cfg, None)
self._mock_director = mock.patch.object(scenario_general, 'Director')
self.mock_director = self._mock_director.start()
self.addCleanup(self._stop_mock)
def _stop_mock(self):
self._mock_director.stop()
def test_scenario_general_all_successful(self):
self.instance.setup()
self.instance.run({})
self.instance.teardown()
def test_scenario_general_exception(self):
mock_obj = mock.Mock()
mock_obj.createActionPlayer.side_effect = KeyError('Wrong')
self.instance.director = mock_obj
self.instance.director.data = {}
self.instance.run({})
self.instance.teardown()
def test_scenario_general_case_fail(self):
mock_obj = mock.Mock()
mock_obj.verify.return_value = False
self.instance.director = mock_obj
self.instance.director.data = {}
self.instance.run({})
self.instance.pass_flag = True
self.instance.teardown()
| [
1,
835,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
322,
4045,
13,
29937,
529,
26862,
6227,
29958,
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,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
13,
13,
5215,
11187,
13,
5215,
443,
27958,
13,
13,
3166,
29413,
303,
860,
29889,
1785,
16580,
29889,
1557,
264,
8596,
29889,
485,
737,
3097,
1053,
10483,
29918,
17492,
13,
13,
1990,
2522,
24893,
15263,
3057,
8259,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1557,
24893,
29918,
16859,
353,
426,
13,
9651,
525,
1853,
2396,
376,
17492,
29918,
1557,
24893,
613,
13,
9651,
525,
6768,
2396,
426,
13,
18884,
525,
1131,
547,
414,
2396,
15974,
13,
462,
1678,
525,
27934,
29918,
1853,
2396,
376,
17492,
29899,
1131,
28940,
613,
13,
462,
1678,
525,
1989,
2396,
376,
21174,
29899,
5014,
9092,
1402,
13,
18884,
525,
3712,
17259,
2396,
15974,
13,
462,
1678,
525,
3712,
2105,
29918,
1853,
2396,
376,
17492,
29899,
3712,
2105,
613,
13,
462,
1678,
525,
1989,
2396,
376,
5509,
29899,
4882,
9092,
1402,
13,
18884,
525,
24530,
2396,
518,
13,
462,
1678,
426,
13,
462,
4706,
525,
2467,
2558,
2396,
376,
21174,
29899,
5014,
613,
13,
462,
4706,
525,
2467,
1542,
2396,
376,
1131,
28940,
613,
13,
462,
4706,
525,
2248,
2396,
29871,
29896,
1118,
13,
462,
1678,
426,
13,
462,
4706,
525,
2467,
2558,
2396,
376,
5509,
29899,
4882,
613,
13,
462,
4706,
525,
2467,
1542,
2396,
376,
3712,
2105,
613,
13,
462,
4706,
525,
2248,
2396,
29871,
29906,
6525,
13,
9651,
500,
13,
4706,
500,
13,
4706,
1583,
29889,
8758,
353,
10483,
29918,
17492,
29889,
4421,
24893,
15263,
29898,
1311,
29889,
1557,
24893,
29918,
16859,
29892,
6213,
29897,
13,
13,
4706,
1583,
3032,
17640,
29918,
11851,
272,
353,
11187,
29889,
5041,
29889,
3318,
29898,
1557,
24893,
29918,
17492,
29892,
525,
17392,
272,
1495,
13,
4706,
1583,
29889,
17640,
29918,
11851,
272,
353,
1583,
3032,
17640,
29918,
11851,
272,
29889,
2962,
580,
13,
4706,
1583,
29889,
1202,
29907,
14044,
786,
29898,
1311,
3032,
9847,
29918,
17640,
29897,
13,
13,
1678,
822,
903,
9847,
29918,
17640,
29898,
1311,
1125,
13,
4706,
1583,
3032,
17640,
29918,
11851,
272,
29889,
9847,
580,
13,
13,
1678,
822,
1243,
29918,
1557,
24893,
29918,
17492,
29918,
497,
29918,
8698,
1319,
29898,
1311,
1125,
13,
4706,
1583,
29889,
8758,
29889,
14669,
580,
13,
4706,
1583,
29889,
8758,
29889,
3389,
3319,
1800,
13,
4706,
1583,
29889,
8758,
29889,
371,
538,
776,
580,
13,
13,
1678,
822,
1243,
29918,
1557,
24893,
29918,
17492,
29918,
11739,
29898,
1311,
1125,
13,
4706,
11187,
29918,
5415,
353,
11187,
29889,
18680,
580,
13,
4706,
11187,
29918,
5415,
29889,
3258,
4276,
9075,
29889,
2975,
29918,
15987,
353,
7670,
2392,
877,
29956,
29373,
1495,
13,
4706,
1583,
29889,
8758,
29889,
11851,
272,
353,
11187,
29918,
5415,
13,
4706,
1583,
29889,
8758,
29889,
11851,
272,
29889,
1272,
353,
6571,
13,
4706,
1583,
29889,
8758,
29889,
3389,
3319,
1800,
13,
4706,
1583,
29889,
8758,
29889,
371,
538,
776,
580,
13,
13,
1678,
822,
1243,
29918,
1557,
24893,
29918,
17492,
29918,
4878,
29918,
14057,
29898,
1311,
1125,
13,
4706,
11187,
29918,
5415,
353,
11187,
29889,
18680,
580,
13,
4706,
11187,
29918,
5415,
29889,
27902,
29889,
2457,
29918,
1767,
353,
7700,
13,
4706,
1583,
29889,
8758,
29889,
11851,
272,
353,
11187,
29918,
5415,
13,
4706,
1583,
29889,
8758,
29889,
11851,
272,
29889,
1272,
353,
6571,
13,
4706,
1583,
29889,
8758,
29889,
3389,
3319,
1800,
13,
4706,
1583,
29889,
8758,
29889,
3364,
29918,
15581,
353,
5852,
13,
4706,
1583,
29889,
8758,
29889,
371,
538,
776,
580,
13,
2
] |
find_symbols_sizes.py | Amjad50/Fyp | 1 | 1607647 | <filename>find_symbols_sizes.py
# helper script to find the default sizes of all symbols in the default
# font size (no power or sub)
from os import chdir
from string import digits, ascii_letters
from tempfile import mkdtemp
from PIL import Image
from tqdm import tqdm
from dataset_generator.generator import generate_single_from_template
from segmenter.symbol_segmenter import segment_image_crops
from segmenter.utils import box_size
def get_symbol_size(expr):
filename = "tmp_file"
_ = generate_single_from_template(expr, ".", filename)
img = Image.open(filename + ".png")
crops = segment_image_crops(img)
assert len(crops) == 1
return box_size(crops[0])
if __name__ == "__main__":
characters = list(digits + ascii_letters + "=-+()[],.")
characters.extend(["\\sum", "\\pi", "\\int"])
tmp_dir = mkdtemp()
chdir(tmp_dir)
symbol_sizes_dict = {
ch: get_symbol_size(ch)
for ch in tqdm(characters)
}
print(symbol_sizes_dict)
| [
1,
529,
9507,
29958,
2886,
29918,
18098,
29879,
29918,
29879,
7093,
29889,
2272,
13,
29937,
16876,
2471,
304,
1284,
278,
2322,
15786,
310,
599,
15072,
297,
278,
2322,
13,
29937,
4079,
2159,
313,
1217,
3081,
470,
1014,
29897,
13,
13,
3166,
2897,
1053,
521,
3972,
13,
3166,
1347,
1053,
13340,
29892,
408,
18869,
29918,
1026,
2153,
13,
3166,
5694,
1445,
1053,
14690,
29881,
7382,
13,
13,
3166,
349,
6227,
1053,
7084,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
3166,
8783,
29918,
27959,
29889,
27959,
1053,
5706,
29918,
14369,
29918,
3166,
29918,
6886,
13,
3166,
10768,
261,
29889,
18098,
29918,
28192,
261,
1053,
10768,
29918,
3027,
29918,
24077,
567,
13,
3166,
10768,
261,
29889,
13239,
1053,
3800,
29918,
2311,
13,
13,
13,
1753,
679,
29918,
18098,
29918,
2311,
29898,
13338,
1125,
13,
1678,
10422,
353,
376,
7050,
29918,
1445,
29908,
13,
13,
1678,
903,
353,
5706,
29918,
14369,
29918,
3166,
29918,
6886,
29898,
13338,
29892,
11393,
613,
10422,
29897,
13,
13,
1678,
10153,
353,
7084,
29889,
3150,
29898,
9507,
718,
11393,
2732,
1159,
13,
1678,
8182,
567,
353,
10768,
29918,
3027,
29918,
24077,
567,
29898,
2492,
29897,
13,
13,
1678,
4974,
7431,
29898,
24077,
567,
29897,
1275,
29871,
29896,
13,
13,
1678,
736,
3800,
29918,
2311,
29898,
24077,
567,
29961,
29900,
2314,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
4890,
353,
1051,
29898,
7501,
1169,
718,
408,
18869,
29918,
1026,
2153,
718,
376,
10457,
29974,
580,
29961,
1402,
23157,
13,
1678,
4890,
29889,
21843,
29898,
3366,
1966,
2083,
613,
376,
1966,
1631,
613,
376,
1966,
524,
20068,
13,
13,
1678,
13128,
29918,
3972,
353,
14690,
29881,
7382,
580,
13,
1678,
521,
3972,
29898,
7050,
29918,
3972,
29897,
13,
13,
1678,
5829,
29918,
29879,
7093,
29918,
8977,
353,
426,
13,
4706,
521,
29901,
679,
29918,
18098,
29918,
2311,
29898,
305,
29897,
13,
4706,
363,
521,
297,
260,
29939,
18933,
29898,
3090,
21706,
29897,
13,
1678,
500,
13,
13,
1678,
1596,
29898,
18098,
29918,
29879,
7093,
29918,
8977,
29897,
13,
2
] |
booknlp/common/calc_coref_metrics.py | ishine/booknlp | 539 | 20111 | import subprocess, re, sys
def get_coref_score(metric, path_to_scorer, gold=None, preds=None):
output=subprocess.check_output(["perl", path_to_scorer, metric, preds, gold]).decode("utf-8")
output=output.split("\n")[-3]
matcher=re.search("Coreference: Recall: \(.*?\) (.*?)% Precision: \(.*?\) (.*?)% F1: (.*?)%", output)
if matcher is not None:
recall=float(matcher.group(1))
precision=float(matcher.group(2))
f1=float(matcher.group(3))
return recall, precision, f1
def get_conll(path_to_scorer, gold=None, preds=None):
bcub_r, bcub_p, bcub_f=get_coref_score("bcub", path_to_scorer, gold, preds)
muc_r, muc_p, muc_f=get_coref_score("muc", path_to_scorer, gold, preds)
ceaf_r, ceaf_p, ceaf_f=get_coref_score("ceafe", path_to_scorer, gold, preds)
print("bcub:\t%.1f" % bcub_f)
print("muc:\t%.1f" % muc_f)
print("ceaf:\t%.1f" % ceaf_f)
avg=(bcub_f + muc_f + ceaf_f)/3.
print("Average F1: %.1f" % (avg))
# Generate Latex table
# print("%.1f&%.1f&%.1f&%.1f" % (bcub_f, muc_f, ceaf_f, avg))
return bcub_f, avg
if __name__ == "__main__":
goldFile=sys.argv[1]
predFile=sys.argv[2]
scorer=sys.argv[3]
bcub_f, avg=get_conll(scorer, gold=goldFile, preds=predFile)
| [
1,
1053,
1014,
5014,
29892,
337,
29892,
10876,
13,
13,
1753,
679,
29918,
3221,
29888,
29918,
13628,
29898,
16414,
29892,
2224,
29918,
517,
29918,
1557,
9386,
29892,
7684,
29922,
8516,
29892,
4450,
29879,
29922,
8516,
1125,
13,
13,
12,
4905,
29922,
1491,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
22032,
613,
2224,
29918,
517,
29918,
1557,
9386,
29892,
12714,
29892,
4450,
29879,
29892,
7684,
14664,
13808,
703,
9420,
29899,
29947,
1159,
13,
12,
4905,
29922,
4905,
29889,
5451,
14182,
29876,
1159,
14352,
29941,
29962,
13,
12,
4352,
261,
29922,
276,
29889,
4478,
703,
9203,
1659,
29901,
3599,
497,
29901,
4269,
5575,
29973,
7244,
313,
5575,
7897,
29995,
12,
29925,
3757,
2459,
29901,
4269,
5575,
29973,
7244,
313,
5575,
7897,
29995,
12,
29943,
29896,
29901,
313,
5575,
7897,
29995,
613,
1962,
29897,
13,
12,
361,
1993,
261,
338,
451,
6213,
29901,
13,
12,
12,
3757,
497,
29922,
7411,
29898,
4352,
261,
29889,
2972,
29898,
29896,
876,
13,
12,
12,
17990,
2459,
29922,
7411,
29898,
4352,
261,
29889,
2972,
29898,
29906,
876,
13,
12,
12,
29888,
29896,
29922,
7411,
29898,
4352,
261,
29889,
2972,
29898,
29941,
876,
13,
12,
2457,
17386,
29892,
16716,
29892,
285,
29896,
13,
13,
1753,
679,
29918,
535,
645,
29898,
2084,
29918,
517,
29918,
1557,
9386,
29892,
7684,
29922,
8516,
29892,
4450,
29879,
29922,
8516,
1125,
13,
12,
12328,
431,
29918,
29878,
29892,
289,
29883,
431,
29918,
29886,
29892,
289,
29883,
431,
29918,
29888,
29922,
657,
29918,
3221,
29888,
29918,
13628,
703,
12328,
431,
613,
2224,
29918,
517,
29918,
1557,
9386,
29892,
7684,
29892,
4450,
29879,
29897,
13,
12,
29885,
1682,
29918,
29878,
29892,
286,
1682,
29918,
29886,
29892,
286,
1682,
29918,
29888,
29922,
657,
29918,
3221,
29888,
29918,
13628,
703,
29885,
1682,
613,
2224,
29918,
517,
29918,
1557,
9386,
29892,
7684,
29892,
4450,
29879,
29897,
13,
12,
346,
2142,
29918,
29878,
29892,
2257,
2142,
29918,
29886,
29892,
2257,
2142,
29918,
29888,
29922,
657,
29918,
3221,
29888,
29918,
13628,
703,
346,
29874,
1725,
613,
2224,
29918,
517,
29918,
1557,
9386,
29892,
7684,
29892,
4450,
29879,
29897,
13,
13,
12,
2158,
703,
12328,
431,
3583,
29873,
15543,
29896,
29888,
29908,
1273,
289,
29883,
431,
29918,
29888,
29897,
13,
12,
2158,
703,
29885,
1682,
3583,
29873,
15543,
29896,
29888,
29908,
1273,
286,
1682,
29918,
29888,
29897,
13,
12,
2158,
703,
346,
2142,
3583,
29873,
15543,
29896,
29888,
29908,
1273,
2257,
2142,
29918,
29888,
29897,
13,
12,
485,
29887,
7607,
12328,
431,
29918,
29888,
718,
286,
1682,
29918,
29888,
718,
2257,
2142,
29918,
29888,
6802,
29941,
29889,
13,
12,
2158,
703,
29909,
19698,
383,
29896,
29901,
18695,
29896,
29888,
29908,
1273,
313,
485,
29887,
876,
13,
13,
12,
29937,
3251,
403,
23089,
29916,
1591,
13,
12,
29937,
1596,
11702,
29889,
29896,
29888,
29987,
15543,
29896,
29888,
29987,
15543,
29896,
29888,
29987,
15543,
29896,
29888,
29908,
1273,
313,
12328,
431,
29918,
29888,
29892,
286,
1682,
29918,
29888,
29892,
2257,
2142,
29918,
29888,
29892,
1029,
29887,
876,
13,
13,
12,
2457,
289,
29883,
431,
29918,
29888,
29892,
1029,
29887,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
12,
29887,
1025,
2283,
29922,
9675,
29889,
19218,
29961,
29896,
29962,
13,
12,
11965,
2283,
29922,
9675,
29889,
19218,
29961,
29906,
29962,
13,
12,
1557,
9386,
29922,
9675,
29889,
19218,
29961,
29941,
29962,
13,
12,
12328,
431,
29918,
29888,
29892,
1029,
29887,
29922,
657,
29918,
535,
645,
29898,
1557,
9386,
29892,
7684,
29922,
29887,
1025,
2283,
29892,
4450,
29879,
29922,
11965,
2283,
29897,
13,
12,
13,
13,
12,
2
] |
basetestcase/base_FormTestCase.py | Spleeding1/django-basetestcase | 1 | 1608927 | from .base_UtilityTestCase import UtilityTestCase
class FormTestCase(UtilityTestCase):
def form_field_test(self, field, error_messages={}, help_text='', initial=None, label='', required=True, widget_attrs={}):
form = self.form()
try:
form.fields[field]
except KeyError:
raise Exception(f'\n Form does not have field\n\n {field}')
completed_attrs = []
for attr, expected in widget_attrs.items():
try:
actual = form.fields[field].widget.attrs[attr]
except KeyError:
raise Exception(
f'\n {attr} for form field {field} has not been set.'
)
self.assertEquals(expected, actual, msg=f'\n {field}: {attr}')
completed_attrs.append(attr)
for attr, actual in form.fields[field].widget.attrs.items():
if attr not in completed_attrs:
raise Exception(f'\n {field}:{attr} is set and should not be.')
if required is True and 'required' not in error_messages:
error_messages['required'] = 'This field is required.'
elif len(error_messages) is not 0:
for error, error_message in error_messages.items():
actual_error_message = form.fields[field].error_messages[error]
self.assertEquals(
error_message,
actual_error_message,
msg=f'\n {field}: error_message[{error}]'
)
actual_help_text = form.fields[field].help_text
self.assertEquals(
help_text,
actual_help_text,
msg=f'\n {field}: help_text'
)
actual_initial = form.fields[field].initial
self.assertEquals(
initial,
actual_initial,
msg=f'\n {field}: initial value'
)
actual_label = form.fields[field].label
self.assertEquals(
label,
actual_label,
msg=f'\n{field}: label'
)
actual_required = form.fields[field].required
self.assertEquals(
required,
actual_required,
msg=f'\n {field}: required'
)
def form_required_field_error_test(self, data={}, error_messages={}):
required_fields = []
Form = self.form()
for field in Form.fields:
if Form.fields[field].required is True:
required_fields.append(field)
for field, value in data.items():
if field in required_fields:
_data = {**data}
_data[field] = ''
form = self.form(data={**_data})
self.assertFalse(
form.is_valid(),
msg=f'\n Form should not be valid.\n {field} should be blank.\n data={_data}'
)
error = 'This field is required.'
if field in error_messages:
error = error_messages[field]
self.assertEqual(
form.errors[field],
[error],
msg=f'{field}'
)
def formset_error_test(self, formset, form_index=None, field=None, message=''):
formset.is_valid()
if form_index is None and field is None:
self.assertEqual(formset.non_form_errors(), [message])
if field is None:
self.assertEqual(formset[form_index].non_field_errors(), [message])
else:
self.assertEqual(formset[form_index].errors[field], [message])
def formset_test(self, baseformset=None, can_delete=False, extra=1, field_data={}, form=None, formset=None, initial=0, max_num=None, min_num=None, model=None, prefix='form', total=1, validate_max=False, validate_min=False):
form_data, test_model_instances = self.formset_filler(
field_data=field_data,
initial=initial,
model=model,
prefix=prefix,
total=total
)
test_formset = formset(form_data, prefix=prefix)
self.assertEqual(test_formset.extra, extra)
if baseformset is not None:
self.assertTrue(issubclass(formset, baseformset))
if form is not None:
self.assertTrue(issubclass(test_formset.form, form))
if max_num is not None:
self.assertEqual(test_formset.max_num, max_num)
if min_num is not None:
self.assertEqual(test_formset.min_num, min_num)
self.assertEqual(test_formset.can_delete, can_delete)
self.assertEqual(test_formset.prefix, prefix)
self.assertEqual(test_formset.validate_max, validate_max)
self.assertEqual(test_formset.validate_min, validate_min)
if test_formset.is_valid():
test_formset.save()
if model is not None:
self.instances_saved_test(model, test_model_instances, total)
else:
self.fail(
f'formset is not valid.\n{data}\n{test_formset.non_form_errors()}\n{test_formset.errors}'
) | [
1,
515,
869,
3188,
29918,
7270,
537,
3057,
8259,
1053,
22310,
537,
3057,
8259,
13,
13,
13,
1990,
3812,
3057,
8259,
29898,
7270,
537,
3057,
8259,
1125,
13,
268,
13,
1678,
822,
883,
29918,
2671,
29918,
1688,
29898,
1311,
29892,
1746,
29892,
1059,
29918,
19158,
3790,
1118,
1371,
29918,
726,
2433,
742,
2847,
29922,
8516,
29892,
3858,
2433,
742,
3734,
29922,
5574,
29892,
11109,
29918,
5552,
29879,
3790,
29913,
1125,
13,
4706,
883,
353,
1583,
29889,
689,
580,
13,
4706,
1018,
29901,
13,
9651,
883,
29889,
9621,
29961,
2671,
29962,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
12020,
8960,
29898,
29888,
12764,
29876,
259,
3812,
947,
451,
505,
1746,
29905,
29876,
29905,
29876,
259,
426,
2671,
29913,
1495,
13,
308,
13,
4706,
8676,
29918,
5552,
29879,
353,
5159,
13,
4706,
363,
12421,
29892,
3806,
297,
11109,
29918,
5552,
29879,
29889,
7076,
7295,
13,
9651,
1018,
29901,
13,
18884,
3935,
353,
883,
29889,
9621,
29961,
2671,
1822,
8030,
29889,
5552,
29879,
29961,
5552,
29962,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
8960,
29898,
13,
462,
1678,
285,
12764,
29876,
259,
426,
5552,
29913,
363,
883,
1746,
426,
2671,
29913,
756,
451,
1063,
731,
6169,
13,
18884,
1723,
13,
965,
13,
9651,
1583,
29889,
9294,
14776,
29898,
9684,
29892,
3935,
29892,
10191,
29922,
29888,
12764,
29876,
259,
426,
2671,
6177,
426,
5552,
29913,
1495,
13,
9651,
8676,
29918,
5552,
29879,
29889,
4397,
29898,
5552,
29897,
13,
632,
13,
4706,
363,
12421,
29892,
3935,
297,
883,
29889,
9621,
29961,
2671,
1822,
8030,
29889,
5552,
29879,
29889,
7076,
7295,
13,
9651,
565,
12421,
451,
297,
8676,
29918,
5552,
29879,
29901,
13,
18884,
12020,
8960,
29898,
29888,
12764,
29876,
29871,
426,
2671,
6177,
29912,
5552,
29913,
338,
731,
322,
881,
451,
367,
29889,
1495,
13,
308,
13,
4706,
565,
3734,
338,
5852,
322,
525,
12403,
29915,
451,
297,
1059,
29918,
19158,
29901,
13,
9651,
1059,
29918,
19158,
1839,
12403,
2033,
353,
525,
4013,
1746,
338,
3734,
6169,
13,
4706,
25342,
7431,
29898,
2704,
29918,
19158,
29897,
338,
451,
29871,
29900,
29901,
13,
9651,
363,
1059,
29892,
1059,
29918,
4906,
297,
1059,
29918,
19158,
29889,
7076,
7295,
13,
18884,
3935,
29918,
2704,
29918,
4906,
353,
883,
29889,
9621,
29961,
2671,
1822,
2704,
29918,
19158,
29961,
2704,
29962,
13,
632,
13,
9651,
1583,
29889,
9294,
14776,
29898,
13,
18884,
1059,
29918,
4906,
29892,
13,
18884,
3935,
29918,
2704,
29918,
4906,
29892,
13,
18884,
10191,
29922,
29888,
12764,
29876,
259,
426,
2671,
6177,
1059,
29918,
4906,
19660,
2704,
6525,
29915,
13,
9651,
1723,
13,
632,
13,
4706,
3935,
29918,
8477,
29918,
726,
353,
883,
29889,
9621,
29961,
2671,
1822,
8477,
29918,
726,
13,
4706,
1583,
29889,
9294,
14776,
29898,
13,
9651,
1371,
29918,
726,
29892,
13,
9651,
3935,
29918,
8477,
29918,
726,
29892,
13,
9651,
10191,
29922,
29888,
12764,
29876,
259,
426,
2671,
6177,
1371,
29918,
726,
29915,
13,
4706,
1723,
13,
632,
13,
4706,
3935,
29918,
11228,
353,
883,
29889,
9621,
29961,
2671,
1822,
11228,
13,
4706,
1583,
29889,
9294,
14776,
29898,
13,
9651,
2847,
29892,
13,
9651,
3935,
29918,
11228,
29892,
13,
9651,
10191,
29922,
29888,
12764,
29876,
259,
426,
2671,
6177,
2847,
995,
29915,
13,
4706,
1723,
13,
308,
13,
4706,
3935,
29918,
1643,
353,
883,
29889,
9621,
29961,
2671,
1822,
1643,
13,
4706,
1583,
29889,
9294,
14776,
29898,
13,
9651,
3858,
29892,
13,
9651,
3935,
29918,
1643,
29892,
13,
9651,
10191,
29922,
29888,
12764,
29876,
29912,
2671,
6177,
3858,
29915,
13,
4706,
1723,
13,
308,
13,
4706,
3935,
29918,
12403,
353,
883,
29889,
9621,
29961,
2671,
1822,
12403,
13,
4706,
1583,
29889,
9294,
14776,
29898,
13,
9651,
3734,
29892,
13,
9651,
3935,
29918,
12403,
29892,
13,
9651,
10191,
29922,
29888,
12764,
29876,
259,
426,
2671,
6177,
3734,
29915,
13,
4706,
1723,
13,
268,
13,
268,
13,
1678,
822,
883,
29918,
12403,
29918,
2671,
29918,
2704,
29918,
1688,
29898,
1311,
29892,
848,
3790,
1118,
1059,
29918,
19158,
3790,
29913,
1125,
13,
4706,
3734,
29918,
9621,
353,
5159,
13,
4706,
3812,
353,
1583,
29889,
689,
580,
13,
4706,
363,
1746,
297,
3812,
29889,
9621,
29901,
13,
9651,
565,
3812,
29889,
9621,
29961,
2671,
1822,
12403,
338,
5852,
29901,
13,
18884,
3734,
29918,
9621,
29889,
4397,
29898,
2671,
29897,
13,
13,
4706,
363,
1746,
29892,
995,
297,
848,
29889,
7076,
7295,
13,
9651,
565,
1746,
297,
3734,
29918,
9621,
29901,
13,
18884,
903,
1272,
353,
426,
1068,
1272,
29913,
13,
18884,
903,
1272,
29961,
2671,
29962,
353,
6629,
13,
18884,
883,
353,
1583,
29889,
689,
29898,
1272,
3790,
1068,
29918,
1272,
1800,
13,
632,
13,
18884,
1583,
29889,
9294,
8824,
29898,
13,
462,
1678,
883,
29889,
275,
29918,
3084,
3285,
13,
462,
1678,
10191,
29922,
29888,
12764,
29876,
259,
3812,
881,
451,
367,
2854,
7790,
29876,
259,
426,
2671,
29913,
881,
367,
9654,
7790,
29876,
259,
848,
3790,
29918,
1272,
10162,
13,
18884,
1723,
13,
18884,
1059,
353,
525,
4013,
1746,
338,
3734,
6169,
13,
18884,
565,
1746,
297,
1059,
29918,
19158,
29901,
13,
462,
1678,
1059,
353,
1059,
29918,
19158,
29961,
2671,
29962,
13,
18884,
1583,
29889,
9294,
9843,
29898,
13,
462,
1678,
883,
29889,
12523,
29961,
2671,
1402,
13,
462,
1678,
518,
2704,
1402,
13,
462,
1678,
10191,
29922,
29888,
29915,
29912,
2671,
10162,
13,
18884,
1723,
13,
268,
13,
268,
13,
1678,
822,
883,
842,
29918,
2704,
29918,
1688,
29898,
1311,
29892,
883,
842,
29892,
883,
29918,
2248,
29922,
8516,
29892,
1746,
29922,
8516,
29892,
2643,
2433,
29374,
13,
4706,
883,
842,
29889,
275,
29918,
3084,
580,
13,
4706,
565,
883,
29918,
2248,
338,
6213,
322,
1746,
338,
6213,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
689,
842,
29889,
5464,
29918,
689,
29918,
12523,
3285,
518,
4906,
2314,
13,
4706,
565,
1746,
338,
6213,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
689,
842,
29961,
689,
29918,
2248,
1822,
5464,
29918,
2671,
29918,
12523,
3285,
518,
4906,
2314,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
689,
842,
29961,
689,
29918,
2248,
1822,
12523,
29961,
2671,
1402,
518,
4906,
2314,
13,
268,
13,
268,
13,
1678,
822,
883,
842,
29918,
1688,
29898,
1311,
29892,
2967,
689,
842,
29922,
8516,
29892,
508,
29918,
8143,
29922,
8824,
29892,
4805,
29922,
29896,
29892,
1746,
29918,
1272,
3790,
1118,
883,
29922,
8516,
29892,
883,
842,
29922,
8516,
29892,
2847,
29922,
29900,
29892,
4236,
29918,
1949,
29922,
8516,
29892,
1375,
29918,
1949,
29922,
8516,
29892,
1904,
29922,
8516,
29892,
10944,
2433,
689,
742,
3001,
29922,
29896,
29892,
12725,
29918,
3317,
29922,
8824,
29892,
12725,
29918,
1195,
29922,
8824,
1125,
13,
4706,
883,
29918,
1272,
29892,
1243,
29918,
4299,
29918,
2611,
2925,
353,
1583,
29889,
689,
842,
29918,
29888,
5495,
29898,
13,
9651,
1746,
29918,
1272,
29922,
2671,
29918,
1272,
29892,
13,
9651,
2847,
29922,
11228,
29892,
13,
9651,
1904,
29922,
4299,
29892,
13,
9651,
10944,
29922,
13506,
29892,
13,
9651,
3001,
29922,
7827,
13,
4706,
1723,
13,
4706,
1243,
29918,
689,
842,
353,
883,
842,
29898,
689,
29918,
1272,
29892,
10944,
29922,
13506,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
17833,
29892,
4805,
29897,
13,
308,
13,
4706,
565,
2967,
689,
842,
338,
451,
6213,
29901,
13,
3986,
1583,
29889,
9294,
5574,
29898,
790,
431,
1990,
29898,
689,
842,
29892,
2967,
689,
842,
876,
13,
308,
13,
4706,
565,
883,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
9294,
5574,
29898,
790,
431,
1990,
29898,
1688,
29918,
689,
842,
29889,
689,
29892,
883,
876,
13,
308,
13,
4706,
565,
4236,
29918,
1949,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
3317,
29918,
1949,
29892,
4236,
29918,
1949,
29897,
13,
308,
13,
4706,
565,
1375,
29918,
1949,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
1195,
29918,
1949,
29892,
1375,
29918,
1949,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
3068,
29918,
8143,
29892,
508,
29918,
8143,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
13506,
29892,
10944,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
15480,
29918,
3317,
29892,
12725,
29918,
3317,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1688,
29918,
689,
842,
29889,
15480,
29918,
1195,
29892,
12725,
29918,
1195,
29897,
13,
4706,
565,
1243,
29918,
689,
842,
29889,
275,
29918,
3084,
7295,
13,
9651,
1243,
29918,
689,
842,
29889,
7620,
580,
13,
9651,
565,
1904,
338,
451,
6213,
29901,
13,
18884,
1583,
29889,
2611,
2925,
29918,
17314,
29918,
1688,
29898,
4299,
29892,
1243,
29918,
4299,
29918,
2611,
2925,
29892,
3001,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
14057,
29898,
13,
18884,
285,
29915,
689,
842,
338,
451,
2854,
7790,
29876,
29912,
1272,
1012,
29876,
29912,
1688,
29918,
689,
842,
29889,
5464,
29918,
689,
29918,
12523,
580,
1012,
29876,
29912,
1688,
29918,
689,
842,
29889,
12523,
10162,
13,
9651,
1723,
2
] |
Exercicios/desafio10_convertermoeda.py | lbarrosandre/Resolucao-Desafios-Python | 0 | 115790 | carteira = float(input('Quantos reais tenho na carteira: '))
x = carteira/3.27
print('Tenho R$ {} na minha carteira e consigo comprar $ {:.2f} dollares'.format(carteira, x))
| [
1,
20206,
3055,
353,
5785,
29898,
2080,
877,
22930,
359,
337,
1759,
3006,
1251,
1055,
20206,
3055,
29901,
525,
876,
13,
29916,
353,
20206,
3055,
29914,
29941,
29889,
29906,
29955,
13,
2158,
877,
29911,
264,
1251,
390,
29938,
6571,
1055,
1375,
2350,
20206,
3055,
321,
1136,
5973,
7199,
279,
395,
12365,
29889,
29906,
29888,
29913,
11232,
5114,
4286,
4830,
29898,
4287,
371,
3055,
29892,
921,
876,
13,
2
] |
wavenetlike/examples/analyzer_example.py | redwrasse/wavenetlike | 0 | 24133 | <reponame>redwrasse/wavenetlike
from wavenetlike.analyzers import DatasetAnalyzer
from wavenetlike.datasetid import TorchAudioDataSetId
def analyzer_example():
dataset = TorchAudioDataSetId("SPEECHCOMMANDS")
data_analyzer = DatasetAnalyzer(dataset)
data_analyzer.analyze_dataset()
analysis_res = data_analyzer.get_analysis_result()
print(analysis_res)
if __name__ == "__main__":
analyzer_example()
| [
1,
529,
276,
1112,
420,
29958,
1127,
29893,
3417,
344,
29914,
29893,
3496,
300,
4561,
13,
3166,
281,
3496,
300,
4561,
29889,
7054,
12339,
414,
1053,
13373,
24541,
2744,
14997,
3298,
13,
3166,
281,
3496,
300,
4561,
29889,
24713,
333,
1053,
4794,
305,
17111,
28449,
1204,
13,
13,
13,
1753,
16455,
3298,
29918,
4773,
7295,
13,
1678,
8783,
353,
4794,
305,
17111,
28449,
1204,
703,
29903,
4162,
29923,
3210,
19795,
1529,
2797,
29903,
1159,
13,
1678,
848,
29918,
24209,
3298,
353,
13373,
24541,
2744,
14997,
3298,
29898,
24713,
29897,
13,
1678,
848,
29918,
24209,
3298,
29889,
24209,
911,
29918,
24713,
580,
13,
1678,
7418,
29918,
690,
353,
848,
29918,
24209,
3298,
29889,
657,
29918,
15916,
29918,
2914,
580,
13,
1678,
1596,
29898,
15916,
29918,
690,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
16455,
3298,
29918,
4773,
580,
13,
2
] |
mmpose/core/optimizer/builder.py | vsatyakumar/mmpose | 1 | 5137 | <reponame>vsatyakumar/mmpose
from mmcv.runner import build_optimizer
def build_optimizers(model, cfgs):
"""Build multiple optimizers from configs.
If `cfgs` contains several dicts for optimizers, then a dict for each
constructed optimizers will be returned.
If `cfgs` only contains one optimizer config, the constructed optimizer
itself will be returned.
For example,
1) Multiple optimizer configs:
.. code-block:: python
optimizer_cfg = dict(
model1=dict(type='SGD', lr=lr),
model2=dict(type='SGD', lr=lr))
The return dict is
``dict('model1': torch.optim.Optimizer, 'model2': torch.optim.Optimizer)``
2) Single optimizer config:
.. code-block:: python
optimizer_cfg = dict(type='SGD', lr=lr)
The return is ``torch.optim.Optimizer``.
Args:
model (:obj:`nn.Module`): The model with parameters to be optimized.
cfgs (dict): The config dict of the optimizer.
Returns:
dict[:obj:`torch.optim.Optimizer`] | :obj:`torch.optim.Optimizer`:
The initialized optimizers.
"""
optimizers = {}
if hasattr(model, 'module'):
model = model.module
# determine whether 'cfgs' has several dicts for optimizers
if all(isinstance(v, dict) for v in cfgs.values()):
for key, cfg in cfgs.items():
cfg_ = cfg.copy()
module = getattr(model, key)
optimizers[key] = build_optimizer(module, cfg_)
return optimizers
else:
return build_optimizer(model, cfgs)
| [
1,
529,
276,
1112,
420,
29958,
4270,
11156,
557,
24540,
29914,
29885,
1526,
852,
13,
3166,
5654,
11023,
29889,
27492,
1053,
2048,
29918,
20640,
3950,
13,
13,
13,
1753,
2048,
29918,
20640,
19427,
29898,
4299,
29892,
274,
29888,
3174,
1125,
13,
1678,
9995,
8893,
2999,
5994,
19427,
515,
2295,
29879,
29889,
13,
13,
1678,
960,
421,
6854,
3174,
29952,
3743,
3196,
9657,
29879,
363,
5994,
19427,
29892,
769,
263,
9657,
363,
1269,
13,
1678,
13319,
5994,
19427,
674,
367,
4133,
29889,
13,
1678,
960,
421,
6854,
3174,
29952,
871,
3743,
697,
5994,
3950,
2295,
29892,
278,
13319,
5994,
3950,
13,
1678,
3528,
674,
367,
4133,
29889,
13,
13,
1678,
1152,
1342,
29892,
13,
13,
268,
29896,
29897,
26905,
5994,
3950,
2295,
29879,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
3017,
13,
13,
4706,
5994,
3950,
29918,
16859,
353,
9657,
29898,
13,
9651,
1904,
29896,
29922,
8977,
29898,
1853,
2433,
26016,
29928,
742,
301,
29878,
29922,
29212,
511,
13,
9651,
1904,
29906,
29922,
8977,
29898,
1853,
2433,
26016,
29928,
742,
301,
29878,
29922,
29212,
876,
13,
13,
1678,
450,
736,
9657,
338,
13,
1678,
4954,
8977,
877,
4299,
29896,
2396,
4842,
305,
29889,
20640,
29889,
20624,
326,
3950,
29892,
525,
4299,
29906,
2396,
4842,
305,
29889,
20640,
29889,
20624,
326,
3950,
3569,
29952,
13,
13,
268,
29906,
29897,
16740,
5994,
3950,
2295,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
3017,
13,
13,
4706,
5994,
3950,
29918,
16859,
353,
9657,
29898,
1853,
2433,
26016,
29928,
742,
301,
29878,
29922,
29212,
29897,
13,
13,
1678,
450,
736,
338,
4954,
7345,
305,
29889,
20640,
29889,
20624,
326,
3950,
29952,
1412,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
1904,
13940,
5415,
18078,
15755,
29889,
7355,
29952,
1125,
450,
1904,
411,
4128,
304,
367,
27545,
29889,
13,
4706,
274,
29888,
3174,
313,
8977,
1125,
450,
2295,
9657,
310,
278,
5994,
3950,
29889,
13,
13,
1678,
16969,
29901,
13,
4706,
9657,
7503,
5415,
18078,
7345,
305,
29889,
20640,
29889,
20624,
326,
3950,
29952,
29962,
891,
584,
5415,
18078,
7345,
305,
29889,
20640,
29889,
20624,
326,
3950,
6998,
13,
9651,
450,
16601,
5994,
19427,
29889,
13,
1678,
9995,
13,
1678,
5994,
19427,
353,
6571,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
5453,
29374,
13,
4706,
1904,
353,
1904,
29889,
5453,
13,
1678,
396,
8161,
3692,
525,
6854,
3174,
29915,
756,
3196,
9657,
29879,
363,
5994,
19427,
13,
1678,
565,
599,
29898,
275,
8758,
29898,
29894,
29892,
9657,
29897,
363,
325,
297,
274,
29888,
3174,
29889,
5975,
580,
1125,
13,
4706,
363,
1820,
29892,
274,
16434,
297,
274,
29888,
3174,
29889,
7076,
7295,
13,
9651,
274,
16434,
29918,
353,
274,
16434,
29889,
8552,
580,
13,
9651,
3883,
353,
679,
5552,
29898,
4299,
29892,
1820,
29897,
13,
9651,
5994,
19427,
29961,
1989,
29962,
353,
2048,
29918,
20640,
3950,
29898,
5453,
29892,
274,
16434,
19925,
13,
4706,
736,
5994,
19427,
13,
1678,
1683,
29901,
13,
4706,
736,
2048,
29918,
20640,
3950,
29898,
4299,
29892,
274,
29888,
3174,
29897,
13,
2
] |
__Courses__/Python - Introduction to Python Programming - Udacity/C3. Control Flow/{Q}[Zip] Transpose with Zip.py | JUD210/Study-Note | 0 | 59038 | <gh_stars>0
"""
Use zip to transpose data from a 4-by-3 matrix to a 3-by-4 matrix. There's actually a cool trick for this! Feel free to look at the solutions if you can't figure it out.
"""
data = ((0, 1, 2), (3, 4, 5), (6, 7, 8), (9, 10, 11))
# 0 1 2
# 3 4 5
# 6 7 8
# 9 10 11
#
# Transpose : [data]^T
#
# 0 3 6 9
# 1 4 7 10
# 2 5 8 11
data_transpose = tuple(zip(*data))
print(data)
print(data_transpose)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
11403,
14319,
304,
1301,
4220,
848,
515,
263,
29871,
29946,
29899,
1609,
29899,
29941,
4636,
304,
263,
29871,
29941,
29899,
1609,
29899,
29946,
4636,
29889,
1670,
29915,
29879,
2869,
263,
12528,
8938,
363,
445,
29991,
5169,
295,
3889,
304,
1106,
472,
278,
6851,
565,
366,
508,
29915,
29873,
4377,
372,
714,
29889,
13,
15945,
29908,
13,
13,
1272,
353,
5135,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
511,
313,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
511,
313,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
511,
313,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
876,
13,
29937,
29871,
29900,
259,
29896,
259,
29906,
13,
29937,
29871,
29941,
259,
29946,
259,
29945,
13,
29937,
29871,
29953,
259,
29955,
259,
29947,
13,
29937,
29871,
29929,
259,
29896,
29900,
29871,
29896,
29896,
13,
29937,
13,
29937,
4103,
4220,
584,
518,
1272,
29962,
29985,
29911,
13,
29937,
13,
29937,
29871,
29900,
259,
29941,
259,
29953,
259,
29929,
13,
29937,
29871,
29896,
259,
29946,
259,
29955,
259,
29896,
29900,
13,
29937,
29871,
29906,
259,
29945,
259,
29947,
259,
29896,
29896,
13,
13,
1272,
29918,
3286,
4220,
353,
18761,
29898,
7554,
10456,
1272,
876,
13,
2158,
29898,
1272,
29897,
13,
2158,
29898,
1272,
29918,
3286,
4220,
29897,
13,
2
] |
python/dbSchemaReplicationLineage.py | sagopal2019/REST-API-Samples | 0 | 151561 | <reponame>sagopal2019/REST-API-Samples
'''
Created on Jun 26, 2018
@author: dwrigley
**************************************************************************************************
DB schema replication custom lineage generator
process:-
scenario: the tables in 2 different schemas (perhaps in different databases/resources) are replicated
in EDC - we have no way to automatically know that there is lineage between the schema contents (tables & columns)
this utility will generate the custom lineage import to create the links
given two schemas - leftSchema and rightSchema
find the 2 schemas objects in the catalog (GET /2/catalog/data/objects)
for each schema
execute /2/catalog/data/relationships (2 levels schema->table->column)
for each table & column - store the id & name (names converted to lower-case for case-insensitive match)
for the stored objects (tables/columns) left side...
find the same table/column in the right side
if found - write a custom lineage link to csv
Note: the custom lineage format used is:-
Association,From Connection,To Connection,From Object,To Object
where: From Connection and To Connection will be empty
Assocition will be either core.DirectionalDataFlow or core.DataSetDataFlow
the From and To Object will be the full object id
when importing - there is no need for auto connection assignment, since the full id's are provided this happens automatically
this is possible using v10.2.0 with a patch, and works native in v10.2.1+
'''
import platform
import json
import requests
from requests.auth import HTTPBasicAuth
import csv
import edcutils
import time
#***********************************************************************
# change these settings
#***********************************************************************
leftResource = 'ot_oracle'
leftSchema = 'OT'
leftSchemaType = 'com.infa.ldm.relational.Schema'
rightSchema = 'landing'
rightResource = 'landing_hive'
rightSchemaType = 'com.infa.ldm.relational.Schema'
# rightTablePrefix - for cases where the replicated tables have a prefix added (e.g. employee on left ot_employee on right)
rightTablePrefix = ''
#Note: for SAP Hana DB - schema type is different: com.infa.ldm.extended.saphanadatabase.Schema
catalogServer='http://napslxapp01:9085'
uid='Administrator'
pwd='<PASSWORD>'
'''
# if using base64 encoded credentials - you don't need uid/pwd
# you can just use authCredentials- with the correct value
# comment lines with uid/pwd and uncomment the same line using only header (references to authCredentials)
'''
#authCredentials="<KEY>"
# format the csv file name for custom lineage
csvPrefix="schemaLineage"
csvFolder="out"
#***********************************************************************
# end of settings that should be changed
#***********************************************************************
# set the csv fileName
csvFileName = csvFolder + "/" + csvPrefix + "_" + leftSchema.lower() + "_" + rightSchema.lower() + ".csv"
# function - process a single schema - get columns into memory (dict)
def getSchemaContents(schemaName, schemaType, resourceName):
"""
given a schema name, schema class type (e.g. hanadb is different) and resource name
find the schema object
then
execute a relationships call to get the schema tables & columns (parent/child links)
note: some models separate primary key columns from regular columns
note: some models have different relationships (e.g. sap hana db)
returns a dictionary of all tables & columns for the schema & the id of the schema object
key=table val=tableid
key=table.column val=columnid
"""
print('\tgetSchemaContents for:' + schemaName+ " resource=" + resourceName)
# schemaDict returned key=TABLE.COLUMN value=column id
schemaDict = {}
tableNames = {}
url = catalogServer + '/access/2/catalog/data/objects'
query = "core.resourceName:" + resourceName + " and core.classType:" + schemaType + " and core.name_lc_exact:" + schemaName
parameters = {'q': query, 'offset': 0, 'pageSize': 1}
# header using uid/pwd (no Authorization)
header = {"Accept": "application/json"}
# header using Authorization - no need to use uid/pwd in the get call
#header = {"Accept": "application/json", "Authorization": authCredentials}
print("\tquery=" + query)
#print("\theader=" + str(header))
schemaId = None
tableCount = 0
columnCount = 0
# make the call to find the schema object
response = requests.get(url,params=parameters,headers=header, auth=HTTPBasicAuth(uid,pwd))
#response = requests.get(url,params=parameters,headers=header)
rc = response.status_code
if rc!=200:
print ("error reading object: rc=" + str(rc) + " response:" + str(response.json) )
if rc==401:
print("\t401:Possible Missing/bad credentials - or server not found/responding")
print(str(response))
return
# get the total # of objects returned (first part of the json resultset)
totalObjects=response.json()['metadata']['totalCount']
print("\tobjects returned: " + str(totalObjects) )
for item in response.json()['items']:
schemaId=item["id"]
schemaName = edcutils.getFactValue(item, 'core.name')
# get the tables & columns
print ("\tfound schema: " + schemaName + " id=" + schemaId)
lineageURL=catalogServer + '/access/2/catalog/data/relationships'
lineageParms={"seed": schemaId
, "association": "core.ParentChild"
, "depth": "2"
, "direction": "OUT"
, "includeAttribute": {'core.name', 'core.classType'}
, "includeTerms": "false"
, "removeDuplicateAggregateLinks": "false"
}
print("\tGET child rels for schema: " + lineageURL + " parms=" + str(lineageParms) )
# get using uid/pwd
lineageResp = requests.get(lineageURL,params=lineageParms,headers=header, auth=HTTPBasicAuth(uid,pwd))
# credentials are in the header
#lineageResp = requests.get(lineageURL,params=lineageParms,headers=header)
lineageStatus = lineageResp.status_code
print("\tlineage resp=" + str(lineageStatus))
if lineageStatus != 200:
print ("error getting schema contents (tables) rc=" + str(rc) + " response:" + str(response.json) )
if rc==401:
print("\t401:Possible Missing/bad credentials - or server not found/responding")
print(str(response))
return
if lineageResp.text.startswith('{items:'):
# bug (10.2.0 & 10.2.1) - the items collection should be "items"
lineageJson = lineageResp.text.replace('items', '"items"', 1)
else:
lineageJson = lineageResp.text
#relsJson = json.loads(lineageJson.replace('items', '"items"'))
relsJson = json.loads(lineageJson)
#print(len(relsJson))
for lineageItem in relsJson["items"]:
#print('\t\t' + str(lineageItem))
inId = lineageItem.get("inId")
outId = lineageItem.get("outId")
#print('new inId===' + inId + " outId=" + outId)
#print(edcutils.getFactValue(lineageItem["inEmbedded"], "core.name"))
assocId = lineageItem.get("associationId")
#print("\t\t" + inId + " assoc=" + assocId)
#if assocId=='com.infa.ldm.relational.SchemaTable':
if assocId.endswith('.SchemaTable'):
# note - custom lineage does not need table and column - count the tables & store table names
tableCount += 1
#tableName = inId.split('/')[-1]
tableName = edcutils.getFactValue(lineageItem["inEmbedded"], "core.name").lower()
# store the table name (for lookup when processing the columns) key-id, val=name
tableNames[inId] = tableName
schemaDict[tableName]=inId
#if assocId=='com.infa.ldm.relational.TableColumn':
if assocId.endswith('.TableColumn') or assocId.endswith(".TablePrimaryKeyColumn"):
#columnName = inId.split('/')[-1]
columnCount += 1
columnName = edcutils.getFactValue(lineageItem["inEmbedded"], "core.name").lower()
tableName = tableNames[outId].lower()
#print("column=" + tableName + "." + columnName)
schemaDict[tableName+"."+columnName] = inId
print("\tgetSchema: returning " + str(columnCount) + " columns, in " + str(tableCount) + " tables")
return schemaDict, schemaId
def main():
"""
initialise the csv file(s) to write
call getSchemaContents for both left and right schema objects
match the tables/columns from the left schema to the right
when matched
write a lineage link - table and column level
Note: this script generates the newer lineage format using complete object id's and relationship types
connection assignment will not be necessary
works with v10.2.1+
"""
start_time = time.time()
print ("dbSchemaReplicationLineage:start")
print ("Catalog=" + catalogServer)
print ("left: resource=" + leftResource)
print ("left: schema=" + leftSchema)
print ("right: resource=" + rightResource)
print ("right: schema=" + rightSchema)
# initialize csv output file
columnHeader=["Association","From Connection","To Connection","From Object","To Object"]
# python 3 & 2.7 use different methods
print("initializing file: " + csvFileName)
if str(platform.python_version()).startswith("2.7"):
fCSVFile = open(csvFileName,"w")
else:
fCSVFile = open(csvFileName,"w", newline='', encoding='utf-8')
colWriter=csv.writer(fCSVFile)
colWriter.writerow(columnHeader)
# get the objects from the left schema into memory
print("get left schema: name=" + leftSchema + " resource=" + leftResource + " type=" + leftSchemaType)
leftObjects, leftSchemaId = getSchemaContents(leftSchema, leftSchemaType, leftResource)
# get the objects from the right schema into memory
print("get left schema: name=" + rightSchema + " resource=" + rightResource + " type=" + rightSchemaType)
rightObjects, rightSchemaId = getSchemaContents(rightSchema, rightSchemaType, rightResource)
matches=0
missing=0
if len(leftObjects) > 0 and len(rightObjects) > 0:
# create the lineage file
colWriter.writerow(["core.DataSourceDataFlow","","",leftSchemaId,rightSchemaId])
# iterate over all left objects - looking for matching right ones
print("\nprocessing: " + str(len(leftObjects)) + " objects (left side)")
for leftName, leftVal in leftObjects.items():
# if the target is using a prefix - add it to leftName
if len(rightTablePrefix)>0:
leftName = rightTablePrefix.lower() + leftName
#print("key=" + leftName + " " + leftVal + " " + str(leftName.count('.')))
if (leftName in rightObjects.keys()):
# match
rightVal = rightObjects.get(leftName)
matches += 1
#print("\t" + rightVal)
# check if it is formatted as table.column or just table
if leftName.count('.') == 1:
# column lineage - using DirectionalDataFlow
colWriter.writerow(["core.DirectionalDataFlow","","",leftVal,rightVal])
else:
# table level - using core.DataSetDataFlow
colWriter.writerow(["core.DataSetDataFlow","","",leftVal,rightVal])
# write a line to the custom lineage csv file (connection assignment)
#colWriter.writerow([leftResource,rightResource,leftRef,rightRef])
else:
missing += 1
print("\t no match on right side for key=" + leftName)
else:
print("error getting schema info... - no linking/lineage created")
print ("dbSchemaLineageGen:finished. " + str(matches) + " links created, " + str(missing) + " missing (found in left, no match on right)")
print("run time = %s seconds ---" % (time.time() - start_time))
fCSVFile.close()
# call main - if not already called or used by another script
if __name__== "__main__":
main()
| [
1,
529,
276,
1112,
420,
29958,
29879,
351,
459,
284,
29906,
29900,
29896,
29929,
29914,
1525,
1254,
29899,
8787,
29899,
29903,
9422,
13,
12008,
13,
20399,
373,
8378,
29871,
29906,
29953,
29892,
29871,
29906,
29900,
29896,
29947,
13,
13,
29992,
8921,
29901,
11988,
8966,
2330,
13,
7775,
7775,
7775,
7775,
7775,
7775,
1068,
13,
4051,
10938,
1634,
1414,
2888,
1196,
482,
15299,
13,
13,
5014,
13018,
13,
1678,
10483,
29901,
29871,
278,
6131,
297,
29871,
29906,
1422,
1364,
8609,
313,
546,
4252,
297,
1422,
21218,
29914,
13237,
29897,
526,
1634,
9169,
13,
1678,
297,
9408,
29907,
448,
591,
505,
694,
982,
304,
6336,
1073,
393,
727,
338,
1196,
482,
1546,
278,
10938,
8118,
313,
24051,
669,
4341,
29897,
13,
1678,
445,
19725,
674,
5706,
278,
2888,
1196,
482,
1053,
304,
1653,
278,
2988,
13,
268,
13,
1678,
2183,
1023,
1364,
8609,
448,
2175,
12763,
322,
1492,
12763,
13,
1678,
1284,
278,
29871,
29906,
1364,
8609,
3618,
297,
278,
16653,
313,
7194,
847,
29906,
29914,
28045,
29914,
1272,
29914,
12650,
29897,
13,
268,
13,
1678,
363,
1269,
10938,
13,
4706,
6222,
847,
29906,
29914,
28045,
29914,
1272,
29914,
2674,
800,
14587,
313,
29906,
11174,
10938,
976,
2371,
976,
4914,
29897,
13,
9651,
363,
1269,
1591,
669,
1897,
448,
3787,
278,
1178,
669,
1024,
313,
7039,
11543,
304,
5224,
29899,
4878,
363,
1206,
29899,
1144,
575,
3321,
1993,
29897,
13,
632,
13,
1678,
363,
278,
6087,
3618,
313,
24051,
29914,
13099,
29897,
2175,
2625,
856,
13,
4706,
1284,
278,
1021,
1591,
29914,
4914,
297,
278,
1492,
2625,
13,
4706,
565,
1476,
448,
2436,
263,
2888,
1196,
482,
1544,
304,
11799,
13,
308,
13,
1678,
3940,
29901,
29871,
278,
2888,
1196,
482,
3402,
1304,
338,
13018,
13,
4706,
7993,
29892,
4591,
15160,
29892,
1762,
15160,
29892,
4591,
4669,
29892,
1762,
4669,
13,
308,
13,
4706,
988,
29901,
29871,
3645,
15160,
322,
1763,
15160,
674,
367,
4069,
13,
18884,
4007,
542,
654,
674,
367,
2845,
7136,
29889,
21602,
284,
1469,
17907,
470,
7136,
29889,
28449,
1469,
17907,
13,
18884,
278,
3645,
322,
1763,
4669,
674,
367,
278,
2989,
1203,
1178,
13,
462,
13,
4706,
746,
28348,
448,
727,
338,
694,
817,
363,
4469,
3957,
12827,
29892,
1951,
278,
2989,
1178,
29915,
29879,
526,
4944,
445,
5930,
6336,
13,
4706,
445,
338,
1950,
773,
325,
29896,
29900,
29889,
29906,
29889,
29900,
411,
263,
13261,
29892,
322,
1736,
7531,
297,
325,
29896,
29900,
29889,
29906,
29889,
29896,
29974,
13,
308,
13,
12008,
13,
13,
5215,
7481,
13,
5215,
4390,
13,
5215,
7274,
13,
3166,
7274,
29889,
5150,
1053,
7331,
16616,
6444,
13,
5215,
11799,
13,
5215,
1226,
7582,
2719,
13,
5215,
931,
13,
13,
29937,
7775,
7775,
7775,
7775,
2328,
17435,
13,
29937,
1735,
1438,
6055,
13,
29937,
7775,
7775,
7775,
7775,
2328,
17435,
13,
1563,
6848,
353,
525,
327,
29918,
11347,
29915,
13,
1563,
12763,
353,
525,
2891,
29915,
13,
1563,
12763,
1542,
353,
525,
510,
29889,
262,
5444,
29889,
430,
29885,
29889,
2674,
1288,
29889,
12763,
29915,
13,
13,
1266,
12763,
353,
525,
1049,
292,
29915,
13,
1266,
6848,
353,
525,
1049,
292,
29918,
29882,
573,
29915,
13,
1266,
12763,
1542,
353,
525,
510,
29889,
262,
5444,
29889,
430,
29885,
29889,
2674,
1288,
29889,
12763,
29915,
13,
29937,
1492,
3562,
23095,
448,
363,
4251,
988,
278,
1634,
9169,
6131,
505,
263,
10944,
2715,
313,
29872,
29889,
29887,
29889,
19001,
373,
2175,
4932,
29918,
26143,
373,
1492,
29897,
13,
1266,
3562,
23095,
353,
6629,
13,
29937,
9842,
29901,
363,
317,
3301,
379,
1648,
6535,
448,
10938,
1134,
338,
1422,
29901,
29871,
419,
29889,
262,
5444,
29889,
430,
29885,
29889,
1062,
2760,
29889,
29879,
481,
5403,
328,
3223,
29889,
12763,
13,
13,
28045,
6004,
2433,
1124,
597,
8971,
2536,
29916,
932,
29900,
29896,
29901,
29929,
29900,
29947,
29945,
29915,
13,
5416,
2433,
12754,
2132,
1061,
29915,
13,
29886,
9970,
2433,
29966,
25711,
17013,
16299,
13,
12008,
13,
29937,
565,
773,
2967,
29953,
29946,
18511,
16140,
448,
366,
1016,
29915,
29873,
817,
318,
333,
29914,
29886,
9970,
13,
29937,
366,
508,
925,
671,
4817,
28037,
29899,
411,
278,
1959,
995,
13,
29937,
3440,
3454,
411,
318,
333,
29914,
29886,
9970,
322,
443,
9342,
278,
1021,
1196,
773,
871,
4839,
313,
276,
10662,
304,
4817,
28037,
29897,
13,
12008,
13,
29937,
5150,
28037,
543,
29966,
10818,
11903,
13,
13,
29937,
3402,
278,
11799,
934,
1024,
363,
2888,
1196,
482,
13,
7638,
23095,
543,
11010,
3542,
482,
29908,
13,
7638,
12924,
543,
449,
29908,
13,
29937,
7775,
7775,
7775,
7775,
2328,
17435,
13,
29937,
1095,
310,
6055,
393,
881,
367,
3939,
29871,
13,
29937,
7775,
7775,
7775,
7775,
2328,
17435,
13,
13,
29937,
731,
278,
11799,
29729,
13,
7638,
17020,
353,
11799,
12924,
718,
5591,
29908,
718,
11799,
23095,
718,
11119,
29908,
718,
2175,
12763,
29889,
13609,
580,
718,
11119,
29908,
718,
1492,
12763,
29889,
13609,
580,
29871,
718,
11393,
7638,
29908,
13,
13,
13,
29937,
740,
448,
1889,
263,
2323,
10938,
448,
679,
4341,
964,
3370,
313,
8977,
29897,
13,
1753,
679,
12763,
21002,
29898,
11010,
1170,
29892,
10938,
1542,
29892,
6503,
1170,
1125,
13,
1678,
9995,
13,
1678,
2183,
263,
10938,
1024,
29892,
10938,
770,
1134,
313,
29872,
29889,
29887,
29889,
5905,
328,
29890,
338,
1422,
29897,
322,
6503,
1024,
13,
1678,
1284,
278,
10938,
1203,
13,
1678,
769,
13,
4706,
6222,
263,
21702,
1246,
304,
679,
278,
10938,
6131,
669,
4341,
313,
3560,
29914,
5145,
2988,
29897,
13,
4706,
4443,
29901,
29871,
777,
4733,
5004,
7601,
1820,
4341,
515,
4943,
4341,
13,
4706,
4443,
29901,
29871,
777,
4733,
505,
1422,
21702,
313,
29872,
29889,
29887,
29889,
21672,
298,
1648,
4833,
29897,
13,
308,
13,
1678,
3639,
263,
8600,
310,
599,
6131,
669,
4341,
363,
278,
10938,
669,
278,
1178,
310,
278,
10938,
1203,
13,
1678,
1820,
29922,
2371,
29871,
659,
29922,
2371,
333,
13,
1678,
1820,
29922,
2371,
29889,
4914,
29871,
659,
29922,
4914,
333,
13,
1678,
9995,
13,
1678,
1596,
28909,
29873,
657,
12763,
21002,
363,
11283,
718,
10938,
1170,
29974,
376,
6503,
543,
718,
6503,
1170,
29897,
13,
1678,
396,
10938,
21533,
4133,
29871,
1820,
29922,
21009,
29889,
15032,
29127,
995,
29922,
4914,
1178,
13,
1678,
10938,
21533,
353,
6571,
13,
1678,
1591,
8659,
353,
6571,
13,
268,
13,
1678,
3142,
353,
16653,
6004,
718,
8207,
5943,
29914,
29906,
29914,
28045,
29914,
1272,
29914,
12650,
29915,
13,
1678,
2346,
353,
376,
3221,
29889,
10314,
1170,
6160,
718,
6503,
1170,
718,
376,
322,
7136,
29889,
1990,
1542,
6160,
718,
10938,
1542,
718,
376,
322,
7136,
29889,
978,
29918,
29880,
29883,
29918,
735,
627,
6160,
718,
10938,
1170,
13,
1678,
4128,
353,
11117,
29939,
2396,
2346,
29892,
525,
10289,
2396,
29871,
29900,
29892,
525,
3488,
3505,
2396,
29871,
29896,
29913,
13,
1678,
396,
4839,
773,
318,
333,
29914,
29886,
9970,
313,
1217,
13361,
2133,
29897,
13,
1678,
4839,
353,
8853,
23965,
1115,
376,
6214,
29914,
3126,
9092,
13,
1678,
396,
4839,
773,
13361,
2133,
448,
694,
817,
304,
671,
318,
333,
29914,
29886,
9970,
297,
278,
679,
1246,
13,
1678,
396,
6672,
353,
8853,
23965,
1115,
376,
6214,
29914,
3126,
613,
376,
25471,
1115,
4817,
28037,
29913,
13,
268,
13,
1678,
1596,
14182,
29873,
1972,
543,
718,
2346,
29897,
13,
1678,
396,
2158,
14182,
1552,
1664,
543,
718,
851,
29898,
6672,
876,
13,
268,
13,
1678,
10938,
1204,
353,
6213,
13,
1678,
1591,
3981,
353,
29871,
29900,
13,
1678,
1897,
3981,
353,
29871,
29900,
13,
1678,
396,
1207,
278,
1246,
304,
1284,
278,
10938,
1203,
13,
1678,
2933,
353,
7274,
29889,
657,
29898,
2271,
29892,
7529,
29922,
16744,
29892,
13662,
29922,
6672,
29892,
4817,
29922,
10493,
16616,
6444,
29898,
5416,
29892,
29886,
9970,
876,
13,
1678,
396,
5327,
353,
7274,
29889,
657,
29898,
2271,
29892,
7529,
29922,
16744,
29892,
13662,
29922,
6672,
29897,
13,
1678,
364,
29883,
353,
2933,
29889,
4882,
29918,
401,
13,
1678,
565,
364,
29883,
19216,
29906,
29900,
29900,
29901,
13,
4706,
1596,
4852,
2704,
5183,
1203,
29901,
364,
29883,
543,
718,
851,
29898,
2214,
29897,
718,
376,
2933,
6160,
718,
851,
29898,
5327,
29889,
3126,
29897,
1723,
29871,
13,
4706,
565,
364,
29883,
1360,
29946,
29900,
29896,
29901,
13,
9651,
1596,
14182,
29873,
29946,
29900,
29896,
29901,
9135,
1687,
4750,
292,
29914,
12313,
16140,
448,
470,
1923,
451,
1476,
29914,
3636,
292,
1159,
13,
9651,
1596,
29898,
710,
29898,
5327,
876,
13,
4706,
736,
13,
13,
1678,
396,
679,
278,
3001,
396,
310,
3618,
4133,
313,
4102,
760,
310,
278,
4390,
1121,
842,
29897,
13,
1678,
3001,
12724,
29922,
5327,
29889,
3126,
580,
1839,
19635,
16215,
7827,
3981,
2033,
29871,
13,
1678,
1596,
14182,
517,
1675,
29879,
4133,
29901,
376,
718,
851,
29898,
7827,
12724,
29897,
1723,
13,
268,
13,
1678,
363,
2944,
297,
2933,
29889,
3126,
580,
1839,
7076,
2033,
29901,
13,
4706,
10938,
1204,
29922,
667,
3366,
333,
3108,
13,
4706,
10938,
1170,
353,
1226,
7582,
2719,
29889,
657,
20738,
1917,
29898,
667,
29892,
525,
3221,
29889,
978,
1495,
13,
4706,
396,
679,
278,
6131,
669,
4341,
13,
4706,
1596,
4852,
29905,
29873,
11940,
10938,
29901,
376,
718,
10938,
1170,
718,
376,
1178,
543,
718,
10938,
1204,
29897,
13,
308,
13,
4706,
1196,
482,
4219,
29922,
28045,
6004,
718,
8207,
5943,
29914,
29906,
29914,
28045,
29914,
1272,
29914,
2674,
800,
14587,
29915,
13,
4706,
1196,
482,
2177,
1516,
3790,
29908,
26776,
1115,
10938,
1204,
13,
795,
1919,
376,
21264,
362,
1115,
376,
3221,
29889,
9780,
5938,
29908,
13,
795,
1919,
376,
19488,
1115,
376,
29906,
29908,
13,
795,
1919,
376,
20845,
1115,
376,
12015,
29908,
13,
795,
1919,
376,
2856,
6708,
1115,
11117,
3221,
29889,
978,
742,
525,
3221,
29889,
1990,
1542,
10827,
13,
795,
1919,
376,
2856,
14343,
29879,
1115,
376,
4541,
29908,
13,
795,
1919,
376,
5992,
29928,
786,
5926,
29909,
26127,
403,
6595,
29879,
1115,
376,
4541,
29908,
13,
795,
500,
13,
4706,
1596,
14182,
29873,
7194,
2278,
1104,
29879,
363,
10938,
29901,
376,
718,
1196,
482,
4219,
718,
376,
610,
1516,
543,
718,
851,
29898,
1220,
482,
2177,
1516,
29897,
1723,
13,
4706,
396,
679,
773,
318,
333,
29914,
29886,
9970,
13,
4706,
1196,
482,
1666,
29886,
353,
7274,
29889,
657,
29898,
1220,
482,
4219,
29892,
7529,
29922,
1220,
482,
2177,
1516,
29892,
13662,
29922,
6672,
29892,
4817,
29922,
10493,
16616,
6444,
29898,
5416,
29892,
29886,
9970,
876,
13,
4706,
396,
16140,
526,
297,
278,
4839,
13,
4706,
396,
1220,
482,
1666,
29886,
353,
7274,
29889,
657,
29898,
1220,
482,
4219,
29892,
7529,
29922,
1220,
482,
2177,
1516,
29892,
13662,
29922,
6672,
29897,
13,
4706,
1196,
482,
5709,
353,
1196,
482,
1666,
29886,
29889,
4882,
29918,
401,
13,
4706,
1596,
14182,
29873,
1220,
482,
4613,
543,
718,
851,
29898,
1220,
482,
5709,
876,
13,
4706,
565,
1196,
482,
5709,
2804,
29871,
29906,
29900,
29900,
29901,
13,
9651,
1596,
4852,
2704,
2805,
10938,
8118,
313,
24051,
29897,
364,
29883,
543,
718,
851,
29898,
2214,
29897,
718,
376,
2933,
6160,
718,
851,
29898,
5327,
29889,
3126,
29897,
1723,
29871,
13,
9651,
565,
364,
29883,
1360,
29946,
29900,
29896,
29901,
13,
18884,
1596,
14182,
29873,
29946,
29900,
29896,
29901,
9135,
1687,
4750,
292,
29914,
12313,
16140,
448,
470,
1923,
451,
1476,
29914,
3636,
292,
1159,
13,
18884,
1596,
29898,
710,
29898,
5327,
876,
13,
9651,
736,
13,
13,
4706,
565,
1196,
482,
1666,
29886,
29889,
726,
29889,
27382,
2541,
877,
29912,
7076,
11283,
1125,
13,
9651,
396,
6494,
313,
29896,
29900,
29889,
29906,
29889,
29900,
669,
29871,
29896,
29900,
29889,
29906,
29889,
29896,
29897,
448,
278,
4452,
4333,
881,
367,
376,
7076,
29908,
13,
9651,
1196,
482,
8148,
353,
1196,
482,
1666,
29886,
29889,
726,
29889,
6506,
877,
7076,
742,
18793,
7076,
29908,
742,
29871,
29896,
29897,
13,
4706,
1683,
29901,
13,
9651,
1196,
482,
8148,
353,
1196,
482,
1666,
29886,
29889,
726,
13,
4706,
396,
2674,
29879,
8148,
353,
4390,
29889,
18132,
29898,
1220,
482,
8148,
29889,
6506,
877,
7076,
742,
18793,
7076,
29908,
8785,
13,
4706,
1104,
29879,
8148,
353,
4390,
29889,
18132,
29898,
1220,
482,
8148,
29897,
13,
4706,
396,
2158,
29898,
2435,
29898,
2674,
29879,
8148,
876,
13,
308,
13,
4706,
363,
1196,
482,
2001,
297,
1104,
29879,
8148,
3366,
7076,
3108,
29901,
13,
9651,
396,
2158,
28909,
29873,
29905,
29873,
29915,
718,
851,
29898,
1220,
482,
2001,
876,
13,
9651,
297,
1204,
353,
1196,
482,
2001,
29889,
657,
703,
262,
1204,
1159,
13,
9651,
714,
1204,
353,
1196,
482,
2001,
29889,
657,
703,
449,
1204,
1159,
13,
632,
13,
9651,
396,
2158,
877,
1482,
297,
1204,
1360,
2433,
718,
297,
1204,
718,
376,
714,
1204,
543,
718,
714,
1204,
29897,
13,
9651,
396,
2158,
29898,
287,
7582,
2719,
29889,
657,
20738,
1917,
29898,
1220,
482,
2001,
3366,
262,
6026,
2580,
7176,
12436,
376,
3221,
29889,
978,
5783,
13,
9651,
1223,
542,
1204,
353,
1196,
482,
2001,
29889,
657,
703,
21264,
362,
1204,
1159,
13,
9651,
396,
2158,
14182,
29873,
29905,
29873,
29908,
718,
297,
1204,
718,
376,
1223,
542,
543,
718,
1223,
542,
1204,
29897,
13,
9651,
396,
361,
1223,
542,
1204,
1360,
29915,
510,
29889,
262,
5444,
29889,
430,
29885,
29889,
2674,
1288,
29889,
12763,
3562,
2396,
13,
9651,
565,
1223,
542,
1204,
29889,
1975,
2541,
12839,
12763,
3562,
29374,
13,
18884,
396,
4443,
448,
2888,
1196,
482,
947,
451,
817,
1591,
322,
1897,
448,
2302,
278,
6131,
669,
3787,
1591,
2983,
13,
18884,
1591,
3981,
4619,
29871,
29896,
13,
18884,
396,
2371,
1170,
353,
297,
1204,
29889,
5451,
11219,
1495,
14352,
29896,
29962,
13,
18884,
1591,
1170,
353,
1226,
7582,
2719,
29889,
657,
20738,
1917,
29898,
1220,
482,
2001,
3366,
262,
6026,
2580,
7176,
12436,
376,
3221,
29889,
978,
2564,
13609,
580,
13,
18884,
396,
3787,
278,
1591,
1024,
313,
1454,
16280,
746,
9068,
278,
4341,
29897,
1820,
29899,
333,
29892,
659,
29922,
978,
13,
18884,
1591,
8659,
29961,
262,
1204,
29962,
353,
1591,
1170,
13,
18884,
10938,
21533,
29961,
2371,
1170,
13192,
262,
1204,
13,
9651,
396,
361,
1223,
542,
1204,
1360,
29915,
510,
29889,
262,
5444,
29889,
430,
29885,
29889,
2674,
1288,
29889,
3562,
4409,
2396,
13,
9651,
565,
1223,
542,
1204,
29889,
1975,
2541,
12839,
3562,
4409,
1495,
470,
1223,
542,
1204,
29889,
1975,
2541,
17350,
3562,
26666,
2558,
4409,
29908,
1125,
13,
18884,
396,
4914,
1170,
353,
297,
1204,
29889,
5451,
11219,
1495,
14352,
29896,
29962,
13,
18884,
1897,
3981,
4619,
29871,
29896,
13,
18884,
1897,
1170,
353,
1226,
7582,
2719,
29889,
657,
20738,
1917,
29898,
1220,
482,
2001,
3366,
262,
6026,
2580,
7176,
12436,
376,
3221,
29889,
978,
2564,
13609,
580,
13,
18884,
1591,
1170,
353,
1591,
8659,
29961,
449,
1204,
1822,
13609,
580,
13,
18884,
396,
2158,
703,
4914,
543,
718,
1591,
1170,
718,
376,
1213,
718,
1897,
1170,
29897,
13,
18884,
10938,
21533,
29961,
2371,
1170,
13578,
1213,
29974,
4914,
1170,
29962,
353,
297,
1204,
13,
268,
13,
1678,
1596,
14182,
29873,
657,
12763,
29901,
7863,
376,
718,
851,
29898,
4914,
3981,
29897,
718,
376,
4341,
29892,
297,
376,
718,
851,
29898,
2371,
3981,
29897,
718,
376,
6131,
1159,
259,
13,
1678,
736,
10938,
21533,
29892,
10938,
1204,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
9995,
29871,
13,
1678,
2847,
895,
278,
11799,
934,
29898,
29879,
29897,
304,
2436,
13,
1678,
1246,
679,
12763,
21002,
363,
1716,
2175,
322,
1492,
10938,
3618,
13,
1678,
1993,
278,
6131,
29914,
13099,
515,
278,
2175,
10938,
304,
278,
1492,
13,
1678,
746,
19228,
13,
4706,
2436,
263,
1196,
482,
1544,
448,
1591,
322,
1897,
3233,
13,
268,
13,
1678,
3940,
29901,
29871,
445,
2471,
16785,
278,
20687,
1196,
482,
3402,
773,
4866,
1203,
1178,
29915,
29879,
322,
9443,
4072,
13,
965,
3957,
12827,
674,
451,
367,
5181,
13,
965,
1736,
411,
325,
29896,
29900,
29889,
29906,
29889,
29896,
29974,
13,
9651,
13,
1678,
9995,
13,
1678,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
1596,
4852,
2585,
12763,
5612,
1414,
3542,
482,
29901,
2962,
1159,
13,
1678,
1596,
4852,
29907,
3968,
543,
718,
16653,
6004,
29897,
13,
1678,
1596,
4852,
1563,
29901,
29871,
6503,
543,
718,
2175,
6848,
29897,
13,
1678,
1596,
4852,
1563,
29901,
1678,
10938,
543,
718,
2175,
12763,
29897,
13,
1678,
1596,
4852,
1266,
29901,
6503,
543,
718,
1492,
6848,
29897,
13,
1678,
1596,
4852,
1266,
29901,
259,
10938,
543,
718,
1492,
12763,
29897,
13,
308,
13,
1678,
396,
11905,
11799,
1962,
934,
13,
1678,
1897,
7850,
29922,
3366,
29254,
362,
3284,
4591,
15160,
3284,
1762,
15160,
3284,
4591,
4669,
3284,
1762,
4669,
3108,
13,
13,
1678,
396,
3017,
29871,
29941,
669,
29871,
29906,
29889,
29955,
671,
1422,
3519,
13,
1678,
1596,
703,
11228,
5281,
934,
29901,
376,
718,
11799,
17020,
29897,
13,
1678,
565,
851,
29898,
12120,
29889,
4691,
29918,
3259,
16655,
27382,
2541,
703,
29906,
29889,
29955,
29908,
1125,
13,
4706,
285,
29907,
7597,
2283,
353,
1722,
29898,
7638,
17020,
1699,
29893,
1159,
13,
1678,
1683,
29901,
13,
4706,
285,
29907,
7597,
2283,
353,
1722,
29898,
7638,
17020,
1699,
29893,
613,
25899,
2433,
742,
8025,
2433,
9420,
29899,
29947,
1495,
13,
1678,
784,
10507,
29922,
7638,
29889,
13236,
29898,
29888,
29907,
7597,
2283,
29897,
13,
1678,
784,
10507,
29889,
13236,
340,
29898,
4914,
7850,
29897,
1678,
13,
1678,
13,
1678,
396,
679,
278,
3618,
515,
278,
2175,
10938,
964,
3370,
13,
1678,
1596,
703,
657,
2175,
10938,
29901,
1024,
543,
718,
2175,
12763,
718,
376,
6503,
543,
718,
2175,
6848,
718,
376,
1134,
543,
718,
2175,
12763,
1542,
29897,
13,
1678,
2175,
12724,
29892,
2175,
12763,
1204,
353,
679,
12763,
21002,
29898,
1563,
12763,
29892,
2175,
12763,
1542,
29892,
2175,
6848,
29897,
13,
268,
13,
1678,
396,
679,
278,
3618,
515,
278,
1492,
10938,
964,
3370,
13,
1678,
1596,
703,
657,
2175,
10938,
29901,
1024,
543,
718,
1492,
12763,
718,
376,
6503,
543,
718,
1492,
6848,
718,
376,
1134,
543,
718,
1492,
12763,
1542,
29897,
13,
1678,
1492,
12724,
29892,
1492,
12763,
1204,
353,
679,
12763,
21002,
29898,
1266,
12763,
29892,
1492,
12763,
1542,
29892,
1492,
6848,
29897,
13,
13,
1678,
7087,
29922,
29900,
13,
1678,
4567,
29922,
29900,
13,
13,
1678,
565,
7431,
29898,
1563,
12724,
29897,
1405,
29871,
29900,
322,
7431,
29898,
1266,
12724,
29897,
1405,
29871,
29900,
29901,
308,
13,
4706,
396,
1653,
278,
1196,
482,
934,
268,
13,
4706,
784,
10507,
29889,
13236,
340,
29898,
3366,
3221,
29889,
15559,
1469,
17907,
3284,
3284,
613,
1563,
12763,
1204,
29892,
1266,
12763,
1204,
2314,
13,
4706,
396,
13649,
975,
599,
2175,
3618,
448,
3063,
363,
9686,
1492,
6743,
13,
4706,
1596,
14182,
29876,
19170,
29901,
376,
718,
851,
29898,
2435,
29898,
1563,
12724,
876,
718,
376,
3618,
313,
1563,
2625,
25760,
13,
4706,
363,
2175,
1170,
29892,
2175,
1440,
297,
2175,
12724,
29889,
7076,
7295,
13,
9651,
396,
565,
278,
3646,
338,
773,
263,
10944,
448,
788,
372,
304,
2175,
1170,
13,
9651,
565,
7431,
29898,
1266,
3562,
23095,
15410,
29900,
29901,
13,
18884,
2175,
1170,
353,
1492,
3562,
23095,
29889,
13609,
580,
718,
2175,
1170,
13,
13,
9651,
396,
2158,
703,
1989,
543,
718,
2175,
1170,
718,
376,
376,
718,
2175,
1440,
718,
376,
376,
718,
851,
29898,
1563,
1170,
29889,
2798,
877,
6169,
4961,
13,
9651,
565,
313,
1563,
1170,
297,
1492,
12724,
29889,
8149,
580,
1125,
13,
18884,
396,
1993,
13,
18884,
1492,
1440,
353,
1492,
12724,
29889,
657,
29898,
1563,
1170,
29897,
13,
18884,
7087,
4619,
29871,
29896,
13,
18884,
396,
2158,
14182,
29873,
29908,
718,
1492,
1440,
29897,
13,
18884,
396,
1423,
565,
372,
338,
20917,
408,
1591,
29889,
4914,
470,
925,
1591,
13,
18884,
565,
2175,
1170,
29889,
2798,
12839,
1495,
1275,
29871,
29896,
29901,
13,
462,
1678,
396,
1897,
1196,
482,
448,
773,
360,
8684,
284,
1469,
17907,
13,
462,
1678,
784,
10507,
29889,
13236,
340,
29898,
3366,
3221,
29889,
21602,
284,
1469,
17907,
3284,
3284,
613,
1563,
1440,
29892,
1266,
1440,
2314,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
1591,
3233,
448,
773,
7136,
29889,
28449,
1469,
17907,
13,
462,
1678,
784,
10507,
29889,
13236,
340,
29898,
3366,
3221,
29889,
28449,
1469,
17907,
3284,
3284,
613,
1563,
1440,
29892,
1266,
1440,
2314,
13,
13,
18884,
396,
2436,
263,
1196,
304,
278,
2888,
1196,
482,
11799,
934,
313,
9965,
12827,
29897,
13,
18884,
396,
1054,
10507,
29889,
13236,
340,
4197,
1563,
6848,
29892,
1266,
6848,
29892,
1563,
5620,
29892,
1266,
5620,
2314,
13,
9651,
1683,
29901,
13,
18884,
4567,
4619,
29871,
29896,
13,
18884,
1596,
14182,
29873,
694,
1993,
373,
1492,
2625,
363,
1820,
543,
718,
2175,
1170,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
2704,
2805,
10938,
5235,
856,
448,
694,
25236,
29914,
1220,
482,
2825,
1159,
13,
13,
1678,
1596,
4852,
2585,
12763,
3542,
482,
15462,
29901,
4951,
3276,
29889,
376,
718,
851,
29898,
20317,
29897,
718,
376,
2988,
2825,
29892,
376,
718,
851,
29898,
27259,
29897,
718,
376,
4567,
313,
11940,
297,
2175,
29892,
694,
1993,
373,
1492,
25760,
13,
1678,
1596,
703,
3389,
931,
353,
1273,
29879,
6923,
11474,
29908,
1273,
313,
2230,
29889,
2230,
580,
448,
1369,
29918,
2230,
876,
13,
13,
1678,
285,
29907,
7597,
2283,
29889,
5358,
580,
13,
13,
13,
29937,
1246,
1667,
448,
565,
451,
2307,
2000,
470,
1304,
491,
1790,
2471,
29871,
13,
361,
4770,
978,
1649,
1360,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
632,
13,
2
] |
pretraining/model_ensemble.py | VITA-Group/Adv-SS-Pretraining | 32 | 8415 | <filename>pretraining/model_ensemble.py
'''
model ensemble for cifar10 // input size(32,32)
'''
import torch
import torchvision
import copy
import torch.nn as nn
from resnetv2 import ResNet50 as resnet50v2
def split_resnet50(model):
return nn.Sequential(
model.conv1,
model.layer1,
model.layer2,
model.layer3
)
class PretrainEnsembleModel(nn.Module):
def __init__(self):
super(PretrainEnsembleModel, self).__init__()
self.blocks = split_resnet50(resnet50v2())
self.layer4_rotation = resnet50v2().layer4
self.layer4_jigsaw = resnet50v2().layer4
self.fc_rotation = nn.Linear(2048, 4)
self.fc_jigsaw = nn.Linear(2048, 31)
self.avgpool1 = nn.AdaptiveAvgPool2d((1,1))
self.avgpool2 = nn.AdaptiveAvgPool2d((1,1))
self.avgpool3 = nn.AdaptiveAvgPool2d((1,1))
def _Normal(self,x):
mean=torch.Tensor([0.485, 0.456, 0.406])
mean=mean[None,:,None,None].cuda()
std = torch.Tensor([0.229, 0.224, 0.225])
std = std[None,:,None,None].cuda()
return x.sub(mean).div(std)
def forward(self, x):
feature_map = self.blocks(self._Normal(x))
return feature_map
| [
1,
529,
9507,
29958,
1457,
26495,
29914,
4299,
29918,
24031,
29889,
2272,
13,
12008,
30004,
13,
4299,
21285,
363,
274,
361,
279,
29896,
29900,
29871,
849,
1881,
2159,
29898,
29941,
29906,
29892,
29941,
29906,
8443,
13,
12008,
30004,
13,
30004,
13,
30004,
13,
5215,
4842,
305,
30004,
13,
5215,
4842,
305,
4924,
30004,
13,
30004,
13,
5215,
3509,
30004,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
3166,
620,
1212,
29894,
29906,
1053,
2538,
6779,
29945,
29900,
408,
620,
1212,
29945,
29900,
29894,
29906,
30004,
13,
30004,
13,
30004,
13,
1753,
6219,
29918,
690,
1212,
29945,
29900,
29898,
4299,
1125,
30004,
13,
1678,
736,
302,
29876,
29889,
16941,
2556,
29898,
30004,
13,
4706,
1904,
29889,
20580,
29896,
11167,
13,
4706,
1904,
29889,
13148,
29896,
11167,
13,
4706,
1904,
29889,
13148,
29906,
11167,
13,
4706,
1904,
29889,
13148,
29941,
30004,
13,
1678,
1723,
30004,
13,
30004,
13,
30004,
13,
1990,
349,
2267,
6038,
29923,
1983,
6967,
3195,
29898,
15755,
29889,
7355,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
30004,
13,
30004,
13,
4706,
2428,
29898,
29925,
2267,
6038,
29923,
1983,
6967,
3195,
29892,
1583,
467,
1649,
2344,
1649,
26471,
13,
30004,
13,
4706,
1583,
29889,
1271,
29879,
353,
6219,
29918,
690,
1212,
29945,
29900,
29898,
690,
1212,
29945,
29900,
29894,
29906,
3101,
30004,
13,
4706,
1583,
29889,
13148,
29946,
29918,
5450,
362,
353,
620,
1212,
29945,
29900,
29894,
29906,
2141,
13148,
29946,
6756,
13,
4706,
1583,
29889,
13148,
29946,
29918,
29926,
23379,
1450,
353,
620,
1212,
29945,
29900,
29894,
29906,
2141,
13148,
29946,
30004,
13,
30004,
13,
4706,
1583,
29889,
13801,
29918,
5450,
362,
353,
302,
29876,
29889,
12697,
29898,
29906,
29900,
29946,
29947,
29892,
29871,
29946,
8443,
13,
4706,
1583,
29889,
13801,
29918,
29926,
23379,
1450,
353,
302,
29876,
29889,
12697,
29898,
29906,
29900,
29946,
29947,
29892,
29871,
29941,
29896,
8443,
13,
30004,
13,
4706,
1583,
29889,
485,
29887,
10109,
29896,
353,
302,
29876,
29889,
29909,
1388,
415,
573,
12810,
29887,
11426,
29906,
29881,
3552,
29896,
29892,
29896,
876,
30004,
13,
4706,
1583,
29889,
485,
29887,
10109,
29906,
353,
302,
29876,
29889,
29909,
1388,
415,
573,
12810,
29887,
11426,
29906,
29881,
3552,
29896,
29892,
29896,
876,
30004,
13,
4706,
1583,
29889,
485,
29887,
10109,
29941,
353,
302,
29876,
29889,
29909,
1388,
415,
573,
12810,
29887,
11426,
29906,
29881,
3552,
29896,
29892,
29896,
876,
30004,
13,
30004,
13,
30004,
13,
1678,
822,
903,
19077,
29898,
1311,
29892,
29916,
1125,
30004,
13,
4706,
2099,
29922,
7345,
305,
29889,
29911,
6073,
4197,
29900,
29889,
29946,
29947,
29945,
29892,
29871,
29900,
29889,
29946,
29945,
29953,
29892,
29871,
29900,
29889,
29946,
29900,
29953,
2314,
30004,
13,
4706,
2099,
29922,
12676,
29961,
8516,
29892,
29901,
29892,
8516,
29892,
8516,
1822,
29883,
6191,
26471,
13,
4706,
3659,
353,
4842,
305,
29889,
29911,
6073,
4197,
29900,
29889,
29906,
29906,
29929,
29892,
29871,
29900,
29889,
29906,
29906,
29946,
29892,
29871,
29900,
29889,
29906,
29906,
29945,
2314,
30004,
13,
4706,
3659,
353,
3659,
29961,
8516,
29892,
29901,
29892,
8516,
29892,
8516,
1822,
29883,
6191,
26471,
13,
4706,
736,
921,
29889,
1491,
29898,
12676,
467,
4563,
29898,
4172,
8443,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
1125,
30004,
13,
30004,
13,
4706,
4682,
29918,
1958,
353,
1583,
29889,
1271,
29879,
29898,
1311,
3032,
19077,
29898,
29916,
876,
30004,
13,
30004,
13,
4706,
736,
4682,
29918,
1958,
30004,
13,
2
] |
config.example.py | idies/SpecDash | 1 | 111936 | PORT = 8050
DEBUG = True
DASH_TABLE_PAGE_SIZE = 5
DEFAULT_WAVELENGTH_UNIT = "angstrom"
DEFAULT_FLUX_UNIT = "F_lambda"
LOGS = { "do_log":True, "base_logs_directory":"/base/logs/directory/" }
MAX_NUM_TRACES = 30
CATALOGS = {
"sdss": {
"base_data_path":"/base/data/path/",
"api_url":"http://skyserver.sdss.org/public/SkyServerWS/SearchTools/SqlSearch",
"example_specid":"2947691243863304192"
}
} | [
1,
349,
8476,
353,
29871,
29947,
29900,
29945,
29900,
13,
18525,
353,
5852,
13,
29928,
24943,
29918,
21009,
29918,
7228,
1692,
29918,
14226,
353,
29871,
29945,
13,
23397,
29918,
29956,
7520,
29923,
19433,
29918,
3904,
1806,
353,
376,
574,
303,
456,
29908,
13,
23397,
29918,
10536,
29965,
29990,
29918,
3904,
1806,
353,
376,
29943,
29918,
2892,
29908,
13,
3927,
10749,
353,
426,
376,
1867,
29918,
1188,
1115,
5574,
29892,
376,
3188,
29918,
20756,
29918,
12322,
4710,
29914,
3188,
29914,
20756,
29914,
12322,
12975,
500,
13,
12648,
29918,
13967,
29918,
5659,
2477,
2890,
353,
29871,
29941,
29900,
13,
23972,
1964,
29949,
10749,
353,
29871,
426,
13,
18884,
376,
4928,
893,
1115,
426,
13,
462,
9651,
376,
3188,
29918,
1272,
29918,
2084,
4710,
29914,
3188,
29914,
1272,
29914,
2084,
29914,
613,
13,
462,
9651,
376,
2754,
29918,
2271,
4710,
1124,
597,
7912,
2974,
29889,
4928,
893,
29889,
990,
29914,
3597,
29914,
29903,
3459,
6004,
7811,
29914,
7974,
24183,
29914,
10520,
7974,
613,
13,
462,
9651,
376,
4773,
29918,
6550,
333,
4710,
29906,
29929,
29946,
29955,
29953,
29929,
29896,
29906,
29946,
29941,
29947,
29953,
29941,
29941,
29900,
29946,
29896,
29929,
29906,
29908,
13,
462,
4706,
500,
13,
9651,
500,
2
] |
urbansim_templates/data/column_from_expression.py | AZMAG/urbansim_templates | 19 | 106714 | import orca
import pandas as pd
from urbansim_templates import modelmanager, shared, utils, __version__
from urbansim_templates.shared import CoreTemplateSettings, OutputColumnSettings
class ExpressionSettings():
"""
Stores custom parameters used by the
:mod:`~urbansim_templates.data.ColumnFromExpression` template. Parameters can be
passed to the constructor or set as attributes.
Parameters
----------
table : str, optional
Name of Orca table the expression will be evaluated on. Required before running
then template.
expression : str, optional
String describing operations on existing columns of the table, for example
"a/log(b+c)". Required before running. Supports arithmetic and math functions
including sqrt, abs, log, log1p, exp, and expm1 -- see Pandas ``df.eval()``
documentation for further details.
"""
def __init__(self, table = None, expression = None):
self.table = table
self.expression = expression
@classmethod
def from_dict(cls, d):
return cls(table=d['table'], expression=d['expression'])
def to_dict(self):
return {'table': self.table, 'expression': self.expression}
@modelmanager.template
class ColumnFromExpression():
"""
Template to register a column of derived data with Orca, based on an expression.
Parameters may be passed to the constructor, but they are easier to set as
attributes. The expression can refer to any columns in the same table, and will be
evaluated using ``df.eval()``. Values will be calculated lazily, only when the column
is needed for a specific operation.
Parameters
----------
meta : :mod:`~urbansim_templates.shared.CoreTemplateSettings`, optional
Standard parameters. This template sets the default value of ``meta.autorun``
to True.
data : :mod:`~urbansim_templates.data.ExpressionSettings`, optional
Special parameters for this template.
output : :mod:`~urbansim_templates.shared.OutputColumnSettings`, optional
Parameters for the column that will be generated. This template uses
``data.table`` as the default value for ``output.table``.
"""
def __init__(self, meta=None, data=None, output=None):
self.meta = CoreTemplateSettings(autorun=True) if meta is None else meta
self.meta.template = self.__class__.__name__
self.meta.template_version = __version__
self.data = ExpressionSettings() if data is None else data
self.output = OutputColumnSettings() if output is None else output
@classmethod
def from_dict(cls, d):
"""
Create a class instance from a saved dictionary.
"""
if 'meta' not in d:
return cls.from_dict_0_2_dev5(d)
return cls(
meta = CoreTemplateSettings.from_dict(d['meta']),
data = ExpressionSettings.from_dict(d['data']),
output = OutputColumnSettings.from_dict(d['output']))
@classmethod
def from_dict_0_2_dev5(cls, d):
"""
Converter to read saved data from 0.2.dev5 or earlier. Automatically invoked by
``from_dict()`` as needed.
"""
return cls(
meta = CoreTemplateSettings(
name = d['name'],
tags = d['tags'],
autorun = d['autorun']),
data = ExpressionSettings(
table = d['table'],
expression = d['expression']),
output = OutputColumnSettings(
column_name = d['column_name'],
data_type = d['data_type'],
missing_values = d['missing_values'],
cache = d['cache'],
cache_scope = d['cache_scope']))
def to_dict(self):
"""
Create a dictionary representation of the object.
"""
return {
'meta': self.meta.to_dict(),
'data': self.data.to_dict(),
'output': self.output.to_dict()}
def run(self):
"""
Run the template, registering a column of derived data with Orca. Requires values
to be set for ``data.table``, ``data.expression``, and ``output.column_name``.
"""
if self.data.table is None:
raise ValueError("Please provide a table")
if self.data.expression is None:
raise ValueError("Please provide an expression")
if self.output.column_name is None:
raise ValueError("Please provide a column name")
settings = self.output
if settings.table is None:
settings.table = self.data.table
cols = utils.cols_in_expression(self.data.expression)
def build_column():
df = utils.get_df(self.data.table, columns=cols)
series = df.eval(self.data.expression)
return series
shared.register_column(build_column, settings)
| [
1,
1053,
470,
1113,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
23499,
550,
326,
29918,
20943,
1053,
1904,
12847,
29892,
7258,
29892,
3667,
29879,
29892,
4770,
3259,
1649,
13,
3166,
23499,
550,
326,
29918,
20943,
29889,
12366,
1053,
10239,
6733,
9585,
29892,
10604,
4409,
9585,
13,
13,
13,
1990,
21444,
9585,
7295,
13,
1678,
9995,
13,
1678,
624,
2361,
2888,
4128,
1304,
491,
278,
29871,
13,
1678,
584,
1545,
18078,
30022,
9265,
550,
326,
29918,
20943,
29889,
1272,
29889,
4409,
4591,
10960,
29952,
4472,
29889,
12662,
2699,
508,
367,
13,
1678,
4502,
304,
278,
5823,
470,
731,
408,
8393,
29889,
13,
268,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1591,
584,
851,
29892,
13136,
13,
4706,
4408,
310,
1394,
1113,
1591,
278,
4603,
674,
367,
19030,
373,
29889,
830,
5958,
1434,
2734,
13,
4706,
769,
4472,
29889,
13,
268,
13,
1678,
4603,
584,
851,
29892,
13136,
13,
4706,
1714,
20766,
6931,
373,
5923,
4341,
310,
278,
1591,
29892,
363,
1342,
29871,
13,
4706,
376,
29874,
29914,
1188,
29898,
29890,
29974,
29883,
29897,
1642,
830,
5958,
1434,
2734,
29889,
18601,
29879,
23342,
322,
5844,
3168,
29871,
13,
4706,
3704,
18074,
2273,
29892,
6425,
29892,
1480,
29892,
1480,
29896,
29886,
29892,
1518,
29892,
322,
1518,
29885,
29896,
1192,
1074,
349,
7086,
4954,
2176,
29889,
14513,
2555,
29952,
29871,
13,
4706,
5106,
363,
4340,
4902,
29889,
13,
268,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1591,
353,
6213,
29892,
4603,
353,
6213,
1125,
13,
4706,
1583,
29889,
2371,
353,
1591,
13,
4706,
1583,
29889,
17471,
353,
4603,
13,
268,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
8977,
29898,
25932,
29892,
270,
1125,
13,
4706,
736,
1067,
29879,
29898,
2371,
29922,
29881,
1839,
2371,
7464,
4603,
29922,
29881,
1839,
17471,
11287,
13,
13,
1678,
822,
304,
29918,
8977,
29898,
1311,
1125,
13,
4706,
736,
11117,
2371,
2396,
1583,
29889,
2371,
29892,
525,
17471,
2396,
1583,
29889,
17471,
29913,
13,
13,
13,
29992,
4299,
12847,
29889,
6886,
13,
1990,
12481,
4591,
10960,
7295,
13,
1678,
9995,
13,
1678,
25663,
304,
6036,
263,
1897,
310,
10723,
848,
411,
1394,
1113,
29892,
2729,
373,
385,
4603,
29889,
29871,
13,
1678,
12662,
2699,
1122,
367,
4502,
304,
278,
5823,
29892,
541,
896,
526,
6775,
304,
731,
408,
13,
1678,
8393,
29889,
450,
4603,
508,
2737,
304,
738,
4341,
297,
278,
1021,
1591,
29892,
322,
674,
367,
13,
1678,
19030,
773,
4954,
2176,
29889,
14513,
2555,
1412,
2630,
1041,
674,
367,
12833,
425,
29920,
2354,
29892,
871,
746,
278,
1897,
13,
1678,
338,
4312,
363,
263,
2702,
5858,
29889,
13,
308,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
12700,
584,
584,
1545,
18078,
30022,
9265,
550,
326,
29918,
20943,
29889,
12366,
29889,
9203,
6733,
9585,
1673,
13136,
13,
4706,
10117,
4128,
29889,
910,
4472,
6166,
278,
2322,
995,
310,
4954,
7299,
29889,
8309,
348,
16159,
13,
4706,
304,
5852,
29889,
13,
268,
13,
1678,
848,
584,
584,
1545,
18078,
30022,
9265,
550,
326,
29918,
20943,
29889,
1272,
29889,
10960,
9585,
1673,
13136,
13,
4706,
12630,
4128,
363,
445,
4472,
29889,
13,
308,
13,
1678,
1962,
584,
584,
1545,
18078,
30022,
9265,
550,
326,
29918,
20943,
29889,
12366,
29889,
6466,
4409,
9585,
1673,
13136,
13,
4706,
12662,
2699,
363,
278,
1897,
393,
674,
367,
5759,
29889,
910,
4472,
3913,
13,
4706,
4954,
1272,
29889,
2371,
16159,
408,
278,
2322,
995,
363,
4954,
4905,
29889,
2371,
29952,
1412,
13,
308,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
12700,
29922,
8516,
29892,
848,
29922,
8516,
29892,
1962,
29922,
8516,
1125,
13,
308,
13,
4706,
1583,
29889,
7299,
353,
10239,
6733,
9585,
29898,
8309,
348,
29922,
5574,
29897,
565,
12700,
338,
6213,
1683,
12700,
13,
4706,
1583,
29889,
7299,
29889,
6886,
353,
1583,
17255,
1990,
1649,
17255,
978,
1649,
13,
4706,
1583,
29889,
7299,
29889,
6886,
29918,
3259,
353,
4770,
3259,
1649,
13,
462,
13,
4706,
1583,
29889,
1272,
353,
21444,
9585,
580,
565,
848,
338,
6213,
1683,
848,
13,
4706,
1583,
29889,
4905,
353,
10604,
4409,
9585,
580,
565,
1962,
338,
6213,
1683,
1962,
13,
268,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
8977,
29898,
25932,
29892,
270,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
770,
2777,
515,
263,
7160,
8600,
29889,
13,
308,
13,
4706,
9995,
13,
4706,
565,
525,
7299,
29915,
451,
297,
270,
29901,
13,
9651,
736,
1067,
29879,
29889,
3166,
29918,
8977,
29918,
29900,
29918,
29906,
29918,
3359,
29945,
29898,
29881,
29897,
13,
308,
13,
4706,
736,
1067,
29879,
29898,
13,
9651,
12700,
353,
10239,
6733,
9585,
29889,
3166,
29918,
8977,
29898,
29881,
1839,
7299,
2033,
511,
13,
9651,
848,
353,
21444,
9585,
29889,
3166,
29918,
8977,
29898,
29881,
1839,
1272,
2033,
511,
13,
9651,
1962,
353,
10604,
4409,
9585,
29889,
3166,
29918,
8977,
29898,
29881,
1839,
4905,
25901,
268,
13,
268,
13,
268,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
8977,
29918,
29900,
29918,
29906,
29918,
3359,
29945,
29898,
25932,
29892,
270,
1125,
13,
4706,
9995,
13,
4706,
1281,
13549,
304,
1303,
7160,
848,
515,
29871,
29900,
29889,
29906,
29889,
3359,
29945,
470,
8859,
29889,
15854,
19574,
22336,
491,
13,
4706,
4954,
3166,
29918,
8977,
2555,
29952,
408,
4312,
29889,
13,
308,
13,
4706,
9995,
13,
4706,
736,
1067,
29879,
29898,
13,
9651,
12700,
353,
10239,
6733,
9585,
29898,
13,
18884,
1024,
353,
270,
1839,
978,
7464,
13,
18884,
8282,
353,
270,
1839,
11338,
7464,
13,
18884,
8478,
348,
353,
270,
1839,
8309,
348,
2033,
511,
13,
9651,
848,
353,
21444,
9585,
29898,
13,
18884,
1591,
353,
270,
1839,
2371,
7464,
13,
18884,
4603,
353,
270,
1839,
17471,
2033,
511,
13,
9651,
1962,
353,
10604,
4409,
9585,
29898,
13,
18884,
1897,
29918,
978,
353,
270,
1839,
4914,
29918,
978,
7464,
13,
18884,
848,
29918,
1853,
353,
270,
1839,
1272,
29918,
1853,
7464,
13,
18884,
4567,
29918,
5975,
353,
270,
1839,
27259,
29918,
5975,
7464,
13,
18884,
7090,
353,
270,
1839,
8173,
7464,
13,
18884,
7090,
29918,
6078,
353,
270,
1839,
8173,
29918,
6078,
25901,
13,
268,
13,
268,
13,
1678,
822,
304,
29918,
8977,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
8600,
8954,
310,
278,
1203,
29889,
13,
308,
13,
4706,
9995,
13,
4706,
736,
426,
13,
9651,
525,
7299,
2396,
1583,
29889,
7299,
29889,
517,
29918,
8977,
3285,
29871,
13,
9651,
525,
1272,
2396,
1583,
29889,
1272,
29889,
517,
29918,
8977,
3285,
13,
9651,
525,
4905,
2396,
1583,
29889,
4905,
29889,
517,
29918,
8977,
28296,
13,
268,
13,
268,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7525,
278,
4472,
29892,
6036,
292,
263,
1897,
310,
10723,
848,
411,
1394,
1113,
29889,
830,
339,
2658,
1819,
13,
4706,
304,
367,
731,
363,
4954,
1272,
29889,
2371,
29952,
1673,
4954,
1272,
29889,
17471,
29952,
1673,
322,
4954,
4905,
29889,
4914,
29918,
978,
29952,
1412,
13,
308,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
1272,
29889,
2371,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
12148,
3867,
263,
1591,
1159,
13,
308,
13,
4706,
565,
1583,
29889,
1272,
29889,
17471,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
12148,
3867,
385,
4603,
1159,
13,
308,
13,
4706,
565,
1583,
29889,
4905,
29889,
4914,
29918,
978,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
12148,
3867,
263,
1897,
1024,
1159,
13,
308,
13,
4706,
6055,
353,
1583,
29889,
4905,
13,
308,
13,
4706,
565,
6055,
29889,
2371,
338,
6213,
29901,
13,
9651,
6055,
29889,
2371,
353,
1583,
29889,
1272,
29889,
2371,
13,
13,
4706,
28730,
353,
3667,
29879,
29889,
22724,
29918,
262,
29918,
17471,
29898,
1311,
29889,
1272,
29889,
17471,
29897,
13,
308,
13,
4706,
822,
2048,
29918,
4914,
7295,
13,
9651,
4489,
353,
3667,
29879,
29889,
657,
29918,
2176,
29898,
1311,
29889,
1272,
29889,
2371,
29892,
4341,
29922,
22724,
29897,
13,
9651,
3652,
353,
4489,
29889,
14513,
29898,
1311,
29889,
1272,
29889,
17471,
29897,
13,
9651,
736,
3652,
13,
13,
4706,
7258,
29889,
9573,
29918,
4914,
29898,
4282,
29918,
4914,
29892,
6055,
29897,
13,
308,
13,
268,
2
] |
mutatest/api.py | EvanKepner/m | 49 | 64696 | <reponame>EvanKepner/m
"""
API
---
These are high level objects for interacting with ``mutatest``. The primary objects include:
1. The ``Genome``
2. The ``GenomeGroup``
3. The ``Mutant``
``Genomes`` are representations of a Python source code file. This includes a representation of
the Abstract Syntax Tree (AST) and the locations within the AST that could be mutated. The
locations are accessed by the ``targets`` and ``covered_targets`` properties of the ``Genome``,
the latter being available if a coverage file is set for the ``Genome``.
Locations are represented as ``LocIndex`` objects from ``mutatest.transformers`` which may be
referenced as specific points of mutation.
``Mutants`` are created from ``Genome.mutate()`` for a specific ``LocIndex`` in the ``Genome``
targets. A ``mutant`` is an immutable named-tuple with all of the attributes necessary to mutate
the appropriate ``__pycache__`` file with the ``write_cache()`` method.
Collections of ``Genomes`` can be managed through a ``GenomeGroup``. The ``GenomeGroup`` provides
methods for setting global filters, coverage files, and producing targets of ``LocIndex`` objects
across the collection of ``Genomes``. This is a useful representation when dealing with a folder
of multiple source files.
"""
import ast
import importlib
import itertools
import logging
from collections.abc import MutableMapping
from copy import deepcopy
from pathlib import Path
from typing import (
Any,
Dict,
ItemsView,
Iterable,
Iterator,
KeysView,
Mapping,
NamedTuple,
Optional,
Set,
Union,
ValuesView,
)
from mutatest import cache
from mutatest.filters import CategoryCodeFilter, CoverageFilter
from mutatest.transformers import CATEGORIES, LocIndex, MutateAST
LOGGER = logging.getLogger(__name__)
class MutationException(Exception):
"""Mutation Exception type specifically for mismatches in mutation operations."""
pass
class Mutant(NamedTuple):
"""Mutant definition.
Mutants are created through the Genome at specific targets using the mutate method.
Mutants are immutable and can be written to disk in the ``__pycache__``.
You can create ``Mutants`` using ``Genome.mutate``, and then ``write_cache`` to apply to
the ``__pycache__``.
"""
mutant_code: Any
src_file: Path
cfile: Path
loader: Any
source_stats: Mapping[str, Any]
mode: int
src_idx: LocIndex
mutation: Any
def write_cache(self) -> None:
"""Create the cache file for the mutant on disk in ``__pycache__``.
Existing target cache files are removed to ensure clean overwrites.
Reference: https://github.com/python/cpython/blob/master/Lib/py_compile.py#L157
Returns:
None, creates the cache file on disk.
"""
cache.check_cache_invalidation_mode()
bytecode = importlib._bootstrap_external._code_to_timestamp_pyc( # type: ignore
self.mutant_code, self.source_stats["mtime"], self.source_stats["size"]
)
cache.remove_existing_cache_files(self.src_file)
cache.create_cache_dirs(self.cfile)
LOGGER.debug("Writing mutant cache file: %s", self.cfile)
importlib._bootstrap_external._write_atomic(self.cfile, bytecode, self.mode) # type: ignore
class Genome:
"""The Genome class describes the source file to be mutated.
The class describes a single .py file and has properties for the abstract syntax tree (AST)
and the viable mutation targets. You can initialize without any arguments. If the
``source_file`` is changed the ast and targets properties will be recalculated for that file.
Locations in the Genome may be mutated and written to the ``__pycache__`` using the mutate
method.
"""
def __init__(
self,
source_file: Optional[Union[str, Path]] = None,
coverage_file: Optional[Union[str, Path]] = Path(".coverage"),
filter_codes: Optional[Iterable[str]] = None,
) -> None:
"""Initialize the Genome.
There are internal properties prefixed with an underscore used for the lazy evaluation
of the AST and mutation targets.
Args:
source_file: an optional source file path
coverage_file: coverage file for filtering covered lines,
default value is set to ".coverage".
filter_codes: 2-letter category codes to filter returned targets
"""
# Properties with an underscore prefix are used for local caching and are not designed
# to be modified directly.
# Related to source files, AST, targets
self._source_file = None
self._ast: Optional[ast.Module] = None
self._targets: Optional[Set[LocIndex]] = None
# Related to coverage filtering
self._coverage_file = None
self._covered_targets: Optional[Set[LocIndex]] = None
# Related to category code filtering, not cached but uses a setter for valid value checks
self._filter_codes: Set[str] = set()
# Initialize set values using properties
# These may be set later and clear the cached values in the setters
self.source_file = Path(source_file) if source_file else None
self.coverage_file = Path(coverage_file) if coverage_file else None
self.filter_codes: Set[str] = set(filter_codes) if filter_codes else set()
################################################################################################
# CATEGORY FILTER CODES PROPERTIES
################################################################################################
@property
def filter_codes(self) -> Set[str]:
"""Filter codes applied to targets and covered targets."""
return self._filter_codes
@filter_codes.setter
def filter_codes(self, value: Iterable[str]) -> None:
"""Setter for filter codes. These are always applied when set on the Genome.
Set this to an empty set to remove all category code filters from returned targets.
Args:
value: a set of 2-letter codes, use a set of a single code if needed.
Returns:
None
Raises:
ValueError: if the 2-letter codes in value are not supported by the transformer.
"""
value, valid_codes = set(value), set(CATEGORIES.values())
if not value.issubset(valid_codes):
raise ValueError(
f"Invalid category codes: {value - valid_codes}.\nValid codes: {CATEGORIES}"
)
self._filter_codes = value
################################################################################################
# SOURCE FILE PROPERTIES
################################################################################################
@property
def source_file(self) -> Optional[Path]:
"""The source .py file represented by this Genome.
Returns:
The ``source_file`` path.
"""
return self._source_file
@source_file.setter
def source_file(self, value: Optional[Union[str, Path]]) -> None:
"""Setter for the source_file that clears the AST and targets for recalculation."""
self._source_file = Path(value) if value else None
self._ast = None
self._targets = None
@property
def ast(self) -> ast.Module: # type: ignore
"""Abstract Syntax Tree (AST) representation of the source_file.
This is cached locally and updated if the source_file is changed.
Returns:
Parsed AST for the source file.
Raises:
TypeError: if ``source_file`` is not set.
"""
if self._ast is None:
if not self.source_file:
raise TypeError("Source_file property is set to NoneType.")
with open(self.source_file, "rb") as src_stream:
self._ast = ast.parse(src_stream.read())
return self._ast
@property
def targets(self) -> Set[LocIndex]:
"""Viable mutation targets within the AST of the ``source_file``.
This is cached locally and updated if the source_file is changed. Filtering is not
cached and applies any time the ``filter_codes`` are changed.
Returns:
The set of the location index objects from the transformer that could be
potential mutation targets.
"""
if self._targets is None:
ro_mast = MutateAST(
target_idx=None, mutation=None, readonly=True, src_file=self.source_file
)
ro_mast.visit(self.ast)
self._targets = ro_mast.locs
return CategoryCodeFilter(codes=self.filter_codes).filter(self._targets)
################################################################################################
# COVERAGE FILTER PROPERTIES
################################################################################################
@property
def coverage_file(self) -> Optional[Path]:
"""The .coverage file to use for filtering targets."""
return self._coverage_file
@coverage_file.setter
def coverage_file(self, value: Optional[Union[str, Path]]) -> None:
"""Setter for ``coverage_file``, clears the cached ``covered_targets``."""
self._coverage_file = Path(value) if value else None
self._covered_targets = None
@property
def covered_targets(self) -> Set[LocIndex]:
"""Targets that are marked as covered based on the ``coverage_file``.
This is cached locally and updated if the coverage_file is changed. Filtering is not
cached and applies any time the filter_codes are changed.
Returns:
The targets that are covered.
Raises:
TypeError: if the ``source_file`` or ``coverage_file`` is not set for the Genome.
"""
if not self.source_file:
raise TypeError("Source_file property is set to NoneType.")
if not self.coverage_file:
raise TypeError("Coverage_file property is set to NoneType.")
if self._covered_targets is None:
self._covered_targets = CoverageFilter(coverage_file=self.coverage_file).filter(
self.targets, self.source_file
)
return CategoryCodeFilter(codes=self.filter_codes).filter(self._covered_targets)
################################################################################################
# MUTATION METHODS
################################################################################################
def mutate(self, target_idx: LocIndex, mutation_op: Any, write_cache: bool = False) -> Mutant:
"""Create a mutant from a single LocIndex that is in the Genome.
Mutation_op must be a valid mutation for the target_idx operation code type.
Optionally, use write_cache to write the mutant to ``__pycache__`` based on the detected
location at the time of creation. The Genome AST is unmodified by mutate.
Args:
target_idx: the target location index (member of .targets)
mutation_op: the mutation operation to use
write_cache: optional flag to write to ``__pycache__``
Returns:
The mutant definition
Raises:
MutationException: if ``mutation_op`` is not a valid mutation for the location index.
TypeError: if the source_file property is not set on the Genome.
ValueError: if the target_idx is not a member of Genome targets.
"""
op_code = CATEGORIES[target_idx.ast_class]
valid_mutations = CategoryCodeFilter(codes=(op_code,)).valid_mutations
if mutation_op not in valid_mutations:
raise MutationException(
f"{mutation_op} is not a member of mutation category {op_code}.\n"
f"Valid mutations for {op_code}: {valid_mutations}."
)
if not self.source_file:
raise TypeError("Source_file is set to NoneType")
if target_idx not in self.targets:
raise ValueError(f"{target_idx} is not in the Genome targets.")
mutant_ast = MutateAST(
target_idx=target_idx, mutation=mutation_op, src_file=self.source_file, readonly=False
).visit(
deepcopy(self.ast) # deepcopy to avoid in-place modification of AST
)
# generate cache file pyc machinery for writing the __pycache__ file
loader = importlib.machinery.SourceFileLoader( # type: ignore
"<py_compile>", self.source_file
)
# create the cache files with the mutated AST
mutant = Mutant(
mutant_code=compile(mutant_ast, str(self.source_file), "exec"),
src_file=Path(self.source_file),
cfile=Path(cache.get_cache_file_loc(self.source_file)),
loader=loader,
source_stats=loader.path_stats(self.source_file),
mode=importlib._bootstrap_external._calc_mode(self.source_file), # type: ignore
src_idx=target_idx,
mutation=mutation_op,
)
if write_cache:
mutant.write_cache()
return mutant
class GenomeGroupTarget(NamedTuple):
"""Container for targets returned from GenomeGroup to associated source path to LocIdx."""
source_path: Path
loc_idx: LocIndex
class GenomeGroup(MutableMapping): # type: ignore
"""The GenomeGroup: a MutableMapping of Genomes for operations on the group.
"""
def __init__(self, source_location: Optional[Union[str, Path]] = None) -> None:
"""Initialize the GenomeGroup.
GenomeGroup is a MutableMapping collection of Genomes with defined ``source_file``
locations. You can use it to apply standard filters or coverage files across the group and
get all mutation targets for the group. Folders and files can be added through methods.
Args:
source_location: an optional folder for initialization using the default settings
of no file exclusions except 'test' files. For more flexibility, initialize
the class and then use the ``.add_folder()`` method directly.
"""
# internal mapping for Genomes, not designed for direct modification, use class properties
self._store: Dict[Path, Genome] = dict()
if source_location is not None:
source_location = Path(source_location)
if source_location.is_dir():
self.add_folder(source_location)
elif source_location.is_file():
self.add_file(source_location)
else:
raise TypeError(f"{source_location} is not a folder or file.")
def __setitem__(self, key: Path, value: Genome) -> None:
"""Setter for GenomeGroup, enforces Path keys and Genome values.
Args:
key: key for the mapping, must be a path
value: the genome
Returns:
None
"""
if not isinstance(key, Path):
raise TypeError("Only Path keys are supported.")
if not isinstance(value, Genome):
raise TypeError("Only Genome values are supported.")
self._store[key] = value
def __getitem__(self, key: Path) -> Genome:
"""Getter for keys from the mapping store."""
return self._store[key]
def __delitem__(self, key: Path) -> None:
"""Delete a key from the mapping store."""
del self._store[key]
def __iter__(self) -> Iterator[Path]:
"""Iterate over the mapping store keys."""
return iter(self._store)
def __len__(self) -> int:
"""Count of keys in the mapping store."""
return len(self._store)
def __repr__(self) -> str:
"""Base mapping store repr."""
return self._store.__repr__()
def items(self) -> ItemsView[Path, Genome]:
"""ItemsView for the mapping store."""
return self._store.items()
def keys(self) -> KeysView[Path]:
"""KeysView of the mapping store."""
return self._store.keys()
def values(self) -> ValuesView[Genome]:
"""ValuesView of the mapping store."""
return self._store.values()
def add_genome(self, genome: Genome) -> None:
"""Add a Genome to the GenomeGroup. Genomes must have a defined ``source_file``.
Args:
genome: the ``Genome`` to add
Returns:
None
Raises:
TypeError: if the ``Genome.source_file`` is not set.
"""
if genome.source_file is None:
raise TypeError("Genome source_file is set to NoneType.")
self.__setitem__(genome.source_file, genome)
def add_file(
self,
source_file: Union[str, Path],
coverage_file: Optional[Union[str, Path]] = Path(".coverage"),
) -> None:
"""Add a ``.py`` source file to the group as a new Genome.
The Genome is created automatically.
Args:
source_file: the source file to add with Genome creation
coverage_file: an optional coverage file to set on the Genome, defaults to ".coverage".
Returns:
None
"""
self.add_genome(Genome(source_file=source_file, coverage_file=coverage_file))
def add_folder(
self,
source_folder: Union[str, Path],
exclude_files: Optional[Iterable[Union[str, Path]]] = None,
ignore_test_files: bool = True,
) -> None:
"""Add a folder (recursively) to the GenomeGroup for all ``.py`` files.
Args:
source_folder: the folder to recursively search
exclude_files: optional iterable of specific files in the source_folder to skip
ignore_test_files: optional flag, default to true, to ignore files prefixed with
``test_`` or suffixed with ``_test`` in the stem of the file name.
Returns:
None, adds all files as Genomes to the group.
Raises:
TypeError: if ``source_folder`` is not a folder.
"""
source_folder = Path(source_folder)
exclude_files = [Path(e).resolve() for e in exclude_files] if exclude_files else set()
if not source_folder.is_dir():
raise TypeError(f"{source_folder} is not a directory.")
for fn in source_folder.rglob("*.py"):
if (fn.stem.startswith("test_") or fn.stem.endswith("_test")) and ignore_test_files:
continue
else:
if fn.resolve() not in exclude_files:
self.add_file(fn)
def set_filter(self, filter_codes: Iterable[str]) -> None:
"""Set the filter codes for all Genomes in the group.
Args:
filter_codes: iterable of 2-letter codes to set on all Genomes in the group.
Returns:
None
"""
for k, v in self.items():
v.filter_codes = set(filter_codes)
def set_coverage(self, coverage_file: Union[str, Path]) -> None:
"""Set a common coverage file for all Genomes in the group.
Args:
coverage_file: the coverage file to set.
Returns:
None
"""
for k, v in self.items():
v.coverage_file = Path(coverage_file)
@property
def targets(self) -> Set[GenomeGroupTarget]:
"""All mutation targets in the group, returned as tuples of ``source_file`` and location
indices in a single set.
Returns:
Set of tuples of ``source_file`` and location index for all targets in the group.
These are ``GenomeGroupTargets`` to make attribute access easier.
"""
targets = set()
for k, v in self.items():
targets.update(set(itertools.product([k], v.targets)))
return {GenomeGroupTarget(*t) for t in targets}
@property
def covered_targets(self) -> Set[GenomeGroupTarget]:
"""All mutation targets in the group that are covered,
returned as tuples of ``source_file`` and location indices in a single set.
Returns:
Set of tuples of ``source_file`` and location index for all covered targets in the
group. These are ``GenomeGroupTargets`` to make attribute access easier.
"""
covered_targets = set()
for k, v in self.items():
covered_targets.update(set(itertools.product([k], v.covered_targets)))
return {GenomeGroupTarget(*c) for c in covered_targets}
| [
1,
529,
276,
1112,
420,
29958,
29923,
3703,
29968,
1022,
1089,
29914,
29885,
13,
15945,
29908,
13,
8787,
13,
5634,
13,
13,
1349,
968,
526,
1880,
3233,
3618,
363,
16254,
292,
411,
4954,
6149,
271,
342,
29952,
1412,
450,
7601,
3618,
3160,
29901,
13,
13,
29896,
29889,
450,
4954,
15462,
608,
16159,
13,
29906,
29889,
450,
4954,
15462,
608,
4782,
16159,
13,
29941,
29889,
450,
4954,
29924,
329,
424,
16159,
13,
13,
16159,
15462,
290,
267,
16159,
526,
22540,
310,
263,
5132,
2752,
775,
934,
29889,
910,
7805,
263,
8954,
310,
13,
1552,
25513,
21306,
15472,
313,
28938,
29897,
322,
278,
14354,
2629,
278,
319,
1254,
393,
1033,
367,
5478,
630,
29889,
450,
13,
2029,
800,
526,
20592,
491,
278,
4954,
5182,
29879,
16159,
322,
4954,
11911,
287,
29918,
5182,
29879,
16159,
4426,
310,
278,
4954,
15462,
608,
29952,
1673,
13,
1552,
7480,
1641,
3625,
565,
263,
23746,
934,
338,
731,
363,
278,
4954,
15462,
608,
29952,
1412,
13,
3524,
800,
526,
9875,
408,
4954,
3524,
3220,
16159,
3618,
515,
4954,
6149,
271,
342,
29889,
9067,
414,
16159,
607,
1122,
367,
13,
20275,
9223,
408,
2702,
3291,
310,
5478,
362,
29889,
13,
13,
16159,
29924,
329,
1934,
16159,
526,
2825,
515,
4954,
15462,
608,
29889,
6149,
403,
2555,
29952,
363,
263,
2702,
4954,
3524,
3220,
16159,
297,
278,
4954,
15462,
608,
16159,
13,
5182,
29879,
29889,
319,
4954,
6149,
424,
16159,
338,
385,
5198,
9246,
4257,
29899,
23583,
411,
599,
310,
278,
8393,
5181,
304,
5478,
403,
13,
1552,
8210,
4954,
1649,
2272,
8173,
1649,
16159,
934,
411,
278,
4954,
3539,
29918,
8173,
2555,
29952,
1158,
29889,
13,
13,
19466,
310,
4954,
15462,
290,
267,
16159,
508,
367,
8745,
1549,
263,
4954,
15462,
608,
4782,
29952,
1412,
450,
4954,
15462,
608,
4782,
16159,
8128,
13,
23515,
363,
4444,
5534,
18094,
29892,
23746,
2066,
29892,
322,
20811,
22525,
310,
4954,
3524,
3220,
16159,
3618,
13,
562,
2124,
278,
4333,
310,
4954,
15462,
290,
267,
29952,
1412,
910,
338,
263,
5407,
8954,
746,
16743,
411,
263,
4138,
13,
974,
2999,
2752,
2066,
29889,
13,
15945,
29908,
13,
5215,
8717,
13,
5215,
1053,
1982,
13,
5215,
4256,
8504,
13,
5215,
12183,
13,
13,
3166,
16250,
29889,
10736,
1053,
341,
9246,
15845,
13,
3166,
3509,
1053,
6483,
8552,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
313,
13,
1678,
3139,
29892,
13,
1678,
360,
919,
29892,
13,
1678,
25085,
1043,
29892,
13,
1678,
20504,
519,
29892,
13,
1678,
20504,
1061,
29892,
13,
1678,
4813,
952,
1043,
29892,
13,
1678,
341,
20304,
29892,
13,
1678,
405,
2795,
23215,
552,
29892,
13,
1678,
28379,
29892,
13,
1678,
3789,
29892,
13,
1678,
7761,
29892,
13,
1678,
2630,
1041,
1043,
29892,
13,
29897,
13,
13,
3166,
5478,
271,
342,
1053,
7090,
13,
3166,
5478,
271,
342,
29889,
26705,
1053,
17943,
3399,
5072,
29892,
26428,
482,
5072,
13,
3166,
5478,
271,
342,
29889,
9067,
414,
1053,
315,
3040,
29954,
1955,
29059,
29892,
5976,
3220,
29892,
20749,
403,
28938,
13,
13,
13,
14480,
17070,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
20749,
362,
2451,
29898,
2451,
1125,
13,
1678,
9995,
29924,
329,
362,
8960,
1134,
10816,
363,
29635,
267,
297,
5478,
362,
6931,
1213,
15945,
13,
13,
1678,
1209,
13,
13,
13,
1990,
20749,
424,
29898,
22175,
23215,
552,
1125,
13,
1678,
9995,
29924,
329,
424,
5023,
29889,
13,
13,
1678,
20749,
1934,
526,
2825,
1549,
278,
5739,
608,
472,
2702,
22525,
773,
278,
5478,
403,
1158,
29889,
13,
1678,
20749,
1934,
526,
5198,
9246,
322,
508,
367,
3971,
304,
8086,
297,
278,
4954,
1649,
2272,
8173,
1649,
29952,
1412,
13,
13,
1678,
887,
508,
1653,
4954,
29924,
329,
1934,
16159,
773,
4954,
15462,
608,
29889,
6149,
403,
29952,
1673,
322,
769,
4954,
3539,
29918,
8173,
16159,
304,
3394,
304,
13,
1678,
278,
4954,
1649,
2272,
8173,
1649,
29952,
1412,
13,
1678,
9995,
13,
13,
1678,
5478,
424,
29918,
401,
29901,
3139,
13,
1678,
4765,
29918,
1445,
29901,
10802,
13,
1678,
274,
1445,
29901,
10802,
13,
1678,
23466,
29901,
3139,
13,
1678,
2752,
29918,
16202,
29901,
341,
20304,
29961,
710,
29892,
3139,
29962,
13,
1678,
4464,
29901,
938,
13,
1678,
4765,
29918,
13140,
29901,
5976,
3220,
13,
1678,
5478,
362,
29901,
3139,
13,
13,
1678,
822,
2436,
29918,
8173,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
9995,
4391,
278,
7090,
934,
363,
278,
5478,
424,
373,
8086,
297,
4954,
1649,
2272,
8173,
1649,
29952,
1412,
13,
13,
4706,
1222,
15423,
3646,
7090,
2066,
526,
6206,
304,
9801,
5941,
975,
8231,
267,
29889,
13,
13,
4706,
12105,
29901,
2045,
597,
3292,
29889,
510,
29914,
4691,
29914,
29883,
4691,
29914,
10054,
29914,
6207,
29914,
14868,
29914,
2272,
29918,
12198,
29889,
2272,
29937,
29931,
29896,
29945,
29955,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
29892,
10017,
278,
7090,
934,
373,
8086,
29889,
13,
4706,
9995,
13,
4706,
7090,
29889,
3198,
29918,
8173,
29918,
262,
18157,
29918,
8513,
580,
13,
13,
4706,
7023,
401,
353,
1053,
1982,
3032,
8704,
29918,
23176,
3032,
401,
29918,
517,
29918,
16394,
29918,
2272,
29883,
29898,
29871,
396,
1134,
29901,
11455,
13,
9651,
1583,
29889,
6149,
424,
29918,
401,
29892,
1583,
29889,
4993,
29918,
16202,
3366,
29885,
2230,
12436,
1583,
29889,
4993,
29918,
16202,
3366,
2311,
3108,
13,
4706,
1723,
13,
13,
4706,
7090,
29889,
5992,
29918,
735,
15423,
29918,
8173,
29918,
5325,
29898,
1311,
29889,
4351,
29918,
1445,
29897,
13,
13,
4706,
7090,
29889,
3258,
29918,
8173,
29918,
3972,
29879,
29898,
1311,
29889,
29883,
1445,
29897,
13,
13,
4706,
25401,
17070,
29889,
8382,
703,
29956,
768,
292,
5478,
424,
7090,
934,
29901,
1273,
29879,
613,
1583,
29889,
29883,
1445,
29897,
13,
4706,
1053,
1982,
3032,
8704,
29918,
23176,
3032,
3539,
29918,
21641,
29898,
1311,
29889,
29883,
1445,
29892,
7023,
401,
29892,
1583,
29889,
8513,
29897,
29871,
396,
1134,
29901,
11455,
13,
13,
13,
1990,
5739,
608,
29901,
13,
1678,
9995,
1576,
5739,
608,
770,
16612,
278,
2752,
934,
304,
367,
5478,
630,
29889,
13,
13,
1678,
450,
770,
16612,
263,
2323,
869,
2272,
934,
322,
756,
4426,
363,
278,
9846,
5877,
5447,
313,
28938,
29897,
13,
1678,
322,
278,
3516,
519,
5478,
362,
22525,
29889,
887,
508,
11905,
1728,
738,
6273,
29889,
960,
278,
13,
1678,
4954,
4993,
29918,
1445,
16159,
338,
3939,
278,
8717,
322,
22525,
4426,
674,
367,
337,
15807,
630,
363,
393,
934,
29889,
13,
13,
1678,
5976,
800,
297,
278,
5739,
608,
1122,
367,
5478,
630,
322,
3971,
304,
278,
4954,
1649,
2272,
8173,
1649,
16159,
773,
278,
5478,
403,
13,
1678,
1158,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
2752,
29918,
1445,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
5262,
353,
6213,
29892,
13,
4706,
23746,
29918,
1445,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
5262,
353,
10802,
17350,
11911,
482,
4968,
13,
4706,
4175,
29918,
18137,
29901,
28379,
29961,
13463,
519,
29961,
710,
5262,
353,
6213,
29892,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
9995,
6644,
6646,
278,
5739,
608,
29889,
13,
13,
4706,
1670,
526,
7463,
4426,
10944,
287,
411,
385,
23400,
3221,
1304,
363,
278,
17366,
17983,
13,
4706,
310,
278,
319,
1254,
322,
5478,
362,
22525,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2752,
29918,
1445,
29901,
385,
13136,
2752,
934,
2224,
13,
9651,
23746,
29918,
1445,
29901,
23746,
934,
363,
21166,
10664,
3454,
29892,
13,
18884,
2322,
995,
338,
731,
304,
11393,
11911,
482,
1642,
13,
9651,
4175,
29918,
18137,
29901,
29871,
29906,
29899,
15670,
7663,
11561,
304,
4175,
4133,
22525,
13,
4706,
9995,
13,
4706,
396,
21582,
411,
385,
23400,
3221,
10944,
526,
1304,
363,
1887,
22488,
322,
526,
451,
8688,
13,
4706,
396,
304,
367,
9120,
4153,
29889,
13,
4706,
396,
6376,
630,
304,
2752,
2066,
29892,
319,
1254,
29892,
22525,
13,
4706,
1583,
3032,
4993,
29918,
1445,
353,
6213,
13,
4706,
1583,
3032,
579,
29901,
28379,
29961,
579,
29889,
7355,
29962,
353,
6213,
13,
4706,
1583,
3032,
5182,
29879,
29901,
28379,
29961,
2697,
29961,
3524,
3220,
5262,
353,
6213,
13,
13,
4706,
396,
6376,
630,
304,
23746,
21166,
13,
4706,
1583,
3032,
11911,
482,
29918,
1445,
353,
6213,
13,
4706,
1583,
3032,
11911,
287,
29918,
5182,
29879,
29901,
28379,
29961,
2697,
29961,
3524,
3220,
5262,
353,
6213,
13,
13,
4706,
396,
6376,
630,
304,
7663,
775,
21166,
29892,
451,
22152,
541,
3913,
263,
731,
357,
363,
2854,
995,
12747,
13,
4706,
1583,
3032,
4572,
29918,
18137,
29901,
3789,
29961,
710,
29962,
353,
731,
580,
13,
13,
4706,
396,
25455,
731,
1819,
773,
4426,
13,
4706,
396,
4525,
1122,
367,
731,
2678,
322,
2821,
278,
22152,
1819,
297,
278,
731,
2153,
13,
4706,
1583,
29889,
4993,
29918,
1445,
353,
10802,
29898,
4993,
29918,
1445,
29897,
565,
2752,
29918,
1445,
1683,
6213,
13,
4706,
1583,
29889,
11911,
482,
29918,
1445,
353,
10802,
29898,
11911,
482,
29918,
1445,
29897,
565,
23746,
29918,
1445,
1683,
6213,
13,
4706,
1583,
29889,
4572,
29918,
18137,
29901,
3789,
29961,
710,
29962,
353,
731,
29898,
4572,
29918,
18137,
29897,
565,
4175,
29918,
18137,
1683,
731,
580,
13,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
1678,
396,
315,
3040,
29954,
18929,
383,
6227,
4945,
4810,
2287,
29903,
13756,
13171,
24301,
2890,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4175,
29918,
18137,
29898,
1311,
29897,
1599,
3789,
29961,
710,
5387,
13,
4706,
9995,
5072,
11561,
7436,
304,
22525,
322,
10664,
22525,
1213,
15945,
13,
4706,
736,
1583,
3032,
4572,
29918,
18137,
13,
13,
1678,
732,
4572,
29918,
18137,
29889,
842,
357,
13,
1678,
822,
4175,
29918,
18137,
29898,
1311,
29892,
995,
29901,
20504,
519,
29961,
710,
2314,
1599,
6213,
29901,
13,
4706,
9995,
22304,
363,
4175,
11561,
29889,
4525,
526,
2337,
7436,
746,
731,
373,
278,
5739,
608,
29889,
13,
13,
4706,
3789,
445,
304,
385,
4069,
731,
304,
3349,
599,
7663,
775,
18094,
515,
4133,
22525,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
995,
29901,
263,
731,
310,
29871,
29906,
29899,
15670,
11561,
29892,
671,
263,
731,
310,
263,
2323,
775,
565,
4312,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
7865,
2392,
29901,
565,
278,
29871,
29906,
29899,
15670,
11561,
297,
995,
526,
451,
6969,
491,
278,
4327,
261,
29889,
13,
4706,
9995,
13,
4706,
995,
29892,
2854,
29918,
18137,
353,
731,
29898,
1767,
511,
731,
29898,
29907,
3040,
29954,
1955,
29059,
29889,
5975,
3101,
13,
4706,
565,
451,
995,
29889,
790,
431,
842,
29898,
3084,
29918,
18137,
1125,
13,
9651,
12020,
7865,
2392,
29898,
13,
18884,
285,
29908,
13919,
7663,
11561,
29901,
426,
1767,
448,
2854,
29918,
18137,
1836,
29905,
29876,
7211,
11561,
29901,
426,
29907,
3040,
29954,
1955,
29059,
5038,
13,
9651,
1723,
13,
4706,
1583,
3032,
4572,
29918,
18137,
353,
995,
13,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
1678,
396,
7791,
4574,
4741,
24080,
13756,
13171,
24301,
2890,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2752,
29918,
1445,
29898,
1311,
29897,
1599,
28379,
29961,
2605,
5387,
13,
4706,
9995,
1576,
2752,
869,
2272,
934,
9875,
491,
445,
5739,
608,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
450,
4954,
4993,
29918,
1445,
16159,
2224,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
4993,
29918,
1445,
13,
13,
1678,
732,
4993,
29918,
1445,
29889,
842,
357,
13,
1678,
822,
2752,
29918,
1445,
29898,
1311,
29892,
995,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
24960,
1599,
6213,
29901,
13,
4706,
9995,
22304,
363,
278,
2752,
29918,
1445,
393,
4531,
1503,
278,
319,
1254,
322,
22525,
363,
337,
15807,
362,
1213,
15945,
13,
4706,
1583,
3032,
4993,
29918,
1445,
353,
10802,
29898,
1767,
29897,
565,
995,
1683,
6213,
13,
4706,
1583,
3032,
579,
353,
6213,
13,
4706,
1583,
3032,
5182,
29879,
353,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8717,
29898,
1311,
29897,
1599,
8717,
29889,
7355,
29901,
29871,
396,
1134,
29901,
11455,
13,
4706,
9995,
9118,
21306,
15472,
313,
28938,
29897,
8954,
310,
278,
2752,
29918,
1445,
29889,
13,
13,
4706,
910,
338,
22152,
12430,
322,
4784,
565,
278,
2752,
29918,
1445,
338,
3939,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
1459,
8485,
319,
1254,
363,
278,
2752,
934,
29889,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
20948,
29901,
565,
4954,
4993,
29918,
1445,
16159,
338,
451,
731,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
579,
338,
6213,
29901,
13,
9651,
565,
451,
1583,
29889,
4993,
29918,
1445,
29901,
13,
18884,
12020,
20948,
703,
4435,
29918,
1445,
2875,
338,
731,
304,
6213,
1542,
23157,
13,
13,
9651,
411,
1722,
29898,
1311,
29889,
4993,
29918,
1445,
29892,
376,
6050,
1159,
408,
4765,
29918,
5461,
29901,
13,
18884,
1583,
3032,
579,
353,
8717,
29889,
5510,
29898,
4351,
29918,
5461,
29889,
949,
3101,
13,
4706,
736,
1583,
3032,
579,
13,
13,
1678,
732,
6799,
13,
1678,
822,
22525,
29898,
1311,
29897,
1599,
3789,
29961,
3524,
3220,
5387,
13,
4706,
9995,
29963,
29875,
519,
5478,
362,
22525,
2629,
278,
319,
1254,
310,
278,
4954,
4993,
29918,
1445,
29952,
1412,
13,
13,
4706,
910,
338,
22152,
12430,
322,
4784,
565,
278,
2752,
29918,
1445,
338,
3939,
29889,
19916,
292,
338,
451,
13,
4706,
22152,
322,
16058,
738,
931,
278,
4954,
4572,
29918,
18137,
16159,
526,
3939,
29889,
13,
13,
4706,
16969,
29901,
13,
632,
450,
731,
310,
278,
4423,
2380,
3618,
515,
278,
4327,
261,
393,
1033,
367,
13,
632,
7037,
5478,
362,
22525,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
3032,
5182,
29879,
338,
6213,
29901,
13,
9651,
696,
29918,
29885,
579,
353,
20749,
403,
28938,
29898,
13,
18884,
3646,
29918,
13140,
29922,
8516,
29892,
5478,
362,
29922,
8516,
29892,
20623,
29922,
5574,
29892,
4765,
29918,
1445,
29922,
1311,
29889,
4993,
29918,
1445,
13,
9651,
1723,
13,
9651,
696,
29918,
29885,
579,
29889,
1730,
277,
29898,
1311,
29889,
579,
29897,
13,
9651,
1583,
3032,
5182,
29879,
353,
696,
29918,
29885,
579,
29889,
2029,
29879,
13,
13,
4706,
736,
17943,
3399,
5072,
29898,
18137,
29922,
1311,
29889,
4572,
29918,
18137,
467,
4572,
29898,
1311,
3032,
5182,
29879,
29897,
13,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
1678,
396,
4810,
5348,
10461,
383,
6227,
4945,
13756,
13171,
24301,
2890,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
13,
1678,
732,
6799,
13,
1678,
822,
23746,
29918,
1445,
29898,
1311,
29897,
1599,
28379,
29961,
2605,
5387,
13,
4706,
9995,
1576,
869,
11911,
482,
934,
304,
671,
363,
21166,
22525,
1213,
15945,
13,
4706,
736,
1583,
3032,
11911,
482,
29918,
1445,
13,
13,
1678,
732,
11911,
482,
29918,
1445,
29889,
842,
357,
13,
1678,
822,
23746,
29918,
1445,
29898,
1311,
29892,
995,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
24960,
1599,
6213,
29901,
13,
4706,
9995,
22304,
363,
4954,
11911,
482,
29918,
1445,
29952,
1673,
4531,
1503,
278,
22152,
4954,
11911,
287,
29918,
5182,
29879,
16159,
1213,
15945,
13,
4706,
1583,
3032,
11911,
482,
29918,
1445,
353,
10802,
29898,
1767,
29897,
565,
995,
1683,
6213,
13,
4706,
1583,
3032,
11911,
287,
29918,
5182,
29879,
353,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
10664,
29918,
5182,
29879,
29898,
1311,
29897,
1599,
3789,
29961,
3524,
3220,
5387,
13,
4706,
9995,
8667,
29879,
393,
526,
10902,
408,
10664,
2729,
373,
278,
4954,
11911,
482,
29918,
1445,
29952,
1412,
13,
13,
4706,
910,
338,
22152,
12430,
322,
4784,
565,
278,
23746,
29918,
1445,
338,
3939,
29889,
19916,
292,
338,
451,
13,
4706,
22152,
322,
16058,
738,
931,
278,
4175,
29918,
18137,
526,
3939,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
450,
22525,
393,
526,
10664,
29889,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
20948,
29901,
565,
278,
4954,
4993,
29918,
1445,
16159,
470,
4954,
11911,
482,
29918,
1445,
16159,
338,
451,
731,
363,
278,
5739,
608,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
1583,
29889,
4993,
29918,
1445,
29901,
13,
9651,
12020,
20948,
703,
4435,
29918,
1445,
2875,
338,
731,
304,
6213,
1542,
23157,
13,
13,
4706,
565,
451,
1583,
29889,
11911,
482,
29918,
1445,
29901,
13,
9651,
12020,
20948,
703,
29907,
957,
482,
29918,
1445,
2875,
338,
731,
304,
6213,
1542,
23157,
13,
13,
4706,
565,
1583,
3032,
11911,
287,
29918,
5182,
29879,
338,
6213,
29901,
13,
9651,
1583,
3032,
11911,
287,
29918,
5182,
29879,
353,
26428,
482,
5072,
29898,
11911,
482,
29918,
1445,
29922,
1311,
29889,
11911,
482,
29918,
1445,
467,
4572,
29898,
13,
18884,
1583,
29889,
5182,
29879,
29892,
1583,
29889,
4993,
29918,
1445,
13,
9651,
1723,
13,
13,
4706,
736,
17943,
3399,
5072,
29898,
18137,
29922,
1311,
29889,
4572,
29918,
18137,
467,
4572,
29898,
1311,
3032,
11911,
287,
29918,
5182,
29879,
29897,
13,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
1678,
396,
341,
2692,
8098,
341,
2544,
8187,
8452,
13,
1678,
835,
13383,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
13,
1678,
822,
5478,
403,
29898,
1311,
29892,
3646,
29918,
13140,
29901,
5976,
3220,
29892,
5478,
362,
29918,
459,
29901,
3139,
29892,
2436,
29918,
8173,
29901,
6120,
353,
7700,
29897,
1599,
20749,
424,
29901,
13,
4706,
9995,
4391,
263,
5478,
424,
515,
263,
2323,
5976,
3220,
393,
338,
297,
278,
5739,
608,
29889,
13,
13,
4706,
20749,
362,
29918,
459,
1818,
367,
263,
2854,
5478,
362,
363,
278,
3646,
29918,
13140,
5858,
775,
1134,
29889,
13,
4706,
10831,
635,
29892,
671,
2436,
29918,
8173,
304,
2436,
278,
5478,
424,
304,
4954,
1649,
2272,
8173,
1649,
16159,
2729,
373,
278,
17809,
13,
4706,
4423,
472,
278,
931,
310,
11265,
29889,
450,
5739,
608,
319,
1254,
338,
443,
1545,
2164,
491,
5478,
403,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
3646,
29918,
13140,
29901,
278,
3646,
4423,
2380,
313,
14242,
310,
869,
5182,
29879,
29897,
13,
9651,
5478,
362,
29918,
459,
29901,
278,
5478,
362,
5858,
304,
671,
13,
9651,
2436,
29918,
8173,
29901,
13136,
7353,
304,
2436,
304,
4954,
1649,
2272,
8173,
1649,
16159,
13,
13,
4706,
16969,
29901,
13,
9651,
450,
5478,
424,
5023,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
20749,
362,
2451,
29901,
565,
4954,
6149,
362,
29918,
459,
16159,
338,
451,
263,
2854,
5478,
362,
363,
278,
4423,
2380,
29889,
13,
9651,
20948,
29901,
565,
278,
2752,
29918,
1445,
2875,
338,
451,
731,
373,
278,
5739,
608,
29889,
13,
9651,
7865,
2392,
29901,
565,
278,
3646,
29918,
13140,
338,
451,
263,
4509,
310,
5739,
608,
22525,
29889,
13,
4706,
9995,
13,
4706,
1015,
29918,
401,
353,
315,
3040,
29954,
1955,
29059,
29961,
5182,
29918,
13140,
29889,
579,
29918,
1990,
29962,
13,
4706,
2854,
29918,
6149,
800,
353,
17943,
3399,
5072,
29898,
18137,
7607,
459,
29918,
401,
29892,
8106,
3084,
29918,
6149,
800,
13,
13,
4706,
565,
5478,
362,
29918,
459,
451,
297,
2854,
29918,
6149,
800,
29901,
13,
9651,
12020,
20749,
362,
2451,
29898,
13,
18884,
285,
29908,
29912,
6149,
362,
29918,
459,
29913,
338,
451,
263,
4509,
310,
5478,
362,
7663,
426,
459,
29918,
401,
1836,
29905,
29876,
29908,
13,
18884,
285,
29908,
7211,
5478,
800,
363,
426,
459,
29918,
401,
6177,
426,
3084,
29918,
6149,
800,
29913,
1213,
13,
9651,
1723,
13,
13,
4706,
565,
451,
1583,
29889,
4993,
29918,
1445,
29901,
13,
9651,
12020,
20948,
703,
4435,
29918,
1445,
338,
731,
304,
6213,
1542,
1159,
13,
13,
4706,
565,
3646,
29918,
13140,
451,
297,
1583,
29889,
5182,
29879,
29901,
13,
9651,
12020,
7865,
2392,
29898,
29888,
29908,
29912,
5182,
29918,
13140,
29913,
338,
451,
297,
278,
5739,
608,
22525,
23157,
13,
13,
4706,
5478,
424,
29918,
579,
353,
20749,
403,
28938,
29898,
13,
9651,
3646,
29918,
13140,
29922,
5182,
29918,
13140,
29892,
5478,
362,
29922,
6149,
362,
29918,
459,
29892,
4765,
29918,
1445,
29922,
1311,
29889,
4993,
29918,
1445,
29892,
20623,
29922,
8824,
13,
4706,
13742,
1730,
277,
29898,
13,
9651,
6483,
8552,
29898,
1311,
29889,
579,
29897,
29871,
396,
6483,
8552,
304,
4772,
297,
29899,
6689,
21733,
310,
319,
1254,
13,
4706,
1723,
13,
13,
4706,
396,
5706,
7090,
934,
282,
11078,
7672,
262,
708,
363,
5007,
278,
4770,
2272,
8173,
1649,
934,
13,
4706,
23466,
353,
1053,
1982,
29889,
29885,
496,
262,
708,
29889,
4435,
2283,
10036,
29898,
29871,
396,
1134,
29901,
11455,
13,
9651,
9872,
2272,
29918,
12198,
28341,
1583,
29889,
4993,
29918,
1445,
13,
4706,
1723,
13,
13,
4706,
396,
1653,
278,
7090,
2066,
411,
278,
5478,
630,
319,
1254,
13,
4706,
5478,
424,
353,
20749,
424,
29898,
13,
9651,
5478,
424,
29918,
401,
29922,
12198,
29898,
6149,
424,
29918,
579,
29892,
851,
29898,
1311,
29889,
4993,
29918,
1445,
511,
376,
4258,
4968,
13,
9651,
4765,
29918,
1445,
29922,
2605,
29898,
1311,
29889,
4993,
29918,
1445,
511,
13,
9651,
274,
1445,
29922,
2605,
29898,
8173,
29889,
657,
29918,
8173,
29918,
1445,
29918,
2029,
29898,
1311,
29889,
4993,
29918,
1445,
8243,
13,
9651,
23466,
29922,
12657,
29892,
13,
9651,
2752,
29918,
16202,
29922,
12657,
29889,
2084,
29918,
16202,
29898,
1311,
29889,
4993,
29918,
1445,
511,
13,
9651,
4464,
29922,
5215,
1982,
3032,
8704,
29918,
23176,
3032,
28667,
29918,
8513,
29898,
1311,
29889,
4993,
29918,
1445,
511,
29871,
396,
1134,
29901,
11455,
13,
9651,
4765,
29918,
13140,
29922,
5182,
29918,
13140,
29892,
13,
9651,
5478,
362,
29922,
6149,
362,
29918,
459,
29892,
13,
4706,
1723,
13,
13,
4706,
565,
2436,
29918,
8173,
29901,
13,
9651,
5478,
424,
29889,
3539,
29918,
8173,
580,
13,
13,
4706,
736,
5478,
424,
13,
13,
13,
1990,
5739,
608,
4782,
8667,
29898,
22175,
23215,
552,
1125,
13,
1678,
9995,
7895,
363,
22525,
4133,
515,
5739,
608,
4782,
304,
6942,
2752,
2224,
304,
5976,
1204,
29916,
1213,
15945,
13,
13,
1678,
2752,
29918,
2084,
29901,
10802,
13,
1678,
1180,
29918,
13140,
29901,
5976,
3220,
13,
13,
13,
1990,
5739,
608,
4782,
29898,
15211,
15845,
1125,
29871,
396,
1134,
29901,
11455,
13,
1678,
9995,
1576,
5739,
608,
4782,
29901,
263,
341,
9246,
15845,
310,
5739,
290,
267,
363,
6931,
373,
278,
2318,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2752,
29918,
5479,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
5262,
353,
6213,
29897,
1599,
6213,
29901,
13,
4706,
9995,
6644,
6646,
278,
5739,
608,
4782,
29889,
13,
13,
4706,
5739,
608,
4782,
338,
263,
341,
9246,
15845,
4333,
310,
5739,
290,
267,
411,
3342,
4954,
4993,
29918,
1445,
16159,
13,
4706,
14354,
29889,
887,
508,
671,
372,
304,
3394,
3918,
18094,
470,
23746,
2066,
4822,
278,
2318,
322,
13,
4706,
679,
599,
5478,
362,
22525,
363,
278,
2318,
29889,
383,
1025,
414,
322,
2066,
508,
367,
2715,
1549,
3519,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2752,
29918,
5479,
29901,
385,
13136,
4138,
363,
17865,
773,
278,
2322,
6055,
13,
18884,
310,
694,
934,
13489,
1080,
5174,
525,
1688,
29915,
2066,
29889,
1152,
901,
8525,
4127,
29892,
11905,
13,
18884,
278,
770,
322,
769,
671,
278,
421,
1412,
1202,
29918,
12083,
2555,
29952,
1158,
4153,
29889,
13,
4706,
9995,
13,
13,
4706,
396,
7463,
10417,
363,
5739,
290,
267,
29892,
451,
8688,
363,
1513,
21733,
29892,
671,
770,
4426,
13,
4706,
1583,
3032,
8899,
29901,
360,
919,
29961,
2605,
29892,
5739,
608,
29962,
353,
9657,
580,
13,
13,
4706,
565,
2752,
29918,
5479,
338,
451,
6213,
29901,
13,
9651,
2752,
29918,
5479,
353,
10802,
29898,
4993,
29918,
5479,
29897,
13,
13,
9651,
565,
2752,
29918,
5479,
29889,
275,
29918,
3972,
7295,
13,
18884,
1583,
29889,
1202,
29918,
12083,
29898,
4993,
29918,
5479,
29897,
13,
13,
9651,
25342,
2752,
29918,
5479,
29889,
275,
29918,
1445,
7295,
13,
18884,
1583,
29889,
1202,
29918,
1445,
29898,
4993,
29918,
5479,
29897,
13,
13,
9651,
1683,
29901,
13,
18884,
12020,
20948,
29898,
29888,
29908,
29912,
4993,
29918,
5479,
29913,
338,
451,
263,
4138,
470,
934,
23157,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29901,
10802,
29892,
995,
29901,
5739,
608,
29897,
1599,
6213,
29901,
13,
4706,
9995,
22304,
363,
5739,
608,
4782,
29892,
24555,
778,
10802,
6611,
322,
5739,
608,
1819,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
1820,
29901,
1820,
363,
278,
10417,
29892,
1818,
367,
263,
2224,
13,
9651,
995,
29901,
278,
2531,
608,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
1989,
29892,
10802,
1125,
13,
9651,
12020,
20948,
703,
11730,
10802,
6611,
526,
6969,
23157,
13,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
5739,
608,
1125,
13,
9651,
12020,
20948,
703,
11730,
5739,
608,
1819,
526,
6969,
23157,
13,
13,
4706,
1583,
3032,
8899,
29961,
1989,
29962,
353,
995,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
29901,
10802,
29897,
1599,
5739,
608,
29901,
13,
4706,
9995,
2577,
357,
363,
6611,
515,
278,
10417,
3787,
1213,
15945,
13,
4706,
736,
1583,
3032,
8899,
29961,
1989,
29962,
13,
13,
1678,
822,
4770,
6144,
667,
12035,
1311,
29892,
1820,
29901,
10802,
29897,
1599,
6213,
29901,
13,
4706,
9995,
12498,
263,
1820,
515,
278,
10417,
3787,
1213,
15945,
13,
4706,
628,
1583,
3032,
8899,
29961,
1989,
29962,
13,
13,
1678,
822,
4770,
1524,
12035,
1311,
29897,
1599,
20504,
1061,
29961,
2605,
5387,
13,
4706,
9995,
13463,
403,
975,
278,
10417,
3787,
6611,
1213,
15945,
13,
4706,
736,
4256,
29898,
1311,
3032,
8899,
29897,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
3981,
310,
6611,
297,
278,
10417,
3787,
1213,
15945,
13,
4706,
736,
7431,
29898,
1311,
3032,
8899,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
5160,
10417,
3787,
2062,
1213,
15945,
13,
4706,
736,
1583,
3032,
8899,
17255,
276,
558,
1649,
580,
13,
13,
1678,
822,
4452,
29898,
1311,
29897,
1599,
25085,
1043,
29961,
2605,
29892,
5739,
608,
5387,
13,
4706,
9995,
6913,
1043,
363,
278,
10417,
3787,
1213,
15945,
13,
4706,
736,
1583,
3032,
8899,
29889,
7076,
580,
13,
13,
1678,
822,
6611,
29898,
1311,
29897,
1599,
4813,
952,
1043,
29961,
2605,
5387,
13,
4706,
9995,
15506,
1043,
310,
278,
10417,
3787,
1213,
15945,
13,
4706,
736,
1583,
3032,
8899,
29889,
8149,
580,
13,
13,
1678,
822,
1819,
29898,
1311,
29897,
1599,
2630,
1041,
1043,
29961,
15462,
608,
5387,
13,
4706,
9995,
9065,
1043,
310,
278,
10417,
3787,
1213,
15945,
13,
4706,
736,
1583,
3032,
8899,
29889,
5975,
580,
13,
13,
1678,
822,
788,
29918,
1885,
608,
29898,
1311,
29892,
2531,
608,
29901,
5739,
608,
29897,
1599,
6213,
29901,
13,
4706,
9995,
2528,
263,
5739,
608,
304,
278,
5739,
608,
4782,
29889,
5739,
290,
267,
1818,
505,
263,
3342,
4954,
4993,
29918,
1445,
29952,
1412,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2531,
608,
29901,
278,
4954,
15462,
608,
16159,
304,
788,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
20948,
29901,
565,
278,
4954,
15462,
608,
29889,
4993,
29918,
1445,
16159,
338,
451,
731,
29889,
13,
4706,
9995,
13,
4706,
565,
2531,
608,
29889,
4993,
29918,
1445,
338,
6213,
29901,
13,
9651,
12020,
20948,
703,
15462,
608,
2752,
29918,
1445,
338,
731,
304,
6213,
1542,
23157,
13,
4706,
1583,
17255,
842,
667,
12035,
1885,
608,
29889,
4993,
29918,
1445,
29892,
2531,
608,
29897,
13,
13,
1678,
822,
788,
29918,
1445,
29898,
13,
4706,
1583,
29892,
13,
4706,
2752,
29918,
1445,
29901,
7761,
29961,
710,
29892,
10802,
1402,
13,
4706,
23746,
29918,
1445,
29901,
28379,
29961,
19986,
29961,
710,
29892,
10802,
5262,
353,
10802,
17350,
11911,
482,
4968,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
9995,
2528,
263,
421,
1412,
2272,
16159,
2752,
934,
304,
278,
2318,
408,
263,
716,
5739,
608,
29889,
13,
4706,
450,
5739,
608,
338,
2825,
6336,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2752,
29918,
1445,
29901,
278,
2752,
934,
304,
788,
411,
5739,
608,
11265,
13,
9651,
23746,
29918,
1445,
29901,
385,
13136,
23746,
934,
304,
731,
373,
278,
5739,
608,
29892,
21274,
304,
11393,
11911,
482,
1642,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
9995,
13,
4706,
1583,
29889,
1202,
29918,
1885,
608,
29898,
15462,
608,
29898,
4993,
29918,
1445,
29922,
4993,
29918,
1445,
29892,
23746,
29918,
1445,
29922,
11911,
482,
29918,
1445,
876,
13,
13,
1678,
822,
788,
29918,
12083,
29898,
13,
4706,
1583,
29892,
13,
4706,
2752,
29918,
12083,
29901,
7761,
29961,
710,
29892,
10802,
1402,
13,
4706,
19060,
29918,
5325,
29901,
28379,
29961,
13463,
519,
29961,
19986,
29961,
710,
29892,
10802,
5262,
29962,
353,
6213,
29892,
13,
4706,
11455,
29918,
1688,
29918,
5325,
29901,
6120,
353,
5852,
29892,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
9995,
2528,
263,
4138,
313,
3757,
1295,
3598,
29897,
304,
278,
5739,
608,
4782,
363,
599,
421,
1412,
2272,
16159,
2066,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
2752,
29918,
12083,
29901,
278,
4138,
304,
8304,
3598,
2740,
13,
9651,
19060,
29918,
5325,
29901,
13136,
4256,
519,
310,
2702,
2066,
297,
278,
2752,
29918,
12083,
304,
14383,
13,
9651,
11455,
29918,
1688,
29918,
5325,
29901,
13136,
7353,
29892,
2322,
304,
1565,
29892,
304,
11455,
2066,
10944,
287,
411,
13,
18884,
4954,
1688,
29918,
16159,
470,
9378,
11925,
411,
4954,
29918,
1688,
16159,
297,
278,
20805,
310,
278,
934,
1024,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
29892,
12778,
599,
2066,
408,
5739,
290,
267,
304,
278,
2318,
29889,
13,
13,
4706,
390,
1759,
267,
29901,
13,
9651,
20948,
29901,
565,
4954,
4993,
29918,
12083,
16159,
338,
451,
263,
4138,
29889,
13,
4706,
9995,
13,
4706,
2752,
29918,
12083,
353,
10802,
29898,
4993,
29918,
12083,
29897,
13,
4706,
19060,
29918,
5325,
353,
518,
2605,
29898,
29872,
467,
17863,
580,
363,
321,
297,
19060,
29918,
5325,
29962,
565,
19060,
29918,
5325,
1683,
731,
580,
13,
13,
4706,
565,
451,
2752,
29918,
12083,
29889,
275,
29918,
3972,
7295,
13,
9651,
12020,
20948,
29898,
29888,
29908,
29912,
4993,
29918,
12083,
29913,
338,
451,
263,
3884,
23157,
13,
13,
4706,
363,
7876,
297,
2752,
29918,
12083,
29889,
11007,
2127,
703,
10521,
2272,
29908,
1125,
13,
9651,
565,
313,
9144,
29889,
303,
331,
29889,
27382,
2541,
703,
1688,
29918,
1159,
470,
7876,
29889,
303,
331,
29889,
1975,
2541,
703,
29918,
1688,
5783,
322,
11455,
29918,
1688,
29918,
5325,
29901,
13,
18884,
6773,
13,
9651,
1683,
29901,
13,
18884,
565,
7876,
29889,
17863,
580,
451,
297,
19060,
29918,
5325,
29901,
13,
462,
1678,
1583,
29889,
1202,
29918,
1445,
29898,
9144,
29897,
13,
13,
1678,
822,
731,
29918,
4572,
29898,
1311,
29892,
4175,
29918,
18137,
29901,
20504,
519,
29961,
710,
2314,
1599,
6213,
29901,
13,
4706,
9995,
2697,
278,
4175,
11561,
363,
599,
5739,
290,
267,
297,
278,
2318,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
4175,
29918,
18137,
29901,
4256,
519,
310,
29871,
29906,
29899,
15670,
11561,
304,
731,
373,
599,
5739,
290,
267,
297,
278,
2318,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
9995,
13,
4706,
363,
413,
29892,
325,
297,
1583,
29889,
7076,
7295,
13,
9651,
325,
29889,
4572,
29918,
18137,
353,
731,
29898,
4572,
29918,
18137,
29897,
13,
13,
1678,
822,
731,
29918,
11911,
482,
29898,
1311,
29892,
23746,
29918,
1445,
29901,
7761,
29961,
710,
29892,
10802,
2314,
1599,
6213,
29901,
13,
4706,
9995,
2697,
263,
3619,
23746,
934,
363,
599,
5739,
290,
267,
297,
278,
2318,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
23746,
29918,
1445,
29901,
278,
23746,
934,
304,
731,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
9995,
13,
4706,
363,
413,
29892,
325,
297,
1583,
29889,
7076,
7295,
13,
9651,
325,
29889,
11911,
482,
29918,
1445,
353,
10802,
29898,
11911,
482,
29918,
1445,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
22525,
29898,
1311,
29897,
1599,
3789,
29961,
15462,
608,
4782,
8667,
5387,
13,
4706,
9995,
3596,
5478,
362,
22525,
297,
278,
2318,
29892,
4133,
408,
5291,
2701,
310,
4954,
4993,
29918,
1445,
16159,
322,
4423,
13,
4706,
16285,
297,
263,
2323,
731,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
3789,
310,
5291,
2701,
310,
4954,
4993,
29918,
1445,
16159,
322,
4423,
2380,
363,
599,
22525,
297,
278,
2318,
29889,
13,
9651,
4525,
526,
4954,
15462,
608,
4782,
8667,
29879,
16159,
304,
1207,
5352,
2130,
6775,
29889,
13,
4706,
9995,
13,
4706,
22525,
353,
731,
580,
13,
4706,
363,
413,
29892,
325,
297,
1583,
29889,
7076,
7295,
13,
9651,
22525,
29889,
5504,
29898,
842,
29898,
1524,
8504,
29889,
4704,
4197,
29895,
1402,
325,
29889,
5182,
29879,
4961,
13,
4706,
736,
426,
15462,
608,
4782,
8667,
10456,
29873,
29897,
363,
260,
297,
22525,
29913,
13,
13,
1678,
732,
6799,
13,
1678,
822,
10664,
29918,
5182,
29879,
29898,
1311,
29897,
1599,
3789,
29961,
15462,
608,
4782,
8667,
5387,
13,
4706,
9995,
3596,
5478,
362,
22525,
297,
278,
2318,
393,
526,
10664,
29892,
13,
4706,
4133,
408,
5291,
2701,
310,
4954,
4993,
29918,
1445,
16159,
322,
4423,
16285,
297,
263,
2323,
731,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
3789,
310,
5291,
2701,
310,
4954,
4993,
29918,
1445,
16159,
322,
4423,
2380,
363,
599,
10664,
22525,
297,
278,
13,
9651,
2318,
29889,
4525,
526,
4954,
15462,
608,
4782,
8667,
29879,
16159,
304,
1207,
5352,
2130,
6775,
29889,
13,
4706,
9995,
13,
4706,
10664,
29918,
5182,
29879,
353,
731,
580,
13,
4706,
363,
413,
29892,
325,
297,
1583,
29889,
7076,
7295,
13,
9651,
10664,
29918,
5182,
29879,
29889,
5504,
29898,
842,
29898,
1524,
8504,
29889,
4704,
4197,
29895,
1402,
325,
29889,
11911,
287,
29918,
5182,
29879,
4961,
13,
4706,
736,
426,
15462,
608,
4782,
8667,
10456,
29883,
29897,
363,
274,
297,
10664,
29918,
5182,
29879,
29913,
13,
2
] |
learntools/python/utils.py | sfrias/learntools | 1 | 70589 | def backtickify(s):
return '`{}`'.format(s)
def bind_exercises(g, exercises, start=1):
for i, ex in enumerate(exercises):
qno = i + start
varname = 'q{}'.format(qno)
assert varname not in g
g[varname] = ex
yield varname
| [
1,
822,
1250,
24667,
1598,
29898,
29879,
1125,
13,
1678,
736,
525,
29952,
8875,
29952,
4286,
4830,
29898,
29879,
29897,
13,
13,
1753,
7868,
29918,
735,
261,
3476,
267,
29898,
29887,
29892,
24472,
3476,
267,
29892,
1369,
29922,
29896,
1125,
13,
1678,
363,
474,
29892,
429,
297,
26985,
29898,
735,
261,
3476,
267,
1125,
13,
4706,
3855,
1217,
353,
474,
718,
1369,
13,
4706,
722,
978,
353,
525,
29939,
8875,
4286,
4830,
29898,
29939,
1217,
29897,
13,
4706,
4974,
722,
978,
451,
297,
330,
13,
4706,
330,
29961,
1707,
978,
29962,
353,
429,
13,
4706,
7709,
722,
978,
13,
2
] |
auto_process_ngs/test/commands/test_clone_cmd.py | fls-bioinformatics-core/auto_process_ngs | 5 | 124493 | #######################################################################
# Tests for clone_cmd.py module
#######################################################################
import unittest
import tempfile
import shutil
import os
from auto_process_ngs.auto_processor import AutoProcess
from auto_process_ngs.mock import MockAnalysisDirFactory
from auto_process_ngs.mock import UpdateAnalysisDir
from auto_process_ngs.metadata import AnalysisDirParameters
from auto_process_ngs.commands.clone_cmd import clone
# Set to False to keep test output dirs
REMOVE_TEST_OUTPUTS = True
class TestAutoProcessClone(unittest.TestCase):
"""
Tests for AutoProcess.clone
"""
def setUp(self):
# Create a temp working dir
self.dirn = tempfile.mkdtemp(suffix='TestAutoProcessClone')
# Store original location so we can get back at the end
self.pwd = os.getcwd()
# Move to working dir
os.chdir(self.dirn)
# Placeholders for test objects
self.ap = None
def tearDown(self):
# Delete autoprocessor object
if self.ap is not None:
del(self.ap)
# Return to original dir
os.chdir(self.pwd)
# Remove the temporary test directory
if REMOVE_TEST_OUTPUTS:
shutil.rmtree(self.dirn)
def test_clone_analysis_dir(self):
"""
clone: copies an analysis directory using symlinks
"""
# Make a source analysis dir
analysis_dir = MockAnalysisDirFactory.bcl2fastq2(
"190116_M01234_0002_AXYZ123",
platform="miseq",
paired_end=True,
no_lane_splitting=False,
include_stats_files=True,
top_dir=self.dirn)
analysis_dir.create()
ap = AutoProcess(analysis_dir.dirn)
UpdateAnalysisDir(ap).add_processing_report()
ap.add_directory("primary_data/190116_M01234_0002_AXYZ123")
# Make a copy
clone_dir = os.path.join(self.dirn,"190116_M01234_0002_AXYZ123_copy")
self.assertFalse(os.path.exists(clone_dir))
clone(ap,clone_dir)
self.assertTrue(os.path.isdir(clone_dir))
# Check contents
for subdir in ('logs','ScriptCode'):
d = os.path.join(clone_dir,subdir)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % subdir)
for filen in ('SampleSheet.orig.csv',
'custom_SampleSheet.csv',
'auto_process.info',
'metadata.info',
'statistics.info',
'statistics_full.info',
'per_lane_statistics.info',
'per_lane_sample_stats.info',
'processing_qc.html',):
f = os.path.join(clone_dir,filen)
self.assertTrue(os.path.isfile(f),"Missing '%s'" % filen)
# Check unaligned
unaligned = os.path.join(clone_dir,'bcl2fastq')
self.assertTrue(os.path.islink(unaligned))
# Check primary data
primary_data = os.path.join(clone_dir,
'primary_data',
'190116_M01234_0002_AXYZ123')
self.assertTrue(os.path.islink(primary_data))
# Check projects
for proj in ('AB','CDE','undetermined'):
d = os.path.join(clone_dir,proj)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % proj)
# Check parameters
params = AnalysisDirParameters(filen=os.path.join(
clone_dir,
'auto_process.info'))
self.assertEqual(params.sample_sheet,
os.path.join(clone_dir,"custom_SampleSheet.csv"))
self.assertEqual(params.primary_data_dir,
os.path.join(clone_dir,"primary_data"))
def test_clone_analysis_dir_copy_fastqs(self):
"""
clone: copies an analysis directory
"""
# Make a source analysis dir
analysis_dir = MockAnalysisDirFactory.bcl2fastq2(
"190116_M01234_0002_AXYZ123",
platform="miseq",
paired_end=True,
no_lane_splitting=False,
include_stats_files=True,
top_dir=self.dirn)
analysis_dir.create()
ap = AutoProcess(analysis_dir.dirn)
UpdateAnalysisDir(ap).add_processing_report()
ap.add_directory("primary_data/190116_M01234_0002_AXYZ123")
# Make a copy
clone_dir = os.path.join(self.dirn,"190116_M01234_0002_AXYZ123_copy")
self.assertFalse(os.path.exists(clone_dir))
clone(ap,clone_dir,copy_fastqs=True)
self.assertTrue(os.path.isdir(clone_dir))
# Check contents
for subdir in ('logs','ScriptCode'):
d = os.path.join(clone_dir,subdir)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % subdir)
for filen in ('SampleSheet.orig.csv',
'custom_SampleSheet.csv',
'auto_process.info',
'metadata.info',
'statistics.info',
'statistics_full.info',
'per_lane_statistics.info',
'per_lane_sample_stats.info',
'processing_qc.html',):
f = os.path.join(clone_dir,filen)
self.assertTrue(os.path.isfile(f),"Missing '%s'" % filen)
# Check unaligned
unaligned = os.path.join(clone_dir,'bcl2fastq')
self.assertTrue(os.path.isdir(unaligned))
# Check primary data
primary_data = os.path.join(clone_dir,
'primary_data',
'190116_M01234_0002_AXYZ123')
self.assertTrue(os.path.islink(primary_data))
# Check projects
for proj in ('AB','CDE','undetermined'):
d = os.path.join(clone_dir,proj)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % proj)
# Check parameters
params = AnalysisDirParameters(filen=os.path.join(
clone_dir,
'auto_process.info'))
self.assertEqual(params.sample_sheet,
os.path.join(clone_dir,"custom_SampleSheet.csv"))
self.assertEqual(params.primary_data_dir,
os.path.join(clone_dir,"primary_data"))
def test_clone_analysis_dir_no_projects(self):
"""
clone: copies an analysis directory excluding projects
"""
# Make a source analysis dir
analysis_dir = MockAnalysisDirFactory.bcl2fastq2(
"190116_M01234_0002_AXYZ123",
platform="miseq",
paired_end=True,
no_lane_splitting=False,
include_stats_files=True,
top_dir=self.dirn)
analysis_dir.create()
ap = AutoProcess(analysis_dir.dirn)
UpdateAnalysisDir(ap).add_processing_report()
ap.add_directory("primary_data/190116_M01234_0002_AXYZ123")
# Make a copy
clone_dir = os.path.join(self.dirn,"190116_M01234_0002_AXYZ123_copy")
self.assertFalse(os.path.exists(clone_dir))
clone(ap,clone_dir,exclude_projects=True)
self.assertTrue(os.path.isdir(clone_dir))
# Check contents
for subdir in ('logs','ScriptCode'):
d = os.path.join(clone_dir,subdir)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % subdir)
for filen in ('SampleSheet.orig.csv',
'custom_SampleSheet.csv',
'auto_process.info',
'metadata.info',
'statistics.info',
'statistics_full.info',
'per_lane_statistics.info',
'per_lane_sample_stats.info',
'processing_qc.html',):
f = os.path.join(clone_dir,filen)
self.assertTrue(os.path.isfile(f),"Missing '%s'" % filen)
# Check unaligned
unaligned = os.path.join(clone_dir,'bcl2fastq')
self.assertTrue(os.path.islink(unaligned))
# Check primary data
primary_data = os.path.join(clone_dir,
'primary_data',
'190116_M01234_0002_AXYZ123')
self.assertTrue(os.path.islink(primary_data))
# Check projects
for proj in ('AB','CDE','undetermined'):
d = os.path.join(clone_dir,proj)
self.assertFalse(os.path.exists(d),"Found '%s'" % proj)
# Check parameters
params = AnalysisDirParameters(filen=os.path.join(
clone_dir,
'auto_process.info'))
self.assertEqual(params.sample_sheet,
os.path.join(clone_dir,"custom_SampleSheet.csv"))
self.assertEqual(params.primary_data_dir,
os.path.join(clone_dir,"primary_data"))
def test_clone_analysis_dir_empty_params(self):
"""
clone: copies an analysis directory when parameter file is empty
"""
# Make a source analysis dir
analysis_dir = MockAnalysisDirFactory.bcl2fastq2(
"190116_M01234_0002_AXYZ123",
platform="miseq",
paired_end=True,
no_lane_splitting=False,
include_stats_files=True,
top_dir=self.dirn)
analysis_dir.create()
ap = AutoProcess(analysis_dir.dirn)
UpdateAnalysisDir(ap).add_processing_report()
ap.add_directory("primary_data/190116_M01234_0002_AXYZ123")
# Remove data from parameter file
parameter_file = ap.parameter_file
tmp_parameter_file = os.path.join(self.dirn,'new_params.tmp')
del(ap)
with open(parameter_file,'r') as fp:
with open(tmp_parameter_file,'w') as fpp:
for line in fp:
line = "%s\t." % line.split('\t')[0]
fpp.write(line)
os.remove(parameter_file)
os.rename(tmp_parameter_file,parameter_file)
ap = AutoProcess(analysis_dir.dirn)
# Make a copy
clone_dir = os.path.join(self.dirn,"190116_M01234_0002_AXYZ123_copy")
self.assertFalse(os.path.exists(clone_dir))
clone(ap,clone_dir,exclude_projects=False)
self.assertTrue(os.path.isdir(clone_dir))
# Check contents
for subdir in ('logs','ScriptCode'):
d = os.path.join(clone_dir,subdir)
self.assertTrue(os.path.isdir(d),"Missing '%s'" % subdir)
for filen in ('SampleSheet.orig.csv',
'custom_SampleSheet.csv',
'auto_process.info',
'metadata.info',
'statistics.info',
'statistics_full.info',
'per_lane_statistics.info',
'per_lane_sample_stats.info',
'processing_qc.html',):
f = os.path.join(clone_dir,filen)
self.assertTrue(os.path.isfile(f),"Missing '%s'" % filen)
# Check unaligned
unaligned = os.path.join(clone_dir,'bcl2fastq')
self.assertTrue(os.path.islink(unaligned))
# Check primary data
primary_data = os.path.join(clone_dir,
'primary_data',
'190116_M01234_0002_AXYZ123')
self.assertFalse(os.path.exists(primary_data))
# Check projects
for proj in ('AB','CDE','undetermined'):
d = os.path.join(clone_dir,proj)
self.assertTrue(os.path.exists(d),"Missing '%s'" % proj)
def test_clone_fails_if_target_dir_exists(self):
"""
clone: raises an exception if target dir already exists
"""
# Make a source analysis dir
analysis_dir = MockAnalysisDirFactory.bcl2fastq2(
"190116_M01234_0002_AXYZ123",
platform="miseq",
paired_end=True,
no_lane_splitting=False,
include_stats_files=True,
top_dir=self.dirn)
analysis_dir.create()
ap = AutoProcess(analysis_dir.dirn)
UpdateAnalysisDir(ap).add_processing_report()
ap.add_directory("primary_data/190116_M01234_0002_AXYZ123")
# Make target dir
clone_dir = os.path.join(self.dirn,"190116_M01234_0002_AXYZ123_copy")
os.mkdir(clone_dir)
# Try to copy source dir
self.assertRaises(Exception,
clone,
ap,clone_dir)
| [
1,
835,
13383,
13383,
13383,
13383,
4136,
13,
29937,
4321,
29879,
363,
17432,
29918,
9006,
29889,
2272,
3883,
13,
13383,
13383,
13383,
13383,
4136,
2277,
29937,
13,
13,
5215,
443,
27958,
13,
5215,
5694,
1445,
13,
5215,
528,
4422,
13,
5215,
2897,
13,
3166,
4469,
29918,
5014,
29918,
865,
29879,
29889,
6921,
29918,
26482,
1053,
11133,
7032,
13,
3166,
4469,
29918,
5014,
29918,
865,
29879,
29889,
17640,
1053,
26297,
21067,
4848,
9170,
5126,
13,
3166,
4469,
29918,
5014,
29918,
865,
29879,
29889,
17640,
1053,
10318,
21067,
4848,
9170,
13,
3166,
4469,
29918,
5014,
29918,
865,
29879,
29889,
19635,
1053,
24352,
9170,
11507,
13,
3166,
4469,
29918,
5014,
29918,
865,
29879,
29889,
26381,
29889,
16513,
29918,
9006,
1053,
17432,
13,
13,
29937,
3789,
304,
7700,
304,
3013,
1243,
1962,
4516,
29879,
13,
1525,
6720,
12064,
29918,
18267,
29918,
12015,
12336,
29903,
353,
5852,
13,
13,
1990,
4321,
12300,
7032,
6821,
650,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
4321,
29879,
363,
11133,
7032,
29889,
16513,
13,
1678,
9995,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
396,
6204,
263,
5694,
1985,
4516,
13,
4706,
1583,
29889,
3972,
29876,
353,
5694,
1445,
29889,
11256,
29881,
7382,
29898,
2146,
600,
861,
2433,
3057,
12300,
7032,
6821,
650,
1495,
13,
4706,
396,
14491,
2441,
4423,
577,
591,
508,
679,
1250,
472,
278,
1095,
13,
4706,
1583,
29889,
29886,
9970,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
4706,
396,
25249,
304,
1985,
4516,
13,
4706,
2897,
29889,
305,
3972,
29898,
1311,
29889,
3972,
29876,
29897,
13,
4706,
396,
15484,
8948,
414,
363,
1243,
3618,
13,
4706,
1583,
29889,
481,
353,
6213,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
396,
21267,
1120,
26555,
985,
272,
1203,
13,
4706,
565,
1583,
29889,
481,
338,
451,
6213,
29901,
13,
9651,
628,
29898,
1311,
29889,
481,
29897,
13,
4706,
396,
7106,
304,
2441,
4516,
13,
4706,
2897,
29889,
305,
3972,
29898,
1311,
29889,
29886,
9970,
29897,
13,
4706,
396,
15154,
278,
13201,
1243,
3884,
13,
4706,
565,
5195,
6720,
12064,
29918,
18267,
29918,
12015,
12336,
29903,
29901,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
1311,
29889,
3972,
29876,
29897,
13,
13,
1678,
822,
1243,
29918,
16513,
29918,
15916,
29918,
3972,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
17432,
29901,
14591,
385,
7418,
3884,
773,
9878,
828,
19363,
13,
4706,
9995,
13,
4706,
396,
8561,
263,
2752,
7418,
4516,
13,
4706,
7418,
29918,
3972,
353,
26297,
21067,
4848,
9170,
5126,
29889,
29890,
695,
29906,
11255,
29939,
29906,
29898,
13,
9651,
376,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
613,
13,
9651,
7481,
543,
29885,
895,
29939,
613,
13,
9651,
3300,
2859,
29918,
355,
29922,
5574,
29892,
13,
9651,
694,
29918,
25821,
29918,
23579,
5367,
29922,
8824,
29892,
13,
9651,
3160,
29918,
16202,
29918,
5325,
29922,
5574,
29892,
13,
9651,
2246,
29918,
3972,
29922,
1311,
29889,
3972,
29876,
29897,
13,
4706,
7418,
29918,
3972,
29889,
3258,
580,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
10318,
21067,
4848,
9170,
29898,
481,
467,
1202,
29918,
19170,
29918,
12276,
580,
13,
4706,
3095,
29889,
1202,
29918,
12322,
703,
16072,
29918,
1272,
29914,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1159,
13,
4706,
396,
8561,
263,
3509,
13,
4706,
17432,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
1699,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
29918,
8552,
1159,
13,
4706,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
16513,
29918,
3972,
876,
13,
4706,
17432,
29898,
481,
29892,
16513,
29918,
3972,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
16513,
29918,
3972,
876,
13,
4706,
396,
5399,
8118,
13,
4706,
363,
1014,
3972,
297,
6702,
20756,
3788,
4081,
3399,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1491,
3972,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
1014,
3972,
29897,
13,
4706,
363,
977,
264,
297,
6702,
17708,
10654,
29889,
12683,
29889,
7638,
742,
13,
462,
418,
525,
6341,
29918,
17708,
10654,
29889,
7638,
742,
13,
462,
418,
525,
6921,
29918,
5014,
29889,
3888,
742,
13,
462,
418,
525,
19635,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29918,
8159,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
11249,
29918,
16202,
29889,
3888,
742,
13,
462,
418,
525,
19170,
29918,
29939,
29883,
29889,
1420,
742,
1125,
13,
9651,
285,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1777,
264,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
1445,
29898,
29888,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
977,
264,
29897,
13,
4706,
396,
5399,
443,
13671,
13,
4706,
443,
13671,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
5501,
29890,
695,
29906,
11255,
29939,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
348,
13671,
876,
13,
4706,
396,
5399,
7601,
848,
13,
4706,
7601,
29918,
1272,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
13,
462,
462,
1678,
525,
16072,
29918,
1272,
742,
13,
462,
462,
1678,
525,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
16072,
29918,
1272,
876,
13,
4706,
396,
5399,
9279,
13,
4706,
363,
410,
29926,
297,
6702,
2882,
3788,
29907,
2287,
3788,
870,
300,
837,
1312,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
20865,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
410,
29926,
29897,
13,
4706,
396,
5399,
4128,
13,
4706,
8636,
353,
24352,
9170,
11507,
29898,
1777,
264,
29922,
359,
29889,
2084,
29889,
7122,
29898,
13,
9651,
17432,
29918,
3972,
29892,
13,
9651,
525,
6921,
29918,
5014,
29889,
3888,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
11249,
29918,
9855,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
6341,
29918,
17708,
10654,
29889,
7638,
5783,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
16072,
29918,
1272,
29918,
3972,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
16072,
29918,
1272,
5783,
13,
13,
1678,
822,
1243,
29918,
16513,
29918,
15916,
29918,
3972,
29918,
8552,
29918,
11255,
29939,
29879,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
17432,
29901,
14591,
385,
7418,
3884,
13,
4706,
9995,
13,
4706,
396,
8561,
263,
2752,
7418,
4516,
13,
4706,
7418,
29918,
3972,
353,
26297,
21067,
4848,
9170,
5126,
29889,
29890,
695,
29906,
11255,
29939,
29906,
29898,
13,
9651,
376,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
613,
13,
9651,
7481,
543,
29885,
895,
29939,
613,
13,
9651,
3300,
2859,
29918,
355,
29922,
5574,
29892,
13,
9651,
694,
29918,
25821,
29918,
23579,
5367,
29922,
8824,
29892,
13,
9651,
3160,
29918,
16202,
29918,
5325,
29922,
5574,
29892,
13,
9651,
2246,
29918,
3972,
29922,
1311,
29889,
3972,
29876,
29897,
13,
4706,
7418,
29918,
3972,
29889,
3258,
580,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
10318,
21067,
4848,
9170,
29898,
481,
467,
1202,
29918,
19170,
29918,
12276,
580,
13,
4706,
3095,
29889,
1202,
29918,
12322,
703,
16072,
29918,
1272,
29914,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1159,
13,
4706,
396,
8561,
263,
3509,
13,
4706,
17432,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
1699,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
29918,
8552,
1159,
13,
4706,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
16513,
29918,
3972,
876,
13,
4706,
17432,
29898,
481,
29892,
16513,
29918,
3972,
29892,
8552,
29918,
11255,
29939,
29879,
29922,
5574,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
16513,
29918,
3972,
876,
13,
4706,
396,
5399,
8118,
13,
4706,
363,
1014,
3972,
297,
6702,
20756,
3788,
4081,
3399,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1491,
3972,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
1014,
3972,
29897,
13,
4706,
363,
977,
264,
297,
6702,
17708,
10654,
29889,
12683,
29889,
7638,
742,
13,
462,
418,
525,
6341,
29918,
17708,
10654,
29889,
7638,
742,
13,
462,
418,
525,
6921,
29918,
5014,
29889,
3888,
742,
13,
462,
418,
525,
19635,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29918,
8159,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
11249,
29918,
16202,
29889,
3888,
742,
13,
462,
418,
525,
19170,
29918,
29939,
29883,
29889,
1420,
742,
1125,
13,
9651,
285,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1777,
264,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
1445,
29898,
29888,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
977,
264,
29897,
13,
4706,
396,
5399,
443,
13671,
13,
4706,
443,
13671,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
5501,
29890,
695,
29906,
11255,
29939,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
348,
13671,
876,
13,
4706,
396,
5399,
7601,
848,
13,
4706,
7601,
29918,
1272,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
13,
462,
462,
1678,
525,
16072,
29918,
1272,
742,
13,
462,
462,
1678,
525,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
16072,
29918,
1272,
876,
13,
4706,
396,
5399,
9279,
13,
4706,
363,
410,
29926,
297,
6702,
2882,
3788,
29907,
2287,
3788,
870,
300,
837,
1312,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
20865,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
410,
29926,
29897,
13,
4706,
396,
5399,
4128,
13,
4706,
8636,
353,
24352,
9170,
11507,
29898,
1777,
264,
29922,
359,
29889,
2084,
29889,
7122,
29898,
13,
9651,
17432,
29918,
3972,
29892,
13,
9651,
525,
6921,
29918,
5014,
29889,
3888,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
11249,
29918,
9855,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
6341,
29918,
17708,
10654,
29889,
7638,
5783,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
16072,
29918,
1272,
29918,
3972,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
16072,
29918,
1272,
5783,
13,
13,
1678,
822,
1243,
29918,
16513,
29918,
15916,
29918,
3972,
29918,
1217,
29918,
16418,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
17432,
29901,
14591,
385,
7418,
3884,
429,
22368,
9279,
13,
4706,
9995,
13,
4706,
396,
8561,
263,
2752,
7418,
4516,
13,
4706,
7418,
29918,
3972,
353,
26297,
21067,
4848,
9170,
5126,
29889,
29890,
695,
29906,
11255,
29939,
29906,
29898,
13,
9651,
376,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
613,
13,
9651,
7481,
543,
29885,
895,
29939,
613,
13,
9651,
3300,
2859,
29918,
355,
29922,
5574,
29892,
13,
9651,
694,
29918,
25821,
29918,
23579,
5367,
29922,
8824,
29892,
13,
9651,
3160,
29918,
16202,
29918,
5325,
29922,
5574,
29892,
13,
9651,
2246,
29918,
3972,
29922,
1311,
29889,
3972,
29876,
29897,
13,
4706,
7418,
29918,
3972,
29889,
3258,
580,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
10318,
21067,
4848,
9170,
29898,
481,
467,
1202,
29918,
19170,
29918,
12276,
580,
13,
4706,
3095,
29889,
1202,
29918,
12322,
703,
16072,
29918,
1272,
29914,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1159,
13,
4706,
396,
8561,
263,
3509,
13,
4706,
17432,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
1699,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
29918,
8552,
1159,
13,
4706,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
16513,
29918,
3972,
876,
13,
4706,
17432,
29898,
481,
29892,
16513,
29918,
3972,
29892,
735,
2325,
29918,
16418,
29922,
5574,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
16513,
29918,
3972,
876,
13,
4706,
396,
5399,
8118,
13,
4706,
363,
1014,
3972,
297,
6702,
20756,
3788,
4081,
3399,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1491,
3972,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
1014,
3972,
29897,
13,
4706,
363,
977,
264,
297,
6702,
17708,
10654,
29889,
12683,
29889,
7638,
742,
13,
462,
418,
525,
6341,
29918,
17708,
10654,
29889,
7638,
742,
13,
462,
418,
525,
6921,
29918,
5014,
29889,
3888,
742,
13,
462,
418,
525,
19635,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29918,
8159,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
11249,
29918,
16202,
29889,
3888,
742,
13,
462,
418,
525,
19170,
29918,
29939,
29883,
29889,
1420,
742,
1125,
13,
9651,
285,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1777,
264,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
1445,
29898,
29888,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
977,
264,
29897,
13,
4706,
396,
5399,
443,
13671,
13,
4706,
443,
13671,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
5501,
29890,
695,
29906,
11255,
29939,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
348,
13671,
876,
13,
4706,
396,
5399,
7601,
848,
13,
4706,
7601,
29918,
1272,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
13,
462,
462,
1678,
525,
16072,
29918,
1272,
742,
13,
462,
462,
1678,
525,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
16072,
29918,
1272,
876,
13,
4706,
396,
5399,
9279,
13,
4706,
363,
410,
29926,
297,
6702,
2882,
3788,
29907,
2287,
3788,
870,
300,
837,
1312,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
20865,
29897,
13,
9651,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
29881,
511,
29908,
9692,
14210,
29879,
11838,
1273,
410,
29926,
29897,
13,
4706,
396,
5399,
4128,
13,
4706,
8636,
353,
24352,
9170,
11507,
29898,
1777,
264,
29922,
359,
29889,
2084,
29889,
7122,
29898,
13,
9651,
17432,
29918,
3972,
29892,
13,
9651,
525,
6921,
29918,
5014,
29889,
3888,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
11249,
29918,
9855,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
6341,
29918,
17708,
10654,
29889,
7638,
5783,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7529,
29889,
16072,
29918,
1272,
29918,
3972,
29892,
13,
462,
308,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
1699,
16072,
29918,
1272,
5783,
13,
13,
1678,
822,
1243,
29918,
16513,
29918,
15916,
29918,
3972,
29918,
6310,
29918,
7529,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
17432,
29901,
14591,
385,
7418,
3884,
746,
3443,
934,
338,
4069,
13,
4706,
9995,
13,
4706,
396,
8561,
263,
2752,
7418,
4516,
13,
4706,
7418,
29918,
3972,
353,
26297,
21067,
4848,
9170,
5126,
29889,
29890,
695,
29906,
11255,
29939,
29906,
29898,
13,
9651,
376,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
613,
13,
9651,
7481,
543,
29885,
895,
29939,
613,
13,
9651,
3300,
2859,
29918,
355,
29922,
5574,
29892,
13,
9651,
694,
29918,
25821,
29918,
23579,
5367,
29922,
8824,
29892,
13,
9651,
3160,
29918,
16202,
29918,
5325,
29922,
5574,
29892,
13,
9651,
2246,
29918,
3972,
29922,
1311,
29889,
3972,
29876,
29897,
13,
4706,
7418,
29918,
3972,
29889,
3258,
580,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
10318,
21067,
4848,
9170,
29898,
481,
467,
1202,
29918,
19170,
29918,
12276,
580,
13,
4706,
3095,
29889,
1202,
29918,
12322,
703,
16072,
29918,
1272,
29914,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1159,
13,
4706,
396,
15154,
848,
515,
3443,
934,
13,
4706,
3443,
29918,
1445,
353,
3095,
29889,
15501,
29918,
1445,
13,
4706,
13128,
29918,
15501,
29918,
1445,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
5501,
1482,
29918,
7529,
29889,
7050,
1495,
13,
4706,
628,
29898,
481,
29897,
13,
4706,
411,
1722,
29898,
15501,
29918,
1445,
5501,
29878,
1495,
408,
285,
29886,
29901,
13,
9651,
411,
1722,
29898,
7050,
29918,
15501,
29918,
1445,
5501,
29893,
1495,
408,
285,
407,
29901,
13,
18884,
363,
1196,
297,
285,
29886,
29901,
13,
462,
1678,
1196,
353,
11860,
29879,
29905,
29873,
1213,
1273,
1196,
29889,
5451,
28909,
29873,
29861,
29900,
29962,
13,
462,
1678,
285,
407,
29889,
3539,
29898,
1220,
29897,
13,
4706,
2897,
29889,
5992,
29898,
15501,
29918,
1445,
29897,
13,
4706,
2897,
29889,
1267,
420,
29898,
7050,
29918,
15501,
29918,
1445,
29892,
15501,
29918,
1445,
29897,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
396,
8561,
263,
3509,
13,
4706,
17432,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
1699,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
29918,
8552,
1159,
13,
4706,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
16513,
29918,
3972,
876,
13,
4706,
17432,
29898,
481,
29892,
16513,
29918,
3972,
29892,
735,
2325,
29918,
16418,
29922,
8824,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
16513,
29918,
3972,
876,
13,
4706,
396,
5399,
8118,
13,
4706,
363,
1014,
3972,
297,
6702,
20756,
3788,
4081,
3399,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1491,
3972,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
1014,
3972,
29897,
13,
4706,
363,
977,
264,
297,
6702,
17708,
10654,
29889,
12683,
29889,
7638,
742,
13,
462,
418,
525,
6341,
29918,
17708,
10654,
29889,
7638,
742,
13,
462,
418,
525,
6921,
29918,
5014,
29889,
3888,
742,
13,
462,
418,
525,
19635,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
6112,
6765,
29918,
8159,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
6112,
6765,
29889,
3888,
742,
13,
462,
418,
525,
546,
29918,
25821,
29918,
11249,
29918,
16202,
29889,
3888,
742,
13,
462,
418,
525,
19170,
29918,
29939,
29883,
29889,
1420,
742,
1125,
13,
9651,
285,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
1777,
264,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
1445,
29898,
29888,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
977,
264,
29897,
13,
4706,
396,
5399,
443,
13671,
13,
4706,
443,
13671,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
5501,
29890,
695,
29906,
11255,
29939,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
275,
2324,
29898,
348,
13671,
876,
13,
4706,
396,
5399,
7601,
848,
13,
4706,
7601,
29918,
1272,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
13,
462,
462,
1678,
525,
16072,
29918,
1272,
742,
13,
462,
462,
1678,
525,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
359,
29889,
2084,
29889,
9933,
29898,
16072,
29918,
1272,
876,
13,
4706,
396,
5399,
9279,
13,
4706,
363,
410,
29926,
297,
6702,
2882,
3788,
29907,
2287,
3788,
870,
300,
837,
1312,
29374,
13,
9651,
270,
353,
2897,
29889,
2084,
29889,
7122,
29898,
16513,
29918,
3972,
29892,
20865,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
359,
29889,
2084,
29889,
9933,
29898,
29881,
511,
29908,
18552,
292,
14210,
29879,
11838,
1273,
410,
29926,
29897,
13,
13,
1678,
822,
1243,
29918,
16513,
29918,
29888,
2234,
29918,
361,
29918,
5182,
29918,
3972,
29918,
9933,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
17432,
29901,
1153,
4637,
385,
3682,
565,
3646,
4516,
2307,
4864,
29871,
13,
4706,
9995,
13,
4706,
396,
8561,
263,
2752,
7418,
4516,
13,
4706,
7418,
29918,
3972,
353,
26297,
21067,
4848,
9170,
5126,
29889,
29890,
695,
29906,
11255,
29939,
29906,
29898,
13,
9651,
376,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
613,
13,
9651,
7481,
543,
29885,
895,
29939,
613,
13,
9651,
3300,
2859,
29918,
355,
29922,
5574,
29892,
13,
9651,
694,
29918,
25821,
29918,
23579,
5367,
29922,
8824,
29892,
13,
9651,
3160,
29918,
16202,
29918,
5325,
29922,
5574,
29892,
13,
9651,
2246,
29918,
3972,
29922,
1311,
29889,
3972,
29876,
29897,
13,
4706,
7418,
29918,
3972,
29889,
3258,
580,
13,
4706,
3095,
353,
11133,
7032,
29898,
15916,
29918,
3972,
29889,
3972,
29876,
29897,
13,
4706,
10318,
21067,
4848,
9170,
29898,
481,
467,
1202,
29918,
19170,
29918,
12276,
580,
13,
4706,
3095,
29889,
1202,
29918,
12322,
703,
16072,
29918,
1272,
29914,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
1159,
13,
4706,
396,
8561,
3646,
4516,
13,
4706,
17432,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29876,
1699,
29896,
29929,
29900,
29896,
29896,
29953,
29918,
29924,
29900,
29896,
29906,
29941,
29946,
29918,
29900,
29900,
29900,
29906,
29918,
6604,
29979,
29999,
29896,
29906,
29941,
29918,
8552,
1159,
13,
4706,
2897,
29889,
11256,
3972,
29898,
16513,
29918,
3972,
29897,
13,
4706,
396,
3967,
304,
3509,
2752,
4516,
13,
4706,
1583,
29889,
9294,
29934,
1759,
267,
29898,
2451,
29892,
13,
462,
3986,
17432,
29892,
13,
462,
3986,
3095,
29892,
16513,
29918,
3972,
29897,
13,
13,
308,
13,
2
] |
pisat/handler/pigpio_digital_input_handler.py | jjj999/pisat | 1 | 57855 |
from typing import Optional
from pisat.util.platform import is_raspberry_pi
from pisat.handler.digital_input_handler_base import DigitalInputHandlerBase
if is_raspberry_pi():
import pigpio
class PigpioDigitalInputHandler(DigitalInputHandlerBase):
def __init__(self,
pi,
pin: int,
pullup: bool = False,
pulldown: bool = False,
name: Optional[str] = None) -> None:
self._pi: pigpio.pi = pi
self._pi.set_mode(pin, pigpio.INPUT)
super().__init__(pin, pullup=pullup, pulldown=pulldown, name=name)
def set_pull_up_down(self, pulldown: bool = False) -> None:
if pulldown:
self._pi.set_pull_up_down(self._pin, pigpio.PUD_DOWN)
else:
self._pi.set_pull_up_down(self._pin, pigpio.PUD_UP)
def clear_pull_up_down(self) -> None:
self._pi.set_pull_up_down(self._pin, pigpio.PUD_DOWN)
def observe(self) -> bool:
return bool(self._pi.read(self._pin))
| [
1,
29871,
13,
3166,
19229,
1053,
28379,
13,
13,
3166,
20066,
271,
29889,
4422,
29889,
12120,
1053,
338,
29918,
3417,
29886,
16344,
29918,
1631,
13,
3166,
20066,
271,
29889,
13789,
29889,
7501,
2410,
29918,
2080,
29918,
13789,
29918,
3188,
1053,
15918,
4290,
4598,
5160,
13,
13,
361,
338,
29918,
3417,
29886,
16344,
29918,
1631,
7295,
13,
1678,
1053,
282,
335,
16168,
13,
13,
13,
1990,
349,
335,
16168,
27103,
4290,
4598,
29898,
27103,
4290,
4598,
5160,
1125,
13,
268,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
29871,
13,
462,
2930,
29892,
13,
462,
12534,
29901,
938,
29892,
13,
462,
8206,
786,
29901,
6120,
353,
7700,
29892,
13,
462,
9505,
430,
776,
29901,
6120,
353,
7700,
29892,
13,
462,
1024,
29901,
28379,
29961,
710,
29962,
353,
6213,
29897,
1599,
6213,
29901,
13,
308,
13,
4706,
1583,
3032,
1631,
29901,
282,
335,
16168,
29889,
1631,
353,
2930,
13,
4706,
1583,
3032,
1631,
29889,
842,
29918,
8513,
29898,
12687,
29892,
282,
335,
16168,
29889,
1177,
12336,
29897,
13,
308,
13,
4706,
2428,
2141,
1649,
2344,
12035,
12687,
29892,
8206,
786,
29922,
26746,
786,
29892,
9505,
430,
776,
29922,
29886,
352,
430,
776,
29892,
1024,
29922,
978,
29897,
13,
268,
13,
1678,
822,
731,
29918,
26746,
29918,
786,
29918,
3204,
29898,
1311,
29892,
9505,
430,
776,
29901,
6120,
353,
7700,
29897,
1599,
6213,
29901,
13,
4706,
565,
9505,
430,
776,
29901,
13,
9651,
1583,
3032,
1631,
29889,
842,
29918,
26746,
29918,
786,
29918,
3204,
29898,
1311,
3032,
12687,
29892,
282,
335,
16168,
29889,
7056,
29928,
29918,
3970,
16048,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
1631,
29889,
842,
29918,
26746,
29918,
786,
29918,
3204,
29898,
1311,
3032,
12687,
29892,
282,
335,
16168,
29889,
7056,
29928,
29918,
4897,
29897,
13,
268,
13,
1678,
822,
2821,
29918,
26746,
29918,
786,
29918,
3204,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
3032,
1631,
29889,
842,
29918,
26746,
29918,
786,
29918,
3204,
29898,
1311,
3032,
12687,
29892,
282,
335,
16168,
29889,
7056,
29928,
29918,
3970,
16048,
29897,
13,
268,
13,
1678,
822,
14111,
29898,
1311,
29897,
1599,
6120,
29901,
13,
4706,
736,
6120,
29898,
1311,
3032,
1631,
29889,
949,
29898,
1311,
3032,
12687,
876,
13,
308,
2
] |
app/util/draw_img.py | Test8888888888/Myblog | 0 | 196411 | from typing import Dict
from PIL import Image, ImageDraw, ImageFont
from io import BytesIO
import requests
import re
class H3blogDrow:
'''自定义图片样式'''
def __init__(self) -> None:
self.width = 800
self.heigth = 400
self.background_img = ''
self.background_color = '#424155'
self.layers = []
self.convas = None
def parse_config(self, config: Dict) -> None:
c = config
self.convas = None
self.width = c.get('width', 800)
self.heigth = c.get('height', 400)
self.background_color = c.get('background_color', '#424155')
self.background_img = c.get('background_img')
layers = c.get('layers', None)
if not layers:
return
self.layers.extend(layers)
def _create_canvas(self) -> None:
self.convas = Image.new('RGB', (self.width, self.heigth), self.background_color)
def draw(self) -> Image:
'''画图'''
# 创建背景设置画布
self._create_canvas()
if self.background_img and len(self.background_img) > 0:
regex = re.compile(
r'^(?:http|ftp)s?://' # http:// or https://
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
r'localhost|' # localhost...
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
r'(?::\d+)?' # optional port
r'(?:/?|[/?]\S+)$', re.IGNORECASE)
m = re.match(regex, self.background_img)
bg_img = None
if m:
resp = requests.get(self.background_img)
_img_bytes = BytesIO()
_img_bytes.write(resp.content)
bg_img = Image.open(_img_bytes)
else:
# 创建背景图片
bg_img = Image.open(self.background_img)
# 将背景图片写入画布
self.convas.paste(bg_img, (0, 0))
for layer in self.layers:
if layer.get('layer_type') == 'text':
self._draw_text(layer)
if layer.get('layer_type') == 'image':
self._draw_image()
return self.convas
def _darw_image(self, layer: dict) -> None:
pass
def _draw_text(self, layer: dict) -> None:
draw = ImageDraw.Draw(self.convas)
_font = layer.get('font')
font = ImageFont.truetype(_font.get('font'), _font.get('size', 36))
align = layer.get('align')
p = tuple()
if align and align == 'center':
f_w, f_h = font.getsize(layer.get('text')) # 获取字体大小
p = ((self.convas.width - f_w) / 2, (self.convas.height - f_h) / 2)
elif align and align == 'top-left':
p = (0, 0)
elif align and align == 'top-right':
f_w, f_h = font.getsize(layer.get('text')) # 获取字体大小
p = (self.convas.width - f_w, 0)
elif align and align == 'bottom-left':
f_w, f_h = font.getsize(layer.get('text')) # 获取字体大小
p = (0, self.convas.height - f_h)
elif align and align == 'bottom-right':
f_w, f_h = font.getsize(layer.get('text')) # 获取字体大小
p = (self.convas.width - f_w, self.convas.height - f_w)
else:
p = tuple([int(i) for i in layer.get('position', '0,0').split(',')])
color = layer.get('color', '0,0,0')
draw.text(p, layer.get('text', ''), fill=color, font=font)
| [
1,
515,
19229,
1053,
360,
919,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
8537,
29892,
7084,
9824,
13,
3166,
12013,
1053,
2648,
2167,
5971,
13,
5215,
7274,
13,
5215,
337,
13,
13,
13,
1990,
379,
29941,
7312,
29928,
798,
29901,
13,
1678,
14550,
30688,
30495,
31349,
30861,
31122,
31819,
30607,
12008,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
2103,
353,
29871,
29947,
29900,
29900,
13,
4706,
1583,
29889,
354,
335,
386,
353,
29871,
29946,
29900,
29900,
13,
4706,
1583,
29889,
7042,
29918,
2492,
353,
6629,
13,
4706,
1583,
29889,
7042,
29918,
2780,
353,
16321,
29946,
29906,
29946,
29896,
29945,
29945,
29915,
13,
4706,
1583,
29889,
29277,
353,
5159,
13,
4706,
1583,
29889,
535,
4428,
353,
6213,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
2295,
29901,
360,
919,
29897,
1599,
6213,
29901,
13,
4706,
274,
353,
2295,
13,
4706,
1583,
29889,
535,
4428,
353,
6213,
13,
4706,
1583,
29889,
2103,
353,
274,
29889,
657,
877,
2103,
742,
29871,
29947,
29900,
29900,
29897,
13,
4706,
1583,
29889,
354,
335,
386,
353,
274,
29889,
657,
877,
3545,
742,
29871,
29946,
29900,
29900,
29897,
13,
4706,
1583,
29889,
7042,
29918,
2780,
353,
274,
29889,
657,
877,
7042,
29918,
2780,
742,
16321,
29946,
29906,
29946,
29896,
29945,
29945,
1495,
13,
4706,
1583,
29889,
7042,
29918,
2492,
353,
274,
29889,
657,
877,
7042,
29918,
2492,
1495,
13,
13,
4706,
15359,
353,
274,
29889,
657,
877,
29277,
742,
6213,
29897,
13,
4706,
565,
451,
15359,
29901,
13,
9651,
736,
13,
4706,
1583,
29889,
29277,
29889,
21843,
29898,
29277,
29897,
13,
13,
1678,
822,
903,
3258,
29918,
15257,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
535,
4428,
353,
7084,
29889,
1482,
877,
28212,
742,
313,
1311,
29889,
2103,
29892,
1583,
29889,
354,
335,
386,
511,
1583,
29889,
7042,
29918,
2780,
29897,
13,
13,
1678,
822,
4216,
29898,
1311,
29897,
1599,
7084,
29901,
13,
4706,
14550,
31046,
30861,
12008,
13,
4706,
396,
29871,
31441,
30886,
235,
134,
143,
31495,
30872,
30669,
31046,
31454,
13,
4706,
1583,
3032,
3258,
29918,
15257,
580,
13,
13,
4706,
565,
1583,
29889,
7042,
29918,
2492,
322,
7431,
29898,
1311,
29889,
7042,
29918,
2492,
29897,
1405,
29871,
29900,
29901,
13,
9651,
6528,
353,
337,
29889,
12198,
29898,
13,
18884,
364,
29915,
29985,
10780,
29901,
1124,
29989,
23102,
29897,
29879,
29973,
597,
29915,
29871,
396,
1732,
597,
470,
2045,
597,
13,
18884,
364,
29915,
10780,
5919,
29973,
10834,
29909,
29899,
29999,
29900,
29899,
29929,
850,
29973,
10834,
29909,
29899,
29999,
29900,
29899,
29929,
29899,
3199,
29900,
29892,
29953,
29896,
4400,
29909,
29899,
29999,
29900,
29899,
29929,
2314,
29973,
29905,
1846,
29974,
10780,
10834,
29909,
29899,
29999,
3199,
29906,
29892,
29953,
1012,
29889,
29973,
29989,
29961,
29909,
29899,
29999,
29900,
29899,
29929,
29899,
3199,
29906,
29892,
1012,
29889,
7897,
29989,
29915,
29871,
396,
5354,
856,
13,
18884,
364,
29915,
7640,
29989,
29915,
29871,
396,
15683,
856,
13,
18884,
364,
12764,
29881,
29912,
29896,
29892,
29941,
1012,
7790,
29881,
29912,
29896,
29892,
29941,
1012,
7790,
29881,
29912,
29896,
29892,
29941,
1012,
7790,
29881,
29912,
29896,
29892,
29941,
1800,
29915,
29871,
396,
2023,
272,
10377,
13,
18884,
364,
29915,
10780,
1057,
29905,
29881,
29974,
6877,
29915,
29871,
396,
13136,
2011,
13,
18884,
364,
29915,
10780,
8419,
29973,
29989,
29961,
13401,
10725,
29903,
29974,
1262,
742,
337,
29889,
6259,
6632,
1525,
23487,
29897,
13,
9651,
286,
353,
337,
29889,
4352,
29898,
13087,
29892,
1583,
29889,
7042,
29918,
2492,
29897,
13,
9651,
25989,
29918,
2492,
353,
6213,
13,
9651,
565,
286,
29901,
13,
18884,
4613,
353,
7274,
29889,
657,
29898,
1311,
29889,
7042,
29918,
2492,
29897,
13,
18884,
903,
2492,
29918,
13193,
353,
2648,
2167,
5971,
580,
13,
18884,
903,
2492,
29918,
13193,
29889,
3539,
29898,
13713,
29889,
3051,
29897,
13,
18884,
25989,
29918,
2492,
353,
7084,
29889,
3150,
7373,
2492,
29918,
13193,
29897,
13,
9651,
1683,
29901,
13,
18884,
396,
29871,
31441,
30886,
235,
134,
143,
31495,
30861,
31122,
13,
18884,
25989,
29918,
2492,
353,
7084,
29889,
3150,
29898,
1311,
29889,
7042,
29918,
2492,
29897,
13,
9651,
396,
29871,
30998,
235,
134,
143,
31495,
30861,
31122,
31479,
30752,
31046,
31454,
13,
9651,
1583,
29889,
535,
4428,
29889,
16179,
29898,
16264,
29918,
2492,
29892,
313,
29900,
29892,
29871,
29900,
876,
13,
13,
4706,
363,
7546,
297,
1583,
29889,
29277,
29901,
13,
9651,
565,
7546,
29889,
657,
877,
13148,
29918,
1853,
1495,
1275,
525,
726,
2396,
13,
18884,
1583,
3032,
4012,
29918,
726,
29898,
13148,
29897,
13,
9651,
565,
7546,
29889,
657,
877,
13148,
29918,
1853,
1495,
1275,
525,
3027,
2396,
13,
18884,
1583,
3032,
4012,
29918,
3027,
580,
13,
13,
4706,
736,
1583,
29889,
535,
4428,
13,
13,
1678,
822,
903,
16702,
29893,
29918,
3027,
29898,
1311,
29892,
7546,
29901,
9657,
29897,
1599,
6213,
29901,
13,
4706,
1209,
13,
13,
1678,
822,
903,
4012,
29918,
726,
29898,
1311,
29892,
7546,
29901,
9657,
29897,
1599,
6213,
29901,
13,
4706,
4216,
353,
7084,
8537,
29889,
8537,
29898,
1311,
29889,
535,
4428,
29897,
13,
4706,
903,
5657,
353,
7546,
29889,
657,
877,
5657,
1495,
13,
4706,
4079,
353,
7084,
9824,
29889,
509,
14484,
668,
7373,
5657,
29889,
657,
877,
5657,
5477,
903,
5657,
29889,
657,
877,
2311,
742,
29871,
29941,
29953,
876,
13,
4706,
7595,
353,
7546,
29889,
657,
877,
2520,
1495,
13,
4706,
282,
353,
18761,
580,
13,
4706,
565,
7595,
322,
7595,
1275,
525,
5064,
2396,
13,
9651,
285,
29918,
29893,
29892,
285,
29918,
29882,
353,
4079,
29889,
657,
2311,
29898,
13148,
29889,
657,
877,
726,
8785,
29871,
396,
29871,
31024,
30683,
30578,
30988,
30257,
30446,
13,
9651,
282,
353,
5135,
1311,
29889,
535,
4428,
29889,
2103,
448,
285,
29918,
29893,
29897,
847,
29871,
29906,
29892,
313,
1311,
29889,
535,
4428,
29889,
3545,
448,
285,
29918,
29882,
29897,
847,
29871,
29906,
29897,
13,
4706,
25342,
7595,
322,
7595,
1275,
525,
3332,
29899,
1563,
2396,
13,
9651,
282,
353,
313,
29900,
29892,
29871,
29900,
29897,
13,
4706,
25342,
7595,
322,
7595,
1275,
525,
3332,
29899,
1266,
2396,
13,
9651,
285,
29918,
29893,
29892,
285,
29918,
29882,
353,
4079,
29889,
657,
2311,
29898,
13148,
29889,
657,
877,
726,
8785,
29871,
396,
29871,
31024,
30683,
30578,
30988,
30257,
30446,
13,
9651,
282,
353,
313,
1311,
29889,
535,
4428,
29889,
2103,
448,
285,
29918,
29893,
29892,
29871,
29900,
29897,
13,
4706,
25342,
7595,
322,
7595,
1275,
525,
8968,
29899,
1563,
2396,
13,
9651,
285,
29918,
29893,
29892,
285,
29918,
29882,
353,
4079,
29889,
657,
2311,
29898,
13148,
29889,
657,
877,
726,
8785,
29871,
396,
29871,
31024,
30683,
30578,
30988,
30257,
30446,
13,
9651,
282,
353,
313,
29900,
29892,
1583,
29889,
535,
4428,
29889,
3545,
448,
285,
29918,
29882,
29897,
13,
4706,
25342,
7595,
322,
7595,
1275,
525,
8968,
29899,
1266,
2396,
13,
9651,
285,
29918,
29893,
29892,
285,
29918,
29882,
353,
4079,
29889,
657,
2311,
29898,
13148,
29889,
657,
877,
726,
8785,
29871,
396,
29871,
31024,
30683,
30578,
30988,
30257,
30446,
13,
9651,
282,
353,
313,
1311,
29889,
535,
4428,
29889,
2103,
448,
285,
29918,
29893,
29892,
1583,
29889,
535,
4428,
29889,
3545,
448,
285,
29918,
29893,
29897,
13,
4706,
1683,
29901,
13,
9651,
282,
353,
18761,
4197,
524,
29898,
29875,
29897,
363,
474,
297,
7546,
29889,
657,
877,
3283,
742,
525,
29900,
29892,
29900,
2824,
5451,
29317,
1495,
2314,
13,
4706,
2927,
353,
7546,
29889,
657,
877,
2780,
742,
525,
29900,
29892,
29900,
29892,
29900,
1495,
13,
4706,
4216,
29889,
726,
29898,
29886,
29892,
7546,
29889,
657,
877,
726,
742,
525,
5477,
5445,
29922,
2780,
29892,
4079,
29922,
5657,
29897,
13,
2
] |
pyhermes/apps/django/management/commands/hermes_test.py | romcheg/pyhermes | 5 | 129419 | <reponame>romcheg/pyhermes
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from pyhermes.exceptions import HermesPublishException
from pyhermes.publisher import publish
from pyhermes.settings import HERMES_SETTINGS
TOPICS_ALL = 'all'
class Command(BaseCommand):
help = "Testing integration with Hermes"
def add_arguments(self, parser):
parser.add_argument(
'-m', '--message',
help='test message',
default='From pyhermes With Love'
)
parser.add_argument(
'-t', '--topic',
help='topic',
default=TOPICS_ALL,
)
def handle(self, *args, **options):
if not HERMES_SETTINGS.ENABLED:
self.stderr.write(
'Hermes integration is disabled. '
'Check HERMES.ENABLED variable '
'in your settings or environment.'
)
return
topic = options.get('topic')
message = options.get('message')
if topic == TOPICS_ALL:
topics = HERMES_SETTINGS.PUBLISHING_TOPICS.keys()
else:
topics = [topic]
for topic in topics:
try:
self.stdout.write('Sending message to {}'.format(topic))
publish(topic, {'result': message})
except HermesPublishException as e:
self.stderr.write(str(e))
else:
self.stdout.write(
'Message was sent successfully to {}!'.format(topic)
)
| [
1,
529,
276,
1112,
420,
29958,
456,
305,
387,
29914,
2272,
29882,
837,
267,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
13,
3166,
11451,
29882,
837,
267,
29889,
11739,
29879,
1053,
10515,
267,
21076,
1674,
2451,
13,
3166,
11451,
29882,
837,
267,
29889,
23679,
261,
1053,
9805,
13,
3166,
11451,
29882,
837,
267,
29889,
11027,
1053,
379,
1001,
2303,
29903,
29918,
10490,
29911,
4214,
29903,
13,
13,
4986,
2227,
9295,
29918,
9818,
353,
525,
497,
29915,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
13,
1678,
1371,
353,
376,
3057,
292,
13465,
411,
10515,
267,
29908,
13,
13,
1678,
822,
788,
29918,
25699,
29898,
1311,
29892,
13812,
1125,
13,
4706,
13812,
29889,
1202,
29918,
23516,
29898,
13,
9651,
17411,
29885,
742,
525,
489,
4906,
742,
13,
9651,
1371,
2433,
1688,
2643,
742,
13,
9651,
2322,
2433,
4591,
11451,
29882,
837,
267,
2973,
8155,
29915,
13,
4706,
1723,
13,
4706,
13812,
29889,
1202,
29918,
23516,
29898,
13,
9651,
17411,
29873,
742,
525,
489,
13010,
742,
13,
9651,
1371,
2433,
13010,
742,
13,
9651,
2322,
29922,
4986,
2227,
9295,
29918,
9818,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
565,
451,
379,
1001,
2303,
29903,
29918,
10490,
29911,
4214,
29903,
29889,
1430,
6181,
29928,
29901,
13,
9651,
1583,
29889,
303,
20405,
29889,
3539,
29898,
13,
18884,
525,
29950,
837,
267,
13465,
338,
12708,
29889,
525,
13,
18884,
525,
5596,
379,
1001,
2303,
29903,
29889,
1430,
6181,
29928,
2286,
525,
13,
18884,
525,
262,
596,
6055,
470,
5177,
6169,
13,
9651,
1723,
13,
9651,
736,
13,
13,
4706,
11261,
353,
3987,
29889,
657,
877,
13010,
1495,
13,
4706,
2643,
353,
3987,
29889,
657,
877,
4906,
1495,
13,
4706,
565,
11261,
1275,
7495,
2227,
9295,
29918,
9818,
29901,
13,
9651,
23820,
353,
379,
1001,
2303,
29903,
29918,
10490,
29911,
4214,
29903,
29889,
7056,
13367,
3235,
29950,
4214,
29918,
4986,
2227,
9295,
29889,
8149,
580,
13,
4706,
1683,
29901,
13,
9651,
23820,
353,
518,
13010,
29962,
13,
13,
4706,
363,
11261,
297,
23820,
29901,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
25393,
29889,
3539,
877,
29903,
2548,
2643,
304,
6571,
4286,
4830,
29898,
13010,
876,
13,
18884,
9805,
29898,
13010,
29892,
11117,
2914,
2396,
2643,
1800,
13,
9651,
5174,
10515,
267,
21076,
1674,
2451,
408,
321,
29901,
13,
18884,
1583,
29889,
303,
20405,
29889,
3539,
29898,
710,
29898,
29872,
876,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
25393,
29889,
3539,
29898,
13,
462,
1678,
525,
3728,
471,
2665,
8472,
304,
6571,
29991,
4286,
4830,
29898,
13010,
29897,
13,
18884,
1723,
13,
2
] |
tests/extra_lib/test.py | burner/pyd | 168 | 1609267 | import os.path, sys
import distutils.util
# Append the directory in which the binaries were placed to Python's sys.path,
# then import the D DLL.
libDir = os.path.join('build', 'lib.%s-%s' % (
distutils.util.get_platform(),
'.'.join(str(v) for v in sys.version_info[:2])
))
sys.path.append(os.path.abspath(libDir))
import hello_w_libs
hello_w_libs.hello()
| [
1,
1053,
2897,
29889,
2084,
29892,
10876,
13,
5215,
1320,
13239,
29889,
4422,
13,
13,
29937,
22871,
278,
3884,
297,
607,
278,
9016,
4314,
892,
7180,
304,
5132,
29915,
29879,
10876,
29889,
2084,
29892,
13,
29937,
769,
1053,
278,
360,
22474,
29889,
13,
1982,
9170,
353,
2897,
29889,
2084,
29889,
7122,
877,
4282,
742,
525,
1982,
29889,
29995,
29879,
19222,
29879,
29915,
1273,
313,
13,
1678,
1320,
13239,
29889,
4422,
29889,
657,
29918,
12120,
3285,
13,
1678,
15300,
4286,
7122,
29898,
710,
29898,
29894,
29897,
363,
325,
297,
10876,
29889,
3259,
29918,
3888,
7503,
29906,
2314,
13,
876,
13,
9675,
29889,
2084,
29889,
4397,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
1982,
9170,
876,
13,
13,
5215,
22172,
29918,
29893,
29918,
10254,
13,
13,
12199,
29918,
29893,
29918,
10254,
29889,
12199,
580,
13,
2
] |
mptpy/mpt.py | CognitiveComputationLab/mptpy | 0 | 86656 | <reponame>CognitiveComputationLab/mptpy
""" Data structure for Multinomial Processing Trees (MPTs).
"""
from mptpy.mpt_word import MPTWord
import mptpy.tools.transformations as trans # pylint: disable=import-error
from mptpy.visualization.visualize_mpt import cmd_draw # pylint: disable=import-error
from mptpy.tools import misc
class MPT(object):
""" Multinomial Processing Tree (MPT) data structure.
"""
def __init__(self, mpt, sep=" ", leaf_test=None):
""" Constructs the MPT object.
Parameters
----------
mpt : [str, Node]
either tree in bmpt or as root object.
"""
self.subtrees = []
self.word = None
self.root = None
# mpt given as word
if isinstance(mpt, str):
self.word = MPTWord(mpt, sep=sep, leaf_test=leaf_test)
self.root = trans.word_to_nodes(self.word)
# mpt given as root node
else:
self.root = mpt
self.word = MPTWord(str(self))
@property
def params(self):
return self.word.parameters
@property
def categories(self):
return self.word.answers
def formulae(self):
""" Calculate the branch formulae for the categories in the tree
Returns
-------
dict
{category : formulae}
"""
return trans.get_formulae(self)
def max_parameters(self):
""" The maximal number of free parameters in the model
Returns
-------
int
max number of free parameters
"""
return sum([len(subtree) - 1 for subtree in self.subtrees])
def get_levels(self, node, level=0):
""" Generate a dict with all nodes and their respective level
0 is the root
Parameters
----------
node : Node
starting node
level : int, optional
level from which to start counting
"""
levels = {level: [node]}
if not node.leaf:
left_dict = self.get_levels(node.pos, level=level + 1)
right_dict = self.get_levels(node.neg, level=level + 1)
temp = misc.merge_dicts(left_dict, right_dict)
levels.update(temp)
return levels
def save(self, path, form="easy"):
""" Saves the tree to a file
Parameters
----------
path : str
where to save the tree
"""
to_print = trans.to_easy(self) if form == "easy" else self.word.str_
misc.write_iterable_to_file(path, to_print, newline=False)
def draw(self):
""" Draw MPT to the command line
"""
cmd_draw(self)
def __eq__(self, other):
return self.word.abstract() == other.word.abstract()
def __ne__(self, other):
return not self.__eq__(other)
def __str__(self):
if self.word:
return self.word.str_
sep = " "
def dfs(node):
""" depth first search
"""
if node.leaf:
return str(node.content)
pos = dfs(node.pos)
neg = dfs(node.neg)
return node.content + sep + pos + sep + neg
return dfs(self.root)
| [
1,
529,
276,
1112,
420,
29958,
29907,
3811,
3321,
1523,
14584,
28632,
29914,
29885,
415,
2272,
13,
15945,
29908,
3630,
3829,
363,
9683,
262,
7615,
10554,
292,
6479,
267,
313,
3580,
29911,
29879,
467,
13,
13,
15945,
29908,
13,
13,
3166,
286,
415,
2272,
29889,
29885,
415,
29918,
1742,
1053,
341,
7982,
14463,
13,
5215,
286,
415,
2272,
29889,
8504,
29889,
9067,
800,
408,
1301,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
5215,
29899,
2704,
13,
3166,
286,
415,
2272,
29889,
20119,
2133,
29889,
20119,
675,
29918,
29885,
415,
1053,
9920,
29918,
4012,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
5215,
29899,
2704,
13,
3166,
286,
415,
2272,
29889,
8504,
1053,
3984,
29883,
13,
13,
13,
1990,
341,
7982,
29898,
3318,
1125,
13,
1678,
9995,
9683,
262,
7615,
10554,
292,
15472,
313,
3580,
29911,
29897,
848,
3829,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
286,
415,
29892,
16345,
543,
9162,
20447,
29918,
1688,
29922,
8516,
1125,
13,
4706,
9995,
1281,
4984,
29879,
278,
341,
7982,
1203,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
286,
415,
584,
518,
710,
29892,
9071,
29962,
13,
9651,
2845,
5447,
297,
289,
29885,
415,
470,
408,
3876,
1203,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
1491,
28737,
353,
5159,
13,
4706,
1583,
29889,
1742,
353,
6213,
13,
4706,
1583,
29889,
4632,
353,
6213,
13,
13,
4706,
396,
286,
415,
2183,
408,
1734,
13,
4706,
565,
338,
8758,
29898,
29885,
415,
29892,
851,
1125,
13,
9651,
1583,
29889,
1742,
353,
341,
7982,
14463,
29898,
29885,
415,
29892,
16345,
29922,
19570,
29892,
20447,
29918,
1688,
29922,
29500,
29918,
1688,
29897,
13,
9651,
1583,
29889,
4632,
353,
1301,
29889,
1742,
29918,
517,
29918,
18010,
29898,
1311,
29889,
1742,
29897,
13,
13,
4706,
396,
286,
415,
2183,
408,
3876,
2943,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
4632,
353,
286,
415,
13,
9651,
1583,
29889,
1742,
353,
341,
7982,
14463,
29898,
710,
29898,
1311,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8636,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
1742,
29889,
16744,
13,
13,
1678,
732,
6799,
13,
1678,
822,
13997,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
1742,
29889,
550,
17538,
13,
13,
1678,
822,
7063,
29872,
29898,
1311,
1125,
13,
4706,
9995,
20535,
403,
278,
5443,
7063,
29872,
363,
278,
13997,
297,
278,
5447,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
9657,
13,
9651,
426,
7320,
584,
7063,
29872,
29913,
13,
13,
4706,
9995,
13,
13,
4706,
736,
1301,
29889,
657,
29918,
689,
2497,
29872,
29898,
1311,
29897,
13,
13,
1678,
822,
4236,
29918,
16744,
29898,
1311,
1125,
13,
4706,
9995,
450,
23183,
1353,
310,
3889,
4128,
297,
278,
1904,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
938,
13,
9651,
4236,
1353,
310,
3889,
4128,
13,
13,
4706,
9995,
13,
13,
4706,
736,
2533,
4197,
2435,
29898,
1491,
8336,
29897,
448,
29871,
29896,
363,
1014,
8336,
297,
1583,
29889,
1491,
28737,
2314,
13,
13,
1678,
822,
679,
29918,
5563,
29879,
29898,
1311,
29892,
2943,
29892,
3233,
29922,
29900,
1125,
13,
4706,
9995,
3251,
403,
263,
9657,
411,
599,
7573,
322,
1009,
18067,
3233,
13,
308,
29900,
338,
278,
3876,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
2943,
584,
9071,
13,
9651,
6257,
2943,
13,
13,
4706,
3233,
584,
938,
29892,
13136,
13,
9651,
3233,
515,
607,
304,
1369,
21248,
13,
13,
4706,
9995,
13,
13,
4706,
11174,
353,
426,
5563,
29901,
518,
3177,
12258,
13,
13,
4706,
565,
451,
2943,
29889,
29500,
29901,
13,
9651,
2175,
29918,
8977,
353,
1583,
29889,
657,
29918,
5563,
29879,
29898,
3177,
29889,
1066,
29892,
3233,
29922,
5563,
718,
29871,
29896,
29897,
13,
9651,
1492,
29918,
8977,
353,
1583,
29889,
657,
29918,
5563,
29879,
29898,
3177,
29889,
10052,
29892,
3233,
29922,
5563,
718,
29871,
29896,
29897,
13,
13,
9651,
5694,
353,
3984,
29883,
29889,
14634,
29918,
8977,
29879,
29898,
1563,
29918,
8977,
29892,
1492,
29918,
8977,
29897,
13,
9651,
11174,
29889,
5504,
29898,
7382,
29897,
13,
13,
4706,
736,
11174,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
2224,
29892,
883,
543,
29872,
8995,
29908,
1125,
13,
4706,
9995,
317,
5989,
278,
5447,
304,
263,
934,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
2224,
584,
851,
13,
9651,
988,
304,
4078,
278,
5447,
13,
13,
4706,
9995,
13,
13,
4706,
304,
29918,
2158,
353,
1301,
29889,
517,
29918,
29872,
8995,
29898,
1311,
29897,
565,
883,
1275,
376,
29872,
8995,
29908,
1683,
1583,
29889,
1742,
29889,
710,
29918,
13,
4706,
3984,
29883,
29889,
3539,
29918,
1524,
519,
29918,
517,
29918,
1445,
29898,
2084,
29892,
304,
29918,
2158,
29892,
25899,
29922,
8824,
29897,
13,
13,
1678,
822,
4216,
29898,
1311,
1125,
13,
4706,
9995,
18492,
341,
7982,
304,
278,
1899,
1196,
13,
13,
4706,
9995,
13,
13,
4706,
9920,
29918,
4012,
29898,
1311,
29897,
13,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
1742,
29889,
16595,
580,
1275,
916,
29889,
1742,
29889,
16595,
580,
13,
13,
1678,
822,
4770,
484,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
451,
1583,
17255,
1837,
12035,
1228,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
565,
1583,
29889,
1742,
29901,
13,
9651,
736,
1583,
29889,
1742,
29889,
710,
29918,
13,
13,
4706,
16345,
353,
376,
376,
13,
13,
4706,
822,
4489,
29879,
29898,
3177,
1125,
13,
9651,
9995,
10809,
937,
2740,
13,
13,
9651,
9995,
13,
13,
9651,
565,
2943,
29889,
29500,
29901,
13,
18884,
736,
851,
29898,
3177,
29889,
3051,
29897,
13,
13,
9651,
926,
353,
4489,
29879,
29898,
3177,
29889,
1066,
29897,
13,
9651,
3480,
353,
4489,
29879,
29898,
3177,
29889,
10052,
29897,
13,
9651,
736,
2943,
29889,
3051,
718,
16345,
718,
926,
718,
16345,
718,
3480,
13,
13,
4706,
736,
4489,
29879,
29898,
1311,
29889,
4632,
29897,
13,
2
] |
simapi/onlinesim/number.py | nm17/simapi | 0 | 68652 | <reponame>nm17/simapi
import simapi.api_handler as baseapi
class OnlineSMSNumber(baseapi.Number):
def __init__(self, api_handler, *args, **kwargs):
self.__api_handler = api_handler
super().__init__(*args, **kwargs)
async def set_activation_status(self, status: int):
pass
@property
async def activation_code(self):
pass | [
1,
529,
276,
1112,
420,
29958,
22882,
29896,
29955,
29914,
3601,
2754,
13,
5215,
1027,
2754,
29889,
2754,
29918,
13789,
408,
2967,
2754,
30004,
13,
30004,
13,
30004,
13,
1990,
13542,
29903,
4345,
4557,
29898,
3188,
2754,
29889,
4557,
1125,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7882,
29918,
13789,
29892,
334,
5085,
29892,
3579,
19290,
1125,
30004,
13,
4706,
1583,
17255,
2754,
29918,
13789,
353,
7882,
29918,
13789,
30004,
13,
4706,
2428,
2141,
1649,
2344,
1649,
10456,
5085,
29892,
3579,
19290,
8443,
13,
30004,
13,
1678,
7465,
822,
731,
29918,
11236,
362,
29918,
4882,
29898,
1311,
29892,
4660,
29901,
938,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
7465,
822,
26229,
29918,
401,
29898,
1311,
1125,
30004,
13,
4706,
1209,
2
] |
visualization/matplotlib/barwitherror.py | Licas/datascienceexamples | 0 | 5757 | <filename>visualization/matplotlib/barwitherror.py<gh_stars>0
from matplotlib import pyplot as plt
drinks = ["cappuccino", "latte", "chai", "americano", "mocha", "espresso"]
ounces_of_milk = [6, 9, 4, 0, 9, 0]
error = [0.6, 0.9, 0.4, 0, 0.9, 0]
#Yerr -> element at i position represents +/- error[i] variance on bar[i] value
plt.bar( range(len(drinks)),ounces_of_milk, yerr=error, capsize=15)
plt.show() | [
1,
529,
9507,
29958,
20119,
2133,
29914,
2922,
17357,
29914,
1646,
29893,
2121,
729,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
13,
7707,
19363,
353,
6796,
29883,
932,
29884,
617,
1789,
613,
376,
5066,
371,
613,
376,
305,
1794,
613,
376,
4183,
13231,
613,
376,
29885,
2878,
29874,
613,
376,
267,
2139,
29877,
3108,
13,
1309,
778,
29918,
974,
29918,
23853,
29895,
353,
518,
29953,
29892,
29871,
29929,
29892,
29871,
29946,
29892,
29871,
29900,
29892,
29871,
29929,
29892,
29871,
29900,
29962,
13,
2704,
353,
518,
29900,
29889,
29953,
29892,
29871,
29900,
29889,
29929,
29892,
29871,
29900,
29889,
29946,
29892,
29871,
29900,
29892,
29871,
29900,
29889,
29929,
29892,
29871,
29900,
29962,
13,
13,
29937,
29979,
3127,
1599,
1543,
472,
474,
2602,
11524,
718,
24028,
1059,
29961,
29875,
29962,
20162,
373,
2594,
29961,
29875,
29962,
995,
13,
572,
29873,
29889,
1646,
29898,
3464,
29898,
2435,
29898,
7707,
19363,
8243,
1309,
778,
29918,
974,
29918,
23853,
29895,
29892,
343,
3127,
29922,
2704,
29892,
2117,
2311,
29922,
29896,
29945,
29897,
13,
572,
29873,
29889,
4294,
580,
2
] |
snippets/show-image.py | district10/snippet-manager | 7 | 186171 | # python show image
from IPython.display import Image
Image("http://scikit-learn.org/dev/_static/ml_map.png", width=800)
| [
1,
396,
3017,
1510,
1967,
13,
3166,
5641,
1656,
29889,
4990,
1053,
7084,
13,
2940,
703,
1124,
597,
26167,
7354,
29899,
19668,
29889,
990,
29914,
3359,
19891,
7959,
29914,
828,
29918,
1958,
29889,
2732,
613,
2920,
29922,
29947,
29900,
29900,
29897,
13,
2
] |
topo-50-50-0-0.py | SoulOH/MPQUIC-different-scheduler-evaluation | 0 | 137393 | <gh_stars>0
#!/usr/bin/env python
from mininet.net import Mininet
from mininet.cli import CLI
from mininet.link import Link, TCLink,Intf
from subprocess import Popen, PIPE
from mininet.log import setLogLevel
if '__main__' == __name__:
setLogLevel('info')
net = Mininet(link=TCLink)
# key = "net.mptcp.mptcp_enabled"
# value = 1
# p = Popen("sysctl -w %s=%s" % (key, value), shell=True, stdout=PIPE, stderr=PIPE)
# stdout, stderr = p.communicate()
# print "stdout=",stdout,"stderr=", stderr
h1 = net.addHost('h1')
h2 = net.addHost('h2')
r1 = net.addHost('r1')
linkopt_wifi={'bw':10, 'delay':'50ms', "loss":0}
linkopt_4g={'bw':10, 'delay':'50ms', "loss":0}
linkopt2={'bw':100}
net.addLink(r1,h1,cls=TCLink, **linkopt_wifi)
net.addLink(r1,h1,cls=TCLink, **linkopt_4g)
net.addLink(r1,h2,cls=TCLink, **linkopt2)
net.build()
r1.cmd("ifconfig r1-eth0 0")
r1.cmd("ifconfig r1-eth1 0")
r1.cmd("ifconfig r1-eth2 0")
h1.cmd("ifconfig h1-eth0 0")
h1.cmd("ifconfig h1-eth1 0")
h2.cmd("ifconfig h2-eth0 0")
r1.cmd("echo 1 > /proc/sys/net/ipv4/ip_forward")
r1.cmd("ifconfig r1-eth0 10.0.0.1 netmask 255.255.255.0")
r1.cmd("ifconfig r1-eth1 10.0.1.1 netmask 255.255.255.0")
r1.cmd("ifconfig r1-eth2 10.0.2.1 netmask 255.255.255.0")
h1.cmd("ifconfig h1-eth0 10.0.0.2 netmask 255.255.255.0")
h1.cmd("ifconfig h1-eth1 10.0.1.2 netmask 255.255.255.0")
h2.cmd("ifconfig h2-eth0 10.0.2.2 netmask 255.255.255.0")
h1.cmd("ip rule add from 10.0.0.2 table 1")
h1.cmd("ip rule add from 10.0.1.2 table 2")
h1.cmd("ip route add 10.0.0.0/24 dev h1-eth0 scope link table 1")
h1.cmd("ip route add default via 10.0.0.1 dev h1-eth0 table 1")
h1.cmd("ip route add 10.0.1.0/24 dev h1-eth1 scope link table 2")
h1.cmd("ip route add default via 10.0.1.1 dev h1-eth1 table 2")
h1.cmd("ip route add default scope global nexthop via 10.0.0.1 dev h1-eth0")
h2.cmd("ip rule add from 10.0.2.2 table 1")
h2.cmd("ip route add 10.0.2.0/24 dev h2-eth0 scope link table 1")
h2.cmd("ip route add default via 10.0.2.1 dev h2-eth0 table 1")
h2.cmd("ip route add default scope global nexthop via 10.0.2.1 dev h2-eth0")
CLI(net)
net.stop()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
1375,
10157,
29889,
1212,
1053,
3080,
10157,
13,
3166,
1375,
10157,
29889,
11303,
1053,
24492,
13,
3166,
1375,
10157,
29889,
2324,
1053,
6645,
29892,
323,
6154,
682,
29892,
2928,
29888,
13,
3166,
1014,
5014,
1053,
349,
3150,
29892,
349,
29902,
4162,
13,
3166,
1375,
10157,
29889,
1188,
1053,
731,
3403,
10108,
13,
13,
361,
525,
1649,
3396,
1649,
29915,
1275,
4770,
978,
1649,
29901,
13,
1678,
731,
3403,
10108,
877,
3888,
1495,
13,
1678,
7787,
353,
3080,
10157,
29898,
2324,
29922,
29911,
6154,
682,
29897,
13,
1678,
396,
1820,
353,
376,
1212,
29889,
29885,
415,
6814,
29889,
29885,
415,
6814,
29918,
17590,
29908,
13,
1678,
396,
995,
353,
29871,
29896,
13,
1678,
396,
282,
353,
349,
3150,
703,
9675,
16948,
448,
29893,
1273,
29879,
16328,
29879,
29908,
1273,
313,
1989,
29892,
995,
511,
6473,
29922,
5574,
29892,
27591,
29922,
2227,
4162,
29892,
380,
20405,
29922,
2227,
4162,
29897,
13,
1678,
396,
27591,
29892,
380,
20405,
353,
282,
29889,
27820,
403,
580,
13,
1678,
396,
1596,
376,
25393,
543,
29892,
25393,
1699,
303,
20405,
543,
29892,
380,
20405,
13,
13,
1678,
298,
29896,
353,
7787,
29889,
1202,
8514,
877,
29882,
29896,
1495,
13,
1678,
298,
29906,
353,
7787,
29889,
1202,
8514,
877,
29882,
29906,
1495,
13,
1678,
364,
29896,
353,
7787,
29889,
1202,
8514,
877,
29878,
29896,
1495,
13,
1678,
1544,
3670,
29918,
29893,
6832,
3790,
29915,
29890,
29893,
2396,
29896,
29900,
29892,
525,
18829,
22099,
29945,
29900,
1516,
742,
376,
6758,
1115,
29900,
29913,
13,
1678,
1544,
3670,
29918,
29946,
29887,
3790,
29915,
29890,
29893,
2396,
29896,
29900,
29892,
525,
18829,
22099,
29945,
29900,
1516,
742,
376,
6758,
1115,
29900,
29913,
13,
1678,
1544,
3670,
29906,
3790,
29915,
29890,
29893,
2396,
29896,
29900,
29900,
29913,
13,
1678,
7787,
29889,
1202,
6595,
29898,
29878,
29896,
29892,
29882,
29896,
29892,
25932,
29922,
29911,
6154,
682,
29892,
3579,
2324,
3670,
29918,
29893,
6832,
29897,
13,
1678,
7787,
29889,
1202,
6595,
29898,
29878,
29896,
29892,
29882,
29896,
29892,
25932,
29922,
29911,
6154,
682,
29892,
3579,
2324,
3670,
29918,
29946,
29887,
29897,
13,
1678,
7787,
29889,
1202,
6595,
29898,
29878,
29896,
29892,
29882,
29906,
29892,
25932,
29922,
29911,
6154,
682,
29892,
3579,
2324,
3670,
29906,
29897,
13,
1678,
7787,
29889,
4282,
580,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29900,
29871,
29900,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29896,
29871,
29900,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29906,
29871,
29900,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
361,
2917,
298,
29896,
29899,
621,
29900,
29871,
29900,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
361,
2917,
298,
29896,
29899,
621,
29896,
29871,
29900,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
361,
2917,
298,
29906,
29899,
621,
29900,
29871,
29900,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
8057,
29871,
29896,
1405,
847,
15439,
29914,
9675,
29914,
1212,
29914,
666,
29894,
29946,
29914,
666,
29918,
11333,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29900,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29896,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29896,
29871,
29896,
29900,
29889,
29900,
29889,
29896,
29889,
29896,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
364,
29896,
29889,
9006,
703,
361,
2917,
364,
29896,
29899,
621,
29906,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29896,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
361,
2917,
298,
29896,
29899,
621,
29900,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29906,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
361,
2917,
298,
29896,
29899,
621,
29896,
29871,
29896,
29900,
29889,
29900,
29889,
29896,
29889,
29906,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
361,
2917,
298,
29906,
29899,
621,
29900,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29906,
7787,
13168,
29871,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29906,
29945,
29945,
29889,
29900,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5751,
788,
515,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29906,
1591,
29871,
29896,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5751,
788,
515,
29871,
29896,
29900,
29889,
29900,
29889,
29896,
29889,
29906,
1591,
29871,
29906,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5782,
788,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29914,
29906,
29946,
2906,
298,
29896,
29899,
621,
29900,
6874,
1544,
1591,
29871,
29896,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5782,
788,
2322,
3025,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29896,
2906,
298,
29896,
29899,
621,
29900,
1591,
29871,
29896,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5782,
788,
29871,
29896,
29900,
29889,
29900,
29889,
29896,
29889,
29900,
29914,
29906,
29946,
2906,
298,
29896,
29899,
621,
29896,
6874,
1544,
1591,
29871,
29906,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5782,
788,
2322,
3025,
29871,
29896,
29900,
29889,
29900,
29889,
29896,
29889,
29896,
2906,
298,
29896,
29899,
621,
29896,
1591,
29871,
29906,
1159,
13,
1678,
298,
29896,
29889,
9006,
703,
666,
5782,
788,
2322,
6874,
5534,
452,
29916,
386,
459,
3025,
29871,
29896,
29900,
29889,
29900,
29889,
29900,
29889,
29896,
2906,
298,
29896,
29899,
621,
29900,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
666,
5751,
788,
515,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29906,
1591,
29871,
29896,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
666,
5782,
788,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29900,
29914,
29906,
29946,
2906,
298,
29906,
29899,
621,
29900,
6874,
1544,
1591,
29871,
29896,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
666,
5782,
788,
2322,
3025,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29896,
2906,
298,
29906,
29899,
621,
29900,
1591,
29871,
29896,
1159,
13,
1678,
298,
29906,
29889,
9006,
703,
666,
5782,
788,
2322,
6874,
5534,
452,
29916,
386,
459,
3025,
29871,
29896,
29900,
29889,
29900,
29889,
29906,
29889,
29896,
2906,
298,
29906,
29899,
621,
29900,
1159,
13,
1678,
24492,
29898,
1212,
29897,
13,
1678,
7787,
29889,
9847,
580,
13,
13,
2
] |
aptl3/scripts/load_coco.py | matteoterruzzi/aptl3 | 0 | 168432 | import logging
import os
from datetime import datetime
import random
from threading import Thread, Event
from pycocotools.coco import COCO
from ..db import Database
logger = logging.getLogger('load_coco')
def load_coco(db: Database, *,
coco_dir: str,
data_type: str = 'train2017',
max_samples: int,
raise_ki: bool = True,
only_one_caption: bool = False,
):
try:
metadata = dict(
source='MSCOCO',
creation=str(datetime.now()),
data_type=data_type,
)
coco = COCO(f'{coco_dir}{os.path.sep}captions_{data_type}.json')
total_len = min(len(coco.imgs), max_samples)
db.begin_exclusive_transaction()
relation_id: int = db.create_relation(metadata, commit=False)
logger.info(f'New relation #{relation_id:d}: {metadata}')
except KeyboardInterrupt:
logger.info('Interrupted before starting.')
if raise_ki:
raise
return
stopped = Event()
def _download(shard, n):
for i, id_ in zip(range(max_samples), coco.getImgIds()):
if i % n != shard:
continue
img_url = coco.imgs[id_]['coco_url']
db.fetch(img_url)
if stopped.is_set():
break
shards = 4
download_ths = [
Thread(target=_download, args=(_s, shards), daemon=True, name=f'COCO-{_s:d}-of-{shards:d}')
for _s in range(shards)
]
for th in download_ths:
th.start()
def _gen_pairs():
for i, id_ in zip(range(max_samples), coco.getImgIds()):
img_url = str(coco.imgs[id_]['coco_url']).strip()
img_media_id, _flags = db.ingest_url(img_url, commit=False, update_last_access=False)
_ann_ids = coco.getAnnIds(id_)
if only_one_caption:
_ann_ids = [random.choice(list(_ann_ids))]
for ann_id in _ann_ids:
ann_url = 'data:,' + str(coco.anns[ann_id]['caption']).strip()
ann_media_id, _flags = db.ingest_url(ann_url, commit=False, update_last_access=False)
yield img_media_id, ann_media_id
print(f"Loading MS COCO ({i}/{total_len} images)...", end="\r", flush=True)
try:
db.add_media_relations(relation_id, media_id_pairs=_gen_pairs(), commit=False, batch_size=64)
except KeyboardInterrupt:
logger.info(f'Interrupted.')
if raise_ki:
raise
db.commit()
c = db.execute('SELECT COUNT(*) FROM MediaRelations WHERE relation_id = ?', (relation_id,))
inserted: int = c.fetchone()[0]
logger.info(f'Added {inserted:d} COCO annotations to relation #{relation_id}.')
logger.debug(f'{[th.is_alive() for th in download_ths]=}')
stopped.set()
for th in download_ths:
th.join()
return relation_id
def main():
import argparse
parser = argparse.ArgumentParser(description='Load MS COCO dataset and equivalence')
parser.add_argument('db', type=str, help='database data directory')
parser.add_argument('coco', type=str, help='COCO dataset directory')
parser.add_argument('data', type=str, help='dataset subset (train2017 or val2017)')
parser.add_argument('--limit', default=999999, type=int, help='limit the number of samples (defaults to 999999)')
parser.add_argument('--log', default='INFO', type=str, help='logging level (defaults to INFO)')
args = parser.parse_args()
logging.basicConfig(level=args.log.upper(),
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M')
db = Database(args.db)
db.execute('PRAGMA synchronous = OFF')
load_coco(db=db, coco_dir=args.coco, data_type=args.data, max_samples=args.limit, raise_ki=False)
if __name__ == '__main__':
main()
| [
1,
1053,
12183,
13,
5215,
2897,
13,
3166,
12865,
1053,
12865,
13,
5215,
4036,
13,
3166,
3244,
292,
1053,
10480,
29892,
6864,
13,
13,
3166,
282,
11078,
542,
327,
8789,
29889,
29883,
6235,
1053,
4810,
3217,
13,
13,
3166,
6317,
2585,
1053,
5470,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
877,
1359,
29918,
29883,
6235,
1495,
13,
13,
13,
1753,
2254,
29918,
29883,
6235,
29898,
2585,
29901,
5470,
29892,
334,
29892,
13,
795,
274,
6235,
29918,
3972,
29901,
851,
29892,
13,
795,
848,
29918,
1853,
29901,
851,
353,
525,
14968,
29906,
29900,
29896,
29955,
742,
13,
795,
4236,
29918,
27736,
29901,
938,
29892,
13,
795,
12020,
29918,
1984,
29901,
6120,
353,
5852,
29892,
13,
795,
871,
29918,
650,
29918,
6671,
29901,
6120,
353,
7700,
29892,
13,
1669,
1125,
13,
1678,
1018,
29901,
13,
4706,
15562,
353,
9657,
29898,
13,
9651,
2752,
2433,
4345,
3217,
3217,
742,
13,
9651,
11265,
29922,
710,
29898,
12673,
29889,
3707,
25739,
13,
9651,
848,
29918,
1853,
29922,
1272,
29918,
1853,
29892,
13,
4706,
1723,
13,
13,
4706,
274,
6235,
353,
4810,
3217,
29898,
29888,
29915,
29912,
29883,
6235,
29918,
3972,
1157,
359,
29889,
2084,
29889,
19570,
29913,
1113,
1980,
648,
1272,
29918,
1853,
1836,
3126,
1495,
13,
4706,
3001,
29918,
2435,
353,
1375,
29898,
2435,
29898,
29883,
6235,
29889,
2492,
29879,
511,
4236,
29918,
27736,
29897,
13,
13,
4706,
4833,
29889,
463,
29918,
735,
7009,
573,
29918,
20736,
580,
13,
4706,
8220,
29918,
333,
29901,
938,
353,
4833,
29889,
3258,
29918,
23445,
29898,
19635,
29892,
9063,
29922,
8824,
29897,
13,
4706,
17927,
29889,
3888,
29898,
29888,
29915,
4373,
8220,
24037,
23445,
29918,
333,
29901,
29881,
6177,
426,
19635,
29913,
1495,
13,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
4706,
17927,
29889,
3888,
877,
4074,
14214,
1434,
6257,
29889,
1495,
13,
4706,
565,
12020,
29918,
1984,
29901,
13,
9651,
12020,
13,
4706,
736,
13,
13,
1678,
11084,
353,
6864,
580,
13,
13,
1678,
822,
903,
10382,
29898,
845,
538,
29892,
302,
1125,
13,
4706,
363,
474,
29892,
1178,
29918,
297,
14319,
29898,
3881,
29898,
3317,
29918,
27736,
511,
274,
6235,
29889,
657,
25518,
21943,
580,
1125,
13,
9651,
565,
474,
1273,
302,
2804,
528,
538,
29901,
13,
18884,
6773,
13,
9651,
10153,
29918,
2271,
353,
274,
6235,
29889,
2492,
29879,
29961,
333,
29918,
22322,
29883,
6235,
29918,
2271,
2033,
13,
9651,
4833,
29889,
9155,
29898,
2492,
29918,
2271,
29897,
13,
9651,
565,
11084,
29889,
275,
29918,
842,
7295,
13,
18884,
2867,
13,
13,
1678,
528,
3163,
353,
29871,
29946,
13,
1678,
5142,
29918,
386,
29879,
353,
518,
13,
4706,
10480,
29898,
5182,
29922,
29918,
10382,
29892,
6389,
29922,
7373,
29879,
29892,
528,
3163,
511,
1146,
9857,
29922,
5574,
29892,
1024,
29922,
29888,
29915,
3217,
3217,
29899,
29912,
29918,
29879,
29901,
29881,
7402,
974,
29899,
29912,
845,
3163,
29901,
29881,
29913,
1495,
13,
4706,
363,
903,
29879,
297,
3464,
29898,
845,
3163,
29897,
13,
1678,
4514,
13,
1678,
363,
266,
297,
5142,
29918,
386,
29879,
29901,
13,
4706,
266,
29889,
2962,
580,
13,
13,
1678,
822,
903,
1885,
29918,
29886,
7121,
7295,
13,
4706,
363,
474,
29892,
1178,
29918,
297,
14319,
29898,
3881,
29898,
3317,
29918,
27736,
511,
274,
6235,
29889,
657,
25518,
21943,
580,
1125,
13,
9651,
10153,
29918,
2271,
353,
851,
29898,
29883,
6235,
29889,
2492,
29879,
29961,
333,
29918,
22322,
29883,
6235,
29918,
2271,
2033,
467,
17010,
580,
13,
9651,
10153,
29918,
9799,
29918,
333,
29892,
903,
15764,
353,
4833,
29889,
292,
342,
29918,
2271,
29898,
2492,
29918,
2271,
29892,
9063,
29922,
8824,
29892,
2767,
29918,
4230,
29918,
5943,
29922,
8824,
29897,
13,
13,
9651,
903,
812,
29918,
4841,
353,
274,
6235,
29889,
657,
2744,
29876,
21943,
29898,
333,
19925,
13,
9651,
565,
871,
29918,
650,
29918,
6671,
29901,
13,
18884,
903,
812,
29918,
4841,
353,
518,
8172,
29889,
16957,
29898,
1761,
7373,
812,
29918,
4841,
28166,
13,
13,
9651,
363,
2889,
29918,
333,
297,
903,
812,
29918,
4841,
29901,
13,
18884,
2889,
29918,
2271,
353,
525,
1272,
29901,
5501,
718,
851,
29898,
29883,
6235,
29889,
812,
29879,
29961,
812,
29918,
333,
22322,
6671,
2033,
467,
17010,
580,
13,
18884,
2889,
29918,
9799,
29918,
333,
29892,
903,
15764,
353,
4833,
29889,
292,
342,
29918,
2271,
29898,
812,
29918,
2271,
29892,
9063,
29922,
8824,
29892,
2767,
29918,
4230,
29918,
5943,
29922,
8824,
29897,
13,
13,
18884,
7709,
10153,
29918,
9799,
29918,
333,
29892,
2889,
29918,
9799,
29918,
333,
13,
18884,
1596,
29898,
29888,
29908,
23456,
10888,
4810,
3217,
21313,
29875,
6822,
29912,
7827,
29918,
2435,
29913,
4558,
467,
636,
613,
1095,
543,
29905,
29878,
613,
28371,
29922,
5574,
29897,
13,
13,
1678,
1018,
29901,
13,
4706,
4833,
29889,
1202,
29918,
9799,
29918,
2674,
800,
29898,
23445,
29918,
333,
29892,
5745,
29918,
333,
29918,
29886,
7121,
29922,
29918,
1885,
29918,
29886,
7121,
3285,
9063,
29922,
8824,
29892,
9853,
29918,
2311,
29922,
29953,
29946,
29897,
13,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
4706,
17927,
29889,
3888,
29898,
29888,
29915,
4074,
14214,
29889,
1495,
13,
4706,
565,
12020,
29918,
1984,
29901,
13,
9651,
12020,
13,
1678,
4833,
29889,
15060,
580,
13,
13,
1678,
274,
353,
4833,
29889,
7978,
877,
6404,
21122,
22798,
3895,
8213,
9662,
800,
5754,
8220,
29918,
333,
353,
1577,
742,
313,
23445,
29918,
333,
29892,
876,
13,
1678,
15478,
29901,
938,
353,
274,
29889,
9155,
650,
580,
29961,
29900,
29962,
13,
13,
1678,
17927,
29889,
3888,
29898,
29888,
29915,
2528,
287,
426,
7851,
287,
29901,
29881,
29913,
4810,
3217,
25495,
304,
8220,
24037,
23445,
29918,
333,
1836,
1495,
13,
1678,
17927,
29889,
8382,
29898,
29888,
29915,
13970,
386,
29889,
275,
29918,
284,
573,
580,
363,
266,
297,
5142,
29918,
386,
29879,
13192,
29913,
1495,
13,
13,
1678,
11084,
29889,
842,
580,
13,
1678,
363,
266,
297,
5142,
29918,
386,
29879,
29901,
13,
4706,
266,
29889,
7122,
580,
13,
1678,
736,
8220,
29918,
333,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
1053,
1852,
5510,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
5896,
10888,
4810,
3217,
8783,
322,
24796,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
2585,
742,
1134,
29922,
710,
29892,
1371,
2433,
9803,
848,
3884,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
29883,
6235,
742,
1134,
29922,
710,
29892,
1371,
2433,
3217,
3217,
8783,
3884,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
1272,
742,
1134,
29922,
710,
29892,
1371,
2433,
24713,
11306,
313,
14968,
29906,
29900,
29896,
29955,
470,
659,
29906,
29900,
29896,
29955,
29897,
1495,
13,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
13400,
742,
2322,
29922,
29929,
29929,
29929,
29929,
29929,
29929,
29892,
1134,
29922,
524,
29892,
1371,
2433,
13400,
278,
1353,
310,
11916,
313,
4381,
29879,
304,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
29897,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1188,
742,
2322,
2433,
11690,
742,
1134,
29922,
710,
29892,
1371,
2433,
21027,
3233,
313,
4381,
29879,
304,
15233,
29897,
1495,
13,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
5085,
29889,
1188,
29889,
21064,
3285,
13,
462,
4706,
3402,
2433,
29995,
29898,
294,
312,
603,
29897,
29879,
1273,
29898,
978,
6817,
29896,
29906,
29879,
1273,
29898,
5563,
978,
6817,
29947,
29879,
1273,
29898,
4906,
29897,
29879,
742,
13,
462,
4706,
2635,
23479,
2433,
29995,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
1495,
13,
13,
1678,
4833,
353,
5470,
29898,
5085,
29889,
2585,
29897,
13,
1678,
4833,
29889,
7978,
877,
29925,
4717,
29954,
1529,
12231,
681,
353,
438,
4198,
1495,
13,
1678,
2254,
29918,
29883,
6235,
29898,
2585,
29922,
2585,
29892,
274,
6235,
29918,
3972,
29922,
5085,
29889,
29883,
6235,
29892,
848,
29918,
1853,
29922,
5085,
29889,
1272,
29892,
4236,
29918,
27736,
29922,
5085,
29889,
13400,
29892,
12020,
29918,
1984,
29922,
8824,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
tests/distributed/test_simple_hub_pods/test_integration.py | hirakjyoti08/jina | 1 | 103705 | import os
import pytest
from jina import __default_host__, __docker_host__
from ..helpers import create_workspace, wait_for_workspace, create_flow, assert_request
cur_dir = os.path.dirname(os.path.abspath(__file__))
compose_yml = os.path.join(cur_dir, 'docker-compose.yml')
flow_yaml = os.path.join(cur_dir, 'flow.yml')
JINAD_HOST = __default_host__
GATEWAY_HOST = __default_host__
JINAD_PORT = 8000
GATEWAY_PORT = 45630
@pytest.mark.skip('jinad with docker-compose not supported for now')
@pytest.mark.parametrize('docker_compose', [compose_yml], indirect=['docker_compose'])
def test_simple_hub_deployments(docker_compose):
workspace_id = create_workspace(filepaths=[flow_yaml])
assert wait_for_workspace(workspace_id)
flow_id = create_flow(workspace_id=workspace_id, filename='flow.yml')
expected_text = 'text:hey, dude'
response = assert_request(
method='post',
url=f'http://{GATEWAY_HOST}:{GATEWAY_PORT}/search',
payload={'top_k': 10, 'data': [expected_text]},
)
print(f'Response is: {response}')
assert expected_text + ' hurray' * 2 == response['data']['docs'][0]['text']
assert_request(
method='get', url=f'http://{JINAD_HOST}:{JINAD_PORT}/flows/{flow_id}'
)
assert_request(
method='delete',
url=f'http://{JINAD_HOST}:{JINAD_PORT}/flows/{flow_id}',
)
| [
1,
1053,
2897,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
432,
1099,
1053,
4770,
4381,
29918,
3069,
1649,
29892,
4770,
14695,
29918,
3069,
1649,
13,
3166,
6317,
3952,
6774,
1053,
1653,
29918,
1287,
3493,
29892,
4480,
29918,
1454,
29918,
1287,
3493,
29892,
1653,
29918,
1731,
29892,
4974,
29918,
3827,
13,
13,
2764,
29918,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
19438,
29918,
21053,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2764,
29918,
3972,
29892,
525,
14695,
29899,
19438,
29889,
21053,
1495,
13,
1731,
29918,
25162,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2764,
29918,
3972,
29892,
525,
1731,
29889,
21053,
1495,
13,
13,
29967,
1177,
3035,
29918,
20832,
353,
4770,
4381,
29918,
3069,
1649,
13,
29954,
3040,
12982,
29979,
29918,
20832,
353,
4770,
4381,
29918,
3069,
1649,
13,
29967,
1177,
3035,
29918,
15082,
353,
29871,
29947,
29900,
29900,
29900,
13,
29954,
3040,
12982,
29979,
29918,
15082,
353,
29871,
29946,
29945,
29953,
29941,
29900,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
877,
28789,
328,
411,
10346,
29899,
19438,
451,
6969,
363,
1286,
1495,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
877,
14695,
29918,
19438,
742,
518,
19438,
29918,
21053,
1402,
26377,
29922,
1839,
14695,
29918,
19438,
11287,
13,
1753,
1243,
29918,
12857,
29918,
29882,
431,
29918,
16519,
1860,
29898,
14695,
29918,
19438,
1125,
13,
1678,
664,
3493,
29918,
333,
353,
1653,
29918,
1287,
3493,
29898,
1445,
24772,
11759,
1731,
29918,
25162,
2314,
13,
1678,
4974,
4480,
29918,
1454,
29918,
1287,
3493,
29898,
1287,
3493,
29918,
333,
29897,
13,
1678,
4972,
29918,
333,
353,
1653,
29918,
1731,
29898,
1287,
3493,
29918,
333,
29922,
1287,
3493,
29918,
333,
29892,
10422,
2433,
1731,
29889,
21053,
1495,
13,
1678,
3806,
29918,
726,
353,
525,
726,
29901,
354,
29891,
29892,
868,
311,
29915,
13,
1678,
2933,
353,
4974,
29918,
3827,
29898,
13,
4706,
1158,
2433,
2490,
742,
13,
4706,
3142,
29922,
29888,
29915,
1124,
597,
29912,
29954,
3040,
12982,
29979,
29918,
20832,
6177,
29912,
29954,
3040,
12982,
29979,
29918,
15082,
6822,
4478,
742,
13,
4706,
20092,
3790,
29915,
3332,
29918,
29895,
2396,
29871,
29896,
29900,
29892,
525,
1272,
2396,
518,
9684,
29918,
726,
29962,
1118,
13,
1678,
1723,
13,
1678,
1596,
29898,
29888,
29915,
5103,
338,
29901,
426,
5327,
29913,
1495,
13,
13,
1678,
4974,
3806,
29918,
726,
718,
525,
12166,
764,
29915,
334,
29871,
29906,
1275,
2933,
1839,
1272,
16215,
2640,
2033,
29961,
29900,
22322,
726,
2033,
13,
13,
1678,
4974,
29918,
3827,
29898,
13,
4706,
1158,
2433,
657,
742,
3142,
29922,
29888,
29915,
1124,
597,
29912,
29967,
1177,
3035,
29918,
20832,
6177,
29912,
29967,
1177,
3035,
29918,
15082,
6822,
1731,
29879,
19248,
1731,
29918,
333,
10162,
13,
1678,
1723,
13,
1678,
4974,
29918,
3827,
29898,
13,
4706,
1158,
2433,
8143,
742,
13,
4706,
3142,
29922,
29888,
29915,
1124,
597,
29912,
29967,
1177,
3035,
29918,
20832,
6177,
29912,
29967,
1177,
3035,
29918,
15082,
6822,
1731,
29879,
19248,
1731,
29918,
333,
29913,
742,
13,
1678,
1723,
13,
2
] |
beryllia/util.py | examknow/beryllia | 0 | 45089 | import re, traceback
from datetime import timedelta
from ipaddress import ip_address, IPv4Address, IPv6Address
from ipaddress import ip_network, IPv4Network, IPv6Network
from typing import List, Optional, Set, Tuple, Union
from ircrobots import Server
from irctokens import build
from ircchallenge import Challenge
from ircrobots.matching import ANY, Folded, Response, SELF
from ircstates.numerics import *
# not in ircstates.numerics
RPL_STATS = "249"
RPL_ENDOFSTATS = "219"
RE_OPERNAME = re.compile(r"^is opered as (\S+)(?:,|$)")
SECONDS_MINUTES = 60
SECONDS_HOURS = SECONDS_MINUTES*60
SECONDS_DAYS = SECONDS_HOURS*24
SECONDS_WEEKS = SECONDS_DAYS*7
TIME_UNITS_SHORT = list(zip(
"wdhms",
[SECONDS_WEEKS, SECONDS_DAYS, SECONDS_HOURS, SECONDS_MINUTES, 1]
))
TIME_UNITS_LONG = list(zip(
["weeks", "days", "hours", "minutes", "seconds"],
[SECONDS_WEEKS, SECONDS_DAYS, SECONDS_HOURS, SECONDS_MINUTES, 1]
))
def pretty_delta(
delta: timedelta,
max_units: int=2,
long: bool=False
) -> str:
denominator = int(delta.total_seconds())
outs: List[str] = []
time_units = TIME_UNITS_LONG if long else TIME_UNITS_SHORT
for unit, div in time_units:
numerator, denominator = divmod(denominator, div)
if numerator > 0:
sep = " " if long else ""
outs.append(f"{numerator}{sep}{unit}")
if len(outs) == max_units:
break
return (" " if long else "").join(outs)
async def oper_up(
server: Server,
oper_name: str,
oper_file: str,
oper_pass: str):
try:
challenge = Challenge(keyfile=oper_file, password=<PASSWORD>)
except Exception:
traceback.print_exc()
else:
await server.send(build("CHALLENGE", [oper_name]))
challenge_text = Response(RPL_RSACHALLENGE2, [SELF, ANY])
challenge_stop = Response(RPL_ENDOFRSACHALLENGE2, [SELF])
#:lithium.libera.chat 740 sandcat :foobarbazmeow
#:lithium.libera.chat 741 sandcat :End of CHALLENGE
while True:
challenge_line = await server.wait_for({
challenge_text, challenge_stop
})
if challenge_line.command == RPL_RSACHALLENGE2:
challenge.push(challenge_line.params[1])
else:
retort = challenge.finalise()
await server.send(build("CHALLENGE", [f"+{retort}"]))
break
async def get_whois(
server: Server,
nickname: str
) -> Optional[Tuple[str, Optional[str]]]:
await server.send(build("WHOIS", [nickname]))
whois_mask = Response(RPL_WHOISUSER, [SELF, Folded(nickname)])
whois_oper = Response(RPL_WHOISOPERATOR, [SELF, Folded(nickname)])
whois_end = Response(RPL_ENDOFWHOIS, [SELF, Folded(nickname)])
whois_line = await server.wait_for({whois_mask, whois_end})
if whois_line.command == RPL_WHOISUSER:
nick, user, host = whois_line.params[1:4]
mask = f"{nick}!{user}@{host}"
whois_line = await server.wait_for({whois_oper, whois_end})
if whois_line.command == RPL_WHOISOPERATOR:
match = RE_OPERNAME.search(whois_line.params[2])
if match is not None:
return (mask, match.group(1))
return (mask, None)
else:
return None
async def get_statsp(server: Server) -> List[Tuple[str, str]]:
await server.send(build("STATS", ["p"]))
statsp_texts: List[str] = []
while True:
statsp_line = await server.wait_for({
Response(RPL_STATS, [SELF, "p", ANY]),
Response(RPL_ENDOFSTATS, [SELF, "p"])
})
if statsp_line.command == RPL_STATS:
statsp_texts.append(statsp_line.params[2])
else:
break
opers: List[Tuple[str, str]] = []
for statsp_text in statsp_texts[:-1]:
nick, *_ = statsp_text.split(" ", 1)
whois = await get_whois(server, nick)
if whois is not None:
mask, oper = whois
if oper is not None:
opers.append((oper, mask))
return opers
def try_parse_ip(
ip: str
) -> Optional[Union[IPv4Address, IPv6Address]]:
try:
return ip_address(ip)
except ValueError:
return None
def try_parse_cidr(
cidr: str
) -> Optional[Union[IPv4Network, IPv6Network]]:
try:
return ip_network(cidr, strict=False)
except ValueError:
return None
def find_unescaped(s: str, c: Set[str]) -> List[int]:
indexes: List[int] = []
i = 0
while i < len(s):
c2 = s[i]
if c2 == "\\":
i += 1
elif c2 in c:
indexes.append(i)
i += 1
return indexes
WILDCARDS_GLOB = {"?": "_", "*": "%"}
WILDCARDS_SQL = set("_%")
def glob_to_sql(glob: str) -> str:
to_find = WILDCARDS_SQL | set(WILDCARDS_GLOB.keys())
to_escape = find_unescaped(glob, to_find)
glob_l = list(glob)
for index in to_escape:
char = glob_l[index]
# escape sql wildcard characters
if char in WILDCARDS_SQL:
glob_l[index] = f"\\{char}"
# switch glob wildcards to sql wildcards
elif char in WILDCARDS_GLOB:
glob_l[index] = WILDCARDS_GLOB[char]
return "".join(glob_l)
def looks_like_glob(s: str) -> bool:
return bool(set(s) & set("?*"))
| [
1,
1053,
337,
29892,
9637,
1627,
13,
3166,
12865,
29871,
1053,
5335,
287,
2554,
13,
3166,
10377,
7328,
1053,
10377,
29918,
7328,
29892,
5641,
29894,
29946,
7061,
29892,
5641,
29894,
29953,
7061,
13,
3166,
10377,
7328,
1053,
10377,
29918,
11618,
29892,
5641,
29894,
29946,
13724,
29892,
5641,
29894,
29953,
13724,
13,
13,
3166,
19229,
1678,
1053,
2391,
29892,
28379,
29892,
3789,
29892,
12603,
552,
29892,
7761,
13,
13,
3166,
29871,
2076,
13716,
1862,
1053,
5656,
13,
3166,
3805,
312,
554,
575,
1053,
2048,
13,
13,
3166,
29871,
2076,
305,
11768,
539,
1053,
27211,
13,
3166,
29871,
2076,
13716,
1862,
29889,
4352,
292,
1053,
13764,
29979,
29892,
383,
1025,
287,
29892,
13291,
29892,
3725,
29931,
29943,
13,
3166,
29871,
2076,
28631,
29889,
8058,
1199,
1053,
334,
13,
13,
29937,
451,
297,
29871,
2076,
28631,
29889,
8058,
1199,
13,
29934,
7390,
29918,
17816,
29903,
418,
353,
376,
29906,
29946,
29929,
29908,
13,
29934,
7390,
29918,
1430,
3970,
29943,
17816,
29903,
353,
376,
29906,
29896,
29929,
29908,
13,
13,
1525,
29918,
4590,
1001,
5813,
353,
337,
29889,
12198,
29898,
29878,
29908,
29985,
275,
1751,
287,
408,
3441,
29903,
29974,
5033,
25825,
29892,
29989,
10931,
1159,
13,
13,
1660,
6007,
8452,
29918,
16173,
2692,
2890,
353,
29871,
29953,
29900,
13,
1660,
6007,
8452,
29918,
8187,
4574,
29903,
259,
353,
3725,
6007,
8452,
29918,
16173,
2692,
2890,
29930,
29953,
29900,
13,
1660,
6007,
8452,
29918,
7698,
21554,
1678,
353,
3725,
6007,
8452,
29918,
8187,
4574,
29903,
29930,
29906,
29946,
13,
1660,
6007,
8452,
29918,
8851,
29923,
17557,
259,
353,
3725,
6007,
8452,
29918,
7698,
21554,
29930,
29955,
13,
13,
15307,
29918,
3904,
1806,
29903,
29918,
7068,
8476,
353,
1051,
29898,
7554,
29898,
13,
1678,
376,
9970,
29882,
1516,
613,
13,
1678,
518,
1660,
6007,
8452,
29918,
8851,
29923,
17557,
29892,
3725,
6007,
8452,
29918,
7698,
21554,
29892,
3725,
6007,
8452,
29918,
8187,
4574,
29903,
29892,
3725,
6007,
8452,
29918,
16173,
2692,
2890,
29892,
29871,
29896,
29962,
13,
876,
13,
15307,
29918,
3904,
1806,
29903,
29918,
29931,
20614,
29871,
353,
1051,
29898,
7554,
29898,
13,
1678,
6796,
705,
14541,
613,
376,
16700,
613,
376,
29882,
2470,
613,
376,
1195,
2667,
613,
376,
23128,
12436,
13,
1678,
518,
1660,
6007,
8452,
29918,
8851,
29923,
17557,
29892,
3725,
6007,
8452,
29918,
7698,
21554,
29892,
3725,
6007,
8452,
29918,
8187,
4574,
29903,
29892,
3725,
6007,
8452,
29918,
16173,
2692,
2890,
29892,
29871,
29896,
29962,
13,
876,
13,
13,
1753,
5051,
29918,
4181,
29898,
13,
4706,
19471,
29901,
268,
5335,
287,
2554,
29892,
13,
4706,
4236,
29918,
348,
1169,
29901,
938,
29922,
29906,
29892,
13,
4706,
1472,
29901,
418,
6120,
29922,
8824,
13,
4706,
1723,
1599,
851,
29901,
13,
13,
1678,
14267,
1061,
353,
938,
29898,
4181,
29889,
7827,
29918,
23128,
3101,
13,
1678,
714,
29879,
29901,
2391,
29961,
710,
29962,
353,
5159,
13,
1678,
931,
29918,
348,
1169,
29871,
353,
323,
8890,
29918,
3904,
1806,
29903,
29918,
29931,
20614,
565,
1472,
1683,
323,
8890,
29918,
3904,
1806,
29903,
29918,
7068,
8476,
13,
1678,
363,
5190,
29892,
1933,
297,
931,
29918,
348,
1169,
29901,
13,
4706,
4825,
1061,
29892,
14267,
1061,
353,
1933,
1545,
29898,
1145,
5817,
1061,
29892,
1933,
29897,
13,
4706,
565,
4825,
1061,
1405,
29871,
29900,
29901,
13,
9651,
16345,
353,
376,
376,
565,
1472,
1683,
5124,
13,
9651,
714,
29879,
29889,
4397,
29898,
29888,
29908,
29912,
8058,
1061,
1157,
19570,
1157,
5441,
27195,
13,
9651,
565,
7431,
29898,
17718,
29897,
1275,
4236,
29918,
348,
1169,
29901,
13,
18884,
2867,
13,
13,
1678,
736,
4852,
376,
565,
1472,
1683,
376,
2564,
7122,
29898,
17718,
29897,
13,
13,
12674,
822,
1751,
29918,
786,
29898,
13,
4706,
1923,
29901,
1678,
5656,
29892,
13,
4706,
1751,
29918,
978,
29901,
851,
29892,
13,
4706,
1751,
29918,
1445,
29901,
851,
29892,
13,
4706,
1751,
29918,
3364,
29901,
851,
1125,
13,
13,
1678,
1018,
29901,
13,
4706,
18766,
353,
27211,
29898,
1989,
1445,
29922,
3372,
29918,
1445,
29892,
4800,
29922,
29966,
25711,
17013,
12948,
13,
1678,
5174,
8960,
29901,
13,
4706,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
1678,
1683,
29901,
13,
4706,
7272,
1923,
29889,
6717,
29898,
4282,
703,
3210,
1964,
1307,
29940,
1692,
613,
518,
3372,
29918,
978,
12622,
13,
4706,
18766,
29918,
726,
353,
13291,
29898,
29934,
7390,
29918,
12445,
2477,
29950,
1964,
1307,
29940,
1692,
29906,
29892,
418,
518,
1660,
29931,
29943,
29892,
13764,
29979,
2314,
13,
4706,
18766,
29918,
9847,
353,
13291,
29898,
29934,
7390,
29918,
1430,
3970,
29943,
12445,
2477,
29950,
1964,
1307,
29940,
1692,
29906,
29892,
518,
1660,
29931,
29943,
2314,
13,
4706,
396,
29901,
29880,
389,
1974,
29889,
492,
495,
29874,
29889,
13496,
29871,
29955,
29946,
29900,
11982,
4117,
584,
1181,
22872,
27975,
1004,
340,
13,
4706,
396,
29901,
29880,
389,
1974,
29889,
492,
495,
29874,
29889,
13496,
29871,
29955,
29946,
29896,
11982,
4117,
584,
5044,
310,
5868,
1964,
1307,
29940,
1692,
13,
13,
4706,
1550,
5852,
29901,
13,
9651,
18766,
29918,
1220,
353,
7272,
1923,
29889,
10685,
29918,
1454,
3319,
13,
18884,
18766,
29918,
726,
29892,
18766,
29918,
9847,
13,
9651,
5615,
13,
9651,
565,
18766,
29918,
1220,
29889,
6519,
1275,
390,
7390,
29918,
12445,
2477,
29950,
1964,
1307,
29940,
1692,
29906,
29901,
13,
18884,
18766,
29889,
5910,
29898,
305,
11768,
29918,
1220,
29889,
7529,
29961,
29896,
2314,
13,
9651,
1683,
29901,
13,
18884,
3240,
441,
353,
18766,
29889,
8394,
895,
580,
13,
18884,
7272,
1923,
29889,
6717,
29898,
4282,
703,
3210,
1964,
1307,
29940,
1692,
613,
518,
29888,
17969,
29912,
2267,
441,
29913,
3108,
876,
13,
18884,
2867,
13,
13,
12674,
822,
679,
29918,
15970,
275,
29898,
13,
4706,
1923,
29901,
259,
5656,
29892,
13,
4706,
25985,
978,
29901,
851,
13,
4706,
1723,
1599,
28379,
29961,
23215,
552,
29961,
710,
29892,
28379,
29961,
710,
5262,
5387,
13,
13,
1678,
7272,
1923,
29889,
6717,
29898,
4282,
703,
29956,
8187,
3235,
613,
518,
19254,
978,
12622,
13,
13,
1678,
1058,
275,
29918,
13168,
353,
13291,
29898,
29934,
7390,
29918,
29956,
8187,
3235,
11889,
29892,
268,
518,
1660,
29931,
29943,
29892,
383,
1025,
287,
29898,
19254,
978,
29897,
2314,
13,
1678,
1058,
275,
29918,
3372,
353,
13291,
29898,
29934,
7390,
29918,
29956,
8187,
3235,
4590,
1001,
1299,
1955,
29892,
518,
1660,
29931,
29943,
29892,
383,
1025,
287,
29898,
19254,
978,
29897,
2314,
13,
1678,
1058,
275,
29918,
355,
29871,
353,
13291,
29898,
29934,
7390,
29918,
1430,
3970,
29943,
29956,
8187,
3235,
29892,
1678,
518,
1660,
29931,
29943,
29892,
383,
1025,
287,
29898,
19254,
978,
29897,
2314,
13,
13,
1678,
1058,
275,
29918,
1220,
353,
7272,
1923,
29889,
10685,
29918,
1454,
3319,
15970,
275,
29918,
13168,
29892,
1058,
275,
29918,
355,
1800,
13,
1678,
565,
1058,
275,
29918,
1220,
29889,
6519,
1275,
390,
7390,
29918,
29956,
8187,
3235,
11889,
29901,
13,
4706,
25985,
29892,
1404,
29892,
3495,
353,
1058,
275,
29918,
1220,
29889,
7529,
29961,
29896,
29901,
29946,
29962,
13,
4706,
11105,
353,
285,
29908,
29912,
19254,
29913,
29991,
29912,
1792,
29913,
28312,
3069,
5038,
13,
13,
4706,
1058,
275,
29918,
1220,
353,
7272,
1923,
29889,
10685,
29918,
1454,
3319,
15970,
275,
29918,
3372,
29892,
1058,
275,
29918,
355,
1800,
13,
4706,
565,
1058,
275,
29918,
1220,
29889,
6519,
1275,
390,
7390,
29918,
29956,
8187,
3235,
4590,
1001,
1299,
1955,
29901,
13,
9651,
1993,
353,
5195,
29918,
4590,
1001,
5813,
29889,
4478,
29898,
15970,
275,
29918,
1220,
29889,
7529,
29961,
29906,
2314,
13,
9651,
565,
1993,
338,
451,
6213,
29901,
13,
18884,
736,
313,
13168,
29892,
1993,
29889,
2972,
29898,
29896,
876,
13,
4706,
736,
313,
13168,
29892,
6213,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
12674,
822,
679,
29918,
6112,
1028,
29898,
2974,
29901,
5656,
29897,
1599,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
5262,
29901,
13,
1678,
7272,
1923,
29889,
6717,
29898,
4282,
703,
17816,
29903,
613,
6796,
29886,
3108,
876,
13,
13,
1678,
1002,
1028,
29918,
726,
29879,
29901,
2391,
29961,
710,
29962,
353,
5159,
13,
1678,
1550,
5852,
29901,
13,
4706,
1002,
1028,
29918,
1220,
353,
7272,
1923,
29889,
10685,
29918,
1454,
3319,
13,
9651,
13291,
29898,
29934,
7390,
29918,
17816,
29903,
29892,
418,
518,
1660,
29931,
29943,
29892,
376,
29886,
613,
13764,
29979,
11724,
13,
9651,
13291,
29898,
29934,
7390,
29918,
1430,
3970,
29943,
17816,
29903,
29892,
518,
1660,
29931,
29943,
29892,
376,
29886,
20068,
13,
4706,
5615,
13,
4706,
565,
1002,
1028,
29918,
1220,
29889,
6519,
1275,
390,
7390,
29918,
17816,
29903,
29901,
13,
9651,
1002,
1028,
29918,
726,
29879,
29889,
4397,
29898,
6112,
1028,
29918,
1220,
29889,
7529,
29961,
29906,
2314,
13,
4706,
1683,
29901,
13,
9651,
2867,
13,
13,
1678,
1015,
414,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
5262,
353,
5159,
13,
1678,
363,
1002,
1028,
29918,
726,
297,
1002,
1028,
29918,
726,
29879,
7503,
29899,
29896,
5387,
13,
4706,
25985,
29892,
334,
29918,
353,
1002,
1028,
29918,
726,
29889,
5451,
703,
9162,
29871,
29896,
29897,
13,
4706,
1058,
275,
1678,
353,
7272,
679,
29918,
15970,
275,
29898,
2974,
29892,
25985,
29897,
13,
4706,
565,
1058,
275,
338,
451,
6213,
29901,
13,
9651,
11105,
29892,
1751,
353,
1058,
275,
13,
9651,
565,
1751,
338,
451,
6213,
29901,
13,
18884,
1015,
414,
29889,
4397,
3552,
3372,
29892,
11105,
876,
13,
13,
1678,
736,
1015,
414,
13,
13,
1753,
1018,
29918,
5510,
29918,
666,
29898,
13,
4706,
10377,
29901,
851,
13,
4706,
1723,
1599,
28379,
29961,
19986,
29961,
5690,
29894,
29946,
7061,
29892,
5641,
29894,
29953,
7061,
5262,
29901,
13,
13,
1678,
1018,
29901,
13,
4706,
736,
10377,
29918,
7328,
29898,
666,
29897,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
736,
6213,
13,
13,
1753,
1018,
29918,
5510,
29918,
25232,
29878,
29898,
13,
4706,
274,
333,
29878,
29901,
851,
13,
4706,
1723,
1599,
28379,
29961,
19986,
29961,
5690,
29894,
29946,
13724,
29892,
5641,
29894,
29953,
13724,
5262,
29901,
13,
13,
1678,
1018,
29901,
13,
4706,
736,
10377,
29918,
11618,
29898,
25232,
29878,
29892,
9406,
29922,
8824,
29897,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
736,
6213,
13,
13,
1753,
1284,
29918,
7844,
5030,
287,
29898,
29879,
29901,
851,
29892,
274,
29901,
3789,
29961,
710,
2314,
1599,
2391,
29961,
524,
5387,
13,
1678,
18111,
29901,
2391,
29961,
524,
29962,
353,
5159,
13,
1678,
474,
353,
29871,
29900,
13,
1678,
1550,
474,
529,
7431,
29898,
29879,
1125,
13,
4706,
274,
29906,
353,
269,
29961,
29875,
29962,
13,
4706,
565,
274,
29906,
1275,
376,
1966,
1115,
13,
9651,
474,
4619,
29871,
29896,
13,
4706,
25342,
274,
29906,
297,
274,
29901,
13,
9651,
18111,
29889,
4397,
29898,
29875,
29897,
13,
4706,
474,
4619,
29871,
29896,
13,
1678,
736,
18111,
13,
13,
29956,
6227,
12696,
1718,
8452,
29918,
29954,
28902,
353,
426,
8652,
1115,
11119,
613,
26345,
1115,
11860,
9092,
13,
29956,
6227,
12696,
1718,
8452,
29918,
4176,
29871,
353,
731,
703,
29918,
29995,
1159,
13,
1753,
13149,
29918,
517,
29918,
2850,
29898,
23705,
29901,
851,
29897,
1599,
851,
29901,
13,
1678,
304,
29918,
2886,
259,
353,
399,
6227,
12696,
1718,
8452,
29918,
4176,
891,
731,
29898,
29956,
6227,
12696,
1718,
8452,
29918,
29954,
28902,
29889,
8149,
3101,
13,
1678,
304,
29918,
21587,
353,
1284,
29918,
7844,
5030,
287,
29898,
23705,
29892,
304,
29918,
2886,
29897,
13,
1678,
13149,
29918,
29880,
1678,
353,
1051,
29898,
23705,
29897,
13,
13,
1678,
363,
2380,
297,
304,
29918,
21587,
29901,
13,
4706,
1373,
353,
13149,
29918,
29880,
29961,
2248,
29962,
13,
4706,
396,
10169,
4576,
8775,
7543,
4890,
13,
4706,
565,
1373,
297,
399,
6227,
12696,
1718,
8452,
29918,
4176,
29901,
13,
9651,
13149,
29918,
29880,
29961,
2248,
29962,
353,
285,
29908,
1966,
29912,
3090,
5038,
13,
4706,
396,
4607,
13149,
8775,
28160,
304,
4576,
8775,
28160,
13,
4706,
25342,
1373,
297,
399,
6227,
12696,
1718,
8452,
29918,
29954,
28902,
29901,
13,
9651,
13149,
29918,
29880,
29961,
2248,
29962,
353,
399,
6227,
12696,
1718,
8452,
29918,
29954,
28902,
29961,
3090,
29962,
13,
13,
1678,
736,
376,
1642,
7122,
29898,
23705,
29918,
29880,
29897,
13,
13,
1753,
3430,
29918,
4561,
29918,
23705,
29898,
29879,
29901,
851,
29897,
1599,
6120,
29901,
13,
1678,
736,
6120,
29898,
842,
29898,
29879,
29897,
669,
731,
703,
29973,
29930,
5783,
13,
2
] |
boa3_test/test_sc/built_in_methods_test/StrSplit.py | hal0x2328/neo3-boa | 25 | 119908 | from typing import List
from boa3.builtin import public
@public
def main(string: str, sep: str, maxsplit: int) -> List[str]:
return string.split(sep, maxsplit)
| [
1,
515,
19229,
1053,
2391,
13,
13,
3166,
1045,
29874,
29941,
29889,
16145,
262,
1053,
970,
13,
13,
13,
29992,
3597,
13,
1753,
1667,
29898,
1807,
29901,
851,
29892,
16345,
29901,
851,
29892,
4236,
5451,
29901,
938,
29897,
1599,
2391,
29961,
710,
5387,
13,
1678,
736,
1347,
29889,
5451,
29898,
19570,
29892,
4236,
5451,
29897,
13,
2
] |
app/views.py | bzg/ApiViz | 4 | 107257 | <gh_stars>1-10
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
### good encoding of flash messages
### cf : https://stackoverflow.com/questions/8924014/how-to-handle-my-unicodedecodeerror
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
### import all from app.__init__
from . import *
from flask import jsonify, flash, render_template, \
url_for, make_response, request, redirect, \
send_file
# from werkzeug.security import generate_password_hash, check_password_hash
from werkzeug.exceptions import BadRequest
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
### AUTH - TOKEN
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
########################################################################################
# Access token ### from prettyprinted youtube channel
"""
def token_required(f):
@wraps(f)
def decorated( *args, **kwargs ):
token = None
if 'x-access-token' in request.headers:
token = request.headers['x-access-token']
if not token:
return jsonify({'message' : 'Token is missing!'}), 401
try:
data = jwt.decode(token, app.config['SECRET_KEY'])
current_user = User.query.filter_by(public_id=data['public_id']).first()
except:
return jsonify({'message' : 'Token is invalid!'}), 401
return f(current_user, *args, **kwargs)
return decorated
"""
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
### ERRORS HANDLERS
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
@app.errorhandler(403)
@app.errorhandler(404)
@app.errorhandler(500)
@app.route("/error/<int:err_code>", defaults={ "error": BadRequest })
def errorHandler(error, err_code=400):
if err_code == 404 : # | error.code == 404 :
error_code = 404
template = "errors/404.html"
elif err_code == 403 : # | error.code == 403 :
error_code = 403
template = "errors/403.html"
elif err_code == 500 : # | error.code == 500 :
error_code = 500
template = "errors/500.html"
else :
error_code = 400
template = "errors/400.html"
app_config = getDocuments(mongo_config_global)
return render_template(
template,
config_name = config_name, # prod or default...
site_section = "error",
error_code = str(error_code),
app_metas = app_metas,
app_config = app_config,
language = "fr" ,
languages_dict = app_languages_dict ,
# error_msg = u"accès interdit",
# user_infos = current_user.get_public_infos
), error_code
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
### CONFIG ROUTES - BACKEND API
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
def DocOidToString(data):
# log_app.debug("data : %s", data)
obj = {}
for key in data:
if isinstance(data[key], ObjectId):
obj[key] = str(data[key])
else:
obj[key] = data[key]
# log_app.debug("obj : %s", obj)
return obj
def getDocuments(collection, query={}, oid_to_id=True, as_list=False, field="field") :
### query collection and transform as list
results = list(collection.find(query) )
# log_app.debug("config app route / results - 1 : \n%s", pformat(results) )
### ObjectId to string
if oid_to_id :
results = [ DocOidToString(i) for i in results ]
# log_app.debug("config app route / results - 2 : \n%s", pformat(results) )
### list to dict
if as_list == False :
results = { i[field] : i for i in results }
# log_app.debug("config app route / results - 3 : \n%s", pformat(results) )
return results
def checkJWT(token, url_check="http://localhost:4100/api/auth/tokens/confirm_access"):
### TO DO
return True
@app.route('/backend/api/config/<string:collection>/<string:doc_id>', methods=['GET','POST','DELETE'])
@app.route('/backend/api/config/<string:collection>', methods=['GET'], defaults={"doc_id" : None})
@app.route('/backend/api/config', methods=['GET'], defaults={'collection': 'global', "doc_id" : None})
def config_global(collection, doc_id=None):
"""
Main route to GET and POST/PUT/DELETE
choices : global | endpoints | styles | routes | socials
variables : <collection> and <doc_id>
arguments : as_list (bool), field (str)
example : http://localhost:8100/backend/api/config?as_list=true
"""
log_app.debug("config app route")
log_app.debug("config app route / collection : %s", collection )
log_app.debug("config app route / doc_id : %s", doc_id )
### target right config collection
if collection in ["global" , "footer", "navbar", "endpoints" , "styles" , "routes", "socials" ] :
mongoColl = mongoConfigColls[collection] ### imported from . (and from there from .api.__init__ )
else :
log_app.warning("error : -%s- is not a valid config collection (redirect)", collection)
return redirect( "/error/400" )
### get request args if any
as_list = request.args.get('as_list', default=False, type=bool)
field = request.args.get('field', default="field", type=str)
token = request.args.get('token', default=None, type=str)
log_app.debug("config app route / as_list : %s", as_list )
### filter out field arg to unique identifiers fields in documents
if field not in ['_id', 'field'] :
field = 'field'
### build query if any
query = {}
if doc_id :
query = {"_id" : ObjectId(doc_id)}
### check if token allows user to POST
if token :
is_authorized = checkJWT(token)
### TO DO
if request.method == 'POST':
if is_authorized :
return "hello config master / POST ... praise be"
else :
return "noooope"
elif request.method == 'DELETE':
if is_authorized :
return "hello config master / DELETE ... praise be"
else :
return "noooope"
elif request.method == 'GET':
app_config_dict = getDocuments(mongoColl, query=query, as_list=as_list, field=field)
return jsonify( {
"msg" : "this is the results from your query on the '%s' config collection" % collection,
"query" : query,
"request" : {
"url" : request.url,
"args" : request.args,
"method" : request.method,
"collection" : collection,
"doc_id" : doc_id,
},
"app_config" : app_config_dict
} )
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
### CLIENT ROUTES
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
# @app.route('/', methods=['GET'])
# @app.route('/home/<string:lang>', methods=['GET'])
# @app.route('/home', methods=['GET'], defaults={"lang":"en"})
# def home(lang="fr"):
# log_app.debug("entering new home page")
# app_config = getDocuments(mongo_config_global)
# log_app.debug("app_config :/n%s", pformat(app_config))
# if lang == "fr" :
# template = "new-home.html"
# else :
# template = "new-home-english.html"
# return render_template(
# template,
# config_name = config_name, # prod, testing, default...
# app_config = app_config,
# app_metas = app_metas,
# language = lang,
# )
# @app.route('/tools/<string:lang>', methods=['GET'])
# @app.route('/tools', methods=['GET'], defaults={"lang":"en"})
# def Tools(lang="en"):
# log_app.debug("entering tools page")
# app_config = getDocuments(mongo_config_global)
# if lang == "fr" :
# template = "les-outils.html"
# else :
# template = "les-outils-english.html"
# return render_template(
# template,
# config_name = config_name, # prod, testing, default...
# app_metas = app_metas,
# app_config = app_config,
# language = lang
# )
@app.route('/sonum-banner-carto/<string:lang>', methods=['GET'])
@app.route('/sonum-banner-carto', methods=['GET'], defaults={"lang":"fr"})
def Banner(lang="fr"):
log_app.debug("entering test banner-carto page")
app_config = getDocuments(mongo_config_global)
if lang == "fr" :
template = "sonum-banner-carto.html"
else :
template = "sonum-banner-carto.html"
return render_template(
template,
config_name = config_name, # prod, testing, default...
app_metas = app_metas,
app_config = app_config,
language = lang
)
@app.route('/', methods=['GET','POST'],defaults={'path': ''})
@app.route('/<path:path>', methods=['GET','POST'])
def spa(path):
log_app.debug("entering SPA page")
app_config = getDocuments(mongo_config_global)
return render_template(
"spa.html",
config_name = config_name, # prod, testing, default...
app_config = app_config,
app_metas = app_metas,
language = "fr"
)
ANTI_SPAM_FIELD_NAME = "userMiddlename"
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
### FILES ROUTES
### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ###
@app.route('/download/<file_ext>/<file_name>', methods=['GET'] ) # this is a job for GET, not POST
def download_file(file_ext, file_name):
"""
send file from server
"""
log_app.debug("file_name : %s ", file_name)
log_app.debug("file_ext : %s ", file_ext)
log_app.info("file_ext in AUTHORIZED_FILETYPES_LIST: %s", (file_ext in AUTHORIZED_FILETYPES_LIST) )
if file_ext in AUTHORIZED_FILETYPES_LIST :
file_mimetype = AUTHORIZED_FILETYPES_DICT[file_ext]["mimetype"]
file_foldername = AUTHORIZED_FILETYPES_DICT[file_ext]["folder"]
file_folder = "static/{}/".format(file_foldername)
file_name_ext = "{}.{}".format(file_name, file_ext)
full_filepath = file_folder + file_name_ext
try :
return send_file( full_filepath,
mimetype = file_mimetype,
attachment_filename = file_name_ext,
as_attachment = True
)
except :
log_app.error("downloading this file is not working: %s.%s ", file_name, file_ext )
return redirect(url_for('home'))
else :
log_app.error("downloading this file is not authorized: %s.%s ", file_name, file_ext )
return redirect(url_for('home'))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
8025,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
2277,
29937,
1781,
8025,
310,
11013,
7191,
13,
2277,
29937,
274,
29888,
584,
2045,
597,
2417,
29889,
510,
29914,
2619,
29914,
29947,
29929,
29906,
29946,
29900,
29896,
29946,
29914,
3525,
29899,
517,
29899,
8411,
29899,
1357,
29899,
2523,
397,
2742,
401,
2704,
13,
5215,
10876,
13,
28120,
29898,
9675,
29897,
13,
9675,
29889,
842,
4381,
22331,
877,
9420,
29899,
29947,
1495,
13,
13,
2277,
29937,
1053,
599,
515,
623,
17255,
2344,
1649,
13,
3166,
869,
29871,
12,
5215,
334,
13,
3166,
12,
12,
1579,
1278,
29871,
12,
5215,
29871,
12,
3126,
1598,
29892,
11013,
29892,
4050,
29918,
6886,
29892,
320,
13,
462,
29871,
3142,
29918,
1454,
29892,
1207,
29918,
5327,
29892,
2009,
29892,
6684,
29892,
320,
13,
462,
29871,
3638,
29918,
1445,
13,
13,
29937,
515,
29871,
12,
9888,
13289,
29889,
8926,
29871,
12,
5215,
29871,
12,
17158,
29918,
5630,
29918,
8568,
29892,
1423,
29918,
5630,
29918,
8568,
13,
3166,
23085,
13289,
29889,
11739,
29879,
1053,
9178,
3089,
13,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
2277,
29937,
26524,
29950,
448,
7495,
29968,
1430,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
13,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
11028,
5993,
835,
515,
5051,
2158,
287,
366,
29873,
4003,
8242,
13,
15945,
29908,
13,
1753,
5993,
29918,
12403,
29898,
29888,
1125,
13,
29871,
732,
29893,
336,
567,
29898,
29888,
29897,
13,
29871,
822,
10200,
630,
29898,
334,
5085,
29892,
3579,
19290,
29871,
1125,
13,
13,
1678,
5993,
353,
6213,
13,
13,
1678,
565,
525,
29916,
29899,
5943,
29899,
6979,
29915,
297,
2009,
29889,
13662,
29901,
13,
418,
5993,
353,
2009,
29889,
13662,
1839,
29916,
29899,
5943,
29899,
6979,
2033,
13,
13,
1678,
565,
451,
5993,
29901,
13,
418,
736,
4390,
1598,
3319,
29915,
4906,
29915,
584,
525,
6066,
338,
4567,
20714,
9594,
29871,
29946,
29900,
29896,
13,
13,
1678,
1018,
29901,
13,
418,
848,
29871,
12,
12,
12,
29922,
432,
14554,
29889,
13808,
29898,
6979,
29892,
623,
29889,
2917,
1839,
1660,
22245,
29911,
29918,
10818,
11287,
13,
418,
1857,
29918,
1792,
29871,
12,
29922,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
3597,
29918,
333,
29922,
1272,
1839,
3597,
29918,
333,
2033,
467,
4102,
580,
13,
13,
1678,
5174,
29901,
13,
418,
736,
4390,
1598,
3319,
29915,
4906,
29915,
584,
525,
6066,
338,
8340,
20714,
9594,
29871,
29946,
29900,
29896,
13,
13,
1678,
736,
285,
29898,
3784,
29918,
1792,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
29871,
736,
10200,
630,
13,
15945,
29908,
13,
13,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
2277,
29937,
14431,
29903,
379,
9468,
29931,
23598,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
13,
29992,
932,
29889,
2704,
13789,
29898,
29946,
29900,
29941,
29897,
13,
29992,
932,
29889,
2704,
13789,
29898,
29946,
29900,
29946,
29897,
13,
29992,
932,
29889,
2704,
13789,
29898,
29945,
29900,
29900,
29897,
13,
29992,
932,
29889,
13134,
11974,
2704,
29914,
29966,
524,
29901,
3127,
29918,
401,
28341,
21274,
3790,
376,
2704,
1115,
9178,
3089,
5615,
13,
1753,
1059,
4598,
29898,
2704,
29892,
4589,
29918,
401,
29922,
29946,
29900,
29900,
1125,
13,
13,
29871,
565,
4589,
29918,
401,
1275,
29871,
29946,
29900,
29946,
584,
396,
29871,
891,
1059,
29889,
401,
1275,
29871,
29946,
29900,
29946,
584,
13,
1678,
1059,
29918,
401,
29871,
12,
29922,
29871,
29946,
29900,
29946,
13,
1678,
4472,
29871,
12,
12,
29922,
376,
12523,
29914,
29946,
29900,
29946,
29889,
1420,
29908,
13,
13,
29871,
25342,
4589,
29918,
401,
1275,
29871,
29946,
29900,
29941,
584,
396,
891,
1059,
29889,
401,
1275,
29871,
29946,
29900,
29941,
584,
13,
1678,
1059,
29918,
401,
29871,
12,
29922,
29871,
29946,
29900,
29941,
13,
1678,
4472,
29871,
12,
12,
29922,
376,
12523,
29914,
29946,
29900,
29941,
29889,
1420,
29908,
13,
13,
29871,
25342,
4589,
29918,
401,
1275,
29871,
29945,
29900,
29900,
584,
396,
891,
1059,
29889,
401,
1275,
29871,
29945,
29900,
29900,
584,
13,
1678,
1059,
29918,
401,
29871,
12,
29922,
29871,
29945,
29900,
29900,
13,
1678,
4472,
29871,
12,
12,
29922,
376,
12523,
29914,
29945,
29900,
29900,
29889,
1420,
29908,
13,
13,
29871,
1683,
584,
13,
1678,
1059,
29918,
401,
29871,
12,
29922,
29871,
29946,
29900,
29900,
13,
1678,
4472,
29871,
12,
12,
29922,
376,
12523,
29914,
29946,
29900,
29900,
29889,
1420,
29908,
13,
13,
29871,
623,
29918,
2917,
353,
679,
20128,
29898,
29885,
7443,
29918,
2917,
29918,
10945,
29897,
13,
13,
29871,
736,
4050,
29918,
6886,
29898,
13,
1678,
4472,
29892,
13,
1678,
2295,
29918,
978,
12,
12,
12,
29922,
2295,
29918,
978,
29892,
396,
11859,
470,
2322,
856,
13,
1678,
3268,
29918,
2042,
12,
12,
29922,
376,
2704,
613,
13,
1678,
1059,
29918,
401,
12,
12,
12,
29922,
851,
29898,
2704,
29918,
401,
511,
13,
1678,
623,
29918,
2527,
294,
12,
12,
12,
12,
29922,
623,
29918,
2527,
294,
29892,
13,
1678,
623,
29918,
2917,
29871,
12,
12,
12,
29922,
623,
29918,
2917,
29892,
13,
1678,
4086,
12,
12,
12,
12,
29922,
376,
1341,
29908,
1919,
13,
13,
1678,
10276,
29918,
8977,
12,
29922,
623,
29918,
29880,
8737,
29918,
8977,
1919,
13,
1678,
396,
1059,
29918,
7645,
12,
12,
12,
12,
29922,
318,
29908,
5753,
2093,
1006,
27423,
613,
13,
1678,
396,
1404,
29918,
7192,
359,
12,
12,
12,
29922,
1857,
29918,
1792,
29889,
657,
29918,
3597,
29918,
7192,
359,
13,
29871,
10353,
1059,
29918,
401,
13,
13,
13,
13,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
2277,
29937,
8707,
18667,
390,
12015,
2890,
448,
350,
11375,
11794,
3450,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
13,
1753,
28197,
29949,
333,
8246,
29898,
1272,
1125,
13,
29871,
396,
1480,
29918,
932,
29889,
8382,
703,
1272,
584,
1273,
29879,
613,
848,
29897,
13,
29871,
5446,
353,
6571,
13,
29871,
363,
1820,
297,
848,
29901,
13,
1678,
565,
338,
8758,
29898,
1272,
29961,
1989,
1402,
4669,
1204,
1125,
13,
418,
5446,
29961,
1989,
29962,
353,
851,
29898,
1272,
29961,
1989,
2314,
13,
1678,
1683,
29901,
13,
418,
5446,
29961,
1989,
29962,
353,
848,
29961,
1989,
29962,
13,
29871,
396,
1480,
29918,
932,
29889,
8382,
703,
5415,
584,
1273,
29879,
613,
5446,
29897,
13,
29871,
736,
5446,
13,
13,
1753,
679,
20128,
29898,
10855,
29892,
2346,
3790,
1118,
288,
333,
29918,
517,
29918,
333,
29922,
5574,
29892,
408,
29918,
1761,
29922,
8824,
29892,
1746,
543,
2671,
1159,
584,
13,
13,
29871,
835,
2346,
4333,
322,
4327,
408,
1051,
13,
29871,
2582,
353,
1051,
29898,
10855,
29889,
2886,
29898,
1972,
29897,
1723,
13,
29871,
396,
1480,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
2582,
448,
29871,
29896,
584,
320,
29876,
29995,
29879,
613,
282,
4830,
29898,
9902,
29897,
1723,
13,
13,
29871,
835,
4669,
1204,
304,
1347,
13,
29871,
565,
288,
333,
29918,
517,
29918,
333,
584,
13,
1678,
2582,
353,
518,
28197,
29949,
333,
8246,
29898,
29875,
29897,
363,
474,
297,
2582,
4514,
13,
1678,
396,
1480,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
2582,
448,
29871,
29906,
584,
320,
29876,
29995,
29879,
613,
282,
4830,
29898,
9902,
29897,
1723,
13,
13,
29871,
835,
1051,
304,
9657,
13,
29871,
565,
408,
29918,
1761,
1275,
7700,
584,
13,
1678,
2582,
353,
426,
474,
29961,
2671,
29962,
584,
474,
363,
474,
297,
2582,
500,
13,
1678,
396,
1480,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
2582,
448,
29871,
29941,
584,
320,
29876,
29995,
29879,
613,
282,
4830,
29898,
9902,
29897,
1723,
13,
13,
29871,
736,
2582,
13,
13,
1753,
1423,
29967,
17755,
29898,
6979,
29892,
3142,
29918,
3198,
543,
1124,
597,
7640,
29901,
29946,
29896,
29900,
29900,
29914,
2754,
29914,
5150,
29914,
517,
12360,
29914,
26897,
29918,
5943,
29908,
1125,
13,
29871,
835,
7495,
11662,
13,
29871,
736,
5852,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
27852,
29914,
2754,
29914,
2917,
29914,
29966,
1807,
29901,
10855,
20690,
29966,
1807,
29901,
1514,
29918,
333,
29958,
742,
3519,
29922,
1839,
7194,
3788,
5438,
3788,
2287,
18476,
11287,
13,
29992,
932,
29889,
13134,
11219,
27852,
29914,
2754,
29914,
2917,
29914,
29966,
1807,
29901,
10855,
29958,
742,
3519,
29922,
1839,
7194,
7464,
21274,
3790,
29908,
1514,
29918,
333,
29908,
584,
6213,
1800,
13,
29992,
932,
29889,
13134,
11219,
27852,
29914,
2754,
29914,
2917,
742,
3519,
29922,
1839,
7194,
7464,
21274,
3790,
29915,
10855,
2396,
525,
10945,
742,
376,
1514,
29918,
333,
29908,
584,
6213,
1800,
13,
1753,
2295,
29918,
10945,
29898,
10855,
29892,
1574,
29918,
333,
29922,
8516,
1125,
13,
12,
15945,
29908,
13,
12,
6330,
5782,
304,
12354,
322,
11971,
29914,
12336,
29914,
2287,
18476,
13,
12,
1859,
1575,
29871,
12,
29901,
5534,
891,
1095,
9748,
891,
11949,
891,
12049,
891,
5374,
1338,
13,
12,
20897,
584,
529,
10855,
29958,
322,
529,
1514,
29918,
333,
29958,
13,
12,
25699,
584,
408,
29918,
1761,
313,
11227,
511,
1746,
313,
710,
29897,
13,
12,
4773,
29871,
12,
29901,
1732,
597,
7640,
29901,
29947,
29896,
29900,
29900,
29914,
27852,
29914,
2754,
29914,
2917,
29973,
294,
29918,
1761,
29922,
3009,
13,
12,
15945,
29908,
13,
13,
12,
1188,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
1159,
13,
12,
1188,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
4333,
584,
1273,
29879,
613,
4333,
1723,
13,
12,
1188,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
1574,
29918,
333,
584,
1273,
29879,
613,
1574,
29918,
333,
1723,
13,
13,
12,
2277,
29937,
3646,
1492,
2295,
4333,
13,
12,
361,
4333,
297,
6796,
10945,
29908,
1919,
376,
21720,
613,
376,
21890,
613,
376,
355,
9748,
29908,
1919,
376,
9783,
29908,
1919,
376,
27894,
613,
376,
2839,
1338,
29908,
4514,
584,
13,
12,
12,
29885,
7443,
28377,
353,
19476,
3991,
1625,
3137,
29961,
10855,
29962,
835,
19673,
515,
869,
313,
392,
515,
727,
515,
869,
2754,
17255,
2344,
1649,
1723,
13,
12,
2870,
584,
13,
12,
12,
1188,
29918,
932,
29889,
27392,
703,
2704,
584,
448,
29995,
29879,
29899,
338,
451,
263,
2854,
2295,
4333,
313,
17886,
19123,
4333,
29897,
13,
12,
12,
2457,
6684,
29898,
5591,
2704,
29914,
29946,
29900,
29900,
29908,
1723,
13,
13,
12,
2277,
29937,
679,
2009,
6389,
565,
738,
13,
12,
294,
29918,
1761,
353,
2009,
29889,
5085,
29889,
657,
877,
294,
29918,
1761,
742,
2322,
29922,
8824,
29892,
29871,
12,
12,
1853,
29922,
11227,
29897,
13,
12,
2671,
29871,
12,
29922,
2009,
29889,
5085,
29889,
657,
877,
2671,
742,
29871,
12,
4381,
543,
2671,
613,
29871,
12,
1853,
29922,
710,
29897,
13,
12,
6979,
29871,
12,
29922,
2009,
29889,
5085,
29889,
657,
877,
6979,
742,
29871,
12,
4381,
29922,
8516,
29892,
29871,
12,
12,
1853,
29922,
710,
29897,
13,
12,
1188,
29918,
932,
29889,
8382,
703,
2917,
623,
5782,
847,
408,
29918,
1761,
584,
1273,
29879,
613,
408,
29918,
1761,
1723,
13,
13,
12,
2277,
29937,
4175,
714,
1746,
1852,
304,
5412,
2893,
14903,
4235,
297,
10701,
13,
12,
361,
1746,
451,
297,
6024,
29918,
333,
742,
525,
2671,
2033,
584,
13,
12,
12,
2671,
353,
525,
2671,
29915,
13,
13,
12,
2277,
29937,
2048,
2346,
565,
738,
13,
12,
1972,
353,
6571,
13,
12,
361,
1574,
29918,
333,
584,
13,
12,
12,
1972,
353,
8853,
29918,
333,
29908,
584,
4669,
1204,
29898,
1514,
29918,
333,
2915,
13,
13,
12,
2277,
29937,
1423,
565,
5993,
6511,
1404,
304,
11971,
13,
12,
361,
5993,
584,
13,
259,
12,
12,
275,
29918,
8921,
1891,
353,
1423,
29967,
17755,
29898,
6979,
29897,
13,
13,
12,
2277,
29937,
7495,
11662,
13,
12,
361,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
12,
12,
361,
338,
29918,
8921,
1891,
584,
13,
12,
12,
12,
2457,
376,
12199,
2295,
5835,
847,
11971,
2023,
7213,
895,
367,
29908,
13,
12,
12,
2870,
584,
13,
12,
12,
12,
2457,
376,
1217,
3634,
2300,
29908,
13,
13,
12,
23681,
2009,
29889,
5696,
1275,
525,
2287,
18476,
2396,
13,
12,
12,
361,
338,
29918,
8921,
1891,
584,
13,
12,
12,
12,
2457,
376,
12199,
2295,
5835,
847,
5012,
18476,
2023,
7213,
895,
367,
29908,
13,
12,
12,
2870,
584,
13,
12,
12,
12,
2457,
376,
1217,
3634,
2300,
29908,
13,
13,
13,
12,
23681,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
13,
12,
12,
932,
29918,
2917,
29918,
8977,
353,
679,
20128,
29898,
29885,
7443,
28377,
29892,
2346,
29922,
1972,
29892,
408,
29918,
1761,
29922,
294,
29918,
1761,
29892,
1746,
29922,
2671,
29897,
13,
13,
12,
12,
2457,
4390,
1598,
29898,
426,
13,
12,
12,
12,
12,
29908,
7645,
29908,
29871,
12,
12,
12,
12,
29901,
376,
1366,
338,
278,
2582,
515,
596,
2346,
373,
278,
14210,
29879,
29915,
2295,
4333,
29908,
1273,
4333,
29892,
13,
12,
12,
12,
12,
29908,
1972,
29908,
12,
12,
12,
12,
29901,
2346,
29892,
13,
12,
12,
12,
12,
29908,
3827,
29908,
12,
12,
12,
29901,
426,
13,
12,
12,
12,
12,
12,
29908,
2271,
29908,
29871,
12,
12,
12,
12,
29901,
2009,
29889,
2271,
29892,
13,
12,
12,
12,
12,
12,
29908,
5085,
29908,
29871,
12,
12,
12,
12,
29901,
2009,
29889,
5085,
29892,
13,
12,
12,
12,
12,
12,
29908,
5696,
29908,
12,
12,
12,
29901,
2009,
29889,
5696,
29892,
13,
12,
12,
12,
12,
12,
29908,
10855,
29908,
12,
29901,
4333,
29892,
13,
12,
12,
12,
12,
12,
29908,
1514,
29918,
333,
29908,
12,
12,
12,
29901,
1574,
29918,
333,
29892,
13,
12,
12,
12,
12,
1118,
13,
12,
12,
12,
12,
29908,
932,
29918,
2917,
29908,
29871,
12,
29901,
623,
29918,
2917,
29918,
8977,
13,
12,
12,
29913,
1723,
13,
13,
13,
13,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
2277,
29937,
24492,
3919,
390,
12015,
2890,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
13,
29937,
732,
932,
29889,
13134,
11219,
742,
3519,
29922,
1839,
7194,
11287,
13,
29937,
732,
932,
29889,
13134,
11219,
5184,
29914,
29966,
1807,
29901,
3893,
29958,
742,
3519,
29922,
1839,
7194,
11287,
13,
29937,
732,
932,
29889,
13134,
11219,
5184,
742,
3519,
29922,
1839,
7194,
7464,
21274,
3790,
29908,
3893,
4710,
264,
29908,
1800,
13,
29937,
822,
3271,
29898,
3893,
543,
1341,
29908,
1125,
13,
13,
29937,
259,
1480,
29918,
932,
29889,
8382,
703,
296,
3241,
716,
3271,
1813,
1159,
13,
13,
29937,
259,
623,
29918,
2917,
353,
679,
20128,
29898,
29885,
7443,
29918,
2917,
29918,
10945,
29897,
13,
29937,
259,
1480,
29918,
932,
29889,
8382,
703,
932,
29918,
2917,
584,
29914,
29876,
29995,
29879,
613,
282,
4830,
29898,
932,
29918,
2917,
876,
13,
13,
29937,
259,
565,
6361,
1275,
376,
1341,
29908,
584,
13,
29937,
268,
4472,
353,
376,
1482,
29899,
5184,
29889,
1420,
29908,
13,
29937,
259,
1683,
584,
13,
29937,
268,
4472,
353,
376,
1482,
29899,
5184,
29899,
996,
1674,
29889,
1420,
29908,
13,
13,
29937,
259,
736,
4050,
29918,
6886,
29898,
13,
29937,
268,
4472,
29892,
13,
29937,
268,
2295,
29918,
978,
12,
12,
29922,
2295,
29918,
978,
29892,
396,
11859,
29892,
6724,
29892,
2322,
856,
13,
29937,
268,
623,
29918,
2917,
29871,
12,
12,
29922,
623,
29918,
2917,
29892,
13,
29937,
268,
623,
29918,
2527,
294,
12,
12,
12,
29922,
623,
29918,
2527,
294,
29892,
13,
29937,
268,
4086,
12,
12,
12,
29922,
6361,
29892,
13,
29937,
259,
1723,
13,
13,
13,
29937,
732,
932,
29889,
13134,
11219,
8504,
29914,
29966,
1807,
29901,
3893,
29958,
742,
3519,
29922,
1839,
7194,
11287,
13,
29937,
732,
932,
29889,
13134,
11219,
8504,
742,
3519,
29922,
1839,
7194,
7464,
21274,
3790,
29908,
3893,
4710,
264,
29908,
1800,
13,
29937,
822,
27564,
29898,
3893,
543,
264,
29908,
1125,
13,
13,
29937,
259,
1480,
29918,
932,
29889,
8382,
703,
296,
3241,
8492,
1813,
1159,
13,
29937,
259,
623,
29918,
2917,
353,
679,
20128,
29898,
29885,
7443,
29918,
2917,
29918,
10945,
29897,
13,
13,
29937,
259,
565,
6361,
1275,
376,
1341,
29908,
584,
13,
29937,
268,
4472,
353,
376,
793,
29899,
449,
2719,
29889,
1420,
29908,
13,
29937,
259,
1683,
584,
13,
29937,
268,
4472,
353,
376,
793,
29899,
449,
2719,
29899,
996,
1674,
29889,
1420,
29908,
13,
13,
29937,
259,
736,
4050,
29918,
6886,
29898,
13,
29937,
268,
4472,
29892,
13,
29937,
268,
2295,
29918,
978,
12,
12,
29922,
2295,
29918,
978,
29892,
396,
11859,
29892,
6724,
29892,
2322,
856,
13,
29937,
268,
623,
29918,
2527,
294,
12,
12,
12,
29922,
623,
29918,
2527,
294,
29892,
13,
29937,
268,
623,
29918,
2917,
29871,
12,
12,
29922,
623,
29918,
2917,
29892,
13,
29937,
268,
4086,
12,
12,
12,
29922,
6361,
13,
29937,
259,
1723,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
1100,
398,
29899,
29890,
7310,
29899,
13823,
29877,
29914,
29966,
1807,
29901,
3893,
29958,
742,
3519,
29922,
1839,
7194,
11287,
13,
29992,
932,
29889,
13134,
11219,
1100,
398,
29899,
29890,
7310,
29899,
13823,
29877,
742,
3519,
29922,
1839,
7194,
7464,
21274,
3790,
29908,
3893,
4710,
1341,
29908,
1800,
13,
1753,
350,
7310,
29898,
3893,
543,
1341,
29908,
1125,
13,
13,
29871,
1480,
29918,
932,
29889,
8382,
703,
296,
3241,
1243,
289,
7310,
29899,
13823,
29877,
1813,
1159,
13,
29871,
623,
29918,
2917,
353,
679,
20128,
29898,
29885,
7443,
29918,
2917,
29918,
10945,
29897,
13,
13,
29871,
565,
6361,
1275,
376,
1341,
29908,
584,
29871,
13,
1678,
4472,
353,
376,
1100,
398,
29899,
29890,
7310,
29899,
13823,
29877,
29889,
1420,
29908,
13,
29871,
1683,
584,
29871,
13,
1678,
4472,
353,
376,
1100,
398,
29899,
29890,
7310,
29899,
13823,
29877,
29889,
1420,
29908,
13,
13,
29871,
736,
4050,
29918,
6886,
29898,
13,
1678,
4472,
29892,
13,
1678,
2295,
29918,
978,
12,
12,
29922,
2295,
29918,
978,
29892,
396,
11859,
29892,
6724,
29892,
2322,
856,
13,
1678,
623,
29918,
2527,
294,
12,
12,
12,
29922,
623,
29918,
2527,
294,
29892,
29871,
13,
1678,
623,
29918,
2917,
29871,
12,
12,
29922,
623,
29918,
2917,
29892,
13,
1678,
4086,
12,
12,
12,
29922,
6361,
13,
29871,
1723,
13,
13,
29992,
932,
29889,
13134,
11219,
742,
3519,
29922,
1839,
7194,
3788,
5438,
7464,
4381,
29879,
3790,
29915,
2084,
2396,
6629,
1800,
13,
29992,
932,
29889,
13134,
11219,
29966,
2084,
29901,
2084,
29958,
742,
3519,
29922,
1839,
7194,
3788,
5438,
11287,
13,
1753,
805,
29874,
29898,
2084,
1125,
13,
13,
29871,
1480,
29918,
932,
29889,
8382,
703,
296,
3241,
317,
7228,
1813,
1159,
13,
29871,
623,
29918,
2917,
353,
679,
20128,
29898,
29885,
7443,
29918,
2917,
29918,
10945,
29897,
13,
13,
29871,
736,
4050,
29918,
6886,
29898,
13,
1678,
376,
1028,
29874,
29889,
1420,
613,
13,
1678,
2295,
29918,
978,
12,
12,
29922,
2295,
29918,
978,
29892,
396,
11859,
29892,
6724,
29892,
2322,
856,
13,
1678,
623,
29918,
2917,
29871,
12,
12,
29922,
623,
29918,
2917,
29892,
13,
1678,
623,
29918,
2527,
294,
12,
12,
12,
29922,
623,
29918,
2527,
294,
29892,
13,
1678,
4086,
12,
12,
12,
29922,
376,
1341,
29908,
13,
29871,
1723,
13,
13,
13,
13566,
29902,
29918,
5550,
5194,
29918,
3738,
27286,
29918,
5813,
353,
376,
1792,
29924,
2205,
2435,
420,
29908,
13,
13,
13,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
2277,
29937,
9338,
17101,
390,
12015,
2890,
13,
2277,
29937,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
718,
835,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
10382,
29914,
29966,
1445,
29918,
1062,
20690,
29966,
1445,
29918,
978,
29958,
742,
3519,
29922,
1839,
7194,
2033,
1723,
396,
445,
338,
263,
4982,
363,
12354,
29892,
451,
11971,
13,
1753,
5142,
29918,
1445,
29898,
1445,
29918,
1062,
29892,
934,
29918,
978,
1125,
13,
29871,
9995,
13,
29871,
3638,
934,
515,
1923,
13,
29871,
9995,
13,
13,
29871,
1480,
29918,
932,
29889,
8382,
703,
1445,
29918,
978,
584,
1273,
29879,
9162,
29871,
12,
1445,
29918,
978,
29897,
13,
29871,
1480,
29918,
932,
29889,
8382,
703,
1445,
29918,
1062,
584,
1273,
29879,
9162,
29871,
12,
1445,
29918,
1062,
29897,
13,
29871,
1480,
29918,
932,
29889,
3888,
703,
1445,
29918,
1062,
297,
26524,
29950,
1955,
26664,
3352,
29918,
7724,
15631,
29925,
2890,
29918,
24360,
29901,
1273,
29879,
613,
313,
1445,
29918,
1062,
297,
26524,
29950,
1955,
26664,
3352,
29918,
7724,
15631,
29925,
2890,
29918,
24360,
29897,
1723,
13,
13,
13,
29871,
565,
934,
29918,
1062,
297,
26524,
29950,
1955,
26664,
3352,
29918,
7724,
15631,
29925,
2890,
29918,
24360,
584,
13,
13,
1678,
934,
29918,
29885,
17528,
668,
29871,
12,
12,
29922,
26524,
29950,
1955,
26664,
3352,
29918,
7724,
15631,
29925,
2890,
29918,
4571,
1783,
29961,
1445,
29918,
1062,
29962,
3366,
29885,
17528,
668,
3108,
13,
1678,
934,
29918,
12083,
978,
29871,
12,
29922,
26524,
29950,
1955,
26664,
3352,
29918,
7724,
15631,
29925,
2890,
29918,
4571,
1783,
29961,
1445,
29918,
1062,
29962,
3366,
12083,
3108,
13,
1678,
934,
29918,
12083,
29871,
12,
12,
29922,
376,
7959,
19248,
6822,
1642,
4830,
29898,
1445,
29918,
12083,
978,
29897,
13,
1678,
934,
29918,
978,
29918,
1062,
29871,
12,
12,
29922,
29850,
1836,
8875,
1642,
4830,
29898,
1445,
29918,
978,
29892,
934,
29918,
1062,
29897,
13,
1678,
2989,
29918,
1445,
2084,
29871,
12,
12,
29922,
934,
29918,
12083,
718,
934,
29918,
978,
29918,
1062,
13,
13,
1678,
1018,
584,
13,
13,
418,
736,
3638,
29918,
1445,
29898,
12,
8159,
29918,
1445,
2084,
29892,
13,
18884,
286,
17528,
668,
12,
12,
12,
29922,
934,
29918,
29885,
17528,
668,
29892,
13,
18884,
26305,
29918,
9507,
12,
29922,
934,
29918,
978,
29918,
1062,
29892,
13,
18884,
408,
29918,
14930,
358,
12,
12,
29922,
5852,
13,
795,
1723,
13,
1678,
5174,
584,
13,
13,
418,
1480,
29918,
932,
29889,
2704,
703,
10382,
292,
445,
934,
338,
451,
1985,
29901,
1273,
29879,
29889,
29995,
29879,
9162,
934,
29918,
978,
29892,
934,
29918,
1062,
1723,
13,
13,
418,
736,
6684,
29898,
2271,
29918,
1454,
877,
5184,
8785,
13,
13,
29871,
1683,
584,
13,
13,
1678,
1480,
29918,
932,
29889,
2704,
703,
10382,
292,
445,
934,
338,
451,
4148,
1891,
29901,
1273,
29879,
29889,
29995,
29879,
9162,
934,
29918,
978,
29892,
934,
29918,
1062,
1723,
13,
13,
1678,
736,
6684,
29898,
2271,
29918,
1454,
877,
5184,
8785,
13,
2
] |
lib/utils/blob.py | TheRevanchist/DeepWatershedDetection | 0 | 13327 | <reponame>TheRevanchist/DeepWatershedDetection
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by <NAME> - extended by <NAME>
# --------------------------------------------------------
"""Blob helper functions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import cv2
import random
def im_list_to_blob(ims):
"""Convert a list of images into a network input.
Assumes images are already prepared (means subtracted, BGR order, ...).
"""
max_shape = np.array([im.shape for im in ims]).max(axis=0)
num_images = len(ims)
blob = np.zeros((num_images, max_shape[0], max_shape[1], 3),
dtype=np.float32)
for i in range(num_images):
im = ims[i]
blob[i, 0:im.shape[0], 0:im.shape[1], :] = im
return blob
def prep_im_for_blob(im, pixel_means, global_scale, args):
"""Mean subtract and scale an image for use in a blob."""
im = im.astype(np.float32, copy=False)
# substract mean
if args.substract_mean == "True":
im -= pixel_means
# do global scaling
im = cv2.resize(im, None, None, fx=global_scale, fy=global_scale,
interpolation=cv2.INTER_LINEAR)
im_size_max = np.max(im.shape[0:2])
# Prevent the biggest axis from being more than MAX_SIZE
if im_size_max > args.max_edge:
if not args.crop == "True":
# scale down if bigger than max size
re_scale = (float(args.max_edge) / float(im_size_max))
im = cv2.resize(im, None, None, fx=re_scale, fy=re_scale,
interpolation=cv2.INTER_LINEAR)
global_scale = global_scale*re_scale
crop_box = [0,0,im.shape[0],im.shape[1]]
else:
# Crop image
topleft = random.uniform(0,1)<args.crop_top_left_bias
# crop to max size if necessary
if im.shape[0] <= args.max_edge or topleft:
crop_0 = 0
else:
crop_0 = random.randint(0,im.shape[0]-args.max_edge)
if im.shape[1] <= args.max_edge or topleft:
crop_1 = 0
else:
crop_1 = random.randint(0,im.shape[1]-args.max_edge)
crop_box = [crop_0, crop_1, min(crop_0+args.max_edge,im.shape[0]), min(crop_1+args.max_edge,im.shape[1])]
im = im[crop_box[0]:crop_box[2],crop_box[1]:crop_box[3]]
else:
crop_box = [0, 0, im.shape[0], im.shape[1]]
if not args.pad_to == 0:
# pad to fit RefineNet #TODO fix refinenet padding problem
y_mulity = int(np.ceil(im.shape[0] / float(args.pad_to)))
x_mulity = int(np.ceil(im.shape[1] / float(args.pad_to)))
canv = np.ones([y_mulity * args.pad_to, x_mulity * args.pad_to,3], dtype=np.uint8) * 255
canv[0:im.shape[0], 0:im.shape[1]] = im
im = canv
return im, global_scale, crop_box
| [
1,
529,
276,
1112,
420,
29958,
1576,
1123,
3703,
305,
391,
29914,
2772,
1022,
29956,
10412,
17143,
29928,
2650,
428,
13,
29937,
448,
2683,
2683,
2683,
26589,
13,
29937,
23786,
390,
29899,
29907,
10262,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
7783,
13,
29937,
10413,
21144,
1090,
450,
341,
1806,
19245,
518,
4149,
365,
2965,
1430,
1660,
363,
4902,
29962,
13,
29937,
16849,
841,
491,
529,
5813,
29958,
448,
10410,
491,
529,
5813,
29958,
13,
29937,
448,
2683,
2683,
2683,
26589,
13,
13,
15945,
29908,
29933,
2127,
16876,
3168,
1213,
15945,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
5215,
4036,
13,
13,
13,
1753,
527,
29918,
1761,
29918,
517,
29918,
10054,
29898,
9893,
1125,
13,
29871,
9995,
18455,
263,
1051,
310,
4558,
964,
263,
3564,
1881,
29889,
13,
13,
29871,
4007,
9351,
4558,
526,
2307,
13240,
313,
1004,
550,
23197,
287,
29892,
350,
14345,
1797,
29892,
2023,
467,
13,
29871,
9995,
13,
29871,
4236,
29918,
12181,
353,
7442,
29889,
2378,
4197,
326,
29889,
12181,
363,
527,
297,
527,
29879,
14664,
3317,
29898,
8990,
29922,
29900,
29897,
13,
29871,
954,
29918,
8346,
353,
7431,
29898,
9893,
29897,
13,
29871,
23755,
353,
7442,
29889,
3298,
359,
3552,
1949,
29918,
8346,
29892,
4236,
29918,
12181,
29961,
29900,
1402,
4236,
29918,
12181,
29961,
29896,
1402,
29871,
29941,
511,
13,
462,
29871,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
29871,
363,
474,
297,
3464,
29898,
1949,
29918,
8346,
1125,
13,
1678,
527,
353,
527,
29879,
29961,
29875,
29962,
13,
1678,
23755,
29961,
29875,
29892,
29871,
29900,
29901,
326,
29889,
12181,
29961,
29900,
1402,
29871,
29900,
29901,
326,
29889,
12181,
29961,
29896,
1402,
584,
29962,
353,
527,
13,
13,
29871,
736,
23755,
13,
13,
13,
1753,
8273,
29918,
326,
29918,
1454,
29918,
10054,
29898,
326,
29892,
15526,
29918,
1004,
550,
29892,
5534,
29918,
7052,
29892,
6389,
1125,
13,
29871,
9995,
6816,
273,
23197,
322,
6287,
385,
1967,
363,
671,
297,
263,
23755,
1213,
15945,
13,
29871,
527,
353,
527,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29892,
3509,
29922,
8824,
29897,
13,
13,
29871,
396,
1014,
4440,
2099,
13,
29871,
565,
6389,
29889,
1491,
4440,
29918,
12676,
1275,
376,
5574,
1115,
13,
1678,
527,
22361,
15526,
29918,
1004,
550,
13,
13,
29871,
396,
437,
5534,
21640,
13,
29871,
527,
353,
13850,
29906,
29889,
21476,
29898,
326,
29892,
6213,
29892,
6213,
29892,
285,
29916,
29922,
10945,
29918,
7052,
29892,
285,
29891,
29922,
10945,
29918,
7052,
29892,
13,
462,
1678,
29694,
29922,
11023,
29906,
29889,
23845,
29918,
18521,
1718,
29897,
13,
13,
29871,
527,
29918,
2311,
29918,
3317,
353,
7442,
29889,
3317,
29898,
326,
29889,
12181,
29961,
29900,
29901,
29906,
2314,
13,
29871,
396,
4721,
794,
278,
24842,
9685,
515,
1641,
901,
1135,
18134,
29918,
14226,
13,
29871,
565,
527,
29918,
2311,
29918,
3317,
1405,
6389,
29889,
3317,
29918,
12864,
29901,
13,
1678,
565,
451,
6389,
29889,
29883,
1336,
1275,
376,
5574,
1115,
13,
418,
396,
6287,
1623,
565,
16600,
1135,
4236,
2159,
13,
418,
337,
29918,
7052,
353,
313,
7411,
29898,
5085,
29889,
3317,
29918,
12864,
29897,
847,
5785,
29898,
326,
29918,
2311,
29918,
3317,
876,
13,
418,
527,
353,
13850,
29906,
29889,
21476,
29898,
326,
29892,
6213,
29892,
6213,
29892,
285,
29916,
29922,
276,
29918,
7052,
29892,
285,
29891,
29922,
276,
29918,
7052,
29892,
13,
462,
1678,
29694,
29922,
11023,
29906,
29889,
23845,
29918,
18521,
1718,
29897,
13,
418,
5534,
29918,
7052,
353,
5534,
29918,
7052,
29930,
276,
29918,
7052,
13,
418,
274,
1336,
29918,
1884,
353,
518,
29900,
29892,
29900,
29892,
326,
29889,
12181,
29961,
29900,
1402,
326,
29889,
12181,
29961,
29896,
5262,
13,
1678,
1683,
29901,
13,
418,
396,
315,
1336,
1967,
13,
418,
304,
552,
615,
353,
4036,
29889,
29590,
29898,
29900,
29892,
29896,
29897,
29966,
5085,
29889,
29883,
1336,
29918,
3332,
29918,
1563,
29918,
29890,
3173,
13,
13,
418,
396,
274,
1336,
304,
4236,
2159,
565,
5181,
13,
418,
565,
527,
29889,
12181,
29961,
29900,
29962,
5277,
6389,
29889,
3317,
29918,
12864,
470,
304,
552,
615,
29901,
13,
4706,
274,
1336,
29918,
29900,
353,
29871,
29900,
13,
418,
1683,
29901,
13,
4706,
274,
1336,
29918,
29900,
353,
4036,
29889,
9502,
524,
29898,
29900,
29892,
326,
29889,
12181,
29961,
29900,
29962,
29899,
5085,
29889,
3317,
29918,
12864,
29897,
13,
13,
418,
565,
527,
29889,
12181,
29961,
29896,
29962,
5277,
6389,
29889,
3317,
29918,
12864,
470,
304,
552,
615,
29901,
13,
4706,
274,
1336,
29918,
29896,
353,
29871,
29900,
13,
418,
1683,
29901,
13,
4706,
274,
1336,
29918,
29896,
353,
4036,
29889,
9502,
524,
29898,
29900,
29892,
326,
29889,
12181,
29961,
29896,
29962,
29899,
5085,
29889,
3317,
29918,
12864,
29897,
13,
13,
418,
274,
1336,
29918,
1884,
353,
518,
29883,
1336,
29918,
29900,
29892,
274,
1336,
29918,
29896,
29892,
1375,
29898,
29883,
1336,
29918,
29900,
29974,
5085,
29889,
3317,
29918,
12864,
29892,
326,
29889,
12181,
29961,
29900,
11724,
1375,
29898,
29883,
1336,
29918,
29896,
29974,
5085,
29889,
3317,
29918,
12864,
29892,
326,
29889,
12181,
29961,
29896,
2314,
29962,
13,
418,
527,
353,
527,
29961,
29883,
1336,
29918,
1884,
29961,
29900,
5387,
29883,
1336,
29918,
1884,
29961,
29906,
1402,
29883,
1336,
29918,
1884,
29961,
29896,
5387,
29883,
1336,
29918,
1884,
29961,
29941,
5262,
13,
29871,
1683,
29901,
13,
1678,
274,
1336,
29918,
1884,
353,
518,
29900,
29892,
29871,
29900,
29892,
527,
29889,
12181,
29961,
29900,
1402,
527,
29889,
12181,
29961,
29896,
5262,
13,
13,
29871,
565,
451,
6389,
29889,
8305,
29918,
517,
1275,
29871,
29900,
29901,
13,
1678,
396,
17132,
304,
6216,
9897,
457,
6779,
396,
4986,
3970,
2329,
2143,
7026,
300,
7164,
1108,
13,
1678,
343,
29918,
16109,
537,
353,
938,
29898,
9302,
29889,
27696,
29898,
326,
29889,
12181,
29961,
29900,
29962,
847,
5785,
29898,
5085,
29889,
8305,
29918,
517,
4961,
13,
1678,
921,
29918,
16109,
537,
353,
938,
29898,
9302,
29889,
27696,
29898,
326,
29889,
12181,
29961,
29896,
29962,
847,
5785,
29898,
5085,
29889,
8305,
29918,
517,
4961,
13,
1678,
508,
29894,
353,
7442,
29889,
2873,
4197,
29891,
29918,
16109,
537,
334,
6389,
29889,
8305,
29918,
517,
29892,
921,
29918,
16109,
537,
334,
6389,
29889,
8305,
29918,
517,
29892,
29941,
1402,
26688,
29922,
9302,
29889,
13470,
29947,
29897,
334,
29871,
29906,
29945,
29945,
13,
1678,
508,
29894,
29961,
29900,
29901,
326,
29889,
12181,
29961,
29900,
1402,
29871,
29900,
29901,
326,
29889,
12181,
29961,
29896,
5262,
353,
527,
13,
1678,
527,
353,
508,
29894,
13,
13,
29871,
736,
527,
29892,
5534,
29918,
7052,
29892,
274,
1336,
29918,
1884,
13,
13,
2
] |
src/utils/torch_common.py | quochungto/SIIM-COVID19-Detection | 0 | 7687 | import os
import gc
import random
import numpy as np
import torch
def seed_everything(seed):
os.environ['PYTHONHASHSEED'] = str(seed)
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = True
def memory_cleanup():
"""
Cleans up GPU memory
https://github.com/huggingface/transformers/issues/1742
"""
for obj in gc.get_objects():
if torch.is_tensor(obj):
del obj
gc.collect()
torch.cuda.empty_cache()
| [
1,
1053,
2897,
13,
5215,
330,
29883,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
13,
1753,
16717,
29918,
17991,
1918,
29898,
26776,
1125,
13,
1678,
2897,
29889,
21813,
1839,
20055,
4690,
1164,
29950,
24943,
1660,
3352,
2033,
353,
851,
29898,
26776,
29897,
13,
1678,
4036,
29889,
26776,
29898,
26776,
29897,
13,
1678,
7442,
29889,
8172,
29889,
26776,
29898,
26776,
29897,
13,
1678,
4842,
305,
29889,
11288,
29918,
26776,
29898,
26776,
29897,
13,
1678,
4842,
305,
29889,
29883,
6191,
29889,
11288,
29918,
26776,
29898,
26776,
29897,
13,
1678,
4842,
305,
29889,
1627,
1975,
29889,
29883,
566,
15755,
29889,
4801,
837,
262,
4695,
353,
5852,
13,
1678,
4842,
305,
29889,
1627,
1975,
29889,
29883,
566,
15755,
29889,
1785,
16580,
353,
5852,
13,
268,
13,
13,
1753,
3370,
29918,
14941,
786,
7295,
13,
1678,
9995,
13,
1678,
21386,
550,
701,
22796,
3370,
13,
1678,
2045,
597,
3292,
29889,
510,
29914,
29882,
688,
3460,
2161,
29914,
9067,
414,
29914,
12175,
29914,
29896,
29955,
29946,
29906,
13,
1678,
9995,
13,
1678,
363,
5446,
297,
330,
29883,
29889,
657,
29918,
12650,
7295,
13,
4706,
565,
4842,
305,
29889,
275,
29918,
20158,
29898,
5415,
1125,
13,
9651,
628,
5446,
13,
13,
1678,
330,
29883,
29889,
15914,
580,
13,
1678,
4842,
305,
29889,
29883,
6191,
29889,
6310,
29918,
8173,
580,
13,
2
] |
settings.py | rshorey/ms-match | 0 | 172530 | <filename>settings.py<gh_stars>0
from collections import OrderedDict
#pull this off your google sheet
sheet_id = '125NM05dqHKy3-97GkieVwn4V5Iy0Vj-w7erh9tAJxlA'
#do new entries appear immediately on the site
#or do they need to be approved first?
require_approval = False
#what do you want the fields to be called?
#the cannonical names are keys, the names you want to display are values
#don't remove any keys, things will crash
#if you don't want a field to appear, keep the key but make the value None
fieldnames = OrderedDict([('Name','Name'),
('Description','Description'),
('Category','Category'),
('Address1',None),
('Address2',None),
('City','City'),
('State','State'),
('Zip','Zipcode'),
('Phone','Phone number'),
('Website','Website'),
('Email','Email Address')
])
#what categories are allowed? Put in as many as you want but
#they'll display in a menu so if you do tons it'll look bad
#the first item will be the default
categories = ['Other', 'Stuff', 'Things'] | [
1,
529,
9507,
29958,
11027,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
13,
29937,
26746,
445,
1283,
596,
5386,
9869,
13,
9855,
29918,
333,
353,
525,
29896,
29906,
29945,
29940,
29924,
29900,
29945,
29881,
29939,
29950,
29968,
29891,
29941,
29899,
29929,
29955,
29954,
19501,
29963,
1233,
29946,
29963,
29945,
29902,
29891,
29900,
29963,
29926,
29899,
29893,
29955,
261,
29882,
29929,
29873,
29909,
29967,
15524,
29909,
29915,
13,
13,
29937,
1867,
716,
9976,
2615,
7389,
373,
278,
3268,
13,
29937,
272,
437,
896,
817,
304,
367,
23454,
937,
29973,
13,
12277,
29918,
9961,
791,
353,
7700,
13,
13,
13,
29937,
5816,
437,
366,
864,
278,
4235,
304,
367,
2000,
29973,
13,
29937,
1552,
508,
5464,
936,
2983,
526,
6611,
29892,
278,
2983,
366,
864,
304,
2479,
526,
1819,
13,
29937,
9176,
29915,
29873,
3349,
738,
6611,
29892,
2712,
674,
8095,
13,
29937,
361,
366,
1016,
29915,
29873,
864,
263,
1746,
304,
2615,
29892,
3013,
278,
1820,
541,
1207,
278,
995,
6213,
13,
2671,
7039,
353,
8170,
287,
21533,
4197,
877,
1170,
3788,
1170,
5477,
13,
4706,
6702,
9868,
3788,
9868,
5477,
13,
4706,
6702,
10900,
3788,
10900,
5477,
13,
4706,
6702,
7061,
29896,
742,
8516,
511,
13,
4706,
6702,
7061,
29906,
742,
8516,
511,
13,
4706,
6702,
16885,
3788,
16885,
5477,
13,
4706,
6702,
2792,
3788,
2792,
5477,
13,
4706,
6702,
26264,
3788,
26264,
401,
5477,
13,
4706,
6702,
9861,
3788,
9861,
1353,
5477,
13,
4706,
6702,
3609,
2746,
3788,
3609,
2746,
5477,
13,
4706,
6702,
9823,
3788,
9823,
16428,
1495,
13,
308,
2314,
13,
13,
29937,
5816,
13997,
526,
6068,
29973,
12065,
297,
408,
1784,
408,
366,
864,
541,
13,
29937,
19562,
29915,
645,
2479,
297,
263,
6143,
577,
565,
366,
437,
23864,
372,
29915,
645,
1106,
4319,
13,
29937,
1552,
937,
2944,
674,
367,
278,
2322,
13,
20683,
353,
6024,
16107,
742,
525,
855,
3096,
742,
525,
1349,
886,
2033,
2
] |
dbtest.py | AnykeyNL/AutonomousDB_AutonomousLinux_Python | 0 | 101984 | import cx_Oracle
DB = "xxx_high"
DB_USER = "admin"
DB_PASSWORD = "password"
connection = cx_Oracle.connect(DB_USER, DB_PASSWORD, DB)
print ("Connected")
| [
1,
1053,
28232,
29918,
29949,
10792,
13,
13,
4051,
353,
376,
12353,
29918,
9812,
29908,
13,
4051,
29918,
11889,
353,
376,
6406,
29908,
13,
4051,
29918,
25711,
17013,
353,
376,
5630,
29908,
13,
13,
9965,
353,
28232,
29918,
29949,
10792,
29889,
6915,
29898,
4051,
29918,
11889,
29892,
6535,
29918,
25711,
17013,
29892,
6535,
29897,
13,
13,
2158,
4852,
20971,
2954,
1159,
13,
13,
13,
2
] |
code_examples/popart/block_sparse/examples/test_block_sparse.py | payoto/graphcore_examples | 260 | 105344 | <reponame>payoto/graphcore_examples
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import os
import numpy as np
from functools import reduce
from operator import mul
import popart
import pytest
# range for filling blocks
MATRIX_LOW_VALUE = -10
MATRIX_HIGH_VALUE = 10
# library provides support for 3 kinds of sparse MM's
# from set of 2 inputs and one output, 2 of them will be dense
# and the third will be sparse
g_sparseMatMulTypeLookup = {
'DENSE_LHS_SPARSE_RHS_DENSE_OUT': 0,
'DENSE_LHS_DENSE_RHS_SPARSE_OUT': 1,
'SPARSE_LHS_SPARSE_RHS_SPARSE_OUT': 2
}
# g_ -> global
#
g_input_data_type = "float32"
g_output_data_type = "float32"
g_pp_data_type = "float32"
np.set_printoptions(linewidth=500)
g_random_sparse_mask = np.random.RandomState()
g_random_data = np.random.RandomState()
g_random_labels = np.random.RandomState()
"""
Set seeds of random generatorts.
"""
g_random_sparse_mask.seed(1)
g_random_data.seed(1)
g_random_labels.seed(1)
def create_sparse_list(dims, block_size, sparsity, initial_value=0):
"""
dims: dimensions of the sparse matrix
block_size: size of a block (8x8, 16x16 etc)
sparsity: sparsity level (0.4 means 40% of blocks are empty)
returns--
block_sparse_matrix: np.array of num_blocks * block_sz
dense_matrix: np.array if size dim with a dense representation of the matrix.
i.e. explcit zeros for a zero block. Used to perform
dense MM's for a reference output
mask: list with sparsity pattern. size = num_blocks (both dense and sparse)
e.g for a sparse matrix of size (6, 6) with block size 2x2
Matrix contains 9 blocks of size 2x2, some sparse and some dense
If the 6x6 matrices has 2 non zero blocks, then ..
Inputs:
dims = [6, 6]
block_size = [2,2]
sparsity = 0.4 (say)
Outputs:
block_sparse_matrix = 2 x 4 array
dense_matrix = 6x6 array
sparsity = 9x1 list
"""
block_size_row = block_size[0]
block_size_col = block_size[1]
num_block_rows = dims[0] // block_size_row
num_block_cols = dims[1] // block_size_col
assert(sparsity < 1.0)
proportion = [sparsity, 1 - sparsity]
mask = g_random_sparse_mask.choice([0, 1], size=(num_block_rows, num_block_cols), p=proportion)
# dont want mask to be all zeros
while np.all(mask == 0):
mask = g_random_sparse_mask.choice([0, 1], size=(num_block_rows, num_block_cols), p=proportion)
if initial_value == 0:
dense_matrix = np.zeros((num_block_rows * block_size_row,
num_block_cols * block_size_col))
else:
dense_matrix = np.empty((num_block_rows * block_size_row,
num_block_cols * block_size_col))
dense_matrix.fill(initial_value)
block_sparse_matrix = []
for block_row in range(num_block_rows):
for block_col in range(num_block_cols):
if mask[block_row][block_col]:
block_data = g_random_data.randint(low=MATRIX_LOW_VALUE,
high=MATRIX_HIGH_VALUE,
size=block_size_row * block_size_col).astype("float32")
block_sparse_matrix.append(block_data)
dense_matrix[block_row * block_size_row: (block_row+1) * block_size_row,
block_col * block_size_col: (block_col+1) * block_size_col] = block_data.reshape(block_size_row, block_size_col)
# At this point mask is a 2D array, flatten it into 1D list and return, bsr_rhs is already a list (so convert to array)
return np.array(block_sparse_matrix), dense_matrix, mask.flatten().tolist()
def create_dense_matrix(dims):
return g_random_data.randint(low=MATRIX_LOW_VALUE, high=MATRIX_HIGH_VALUE, size=dims).astype(g_input_data_type)
def create_sparse_matrix(nominal_shape, block_size, sparsity, initial_value=0):
"""
Create a sparse_matrix.
Inputs:
nominal_shape: List of dimensions of the sparse tensor e.g (2, 3, 4, 4)
block_size : size of each block (e.g. [8, 8, 8])
sparsity : block sparsity level (0.4 means, 40% of blocks are zeros)
Outputs:
bsr : sparse representation of matrix (nnz_blocks * block size)
lengths_per_2d_plane: List with num-non-zero blocks per group dim.
i.e. for a (2, 3, 4, 4) tensor with 2 nnz_blocks in each 4x4 matrix,
this will have shape of 6x1 and each row storing 2
dense_matrix: dense representation of the matrix (for ref calc)
mask : list of num_blocks (1 for non-zero blocks and 0 for others)
"""
# skip last two dimensions
# last 2 dims enter the MM, others form the group
num_grouped_dims = reduce(mul, nominal_shape[:-2], 1)
rows = nominal_shape[-2]
cols = nominal_shape[-1]
# Create dense matrix of nominal dims
if initial_value == 0:
dense_matrix = np.zeros(nominal_shape).astype(g_input_data_type)
else:
dense_matrix = np.empty(nominal_shape).astype(g_input_data_type)
dense_matrix.fill(initial_value)
dense_matrix = dense_matrix.reshape((num_grouped_dims, rows, cols))
dims = [nominal_shape[-2], nominal_shape[-1]]
bsr = []
bsr_lengths_per_2d_plane = []
mask = []
for dim in range(num_grouped_dims):
_bsr, dense_matrix[dim], _mask = create_sparse_list(dims, block_size, sparsity, initial_value)
# _bsr comes as array
# _mask comes as list
bsr.extend(_bsr)
mask.extend(_mask)
bsr_lengths_per_2d_plane.append(_bsr.shape[0])
dense_matrix = dense_matrix.reshape(nominal_shape)
mask = np.array(mask)
block_size_row = block_size[0]
block_size_col = block_size[1]
num_block_rows = dims[0] // block_size_row
num_block_cols = dims[1] // block_size_col
# all parameters are returned as numpy arrays
return np.array(bsr), np.array(bsr_lengths_per_2d_plane), dense_matrix, mask
def mm(lhs, rhs):
return np.matmul(lhs, rhs)
# Stable softmax numpy implementation
def softmax(x):
x_max = np.max(x, axis = -1)
x = x - np.expand_dims(x_max, axis=-1)
x = np.exp(x)
x_sum = np.sum(x, axis=-1)
x = x / np.expand_dims(x_sum, axis=-1)
return x
def sparse_mm_infer(sparse_mm_type, lhs_dims, vanilla_rhs_dims, block_size, sparsity_level, transpose_rhs, memory_cycle_ratio, inner_group_size):
""" """
if transpose_rhs:
matmul_dims = [lhs_dims[-2], vanilla_rhs_dims[-1], vanilla_rhs_dims[-2]]
else:
matmul_dims = [lhs_dims[-2], vanilla_rhs_dims[-2], vanilla_rhs_dims[-1]]
lhs = create_dense_matrix(lhs_dims)
if sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT']:
bsr_rhs, lengths_per_2d_plane, vanilla_rhs, sparsity_mask = create_sparse_matrix(vanilla_rhs_dims, block_size[1:], sparsity_level)
rhs = bsr_rhs
rhs_dims = bsr_rhs.shape
elif sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT']:
output_dims = lhs_dims[:-1]
output_dims.append(vanilla_rhs_dims[-1])
output_block_size = [block_size[0], block_size[2]]
bsr_output, lengths_per_2d_plane, _, sparsity_mask = create_sparse_matrix(output_dims, output_block_size, sparsity_level)
rhs_dims = vanilla_rhs_dims
rhs = create_dense_matrix(rhs_dims)
# Create a builder and construct a graph
builder = popart.Builder()
lhs_tensorInfo = popart.TensorInfo("FLOAT", lhs_dims)
rhs_tensorInfo = popart.TensorInfo("FLOAT", rhs_dims)
lhsTensor = builder.addInputTensor(lhs_tensorInfo)
rhsTensor = builder.addInputTensor(rhs_tensorInfo)
outTensor = builder.customOp(opName = "BSMatMul",
opVersion=1,
domain = "ai.graphcore",
inputs = [lhsTensor, rhsTensor],
attributes = {
"bsr_rhs_lengths_per_2d_plane": lengths_per_2d_plane.tolist(),
"matrix_dims": matmul_dims,
"block_size": block_size,
"sparsity_mask": sparsity_mask.tolist(),
"bsmatmul_type": sparse_mm_type,
"transpose_rhs": transpose_rhs,
"memory_cycle_ratio": memory_cycle_ratio,
"inner_group_size": inner_group_size,
"in_type": g_input_data_type,
"out_type": g_output_data_type,
"pp_type": g_pp_data_type
})[0]
builder.addOutputTensor(outTensor)
proto = builder.getModelProto()
# Describe how to run the model
dataFlow = popart.DataFlow(1, {outTensor: popart.AnchorReturnType("ALL")})
# Create a session to compile and execute the graph
session = popart.InferenceSession(
fnModel=proto,
dataFlow=dataFlow,
deviceInfo=popart.DeviceManager().acquireAvailableDevice(1))
# Compile graph
session.prepareDevice()
# Create buffers to receive results from the execution
anchors = session.initAnchorArrays()
rhs = np.array(rhs, dtype=g_input_data_type)
stepio = popart.PyStepIO({lhsTensor: lhs, rhsTensor: rhs}, anchors)
session.run(stepio)
ipuOutput = anchors[outTensor]
if sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT']:
if transpose_rhs:
transpose_indices = list(range(len(vanilla_rhs_dims)))
transpose_indices[-2], transpose_indices[-1] = transpose_indices[-1], transpose_indices[-2]
vanilla_rhs = vanilla_rhs.transpose(tuple(transpose_indices))
goldOutput = mm(lhs, vanilla_rhs)
else:
goldOutput = mm(lhs, vanilla_rhs)
else:
assert len(lhs.shape) == len(rhs.shape)
if(len(lhs.shape) == 2):
lhs = np.expand_dims(lhs, 0)
rhs = np.expand_dims(rhs, 0)
mmOutput = mm(lhs, rhs)
totalGroupDims = int(np.prod(lhs_dims[:-2]))
num_rows_sparsity_mask_2d = output_dims[-2] // block_size[0]
num_cols_sparsity_mask_2d = output_dims[-1] // block_size[2]
assert sparsity_mask.shape == (totalGroupDims * num_rows_sparsity_mask_2d * num_cols_sparsity_mask_2d,)
mmOutput = mmOutput.reshape((totalGroupDims, lhs_dims[-2], rhs_dims[-1]))
goldOutput = []
for dim in range(totalGroupDims):
offset = num_rows_sparsity_mask_2d * num_cols_sparsity_mask_2d
mmOutput_2d = mmOutput[dim]
sliced_sparsity_mask = sparsity_mask[dim * offset: dim * offset + offset]
for sparsity_mask_idx in range(len(sliced_sparsity_mask)):
if sliced_sparsity_mask[sparsity_mask_idx]:
mmOutput_2d_row_start = (sparsity_mask_idx // num_cols_sparsity_mask_2d) * block_size[0]
mmOutput_2d_row_end = mmOutput_2d_row_start + block_size[0]
mmOutput_2d_col_start = (sparsity_mask_idx % num_cols_sparsity_mask_2d) * block_size[2]
mmOutput_2d_col_end = mmOutput_2d_col_start + block_size[2]
mmOutput_2d_sliced = mmOutput_2d[mmOutput_2d_row_start: mmOutput_2d_row_end, mmOutput_2d_col_start: mmOutput_2d_col_end]
goldOutput.append(mmOutput_2d_sliced.reshape(block_size[0] * block_size[2]))
goldOutput = np.array(goldOutput)
return ipuOutput, goldOutput
def sparse_mm_train(sparse_mm_type, lhs_dims, vanilla_rhs_dims, block_size, sparsity_level, transpose_rhs, memory_cycle_ratio, inner_group_size):
if transpose_rhs:
matmul_dims = [lhs_dims[-2], vanilla_rhs_dims[-1], vanilla_rhs_dims[-2]]
else:
matmul_dims = [lhs_dims[-2], vanilla_rhs_dims[-2], vanilla_rhs_dims[-1]]
lhs = create_dense_matrix(lhs_dims)
if sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT']:
bsr_rhs, lengths_per_2d_plane, vanilla_rhs, sparsity_mask = create_sparse_matrix(vanilla_rhs_dims, block_size[1:], sparsity_level)
rhs = bsr_rhs
rhs_dims = bsr_rhs.shape
elif sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT']:
output_dims = lhs_dims[:-1]
output_dims.append(vanilla_rhs_dims[-1])
output_block_size = [block_size[0], block_size[2]]
bsr_output, lengths_per_2d_plane, vanilla_output, sparsity_mask = create_sparse_matrix(output_dims, output_block_size, sparsity_level)
lhs_inv = np.linalg.inv(lhs)
rhs = np.matmul(lhs_inv, vanilla_output)
rhs_dims = vanilla_rhs_dims
# MODEL CREATION
builder = popart.Builder()
lhs_tensorInfo = popart.TensorInfo("FLOAT", lhs_dims)
lhsTensor = builder.addInputTensor(lhs_tensorInfo)
rhsTensor = builder.addInitializedInputTensor(rhs)
outTensor = builder.customOp(opName = "BSMatMul",
opVersion=1,
domain = "ai.graphcore",
inputs = [lhsTensor, rhsTensor],
attributes = {
"bsr_rhs_lengths_per_2d_plane": lengths_per_2d_plane.tolist(),
"matrix_dims": matmul_dims,
"block_size": block_size,
"sparsity_mask": sparsity_mask.tolist(),
"bsmatmul_type": sparse_mm_type,
"transpose_rhs": transpose_rhs,
"memory_cycle_ratio": memory_cycle_ratio,
"inner_group_size": inner_group_size,
"in_type": g_input_data_type,
"out_type": g_output_data_type,
"pp_type": g_pp_data_type
})[0]
builder.addOutputTensor(outTensor)
probs = builder.aiOnnx.softmax([outTensor], axis=1)
if sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT']:
labels_shape = lhs_dims[:-1]
elif sparse_mm_type == g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT']:
labels_shape = [np.sum(sparsity_mask)]
label_tensorInfo = popart.TensorInfo("INT32", labels_shape)
labelTensor = builder.addInputTensor(label_tensorInfo)
loss = builder.aiGraphcore.nllloss([probs, labelTensor], debugContext = "nllLossVal")
proto = builder.getModelProto()
#######################
# Describe how to run the model
anchor_desc = {
outTensor: popart.AnchorReturnType("ALL"),
loss: popart.AnchorReturnType("ALL")
}
dataFlow = popart.DataFlow(1, anchor_desc)
label_data = g_random_labels.choice(9, labels_shape)
session = popart.TrainingSession(fnModel=proto,
loss=loss,
deviceInfo=popart.DeviceManager().acquireAvailableDevice(1),
optimizer=popart.ConstSGD(0.01),
dataFlow=dataFlow)
# Compile graph
session.prepareDevice()
# Create buffers to receive results from the execution
anchors = session.initAnchorArrays()
# TRAINING
session.weightsFromHost()
stepio = popart.PyStepIO({
lhsTensor: lhs,
labelTensor: label_data}, anchors)
session.run(stepio)
def sparse_softmax(dims, block_size, sparsity_level, inner_group_size):
""" """
sparse_input, lengths_per_2d_plane, dense_input, sparsity_mask = create_sparse_matrix(dims, block_size, sparsity_level, -1000)
# Create a builder and construct a graph
builder = popart.Builder()
tensor_info = popart.TensorInfo("FLOAT", sparse_input.shape)
input_tensor = builder.addInputTensor(tensor_info)
output_tensor = builder.customOp(opName = "BsSoftmax",
opVersion = 1,
domain = "ai.graphcore",
inputs = [input_tensor],
attributes = {
"matrixDims": dims,
"blockSize": block_size,
"sparsity": sparsity_mask.tolist(),
"groupSizes": lengths_per_2d_plane.tolist(),
"innerGroupSize": inner_group_size,
"subBlockMaskPerGroup": "None" * len(lengths_per_2d_plane)
})[0]
builder.addOutputTensor(output_tensor)
proto = builder.getModelProto()
# Describe how to run the model
dataFlow = popart.DataFlow(1, {output_tensor: popart.AnchorReturnType("ALL")})
# Create a session to compile and execute the graph
session = popart.InferenceSession(
fnModel=proto,
dataFlow=dataFlow,
deviceInfo=popart.DeviceManager().acquireAvailableDevice(1))
# Compile graph
session.prepareDevice()
# Create buffers to receive results from the execution
anchors = session.initAnchorArrays()
sparse_input = np.array(sparse_input, dtype=g_input_data_type)
stepio = popart.PyStepIO({input_tensor: sparse_input}, anchors)
session.run(stepio)
ipu_output = anchors[output_tensor]
group_dims = dims[:-2]
mat_dims = dims[-2:]
blocks_2d = [mat_dims[0] // block_size[0], mat_dims[1] // block_size[1]]
num_blocks_2d = blocks_2d[0] * blocks_2d[1]
block_area = block_size[0] * block_size[1]
total_group_dims = int(np.prod(group_dims))
assert sparsity_mask.shape == (total_group_dims * num_blocks_2d,)
cpu_output = softmax(dense_input)
np.set_printoptions(precision=2)
np.set_printoptions(suppress=True)
cpu_output = cpu_output.reshape([total_group_dims, blocks_2d[0], block_size[0], blocks_2d[1], block_size[1]])
cpu_output = np.transpose(cpu_output, [0, 1, 3, 2, 4])
cpu_output = cpu_output.reshape(total_group_dims, num_blocks_2d, block_area)
gold_output = []
offset = 0
for g in range(total_group_dims):
cpu_output_2d = cpu_output[g]
sliced_sparsity_mask = sparsity_mask[offset: offset + num_blocks_2d]
offset = offset + num_blocks_2d
for sparsity_mask_idx in range(num_blocks_2d):
if sliced_sparsity_mask[sparsity_mask_idx]:
gold_output.append(cpu_output_2d[sparsity_mask_idx])
gold_output = np.array(gold_output)
assert ipu_output.shape == gold_output.shape
return ipu_output, gold_output
#
# INFERENCE TEST
#
# test_data_infer tuple --> (matMulType, lhs_dims, rhs_dims, block_size, sparsity, transpose_rhs, inner_group_size)
test_data_infer = [
# 2D
("tag_inf_0", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_1", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, False, 1),
("tag_inf_2", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [32, 32], [32, 32], [16, 8, 8], 0.8, False, 1),
("tag_inf_3", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [64, 64], [64, 256], [64, 8, 64], 0.9, False, 1),
("tag_inf_4", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [128, 128], [128, 128], [32, 8, 16], 0.2, False, 1),
# 3D, False
("tag_inf_5", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 8, 8], [2, 8, 8], [8, 8, 8], 0.1, False, 1),
("tag_inf_6", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [5, 16, 16], [5, 16, 16], [8, 8, 8], 0.3, False, 1),
("tag_inf_7", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [7, 32, 32], [7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_8", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [11, 64, 64], [11, 64, 64], [64, 8, 64], 0.6, False, 1),
("tag_inf_9", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [12, 128, 128], [12, 128, 128], [32, 8, 16], 0.8, False, 1),
# 4D, False
("tag_inf_10", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 8, 8], [1, 1, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_11", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 16, 16], [1, 1, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_12", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 32, 32], [1, 1, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_13", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 64, 128], [1, 1, 128, 256], [64, 8, 64], 0.5, False, 1),
("tag_inf_14", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 128, 64], [1, 1, 64, 128], [32, 8, 16], 0.5, False, 1),
("tag_inf_14", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 2, 8, 8], [1, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_16", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 5, 16, 16], [1, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_17", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 7, 32, 32], [1, 7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_18", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 5, 64, 128], [1, 5, 128, 256], [64, 8, 64], 0.5, False, 1),
("tag_inf_19", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 12, 128, 64], [1, 12, 64, 128], [32, 8, 16], 0.5, False, 1),
("tag_inf_20", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 2, 8, 8], [2, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_21", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [5, 5, 16, 16], [5, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_22", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [13, 7, 32, 32], [13, 7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_24", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 12, 128, 64], [1, 12, 64, 128], [32, 8, 16], 0.5, False, 1),
# 2D, lhs has to be square to take inverse, False
("tag_inf_25", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_26", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, False, 1),
("tag_inf_27", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [32, 32], [32, 32], [16, 8, 8], 0.8, False, 1),
("tag_inf_28", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [64, 64], [64, 64], [64, 8, 64], 0.9, False, 1),
("tag_inf_29", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [128, 128], [128, 128], [32, 8, 16], 0.7, False, 1),
# 3D, lhs has to be square to take, False
("tag_inf_30", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [2, 8, 8], [2, 8, 8], [8, 8, 8], 0.1, False, 1),
("tag_inf_31", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [5, 16, 16], [5, 16, 16], [8, 8, 8], 0.3, False, 1),
("tag_inf_32", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [7, 32, 32], [7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_33", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [11, 64, 64], [11, 64, 64], [64, 8, 64], 0.6, False, 1),
("tag_inf_34", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [12, 128, 128], [12, 128, 128], [32, 8, 16], 0.1, False, 1),
# 4D, lhs has to be square to take, False
("tag_inf_36", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 8, 8], [1, 1, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_36", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 16, 16], [1, 1, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_37", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 32, 32], [1, 1, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_38", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 64, 64], [1, 1, 64, 256], [64, 8, 64], 0.5, False, 1),
("tag_inf_39", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 128, 128], [1, 1, 128, 128], [32, 8, 16], 0.5, False, 1),
("tag_inf_40", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 2, 8, 8], [1, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_41", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 5, 16, 16], [1, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_42", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 7, 32, 32], [1, 7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_43", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 11, 64, 64], [1, 11, 64, 256], [64, 8, 64], 0.5, False, 1),
("tag_inf_44", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 12, 128, 128], [1, 12, 128, 128], [32, 8, 16], 0.5, False, 1),
("tag_inf_45", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [2, 2, 8, 8], [2, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_inf_46", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [5, 5, 16, 16], [5, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_inf_47", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [13, 7, 32, 32], [13, 7, 32, 32], [16, 8, 8], 0.5, False, 1),
("tag_inf_49", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 12, 128, 128], [1, 12, 128, 1024], [32, 8, 16], 0.5, False, 1),
# For transpose_rhs True case, last 2 dimensions of block_size must be 8
("tag_inf_50", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, True, 1),
("tag_inf_51", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, True, 1),
("tag_inf_52", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [32, 32], [32, 32], [16, 8, 8], 0.8, True, 1),
("tag_inf_53", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [64, 64], [256, 64], [64, 8, 8], 0.9, True, 1),
("tag_inf_54", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [128, 128], [128, 128], [32, 8, 8], 0.2, True, 1),
("tag_inf_55", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 8, 8], [2, 8, 8], [8, 8, 8], 0.5, True, 1),
("tag_inf_56", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [3, 16, 16], [3, 16, 16], [8, 8, 8], 0.1, True, 1),
("tag_inf_57", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [7, 128, 128], [7, 128, 128], [32, 8, 8], 0.2, True, 1),
("tag_inf_58", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [3, 5, 8, 8], [3, 5, 8, 8], [8, 8, 8], 0.5, True, 1),
("tag_inf_59", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 6, 16, 16], [1, 6, 16, 16], [8, 8, 8], 0.1, True, 1),
("tag_inf_60", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [4, 4, 32, 32], [4, 4, 32, 32], [16, 8, 8], 0.8, True, 1),
# 3D, inner group size > 1
("tag_inf_61", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [12, 128, 128], [12, 128, 128], [32, 8, 16], 0.8, False, 3),
("tag_inf_62", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [12, 128, 128], [12, 128, 128], [32, 8, 16], 0.1, False, 4),
# 4D, inner group size > 1
("tag_inf_23", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [4, 8, 64, 128], [4, 8, 128, 256], [64, 8, 64], 0.5, False, 4),
("tag_inf_48", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [3, 11, 64, 64], [3, 11, 64, 256], [64, 8, 64], 0.5, False, 3),
]
@pytest.mark.parametrize("tag, matmul_type, lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size", test_data_infer)
def test_bsmatmul_infer(custom_ops, tag, matmul_type, lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size):
print("Running test_bsmatmul_infer() with tag: {}, matmul_type:{}, lhs_dims:{}, rhs_dims:{}, block_size:{}, sparsity_level:{}, transpose_rhs:{}, inner_group_size {}"
.format(tag, "DENSE_LHS_SPARSE_RHS_DENSE_OUT" if matmul_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'] else "DENSE_LHS_DENSE_RHS_SPARSE_OUT",
lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size))
memory_cycle_ratio = 1.0
ipuOutput, goldOutput = sparse_mm_infer(matmul_type,
lhs_dims,
rhs_dims,
block_size,
sparsity_level,
transpose_rhs,
memory_cycle_ratio,
inner_group_size)
rtol = 1e-3
atol = 1e-3
np.testing.assert_allclose(ipuOutput, goldOutput, rtol=rtol, atol=atol)
#
# TRAINING TEST
#
# test_data_train tuple --> (matMulType, lhs_dims, rhs_dims, block_size, sparsity, transpose_rhs, inner_group_size)
test_data_train = [
# 2D
("tag_tr_0", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_1", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, False, 1),
("tag_tr_2", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [32, 32], [32, 32], [8, 8, 8], 0.8, False, 1),
("tag_tr_3", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [64, 64], [64, 256], [8, 8, 8], 0.9, False, 1),
("tag_tr_4", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [128, 128], [128, 128], [8, 8, 8], 0.2, False, 1),
# 3D,
("tag_tr_5", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 16, 16], [2, 16, 16], [8, 8, 8], 0.1, False, 1),
("tag_tr_6", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [5, 16, 16], [5, 16, 16], [8, 8, 8], 0.3, False, 1),
("tag_tr_7", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [7, 32, 32], [7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_8", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [11, 64, 64], [11, 64, 64], [8, 8, 8], 0.6, False, 1),
("tag_tr_9", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [12, 128, 128], [12, 128, 128], [8, 8, 8], 0.8, False, 1),
# 4D,
("tag_tr_10", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 8, 8], [1, 1, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_11", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 16, 16], [1, 1, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_12", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 32, 32], [1, 1, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_13", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 64, 128], [1, 1, 128, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_14", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 1, 128, 64], [1, 1, 64, 128], [8, 8, 8], 0.5, False, 1),
("tag_tr_15", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 2, 8, 8], [1, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_16", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 5, 16, 16], [1, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_17", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 7, 32, 32], [1, 7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_18", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 11, 64, 128], [1, 11, 128, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_19", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 12, 128, 64], [1, 12, 64, 128], [8, 8, 8], 0.5, False, 1),
("tag_tr_20", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 2, 8, 8], [2, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_21", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [5, 5, 16, 16], [5, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_22", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [13, 7, 32, 32], [13, 7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_23", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [3, 11, 64, 128], [3, 11, 128, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_24", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 12, 128, 64], [1, 12, 64, 128], [8, 8, 8], 0.5, False, 1),
# 2D, lhs has to be square to take inverse
("tag_tr_25", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_26", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, False, 1),
("tag_tr_27", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [32, 32], [32, 32], [8, 8, 8], 0.8, False, 1),
("tag_tr_28", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [64, 64], [64, 256], [8, 8, 8], 0.9, False, 1),
("tag_tr_29", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [128, 128], [128, 128], [8, 8, 8], 0.2, False, 1),
# 3D, lhs has to be square to take
("tag_tr_30", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [2, 8, 8], [2, 8, 8], [8, 8, 8], 0.1, False, 1),
("tag_tr_31", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [5, 16, 16], [5, 16, 16], [8, 8, 8], 0.3, False, 1),
("tag_tr_32", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [7, 32, 32], [7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_33", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [11, 64, 64], [11, 64, 64], [8, 8, 8], 0.6, False, 1),
("tag_tr_34", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [12, 128, 128], [12, 128, 128], [8, 8, 8], 0.3, False, 1),
# 4D, lhs has to be square to take
("tag_tr_35", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 8, 8], [1, 1, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_36", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 16, 16], [1, 1, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_37", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 32, 32], [1, 1, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_38", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 64, 64], [1, 1, 64, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_39", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 1, 128, 128], [1, 1, 128, 128], [8, 8, 8], 0.5, False, 1),
("tag_tr_40", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 2, 8, 8], [1, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_41", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 5, 16, 16], [1, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_42", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 7, 32, 32], [1, 7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_43", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 11, 64, 64], [1, 11, 64, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_44", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 12, 128, 128], [1, 12, 128, 128], [8, 8, 8], 0.5, False, 1),
("tag_tr_45", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [2, 2, 8, 8], [2, 2, 8, 8], [8, 8, 8], 0.5, False, 1),
("tag_tr_46", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [5, 5, 16, 16], [5, 5, 16, 16], [8, 8, 8], 0.8, False, 1),
("tag_tr_47", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [13, 7, 32, 32], [13, 7, 32, 32], [8, 8, 8], 0.5, False, 1),
("tag_tr_48", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [3, 11, 64, 64], [3, 11, 64, 256], [8, 8, 8], 0.5, False, 1),
("tag_tr_49", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [1, 12, 128, 128], [1, 12, 128, 1024], [8, 8, 8], 0.5, False, 1),
# For transpose_rhs True case, last 2 dimensions of block_size must be 8
("tag_tr_50", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [8, 8], [8, 8], [8, 8, 8], 0.5, True, 1),
("tag_tr_51", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [16, 16], [16, 16], [8, 8, 8], 0.1, True, 1),
("tag_tr_52", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [32, 32], [32, 32], [8, 8, 8], 0.8, True, 1),
("tag_tr_53", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [64, 64], [256, 64], [8, 8, 8], 0.9, True, 1),
("tag_tr_54", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [128, 128], [128, 128], [8, 8, 8], 0.2, True, 1),
("tag_tr_55", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [2, 8, 8], [2, 8, 8], [8, 8, 8], 0.5, True, 1),
("tag_tr_56", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [3, 16, 16], [3, 16, 16], [8, 8, 8], 0.1, True, 1),
("tag_tr_57", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [7, 128, 128], [7, 128, 128], [8, 8, 8], 0.2, True, 1),
("tag_tr_58", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [3, 5, 8, 8], [3, 5, 8, 8], [8, 8, 8], 0.5, True, 1),
("tag_tr_59", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [1, 6, 16, 16], [1, 6, 16, 16], [8, 8, 8], 0.1, True, 1),
("tag_tr_60", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [4, 4, 32, 32], [4, 4, 32, 32], [8, 8, 8], 0.8, True, 1),
# 3D, inner group size > 1
("tag_tr_61", g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'], [12, 128, 128], [12, 128, 128], [8, 8, 8], 0.8, False, 3),
("tag_tr_62", g_sparseMatMulTypeLookup['DENSE_LHS_DENSE_RHS_SPARSE_OUT'], [12, 128, 128], [12, 128, 128], [8, 8, 8], 0.1, False, 4),
]
@pytest.mark.parametrize("tag, matmul_type, lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size", test_data_train)
def test_bsmatmul_train(custom_ops, tag, matmul_type, lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size):
print("Running test_bsmatmul_train() with tag: {}, matmul_type:{}, lhs_dims:{}, rhs_dims:{}, block_size:{}, sparsity_level:{}, transpose_rhs:{}, inner_group_size {}"
.format(tag, "DENSE_LHS_SPARSE_RHS_DENSE_OUT" if matmul_type == g_sparseMatMulTypeLookup['DENSE_LHS_SPARSE_RHS_DENSE_OUT'] else "DENSE_LHS_DENSE_RHS_SPARSE_OUT",
lhs_dims, rhs_dims, block_size, sparsity_level, transpose_rhs, inner_group_size))
memory_cycle_ratio = 1.0
sparse_mm_train(matmul_type,
lhs_dims,
rhs_dims,
block_size,
sparsity_level,
transpose_rhs,
memory_cycle_ratio,
inner_group_size)
# test_data_softmax tuple --> (dims, block_size, sparsity, inner_group_size)
test_data_softmax = [
# 2D
("tag_sm_0", [8, 8], [8, 8], 0.0, 1),
# 3D
("tag_sm_1", [16, 16], [8, 8], 0.4, 1),
# 4D
("tag_sm_2", [2, 2, 16, 16], [8, 8], 0.3, 1),
# 5D, inner group size = 1
("tag_sm_3", [2, 3, 2, 16, 16], [8, 8], 0.1, 1),
# 5D, inner group size > 1
("tag_sm_4", [2, 3, 2, 16, 16], [8, 8], 0.1, 0),
("tag_sm_5", [2, 3, 2, 16, 16], [8, 8], 0.1, 6),
]
@pytest.mark.parametrize("tag, dims, block_size, sparsity_level, inner_group_size", test_data_softmax)
def test_bs_softmax(custom_ops, tag, dims, block_size, sparsity_level, inner_group_size):
print("Running test_bs_softmax() with tag: {}, dims:{}, block_size:{}, sparsity_level:{}, inner_group_size {}"
.format(tag, dims, block_size, sparsity_level, inner_group_size))
ipu_output, gold_output = sparse_softmax(dims,
block_size,
sparsity_level,
inner_group_size)
np.testing.assert_allclose(ipu_output, gold_output, rtol=1e-2, atol=1e-2)
if __name__ == "__main__":
ipu_output, gold_output = sparse_softmax([2, 2, 16, 16],
[8, 8],
0.3,
1)
np.testing.assert_allclose(ipu_output, gold_output, rtol=1e-2, atol=1e-2)
| [
1,
529,
276,
1112,
420,
29958,
10472,
3747,
29914,
4262,
3221,
29918,
19057,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
12367,
3221,
19806,
29889,
2178,
10462,
21676,
29889,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
3166,
5455,
1053,
15065,
13,
5215,
1835,
442,
13,
5215,
11451,
1688,
13,
13,
29937,
3464,
363,
27523,
10930,
13,
29924,
1299,
3960,
29990,
29918,
27998,
29918,
19143,
353,
448,
29896,
29900,
13,
29924,
1299,
3960,
29990,
29918,
29950,
6259,
29950,
29918,
19143,
353,
29871,
29896,
29900,
13,
13,
29937,
3489,
8128,
2304,
363,
29871,
29941,
17690,
310,
29234,
28880,
29915,
29879,
13,
29937,
515,
731,
310,
29871,
29906,
10970,
322,
697,
1962,
29892,
29871,
29906,
310,
963,
674,
367,
20619,
13,
29937,
322,
278,
4654,
674,
367,
29234,
13,
29887,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
353,
426,
13,
1678,
525,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2396,
29871,
29900,
29892,
13,
1678,
525,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
2396,
29871,
29896,
29892,
13,
1678,
525,
5550,
1718,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
2396,
29871,
29906,
13,
29913,
13,
13,
29937,
330,
29918,
1599,
5534,
13,
29937,
13,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
353,
376,
7411,
29941,
29906,
29908,
13,
29887,
29918,
4905,
29918,
1272,
29918,
1853,
353,
376,
7411,
29941,
29906,
29908,
13,
29887,
29918,
407,
29918,
1272,
29918,
1853,
353,
376,
7411,
29941,
29906,
29908,
13,
13,
9302,
29889,
842,
29918,
558,
8941,
1980,
29898,
16292,
29922,
29945,
29900,
29900,
29897,
13,
13,
29887,
29918,
8172,
29918,
29879,
5510,
29918,
13168,
353,
7442,
29889,
8172,
29889,
17875,
2792,
580,
13,
29887,
29918,
8172,
29918,
1272,
353,
7442,
29889,
8172,
29889,
17875,
2792,
580,
13,
29887,
29918,
8172,
29918,
21134,
353,
7442,
29889,
8172,
29889,
17875,
2792,
580,
13,
13,
13,
15945,
29908,
13,
2697,
409,
5779,
310,
4036,
1176,
271,
441,
29879,
29889,
13,
15945,
29908,
13,
29887,
29918,
8172,
29918,
29879,
5510,
29918,
13168,
29889,
26776,
29898,
29896,
29897,
13,
29887,
29918,
8172,
29918,
1272,
29889,
26776,
29898,
29896,
29897,
13,
29887,
29918,
8172,
29918,
21134,
29889,
26776,
29898,
29896,
29897,
13,
13,
13,
1753,
1653,
29918,
29879,
5510,
29918,
1761,
29898,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
2847,
29918,
1767,
29922,
29900,
1125,
13,
1678,
9995,
13,
1678,
3964,
29879,
29901,
13391,
310,
278,
29234,
4636,
13,
1678,
2908,
29918,
2311,
29901,
2159,
310,
263,
2908,
313,
29947,
29916,
29947,
29892,
29871,
29896,
29953,
29916,
29896,
29953,
2992,
29897,
13,
1678,
805,
1503,
537,
29901,
805,
1503,
537,
3233,
313,
29900,
29889,
29946,
2794,
29871,
29946,
29900,
29995,
310,
10930,
526,
4069,
29897,
13,
13,
1678,
3639,
489,
13,
1678,
2908,
29918,
29879,
5510,
29918,
5344,
29901,
7442,
29889,
2378,
310,
954,
29918,
1271,
29879,
334,
2908,
29918,
3616,
13,
1678,
20619,
29918,
5344,
29901,
7442,
29889,
2378,
565,
2159,
3964,
411,
263,
20619,
8954,
310,
278,
4636,
29889,
13,
462,
474,
29889,
29872,
29889,
3902,
20752,
24786,
363,
263,
5225,
2908,
29889,
501,
8485,
304,
2189,
13,
462,
20619,
28880,
29915,
29879,
363,
263,
3407,
1962,
13,
1678,
11105,
29901,
1051,
411,
805,
1503,
537,
4766,
29889,
2159,
353,
954,
29918,
1271,
29879,
313,
20313,
20619,
322,
29234,
29897,
13,
13,
1678,
321,
29889,
29887,
363,
263,
29234,
4636,
310,
2159,
313,
29953,
29892,
29871,
29953,
29897,
411,
2908,
2159,
29871,
29906,
29916,
29906,
13,
1678,
22513,
3743,
29871,
29929,
10930,
310,
2159,
29871,
29906,
29916,
29906,
29892,
777,
29234,
322,
777,
20619,
13,
1678,
960,
278,
29871,
29953,
29916,
29953,
13516,
756,
29871,
29906,
1661,
5225,
10930,
29892,
769,
6317,
13,
13,
1678,
10567,
29879,
29901,
13,
1678,
3964,
29879,
353,
518,
29953,
29892,
29871,
29953,
29962,
13,
1678,
2908,
29918,
2311,
353,
518,
29906,
29892,
29906,
29962,
13,
1678,
805,
1503,
537,
353,
29871,
29900,
29889,
29946,
313,
20834,
29897,
13,
13,
1678,
10604,
29879,
29901,
13,
1678,
2908,
29918,
29879,
5510,
29918,
5344,
353,
29871,
29906,
921,
29871,
29946,
1409,
13,
1678,
20619,
29918,
5344,
353,
29871,
29953,
29916,
29953,
1409,
13,
1678,
805,
1503,
537,
353,
29871,
29929,
29916,
29896,
1051,
13,
1678,
9995,
13,
1678,
2908,
29918,
2311,
29918,
798,
353,
2908,
29918,
2311,
29961,
29900,
29962,
13,
1678,
2908,
29918,
2311,
29918,
1054,
353,
2908,
29918,
2311,
29961,
29896,
29962,
13,
13,
1678,
954,
29918,
1271,
29918,
5727,
353,
3964,
29879,
29961,
29900,
29962,
849,
2908,
29918,
2311,
29918,
798,
13,
1678,
954,
29918,
1271,
29918,
22724,
353,
3964,
29879,
29961,
29896,
29962,
849,
2908,
29918,
2311,
29918,
1054,
13,
13,
1678,
4974,
29898,
29879,
862,
29879,
537,
529,
29871,
29896,
29889,
29900,
29897,
13,
1678,
18618,
353,
518,
29879,
862,
29879,
537,
29892,
29871,
29896,
448,
805,
1503,
537,
29962,
13,
1678,
11105,
353,
330,
29918,
8172,
29918,
29879,
5510,
29918,
13168,
29889,
16957,
4197,
29900,
29892,
29871,
29896,
1402,
2159,
7607,
1949,
29918,
1271,
29918,
5727,
29892,
954,
29918,
1271,
29918,
22724,
511,
282,
29922,
771,
637,
291,
29897,
13,
13,
1678,
396,
4555,
864,
11105,
304,
367,
599,
24786,
13,
1678,
1550,
7442,
29889,
497,
29898,
13168,
1275,
29871,
29900,
1125,
13,
4706,
11105,
353,
330,
29918,
8172,
29918,
29879,
5510,
29918,
13168,
29889,
16957,
4197,
29900,
29892,
29871,
29896,
1402,
2159,
7607,
1949,
29918,
1271,
29918,
5727,
29892,
954,
29918,
1271,
29918,
22724,
511,
282,
29922,
771,
637,
291,
29897,
13,
13,
1678,
565,
2847,
29918,
1767,
1275,
29871,
29900,
29901,
13,
4706,
20619,
29918,
5344,
353,
7442,
29889,
3298,
359,
3552,
1949,
29918,
1271,
29918,
5727,
334,
2908,
29918,
2311,
29918,
798,
29892,
13,
462,
462,
954,
29918,
1271,
29918,
22724,
334,
2908,
29918,
2311,
29918,
1054,
876,
13,
1678,
1683,
29901,
13,
4706,
20619,
29918,
5344,
353,
7442,
29889,
6310,
3552,
1949,
29918,
1271,
29918,
5727,
334,
2908,
29918,
2311,
29918,
798,
29892,
13,
462,
462,
954,
29918,
1271,
29918,
22724,
334,
2908,
29918,
2311,
29918,
1054,
876,
13,
4706,
20619,
29918,
5344,
29889,
5589,
29898,
11228,
29918,
1767,
29897,
13,
13,
1678,
2908,
29918,
29879,
5510,
29918,
5344,
353,
5159,
13,
1678,
363,
2908,
29918,
798,
297,
3464,
29898,
1949,
29918,
1271,
29918,
5727,
1125,
13,
4706,
363,
2908,
29918,
1054,
297,
3464,
29898,
1949,
29918,
1271,
29918,
22724,
1125,
13,
9651,
565,
11105,
29961,
1271,
29918,
798,
3816,
1271,
29918,
1054,
5387,
13,
18884,
2908,
29918,
1272,
353,
330,
29918,
8172,
29918,
1272,
29889,
9502,
524,
29898,
677,
29922,
29924,
1299,
3960,
29990,
29918,
27998,
29918,
19143,
29892,
13,
462,
462,
462,
259,
1880,
29922,
29924,
1299,
3960,
29990,
29918,
29950,
6259,
29950,
29918,
19143,
29892,
13,
462,
462,
462,
259,
2159,
29922,
1271,
29918,
2311,
29918,
798,
334,
2908,
29918,
2311,
29918,
1054,
467,
579,
668,
703,
7411,
29941,
29906,
1159,
13,
18884,
2908,
29918,
29879,
5510,
29918,
5344,
29889,
4397,
29898,
1271,
29918,
1272,
29897,
13,
18884,
20619,
29918,
5344,
29961,
1271,
29918,
798,
334,
2908,
29918,
2311,
29918,
798,
29901,
313,
1271,
29918,
798,
29974,
29896,
29897,
334,
2908,
29918,
2311,
29918,
798,
29892,
13,
462,
632,
2908,
29918,
1054,
334,
2908,
29918,
2311,
29918,
1054,
29901,
313,
1271,
29918,
1054,
29974,
29896,
29897,
334,
2908,
29918,
2311,
29918,
1054,
29962,
353,
2908,
29918,
1272,
29889,
690,
14443,
29898,
1271,
29918,
2311,
29918,
798,
29892,
2908,
29918,
2311,
29918,
1054,
29897,
13,
13,
1678,
396,
2180,
445,
1298,
11105,
338,
263,
29871,
29906,
29928,
1409,
29892,
1652,
8606,
372,
964,
29871,
29896,
29928,
1051,
322,
736,
29892,
289,
21935,
29918,
29878,
9499,
338,
2307,
263,
1051,
313,
578,
3588,
304,
1409,
29897,
13,
1678,
736,
7442,
29889,
2378,
29898,
1271,
29918,
29879,
5510,
29918,
5344,
511,
20619,
29918,
5344,
29892,
11105,
29889,
1579,
8606,
2141,
25027,
391,
580,
13,
13,
13,
1753,
1653,
29918,
1145,
344,
29918,
5344,
29898,
6229,
29879,
1125,
13,
1678,
736,
330,
29918,
8172,
29918,
1272,
29889,
9502,
524,
29898,
677,
29922,
29924,
1299,
3960,
29990,
29918,
27998,
29918,
19143,
29892,
1880,
29922,
29924,
1299,
3960,
29990,
29918,
29950,
6259,
29950,
29918,
19143,
29892,
2159,
29922,
6229,
29879,
467,
579,
668,
29898,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
29897,
13,
13,
13,
1753,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
11522,
979,
29918,
12181,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
2847,
29918,
1767,
29922,
29900,
1125,
13,
1678,
9995,
13,
1678,
6204,
263,
29234,
29918,
5344,
29889,
13,
13,
1678,
10567,
29879,
29901,
13,
1678,
2245,
979,
29918,
12181,
29901,
2391,
310,
13391,
310,
278,
29234,
12489,
321,
29889,
29887,
313,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29946,
29897,
13,
1678,
2908,
29918,
2311,
259,
584,
2159,
310,
1269,
2908,
313,
29872,
29889,
29887,
29889,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
2314,
13,
1678,
805,
1503,
537,
268,
584,
2908,
805,
1503,
537,
3233,
313,
29900,
29889,
29946,
2794,
29892,
29871,
29946,
29900,
29995,
310,
10930,
526,
24786,
29897,
13,
13,
1678,
10604,
29879,
29901,
13,
1678,
289,
21935,
584,
29234,
8954,
310,
4636,
313,
15755,
29920,
29918,
1271,
29879,
334,
2908,
2159,
29897,
13,
1678,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29901,
2391,
411,
954,
29899,
5464,
29899,
9171,
10930,
639,
2318,
3964,
29889,
13,
1678,
474,
29889,
29872,
29889,
363,
263,
313,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29946,
29897,
12489,
411,
29871,
29906,
302,
29876,
29920,
29918,
1271,
29879,
297,
1269,
29871,
29946,
29916,
29946,
4636,
29892,
13,
1678,
445,
674,
505,
8267,
310,
29871,
29953,
29916,
29896,
322,
1269,
1948,
15446,
29871,
29906,
13,
1678,
20619,
29918,
5344,
29901,
20619,
8954,
310,
278,
4636,
313,
1454,
2143,
22235,
29897,
13,
1678,
11105,
584,
1051,
310,
954,
29918,
1271,
29879,
313,
29896,
363,
1661,
29899,
9171,
10930,
322,
29871,
29900,
363,
4045,
29897,
13,
1678,
9995,
13,
1678,
396,
14383,
1833,
1023,
13391,
13,
1678,
396,
1833,
29871,
29906,
3964,
29879,
3896,
278,
28880,
29892,
4045,
883,
278,
2318,
13,
1678,
954,
29918,
2972,
287,
29918,
6229,
29879,
353,
10032,
29898,
16109,
29892,
2245,
979,
29918,
12181,
7503,
29899,
29906,
1402,
29871,
29896,
29897,
13,
1678,
4206,
353,
2245,
979,
29918,
12181,
14352,
29906,
29962,
13,
1678,
28730,
353,
2245,
979,
29918,
12181,
14352,
29896,
29962,
13,
13,
1678,
396,
6204,
20619,
4636,
310,
2245,
979,
3964,
29879,
13,
1678,
565,
2847,
29918,
1767,
1275,
29871,
29900,
29901,
13,
4706,
20619,
29918,
5344,
353,
7442,
29889,
3298,
359,
29898,
11522,
979,
29918,
12181,
467,
579,
668,
29898,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
29897,
13,
1678,
1683,
29901,
13,
4706,
20619,
29918,
5344,
353,
7442,
29889,
6310,
29898,
11522,
979,
29918,
12181,
467,
579,
668,
29898,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
29897,
13,
4706,
20619,
29918,
5344,
29889,
5589,
29898,
11228,
29918,
1767,
29897,
13,
13,
1678,
20619,
29918,
5344,
353,
20619,
29918,
5344,
29889,
690,
14443,
3552,
1949,
29918,
2972,
287,
29918,
6229,
29879,
29892,
4206,
29892,
28730,
876,
13,
13,
1678,
3964,
29879,
353,
518,
11522,
979,
29918,
12181,
14352,
29906,
1402,
2245,
979,
29918,
12181,
14352,
29896,
5262,
13,
13,
1678,
289,
21935,
353,
5159,
13,
1678,
289,
21935,
29918,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
353,
5159,
13,
1678,
11105,
353,
5159,
13,
1678,
363,
3964,
297,
3464,
29898,
1949,
29918,
2972,
287,
29918,
6229,
29879,
1125,
13,
4706,
903,
5824,
29878,
29892,
20619,
29918,
5344,
29961,
6229,
1402,
903,
13168,
353,
1653,
29918,
29879,
5510,
29918,
1761,
29898,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
2847,
29918,
1767,
29897,
13,
4706,
396,
903,
5824,
29878,
5304,
408,
1409,
13,
4706,
396,
903,
13168,
5304,
408,
1051,
13,
13,
4706,
289,
21935,
29889,
21843,
7373,
5824,
29878,
29897,
13,
4706,
11105,
29889,
21843,
7373,
13168,
29897,
13,
13,
4706,
289,
21935,
29918,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29889,
4397,
7373,
5824,
29878,
29889,
12181,
29961,
29900,
2314,
13,
13,
1678,
20619,
29918,
5344,
353,
20619,
29918,
5344,
29889,
690,
14443,
29898,
11522,
979,
29918,
12181,
29897,
13,
1678,
11105,
353,
7442,
29889,
2378,
29898,
13168,
29897,
13,
13,
1678,
2908,
29918,
2311,
29918,
798,
353,
2908,
29918,
2311,
29961,
29900,
29962,
13,
1678,
2908,
29918,
2311,
29918,
1054,
353,
2908,
29918,
2311,
29961,
29896,
29962,
13,
13,
1678,
954,
29918,
1271,
29918,
5727,
353,
3964,
29879,
29961,
29900,
29962,
849,
2908,
29918,
2311,
29918,
798,
13,
1678,
954,
29918,
1271,
29918,
22724,
353,
3964,
29879,
29961,
29896,
29962,
849,
2908,
29918,
2311,
29918,
1054,
13,
13,
1678,
396,
599,
4128,
526,
4133,
408,
12655,
7049,
13,
1678,
736,
7442,
29889,
2378,
29898,
5824,
29878,
511,
7442,
29889,
2378,
29898,
5824,
29878,
29918,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
511,
20619,
29918,
5344,
29892,
11105,
13,
13,
13,
1753,
5654,
29898,
29880,
9499,
29892,
29365,
1125,
13,
1678,
736,
7442,
29889,
2922,
16109,
29898,
29880,
9499,
29892,
29365,
29897,
13,
13,
13,
29937,
624,
519,
4964,
3317,
12655,
5314,
13,
1753,
4964,
3317,
29898,
29916,
1125,
13,
1678,
921,
29918,
3317,
353,
7442,
29889,
3317,
29898,
29916,
29892,
9685,
353,
448,
29896,
29897,
13,
1678,
921,
353,
921,
448,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
29916,
29918,
3317,
29892,
9685,
10457,
29896,
29897,
13,
1678,
921,
353,
7442,
29889,
4548,
29898,
29916,
29897,
13,
1678,
921,
29918,
2083,
353,
7442,
29889,
2083,
29898,
29916,
29892,
9685,
10457,
29896,
29897,
13,
1678,
921,
353,
921,
847,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
29916,
29918,
2083,
29892,
9685,
10457,
29896,
29897,
13,
1678,
736,
921,
13,
13,
13,
1753,
29234,
29918,
4317,
29918,
262,
571,
29898,
29879,
5510,
29918,
4317,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
3370,
29918,
23090,
29918,
3605,
601,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
9995,
9995,
13,
1678,
565,
1301,
4220,
29918,
29878,
9499,
29901,
13,
4706,
1775,
16109,
29918,
6229,
29879,
353,
518,
29880,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29906,
5262,
13,
1678,
1683,
29901,
13,
4706,
1775,
16109,
29918,
6229,
29879,
353,
518,
29880,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
5262,
13,
13,
1678,
301,
9499,
353,
1653,
29918,
1145,
344,
29918,
5344,
29898,
29880,
9499,
29918,
6229,
29879,
29897,
13,
1678,
565,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
29901,
13,
4706,
289,
21935,
29918,
29878,
9499,
29892,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29892,
1109,
2911,
29918,
29878,
9499,
29892,
805,
1503,
537,
29918,
13168,
353,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
3703,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29961,
29896,
29901,
1402,
805,
1503,
537,
29918,
5563,
29897,
13,
13,
4706,
29365,
353,
289,
21935,
29918,
29878,
9499,
13,
4706,
29365,
29918,
6229,
29879,
353,
289,
21935,
29918,
29878,
9499,
29889,
12181,
13,
1678,
25342,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
2033,
29901,
13,
4706,
1962,
29918,
6229,
29879,
353,
301,
9499,
29918,
6229,
29879,
7503,
29899,
29896,
29962,
13,
4706,
1962,
29918,
6229,
29879,
29889,
4397,
29898,
3703,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
2314,
13,
4706,
1962,
29918,
1271,
29918,
2311,
353,
518,
1271,
29918,
2311,
29961,
29900,
1402,
2908,
29918,
2311,
29961,
29906,
5262,
13,
13,
4706,
289,
21935,
29918,
4905,
29892,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29892,
17117,
805,
1503,
537,
29918,
13168,
353,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
4905,
29918,
6229,
29879,
29892,
1962,
29918,
1271,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29897,
13,
13,
4706,
29365,
29918,
6229,
29879,
353,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
13,
4706,
29365,
353,
1653,
29918,
1145,
344,
29918,
5344,
29898,
29878,
9499,
29918,
6229,
29879,
29897,
13,
13,
1678,
396,
6204,
263,
12856,
322,
3386,
263,
3983,
13,
1678,
12856,
353,
1835,
442,
29889,
5627,
580,
13,
13,
1678,
301,
9499,
29918,
20158,
3401,
353,
1835,
442,
29889,
29911,
6073,
3401,
703,
29943,
3927,
1299,
613,
301,
9499,
29918,
6229,
29879,
29897,
13,
1678,
29365,
29918,
20158,
3401,
353,
1835,
442,
29889,
29911,
6073,
3401,
703,
29943,
3927,
1299,
613,
29365,
29918,
6229,
29879,
29897,
13,
13,
1678,
301,
9499,
29911,
6073,
353,
12856,
29889,
1202,
4290,
29911,
6073,
29898,
29880,
9499,
29918,
20158,
3401,
29897,
13,
1678,
29365,
29911,
6073,
353,
12856,
29889,
1202,
4290,
29911,
6073,
29898,
29878,
9499,
29918,
20158,
3401,
29897,
13,
13,
1678,
714,
29911,
6073,
353,
12856,
29889,
6341,
11746,
29898,
459,
1170,
353,
376,
9851,
9782,
29924,
352,
613,
13,
462,
462,
1015,
6594,
29922,
29896,
29892,
13,
462,
462,
5354,
353,
376,
1794,
29889,
4262,
3221,
613,
13,
462,
462,
10970,
353,
518,
29880,
9499,
29911,
6073,
29892,
29365,
29911,
6073,
1402,
13,
462,
462,
8393,
353,
426,
13,
462,
462,
29871,
376,
5824,
29878,
29918,
29878,
9499,
29918,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
1115,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29889,
25027,
391,
3285,
13,
462,
462,
29871,
376,
5344,
29918,
6229,
29879,
1115,
1775,
16109,
29918,
6229,
29879,
29892,
13,
462,
462,
29871,
376,
1271,
29918,
2311,
1115,
2908,
29918,
2311,
29892,
13,
462,
462,
29871,
376,
29879,
862,
29879,
537,
29918,
13168,
1115,
805,
1503,
537,
29918,
13168,
29889,
25027,
391,
3285,
13,
462,
462,
29871,
376,
5824,
2922,
16109,
29918,
1853,
1115,
29234,
29918,
4317,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
3286,
4220,
29918,
29878,
9499,
1115,
1301,
4220,
29918,
29878,
9499,
29892,
13,
462,
462,
29871,
376,
14834,
29918,
23090,
29918,
3605,
601,
1115,
3370,
29918,
23090,
29918,
3605,
601,
29892,
13,
462,
462,
29871,
376,
3993,
29918,
2972,
29918,
2311,
1115,
6426,
29918,
2972,
29918,
2311,
29892,
13,
462,
462,
29871,
376,
262,
29918,
1853,
1115,
330,
29918,
2080,
29918,
1272,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
449,
29918,
1853,
1115,
330,
29918,
4905,
29918,
1272,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
407,
29918,
1853,
1115,
330,
29918,
407,
29918,
1272,
29918,
1853,
13,
462,
462,
5615,
29961,
29900,
29962,
13,
13,
1678,
12856,
29889,
1202,
6466,
29911,
6073,
29898,
449,
29911,
6073,
29897,
13,
13,
1678,
17814,
353,
12856,
29889,
657,
3195,
1184,
517,
580,
13,
13,
1678,
396,
20355,
915,
920,
304,
1065,
278,
1904,
13,
1678,
848,
17907,
353,
1835,
442,
29889,
1469,
17907,
29898,
29896,
29892,
426,
449,
29911,
6073,
29901,
1835,
442,
29889,
24458,
11609,
1542,
703,
9818,
1159,
1800,
13,
13,
1678,
396,
6204,
263,
4867,
304,
6633,
322,
6222,
278,
3983,
13,
1678,
4867,
353,
1835,
442,
29889,
797,
1659,
7317,
29898,
13,
4706,
7876,
3195,
29922,
17529,
29892,
13,
4706,
848,
17907,
29922,
1272,
17907,
29892,
13,
4706,
4742,
3401,
29922,
7323,
442,
29889,
11501,
3260,
2141,
562,
1548,
27635,
11501,
29898,
29896,
876,
13,
13,
1678,
396,
3831,
488,
3983,
13,
1678,
4867,
29889,
19125,
11501,
580,
13,
13,
1678,
396,
6204,
20487,
414,
304,
7150,
2582,
515,
278,
8225,
13,
1678,
23791,
943,
353,
4867,
29889,
2344,
24458,
2588,
29879,
580,
13,
13,
1678,
29365,
353,
7442,
29889,
2378,
29898,
29878,
9499,
29892,
26688,
29922,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
29897,
13,
13,
1678,
4331,
601,
353,
1835,
442,
29889,
19737,
14448,
5971,
3319,
29880,
9499,
29911,
6073,
29901,
301,
9499,
29892,
29365,
29911,
6073,
29901,
29365,
1118,
23791,
943,
29897,
13,
1678,
4867,
29889,
3389,
29898,
10568,
601,
29897,
13,
13,
1678,
474,
3746,
6466,
353,
23791,
943,
29961,
449,
29911,
6073,
29962,
13,
13,
1678,
565,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
29901,
13,
4706,
565,
1301,
4220,
29918,
29878,
9499,
29901,
13,
9651,
1301,
4220,
29918,
513,
1575,
353,
1051,
29898,
3881,
29898,
2435,
29898,
3703,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
4961,
13,
9651,
1301,
4220,
29918,
513,
1575,
14352,
29906,
1402,
1301,
4220,
29918,
513,
1575,
14352,
29896,
29962,
353,
1301,
4220,
29918,
513,
1575,
14352,
29896,
1402,
1301,
4220,
29918,
513,
1575,
14352,
29906,
29962,
13,
13,
9651,
1109,
2911,
29918,
29878,
9499,
353,
1109,
2911,
29918,
29878,
9499,
29889,
3286,
4220,
29898,
23583,
29898,
3286,
4220,
29918,
513,
1575,
876,
13,
9651,
7684,
6466,
353,
5654,
29898,
29880,
9499,
29892,
1109,
2911,
29918,
29878,
9499,
29897,
13,
4706,
1683,
29901,
13,
9651,
7684,
6466,
353,
5654,
29898,
29880,
9499,
29892,
1109,
2911,
29918,
29878,
9499,
29897,
13,
1678,
1683,
29901,
13,
4706,
4974,
7431,
29898,
29880,
9499,
29889,
12181,
29897,
1275,
7431,
29898,
29878,
9499,
29889,
12181,
29897,
13,
4706,
565,
29898,
2435,
29898,
29880,
9499,
29889,
12181,
29897,
1275,
29871,
29906,
1125,
13,
9651,
301,
9499,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
29880,
9499,
29892,
29871,
29900,
29897,
13,
9651,
29365,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
29878,
9499,
29892,
29871,
29900,
29897,
13,
13,
4706,
5654,
6466,
353,
5654,
29898,
29880,
9499,
29892,
29365,
29897,
13,
13,
4706,
3001,
4782,
29928,
9893,
353,
938,
29898,
9302,
29889,
10633,
29898,
29880,
9499,
29918,
6229,
29879,
7503,
29899,
29906,
12622,
13,
13,
4706,
954,
29918,
5727,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
353,
1962,
29918,
6229,
29879,
14352,
29906,
29962,
849,
2908,
29918,
2311,
29961,
29900,
29962,
13,
4706,
954,
29918,
22724,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
353,
1962,
29918,
6229,
29879,
14352,
29896,
29962,
849,
2908,
29918,
2311,
29961,
29906,
29962,
13,
13,
4706,
4974,
805,
1503,
537,
29918,
13168,
29889,
12181,
1275,
313,
7827,
4782,
29928,
9893,
334,
954,
29918,
5727,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
334,
954,
29918,
22724,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
29892,
29897,
13,
4706,
5654,
6466,
353,
5654,
6466,
29889,
690,
14443,
3552,
7827,
4782,
29928,
9893,
29892,
301,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
29365,
29918,
6229,
29879,
14352,
29896,
12622,
13,
13,
4706,
7684,
6466,
353,
5159,
13,
4706,
363,
3964,
297,
3464,
29898,
7827,
4782,
29928,
9893,
1125,
13,
9651,
9210,
353,
954,
29918,
5727,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
334,
954,
29918,
22724,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
13,
9651,
5654,
6466,
29918,
29906,
29881,
353,
5654,
6466,
29961,
6229,
29962,
13,
9651,
269,
506,
287,
29918,
29879,
862,
29879,
537,
29918,
13168,
353,
805,
1503,
537,
29918,
13168,
29961,
6229,
334,
9210,
29901,
3964,
334,
9210,
718,
9210,
29962,
13,
13,
9651,
363,
805,
1503,
537,
29918,
13168,
29918,
13140,
297,
3464,
29898,
2435,
29898,
29879,
506,
287,
29918,
29879,
862,
29879,
537,
29918,
13168,
22164,
13,
18884,
565,
269,
506,
287,
29918,
29879,
862,
29879,
537,
29918,
13168,
29961,
29879,
862,
29879,
537,
29918,
13168,
29918,
13140,
5387,
13,
462,
1678,
5654,
6466,
29918,
29906,
29881,
29918,
798,
29918,
2962,
353,
313,
29879,
862,
29879,
537,
29918,
13168,
29918,
13140,
849,
954,
29918,
22724,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
29897,
334,
2908,
29918,
2311,
29961,
29900,
29962,
13,
462,
1678,
5654,
6466,
29918,
29906,
29881,
29918,
798,
29918,
355,
353,
5654,
6466,
29918,
29906,
29881,
29918,
798,
29918,
2962,
718,
2908,
29918,
2311,
29961,
29900,
29962,
13,
13,
462,
1678,
5654,
6466,
29918,
29906,
29881,
29918,
1054,
29918,
2962,
353,
313,
29879,
862,
29879,
537,
29918,
13168,
29918,
13140,
1273,
954,
29918,
22724,
29918,
29879,
862,
29879,
537,
29918,
13168,
29918,
29906,
29881,
29897,
334,
2908,
29918,
2311,
29961,
29906,
29962,
13,
462,
1678,
5654,
6466,
29918,
29906,
29881,
29918,
1054,
29918,
355,
353,
5654,
6466,
29918,
29906,
29881,
29918,
1054,
29918,
2962,
718,
2908,
29918,
2311,
29961,
29906,
29962,
13,
13,
462,
1678,
5654,
6466,
29918,
29906,
29881,
29918,
29879,
506,
287,
353,
5654,
6466,
29918,
29906,
29881,
29961,
4317,
6466,
29918,
29906,
29881,
29918,
798,
29918,
2962,
29901,
5654,
6466,
29918,
29906,
29881,
29918,
798,
29918,
355,
29892,
5654,
6466,
29918,
29906,
29881,
29918,
1054,
29918,
2962,
29901,
5654,
6466,
29918,
29906,
29881,
29918,
1054,
29918,
355,
29962,
13,
462,
1678,
7684,
6466,
29889,
4397,
29898,
4317,
6466,
29918,
29906,
29881,
29918,
29879,
506,
287,
29889,
690,
14443,
29898,
1271,
29918,
2311,
29961,
29900,
29962,
334,
2908,
29918,
2311,
29961,
29906,
12622,
13,
13,
4706,
7684,
6466,
353,
7442,
29889,
2378,
29898,
29887,
1025,
6466,
29897,
13,
13,
1678,
736,
474,
3746,
6466,
29892,
7684,
6466,
13,
13,
13,
1753,
29234,
29918,
4317,
29918,
14968,
29898,
29879,
5510,
29918,
4317,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
3370,
29918,
23090,
29918,
3605,
601,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
565,
1301,
4220,
29918,
29878,
9499,
29901,
13,
4706,
1775,
16109,
29918,
6229,
29879,
353,
518,
29880,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29906,
5262,
13,
1678,
1683,
29901,
13,
4706,
1775,
16109,
29918,
6229,
29879,
353,
518,
29880,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29906,
1402,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
5262,
13,
13,
1678,
301,
9499,
353,
1653,
29918,
1145,
344,
29918,
5344,
29898,
29880,
9499,
29918,
6229,
29879,
29897,
13,
1678,
565,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
29901,
13,
4706,
289,
21935,
29918,
29878,
9499,
29892,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29892,
1109,
2911,
29918,
29878,
9499,
29892,
805,
1503,
537,
29918,
13168,
353,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
3703,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29961,
29896,
29901,
1402,
805,
1503,
537,
29918,
5563,
29897,
13,
13,
4706,
29365,
353,
289,
21935,
29918,
29878,
9499,
13,
4706,
29365,
29918,
6229,
29879,
353,
289,
21935,
29918,
29878,
9499,
29889,
12181,
13,
13,
1678,
25342,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
2033,
29901,
13,
4706,
1962,
29918,
6229,
29879,
353,
301,
9499,
29918,
6229,
29879,
7503,
29899,
29896,
29962,
13,
4706,
1962,
29918,
6229,
29879,
29889,
4397,
29898,
3703,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
14352,
29896,
2314,
13,
4706,
1962,
29918,
1271,
29918,
2311,
353,
518,
1271,
29918,
2311,
29961,
29900,
1402,
2908,
29918,
2311,
29961,
29906,
5262,
13,
13,
4706,
289,
21935,
29918,
4905,
29892,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29892,
1109,
2911,
29918,
4905,
29892,
805,
1503,
537,
29918,
13168,
353,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
4905,
29918,
6229,
29879,
29892,
1962,
29918,
1271,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29897,
13,
13,
4706,
301,
9499,
29918,
11569,
353,
7442,
29889,
29880,
979,
29887,
29889,
11569,
29898,
29880,
9499,
29897,
13,
13,
4706,
29365,
353,
7442,
29889,
2922,
16109,
29898,
29880,
9499,
29918,
11569,
29892,
1109,
2911,
29918,
4905,
29897,
13,
4706,
29365,
29918,
6229,
29879,
353,
1109,
2911,
29918,
29878,
9499,
29918,
6229,
29879,
13,
13,
1678,
396,
16999,
2287,
29931,
315,
1525,
8098,
13,
1678,
12856,
353,
1835,
442,
29889,
5627,
580,
13,
13,
1678,
301,
9499,
29918,
20158,
3401,
353,
1835,
442,
29889,
29911,
6073,
3401,
703,
29943,
3927,
1299,
613,
301,
9499,
29918,
6229,
29879,
29897,
13,
1678,
301,
9499,
29911,
6073,
353,
12856,
29889,
1202,
4290,
29911,
6073,
29898,
29880,
9499,
29918,
20158,
3401,
29897,
13,
1678,
29365,
29911,
6073,
353,
12856,
29889,
1202,
15514,
1891,
4290,
29911,
6073,
29898,
29878,
9499,
29897,
13,
13,
1678,
714,
29911,
6073,
353,
12856,
29889,
6341,
11746,
29898,
459,
1170,
353,
376,
9851,
9782,
29924,
352,
613,
13,
462,
462,
1015,
6594,
29922,
29896,
29892,
13,
462,
462,
5354,
353,
376,
1794,
29889,
4262,
3221,
613,
13,
462,
462,
10970,
353,
518,
29880,
9499,
29911,
6073,
29892,
29365,
29911,
6073,
1402,
13,
462,
462,
8393,
353,
426,
13,
462,
462,
29871,
376,
5824,
29878,
29918,
29878,
9499,
29918,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
1115,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29889,
25027,
391,
3285,
13,
462,
462,
29871,
376,
5344,
29918,
6229,
29879,
1115,
1775,
16109,
29918,
6229,
29879,
29892,
13,
462,
462,
29871,
376,
1271,
29918,
2311,
1115,
2908,
29918,
2311,
29892,
13,
462,
462,
29871,
376,
29879,
862,
29879,
537,
29918,
13168,
1115,
805,
1503,
537,
29918,
13168,
29889,
25027,
391,
3285,
13,
462,
462,
29871,
376,
5824,
2922,
16109,
29918,
1853,
1115,
29234,
29918,
4317,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
3286,
4220,
29918,
29878,
9499,
1115,
1301,
4220,
29918,
29878,
9499,
29892,
13,
462,
462,
29871,
376,
14834,
29918,
23090,
29918,
3605,
601,
1115,
3370,
29918,
23090,
29918,
3605,
601,
29892,
13,
462,
462,
29871,
376,
3993,
29918,
2972,
29918,
2311,
1115,
6426,
29918,
2972,
29918,
2311,
29892,
13,
462,
462,
29871,
376,
262,
29918,
1853,
1115,
330,
29918,
2080,
29918,
1272,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
449,
29918,
1853,
1115,
330,
29918,
4905,
29918,
1272,
29918,
1853,
29892,
13,
462,
462,
29871,
376,
407,
29918,
1853,
1115,
330,
29918,
407,
29918,
1272,
29918,
1853,
13,
462,
462,
5615,
29961,
29900,
29962,
13,
13,
1678,
12856,
29889,
1202,
6466,
29911,
6073,
29898,
449,
29911,
6073,
29897,
13,
13,
1678,
2070,
29879,
353,
12856,
29889,
1794,
2951,
23818,
29889,
2695,
3317,
4197,
449,
29911,
6073,
1402,
9685,
29922,
29896,
29897,
13,
13,
1678,
565,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
29901,
13,
4706,
11073,
29918,
12181,
353,
301,
9499,
29918,
6229,
29879,
7503,
29899,
29896,
29962,
13,
1678,
25342,
29234,
29918,
4317,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
2033,
29901,
13,
4706,
11073,
29918,
12181,
353,
518,
9302,
29889,
2083,
29898,
29879,
862,
29879,
537,
29918,
13168,
4638,
13,
13,
1678,
3858,
29918,
20158,
3401,
353,
1835,
442,
29889,
29911,
6073,
3401,
703,
10192,
29941,
29906,
613,
11073,
29918,
12181,
29897,
13,
1678,
3858,
29911,
6073,
353,
12856,
29889,
1202,
4290,
29911,
6073,
29898,
1643,
29918,
20158,
3401,
29897,
13,
13,
1678,
6410,
353,
12856,
29889,
1794,
9527,
3221,
29889,
29876,
645,
6758,
4197,
771,
5824,
29892,
3858,
29911,
6073,
1402,
4744,
2677,
353,
376,
29876,
645,
29931,
2209,
1440,
1159,
13,
13,
1678,
17814,
353,
12856,
29889,
657,
3195,
1184,
517,
580,
13,
1678,
835,
13383,
4136,
13,
13,
1678,
396,
20355,
915,
920,
304,
1065,
278,
1904,
13,
1678,
17360,
29918,
14273,
353,
426,
13,
4706,
714,
29911,
6073,
29901,
1835,
442,
29889,
24458,
11609,
1542,
703,
9818,
4968,
13,
4706,
6410,
29901,
1835,
442,
29889,
24458,
11609,
1542,
703,
9818,
1159,
13,
1678,
500,
13,
13,
1678,
848,
17907,
353,
1835,
442,
29889,
1469,
17907,
29898,
29896,
29892,
17360,
29918,
14273,
29897,
13,
13,
1678,
3858,
29918,
1272,
353,
330,
29918,
8172,
29918,
21134,
29889,
16957,
29898,
29929,
29892,
11073,
29918,
12181,
29897,
13,
13,
1678,
4867,
353,
1835,
442,
29889,
5323,
2827,
7317,
29898,
9144,
3195,
29922,
17529,
29892,
13,
462,
462,
268,
6410,
29922,
6758,
29892,
13,
462,
462,
268,
4742,
3401,
29922,
7323,
442,
29889,
11501,
3260,
2141,
562,
1548,
27635,
11501,
29898,
29896,
511,
13,
462,
462,
268,
5994,
3950,
29922,
7323,
442,
29889,
12075,
26016,
29928,
29898,
29900,
29889,
29900,
29896,
511,
13,
462,
462,
268,
848,
17907,
29922,
1272,
17907,
29897,
13,
13,
1678,
396,
3831,
488,
3983,
13,
1678,
4867,
29889,
19125,
11501,
580,
13,
13,
1678,
396,
6204,
20487,
414,
304,
7150,
2582,
515,
278,
8225,
13,
1678,
23791,
943,
353,
4867,
29889,
2344,
24458,
2588,
29879,
580,
13,
13,
1678,
396,
323,
4717,
1177,
4214,
13,
1678,
4867,
29889,
705,
5861,
4591,
8514,
580,
13,
13,
1678,
4331,
601,
353,
1835,
442,
29889,
19737,
14448,
5971,
3319,
13,
9651,
301,
9499,
29911,
6073,
29901,
301,
9499,
29892,
13,
9651,
3858,
29911,
6073,
29901,
3858,
29918,
1272,
1118,
23791,
943,
29897,
13,
13,
1678,
4867,
29889,
3389,
29898,
10568,
601,
29897,
13,
13,
13,
1753,
29234,
29918,
2695,
3317,
29898,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
9995,
9995,
13,
13,
1678,
29234,
29918,
2080,
29892,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29892,
20619,
29918,
2080,
29892,
805,
1503,
537,
29918,
13168,
353,
1653,
29918,
29879,
5510,
29918,
5344,
29898,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
448,
29896,
29900,
29900,
29900,
29897,
13,
13,
1678,
396,
6204,
263,
12856,
322,
3386,
263,
3983,
13,
1678,
12856,
353,
1835,
442,
29889,
5627,
580,
13,
13,
1678,
12489,
29918,
3888,
353,
1835,
442,
29889,
29911,
6073,
3401,
703,
29943,
3927,
1299,
613,
29234,
29918,
2080,
29889,
12181,
29897,
13,
1678,
1881,
29918,
20158,
353,
12856,
29889,
1202,
4290,
29911,
6073,
29898,
20158,
29918,
3888,
29897,
13,
13,
1678,
1962,
29918,
20158,
353,
12856,
29889,
6341,
11746,
29898,
459,
1170,
353,
376,
29933,
29879,
6295,
615,
3317,
613,
13,
462,
462,
268,
1015,
6594,
353,
29871,
29896,
29892,
13,
462,
462,
268,
5354,
353,
376,
1794,
29889,
4262,
3221,
613,
13,
462,
462,
268,
10970,
353,
518,
2080,
29918,
20158,
1402,
13,
462,
462,
268,
8393,
353,
426,
13,
462,
462,
418,
376,
5344,
29928,
9893,
1115,
3964,
29879,
29892,
13,
462,
462,
418,
376,
1271,
3505,
1115,
2908,
29918,
2311,
29892,
13,
462,
462,
418,
376,
29879,
862,
29879,
537,
1115,
805,
1503,
537,
29918,
13168,
29889,
25027,
391,
3285,
13,
462,
462,
418,
376,
2972,
29903,
7093,
1115,
27497,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29889,
25027,
391,
3285,
13,
462,
462,
418,
376,
3993,
4782,
3505,
1115,
6426,
29918,
2972,
29918,
2311,
29892,
13,
462,
462,
418,
376,
1491,
7445,
19832,
5894,
4782,
1115,
376,
8516,
29908,
334,
7431,
29898,
2848,
29879,
29918,
546,
29918,
29906,
29881,
29918,
22116,
29897,
13,
462,
462,
268,
5615,
29961,
29900,
29962,
13,
1678,
12856,
29889,
1202,
6466,
29911,
6073,
29898,
4905,
29918,
20158,
29897,
13,
13,
1678,
17814,
353,
12856,
29889,
657,
3195,
1184,
517,
580,
13,
13,
1678,
396,
20355,
915,
920,
304,
1065,
278,
1904,
13,
1678,
848,
17907,
353,
1835,
442,
29889,
1469,
17907,
29898,
29896,
29892,
426,
4905,
29918,
20158,
29901,
1835,
442,
29889,
24458,
11609,
1542,
703,
9818,
1159,
1800,
13,
13,
1678,
396,
6204,
263,
4867,
304,
6633,
322,
6222,
278,
3983,
13,
1678,
4867,
353,
1835,
442,
29889,
797,
1659,
7317,
29898,
13,
4706,
7876,
3195,
29922,
17529,
29892,
13,
4706,
848,
17907,
29922,
1272,
17907,
29892,
13,
4706,
4742,
3401,
29922,
7323,
442,
29889,
11501,
3260,
2141,
562,
1548,
27635,
11501,
29898,
29896,
876,
13,
13,
1678,
396,
3831,
488,
3983,
13,
1678,
4867,
29889,
19125,
11501,
580,
13,
13,
1678,
396,
6204,
20487,
414,
304,
7150,
2582,
515,
278,
8225,
13,
1678,
23791,
943,
353,
4867,
29889,
2344,
24458,
2588,
29879,
580,
13,
13,
1678,
29234,
29918,
2080,
353,
7442,
29889,
2378,
29898,
29879,
5510,
29918,
2080,
29892,
26688,
29922,
29887,
29918,
2080,
29918,
1272,
29918,
1853,
29897,
13,
1678,
4331,
601,
353,
1835,
442,
29889,
19737,
14448,
5971,
3319,
2080,
29918,
20158,
29901,
29234,
29918,
2080,
1118,
23791,
943,
29897,
13,
1678,
4867,
29889,
3389,
29898,
10568,
601,
29897,
13,
13,
1678,
474,
3746,
29918,
4905,
353,
23791,
943,
29961,
4905,
29918,
20158,
29962,
13,
13,
1678,
2318,
29918,
6229,
29879,
353,
3964,
29879,
7503,
29899,
29906,
29962,
13,
1678,
1775,
29918,
6229,
29879,
353,
3964,
29879,
14352,
29906,
17531,
13,
1678,
10930,
29918,
29906,
29881,
353,
518,
2922,
29918,
6229,
29879,
29961,
29900,
29962,
849,
2908,
29918,
2311,
29961,
29900,
1402,
1775,
29918,
6229,
29879,
29961,
29896,
29962,
849,
2908,
29918,
2311,
29961,
29896,
5262,
13,
1678,
954,
29918,
1271,
29879,
29918,
29906,
29881,
353,
10930,
29918,
29906,
29881,
29961,
29900,
29962,
334,
10930,
29918,
29906,
29881,
29961,
29896,
29962,
13,
1678,
2908,
29918,
6203,
353,
2908,
29918,
2311,
29961,
29900,
29962,
334,
2908,
29918,
2311,
29961,
29896,
29962,
13,
13,
1678,
3001,
29918,
2972,
29918,
6229,
29879,
353,
938,
29898,
9302,
29889,
10633,
29898,
2972,
29918,
6229,
29879,
876,
13,
1678,
4974,
805,
1503,
537,
29918,
13168,
29889,
12181,
1275,
313,
7827,
29918,
2972,
29918,
6229,
29879,
334,
954,
29918,
1271,
29879,
29918,
29906,
29881,
29892,
29897,
13,
13,
1678,
26403,
29918,
4905,
353,
4964,
3317,
29898,
1145,
344,
29918,
2080,
29897,
13,
13,
1678,
7442,
29889,
842,
29918,
558,
8941,
1980,
29898,
17990,
2459,
29922,
29906,
29897,
13,
1678,
7442,
29889,
842,
29918,
558,
8941,
1980,
29898,
19303,
1253,
29922,
5574,
29897,
13,
13,
1678,
26403,
29918,
4905,
353,
26403,
29918,
4905,
29889,
690,
14443,
4197,
7827,
29918,
2972,
29918,
6229,
29879,
29892,
10930,
29918,
29906,
29881,
29961,
29900,
1402,
2908,
29918,
2311,
29961,
29900,
1402,
10930,
29918,
29906,
29881,
29961,
29896,
1402,
2908,
29918,
2311,
29961,
29896,
24960,
13,
1678,
26403,
29918,
4905,
353,
7442,
29889,
3286,
4220,
29898,
21970,
29918,
4905,
29892,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
29892,
29871,
29946,
2314,
13,
1678,
26403,
29918,
4905,
353,
26403,
29918,
4905,
29889,
690,
14443,
29898,
7827,
29918,
2972,
29918,
6229,
29879,
29892,
954,
29918,
1271,
29879,
29918,
29906,
29881,
29892,
2908,
29918,
6203,
29897,
13,
13,
1678,
7684,
29918,
4905,
353,
5159,
13,
1678,
9210,
353,
29871,
29900,
13,
1678,
363,
330,
297,
3464,
29898,
7827,
29918,
2972,
29918,
6229,
29879,
1125,
13,
4706,
26403,
29918,
4905,
29918,
29906,
29881,
353,
26403,
29918,
4905,
29961,
29887,
29962,
13,
13,
4706,
269,
506,
287,
29918,
29879,
862,
29879,
537,
29918,
13168,
353,
805,
1503,
537,
29918,
13168,
29961,
10289,
29901,
9210,
718,
954,
29918,
1271,
29879,
29918,
29906,
29881,
29962,
13,
4706,
9210,
353,
9210,
718,
954,
29918,
1271,
29879,
29918,
29906,
29881,
13,
4706,
363,
805,
1503,
537,
29918,
13168,
29918,
13140,
297,
3464,
29898,
1949,
29918,
1271,
29879,
29918,
29906,
29881,
1125,
13,
9651,
565,
269,
506,
287,
29918,
29879,
862,
29879,
537,
29918,
13168,
29961,
29879,
862,
29879,
537,
29918,
13168,
29918,
13140,
5387,
13,
18884,
7684,
29918,
4905,
29889,
4397,
29898,
21970,
29918,
4905,
29918,
29906,
29881,
29961,
29879,
862,
29879,
537,
29918,
13168,
29918,
13140,
2314,
13,
13,
1678,
7684,
29918,
4905,
353,
7442,
29889,
2378,
29898,
29887,
1025,
29918,
4905,
29897,
13,
1678,
4974,
474,
3746,
29918,
4905,
29889,
12181,
1275,
7684,
29918,
4905,
29889,
12181,
13,
13,
1678,
736,
474,
3746,
29918,
4905,
29892,
7684,
29918,
4905,
13,
13,
13,
29937,
13,
29937,
2672,
29943,
1001,
1430,
4741,
17067,
1254,
13,
29937,
13,
13,
29937,
1243,
29918,
1272,
29918,
262,
571,
18761,
6660,
313,
2922,
29924,
352,
1542,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
29897,
13,
1688,
29918,
1272,
29918,
262,
571,
353,
518,
13,
1678,
396,
29871,
29906,
29928,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29929,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29906,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
7700,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29953,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29946,
29928,
29892,
7700,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29896,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29906,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
16402,
29892,
7700,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29929,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29955,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
29892,
7700,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29953,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29946,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
29892,
7700,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29941,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29900,
29906,
29946,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
1152,
1301,
4220,
29918,
29878,
9499,
5852,
1206,
29892,
1833,
29871,
29906,
13391,
310,
2908,
29918,
2311,
1818,
367,
29871,
29947,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29906,
29945,
29953,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29929,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29941,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29955,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29941,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29945,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29953,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29953,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29953,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29946,
29892,
29871,
29946,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29946,
29892,
29871,
29946,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
5852,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
6426,
2318,
2159,
1405,
29871,
29896,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29953,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29941,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29953,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29906,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29946,
511,
13,
13,
1678,
396,
29871,
29946,
29928,
29892,
6426,
2318,
2159,
1405,
29871,
29896,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29906,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29946,
29892,
29871,
29947,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29946,
511,
13,
1678,
4852,
4039,
29918,
7192,
29918,
29946,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29953,
29946,
29892,
29871,
29947,
29892,
29871,
29953,
29946,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29941,
511,
13,
29962,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
4039,
29892,
1775,
16109,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
613,
1243,
29918,
1272,
29918,
262,
571,
29897,
13,
1753,
1243,
29918,
5824,
2922,
16109,
29918,
262,
571,
29898,
6341,
29918,
3554,
29892,
4055,
29892,
1775,
16109,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
1596,
703,
27795,
1243,
29918,
5824,
2922,
16109,
29918,
262,
571,
580,
411,
4055,
29901,
24335,
1775,
16109,
29918,
1853,
26254,
1118,
301,
9499,
29918,
6229,
29879,
26254,
1118,
29365,
29918,
6229,
29879,
26254,
1118,
2908,
29918,
2311,
26254,
1118,
805,
1503,
537,
29918,
5563,
26254,
1118,
1301,
4220,
29918,
29878,
9499,
26254,
1118,
6426,
29918,
2972,
29918,
2311,
426,
5038,
13,
3986,
869,
4830,
29898,
4039,
29892,
376,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
29908,
565,
1775,
16109,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
1683,
376,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
613,
13,
462,
29871,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
876,
13,
13,
1678,
3370,
29918,
23090,
29918,
3605,
601,
353,
29871,
29896,
29889,
29900,
13,
1678,
474,
3746,
6466,
29892,
7684,
6466,
353,
29234,
29918,
4317,
29918,
262,
571,
29898,
2922,
16109,
29918,
1853,
29892,
13,
462,
462,
9651,
301,
9499,
29918,
6229,
29879,
29892,
13,
462,
462,
9651,
29365,
29918,
6229,
29879,
29892,
13,
462,
462,
9651,
2908,
29918,
2311,
29892,
13,
462,
462,
9651,
805,
1503,
537,
29918,
5563,
29892,
13,
462,
462,
9651,
1301,
4220,
29918,
29878,
9499,
29892,
13,
462,
462,
9651,
3370,
29918,
23090,
29918,
3605,
601,
29892,
13,
462,
462,
9651,
6426,
29918,
2972,
29918,
2311,
29897,
13,
1678,
364,
25027,
353,
29871,
29896,
29872,
29899,
29941,
13,
1678,
472,
324,
353,
29871,
29896,
29872,
29899,
29941,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
666,
29884,
6466,
29892,
7684,
6466,
29892,
364,
25027,
29922,
2273,
324,
29892,
472,
324,
29922,
14947,
29897,
13,
13,
29937,
13,
29937,
323,
4717,
1177,
4214,
17067,
1254,
13,
29937,
13,
13,
29937,
1243,
29918,
1272,
29918,
14968,
18761,
6660,
313,
2922,
29924,
352,
1542,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
29897,
13,
1688,
29918,
1272,
29918,
14968,
353,
518,
13,
1678,
396,
29871,
29906,
29928,
13,
1678,
4852,
4039,
29918,
509,
29918,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29929,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29953,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29946,
29928,
29892,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29896,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29906,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
16402,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29929,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29906,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29953,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29946,
29928,
29892,
301,
9499,
756,
304,
367,
6862,
304,
2125,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29941,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29896,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29941,
29892,
29871,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29945,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29946,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29900,
29906,
29946,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
7700,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
1152,
1301,
4220,
29918,
29878,
9499,
5852,
1206,
29892,
1833,
29871,
29906,
13391,
310,
2908,
29918,
2311,
1818,
367,
29871,
29947,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29941,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29953,
29946,
29892,
29871,
29953,
29946,
1402,
518,
29906,
29945,
29953,
29892,
29871,
29953,
29946,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29929,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29946,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29945,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29906,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29953,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29941,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29955,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29955,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29955,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29906,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29947,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29941,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29941,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29945,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29945,
29929,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29892,
29871,
29953,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29896,
29892,
29871,
29953,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
5852,
29892,
29871,
29896,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29953,
29900,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29946,
29892,
29871,
29946,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29946,
29892,
29871,
29946,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
5852,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29941,
29928,
29892,
6426,
2318,
2159,
1405,
29871,
29896,
13,
1678,
4852,
4039,
29918,
509,
29918,
29953,
29896,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29947,
29892,
7700,
29892,
29871,
29941,
511,
13,
1678,
4852,
4039,
29918,
509,
29918,
29953,
29906,
613,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
7464,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29896,
29906,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29947,
1402,
518,
29947,
29892,
29871,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
7700,
29892,
29871,
29946,
511,
13,
29962,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
4039,
29892,
1775,
16109,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
613,
1243,
29918,
1272,
29918,
14968,
29897,
13,
1753,
1243,
29918,
5824,
2922,
16109,
29918,
14968,
29898,
6341,
29918,
3554,
29892,
4055,
29892,
1775,
16109,
29918,
1853,
29892,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
1596,
703,
27795,
1243,
29918,
5824,
2922,
16109,
29918,
14968,
580,
411,
4055,
29901,
24335,
1775,
16109,
29918,
1853,
26254,
1118,
301,
9499,
29918,
6229,
29879,
26254,
1118,
29365,
29918,
6229,
29879,
26254,
1118,
2908,
29918,
2311,
26254,
1118,
805,
1503,
537,
29918,
5563,
26254,
1118,
1301,
4220,
29918,
29878,
9499,
26254,
1118,
6426,
29918,
2972,
29918,
2311,
426,
5038,
13,
3986,
869,
4830,
29898,
4039,
29892,
376,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
29908,
565,
1775,
16109,
29918,
1853,
1275,
330,
29918,
29879,
5510,
9782,
29924,
352,
1542,
14959,
786,
1839,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
5550,
1718,
1660,
29918,
29934,
14851,
29918,
29928,
1430,
1660,
29918,
12015,
2033,
1683,
376,
29928,
1430,
1660,
29918,
29931,
14851,
29918,
29928,
1430,
1660,
29918,
29934,
14851,
29918,
5550,
1718,
1660,
29918,
12015,
613,
13,
462,
29871,
301,
9499,
29918,
6229,
29879,
29892,
29365,
29918,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
1301,
4220,
29918,
29878,
9499,
29892,
6426,
29918,
2972,
29918,
2311,
876,
13,
1678,
3370,
29918,
23090,
29918,
3605,
601,
353,
29871,
29896,
29889,
29900,
13,
13,
1678,
29234,
29918,
4317,
29918,
14968,
29898,
2922,
16109,
29918,
1853,
29892,
13,
462,
1678,
301,
9499,
29918,
6229,
29879,
29892,
13,
462,
1678,
29365,
29918,
6229,
29879,
29892,
13,
462,
1678,
2908,
29918,
2311,
29892,
13,
462,
1678,
805,
1503,
537,
29918,
5563,
29892,
13,
462,
1678,
1301,
4220,
29918,
29878,
9499,
29892,
13,
462,
1678,
3370,
29918,
23090,
29918,
3605,
601,
29892,
13,
462,
1678,
6426,
29918,
2972,
29918,
2311,
29897,
13,
13,
29937,
1243,
29918,
1272,
29918,
2695,
3317,
18761,
6660,
313,
6229,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29892,
6426,
29918,
2972,
29918,
2311,
29897,
13,
1688,
29918,
1272,
29918,
2695,
3317,
353,
518,
13,
1678,
396,
29871,
29906,
29928,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29900,
613,
518,
29947,
29892,
29871,
29947,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29900,
29892,
29871,
29896,
511,
13,
1678,
396,
29871,
29941,
29928,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29896,
613,
518,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29946,
29892,
29871,
29896,
511,
13,
1678,
396,
29871,
29946,
29928,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29906,
613,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29941,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29945,
29928,
29892,
6426,
2318,
2159,
353,
29871,
29896,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29941,
613,
518,
29906,
29892,
29871,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
511,
13,
13,
1678,
396,
29871,
29945,
29928,
29892,
6426,
2318,
2159,
1405,
29871,
29896,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29946,
613,
518,
29906,
29892,
29871,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
29871,
29900,
511,
13,
1678,
4852,
4039,
29918,
3844,
29918,
29945,
613,
518,
29906,
29892,
29871,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
518,
29947,
29892,
29871,
29947,
1402,
29871,
29900,
29889,
29896,
29892,
29871,
29953,
511,
13,
29962,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
703,
4039,
29892,
3964,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
6426,
29918,
2972,
29918,
2311,
613,
1243,
29918,
1272,
29918,
2695,
3317,
29897,
13,
1753,
1243,
29918,
5824,
29918,
2695,
3317,
29898,
6341,
29918,
3554,
29892,
4055,
29892,
3964,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
6426,
29918,
2972,
29918,
2311,
1125,
13,
1678,
1596,
703,
27795,
1243,
29918,
5824,
29918,
2695,
3317,
580,
411,
4055,
29901,
24335,
3964,
29879,
26254,
1118,
2908,
29918,
2311,
26254,
1118,
805,
1503,
537,
29918,
5563,
26254,
1118,
6426,
29918,
2972,
29918,
2311,
426,
5038,
13,
3986,
869,
4830,
29898,
4039,
29892,
3964,
29879,
29892,
2908,
29918,
2311,
29892,
805,
1503,
537,
29918,
5563,
29892,
6426,
29918,
2972,
29918,
2311,
876,
13,
1678,
474,
3746,
29918,
4905,
29892,
7684,
29918,
4905,
353,
29234,
29918,
2695,
3317,
29898,
6229,
29879,
29892,
13,
462,
462,
632,
2908,
29918,
2311,
29892,
13,
462,
462,
632,
805,
1503,
537,
29918,
5563,
29892,
13,
462,
462,
632,
6426,
29918,
2972,
29918,
2311,
29897,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
666,
29884,
29918,
4905,
29892,
7684,
29918,
4905,
29892,
364,
25027,
29922,
29896,
29872,
29899,
29906,
29892,
472,
324,
29922,
29896,
29872,
29899,
29906,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
474,
3746,
29918,
4905,
29892,
7684,
29918,
4905,
353,
29234,
29918,
2695,
3317,
4197,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29953,
1402,
13,
462,
462,
632,
518,
29947,
29892,
29871,
29947,
1402,
13,
462,
462,
795,
29900,
29889,
29941,
29892,
13,
462,
462,
795,
29896,
29897,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
666,
29884,
29918,
4905,
29892,
7684,
29918,
4905,
29892,
364,
25027,
29922,
29896,
29872,
29899,
29906,
29892,
472,
324,
29922,
29896,
29872,
29899,
29906,
29897,
13,
2
] |
node_modules/protagonist/drafter/drafter.gyp | bootstraponline/swagger_poc | 0 | 112456 | {
"includes": [
"ext/snowcrash/common.gypi"
],
"targets" : [
# LIBSOS
{
'target_name': 'libsos',
'type': 'static_library',
'direct_dependent_settings' : {
'include_dirs': [ 'ext/sos/src' ],
},
'sources': [
'ext/sos/src/sos.cc',
'ext/sos/src/sos.h',
'ext/sos/src/sosJSON.h',
'ext/sos/src/sosYAML.h'
]
},
# LIBDRAFTER
{
"target_name": "libdrafter",
'type': '<(libdrafter_type)',
"conditions" : [
[ 'libdrafter_type=="shared_library"', { 'defines' : [ 'DRAFTER_BUILD_SHARED' ] }, { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
'direct_dependent_settings' : {
'include_dirs': [
'src',
],
},
'export_dependent_settings': [
'libsos',
'ext/snowcrash/snowcrash.gyp:libsnowcrash',
],
"sources": [
"src/drafter.h",
"src/drafter.cc",
"src/drafter_private.h",
"src/drafter_private.cc",
"src/stream.h",
"src/Version.h",
"src/NodeInfo.h",
"src/Serialize.h",
"src/Serialize.cc",
"src/SerializeAST.h",
"src/SerializeAST.cc",
"src/SerializeSourcemap.h",
"src/SerializeSourcemap.cc",
"src/SerializeResult.h",
"src/SerializeResult.cc",
"src/RefractAPI.h",
"src/RefractAPI.cc",
"src/RefractDataStructure.h",
"src/RefractDataStructure.cc",
"src/RefractSourceMap.h",
"src/RefractSourceMap.cc",
"src/Render.h",
"src/Render.cc",
"src/NamedTypesRegistry.cc",
"src/NamedTypesRegistry.h",
"src/RefractElementFactory.h",
"src/RefractElementFactory.cc",
"src/ConversionContext.cc",
"src/ConversionContext.h",
# librefract parts - will be separated into other project
"src/refract/Element.h",
"src/refract/Element.cc",
"src/refract/ElementFwd.h",
"src/refract/Visitor.h",
"src/refract/VisitorUtils.h",
"src/refract/VisitorUtils.cc",
"src/refract/SerializeCompactVisitor.h",
"src/refract/SerializeCompactVisitor.cc",
"src/refract/SerializeVisitor.h",
"src/refract/SerializeVisitor.cc",
"src/refract/ComparableVisitor.h",
"src/refract/ComparableVisitor.cc",
"src/refract/TypeQueryVisitor.h",
"src/refract/TypeQueryVisitor.cc",
"src/refract/IsExpandableVisitor.h",
"src/refract/IsExpandableVisitor.cc",
"src/refract/ExpandVisitor.h",
"src/refract/ExpandVisitor.cc",
"src/refract/RenderJSONVisitor.h",
"src/refract/RenderJSONVisitor.cc",
"src/refract/PrintVisitor.h",
"src/refract/PrintVisitor.cc",
"src/refract/JSONSchemaVisitor.h",
"src/refract/JSONSchemaVisitor.cc",
"src/refract/FilterVisitor.h",
"src/refract/Registry.h",
"src/refract/Registry.cc",
"src/refract/Build.h",
"src/refract/AppendDecorator.h",
"src/refract/ElementInserter.h",
"src/refract/Query.h",
"src/refract/Query.cc",
"src/refract/Iterate.h",
],
"dependencies": [
"libsos",
"ext/snowcrash/snowcrash.gyp:libsnowcrash",
],
},
# TESTLIBDRAFTER
{
'target_name': 'test-libdrafter',
'type': 'executable',
'include_dirs': [
'test/vendor/Catch/include',
'test/vendor/dtl/dtl',
'src/refract',
],
'sources': [
"test/test-drafter.cc",
"test/test-SerializeResultTest.cc",
"test/test-SerializeSourceMapTest.cc",
"test/test-RefractDataStructureTest.cc",
"test/test-RefractAPITest.cc",
"test/test-RefractParseResultTest.cc",
"test/test-RenderTest.cc",
"test/test-RefractSourceMapTest.cc",
"test/test-SchemaTest.cc",
"test/test-CircularReferenceTest.cc",
"test/test-ApplyVisitorTest.cc",
"test/test-ExtendElementTest.cc",
"test/test-ElementFactoryTest.cc",
"test/test-OneOfTest.cc",
"test/test-SyntaxIssuesTest.cc",
],
'dependencies': [
"libdrafter",
],
'conditions': [
[ 'OS=="win"', { 'defines' : [ 'WIN' ] } ]
],
},
# DRAFTER
{
"target_name": "drafter",
"type": "executable",
"conditions" : [
[ 'libdrafter_type=="static_library"', { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
"sources": [
"src/main.cc",
"src/config.cc",
"src/config.h",
"src/reporting.cc",
"src/reporting.h",
],
"include_dirs": [
"ext/cmdline",
],
"dependencies": [
"libdrafter",
],
},
# DRAFTER C-API TEST
{
"target_name": "test-capi",
"type": "executable",
"conditions" : [
[ 'libdrafter_type=="static_library"', { 'defines' : [ 'DRAFTER_BUILD_STATIC' ] }],
],
"sources": [
"test/test-CAPI.c"
],
"dependencies": [
"libdrafter",
],
},
],
}
| [
1,
426,
13,
29871,
376,
24572,
1115,
518,
13,
1678,
376,
1062,
29914,
29879,
3707,
7283,
1161,
29914,
9435,
29889,
29887,
1478,
29875,
29908,
13,
29871,
21251,
13,
13,
29871,
376,
5182,
29879,
29908,
584,
518,
13,
13,
29937,
365,
8979,
29903,
3267,
13,
1678,
426,
13,
418,
525,
5182,
29918,
978,
2396,
525,
10254,
359,
742,
13,
418,
525,
1853,
2396,
525,
7959,
29918,
5258,
742,
13,
418,
525,
11851,
29918,
18980,
29918,
11027,
29915,
584,
426,
13,
3986,
525,
2856,
29918,
3972,
29879,
2396,
518,
525,
1062,
29914,
29879,
359,
29914,
4351,
29915,
21251,
13,
418,
2981,
13,
418,
525,
29879,
2863,
2396,
518,
13,
4706,
525,
1062,
29914,
29879,
359,
29914,
4351,
29914,
29879,
359,
29889,
617,
742,
13,
4706,
525,
1062,
29914,
29879,
359,
29914,
4351,
29914,
29879,
359,
29889,
29882,
742,
13,
4706,
525,
1062,
29914,
29879,
359,
29914,
4351,
29914,
29879,
359,
7249,
29889,
29882,
742,
13,
4706,
525,
1062,
29914,
29879,
359,
29914,
4351,
29914,
29879,
359,
29979,
23956,
29889,
29882,
29915,
13,
418,
4514,
13,
1678,
2981,
13,
13,
29937,
365,
8979,
29928,
4717,
29943,
4945,
259,
13,
1678,
426,
13,
418,
376,
5182,
29918,
978,
1115,
376,
1982,
19811,
906,
613,
13,
418,
525,
1853,
2396,
12801,
29898,
1982,
19811,
906,
29918,
1853,
29897,
742,
13,
418,
376,
1116,
2187,
29908,
584,
518,
13,
4706,
518,
525,
1982,
19811,
906,
29918,
1853,
26359,
12366,
29918,
5258,
29908,
742,
426,
525,
1753,
1475,
29915,
584,
518,
525,
29928,
4717,
29943,
4945,
29918,
29933,
25282,
29918,
23498,
19386,
29915,
4514,
2981,
426,
525,
1753,
1475,
29915,
584,
518,
525,
29928,
4717,
29943,
4945,
29918,
29933,
25282,
29918,
17816,
2965,
29915,
4514,
500,
1402,
13,
418,
21251,
13,
418,
525,
11851,
29918,
18980,
29918,
11027,
29915,
584,
426,
13,
3986,
525,
2856,
29918,
3972,
29879,
2396,
518,
13,
9651,
525,
4351,
742,
13,
3986,
21251,
13,
418,
2981,
13,
418,
525,
15843,
29918,
18980,
29918,
11027,
2396,
518,
13,
4706,
525,
10254,
359,
742,
13,
4706,
525,
1062,
29914,
29879,
3707,
7283,
1161,
29914,
29879,
3707,
7283,
1161,
29889,
29887,
1478,
29901,
10254,
3707,
7283,
1161,
742,
13,
418,
21251,
13,
418,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
4351,
29914,
19811,
906,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
19811,
906,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
19811,
906,
29918,
9053,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
19811,
906,
29918,
9053,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
5461,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
6594,
29889,
29882,
613,
13,
13,
4706,
376,
4351,
29914,
4247,
3401,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
28938,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
28938,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
29903,
473,
19335,
481,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
29903,
473,
19335,
481,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
3591,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
1748,
6646,
3591,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
8787,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
8787,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
1469,
5015,
12425,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
1469,
5015,
12425,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
4435,
3388,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
4435,
3388,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
10716,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
10716,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
22175,
10562,
22579,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
22175,
10562,
22579,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
2642,
5126,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
5620,
1461,
2642,
5126,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
1168,
3259,
2677,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
1168,
3259,
2677,
29889,
29882,
613,
13,
13,
29937,
4303,
999,
1461,
5633,
448,
674,
367,
13055,
964,
916,
2060,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
2642,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
2642,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
2642,
29943,
9970,
29889,
29882,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
6116,
2105,
29889,
29882,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
6116,
2105,
12177,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
6116,
2105,
12177,
29889,
617,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1748,
6646,
6843,
627,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1748,
6646,
6843,
627,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1748,
6646,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1748,
6646,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1523,
862,
519,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1523,
862,
519,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1542,
3010,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
1542,
3010,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
3624,
29777,
519,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
3624,
29777,
519,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
29777,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
29777,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
10716,
7249,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
10716,
7249,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
11816,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
11816,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
7249,
12763,
6116,
2105,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
7249,
12763,
6116,
2105,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
5072,
6116,
2105,
29889,
29882,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
22579,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
22579,
29889,
617,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
8893,
29889,
29882,
613,
13,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
18277,
6185,
272,
1061,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
2642,
797,
643,
357,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
3010,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
3010,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
999,
1461,
29914,
13463,
403,
29889,
29882,
613,
13,
418,
21251,
13,
418,
376,
22594,
1115,
518,
13,
4706,
376,
10254,
359,
613,
13,
4706,
376,
1062,
29914,
29879,
3707,
7283,
1161,
29914,
29879,
3707,
7283,
1161,
29889,
29887,
1478,
29901,
10254,
3707,
7283,
1161,
613,
13,
418,
21251,
13,
1678,
2981,
13,
13,
29937,
17067,
1254,
5265,
29121,
4717,
29943,
4945,
13,
1678,
426,
13,
418,
525,
5182,
29918,
978,
2396,
525,
1688,
29899,
1982,
19811,
906,
742,
13,
418,
525,
1853,
2396,
525,
4258,
9246,
742,
13,
418,
525,
2856,
29918,
3972,
29879,
2396,
518,
13,
4706,
525,
1688,
29914,
19167,
29914,
29907,
905,
29914,
2856,
742,
13,
4706,
525,
1688,
29914,
19167,
29914,
6008,
29880,
29914,
6008,
29880,
742,
13,
4706,
525,
4351,
29914,
999,
1461,
742,
13,
418,
21251,
13,
418,
525,
29879,
2863,
2396,
518,
13,
4706,
376,
1688,
29914,
1688,
29899,
19811,
906,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
1748,
6646,
3591,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
1748,
6646,
4435,
3388,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
5620,
1461,
1469,
5015,
12425,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
5620,
1461,
3301,
1806,
342,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
5620,
1461,
12914,
3591,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
10716,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
5620,
1461,
4435,
3388,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
12763,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
23495,
1070,
7422,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
2052,
368,
6116,
2105,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
5647,
355,
2642,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
2642,
5126,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
6716,
2776,
3057,
29889,
617,
613,
13,
4706,
376,
1688,
29914,
1688,
29899,
16676,
29902,
893,
1041,
3057,
29889,
617,
613,
13,
418,
21251,
13,
418,
525,
22594,
2396,
518,
13,
4706,
376,
1982,
19811,
906,
613,
13,
418,
21251,
13,
418,
525,
1116,
2187,
2396,
518,
13,
308,
518,
525,
3267,
26359,
5080,
29908,
742,
426,
525,
1753,
1475,
29915,
584,
518,
525,
25152,
29915,
4514,
500,
4514,
13,
418,
21251,
13,
1678,
2981,
13,
13,
29937,
360,
4717,
29943,
4945,
268,
13,
1678,
426,
13,
418,
376,
5182,
29918,
978,
1115,
376,
19811,
906,
613,
13,
418,
376,
1853,
1115,
376,
4258,
9246,
613,
13,
418,
376,
1116,
2187,
29908,
584,
518,
13,
4706,
518,
525,
1982,
19811,
906,
29918,
1853,
26359,
7959,
29918,
5258,
29908,
742,
426,
525,
1753,
1475,
29915,
584,
518,
525,
29928,
4717,
29943,
4945,
29918,
29933,
25282,
29918,
17816,
2965,
29915,
4514,
500,
1402,
13,
418,
21251,
13,
418,
376,
29879,
2863,
1115,
518,
13,
4706,
376,
4351,
29914,
3396,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
2917,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
2917,
29889,
29882,
613,
13,
4706,
376,
4351,
29914,
12276,
292,
29889,
617,
613,
13,
4706,
376,
4351,
29914,
12276,
292,
29889,
29882,
613,
13,
418,
21251,
13,
418,
376,
2856,
29918,
3972,
29879,
1115,
518,
13,
4706,
376,
1062,
29914,
9006,
1220,
613,
13,
418,
21251,
13,
418,
376,
22594,
1115,
518,
13,
4706,
376,
1982,
19811,
906,
613,
13,
418,
21251,
13,
1678,
2981,
13,
13,
29937,
360,
4717,
29943,
4945,
315,
29899,
8787,
17067,
1254,
13,
1678,
426,
13,
418,
376,
5182,
29918,
978,
1115,
376,
1688,
29899,
29883,
2754,
613,
13,
418,
376,
1853,
1115,
376,
4258,
9246,
613,
13,
418,
376,
1116,
2187,
29908,
584,
518,
13,
4706,
518,
525,
1982,
19811,
906,
29918,
1853,
26359,
7959,
29918,
5258,
29908,
742,
426,
525,
1753,
1475,
29915,
584,
518,
525,
29928,
4717,
29943,
4945,
29918,
29933,
25282,
29918,
17816,
2965,
29915,
4514,
500,
1402,
13,
418,
21251,
13,
418,
376,
29879,
2863,
1115,
518,
13,
3986,
376,
1688,
29914,
1688,
29899,
5454,
2227,
29889,
29883,
29908,
13,
418,
21251,
13,
418,
376,
22594,
1115,
518,
13,
4706,
376,
1982,
19811,
906,
613,
13,
418,
21251,
13,
1678,
2981,
13,
29871,
21251,
13,
29913,
13,
2
] |
tests/samples/test_sample.py | FoxoTech/methylcheck | 1 | 39998 | <gh_stars>1-10
import methylcheck
import pandas as pd
import methylprep # for manifest support
from pathlib import Path
PATH = Path('docs/example_data/mouse')
class TestProcessedSample():
manifest = methylprep.Manifest(methylprep.ArrayType('mouse'))
manifest_mouse_design_types = dict(manifest.mouse_data_frame['design'].value_counts())
manifest_control_probe_types = dict(manifest.control_data_frame['Control_Type'].value_counts())
def test_mouse_probes(self):
pd_mu = pd.read_pickle(Path(PATH,'mouse_probes.pkl'))
mu = methylcheck.load(Path(PATH,'mouse_probes.pkl'), verbose=False, silent=True)
if not (isinstance(mu, dict) and isinstance(list(mu.values())[0], pd.DataFrame)):
raise AssertionError()
mouse_probe_countA = len(list(mu.values())[0])
mouse_probe_countB = len(list(pd_mu.values())[0])
if len(mu) != len(pd_mu):
raise AssertionError(f"Got {len(mu)} items in mouse_probes.pkl; expected {len(pd_mu)}.")
if mouse_probe_countA != mouse_probe_countB:
raise AssertionError(f"Got {mouse_probe_countA} probes in mouse_probes.pkl vs {mouse_probe_countB}.")
# mouse_probes_v146 = 10067
mouse_probes_v155 = 32753
if mu['204879580038_R06C02'].shape[0] != mouse_probes_v155:
raise AssertionError(f"Got {mu['204879580038_R06C02'].shape[0]} probes in mouse_probes.pkl; expected {mouse_probes_v155}.")
print(f"sample and probe count OK")
df0 = list(mu.values())[0]
#probes_by_type = dict(df0.index.str[:2].value_counts())
#if probes_by_type['cg'] != 5881 and probes_by_type['uk'] != 4186:
# raise AssertionError(f"Mismatch in number of cg and uk(nown) probes in mouse_probes.pkl; expected 5881 cg and 4186 uk.")
probes_by_type = dict(df0.design.value_counts())
if probes_by_type['Random'] != 27305 or probes_by_type['Multi'] != 5448:
raise AssertionError(f"Mismatch in number of Random/Multi CpG probes in mouse_probes.pkl; expected 27305 Random and 5448 Multi.")
print('mouse probe counts OK')
def __test_mouse_probes_v146(self):
pd_mu = pd.read_pickle(Path(PATH,'mouse_probes.pkl'))
mu = methylcheck.load(Path(PATH,'mouse_probes.pkl'), verbose=False, silent=True)
if not (isinstance(mu, dict) and isinstance(list(mu.values())[0], pd.DataFrame)):
raise AssertionError()
if len(mu) != len(pd_mu):
raise AssertionError(f"Got a {len(mu)} items in mouse_probes.pkl; expected {len(pd_mu)}.")
print(f"sample count OK")
df0 = list(mu.values())[0]
probes_by_type = dict(df0.index.str[:2].value_counts())
if probes_by_type['cg'] != 5881 and probes_by_type['uk'] != 4186:
raise AssertionError(f"Mismatch in number of cg and uk(nown) probes in mouse_probes.pkl; expected 5881 cg and 4186 uk.")
print('mouse cg,uk count OK')
actual_mouse_probes = dict(df0['Probe_Type'].value_counts())
probe_counts = {'mu': 6332, 'rp': 4514, 'ch': 2851, 'rs': 291} # based on C20 manifest
probe_count_errors = {}
for probe_type, probe_count in probe_counts.items():
if self.manifest_mouse_probe_types[probe_type] != probe_count:
probe_count_errors[probe_type] = {'actual': self.manifest_mouse_probe_types[probe_type], 'expected': probe_count}
if probe_count_errors:
raise AssertionError(f"mouse probe count errors: {probe_count_errors}")
print('mouse mu,rp,ch,rs count OK')
# compare with manifest
diffs = []
for probe_type, probe_count in self.manifest_mouse_probe_types.items():
if probe_count != actual_mouse_probes[probe_type]:
diffs.append(f"{probe_type}: {actual_mouse_probes[probe_type]} / {probe_count}")
if diffs:
print("Probes in manifest NOT in control probes saved:")
print('\n'.join(diffs))
# not part of newer (>v1.4.6) mouse_probes.pkl
#actual_mouse_probes = dict(df0['Probe_Type'].value_counts())
#probe_counts_C20 = {'mu': 6332, 'rp': 4514, 'ch': 2851, 'rs': 291} # based on C20 manifest, v1.4.6
#probe_counts_mm285_v2 = {'mu': 4821, 'rp': 3048, 'ch': 2085, 'rs': 113} # v1.5.5
#probe_count_errors = {}
#for probe_type, probe_count in probe_counts_mm285_v2.items():
# if self.manifest_mouse_probe_types[probe_type] != probe_count:
# probe_count_errors[probe_type] = {'actual': self.manifest_mouse_probe_types[probe_type], 'expected': probe_count}
#if probe_count_errors:
# raise AssertionError(f"mouse probe count errors: {probe_count_errors}")
#print('mouse mu,rp,ch,rs count OK')
# compare with manifest -- done in test_Array_processed.py already
#diffs = []
#for probe_type, probe_count in self.manifest_mouse_probe_types.items():
# if probe_count != actual_mouse_probes[probe_type]:
# diffs.append(f"{probe_type}: {actual_mouse_probes[probe_type]} / {probe_count}")
#if diffs:
# print("Probes in manifest NOT in control probes saved:")
# print('\n'.join(diffs))
def test_control_probes(self):
con = methylcheck.load(Path(PATH,'control_probes.pkl'), verbose=False, silent=True)
con0 = list(con.values())[0]
con_types = dict(con0['Control_Type'].value_counts())
#probe_counts_v146 = {'NEGATIVE': 179, 'NORM_T': 24, 'NORM_C': 22, 'NORM_A': 10, 'NORM_G': 9, 'NON-POLYMORPHIC': 3, 'SPECIFICITY I': 3, 'BISULFITE CONVERSION I': 3, 'BISULFITE CONVERSION II': 2, 'SPECIFICITY II': 2, 'HYBRIDIZATION': 2, 'RESTORATION': 1}
probe_counts = {'NEGATIVE': 411, 'NORM_T': 58, 'NORM_C': 58, 'NORM_A': 27, 'NORM_G': 27, 'NON-POLYMORPHIC': 9, 'SPECIFICITY I': 12, 'BISULFITE CONVERSION I': 10, 'BISULFITE CONVERSION II': 4, 'SPECIFICITY II': 3, 'HYBRIDIZATION': 3, 'RESTORATION': 1}
probe_count_errors = {}
for probe_type, probe_count in probe_counts.items():
if con_types[probe_type] != probe_count:
probe_count_errors[probe_type] = {'actual': con_types[probe_type], 'expected': probe_count}
if probe_count_errors:
raise AssertionError(f"control probe count differed: {probe_count_errors}")
print('mouse control_probes count OK')
diffs = []
for probe_type, probe_count in self.manifest_control_probe_types.items():
if not con_types.get(probe_type):
print(f"ERROR: control output data is missing {probe_type} found in manifest.")
continue
if probe_count != con_types[probe_type]:
diffs.append(f"{probe_type}: {con_types[probe_type]} / {probe_count}")
if diffs:
print("Probes in manifest NOT in control probes saved:")
print('\n'.join(diffs))
def test_plot_mouse_betas_from_pickle(self):
""" tests SAVE too """
mu = methylcheck.load(Path(PATH,'mouse_probes.pkl'), verbose=False, silent=True)
df0 = list(mu.values())[0]
df = df0[['beta_value']]
methylcheck.sample_plot(df, silent=True, save=True)
methylcheck.beta_density_plot(df, silent=True)
methylcheck.sample_plot(df, silent=True)
methylcheck.mean_beta_plot(df, silent=True)
methylcheck.cumulative_sum_beta_distribution(df, silent=True)
methylcheck.beta_mds_plot(df, silent=True, save=False)
methylcheck.mean_beta_compare(df,df,silent=True)
df = df0[['cm_value']]
methylcheck.beta_density_plot(df, silent=True)
df = df0[['m_value']]
methylcheck.beta_density_plot(df, silent=True)
Path('./beta.png').unlink()
# Path('./beta_mds_n=*.png').unlink() -- causes error if this function doesn't create the file to remove
methylcheck.beta_mds_plot(df, silent=True, save=True)
for saved_png in Path('.').rglob('./beta_mds_n=*.png'):
print(saved_png)
saved_png.unlink()
def ignore_test():
with np.errstate(all='raise'):
df = methylcheck.load(Path(PATH,'beta_values.pkl'), verbose=False, silent=True)
methylcheck.sample_plot(df, silent=True, save=True)
methylcheck.beta_density_plot(df, silent=True)
methylcheck.sample_plot(df, silent=True)
methylcheck.mean_beta_plot(df, silent=True)
methylcheck.cumulative_sum_beta_distribution(df, silent=True)
methylcheck.beta_mds_plot(df, silent=True, save=False)
methylcheck.mean_beta_compare(df,df,silent=True)
#df = df0[['cm_value']]
#methylcheck.beta_density_plot(df, silent=True)
#df = df0[['m_value']]
#methylcheck.beta_density_plot(df, silent=True)
Path('./beta.png').unlink()
# Path('./beta_mds_n=*.png').unlink() -- causes error if this function doesn't create the file to remove
methylcheck.beta_mds_plot(df, silent=True, save=True)
for saved_png in Path('.').rglob('./beta_mds_n=*.png'):
print(saved_png)
saved_png.unlink()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
286,
621,
2904,
3198,
13,
5215,
11701,
408,
10518,
13,
5215,
286,
621,
2904,
15287,
396,
363,
10419,
2304,
13,
3166,
2224,
1982,
1053,
10802,
13,
10145,
353,
10802,
877,
2640,
29914,
4773,
29918,
1272,
29914,
15769,
1495,
13,
13,
1990,
4321,
7032,
287,
17708,
7295,
13,
1678,
10419,
353,
286,
621,
2904,
15287,
29889,
2517,
7004,
29898,
29885,
621,
2904,
15287,
29889,
2588,
1542,
877,
15769,
8785,
13,
1678,
10419,
29918,
15769,
29918,
13892,
29918,
8768,
353,
9657,
29898,
29135,
29889,
15769,
29918,
1272,
29918,
2557,
1839,
13892,
13359,
1767,
29918,
2798,
29879,
3101,
13,
1678,
10419,
29918,
6451,
29918,
771,
915,
29918,
8768,
353,
9657,
29898,
29135,
29889,
6451,
29918,
1272,
29918,
2557,
1839,
4809,
29918,
1542,
13359,
1767,
29918,
2798,
29879,
3101,
13,
13,
1678,
822,
1243,
29918,
15769,
29918,
771,
5707,
29898,
1311,
1125,
13,
4706,
10518,
29918,
2589,
353,
10518,
29889,
949,
29918,
23945,
280,
29898,
2605,
29898,
10145,
5501,
15769,
29918,
771,
5707,
29889,
29886,
6321,
8785,
13,
4706,
3887,
353,
286,
621,
2904,
3198,
29889,
1359,
29898,
2605,
29898,
10145,
5501,
15769,
29918,
771,
5707,
29889,
29886,
6321,
5477,
26952,
29922,
8824,
29892,
17436,
29922,
5574,
29897,
13,
4706,
565,
451,
313,
275,
8758,
29898,
2589,
29892,
9657,
29897,
322,
338,
8758,
29898,
1761,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
1402,
10518,
29889,
17271,
22164,
13,
9651,
12020,
16499,
291,
2392,
580,
13,
4706,
9495,
29918,
771,
915,
29918,
2798,
29909,
353,
7431,
29898,
1761,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
2314,
13,
4706,
9495,
29918,
771,
915,
29918,
2798,
29933,
353,
7431,
29898,
1761,
29898,
15926,
29918,
2589,
29889,
5975,
3101,
29961,
29900,
2314,
13,
4706,
565,
7431,
29898,
2589,
29897,
2804,
7431,
29898,
15926,
29918,
2589,
1125,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29954,
327,
426,
2435,
29898,
2589,
2915,
4452,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
426,
2435,
29898,
15926,
29918,
2589,
29512,
1159,
13,
4706,
565,
9495,
29918,
771,
915,
29918,
2798,
29909,
2804,
9495,
29918,
771,
915,
29918,
2798,
29933,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29954,
327,
426,
15769,
29918,
771,
915,
29918,
2798,
29909,
29913,
2070,
267,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
7186,
426,
15769,
29918,
771,
915,
29918,
2798,
29933,
1836,
1159,
13,
4706,
396,
9495,
29918,
771,
5707,
29918,
29894,
29896,
29946,
29953,
353,
29871,
29896,
29900,
29900,
29953,
29955,
13,
4706,
9495,
29918,
771,
5707,
29918,
29894,
29896,
29945,
29945,
353,
29871,
29941,
29906,
29955,
29945,
29941,
13,
4706,
565,
3887,
1839,
29906,
29900,
29946,
29947,
29955,
29929,
29945,
29947,
29900,
29900,
29941,
29947,
29918,
29934,
29900,
29953,
29907,
29900,
29906,
13359,
12181,
29961,
29900,
29962,
2804,
9495,
29918,
771,
5707,
29918,
29894,
29896,
29945,
29945,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29954,
327,
426,
2589,
1839,
29906,
29900,
29946,
29947,
29955,
29929,
29945,
29947,
29900,
29900,
29941,
29947,
29918,
29934,
29900,
29953,
29907,
29900,
29906,
13359,
12181,
29961,
29900,
12258,
2070,
267,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
426,
15769,
29918,
771,
5707,
29918,
29894,
29896,
29945,
29945,
1836,
1159,
13,
4706,
1596,
29898,
29888,
29908,
11249,
322,
410,
915,
2302,
9280,
1159,
13,
4706,
4489,
29900,
353,
1051,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
29962,
13,
4706,
396,
771,
5707,
29918,
1609,
29918,
1853,
353,
9657,
29898,
2176,
29900,
29889,
2248,
29889,
710,
7503,
29906,
1822,
1767,
29918,
2798,
29879,
3101,
13,
4706,
396,
361,
2070,
267,
29918,
1609,
29918,
1853,
1839,
29883,
29887,
2033,
2804,
29871,
29945,
29947,
29947,
29896,
322,
2070,
267,
29918,
1609,
29918,
1853,
1839,
2679,
2033,
2804,
29871,
29946,
29896,
29947,
29953,
29901,
13,
4706,
396,
1678,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29924,
1608,
905,
297,
1353,
310,
274,
29887,
322,
18293,
29898,
21369,
29897,
2070,
267,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
29871,
29945,
29947,
29947,
29896,
274,
29887,
322,
29871,
29946,
29896,
29947,
29953,
18293,
23157,
13,
4706,
2070,
267,
29918,
1609,
29918,
1853,
353,
9657,
29898,
2176,
29900,
29889,
13892,
29889,
1767,
29918,
2798,
29879,
3101,
13,
4706,
565,
2070,
267,
29918,
1609,
29918,
1853,
1839,
17875,
2033,
2804,
29871,
29906,
29955,
29941,
29900,
29945,
470,
2070,
267,
29918,
1609,
29918,
1853,
1839,
15329,
2033,
2804,
29871,
29945,
29946,
29946,
29947,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29924,
1608,
905,
297,
1353,
310,
16968,
29914,
15329,
315,
29886,
29954,
2070,
267,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
29871,
29906,
29955,
29941,
29900,
29945,
16968,
322,
29871,
29945,
29946,
29946,
29947,
14974,
23157,
13,
4706,
1596,
877,
15769,
410,
915,
18139,
9280,
1495,
13,
13,
13,
1678,
822,
4770,
1688,
29918,
15769,
29918,
771,
5707,
29918,
29894,
29896,
29946,
29953,
29898,
1311,
1125,
13,
4706,
10518,
29918,
2589,
353,
10518,
29889,
949,
29918,
23945,
280,
29898,
2605,
29898,
10145,
5501,
15769,
29918,
771,
5707,
29889,
29886,
6321,
8785,
13,
4706,
3887,
353,
286,
621,
2904,
3198,
29889,
1359,
29898,
2605,
29898,
10145,
5501,
15769,
29918,
771,
5707,
29889,
29886,
6321,
5477,
26952,
29922,
8824,
29892,
17436,
29922,
5574,
29897,
13,
4706,
565,
451,
313,
275,
8758,
29898,
2589,
29892,
9657,
29897,
322,
338,
8758,
29898,
1761,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
1402,
10518,
29889,
17271,
22164,
13,
9651,
12020,
16499,
291,
2392,
580,
13,
4706,
565,
7431,
29898,
2589,
29897,
2804,
7431,
29898,
15926,
29918,
2589,
1125,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29954,
327,
263,
426,
2435,
29898,
2589,
2915,
4452,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
426,
2435,
29898,
15926,
29918,
2589,
29512,
1159,
13,
4706,
1596,
29898,
29888,
29908,
11249,
2302,
9280,
1159,
13,
4706,
4489,
29900,
353,
1051,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
29962,
13,
4706,
2070,
267,
29918,
1609,
29918,
1853,
353,
9657,
29898,
2176,
29900,
29889,
2248,
29889,
710,
7503,
29906,
1822,
1767,
29918,
2798,
29879,
3101,
13,
4706,
565,
2070,
267,
29918,
1609,
29918,
1853,
1839,
29883,
29887,
2033,
2804,
29871,
29945,
29947,
29947,
29896,
322,
2070,
267,
29918,
1609,
29918,
1853,
1839,
2679,
2033,
2804,
29871,
29946,
29896,
29947,
29953,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
29924,
1608,
905,
297,
1353,
310,
274,
29887,
322,
18293,
29898,
21369,
29897,
2070,
267,
297,
9495,
29918,
771,
5707,
29889,
29886,
6321,
29936,
3806,
29871,
29945,
29947,
29947,
29896,
274,
29887,
322,
29871,
29946,
29896,
29947,
29953,
18293,
23157,
13,
4706,
1596,
877,
15769,
274,
29887,
29892,
2679,
2302,
9280,
1495,
13,
13,
4706,
3935,
29918,
15769,
29918,
771,
5707,
353,
9657,
29898,
2176,
29900,
1839,
1184,
915,
29918,
1542,
13359,
1767,
29918,
2798,
29879,
3101,
13,
4706,
410,
915,
29918,
2798,
29879,
353,
11117,
2589,
2396,
29871,
29953,
29941,
29941,
29906,
29892,
525,
19080,
2396,
29871,
29946,
29945,
29896,
29946,
29892,
525,
305,
2396,
29871,
29906,
29947,
29945,
29896,
29892,
525,
2288,
2396,
29871,
29906,
29929,
29896,
29913,
396,
2729,
373,
315,
29906,
29900,
10419,
13,
4706,
410,
915,
29918,
2798,
29918,
12523,
353,
6571,
13,
4706,
363,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
410,
915,
29918,
2798,
29879,
29889,
7076,
7295,
13,
9651,
565,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29961,
771,
915,
29918,
1853,
29962,
2804,
410,
915,
29918,
2798,
29901,
13,
18884,
410,
915,
29918,
2798,
29918,
12523,
29961,
771,
915,
29918,
1853,
29962,
353,
11117,
19304,
2396,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29961,
771,
915,
29918,
1853,
1402,
525,
9684,
2396,
410,
915,
29918,
2798,
29913,
13,
4706,
565,
410,
915,
29918,
2798,
29918,
12523,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
15769,
410,
915,
2302,
4436,
29901,
426,
771,
915,
29918,
2798,
29918,
12523,
27195,
13,
4706,
1596,
877,
15769,
3887,
29892,
19080,
29892,
305,
29892,
2288,
2302,
9280,
1495,
13,
4706,
396,
7252,
411,
10419,
13,
4706,
2923,
29879,
353,
5159,
13,
4706,
363,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29889,
7076,
7295,
13,
9651,
565,
410,
915,
29918,
2798,
2804,
3935,
29918,
15769,
29918,
771,
5707,
29961,
771,
915,
29918,
1853,
5387,
13,
18884,
2923,
29879,
29889,
4397,
29898,
29888,
29908,
29912,
771,
915,
29918,
1853,
6177,
426,
19304,
29918,
15769,
29918,
771,
5707,
29961,
771,
915,
29918,
1853,
12258,
847,
426,
771,
915,
29918,
2798,
27195,
13,
4706,
565,
2923,
29879,
29901,
13,
9651,
1596,
703,
1184,
5707,
297,
10419,
6058,
297,
2761,
2070,
267,
7160,
29901,
1159,
13,
9651,
1596,
28909,
29876,
4286,
7122,
29898,
12765,
29879,
876,
13,
4706,
396,
451,
760,
310,
20687,
313,
29958,
29894,
29896,
29889,
29946,
29889,
29953,
29897,
9495,
29918,
771,
5707,
29889,
29886,
6321,
13,
4706,
396,
19304,
29918,
15769,
29918,
771,
5707,
353,
9657,
29898,
2176,
29900,
1839,
1184,
915,
29918,
1542,
13359,
1767,
29918,
2798,
29879,
3101,
13,
4706,
396,
771,
915,
29918,
2798,
29879,
29918,
29907,
29906,
29900,
353,
11117,
2589,
2396,
29871,
29953,
29941,
29941,
29906,
29892,
525,
19080,
2396,
29871,
29946,
29945,
29896,
29946,
29892,
525,
305,
2396,
29871,
29906,
29947,
29945,
29896,
29892,
525,
2288,
2396,
29871,
29906,
29929,
29896,
29913,
396,
2729,
373,
315,
29906,
29900,
10419,
29892,
325,
29896,
29889,
29946,
29889,
29953,
13,
4706,
396,
771,
915,
29918,
2798,
29879,
29918,
4317,
29906,
29947,
29945,
29918,
29894,
29906,
353,
11117,
2589,
2396,
29871,
29946,
29947,
29906,
29896,
29892,
525,
19080,
2396,
29871,
29941,
29900,
29946,
29947,
29892,
525,
305,
2396,
29871,
29906,
29900,
29947,
29945,
29892,
525,
2288,
2396,
29871,
29896,
29896,
29941,
29913,
396,
325,
29896,
29889,
29945,
29889,
29945,
13,
4706,
396,
771,
915,
29918,
2798,
29918,
12523,
353,
6571,
13,
4706,
396,
1454,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
410,
915,
29918,
2798,
29879,
29918,
4317,
29906,
29947,
29945,
29918,
29894,
29906,
29889,
7076,
7295,
13,
4706,
396,
1678,
565,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29961,
771,
915,
29918,
1853,
29962,
2804,
410,
915,
29918,
2798,
29901,
13,
4706,
396,
4706,
410,
915,
29918,
2798,
29918,
12523,
29961,
771,
915,
29918,
1853,
29962,
353,
11117,
19304,
2396,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29961,
771,
915,
29918,
1853,
1402,
525,
9684,
2396,
410,
915,
29918,
2798,
29913,
13,
4706,
396,
361,
410,
915,
29918,
2798,
29918,
12523,
29901,
13,
4706,
396,
1678,
12020,
16499,
291,
2392,
29898,
29888,
29908,
15769,
410,
915,
2302,
4436,
29901,
426,
771,
915,
29918,
2798,
29918,
12523,
27195,
13,
4706,
396,
2158,
877,
15769,
3887,
29892,
19080,
29892,
305,
29892,
2288,
2302,
9280,
1495,
13,
4706,
396,
7252,
411,
10419,
1192,
2309,
297,
1243,
29918,
2588,
29918,
5014,
287,
29889,
2272,
2307,
13,
4706,
396,
12765,
29879,
353,
5159,
13,
4706,
396,
1454,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
1583,
29889,
29135,
29918,
15769,
29918,
771,
915,
29918,
8768,
29889,
7076,
7295,
13,
4706,
396,
1678,
565,
410,
915,
29918,
2798,
2804,
3935,
29918,
15769,
29918,
771,
5707,
29961,
771,
915,
29918,
1853,
5387,
13,
4706,
396,
4706,
2923,
29879,
29889,
4397,
29898,
29888,
29908,
29912,
771,
915,
29918,
1853,
6177,
426,
19304,
29918,
15769,
29918,
771,
5707,
29961,
771,
915,
29918,
1853,
12258,
847,
426,
771,
915,
29918,
2798,
27195,
13,
4706,
396,
361,
2923,
29879,
29901,
13,
4706,
396,
1678,
1596,
703,
1184,
5707,
297,
10419,
6058,
297,
2761,
2070,
267,
7160,
29901,
1159,
13,
4706,
396,
1678,
1596,
28909,
29876,
4286,
7122,
29898,
12765,
29879,
876,
13,
13,
13,
1678,
822,
1243,
29918,
6451,
29918,
771,
5707,
29898,
1311,
1125,
13,
4706,
378,
353,
286,
621,
2904,
3198,
29889,
1359,
29898,
2605,
29898,
10145,
5501,
6451,
29918,
771,
5707,
29889,
29886,
6321,
5477,
26952,
29922,
8824,
29892,
17436,
29922,
5574,
29897,
13,
4706,
378,
29900,
353,
1051,
29898,
535,
29889,
5975,
3101,
29961,
29900,
29962,
13,
4706,
378,
29918,
8768,
353,
9657,
29898,
535,
29900,
1839,
4809,
29918,
1542,
13359,
1767,
29918,
2798,
29879,
3101,
13,
4706,
396,
771,
915,
29918,
2798,
29879,
29918,
29894,
29896,
29946,
29953,
353,
11117,
8186,
29954,
1299,
18474,
2396,
29871,
29896,
29955,
29929,
29892,
525,
29940,
12054,
29918,
29911,
2396,
29871,
29906,
29946,
29892,
525,
29940,
12054,
29918,
29907,
2396,
29871,
29906,
29906,
29892,
525,
29940,
12054,
29918,
29909,
2396,
29871,
29896,
29900,
29892,
525,
29940,
12054,
29918,
29954,
2396,
29871,
29929,
29892,
525,
29940,
1164,
29899,
29925,
5607,
29979,
29924,
1955,
19689,
2965,
2396,
29871,
29941,
29892,
525,
29903,
4162,
29907,
6545,
2965,
11937,
306,
2396,
29871,
29941,
29892,
525,
29933,
3235,
13309,
29943,
9094,
8707,
16358,
306,
2396,
29871,
29941,
29892,
525,
29933,
3235,
13309,
29943,
9094,
8707,
16358,
1944,
2396,
29871,
29906,
29892,
525,
29903,
4162,
29907,
6545,
2965,
11937,
1944,
2396,
29871,
29906,
29892,
525,
29950,
29979,
15176,
1367,
26664,
8098,
2396,
29871,
29906,
29892,
525,
1525,
1254,
1955,
8098,
2396,
29871,
29896,
29913,
13,
4706,
410,
915,
29918,
2798,
29879,
353,
11117,
8186,
29954,
1299,
18474,
2396,
29871,
29946,
29896,
29896,
29892,
525,
29940,
12054,
29918,
29911,
2396,
29871,
29945,
29947,
29892,
525,
29940,
12054,
29918,
29907,
2396,
29871,
29945,
29947,
29892,
525,
29940,
12054,
29918,
29909,
2396,
29871,
29906,
29955,
29892,
525,
29940,
12054,
29918,
29954,
2396,
29871,
29906,
29955,
29892,
525,
29940,
1164,
29899,
29925,
5607,
29979,
29924,
1955,
19689,
2965,
2396,
29871,
29929,
29892,
525,
29903,
4162,
29907,
6545,
2965,
11937,
306,
2396,
29871,
29896,
29906,
29892,
525,
29933,
3235,
13309,
29943,
9094,
8707,
16358,
306,
2396,
29871,
29896,
29900,
29892,
525,
29933,
3235,
13309,
29943,
9094,
8707,
16358,
1944,
2396,
29871,
29946,
29892,
525,
29903,
4162,
29907,
6545,
2965,
11937,
1944,
2396,
29871,
29941,
29892,
525,
29950,
29979,
15176,
1367,
26664,
8098,
2396,
29871,
29941,
29892,
525,
1525,
1254,
1955,
8098,
2396,
29871,
29896,
29913,
13,
4706,
410,
915,
29918,
2798,
29918,
12523,
353,
6571,
13,
4706,
363,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
410,
915,
29918,
2798,
29879,
29889,
7076,
7295,
13,
9651,
565,
378,
29918,
8768,
29961,
771,
915,
29918,
1853,
29962,
2804,
410,
915,
29918,
2798,
29901,
13,
18884,
410,
915,
29918,
2798,
29918,
12523,
29961,
771,
915,
29918,
1853,
29962,
353,
11117,
19304,
2396,
378,
29918,
8768,
29961,
771,
915,
29918,
1853,
1402,
525,
9684,
2396,
410,
915,
29918,
2798,
29913,
13,
4706,
565,
410,
915,
29918,
2798,
29918,
12523,
29901,
13,
9651,
12020,
16499,
291,
2392,
29898,
29888,
29908,
6451,
410,
915,
2302,
1163,
287,
29901,
426,
771,
915,
29918,
2798,
29918,
12523,
27195,
13,
4706,
1596,
877,
15769,
2761,
29918,
771,
5707,
2302,
9280,
1495,
13,
13,
4706,
2923,
29879,
353,
5159,
13,
4706,
363,
410,
915,
29918,
1853,
29892,
410,
915,
29918,
2798,
297,
1583,
29889,
29135,
29918,
6451,
29918,
771,
915,
29918,
8768,
29889,
7076,
7295,
13,
9651,
565,
451,
378,
29918,
8768,
29889,
657,
29898,
771,
915,
29918,
1853,
1125,
13,
18884,
1596,
29898,
29888,
29908,
11432,
29901,
2761,
1962,
848,
338,
4567,
426,
771,
915,
29918,
1853,
29913,
1476,
297,
10419,
23157,
13,
18884,
6773,
13,
9651,
565,
410,
915,
29918,
2798,
2804,
378,
29918,
8768,
29961,
771,
915,
29918,
1853,
5387,
13,
18884,
2923,
29879,
29889,
4397,
29898,
29888,
29908,
29912,
771,
915,
29918,
1853,
6177,
426,
535,
29918,
8768,
29961,
771,
915,
29918,
1853,
12258,
847,
426,
771,
915,
29918,
2798,
27195,
13,
4706,
565,
2923,
29879,
29901,
13,
9651,
1596,
703,
1184,
5707,
297,
10419,
6058,
297,
2761,
2070,
267,
7160,
29901,
1159,
13,
9651,
1596,
28909,
29876,
4286,
7122,
29898,
12765,
29879,
876,
13,
13,
1678,
822,
1243,
29918,
5317,
29918,
15769,
29918,
6878,
294,
29918,
3166,
29918,
23945,
280,
29898,
1311,
1125,
13,
4706,
9995,
6987,
317,
7520,
29923,
2086,
9995,
13,
4706,
3887,
353,
286,
621,
2904,
3198,
29889,
1359,
29898,
2605,
29898,
10145,
5501,
15769,
29918,
771,
5707,
29889,
29886,
6321,
5477,
26952,
29922,
8824,
29892,
17436,
29922,
5574,
29897,
13,
4706,
4489,
29900,
353,
1051,
29898,
2589,
29889,
5975,
3101,
29961,
29900,
29962,
13,
4706,
4489,
353,
4489,
29900,
29961,
1839,
3571,
29918,
1767,
2033,
29962,
13,
4706,
286,
621,
2904,
3198,
29889,
11249,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
11249,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
12676,
29918,
3571,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
29883,
398,
28524,
29918,
2083,
29918,
3571,
29918,
27691,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
3487,
29879,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
8824,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
12676,
29918,
3571,
29918,
18307,
29898,
2176,
29892,
2176,
29892,
25590,
296,
29922,
5574,
29897,
13,
4706,
4489,
353,
4489,
29900,
29961,
1839,
4912,
29918,
1767,
2033,
29962,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
4489,
353,
4489,
29900,
29961,
1839,
29885,
29918,
1767,
2033,
29962,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
10802,
877,
6904,
3571,
29889,
2732,
2824,
348,
2324,
580,
13,
4706,
396,
10802,
877,
6904,
3571,
29918,
3487,
29879,
29918,
29876,
29922,
10521,
2732,
2824,
348,
2324,
580,
1192,
9946,
1059,
565,
445,
740,
1838,
29915,
29873,
1653,
278,
934,
304,
3349,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
3487,
29879,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
5574,
29897,
13,
4706,
363,
7160,
29918,
2732,
297,
10802,
12839,
2824,
11007,
2127,
877,
6904,
3571,
29918,
3487,
29879,
29918,
29876,
29922,
10521,
2732,
29374,
13,
9651,
1596,
29898,
17314,
29918,
2732,
29897,
13,
9651,
7160,
29918,
2732,
29889,
348,
2324,
580,
13,
13,
13,
1753,
11455,
29918,
1688,
7295,
13,
1678,
411,
7442,
29889,
3127,
3859,
29898,
497,
2433,
22692,
29374,
13,
4706,
4489,
353,
286,
621,
2904,
3198,
29889,
1359,
29898,
2605,
29898,
10145,
5501,
3571,
29918,
5975,
29889,
29886,
6321,
5477,
26952,
29922,
8824,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
11249,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
11249,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
12676,
29918,
3571,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
29883,
398,
28524,
29918,
2083,
29918,
3571,
29918,
27691,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
3487,
29879,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
8824,
29897,
13,
4706,
286,
621,
2904,
3198,
29889,
12676,
29918,
3571,
29918,
18307,
29898,
2176,
29892,
2176,
29892,
25590,
296,
29922,
5574,
29897,
13,
4706,
396,
2176,
353,
4489,
29900,
29961,
1839,
4912,
29918,
1767,
2033,
29962,
13,
4706,
396,
29885,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
396,
2176,
353,
4489,
29900,
29961,
1839,
29885,
29918,
1767,
2033,
29962,
13,
4706,
396,
29885,
621,
2904,
3198,
29889,
3571,
29918,
21518,
537,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29897,
13,
4706,
10802,
877,
6904,
3571,
29889,
2732,
2824,
348,
2324,
580,
13,
4706,
396,
10802,
877,
6904,
3571,
29918,
3487,
29879,
29918,
29876,
29922,
10521,
2732,
2824,
348,
2324,
580,
1192,
9946,
1059,
565,
445,
740,
1838,
29915,
29873,
1653,
278,
934,
304,
3349,
13,
4706,
286,
621,
2904,
3198,
29889,
3571,
29918,
3487,
29879,
29918,
5317,
29898,
2176,
29892,
17436,
29922,
5574,
29892,
4078,
29922,
5574,
29897,
13,
4706,
363,
7160,
29918,
2732,
297,
10802,
12839,
2824,
11007,
2127,
877,
6904,
3571,
29918,
3487,
29879,
29918,
29876,
29922,
10521,
2732,
29374,
13,
9651,
1596,
29898,
17314,
29918,
2732,
29897,
13,
9651,
7160,
29918,
2732,
29889,
348,
2324,
580,
13,
2
] |
utils/predictions.py | jaingaurav3/ML_sample | 19 | 13468 | import os
import scipy
import numpy as np
import pandas as pd
import torch
from torch.autograd import Variable
def predict_batch(net, inputs):
v = Variable(inputs.cuda(), volatile=True)
return net(v).data.cpu().numpy()
def get_probabilities(model, loader):
model.eval()
return np.vstack(predict_batch(model, data[0]) for data in loader)
def get_predictions(probs, thresholds):
preds = np.copy(probs)
preds[preds >= thresholds] = 1
preds[preds < thresholds] = 0
return preds.astype('uint8')
def get_argmax(output):
val,idx = torch.max(output, dim=1)
return idx.data.cpu().view(-1).numpy()
def get_targets(loader):
targets = None
for data in loader:
if targets is None:
shape = list(data[1].size())
shape[0] = 0
targets = np.empty(shape)
target = data[1]
if len(target.size()) == 1:
target = target.view(-1,1)
target = target.numpy()
targets = np.vstack([targets, target])
return targets
def ensemble_with_method(arr, method):
if method == c.MEAN:
return np.mean(arr, axis=0)
elif method == c.GMEAN:
return scipy.stats.mstats.gmean(arr, axis=0)
elif method == c.VOTE:
return scipy.stats.mode(arr, axis=0)[0][0]
raise Exception("Operation not found") | [
1,
1053,
2897,
13,
5215,
4560,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,
28736,
13,
13,
13,
1753,
8500,
29918,
16175,
29898,
1212,
29892,
10970,
1125,
13,
1678,
325,
353,
28736,
29898,
2080,
29879,
29889,
29883,
6191,
3285,
1700,
24285,
29922,
5574,
29897,
13,
1678,
736,
7787,
29898,
29894,
467,
1272,
29889,
21970,
2141,
23749,
580,
13,
13,
13,
1753,
679,
29918,
22795,
11614,
29898,
4299,
29892,
23466,
1125,
13,
1678,
1904,
29889,
14513,
580,
13,
1678,
736,
7442,
29889,
29894,
1429,
29898,
27711,
29918,
16175,
29898,
4299,
29892,
848,
29961,
29900,
2314,
363,
848,
297,
23466,
29897,
13,
13,
13,
1753,
679,
29918,
27711,
1080,
29898,
771,
5824,
29892,
266,
3781,
3361,
1125,
13,
1678,
4450,
29879,
353,
7442,
29889,
8552,
29898,
771,
5824,
29897,
13,
1678,
4450,
29879,
29961,
11965,
29879,
6736,
266,
3781,
3361,
29962,
353,
29871,
29896,
13,
1678,
4450,
29879,
29961,
11965,
29879,
529,
266,
3781,
3361,
29962,
353,
29871,
29900,
13,
1678,
736,
4450,
29879,
29889,
579,
668,
877,
13470,
29947,
1495,
13,
13,
13,
1753,
679,
29918,
1191,
3317,
29898,
4905,
1125,
13,
1678,
659,
29892,
13140,
353,
4842,
305,
29889,
3317,
29898,
4905,
29892,
3964,
29922,
29896,
29897,
13,
1678,
736,
22645,
29889,
1272,
29889,
21970,
2141,
1493,
6278,
29896,
467,
23749,
580,
13,
13,
13,
1753,
679,
29918,
5182,
29879,
29898,
12657,
1125,
13,
1678,
22525,
353,
6213,
13,
1678,
363,
848,
297,
23466,
29901,
13,
4706,
565,
22525,
338,
6213,
29901,
13,
9651,
8267,
353,
1051,
29898,
1272,
29961,
29896,
1822,
2311,
3101,
13,
9651,
8267,
29961,
29900,
29962,
353,
29871,
29900,
13,
9651,
22525,
353,
7442,
29889,
6310,
29898,
12181,
29897,
13,
4706,
3646,
353,
848,
29961,
29896,
29962,
13,
4706,
565,
7431,
29898,
5182,
29889,
2311,
3101,
1275,
29871,
29896,
29901,
13,
9651,
3646,
353,
3646,
29889,
1493,
6278,
29896,
29892,
29896,
29897,
13,
4706,
3646,
353,
3646,
29889,
23749,
580,
13,
4706,
22525,
353,
7442,
29889,
29894,
1429,
4197,
5182,
29879,
29892,
3646,
2314,
13,
1678,
736,
22525,
13,
13,
13,
1753,
21285,
29918,
2541,
29918,
5696,
29898,
2749,
29892,
1158,
1125,
13,
1678,
565,
1158,
1275,
274,
29889,
2303,
2190,
29901,
13,
4706,
736,
7442,
29889,
12676,
29898,
2749,
29892,
9685,
29922,
29900,
29897,
13,
1678,
25342,
1158,
1275,
274,
29889,
29954,
2303,
2190,
29901,
13,
4706,
736,
4560,
2272,
29889,
16202,
29889,
29885,
16202,
29889,
29887,
12676,
29898,
2749,
29892,
9685,
29922,
29900,
29897,
13,
1678,
25342,
1158,
1275,
274,
29889,
29963,
2891,
29923,
29901,
13,
4706,
736,
4560,
2272,
29889,
16202,
29889,
8513,
29898,
2749,
29892,
9685,
29922,
29900,
9601,
29900,
3816,
29900,
29962,
13,
1678,
12020,
8960,
703,
10925,
451,
1476,
1159,
2
] |
salt/modules/kernelpkg_linux_apt.py | markgras/salt | 9,425 | 8077 | <filename>salt/modules/kernelpkg_linux_apt.py
"""
Manage Linux kernel packages on APT-based systems
"""
import functools
import logging
import re
try:
from salt.utils.versions import LooseVersion as _LooseVersion
from salt.exceptions import CommandExecutionError
HAS_REQUIRED_LIBS = True
except ImportError:
HAS_REQUIRED_LIBS = False
log = logging.getLogger(__name__)
__virtualname__ = "kernelpkg"
def __virtual__():
"""
Load this module on Debian-based systems only
"""
if not HAS_REQUIRED_LIBS:
return (False, "Required library could not be imported")
if __grains__.get("os_family", "") in ("Kali", "Debian"):
return __virtualname__
elif __grains__.get("os_family", "") == "Cumulus":
return __virtualname__
return (False, "Module kernelpkg_linux_apt: no APT based system detected")
def active():
"""
Return the version of the running kernel.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.active
"""
if "pkg.normalize_name" in __salt__:
return __salt__["pkg.normalize_name"](__grains__["kernelrelease"])
return __grains__["kernelrelease"]
def list_installed():
"""
Return a list of all installed kernels.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.list_installed
"""
pkg_re = re.compile(r"^{}-[\d.-]+-{}$".format(_package_prefix(), _kernel_type()))
pkgs = __salt__["pkg.list_pkgs"](versions_as_list=True)
if pkgs is None:
pkgs = []
result = list(filter(pkg_re.match, pkgs))
if result is None:
return []
prefix_len = len(_package_prefix()) + 1
return sorted(
[pkg[prefix_len:] for pkg in result], key=functools.cmp_to_key(_cmp_version)
)
def latest_available():
"""
Return the version of the latest kernel from the package repositories.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.latest_available
"""
result = __salt__["pkg.latest_version"](
"{}-{}".format(_package_prefix(), _kernel_type())
)
if result == "":
return latest_installed()
version = re.match(r"^(\d+\.\d+\.\d+)\.(\d+)", result)
return "{}-{}-{}".format(version.group(1), version.group(2), _kernel_type())
def latest_installed():
"""
Return the version of the latest installed kernel.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.latest_installed
.. note::
This function may not return the same value as
:py:func:`~salt.modules.kernelpkg_linux_apt.active` if a new kernel
has been installed and the system has not yet been rebooted.
The :py:func:`~salt.modules.kernelpkg_linux_apt.needs_reboot` function
exists to detect this condition.
"""
pkgs = list_installed()
if pkgs:
return pkgs[-1]
return None
def needs_reboot():
"""
Detect if a new kernel version has been installed but is not running.
Returns True if a new kernel is installed, False otherwise.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.needs_reboot
"""
return _LooseVersion(active()) < _LooseVersion(latest_installed())
def upgrade(reboot=False, at_time=None):
"""
Upgrade the kernel and optionally reboot the system.
reboot : False
Request a reboot if a new kernel is available.
at_time : immediate
Schedule the reboot at some point in the future. This argument
is ignored if ``reboot=False``. See
:py:func:`~salt.modules.system.reboot` for more details
on this argument.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.upgrade
salt '*' kernelpkg.upgrade reboot=True at_time=1
.. note::
An immediate reboot often shuts down the system before the minion has a
chance to return, resulting in errors. A minimal delay (1 minute) is
useful to ensure the result is delivered to the master.
"""
result = __salt__["pkg.install"](
name="{}-{}".format(_package_prefix(), latest_available())
)
_needs_reboot = needs_reboot()
ret = {
"upgrades": result,
"active": active(),
"latest_installed": latest_installed(),
"reboot_requested": reboot,
"reboot_required": _needs_reboot,
}
if reboot and _needs_reboot:
log.warning("Rebooting system due to kernel upgrade")
__salt__["system.reboot"](at_time=at_time)
return ret
def upgrade_available():
"""
Detect if a new kernel version is available in the repositories.
Returns True if a new kernel is available, False otherwise.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.upgrade_available
"""
return _LooseVersion(latest_available()) > _LooseVersion(latest_installed())
def remove(release):
"""
Remove a specific version of the kernel.
release
The release number of an installed kernel. This must be the entire release
number as returned by :py:func:`~salt.modules.kernelpkg_linux_apt.list_installed`,
not the package name.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.remove 4.4.0-70-generic
"""
if release not in list_installed():
raise CommandExecutionError(
"Kernel release '{}' is not installed".format(release)
)
if release == active():
raise CommandExecutionError("Active kernel cannot be removed")
target = "{}-{}".format(_package_prefix(), release)
log.info("Removing kernel package %s", target)
__salt__["pkg.purge"](target)
return {"removed": [target]}
def cleanup(keep_latest=True):
"""
Remove all unused kernel packages from the system.
keep_latest : True
In the event that the active kernel is not the latest one installed, setting this to True
will retain the latest kernel package, in addition to the active one. If False, all kernel
packages other than the active one will be removed.
CLI Example:
.. code-block:: bash
salt '*' kernelpkg.cleanup
"""
removed = []
# Loop over all installed kernel packages
for kernel in list_installed():
# Keep the active kernel package
if kernel == active():
continue
# Optionally keep the latest kernel package
if keep_latest and kernel == latest_installed():
continue
# Remove the kernel package
removed.extend(remove(kernel)["removed"])
return {"removed": removed}
def _package_prefix():
"""
Return static string for the package prefix
"""
return "linux-image"
def _kernel_type():
"""
Parse the kernel name and return its type
"""
return re.match(r"^[\d.-]+-(.+)$", active()).group(1)
def _cmp_version(item1, item2):
"""
Compare function for package version sorting
"""
vers1 = _LooseVersion(item1)
vers2 = _LooseVersion(item2)
if vers1 < vers2:
return -1
if vers1 > vers2:
return 1
return 0
| [
1,
529,
9507,
29958,
29879,
1997,
29914,
7576,
29914,
17460,
15865,
29918,
9389,
29918,
2156,
29889,
2272,
13,
15945,
29908,
13,
2517,
482,
8074,
8466,
9741,
373,
319,
7982,
29899,
6707,
6757,
13,
15945,
29908,
13,
13,
5215,
2090,
312,
8789,
13,
5215,
12183,
13,
5215,
337,
13,
13,
2202,
29901,
13,
1678,
515,
15795,
29889,
13239,
29889,
26100,
1053,
4309,
852,
6594,
408,
903,
3410,
852,
6594,
13,
1678,
515,
15795,
29889,
11739,
29879,
1053,
10516,
20418,
2392,
13,
13,
1678,
379,
3289,
29918,
1525,
29984,
3120,
19386,
29918,
5265,
9851,
353,
5852,
13,
19499,
16032,
2392,
29901,
13,
1678,
379,
3289,
29918,
1525,
29984,
3120,
19386,
29918,
5265,
9851,
353,
7700,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1649,
18714,
978,
1649,
353,
376,
17460,
15865,
29908,
13,
13,
13,
1753,
4770,
18714,
1649,
7295,
13,
1678,
9995,
13,
1678,
16012,
445,
3883,
373,
7089,
713,
29899,
6707,
6757,
871,
13,
1678,
9995,
13,
13,
1678,
565,
451,
379,
3289,
29918,
1525,
29984,
3120,
19386,
29918,
5265,
9851,
29901,
13,
4706,
736,
313,
8824,
29892,
376,
19347,
3489,
1033,
451,
367,
19673,
1159,
13,
13,
1678,
565,
4770,
3874,
1144,
26914,
657,
703,
359,
29918,
11922,
613,
20569,
297,
4852,
29968,
2606,
613,
376,
10251,
713,
29908,
1125,
13,
4706,
736,
4770,
18714,
978,
1649,
13,
1678,
25342,
4770,
3874,
1144,
26914,
657,
703,
359,
29918,
11922,
613,
20569,
1275,
376,
29907,
398,
14999,
1115,
13,
4706,
736,
4770,
18714,
978,
1649,
13,
13,
1678,
736,
313,
8824,
29892,
376,
7355,
8466,
15865,
29918,
9389,
29918,
2156,
29901,
694,
319,
7982,
2729,
1788,
17809,
1159,
13,
13,
13,
1753,
6136,
7295,
13,
1678,
9995,
13,
1678,
7106,
278,
1873,
310,
278,
2734,
8466,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
4925,
13,
1678,
9995,
13,
1678,
565,
376,
15865,
29889,
8945,
675,
29918,
978,
29908,
297,
4770,
29879,
1997,
1649,
29901,
13,
4706,
736,
4770,
29879,
1997,
1649,
3366,
15865,
29889,
8945,
675,
29918,
978,
29908,
850,
1649,
3874,
1144,
1649,
3366,
17460,
14096,
20068,
13,
13,
1678,
736,
4770,
3874,
1144,
1649,
3366,
17460,
14096,
3108,
13,
13,
13,
1753,
1051,
29918,
25537,
7295,
13,
1678,
9995,
13,
1678,
7106,
263,
1051,
310,
599,
5130,
413,
824,
1379,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
1761,
29918,
25537,
13,
1678,
9995,
13,
1678,
282,
9415,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
29908,
998,
7402,
7110,
29881,
9229,
10062,
29899,
29912,
1042,
1642,
4830,
7373,
5113,
29918,
13506,
3285,
903,
17460,
29918,
1853,
22130,
13,
1678,
282,
29895,
3174,
353,
4770,
29879,
1997,
1649,
3366,
15865,
29889,
1761,
29918,
20571,
3174,
29908,
850,
26100,
29918,
294,
29918,
1761,
29922,
5574,
29897,
13,
1678,
565,
282,
29895,
3174,
338,
6213,
29901,
13,
4706,
282,
29895,
3174,
353,
5159,
13,
13,
1678,
1121,
353,
1051,
29898,
4572,
29898,
15865,
29918,
276,
29889,
4352,
29892,
282,
29895,
3174,
876,
13,
1678,
565,
1121,
338,
6213,
29901,
13,
4706,
736,
5159,
13,
13,
1678,
10944,
29918,
2435,
353,
7431,
7373,
5113,
29918,
13506,
3101,
718,
29871,
29896,
13,
13,
1678,
736,
12705,
29898,
13,
4706,
518,
15865,
29961,
13506,
29918,
2435,
17531,
363,
282,
9415,
297,
1121,
1402,
1820,
29922,
7692,
312,
8789,
29889,
21058,
29918,
517,
29918,
1989,
7373,
21058,
29918,
3259,
29897,
13,
1678,
1723,
13,
13,
13,
1753,
9281,
29918,
16515,
7295,
13,
1678,
9995,
13,
1678,
7106,
278,
1873,
310,
278,
9281,
8466,
515,
278,
3577,
28914,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
12333,
29918,
16515,
13,
1678,
9995,
13,
1678,
1121,
353,
4770,
29879,
1997,
1649,
3366,
15865,
29889,
12333,
29918,
3259,
29908,
850,
13,
4706,
29850,
7402,
8875,
1642,
4830,
7373,
5113,
29918,
13506,
3285,
903,
17460,
29918,
1853,
3101,
13,
1678,
1723,
13,
1678,
565,
1121,
1275,
376,
1115,
13,
4706,
736,
9281,
29918,
25537,
580,
13,
13,
1678,
1873,
353,
337,
29889,
4352,
29898,
29878,
29908,
29985,
1194,
29881,
3124,
7790,
29881,
3124,
7790,
29881,
29974,
2144,
29889,
1194,
29881,
29974,
19123,
1121,
29897,
13,
1678,
736,
29850,
7402,
29912,
7402,
8875,
1642,
4830,
29898,
3259,
29889,
2972,
29898,
29896,
511,
1873,
29889,
2972,
29898,
29906,
511,
903,
17460,
29918,
1853,
3101,
13,
13,
13,
1753,
9281,
29918,
25537,
7295,
13,
1678,
9995,
13,
1678,
7106,
278,
1873,
310,
278,
9281,
5130,
8466,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
12333,
29918,
25537,
13,
13,
1678,
6317,
4443,
1057,
13,
4706,
910,
740,
1122,
451,
736,
278,
1021,
995,
408,
13,
4706,
584,
2272,
29901,
9891,
18078,
30022,
29879,
1997,
29889,
7576,
29889,
17460,
15865,
29918,
9389,
29918,
2156,
29889,
4925,
29952,
565,
263,
716,
8466,
13,
4706,
756,
1063,
5130,
322,
278,
1788,
756,
451,
3447,
1063,
22538,
287,
29889,
13,
4706,
450,
584,
2272,
29901,
9891,
18078,
30022,
29879,
1997,
29889,
7576,
29889,
17460,
15865,
29918,
9389,
29918,
2156,
29889,
484,
5779,
29918,
276,
4777,
29952,
740,
13,
4706,
4864,
304,
6459,
445,
4195,
29889,
13,
1678,
9995,
13,
1678,
282,
29895,
3174,
353,
1051,
29918,
25537,
580,
13,
1678,
565,
282,
29895,
3174,
29901,
13,
4706,
736,
282,
29895,
3174,
14352,
29896,
29962,
13,
13,
1678,
736,
6213,
13,
13,
13,
1753,
4225,
29918,
276,
4777,
7295,
13,
1678,
9995,
13,
1678,
5953,
522,
565,
263,
716,
8466,
1873,
756,
1063,
5130,
541,
338,
451,
2734,
29889,
13,
1678,
16969,
5852,
565,
263,
716,
8466,
338,
5130,
29892,
7700,
6467,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
484,
5779,
29918,
276,
4777,
13,
1678,
9995,
13,
1678,
736,
903,
3410,
852,
6594,
29898,
4925,
3101,
529,
903,
3410,
852,
6594,
29898,
12333,
29918,
25537,
3101,
13,
13,
13,
1753,
14955,
29898,
276,
4777,
29922,
8824,
29892,
472,
29918,
2230,
29922,
8516,
1125,
13,
1678,
9995,
13,
1678,
5020,
8228,
278,
8466,
322,
2984,
635,
22538,
278,
1788,
29889,
13,
13,
1678,
22538,
584,
7700,
13,
4706,
10729,
263,
22538,
565,
263,
716,
8466,
338,
3625,
29889,
13,
13,
1678,
472,
29918,
2230,
584,
16800,
13,
4706,
1102,
11272,
278,
22538,
472,
777,
1298,
297,
278,
5434,
29889,
910,
2980,
13,
4706,
338,
17262,
565,
4954,
276,
4777,
29922,
8824,
29952,
1412,
2823,
13,
4706,
584,
2272,
29901,
9891,
18078,
30022,
29879,
1997,
29889,
7576,
29889,
5205,
29889,
276,
4777,
29952,
363,
901,
4902,
13,
4706,
373,
445,
2980,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
786,
8228,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
786,
8228,
22538,
29922,
5574,
472,
29918,
2230,
29922,
29896,
13,
13,
1678,
6317,
4443,
1057,
13,
4706,
530,
16800,
22538,
4049,
528,
8842,
1623,
278,
1788,
1434,
278,
1375,
291,
756,
263,
13,
4706,
8825,
304,
736,
29892,
9819,
297,
4436,
29889,
319,
13114,
9055,
313,
29896,
11015,
29897,
338,
13,
4706,
5407,
304,
9801,
278,
1121,
338,
20115,
304,
278,
5835,
29889,
13,
1678,
9995,
13,
1678,
1121,
353,
4770,
29879,
1997,
1649,
3366,
15865,
29889,
6252,
29908,
850,
13,
4706,
1024,
10724,
7402,
8875,
1642,
4830,
7373,
5113,
29918,
13506,
3285,
9281,
29918,
16515,
3101,
13,
1678,
1723,
13,
1678,
903,
484,
5779,
29918,
276,
4777,
353,
4225,
29918,
276,
4777,
580,
13,
13,
1678,
3240,
353,
426,
13,
4706,
376,
786,
629,
3076,
1115,
1121,
29892,
13,
4706,
376,
4925,
1115,
6136,
3285,
13,
4706,
376,
12333,
29918,
25537,
1115,
9281,
29918,
25537,
3285,
13,
4706,
376,
276,
4777,
29918,
3827,
287,
1115,
22538,
29892,
13,
4706,
376,
276,
4777,
29918,
12403,
1115,
903,
484,
5779,
29918,
276,
4777,
29892,
13,
1678,
500,
13,
13,
1678,
565,
22538,
322,
903,
484,
5779,
29918,
276,
4777,
29901,
13,
4706,
1480,
29889,
27392,
703,
29934,
774,
3155,
292,
1788,
2861,
304,
8466,
14955,
1159,
13,
4706,
4770,
29879,
1997,
1649,
3366,
5205,
29889,
276,
4777,
29908,
850,
271,
29918,
2230,
29922,
271,
29918,
2230,
29897,
13,
13,
1678,
736,
3240,
13,
13,
13,
1753,
14955,
29918,
16515,
7295,
13,
1678,
9995,
13,
1678,
5953,
522,
565,
263,
716,
8466,
1873,
338,
3625,
297,
278,
28914,
29889,
13,
1678,
16969,
5852,
565,
263,
716,
8466,
338,
3625,
29892,
7700,
6467,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
786,
8228,
29918,
16515,
13,
1678,
9995,
13,
1678,
736,
903,
3410,
852,
6594,
29898,
12333,
29918,
16515,
3101,
1405,
903,
3410,
852,
6594,
29898,
12333,
29918,
25537,
3101,
13,
13,
13,
1753,
3349,
29898,
14096,
1125,
13,
1678,
9995,
13,
1678,
15154,
263,
2702,
1873,
310,
278,
8466,
29889,
13,
13,
1678,
6507,
13,
4706,
450,
6507,
1353,
310,
385,
5130,
8466,
29889,
910,
1818,
367,
278,
4152,
6507,
13,
4706,
1353,
408,
4133,
491,
584,
2272,
29901,
9891,
18078,
30022,
29879,
1997,
29889,
7576,
29889,
17460,
15865,
29918,
9389,
29918,
2156,
29889,
1761,
29918,
25537,
1673,
13,
4706,
451,
278,
3577,
1024,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
5992,
29871,
29946,
29889,
29946,
29889,
29900,
29899,
29955,
29900,
29899,
19206,
13,
1678,
9995,
13,
1678,
565,
6507,
451,
297,
1051,
29918,
25537,
7295,
13,
4706,
12020,
10516,
20418,
2392,
29898,
13,
9651,
376,
29968,
5851,
6507,
525,
8875,
29915,
338,
451,
5130,
1642,
4830,
29898,
14096,
29897,
13,
4706,
1723,
13,
13,
1678,
565,
6507,
1275,
6136,
7295,
13,
4706,
12020,
10516,
20418,
2392,
703,
9966,
8466,
2609,
367,
6206,
1159,
13,
13,
1678,
3646,
353,
29850,
7402,
8875,
1642,
4830,
7373,
5113,
29918,
13506,
3285,
6507,
29897,
13,
1678,
1480,
29889,
3888,
703,
7301,
21081,
8466,
3577,
1273,
29879,
613,
3646,
29897,
13,
13,
1678,
4770,
29879,
1997,
1649,
3366,
15865,
29889,
15503,
479,
29908,
850,
5182,
29897,
13,
13,
1678,
736,
8853,
1745,
8238,
1115,
518,
5182,
12258,
13,
13,
13,
1753,
5941,
786,
29898,
17462,
29918,
12333,
29922,
5574,
1125,
13,
1678,
9995,
13,
1678,
15154,
599,
443,
3880,
8466,
9741,
515,
278,
1788,
29889,
13,
13,
1678,
3013,
29918,
12333,
584,
5852,
13,
4706,
512,
278,
1741,
393,
278,
6136,
8466,
338,
451,
278,
9281,
697,
5130,
29892,
4444,
445,
304,
5852,
13,
4706,
674,
11551,
278,
9281,
8466,
3577,
29892,
297,
6124,
304,
278,
6136,
697,
29889,
960,
7700,
29892,
599,
8466,
13,
4706,
9741,
916,
1135,
278,
6136,
697,
674,
367,
6206,
29889,
13,
13,
1678,
24492,
8741,
29901,
13,
13,
1678,
6317,
775,
29899,
1271,
1057,
10891,
13,
13,
4706,
15795,
525,
29930,
29915,
8466,
15865,
29889,
14941,
786,
13,
1678,
9995,
13,
1678,
6206,
353,
5159,
13,
13,
1678,
396,
21493,
975,
599,
5130,
8466,
9741,
13,
1678,
363,
8466,
297,
1051,
29918,
25537,
7295,
13,
13,
4706,
396,
19152,
278,
6136,
8466,
3577,
13,
4706,
565,
8466,
1275,
6136,
7295,
13,
9651,
6773,
13,
13,
4706,
396,
10831,
635,
3013,
278,
9281,
8466,
3577,
13,
4706,
565,
3013,
29918,
12333,
322,
8466,
1275,
9281,
29918,
25537,
7295,
13,
9651,
6773,
13,
13,
4706,
396,
15154,
278,
8466,
3577,
13,
4706,
6206,
29889,
21843,
29898,
5992,
29898,
17460,
29897,
3366,
1745,
8238,
20068,
13,
13,
1678,
736,
8853,
1745,
8238,
1115,
6206,
29913,
13,
13,
13,
1753,
903,
5113,
29918,
13506,
7295,
13,
1678,
9995,
13,
1678,
7106,
2294,
1347,
363,
278,
3577,
10944,
13,
1678,
9995,
13,
1678,
736,
376,
9389,
29899,
3027,
29908,
13,
13,
13,
1753,
903,
17460,
29918,
1853,
7295,
13,
1678,
9995,
13,
1678,
20969,
278,
8466,
1024,
322,
736,
967,
1134,
13,
1678,
9995,
13,
1678,
736,
337,
29889,
4352,
29898,
29878,
29908,
29985,
7110,
29881,
9229,
10062,
29899,
11891,
29974,
1262,
613,
6136,
16655,
2972,
29898,
29896,
29897,
13,
13,
13,
1753,
903,
21058,
29918,
3259,
29898,
667,
29896,
29892,
2944,
29906,
1125,
13,
1678,
9995,
13,
1678,
3831,
598,
740,
363,
3577,
1873,
16548,
13,
1678,
9995,
13,
1678,
1224,
29896,
353,
903,
3410,
852,
6594,
29898,
667,
29896,
29897,
13,
1678,
1224,
29906,
353,
903,
3410,
852,
6594,
29898,
667,
29906,
29897,
13,
13,
1678,
565,
1224,
29896,
529,
1224,
29906,
29901,
13,
4706,
736,
448,
29896,
13,
1678,
565,
1224,
29896,
1405,
1224,
29906,
29901,
13,
4706,
736,
29871,
29896,
13,
1678,
736,
29871,
29900,
13,
2
] |
setup.py | norcams/himlar-dp-prep | 0 | 177774 | <gh_stars>0
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'funcsigs==1.0.0',
'pyramid',
'pyramid_mako',
# 'pyramid_debugtoolbar',
'authomatic',
'python-keystoneclient==3.10.0',
'waitress',
'grampg',
'pika==0.11.2',
]
setup(name='himlar_dp_prep',
version='0.0',
description='himlar_dp_prep',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='<NAME>',
author_email='<EMAIL>',
url='https://github.com/norcams/himlar-dp-prep',
keywords='web pyramid pylons',
packages=find_packages(),
include_package_data=True,
dependency_links = [
'http://github.com/jhellan/authomatic/tarball/master#egg=authomatic-0.1.0.uninett2'
],
zip_safe=False,
install_requires=requires,
tests_require=requires,
test_suite="",
entry_points="""\
[paste.app_factory]
main = himlar_dp_prep:main
""",
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
4150,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
2541,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4150,
29892,
525,
16310,
2303,
29889,
3487,
8785,
408,
285,
29901,
13,
1678,
5195,
3035,
2303,
353,
285,
29889,
949,
580,
13,
2541,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4150,
29892,
525,
3210,
24336,
29903,
29889,
3945,
8785,
408,
285,
29901,
13,
1678,
5868,
24336,
29903,
353,
285,
29889,
949,
580,
13,
13,
276,
339,
2658,
353,
518,
13,
1678,
525,
7692,
2395,
23379,
1360,
29896,
29889,
29900,
29889,
29900,
742,
13,
1678,
525,
2272,
2572,
333,
742,
13,
1678,
525,
2272,
2572,
333,
29918,
29885,
4614,
742,
13,
29937,
1678,
525,
2272,
2572,
333,
29918,
8382,
10154,
1646,
742,
13,
1678,
525,
5150,
290,
2454,
742,
13,
1678,
525,
4691,
29899,
446,
858,
650,
4645,
1360,
29941,
29889,
29896,
29900,
29889,
29900,
742,
13,
1678,
525,
10685,
1253,
742,
13,
1678,
525,
629,
1160,
29887,
742,
13,
1678,
525,
29886,
4106,
1360,
29900,
29889,
29896,
29896,
29889,
29906,
742,
13,
1678,
4514,
13,
13,
14669,
29898,
978,
2433,
26994,
4675,
29918,
6099,
29918,
15287,
742,
13,
418,
1873,
2433,
29900,
29889,
29900,
742,
13,
418,
6139,
2433,
26994,
4675,
29918,
6099,
29918,
15287,
742,
13,
418,
1472,
29918,
8216,
29922,
16310,
2303,
718,
11297,
29876,
29905,
29876,
29915,
718,
5868,
24336,
29903,
29892,
13,
418,
770,
14903,
11759,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
613,
13,
4706,
376,
16660,
4761,
10772,
2572,
333,
613,
13,
4706,
376,
7031,
293,
4761,
4685,
4761,
399,
29956,
29956,
29914,
10493,
613,
13,
4706,
376,
7031,
293,
4761,
4685,
4761,
399,
29956,
29956,
29914,
10493,
4761,
399,
26016,
29902,
4761,
8427,
613,
13,
4706,
21251,
13,
418,
4148,
2433,
29966,
5813,
29958,
742,
13,
418,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
418,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
15459,
29883,
2232,
29914,
26994,
4675,
29899,
6099,
29899,
15287,
742,
13,
418,
29361,
2433,
2676,
11451,
2572,
333,
282,
2904,
787,
742,
13,
418,
9741,
29922,
2886,
29918,
8318,
3285,
13,
418,
3160,
29918,
5113,
29918,
1272,
29922,
5574,
29892,
13,
418,
10609,
29918,
4965,
353,
518,
13,
3986,
525,
1124,
597,
3292,
29889,
510,
29914,
29926,
14181,
273,
29914,
5150,
290,
2454,
29914,
12637,
2135,
29914,
6207,
29937,
387,
29887,
29922,
5150,
290,
2454,
29899,
29900,
29889,
29896,
29889,
29900,
29889,
348,
262,
1803,
29906,
29915,
13,
418,
21251,
13,
418,
14319,
29918,
11177,
29922,
8824,
29892,
13,
418,
2601,
29918,
276,
339,
2658,
29922,
276,
339,
2658,
29892,
13,
418,
6987,
29918,
12277,
29922,
276,
339,
2658,
29892,
13,
418,
1243,
29918,
13495,
543,
613,
13,
418,
6251,
29918,
9748,
13776,
26732,
13,
418,
518,
16179,
29889,
932,
29918,
14399,
29962,
13,
418,
1667,
353,
1075,
4675,
29918,
6099,
29918,
15287,
29901,
3396,
13,
418,
5124,
613,
13,
418,
1723,
13,
2
] |
bot/database.py | zd4y/discordbot | 0 | 1614367 | from .config import Settings
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine(Settings.DATABASE_URL, echo=False)
session_factory = sessionmaker(bind=engine)
session = scoped_session(session_factory)
Base = declarative_base()
Base.query = session.query_property()
| [
1,
515,
869,
2917,
1053,
19215,
13,
3166,
4576,
284,
305,
6764,
1053,
1653,
29918,
10599,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
4867,
28107,
29892,
16505,
287,
29918,
7924,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
13,
13,
10599,
353,
1653,
29918,
10599,
29898,
9585,
29889,
25832,
27982,
29918,
4219,
29892,
2916,
29922,
8824,
29897,
13,
7924,
29918,
14399,
353,
4867,
28107,
29898,
5355,
29922,
10599,
29897,
13,
7924,
353,
16505,
287,
29918,
7924,
29898,
7924,
29918,
14399,
29897,
13,
5160,
353,
7669,
1230,
29918,
3188,
580,
13,
5160,
29889,
1972,
353,
4867,
29889,
1972,
29918,
6799,
580,
13,
2
] |
dfvfs/vfs/apfs_container_file_entry.py | jaegeral/dfvfs | 0 | 192719 | # -*- coding: utf-8 -*-
"""The APFS container file entry implementation."""
from dfvfs.lib import apfs_helper
from dfvfs.lib import definitions
from dfvfs.lib import errors
from dfvfs.resolver import resolver
from dfvfs.vfs import apfs_container_directory
from dfvfs.vfs import file_entry
class APFSContainerFileEntry(file_entry.FileEntry):
"""File system file entry that uses pyfsapfs."""
TYPE_INDICATOR = definitions.TYPE_INDICATOR_APFS_CONTAINER
def __init__(
self, resolver_context, file_system, path_spec, is_root=False,
is_virtual=False):
"""Initializes a file entry.
Args:
resolver_context (Context): resolver context.
file_system (FileSystem): file system.
path_spec (PathSpec): path specification.
is_root (Optional[bool]): True if the file entry is the root file entry
of the corresponding file system.
is_virtual (Optional[bool]): True if the file entry is a virtual file
entry emulated by the corresponding file system.
Raises:
BackEndError: when the fsapfs volume is missing in a non-virtual
file entry.
"""
fsapfs_volume = file_system.GetAPFSVolumeByPathSpec(path_spec)
if not is_virtual and fsapfs_volume is None:
raise errors.BackEndError(
'Missing fsapfs volume in non-virtual file entry.')
super(APFSContainerFileEntry, self).__init__(
resolver_context, file_system, path_spec, is_root=is_root,
is_virtual=is_virtual)
self._name = None
self._fsapfs_volume = fsapfs_volume
if self._is_virtual:
self.entry_type = definitions.FILE_ENTRY_TYPE_DIRECTORY
else:
self.entry_type = definitions.FILE_ENTRY_TYPE_FILE
def _GetDirectory(self):
"""Retrieves a directory.
Returns:
APFSContainerDirectory: a directory.
"""
if self.entry_type != definitions.FILE_ENTRY_TYPE_DIRECTORY:
return None
return apfs_container_directory.APFSContainerDirectory(
self._file_system, self.path_spec)
def _GetSubFileEntries(self):
"""Retrieves a sub file entries generator.
Yields:
APFSContainerFileEntry: a sub file entry.
"""
if self._directory is None:
self._directory = self._GetDirectory()
if self._directory:
for path_spec in self._directory.entries:
yield APFSContainerFileEntry(
self._resolver_context, self._file_system, path_spec)
# TODO: expose date and time values.
@property
def name(self):
"""str: name of the file entry, which does not include the full path."""
if self._name is None:
location = getattr(self.path_spec, 'location', None)
if location is not None:
self._name = self._file_system.BasenamePath(location)
else:
volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(
self.path_spec)
if volume_index is not None:
self._name = 'apfs{0:d}'.format(volume_index + 1)
else:
self._name = ''
return self._name
@property
def size(self):
"""int: size of the file entry in bytes or None if not available."""
if self._fsapfs_volume is None:
return None
# TODO: change libfsapfs so self._fsapfs_volume.size works
return 0
@property
def sub_file_entries(self):
"""generator[APFSContainerFileEntry]: sub file entries."""
return self._GetSubFileEntries()
def GetAPFSVolume(self):
"""Retrieves an APFS volume.
Returns:
pyfsapfs.volume: an APFS volume or None if not available.
"""
return self._fsapfs_volume
def GetParentFileEntry(self):
"""Retrieves the parent file entry.
Returns:
APFSContainerFileEntry: parent file entry or None if not available.
"""
volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(
self.path_spec)
if volume_index is None:
return None
return self._file_system.GetRootFileEntry()
def IsLocked(self):
"""Determines if the file entry is locked.
Returns:
bool: True if the file entry is locked.
"""
if self._fsapfs_volume is None:
return False
return self._fsapfs_volume.is_locked()
def Unlock(self):
"""Unlocks the file entry.
Returns:
bool: True if the file entry was unlocked.
"""
if not self._fsapfs_volume or not self._fsapfs_volume.is_locked():
return True
return apfs_helper.APFSUnlockVolume(
self._fsapfs_volume, self.path_spec, resolver.Resolver.key_chain)
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
1576,
12279,
9998,
5639,
934,
6251,
5314,
1213,
15945,
13,
13,
3166,
4489,
29894,
5847,
29889,
1982,
1053,
3095,
5847,
29918,
20907,
13,
3166,
4489,
29894,
5847,
29889,
1982,
1053,
15848,
13,
3166,
4489,
29894,
5847,
29889,
1982,
1053,
4436,
13,
3166,
4489,
29894,
5847,
29889,
9778,
369,
1053,
3770,
369,
13,
3166,
4489,
29894,
5847,
29889,
29894,
5847,
1053,
3095,
5847,
29918,
7611,
29918,
12322,
13,
3166,
4489,
29894,
5847,
29889,
29894,
5847,
1053,
934,
29918,
8269,
13,
13,
13,
1990,
12279,
9998,
7895,
2283,
9634,
29898,
1445,
29918,
8269,
29889,
2283,
9634,
1125,
13,
29871,
9995,
2283,
1788,
934,
6251,
393,
3913,
11451,
5847,
481,
5847,
1213,
15945,
13,
13,
29871,
323,
6959,
29918,
22255,
2965,
1299,
1955,
353,
15848,
29889,
11116,
29918,
22255,
2965,
1299,
1955,
29918,
3301,
9998,
29918,
6007,
6040,
1177,
1001,
13,
13,
29871,
822,
4770,
2344,
12035,
13,
418,
1583,
29892,
3770,
369,
29918,
4703,
29892,
934,
29918,
5205,
29892,
2224,
29918,
6550,
29892,
338,
29918,
4632,
29922,
8824,
29892,
13,
418,
338,
29918,
18714,
29922,
8824,
1125,
13,
1678,
9995,
15514,
7093,
263,
934,
6251,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
418,
3770,
369,
29918,
4703,
313,
2677,
1125,
3770,
369,
3030,
29889,
13,
418,
934,
29918,
5205,
313,
2283,
3924,
1125,
934,
1788,
29889,
13,
418,
2224,
29918,
6550,
313,
2605,
10299,
1125,
2224,
21992,
29889,
13,
418,
338,
29918,
4632,
313,
27636,
29961,
11227,
29962,
1125,
5852,
565,
278,
934,
6251,
338,
278,
3876,
934,
6251,
13,
3986,
310,
278,
6590,
934,
1788,
29889,
13,
418,
338,
29918,
18714,
313,
27636,
29961,
11227,
29962,
1125,
5852,
565,
278,
934,
6251,
338,
263,
6901,
934,
13,
3986,
6251,
953,
7964,
491,
278,
6590,
934,
1788,
29889,
13,
13,
1678,
390,
1759,
267,
29901,
13,
418,
7437,
5044,
2392,
29901,
746,
278,
18920,
481,
5847,
7977,
338,
4567,
297,
263,
1661,
29899,
18714,
13,
3986,
934,
6251,
29889,
13,
1678,
9995,
13,
1678,
18920,
481,
5847,
29918,
24623,
353,
934,
29918,
5205,
29889,
2577,
3301,
29943,
7597,
324,
2017,
2059,
2605,
10299,
29898,
2084,
29918,
6550,
29897,
13,
1678,
565,
451,
338,
29918,
18714,
322,
18920,
481,
5847,
29918,
24623,
338,
6213,
29901,
13,
418,
12020,
4436,
29889,
5841,
5044,
2392,
29898,
13,
3986,
525,
18552,
292,
18920,
481,
5847,
7977,
297,
1661,
29899,
18714,
934,
6251,
29889,
1495,
13,
13,
1678,
2428,
29898,
3301,
9998,
7895,
2283,
9634,
29892,
1583,
467,
1649,
2344,
12035,
13,
4706,
3770,
369,
29918,
4703,
29892,
934,
29918,
5205,
29892,
2224,
29918,
6550,
29892,
338,
29918,
4632,
29922,
275,
29918,
4632,
29892,
13,
4706,
338,
29918,
18714,
29922,
275,
29918,
18714,
29897,
13,
1678,
1583,
3032,
978,
353,
6213,
13,
1678,
1583,
3032,
5847,
481,
5847,
29918,
24623,
353,
18920,
481,
5847,
29918,
24623,
13,
13,
1678,
565,
1583,
3032,
275,
29918,
18714,
29901,
13,
418,
1583,
29889,
8269,
29918,
1853,
353,
15848,
29889,
7724,
29918,
3919,
13207,
29918,
11116,
29918,
4571,
26282,
18929,
13,
1678,
1683,
29901,
13,
418,
1583,
29889,
8269,
29918,
1853,
353,
15848,
29889,
7724,
29918,
3919,
13207,
29918,
11116,
29918,
7724,
13,
13,
29871,
822,
903,
2577,
9882,
29898,
1311,
1125,
13,
1678,
9995,
8015,
2546,
1960,
263,
3884,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
12279,
9998,
7895,
9882,
29901,
263,
3884,
29889,
13,
1678,
9995,
13,
1678,
565,
1583,
29889,
8269,
29918,
1853,
2804,
15848,
29889,
7724,
29918,
3919,
13207,
29918,
11116,
29918,
4571,
26282,
18929,
29901,
13,
418,
736,
6213,
13,
13,
1678,
736,
3095,
5847,
29918,
7611,
29918,
12322,
29889,
3301,
9998,
7895,
9882,
29898,
13,
4706,
1583,
3032,
1445,
29918,
5205,
29892,
1583,
29889,
2084,
29918,
6550,
29897,
13,
13,
29871,
822,
903,
2577,
4035,
2283,
5292,
2722,
29898,
1311,
1125,
13,
1678,
9995,
8015,
2546,
1960,
263,
1014,
934,
9976,
15299,
29889,
13,
13,
1678,
612,
969,
29879,
29901,
13,
418,
12279,
9998,
7895,
2283,
9634,
29901,
263,
1014,
934,
6251,
29889,
13,
1678,
9995,
13,
1678,
565,
1583,
3032,
12322,
338,
6213,
29901,
13,
418,
1583,
3032,
12322,
353,
1583,
3032,
2577,
9882,
580,
13,
13,
1678,
565,
1583,
3032,
12322,
29901,
13,
418,
363,
2224,
29918,
6550,
297,
1583,
3032,
12322,
29889,
26586,
29901,
13,
4706,
7709,
12279,
9998,
7895,
2283,
9634,
29898,
13,
9651,
1583,
3032,
9778,
369,
29918,
4703,
29892,
1583,
3032,
1445,
29918,
5205,
29892,
2224,
29918,
6550,
29897,
13,
13,
29871,
396,
14402,
29901,
24396,
2635,
322,
931,
1819,
29889,
13,
13,
29871,
732,
6799,
13,
29871,
822,
1024,
29898,
1311,
1125,
13,
1678,
9995,
710,
29901,
1024,
310,
278,
934,
6251,
29892,
607,
947,
451,
3160,
278,
2989,
2224,
1213,
15945,
13,
1678,
565,
1583,
3032,
978,
338,
6213,
29901,
13,
418,
4423,
353,
679,
5552,
29898,
1311,
29889,
2084,
29918,
6550,
29892,
525,
5479,
742,
6213,
29897,
13,
418,
565,
4423,
338,
451,
6213,
29901,
13,
4706,
1583,
3032,
978,
353,
1583,
3032,
1445,
29918,
5205,
29889,
9496,
3871,
2605,
29898,
5479,
29897,
13,
418,
1683,
29901,
13,
4706,
7977,
29918,
2248,
353,
3095,
5847,
29918,
20907,
29889,
3301,
9998,
7895,
2605,
10299,
2577,
24679,
3220,
29898,
13,
9651,
1583,
29889,
2084,
29918,
6550,
29897,
13,
4706,
565,
7977,
29918,
2248,
338,
451,
6213,
29901,
13,
3986,
1583,
3032,
978,
353,
525,
481,
5847,
29912,
29900,
29901,
29881,
29913,
4286,
4830,
29898,
24623,
29918,
2248,
718,
29871,
29896,
29897,
13,
4706,
1683,
29901,
13,
3986,
1583,
3032,
978,
353,
6629,
13,
13,
1678,
736,
1583,
3032,
978,
13,
13,
29871,
732,
6799,
13,
29871,
822,
2159,
29898,
1311,
1125,
13,
1678,
9995,
524,
29901,
2159,
310,
278,
934,
6251,
297,
6262,
470,
6213,
565,
451,
3625,
1213,
15945,
13,
1678,
565,
1583,
3032,
5847,
481,
5847,
29918,
24623,
338,
6213,
29901,
13,
418,
736,
6213,
13,
13,
1678,
396,
14402,
29901,
1735,
619,
1635,
29879,
481,
5847,
577,
1583,
3032,
5847,
481,
5847,
29918,
24623,
29889,
2311,
1736,
13,
1678,
736,
29871,
29900,
13,
13,
29871,
732,
6799,
13,
29871,
822,
1014,
29918,
1445,
29918,
26586,
29898,
1311,
1125,
13,
1678,
9995,
27959,
29961,
3301,
9998,
7895,
2283,
9634,
5387,
1014,
934,
9976,
1213,
15945,
13,
1678,
736,
1583,
3032,
2577,
4035,
2283,
5292,
2722,
580,
13,
13,
29871,
822,
3617,
3301,
29943,
7597,
324,
2017,
29898,
1311,
1125,
13,
1678,
9995,
8015,
2546,
1960,
385,
12279,
9998,
7977,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
11451,
5847,
481,
5847,
29889,
24623,
29901,
385,
12279,
9998,
7977,
470,
6213,
565,
451,
3625,
29889,
13,
1678,
9995,
13,
1678,
736,
1583,
3032,
5847,
481,
5847,
29918,
24623,
13,
13,
29871,
822,
3617,
9780,
2283,
9634,
29898,
1311,
1125,
13,
1678,
9995,
8015,
2546,
1960,
278,
3847,
934,
6251,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
12279,
9998,
7895,
2283,
9634,
29901,
3847,
934,
6251,
470,
6213,
565,
451,
3625,
29889,
13,
1678,
9995,
13,
1678,
7977,
29918,
2248,
353,
3095,
5847,
29918,
20907,
29889,
3301,
9998,
7895,
2605,
10299,
2577,
24679,
3220,
29898,
13,
4706,
1583,
29889,
2084,
29918,
6550,
29897,
13,
1678,
565,
7977,
29918,
2248,
338,
6213,
29901,
13,
418,
736,
6213,
13,
13,
1678,
736,
1583,
3032,
1445,
29918,
5205,
29889,
2577,
10303,
2283,
9634,
580,
13,
13,
29871,
822,
1317,
16542,
287,
29898,
1311,
1125,
13,
1678,
9995,
6362,
837,
1475,
565,
278,
934,
6251,
338,
22822,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
6120,
29901,
5852,
565,
278,
934,
6251,
338,
22822,
29889,
13,
1678,
9995,
13,
1678,
565,
1583,
3032,
5847,
481,
5847,
29918,
24623,
338,
6213,
29901,
13,
418,
736,
7700,
13,
13,
1678,
736,
1583,
3032,
5847,
481,
5847,
29918,
24623,
29889,
275,
29918,
29113,
580,
13,
13,
29871,
822,
853,
908,
29898,
1311,
1125,
13,
1678,
9995,
2525,
908,
29879,
278,
934,
6251,
29889,
13,
13,
1678,
16969,
29901,
13,
418,
6120,
29901,
5852,
565,
278,
934,
6251,
471,
443,
29113,
29889,
13,
1678,
9995,
13,
1678,
565,
451,
1583,
3032,
5847,
481,
5847,
29918,
24623,
470,
451,
1583,
3032,
5847,
481,
5847,
29918,
24623,
29889,
275,
29918,
29113,
7295,
13,
418,
736,
5852,
13,
13,
1678,
736,
3095,
5847,
29918,
20907,
29889,
3301,
9998,
2525,
908,
24679,
29898,
13,
4706,
1583,
3032,
5847,
481,
5847,
29918,
24623,
29892,
1583,
29889,
2084,
29918,
6550,
29892,
3770,
369,
29889,
19648,
29889,
1989,
29918,
14153,
29897,
13,
2
] |
test/neg shift.py | jbr-ai-labs/PU-OC | 0 | 73100 | <reponame>jbr-ai-labs/PU-OC
from imports import *
def test_negshift(dataset_name,
models_block,
dim=128,
alpha=0.5,
n=1,
pos_label=0,
norm_flag=False,
cntrs=4,
params=None,
svm=False,
name='blank'):
results = {}
for model_type in models_block.values():
results[model_type.__name__] = []
train_holder = get_data(dataset_name,
True,
pos_label=None,
neg_label=None,
norm_flag=norm_flag)
test_holder = get_data(dataset_name,
False,
pos_label=None,
neg_label=None,
norm_flag=norm_flag)
encoder = get_encoder(f'nbae_{pos_label}.pcl', dataset_name)
for cnt in tqdm(range(cntrs)):
# print(f"pos={pos_label}")
res = {}
for model_type in models_block.values():
res[model_type.__name__] = []
for _ in tqdm(range(n)):
negs = np.random.choice(np.arange(1, 10), 2 * cnt + 2, replace=False)
train_bin = train_holder.pos_neg_split([pos_label], negs[:cnt + 1])
test_bin = train_holder.pos_neg_split([pos_label], negs[cnt + 1:])
if svm:
train_bin.encode_data(encoder)
test_bin.encode_data(encoder)
train_data, pi = train_bin.get_dataset(alpha, svm_labels=True)
test_data, pi_test = test_bin.get_dataset(alpha, c=0, svm_labels=True)
ntc_model = models_block["ntc"](dim=dim, encoder=f'nbae_{pos_label}')
ntc_model.run_train(train_data)
# ntc_model.eval()
if not svm:
encoded_train = encode_dataset(encoder, train_data)
cest, _ = tice(encoded_train.data, encoded_train.s.numpy(), 1,
np.random.randint(5, size=len(encoded_train.data)), delta=0.3)
aest = (encoded_train.s == 1).sum() * (1 - cest) / cest / (encoded_train.s != 1).sum()
else:
cest, _ = tice(train_data.data, train_data.s.numpy(), 3,
np.random.randint(5, size=len(train_data.data)), delta=0.2)
aest = (train_data.s == 1).sum() * (1 - cest) / cest / (train_data.s != 1).sum()
pi_est = min(1, aest)
cur_models = [models_block["oc"](dim=dim, encoder=f'nbae_{pos_label}', **params[pos_label]['oc']['init']),
models_block["pu"](dim=dim, pi=pi_est, encoder=f'nbae_{pos_label}',
**params[pos_label]['pu']['init'])]
# cur_models = [models_block["oc"](dim=dim),
# models_block["pu"](dim=dim, pi=pi_est)]
cur_models[0].run_train(train_data, **params[pos_label]['oc']['train'])
cur_models[1].run_train(train_data, **params[pos_label]['pu']['train'])
# cur_models[0].run_train(train_data)
# cur_models[1].run_train(train_data)
test_models = [ntc_model,
cur_models[0],
cur_models[1]]
# test_models = [cur_models[0]]
# print(f"done training {i}")
test = test_data, test_data
result = run_test(test_models, test, None)
for model in result:
res[model].append(result[model]["auc"])
for model in result:
results[model].append(res[model])
return results
| [
1,
529,
276,
1112,
420,
29958,
29926,
1182,
29899,
1794,
29899,
29880,
6897,
29914,
7056,
29899,
20166,
13,
3166,
24802,
1053,
334,
13,
13,
13,
1753,
1243,
29918,
10052,
10889,
29898,
24713,
29918,
978,
29892,
13,
462,
29871,
4733,
29918,
1271,
29892,
13,
462,
29871,
3964,
29922,
29896,
29906,
29947,
29892,
13,
462,
29871,
15595,
29922,
29900,
29889,
29945,
29892,
13,
462,
29871,
302,
29922,
29896,
29892,
13,
462,
29871,
926,
29918,
1643,
29922,
29900,
29892,
13,
462,
29871,
6056,
29918,
15581,
29922,
8824,
29892,
13,
462,
29871,
274,
29876,
509,
29879,
29922,
29946,
29892,
13,
462,
29871,
8636,
29922,
8516,
29892,
13,
462,
29871,
3731,
29885,
29922,
8824,
29892,
13,
462,
29871,
1024,
2433,
19465,
29374,
13,
1678,
2582,
353,
6571,
13,
1678,
363,
1904,
29918,
1853,
297,
4733,
29918,
1271,
29889,
5975,
7295,
13,
4706,
2582,
29961,
4299,
29918,
1853,
17255,
978,
1649,
29962,
353,
5159,
13,
13,
1678,
7945,
29918,
7694,
353,
679,
29918,
1272,
29898,
24713,
29918,
978,
29892,
13,
462,
9651,
5852,
29892,
13,
462,
9651,
926,
29918,
1643,
29922,
8516,
29892,
13,
462,
9651,
3480,
29918,
1643,
29922,
8516,
29892,
13,
462,
9651,
6056,
29918,
15581,
29922,
12324,
29918,
15581,
29897,
13,
13,
1678,
1243,
29918,
7694,
353,
679,
29918,
1272,
29898,
24713,
29918,
978,
29892,
13,
462,
965,
7700,
29892,
13,
462,
965,
926,
29918,
1643,
29922,
8516,
29892,
13,
462,
965,
3480,
29918,
1643,
29922,
8516,
29892,
13,
462,
965,
6056,
29918,
15581,
29922,
12324,
29918,
15581,
29897,
13,
13,
1678,
2094,
6119,
353,
679,
29918,
3977,
6119,
29898,
29888,
29915,
29876,
2291,
29872,
648,
1066,
29918,
1643,
1836,
29886,
695,
742,
8783,
29918,
978,
29897,
13,
13,
1678,
363,
274,
593,
297,
260,
29939,
18933,
29898,
3881,
29898,
18038,
509,
29879,
22164,
13,
4706,
396,
1596,
29898,
29888,
29908,
1066,
3790,
1066,
29918,
1643,
27195,
13,
13,
4706,
620,
353,
6571,
13,
4706,
363,
1904,
29918,
1853,
297,
4733,
29918,
1271,
29889,
5975,
7295,
13,
9651,
620,
29961,
4299,
29918,
1853,
17255,
978,
1649,
29962,
353,
5159,
13,
13,
4706,
363,
903,
297,
260,
29939,
18933,
29898,
3881,
29898,
29876,
22164,
13,
13,
9651,
3480,
29879,
353,
7442,
29889,
8172,
29889,
16957,
29898,
9302,
29889,
279,
927,
29898,
29896,
29892,
29871,
29896,
29900,
511,
29871,
29906,
334,
274,
593,
718,
29871,
29906,
29892,
5191,
29922,
8824,
29897,
13,
13,
9651,
7945,
29918,
2109,
353,
7945,
29918,
7694,
29889,
1066,
29918,
10052,
29918,
5451,
4197,
1066,
29918,
1643,
1402,
3480,
29879,
7503,
20047,
718,
29871,
29896,
2314,
13,
9651,
1243,
29918,
2109,
353,
7945,
29918,
7694,
29889,
1066,
29918,
10052,
29918,
5451,
4197,
1066,
29918,
1643,
1402,
3480,
29879,
29961,
20047,
718,
29871,
29896,
29901,
2314,
13,
13,
9651,
565,
3731,
29885,
29901,
13,
18884,
7945,
29918,
2109,
29889,
12508,
29918,
1272,
29898,
3977,
6119,
29897,
13,
18884,
1243,
29918,
2109,
29889,
12508,
29918,
1272,
29898,
3977,
6119,
29897,
13,
13,
9651,
7945,
29918,
1272,
29892,
2930,
353,
7945,
29918,
2109,
29889,
657,
29918,
24713,
29898,
2312,
29892,
3731,
29885,
29918,
21134,
29922,
5574,
29897,
13,
9651,
1243,
29918,
1272,
29892,
2930,
29918,
1688,
353,
1243,
29918,
2109,
29889,
657,
29918,
24713,
29898,
2312,
29892,
274,
29922,
29900,
29892,
3731,
29885,
29918,
21134,
29922,
5574,
29897,
13,
13,
9651,
302,
14246,
29918,
4299,
353,
4733,
29918,
1271,
3366,
593,
29883,
29908,
850,
6229,
29922,
6229,
29892,
2094,
6119,
29922,
29888,
29915,
29876,
2291,
29872,
648,
1066,
29918,
1643,
29913,
1495,
13,
9651,
302,
14246,
29918,
4299,
29889,
3389,
29918,
14968,
29898,
14968,
29918,
1272,
29897,
13,
9651,
396,
302,
14246,
29918,
4299,
29889,
14513,
580,
13,
13,
9651,
565,
451,
3731,
29885,
29901,
13,
18884,
18511,
29918,
14968,
353,
19750,
29918,
24713,
29898,
3977,
6119,
29892,
7945,
29918,
1272,
29897,
13,
18884,
274,
342,
29892,
903,
353,
260,
625,
29898,
26716,
29918,
14968,
29889,
1272,
29892,
18511,
29918,
14968,
29889,
29879,
29889,
23749,
3285,
29871,
29896,
29892,
13,
462,
1669,
7442,
29889,
8172,
29889,
9502,
524,
29898,
29945,
29892,
2159,
29922,
2435,
29898,
26716,
29918,
14968,
29889,
1272,
8243,
19471,
29922,
29900,
29889,
29941,
29897,
13,
18884,
263,
342,
353,
313,
26716,
29918,
14968,
29889,
29879,
1275,
29871,
29896,
467,
2083,
580,
334,
313,
29896,
448,
274,
342,
29897,
847,
274,
342,
847,
313,
26716,
29918,
14968,
29889,
29879,
2804,
29871,
29896,
467,
2083,
580,
13,
9651,
1683,
29901,
13,
18884,
274,
342,
29892,
903,
353,
260,
625,
29898,
14968,
29918,
1272,
29889,
1272,
29892,
7945,
29918,
1272,
29889,
29879,
29889,
23749,
3285,
29871,
29941,
29892,
13,
462,
1669,
7442,
29889,
8172,
29889,
9502,
524,
29898,
29945,
29892,
2159,
29922,
2435,
29898,
14968,
29918,
1272,
29889,
1272,
8243,
19471,
29922,
29900,
29889,
29906,
29897,
13,
18884,
263,
342,
353,
313,
14968,
29918,
1272,
29889,
29879,
1275,
29871,
29896,
467,
2083,
580,
334,
313,
29896,
448,
274,
342,
29897,
847,
274,
342,
847,
313,
14968,
29918,
1272,
29889,
29879,
2804,
29871,
29896,
467,
2083,
580,
13,
9651,
2930,
29918,
342,
353,
1375,
29898,
29896,
29892,
263,
342,
29897,
13,
13,
9651,
3151,
29918,
9794,
353,
518,
9794,
29918,
1271,
3366,
542,
29908,
850,
6229,
29922,
6229,
29892,
2094,
6119,
29922,
29888,
29915,
29876,
2291,
29872,
648,
1066,
29918,
1643,
29913,
742,
3579,
7529,
29961,
1066,
29918,
1643,
22322,
542,
16215,
2344,
2033,
511,
13,
462,
3986,
4733,
29918,
1271,
3366,
3746,
29908,
850,
6229,
29922,
6229,
29892,
2930,
29922,
1631,
29918,
342,
29892,
2094,
6119,
29922,
29888,
29915,
29876,
2291,
29872,
648,
1066,
29918,
1643,
29913,
742,
13,
462,
462,
632,
3579,
7529,
29961,
1066,
29918,
1643,
22322,
3746,
16215,
2344,
2033,
4638,
13,
13,
9651,
396,
3151,
29918,
9794,
353,
518,
9794,
29918,
1271,
3366,
542,
29908,
850,
6229,
29922,
6229,
511,
13,
9651,
396,
1669,
4733,
29918,
1271,
3366,
3746,
29908,
850,
6229,
29922,
6229,
29892,
2930,
29922,
1631,
29918,
342,
4638,
13,
13,
9651,
3151,
29918,
9794,
29961,
29900,
1822,
3389,
29918,
14968,
29898,
14968,
29918,
1272,
29892,
3579,
7529,
29961,
1066,
29918,
1643,
22322,
542,
16215,
14968,
11287,
13,
9651,
3151,
29918,
9794,
29961,
29896,
1822,
3389,
29918,
14968,
29898,
14968,
29918,
1272,
29892,
3579,
7529,
29961,
1066,
29918,
1643,
22322,
3746,
16215,
14968,
11287,
13,
13,
9651,
396,
3151,
29918,
9794,
29961,
29900,
1822,
3389,
29918,
14968,
29898,
14968,
29918,
1272,
29897,
13,
9651,
396,
3151,
29918,
9794,
29961,
29896,
1822,
3389,
29918,
14968,
29898,
14968,
29918,
1272,
29897,
13,
13,
9651,
1243,
29918,
9794,
353,
518,
593,
29883,
29918,
4299,
29892,
13,
462,
965,
3151,
29918,
9794,
29961,
29900,
1402,
13,
462,
965,
3151,
29918,
9794,
29961,
29896,
5262,
13,
9651,
396,
1243,
29918,
9794,
353,
518,
2764,
29918,
9794,
29961,
29900,
5262,
13,
13,
9651,
396,
1596,
29898,
29888,
29908,
15091,
6694,
426,
29875,
27195,
13,
9651,
1243,
353,
1243,
29918,
1272,
29892,
1243,
29918,
1272,
13,
13,
9651,
1121,
353,
1065,
29918,
1688,
29898,
1688,
29918,
9794,
29892,
1243,
29892,
6213,
29897,
13,
13,
9651,
363,
1904,
297,
1121,
29901,
13,
18884,
620,
29961,
4299,
1822,
4397,
29898,
2914,
29961,
4299,
29962,
3366,
14766,
20068,
13,
4706,
363,
1904,
297,
1121,
29901,
13,
9651,
2582,
29961,
4299,
1822,
4397,
29898,
690,
29961,
4299,
2314,
13,
13,
1678,
736,
2582,
13,
2
] |
09_Recurrent_Neural_Networks/05_Creating_A_Sequence_To_Sequence_Model/05_seq2seq_translation.py | maxim5/tensorflow_cookbook | 2 | 31383 | <reponame>maxim5/tensorflow_cookbook
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Creating Sequence to Sequence Models
# -------------------------------------
# Here we show how to implement sequence to sequence models.
# Specifically, we will build an English to German translation model.
#
import io
import os
import string
import sys
from collections import Counter
from zipfile import ZipFile
import matplotlib.pyplot as plt
import numpy as np
import requests
import tensorflow as tf
if tf.__version__[0] < '1':
from tensorflow.models.rnn.translate import seq2seq_model
else:
# models can be retrieved from github: https://github.com/tensorflow/models.git
# put the models dir under python search lib path.
local_repository = 'temp'
if not os.path.exists(local_repository):
# pip install gitpython
from git import Repo
tf_model_repository = 'https://github.com/tensorflow/models'
Repo.clone_from(tf_model_repository, local_repository)
sys.path.insert(0, 'temp/tutorials/rnn/translate/')
import seq2seq_model as seq2seq_model
# Model Parameters
learning_rate = 0.1
lr_decay_rate = 0.99
lr_decay_every = 100
max_gradient = 5.0
batch_size = 50
num_layers = 3
rnn_size = 500
layer_size = 512
generations = 10000
vocab_size = 10000
save_every = 1000
eval_every = 500
output_every = 50
punct = string.punctuation
# Data Parameters
data_dir = 'temp'
data_file = 'eng_ger.txt'
model_path = 'seq2seq_model'
full_model_dir = os.path.join(data_dir, model_path)
# Test Translation from English (lowercase, no punct)
test_english = ['hello where is my computer',
'the quick brown fox jumped over the lazy dog',
'is it going to rain tomorrow']
########################################################################################################################
# Data
########################################################################################################################
# Make Model Directory
if not os.path.exists(full_model_dir):
os.makedirs(full_model_dir)
# Make data directory
if not os.path.exists(data_dir):
os.makedirs(data_dir)
print('Loading English-German Data')
# Check for data, if it doesn't exist, download it and save it
if not os.path.isfile(os.path.join(data_dir, data_file)):
print('Data not found, downloading Eng-Ger sentences from www.manythings.org')
sentence_url = 'http://www.manythings.org/anki/deu-eng.zip'
r = requests.get(sentence_url)
z = ZipFile(io.BytesIO(r.content))
file = z.read('deu.txt')
# Format Data
eng_ger_data = file.decode(errors='ignore')
eng_ger_data = eng_ger_data.encode('ascii', errors='ignore')
eng_ger_data = eng_ger_data.decode().split('\n')
# Write to file
with open(os.path.join(data_dir, data_file), 'w') as out_conn:
for sentence in eng_ger_data:
out_conn.write(sentence + '\n')
else:
eng_ger_data = []
with open(os.path.join(data_dir, data_file), 'r') as in_conn:
for row in in_conn:
eng_ger_data.append(row[:-1])
print('Done!')
# Remove punctuation
eng_ger_data = [''.join(char for char in sent if char not in punct) for sent in eng_ger_data]
# Split each sentence by tabs
eng_ger_data = [x.split('\t') for x in eng_ger_data if len(x) >= 1]
[english_sentence, german_sentence] = [list(x) for x in zip(*eng_ger_data)]
english_sentence = [x.lower().split() for x in english_sentence]
german_sentence = [x.lower().split() for x in german_sentence]
print('Processing the vocabularies.')
# Process the English Vocabulary
all_english_words = [word for sentence in english_sentence for word in sentence]
all_english_counts = Counter(all_english_words)
eng_word_keys = [x[0] for x in all_english_counts.most_common(vocab_size - 1)] # -1 because 0=unknown is also in there
eng_vocab2ix = dict(zip(eng_word_keys, range(1, vocab_size)))
eng_ix2vocab = {val: key for key, val in eng_vocab2ix.items()}
english_processed = []
for sent in english_sentence:
temp_sentence = []
for word in sent:
try:
temp_sentence.append(eng_vocab2ix[word])
except:
temp_sentence.append(0)
english_processed.append(temp_sentence)
# Process the German Vocabulary
all_german_words = [word for sentence in german_sentence for word in sentence]
all_german_counts = Counter(all_german_words)
ger_word_keys = [x[0] for x in all_german_counts.most_common(vocab_size - 1)]
ger_vocab2ix = dict(zip(ger_word_keys, range(1, vocab_size)))
ger_ix2vocab = {val: key for key, val in ger_vocab2ix.items()}
german_processed = []
for sent in german_sentence:
temp_sentence = []
for word in sent:
try:
temp_sentence.append(ger_vocab2ix[word])
except:
temp_sentence.append(0)
german_processed.append(temp_sentence)
# Process the test english sentences, use '0' if word not in our vocab
test_data = []
for sentence in test_english:
temp_sentence = []
for word in sentence.split(' '):
try:
temp_sentence.append(eng_vocab2ix[word])
except:
# Use '0' if the word isn't in our vocabulary
temp_sentence.append(0)
test_data.append(temp_sentence)
# Define Buckets for sequence lengths
# We will split data into the corresponding buckets:
# (x1, y1), (x2, y2), ...
# Where all entries in bucket 1: len(x)<x1 and len(y)<y1 and so on.
x_maxs = [5, 7, 11, 50]
y_maxs = [10, 12, 17, 60]
buckets = [x for x in zip(x_maxs, y_maxs)]
bucketed_data = [[] for _ in range(len(x_maxs))]
for eng, ger in zip(english_processed, german_processed):
for ix, (x_max, y_max) in enumerate(zip(x_maxs, y_maxs)):
if (len(eng) <= x_max) and (len(ger) <= y_max):
bucketed_data[ix].append([eng, ger])
break
# Print summaries of buckets
train_bucket_sizes = [len(bucketed_data[b]) for b in range(len(buckets))]
train_total_size = float(sum(train_bucket_sizes))
for ix, bucket in enumerate(bucketed_data):
print('Data pts in bucket {}: {}'.format(ix, len(bucket)))
########################################################################################################################
# Create sequence to sequence model
########################################################################################################################
print('Creating Translation Model')
# https://stackoverflow.com/questions/44855603/typeerror-cant-pickle-thread-lock-objects-in-seq2seq/47952913#47952913
setattr(tf.contrib.rnn.GRUCell, '__deepcopy__', lambda self, _: self)
setattr(tf.contrib.rnn.BasicLSTMCell, '__deepcopy__', lambda self, _: self)
setattr(tf.contrib.rnn.MultiRNNCell, '__deepcopy__', lambda self, _: self)
def translation_model(input_vocab_size, output_vocab_size,
buckets, rnn_size, num_layers, max_gradient,
learning_rate, lr_decay_rate, forward_only):
model = seq2seq_model.Seq2SeqModel(source_vocab_size=input_vocab_size,
target_vocab_size=output_vocab_size,
buckets=buckets,
size=rnn_size,num_layers=num_layers,
max_gradient_norm=max_gradient,
batch_size=batch_size,
learning_rate=learning_rate,
learning_rate_decay_factor=lr_decay_rate,
forward_only=forward_only,
dtype=tf.float32)
return model
translate_model = translation_model(input_vocab_size=vocab_size,
output_vocab_size=vocab_size,
buckets=buckets,
rnn_size=rnn_size,
num_layers=num_layers,
max_gradient=max_gradient,
learning_rate=learning_rate,
lr_decay_rate=lr_decay_rate,
forward_only=False)
# Tell TensorFlow to reuse the variables for the test model
with tf.variable_scope(tf.get_variable_scope(), reuse=True):
# Reuse the variables for the test model
test_model = translation_model(input_vocab_size=vocab_size,
output_vocab_size=vocab_size,
buckets=buckets,
rnn_size=rnn_size,
num_layers=num_layers,
max_gradient=max_gradient,
learning_rate=learning_rate,
lr_decay_rate=lr_decay_rate,
forward_only=True)
test_model.batch_size = 1
########################################################################################################################
# Training session
########################################################################################################################
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
train_loss = []
for i in range(generations):
rand_bucket_ix = np.random.choice(len(bucketed_data))
model_outputs = translate_model.get_batch(bucketed_data, rand_bucket_ix)
encoder_inputs, decoder_inputs, target_weights = model_outputs
# Get the (gradient norm, loss, and outputs)
_, step_loss, _ = translate_model.step(sess, encoder_inputs, decoder_inputs,
target_weights, rand_bucket_ix, False)
# Output status
if (i + 1) % output_every == 0:
train_loss.append(step_loss)
print('Gen #{} out of {}. Loss: {:.4}'.format(i + 1, generations, step_loss))
# Check if we should decay the learning rate
if (i + 1) % lr_decay_every == 0:
sess.run(translate_model.learning_rate_decay_op)
# Save model
if (i + 1) % save_every == 0:
print('Saving model to {}.'.format(full_model_dir))
model_save_path = os.path.join(full_model_dir, "eng_ger_translation.ckpt")
translate_model.saver.save(sess, model_save_path, global_step=i)
# Eval on test set
if (i + 1) % eval_every == 0:
for ix, sentence in enumerate(test_data):
# Find which bucket sentence goes in
bucket_id = next(index for index, val in enumerate(x_maxs) if val >= len(sentence))
# Get RNN model outputs
encoder_inputs, decoder_inputs, target_weights = test_model.get_batch(
{bucket_id: [(sentence, [])]}, bucket_id)
# Get logits
_, test_loss, output_logits = test_model.step(sess, encoder_inputs, decoder_inputs,
target_weights, bucket_id, True)
ix_output = [int(np.argmax(logit, axis=1)) for logit in output_logits]
# If there is a 0 symbol in outputs end the output there.
ix_output = ix_output[0:[i for i, x in enumerate(ix_output + [0]) if x == 0][0]]
# Get german words from indices
test_german = [ger_ix2vocab[x] for x in ix_output]
print('English: {}'.format(test_english[ix]))
print('German: {}'.format(test_german))
########################################################################################################################
# Visualization
########################################################################################################################
# Plot train loss
loss_generations = [i for i in range(generations) if i % output_every == 0]
plt.plot(loss_generations, train_loss, 'k-')
plt.title('Sequence to Sequence Loss')
plt.xlabel('Generation')
plt.ylabel('Loss')
plt.show()
| [
1,
529,
276,
1112,
420,
29958,
27525,
29945,
29914,
29056,
29918,
15108,
2909,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
26221,
922,
3910,
304,
922,
3910,
3382,
1379,
13,
29937,
448,
2683,
2683,
807,
13,
29937,
29871,
2266,
591,
1510,
920,
304,
2334,
5665,
304,
5665,
4733,
29889,
13,
29937,
29871,
26321,
29892,
591,
674,
2048,
385,
4223,
304,
5332,
13962,
1904,
29889,
13,
29937,
13,
13,
5215,
12013,
13,
5215,
2897,
13,
5215,
1347,
13,
5215,
10876,
13,
3166,
16250,
1053,
315,
5336,
13,
3166,
14319,
1445,
1053,
796,
666,
2283,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
5215,
7274,
13,
5215,
26110,
408,
15886,
13,
13,
361,
15886,
17255,
3259,
1649,
29961,
29900,
29962,
529,
525,
29896,
2396,
13,
29871,
515,
26110,
29889,
9794,
29889,
29878,
15755,
29889,
21652,
1053,
19359,
29906,
11762,
29918,
4299,
13,
2870,
29901,
13,
29871,
396,
4733,
508,
367,
27387,
515,
18546,
29901,
2045,
597,
3292,
29889,
510,
29914,
29056,
29914,
9794,
29889,
5559,
13,
29871,
396,
1925,
278,
4733,
4516,
1090,
3017,
2740,
4303,
2224,
29889,
13,
29871,
1887,
29918,
19033,
353,
525,
7382,
29915,
13,
29871,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2997,
29918,
19033,
1125,
13,
1678,
396,
8450,
2601,
6315,
4691,
13,
1678,
515,
6315,
1053,
830,
1129,
13,
1678,
15886,
29918,
4299,
29918,
19033,
353,
525,
991,
597,
3292,
29889,
510,
29914,
29056,
29914,
9794,
29915,
13,
1678,
830,
1129,
29889,
16513,
29918,
3166,
29898,
13264,
29918,
4299,
29918,
19033,
29892,
1887,
29918,
19033,
29897,
13,
29871,
10876,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
525,
7382,
29914,
12631,
29879,
29914,
29878,
15755,
29914,
21652,
29914,
1495,
13,
29871,
1053,
19359,
29906,
11762,
29918,
4299,
408,
19359,
29906,
11762,
29918,
4299,
13,
13,
13,
29937,
8125,
12662,
2699,
13,
21891,
29918,
10492,
353,
29871,
29900,
29889,
29896,
13,
29212,
29918,
7099,
388,
29918,
10492,
353,
29871,
29900,
29889,
29929,
29929,
13,
29212,
29918,
7099,
388,
29918,
17991,
353,
29871,
29896,
29900,
29900,
13,
3317,
29918,
24970,
353,
29871,
29945,
29889,
29900,
13,
16175,
29918,
2311,
353,
29871,
29945,
29900,
13,
1949,
29918,
29277,
353,
29871,
29941,
13,
29878,
15755,
29918,
2311,
353,
29871,
29945,
29900,
29900,
13,
13148,
29918,
2311,
353,
29871,
29945,
29896,
29906,
13,
4738,
800,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
29894,
542,
370,
29918,
2311,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
7620,
29918,
17991,
353,
29871,
29896,
29900,
29900,
29900,
13,
14513,
29918,
17991,
353,
29871,
29945,
29900,
29900,
13,
4905,
29918,
17991,
353,
29871,
29945,
29900,
13,
29886,
18049,
353,
1347,
29889,
29886,
18049,
29884,
362,
13,
13,
29937,
3630,
12662,
2699,
13,
1272,
29918,
3972,
353,
525,
7382,
29915,
13,
1272,
29918,
1445,
353,
525,
996,
29918,
914,
29889,
3945,
29915,
13,
4299,
29918,
2084,
353,
525,
11762,
29906,
11762,
29918,
4299,
29915,
13,
8159,
29918,
4299,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
1904,
29918,
2084,
29897,
13,
13,
29937,
4321,
4103,
18411,
515,
4223,
313,
13609,
4878,
29892,
694,
6035,
312,
29897,
13,
1688,
29918,
996,
1674,
353,
6024,
12199,
988,
338,
590,
6601,
742,
13,
18884,
525,
1552,
4996,
17354,
1701,
29916,
12500,
287,
975,
278,
17366,
11203,
742,
13,
18884,
525,
275,
372,
2675,
304,
17251,
6454,
22396,
2033,
13,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
3630,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
13,
29937,
8561,
8125,
18862,
13,
361,
451,
2897,
29889,
2084,
29889,
9933,
29898,
8159,
29918,
4299,
29918,
3972,
1125,
13,
29871,
2897,
29889,
29885,
12535,
12935,
29898,
8159,
29918,
4299,
29918,
3972,
29897,
13,
13,
29937,
8561,
848,
3884,
13,
361,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1272,
29918,
3972,
1125,
13,
29871,
2897,
29889,
29885,
12535,
12935,
29898,
1272,
29918,
3972,
29897,
13,
13,
2158,
877,
23456,
4223,
29899,
29954,
3504,
3630,
1495,
13,
29937,
5399,
363,
848,
29892,
565,
372,
1838,
29915,
29873,
1863,
29892,
5142,
372,
322,
4078,
372,
13,
361,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
848,
29918,
1445,
22164,
13,
29871,
1596,
877,
1469,
451,
1476,
29892,
28536,
2201,
29899,
29954,
261,
25260,
515,
7821,
29889,
1171,
1541,
886,
29889,
990,
1495,
13,
29871,
10541,
29918,
2271,
353,
525,
1124,
597,
1636,
29889,
1171,
1541,
886,
29889,
990,
29914,
804,
29875,
29914,
311,
29884,
29899,
996,
29889,
7554,
29915,
13,
29871,
364,
353,
7274,
29889,
657,
29898,
18616,
663,
29918,
2271,
29897,
13,
29871,
503,
353,
796,
666,
2283,
29898,
601,
29889,
11207,
5971,
29898,
29878,
29889,
3051,
876,
13,
29871,
934,
353,
503,
29889,
949,
877,
311,
29884,
29889,
3945,
1495,
13,
29871,
396,
19191,
3630,
13,
29871,
3033,
29918,
914,
29918,
1272,
353,
934,
29889,
13808,
29898,
12523,
2433,
17281,
1495,
13,
29871,
3033,
29918,
914,
29918,
1272,
353,
3033,
29918,
914,
29918,
1272,
29889,
12508,
877,
294,
18869,
742,
4436,
2433,
17281,
1495,
13,
29871,
3033,
29918,
914,
29918,
1272,
353,
3033,
29918,
914,
29918,
1272,
29889,
13808,
2141,
5451,
28909,
29876,
1495,
13,
29871,
396,
14350,
304,
934,
13,
29871,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
848,
29918,
1445,
511,
525,
29893,
1495,
408,
714,
29918,
13082,
29901,
13,
1678,
363,
10541,
297,
3033,
29918,
914,
29918,
1272,
29901,
13,
418,
714,
29918,
13082,
29889,
3539,
29898,
18616,
663,
718,
11297,
29876,
1495,
13,
2870,
29901,
13,
29871,
3033,
29918,
914,
29918,
1272,
353,
5159,
13,
29871,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
848,
29918,
1445,
511,
525,
29878,
1495,
408,
297,
29918,
13082,
29901,
13,
1678,
363,
1948,
297,
297,
29918,
13082,
29901,
13,
418,
3033,
29918,
914,
29918,
1272,
29889,
4397,
29898,
798,
7503,
29899,
29896,
2314,
13,
2158,
877,
25632,
29991,
1495,
13,
13,
29937,
15154,
6035,
22999,
362,
13,
996,
29918,
914,
29918,
1272,
353,
6024,
4286,
7122,
29898,
3090,
363,
1373,
297,
2665,
565,
1373,
451,
297,
6035,
312,
29897,
363,
2665,
297,
3033,
29918,
914,
29918,
1272,
29962,
13,
29937,
26178,
1269,
10541,
491,
18859,
268,
13,
996,
29918,
914,
29918,
1272,
353,
518,
29916,
29889,
5451,
28909,
29873,
1495,
363,
921,
297,
3033,
29918,
914,
29918,
1272,
565,
7431,
29898,
29916,
29897,
6736,
29871,
29896,
29962,
13,
29961,
996,
1674,
29918,
18616,
663,
29892,
330,
3504,
29918,
18616,
663,
29962,
353,
518,
1761,
29898,
29916,
29897,
363,
921,
297,
14319,
10456,
996,
29918,
914,
29918,
1272,
4638,
13,
996,
1674,
29918,
18616,
663,
353,
518,
29916,
29889,
13609,
2141,
5451,
580,
363,
921,
297,
3033,
1674,
29918,
18616,
663,
29962,
13,
29887,
3504,
29918,
18616,
663,
353,
518,
29916,
29889,
13609,
2141,
5451,
580,
363,
921,
297,
330,
3504,
29918,
18616,
663,
29962,
13,
13,
2158,
877,
7032,
292,
278,
7931,
370,
1070,
583,
29889,
1495,
13,
29937,
10554,
278,
4223,
478,
542,
370,
352,
653,
13,
497,
29918,
996,
1674,
29918,
9303,
353,
518,
1742,
363,
10541,
297,
3033,
1674,
29918,
18616,
663,
363,
1734,
297,
10541,
29962,
13,
497,
29918,
996,
1674,
29918,
2798,
29879,
353,
315,
5336,
29898,
497,
29918,
996,
1674,
29918,
9303,
29897,
13,
996,
29918,
1742,
29918,
8149,
353,
518,
29916,
29961,
29900,
29962,
363,
921,
297,
599,
29918,
996,
1674,
29918,
2798,
29879,
29889,
3242,
29918,
9435,
29898,
29894,
542,
370,
29918,
2311,
448,
29871,
29896,
4638,
29871,
396,
448,
29896,
1363,
29871,
29900,
29922,
26690,
338,
884,
297,
727,
13,
996,
29918,
29894,
542,
370,
29906,
861,
353,
9657,
29898,
7554,
29898,
996,
29918,
1742,
29918,
8149,
29892,
3464,
29898,
29896,
29892,
7931,
370,
29918,
2311,
4961,
13,
996,
29918,
861,
29906,
29894,
542,
370,
353,
426,
791,
29901,
1820,
363,
1820,
29892,
659,
297,
3033,
29918,
29894,
542,
370,
29906,
861,
29889,
7076,
28296,
13,
996,
1674,
29918,
5014,
287,
353,
5159,
13,
1454,
2665,
297,
3033,
1674,
29918,
18616,
663,
29901,
13,
29871,
5694,
29918,
18616,
663,
353,
5159,
13,
29871,
363,
1734,
297,
2665,
29901,
13,
1678,
1018,
29901,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
996,
29918,
29894,
542,
370,
29906,
861,
29961,
1742,
2314,
13,
1678,
5174,
29901,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
29900,
29897,
13,
29871,
3033,
1674,
29918,
5014,
287,
29889,
4397,
29898,
7382,
29918,
18616,
663,
29897,
13,
13,
29937,
10554,
278,
5332,
478,
542,
370,
352,
653,
13,
497,
29918,
29887,
3504,
29918,
9303,
353,
518,
1742,
363,
10541,
297,
330,
3504,
29918,
18616,
663,
363,
1734,
297,
10541,
29962,
13,
497,
29918,
29887,
3504,
29918,
2798,
29879,
353,
315,
5336,
29898,
497,
29918,
29887,
3504,
29918,
9303,
29897,
13,
914,
29918,
1742,
29918,
8149,
353,
518,
29916,
29961,
29900,
29962,
363,
921,
297,
599,
29918,
29887,
3504,
29918,
2798,
29879,
29889,
3242,
29918,
9435,
29898,
29894,
542,
370,
29918,
2311,
448,
29871,
29896,
4638,
13,
914,
29918,
29894,
542,
370,
29906,
861,
353,
9657,
29898,
7554,
29898,
914,
29918,
1742,
29918,
8149,
29892,
3464,
29898,
29896,
29892,
7931,
370,
29918,
2311,
4961,
13,
914,
29918,
861,
29906,
29894,
542,
370,
353,
426,
791,
29901,
1820,
363,
1820,
29892,
659,
297,
9814,
29918,
29894,
542,
370,
29906,
861,
29889,
7076,
28296,
13,
29887,
3504,
29918,
5014,
287,
353,
5159,
13,
1454,
2665,
297,
330,
3504,
29918,
18616,
663,
29901,
13,
29871,
5694,
29918,
18616,
663,
353,
5159,
13,
29871,
363,
1734,
297,
2665,
29901,
13,
1678,
1018,
29901,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
914,
29918,
29894,
542,
370,
29906,
861,
29961,
1742,
2314,
13,
1678,
5174,
29901,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
29900,
29897,
13,
29871,
330,
3504,
29918,
5014,
287,
29889,
4397,
29898,
7382,
29918,
18616,
663,
29897,
13,
13,
29937,
10554,
278,
1243,
3033,
1674,
25260,
29892,
671,
525,
29900,
29915,
565,
1734,
451,
297,
1749,
7931,
370,
13,
1688,
29918,
1272,
353,
5159,
13,
1454,
10541,
297,
1243,
29918,
996,
1674,
29901,
13,
29871,
5694,
29918,
18616,
663,
353,
5159,
13,
29871,
363,
1734,
297,
10541,
29889,
5451,
877,
525,
1125,
13,
1678,
1018,
29901,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
996,
29918,
29894,
542,
370,
29906,
861,
29961,
1742,
2314,
13,
1678,
5174,
29901,
13,
418,
396,
4803,
525,
29900,
29915,
565,
278,
1734,
3508,
29915,
29873,
297,
1749,
7931,
370,
352,
653,
13,
418,
5694,
29918,
18616,
663,
29889,
4397,
29898,
29900,
29897,
13,
29871,
1243,
29918,
1272,
29889,
4397,
29898,
7382,
29918,
18616,
663,
29897,
13,
13,
29937,
22402,
16281,
1691,
363,
5665,
27497,
13,
29937,
1334,
674,
6219,
848,
964,
278,
6590,
1321,
9737,
29901,
13,
29937,
313,
29916,
29896,
29892,
343,
29896,
511,
313,
29916,
29906,
29892,
343,
29906,
511,
2023,
13,
29937,
6804,
599,
9976,
297,
20968,
29871,
29896,
29901,
7431,
29898,
29916,
29897,
29966,
29916,
29896,
322,
7431,
29898,
29891,
29897,
29966,
29891,
29896,
322,
577,
373,
29889,
13,
29916,
29918,
3317,
29879,
353,
518,
29945,
29892,
29871,
29955,
29892,
29871,
29896,
29896,
29892,
29871,
29945,
29900,
29962,
13,
29891,
29918,
3317,
29879,
353,
518,
29896,
29900,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29955,
29892,
29871,
29953,
29900,
29962,
13,
2423,
9737,
353,
518,
29916,
363,
921,
297,
14319,
29898,
29916,
29918,
3317,
29879,
29892,
343,
29918,
3317,
29879,
4638,
13,
21454,
287,
29918,
1272,
353,
518,
2636,
363,
903,
297,
3464,
29898,
2435,
29898,
29916,
29918,
3317,
29879,
28166,
13,
1454,
3033,
29892,
9814,
297,
14319,
29898,
996,
1674,
29918,
5014,
287,
29892,
330,
3504,
29918,
5014,
287,
1125,
13,
29871,
363,
474,
29916,
29892,
313,
29916,
29918,
3317,
29892,
343,
29918,
3317,
29897,
297,
26985,
29898,
7554,
29898,
29916,
29918,
3317,
29879,
29892,
343,
29918,
3317,
29879,
22164,
13,
1678,
565,
313,
2435,
29898,
996,
29897,
5277,
921,
29918,
3317,
29897,
322,
313,
2435,
29898,
914,
29897,
5277,
343,
29918,
3317,
1125,
13,
418,
20968,
287,
29918,
1272,
29961,
861,
1822,
4397,
4197,
996,
29892,
9814,
2314,
13,
418,
2867,
13,
13,
29937,
13905,
19138,
583,
310,
1321,
9737,
13,
14968,
29918,
21454,
29918,
29879,
7093,
353,
518,
2435,
29898,
21454,
287,
29918,
1272,
29961,
29890,
2314,
363,
289,
297,
3464,
29898,
2435,
29898,
2423,
9737,
28166,
13,
14968,
29918,
7827,
29918,
2311,
353,
5785,
29898,
2083,
29898,
14968,
29918,
21454,
29918,
29879,
7093,
876,
13,
1454,
474,
29916,
29892,
20968,
297,
26985,
29898,
21454,
287,
29918,
1272,
1125,
13,
29871,
1596,
877,
1469,
282,
1372,
297,
20968,
426,
6177,
6571,
4286,
4830,
29898,
861,
29892,
7431,
29898,
21454,
4961,
13,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
6204,
5665,
304,
5665,
1904,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
13,
2158,
877,
9832,
1218,
4103,
18411,
8125,
1495,
13,
13,
29937,
2045,
597,
2417,
29889,
510,
29914,
2619,
29914,
29946,
29946,
29947,
29945,
29945,
29953,
29900,
29941,
29914,
1853,
2704,
29899,
29883,
424,
29899,
23945,
280,
29899,
7097,
29899,
908,
29899,
12650,
29899,
262,
29899,
11762,
29906,
11762,
29914,
29946,
29955,
29929,
29945,
29906,
29929,
29896,
29941,
29937,
29946,
29955,
29929,
29945,
29906,
29929,
29896,
29941,
13,
842,
5552,
29898,
13264,
29889,
21570,
29889,
29878,
15755,
29889,
14345,
29965,
4617,
29892,
525,
1649,
24535,
8552,
1649,
742,
14013,
1583,
29892,
903,
29901,
1583,
29897,
13,
842,
5552,
29898,
13264,
29889,
21570,
29889,
29878,
15755,
29889,
16616,
29931,
1254,
29924,
4617,
29892,
525,
1649,
24535,
8552,
1649,
742,
14013,
1583,
29892,
903,
29901,
1583,
29897,
13,
842,
5552,
29898,
13264,
29889,
21570,
29889,
29878,
15755,
29889,
15329,
29934,
10262,
4617,
29892,
525,
1649,
24535,
8552,
1649,
742,
14013,
1583,
29892,
903,
29901,
1583,
29897,
13,
13,
1753,
13962,
29918,
4299,
29898,
2080,
29918,
29894,
542,
370,
29918,
2311,
29892,
1962,
29918,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
418,
1321,
9737,
29892,
364,
15755,
29918,
2311,
29892,
954,
29918,
29277,
29892,
4236,
29918,
24970,
29892,
13,
462,
418,
6509,
29918,
10492,
29892,
301,
29878,
29918,
7099,
388,
29918,
10492,
29892,
6375,
29918,
6194,
1125,
13,
29871,
1904,
353,
19359,
29906,
11762,
29918,
4299,
29889,
23718,
29906,
23718,
3195,
29898,
4993,
29918,
29894,
542,
370,
29918,
2311,
29922,
2080,
29918,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
268,
3646,
29918,
29894,
542,
370,
29918,
2311,
29922,
4905,
29918,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
268,
1321,
9737,
29922,
2423,
9737,
29892,
13,
462,
462,
268,
2159,
29922,
29878,
15755,
29918,
2311,
29892,
1949,
29918,
29277,
29922,
1949,
29918,
29277,
29892,
13,
462,
462,
268,
4236,
29918,
24970,
29918,
12324,
29922,
3317,
29918,
24970,
29892,
13,
462,
462,
268,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
13,
462,
462,
268,
6509,
29918,
10492,
29922,
21891,
29918,
10492,
29892,
13,
462,
462,
268,
6509,
29918,
10492,
29918,
7099,
388,
29918,
19790,
29922,
29212,
29918,
7099,
388,
29918,
10492,
29892,
13,
462,
462,
268,
6375,
29918,
6194,
29922,
11333,
29918,
6194,
29892,
13,
462,
462,
268,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29897,
13,
29871,
736,
1904,
13,
13,
21652,
29918,
4299,
353,
13962,
29918,
4299,
29898,
2080,
29918,
29894,
542,
370,
29918,
2311,
29922,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
1678,
1962,
29918,
29894,
542,
370,
29918,
2311,
29922,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
1678,
1321,
9737,
29922,
2423,
9737,
29892,
13,
462,
462,
1678,
364,
15755,
29918,
2311,
29922,
29878,
15755,
29918,
2311,
29892,
13,
462,
462,
1678,
954,
29918,
29277,
29922,
1949,
29918,
29277,
29892,
13,
462,
462,
1678,
4236,
29918,
24970,
29922,
3317,
29918,
24970,
29892,
13,
462,
462,
1678,
6509,
29918,
10492,
29922,
21891,
29918,
10492,
29892,
13,
462,
462,
1678,
301,
29878,
29918,
7099,
388,
29918,
10492,
29922,
29212,
29918,
7099,
388,
29918,
10492,
29892,
13,
462,
462,
1678,
6375,
29918,
6194,
29922,
8824,
29897,
13,
13,
29937,
24948,
323,
6073,
17907,
304,
24270,
278,
3651,
363,
278,
1243,
1904,
13,
2541,
15886,
29889,
11918,
29918,
6078,
29898,
13264,
29889,
657,
29918,
11918,
29918,
6078,
3285,
24270,
29922,
5574,
1125,
13,
29871,
396,
830,
1509,
278,
3651,
363,
278,
1243,
1904,
13,
29871,
1243,
29918,
4299,
353,
13962,
29918,
4299,
29898,
2080,
29918,
29894,
542,
370,
29918,
2311,
29922,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
1962,
29918,
29894,
542,
370,
29918,
2311,
29922,
29894,
542,
370,
29918,
2311,
29892,
13,
462,
462,
1321,
9737,
29922,
2423,
9737,
29892,
13,
462,
462,
364,
15755,
29918,
2311,
29922,
29878,
15755,
29918,
2311,
29892,
13,
462,
462,
954,
29918,
29277,
29922,
1949,
29918,
29277,
29892,
13,
462,
462,
4236,
29918,
24970,
29922,
3317,
29918,
24970,
29892,
13,
462,
462,
6509,
29918,
10492,
29922,
21891,
29918,
10492,
29892,
13,
462,
462,
301,
29878,
29918,
7099,
388,
29918,
10492,
29922,
29212,
29918,
7099,
388,
29918,
10492,
29892,
13,
462,
462,
6375,
29918,
6194,
29922,
5574,
29897,
13,
29871,
1243,
29918,
4299,
29889,
16175,
29918,
2311,
353,
29871,
29896,
13,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
26101,
4867,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
13,
2541,
15886,
29889,
7317,
580,
408,
27937,
29901,
13,
29871,
27937,
29889,
3389,
29898,
13264,
29889,
10945,
29918,
20897,
29918,
11228,
3950,
3101,
13,
13,
29871,
7945,
29918,
6758,
353,
5159,
13,
29871,
363,
474,
297,
3464,
29898,
4738,
800,
1125,
13,
1678,
20088,
29918,
21454,
29918,
861,
353,
7442,
29889,
8172,
29889,
16957,
29898,
2435,
29898,
21454,
287,
29918,
1272,
876,
13,
13,
1678,
1904,
29918,
4905,
29879,
353,
14240,
29918,
4299,
29889,
657,
29918,
16175,
29898,
21454,
287,
29918,
1272,
29892,
20088,
29918,
21454,
29918,
861,
29897,
13,
1678,
2094,
6119,
29918,
2080,
29879,
29892,
1602,
6119,
29918,
2080,
29879,
29892,
3646,
29918,
705,
5861,
353,
1904,
29918,
4905,
29879,
13,
13,
1678,
396,
3617,
278,
313,
24970,
6056,
29892,
6410,
29892,
322,
14391,
29897,
13,
1678,
17117,
4331,
29918,
6758,
29892,
903,
353,
14240,
29918,
4299,
29889,
10568,
29898,
29879,
404,
29892,
2094,
6119,
29918,
2080,
29879,
29892,
1602,
6119,
29918,
2080,
29879,
29892,
13,
462,
462,
965,
3646,
29918,
705,
5861,
29892,
20088,
29918,
21454,
29918,
861,
29892,
7700,
29897,
13,
13,
1678,
396,
10604,
4660,
13,
1678,
565,
313,
29875,
718,
29871,
29896,
29897,
1273,
1962,
29918,
17991,
1275,
29871,
29900,
29901,
13,
418,
7945,
29918,
6758,
29889,
4397,
29898,
10568,
29918,
6758,
29897,
13,
418,
1596,
877,
15462,
396,
8875,
714,
310,
426,
1836,
365,
2209,
29901,
12365,
29889,
29946,
29913,
4286,
4830,
29898,
29875,
718,
29871,
29896,
29892,
1176,
800,
29892,
4331,
29918,
6758,
876,
13,
13,
1678,
396,
5399,
565,
591,
881,
20228,
278,
6509,
6554,
13,
1678,
565,
313,
29875,
718,
29871,
29896,
29897,
1273,
301,
29878,
29918,
7099,
388,
29918,
17991,
1275,
29871,
29900,
29901,
13,
418,
27937,
29889,
3389,
29898,
21652,
29918,
4299,
29889,
21891,
29918,
10492,
29918,
7099,
388,
29918,
459,
29897,
13,
13,
1678,
396,
16913,
1904,
13,
1678,
565,
313,
29875,
718,
29871,
29896,
29897,
1273,
4078,
29918,
17991,
1275,
29871,
29900,
29901,
13,
418,
1596,
877,
29903,
5555,
1904,
304,
426,
1836,
4286,
4830,
29898,
8159,
29918,
4299,
29918,
3972,
876,
13,
418,
1904,
29918,
7620,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
8159,
29918,
4299,
29918,
3972,
29892,
376,
996,
29918,
914,
29918,
3286,
18411,
29889,
384,
415,
1159,
13,
418,
14240,
29918,
4299,
29889,
4977,
369,
29889,
7620,
29898,
29879,
404,
29892,
1904,
29918,
7620,
29918,
2084,
29892,
5534,
29918,
10568,
29922,
29875,
29897,
13,
13,
1678,
396,
382,
791,
373,
1243,
731,
13,
1678,
565,
313,
29875,
718,
29871,
29896,
29897,
1273,
19745,
29918,
17991,
1275,
29871,
29900,
29901,
13,
418,
363,
474,
29916,
29892,
10541,
297,
26985,
29898,
1688,
29918,
1272,
1125,
13,
4706,
396,
10987,
607,
20968,
10541,
5771,
297,
13,
4706,
20968,
29918,
333,
353,
2446,
29898,
2248,
363,
2380,
29892,
659,
297,
26985,
29898,
29916,
29918,
3317,
29879,
29897,
565,
659,
6736,
7431,
29898,
18616,
663,
876,
13,
4706,
396,
3617,
390,
10262,
1904,
14391,
13,
4706,
2094,
6119,
29918,
2080,
29879,
29892,
1602,
6119,
29918,
2080,
29879,
29892,
3646,
29918,
705,
5861,
353,
1243,
29918,
4299,
29889,
657,
29918,
16175,
29898,
13,
3986,
426,
21454,
29918,
333,
29901,
17288,
18616,
663,
29892,
518,
2314,
29962,
1118,
20968,
29918,
333,
29897,
13,
4706,
396,
3617,
1480,
1169,
13,
4706,
17117,
1243,
29918,
6758,
29892,
1962,
29918,
1188,
1169,
353,
1243,
29918,
4299,
29889,
10568,
29898,
29879,
404,
29892,
2094,
6119,
29918,
2080,
29879,
29892,
1602,
6119,
29918,
2080,
29879,
29892,
13,
462,
462,
462,
418,
3646,
29918,
705,
5861,
29892,
20968,
29918,
333,
29892,
5852,
29897,
13,
4706,
474,
29916,
29918,
4905,
353,
518,
524,
29898,
9302,
29889,
1191,
3317,
29898,
1188,
277,
29892,
9685,
29922,
29896,
876,
363,
1480,
277,
297,
1962,
29918,
1188,
1169,
29962,
13,
4706,
396,
960,
727,
338,
263,
29871,
29900,
5829,
297,
14391,
1095,
278,
1962,
727,
29889,
13,
4706,
474,
29916,
29918,
4905,
353,
474,
29916,
29918,
4905,
29961,
29900,
10834,
29875,
363,
474,
29892,
921,
297,
26985,
29898,
861,
29918,
4905,
718,
518,
29900,
2314,
565,
921,
1275,
29871,
29900,
3816,
29900,
5262,
13,
4706,
396,
3617,
330,
3504,
3838,
515,
16285,
13,
4706,
1243,
29918,
29887,
3504,
353,
518,
914,
29918,
861,
29906,
29894,
542,
370,
29961,
29916,
29962,
363,
921,
297,
474,
29916,
29918,
4905,
29962,
13,
4706,
1596,
877,
24636,
29901,
6571,
4286,
4830,
29898,
1688,
29918,
996,
1674,
29961,
861,
12622,
13,
4706,
1596,
877,
29954,
3504,
29901,
6571,
4286,
4830,
29898,
1688,
29918,
29887,
3504,
876,
13,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
9249,
2133,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
13,
29937,
18399,
7945,
6410,
13,
6758,
29918,
4738,
800,
353,
518,
29875,
363,
474,
297,
3464,
29898,
4738,
800,
29897,
565,
474,
1273,
1962,
29918,
17991,
1275,
29871,
29900,
29962,
13,
572,
29873,
29889,
5317,
29898,
6758,
29918,
4738,
800,
29892,
7945,
29918,
6758,
29892,
525,
29895,
29899,
1495,
13,
572,
29873,
29889,
3257,
877,
20529,
304,
922,
3910,
365,
2209,
1495,
13,
572,
29873,
29889,
29916,
1643,
877,
5631,
362,
1495,
13,
572,
29873,
29889,
29891,
1643,
877,
29931,
2209,
1495,
13,
572,
29873,
29889,
4294,
580,
13,
2
] |
start_client.py | xi102/bert_ner | 0 | 97041 | <gh_stars>0
import time
from tqdm import tqdm
print('start')
try:
from bert_base.client import BertClient
except ImportError:
raise ImportError('BertClient module is not available, it is required for serving HTTP requests.'
'Please use "pip install -U bert-serving-client" to install it.'
'If you do not want to use it as an HTTP server, '
'then remove "-http_port" from the command line.')
# 指定服务器的IP 127.0.0.1:49164 5555
# BertClient(ip='xxx', ner_model_dir='D:\Projects\Wunianyue\BERT-BiLSTM-CRF-NER\output', show_server_config=False, check_version=False, check_length=False, mode='NER')
with BertClient(mode='NER') as bc:
start_t = time.perf_counter()
# text = text.replace(' ', '-') data句子间不能有空格。
df_path = r'data/add_data/yizhu_301_1000.txt' # data数据最后一行要为空
df = open(df_path, 'r+', encoding='utf-8')
list = []
l=[] # 要把每个字用空格分隔,放入训练?
for line in df:
if line!='\n':
l.append(' '.join(line))
list.append(line[:len(line) - 1])
print(len(list))
print('start')
rst = bc.encode(l) # 测试同时输入两个句子,多个输入同理
k = 0
with open("annotationdata/301_1000_BIO.txt", "w", encoding='utf-8') as f:
for index in tqdm(range(0,len(rst))):
try:
f.writelines(" ".join(rst[index]))
except:
k = k+1
pass
with open("annotationdata/bert_301_1000.txt", "w", encoding='utf-8') as f:
m = 0
j = 0
count = 0
for index in tqdm(range(0, len(list))):
if(len(list[index])!=len(rst[index])):
print("error in " + str(index))
count = count + 1
try:
for i in range(0, len(list[index])):
f.writelines(list[index][i] + ' ' + rst[index][i] + '\n')
f.writelines('\n')
m = m +1
except:
j = j + 1
pass
print(k)
print(j)
print(m)
print(count)
print(time.perf_counter() - start_t)
# 2.5W
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
931,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
2158,
877,
2962,
1495,
13,
2202,
29901,
13,
1678,
515,
289,
814,
29918,
3188,
29889,
4645,
1053,
16662,
4032,
13,
19499,
16032,
2392,
29901,
13,
1678,
12020,
16032,
2392,
877,
29933,
814,
4032,
3883,
338,
451,
3625,
29892,
372,
338,
3734,
363,
16330,
7331,
7274,
6169,
13,
462,
418,
525,
12148,
671,
376,
13096,
2601,
448,
29965,
289,
814,
29899,
643,
1747,
29899,
4645,
29908,
304,
2601,
372,
6169,
13,
462,
418,
525,
3644,
366,
437,
451,
864,
304,
671,
372,
408,
385,
7331,
1923,
29892,
525,
13,
462,
418,
525,
6098,
3349,
11663,
1124,
29918,
637,
29908,
515,
278,
1899,
1196,
29889,
1495,
13,
13,
29937,
29871,
31084,
30495,
31520,
31358,
30943,
30210,
5690,
29871,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29901,
29946,
29929,
29896,
29953,
29946,
29871,
29945,
29945,
29945,
29945,
13,
29937,
16662,
4032,
29898,
666,
2433,
12353,
742,
26033,
29918,
4299,
29918,
3972,
2433,
29928,
3583,
25119,
29905,
29956,
348,
713,
29891,
434,
29905,
13635,
29911,
29899,
20517,
29931,
1254,
29924,
29899,
11341,
29943,
29899,
13865,
29905,
4905,
742,
1510,
29918,
2974,
29918,
2917,
29922,
8824,
29892,
1423,
29918,
3259,
29922,
8824,
29892,
1423,
29918,
2848,
29922,
8824,
29892,
4464,
2433,
13865,
1495,
13,
2541,
16662,
4032,
29898,
8513,
2433,
13865,
1495,
408,
289,
29883,
29901,
13,
1678,
1369,
29918,
29873,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
13,
1678,
396,
1426,
353,
1426,
29889,
6506,
877,
13420,
17411,
1495,
848,
232,
146,
168,
30319,
31016,
30413,
30815,
30417,
30816,
31168,
30267,
13,
1678,
4489,
29918,
2084,
353,
364,
29915,
1272,
29914,
1202,
29918,
1272,
29914,
29891,
466,
6905,
29918,
29941,
29900,
29896,
29918,
29896,
29900,
29900,
29900,
29889,
3945,
29915,
29871,
396,
848,
30354,
30763,
30878,
30822,
30287,
30448,
30698,
30573,
30816,
13,
1678,
4489,
353,
1722,
29898,
2176,
29918,
2084,
29892,
525,
29878,
29974,
742,
8025,
2433,
9420,
29899,
29947,
1495,
13,
1678,
1051,
353,
5159,
13,
1678,
301,
29922,
2636,
396,
29871,
30698,
233,
141,
141,
31951,
30502,
30578,
30406,
30816,
31168,
30748,
236,
157,
151,
30214,
31182,
30752,
235,
177,
176,
234,
190,
134,
29973,
13,
1678,
363,
1196,
297,
4489,
29901,
13,
4706,
565,
1196,
29991,
2433,
29905,
29876,
2396,
13,
9651,
301,
29889,
4397,
877,
15300,
7122,
29898,
1220,
876,
13,
9651,
1051,
29889,
4397,
29898,
1220,
7503,
2435,
29898,
1220,
29897,
448,
29871,
29896,
2314,
13,
1678,
1596,
29898,
2435,
29898,
1761,
876,
13,
13,
1678,
1596,
877,
2962,
1495,
13,
1678,
364,
303,
353,
289,
29883,
29889,
12508,
29898,
29880,
29897,
29871,
396,
29871,
31851,
31787,
30980,
30594,
31573,
30752,
31977,
30502,
232,
146,
168,
30319,
30214,
30923,
30502,
31573,
30752,
30980,
30687,
13,
1678,
413,
353,
29871,
29900,
13,
1678,
411,
1722,
703,
18317,
1272,
29914,
29941,
29900,
29896,
29918,
29896,
29900,
29900,
29900,
29918,
29933,
5971,
29889,
3945,
613,
376,
29893,
613,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
4706,
363,
2380,
297,
260,
29939,
18933,
29898,
3881,
29898,
29900,
29892,
2435,
29898,
29878,
303,
876,
1125,
13,
9651,
1018,
29901,
13,
18884,
285,
29889,
8231,
24210,
703,
11393,
7122,
29898,
29878,
303,
29961,
2248,
12622,
13,
9651,
5174,
29901,
13,
18884,
413,
353,
413,
29974,
29896,
13,
18884,
1209,
13,
13,
1678,
411,
1722,
703,
18317,
1272,
29914,
2151,
29918,
29941,
29900,
29896,
29918,
29896,
29900,
29900,
29900,
29889,
3945,
613,
376,
29893,
613,
8025,
2433,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
4706,
286,
353,
29871,
29900,
13,
4706,
432,
353,
29871,
29900,
13,
4706,
2302,
353,
29871,
29900,
13,
4706,
363,
2380,
297,
260,
29939,
18933,
29898,
3881,
29898,
29900,
29892,
7431,
29898,
1761,
876,
1125,
13,
9651,
565,
29898,
2435,
29898,
1761,
29961,
2248,
2314,
19216,
2435,
29898,
29878,
303,
29961,
2248,
12622,
29901,
13,
462,
1678,
1596,
703,
2704,
297,
376,
718,
851,
29898,
2248,
876,
13,
462,
1678,
2302,
353,
2302,
718,
29871,
29896,
13,
9651,
1018,
29901,
13,
18884,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
1761,
29961,
2248,
12622,
29901,
13,
462,
1678,
285,
29889,
8231,
24210,
29898,
1761,
29961,
2248,
3816,
29875,
29962,
718,
525,
525,
718,
364,
303,
29961,
2248,
3816,
29875,
29962,
718,
11297,
29876,
1495,
13,
18884,
285,
29889,
8231,
24210,
28909,
29876,
1495,
13,
18884,
286,
353,
286,
718,
29896,
13,
9651,
5174,
29901,
13,
18884,
432,
353,
432,
718,
29871,
29896,
13,
18884,
1209,
13,
1678,
1596,
29898,
29895,
29897,
13,
1678,
1596,
29898,
29926,
29897,
13,
1678,
1596,
29898,
29885,
29897,
13,
1678,
1596,
29898,
2798,
29897,
13,
1678,
1596,
29898,
2230,
29889,
546,
29888,
29918,
11808,
580,
448,
1369,
29918,
29873,
29897,
13,
29937,
418,
29906,
29889,
29945,
29956,
13,
2
] |
src/data/dictionary.py | klimzaporojets/e2e-knowledge-ie | 5 | 122314 | <reponame>klimzaporojets/e2e-knowledge-ie
import json
def load_dictionary(config, path):
type = config['type']
filename = config['filename']
filename = filename if filename.startswith("/") else "{}/{}".format(path, filename)
if type == 'json':
dictionary = Dictionary()
dictionary.load_json(filename)
else:
raise BaseException("no such type", type)
return dictionary
def create_dictionaries(config, training):
path = config['path']
print("Loading dictionaries (training={})".format(training))
if 'dictionaries' in config:
dictionaries = {}
for name, dict_config in config['dictionaries'].items():
if training:
if "init" in dict_config:
dictionary = load_dictionary(dict_config['init'], path)
# print('init {}: size={}'.format(name, dictionary.size))
else:
# print("init {} (blank)".format(name))
dictionary = Dictionary()
else:
dictionary = load_dictionary(dict_config, path)
print('load {}: size={}'.format(name, dictionary.size))
dictionary.prefix = dict_config['prefix'] if 'prefix' in dict_config else ''
if 'rewriter' in dict_config:
if dict_config['rewriter'] == 'lowercase':
dictionary.rewriter = lambda t: t.lower()
elif dict_config['rewriter'] == 'none':
print("rewriter: none")
else:
raise BaseException("no such rewriter", dict_config['rewriter'])
if 'append' in dict_config:
for x in dict_config['append']:
idx = dictionary.add(x)
print(" add token", x, "->", idx)
if 'unknown' in dict_config:
dictionary.set_unknown_token(dict_config['unknown'])
if 'debug' in dict_config:
dictionary.debug = dict_config['debug']
if 'update' in dict_config:
dictionary.update = dict_config['update']
if not training:
dictionary.update = False
dictionaries[name] = dictionary
return dictionaries
else:
print("WARNING: using wikipedia dictionary")
words = Dictionary()
entities = Dictionary()
words.set_unknown_token("UNKNOWN")
words.load_spirit_dictionary('data/tokens.dict', 5)
entities.set_unknown_token("UNKNOWN")
entities.load_spirit_dictionary('data/entities.dict', 5)
return {
'words': words,
'entities': entities
}
class Dictionary:
def __init__(self):
self.rewriter = lambda t: t
self.debug = False
self.token_unknown = -1
self.update = True
self.prefix = ''
self.tmp_unknown = None
self.clear()
def clear(self):
self.word2idx = {}
self.matrix = False
self.size = 0
self.out_of_voc = 0
self.oov = set()
if self.tmp_unknown is not None:
self.token_unknown = self.lookup(self.tmp_unknown)
def load_json(self, filename):
with open(filename) as file:
data = json.load(file)
if isinstance(data, (list,)):
for idx, word in enumerate(data):
if self.lookup(word) != idx:
print("WARNING: invalid dictionary")
else:
for word, idx in data.items():
if self.lookup(word) != idx:
print("WARNING: invalid dictionary")
def lookup(self, token):
token = self.prefix + self.rewriter(token)
if not token in self.word2idx:
if self.update:
self.word2idx[token] = self.size
self.size += 1
else:
if self.debug:
print("oov: '{}' -> {}".format(token, self.token_unknown))
self.out_of_voc += 1
return self.token_unknown
return self.word2idx[token]
def add(self, token):
if not token in self.word2idx:
self.word2idx[token] = self.size
self.size += 1
return self.word2idx[token]
def set_unknown_token(self, unknown_token):
self.tmp_unknown = unknown_token
self.token_unknown = self.word2idx[self.prefix + unknown_token]
print(self.get(self.token_unknown), "->", self.token_unknown)
def write(self, filename):
import json
with open(filename, 'w') as file:
json.dump(self.word2idx, file)
def get(self, index):
for word, idx in self.word2idx.items():
if idx == index:
return word
return None
def tolist(self):
list = [None] * self.size
for word, idx in self.word2idx.items():
list[idx] = word
return list
| [
1,
529,
276,
1112,
420,
29958,
29895,
2576,
29920,
26191,
3848,
1691,
29914,
29872,
29906,
29872,
29899,
28385,
5485,
29899,
347,
13,
5215,
4390,
13,
13,
13,
1753,
2254,
29918,
27126,
29898,
2917,
29892,
2224,
1125,
13,
1678,
1134,
353,
2295,
1839,
1853,
2033,
13,
1678,
10422,
353,
2295,
1839,
9507,
2033,
13,
1678,
10422,
353,
10422,
565,
10422,
29889,
27382,
2541,
11974,
1159,
1683,
29850,
6822,
8875,
1642,
4830,
29898,
2084,
29892,
10422,
29897,
13,
13,
1678,
565,
1134,
1275,
525,
3126,
2396,
13,
4706,
8600,
353,
13343,
580,
13,
4706,
8600,
29889,
1359,
29918,
3126,
29898,
9507,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
7399,
2451,
703,
1217,
1316,
1134,
613,
1134,
29897,
13,
13,
1678,
736,
8600,
13,
13,
13,
1753,
1653,
29918,
29467,
4314,
29898,
2917,
29892,
6694,
1125,
13,
1678,
2224,
353,
2295,
1839,
2084,
2033,
13,
13,
1678,
1596,
703,
23456,
21503,
4314,
313,
26495,
3790,
1800,
1642,
4830,
29898,
26495,
876,
13,
13,
1678,
565,
525,
29467,
4314,
29915,
297,
2295,
29901,
13,
4706,
21503,
4314,
353,
6571,
13,
4706,
363,
1024,
29892,
9657,
29918,
2917,
297,
2295,
1839,
29467,
4314,
13359,
7076,
7295,
13,
9651,
565,
6694,
29901,
13,
18884,
565,
376,
2344,
29908,
297,
9657,
29918,
2917,
29901,
13,
462,
1678,
8600,
353,
2254,
29918,
27126,
29898,
8977,
29918,
2917,
1839,
2344,
7464,
2224,
29897,
13,
462,
1678,
396,
1596,
877,
2344,
426,
6177,
2159,
3790,
29913,
4286,
4830,
29898,
978,
29892,
8600,
29889,
2311,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
1596,
703,
2344,
6571,
313,
19465,
29897,
1642,
4830,
29898,
978,
876,
13,
462,
1678,
8600,
353,
13343,
580,
13,
9651,
1683,
29901,
13,
18884,
8600,
353,
2254,
29918,
27126,
29898,
8977,
29918,
2917,
29892,
2224,
29897,
13,
18884,
1596,
877,
1359,
426,
6177,
2159,
3790,
29913,
4286,
4830,
29898,
978,
29892,
8600,
29889,
2311,
876,
13,
13,
9651,
8600,
29889,
13506,
353,
9657,
29918,
2917,
1839,
13506,
2033,
565,
525,
13506,
29915,
297,
9657,
29918,
2917,
1683,
6629,
13,
13,
9651,
565,
525,
3973,
5385,
29915,
297,
9657,
29918,
2917,
29901,
13,
18884,
565,
9657,
29918,
2917,
1839,
3973,
5385,
2033,
1275,
525,
13609,
4878,
2396,
13,
462,
1678,
8600,
29889,
3973,
5385,
353,
14013,
260,
29901,
260,
29889,
13609,
580,
13,
18884,
25342,
9657,
29918,
2917,
1839,
3973,
5385,
2033,
1275,
525,
9290,
2396,
13,
462,
1678,
1596,
703,
3973,
5385,
29901,
5642,
1159,
13,
18884,
1683,
29901,
13,
462,
1678,
12020,
7399,
2451,
703,
1217,
1316,
337,
13236,
613,
9657,
29918,
2917,
1839,
3973,
5385,
11287,
13,
13,
9651,
565,
525,
4397,
29915,
297,
9657,
29918,
2917,
29901,
13,
18884,
363,
921,
297,
9657,
29918,
2917,
1839,
4397,
2033,
29901,
13,
462,
1678,
22645,
353,
8600,
29889,
1202,
29898,
29916,
29897,
13,
462,
1678,
1596,
703,
259,
788,
5993,
613,
921,
29892,
376,
976,
613,
22645,
29897,
13,
13,
9651,
565,
525,
26690,
29915,
297,
9657,
29918,
2917,
29901,
13,
18884,
8600,
29889,
842,
29918,
26690,
29918,
6979,
29898,
8977,
29918,
2917,
1839,
26690,
11287,
13,
13,
9651,
565,
525,
8382,
29915,
297,
9657,
29918,
2917,
29901,
13,
18884,
8600,
29889,
8382,
353,
9657,
29918,
2917,
1839,
8382,
2033,
13,
13,
9651,
565,
525,
5504,
29915,
297,
9657,
29918,
2917,
29901,
13,
18884,
8600,
29889,
5504,
353,
9657,
29918,
2917,
1839,
5504,
2033,
13,
13,
9651,
565,
451,
6694,
29901,
13,
18884,
8600,
29889,
5504,
353,
7700,
13,
13,
9651,
21503,
4314,
29961,
978,
29962,
353,
8600,
13,
13,
4706,
736,
21503,
4314,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
29956,
25614,
29901,
773,
281,
638,
4652,
8600,
1159,
13,
4706,
3838,
353,
13343,
580,
13,
4706,
16212,
353,
13343,
580,
13,
13,
4706,
3838,
29889,
842,
29918,
26690,
29918,
6979,
703,
3904,
29968,
6632,
16048,
1159,
13,
4706,
3838,
29889,
1359,
29918,
1028,
14987,
29918,
27126,
877,
1272,
29914,
517,
12360,
29889,
8977,
742,
29871,
29945,
29897,
13,
4706,
16212,
29889,
842,
29918,
26690,
29918,
6979,
703,
3904,
29968,
6632,
16048,
1159,
13,
4706,
16212,
29889,
1359,
29918,
1028,
14987,
29918,
27126,
877,
1272,
29914,
296,
1907,
29889,
8977,
742,
29871,
29945,
29897,
13,
4706,
736,
426,
13,
9651,
525,
9303,
2396,
3838,
29892,
13,
9651,
525,
296,
1907,
2396,
16212,
13,
4706,
500,
13,
13,
13,
1990,
13343,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
3973,
5385,
353,
14013,
260,
29901,
260,
13,
4706,
1583,
29889,
8382,
353,
7700,
13,
4706,
1583,
29889,
6979,
29918,
26690,
353,
448,
29896,
13,
4706,
1583,
29889,
5504,
353,
5852,
13,
4706,
1583,
29889,
13506,
353,
6629,
13,
4706,
1583,
29889,
7050,
29918,
26690,
353,
6213,
13,
13,
4706,
1583,
29889,
8551,
580,
13,
13,
1678,
822,
2821,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1742,
29906,
13140,
353,
6571,
13,
4706,
1583,
29889,
5344,
353,
7700,
13,
4706,
1583,
29889,
2311,
353,
29871,
29900,
13,
4706,
1583,
29889,
449,
29918,
974,
29918,
29894,
542,
353,
29871,
29900,
13,
4706,
1583,
29889,
29877,
586,
353,
731,
580,
13,
13,
4706,
565,
1583,
29889,
7050,
29918,
26690,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
6979,
29918,
26690,
353,
1583,
29889,
20401,
29898,
1311,
29889,
7050,
29918,
26690,
29897,
13,
13,
1678,
822,
2254,
29918,
3126,
29898,
1311,
29892,
10422,
1125,
13,
4706,
411,
1722,
29898,
9507,
29897,
408,
934,
29901,
13,
9651,
848,
353,
4390,
29889,
1359,
29898,
1445,
29897,
13,
9651,
565,
338,
8758,
29898,
1272,
29892,
313,
1761,
29892,
22164,
13,
18884,
363,
22645,
29892,
1734,
297,
26985,
29898,
1272,
1125,
13,
462,
1678,
565,
1583,
29889,
20401,
29898,
1742,
29897,
2804,
22645,
29901,
13,
462,
4706,
1596,
703,
29956,
25614,
29901,
8340,
8600,
1159,
13,
9651,
1683,
29901,
13,
18884,
363,
1734,
29892,
22645,
297,
848,
29889,
7076,
7295,
13,
462,
1678,
565,
1583,
29889,
20401,
29898,
1742,
29897,
2804,
22645,
29901,
13,
462,
4706,
1596,
703,
29956,
25614,
29901,
8340,
8600,
1159,
13,
13,
1678,
822,
16280,
29898,
1311,
29892,
5993,
1125,
13,
4706,
5993,
353,
1583,
29889,
13506,
718,
1583,
29889,
3973,
5385,
29898,
6979,
29897,
13,
4706,
565,
451,
5993,
297,
1583,
29889,
1742,
29906,
13140,
29901,
13,
9651,
565,
1583,
29889,
5504,
29901,
13,
18884,
1583,
29889,
1742,
29906,
13140,
29961,
6979,
29962,
353,
1583,
29889,
2311,
13,
18884,
1583,
29889,
2311,
4619,
29871,
29896,
13,
9651,
1683,
29901,
13,
18884,
565,
1583,
29889,
8382,
29901,
13,
462,
1678,
1596,
703,
29877,
586,
29901,
525,
8875,
29915,
1599,
6571,
1642,
4830,
29898,
6979,
29892,
1583,
29889,
6979,
29918,
26690,
876,
13,
18884,
1583,
29889,
449,
29918,
974,
29918,
29894,
542,
4619,
29871,
29896,
13,
18884,
736,
1583,
29889,
6979,
29918,
26690,
13,
4706,
736,
1583,
29889,
1742,
29906,
13140,
29961,
6979,
29962,
13,
13,
1678,
822,
788,
29898,
1311,
29892,
5993,
1125,
13,
4706,
565,
451,
5993,
297,
1583,
29889,
1742,
29906,
13140,
29901,
13,
9651,
1583,
29889,
1742,
29906,
13140,
29961,
6979,
29962,
353,
1583,
29889,
2311,
13,
9651,
1583,
29889,
2311,
4619,
29871,
29896,
13,
4706,
736,
1583,
29889,
1742,
29906,
13140,
29961,
6979,
29962,
13,
13,
1678,
822,
731,
29918,
26690,
29918,
6979,
29898,
1311,
29892,
9815,
29918,
6979,
1125,
13,
4706,
1583,
29889,
7050,
29918,
26690,
353,
9815,
29918,
6979,
13,
4706,
1583,
29889,
6979,
29918,
26690,
353,
1583,
29889,
1742,
29906,
13140,
29961,
1311,
29889,
13506,
718,
9815,
29918,
6979,
29962,
13,
4706,
1596,
29898,
1311,
29889,
657,
29898,
1311,
29889,
6979,
29918,
26690,
511,
376,
976,
613,
1583,
29889,
6979,
29918,
26690,
29897,
13,
13,
1678,
822,
2436,
29898,
1311,
29892,
10422,
1125,
13,
4706,
1053,
4390,
13,
4706,
411,
1722,
29898,
9507,
29892,
525,
29893,
1495,
408,
934,
29901,
13,
9651,
4390,
29889,
15070,
29898,
1311,
29889,
1742,
29906,
13140,
29892,
934,
29897,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2380,
1125,
13,
4706,
363,
1734,
29892,
22645,
297,
1583,
29889,
1742,
29906,
13140,
29889,
7076,
7295,
13,
9651,
565,
22645,
1275,
2380,
29901,
13,
18884,
736,
1734,
13,
4706,
736,
6213,
13,
13,
1678,
822,
304,
1761,
29898,
1311,
1125,
13,
4706,
1051,
353,
518,
8516,
29962,
334,
1583,
29889,
2311,
13,
4706,
363,
1734,
29892,
22645,
297,
1583,
29889,
1742,
29906,
13140,
29889,
7076,
7295,
13,
9651,
1051,
29961,
13140,
29962,
353,
1734,
13,
4706,
736,
1051,
13,
2
] |
cobrinha trabalhadeira/lab10/lab10.py | ansattz/solving_sto | 0 | 72268 | <filename>cobrinha trabalhadeira/lab10/lab10.py
# <NAME>
# @ansattz
#1 - Não delete nem modifique esta linha
import readline
from random import randint
def roll(t):
rounds=[]
while len(rounds) < t:
round0=randint(1,6)
rounds.append(round0)
return rounds
def facerep(t):
mydic={}
l=roll(t)
l1=l[1:] + [':)',]
ls=[]
z=0
for i in l:
if i == l1[z]:
ls.append(i)
z+=1
for j in ls:
mydic[j] = mydic.get(j, 0) + 1
v = list(mydic.values())
return l , len(v)
def main():
# Escolha da quantidade de lances pelo usuário
print('')
print("""⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣀⣀⠤⠤⢴⣶⣖⣈⣉⣻⣿⣷⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣾⣿⣿⣿⣷⣶⡶⠚⠛⢻⣿⣯⣤⣤⣽⣿⣿⣷⣦⣀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣟⠛⠛⢛⣿⣷⣤⣤⣴⣿⣿⣿⣿⣦⠀⠀⠀⠀
⠀⠀⠀⠀⡟⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀
⠀⠀⠀⠀⣷⠀⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⢻⣿⣿⠀⠀⠀⠀
⠀⠀⠀⠀⢹⣿⣿⡀⢹⣿⣿⣿⣿⡟⠁⠀⣿⣿⣿⣿⣿⣀⣀⣼⣿⣿⠀⠀⠀⠀
⠀⠀⠀⠀⢸⠙⣿⣷⣼⣿⣿⣿⣿⣧⣤⣴⣿⣿⠿⠿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀
⠀⠀⠀⠀⢸⣆⣸⡟⢿⣿⣿⣿⣿⣿⣿⣿⣿⡃⠀⢀⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠻⣿⡇⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⢹⣿⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠘⢿⣶⣿⣿⣿⣿⡿⠁⠀⣹⣿⣿⣿⣿⣤⣴⣿⣿⡇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣶⣾⣿⣿⣿⡿⠿⠟⠛⠉⠉⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⡿⠿⠟⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀""")
t = int(input('Quantidade de lances: '))
print('')
print('===== Resultados =====')
# print('Números sorteados e número de séries de faces repetidas:\n', facerep(t))
print('Número de séries de faces repetidas:', facerep(t)[1])
# main()
#Casos de teste da questão 1 - Não delete nem modifique esta linha
# input: 0 ====> output: 0
# input: 1 ====> output: 0
# input: 2 ====> output: 1 or 0
# ...
#2 - Não delete nem modifique esta linha
def trap_area(a,b,c):
return (((a+b))*c)/2
def quad(a,b,c):
return [a**2, b**2, c**2]
def marit(a,b,c):
return (a+b+c)/3
def seq(a,b,c):
l=[]
i=a
if a < b:
while a < b:
a+=c
l.append(a)
del l[-1]
return i + sum(l)
else:
return "Não foi possível realizar a operação, pois (a > b)"
def mymenu():
print('========= Opções válidas =========')
print('')
print('1 - Área do trapézio de bases a e b e altura c')
print('2 - Quadrados de a, b e c')
print('3 - Média aritmética entre a, b e c')
print('4 - Sequência aritmética de a com um limite superior sendo b e razão c')
print('0 - Encerrar programa')
print('')
print('==================================')
while True:
mymenu()
opcao = input('Escolha uma opção: ')
if opcao == '1':
a = float(input('Base a: '))
b = float(input('Base b: '))
c = float(input('Altura c: '))
print('')
print('A área do trapézio é: ', trap_area(a,b,c))
print('')
elif opcao == '2':
a = float(input('Valor de a: '))
b = float(input('Valor de b: '))
c = float(input('Valor de c: '))
print('')
print(str.format('Os quadrados são:\n {}: {} \n {}: {} \n {}: {} ', a, quad(a,b,c)[0], b, quad(a,b,c)[1], c, quad(a,b,c)[2]))
print('')
elif opcao == '3':
a = float(input('Primeiro valor (a): '))
b = float(input('Segundo valor (b): '))
c = float(input('Terceiro valor (c): '))
print('')
print(str.format('A média aritmética entre {}, {} e {} é: ', a, b, c, marit(a,b,c)))
print('')
elif opcao == '4':
a = int(input('Primeiro termo (a): '))
b = int(input('Limite superior (b): '))
c = int(input('Razão da sequência (c): '))
print('')
print(str.format('A sequência aritmética de {} com limite superior {} e com razão {} é: ', a, b, c), seq(a,b,c))
print('')
elif opcao == '0':
print('')
print('=====> Programa encerrado :)')
break
else:
print('Opção inválida')
print('') | [
1,
529,
9507,
29958,
29883,
711,
29878,
16479,
19739,
29882,
1943,
3055,
29914,
8205,
29896,
29900,
29914,
8205,
29896,
29900,
29889,
2272,
13,
29937,
529,
5813,
29958,
13,
29937,
732,
550,
1131,
29920,
13,
13,
13,
29937,
29896,
448,
405,
1368,
5217,
6583,
878,
22781,
7444,
6276,
2350,
13,
5215,
1303,
1220,
13,
3166,
4036,
1053,
20088,
524,
13,
1753,
9679,
29898,
29873,
1125,
1678,
13,
1678,
364,
3885,
29922,
2636,
13,
1678,
1550,
7431,
29898,
29878,
3885,
29897,
529,
260,
29901,
13,
4706,
4513,
29900,
29922,
9502,
524,
29898,
29896,
29892,
29953,
29897,
13,
4706,
364,
3885,
29889,
4397,
29898,
14486,
29900,
29897,
13,
1678,
736,
364,
3885,
13,
13,
1753,
4024,
406,
29886,
29898,
29873,
1125,
13,
1678,
590,
27774,
3790,
29913,
13,
1678,
301,
29922,
1245,
29898,
29873,
29897,
13,
1678,
301,
29896,
29922,
29880,
29961,
29896,
17531,
718,
518,
2396,
29897,
742,
29962,
13,
1678,
19375,
29922,
2636,
13,
1678,
503,
29922,
29900,
13,
1678,
363,
474,
297,
301,
29901,
13,
4706,
565,
474,
1275,
301,
29896,
29961,
29920,
5387,
13,
9651,
19375,
29889,
4397,
29898,
29875,
29897,
13,
4706,
503,
23661,
29896,
13,
1678,
363,
432,
297,
19375,
29901,
13,
4706,
590,
27774,
29961,
29926,
29962,
353,
590,
27774,
29889,
657,
29898,
29926,
29892,
29871,
29900,
29897,
718,
29871,
29896,
539,
13,
1678,
325,
353,
1051,
29898,
1357,
27774,
29889,
5975,
3101,
13,
1678,
736,
301,
1919,
7431,
29898,
29894,
29897,
13,
13,
1753,
1667,
7295,
13,
1678,
396,
3423,
1054,
2350,
1146,
4323,
5558,
316,
301,
2925,
10845,
502,
29884,
12288,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
703,
15945,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
229,
165,
131,
229,
166,
131,
229,
166,
131,
229,
163,
167,
229,
163,
167,
229,
165,
183,
229,
166,
185,
229,
166,
153,
229,
166,
139,
229,
166,
140,
229,
166,
190,
229,
166,
194,
229,
166,
186,
229,
166,
169,
229,
166,
131,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
166,
193,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
186,
229,
166,
185,
229,
164,
185,
229,
163,
157,
229,
163,
158,
229,
165,
190,
229,
166,
194,
229,
166,
178,
229,
166,
167,
229,
166,
167,
229,
166,
192,
229,
166,
194,
229,
166,
194,
229,
166,
186,
229,
166,
169,
229,
166,
131,
30942,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
162,
229,
163,
158,
229,
163,
158,
229,
165,
158,
229,
166,
194,
229,
166,
186,
229,
166,
167,
229,
166,
167,
229,
166,
183,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
169,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
164,
162,
229,
163,
190,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
166,
186,
30942,
229,
166,
194,
229,
163,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
163,
162,
229,
163,
158,
229,
165,
190,
229,
166,
194,
229,
166,
194,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
165,
188,
229,
166,
194,
229,
166,
194,
229,
164,
131,
229,
165,
188,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
162,
229,
163,
132,
30942,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
131,
229,
166,
131,
229,
166,
191,
229,
166,
194,
229,
166,
194,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
165,
187,
229,
163,
156,
229,
166,
194,
229,
166,
186,
229,
166,
191,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
170,
229,
166,
167,
229,
166,
183,
229,
166,
194,
229,
166,
194,
229,
163,
194,
229,
163,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
138,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
229,
165,
187,
229,
166,
137,
229,
166,
187,
229,
164,
162,
229,
165,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
134,
30942,
229,
165,
131,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
138,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
229,
163,
190,
229,
166,
194,
229,
164,
138,
229,
163,
155,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
163,
142,
30942,
229,
165,
188,
229,
166,
194,
229,
164,
138,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
229,
163,
155,
229,
165,
194,
229,
166,
185,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
194,
229,
163,
132,
30942,
229,
166,
188,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
167,
229,
166,
183,
229,
166,
194,
229,
166,
194,
229,
164,
138,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
229,
163,
156,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
166,
185,
229,
166,
193,
229,
166,
194,
229,
166,
194,
229,
166,
194,
229,
164,
194,
229,
163,
194,
229,
163,
162,
229,
163,
158,
229,
163,
140,
229,
163,
140,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
229,
163,
139,
229,
163,
190,
229,
166,
194,
229,
164,
194,
229,
163,
194,
229,
163,
162,
229,
163,
158,
229,
163,
140,
229,
163,
140,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
13,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
30942,
15945,
1159,
13,
1678,
260,
353,
938,
29898,
2080,
877,
22930,
5558,
316,
301,
2925,
29901,
525,
876,
13,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
877,
2751,
29922,
7867,
2255,
1275,
25512,
1495,
13,
1678,
396,
1596,
877,
29940,
30030,
1050,
359,
29835,
2255,
321,
13831,
316,
7019,
2722,
316,
17240,
21159,
8817,
3583,
29876,
742,
4024,
406,
29886,
29898,
29873,
876,
13,
1678,
1596,
877,
29940,
30030,
1050,
29877,
316,
7019,
2722,
316,
17240,
21159,
8817,
29901,
742,
4024,
406,
29886,
29898,
29873,
9601,
29896,
2314,
13,
29937,
1667,
580,
13,
13,
13,
29937,
29907,
294,
359,
316,
1243,
29872,
1146,
21126,
1368,
29871,
29896,
448,
405,
1368,
5217,
6583,
878,
22781,
7444,
6276,
2350,
13,
29937,
1881,
29901,
29871,
29900,
1275,
1360,
29958,
1962,
29901,
29871,
29900,
13,
29937,
1881,
29901,
29871,
29896,
1275,
1360,
29958,
1962,
29901,
29871,
29900,
13,
29937,
1881,
29901,
29871,
29906,
1275,
1360,
29958,
1962,
29901,
29871,
29896,
470,
29871,
29900,
13,
29937,
268,
2023,
13,
13,
13,
29937,
29906,
448,
405,
1368,
5217,
6583,
878,
22781,
7444,
6276,
2350,
13,
1753,
26505,
29918,
6203,
29898,
29874,
29892,
29890,
29892,
29883,
1125,
13,
1678,
736,
313,
3552,
29874,
29974,
29890,
876,
29930,
29883,
6802,
29906,
13,
13,
1753,
18890,
29898,
29874,
29892,
29890,
29892,
29883,
1125,
13,
1678,
736,
518,
29874,
1068,
29906,
29892,
289,
1068,
29906,
29892,
274,
1068,
29906,
29962,
13,
13,
1753,
1766,
277,
29898,
29874,
29892,
29890,
29892,
29883,
1125,
13,
1678,
736,
313,
29874,
29974,
29890,
29974,
29883,
6802,
29941,
13,
13,
1753,
19359,
29898,
29874,
29892,
29890,
29892,
29883,
1125,
13,
1678,
301,
29922,
2636,
13,
1678,
474,
29922,
29874,
13,
1678,
565,
263,
529,
289,
29901,
13,
4706,
1550,
263,
529,
289,
29901,
13,
9651,
263,
23661,
29883,
13,
9651,
301,
29889,
4397,
29898,
29874,
29897,
13,
4706,
628,
301,
14352,
29896,
29962,
13,
4706,
736,
474,
718,
2533,
29898,
29880,
29897,
13,
1678,
1683,
29901,
13,
4706,
736,
376,
29940,
1368,
4732,
3119,
24747,
8869,
279,
263,
1751,
8298,
29892,
772,
275,
313,
29874,
1405,
289,
5513,
13,
13,
1753,
590,
6510,
7295,
13,
1678,
1596,
877,
4936,
29922,
6461,
5616,
12196,
8817,
1275,
2751,
25512,
1495,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
877,
29896,
448,
7260,
5638,
437,
26505,
29948,
29920,
601,
316,
22561,
263,
321,
289,
321,
5272,
2002,
274,
1495,
13,
1678,
1596,
877,
29906,
448,
751,
7887,
2255,
316,
263,
29892,
289,
321,
274,
1495,
13,
1678,
1596,
877,
29941,
448,
341,
13292,
564,
277,
29885,
24142,
2637,
263,
29892,
289,
321,
274,
1495,
13,
1678,
1596,
877,
29946,
448,
922,
339,
10544,
564,
277,
29885,
24142,
316,
263,
419,
1922,
2485,
568,
11558,
21324,
289,
321,
8006,
1368,
274,
1495,
13,
1678,
1596,
877,
29900,
448,
1174,
2265,
13678,
16914,
1495,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
877,
9166,
9166,
1360,
1495,
13,
13,
8000,
5852,
29901,
13,
1678,
590,
6510,
580,
13,
13,
1678,
1015,
1113,
29877,
353,
1881,
877,
14190,
1054,
2350,
3672,
1015,
2340,
29901,
25710,
13,
1678,
565,
1015,
1113,
29877,
1275,
525,
29896,
2396,
13,
4706,
263,
353,
5785,
29898,
2080,
877,
5160,
263,
29901,
525,
876,
13,
4706,
289,
353,
5785,
29898,
2080,
877,
5160,
289,
29901,
525,
876,
13,
4706,
274,
353,
5785,
29898,
2080,
877,
24528,
2002,
274,
29901,
525,
876,
13,
4706,
1596,
877,
1495,
13,
4706,
1596,
877,
29909,
17335,
437,
26505,
29948,
29920,
601,
904,
29901,
13420,
26505,
29918,
6203,
29898,
29874,
29892,
29890,
29892,
29883,
876,
13,
4706,
1596,
877,
1495,
13,
1678,
25342,
1015,
1113,
29877,
1275,
525,
29906,
2396,
13,
4706,
263,
353,
5785,
29898,
2080,
877,
1440,
272,
316,
263,
29901,
525,
876,
13,
4706,
289,
353,
5785,
29898,
2080,
877,
1440,
272,
316,
289,
29901,
525,
876,
13,
4706,
274,
353,
5785,
29898,
2080,
877,
1440,
272,
316,
274,
29901,
525,
876,
13,
4706,
1596,
877,
1495,
13,
4706,
1596,
29898,
710,
29889,
4830,
877,
24768,
15448,
2255,
12777,
3583,
29876,
426,
6177,
6571,
320,
29876,
426,
6177,
6571,
320,
29876,
426,
6177,
6571,
13420,
263,
29892,
18890,
29898,
29874,
29892,
29890,
29892,
29883,
9601,
29900,
1402,
289,
29892,
18890,
29898,
29874,
29892,
29890,
29892,
29883,
9601,
29896,
1402,
274,
29892,
18890,
29898,
29874,
29892,
29890,
29892,
29883,
9601,
29906,
12622,
13,
4706,
1596,
877,
1495,
13,
1678,
25342,
1015,
1113,
29877,
1275,
525,
29941,
2396,
13,
4706,
263,
353,
5785,
29898,
2080,
877,
4040,
603,
3350,
16497,
313,
29874,
1125,
525,
876,
13,
4706,
289,
353,
5785,
29898,
2080,
877,
17669,
6201,
16497,
313,
29890,
1125,
525,
876,
13,
4706,
274,
353,
5785,
29898,
2080,
877,
29911,
261,
346,
3350,
16497,
313,
29883,
1125,
525,
876,
13,
4706,
1596,
877,
1495,
13,
4706,
1596,
29898,
710,
29889,
4830,
877,
29909,
10283,
423,
564,
277,
29885,
24142,
2637,
24335,
6571,
321,
6571,
904,
29901,
13420,
263,
29892,
289,
29892,
274,
29892,
1766,
277,
29898,
29874,
29892,
29890,
29892,
29883,
4961,
13,
4706,
1596,
877,
1495,
13,
1678,
25342,
1015,
1113,
29877,
1275,
525,
29946,
2396,
13,
4706,
263,
353,
938,
29898,
2080,
877,
4040,
603,
3350,
1840,
29877,
313,
29874,
1125,
525,
876,
13,
4706,
289,
353,
938,
29898,
2080,
877,
29931,
326,
568,
11558,
313,
29890,
1125,
525,
876,
13,
4706,
274,
353,
938,
29898,
2080,
877,
29934,
834,
1368,
1146,
8617,
10544,
313,
29883,
1125,
525,
876,
13,
4706,
1596,
877,
1495,
13,
4706,
1596,
29898,
710,
29889,
4830,
877,
29909,
8617,
10544,
564,
277,
29885,
24142,
316,
6571,
419,
2485,
568,
11558,
6571,
321,
419,
8006,
1368,
6571,
904,
29901,
13420,
263,
29892,
289,
29892,
274,
511,
19359,
29898,
29874,
29892,
29890,
29892,
29883,
876,
13,
4706,
1596,
877,
1495,
13,
1678,
25342,
1015,
1113,
29877,
1275,
525,
29900,
2396,
13,
4706,
1596,
877,
1495,
13,
4706,
1596,
877,
2751,
4261,
7835,
29874,
2094,
3127,
912,
4248,
1495,
13,
4706,
2867,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
11746,
2340,
2437,
2464,
1458,
1495,
13,
4706,
1596,
877,
1495,
2
] |
p2db/p2db/p2tools.py | ne75/p2llvm-lib | 0 | 118989 | import subprocess
from colorama import Fore
import tempfile
import os
from pathlib import Path
import re
load_cmd = '/opt/p2llvm/bin/loadp2'
load_args = ['-ZERO', '-l', '0', '-v', '-FIFO', '4096']
def load(port, app, baud, verbose=False, retries=3):
result = False
while retries:
args = load_args.copy()
args.append('-p')
args.append(port)
args[2] = str(baud)
args.append('{}'.format(app))
p = subprocess.Popen([load_cmd] + args, stdout=subprocess.PIPE)
if verbose:
print(" ".join([load_cmd] + args))
output = p.communicate()[0].decode('ascii')
if p.returncode != 0:
print(Fore.RED + output + Fore.RESET)
print(Fore.YELLOW + "Load failed, retrying...\r" + Fore.RESET)
retries -= 1;
result = False;
else:
result = True;
break
if not result:
print(Fore.RED + "Failed to load app\r" + Fore.RESET)
if verbose:
print("Load command was: " + str([load_cmd] + args))
return result
def gen_bin(elf_file, outdir=None):
'''
generate a binary file for loading from the given elf file.
if outdir is given, save the binary there. otherwise it will be placed in
a temporary directory
returns the path to the generated binary
'''
if not outdir:
outdir = tempfile.gettempdir()
outfile = os.path.join(outdir, Path(elf_file).stem)
p = subprocess.Popen([
'/opt/p2llvm/bin/llvm-objcopy',
'-O',
'binary',
elf_file,
outfile
], stdout=subprocess.PIPE)
p.wait()
if (p.returncode != 0):
return None
return outfile
def get_objdump_data(elf_file):
'''
return a dict of sections in the elf file. each section is keyed with the section header (as given by objdump), and the value is a
dict containing a cleaned up version of the address, instruction encoding, and parsed instruction
example:
{
".cog<__start>": {
"section_addr": 0
0: ["f6 03 a1 f8", "mov r0, ptra"]
}
}
'''
p = subprocess.Popen([
'/opt/p2llvm/bin/llvm-objdump',
'-d',
elf_file,
], stdout=subprocess.PIPE)
out, _ = p.communicate()
lines = out.decode('ascii').splitlines()
current_section = ''
current_subsection = ''
current_section_key = ''
current_section_addr = 0
SECTION_PATERN = r"^Disassembly of section (.*?):$"
SUBSECTION_PATTERN = r"^([a-f0-9]+) <(.*?)>:$"
INST_PATTERN = r"^\s+([a-f0-9]+):\s+(([a-f0-9]+\s)+)\s+(.*?)$"
output_dict = {}
for l in lines:
if re.search(SECTION_PATERN, l): # check for the start of a code section
current_section = re.search(SECTION_PATERN, l).group(1)
elif re.search(SUBSECTION_PATTERN, l): # check for the start of a function section
current_section_addr = int(re.search(SUBSECTION_PATTERN, l).group(1), 16)
current_subsection = re.search(SUBSECTION_PATTERN, l).group(2)
elif re.search(INST_PATTERN, l): # check for an individual instruction
inst_match = re.search(INST_PATTERN, l)
current_section_key = "{}<{}>".format(current_section, current_subsection)
if current_section_key not in output_dict:
output_dict[current_section_key] = {}
output_dict[current_section_key]["section_addr"] = current_section_addr
inst_encoding = inst_match.group(2).split(' ')
inst_encoding = [s for s in inst_encoding if s]
inst_encoding = inst_encoding[::-1]
i_str_fragments = [s.strip() for s in inst_match.group(4).split('\t') if s]
if len(i_str_fragments) == 1:
i_str_fragments = ['', i_str_fragments[0], '']
elif len(i_str_fragments) == 2:
if i_str_fragments[-1] == 'wc' or i_str_fragments[-1] == 'wz' or i_str_fragments[-1] == 'wcz':
# we don't have a condition, add a blank to the front
i_str_fragments.insert(0, '')
else:
# we don't have a effect, add a blank to the back
i_str_fragments.append('')
elif len(i_str_fragments) == 3:
pass # don't need to do anything
else:
print("Unknown instruction format: " + str(i_str_fragments))
i_str = '{: >14} {: <18}{}'.format(i_str_fragments[0], i_str_fragments[1], i_str_fragments[2])
output_dict[current_section_key][int(inst_match.group(1), 16)] = (
' '.join(inst_encoding),
i_str
)
return output_dict
def get_inst(data, pc):
'''
get the instruction at the given pc in data
if no such instruction exists, return None
'''
for s in data:
for i in data[s]:
if isinstance(i, int) and i == pc:
return data[s][i]
return None
def get_section(data, addr) -> str:
'''
get the section name for a given address
'''
for s in data:
if data[s]["section_addr"] == addr:
return s
return "" | [
1,
1053,
1014,
5014,
13,
3166,
2927,
3304,
1053,
28297,
13,
5215,
5694,
1445,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
337,
13,
13,
1359,
29918,
9006,
353,
8207,
3670,
29914,
29886,
29906,
645,
6925,
29914,
2109,
29914,
1359,
29886,
29906,
29915,
13,
1359,
29918,
5085,
353,
6024,
29899,
29999,
1001,
29949,
742,
17411,
29880,
742,
525,
29900,
742,
17411,
29894,
742,
17411,
3738,
5800,
742,
525,
29946,
29900,
29929,
29953,
2033,
13,
13,
1753,
2254,
29898,
637,
29892,
623,
29892,
9922,
566,
29892,
26952,
29922,
8824,
29892,
3240,
2722,
29922,
29941,
1125,
13,
308,
13,
1678,
1121,
353,
7700,
13,
13,
1678,
1550,
3240,
2722,
29901,
13,
4706,
6389,
353,
2254,
29918,
5085,
29889,
8552,
580,
13,
4706,
6389,
29889,
4397,
877,
29899,
29886,
1495,
13,
4706,
6389,
29889,
4397,
29898,
637,
29897,
13,
4706,
6389,
29961,
29906,
29962,
353,
851,
29898,
2291,
566,
29897,
13,
13,
4706,
6389,
29889,
4397,
877,
8875,
4286,
4830,
29898,
932,
876,
13,
13,
4706,
282,
353,
1014,
5014,
29889,
29925,
3150,
4197,
1359,
29918,
9006,
29962,
718,
6389,
29892,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29897,
13,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
703,
11393,
7122,
4197,
1359,
29918,
9006,
29962,
718,
6389,
876,
13,
308,
13,
4706,
1962,
353,
282,
29889,
27820,
403,
580,
29961,
29900,
1822,
13808,
877,
294,
18869,
1495,
13,
13,
4706,
565,
282,
29889,
2457,
401,
2804,
29871,
29900,
29901,
13,
9651,
1596,
29898,
29943,
487,
29889,
19386,
718,
1962,
718,
28297,
29889,
1525,
10490,
29897,
13,
9651,
1596,
29898,
29943,
487,
29889,
29979,
29923,
2208,
9806,
718,
376,
5896,
5229,
29892,
337,
2202,
292,
856,
29905,
29878,
29908,
718,
28297,
29889,
1525,
10490,
29897,
13,
9651,
3240,
2722,
22361,
29871,
29896,
29936,
13,
9651,
1121,
353,
7700,
29936,
13,
4706,
1683,
29901,
13,
9651,
1121,
353,
5852,
29936,
13,
9651,
2867,
13,
13,
1678,
565,
451,
1121,
29901,
13,
4706,
1596,
29898,
29943,
487,
29889,
19386,
718,
376,
17776,
304,
2254,
623,
29905,
29878,
29908,
718,
28297,
29889,
1525,
10490,
29897,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
703,
5896,
1899,
471,
29901,
376,
718,
851,
4197,
1359,
29918,
9006,
29962,
718,
6389,
876,
13,
13,
1678,
736,
1121,
13,
13,
1753,
2531,
29918,
2109,
29898,
761,
29918,
1445,
29892,
714,
3972,
29922,
8516,
1125,
13,
1678,
14550,
13,
1678,
5706,
263,
7581,
934,
363,
8363,
515,
278,
2183,
560,
29888,
934,
29889,
13,
1678,
565,
714,
3972,
338,
2183,
29892,
4078,
278,
7581,
727,
29889,
6467,
372,
674,
367,
7180,
297,
29871,
13,
1678,
263,
13201,
3884,
13,
268,
13,
1678,
3639,
278,
2224,
304,
278,
5759,
7581,
13,
1678,
14550,
13,
1678,
565,
451,
714,
3972,
29901,
13,
4706,
714,
3972,
353,
5694,
1445,
29889,
657,
7382,
3972,
580,
13,
13,
1678,
714,
1445,
353,
2897,
29889,
2084,
29889,
7122,
29898,
449,
3972,
29892,
10802,
29898,
761,
29918,
1445,
467,
303,
331,
29897,
13,
13,
1678,
282,
353,
1014,
5014,
29889,
29925,
3150,
4197,
13,
4706,
8207,
3670,
29914,
29886,
29906,
645,
6925,
29914,
2109,
29914,
645,
6925,
29899,
5415,
8552,
742,
13,
4706,
17411,
29949,
742,
13,
4706,
525,
19541,
742,
13,
4706,
560,
29888,
29918,
1445,
29892,
13,
4706,
714,
1445,
13,
1678,
21251,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29897,
13,
13,
1678,
282,
29889,
10685,
580,
13,
13,
1678,
565,
313,
29886,
29889,
2457,
401,
2804,
29871,
29900,
1125,
13,
4706,
736,
6213,
13,
13,
1678,
736,
714,
1445,
13,
268,
13,
13,
1753,
679,
29918,
5415,
15070,
29918,
1272,
29898,
761,
29918,
1445,
1125,
13,
1678,
14550,
13,
1678,
736,
263,
9657,
310,
13926,
297,
278,
560,
29888,
934,
29889,
1269,
4004,
338,
1820,
287,
411,
278,
4004,
4839,
313,
294,
2183,
491,
5446,
15070,
511,
322,
278,
995,
338,
263,
29871,
13,
1678,
9657,
6943,
263,
5941,
287,
701,
1873,
310,
278,
3211,
29892,
15278,
8025,
29892,
322,
21213,
15278,
29871,
13,
13,
1678,
1342,
29901,
13,
1678,
426,
13,
4706,
11393,
29883,
468,
29966,
1649,
2962,
29958,
1115,
426,
13,
9651,
376,
2042,
29918,
10030,
1115,
29871,
29900,
13,
632,
29900,
29901,
6796,
29888,
29953,
29871,
29900,
29941,
263,
29896,
285,
29947,
613,
376,
13529,
364,
29900,
29892,
282,
3018,
3108,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
14550,
13,
13,
1678,
282,
353,
1014,
5014,
29889,
29925,
3150,
4197,
13,
4706,
8207,
3670,
29914,
29886,
29906,
645,
6925,
29914,
2109,
29914,
645,
6925,
29899,
5415,
15070,
742,
13,
4706,
17411,
29881,
742,
13,
4706,
560,
29888,
29918,
1445,
29892,
13,
1678,
21251,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29897,
13,
13,
1678,
714,
29892,
903,
353,
282,
29889,
27820,
403,
580,
13,
13,
1678,
3454,
353,
714,
29889,
13808,
877,
294,
18869,
2824,
5451,
9012,
580,
13,
13,
1678,
1857,
29918,
2042,
353,
6629,
13,
1678,
1857,
29918,
7235,
353,
6629,
13,
1678,
1857,
29918,
2042,
29918,
1989,
353,
6629,
13,
1678,
1857,
29918,
2042,
29918,
10030,
353,
29871,
29900,
13,
13,
1678,
3725,
9838,
29918,
29925,
1299,
1001,
29940,
353,
364,
29908,
29985,
4205,
26936,
310,
4004,
313,
5575,
29973,
1125,
29938,
29908,
13,
1678,
27092,
1660,
9838,
29918,
29925,
1299,
4945,
29940,
353,
364,
29908,
29985,
4197,
29874,
29899,
29888,
29900,
29899,
29929,
10062,
29897,
529,
28104,
7897,
29958,
17178,
29908,
13,
1678,
2672,
1254,
29918,
29925,
1299,
4945,
29940,
353,
364,
29908,
3823,
29879,
29974,
4197,
29874,
29899,
29888,
29900,
29899,
29929,
10062,
1125,
29905,
29879,
29974,
3552,
29961,
29874,
29899,
29888,
29900,
29899,
29929,
29962,
3124,
29879,
7240,
2144,
29879,
17108,
5575,
29973,
1262,
29908,
13,
13,
1678,
1962,
29918,
8977,
353,
6571,
13,
13,
1678,
363,
301,
297,
3454,
29901,
13,
4706,
565,
337,
29889,
4478,
29898,
1660,
9838,
29918,
29925,
1299,
1001,
29940,
29892,
301,
1125,
396,
1423,
363,
278,
1369,
310,
263,
775,
4004,
13,
9651,
1857,
29918,
2042,
353,
337,
29889,
4478,
29898,
1660,
9838,
29918,
29925,
1299,
1001,
29940,
29892,
301,
467,
2972,
29898,
29896,
29897,
13,
13,
4706,
25342,
337,
29889,
4478,
29898,
20633,
1660,
9838,
29918,
29925,
1299,
4945,
29940,
29892,
301,
1125,
396,
1423,
363,
278,
1369,
310,
263,
740,
4004,
13,
9651,
1857,
29918,
2042,
29918,
10030,
353,
938,
29898,
276,
29889,
4478,
29898,
20633,
1660,
9838,
29918,
29925,
1299,
4945,
29940,
29892,
301,
467,
2972,
29898,
29896,
511,
29871,
29896,
29953,
29897,
13,
9651,
1857,
29918,
7235,
353,
337,
29889,
4478,
29898,
20633,
1660,
9838,
29918,
29925,
1299,
4945,
29940,
29892,
301,
467,
2972,
29898,
29906,
29897,
13,
13,
4706,
25342,
337,
29889,
4478,
29898,
25580,
29918,
29925,
1299,
4945,
29940,
29892,
301,
1125,
396,
1423,
363,
385,
5375,
15278,
29871,
13,
9651,
832,
29918,
4352,
353,
337,
29889,
4478,
29898,
25580,
29918,
29925,
1299,
4945,
29940,
29892,
301,
29897,
13,
9651,
1857,
29918,
2042,
29918,
1989,
353,
376,
8875,
29966,
8875,
29958,
1642,
4830,
29898,
3784,
29918,
2042,
29892,
1857,
29918,
7235,
29897,
13,
13,
9651,
565,
1857,
29918,
2042,
29918,
1989,
451,
297,
1962,
29918,
8977,
29901,
13,
18884,
1962,
29918,
8977,
29961,
3784,
29918,
2042,
29918,
1989,
29962,
353,
6571,
13,
18884,
1962,
29918,
8977,
29961,
3784,
29918,
2042,
29918,
1989,
29962,
3366,
2042,
29918,
10030,
3108,
353,
1857,
29918,
2042,
29918,
10030,
13,
13,
9651,
832,
29918,
22331,
353,
832,
29918,
4352,
29889,
2972,
29898,
29906,
467,
5451,
877,
25710,
13,
9651,
832,
29918,
22331,
353,
518,
29879,
363,
269,
297,
832,
29918,
22331,
565,
269,
29962,
13,
9651,
832,
29918,
22331,
353,
832,
29918,
22331,
29961,
1057,
29899,
29896,
29962,
13,
13,
9651,
474,
29918,
710,
29918,
29888,
1431,
1860,
353,
518,
29879,
29889,
17010,
580,
363,
269,
297,
832,
29918,
4352,
29889,
2972,
29898,
29946,
467,
5451,
28909,
29873,
1495,
565,
269,
29962,
13,
13,
9651,
565,
7431,
29898,
29875,
29918,
710,
29918,
29888,
1431,
1860,
29897,
1275,
29871,
29896,
29901,
13,
18884,
474,
29918,
710,
29918,
29888,
1431,
1860,
353,
6024,
742,
474,
29918,
710,
29918,
29888,
1431,
1860,
29961,
29900,
1402,
525,
2033,
13,
9651,
25342,
7431,
29898,
29875,
29918,
710,
29918,
29888,
1431,
1860,
29897,
1275,
29871,
29906,
29901,
13,
18884,
565,
474,
29918,
710,
29918,
29888,
1431,
1860,
14352,
29896,
29962,
1275,
525,
29893,
29883,
29915,
470,
474,
29918,
710,
29918,
29888,
1431,
1860,
14352,
29896,
29962,
1275,
525,
29893,
29920,
29915,
470,
474,
29918,
710,
29918,
29888,
1431,
1860,
14352,
29896,
29962,
1275,
525,
29893,
2067,
2396,
13,
462,
1678,
396,
591,
1016,
29915,
29873,
505,
263,
4195,
29892,
788,
263,
9654,
304,
278,
4565,
13,
462,
1678,
474,
29918,
710,
29918,
29888,
1431,
1860,
29889,
7851,
29898,
29900,
29892,
27255,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
591,
1016,
29915,
29873,
505,
263,
2779,
29892,
788,
263,
9654,
304,
278,
1250,
13,
462,
1678,
474,
29918,
710,
29918,
29888,
1431,
1860,
29889,
4397,
877,
1495,
13,
13,
9651,
25342,
7431,
29898,
29875,
29918,
710,
29918,
29888,
1431,
1860,
29897,
1275,
29871,
29941,
29901,
13,
18884,
1209,
396,
1016,
29915,
29873,
817,
304,
437,
3099,
13,
9651,
1683,
29901,
13,
18884,
1596,
703,
14148,
15278,
3402,
29901,
376,
718,
851,
29898,
29875,
29918,
710,
29918,
29888,
1431,
1860,
876,
13,
13,
9651,
474,
29918,
710,
353,
22372,
29901,
1405,
29896,
29946,
29913,
12365,
529,
29896,
29947,
1157,
29913,
4286,
4830,
29898,
29875,
29918,
710,
29918,
29888,
1431,
1860,
29961,
29900,
1402,
474,
29918,
710,
29918,
29888,
1431,
1860,
29961,
29896,
1402,
474,
29918,
710,
29918,
29888,
1431,
1860,
29961,
29906,
2314,
13,
13,
9651,
1962,
29918,
8977,
29961,
3784,
29918,
2042,
29918,
1989,
3816,
524,
29898,
2611,
29918,
4352,
29889,
2972,
29898,
29896,
511,
29871,
29896,
29953,
4638,
353,
313,
13,
18884,
525,
15300,
7122,
29898,
2611,
29918,
22331,
511,
29871,
13,
18884,
474,
29918,
710,
13,
9651,
1723,
13,
13,
1678,
736,
1962,
29918,
8977,
13,
13,
1753,
679,
29918,
2611,
29898,
1272,
29892,
22844,
1125,
13,
1678,
14550,
13,
1678,
679,
278,
15278,
472,
278,
2183,
22844,
297,
848,
13,
13,
1678,
565,
694,
1316,
15278,
4864,
29892,
736,
6213,
13,
1678,
14550,
13,
13,
1678,
363,
269,
297,
848,
29901,
13,
4706,
363,
474,
297,
848,
29961,
29879,
5387,
13,
9651,
565,
338,
8758,
29898,
29875,
29892,
938,
29897,
322,
474,
1275,
22844,
29901,
13,
18884,
736,
848,
29961,
29879,
3816,
29875,
29962,
13,
13,
1678,
736,
6213,
13,
13,
1753,
679,
29918,
2042,
29898,
1272,
29892,
28915,
29897,
1599,
851,
29901,
13,
1678,
14550,
13,
1678,
679,
278,
4004,
1024,
363,
263,
2183,
3211,
13,
1678,
14550,
13,
13,
1678,
363,
269,
297,
848,
29901,
13,
4706,
565,
848,
29961,
29879,
29962,
3366,
2042,
29918,
10030,
3108,
1275,
28915,
29901,
13,
9651,
736,
269,
13,
13,
1678,
736,
5124,
2
] |
robotcode/language_server/robotframework/parts/goto.py | d-biehl/robotcode | 21 | 84470 | from __future__ import annotations
import ast
from typing import (
TYPE_CHECKING,
Any,
Awaitable,
Callable,
List,
Optional,
Type,
Union,
cast,
)
from ....utils.logging import LoggingDescriptor
from ....utils.uri import Uri
from ...common.language import language_id
from ...common.text_document import TextDocument
from ...common.types import Location, LocationLink, Position
from ..utils.ast import (
HasTokens,
Token,
get_nodes_at_position,
get_tokens_at_position,
range_from_token,
range_from_token_or_node,
tokenize_variables,
)
if TYPE_CHECKING:
from ..protocol import RobotLanguageServerProtocol
from .model_helper import ModelHelperMixin
from .protocol_part import RobotLanguageServerProtocolPart
_DefinitionMethod = Callable[
[ast.AST, TextDocument, Position],
Awaitable[Union[Location, List[Location], List[LocationLink], None]],
]
class RobotGotoProtocolPart(RobotLanguageServerProtocolPart, ModelHelperMixin):
_logger = LoggingDescriptor()
def __init__(self, parent: RobotLanguageServerProtocol) -> None:
super().__init__(parent)
parent.definition.collect.add(self.collect)
parent.implementation.collect.add(self.collect)
def _find_method(self, cls: Type[Any]) -> Optional[_DefinitionMethod]:
if cls is ast.AST:
return None
method_name = "definition_" + cls.__name__
if hasattr(self, method_name):
method = getattr(self, method_name)
if callable(method):
return cast(_DefinitionMethod, method)
for base in cls.__bases__:
method = self._find_method(base)
if method:
return cast(_DefinitionMethod, method)
return None
@language_id("robotframework")
async def collect(
self, sender: Any, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
result_nodes = await get_nodes_at_position(await self.parent.documents_cache.get_model(document), position)
if not result_nodes:
return None
result_node = result_nodes[-1]
if result_node is None:
return None
method = self._find_method(type(result_node))
if method is not None:
result = await method(result_node, document, position)
if result is not None:
return result
return await self._definition_default(result_nodes, document, position)
async def _definition_default(
self, nodes: List[ast.AST], document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.api.parsing import Token as RobotToken
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
if not nodes:
return None
node = nodes[-1]
if not isinstance(node, HasTokens):
return None
tokens = get_tokens_at_position(node, position)
for token in tokens:
try:
for sub_token in filter(
lambda s: s.type == RobotToken.VARIABLE, tokenize_variables(token, ignore_errors=True)
):
range = range_from_token(sub_token)
if position.is_in_range(range):
variable = await namespace.find_variable(sub_token.value, nodes, position)
if variable is not None and variable.source:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(node, sub_token),
target_uri=str(Uri.from_path(variable.source)),
target_range=variable.range(),
target_selection_range=range_from_token(variable.name_token)
if variable.name_token
else variable.range(),
)
]
except BaseException:
pass
return None
async def definition_KeywordCall( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.parsing.lexer.tokens import Token as RobotToken
from robot.parsing.model.statements import KeywordCall
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
kw_node = cast(KeywordCall, node)
result = await self.get_keyworddoc_and_token_from_position(
kw_node.keyword,
cast(Token, kw_node.get_token(RobotToken.KEYWORD)),
[cast(Token, t) for t in kw_node.get_tokens(RobotToken.ARGUMENT)],
namespace,
position,
)
if result is not None and result[0] is not None:
source = result[0].source
if source is not None:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(node, result[1]),
target_uri=str(Uri.from_path(source)),
target_range=result[0].range,
target_selection_range=result[0].range,
)
]
return None
async def definition_Fixture( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.parsing.lexer.tokens import Token as RobotToken
from robot.parsing.model.statements import Fixture
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
fixture_node = cast(Fixture, node)
result = await self.get_keyworddoc_and_token_from_position(
fixture_node.name,
cast(Token, fixture_node.get_token(RobotToken.NAME)),
[cast(Token, t) for t in fixture_node.get_tokens(RobotToken.ARGUMENT)],
namespace,
position,
)
if result is not None and result[0] is not None:
source = result[0].source
if source is not None:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(node, result[1]),
target_uri=str(Uri.from_path(source)),
target_range=result[0].range,
target_selection_range=result[0].range,
)
]
return None
async def _definition_Template_or_TestTemplate( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.parsing.lexer.tokens import Token as RobotToken
from robot.parsing.model.statements import Template, TestTemplate
node = cast(Union[Template, TestTemplate], node)
if node.value:
keyword_token = cast(RobotToken, node.get_token(RobotToken.NAME))
if keyword_token is None:
return None
if position.is_in_range(range_from_token(keyword_token)):
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
result = await namespace.find_keyword(node.value)
if result is not None and result.source is not None:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(node, keyword_token),
target_uri=str(Uri.from_path(result.source)),
target_range=result.range,
target_selection_range=result.range,
)
]
return None
async def definition_TestTemplate( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
return await self._definition_Template_or_TestTemplate(node, document, position)
async def definition_Template( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
return await self._definition_Template_or_TestTemplate(node, document, position)
async def definition_LibraryImport( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.parsing.lexer.tokens import Token as RobotToken
from robot.parsing.model.statements import LibraryImport
library_node = cast(LibraryImport, node)
if library_node.name:
name_token = cast(RobotToken, library_node.get_token(RobotToken.NAME))
if name_token is None:
return None
if position.is_in_range(range_from_token(name_token)):
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
try:
libdoc = await namespace.imports_manager.get_libdoc_for_library_import(
library_node.name, library_node.args, str(document.uri.to_path().parent)
)
python_source = libdoc.source_or_origin
if python_source is not None:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(library_node, name_token),
target_uri=str(Uri.from_path(python_source)),
target_range=libdoc.range,
target_selection_range=libdoc.range,
)
]
except BaseException:
pass
return None
async def definition_ResourceImport( # noqa: N802
self, node: ast.AST, document: TextDocument, position: Position
) -> Union[Location, List[Location], List[LocationLink], None]:
from robot.parsing.lexer.tokens import Token as RobotToken
from robot.parsing.model.statements import ResourceImport
resource_node = cast(ResourceImport, node)
if resource_node.name:
name_token = cast(RobotToken, resource_node.get_token(RobotToken.NAME))
if name_token is None:
return None
if position.is_in_range(range_from_token(name_token)):
namespace = await self.parent.documents_cache.get_namespace(document)
if namespace is None:
return None
try:
libdoc = await namespace.imports_manager.get_libdoc_for_resource_import(
resource_node.name, str(document.uri.to_path().parent)
)
python_source = libdoc.source_or_origin
if python_source is not None:
return [
LocationLink(
origin_selection_range=range_from_token_or_node(resource_node, name_token),
target_uri=str(Uri.from_path(python_source)),
target_range=libdoc.range,
target_selection_range=libdoc.range,
)
]
except BaseException:
pass
return None
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
8717,
13,
3166,
19229,
1053,
313,
13,
1678,
323,
6959,
29918,
3210,
16658,
4214,
29892,
13,
1678,
3139,
29892,
13,
1678,
319,
10685,
519,
29892,
13,
1678,
8251,
519,
29892,
13,
1678,
2391,
29892,
13,
1678,
28379,
29892,
13,
1678,
5167,
29892,
13,
1678,
7761,
29892,
13,
1678,
4320,
29892,
13,
29897,
13,
13,
3166,
13035,
13239,
29889,
21027,
1053,
4522,
3460,
19124,
13,
3166,
13035,
13239,
29889,
5338,
1053,
21670,
13,
3166,
2023,
9435,
29889,
11675,
1053,
4086,
29918,
333,
13,
3166,
2023,
9435,
29889,
726,
29918,
3225,
1053,
3992,
6268,
13,
3166,
2023,
9435,
29889,
8768,
1053,
17015,
29892,
17015,
6595,
29892,
20627,
13,
3166,
6317,
13239,
29889,
579,
1053,
313,
13,
1678,
11699,
29911,
554,
575,
29892,
13,
1678,
25159,
29892,
13,
1678,
679,
29918,
18010,
29918,
271,
29918,
3283,
29892,
13,
1678,
679,
29918,
517,
12360,
29918,
271,
29918,
3283,
29892,
13,
1678,
3464,
29918,
3166,
29918,
6979,
29892,
13,
1678,
3464,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29892,
13,
1678,
5993,
675,
29918,
20897,
29892,
13,
29897,
13,
13,
361,
323,
6959,
29918,
3210,
16658,
4214,
29901,
13,
1678,
515,
6317,
20464,
1053,
6417,
327,
21233,
6004,
17830,
13,
13,
3166,
869,
4299,
29918,
20907,
1053,
8125,
10739,
29924,
861,
262,
13,
3166,
869,
20464,
29918,
1595,
1053,
6417,
327,
21233,
6004,
17830,
7439,
13,
13,
29918,
14683,
4062,
353,
8251,
519,
29961,
13,
1678,
518,
579,
29889,
28938,
29892,
3992,
6268,
29892,
20627,
1402,
13,
1678,
319,
10685,
519,
29961,
19986,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
20526,
13,
29962,
13,
13,
13,
1990,
6417,
327,
29954,
3747,
17830,
7439,
29898,
21860,
327,
21233,
6004,
17830,
7439,
29892,
8125,
10739,
29924,
861,
262,
1125,
13,
1678,
903,
21707,
353,
4522,
3460,
19124,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3847,
29901,
6417,
327,
21233,
6004,
17830,
29897,
1599,
6213,
29901,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
13,
4706,
3847,
29889,
16553,
29889,
15914,
29889,
1202,
29898,
1311,
29889,
15914,
29897,
13,
4706,
3847,
29889,
21382,
29889,
15914,
29889,
1202,
29898,
1311,
29889,
15914,
29897,
13,
13,
1678,
822,
903,
2886,
29918,
5696,
29898,
1311,
29892,
1067,
29879,
29901,
5167,
29961,
10773,
2314,
1599,
28379,
28513,
14683,
4062,
5387,
13,
4706,
565,
1067,
29879,
338,
8717,
29889,
28938,
29901,
13,
9651,
736,
6213,
13,
4706,
1158,
29918,
978,
353,
376,
16553,
27508,
718,
1067,
29879,
17255,
978,
1649,
13,
4706,
565,
756,
5552,
29898,
1311,
29892,
1158,
29918,
978,
1125,
13,
9651,
1158,
353,
679,
5552,
29898,
1311,
29892,
1158,
29918,
978,
29897,
13,
9651,
565,
1246,
519,
29898,
5696,
1125,
13,
18884,
736,
4320,
7373,
14683,
4062,
29892,
1158,
29897,
13,
4706,
363,
2967,
297,
1067,
29879,
17255,
29890,
2129,
1649,
29901,
13,
9651,
1158,
353,
1583,
3032,
2886,
29918,
5696,
29898,
3188,
29897,
13,
9651,
565,
1158,
29901,
13,
18884,
736,
4320,
7373,
14683,
4062,
29892,
1158,
29897,
13,
4706,
736,
6213,
13,
13,
1678,
732,
11675,
29918,
333,
703,
307,
7451,
4468,
1159,
13,
1678,
7465,
822,
6314,
29898,
13,
4706,
1583,
29892,
10004,
29901,
3139,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
1121,
29918,
18010,
353,
7272,
679,
29918,
18010,
29918,
271,
29918,
3283,
29898,
20675,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
4299,
29898,
3225,
511,
2602,
29897,
13,
13,
4706,
565,
451,
1121,
29918,
18010,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
1121,
29918,
3177,
353,
1121,
29918,
18010,
14352,
29896,
29962,
13,
13,
4706,
565,
1121,
29918,
3177,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
1158,
353,
1583,
3032,
2886,
29918,
5696,
29898,
1853,
29898,
2914,
29918,
3177,
876,
13,
4706,
565,
1158,
338,
451,
6213,
29901,
13,
9651,
1121,
353,
7272,
1158,
29898,
2914,
29918,
3177,
29892,
1842,
29892,
2602,
29897,
13,
9651,
565,
1121,
338,
451,
6213,
29901,
13,
18884,
736,
1121,
13,
13,
4706,
736,
7272,
1583,
3032,
16553,
29918,
4381,
29898,
2914,
29918,
18010,
29892,
1842,
29892,
2602,
29897,
13,
13,
1678,
7465,
822,
903,
16553,
29918,
4381,
29898,
13,
4706,
1583,
29892,
7573,
29901,
2391,
29961,
579,
29889,
28938,
1402,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
2754,
29889,
862,
2976,
1053,
25159,
408,
6417,
327,
6066,
13,
13,
4706,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
4706,
565,
7397,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
565,
451,
7573,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
2943,
353,
7573,
14352,
29896,
29962,
13,
13,
4706,
565,
451,
338,
8758,
29898,
3177,
29892,
11699,
29911,
554,
575,
1125,
13,
9651,
736,
6213,
13,
13,
4706,
18897,
353,
679,
29918,
517,
12360,
29918,
271,
29918,
3283,
29898,
3177,
29892,
2602,
29897,
13,
13,
4706,
363,
5993,
297,
18897,
29901,
13,
9651,
1018,
29901,
13,
18884,
363,
1014,
29918,
6979,
297,
4175,
29898,
13,
462,
1678,
14013,
269,
29901,
269,
29889,
1853,
1275,
6417,
327,
6066,
29889,
26865,
29902,
6181,
29892,
5993,
675,
29918,
20897,
29898,
6979,
29892,
11455,
29918,
12523,
29922,
5574,
29897,
13,
462,
1125,
13,
462,
1678,
3464,
353,
3464,
29918,
3166,
29918,
6979,
29898,
1491,
29918,
6979,
29897,
13,
13,
462,
1678,
565,
2602,
29889,
275,
29918,
262,
29918,
3881,
29898,
3881,
1125,
13,
462,
4706,
2286,
353,
7272,
7397,
29889,
2886,
29918,
11918,
29898,
1491,
29918,
6979,
29889,
1767,
29892,
7573,
29892,
2602,
29897,
13,
462,
4706,
565,
2286,
338,
451,
6213,
322,
2286,
29889,
4993,
29901,
13,
462,
9651,
736,
518,
13,
462,
18884,
17015,
6595,
29898,
13,
462,
462,
1678,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
3177,
29892,
1014,
29918,
6979,
511,
13,
462,
462,
1678,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
11918,
29889,
4993,
8243,
13,
462,
462,
1678,
3646,
29918,
3881,
29922,
11918,
29889,
3881,
3285,
13,
462,
462,
1678,
3646,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29898,
11918,
29889,
978,
29918,
6979,
29897,
13,
462,
462,
1678,
565,
2286,
29889,
978,
29918,
6979,
13,
462,
462,
1678,
1683,
2286,
29889,
3881,
3285,
13,
462,
18884,
1723,
13,
462,
9651,
4514,
13,
9651,
5174,
7399,
2451,
29901,
13,
18884,
1209,
13,
4706,
736,
6213,
13,
13,
1678,
7465,
822,
5023,
29918,
2558,
1742,
5594,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
2506,
261,
29889,
517,
12360,
1053,
25159,
408,
6417,
327,
6066,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
4299,
29889,
6112,
4110,
1053,
7670,
1742,
5594,
13,
13,
4706,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
4706,
565,
7397,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
9049,
29918,
3177,
353,
4320,
29898,
2558,
1742,
5594,
29892,
2943,
29897,
13,
4706,
1121,
353,
7272,
1583,
29889,
657,
29918,
26766,
1514,
29918,
392,
29918,
6979,
29918,
3166,
29918,
3283,
29898,
13,
9651,
9049,
29918,
3177,
29889,
26766,
29892,
13,
9651,
4320,
29898,
6066,
29892,
9049,
29918,
3177,
29889,
657,
29918,
6979,
29898,
21860,
327,
6066,
29889,
10818,
17013,
8243,
13,
9651,
518,
4384,
29898,
6066,
29892,
260,
29897,
363,
260,
297,
9049,
29918,
3177,
29889,
657,
29918,
517,
12360,
29898,
21860,
327,
6066,
29889,
1718,
29954,
5005,
3919,
29897,
1402,
13,
9651,
7397,
29892,
13,
9651,
2602,
29892,
13,
4706,
1723,
13,
13,
4706,
565,
1121,
338,
451,
6213,
322,
1121,
29961,
29900,
29962,
338,
451,
6213,
29901,
13,
9651,
2752,
353,
1121,
29961,
29900,
1822,
4993,
13,
9651,
565,
2752,
338,
451,
6213,
29901,
13,
18884,
736,
518,
13,
462,
1678,
17015,
6595,
29898,
13,
462,
4706,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
3177,
29892,
1121,
29961,
29896,
11724,
13,
462,
4706,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
4993,
8243,
13,
462,
4706,
3646,
29918,
3881,
29922,
2914,
29961,
29900,
1822,
3881,
29892,
13,
462,
4706,
3646,
29918,
21731,
29918,
3881,
29922,
2914,
29961,
29900,
1822,
3881,
29892,
13,
462,
1678,
1723,
13,
18884,
4514,
13,
13,
4706,
736,
6213,
13,
13,
1678,
7465,
822,
5023,
29918,
18800,
15546,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
2506,
261,
29889,
517,
12360,
1053,
25159,
408,
6417,
327,
6066,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
4299,
29889,
6112,
4110,
1053,
383,
29875,
15546,
13,
13,
4706,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
4706,
565,
7397,
338,
6213,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
5713,
15546,
29918,
3177,
353,
4320,
29898,
18800,
15546,
29892,
2943,
29897,
13,
4706,
1121,
353,
7272,
1583,
29889,
657,
29918,
26766,
1514,
29918,
392,
29918,
6979,
29918,
3166,
29918,
3283,
29898,
13,
9651,
5713,
15546,
29918,
3177,
29889,
978,
29892,
13,
9651,
4320,
29898,
6066,
29892,
5713,
15546,
29918,
3177,
29889,
657,
29918,
6979,
29898,
21860,
327,
6066,
29889,
5813,
8243,
13,
9651,
518,
4384,
29898,
6066,
29892,
260,
29897,
363,
260,
297,
5713,
15546,
29918,
3177,
29889,
657,
29918,
517,
12360,
29898,
21860,
327,
6066,
29889,
1718,
29954,
5005,
3919,
29897,
1402,
13,
9651,
7397,
29892,
13,
9651,
2602,
29892,
13,
4706,
1723,
13,
13,
4706,
565,
1121,
338,
451,
6213,
322,
1121,
29961,
29900,
29962,
338,
451,
6213,
29901,
13,
9651,
2752,
353,
1121,
29961,
29900,
1822,
4993,
13,
9651,
565,
2752,
338,
451,
6213,
29901,
13,
18884,
736,
518,
13,
462,
1678,
17015,
6595,
29898,
13,
462,
4706,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
3177,
29892,
1121,
29961,
29896,
11724,
13,
462,
4706,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
4993,
8243,
13,
462,
4706,
3646,
29918,
3881,
29922,
2914,
29961,
29900,
1822,
3881,
29892,
13,
462,
4706,
3646,
29918,
21731,
29918,
3881,
29922,
2914,
29961,
29900,
1822,
3881,
29892,
13,
462,
1678,
1723,
13,
18884,
4514,
13,
13,
4706,
736,
6213,
13,
13,
1678,
7465,
822,
903,
16553,
29918,
6733,
29918,
272,
29918,
3057,
6733,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
2506,
261,
29889,
517,
12360,
1053,
25159,
408,
6417,
327,
6066,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
4299,
29889,
6112,
4110,
1053,
25663,
29892,
4321,
6733,
13,
13,
4706,
2943,
353,
4320,
29898,
19986,
29961,
6733,
29892,
4321,
6733,
1402,
2943,
29897,
13,
4706,
565,
2943,
29889,
1767,
29901,
13,
13,
9651,
13553,
29918,
6979,
353,
4320,
29898,
21860,
327,
6066,
29892,
2943,
29889,
657,
29918,
6979,
29898,
21860,
327,
6066,
29889,
5813,
876,
13,
9651,
565,
13553,
29918,
6979,
338,
6213,
29901,
13,
18884,
736,
6213,
13,
13,
9651,
565,
2602,
29889,
275,
29918,
262,
29918,
3881,
29898,
3881,
29918,
3166,
29918,
6979,
29898,
26766,
29918,
6979,
22164,
13,
18884,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
18884,
565,
7397,
338,
6213,
29901,
13,
462,
1678,
736,
6213,
13,
13,
18884,
1121,
353,
7272,
7397,
29889,
2886,
29918,
26766,
29898,
3177,
29889,
1767,
29897,
13,
18884,
565,
1121,
338,
451,
6213,
322,
1121,
29889,
4993,
338,
451,
6213,
29901,
13,
462,
1678,
736,
518,
13,
462,
4706,
17015,
6595,
29898,
13,
462,
9651,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
3177,
29892,
13553,
29918,
6979,
511,
13,
462,
9651,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
2914,
29889,
4993,
8243,
13,
462,
9651,
3646,
29918,
3881,
29922,
2914,
29889,
3881,
29892,
13,
462,
9651,
3646,
29918,
21731,
29918,
3881,
29922,
2914,
29889,
3881,
29892,
13,
462,
4706,
1723,
13,
462,
1678,
4514,
13,
4706,
736,
6213,
13,
13,
1678,
7465,
822,
5023,
29918,
3057,
6733,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
736,
7272,
1583,
3032,
16553,
29918,
6733,
29918,
272,
29918,
3057,
6733,
29898,
3177,
29892,
1842,
29892,
2602,
29897,
13,
13,
1678,
7465,
822,
5023,
29918,
6733,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
736,
7272,
1583,
3032,
16553,
29918,
6733,
29918,
272,
29918,
3057,
6733,
29898,
3177,
29892,
1842,
29892,
2602,
29897,
13,
13,
1678,
7465,
822,
5023,
29918,
12284,
17518,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
2506,
261,
29889,
517,
12360,
1053,
25159,
408,
6417,
327,
6066,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
4299,
29889,
6112,
4110,
1053,
9538,
17518,
13,
13,
4706,
3489,
29918,
3177,
353,
4320,
29898,
12284,
17518,
29892,
2943,
29897,
13,
4706,
565,
3489,
29918,
3177,
29889,
978,
29901,
13,
13,
9651,
1024,
29918,
6979,
353,
4320,
29898,
21860,
327,
6066,
29892,
3489,
29918,
3177,
29889,
657,
29918,
6979,
29898,
21860,
327,
6066,
29889,
5813,
876,
13,
9651,
565,
1024,
29918,
6979,
338,
6213,
29901,
13,
18884,
736,
6213,
13,
13,
9651,
565,
2602,
29889,
275,
29918,
262,
29918,
3881,
29898,
3881,
29918,
3166,
29918,
6979,
29898,
978,
29918,
6979,
22164,
13,
18884,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
18884,
565,
7397,
338,
6213,
29901,
13,
462,
1678,
736,
6213,
13,
13,
18884,
1018,
29901,
13,
462,
1678,
4303,
1514,
353,
7272,
7397,
29889,
326,
4011,
29918,
12847,
29889,
657,
29918,
1982,
1514,
29918,
1454,
29918,
5258,
29918,
5215,
29898,
13,
462,
4706,
3489,
29918,
3177,
29889,
978,
29892,
3489,
29918,
3177,
29889,
5085,
29892,
851,
29898,
3225,
29889,
5338,
29889,
517,
29918,
2084,
2141,
3560,
29897,
13,
462,
1678,
1723,
13,
13,
462,
1678,
3017,
29918,
4993,
353,
4303,
1514,
29889,
4993,
29918,
272,
29918,
12574,
13,
462,
1678,
565,
3017,
29918,
4993,
338,
451,
6213,
29901,
13,
462,
4706,
736,
518,
13,
462,
9651,
17015,
6595,
29898,
13,
462,
18884,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
5258,
29918,
3177,
29892,
1024,
29918,
6979,
511,
13,
462,
18884,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
4691,
29918,
4993,
8243,
13,
462,
18884,
3646,
29918,
3881,
29922,
1982,
1514,
29889,
3881,
29892,
13,
462,
18884,
3646,
29918,
21731,
29918,
3881,
29922,
1982,
1514,
29889,
3881,
29892,
13,
462,
9651,
1723,
13,
462,
4706,
4514,
13,
18884,
5174,
7399,
2451,
29901,
13,
462,
1678,
1209,
13,
4706,
736,
6213,
13,
13,
1678,
7465,
822,
5023,
29918,
6848,
17518,
29898,
29871,
396,
694,
25621,
29901,
405,
29947,
29900,
29906,
13,
4706,
1583,
29892,
2943,
29901,
8717,
29889,
28938,
29892,
1842,
29901,
3992,
6268,
29892,
2602,
29901,
20627,
13,
1678,
1723,
1599,
7761,
29961,
6508,
29892,
2391,
29961,
6508,
1402,
2391,
29961,
6508,
6595,
1402,
6213,
5387,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
2506,
261,
29889,
517,
12360,
1053,
25159,
408,
6417,
327,
6066,
13,
4706,
515,
19964,
29889,
862,
2976,
29889,
4299,
29889,
6112,
4110,
1053,
18981,
17518,
13,
13,
4706,
6503,
29918,
3177,
353,
4320,
29898,
6848,
17518,
29892,
2943,
29897,
13,
4706,
565,
6503,
29918,
3177,
29889,
978,
29901,
13,
13,
9651,
1024,
29918,
6979,
353,
4320,
29898,
21860,
327,
6066,
29892,
6503,
29918,
3177,
29889,
657,
29918,
6979,
29898,
21860,
327,
6066,
29889,
5813,
876,
13,
9651,
565,
1024,
29918,
6979,
338,
6213,
29901,
13,
18884,
736,
6213,
13,
13,
9651,
565,
2602,
29889,
275,
29918,
262,
29918,
3881,
29898,
3881,
29918,
3166,
29918,
6979,
29898,
978,
29918,
6979,
22164,
13,
18884,
7397,
353,
7272,
1583,
29889,
3560,
29889,
3225,
29879,
29918,
8173,
29889,
657,
29918,
22377,
29898,
3225,
29897,
13,
18884,
565,
7397,
338,
6213,
29901,
13,
462,
1678,
736,
6213,
13,
13,
18884,
1018,
29901,
13,
462,
1678,
4303,
1514,
353,
7272,
7397,
29889,
326,
4011,
29918,
12847,
29889,
657,
29918,
1982,
1514,
29918,
1454,
29918,
10314,
29918,
5215,
29898,
13,
462,
4706,
6503,
29918,
3177,
29889,
978,
29892,
851,
29898,
3225,
29889,
5338,
29889,
517,
29918,
2084,
2141,
3560,
29897,
13,
462,
1678,
1723,
13,
13,
462,
1678,
3017,
29918,
4993,
353,
4303,
1514,
29889,
4993,
29918,
272,
29918,
12574,
13,
462,
1678,
565,
3017,
29918,
4993,
338,
451,
6213,
29901,
13,
462,
4706,
736,
518,
13,
462,
9651,
17015,
6595,
29898,
13,
462,
18884,
3978,
29918,
21731,
29918,
3881,
29922,
3881,
29918,
3166,
29918,
6979,
29918,
272,
29918,
3177,
29898,
10314,
29918,
3177,
29892,
1024,
29918,
6979,
511,
13,
462,
18884,
3646,
29918,
5338,
29922,
710,
29898,
14702,
29889,
3166,
29918,
2084,
29898,
4691,
29918,
4993,
8243,
13,
462,
18884,
3646,
29918,
3881,
29922,
1982,
1514,
29889,
3881,
29892,
13,
462,
18884,
3646,
29918,
21731,
29918,
3881,
29922,
1982,
1514,
29889,
3881,
29892,
13,
462,
9651,
1723,
13,
462,
4706,
4514,
13,
18884,
5174,
7399,
2451,
29901,
13,
462,
1678,
1209,
13,
4706,
736,
6213,
13,
2
] |
setup.py | molML/MoleculeACE | 9 | 76186 | from setuptools import setup
setup(
name='MoleculeACE',
version='1.0.9',
packages=['MoleculeACE', 'MoleculeACE.ML', 'MoleculeACE.CNN', 'MoleculeACE.MLP', 'MoleculeACE.GNN',
'MoleculeACE.GNN.data', 'MoleculeACE.GNN.models', 'MoleculeACE.GNN.models.optimization',
'MoleculeACE.LSTM', 'MoleculeACE.benchmark', 'MoleculeACE.benchmark.utils',
'MoleculeACE.benchmark.models', 'MoleculeACE.benchmark.evaluation',
'MoleculeACE.benchmark.data_processing', 'MoleculeACE.benchmark.data_processing.preprocessing',
'MoleculeACE.Data',
'MoleculeACE.Data.benchmark_data',
'MoleculeACE.Data.benchmark_data.train',
'MoleculeACE.Data.benchmark_data.test',
'MoleculeACE.Data.configures.benchmark',
'MoleculeACE.Data.configures.default',
'MoleculeACE.Data.configures',
'MoleculeACE.Data.configures.benchmark.CHEMBL4203_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL2034_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL233_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL4616_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL287_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL218_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL264_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL219_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL2835_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL2147_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL231_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL3979_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL237_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL244_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL4792_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL1871_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL237_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL262_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL2047_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL239_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL2971_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL204_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL214_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL1862_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL234_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL238_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL235_EC50',
'MoleculeACE.Data.configures.benchmark.CHEMBL4005_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL236_Ki',
'MoleculeACE.Data.configures.benchmark.CHEMBL228_Ki'
],
url='https://github.com/derekvantilborg/MoleculeACE',
license='MIT',
author='<NAME>',
author_email='<EMAIL>',
description='MoleculeACE',
install_requires=[
'tqdm',
'requests',
'twine',
'importlib-metadata',
'pandas',
'numpy',
'chembl_webresource_client',
'scikit-learn',
'matplotlib',
'python-Levenshtein',
'progress',
'rdkit-pypi'
],
include_package_data=True,
package_data={'': ['Data/*',
'Data/benchmark_data/*',
'Data/benchmark_data/test/*',
'Data/benchmark_data/train/*',
'Data/configures/*',
'Data/configures/default/*',
'Data/configures/benchmark/*',
'Data/configures/benchmark/CHEMBL4203_Ki/*',
'Data/configures/benchmark/CHEMBL2034_Ki/*',
'Data/configures/benchmark/CHEMBL233_Ki/*',
'Data/configures/benchmark/CHEMBL4616_EC50/*',
'Data/configures/benchmark/CHEMBL287_Ki/*',
'Data/configures/benchmark/CHEMBL218_EC50/*',
'Data/configures/benchmark/CHEMBL264_Ki/*',
'Data/configures/benchmark/CHEMBL219_Ki/*',
'Data/configures/benchmark/CHEMBL2835_Ki/*',
'Data/configures/benchmark/CHEMBL2147_Ki/*',
'Data/configures/benchmark/CHEMBL231_Ki/*',
'Data/configures/benchmark/CHEMBL3979_EC50/*',
'Data/configures/benchmark/CHEMBL237_EC50/*',
'Data/configures/benchmark/CHEMBL244_Ki/*',
'Data/configures/benchmark/CHEMBL4792_Ki/*',
'Data/configures/benchmark/CHEMBL1871_Ki/*',
'Data/configures/benchmark/CHEMBL237_Ki/*',
'Data/configures/benchmark/CHEMBL262_Ki/*',
'Data/configures/benchmark/CHEMBL2047_EC50/*',
'Data/configures/benchmark/CHEMBL239_EC50/*',
'Data/configures/benchmark/CHEMBL2971_Ki/*',
'Data/configures/benchmark/CHEMBL204_Ki/*',
'Data/configures/benchmark/CHEMBL214_Ki/*',
'Data/configures/benchmark/CHEMBL1862_Ki/*',
'Data/configures/benchmark/CHEMBL234_Ki/*',
'Data/configures/benchmark/CHEMBL238_Ki/*',
'Data/configures/benchmark/CHEMBL235_EC50/*',
'Data/configures/benchmark/CHEMBL4005_Ki/*',
'Data/configures/benchmark/CHEMBL236_Ki/*',
'Data/configures/benchmark/CHEMBL228_Ki/*'
]}
)
| [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
29924,
1772,
29883,
1297,
11538,
742,
13,
1678,
1873,
2433,
29896,
29889,
29900,
29889,
29929,
742,
13,
1678,
9741,
29922,
1839,
29924,
1772,
29883,
1297,
11538,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1988,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29907,
10262,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1988,
29925,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29954,
10262,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29954,
10262,
29889,
1272,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29954,
10262,
29889,
9794,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29954,
10262,
29889,
9794,
29889,
20640,
2133,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
29931,
1254,
29924,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
29889,
13239,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
29889,
9794,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
29889,
24219,
362,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
29889,
1272,
29918,
19170,
742,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1785,
16580,
29889,
1272,
29918,
19170,
29889,
1457,
19170,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
1785,
16580,
29918,
1272,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
1785,
16580,
29918,
1272,
29889,
14968,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
1785,
16580,
29918,
1272,
29889,
1688,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
4381,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29946,
29906,
29900,
29941,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29900,
29941,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29941,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29946,
29953,
29896,
29953,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29947,
29955,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29896,
29947,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29953,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29896,
29929,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29947,
29941,
29945,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29896,
29946,
29955,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29896,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29941,
29929,
29955,
29929,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29955,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29946,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29946,
29955,
29929,
29906,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29896,
29947,
29955,
29896,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29955,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29953,
29906,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29900,
29946,
29955,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29929,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29929,
29955,
29896,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29900,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29896,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29896,
29947,
29953,
29906,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29946,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29947,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29945,
29918,
11206,
29945,
29900,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29946,
29900,
29900,
29945,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29941,
29953,
29918,
29968,
29875,
742,
13,
795,
525,
29924,
1772,
29883,
1297,
11538,
29889,
1469,
29889,
2917,
1973,
29889,
1785,
16580,
29889,
3210,
29923,
9486,
29931,
29906,
29906,
29947,
29918,
29968,
29875,
29915,
13,
795,
21251,
13,
1678,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
29881,
20400,
29894,
424,
309,
14203,
29914,
29924,
1772,
29883,
1297,
11538,
742,
13,
1678,
19405,
2433,
26349,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
6139,
2433,
29924,
1772,
29883,
1297,
11538,
742,
13,
1678,
2601,
29918,
276,
339,
2658,
11759,
13,
9651,
525,
29873,
29939,
18933,
742,
13,
9651,
525,
24830,
742,
13,
9651,
525,
7516,
457,
742,
13,
9651,
525,
5215,
1982,
29899,
19635,
742,
13,
9651,
525,
15112,
742,
13,
9651,
525,
23749,
742,
13,
9651,
525,
305,
13365,
29918,
2676,
10314,
29918,
4645,
742,
13,
9651,
525,
26167,
7354,
29899,
19668,
742,
13,
9651,
525,
2922,
17357,
742,
13,
9651,
525,
4691,
29899,
3226,
9852,
29882,
371,
262,
742,
13,
9651,
525,
18035,
742,
13,
9651,
525,
5499,
7354,
29899,
29886,
1478,
29875,
29915,
13,
4706,
21251,
13,
1678,
3160,
29918,
5113,
29918,
1272,
29922,
5574,
29892,
13,
1678,
3577,
29918,
1272,
3790,
29915,
2396,
6024,
1469,
5515,
742,
13,
462,
539,
525,
1469,
29914,
1785,
16580,
29918,
1272,
5515,
742,
13,
462,
539,
525,
1469,
29914,
1785,
16580,
29918,
1272,
29914,
1688,
5515,
742,
13,
462,
539,
525,
1469,
29914,
1785,
16580,
29918,
1272,
29914,
14968,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
4381,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29946,
29906,
29900,
29941,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29900,
29941,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29941,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29946,
29953,
29896,
29953,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29947,
29955,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29896,
29947,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29953,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29896,
29929,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29947,
29941,
29945,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29896,
29946,
29955,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29896,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29941,
29929,
29955,
29929,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29955,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29946,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29946,
29955,
29929,
29906,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29896,
29947,
29955,
29896,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29955,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29953,
29906,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29900,
29946,
29955,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29929,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29929,
29955,
29896,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29900,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29896,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29896,
29947,
29953,
29906,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29946,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29947,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29945,
29918,
11206,
29945,
29900,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29946,
29900,
29900,
29945,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29941,
29953,
29918,
29968,
29875,
5515,
742,
13,
462,
539,
525,
1469,
29914,
2917,
1973,
29914,
1785,
16580,
29914,
3210,
29923,
9486,
29931,
29906,
29906,
29947,
29918,
29968,
29875,
5515,
29915,
13,
462,
539,
4514,
29913,
13,
29897,
13,
2
] |
setup.py | darrylcousins/nzrealme | 1 | 64473 | <filename>setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
requirements = [
'M2Crypto==0.22.3',
'dm.xmlsec.binding==1.3.1',
'isodate==0.5.0',
'defusedxml==0.4.1',
'python-saml',
]
test_requirements = [
'pytest',
'flake8',
'sphinx'
]
setup(
name='nzrealme',
version='0.1.0',
description='NZ RealMe python package',
long_description=readme + '\n\n' + history,
author='<NAME>',
author_email='<EMAIL>',
url='https://github.com/darrylcousins/nzrealme',
packages=[
'nzrealme',
],
package_dir={'nzrealme':
'nzrealme'},
include_package_data=True,
install_requires=requirements,
license="BSD",
zip_safe=False,
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
test_suite='tests',
tests_require=test_requirements,
keywords='saml saml2 xmlsec realme nzrealme',
)
| [
1,
529,
9507,
29958,
14669,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
2202,
29901,
13,
1678,
515,
731,
21245,
8789,
1053,
6230,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
1320,
13239,
29889,
3221,
1053,
6230,
13,
13,
13,
949,
1004,
353,
1722,
877,
16310,
2303,
29889,
29878,
303,
2824,
949,
580,
13,
18434,
353,
1722,
877,
29950,
9047,
18929,
29889,
29878,
303,
2824,
949,
2141,
6506,
877,
636,
584,
305,
9477,
468,
29901,
742,
27255,
13,
13,
12277,
1860,
353,
518,
13,
1678,
525,
29924,
29906,
29907,
17929,
1360,
29900,
29889,
29906,
29906,
29889,
29941,
742,
13,
1678,
525,
18933,
29889,
3134,
3471,
29889,
19672,
1360,
29896,
29889,
29941,
29889,
29896,
742,
13,
1678,
525,
275,
397,
403,
1360,
29900,
29889,
29945,
29889,
29900,
742,
13,
1678,
525,
1753,
3880,
3134,
1360,
29900,
29889,
29946,
29889,
29896,
742,
13,
1678,
525,
4691,
29899,
29879,
8807,
742,
13,
29962,
13,
13,
1688,
29918,
12277,
1860,
353,
518,
13,
1678,
525,
2272,
1688,
742,
13,
1678,
525,
29888,
433,
446,
29947,
742,
13,
1678,
525,
29879,
561,
14668,
29915,
13,
29962,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
29876,
29920,
6370,
1004,
742,
13,
1678,
1873,
2433,
29900,
29889,
29896,
29889,
29900,
742,
13,
1678,
6139,
2433,
29940,
29999,
8195,
6816,
3017,
3577,
742,
13,
1678,
1472,
29918,
8216,
29922,
949,
1004,
718,
11297,
29876,
29905,
29876,
29915,
718,
4955,
29892,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
16702,
719,
29880,
29883,
681,
1144,
29914,
29876,
29920,
6370,
1004,
742,
13,
1678,
9741,
11759,
13,
4706,
525,
29876,
29920,
6370,
1004,
742,
13,
1678,
21251,
13,
1678,
3577,
29918,
3972,
3790,
29915,
29876,
29920,
6370,
1004,
2396,
13,
462,
525,
29876,
29920,
6370,
1004,
16675,
13,
1678,
3160,
29918,
5113,
29918,
1272,
29922,
5574,
29892,
13,
1678,
2601,
29918,
276,
339,
2658,
29922,
12277,
1860,
29892,
13,
1678,
19405,
543,
29933,
7230,
613,
13,
1678,
14319,
29918,
11177,
29922,
8824,
29892,
13,
1678,
770,
14903,
11759,
13,
4706,
525,
21956,
358,
16034,
4761,
29871,
29906,
448,
4721,
29899,
28630,
742,
13,
4706,
525,
2928,
2760,
319,
4749,
663,
4761,
10682,
414,
742,
13,
4706,
525,
29931,
293,
1947,
4761,
438,
5425,
28268,
1490,
4761,
350,
7230,
19245,
742,
13,
4706,
525,
29940,
18771,
17088,
4761,
4223,
742,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29906,
29889,
29955,
742,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
742,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29941,
742,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29946,
742,
13,
1678,
21251,
13,
1678,
1243,
29918,
13495,
2433,
21150,
742,
13,
1678,
6987,
29918,
12277,
29922,
1688,
29918,
12277,
1860,
29892,
13,
1678,
29361,
2433,
29879,
8807,
3514,
29880,
29906,
4903,
3471,
1855,
1004,
302,
29920,
6370,
1004,
742,
13,
29897,
13,
2
] |
access/__init__.py | dmcgrath/starmade-blueprint-library | 6 | 156742 | <gh_stars>1-10
from user import *
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
1404,
1053,
334,
13,
2
] |
django_postgres_drop_index/utils.py | andrewp-as-is/django-postgres-drop-index.py | 1 | 172281 | <gh_stars>1-10
from django.db import connection
from .classes import Index
def get_indexes():
sql = """
SELECT n.nspname AS schemaname,t.relname AS tablename,c.relname AS indexname
from pg_catalog.pg_class c
JOIN pg_catalog.pg_namespace n on n.oid = c.relnamespace
JOIN pg_catalog.pg_index i on i.indexrelid = c.oid
JOIN pg_catalog.pg_class t on i.indrelid = t.oid
WHERE
c.relkind = 'i' AND NOT i.indisprimary AND NOT i.indisunique
AND n.nspname not in ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid)
ORDER BY n.nspname,t.relname,c.relname;
"""
cursor = connection.cursor()
cursor.execute(sql.strip())
indexes = []
for r in cursor.fetchall():
schemaname, tablename, indexname = r
index = Index(schemaname, tablename, indexname)
indexes.append(index)
return indexes
def drop_index(indexname, schemaname=None):
if not schemaname:
schemaname = 'public'
sql = """DROP INDEX IF EXISTS "%s"."%s" CASCADE;""" % (
schemaname, indexname)
cursor = connection.cursor()
print(sql.strip())
cursor.execute(sql.strip())
def drop_table_indexes(tablename, schemaname=None):
if not schemaname:
schemaname = 'public'
for index in get_indexes():
if index.schemaname == schemaname and index.tablename == tablename:
drop_index(indexname=index.indexname, schemaname=index.schemaname)
def drop_schema_indexes(schemaname):
for index in get_indexes():
if index.schemaname == schemaname:
drop_index(indexname=index.indexname, schemaname=index.schemaname)
def drop_all_indexes():
for index in get_indexes():
drop_index(indexname=index.indexname, schemaname=index.schemaname)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
9557,
29889,
2585,
1053,
3957,
13,
13,
3166,
869,
13203,
1053,
11374,
13,
13,
13,
1753,
679,
29918,
2248,
267,
7295,
13,
1678,
4576,
353,
9995,
13,
6404,
302,
29889,
29876,
1028,
978,
3339,
1364,
11422,
420,
29892,
29873,
29889,
2674,
978,
3339,
4434,
2435,
420,
29892,
29883,
29889,
2674,
978,
3339,
2380,
978,
13,
3166,
23822,
29918,
28045,
29889,
4061,
29918,
1990,
274,
13,
29967,
6992,
23822,
29918,
28045,
29889,
4061,
29918,
22377,
302,
373,
302,
29889,
3398,
353,
274,
29889,
2674,
22377,
13,
29967,
6992,
23822,
29918,
28045,
29889,
4061,
29918,
2248,
474,
373,
474,
29889,
2248,
2674,
333,
353,
274,
29889,
3398,
13,
29967,
6992,
23822,
29918,
28045,
29889,
4061,
29918,
1990,
260,
373,
474,
29889,
513,
2674,
333,
259,
353,
260,
29889,
3398,
13,
22043,
13,
1678,
274,
29889,
2674,
14380,
353,
525,
29875,
29915,
5300,
6058,
474,
29889,
513,
275,
16072,
5300,
6058,
474,
29889,
513,
275,
13092,
13,
1678,
5300,
302,
29889,
29876,
1028,
978,
451,
297,
6702,
4061,
29918,
28045,
742,
525,
4061,
29918,
517,
579,
1495,
13,
1678,
5300,
23822,
29918,
28045,
29889,
4061,
29918,
2371,
29918,
275,
29918,
12872,
29898,
29883,
29889,
3398,
29897,
13,
22364,
6770,
302,
29889,
29876,
1028,
978,
29892,
29873,
29889,
2674,
978,
29892,
29883,
29889,
2674,
978,
29936,
13,
1678,
9995,
13,
1678,
10677,
353,
3957,
29889,
18127,
580,
13,
1678,
10677,
29889,
7978,
29898,
2850,
29889,
17010,
3101,
13,
1678,
18111,
353,
5159,
13,
1678,
363,
364,
297,
10677,
29889,
9155,
497,
7295,
13,
4706,
1364,
11422,
420,
29892,
4434,
2435,
420,
29892,
2380,
978,
353,
364,
13,
4706,
2380,
353,
11374,
29898,
816,
11422,
420,
29892,
4434,
2435,
420,
29892,
2380,
978,
29897,
13,
4706,
18111,
29889,
4397,
29898,
2248,
29897,
13,
1678,
736,
18111,
13,
13,
13,
1753,
5768,
29918,
2248,
29898,
2248,
978,
29892,
1364,
11422,
420,
29922,
8516,
1125,
13,
1678,
565,
451,
1364,
11422,
420,
29901,
13,
4706,
1364,
11422,
420,
353,
525,
3597,
29915,
13,
1678,
4576,
353,
9995,
29928,
29366,
2672,
19577,
10762,
28731,
11860,
29879,
29908,
1213,
29995,
29879,
29908,
315,
3289,
5454,
2287,
15458,
15945,
1273,
313,
13,
4706,
1364,
11422,
420,
29892,
2380,
978,
29897,
13,
1678,
10677,
353,
3957,
29889,
18127,
580,
13,
1678,
1596,
29898,
2850,
29889,
17010,
3101,
13,
1678,
10677,
29889,
7978,
29898,
2850,
29889,
17010,
3101,
13,
13,
13,
1753,
5768,
29918,
2371,
29918,
2248,
267,
29898,
3891,
2435,
420,
29892,
1364,
11422,
420,
29922,
8516,
1125,
13,
1678,
565,
451,
1364,
11422,
420,
29901,
13,
4706,
1364,
11422,
420,
353,
525,
3597,
29915,
13,
1678,
363,
2380,
297,
679,
29918,
2248,
267,
7295,
13,
4706,
565,
2380,
29889,
816,
11422,
420,
1275,
1364,
11422,
420,
322,
2380,
29889,
3891,
2435,
420,
1275,
4434,
2435,
420,
29901,
13,
9651,
5768,
29918,
2248,
29898,
2248,
978,
29922,
2248,
29889,
2248,
978,
29892,
1364,
11422,
420,
29922,
2248,
29889,
816,
11422,
420,
29897,
13,
13,
13,
1753,
5768,
29918,
11010,
29918,
2248,
267,
29898,
816,
11422,
420,
1125,
13,
1678,
363,
2380,
297,
679,
29918,
2248,
267,
7295,
13,
4706,
565,
2380,
29889,
816,
11422,
420,
1275,
1364,
11422,
420,
29901,
13,
9651,
5768,
29918,
2248,
29898,
2248,
978,
29922,
2248,
29889,
2248,
978,
29892,
1364,
11422,
420,
29922,
2248,
29889,
816,
11422,
420,
29897,
13,
13,
13,
1753,
5768,
29918,
497,
29918,
2248,
267,
7295,
13,
1678,
363,
2380,
297,
679,
29918,
2248,
267,
7295,
13,
4706,
5768,
29918,
2248,
29898,
2248,
978,
29922,
2248,
29889,
2248,
978,
29892,
1364,
11422,
420,
29922,
2248,
29889,
816,
11422,
420,
29897,
13,
2
] |
joplin/base/signals/janis_build_triggers.py | cityofaustin/joplin | 15 | 1601521 | import requests, json
from datetime import datetime
from pytz import timezone
from django.conf import settings
from django.dispatch import receiver
from django.db.models.signals import post_save, post_delete
from wagtail.core.signals import page_published, page_unpublished
from graphene import Node
from wagtail.core.models import Page
from wagtail.admin.models import get_object_usage
from rest_framework_api_key.models import APIKey
from snippets.contact.models import Contact
from pages.guide_page.models import GuidePage
from wagtail.documents.models import Document
from pages.home_page.models import HomePage
import logging
logger = logging.getLogger('joplin')
'''
Gets data from a page that is required to send to the Publisher.
returns {
id: Int, the page_id used by wagtail.
global_id: String, a hashed id used to query against graphql api
triggered_build: Boolean, was this the page that triggered the publish request?
action:
"published" - publish action for itself and other pages
"unpublished" - this page triggered the unpublish action for itself and other pages
"updated_by_snippet" - this page was updated by a snippet being saved or deleted
"saved" - a snippet is being saved, has no impact on Janis itself, but it could result in pages getting "secondary_publish_by_snippet"
"deleted" - a snippet is being deleted, has no impact on Janis itself, but it could result in pages getting "secondary_publish_by_snippet"
is_page: Boolean, is it a page as opposed to a snippet?
content_type: String, which specific content_type (this is more for logging)
author: Int, the id of the author of the latest revision
}
TODO: Figure out what format global_id should be in order to run queries with it.
The current global_id is basically a placeholder.
'''
def get_page_data(page, triggered_build, action):
latest_revision = page.get_latest_revision()
# imported pages may not have a latest_revision yet.
if latest_revision and latest_revision.user:
author = latest_revision.user.id
else:
author = None
return {
"id": page.id,
"global_id": Node.to_global_id(page.content_type.name, page.id),
"triggered_build": triggered_build,
"action": action,
"is_page": True,
"content_type": page.specific_class.get_verbose_name(),
"author": author,
}
def collect_pages(primary_page, action):
# does this work on page deletion? pages arent deleted right, just unpublished?
"""
:param primary_page: the page that triggered the publish/unpublish
:return: pages: an array of the data from all pages impacted by the publish/unpublish event
"""
pages = [
get_page_data(primary_page, True, action)
]
primary_id = primary_page.id
primary_content_type = primary_page.specific_class.get_verbose_name()
page_set = get_object_usage(primary_page)
# https://github.com/wagtail/wagtail/blob/master/wagtail/admin/models.py#L15
# get_object_usage will also return the wagtail_page itself
for page in page_set:
# Primary page is also included in page_set. Don't re-add primary_page data.
if not (page.id == primary_id):
pages.append(get_page_data(page, False, action))
if primary_content_type == 'Service Page' or primary_content_type == 'Information Page':
guide_page_data = get_page_data_from_guides(primary_id, action)
pages.extend(guide_page_data)
return pages
def collect_pages_from_snippet(instance, action):
"""
:param instance: the snippet that has been altered
:return: an array of global page ids
"""
snippet_data = {
"id": instance.id,
"global_id": None,
"triggered_build": True,
"action": action,
"is_page": False,
"content_type": instance.__class__.__name__,
"author": None, # TODO: is there a way to get the last editor of a snippet?
}
pages = [snippet_data]
page_set = instance.get_usage()
for page in page_set:
pages.append(get_page_data(page, False, "updated_by_snippet"))
return pages
def get_page_data_from_guides(changed_id, action):
"""
Service Pages and information Pages don't know they are on Guides. So what happens if one is updated?
Until we know better, this will go through all our guide pages and check if the page that is changed is in
one of the guide's sections
:param changed_id: id of the page that was published / unpublished
:return: page_data for Guide Pages that include that page
"""
pages = []
all_guides = GuidePage.objects.all()
for g in all_guides:
for s in g.sections:
# s.value.items() is an ordered dict
list_of_values = list(s.value.items())
# the pages are the 5th tuple
section_pages = list_of_values[4][1]
for page in section_pages:
if changed_id == page.id:
pages.append(get_page_data(g, False, action))
return pages
@receiver(page_published)
def page_published_signal(sender, **kwargs):
# for the future, setting up a way to check if the title changed
# https://stackoverflow.com/questions/1355150/when-saving-how-can-you-check-if-a-field-has-changed
# because if the title didnt change, pages that contain links to the published page don't need to be updated
action = "published"
primary_page = Page.objects.get(id=kwargs['instance'].id)
pages = collect_pages(primary_page, action)
publish(pages, primary_page)
@receiver(page_unpublished)
def page_unpublished_signal(sender, **kwargs):
action = "unpublished"
primary_page = Page.objects.get(id=kwargs['instance'].id)
pages = collect_pages(primary_page, action)
publish(pages, primary_page)
# TODO: we can probably feed a list of models to attach the hook to
# more ideas here
# we might want to log but not trigger a build? need some sort of queue
@receiver(post_save, sender=Document)
@receiver(post_save, sender=Contact)
def handle_post_save_signal(sender, **kwargs):
action = "saved"
pages = collect_pages_from_snippet(kwargs['instance'], action)
publish(pages)
@receiver(post_delete, sender=Document)
@receiver(post_delete, sender=Contact)
def handle_post_delete_signal(sender, **kwargs):
action = "deleted"
pages = collect_pages_from_snippet(kwargs['instance'], action)
publish(pages)
def publish(pages, primary_page=None):
if settings.MOCK_PUBLISH and primary_page:
update_primary_page(primary_page, "mock_pk", "mock_sk")
return
if not settings.PUBLISH_ENABLED:
return
# TODO: we want to extract the publish_janis_branch() for each page_id that we're publishing (for example, if we start publishing to different sites).
# That logic must happen earlier in the collect_pages logic.
# Even though this will work for now, it should not be hardcoded to be the first HomePage object.
publish_janis_branch = HomePage.objects.first().publish_janis_branch()
if not publish_janis_branch:
logger.info("publish_janis_branch must be set in order to publish.")
return None
api_key = APIKey.objects.create_key(
name=f"publisher-{datetime.now(timezone('US/Central')).isoformat()}"
)[1]
headers = {
"x-api-key": settings.PUBLISHER_V2_API_KEY,
"content-type": "application/json",
}
url = settings.PUBLISHER_V2_URL
data = {
"janis_branch": publish_janis_branch,
"pages": pages,
"joplin_appname": settings.APPNAME,
"api_key": api_key,
"env_vars": {
"REACT_STATIC_PREFETCH_RATE": "0",
},
"build_type": "rebuild",
}
res = requests.post(url, data=json.dumps(data), headers=headers)
if res.status_code != 200:
logger.error(f"publish_request failed with status {res.status_code}")
logger.error(f"message: {res.json()['message']}")
elif primary_page:
res_data = res.json()
publish_request_pk = res_data['pk']
publish_request_sk = res_data['sk']
update_primary_page(primary_page, publish_request_pk, publish_request_sk)
def update_primary_page(primary_page, publish_request_pk, publish_request_sk):
primary_page = primary_page.specific
primary_page.publish_request_pk = publish_request_pk
primary_page.publish_request_sk = publish_request_sk
primary_page.publish_request_enqueued = True
logger.info(f"published() pk={publish_request_pk}, sk={publish_request_sk}")
primary_page.save()
| [
1,
1053,
7274,
29892,
4390,
13,
3166,
12865,
1053,
12865,
13,
3166,
282,
3637,
29920,
1053,
29431,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
13369,
1053,
19870,
13,
3166,
9557,
29889,
2585,
29889,
9794,
29889,
4530,
1338,
1053,
1400,
29918,
7620,
29892,
1400,
29918,
8143,
13,
3166,
281,
351,
18237,
29889,
3221,
29889,
4530,
1338,
1053,
1813,
29918,
5467,
3726,
29892,
1813,
29918,
348,
5467,
3726,
13,
3166,
3983,
1600,
1053,
9071,
13,
3166,
281,
351,
18237,
29889,
3221,
29889,
9794,
1053,
9305,
13,
3166,
281,
351,
18237,
29889,
6406,
29889,
9794,
1053,
679,
29918,
3318,
29918,
21125,
13,
3166,
1791,
29918,
4468,
29918,
2754,
29918,
1989,
29889,
9794,
1053,
3450,
2558,
13,
13,
3166,
9830,
27421,
29889,
12346,
29889,
9794,
1053,
22387,
13,
3166,
6515,
29889,
13075,
29918,
3488,
29889,
9794,
1053,
16886,
5074,
13,
3166,
281,
351,
18237,
29889,
3225,
29879,
29889,
9794,
1053,
10854,
13,
3166,
6515,
29889,
5184,
29918,
3488,
29889,
9794,
1053,
8778,
5074,
13,
13,
13,
5215,
12183,
13,
21707,
353,
12183,
29889,
657,
16363,
877,
29926,
459,
1915,
1495,
13,
13,
13,
12008,
13,
29954,
1691,
848,
515,
263,
1813,
393,
338,
3734,
304,
3638,
304,
278,
12904,
261,
29889,
13,
13,
18280,
426,
13,
1678,
1178,
29901,
3159,
29892,
278,
1813,
29918,
333,
1304,
491,
281,
351,
18237,
29889,
13,
1678,
5534,
29918,
333,
29901,
1714,
29892,
263,
6608,
287,
1178,
1304,
304,
2346,
2750,
3983,
1519,
7882,
13,
1678,
19799,
29918,
4282,
29901,
11185,
29892,
471,
445,
278,
1813,
393,
19799,
278,
9805,
2009,
29973,
13,
1678,
3158,
29901,
13,
4706,
376,
5467,
3726,
29908,
448,
9805,
3158,
363,
3528,
322,
916,
6515,
13,
4706,
376,
348,
5467,
3726,
29908,
448,
445,
1813,
19799,
278,
443,
23679,
3158,
363,
3528,
322,
916,
6515,
13,
4706,
376,
21402,
29918,
1609,
29918,
29879,
1240,
7988,
29908,
448,
445,
1813,
471,
4784,
491,
263,
11534,
1641,
7160,
470,
11132,
13,
4706,
376,
17314,
29908,
448,
263,
11534,
338,
1641,
7160,
29892,
756,
694,
10879,
373,
2627,
275,
3528,
29892,
541,
372,
1033,
1121,
297,
6515,
2805,
376,
7496,
653,
29918,
23679,
29918,
1609,
29918,
29879,
1240,
7988,
29908,
13,
4706,
376,
311,
22742,
29908,
448,
263,
11534,
338,
1641,
11132,
29892,
756,
694,
10879,
373,
2627,
275,
3528,
29892,
541,
372,
1033,
1121,
297,
6515,
2805,
376,
7496,
653,
29918,
23679,
29918,
1609,
29918,
29879,
1240,
7988,
29908,
13,
1678,
338,
29918,
3488,
29901,
11185,
29892,
338,
372,
263,
1813,
408,
15869,
304,
263,
11534,
29973,
13,
1678,
2793,
29918,
1853,
29901,
1714,
29892,
607,
2702,
2793,
29918,
1853,
313,
1366,
338,
901,
363,
12183,
29897,
13,
1678,
4148,
29901,
3159,
29892,
278,
1178,
310,
278,
4148,
310,
278,
9281,
26554,
13,
29913,
13,
4986,
3970,
29901,
11479,
714,
825,
3402,
5534,
29918,
333,
881,
367,
297,
1797,
304,
1065,
9365,
411,
372,
29889,
13,
1576,
1857,
5534,
29918,
333,
338,
8830,
263,
12983,
29889,
13,
12008,
13,
1753,
679,
29918,
3488,
29918,
1272,
29898,
3488,
29892,
19799,
29918,
4282,
29892,
3158,
1125,
13,
1678,
9281,
29918,
276,
4924,
353,
1813,
29889,
657,
29918,
12333,
29918,
276,
4924,
580,
13,
1678,
396,
19673,
6515,
1122,
451,
505,
263,
9281,
29918,
276,
4924,
3447,
29889,
13,
1678,
565,
9281,
29918,
276,
4924,
322,
9281,
29918,
276,
4924,
29889,
1792,
29901,
13,
4706,
4148,
353,
9281,
29918,
276,
4924,
29889,
1792,
29889,
333,
13,
1678,
1683,
29901,
13,
4706,
4148,
353,
6213,
13,
1678,
736,
426,
13,
4706,
376,
333,
1115,
1813,
29889,
333,
29892,
13,
4706,
376,
10945,
29918,
333,
1115,
9071,
29889,
517,
29918,
10945,
29918,
333,
29898,
3488,
29889,
3051,
29918,
1853,
29889,
978,
29892,
1813,
29889,
333,
511,
13,
4706,
376,
21001,
287,
29918,
4282,
1115,
19799,
29918,
4282,
29892,
13,
4706,
376,
2467,
1115,
3158,
29892,
13,
4706,
376,
275,
29918,
3488,
1115,
5852,
29892,
13,
4706,
376,
3051,
29918,
1853,
1115,
1813,
29889,
14940,
29918,
1990,
29889,
657,
29918,
369,
15828,
29918,
978,
3285,
13,
4706,
376,
8921,
1115,
4148,
29892,
13,
1678,
500,
13,
13,
13,
1753,
6314,
29918,
12292,
29898,
16072,
29918,
3488,
29892,
3158,
1125,
13,
1678,
396,
947,
445,
664,
373,
1813,
7374,
291,
29973,
6515,
564,
296,
11132,
1492,
29892,
925,
443,
5467,
3726,
29973,
13,
1678,
9995,
13,
1678,
584,
3207,
7601,
29918,
3488,
29901,
278,
1813,
393,
19799,
278,
9805,
29914,
348,
23679,
13,
1678,
584,
2457,
29901,
6515,
29901,
385,
1409,
310,
278,
848,
515,
599,
6515,
10879,
287,
491,
278,
9805,
29914,
348,
23679,
1741,
13,
1678,
9995,
13,
1678,
6515,
353,
518,
13,
4706,
679,
29918,
3488,
29918,
1272,
29898,
16072,
29918,
3488,
29892,
5852,
29892,
3158,
29897,
13,
1678,
4514,
13,
1678,
7601,
29918,
333,
353,
7601,
29918,
3488,
29889,
333,
13,
1678,
7601,
29918,
3051,
29918,
1853,
353,
7601,
29918,
3488,
29889,
14940,
29918,
1990,
29889,
657,
29918,
369,
15828,
29918,
978,
580,
13,
1678,
1813,
29918,
842,
353,
679,
29918,
3318,
29918,
21125,
29898,
16072,
29918,
3488,
29897,
13,
1678,
396,
2045,
597,
3292,
29889,
510,
29914,
29893,
351,
18237,
29914,
29893,
351,
18237,
29914,
10054,
29914,
6207,
29914,
29893,
351,
18237,
29914,
6406,
29914,
9794,
29889,
2272,
29937,
29931,
29896,
29945,
13,
1678,
396,
679,
29918,
3318,
29918,
21125,
674,
884,
736,
278,
281,
351,
18237,
29918,
3488,
3528,
13,
1678,
363,
1813,
297,
1813,
29918,
842,
29901,
13,
4706,
396,
28267,
1813,
338,
884,
5134,
297,
1813,
29918,
842,
29889,
3872,
29915,
29873,
337,
29899,
1202,
7601,
29918,
3488,
848,
29889,
13,
4706,
565,
451,
313,
3488,
29889,
333,
1275,
7601,
29918,
333,
1125,
13,
9651,
6515,
29889,
4397,
29898,
657,
29918,
3488,
29918,
1272,
29898,
3488,
29892,
7700,
29892,
3158,
876,
13,
13,
1678,
565,
7601,
29918,
3051,
29918,
1853,
1275,
525,
3170,
9305,
29915,
470,
7601,
29918,
3051,
29918,
1853,
1275,
525,
20350,
9305,
2396,
13,
4706,
10754,
29918,
3488,
29918,
1272,
353,
679,
29918,
3488,
29918,
1272,
29918,
3166,
29918,
2543,
2247,
29898,
16072,
29918,
333,
29892,
3158,
29897,
13,
4706,
6515,
29889,
21843,
29898,
13075,
29918,
3488,
29918,
1272,
29897,
13,
1678,
736,
6515,
13,
13,
13,
1753,
6314,
29918,
12292,
29918,
3166,
29918,
29879,
1240,
7988,
29898,
8758,
29892,
3158,
1125,
13,
1678,
9995,
13,
1678,
584,
3207,
2777,
29901,
278,
11534,
393,
756,
1063,
10551,
287,
13,
1678,
584,
2457,
29901,
385,
1409,
310,
5534,
1813,
18999,
13,
1678,
9995,
13,
1678,
11534,
29918,
1272,
353,
426,
13,
4706,
376,
333,
1115,
2777,
29889,
333,
29892,
13,
4706,
376,
10945,
29918,
333,
1115,
6213,
29892,
13,
4706,
376,
21001,
287,
29918,
4282,
1115,
5852,
29892,
13,
4706,
376,
2467,
1115,
3158,
29892,
13,
4706,
376,
275,
29918,
3488,
1115,
7700,
29892,
13,
4706,
376,
3051,
29918,
1853,
1115,
2777,
17255,
1990,
1649,
17255,
978,
1649,
29892,
13,
4706,
376,
8921,
1115,
6213,
29892,
29871,
396,
14402,
29901,
338,
727,
263,
982,
304,
679,
278,
1833,
6920,
310,
263,
11534,
29973,
13,
1678,
500,
13,
1678,
6515,
353,
518,
29879,
1240,
7988,
29918,
1272,
29962,
13,
1678,
1813,
29918,
842,
353,
2777,
29889,
657,
29918,
21125,
580,
13,
1678,
363,
1813,
297,
1813,
29918,
842,
29901,
13,
4706,
6515,
29889,
4397,
29898,
657,
29918,
3488,
29918,
1272,
29898,
3488,
29892,
7700,
29892,
376,
21402,
29918,
1609,
29918,
29879,
1240,
7988,
5783,
13,
1678,
736,
6515,
13,
13,
13,
1753,
679,
29918,
3488,
29918,
1272,
29918,
3166,
29918,
2543,
2247,
29898,
15033,
29918,
333,
29892,
3158,
1125,
13,
1678,
9995,
13,
1678,
6692,
349,
1179,
322,
2472,
349,
1179,
1016,
29915,
29873,
1073,
896,
526,
373,
2088,
2247,
29889,
1105,
825,
5930,
565,
697,
338,
4784,
29973,
13,
1678,
28609,
591,
1073,
2253,
29892,
445,
674,
748,
1549,
599,
1749,
10754,
6515,
322,
1423,
565,
278,
1813,
393,
338,
3939,
338,
297,
13,
1678,
697,
310,
278,
10754,
29915,
29879,
13926,
13,
1678,
584,
3207,
3939,
29918,
333,
29901,
1178,
310,
278,
1813,
393,
471,
6369,
847,
443,
5467,
3726,
13,
1678,
584,
2457,
29901,
1813,
29918,
1272,
363,
16886,
349,
1179,
393,
3160,
393,
1813,
13,
1678,
9995,
13,
1678,
6515,
353,
5159,
13,
1678,
599,
29918,
2543,
2247,
353,
16886,
5074,
29889,
12650,
29889,
497,
580,
13,
1678,
363,
330,
297,
599,
29918,
2543,
2247,
29901,
13,
4706,
363,
269,
297,
330,
29889,
27117,
29901,
13,
9651,
396,
269,
29889,
1767,
29889,
7076,
580,
338,
385,
10372,
9657,
13,
9651,
1051,
29918,
974,
29918,
5975,
353,
1051,
29898,
29879,
29889,
1767,
29889,
7076,
3101,
13,
9651,
396,
278,
6515,
526,
278,
29871,
29945,
386,
18761,
13,
9651,
4004,
29918,
12292,
353,
1051,
29918,
974,
29918,
5975,
29961,
29946,
3816,
29896,
29962,
13,
9651,
363,
1813,
297,
4004,
29918,
12292,
29901,
13,
18884,
565,
3939,
29918,
333,
1275,
1813,
29889,
333,
29901,
13,
462,
1678,
6515,
29889,
4397,
29898,
657,
29918,
3488,
29918,
1272,
29898,
29887,
29892,
7700,
29892,
3158,
876,
13,
1678,
736,
6515,
13,
13,
13,
29992,
13556,
2147,
29898,
3488,
29918,
5467,
3726,
29897,
13,
1753,
1813,
29918,
5467,
3726,
29918,
25436,
29898,
15452,
29892,
3579,
19290,
1125,
13,
1678,
396,
363,
278,
5434,
29892,
4444,
701,
263,
982,
304,
1423,
565,
278,
3611,
3939,
13,
1678,
396,
2045,
597,
2417,
29889,
510,
29914,
2619,
29914,
29896,
29941,
29945,
29945,
29896,
29945,
29900,
29914,
8256,
29899,
29879,
5555,
29899,
3525,
29899,
3068,
29899,
6293,
29899,
3198,
29899,
361,
29899,
29874,
29899,
2671,
29899,
5349,
29899,
15033,
13,
1678,
396,
1363,
565,
278,
3611,
28950,
1735,
29892,
6515,
393,
1712,
2988,
304,
278,
6369,
1813,
1016,
29915,
29873,
817,
304,
367,
4784,
13,
1678,
3158,
353,
376,
5467,
3726,
29908,
13,
1678,
7601,
29918,
3488,
353,
9305,
29889,
12650,
29889,
657,
29898,
333,
29922,
19290,
1839,
8758,
13359,
333,
29897,
13,
1678,
6515,
353,
6314,
29918,
12292,
29898,
16072,
29918,
3488,
29892,
3158,
29897,
13,
1678,
9805,
29898,
12292,
29892,
7601,
29918,
3488,
29897,
13,
13,
13,
29992,
13556,
2147,
29898,
3488,
29918,
348,
5467,
3726,
29897,
13,
1753,
1813,
29918,
348,
5467,
3726,
29918,
25436,
29898,
15452,
29892,
3579,
19290,
1125,
13,
1678,
3158,
353,
376,
348,
5467,
3726,
29908,
13,
1678,
7601,
29918,
3488,
353,
9305,
29889,
12650,
29889,
657,
29898,
333,
29922,
19290,
1839,
8758,
13359,
333,
29897,
13,
1678,
6515,
353,
6314,
29918,
12292,
29898,
16072,
29918,
3488,
29892,
3158,
29897,
13,
1678,
9805,
29898,
12292,
29892,
7601,
29918,
3488,
29897,
13,
13,
13,
29937,
14402,
29901,
591,
508,
3117,
8343,
263,
1051,
310,
4733,
304,
10641,
278,
12422,
304,
13,
29937,
901,
7014,
1244,
13,
29937,
591,
1795,
864,
304,
1480,
541,
451,
7135,
263,
2048,
29973,
817,
777,
2656,
310,
9521,
13,
29992,
13556,
2147,
29898,
2490,
29918,
7620,
29892,
10004,
29922,
6268,
29897,
13,
29992,
13556,
2147,
29898,
2490,
29918,
7620,
29892,
10004,
29922,
13443,
29897,
13,
1753,
4386,
29918,
2490,
29918,
7620,
29918,
25436,
29898,
15452,
29892,
3579,
19290,
1125,
13,
1678,
3158,
353,
376,
17314,
29908,
13,
1678,
6515,
353,
6314,
29918,
12292,
29918,
3166,
29918,
29879,
1240,
7988,
29898,
19290,
1839,
8758,
7464,
3158,
29897,
13,
1678,
9805,
29898,
12292,
29897,
13,
13,
13,
29992,
13556,
2147,
29898,
2490,
29918,
8143,
29892,
10004,
29922,
6268,
29897,
13,
29992,
13556,
2147,
29898,
2490,
29918,
8143,
29892,
10004,
29922,
13443,
29897,
13,
1753,
4386,
29918,
2490,
29918,
8143,
29918,
25436,
29898,
15452,
29892,
3579,
19290,
1125,
13,
1678,
3158,
353,
376,
311,
22742,
29908,
13,
1678,
6515,
353,
6314,
29918,
12292,
29918,
3166,
29918,
29879,
1240,
7988,
29898,
19290,
1839,
8758,
7464,
3158,
29897,
13,
1678,
9805,
29898,
12292,
29897,
13,
13,
13,
1753,
9805,
29898,
12292,
29892,
7601,
29918,
3488,
29922,
8516,
1125,
13,
1678,
565,
6055,
29889,
6720,
7077,
29918,
7056,
13367,
3235,
29950,
322,
7601,
29918,
3488,
29901,
13,
4706,
2767,
29918,
16072,
29918,
3488,
29898,
16072,
29918,
3488,
29892,
376,
17640,
29918,
20571,
613,
376,
17640,
29918,
808,
1159,
13,
4706,
736,
13,
1678,
565,
451,
6055,
29889,
7056,
13367,
3235,
29950,
29918,
1430,
6181,
29928,
29901,
13,
4706,
736,
13,
13,
1678,
396,
14402,
29901,
591,
864,
304,
6597,
278,
9805,
29918,
8931,
275,
29918,
17519,
580,
363,
1269,
1813,
29918,
333,
393,
591,
29915,
276,
27256,
313,
1454,
1342,
29892,
565,
591,
1369,
27256,
304,
1422,
11840,
467,
13,
1678,
396,
2193,
5900,
1818,
3799,
8859,
297,
278,
6314,
29918,
12292,
5900,
29889,
13,
1678,
396,
7753,
2466,
445,
674,
664,
363,
1286,
29892,
372,
881,
451,
367,
2898,
29659,
304,
367,
278,
937,
8778,
5074,
1203,
29889,
13,
1678,
9805,
29918,
8931,
275,
29918,
17519,
353,
8778,
5074,
29889,
12650,
29889,
4102,
2141,
23679,
29918,
8931,
275,
29918,
17519,
580,
13,
13,
1678,
565,
451,
9805,
29918,
8931,
275,
29918,
17519,
29901,
13,
4706,
17927,
29889,
3888,
703,
23679,
29918,
8931,
275,
29918,
17519,
1818,
367,
731,
297,
1797,
304,
9805,
23157,
13,
4706,
736,
6213,
13,
13,
1678,
7882,
29918,
1989,
353,
3450,
2558,
29889,
12650,
29889,
3258,
29918,
1989,
29898,
13,
4706,
1024,
29922,
29888,
29908,
23679,
261,
29899,
29912,
12673,
29889,
3707,
29898,
2230,
8028,
877,
3308,
29914,
23369,
1705,
1495,
467,
10718,
4830,
580,
5038,
13,
1678,
1723,
29961,
29896,
29962,
13,
13,
1678,
9066,
353,
426,
13,
4706,
376,
29916,
29899,
2754,
29899,
1989,
1115,
6055,
29889,
7056,
13367,
3235,
4448,
29918,
29963,
29906,
29918,
8787,
29918,
10818,
29892,
13,
4706,
376,
3051,
29899,
1853,
1115,
376,
6214,
29914,
3126,
613,
13,
1678,
500,
13,
1678,
3142,
353,
6055,
29889,
7056,
13367,
3235,
4448,
29918,
29963,
29906,
29918,
4219,
13,
1678,
848,
353,
426,
13,
4706,
376,
8931,
275,
29918,
17519,
1115,
9805,
29918,
8931,
275,
29918,
17519,
29892,
13,
4706,
376,
12292,
1115,
6515,
29892,
13,
4706,
376,
29926,
459,
1915,
29918,
932,
978,
1115,
6055,
29889,
20576,
5813,
29892,
13,
4706,
376,
2754,
29918,
1989,
1115,
7882,
29918,
1989,
29892,
13,
4706,
376,
6272,
29918,
16908,
1115,
426,
13,
9651,
376,
1525,
17923,
29918,
17816,
2965,
29918,
15094,
29943,
2544,
3210,
29918,
29934,
3040,
1115,
376,
29900,
613,
13,
4706,
2981,
13,
4706,
376,
4282,
29918,
1853,
1115,
376,
276,
4282,
613,
13,
1678,
500,
13,
1678,
620,
353,
7274,
29889,
2490,
29898,
2271,
29892,
848,
29922,
3126,
29889,
29881,
17204,
29898,
1272,
511,
9066,
29922,
13662,
29897,
13,
1678,
565,
620,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
4706,
17927,
29889,
2704,
29898,
29888,
29908,
23679,
29918,
3827,
5229,
411,
4660,
426,
690,
29889,
4882,
29918,
401,
27195,
13,
4706,
17927,
29889,
2704,
29898,
29888,
29908,
4906,
29901,
426,
690,
29889,
3126,
580,
1839,
4906,
2033,
27195,
13,
1678,
25342,
7601,
29918,
3488,
29901,
13,
4706,
620,
29918,
1272,
353,
620,
29889,
3126,
580,
13,
4706,
9805,
29918,
3827,
29918,
20571,
353,
620,
29918,
1272,
1839,
20571,
2033,
13,
4706,
9805,
29918,
3827,
29918,
808,
353,
620,
29918,
1272,
1839,
808,
2033,
13,
4706,
2767,
29918,
16072,
29918,
3488,
29898,
16072,
29918,
3488,
29892,
9805,
29918,
3827,
29918,
20571,
29892,
9805,
29918,
3827,
29918,
808,
29897,
13,
13,
13,
1753,
2767,
29918,
16072,
29918,
3488,
29898,
16072,
29918,
3488,
29892,
9805,
29918,
3827,
29918,
20571,
29892,
9805,
29918,
3827,
29918,
808,
1125,
13,
4706,
7601,
29918,
3488,
353,
7601,
29918,
3488,
29889,
14940,
13,
4706,
7601,
29918,
3488,
29889,
23679,
29918,
3827,
29918,
20571,
353,
9805,
29918,
3827,
29918,
20571,
13,
4706,
7601,
29918,
3488,
29889,
23679,
29918,
3827,
29918,
808,
353,
9805,
29918,
3827,
29918,
808,
13,
4706,
7601,
29918,
3488,
29889,
23679,
29918,
3827,
29918,
264,
802,
6742,
353,
5852,
13,
4706,
17927,
29889,
3888,
29898,
29888,
29908,
5467,
3726,
580,
282,
29895,
3790,
23679,
29918,
3827,
29918,
20571,
1118,
2071,
3790,
23679,
29918,
3827,
29918,
808,
27195,
13,
4706,
7601,
29918,
3488,
29889,
7620,
580,
13,
2
] |
resources/tasks.py | axonepro/sdk-ooti | 1 | 66511 | <gh_stars>1-10
import requests
import json
from .helper import Helper
class Tasks(Helper):
def __init__(self, base_url, org_pk, teams_pk, access_token, _csrf_token, headers, pagination):
super().__init__(base_url, org_pk, teams_pk, access_token, _csrf_token, headers, pagination)
def empty_tasks_trash(self, project_id):
""" Set delete all not-completed archived tasks in project """
route = 'v1/tasks/empty-trash/{0}/'.format(project_id)
response = self.process_request(requests, 'POST', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def get_task_labels_list(self, page=1):
""" Get the list of tasks labels """
route = 'v1/tasks/label/list/{0}/?page_size={1}&page={2}'.format(self.org_pk, self.pagination, page)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response, True)
def create_task_label(self, data):
""" Create a new task label
Keywords arguments:
data -- data of the new label to be created:
{
"creator": orguser_pk,
"team": team_pk,
"title": "label title",
"description": "new task label"
}
"""
route = 'v1/tasks/label/list/{0}/'.format(self.org_pk)
response = self.process_request(requests, 'POST', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def get_task_label_details(self, label_pk):
""" Get the task label details
Keywords arguments:
label_pk -- pk of the task label
"""
route = 'v1/tasks/label/{0}/'.format(label_pk)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def update_task_label_details(self, label_pk, data):
""" Update the task label details
Keywords arguments:
label_pk -- pk of the task label
data -- content of the update:
{
"creator": orguser_pk,
"team": team_pk,
"title": "new title",
"description": "description updated"
}
"""
route = 'v1/tasks/label/{0}/'.format(label_pk)
response = self.process_request(requests, 'PATCH', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def delete_task_label(self, label_pk):
""" Delete the task label details
Keywords arguments:
label_pk -- pk of the task label
"""
route = 'v1/tasks/label/{0}/'.format(label_pk)
response = self.process_request(requests, 'DELETE', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def get_tasks_list(self, page=1):
""" Get the tasks list """
route = 'v1/tasks/list/{0}/?page_size={1}&page={2}'.format(self.org_pk, self.pagination, page)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response, True)
def create_task(self, data):
""" Create a new task
Keywords arguments:
data -- data of the new task to be created:
{
"creator": orguser_pk,
"created_at": "string",
"labels": [
label_pk,
...
],
"title": "string",
"due_date": "string",
"description": "string"
}
"""
route = 'v1/tasks/list/{0}/'.format(self.org_pk)
response = self.process_request(requests, 'POST', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def get_tasks_lists_list(self, page=1):
""" Get the list of tasks list """
route = 'v1/tasks/lists/list/{0}/?page_size={1}&page={2}'.format(self.org_pk, self.pagination, page)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response, True)
def create_tasks_list(self, data):
""" Create a new list of tasks
Keywords arguments:
data -- data of the new list of tasks to be created:
{
"author": orguser_pk,
"title": "new list",
"tasks": [
task_pk,
...
],
"followers": [
orguser_pk,
...
]
}
"""
route = 'v1/tasks/lists/list/{0}/'.format(self.org_pk)
response = self.process_request(requests, 'POST', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def get_tasks_list_details(self, list_pk):
""" Get the list of tasks details
Keywords arguments:
list_pk -- the pk of list of tasks
"""
route = 'v1/tasks/lists/{0}/'.format(list_pk)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def update_tasks_list_details(self, list_pk, data):
""" Update the list of tasks details
Keywords arguments:
list_pk -- the pk of list of tasks
data -- content of the update:
{
"author": orguser_pk,
"title": "new list",
"tasks": [
task_pk,
...
],
"followers": [
orguser_pk,
...
]
}
"""
route = 'v1/tasks/lists/{0}/'.format(list_pk)
response = self.process_request(requests, 'PATCH', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def delete_tasks_list(self, list_pk):
""" Delete the list of tasks
Keywords arguments:
list_pk -- the pk of list of tasks
"""
route = 'v1/tasks/lists/{0}/'.format(list_pk)
response = self.process_request(requests, 'DELETE', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def log_tasks(self):
""" Set all tasks to is_logged True """
route = 'v1/tasks/log-tasks/{0}/'.format(self.org_pk)
response = self.process_request(requests, 'POST', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def get_tasks_timeline(self):
route = 'v1/tasks/timeline/{0}/'.format(self.org_pk)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def get_task_details(self, pk):
""" Get task details
Keywords arguments:
pk -- the pk of the task
"""
route = 'v1/tasks/{0}/'.format(pk)
response = self.process_request(requests, 'GET', self.base_url, route, self.headers, None, None)
return self.process_response(response)
def update_task_details(self, pk, data):
""" Update task details
Keywords arguments:
pk -- the pk of the task
data -- content of the update:
{
"creator": orguser_pk,
"created_at": "string",
"estimate": 0,
"is_logged": true,
"labels": [
"string"
],
"title": "string",
"due_date": "string",
"completed_at": "string",
"description": "string",
"is_completed": true
}
"""
route = 'v1/tasks/{0}/'.format(pk)
response = self.process_request(requests, 'PATCH', self.base_url, route, self.headers, None, json.dumps(data))
return self.process_response(response)
def delete_task(self, pk):
""" Delete task
Keywords arguments:
pk -- the pk of the task
"""
route = 'v1/tasks/{0}/'.format(pk)
response = self.process_request(requests, 'DELETE', self.base_url, route, self.headers, None, None)
return self.process_response(response) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
7274,
13,
5215,
4390,
13,
13,
3166,
869,
20907,
1053,
6162,
546,
13,
13,
13,
1990,
9330,
29879,
29898,
10739,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2967,
29918,
2271,
29892,
1638,
29918,
20571,
29892,
10907,
29918,
20571,
29892,
2130,
29918,
6979,
29892,
903,
2395,
9600,
29918,
6979,
29892,
9066,
29892,
10203,
3381,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3188,
29918,
2271,
29892,
1638,
29918,
20571,
29892,
10907,
29918,
20571,
29892,
2130,
29918,
6979,
29892,
903,
2395,
9600,
29918,
6979,
29892,
9066,
29892,
10203,
3381,
29897,
13,
13,
1678,
822,
4069,
29918,
20673,
29918,
509,
1161,
29898,
1311,
29892,
2060,
29918,
333,
1125,
13,
4706,
9995,
3789,
5217,
599,
451,
29899,
5729,
9446,
3190,
2347,
9595,
297,
2060,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
6310,
29899,
509,
1161,
19248,
29900,
6822,
4286,
4830,
29898,
4836,
29918,
333,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
5438,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
7662,
29918,
21134,
29918,
1761,
29898,
1311,
29892,
1813,
29922,
29896,
1125,
13,
4706,
9995,
3617,
278,
1051,
310,
9595,
11073,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1643,
29914,
1761,
19248,
29900,
6822,
29973,
3488,
29918,
2311,
3790,
29896,
15704,
3488,
3790,
29906,
29913,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29892,
1583,
29889,
13573,
3381,
29892,
1813,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29892,
5852,
29897,
13,
13,
1678,
822,
1653,
29918,
7662,
29918,
1643,
29898,
1311,
29892,
848,
1125,
13,
4706,
9995,
6204,
263,
716,
3414,
3858,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
848,
1192,
848,
310,
278,
716,
3858,
304,
367,
2825,
29901,
13,
4706,
426,
13,
9651,
376,
1037,
1061,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
14318,
1115,
3815,
29918,
20571,
29892,
13,
9651,
376,
3257,
1115,
376,
1643,
3611,
613,
13,
9651,
376,
8216,
1115,
376,
1482,
3414,
3858,
29908,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1643,
29914,
1761,
19248,
29900,
6822,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
5438,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
7662,
29918,
1643,
29918,
14144,
29898,
1311,
29892,
3858,
29918,
20571,
1125,
13,
4706,
9995,
3617,
278,
3414,
3858,
4902,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
3858,
29918,
20571,
1192,
282,
29895,
310,
278,
3414,
3858,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1643,
19248,
29900,
6822,
4286,
4830,
29898,
1643,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
2767,
29918,
7662,
29918,
1643,
29918,
14144,
29898,
1311,
29892,
3858,
29918,
20571,
29892,
848,
1125,
13,
4706,
9995,
10318,
278,
3414,
3858,
4902,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
3858,
29918,
20571,
1192,
282,
29895,
310,
278,
3414,
3858,
13,
4706,
848,
1192,
2793,
310,
278,
2767,
29901,
13,
4706,
426,
13,
9651,
376,
1037,
1061,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
14318,
1115,
3815,
29918,
20571,
29892,
13,
9651,
376,
3257,
1115,
376,
1482,
3611,
613,
13,
9651,
376,
8216,
1115,
376,
8216,
4784,
29908,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1643,
19248,
29900,
6822,
4286,
4830,
29898,
1643,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
29925,
14789,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
5217,
29918,
7662,
29918,
1643,
29898,
1311,
29892,
3858,
29918,
20571,
1125,
13,
4706,
9995,
21267,
278,
3414,
3858,
4902,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
3858,
29918,
20571,
1192,
282,
29895,
310,
278,
3414,
3858,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1643,
19248,
29900,
6822,
4286,
4830,
29898,
1643,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
2287,
18476,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
20673,
29918,
1761,
29898,
1311,
29892,
1813,
29922,
29896,
1125,
13,
4706,
9995,
3617,
278,
9595,
1051,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1761,
19248,
29900,
6822,
29973,
3488,
29918,
2311,
3790,
29896,
15704,
3488,
3790,
29906,
29913,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29892,
1583,
29889,
13573,
3381,
29892,
1813,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29892,
5852,
29897,
13,
13,
1678,
822,
1653,
29918,
7662,
29898,
1311,
29892,
848,
1125,
13,
4706,
9995,
6204,
263,
716,
3414,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
848,
1192,
848,
310,
278,
716,
3414,
304,
367,
2825,
29901,
13,
4706,
426,
13,
9651,
376,
1037,
1061,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
11600,
29918,
271,
1115,
376,
1807,
613,
13,
9651,
376,
21134,
1115,
518,
13,
18884,
3858,
29918,
20571,
29892,
13,
18884,
2023,
13,
9651,
21251,
13,
9651,
376,
3257,
1115,
376,
1807,
613,
13,
9651,
376,
29123,
29918,
1256,
1115,
376,
1807,
613,
13,
9651,
376,
8216,
1115,
376,
1807,
29908,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1761,
19248,
29900,
6822,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
5438,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
20673,
29918,
21513,
29918,
1761,
29898,
1311,
29892,
1813,
29922,
29896,
1125,
13,
4706,
9995,
3617,
278,
1051,
310,
9595,
1051,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
21513,
29914,
1761,
19248,
29900,
6822,
29973,
3488,
29918,
2311,
3790,
29896,
15704,
3488,
3790,
29906,
29913,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29892,
1583,
29889,
13573,
3381,
29892,
1813,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29892,
5852,
29897,
13,
13,
1678,
822,
1653,
29918,
20673,
29918,
1761,
29898,
1311,
29892,
848,
1125,
13,
4706,
9995,
6204,
263,
716,
1051,
310,
9595,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
848,
1192,
848,
310,
278,
716,
1051,
310,
9595,
304,
367,
2825,
29901,
13,
4706,
426,
13,
9651,
376,
8921,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
3257,
1115,
376,
1482,
1051,
613,
13,
9651,
376,
20673,
1115,
518,
13,
18884,
3414,
29918,
20571,
29892,
13,
18884,
2023,
13,
9651,
21251,
13,
9651,
376,
23031,
414,
1115,
518,
13,
18884,
1638,
1792,
29918,
20571,
29892,
13,
18884,
2023,
13,
9651,
4514,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
21513,
29914,
1761,
19248,
29900,
6822,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
5438,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
20673,
29918,
1761,
29918,
14144,
29898,
1311,
29892,
1051,
29918,
20571,
1125,
13,
4706,
9995,
3617,
278,
1051,
310,
9595,
4902,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
1051,
29918,
20571,
1192,
278,
282,
29895,
310,
1051,
310,
9595,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
21513,
19248,
29900,
6822,
4286,
4830,
29898,
1761,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
2767,
29918,
20673,
29918,
1761,
29918,
14144,
29898,
1311,
29892,
1051,
29918,
20571,
29892,
848,
1125,
13,
4706,
9995,
10318,
278,
1051,
310,
9595,
4902,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
1051,
29918,
20571,
1192,
278,
282,
29895,
310,
1051,
310,
9595,
13,
4706,
848,
1192,
2793,
310,
278,
2767,
29901,
13,
4706,
426,
13,
9651,
376,
8921,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
3257,
1115,
376,
1482,
1051,
613,
13,
9651,
376,
20673,
1115,
518,
13,
18884,
3414,
29918,
20571,
29892,
13,
18884,
2023,
13,
9651,
21251,
13,
9651,
376,
23031,
414,
1115,
518,
13,
18884,
1638,
1792,
29918,
20571,
29892,
13,
18884,
2023,
13,
9651,
4514,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
21513,
19248,
29900,
6822,
4286,
4830,
29898,
1761,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
29925,
14789,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
5217,
29918,
20673,
29918,
1761,
29898,
1311,
29892,
1051,
29918,
20571,
1125,
13,
4706,
9995,
21267,
278,
1051,
310,
9595,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
1051,
29918,
20571,
1192,
278,
282,
29895,
310,
1051,
310,
9595,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
21513,
19248,
29900,
6822,
4286,
4830,
29898,
1761,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
2287,
18476,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
1480,
29918,
20673,
29898,
1311,
1125,
13,
4706,
9995,
3789,
599,
9595,
304,
338,
29918,
1188,
3192,
5852,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
1188,
29899,
20673,
19248,
29900,
6822,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
5438,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
20673,
29918,
9346,
5570,
29898,
1311,
1125,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
29914,
9346,
5570,
19248,
29900,
6822,
4286,
4830,
29898,
1311,
29889,
990,
29918,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
679,
29918,
7662,
29918,
14144,
29898,
1311,
29892,
282,
29895,
1125,
13,
4706,
9995,
3617,
3414,
4902,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
282,
29895,
1192,
278,
282,
29895,
310,
278,
3414,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
19248,
29900,
6822,
4286,
4830,
29898,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
7194,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
2767,
29918,
7662,
29918,
14144,
29898,
1311,
29892,
282,
29895,
29892,
848,
1125,
13,
4706,
9995,
10318,
3414,
4902,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
282,
29895,
1192,
278,
282,
29895,
310,
278,
3414,
13,
4706,
848,
1192,
2793,
310,
278,
2767,
29901,
13,
4706,
426,
13,
9651,
376,
1037,
1061,
1115,
1638,
1792,
29918,
20571,
29892,
13,
9651,
376,
11600,
29918,
271,
1115,
376,
1807,
613,
13,
9651,
376,
342,
6490,
1115,
29871,
29900,
29892,
13,
9651,
376,
275,
29918,
1188,
3192,
1115,
1565,
29892,
13,
9651,
376,
21134,
1115,
518,
13,
18884,
376,
1807,
29908,
13,
9651,
21251,
13,
9651,
376,
3257,
1115,
376,
1807,
613,
13,
9651,
376,
29123,
29918,
1256,
1115,
376,
1807,
613,
13,
9651,
376,
5729,
9446,
29918,
271,
1115,
376,
1807,
613,
13,
9651,
376,
8216,
1115,
376,
1807,
613,
13,
9651,
376,
275,
29918,
5729,
9446,
1115,
1565,
13,
4706,
500,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
19248,
29900,
6822,
4286,
4830,
29898,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
29925,
14789,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
4390,
29889,
29881,
17204,
29898,
1272,
876,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
13,
13,
1678,
822,
5217,
29918,
7662,
29898,
1311,
29892,
282,
29895,
1125,
13,
4706,
9995,
21267,
3414,
29871,
13,
13,
4706,
7670,
9303,
6273,
29901,
13,
4706,
282,
29895,
1192,
278,
282,
29895,
310,
278,
3414,
13,
4706,
9995,
13,
13,
4706,
5782,
353,
525,
29894,
29896,
29914,
20673,
19248,
29900,
6822,
4286,
4830,
29898,
20571,
29897,
13,
4706,
2933,
353,
1583,
29889,
5014,
29918,
3827,
29898,
24830,
29892,
525,
2287,
18476,
742,
1583,
29889,
3188,
29918,
2271,
29892,
5782,
29892,
1583,
29889,
13662,
29892,
6213,
29892,
6213,
29897,
13,
4706,
736,
1583,
29889,
5014,
29918,
5327,
29898,
5327,
29897,
2
] |
webscan/webscan/log.py | gwvsol/WebScanQRcode-JSON-RPC | 0 | 52875 | <reponame>gwvsol/WebScanQRcode-JSON-RPC
# import logging
from loguru import logger as logging
# log_format = '%(asctime)s.%(msecs)d|\
# %(levelname)s|%(module)s.%(funcName)s:%(lineno)d %(message)s'
# logging.basicConfig(level=logging.INFO,
# format=log_format,
# datefmt='%Y-%m-%d %H:%M:%S')
logging.add(str, format="<green>{time:YYYY-MM-DD HH:mm:ss}</green>|\
{level}|<cyan>{name}</cyan>:<cyan>{function}\
</cyan>:<cyan>{line}</cyan> {message}")
| [
1,
529,
276,
1112,
420,
29958,
29887,
29893,
29894,
2929,
29914,
3609,
29083,
29984,
29934,
401,
29899,
7249,
29899,
29934,
9026,
13,
29937,
1053,
12183,
13,
3166,
1480,
20144,
1053,
17927,
408,
12183,
13,
13,
29937,
1480,
29918,
4830,
353,
14210,
29898,
294,
312,
603,
29897,
29879,
29889,
29995,
29898,
29885,
344,
2395,
29897,
29881,
4295,
13,
29937,
1273,
29898,
5563,
978,
29897,
29879,
29989,
29995,
29898,
5453,
29897,
29879,
29889,
29995,
29898,
9891,
1170,
29897,
29879,
16664,
29898,
1915,
8154,
29897,
29881,
1273,
29898,
4906,
29897,
29879,
29915,
13,
29937,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
11690,
29892,
13,
29937,
462,
268,
3402,
29922,
1188,
29918,
4830,
29892,
13,
29937,
462,
268,
2635,
23479,
2433,
29995,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1495,
13,
13,
21027,
29889,
1202,
29898,
710,
29892,
3402,
543,
29966,
12692,
26208,
2230,
29901,
14995,
14995,
29899,
7428,
29899,
7858,
379,
29950,
29901,
4317,
29901,
893,
16040,
12692,
29958,
4295,
13,
29912,
5563,
11079,
29966,
1270,
273,
26208,
978,
16040,
1270,
273,
23917,
29966,
1270,
273,
26208,
2220,
1012,
13,
829,
1270,
273,
23917,
29966,
1270,
273,
26208,
1220,
16040,
1270,
273,
29958,
426,
4906,
27195,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.