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
|
---|---|---|---|---|---|
lapse_rate_regression.py | ehultee/stoch-SMB | 3 | 177891 | <reponame>ehultee/stoch-SMB
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Load process-model SMB in a given catchment and regress a mass balance gradient
Created on Thu Aug 5 14:14:05 2021
Edit Sept 2: compute 30-year mean of anomaly
@author: lizz
"""
from shapely.geometry import MultiPoint
from shapely.ops import triangulate
import shapefile
from netCDF4 import Dataset
import numpy as np
import pandas as pd
import pyproj as pyproj
from scipy import interpolate
import datetime
import time
import matplotlib.pyplot as plt
from matplotlib import cm
from stochSMB import segments_fit
###------------------------
### CHOOSE CATCHMENTS
###------------------------
catchments_to_pull = (101,)
###------------------------
### DATA READ-IN AND PROJECTION
###------------------------
## Read in BedMachine grid to reproject SMB
gl_bed_path ='/Users/lizz/Documents/GitHub/Data_unsynced/BedMachine-Greenland/BedMachineGreenland-2017-09-20.nc'
fh = Dataset(gl_bed_path, mode='r')
xx = fh.variables['x'][:].copy() # x-coord (polar stereo (70, 45))
yy = fh.variables['y'][:].copy() # y-coord
ss = fh.variables['surface'][:].copy() # surface elevation
fh.close()
## Read in Mouginot catchments from shapefile
print('Reading in Mouginot catchments')
catchment_fn = '/Users/lizz/Documents/GitHub/Data_unsynced/Greenland-catchments-Mouginot/Greenland_Basins_PS_v1.4.2.'
sf = shapefile.Reader(catchment_fn)
## Example SMB field read in for grid
print('Reading in example SMB field')
nhm_smb_path = '/Users/lizz/Documents/GitHub/Data_unsynced/SMBMIP/NHM-SMAP_niwano-monthly-ERA-Interim-1980.nc'
fh2 = Dataset(nhm_smb_path, mode='r')
xlon_nhm = fh2.variables['LON'][:].copy() #x-coord (latlon)
ylat_nhm = fh2.variables['LAT'][:].copy() #y-coord (latlon)
fh2.close()
###------------------------
### SET UP SMB REPROJECTION
###------------------------
## Down-sample bed topo
x_3km = xx[::20] # sample at ~3 km resolution
y_3km = yy[::20]
s_3km = ss[::20,::20]
## Down-sample SMB
x_lon_h = xlon_nhm[::2, ::2]
y_lat_h = ylat_nhm[::2, ::2] # resolution about 2 km
print('Creating reprojected meshgrid')
wgs84 = pyproj.Proj("+init=EPSG:4326") # LatLon with WGS84 datum used by SMB data
psn_gl = pyproj.Proj("+init=epsg:3413") # Polar Stereographic North used by BedMachine and Mankoff
xs, ys = pyproj.transform(wgs84, psn_gl, x_lon_h, y_lat_h)
Xmat, Ymat = np.meshgrid(x_3km, y_3km) # Downsampled BedMachine coords
###------------------------
### CREATE FRAMEWORK
###------------------------
## Perform Delaunay triangulation over each catchment region
tri_ctmts = {i: [] for i in catchments_to_pull}
for i in catchments_to_pull:
print('Triangulating catchment {}'.format(sf.record(i)['NAME']))
c = MultiPoint(sf.shape(i).points)
tris = triangulate(c)
tri_ctmts[i] = tris
## Create data frames to store per-model data
# model_names = ['ANICE-ITM_Berends', 'CESM_kampenhout', 'dEBM_krebs','HIRHAM_mottram',
# 'NHM-SMAP_niwano', 'RACMO_noel', 'SNOWMODEL_liston']
model_names = ['ANICE-ITM_Berends',]
years = range(1980,2010)
start_date = datetime.datetime(years[0],1,1)
end_date = datetime.datetime(years[-1],12,31)
dates = pd.date_range(start=start_date, end=end_date, freq='M')
df_per_ctchmnt = {i: {m: {n: {y: pd.DataFrame(columns=('elevation',
'point_smb')) for y in years} for n in range(12)} for m in model_names} for i in catchments_to_pull}
###------------------------
### CATCHMENT-SUM FOR ALL MODELS
###------------------------
## Store regridded SMBs for use in each catchment to take all available data
for m in model_names:
t0 = time.time()
if m=='CESM_kampenhout':
vname = 'SMBCORR'
else:
vname = 'SMBcorr'
for y in years:
ti = time.time()
fpath = '/Users/lizz/Documents/GitHub/Data_unsynced/SMBMIP/{}-monthly-ERA-Interim-{}.nc'.format(m, y)
fh = Dataset(fpath, mode='r')
smb_m = fh.variables[vname][:].copy()
fh.close()
d_subset = [d for d in dates if d.year==y]
for i in range(len(smb_m)): # for each month
## downsample and interpolate SMB
smb_ds = smb_m[i][::2, ::2]
regridded_smb = interpolate.griddata((xs.ravel(), ys.ravel()), smb_ds.ravel(), (Xmat, Ymat), method='nearest')
## Sample SMB at each Delaunay triangle and sum
for j in catchments_to_pull:
triangles = tri_ctmts[j]
elevations = []
smb_point_vals = []
for tri in triangles:
rep_x, rep_y = tri.representative_point().x, tri.representative_point().y
smb_x = (np.abs(x_3km - rep_x)).argmin()
smb_y = (np.abs(y_3km - rep_y)).argmin()
elevations.append(s_3km[smb_y, smb_x])
smb_point_vals.append(regridded_smb[smb_y, smb_x])
df_per_ctchmnt[j][m][i][y] = df_per_ctchmnt[j][m][i][y].assign(elevation=elevations,
point_smb=smb_point_vals)
tf = time.time()
print('Finished processing year {} in time {}s'.format(y, tf-ti))
t1 = time.time()
print('Finished processing model {} in time {}'.format(m, t1-t0))
###------------------------
### PLOT ALL DATES TOGETHER
###------------------------
df_c = df_per_ctchmnt[101]['ANICE-ITM_Berends']
dict_per_month = {i: [] for i in range(12)}
for i in range(12):
d_to_join = [df_c[i][y] for y in years]
dict_per_month[i] = pd.concat(d_to_join)
c = cm.get_cmap('tab20b')
plt.figure()
for i in range(12):
df = dict_per_month[i]
# f = interpolate.splrep(df['elevation'], df['point_smb'])
# plt.scatter(df['elevation'], df['point_smb'], color=c(i), label='Month '+d_subset[i].strftime('%m'))
plt.scatter(df['elevation'], df['point_smb'], color=c(i%12), label=dates[i].strftime('%m/%Y'))
# plt.legend(loc='best')
plt.show()
# ##
# ## Make a piecewise linear fit and plot it
# # def piecewise_linear(x, x0, y0, k1, k2):
# # return np.piecewise(x, [x < x0], [lambda x:k1*x + y0-k1*x0, lambda x:k2*x + y0-k2*x0])
fig, axs = plt.subplots(3, 4, sharex=True, sharey=True)
# plt.title('Auto-fitting segments based on AIC & BIC')
for i in range(12):
ax = axs.ravel()[i]
# df = df_per_ctchmnt[101]['ANICE-ITM_Berends'][dates[i]]
df = dict_per_month[i]
# axs.ravel()[i].scatter(df['elevation'], df['point_smb'], color=c(i%12), label=dates[i].strftime('%m/%Y'))
pt_smbs = np.asarray(df.sort_values(by='elevation')['point_smb'])
anomalies = pt_smbs - np.mean(pt_smbs)
ax.scatter(df.sort_values(by='elevation')['elevation'], anomalies, color=c(i%12), label=dates[i].strftime('%m/%Y'))
## Piecewise implementation - works but misjudges line segments
# p, e = optimize.curve_fit(piecewise_linear,
# np.asarray(df.sort_values(by='elevation')['elevation']),
# np.asarray(df.sort_values(by='elevation')['point_smb']))
# xnew = np.linspace(0, max(df['elevation']))
# plt.plot(xnew, piecewise_linear(xnew, *p))
px, py = segments_fit(np.asarray(df.sort_values(by='elevation')['elevation']),
# np.asarray(df.sort_values(by='elevation')['point_smb']),
anomalies,
maxcount=3)
ax.plot(px, py)
ax.text(1000,-1100,'Month {}'.format(i+1))
# plt.legend(loc='best')
plt.show()
# ## scaled to fraction of mean
# fig, axs = plt.subplots(3, 4, sharex=True, sharey=True)
# # plt.title('Auto-fitting segments based on AIC & BIC')
# for i in range(12):
# df = df_per_ctchmnt[101]['ANICE-ITM_Berends'][dates[i]]
# # axs.ravel()[i].scatter(df['elevation'], df['point_smb'], color=c(i%12), label=dates[i].strftime('%m/%Y'))
# pt_smbs = np.asarray(df.sort_values(by='elevation')['point_smb'])
# frac_anomalies = (pt_smbs - np.mean(pt_smbs))/np.mean(pt_smbs)
# axs.ravel()[i].scatter(df.sort_values(by='elevation')['elevation'], frac_anomalies, color=c(i%12), label=dates[i].strftime('%m/%Y'))
# ## Piecewise implementation - works but misjudges line segments
# # p, e = optimize.curve_fit(piecewise_linear,
# # np.asarray(df.sort_values(by='elevation')['elevation']),
# # np.asarray(df.sort_values(by='elevation')['point_smb']))
# # xnew = np.linspace(0, max(df['elevation']))
# # plt.plot(xnew, piecewise_linear(xnew, *p))
# px, py = segments_fit(np.asarray(df.sort_values(by='elevation')['elevation']),
# # np.asarray(df.sort_values(by='elevation')['point_smb']),
# frac_anomalies,
# maxcount=3)
# axs.ravel()[i].plot(px, py)
# # plt.legend(loc='best')
# plt.show()
| [
1,
529,
276,
1112,
420,
29958,
14797,
352,
371,
29872,
29914,
303,
2878,
29899,
29903,
9486,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
5896,
1889,
29899,
4299,
317,
9486,
297,
263,
2183,
4380,
358,
322,
337,
3663,
263,
4158,
17346,
16030,
13,
13,
20399,
373,
498,
29884,
22333,
259,
29945,
29871,
29896,
29946,
29901,
29896,
29946,
29901,
29900,
29945,
29871,
29906,
29900,
29906,
29896,
13,
6103,
28742,
29871,
29906,
29901,
10272,
29871,
29941,
29900,
29899,
6360,
2099,
310,
29342,
14997,
13,
13,
29992,
8921,
29901,
301,
4981,
13,
15945,
29908,
13,
13,
3166,
528,
481,
873,
29889,
19156,
1053,
14974,
5228,
13,
3166,
528,
481,
873,
29889,
3554,
1053,
3367,
574,
5987,
13,
5215,
8267,
1445,
13,
3166,
7787,
29907,
4037,
29946,
1053,
13373,
24541,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
11451,
20865,
408,
11451,
20865,
13,
3166,
4560,
2272,
1053,
20064,
403,
13,
5215,
12865,
13,
5215,
931,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
22889,
1053,
7477,
13,
3166,
380,
2878,
29903,
9486,
1053,
24611,
29918,
9202,
13,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
5868,
29949,
29949,
1660,
315,
14789,
13780,
29903,
13,
2277,
29937,
2683,
1378,
13,
12510,
1860,
29918,
517,
29918,
26746,
353,
313,
29896,
29900,
29896,
29892,
29897,
13,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
360,
8254,
5195,
3035,
29899,
1177,
29871,
5300,
13756,
29967,
29923,
9838,
13,
2277,
29937,
2683,
1378,
13,
13,
2277,
7523,
297,
14195,
29076,
6856,
304,
337,
4836,
317,
9486,
13,
3820,
29918,
2580,
29918,
2084,
353,
29915,
29914,
5959,
29914,
29880,
4981,
29914,
20128,
29914,
28712,
16046,
29914,
1469,
29918,
6948,
948,
1133,
29914,
29933,
287,
29076,
29899,
24599,
1049,
29914,
29933,
287,
29076,
24599,
1049,
29899,
29906,
29900,
29896,
29955,
29899,
29900,
29929,
29899,
29906,
29900,
29889,
17608,
29915,
13,
29888,
29882,
353,
13373,
24541,
29898,
3820,
29918,
2580,
29918,
2084,
29892,
4464,
2433,
29878,
1495,
13,
4419,
353,
285,
29882,
29889,
20897,
1839,
29916,
2033,
7503,
1822,
8552,
580,
396,
921,
29899,
1111,
536,
313,
3733,
279,
269,
12358,
29877,
313,
29955,
29900,
29892,
29871,
29946,
29945,
876,
13,
8071,
353,
285,
29882,
29889,
20897,
1839,
29891,
2033,
7503,
1822,
8552,
580,
396,
343,
29899,
1111,
536,
13,
893,
353,
285,
29882,
29889,
20897,
1839,
7610,
2161,
2033,
7503,
1822,
8552,
580,
396,
7101,
11858,
362,
13,
29888,
29882,
29889,
5358,
580,
13,
13,
2277,
7523,
297,
341,
692,
262,
327,
4380,
1860,
515,
8267,
1445,
13,
2158,
877,
6359,
292,
297,
341,
692,
262,
327,
4380,
1860,
1495,
13,
12510,
358,
29918,
9144,
353,
8207,
5959,
29914,
29880,
4981,
29914,
20128,
29914,
28712,
16046,
29914,
1469,
29918,
6948,
948,
1133,
29914,
24599,
1049,
29899,
12510,
1860,
29899,
29924,
692,
262,
327,
29914,
24599,
1049,
29918,
9496,
1144,
29918,
7024,
29918,
29894,
29896,
29889,
29946,
29889,
29906,
6169,
13,
4668,
353,
8267,
1445,
29889,
6982,
29898,
12510,
358,
29918,
9144,
29897,
29871,
13,
13,
2277,
8741,
317,
9486,
1746,
1303,
297,
363,
6856,
13,
2158,
877,
6359,
292,
297,
1342,
317,
9486,
1746,
1495,
13,
29876,
7184,
29918,
3844,
29890,
29918,
2084,
353,
8207,
5959,
29914,
29880,
4981,
29914,
20128,
29914,
28712,
16046,
29914,
1469,
29918,
6948,
948,
1133,
29914,
29903,
9486,
29924,
5690,
29914,
29940,
29950,
29924,
29899,
29903,
23827,
29918,
1240,
29893,
1562,
29899,
10874,
368,
29899,
1001,
29909,
29899,
4074,
326,
29899,
29896,
29929,
29947,
29900,
29889,
17608,
29915,
13,
29888,
29882,
29906,
353,
13373,
24541,
29898,
29876,
7184,
29918,
3844,
29890,
29918,
2084,
29892,
4464,
2433,
29878,
1495,
13,
29916,
12957,
29918,
29876,
7184,
353,
285,
29882,
29906,
29889,
20897,
1839,
29931,
1164,
2033,
7503,
1822,
8552,
580,
396,
29916,
29899,
1111,
536,
313,
5066,
12957,
29897,
13,
2904,
271,
29918,
29876,
7184,
353,
285,
29882,
29906,
29889,
20897,
1839,
29931,
1299,
2033,
7503,
1822,
8552,
580,
396,
29891,
29899,
1111,
536,
313,
5066,
12957,
29897,
13,
29888,
29882,
29906,
29889,
5358,
580,
13,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
11368,
11901,
317,
9486,
5195,
8618,
29967,
29923,
9838,
13,
2277,
29937,
2683,
1378,
13,
13,
2277,
9943,
29899,
11249,
6592,
304,
1129,
13,
29916,
29918,
29941,
8848,
353,
15473,
29961,
1057,
29906,
29900,
29962,
396,
4559,
472,
3695,
29941,
2383,
10104,
13,
29891,
29918,
29941,
8848,
353,
343,
29891,
29961,
1057,
29906,
29900,
29962,
13,
29879,
29918,
29941,
8848,
353,
17971,
29961,
1057,
29906,
29900,
29892,
1057,
29906,
29900,
29962,
13,
13,
2277,
9943,
29899,
11249,
317,
9486,
13,
29916,
29918,
12957,
29918,
29882,
353,
921,
12957,
29918,
29876,
7184,
29961,
1057,
29906,
29892,
4761,
29906,
29962,
29871,
13,
29891,
29918,
5066,
29918,
29882,
353,
343,
5066,
29918,
29876,
7184,
29961,
1057,
29906,
29892,
4761,
29906,
29962,
396,
10104,
1048,
29871,
29906,
2383,
13,
13,
2158,
877,
9832,
1218,
337,
4836,
287,
27716,
7720,
1495,
13,
29893,
3174,
29947,
29946,
353,
11451,
20865,
29889,
1184,
29926,
703,
29974,
2344,
29922,
29923,
7024,
29954,
29901,
29946,
29941,
29906,
29953,
1159,
396,
7053,
29931,
265,
411,
399,
10749,
29947,
29946,
1418,
398,
1304,
491,
317,
9486,
848,
13,
567,
29876,
29918,
3820,
353,
11451,
20865,
29889,
1184,
29926,
703,
29974,
2344,
29922,
8961,
29887,
29901,
29941,
29946,
29896,
29941,
1159,
396,
2043,
279,
317,
12358,
12122,
4644,
1304,
491,
14195,
29076,
322,
341,
804,
2696,
13,
10351,
29892,
343,
29879,
353,
11451,
20865,
29889,
9067,
29898,
29893,
3174,
29947,
29946,
29892,
6529,
29876,
29918,
3820,
29892,
921,
29918,
12957,
29918,
29882,
29892,
343,
29918,
5066,
29918,
29882,
29897,
13,
29990,
2922,
29892,
612,
2922,
353,
7442,
29889,
4467,
29882,
7720,
29898,
29916,
29918,
29941,
8848,
29892,
343,
29918,
29941,
8848,
29897,
396,
9943,
11249,
29881,
14195,
29076,
1302,
4339,
13,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
14602,
383,
4717,
2303,
11686,
29968,
13,
2277,
29937,
2683,
1378,
13,
13,
2277,
27313,
360,
3100,
348,
388,
3367,
574,
2785,
975,
1269,
4380,
358,
5120,
13,
3626,
29918,
312,
29885,
1372,
353,
426,
29875,
29901,
5159,
363,
474,
297,
4380,
1860,
29918,
517,
29918,
26746,
29913,
13,
1454,
474,
297,
4380,
1860,
29918,
517,
29918,
26746,
29901,
13,
1678,
1596,
877,
29565,
574,
18099,
4380,
358,
6571,
4286,
4830,
29898,
4668,
29889,
11651,
29898,
29875,
29897,
1839,
5813,
25901,
13,
1678,
274,
353,
14974,
5228,
29898,
4668,
29889,
12181,
29898,
29875,
467,
9748,
29897,
13,
1678,
534,
275,
353,
3367,
574,
5987,
29898,
29883,
29897,
13,
1678,
3367,
29918,
312,
29885,
1372,
29961,
29875,
29962,
353,
534,
275,
13,
13,
2277,
6204,
848,
16608,
304,
3787,
639,
29899,
4299,
848,
13,
29937,
1904,
29918,
7039,
353,
6024,
2190,
12107,
29899,
1806,
29924,
29918,
17104,
1975,
742,
525,
27266,
29924,
29918,
29895,
1160,
264,
29882,
449,
742,
525,
29881,
25752,
29924,
29918,
4109,
5824,
3788,
29950,
8193,
29950,
5194,
29918,
14817,
509,
314,
742,
29871,
13,
29937,
462,
525,
29940,
29950,
29924,
29899,
29903,
23827,
29918,
1240,
29893,
1562,
742,
525,
29934,
2477,
6720,
29918,
1217,
295,
742,
525,
29903,
6632,
29956,
20387,
29931,
29918,
1761,
265,
2033,
13,
4299,
29918,
7039,
353,
6024,
2190,
12107,
29899,
1806,
29924,
29918,
17104,
1975,
742,
29962,
13,
6360,
29879,
353,
3464,
29898,
29896,
29929,
29947,
29900,
29892,
29906,
29900,
29896,
29900,
29897,
13,
2962,
29918,
1256,
353,
12865,
29889,
12673,
29898,
6360,
29879,
29961,
29900,
1402,
29896,
29892,
29896,
29897,
13,
355,
29918,
1256,
353,
12865,
29889,
12673,
29898,
6360,
29879,
14352,
29896,
1402,
29896,
29906,
29892,
29941,
29896,
29897,
13,
15190,
353,
10518,
29889,
1256,
29918,
3881,
29898,
2962,
29922,
2962,
29918,
1256,
29892,
1095,
29922,
355,
29918,
1256,
29892,
3005,
29939,
2433,
29924,
1495,
13,
2176,
29918,
546,
29918,
312,
305,
29885,
593,
353,
426,
29875,
29901,
426,
29885,
29901,
426,
29876,
29901,
426,
29891,
29901,
10518,
29889,
17271,
29898,
13099,
29922,
877,
29872,
2608,
362,
742,
29871,
13,
462,
462,
1669,
525,
3149,
29918,
3844,
29890,
8785,
29871,
363,
343,
297,
2440,
29913,
363,
302,
297,
3464,
29898,
29896,
29906,
2915,
363,
286,
297,
1904,
29918,
7039,
29913,
363,
474,
297,
4380,
1860,
29918,
517,
29918,
26746,
29913,
13,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
315,
14789,
13780,
29899,
25021,
15842,
15149,
16999,
2287,
8547,
13,
2277,
29937,
2683,
1378,
13,
13,
2277,
14491,
337,
629,
2205,
287,
317,
9486,
29879,
363,
671,
297,
1269,
4380,
358,
304,
2125,
599,
3625,
848,
13,
13,
1454,
286,
297,
1904,
29918,
7039,
29901,
13,
1678,
260,
29900,
353,
931,
29889,
2230,
580,
13,
1678,
565,
286,
1360,
29915,
27266,
29924,
29918,
29895,
1160,
264,
29882,
449,
2396,
13,
4706,
325,
978,
353,
525,
17061,
5371,
1955,
29934,
29915,
13,
1678,
1683,
29901,
13,
4706,
325,
978,
353,
525,
29903,
9486,
29725,
29915,
13,
1678,
363,
343,
297,
2440,
29901,
13,
4706,
19538,
353,
931,
29889,
2230,
580,
13,
4706,
285,
2084,
353,
8207,
5959,
29914,
29880,
4981,
29914,
20128,
29914,
28712,
16046,
29914,
1469,
29918,
6948,
948,
1133,
29914,
29903,
9486,
29924,
5690,
19248,
7402,
10874,
368,
29899,
1001,
29909,
29899,
4074,
326,
29899,
29912,
1836,
17608,
4286,
4830,
29898,
29885,
29892,
343,
29897,
13,
4706,
285,
29882,
353,
13373,
24541,
29898,
29888,
2084,
29892,
4464,
2433,
29878,
1495,
13,
4706,
1560,
29890,
29918,
29885,
353,
285,
29882,
29889,
20897,
29961,
29894,
978,
3816,
29901,
1822,
8552,
580,
13,
4706,
285,
29882,
29889,
5358,
580,
13,
4706,
270,
29918,
6484,
353,
518,
29881,
363,
270,
297,
10116,
565,
270,
29889,
6360,
1360,
29891,
29962,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
3844,
29890,
29918,
29885,
22164,
396,
363,
1269,
4098,
13,
9651,
444,
1623,
11249,
322,
20064,
403,
317,
9486,
13,
9651,
1560,
29890,
29918,
6289,
353,
1560,
29890,
29918,
29885,
29961,
29875,
3816,
1057,
29906,
29892,
4761,
29906,
29962,
13,
9651,
337,
629,
2205,
287,
29918,
3844,
29890,
353,
20064,
403,
29889,
7720,
1272,
3552,
10351,
29889,
336,
955,
3285,
343,
29879,
29889,
336,
955,
25739,
1560,
29890,
29918,
6289,
29889,
336,
955,
3285,
313,
29990,
2922,
29892,
612,
2922,
511,
1158,
2433,
28502,
342,
1495,
13,
9651,
444,
21029,
317,
9486,
472,
1269,
360,
3100,
348,
388,
17205,
322,
2533,
13,
9651,
363,
432,
297,
4380,
1860,
29918,
517,
29918,
26746,
29901,
13,
18884,
3367,
19536,
353,
3367,
29918,
312,
29885,
1372,
29961,
29926,
29962,
13,
18884,
11858,
800,
353,
5159,
13,
18884,
1560,
29890,
29918,
3149,
29918,
791,
29879,
353,
5159,
13,
18884,
363,
3367,
297,
3367,
19536,
29901,
13,
462,
1678,
1634,
29918,
29916,
29892,
1634,
29918,
29891,
353,
3367,
29889,
276,
6338,
1230,
29918,
3149,
2141,
29916,
29892,
3367,
29889,
276,
6338,
1230,
29918,
3149,
2141,
29891,
13,
462,
1678,
1560,
29890,
29918,
29916,
353,
313,
9302,
29889,
6897,
29898,
29916,
29918,
29941,
8848,
448,
1634,
29918,
29916,
8106,
1191,
1195,
580,
13,
462,
1678,
1560,
29890,
29918,
29891,
353,
313,
9302,
29889,
6897,
29898,
29891,
29918,
29941,
8848,
448,
1634,
29918,
29891,
8106,
1191,
1195,
580,
13,
462,
1678,
11858,
800,
29889,
4397,
29898,
29879,
29918,
29941,
8848,
29961,
3844,
29890,
29918,
29891,
29892,
1560,
29890,
29918,
29916,
2314,
13,
462,
1678,
1560,
29890,
29918,
3149,
29918,
791,
29879,
29889,
4397,
29898,
276,
629,
2205,
287,
29918,
3844,
29890,
29961,
3844,
29890,
29918,
29891,
29892,
1560,
29890,
29918,
29916,
2314,
13,
18884,
4489,
29918,
546,
29918,
312,
305,
29885,
593,
29961,
29926,
3816,
29885,
3816,
29875,
3816,
29891,
29962,
353,
4489,
29918,
546,
29918,
312,
305,
29885,
593,
29961,
29926,
3816,
29885,
3816,
29875,
3816,
29891,
1822,
16645,
29898,
29872,
2608,
362,
29922,
29872,
2608,
800,
29892,
13,
462,
462,
9651,
1298,
29918,
3844,
29890,
29922,
3844,
29890,
29918,
3149,
29918,
791,
29879,
29897,
13,
462,
13,
4706,
15886,
353,
931,
29889,
2230,
580,
13,
4706,
1596,
877,
12881,
3276,
9068,
1629,
6571,
297,
931,
6571,
29879,
4286,
4830,
29898,
29891,
29892,
15886,
29899,
2034,
876,
13,
1678,
260,
29896,
353,
931,
29889,
2230,
580,
13,
1678,
1596,
877,
12881,
3276,
9068,
1904,
6571,
297,
931,
6571,
4286,
4830,
29898,
29885,
29892,
260,
29896,
29899,
29873,
29900,
876,
13,
268,
13,
2277,
29937,
2683,
1378,
13,
2277,
29937,
16507,
2891,
15149,
27640,
2890,
7495,
7194,
4448,
13,
2277,
29937,
2683,
1378,
13,
13,
2176,
29918,
29883,
353,
4489,
29918,
546,
29918,
312,
305,
29885,
593,
29961,
29896,
29900,
29896,
22322,
2190,
12107,
29899,
1806,
29924,
29918,
17104,
1975,
2033,
13,
8977,
29918,
546,
29918,
10874,
353,
426,
29875,
29901,
5159,
363,
474,
297,
3464,
29898,
29896,
29906,
2915,
13,
1454,
474,
297,
3464,
29898,
29896,
29906,
1125,
13,
1678,
270,
29918,
517,
29918,
7122,
353,
518,
2176,
29918,
29883,
29961,
29875,
3816,
29891,
29962,
363,
343,
297,
2440,
29962,
13,
1678,
9657,
29918,
546,
29918,
10874,
29961,
29875,
29962,
353,
10518,
29889,
17685,
29898,
29881,
29918,
517,
29918,
7122,
29897,
13,
13,
29883,
353,
7477,
29889,
657,
29918,
29883,
1958,
877,
3891,
29906,
29900,
29890,
1495,
13,
13,
572,
29873,
29889,
4532,
580,
13,
1454,
474,
297,
3464,
29898,
29896,
29906,
1125,
13,
1678,
4489,
353,
9657,
29918,
546,
29918,
10874,
29961,
29875,
29962,
13,
1678,
396,
285,
353,
20064,
403,
29889,
23579,
3445,
29898,
2176,
1839,
29872,
2608,
362,
7464,
4489,
1839,
3149,
29918,
3844,
29890,
11287,
13,
1678,
396,
14770,
29889,
1557,
2620,
29898,
2176,
1839,
29872,
2608,
362,
7464,
4489,
1839,
3149,
29918,
3844,
29890,
7464,
2927,
29922,
29883,
29898,
29875,
511,
3858,
2433,
13953,
525,
29974,
29881,
29918,
6484,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
8785,
13,
1678,
14770,
29889,
1557,
2620,
29898,
2176,
1839,
29872,
2608,
362,
7464,
4489,
1839,
3149,
29918,
3844,
29890,
7464,
2927,
29922,
29883,
29898,
29875,
29995,
29896,
29906,
511,
3858,
29922,
15190,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
22584,
29979,
8785,
13,
29937,
14770,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
572,
29873,
29889,
4294,
580,
13,
13,
13,
29937,
444,
13,
29937,
444,
8561,
263,
8424,
3538,
5608,
6216,
322,
6492,
372,
13,
29937,
396,
822,
8424,
3538,
29918,
10660,
29898,
29916,
29892,
921,
29900,
29892,
343,
29900,
29892,
413,
29896,
29892,
413,
29906,
1125,
13,
29937,
396,
268,
736,
7442,
29889,
12343,
346,
3538,
29898,
29916,
29892,
518,
29916,
529,
921,
29900,
1402,
518,
2892,
921,
29901,
29895,
29896,
29930,
29916,
718,
343,
29900,
29899,
29895,
29896,
29930,
29916,
29900,
29892,
14013,
921,
29901,
29895,
29906,
29930,
29916,
718,
343,
29900,
29899,
29895,
29906,
29930,
29916,
29900,
2314,
13,
13,
13,
1003,
29892,
4853,
29879,
353,
14770,
29889,
1491,
26762,
29898,
29941,
29892,
29871,
29946,
29892,
6232,
29916,
29922,
5574,
29892,
6232,
29891,
29922,
5574,
29897,
13,
29937,
14770,
29889,
3257,
877,
12300,
29899,
29888,
5367,
24611,
2729,
373,
319,
2965,
669,
350,
2965,
1495,
13,
1454,
474,
297,
3464,
29898,
29896,
29906,
1125,
13,
1678,
4853,
353,
4853,
29879,
29889,
336,
955,
580,
29961,
29875,
29962,
13,
1678,
396,
4489,
353,
4489,
29918,
546,
29918,
312,
305,
29885,
593,
29961,
29896,
29900,
29896,
22322,
2190,
12107,
29899,
1806,
29924,
29918,
17104,
1975,
2033,
29961,
15190,
29961,
29875,
5262,
13,
1678,
4489,
353,
9657,
29918,
546,
29918,
10874,
29961,
29875,
29962,
13,
1678,
396,
4853,
29879,
29889,
336,
955,
580,
29961,
29875,
1822,
1557,
2620,
29898,
2176,
1839,
29872,
2608,
362,
7464,
4489,
1839,
3149,
29918,
3844,
29890,
7464,
2927,
29922,
29883,
29898,
29875,
29995,
29896,
29906,
511,
3858,
29922,
15190,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
22584,
29979,
8785,
13,
1678,
19592,
29918,
3844,
5824,
353,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
11287,
13,
1678,
29342,
284,
583,
353,
19592,
29918,
3844,
5824,
448,
7442,
29889,
12676,
29898,
415,
29918,
3844,
5824,
29897,
13,
1678,
4853,
29889,
1557,
2620,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
7464,
29342,
284,
583,
29892,
2927,
29922,
29883,
29898,
29875,
29995,
29896,
29906,
511,
3858,
29922,
15190,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
22584,
29979,
8785,
13,
1678,
444,
26005,
346,
3538,
5314,
448,
1736,
541,
3984,
17675,
2710,
1196,
24611,
13,
1678,
396,
282,
29892,
321,
353,
24656,
29889,
2764,
345,
29918,
9202,
29898,
12343,
346,
3538,
29918,
10660,
29892,
29871,
13,
1678,
396,
462,
9651,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
2033,
511,
29871,
13,
1678,
396,
462,
9651,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
25901,
13,
1678,
396,
921,
1482,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
4236,
29898,
2176,
1839,
29872,
2608,
362,
25901,
13,
1678,
396,
14770,
29889,
5317,
29898,
29916,
1482,
29892,
8424,
3538,
29918,
10660,
29898,
29916,
1482,
29892,
334,
29886,
876,
13,
1678,
282,
29916,
29892,
11451,
353,
24611,
29918,
9202,
29898,
9302,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
2033,
511,
13,
462,
3986,
396,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
2033,
511,
13,
462,
3986,
29342,
284,
583,
29892,
13,
462,
3986,
4236,
2798,
29922,
29941,
29897,
13,
1678,
4853,
29889,
5317,
29898,
1756,
29892,
11451,
29897,
13,
1678,
4853,
29889,
726,
29898,
29896,
29900,
29900,
29900,
6653,
29896,
29896,
29900,
29900,
5501,
13953,
6571,
4286,
4830,
29898,
29875,
29974,
29896,
876,
13,
29937,
14770,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
572,
29873,
29889,
4294,
580,
13,
13,
29937,
444,
6287,
29881,
304,
15958,
310,
2099,
13,
29937,
2537,
29892,
4853,
29879,
353,
14770,
29889,
1491,
26762,
29898,
29941,
29892,
29871,
29946,
29892,
6232,
29916,
29922,
5574,
29892,
6232,
29891,
29922,
5574,
29897,
13,
29937,
396,
14770,
29889,
3257,
877,
12300,
29899,
29888,
5367,
24611,
2729,
373,
319,
2965,
669,
350,
2965,
1495,
13,
29937,
363,
474,
297,
3464,
29898,
29896,
29906,
1125,
13,
29937,
268,
4489,
353,
4489,
29918,
546,
29918,
312,
305,
29885,
593,
29961,
29896,
29900,
29896,
22322,
2190,
12107,
29899,
1806,
29924,
29918,
17104,
1975,
2033,
29961,
15190,
29961,
29875,
5262,
13,
29937,
268,
396,
4853,
29879,
29889,
336,
955,
580,
29961,
29875,
1822,
1557,
2620,
29898,
2176,
1839,
29872,
2608,
362,
7464,
4489,
1839,
3149,
29918,
3844,
29890,
7464,
2927,
29922,
29883,
29898,
29875,
29995,
29896,
29906,
511,
3858,
29922,
15190,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
22584,
29979,
8785,
13,
29937,
268,
19592,
29918,
3844,
5824,
353,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
11287,
13,
29937,
268,
285,
945,
29918,
273,
290,
284,
583,
353,
313,
415,
29918,
3844,
5824,
448,
7442,
29889,
12676,
29898,
415,
29918,
3844,
5824,
876,
29914,
9302,
29889,
12676,
29898,
415,
29918,
3844,
5824,
29897,
13,
29937,
268,
4853,
29879,
29889,
336,
955,
580,
29961,
29875,
1822,
1557,
2620,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
7464,
285,
945,
29918,
273,
290,
284,
583,
29892,
2927,
29922,
29883,
29898,
29875,
29995,
29896,
29906,
511,
3858,
29922,
15190,
29961,
29875,
1822,
710,
615,
603,
877,
29995,
29885,
22584,
29979,
8785,
13,
29937,
268,
444,
26005,
346,
3538,
5314,
448,
1736,
541,
3984,
17675,
2710,
1196,
24611,
13,
29937,
268,
396,
282,
29892,
321,
353,
24656,
29889,
2764,
345,
29918,
9202,
29898,
12343,
346,
3538,
29918,
10660,
29892,
29871,
13,
29937,
268,
396,
462,
9651,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
2033,
511,
29871,
13,
29937,
268,
396,
462,
9651,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
25901,
13,
29937,
268,
396,
921,
1482,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
4236,
29898,
2176,
1839,
29872,
2608,
362,
25901,
13,
29937,
268,
396,
14770,
29889,
5317,
29898,
29916,
1482,
29892,
8424,
3538,
29918,
10660,
29898,
29916,
1482,
29892,
334,
29886,
876,
13,
29937,
268,
282,
29916,
29892,
11451,
353,
24611,
29918,
9202,
29898,
9302,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
29872,
2608,
362,
2033,
511,
13,
29937,
462,
965,
396,
7442,
29889,
294,
2378,
29898,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
29872,
2608,
362,
1495,
1839,
3149,
29918,
3844,
29890,
2033,
511,
13,
29937,
462,
965,
285,
945,
29918,
273,
290,
284,
583,
29892,
13,
29937,
462,
965,
4236,
2798,
29922,
29941,
29897,
13,
29937,
268,
4853,
29879,
29889,
336,
955,
580,
29961,
29875,
1822,
5317,
29898,
1756,
29892,
11451,
29897,
13,
29937,
396,
14770,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
29937,
14770,
29889,
4294,
580,
13,
13,
2
] |
cea/optimization/master/evaluation.py | architecture-building-systems/cea-toolbox | 0 | 160510 | <filename>cea/optimization/master/evaluation.py
"""
Evaluation function of an individual
"""
import cea.inputlocator
from cea.optimization.master import cost_model
from cea.optimization.master import master_to_slave as master
from cea.optimization.master.generation import individual_to_barcode
from cea.optimization.master.performance_aggregation import summarize_results_individual
from cea.optimization.slave import cooling_main
from cea.optimization.slave import electricity_main
from cea.optimization.slave import heating_main
# +++++++++++++++++++++++++++++++++++++
# Main objective function evaluation
# ++++++++++++++++++++++++++++++++++++++
def evaluation_main(individual,
building_names_all,
locator,
network_features,
weather_features,
config,
prices,
lca,
individual_number,
generation_number,
column_names_individual,
column_names_buildings_heating,
column_names_buildings_cooling,
building_names_heating,
building_names_cooling,
building_names_electricity,
district_heating_network,
district_cooling_network,
technologies_heating_allowed,
technologies_cooling_allowed
):
"""
This function evaluates an individual
:param individual: Input individual
:param building_names_all: names of buildings in the analysed district
:param locator: paths to cea input files
:param network_features: characteristic parameters (pumping energy, mass flow rate, thermal losses & piping cost)
of the district cooling/heating network
:param weather_features: weather data for the selected location (ambient temperature, ground temperature etc.)
:param config: configurations of cea
:param prices: catalogue of energy prices (e.g. for natural gas, electricity, biomass etc.)
:param lca: catalogue of emission intensities of energy carriers
:param individual_number: unique identifier of the individual in that generation
:param generation_number: unique identifier of the generation in this optimization run
:param column_names_individual: description of the parameter list in the individual
:param column_names_buildings_heating: names of all buildings that are connected to a district heating system
:param column_names_buildings_cooling: names of all buildings that are connected to a district cooling system
:param building_names_heating: names of all buildings that have a heating load (space heat, hot water etc.)
:param building_names_cooling: names of all buildings that have a cooling load
:param building_names_electricity: names of all buildings that have an electricity load
:param district_heating_network: indicator defining if district heating networks should be analyzed
:param district_cooling_network: indicator defining if district heating networks should be analyzed
:param technologies_heating_allowed: district heating technologies to be considered in the optimization
:param technologies_cooling_allowed: district cooling technologies to be considered in the optimization
:type individual: list
:type individual_number: int
:type generation_number: int
:type building_names_all: list of str
:type column_names_buildings_heating: list of str
:type column_names_buildings_cooling: list of str
:type building_names_heating: list of str
:type building_names_cooling: list of str
:type building_names_electricity: list of str
:type locator: cea.inputlocator.InputLocator class object
:type network_features: cea.optimization.distribution.network_optimization_features.NetworkOptimizationFeatures
class object
:type weather_features: cea.optimization.preprocessing.preprocessing_main.WeatherFeatures class object
:type config: cea.config.Configuration class object
:type prices: cea.optimization.prices.Prices class object
:type lca: cea.optimization.lca_calculations.LcaCalculations class object
:type district_heating_network: bool
:type district_cooling_network: bool
:type technologies_heating_allowed: list of str
:type technologies_cooling_allowed: list of str
:type column_names_individual: list of str
:return: Resulting values of the objective function. costs, CO2, prim
:rtype: tuple
"""
# CREATE THE INDIVIDUAL BARCODE AND INDIVIDUAL WITH HER COLUMN NAME AS A DICT
DHN_barcode, DCN_barcode,\
individual_with_name_dict, building_connectivity_dict = individual_to_barcode(individual,
building_names_all,
building_names_heating,
building_names_cooling,
column_names_individual,
column_names_buildings_heating,
column_names_buildings_cooling)
print("\nEVALUATING THE NEXT SYSTEM OPTION/INDIVIDUAL")
print(individual_with_name_dict)
# CREATE CLASS AND PASS KEY CHARACTERISTICS OF INDIVIDUAL
# THIS CLASS SHOULD CONTAIN ALL VARIABLES THAT MAKE AN INDIVIDUAL CONFIGURATION
master_to_slave_vars = master.export_data_to_master_to_slave_class(locator,
generation_number,
individual_number,
individual_with_name_dict,
building_names_all,
building_names_heating,
building_names_cooling,
building_names_electricity,
DHN_barcode,
DCN_barcode,
district_heating_network,
district_cooling_network,
technologies_heating_allowed,
technologies_cooling_allowed,
weather_features,
config
)
# DISTRICT HEATING NETWORK
district_heating_fixed_costs, \
district_heating_generation_dispatch, \
district_heating_electricity_requirements_dispatch, \
district_heating_fuel_requirements_dispatch, \
district_heating_capacity_installed = heating_main.district_heating_network(locator,
config,
master_to_slave_vars,
network_features,
)
# DISTRICT COOLING NETWORK:
district_cooling_fixed_costs, \
district_cooling_generation_dispatch, \
district_cooling_electricity_requirements_dispatch, \
district_cooling_fuel_requirements_dispatch, \
district_cooling_capacity_installed = cooling_main.district_cooling_network(locator,
config,
master_to_slave_vars,
network_features,
weather_features)
# ELECTRICITY CONSUMPTION CALCULATION
district_electricity_fixed_costs, \
district_electricity_dispatch, \
district_electricity_demands, \
district_electricity_capacity_installed = electricity_main.electricity_calculations_of_all_buildings(
locator,
master_to_slave_vars,
district_heating_generation_dispatch,
district_heating_electricity_requirements_dispatch,
district_cooling_generation_dispatch,
district_cooling_electricity_requirements_dispatch)
# electricity_main.extract_fuels_demand_buildings(master_to_slave_vars, building_names_all, locator)
# CALCULATE COSTS AND EMISSIONS
print("DISTRICT ENERGY SYSTEM - COSTS, PRIMARY ENERGY AND EMISSIONS OF CONNECTED BUILDINGS")
buildings_district_scale_costs, \
buildings_district_scale_emissions = cost_model.buildings_district_scale_costs_and_emissions(
district_heating_fixed_costs,
district_cooling_fixed_costs,
district_electricity_fixed_costs,
district_electricity_dispatch,
district_heating_fuel_requirements_dispatch,
district_cooling_fuel_requirements_dispatch,
district_electricity_demands,
prices,
lca)
buildings_building_scale_costs, \
buildings_building_scale_emissions, \
buildings_building_scale_heating_capacities, \
buildings_building_scale_cooling_capacities = cost_model.buildings_building_scale_costs_and_emissions(
building_names_heating,
building_names_cooling,
locator,
master_to_slave_vars)
print("AGGREGATING RESULTS")
TAC_sys_USD, GHG_sys_tonCO2, performance_totals = summarize_results_individual(buildings_district_scale_costs,
buildings_district_scale_emissions,
buildings_building_scale_costs,
buildings_building_scale_emissions)
print('Total TAC in USD = ' + str(round(TAC_sys_USD)))
print('Total GHG emissions in tonCO2-eq = ' + str(round(GHG_sys_tonCO2)))
return TAC_sys_USD, \
GHG_sys_tonCO2, \
buildings_district_scale_costs, \
buildings_district_scale_emissions, \
buildings_building_scale_costs, \
buildings_building_scale_emissions, \
district_heating_generation_dispatch, \
district_cooling_generation_dispatch, \
district_electricity_dispatch, \
district_electricity_demands, \
performance_totals, \
building_connectivity_dict, \
district_heating_capacity_installed, \
district_cooling_capacity_installed, \
district_electricity_capacity_installed, \
buildings_building_scale_heating_capacities, \
buildings_building_scale_cooling_capacities
| [
1,
529,
9507,
29958,
346,
29874,
29914,
20640,
2133,
29914,
6207,
29914,
24219,
362,
29889,
2272,
13,
15945,
29908,
13,
29923,
4387,
362,
740,
310,
385,
5375,
13,
13,
15945,
29908,
13,
13,
5215,
2257,
29874,
29889,
2080,
2029,
1061,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
6207,
1053,
3438,
29918,
4299,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
6207,
1053,
5835,
29918,
517,
29918,
29879,
18398,
408,
5835,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
6207,
29889,
4738,
362,
1053,
5375,
29918,
517,
29918,
1646,
401,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
6207,
29889,
546,
13390,
29918,
26193,
362,
1053,
19138,
675,
29918,
9902,
29918,
513,
23352,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
29879,
18398,
1053,
12528,
292,
29918,
3396,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
29879,
18398,
1053,
12646,
537,
29918,
3396,
13,
3166,
2257,
29874,
29889,
20640,
2133,
29889,
29879,
18398,
1053,
540,
1218,
29918,
3396,
13,
13,
13,
29937,
718,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
13,
29937,
4241,
12091,
740,
17983,
13,
29937,
718,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
1817,
29974,
13,
13,
1753,
17983,
29918,
3396,
29898,
513,
23352,
29892,
13,
462,
1678,
5214,
29918,
7039,
29918,
497,
29892,
13,
462,
1678,
1180,
1061,
29892,
13,
462,
1678,
3564,
29918,
22100,
29892,
13,
462,
1678,
14826,
29918,
22100,
29892,
13,
462,
1678,
2295,
29892,
13,
462,
1678,
26094,
29892,
13,
462,
1678,
301,
1113,
29892,
13,
462,
1678,
5375,
29918,
4537,
29892,
13,
462,
1678,
12623,
29918,
4537,
29892,
13,
462,
1678,
1897,
29918,
7039,
29918,
513,
23352,
29892,
13,
462,
1678,
1897,
29918,
7039,
29918,
4282,
886,
29918,
354,
1218,
29892,
13,
462,
1678,
1897,
29918,
7039,
29918,
4282,
886,
29918,
1111,
324,
292,
29892,
13,
462,
1678,
5214,
29918,
7039,
29918,
354,
1218,
29892,
13,
462,
1678,
5214,
29918,
7039,
29918,
1111,
324,
292,
29892,
13,
462,
1678,
5214,
29918,
7039,
29918,
15436,
2200,
537,
29892,
13,
462,
1678,
6474,
29918,
354,
1218,
29918,
11618,
29892,
13,
462,
1678,
6474,
29918,
1111,
324,
292,
29918,
11618,
29892,
13,
462,
1678,
5722,
11763,
29918,
354,
1218,
29918,
24622,
29892,
13,
462,
1678,
5722,
11763,
29918,
1111,
324,
292,
29918,
24622,
13,
462,
268,
1125,
13,
1678,
9995,
13,
1678,
910,
740,
6161,
1078,
385,
5375,
13,
13,
1678,
584,
3207,
5375,
29901,
10567,
5375,
13,
1678,
584,
3207,
5214,
29918,
7039,
29918,
497,
29901,
2983,
310,
13814,
297,
278,
3483,
952,
287,
6474,
13,
1678,
584,
3207,
1180,
1061,
29901,
10898,
304,
2257,
29874,
1881,
2066,
13,
1678,
584,
3207,
3564,
29918,
22100,
29901,
17443,
4128,
313,
29886,
3427,
292,
5864,
29892,
4158,
4972,
6554,
29892,
26963,
28495,
669,
8450,
292,
3438,
29897,
13,
462,
632,
310,
278,
6474,
12528,
292,
29914,
354,
1218,
3564,
13,
1678,
584,
3207,
14826,
29918,
22100,
29901,
14826,
848,
363,
278,
4629,
4423,
313,
1117,
993,
10430,
29892,
5962,
10430,
2992,
1846,
13,
1678,
584,
3207,
2295,
29901,
22920,
310,
2257,
29874,
13,
1678,
584,
3207,
26094,
29901,
16653,
434,
310,
5864,
26094,
313,
29872,
29889,
29887,
29889,
363,
5613,
10489,
29892,
12646,
537,
29892,
4768,
290,
465,
2992,
1846,
13,
1678,
584,
3207,
301,
1113,
29901,
16653,
434,
310,
25477,
12838,
1907,
310,
5864,
19638,
414,
13,
1678,
584,
3207,
5375,
29918,
4537,
29901,
5412,
15882,
310,
278,
5375,
297,
393,
12623,
13,
1678,
584,
3207,
12623,
29918,
4537,
29901,
5412,
15882,
310,
278,
12623,
297,
445,
13883,
1065,
13,
1678,
584,
3207,
1897,
29918,
7039,
29918,
513,
23352,
29901,
6139,
310,
278,
3443,
1051,
297,
278,
5375,
13,
1678,
584,
3207,
1897,
29918,
7039,
29918,
4282,
886,
29918,
354,
1218,
29901,
2983,
310,
599,
13814,
393,
526,
6631,
304,
263,
6474,
540,
1218,
1788,
13,
1678,
584,
3207,
1897,
29918,
7039,
29918,
4282,
886,
29918,
1111,
324,
292,
29901,
2983,
310,
599,
13814,
393,
526,
6631,
304,
263,
6474,
12528,
292,
1788,
13,
1678,
584,
3207,
5214,
29918,
7039,
29918,
354,
1218,
29901,
2983,
310,
599,
13814,
393,
505,
263,
540,
1218,
2254,
313,
3493,
12871,
29892,
7375,
4094,
2992,
1846,
13,
1678,
584,
3207,
5214,
29918,
7039,
29918,
1111,
324,
292,
29901,
2983,
310,
599,
13814,
393,
505,
263,
12528,
292,
2254,
13,
1678,
584,
3207,
5214,
29918,
7039,
29918,
15436,
2200,
537,
29901,
2983,
310,
599,
13814,
393,
505,
385,
12646,
537,
2254,
13,
1678,
584,
3207,
6474,
29918,
354,
1218,
29918,
11618,
29901,
27717,
16184,
565,
6474,
540,
1218,
14379,
881,
367,
29537,
287,
13,
1678,
584,
3207,
6474,
29918,
1111,
324,
292,
29918,
11618,
29901,
27717,
16184,
565,
6474,
540,
1218,
14379,
881,
367,
29537,
287,
13,
1678,
584,
3207,
5722,
11763,
29918,
354,
1218,
29918,
24622,
29901,
6474,
540,
1218,
5722,
11763,
304,
367,
5545,
297,
278,
13883,
13,
1678,
584,
3207,
5722,
11763,
29918,
1111,
324,
292,
29918,
24622,
29901,
6474,
12528,
292,
5722,
11763,
304,
367,
5545,
297,
278,
13883,
13,
13,
1678,
584,
1853,
5375,
29901,
1051,
13,
1678,
584,
1853,
5375,
29918,
4537,
29901,
938,
13,
1678,
584,
1853,
12623,
29918,
4537,
29901,
938,
13,
1678,
584,
1853,
5214,
29918,
7039,
29918,
497,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
1897,
29918,
7039,
29918,
4282,
886,
29918,
354,
1218,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
1897,
29918,
7039,
29918,
4282,
886,
29918,
1111,
324,
292,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
5214,
29918,
7039,
29918,
354,
1218,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
5214,
29918,
7039,
29918,
1111,
324,
292,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
5214,
29918,
7039,
29918,
15436,
2200,
537,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
1180,
1061,
29901,
2257,
29874,
29889,
2080,
2029,
1061,
29889,
4290,
3524,
1061,
770,
1203,
13,
1678,
584,
1853,
3564,
29918,
22100,
29901,
2257,
29874,
29889,
20640,
2133,
29889,
27691,
29889,
11618,
29918,
20640,
2133,
29918,
22100,
29889,
13724,
20624,
326,
2133,
8263,
3698,
13,
462,
9651,
770,
1203,
13,
1678,
584,
1853,
14826,
29918,
22100,
29901,
2257,
29874,
29889,
20640,
2133,
29889,
1457,
19170,
29889,
1457,
19170,
29918,
3396,
29889,
4806,
1624,
8263,
3698,
770,
1203,
13,
1678,
584,
1853,
2295,
29901,
2257,
29874,
29889,
2917,
29889,
8614,
770,
1203,
13,
1678,
584,
1853,
26094,
29901,
2257,
29874,
29889,
20640,
2133,
29889,
558,
1575,
29889,
4040,
1575,
770,
1203,
13,
1678,
584,
1853,
301,
1113,
29901,
2257,
29874,
29889,
20640,
2133,
29889,
29880,
1113,
29918,
15807,
800,
29889,
29931,
1113,
27065,
800,
770,
1203,
13,
1678,
584,
1853,
6474,
29918,
354,
1218,
29918,
11618,
29901,
6120,
13,
1678,
584,
1853,
6474,
29918,
1111,
324,
292,
29918,
11618,
29901,
6120,
13,
1678,
584,
1853,
5722,
11763,
29918,
354,
1218,
29918,
24622,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
5722,
11763,
29918,
1111,
324,
292,
29918,
24622,
29901,
1051,
310,
851,
13,
1678,
584,
1853,
1897,
29918,
7039,
29918,
513,
23352,
29901,
1051,
310,
851,
13,
13,
1678,
584,
2457,
29901,
7867,
292,
1819,
310,
278,
12091,
740,
29889,
21544,
29892,
4810,
29906,
29892,
1903,
13,
1678,
584,
29878,
1853,
29901,
18761,
13,
1678,
9995,
13,
13,
1678,
396,
14602,
6093,
2672,
4571,
13044,
29965,
1964,
350,
1718,
16524,
5300,
2672,
4571,
13044,
29965,
1964,
22659,
379,
1001,
23958,
29127,
27085,
3339,
319,
22471,
1783,
13,
1678,
360,
29950,
29940,
29918,
1646,
401,
29892,
13681,
29940,
29918,
1646,
401,
2053,
13,
1678,
5375,
29918,
2541,
29918,
978,
29918,
8977,
29892,
5214,
29918,
6915,
2068,
29918,
8977,
353,
5375,
29918,
517,
29918,
1646,
401,
29898,
513,
23352,
29892,
13,
462,
462,
462,
462,
462,
29871,
5214,
29918,
7039,
29918,
497,
29892,
13,
462,
462,
462,
462,
462,
29871,
5214,
29918,
7039,
29918,
354,
1218,
29892,
13,
462,
462,
462,
462,
462,
29871,
5214,
29918,
7039,
29918,
1111,
324,
292,
29892,
13,
462,
462,
462,
462,
462,
29871,
1897,
29918,
7039,
29918,
513,
23352,
29892,
13,
462,
462,
462,
462,
462,
29871,
1897,
29918,
7039,
29918,
4282,
886,
29918,
354,
1218,
29892,
13,
462,
462,
462,
462,
462,
29871,
1897,
29918,
7039,
29918,
4282,
886,
29918,
1111,
324,
292,
29897,
13,
13,
1678,
1596,
14182,
29876,
29923,
8932,
29965,
1299,
4214,
6093,
405,
12194,
28962,
1254,
12665,
6418,
29911,
2725,
29914,
1177,
4571,
13044,
29965,
1964,
1159,
13,
1678,
1596,
29898,
513,
23352,
29918,
2541,
29918,
978,
29918,
8977,
29897,
13,
1678,
396,
14602,
315,
4375,
1799,
5300,
17687,
1799,
14636,
26871,
17923,
1001,
9047,
2965,
29903,
8079,
2672,
4571,
13044,
29965,
1964,
13,
1678,
396,
3446,
3235,
315,
4375,
1799,
317,
8187,
29965,
10249,
8707,
6040,
1177,
15149,
478,
1718,
29902,
6181,
29903,
3446,
1299,
14861,
6059,
13764,
2672,
4571,
13044,
29965,
1964,
8707,
18667,
4574,
8098,
13,
1678,
5835,
29918,
517,
29918,
29879,
18398,
29918,
16908,
353,
5835,
29889,
15843,
29918,
1272,
29918,
517,
29918,
6207,
29918,
517,
29918,
29879,
18398,
29918,
1990,
29898,
2029,
1061,
29892,
13,
462,
462,
462,
462,
539,
12623,
29918,
4537,
29892,
13,
462,
462,
462,
462,
539,
5375,
29918,
4537,
29892,
13,
462,
462,
462,
462,
539,
5375,
29918,
2541,
29918,
978,
29918,
8977,
29892,
13,
462,
462,
462,
462,
539,
5214,
29918,
7039,
29918,
497,
29892,
13,
462,
462,
462,
462,
539,
5214,
29918,
7039,
29918,
354,
1218,
29892,
13,
462,
462,
462,
462,
539,
5214,
29918,
7039,
29918,
1111,
324,
292,
29892,
13,
462,
462,
462,
462,
539,
5214,
29918,
7039,
29918,
15436,
2200,
537,
29892,
13,
462,
462,
462,
462,
539,
360,
29950,
29940,
29918,
1646,
401,
29892,
13,
462,
462,
462,
462,
539,
13681,
29940,
29918,
1646,
401,
29892,
13,
462,
462,
462,
462,
539,
6474,
29918,
354,
1218,
29918,
11618,
29892,
13,
462,
462,
462,
462,
539,
6474,
29918,
1111,
324,
292,
29918,
11618,
29892,
13,
462,
462,
462,
462,
539,
5722,
11763,
29918,
354,
1218,
29918,
24622,
29892,
13,
462,
462,
462,
462,
539,
5722,
11763,
29918,
1111,
324,
292,
29918,
24622,
29892,
13,
462,
462,
462,
462,
539,
14826,
29918,
22100,
29892,
13,
462,
462,
462,
462,
539,
2295,
13,
462,
462,
462,
462,
539,
1723,
13,
13,
1678,
396,
360,
9047,
3960,
1783,
17714,
1299,
4214,
405,
2544,
11686,
29968,
13,
1678,
6474,
29918,
354,
1218,
29918,
20227,
29918,
18253,
29879,
29892,
320,
13,
1678,
6474,
29918,
354,
1218,
29918,
4738,
362,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
354,
1218,
29918,
15436,
2200,
537,
29918,
12277,
1860,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
354,
1218,
29918,
29888,
2491,
29918,
12277,
1860,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
354,
1218,
29918,
5030,
5946,
29918,
25537,
353,
540,
1218,
29918,
3396,
29889,
29881,
6801,
29918,
354,
1218,
29918,
11618,
29898,
2029,
1061,
29892,
13,
462,
462,
462,
462,
18884,
2295,
29892,
13,
462,
462,
462,
462,
18884,
5835,
29918,
517,
29918,
29879,
18398,
29918,
16908,
29892,
13,
462,
462,
462,
462,
18884,
3564,
29918,
22100,
29892,
13,
462,
462,
462,
462,
18884,
1723,
13,
13,
1678,
396,
360,
9047,
3960,
1783,
4810,
5607,
4214,
405,
2544,
11686,
29968,
29901,
13,
1678,
6474,
29918,
1111,
324,
292,
29918,
20227,
29918,
18253,
29879,
29892,
320,
13,
1678,
6474,
29918,
1111,
324,
292,
29918,
4738,
362,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
1111,
324,
292,
29918,
15436,
2200,
537,
29918,
12277,
1860,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
1111,
324,
292,
29918,
29888,
2491,
29918,
12277,
1860,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
1111,
324,
292,
29918,
5030,
5946,
29918,
25537,
353,
12528,
292,
29918,
3396,
29889,
29881,
6801,
29918,
1111,
324,
292,
29918,
11618,
29898,
2029,
1061,
29892,
13,
462,
462,
462,
462,
18884,
2295,
29892,
13,
462,
462,
462,
462,
18884,
5835,
29918,
517,
29918,
29879,
18398,
29918,
16908,
29892,
13,
462,
462,
462,
462,
18884,
3564,
29918,
22100,
29892,
13,
462,
462,
462,
462,
18884,
14826,
29918,
22100,
29897,
13,
13,
1678,
396,
382,
3281,
29934,
2965,
11937,
8707,
14605,
3580,
29911,
2725,
315,
1964,
29907,
13309,
8098,
13,
1678,
6474,
29918,
15436,
2200,
537,
29918,
20227,
29918,
18253,
29879,
29892,
320,
13,
1678,
6474,
29918,
15436,
2200,
537,
29918,
13369,
29892,
320,
13,
1678,
6474,
29918,
15436,
2200,
537,
29918,
2310,
4167,
29892,
320,
13,
1678,
6474,
29918,
15436,
2200,
537,
29918,
5030,
5946,
29918,
25537,
353,
12646,
537,
29918,
3396,
29889,
15436,
2200,
537,
29918,
15807,
800,
29918,
974,
29918,
497,
29918,
4282,
886,
29898,
13,
4706,
1180,
1061,
29892,
13,
4706,
5835,
29918,
517,
29918,
29879,
18398,
29918,
16908,
29892,
13,
4706,
6474,
29918,
354,
1218,
29918,
4738,
362,
29918,
13369,
29892,
13,
4706,
6474,
29918,
354,
1218,
29918,
15436,
2200,
537,
29918,
12277,
1860,
29918,
13369,
29892,
13,
4706,
6474,
29918,
1111,
324,
292,
29918,
4738,
362,
29918,
13369,
29892,
13,
4706,
6474,
29918,
1111,
324,
292,
29918,
15436,
2200,
537,
29918,
12277,
1860,
29918,
13369,
29897,
13,
268,
13,
1678,
396,
12646,
537,
29918,
3396,
29889,
21111,
29918,
21154,
1379,
29918,
2310,
392,
29918,
4282,
886,
29898,
6207,
29918,
517,
29918,
29879,
18398,
29918,
16908,
29892,
5214,
29918,
7039,
29918,
497,
29892,
1180,
1061,
29897,
13,
13,
1678,
396,
315,
1964,
29907,
13309,
3040,
315,
3718,
29903,
5300,
382,
10403,
13507,
29903,
13,
1678,
1596,
703,
4571,
1254,
3960,
1783,
12524,
1001,
29954,
29979,
28962,
1254,
12665,
448,
315,
3718,
29903,
29892,
29778,
12524,
1001,
29954,
29979,
5300,
382,
10403,
13507,
29903,
8079,
8707,
8186,
1783,
3352,
350,
25282,
4214,
29903,
1159,
13,
1678,
13814,
29918,
29881,
6801,
29918,
7052,
29918,
18253,
29879,
29892,
320,
13,
1678,
13814,
29918,
29881,
6801,
29918,
7052,
29918,
331,
6847,
353,
3438,
29918,
4299,
29889,
4282,
886,
29918,
29881,
6801,
29918,
7052,
29918,
18253,
29879,
29918,
392,
29918,
331,
6847,
29898,
13,
4706,
6474,
29918,
354,
1218,
29918,
20227,
29918,
18253,
29879,
29892,
13,
4706,
6474,
29918,
1111,
324,
292,
29918,
20227,
29918,
18253,
29879,
29892,
13,
4706,
6474,
29918,
15436,
2200,
537,
29918,
20227,
29918,
18253,
29879,
29892,
13,
4706,
6474,
29918,
15436,
2200,
537,
29918,
13369,
29892,
13,
4706,
6474,
29918,
354,
1218,
29918,
29888,
2491,
29918,
12277,
1860,
29918,
13369,
29892,
13,
4706,
6474,
29918,
1111,
324,
292,
29918,
29888,
2491,
29918,
12277,
1860,
29918,
13369,
29892,
13,
4706,
6474,
29918,
15436,
2200,
537,
29918,
2310,
4167,
29892,
13,
4706,
26094,
29892,
13,
4706,
301,
1113,
29897,
13,
13,
1678,
13814,
29918,
25237,
29918,
7052,
29918,
18253,
29879,
29892,
320,
13,
1678,
13814,
29918,
25237,
29918,
7052,
29918,
331,
6847,
29892,
320,
13,
1678,
13814,
29918,
25237,
29918,
7052,
29918,
354,
1218,
29918,
5030,
562,
1907,
29892,
320,
13,
1678,
13814,
29918,
25237,
29918,
7052,
29918,
1111,
324,
292,
29918,
5030,
562,
1907,
353,
3438,
29918,
4299,
29889,
4282,
886,
29918,
25237,
29918,
7052,
29918,
18253,
29879,
29918,
392,
29918,
331,
6847,
29898,
13,
4706,
5214,
29918,
7039,
29918,
354,
1218,
29892,
13,
4706,
5214,
29918,
7039,
29918,
1111,
324,
292,
29892,
13,
4706,
1180,
1061,
29892,
13,
4706,
5835,
29918,
517,
29918,
29879,
18398,
29918,
16908,
29897,
13,
13,
1678,
1596,
703,
10051,
29954,
18166,
1299,
4214,
390,
2890,
8647,
29903,
1159,
13,
1678,
323,
2477,
29918,
9675,
29918,
3308,
29928,
29892,
402,
29950,
29954,
29918,
9675,
29918,
880,
3217,
29906,
29892,
4180,
29918,
4260,
1338,
353,
19138,
675,
29918,
9902,
29918,
513,
23352,
29898,
4282,
886,
29918,
29881,
6801,
29918,
7052,
29918,
18253,
29879,
29892,
13,
462,
462,
462,
462,
462,
259,
13814,
29918,
29881,
6801,
29918,
7052,
29918,
331,
6847,
29892,
13,
462,
462,
462,
462,
462,
259,
13814,
29918,
25237,
29918,
7052,
29918,
18253,
29879,
29892,
13,
462,
462,
462,
462,
462,
259,
13814,
29918,
25237,
29918,
7052,
29918,
331,
6847,
29897,
13,
13,
1678,
1596,
877,
11536,
323,
2477,
297,
3148,
29928,
353,
525,
718,
851,
29898,
14486,
29898,
8687,
29918,
9675,
29918,
3308,
29928,
4961,
13,
1678,
1596,
877,
11536,
402,
29950,
29954,
953,
6847,
297,
15243,
3217,
29906,
29899,
1837,
353,
525,
718,
851,
29898,
14486,
29898,
29954,
29950,
29954,
29918,
9675,
29918,
880,
3217,
29906,
4961,
13,
13,
1678,
736,
323,
2477,
29918,
9675,
29918,
3308,
29928,
29892,
320,
13,
965,
402,
29950,
29954,
29918,
9675,
29918,
880,
3217,
29906,
29892,
320,
13,
965,
13814,
29918,
29881,
6801,
29918,
7052,
29918,
18253,
29879,
29892,
320,
13,
965,
13814,
29918,
29881,
6801,
29918,
7052,
29918,
331,
6847,
29892,
320,
13,
965,
13814,
29918,
25237,
29918,
7052,
29918,
18253,
29879,
29892,
320,
13,
965,
13814,
29918,
25237,
29918,
7052,
29918,
331,
6847,
29892,
320,
13,
965,
6474,
29918,
354,
1218,
29918,
4738,
362,
29918,
13369,
29892,
320,
13,
965,
6474,
29918,
1111,
324,
292,
29918,
4738,
362,
29918,
13369,
29892,
320,
13,
965,
6474,
29918,
15436,
2200,
537,
29918,
13369,
29892,
320,
13,
965,
6474,
29918,
15436,
2200,
537,
29918,
2310,
4167,
29892,
320,
13,
965,
4180,
29918,
4260,
1338,
29892,
320,
13,
965,
5214,
29918,
6915,
2068,
29918,
8977,
29892,
320,
13,
965,
6474,
29918,
354,
1218,
29918,
5030,
5946,
29918,
25537,
29892,
320,
13,
965,
6474,
29918,
1111,
324,
292,
29918,
5030,
5946,
29918,
25537,
29892,
320,
13,
965,
6474,
29918,
15436,
2200,
537,
29918,
5030,
5946,
29918,
25537,
29892,
320,
13,
965,
13814,
29918,
25237,
29918,
7052,
29918,
354,
1218,
29918,
5030,
562,
1907,
29892,
320,
13,
965,
13814,
29918,
25237,
29918,
7052,
29918,
1111,
324,
292,
29918,
5030,
562,
1907,
13,
2
] |
daybed/tests/support.py | spiral-project/daybed | 19 | 1602250 | import collections
try:
import unittest2 as unittest
except ImportError:
import unittest # NOQA
import base64
import six
import webtest
from daybed import __version__
from daybed.tokens import get_hawk_credentials
class PrefixedRequestClass(webtest.app.TestRequest):
@classmethod
def blank(cls, path, *args, **kwargs):
path = '/v%s%s' % (__version__.split('.')[0], path)
return webtest.app.TestRequest.blank(path, *args, **kwargs)
class BaseWebTest(unittest.TestCase):
"""Base Web Test to test your cornice service.
It setups the database before each test and delete it after.
"""
def setUp(self):
self.app = webtest.TestApp("config:conf/tests.ini", relative_to='.')
self.app.RequestClass = PrefixedRequestClass
self.db = self.app.app.registry.backend
self.indexer = self.app.app.registry.index
token, self.credentials = get_hawk_credentials()
self.db.store_credentials(token, self.credentials)
auth_password = base64.b64encode(
(u'%s:%s' % (self.credentials['id'],
self.credentials['key'])).encode('ascii')) \
.strip().decode('ascii')
self.headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic {0}'.format(auth_password),
}
def tearDown(self):
self.db.delete_db()
self.indexer.delete_indices()
def force_unicode(data):
""" Recursively force unicode.
Works for dict keys, list values etc.
(source: http://stackoverflow.com/questions/1254454/)
"""
if isinstance(data, six.string_types):
return six.text_type(data)
elif isinstance(data, collections.Mapping):
return dict(map(force_unicode, six.iteritems(data)))
elif isinstance(data, collections.Iterable):
return type(data)(map(force_unicode, data))
else:
return data
| [
1,
1053,
16250,
13,
2202,
29901,
13,
1678,
1053,
443,
27958,
29906,
408,
443,
27958,
13,
19499,
16032,
2392,
29901,
13,
1678,
1053,
443,
27958,
29871,
396,
11698,
29984,
29909,
13,
5215,
2967,
29953,
29946,
13,
13,
5215,
4832,
13,
5215,
1856,
1688,
13,
13,
3166,
2462,
2580,
1053,
4770,
3259,
1649,
13,
3166,
2462,
2580,
29889,
517,
12360,
1053,
679,
29918,
29882,
20011,
29918,
11944,
9409,
13,
13,
13,
1990,
349,
9569,
287,
3089,
2385,
29898,
2676,
1688,
29889,
932,
29889,
3057,
3089,
1125,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
9654,
29898,
25932,
29892,
2224,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
2224,
353,
8207,
29894,
29995,
29879,
29995,
29879,
29915,
1273,
313,
1649,
3259,
26914,
5451,
12839,
29861,
29900,
1402,
2224,
29897,
13,
4706,
736,
1856,
1688,
29889,
932,
29889,
3057,
3089,
29889,
19465,
29898,
2084,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
13,
1990,
7399,
3609,
3057,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
5160,
2563,
4321,
304,
1243,
596,
1034,
16533,
2669,
29889,
13,
13,
1678,
739,
731,
14340,
278,
2566,
1434,
1269,
1243,
322,
5217,
372,
1156,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
932,
353,
1856,
1688,
29889,
3057,
2052,
703,
2917,
29901,
5527,
29914,
21150,
29889,
2172,
613,
6198,
29918,
517,
2433,
29889,
1495,
13,
4706,
1583,
29889,
932,
29889,
3089,
2385,
353,
349,
9569,
287,
3089,
2385,
13,
13,
4706,
1583,
29889,
2585,
353,
1583,
29889,
932,
29889,
932,
29889,
1727,
6020,
29889,
27852,
13,
4706,
1583,
29889,
2248,
261,
353,
1583,
29889,
932,
29889,
932,
29889,
1727,
6020,
29889,
2248,
13,
13,
4706,
5993,
29892,
1583,
29889,
11944,
9409,
353,
679,
29918,
29882,
20011,
29918,
11944,
9409,
580,
13,
4706,
1583,
29889,
2585,
29889,
8899,
29918,
11944,
9409,
29898,
6979,
29892,
1583,
29889,
11944,
9409,
29897,
13,
13,
4706,
4817,
29918,
5630,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
13,
9651,
313,
29884,
29915,
29995,
29879,
16664,
29879,
29915,
1273,
313,
1311,
29889,
11944,
9409,
1839,
333,
7464,
13,
462,
308,
1583,
29889,
11944,
9409,
1839,
1989,
2033,
8106,
12508,
877,
294,
18869,
8785,
320,
13,
9651,
869,
17010,
2141,
13808,
877,
294,
18869,
1495,
13,
4706,
1583,
29889,
13662,
353,
426,
13,
9651,
525,
3916,
29899,
1542,
2396,
525,
6214,
29914,
3126,
742,
13,
9651,
525,
25471,
2396,
525,
16616,
426,
29900,
29913,
4286,
4830,
29898,
5150,
29918,
5630,
511,
13,
4706,
500,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
1583,
29889,
2585,
29889,
8143,
29918,
2585,
580,
13,
4706,
1583,
29889,
2248,
261,
29889,
8143,
29918,
513,
1575,
580,
13,
13,
13,
1753,
4889,
29918,
2523,
356,
29898,
1272,
1125,
13,
1678,
9995,
3599,
1295,
3598,
4889,
29104,
29889,
13,
13,
1678,
13976,
363,
9657,
6611,
29892,
1051,
1819,
2992,
29889,
13,
1678,
313,
4993,
29901,
1732,
597,
2417,
29889,
510,
29914,
2619,
29914,
29896,
29906,
29945,
29946,
29946,
29945,
29946,
4551,
13,
1678,
9995,
13,
1678,
565,
338,
8758,
29898,
1272,
29892,
4832,
29889,
1807,
29918,
8768,
1125,
13,
4706,
736,
4832,
29889,
726,
29918,
1853,
29898,
1272,
29897,
13,
1678,
25342,
338,
8758,
29898,
1272,
29892,
16250,
29889,
15845,
1125,
13,
4706,
736,
9657,
29898,
1958,
29898,
10118,
29918,
2523,
356,
29892,
4832,
29889,
1524,
7076,
29898,
1272,
4961,
13,
1678,
25342,
338,
8758,
29898,
1272,
29892,
16250,
29889,
13463,
519,
1125,
13,
4706,
736,
1134,
29898,
1272,
5033,
1958,
29898,
10118,
29918,
2523,
356,
29892,
848,
876,
13,
1678,
1683,
29901,
13,
4706,
736,
848,
13,
2
] |
agate/aggregations/deciles.py | andriyor/agate | 663 | 82884 | #!/usr/bin/env python
from agate.aggregations.base import Aggregation
from agate.aggregations.has_nulls import HasNulls
from agate.aggregations.percentiles import Percentiles
from agate.data_types import Number
from agate.exceptions import DataTypeError
from agate.utils import Quantiles
from agate.warns import warn_null_calculation
class Deciles(Aggregation):
"""
Calculate the deciles of a column based on its percentiles.
Deciles will be equivalent to the 10th, 20th ... 90th percentiles.
"Zeroth" (min value) and "Tenth" (max value) deciles are included for
reference and intuitive indexing.
See :class:`Percentiles` for implementation details.
This aggregation can not be applied to a :class:`.TableSet`.
:param column_name:
The name of a column containing :class:`.Number` data.
"""
def __init__(self, column_name):
self._column_name = column_name
def validate(self, table):
column = table.columns[self._column_name]
if not isinstance(column.data_type, Number):
raise DataTypeError('Deciles can only be applied to columns containing Number data.')
has_nulls = HasNulls(self._column_name).run(table)
if has_nulls:
warn_null_calculation(self, column)
def run(self, table):
"""
:returns:
An instance of :class:`Quantiles`.
"""
percentiles = Percentiles(self._column_name).run(table)
return Quantiles([percentiles[i] for i in range(0, 101, 10)])
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
946,
403,
29889,
26193,
800,
29889,
3188,
1053,
319,
26127,
362,
13,
3166,
946,
403,
29889,
26193,
800,
29889,
5349,
29918,
4304,
29879,
1053,
11699,
7327,
29879,
13,
3166,
946,
403,
29889,
26193,
800,
29889,
25376,
5475,
1053,
2431,
1760,
5475,
13,
3166,
946,
403,
29889,
1272,
29918,
8768,
1053,
9681,
13,
3166,
946,
403,
29889,
11739,
29879,
1053,
3630,
1542,
2392,
13,
3166,
946,
403,
29889,
13239,
1053,
22746,
5475,
13,
3166,
946,
403,
29889,
4495,
1983,
1053,
29383,
29918,
4304,
29918,
15807,
362,
13,
13,
13,
1990,
3826,
5475,
29898,
29909,
26127,
362,
1125,
13,
1678,
9995,
13,
1678,
20535,
403,
278,
1602,
5475,
310,
263,
1897,
2729,
373,
967,
10151,
5475,
29889,
13,
13,
1678,
3826,
5475,
674,
367,
7126,
304,
278,
29871,
29896,
29900,
386,
29892,
29871,
29906,
29900,
386,
2023,
29871,
29929,
29900,
386,
10151,
5475,
29889,
13,
13,
1678,
376,
29999,
261,
720,
29908,
313,
1195,
995,
29897,
322,
376,
29911,
9097,
29908,
313,
3317,
995,
29897,
1602,
5475,
526,
5134,
363,
13,
1678,
3407,
322,
27951,
573,
26190,
29889,
13,
13,
1678,
2823,
584,
1990,
18078,
27933,
5475,
29952,
363,
5314,
4902,
29889,
13,
13,
1678,
910,
11404,
362,
508,
451,
367,
7436,
304,
263,
584,
1990,
29901,
1412,
3562,
2697,
1412,
13,
13,
1678,
584,
3207,
1897,
29918,
978,
29901,
13,
4706,
450,
1024,
310,
263,
1897,
6943,
584,
1990,
29901,
1412,
4557,
29952,
848,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1897,
29918,
978,
1125,
13,
4706,
1583,
3032,
4914,
29918,
978,
353,
1897,
29918,
978,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
1591,
1125,
13,
4706,
1897,
353,
1591,
29889,
13099,
29961,
1311,
3032,
4914,
29918,
978,
29962,
13,
13,
4706,
565,
451,
338,
8758,
29898,
4914,
29889,
1272,
29918,
1853,
29892,
9681,
1125,
13,
9651,
12020,
3630,
1542,
2392,
877,
6185,
5475,
508,
871,
367,
7436,
304,
4341,
6943,
9681,
848,
29889,
1495,
13,
13,
4706,
756,
29918,
4304,
29879,
353,
11699,
7327,
29879,
29898,
1311,
3032,
4914,
29918,
978,
467,
3389,
29898,
2371,
29897,
13,
13,
4706,
565,
756,
29918,
4304,
29879,
29901,
13,
9651,
29383,
29918,
4304,
29918,
15807,
362,
29898,
1311,
29892,
1897,
29897,
13,
13,
1678,
822,
1065,
29898,
1311,
29892,
1591,
1125,
13,
4706,
9995,
13,
4706,
584,
18280,
29901,
13,
9651,
530,
2777,
310,
584,
1990,
18078,
22930,
5475,
1412,
13,
4706,
9995,
13,
4706,
10151,
5475,
353,
2431,
1760,
5475,
29898,
1311,
3032,
4914,
29918,
978,
467,
3389,
29898,
2371,
29897,
13,
13,
4706,
736,
22746,
5475,
4197,
25376,
5475,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29896,
29900,
29896,
29892,
29871,
29896,
29900,
29897,
2314,
13,
2
] |
modules/dad.py | AudioVisuaali/audiobot | 3 | 180646 | from audiovisuaali import send
from requests import get as rget
from json import loads
# Joke
async def dad_joke(message, client, arguments):
# Starting to fetch a joke
response = loads(rget("https://icanhazdadjoke.com/slack").text)
# Creating letter
letter = "<@{}> **| {}**".format(message.author.id, response["attachments"][0]["text"])
# Sending message
await client.send_message(message.channel, letter)
send(1, "Dad joke sent")
return
| [
1,
515,
16147,
25190,
3357,
2606,
1053,
3638,
30004,
13,
3166,
7274,
1053,
679,
408,
364,
657,
30004,
13,
3166,
4390,
1053,
15376,
30004,
13,
30004,
13,
29937,
3650,
446,
30004,
13,
12674,
822,
270,
328,
29918,
2212,
446,
29898,
4906,
29892,
3132,
29892,
6273,
1125,
30004,
13,
30004,
13,
1678,
396,
23748,
304,
6699,
263,
2958,
446,
30004,
13,
1678,
2933,
353,
15376,
29898,
29878,
657,
703,
991,
597,
2185,
29882,
834,
29881,
328,
2212,
446,
29889,
510,
29914,
29879,
2364,
2564,
726,
8443,
13,
1678,
396,
26221,
5497,
30004,
13,
1678,
5497,
353,
9872,
29992,
8875,
29958,
3579,
29989,
6571,
1068,
1642,
4830,
29898,
4906,
29889,
8921,
29889,
333,
29892,
2933,
3366,
14930,
1860,
3108,
29961,
29900,
29962,
3366,
726,
20068,
30004,
13,
1678,
396,
317,
2548,
2643,
30004,
13,
1678,
7272,
3132,
29889,
6717,
29918,
4906,
29898,
4906,
29889,
12719,
29892,
5497,
8443,
13,
1678,
3638,
29898,
29896,
29892,
376,
29928,
328,
2958,
446,
2665,
1159,
30004,
13,
1678,
736,
30004,
13,
2
] |
tests/test_dashboards.py | pbelskiy/quickbuild | 7 | 69877 | import re
import pytest
import responses
from quickbuild import QBError
DASHBOARDS_XML = r"""<?xml version="1.0" encoding="UTF-8"?>
<list>
<com.pmease.quickbuild.model.Dashboard>
<id>1</id>
<user>1</user>
<name>Default</name>
<description>System default dashboard</description>
<primary>false</primary>
<columns>
<com.pmease.quickbuild.web.page.dashboard.LayoutColumn>
<width>100</width>
<gadgetDOMs>
<com.pmease.quickbuild.web.gadget.ConfigurationTreeGadget revision="0.0.1">
<title>All Configurations</title>
<treeRoot>1</treeRoot>
<displayTreeRoot>true</displayTreeRoot>
<displaySchedule>false</displaySchedule>
<displayRequestCount>true</displayRequestCount>
<displayHistoryCount>true</displayHistoryCount>
</com.pmease.quickbuild.web.gadget.ConfigurationTreeGadget>
</gadgetDOMs>
</com.pmease.quickbuild.web.page.dashboard.LayoutColumn>
</columns>
</com.pmease.quickbuild.model.Dashboard>
</list>
"""
DASHBOARD_INFO_XML = r"""<?xml version="1.0" encoding="UTF-8"?>
<com.pmease.quickbuild.model.Dashboard>
<id>1</id>
<user>1</user>
<name>Default</name>
<description>System default dashboard</description>
<primary>false</primary>
<columns>
<com.pmease.quickbuild.web.page.dashboard.LayoutColumn>
<width>100</width>
<gadgetDOMs>
<com.pmease.quickbuild.web.gadget.ConfigurationTreeGadget revision="0.0.1">
<title>All Configurations</title>
<treeRoot>1</treeRoot>
<displayTreeRoot>true</displayTreeRoot>
<displaySchedule>false</displaySchedule>
<displayRequestCount>true</displayRequestCount>
<displayHistoryCount>true</displayHistoryCount>
</com.pmease.quickbuild.web.gadget.ConfigurationTreeGadget>
<com.pmease.quickbuild.plugin.report.changes.gadget.CommitStatsGadget revision="0.0.0.0.0.0">
<title>Commits</title>
<configurationPath>root</configurationPath>
<reportsets/>
<indicators>
<string>Commits</string>
<string>Modifications</string>
</indicators>
<groupBy>BY_DAY</groupBy>
<excludingFailed>false</excludingFailed>
<ignoreNoBuildDays>false</ignoreNoBuildDays>
</com.pmease.quickbuild.plugin.report.changes.gadget.CommitStatsGadget>
</gadgetDOMs>
</com.pmease.quickbuild.web.page.dashboard.LayoutColumn>
</columns>
</com.pmease.quickbuild.model.Dashboard>
"""
DASHBOARD_INFO_JSON = """{
"id" : 1,
"user" : 1,
"name" : "Default",
"description" : "System default dashboard",
"primary" : false,
"columns" : [ {
"width" : 100,
"gadgetDOMs" : [ {
"title" : "All Configurations",
"treeRoot" : 1,
"displayTreeRoot" : true,
"displaySchedule" : false,
"displayRequestCount" : true,
"displayHistoryCount" : true,
"@class" : "com.pmease.quickbuild.web.gadget.ConfigurationTreeGadget"
}, {
"title" : "Commits",
"configurationPath" : "root",
"reportsets" : [ ],
"indicators" : [ "Commits", "Modifications" ],
"groupBy" : "BY_DAY",
"excludingFailed" : false,
"ignoreNoBuildDays" : false,
"@class" : "com.pmease.quickbuild.plugin.report.changes.gadget.CommitStatsGadget"
} ]
} ]
}
"""
@responses.activate
def test_get(client):
responses.add(
responses.GET,
re.compile(r'.*/rest/dashboards'),
content_type='application/xml',
body=DASHBOARDS_XML,
)
response = client.dashboards.get()
assert len(response) == 1
assert response[0]['id'] == 1
assert response[0]['user'] == 1
assert response[0]['name'] == 'Default'
assert response[0]['primary'] is False
assert response[0]['columns'][0]['width'] == 100
@responses.activate
def test_get_info(client):
responses.add(
responses.GET,
re.compile(r'.*/rest/dashboards'),
content_type='application/xml',
body=DASHBOARD_INFO_XML,
)
response = client.dashboards.get_info(1)
assert response['@class'] == 'com.pmease.quickbuild.model.Dashboard'
assert response['id'] == 1
assert response['columns'][0]['gadgetDOMs'][0]['@revision'] == '0.0.1'
@responses.activate
def test_update(client):
responses.add(
responses.POST,
re.compile(r'.*/rest/dashboards'),
content_type='application/xml',
body='10',
)
response = client.dashboards.update(DASHBOARD_INFO_XML)
assert response == 10
@responses.activate
def test_create(client):
responses.add(
responses.POST,
re.compile(r'.*/rest/dashboards'),
content_type='application/xml',
body='11',
)
configuration_without_id = DASHBOARD_INFO_XML.replace('<id>1</id>', '')
response = client.dashboards.create(configuration_without_id)
assert response == 11
with pytest.raises(QBError):
client.dashboards.create(DASHBOARD_INFO_XML)
with pytest.raises(QBError):
client.dashboards.create(DASHBOARD_INFO_JSON)
@responses.activate
def test_delete(client):
responses.add(
responses.DELETE,
re.compile(r'.*/rest/dashboards'),
body='12',
)
response = client.dashboards.delete(12)
assert response == 12
| [
1,
1053,
337,
13,
13,
5215,
11451,
1688,
13,
5215,
20890,
13,
13,
3166,
4996,
4282,
1053,
660,
29933,
2392,
13,
13,
29928,
24943,
8456,
1718,
8452,
29918,
9165,
353,
364,
15945,
29908,
8169,
3134,
1873,
543,
29896,
29889,
29900,
29908,
8025,
543,
10496,
29899,
29947,
18943,
13,
13,
29966,
1761,
29958,
13,
29871,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
4299,
29889,
29928,
1161,
3377,
29958,
13,
1678,
529,
333,
29958,
29896,
829,
333,
29958,
13,
1678,
529,
1792,
29958,
29896,
829,
1792,
29958,
13,
1678,
529,
978,
29958,
4592,
829,
978,
29958,
13,
1678,
529,
8216,
29958,
3924,
2322,
12569,
3377,
829,
8216,
29958,
13,
1678,
529,
16072,
29958,
4541,
829,
16072,
29958,
13,
1678,
529,
13099,
29958,
13,
418,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
3488,
29889,
14592,
3377,
29889,
3453,
4409,
29958,
13,
4706,
529,
2103,
29958,
29896,
29900,
29900,
829,
2103,
29958,
13,
4706,
529,
29887,
328,
657,
22141,
29879,
29958,
13,
3986,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
29887,
328,
657,
29889,
8614,
9643,
29954,
328,
657,
26554,
543,
29900,
29889,
29900,
29889,
29896,
1013,
13,
9651,
529,
3257,
29958,
3596,
12782,
332,
800,
829,
3257,
29958,
13,
9651,
529,
8336,
10303,
29958,
29896,
829,
8336,
10303,
29958,
13,
9651,
529,
4990,
9643,
10303,
29958,
3009,
829,
4990,
9643,
10303,
29958,
13,
9651,
529,
4990,
4504,
11272,
29958,
4541,
829,
4990,
4504,
11272,
29958,
13,
9651,
529,
4990,
3089,
3981,
29958,
3009,
829,
4990,
3089,
3981,
29958,
13,
9651,
529,
4990,
20570,
3981,
29958,
3009,
829,
4990,
20570,
3981,
29958,
13,
3986,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
29887,
328,
657,
29889,
8614,
9643,
29954,
328,
657,
29958,
13,
4706,
1533,
29887,
328,
657,
22141,
29879,
29958,
13,
418,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
3488,
29889,
14592,
3377,
29889,
3453,
4409,
29958,
13,
1678,
1533,
13099,
29958,
13,
29871,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
4299,
29889,
29928,
1161,
3377,
29958,
13,
829,
1761,
29958,
13,
15945,
29908,
13,
13,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
9165,
353,
364,
15945,
29908,
8169,
3134,
1873,
543,
29896,
29889,
29900,
29908,
8025,
543,
10496,
29899,
29947,
18943,
13,
13,
29966,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
4299,
29889,
29928,
1161,
3377,
29958,
13,
29871,
529,
333,
29958,
29896,
829,
333,
29958,
13,
29871,
529,
1792,
29958,
29896,
829,
1792,
29958,
13,
29871,
529,
978,
29958,
4592,
829,
978,
29958,
13,
29871,
529,
8216,
29958,
3924,
2322,
12569,
3377,
829,
8216,
29958,
13,
29871,
529,
16072,
29958,
4541,
829,
16072,
29958,
13,
29871,
529,
13099,
29958,
13,
1678,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
3488,
29889,
14592,
3377,
29889,
3453,
4409,
29958,
13,
418,
529,
2103,
29958,
29896,
29900,
29900,
829,
2103,
29958,
13,
418,
529,
29887,
328,
657,
22141,
29879,
29958,
13,
4706,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
29887,
328,
657,
29889,
8614,
9643,
29954,
328,
657,
26554,
543,
29900,
29889,
29900,
29889,
29896,
1013,
13,
3986,
529,
3257,
29958,
3596,
12782,
332,
800,
829,
3257,
29958,
13,
3986,
529,
8336,
10303,
29958,
29896,
829,
8336,
10303,
29958,
13,
3986,
529,
4990,
9643,
10303,
29958,
3009,
829,
4990,
9643,
10303,
29958,
13,
3986,
529,
4990,
4504,
11272,
29958,
4541,
829,
4990,
4504,
11272,
29958,
13,
3986,
529,
4990,
3089,
3981,
29958,
3009,
829,
4990,
3089,
3981,
29958,
13,
3986,
529,
4990,
20570,
3981,
29958,
3009,
829,
4990,
20570,
3981,
29958,
13,
4706,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
29887,
328,
657,
29889,
8614,
9643,
29954,
328,
657,
29958,
13,
4706,
529,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
8582,
29889,
12276,
29889,
25990,
29889,
29887,
328,
657,
29889,
1523,
2415,
25060,
29954,
328,
657,
26554,
543,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
1013,
13,
3986,
529,
3257,
29958,
5261,
1169,
829,
3257,
29958,
13,
3986,
529,
13305,
2605,
29958,
4632,
829,
13305,
2605,
29958,
13,
3986,
529,
12276,
7224,
3779,
13,
3986,
529,
513,
293,
4097,
29958,
13,
9651,
529,
1807,
29958,
5261,
1169,
829,
1807,
29958,
13,
9651,
529,
1807,
29958,
2111,
8232,
829,
1807,
29958,
13,
3986,
1533,
513,
293,
4097,
29958,
13,
3986,
529,
2972,
2059,
29958,
22716,
29918,
28658,
829,
2972,
2059,
29958,
13,
3986,
529,
735,
22368,
17776,
29958,
4541,
829,
735,
22368,
17776,
29958,
13,
3986,
529,
17281,
3782,
8893,
25991,
29958,
4541,
829,
17281,
3782,
8893,
25991,
29958,
13,
4706,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
8582,
29889,
12276,
29889,
25990,
29889,
29887,
328,
657,
29889,
1523,
2415,
25060,
29954,
328,
657,
29958,
13,
418,
1533,
29887,
328,
657,
22141,
29879,
29958,
13,
1678,
1533,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
3488,
29889,
14592,
3377,
29889,
3453,
4409,
29958,
13,
29871,
1533,
13099,
29958,
13,
829,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
4299,
29889,
29928,
1161,
3377,
29958,
13,
15945,
29908,
13,
13,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
7249,
353,
9995,
29912,
13,
29871,
376,
333,
29908,
584,
29871,
29896,
29892,
13,
29871,
376,
1792,
29908,
584,
29871,
29896,
29892,
13,
29871,
376,
978,
29908,
584,
376,
4592,
613,
13,
29871,
376,
8216,
29908,
584,
376,
3924,
2322,
12569,
3377,
613,
13,
29871,
376,
16072,
29908,
584,
2089,
29892,
13,
29871,
376,
13099,
29908,
584,
518,
426,
13,
1678,
376,
2103,
29908,
584,
29871,
29896,
29900,
29900,
29892,
13,
1678,
376,
29887,
328,
657,
22141,
29879,
29908,
584,
518,
426,
13,
418,
376,
3257,
29908,
584,
376,
3596,
12782,
332,
800,
613,
13,
418,
376,
8336,
10303,
29908,
584,
29871,
29896,
29892,
13,
418,
376,
4990,
9643,
10303,
29908,
584,
1565,
29892,
13,
418,
376,
4990,
4504,
11272,
29908,
584,
2089,
29892,
13,
418,
376,
4990,
3089,
3981,
29908,
584,
1565,
29892,
13,
418,
376,
4990,
20570,
3981,
29908,
584,
1565,
29892,
13,
418,
17962,
1990,
29908,
584,
376,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
2676,
29889,
29887,
328,
657,
29889,
8614,
9643,
29954,
328,
657,
29908,
13,
1678,
2981,
426,
13,
418,
376,
3257,
29908,
584,
376,
5261,
1169,
613,
13,
418,
376,
13305,
2605,
29908,
584,
376,
4632,
613,
13,
418,
376,
12276,
7224,
29908,
584,
518,
21251,
13,
418,
376,
513,
293,
4097,
29908,
584,
518,
376,
5261,
1169,
613,
376,
2111,
8232,
29908,
21251,
13,
418,
376,
2972,
2059,
29908,
584,
376,
22716,
29918,
28658,
613,
13,
418,
376,
735,
22368,
17776,
29908,
584,
2089,
29892,
13,
418,
376,
17281,
3782,
8893,
25991,
29908,
584,
2089,
29892,
13,
418,
17962,
1990,
29908,
584,
376,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
8582,
29889,
12276,
29889,
25990,
29889,
29887,
328,
657,
29889,
1523,
2415,
25060,
29954,
328,
657,
29908,
13,
1678,
500,
4514,
13,
29871,
500,
4514,
13,
29913,
13,
15945,
29908,
13,
13,
13,
29992,
26679,
267,
29889,
11236,
403,
13,
1753,
1243,
29918,
657,
29898,
4645,
1125,
13,
1678,
20890,
29889,
1202,
29898,
13,
4706,
20890,
29889,
7194,
29892,
13,
4706,
337,
29889,
12198,
29898,
29878,
4286,
3877,
5060,
29914,
14592,
24691,
5477,
13,
4706,
2793,
29918,
1853,
2433,
6214,
29914,
3134,
742,
13,
4706,
3573,
29922,
29928,
24943,
8456,
1718,
8452,
29918,
9165,
29892,
13,
1678,
1723,
13,
13,
1678,
2933,
353,
3132,
29889,
14592,
24691,
29889,
657,
580,
13,
1678,
4974,
7431,
29898,
5327,
29897,
1275,
29871,
29896,
13,
1678,
4974,
2933,
29961,
29900,
22322,
333,
2033,
1275,
29871,
29896,
13,
1678,
4974,
2933,
29961,
29900,
22322,
1792,
2033,
1275,
29871,
29896,
13,
1678,
4974,
2933,
29961,
29900,
22322,
978,
2033,
1275,
525,
4592,
29915,
13,
1678,
4974,
2933,
29961,
29900,
22322,
16072,
2033,
338,
7700,
13,
1678,
4974,
2933,
29961,
29900,
22322,
13099,
2033,
29961,
29900,
22322,
2103,
2033,
1275,
29871,
29896,
29900,
29900,
13,
13,
13,
29992,
26679,
267,
29889,
11236,
403,
13,
1753,
1243,
29918,
657,
29918,
3888,
29898,
4645,
1125,
13,
1678,
20890,
29889,
1202,
29898,
13,
4706,
20890,
29889,
7194,
29892,
13,
4706,
337,
29889,
12198,
29898,
29878,
4286,
3877,
5060,
29914,
14592,
24691,
5477,
13,
4706,
2793,
29918,
1853,
2433,
6214,
29914,
3134,
742,
13,
4706,
3573,
29922,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
9165,
29892,
13,
1678,
1723,
13,
13,
1678,
2933,
353,
3132,
29889,
14592,
24691,
29889,
657,
29918,
3888,
29898,
29896,
29897,
13,
13,
1678,
4974,
2933,
1839,
29992,
1990,
2033,
1275,
525,
510,
29889,
29886,
1004,
559,
29889,
24561,
4282,
29889,
4299,
29889,
29928,
1161,
3377,
29915,
13,
1678,
4974,
2933,
1839,
333,
2033,
1275,
29871,
29896,
13,
1678,
4974,
2933,
1839,
13099,
2033,
29961,
29900,
22322,
29887,
328,
657,
22141,
29879,
2033,
29961,
29900,
22322,
29992,
276,
4924,
2033,
1275,
525,
29900,
29889,
29900,
29889,
29896,
29915,
13,
13,
13,
29992,
26679,
267,
29889,
11236,
403,
13,
1753,
1243,
29918,
5504,
29898,
4645,
1125,
13,
1678,
20890,
29889,
1202,
29898,
13,
4706,
20890,
29889,
5438,
29892,
13,
4706,
337,
29889,
12198,
29898,
29878,
4286,
3877,
5060,
29914,
14592,
24691,
5477,
13,
4706,
2793,
29918,
1853,
2433,
6214,
29914,
3134,
742,
13,
4706,
3573,
2433,
29896,
29900,
742,
13,
1678,
1723,
13,
13,
1678,
2933,
353,
3132,
29889,
14592,
24691,
29889,
5504,
29898,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
9165,
29897,
13,
1678,
4974,
2933,
1275,
29871,
29896,
29900,
13,
13,
13,
29992,
26679,
267,
29889,
11236,
403,
13,
1753,
1243,
29918,
3258,
29898,
4645,
1125,
13,
1678,
20890,
29889,
1202,
29898,
13,
4706,
20890,
29889,
5438,
29892,
13,
4706,
337,
29889,
12198,
29898,
29878,
4286,
3877,
5060,
29914,
14592,
24691,
5477,
13,
4706,
2793,
29918,
1853,
2433,
6214,
29914,
3134,
742,
13,
4706,
3573,
2433,
29896,
29896,
742,
13,
1678,
1723,
13,
13,
1678,
5285,
29918,
14037,
29918,
333,
353,
360,
24943,
8456,
17011,
29918,
11690,
29918,
9165,
29889,
6506,
877,
29966,
333,
29958,
29896,
829,
333,
29958,
742,
27255,
13,
1678,
2933,
353,
3132,
29889,
14592,
24691,
29889,
3258,
29898,
13305,
29918,
14037,
29918,
333,
29897,
13,
1678,
4974,
2933,
1275,
29871,
29896,
29896,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
29984,
29933,
2392,
1125,
13,
4706,
3132,
29889,
14592,
24691,
29889,
3258,
29898,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
9165,
29897,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
29984,
29933,
2392,
1125,
13,
4706,
3132,
29889,
14592,
24691,
29889,
3258,
29898,
29928,
24943,
8456,
17011,
29918,
11690,
29918,
7249,
29897,
13,
13,
13,
29992,
26679,
267,
29889,
11236,
403,
13,
1753,
1243,
29918,
8143,
29898,
4645,
1125,
13,
1678,
20890,
29889,
1202,
29898,
13,
4706,
20890,
29889,
2287,
18476,
29892,
13,
4706,
337,
29889,
12198,
29898,
29878,
4286,
3877,
5060,
29914,
14592,
24691,
5477,
13,
4706,
3573,
2433,
29896,
29906,
742,
13,
1678,
1723,
13,
13,
1678,
2933,
353,
3132,
29889,
14592,
24691,
29889,
8143,
29898,
29896,
29906,
29897,
13,
1678,
4974,
2933,
1275,
29871,
29896,
29906,
13,
2
] |
ofagent/indigo/submodules/infra/sourcegen/cxmacrogen.py | lanpinguo/apple-sauce | 1 | 108496 | <reponame>lanpinguo/apple-sauce<gh_stars>1-10
#!/usr/bin/python
## SourceObject ##
#################################################################
#
# Copyright 2013, Big Switch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html
#
# 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.
#
#################################################################
#
# CXMacroGenerator.py
#
# XMacro object generator.
#
#################################################################
from cobjectgen import *
import util
class CXMacroGenerator(CObjectGenerator):
objectType = 'xmacro'
def Construct(self):
self.submacros = False
def Name(self):
return self.f.MacroName(self.name)
############################################################
#
# Generation Methods
#
############################################################
def XMacroEntries(self):
s = ""
for args in self.members:
s += util.fcall(self.name, args) + "\n"
return s
def DefineSubmacros(self):
s = ""
members = util.listifyElements(self.members)
for entry in members:
s += "#ifndef %s\n#define %s %s\n#endif\n\n" % (entry[0],
entry[0],
self.name)
for entry in members:
subgen = CXMacroGenerator(name=entry[0], initargs=entry[1])
s += subgen.XMacroEntries()
s += "\n"
for entry in members:
s += "#undef %s\n" % entry[0]
return s
def Define(self):
s = "#ifdef %s\n" % self.name
if self.submacros:
s += self.DefineSubmacros()
else:
self.members = util.listifyElements(self.members)
s += self.XMacroEntries()
s += "#undef %s\n" % self.name
s += "#endif\n"
return s
###############################################################################
#
# Sanity Check
#
###############################################################################
import cm
if __name__ == "__main__":
data = { 'members': [ 'ENTRY1',
'ENTRY2',
'ENTRY3',
'ENTRY4', ] }
m = CXMacroGenerator(name='MY_XMACRO', initargs=data);
print m.Define()
data = { 'members' : [ [ 'E01', 'E02', 'E03' ],
[ 'E11', 'E12', 'E13' ],
[ 'E21', 'E22', 'E23' ] ] }
m = CXMacroGenerator(name='MY_XMACRO2', initargs=data)
print m.Define()
| [
1,
529,
276,
1112,
420,
29958,
6468,
29886,
6202,
29877,
29914,
11548,
29899,
29879,
585,
346,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
2277,
7562,
2061,
444,
13,
13383,
13383,
13383,
13383,
29937,
13,
29937,
13,
29937,
4706,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
29892,
7997,
28176,
8527,
29879,
29892,
9266,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
15103,
5236,
19245,
29892,
10079,
29871,
29896,
29889,
29900,
313,
1552,
13,
29937,
376,
29931,
293,
1947,
1496,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
13,
29937,
411,
278,
19245,
29889,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
4706,
1732,
597,
1636,
29889,
13660,
29889,
990,
29914,
12018,
29914,
29872,
572,
29899,
29894,
29896,
29900,
29889,
1420,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
13,
29937,
7047,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
13,
29937,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
13,
29937,
2845,
4653,
470,
2411,
2957,
29889,
2823,
278,
19245,
363,
278,
2702,
13,
29937,
4086,
14765,
1076,
11239,
322,
27028,
1090,
278,
13,
29937,
19245,
29889,
13,
29937,
13,
13383,
13383,
13383,
13383,
29937,
13,
29937,
13,
29937,
315,
29990,
15735,
307,
21575,
29889,
2272,
13,
29937,
13,
29937,
1060,
15735,
307,
1203,
15299,
29889,
13,
29937,
13,
13383,
13383,
13383,
13383,
29937,
13,
13,
3166,
274,
3318,
1885,
1053,
334,
13,
5215,
3667,
13,
13,
1990,
315,
29990,
15735,
307,
21575,
29898,
29907,
2061,
21575,
1125,
13,
1678,
1203,
1542,
353,
525,
29916,
25254,
29915,
13,
13,
1678,
822,
1281,
4984,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1491,
8628,
1883,
353,
7700,
13,
13,
1678,
822,
4408,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29888,
29889,
15735,
307,
1170,
29898,
1311,
29889,
978,
29897,
13,
13,
13,
1678,
835,
13383,
13383,
13383,
7346,
29937,
13,
1678,
396,
13,
1678,
396,
28203,
8108,
29879,
13,
1678,
396,
13,
1678,
835,
13383,
13383,
13383,
7346,
29937,
13,
1678,
822,
1060,
15735,
307,
5292,
2722,
29898,
1311,
1125,
13,
4706,
269,
353,
5124,
13,
4706,
363,
6389,
297,
1583,
29889,
28109,
29901,
13,
9651,
269,
4619,
3667,
29889,
29888,
4804,
29898,
1311,
29889,
978,
29892,
6389,
29897,
718,
6634,
29876,
29908,
13,
4706,
736,
269,
13,
13,
13,
1678,
822,
22402,
4035,
8628,
1883,
29898,
1311,
1125,
13,
13,
4706,
269,
353,
5124,
13,
4706,
5144,
353,
3667,
29889,
1761,
1598,
18868,
29898,
1311,
29889,
28109,
29897,
13,
13,
4706,
363,
6251,
297,
5144,
29901,
13,
9651,
269,
4619,
12305,
361,
299,
1389,
1273,
29879,
29905,
29876,
29937,
7922,
1273,
29879,
1273,
29879,
29905,
29876,
29937,
15224,
29905,
29876,
29905,
29876,
29908,
1273,
313,
8269,
29961,
29900,
1402,
13,
462,
462,
462,
9651,
6251,
29961,
29900,
1402,
13,
462,
462,
462,
9651,
1583,
29889,
978,
29897,
13,
4706,
363,
6251,
297,
5144,
29901,
13,
9651,
1014,
1885,
353,
315,
29990,
15735,
307,
21575,
29898,
978,
29922,
8269,
29961,
29900,
1402,
2069,
5085,
29922,
8269,
29961,
29896,
2314,
13,
9651,
269,
4619,
1014,
1885,
29889,
29990,
15735,
307,
5292,
2722,
580,
13,
13,
4706,
269,
4619,
6634,
29876,
29908,
13,
4706,
363,
6251,
297,
5144,
29901,
13,
9651,
269,
4619,
12305,
870,
1389,
1273,
29879,
29905,
29876,
29908,
1273,
6251,
29961,
29900,
29962,
13,
13,
4706,
736,
269,
13,
13,
13,
1678,
822,
22402,
29898,
1311,
1125,
13,
4706,
269,
353,
12305,
361,
1753,
1273,
29879,
29905,
29876,
29908,
1273,
1583,
29889,
978,
13,
4706,
565,
1583,
29889,
1491,
8628,
1883,
29901,
13,
9651,
269,
4619,
1583,
29889,
3206,
457,
4035,
8628,
1883,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
28109,
353,
3667,
29889,
1761,
1598,
18868,
29898,
1311,
29889,
28109,
29897,
13,
9651,
269,
4619,
1583,
29889,
29990,
15735,
307,
5292,
2722,
580,
13,
4706,
269,
4619,
12305,
870,
1389,
1273,
29879,
29905,
29876,
29908,
1273,
1583,
29889,
978,
13,
4706,
269,
4619,
12305,
15224,
29905,
29876,
29908,
13,
4706,
736,
269,
13,
13,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
13,
29937,
3087,
537,
5399,
13,
29937,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
5215,
7477,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
848,
353,
426,
525,
28109,
2396,
518,
525,
3919,
13207,
29896,
742,
13,
462,
3986,
525,
3919,
13207,
29906,
742,
13,
462,
3986,
525,
3919,
13207,
29941,
742,
13,
462,
3986,
525,
3919,
13207,
29946,
742,
4514,
500,
13,
13,
1678,
286,
353,
315,
29990,
15735,
307,
21575,
29898,
978,
2433,
17870,
29918,
29990,
1529,
29907,
1672,
742,
2069,
5085,
29922,
1272,
416,
13,
1678,
1596,
286,
29889,
3206,
457,
580,
13,
13,
13,
1678,
848,
353,
426,
525,
28109,
29915,
584,
518,
518,
525,
29923,
29900,
29896,
742,
525,
29923,
29900,
29906,
742,
525,
29923,
29900,
29941,
29915,
21251,
13,
462,
965,
518,
525,
29923,
29896,
29896,
742,
525,
29923,
29896,
29906,
742,
525,
29923,
29896,
29941,
29915,
21251,
13,
462,
965,
518,
525,
29923,
29906,
29896,
742,
525,
29923,
29906,
29906,
742,
525,
29923,
29906,
29941,
29915,
4514,
4514,
500,
13,
1678,
286,
353,
315,
29990,
15735,
307,
21575,
29898,
978,
2433,
17870,
29918,
29990,
1529,
29907,
1672,
29906,
742,
2069,
5085,
29922,
1272,
29897,
13,
1678,
1596,
286,
29889,
3206,
457,
580,
13,
2
] |
wolk/interface/firmware_update.py | Wolkabout/WolkConnect-Python- | 6 | 121155 | """Enables firmware update for device."""
# Copyright 2020 WolkAbout Technology s.r.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from abc import ABC
from abc import abstractmethod
from typing import Callable
from wolk.interface.firmware_handler import FirmwareHandler
from wolk.model.firmware_update_status import FirmwareUpdateStatus
class FirmwareUpdate(ABC):
"""
Firmware Update enabler.
Responsible for supervising firmware installation and reporting current
firmware installation status and version.
"""
@abstractmethod
def __init__(
self,
firmware_handler: FirmwareHandler,
status_callback: Callable[[FirmwareUpdateStatus], None],
) -> None:
"""
Enable firmware update for device.
:param firmware_handler: Install firmware and provide current version
:type firmware_handler: FirmwareHandler
:param status_callback: Reporting firmware update status
:type status_callback: Callable[[FirmwareUpdateStatus], None]
"""
raise NotImplementedError()
@abstractmethod
def handle_install(self, file_path: str) -> None:
"""
Handle received firmware installation command.
:param file_path: Firmware file to install
:type file_path: str
"""
raise NotImplementedError()
@abstractmethod
def handle_abort(self) -> None:
"""Handle received firmware installation abort command."""
raise NotImplementedError()
@abstractmethod
def report_result(self) -> None:
"""Report the results of the firmware update process."""
raise NotImplementedError()
@abstractmethod
def get_current_version(self) -> str:
"""
Return device's current firmware version.
:returns: Firmware version
:rtype: str
"""
raise NotImplementedError()
| [
1,
9995,
2369,
1849,
9226,
2519,
2767,
363,
4742,
1213,
15945,
13,
29937,
259,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
11902,
29895,
28173,
17968,
269,
29889,
29878,
29889,
29877,
29889,
13,
29937,
13,
29937,
259,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
259,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
259,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
539,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
259,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
259,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
259,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
259,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
259,
27028,
1090,
278,
19245,
29889,
13,
3166,
25638,
1053,
16417,
13,
3166,
25638,
1053,
9846,
5696,
13,
3166,
19229,
1053,
8251,
519,
13,
13,
3166,
20040,
29895,
29889,
13248,
29889,
29888,
3568,
2519,
29918,
13789,
1053,
383,
3568,
2519,
4598,
13,
3166,
20040,
29895,
29889,
4299,
29889,
29888,
3568,
2519,
29918,
5504,
29918,
4882,
1053,
383,
3568,
2519,
6422,
5709,
13,
13,
13,
1990,
383,
3568,
2519,
6422,
29898,
19658,
1125,
13,
1678,
9995,
13,
1678,
383,
3568,
2519,
10318,
427,
370,
1358,
29889,
13,
13,
1678,
2538,
29886,
787,
1821,
363,
2428,
1730,
292,
9226,
2519,
11161,
322,
23415,
1857,
13,
1678,
9226,
2519,
11161,
4660,
322,
1873,
29889,
13,
1678,
9995,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
9226,
2519,
29918,
13789,
29901,
383,
3568,
2519,
4598,
29892,
13,
4706,
4660,
29918,
14035,
29901,
8251,
519,
8999,
29943,
3568,
2519,
6422,
5709,
1402,
6213,
1402,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
9995,
13,
4706,
1174,
519,
9226,
2519,
2767,
363,
4742,
29889,
13,
13,
4706,
584,
3207,
9226,
2519,
29918,
13789,
29901,
16052,
9226,
2519,
322,
3867,
1857,
1873,
13,
4706,
584,
1853,
9226,
2519,
29918,
13789,
29901,
383,
3568,
2519,
4598,
13,
4706,
584,
3207,
4660,
29918,
14035,
29901,
13969,
292,
9226,
2519,
2767,
4660,
13,
4706,
584,
1853,
4660,
29918,
14035,
29901,
8251,
519,
8999,
29943,
3568,
2519,
6422,
5709,
1402,
6213,
29962,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
4386,
29918,
6252,
29898,
1311,
29892,
934,
29918,
2084,
29901,
851,
29897,
1599,
6213,
29901,
13,
4706,
9995,
13,
4706,
29273,
4520,
9226,
2519,
11161,
1899,
29889,
13,
13,
4706,
584,
3207,
934,
29918,
2084,
29901,
383,
3568,
2519,
934,
304,
2601,
13,
4706,
584,
1853,
934,
29918,
2084,
29901,
851,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
4386,
29918,
370,
441,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
9995,
13554,
4520,
9226,
2519,
11161,
27450,
1899,
1213,
15945,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
3461,
29918,
2914,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
9995,
13020,
278,
2582,
310,
278,
9226,
2519,
2767,
1889,
1213,
15945,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
679,
29918,
3784,
29918,
3259,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
13,
4706,
7106,
4742,
29915,
29879,
1857,
9226,
2519,
1873,
29889,
13,
13,
4706,
584,
18280,
29901,
383,
3568,
2519,
1873,
13,
4706,
584,
29878,
1853,
29901,
851,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
2
] |
dbsetup.py | Esha-Muthu-1997/vpoll | 0 | 67276 | import sqlite3, json
from sqlite3 import Error
def create_connection(database):
try:
conn = sqlite3.connect(database, isolation_level=None, check_same_thread = False)
conn.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r))
return conn
except Error as e:
print(e)
def create_table(c):
sql = """
CREATE TABLE IF NOT EXISTS items (
id integer PRIMARY KEY,
name varchar(225) NOT NULL,
votes integer NOT NULL Default 0
);
"""
c.execute(sql)
def create_item(c, item):
sql = ''' INSERT INTO items(name)
VALUES (?) '''
c.execute(sql, item)
def update_item(c, item):
sql = ''' UPDATE items
SET votes = votes+1
WHERE name = ? '''
c.execute(sql, item)
def select_all_items(c, name):
sql = ''' SELECT * FROM items '''
c.execute(sql)
rows = c.fetchall()
rows.append({'name' : name})
return json.dumps(rows)
def main():
database = "./pythonsqlite.db"
conn = create_connection(database)
create_table(conn)
create_item(conn, ["BJP"])
create_item(conn, ["Congress"])
create_item(conn, ["Republic"])
create_item(conn, ["Democratic"])
print("Connection established!")
if __name__ == '__main__':
main() | [
1,
1053,
21120,
29941,
29892,
4390,
13,
3166,
21120,
29941,
1053,
4829,
13,
13,
1753,
1653,
29918,
9965,
29898,
9803,
1125,
13,
1678,
1018,
29901,
13,
4706,
11009,
353,
21120,
29941,
29889,
6915,
29898,
9803,
29892,
11695,
362,
29918,
5563,
29922,
8516,
29892,
1423,
29918,
17642,
29918,
7097,
353,
7700,
29897,
13,
4706,
11009,
29889,
798,
29918,
14399,
353,
14013,
274,
29892,
364,
29901,
9657,
29898,
7554,
4197,
1054,
29961,
29900,
29962,
363,
784,
297,
274,
29889,
8216,
1402,
364,
876,
13,
13,
4706,
736,
11009,
13,
1678,
5174,
4829,
408,
321,
29901,
13,
4706,
1596,
29898,
29872,
29897,
13,
13,
1753,
1653,
29918,
2371,
29898,
29883,
1125,
13,
1678,
4576,
353,
9995,
29871,
13,
4706,
14602,
10911,
10762,
6058,
28731,
4452,
313,
13,
9651,
1178,
6043,
29778,
14636,
29892,
13,
9651,
1024,
15236,
29898,
29906,
29906,
29945,
29897,
6058,
4265,
29892,
13,
9651,
18952,
6043,
6058,
4265,
13109,
29871,
29900,
13,
4706,
3482,
29871,
13,
1678,
9995,
13,
1678,
274,
29889,
7978,
29898,
2850,
29897,
13,
13,
1753,
1653,
29918,
667,
29898,
29883,
29892,
2944,
1125,
13,
1678,
4576,
353,
14550,
14482,
11646,
4452,
29898,
978,
29897,
13,
18884,
15673,
313,
7897,
14550,
13,
1678,
274,
29889,
7978,
29898,
2850,
29892,
2944,
29897,
13,
13,
1753,
2767,
29918,
667,
29898,
29883,
29892,
2944,
1125,
13,
1678,
4576,
353,
14550,
16924,
4452,
13,
18884,
11368,
18952,
353,
18952,
29974,
29896,
29871,
13,
18884,
5754,
1024,
353,
1577,
14550,
13,
1678,
274,
29889,
7978,
29898,
2850,
29892,
2944,
29897,
13,
13,
1753,
1831,
29918,
497,
29918,
7076,
29898,
29883,
29892,
1024,
1125,
13,
1678,
4576,
353,
14550,
5097,
334,
3895,
4452,
14550,
13,
1678,
274,
29889,
7978,
29898,
2850,
29897,
13,
13,
1678,
4206,
353,
274,
29889,
9155,
497,
580,
13,
1678,
4206,
29889,
4397,
3319,
29915,
978,
29915,
584,
1024,
1800,
13,
1678,
736,
4390,
29889,
29881,
17204,
29898,
5727,
29897,
13,
13,
1753,
1667,
7295,
13,
1678,
2566,
353,
376,
6904,
29886,
1541,
787,
1519,
568,
29889,
2585,
29908,
13,
1678,
11009,
353,
1653,
29918,
9965,
29898,
9803,
29897,
13,
1678,
1653,
29918,
2371,
29898,
13082,
29897,
13,
1678,
1653,
29918,
667,
29898,
13082,
29892,
6796,
29933,
29967,
29925,
20068,
13,
1678,
1653,
29918,
667,
29898,
13082,
29892,
6796,
29907,
549,
1253,
20068,
13,
1678,
1653,
29918,
667,
29898,
13082,
29892,
6796,
5612,
803,
20068,
13,
1678,
1653,
29918,
667,
29898,
13082,
29892,
6796,
29928,
331,
8415,
2454,
20068,
13,
1678,
1596,
703,
5350,
7841,
29991,
1159,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
2
] |
bot.py | suntorvic/tobman | 0 | 52777 | <reponame>suntorvic/tobman
#!/usr/bin/python3
# coding: utf-8
from __future__ import annotations
import discord
from discord.ext import commands
from enum import Enum
import yaml
import re
import sys
import json
import os.path
import urllib, urllib.parse
import datetime
import ics
import io
import asyncio
class Translation:
UNABLE_RENAME_USER='Impossible de renommer l\'utilisateur {0}'
RENAME_TITLE='Changement de nom !'
RENAME_MESSAGE='{0} change le nom de **{1}** en {2}'
EVENTS_NEW_TITLE='Événement : **{0}**'
EVENTS_NEW='Nouvel événement'
EVENTS_NEW_ERROR='Erreur à la création de l\'événement'
EVENTS_LIST_TITLE='Événements sur #{0}'
EVENTS_LIST_NONE='Aucun événement sur #{0}'
EVENTS_LIST_DESC='{1} événement(s) sur #{0}'
EVENTS_CLEAR_TITLE='Purge des événements sur #{0}'
EVENTS_CLEAR_DESC='{0} événement(s) supprimé(s)'
EVENTS_DELETE_TITLE='Suppression de l\'événement'
EVENTS_DELETE_DESC='Événement **{0}** supprimé'
EVENTS_DELETE_TITLE='Événement supprimé'
EVENTS_DELETE_BY='Par'
EVENTS_DELETE_NONE='Aucun événement ne correspond à **{0}**'
EVENTS_REACT_TITLE='Événement **{0}**'
EVENTS_REACT_OK='{0} participe à l\'événement [{1}]({2})'
EVENTS_REACT_NG='{0} ne participe pas à l\'événement [{1}]({2})'
EVENTS_INFO_ADDED_BY='Ajouté par'
EVENTS_INFO_REMAINING_DAYS='dans {0} jours'
EVENTS_INFO_REMAINING_DAYS_TODAY='aujourd\'hui'
EVENTS_INFO_REMAINING_DAYS_TOMORROW='demain'
EVENTS_INFO_LOCATION='Lieu'
EVENTS_INFO_LIST_STATUS='{0} **{1}**'
EVENTS_NEW_ERROR_DATE_FORMAT='Erreur à la création de l\'événement : la date \'{0}\' ne correspond pas au format {1}'
EVENTS_EDIT_TITLE='Modification de l\'événement'
EVENTS_EDIT_DESC='Événement [{0}]({1}) modifié'
EVENTS_EDIT_BY='Par'
EVENTS_EDIT_NONE='Aucun événement ne correspond à **{0}**'
EVENTS_MODIFICATION='Modification'
EVENTS_MODIFICATION_DATE='Date *{0}* ➡️ *{1}*'
EVENTS_MODIFICATION_LOC='Lieu *{0}* ➡️ *{1}*'
EVENTS_MODIFICATION_URL='Adresse *{0}* ➡️ *{1}*'
EVENTS_MODIFICATION_TITLE='Titre *{0}* ➡️ *{1}*'
EVENTS_REMINDER_TITLE='ℹ Événements à venir'
EVENT_CALENDAR_FILENAME='Agenda - {0}.ics'
CONFIG_FILENAME='tobman.yaml'
DATA_JSON_FILENAME='tobman-data.json'
class SectionType(Enum):
TEXT_CHANNEL = 1
CATEGORY = 2
class Section:
_section_regex = re.compile(r"""^\#([^\s]+)$""")
def __init__(self, section_type: SectionType, section_name: str):
self.section_type = section_type
self.section_name = section_name
@classmethod
def from_string(cls, section_string) -> Section:
match = cls._section_regex.match(section_string)
if match:
return Section(SectionType.TEXT_CHANNEL, match.group(1))
return Section(SectionType.CATEGORY, section_string)
def fits(self, discord_channel: discord.TextChannel) -> bool:
if self.section_type == SectionType.TEXT_CHANNEL:
return discord_channel.name == self.section_name
if (self.section_type == SectionType.CATEGORY) and (discord_channel.category is not None):
return discord_channel.category.name == self.section_name
return False
def list_fits(section_list: list, text_channel: discord.TextChannel) -> bool:
allow_in: Section
for allow_in in section_list:
if allow_in.fits(text_channel):
return True
return False
class EventError(Enum):
DATE_ERROR = 1
class EventModification:
def __init__(self, message: str, old_value: str, new_value: str):
self.message = message
self.old_value = old_value
self.new_value = new_value
def __str__(self):
if self.old_value and self.old_value != '':
return self.message.format(self.old_value, self.new_value)
else:
return self.message.format('❌', self.new_value)
class Event:
REACTION_OK = '🆗'
REACTION_NG = '🆖'
REACTIONS = [REACTION_OK, REACTION_NG]
DATE_FORMAT='%Y-%m-%d'
TITLE_PREFIX='title:'
DATE_PREFIX='date:'
URL_PREFIX='url:'
LOCATION_PREFIX='loc:'
def __init__(self, title):
self.guild_id = None
self.channel_id = None
self.message_id = None
self.command_message_id = None
self.title = title
self.message = None
self.url_string = None
self.url_thumbnail = None
self.description = ''
self.location = ''
self.date = None
self.original_user_id = None
@classmethod
def parse_new_command(cls, original_message, args_list):
event = None
if len(args_list) > 0:
original_embed = None
if original_message is not None and original_message.embeds is not None and len(original_message.embeds) > 0:
original_embed = original_message.embeds[-1]
title = str(original_embed.title)
event = Event(title)
event.set_url(original_embed.url)
event.description = original_embed.description
else:
event = Event(str(args_list[0]))
for arg in args_list[1:]:
for function in [event.parse_date, event.parse_loc]:
mod, error = function(arg)
if error:
return None, error
if arg.startswith(cls.URL_PREFIX):
event.title = str(args_list[0])
event.set_url(arg[len(cls.URL_PREFIX):])
if original_embed and original_embed.thumbnail and original_embed.thumbnail.url.startswith('http'):
event.url_thumbnail = original_embed.thumbnail.url
elif original_embed and original_embed.image and original_embed.image.url.startswith('http'):
event.url_thumbnail = original_embed.image.url
return event, None
def parse_edit_command(self, arg_list):
for arg in arg_list:
for function in [self.parse_title, self.parse_date, self.parse_loc, self.parse_url]:
mod, error = function(arg)
if mod:
yield mod, None
break
if error:
yield None, error
break
def parse_date(self, arg):
if arg.startswith(self.DATE_PREFIX):
old_date_string = self.get_date_string()
self.set_date_from_string(arg[len(self.DATE_PREFIX):].strip())
date_string = self.get_date_string()
if date_string:
return EventModification(Translation.EVENTS_MODIFICATION_DATE, old_date_string, date_string), None
else:
return None, EventError.DATE_ERROR
return None, None
def parse_loc(self, arg):
if arg.startswith(self.LOCATION_PREFIX):
old_location = self.location
self.location = arg[len(self.LOCATION_PREFIX):].strip()
return EventModification(Translation.EVENTS_MODIFICATION_LOC, old_location, self.location), None
return None, None
def parse_title(self, arg):
if arg.startswith(self.TITLE_PREFIX):
old_title = self.title
self.title = arg[len(self.TITLE_PREFIX):].strip()
return EventModification(Translation.EVENTS_MODIFICATION_TITLE, old_title, self.title), None
return None, None
def parse_url(self, arg):
if arg.startswith(self.URL_PREFIX):
old_url = self.url_string
event.set_url(arg[len(self.URL_PREFIX):].strip())
return EventModification(Translation.EVENTS_MODIFICATION_URL, old_url, event.url_string), None
return None, None
def format_room_id(guild_id, channel_id):
return f'{guild_id}-{channel_id}'
def parse_room_id(channel_id_str: str):
channel_str_elems = channel_id_str.split('-')
if len(channel_str_elems) >= 2:
return int(channel_str_elems[0]), int(channel_str_elems[1])
else:
return None, None
def set_ids(self, guild_id, channel_id, message_id, command_message_id):
self.guild_id = guild_id
self.channel_id = channel_id
self.message_id = message_id
self.command_message_id = command_message_id
def user_counts(self):
ok_count = None
ng_count = None
if self.message is not None:
ok_count = 0
ng_count = 0
for reaction in self.message.reactions:
if reaction.emoji == self.REACTION_OK:
ok_count = reaction.count
if reaction.me:
ok_count -= 1
elif reaction.emoji == self.REACTION_NG:
ng_count = reaction.count
if reaction.me:
ng_count -= 1
return ok_count, ng_count
def message_url(self):
return f'https://discordapp.com/channels/{self.guild_id}/{self.channel_id}/{self.message_id}'
def summary(self):
remaining_days_string = ''
remaining_days = self.remaining_days()
if remaining_days is not None:
if remaining_days > 1:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS.format(remaining_days)}*'
elif remaining_days == 1:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS_TOMORROW}*'
elif remaining_days == 0:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS_TODAY}*'
if self.message is not None:
ok_count, ng_count = self.user_counts()
url_part = ''
if self.url_string:
url_netloc = urllib.parse.urlparse(self.url_string)[1]
url_part = f' (*[{url_netloc}]({self.url_string})*)'
return f'[**{self.title}**]({self.message_url()}){url_part}{remaining_days_string}\n{Event.REACTION_OK} **{ok_count}**\n{Event.REACTION_NG} **{ng_count}**'
else:
return f'[**{self.title}**]({self.message_url()}){remaining_days_string}'
def set_url(self, url_string):
self.url_string = url_string
def to_serializable(self):
serializable = { 't': self.title, 'g': self.guild_id, 'c': self.channel_id, 'm': self.message_id, 'cm': self.command_message_id }
if self.url_string:
serializable['url'] = self.url_string
if self.description:
serializable['desc'] = self.description
if self.location:
serializable['loc'] = self.location
date = self.get_date_string()
if date:
serializable['date'] = date
if self.url_thumbnail:
serializable['th'] = self.url_thumbnail
if self.original_user_id:
serializable['ouid'] = self.original_user_id
return serializable
def from_deserializable(deserializable):
try:
if ('g' in deserializable) and ('c' in deserializable) and ('m' in deserializable) and ('t' in deserializable):
event = Event(str(deserializable['t']))
guild_id = int(deserializable['g'])
channel_id = int(deserializable['c'])
message_id = int(deserializable['m'])
command_message_id = int(deserializable['cm'])
event.set_ids(guild_id, channel_id, message_id, command_message_id)
if 'url' in deserializable:
event.set_url(deserializable['url'])
if 'description' in deserializable:
event.description = deserializable['description']
if 'date' in deserializable:
event.set_date_from_string(deserializable['date'])
if 'th' in deserializable:
event.url_thumbnail = str(deserializable['th'])
if 'loc' in deserializable:
event.location = str(deserializable['loc'])
if 'ouid' in deserializable:
event.original_user_id = int(deserializable['ouid'])
return event
except Exception as err:
print(f'Error deserializing event: {json.dump(deserializable)}: {err}', file=sys.stderr)
return None
def set_date_from_string(self, date_string):
self.date = None
try:
self.date = datetime.datetime.strptime(date_string, self.DATE_FORMAT)
except Exception as err:
print(f'Error reading date string {date_string}: {err}', file=sys.stderr)
self.date = self.date.replace(hour=11, minute=59)
def get_date_string(self):
if self.date:
return self.date.strftime(self.DATE_FORMAT)
return None
def generate_date_ics(self):
if self.date:
cal = ics.Calendar()
cal_event = ics.Event()
cal_event.name = self.title
cal_event.begin = self.date
cal_event.created = datetime.datetime.today()
cal_event.description = self.description
cal_event.location = self.location
if self.url_string:
cal_event.url = self.url_string
cal_event.make_all_day()
cal.events.add(cal_event)
ics_memory_buffer = io.StringIO()
ics_memory_buffer.writelines(cal)
ics_memory_buffer.seek(0, 0)
return ics_memory_buffer
return None
async def generate_discord_embed(self):
embed = discord.Embed(title = Translation.EVENTS_NEW_TITLE.format(self.title),
type = 'rich',
description = self.description
)
if self.original_user_id:
original_user = bot.get_user(self.original_user_id)
if original_user:
embed.add_field(name = Translation.EVENTS_INFO_ADDED_BY, value = original_user.mention)
if self.date:
remaining_days_string = ''
remaining_days = self.remaining_days()
if remaining_days > 1:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS.format(remaining_days)}*'
elif remaining_days == 1:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS_TOMORROW}*'
elif remaining_days == 0:
remaining_days_string = f' *{Translation.EVENTS_INFO_REMAINING_DAYS_TODAY}*'
embed.add_field(name = self.get_date_string(), value = remaining_days_string.capitalize())
if self.url_string:
embed.url = self.url_string
if self.location != '':
embed.add_field(name = Translation.EVENTS_INFO_LOCATION, value = self.location)
if self.message:
await self.generate_add_ok_ng_embed_fields(embed)
if self.url_thumbnail:
embed.set_thumbnail(url = self.url_thumbnail)
return embed
async def ok_users(self):
users = []
for reaction in self.message.reactions:
if reaction.emoji == self.REACTION_OK:
async for user in reaction.users():
if user != bot.user:
users.append(user)
return users
async def ng_users(self):
users = []
for reaction in self.message.reactions:
if reaction.emoji == self.REACTION_NG:
async for user in reaction.users():
if user != bot.user:
users.append(user)
return users
async def generate_add_ok_ng_embed_fields(self, embed):
ok_count, ng_count = self.user_counts()
if (ok_count and (ok_count > 0)) or (ng_count and (ng_count > 0)):
ok_mentions = [user.mention for user in await self.ok_users()]
ng_mentions = [user.mention for user in await self.ng_users()]
if ok_count > 0:
embed.add_field(name = Translation.EVENTS_INFO_LIST_STATUS.format(self.REACTION_OK, ok_count), value = '\n'.join(ok_mentions))
if ng_count > 0:
embed.add_field(name = Translation.EVENTS_INFO_LIST_STATUS.format(self.REACTION_OK, ng_count), value = '\n'.join(ng_mentions))
async def set_message(self, message):
self.message = message
# Edit the message
embed = await self.generate_discord_embed()
await message.edit(embed = embed)
def today(self):
return datetime.datetime.combine(datetime.datetime.today(), datetime.time(hour = self.date.hour, minute = self.date.minute, second = self.date.second, microsecond = self.date.microsecond, tzinfo = self.date.tzinfo))
def still_active(self):
if self.date:
today = self.today()
delta = self.date - today
return int(delta.days) >= 0
else:
return True
def remaining_days(self):
if self.date:
today = self.today()
delta = self.date - today
return int(delta.days)
return None
async def refresh_message(self, discord_messageable):
message = await discord_messageable.fetch_message(int(self.message_id))
if message:
await self.set_message(message)
return message
return None
class Tobman:
def __init__(self, bot: commands.Bot):
self.bot = bot
self.rename_allowed_in = []
self.events_allowed_in = []
self.events = {}
self.config_filename = CONFIG_FILENAME
self.data_filename = DATA_JSON_FILENAME
self.remove_rename_commands = False
self.remove_event_commands = False
self.init_schedule()
def load_config(self):
with open(self.config_filename, 'r') as config_file:
data = yaml.safe_load(config_file)
if 'discord_api_token' not in data:
print(f'Error: {self.config_filename} does not define the key "token"')
self.token = data['discord_api_token']
if 'rename_allowed_in' in data:
self.rename_allowed_in = [Section.from_string(section_string) for section_string in data['rename_allowed_in']]
if 'events_allowed_in' in data:
self.events_allowed_in = [Section.from_string(section_string) for section_string in data['events_allowed_in']]
if 'remove_rename_commands' in data:
self.remove_rename_commands = bool(data['remove_rename_commands'])
if 'remove_event_commands' in data:
self.remove_event_commands = bool(data['remove_event_commands'])
def load_data(self):
import os.path
if os.path.isfile(self.data_filename):
with open(self.data_filename, 'r') as data_file:
data_json = json.load(data_file)
if data_json is not None:
if 'events' in data_json:
self.events = {}
for channel_id_key, event_list_json in data_json['events'].items():
self.events[channel_id_key] = []
for event_json in event_list_json:
event = Event.from_deserializable(event_json)
print(f'Deserialized event {event.title}')
if event is not None:
self.events[channel_id_key].append(event)
print(f'Added event {event.title} to {channel_id_key}')
def save_data(self):
data_json = {}
data_json['events'] = {}
for channel_id_key, event_list in self.events.items():
event_list_json = []
if event_list is not None:
for event in event_list:
event_list_json.append(event.to_serializable())
data_json['events'][str(channel_id_key)] = event_list_json
with open(self.data_filename, 'w') as data_file:
json.dump(data_json, data_file)
def add_event(self, event):
if (event.guild_id is not None) and (event.channel_id is not None) and (event.message_id is not None):
id_str = Event.format_room_id(event.guild_id, event.channel_id)
if self.events.get(id_str) is None:
self.events[id_str] = []
self.events[id_str].append(event)
self.save_data()
def clear_events(self, guild_id, channel_id):
id_str = Event.format_room_id(guild_id, channel_id)
event_list = self.events.get(id_str)
self.events[id_str] = None
self.save_data()
return event_list
def get_event(self, guild_id, channel_id, message_id):
id_str = Event.format_room_id(guild_id, channel_id)
event_list = self.events.get(id_str)
if event_list:
return [event for event in event_list if (event.message_id == message_id)]
def get_events_by_title(self, guild_id, channel_id, event_title):
id_str = Event.format_room_id(guild_id, channel_id)
event_list = self.events.get(id_str)
for event in event_list:
if event.title.strip() == event_title.strip():
yield event
def delete_events(self, guild_id, channel_id, event_title):
id_str = Event.format_room_id(guild_id, channel_id)
event_list = self.events.get(id_str)
deleted_events = []
for event in event_list:
if event.title == event_title:
deleted_events.append(event)
for event in deleted_events:
event_list.remove(event)
print(f'Removed event {event.title} from {id_str}')
yield event
async def refresh_channel_events(self, channel):
if Section.list_fits(bot.tobman.events_allowed_in, channel):
guild = channel.guild
id_str = Event.format_room_id(guild.id, channel.id)
event_list = self.events.get(id_str)
if event_list is not None:
print(f'Refreshing event list for {id_str}')
events_to_delete = []
for event in event_list:
if event.still_active():
try:
await event.refresh_message(channel)
except discord.NotFound:
print(f'Message {event.message_id} not found, deleting event {event.title}', file=sys.stderr)
events_to_delete.append(event)
except Exception as err:
print(f'Error refreshing events for message {event.message_id}: {err}', file=sys.stderr)
else:
events_to_delete.append(event)
for event in events_to_delete:
print(f'Removed event {event.title} from {id_str}')
event_list.remove(event)
self.save_data()
def get_channel_from_ids(self, guild_id, channel_id, only_if_can_send = False):
channel = self.bot.get_channel(channel_id)
if channel and ((not only_if_can_send) or channel.permissions_for(channel.guild.me).send_messages):
return channel
return None
async def on_event_message_delete(self, guild_id, channel_id, message_id):
id_str = Event.format_room_id(guild_id, channel_id)
event_list = self.events.get(id_str)
if event_list:
indices_to_remove = []
events_to_delete = [event for event in event_list if event.message_id == message_id]
if len(events_to_delete) > 0:
for event in events_to_delete:
event_list.remove(event)
self.save_data()
channel = self.get_channel_from_ids(guild_id, channel_id, only_if_can_send = True)
if channel:
for event in events_to_delete:
embed = discord.Embed(title = Translation.EVENTS_DELETE_TITLE, description = Translation.EVENTS_DELETE_DESC.format(event.title))
await channel.send(embed = embed)
async def on_event_reaction_add(self, guild_id, channel_id, message_id, user_id, emoji):
if user_id != self.bot.user.id and emoji.name in Event.REACTIONS:
channel = self.get_channel_from_ids(guild_id, channel_id, only_if_can_send = True)
if channel:
for event in self.get_event(guild_id, channel_id, message_id):
await event.refresh_message(channel)
member = bot.get_guild(guild_id).get_member(user_id)
if member:
desc_message = None
if emoji.name == Event.REACTION_OK:
desc_message = Translation.EVENTS_REACT_OK
elif emoji.name == Event.REACTION_NG:
desc_message = Translation.EVENTS_REACT_NG
embed = discord.Embed(
title = Translation.EVENTS_REACT_TITLE.format(event.title),
description = desc_message.format(member.mention, event.title, event.message_url())
)
await channel.send(embed = embed)
async def on_event_reaction_remove(self, guild_id, channel_id, message_id, user_id, emoji):
if user_id != self.bot.user.id and emoji.name in Event.REACTIONS:
channel = self.get_channel_from_ids(guild_id, channel_id, only_if_can_send = True)
if channel:
for event in self.get_event(guild_id, channel_id, message_id):
# if there are no more reactions of this emoji then add it back
await event.refresh_message(channel)
if emoji.name == Event.REACTION_OK:
member = bot.get_guild(guild_id).get_member(user_id)
embed = discord.Embed(
title = Translation.EVENTS_REACT_TITLE.format(event.title),
description = Translation.EVENTS_REACT_NG.format(member.mention, event.title, event.message_url())
)
await channel.send(embed = embed)
# time of day for reminders
SCHEDULE_TIME = datetime.time(hour=9)
EVENT_DAYS = [
(7, f'{Translation.EVENTS_INFO_REMAINING_DAYS.format(7)}'),
(1, Translation.EVENTS_INFO_REMAINING_DAYS_TOMORROW),
(0, Translation.EVENTS_INFO_REMAINING_DAYS_TODAY),
]
def init_schedule(self):
now = datetime.datetime.now()
self.next_schedule = datetime.datetime.combine(datetime.datetime.today(), self.SCHEDULE_TIME)
if now > self.next_schedule:
self.next_schedule += datetime.timedelta(days=1)
async def events_scheduled_job(self):
await self.bot.wait_until_ready()
if not self.bot.is_closed():
now = datetime.datetime.now()
if (now >= self.next_schedule):
print(f'Running scheduled events check')
self.last_schedule = now
self.next_schedule = datetime.datetime.combine(datetime.datetime.today() + datetime.timedelta(days=1), self.SCHEDULE_TIME)
print(f'Next schedule: {self.next_schedule}')
for channel_id_key, event_list in self.events.items():
guild_id, channel_id = Event.parse_room_id(channel_id_key)
if guild_id and channel_id:
channel = self.bot.get_channel(channel_id)
if channel:
for days_remaining, event_date_message in self.EVENT_DAYS:
events_to_come = []
for event in event_list:
try:
await event.refresh_message(channel)
if event.remaining_days() == days_remaining:
events_to_come.append(event)
print(f'Event in {days_remaining} day(s) [{event_date_message}]: "{event.title}"')
except discord.NotFound:
print(f'Message {event.message_id} ({event.title}) not found, ignoring for scheduled check', file=sys.stderr)
if len(events_to_come) > 0:
embed = discord.Embed(title = Translation.EVENTS_REMINDER_TITLE,
type = 'rich'
)
for event in events_to_come:
ok_mentions = [user.mention for user in await event.ok_users()]
ok_mentions_string = '\n'.join(ok_mentions)
if len(ok_mentions_string) > 0:
ok_mentions_string = '\n' + ok_mentions_string
embed.add_field(name = f'{event_date_message}', value = f'[{event.title}]({event.message_url()}){ok_mentions_string}')
await channel.send(embed = embed)
else:
print(f'Channel not found: {channel_id} {len(event_list)}', file=sys.stderr)
async def loop_time_check(self):
await self.bot.wait_until_ready()
while not self.bot.is_closed():
await self.events_scheduled_job()
await asyncio.sleep(60)
bot = commands.Bot(command_prefix='/')
bot.tobman = Tobman(bot)
bot.tobman.load_config()
bot.tobman.load_data()
@bot.event
async def on_ready():
print(f'Now logged in as {bot.user.name} {bot.user.id}')
@bot.event
async def on_guild_available(guild):
print(f'Opened guild {guild}')
if not guild.me.guild_permissions.manage_messages:
print('Cannot manage messages')
if not guild.me.guild_permissions.manage_nicknames:
print('Cannot manage nicknames')
await guild.me.edit(nick = bot.user.name)
@bot.command(name='rename')
async def rename(ctx, member_id, to_name):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
member_real_id = None
if len(member_id) >= 4:
try:
member_real_id = int(member_id.replace('@', '').replace('<', '').replace('!', '').replace('>', ''))
except ValueError:
print(f'Unable to read member id from {member_id}')
member_real_id = None
member = None
if member_real_id is not None:
member = await guild.fetch_member(member_real_id)
print(f'Rename command: try {member_id} ({member}) -> {to_name}')
if (guild is not None) and (author is not None) and Section.list_fits(bot.tobman.rename_allowed_in, channel):
if (member is not None) and (not member.bot):
original_name = member.nick or member.name
print(f'Rename command: change {original_name} to {to_name}')
await member.edit(nick = to_name)
embed = discord.Embed(title = Translation.RENAME_TITLE, type = 'rich', description = Translation.RENAME_MESSAGE.format(author.mention, original_name, member.mention))
await channel.send(embed = embed)
else:
await author.send(Translation.UNABLE_RENAME_USER.format(member_id))
if bot.tobman.remove_rename_commands:
await ctx.message.delete()
@bot.command(name='event.new')
async def event(ctx, *args):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
if (guild is not None) and (not author.bot) and Section.list_fits(bot.tobman.events_allowed_in, channel) and len(args) > 0:
event, error_type = Event.parse_new_command(ctx.message, args)
if event:
embed = await event.generate_discord_embed()
ics_cal_file = event.generate_date_ics()
if ics_cal_file:
ics_cal_file = discord.File(ics_cal_file, filename = Translation.EVENT_CALENDAR_FILENAME.format(str(event.title)))
message = await channel.send(embed = embed, file = ics_cal_file)
event.set_ids(guild.id, channel.id, message.id, ctx.message.id)
event.original_user_id = ctx.message.author.id
bot.tobman.add_event(event)
# default reactions
await message.add_reaction(Event.REACTION_OK)
await message.add_reaction(Event.REACTION_NG)
await event.set_message(message)
if bot.tobman.remove_event_commands:
await ctx.message.delete()
elif error_type == EventError.DATE_ERROR:
error_embed = discord.Embed(title = Translation.EVENTS_NEW_ERROR, type = 'rich', description = Translation.EVENTS_NEW_ERROR_DATE_FORMAT.format(arg, Event.DATE_FORMAT))
message = await channel.send(embed = error_embed)
else:
message = await channel.send(EVENTS_NEW_ERROR)
@bot.command(name='event.list')
async def event(ctx):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
if (guild is not None) and (not author.bot) and Section.list_fits(bot.tobman.events_allowed_in, channel):
id_str = Event.format_room_id(guild.id, channel.id)
print(f'List events for channel {id_str}')
event_list = bot.tobman.events.get(id_str)
if (event_list is None) or (len(event_list) == 0):
embed = discord.Embed(title = Translation.EVENTS_LIST_TITLE.format(channel.name),
type = 'rich',
description = Translation.EVENTS_LIST_NONE.format(channel.name)
)
await channel.send(embed = embed)
else:
await bot.tobman.refresh_channel_events(channel)
embed = discord.Embed(title = Translation.EVENTS_LIST_TITLE.format(channel.name),
type = 'rich',
description = Translation.EVENTS_LIST_DESC.format(channel.name, len(event_list))
)
for event in event_list:
embed.add_field(name = event.title, value = event.summary())
await channel.send(embed = embed)
if bot.tobman.remove_event_commands:
await ctx.message.delete()
@bot.command(name='event.edit')
async def event(ctx, event_title: str, *args):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
if (guild is not None) and (not author.bot) and Section.list_fits(bot.tobman.events_allowed_in, channel):
event_list = list(bot.tobman.get_events_by_title(guild.id, channel.id, event_title))
if event_list and len(event_list) > 0:
for event in event_list:
modifications = list(event.parse_edit_command(args))
error_count = 0
for modification, error in modifications:
if error:
if error == EventError.DATE_ERROR:
error_embed = discord.Embed(title = Translation.EVENTS_NEW_ERROR, type = 'rich', description = Translation.EVENTS_NEW_ERROR_DATE_FORMAT.format(arg, Event.DATE_FORMAT))
message = await channel.send(embed = error_embed)
else:
print(f'Error {error} while modifying event {event.title}, command: {args}', file=sys.stderr)
error_count += 1
if (len(modifications) > 0) and (error_count == 0):
bot.tobman.save_data()
try:
message = await event.refresh_message(channel)
if message:
new_embed = await event.generate_discord_embed()
# Can't attach a file to a message edit...
# ics_cal_file = discord.File(event.generate_date_ics(), filename = Translation.EVENT_CALENDAR_FILENAME.format(event.title))
await message.edit(embed = new_embed)
except discord.NotFound:
print(f'Message {event.message_id} not found, modifying event {event.title}', file=sys.stderr)
embed = discord.Embed(title = Translation.EVENTS_EDIT_TITLE,
type = 'rich',
description = Translation.EVENTS_EDIT_DESC.format(event.title, event.message_url())
)
embed.add_field(name = Translation.EVENTS_EDIT_BY, value = ctx.message.author.mention)
await event.generate_add_ok_ng_embed_fields(embed)
for modification, error in modifications:
embed.add_field(name = Translation.EVENTS_MODIFICATION, value = str(modification))
await channel.send(embed = embed)
if bot.tobman.remove_event_commands:
await ctx.message.delete()
else:
embed = discord.Embed(title = Translation.EVENTS_EDIT_TITLE,
type = 'rich',
description = Translation.EVENTS_EDIT_NONE.format(event_title)
)
await channel.send(embed = embed)
@bot.command(name='event.delete')
async def event(ctx, event_title: str):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
if (guild is not None) and (not author.bot) and Section.list_fits(bot.tobman.events_allowed_in, channel):
event_list = list(bot.tobman.delete_events(guild.id, channel.id, event_title))
bot.tobman.save_data()
if event_list and len(event_list) > 0:
for event in event_list:
try:
event_message = await event.refresh_message(channel)
await event_message.delete()
except discord.NotFound:
print(f'Message {event.message_id} not found, deleting event {event.title}', file=sys.stderr)
embed = discord.Embed(title = Translation.EVENTS_DELETE_TITLE,
type = 'rich',
description = Translation.EVENTS_DELETE_DESC.format(event.title)
)
embed.add_field(name = Translation.EVENTS_DELETE_BY, value = ctx.message.author.mention)
await channel.send(embed = embed)
if bot.tobman.remove_event_commands:
await ctx.message.delete()
else:
embed = discord.Embed(title = Translation.EVENTS_DELETE_TITLE,
type = 'rich',
description = Translation.EVENTS_DELETE_NONE.format(event_title)
)
await channel.send(embed = embed)
@bot.command(name='event.clear')
async def event(ctx):
guild = ctx.guild
author = ctx.author
channel = ctx.message.channel
if (guild is not None) and (not author.bot) and Section.list_fits(bot.tobman.events_allowed_in, channel):
event_list = bot.tobman.clear_events(guild.id, channel.id)
event_count = 0
if event_list is not None:
event_count = len(event_list)
embed = discord.Embed(title = Translation.EVENTS_CLEAR_TITLE.format(channel.name),
type = 'rich',
description = Translation.EVENTS_CLEAR_DESC.format(event_count)
)
await channel.send(embed = embed)
if bot.tobman.remove_event_commands:
await ctx.message.delete()
@bot.event
async def on_raw_message_delete(raw_delete_event):
await bot.tobman.on_event_message_delete(raw_delete_event.guild_id, raw_delete_event.channel_id, raw_delete_event.message_id)
@bot.event
async def on_raw_reaction_add(raw_reaction_event):
await bot.tobman.on_event_reaction_add(raw_reaction_event.guild_id, raw_reaction_event.channel_id, raw_reaction_event.message_id, raw_reaction_event.user_id, raw_reaction_event.emoji)
@bot.event
async def on_raw_reaction_remove(raw_reaction_event):
await bot.tobman.on_event_reaction_remove(raw_reaction_event.guild_id, raw_reaction_event.channel_id, raw_reaction_event.message_id, raw_reaction_event.user_id, raw_reaction_event.emoji)
bot.loop.create_task(bot.tobman.loop_time_check())
bot.run(bot.tobman.token)
| [
1,
529,
276,
1112,
420,
29958,
29879,
1657,
272,
26311,
29914,
517,
29890,
1171,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
3166,
14115,
1053,
1174,
398,
13,
5215,
343,
8807,
13,
5215,
337,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
2897,
29889,
2084,
13,
5215,
3142,
1982,
29892,
3142,
1982,
29889,
5510,
13,
5215,
12865,
13,
5215,
29871,
1199,
13,
5215,
12013,
13,
5215,
408,
948,
3934,
13,
13,
1990,
4103,
18411,
29901,
13,
1678,
8291,
6181,
29918,
29934,
1430,
25797,
29918,
11889,
2433,
1888,
27338,
316,
4325,
290,
1050,
301,
20333,
4422,
275,
7289,
426,
29900,
10162,
13,
1678,
390,
1430,
25797,
29918,
29911,
1806,
1307,
2433,
1451,
574,
882,
316,
2245,
1738,
29915,
13,
1678,
390,
1430,
25797,
29918,
2303,
1799,
10461,
2433,
29912,
29900,
29913,
1735,
454,
2245,
316,
3579,
29912,
29896,
29913,
1068,
427,
426,
29906,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
28577,
29918,
29911,
1806,
1307,
2433,
30062,
29894,
1690,
882,
584,
3579,
29912,
29900,
29913,
1068,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
28577,
2433,
29940,
9095,
10019,
1690,
882,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
28577,
29918,
11432,
2433,
2110,
276,
332,
818,
425,
25243,
316,
301,
20333,
5903,
1690,
882,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
24360,
29918,
29911,
1806,
1307,
2433,
30062,
29894,
1690,
4110,
1190,
24037,
29900,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
24360,
29918,
29940,
12413,
2433,
29909,
1682,
348,
10019,
1690,
882,
1190,
24037,
29900,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
24360,
29918,
2287,
7187,
2433,
29912,
29896,
29913,
10019,
1690,
882,
29898,
29879,
29897,
1190,
24037,
29900,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
29907,
1307,
1718,
29918,
29911,
1806,
1307,
2433,
29925,
332,
479,
553,
10019,
1690,
4110,
1190,
24037,
29900,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
29907,
1307,
1718,
29918,
2287,
7187,
2433,
29912,
29900,
29913,
10019,
1690,
882,
29898,
29879,
29897,
1462,
5632,
29948,
29898,
29879,
16029,
13,
1678,
382,
29963,
3919,
29903,
29918,
2287,
18476,
29918,
29911,
1806,
1307,
2433,
20182,
23881,
316,
301,
20333,
5903,
1690,
882,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
2287,
18476,
29918,
2287,
7187,
2433,
30062,
29894,
1690,
882,
3579,
29912,
29900,
29913,
1068,
1462,
5632,
29948,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
2287,
18476,
29918,
29911,
1806,
1307,
2433,
30062,
29894,
1690,
882,
1462,
5632,
29948,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
2287,
18476,
29918,
22716,
2433,
2177,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
2287,
18476,
29918,
29940,
12413,
2433,
29909,
1682,
348,
10019,
1690,
882,
452,
3928,
818,
3579,
29912,
29900,
29913,
1068,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
1525,
17923,
29918,
29911,
1806,
1307,
2433,
30062,
29894,
1690,
882,
3579,
29912,
29900,
29913,
1068,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
1525,
17923,
29918,
8949,
2433,
29912,
29900,
29913,
28511,
818,
301,
20333,
5903,
1690,
882,
15974,
29896,
18456,
29912,
29906,
1800,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
1525,
17923,
29918,
9312,
2433,
29912,
29900,
29913,
452,
28511,
2331,
818,
301,
20333,
5903,
1690,
882,
15974,
29896,
18456,
29912,
29906,
1800,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
3035,
2287,
29928,
29918,
22716,
2433,
29909,
29926,
449,
29948,
610,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
2433,
29881,
550,
426,
29900,
29913,
16283,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
28658,
2433,
585,
18997,
20333,
15669,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
29924,
1955,
25180,
2433,
2310,
475,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
16652,
8098,
2433,
29931,
9532,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
11690,
29918,
24360,
29918,
27047,
2433,
29912,
29900,
29913,
3579,
29912,
29896,
29913,
1068,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
28577,
29918,
11432,
29918,
6248,
29918,
19094,
1299,
2433,
2110,
276,
332,
818,
425,
25243,
316,
301,
20333,
5903,
1690,
882,
584,
425,
2635,
320,
29915,
29912,
29900,
1012,
29915,
452,
3928,
2331,
782,
3402,
426,
29896,
10162,
13,
1678,
382,
29963,
3919,
29903,
29918,
12378,
29918,
29911,
1806,
1307,
2433,
2111,
2450,
316,
301,
20333,
5903,
1690,
882,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
12378,
29918,
2287,
7187,
2433,
30062,
29894,
1690,
882,
15974,
29900,
18456,
29912,
29896,
1800,
878,
29792,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
12378,
29918,
22716,
2433,
2177,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
12378,
29918,
29940,
12413,
2433,
29909,
1682,
348,
10019,
1690,
882,
452,
3928,
818,
3579,
29912,
29900,
29913,
1068,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
2433,
2111,
2450,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
6248,
2433,
2539,
334,
29912,
29900,
29913,
29930,
29871,
229,
161,
164,
30598,
334,
29912,
29896,
29913,
29930,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
16652,
2433,
29931,
9532,
334,
29912,
29900,
29913,
29930,
29871,
229,
161,
164,
30598,
334,
29912,
29896,
29913,
29930,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
4219,
2433,
3253,
23458,
334,
29912,
29900,
29913,
29930,
29871,
229,
161,
164,
30598,
334,
29912,
29896,
29913,
29930,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
29911,
1806,
1307,
2433,
29911,
277,
276,
334,
29912,
29900,
29913,
29930,
29871,
229,
161,
164,
30598,
334,
29912,
29896,
29913,
29930,
29915,
13,
1678,
382,
29963,
3919,
29903,
29918,
1525,
16173,
8032,
29918,
29911,
1806,
1307,
2433,
229,
135,
188,
3067,
29894,
1690,
4110,
818,
6003,
381,
29915,
13,
1678,
382,
29963,
3919,
29918,
5454,
1307,
2797,
1718,
29918,
7724,
5813,
2433,
14769,
8395,
448,
426,
29900,
1836,
1199,
29915,
13,
13,
25903,
29918,
7724,
5813,
2433,
517,
29890,
1171,
29889,
25162,
29915,
13,
14573,
29918,
7249,
29918,
7724,
5813,
2433,
517,
29890,
1171,
29899,
1272,
29889,
3126,
29915,
13,
13,
1990,
9779,
1542,
29898,
16854,
1125,
13,
1678,
323,
12194,
29918,
3210,
2190,
29940,
6670,
353,
29871,
29896,
13,
1678,
315,
3040,
29954,
18929,
353,
29871,
29906,
13,
13,
1990,
9779,
29901,
13,
1678,
903,
2042,
29918,
13087,
353,
337,
29889,
12198,
29898,
29878,
15945,
29908,
3823,
29937,
4197,
3823,
29879,
10062,
1262,
15945,
1159,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4004,
29918,
1853,
29901,
9779,
1542,
29892,
4004,
29918,
978,
29901,
851,
1125,
13,
4706,
1583,
29889,
2042,
29918,
1853,
353,
4004,
29918,
1853,
13,
4706,
1583,
29889,
2042,
29918,
978,
353,
4004,
29918,
978,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
1807,
29898,
25932,
29892,
4004,
29918,
1807,
29897,
1599,
9779,
29901,
13,
4706,
1993,
353,
1067,
29879,
3032,
2042,
29918,
13087,
29889,
4352,
29898,
2042,
29918,
1807,
29897,
13,
4706,
565,
1993,
29901,
13,
9651,
736,
9779,
29898,
13438,
1542,
29889,
16975,
29918,
3210,
2190,
29940,
6670,
29892,
1993,
29889,
2972,
29898,
29896,
876,
13,
4706,
736,
9779,
29898,
13438,
1542,
29889,
29907,
3040,
29954,
18929,
29892,
4004,
29918,
1807,
29897,
13,
1678,
822,
23994,
29898,
1311,
29892,
2313,
536,
29918,
12719,
29901,
2313,
536,
29889,
1626,
13599,
29897,
1599,
6120,
29901,
13,
4706,
565,
1583,
29889,
2042,
29918,
1853,
1275,
9779,
1542,
29889,
16975,
29918,
3210,
2190,
29940,
6670,
29901,
13,
9651,
736,
2313,
536,
29918,
12719,
29889,
978,
1275,
1583,
29889,
2042,
29918,
978,
13,
4706,
565,
313,
1311,
29889,
2042,
29918,
1853,
1275,
9779,
1542,
29889,
29907,
3040,
29954,
18929,
29897,
322,
313,
2218,
16090,
29918,
12719,
29889,
7320,
338,
451,
6213,
1125,
13,
9651,
736,
2313,
536,
29918,
12719,
29889,
7320,
29889,
978,
1275,
1583,
29889,
2042,
29918,
978,
13,
4706,
736,
7700,
13,
1678,
822,
1051,
29918,
29888,
1169,
29898,
2042,
29918,
1761,
29901,
1051,
29892,
1426,
29918,
12719,
29901,
2313,
536,
29889,
1626,
13599,
29897,
1599,
6120,
29901,
13,
4706,
2758,
29918,
262,
29901,
9779,
13,
4706,
363,
2758,
29918,
262,
297,
4004,
29918,
1761,
29901,
13,
9651,
565,
2758,
29918,
262,
29889,
29888,
1169,
29898,
726,
29918,
12719,
1125,
13,
18884,
736,
5852,
13,
4706,
736,
7700,
13,
13,
1990,
6864,
2392,
29898,
16854,
1125,
13,
1678,
20231,
29918,
11432,
353,
29871,
29896,
13,
13,
1990,
6864,
2111,
2450,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2643,
29901,
851,
29892,
2030,
29918,
1767,
29901,
851,
29892,
716,
29918,
1767,
29901,
851,
1125,
13,
4706,
1583,
29889,
4906,
353,
2643,
13,
4706,
1583,
29889,
1025,
29918,
1767,
353,
2030,
29918,
1767,
13,
4706,
1583,
29889,
1482,
29918,
1767,
353,
716,
29918,
1767,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
565,
1583,
29889,
1025,
29918,
1767,
322,
1583,
29889,
1025,
29918,
1767,
2804,
525,
2396,
13,
9651,
736,
1583,
29889,
4906,
29889,
4830,
29898,
1311,
29889,
1025,
29918,
1767,
29892,
1583,
29889,
1482,
29918,
1767,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
4906,
29889,
4830,
877,
229,
160,
143,
742,
1583,
29889,
1482,
29918,
1767,
29897,
13,
13,
1990,
6864,
29901,
13,
1678,
5195,
24705,
29918,
8949,
353,
525,
243,
162,
137,
154,
29915,
13,
1678,
5195,
24705,
29918,
9312,
353,
525,
243,
162,
137,
153,
29915,
13,
1678,
5195,
24705,
29903,
353,
518,
1525,
24705,
29918,
8949,
29892,
5195,
24705,
29918,
9312,
29962,
13,
1678,
20231,
29918,
19094,
1299,
2433,
29995,
29979,
19222,
29885,
19222,
29881,
29915,
13,
1678,
323,
1806,
1307,
29918,
15094,
25634,
2433,
3257,
11283,
13,
1678,
20231,
29918,
15094,
25634,
2433,
1256,
11283,
13,
1678,
3988,
29918,
15094,
25634,
2433,
2271,
11283,
13,
1678,
11247,
29907,
8098,
29918,
15094,
25634,
2433,
2029,
11283,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3611,
1125,
13,
4706,
1583,
29889,
2543,
789,
29918,
333,
353,
6213,
13,
4706,
1583,
29889,
12719,
29918,
333,
353,
6213,
13,
4706,
1583,
29889,
4906,
29918,
333,
353,
6213,
13,
4706,
1583,
29889,
6519,
29918,
4906,
29918,
333,
353,
6213,
13,
4706,
1583,
29889,
3257,
353,
3611,
13,
4706,
1583,
29889,
4906,
353,
6213,
13,
4706,
1583,
29889,
2271,
29918,
1807,
353,
6213,
13,
4706,
1583,
29889,
2271,
29918,
386,
21145,
353,
6213,
13,
4706,
1583,
29889,
8216,
353,
6629,
13,
4706,
1583,
29889,
5479,
353,
6629,
13,
4706,
1583,
29889,
1256,
353,
6213,
13,
4706,
1583,
29889,
13492,
29918,
1792,
29918,
333,
353,
6213,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6088,
29918,
1482,
29918,
6519,
29898,
25932,
29892,
2441,
29918,
4906,
29892,
6389,
29918,
1761,
1125,
13,
4706,
1741,
353,
6213,
13,
4706,
565,
7431,
29898,
5085,
29918,
1761,
29897,
1405,
29871,
29900,
29901,
13,
9651,
2441,
29918,
17987,
353,
6213,
13,
9651,
565,
2441,
29918,
4906,
338,
451,
6213,
322,
2441,
29918,
4906,
29889,
1590,
5779,
338,
451,
6213,
322,
7431,
29898,
13492,
29918,
4906,
29889,
1590,
5779,
29897,
1405,
29871,
29900,
29901,
13,
18884,
2441,
29918,
17987,
353,
2441,
29918,
4906,
29889,
1590,
5779,
14352,
29896,
29962,
13,
18884,
3611,
353,
851,
29898,
13492,
29918,
17987,
29889,
3257,
29897,
13,
18884,
1741,
353,
6864,
29898,
3257,
29897,
13,
18884,
1741,
29889,
842,
29918,
2271,
29898,
13492,
29918,
17987,
29889,
2271,
29897,
13,
18884,
1741,
29889,
8216,
353,
2441,
29918,
17987,
29889,
8216,
13,
9651,
1683,
29901,
13,
18884,
1741,
353,
6864,
29898,
710,
29898,
5085,
29918,
1761,
29961,
29900,
12622,
13,
9651,
363,
1852,
297,
6389,
29918,
1761,
29961,
29896,
29901,
5387,
13,
18884,
363,
740,
297,
518,
3696,
29889,
5510,
29918,
1256,
29892,
1741,
29889,
5510,
29918,
2029,
5387,
13,
462,
1678,
878,
29892,
1059,
353,
740,
29898,
1191,
29897,
13,
462,
1678,
565,
1059,
29901,
13,
462,
4706,
736,
6213,
29892,
1059,
13,
18884,
565,
1852,
29889,
27382,
2541,
29898,
25932,
29889,
4219,
29918,
15094,
25634,
1125,
13,
462,
1678,
1741,
29889,
3257,
353,
851,
29898,
5085,
29918,
1761,
29961,
29900,
2314,
13,
462,
1678,
1741,
29889,
842,
29918,
2271,
29898,
1191,
29961,
2435,
29898,
25932,
29889,
4219,
29918,
15094,
25634,
1125,
2314,
13,
9651,
565,
2441,
29918,
17987,
322,
2441,
29918,
17987,
29889,
386,
21145,
322,
2441,
29918,
17987,
29889,
386,
21145,
29889,
2271,
29889,
27382,
2541,
877,
1124,
29374,
13,
18884,
1741,
29889,
2271,
29918,
386,
21145,
353,
2441,
29918,
17987,
29889,
386,
21145,
29889,
2271,
13,
9651,
25342,
2441,
29918,
17987,
322,
2441,
29918,
17987,
29889,
3027,
322,
2441,
29918,
17987,
29889,
3027,
29889,
2271,
29889,
27382,
2541,
877,
1124,
29374,
13,
18884,
1741,
29889,
2271,
29918,
386,
21145,
353,
2441,
29918,
17987,
29889,
3027,
29889,
2271,
13,
4706,
736,
1741,
29892,
6213,
13,
1678,
822,
6088,
29918,
5628,
29918,
6519,
29898,
1311,
29892,
1852,
29918,
1761,
1125,
13,
4706,
363,
1852,
297,
1852,
29918,
1761,
29901,
13,
9651,
363,
740,
297,
518,
1311,
29889,
5510,
29918,
3257,
29892,
1583,
29889,
5510,
29918,
1256,
29892,
1583,
29889,
5510,
29918,
2029,
29892,
1583,
29889,
5510,
29918,
2271,
5387,
13,
18884,
878,
29892,
1059,
353,
740,
29898,
1191,
29897,
13,
18884,
565,
878,
29901,
13,
462,
1678,
7709,
878,
29892,
6213,
13,
462,
1678,
2867,
13,
18884,
565,
1059,
29901,
13,
462,
1678,
7709,
6213,
29892,
1059,
13,
462,
1678,
2867,
13,
1678,
822,
6088,
29918,
1256,
29898,
1311,
29892,
1852,
1125,
13,
4706,
565,
1852,
29889,
27382,
2541,
29898,
1311,
29889,
6248,
29918,
15094,
25634,
1125,
13,
9651,
2030,
29918,
1256,
29918,
1807,
353,
1583,
29889,
657,
29918,
1256,
29918,
1807,
580,
13,
9651,
1583,
29889,
842,
29918,
1256,
29918,
3166,
29918,
1807,
29898,
1191,
29961,
2435,
29898,
1311,
29889,
6248,
29918,
15094,
25634,
1125,
1822,
17010,
3101,
13,
9651,
2635,
29918,
1807,
353,
1583,
29889,
657,
29918,
1256,
29918,
1807,
580,
13,
9651,
565,
2635,
29918,
1807,
29901,
13,
18884,
736,
6864,
2111,
2450,
29898,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
6248,
29892,
2030,
29918,
1256,
29918,
1807,
29892,
2635,
29918,
1807,
511,
6213,
13,
9651,
1683,
29901,
13,
18884,
736,
6213,
29892,
6864,
2392,
29889,
6248,
29918,
11432,
13,
4706,
736,
6213,
29892,
6213,
13,
1678,
822,
6088,
29918,
2029,
29898,
1311,
29892,
1852,
1125,
13,
4706,
565,
1852,
29889,
27382,
2541,
29898,
1311,
29889,
16652,
8098,
29918,
15094,
25634,
1125,
13,
9651,
2030,
29918,
5479,
353,
1583,
29889,
5479,
13,
9651,
1583,
29889,
5479,
353,
1852,
29961,
2435,
29898,
1311,
29889,
16652,
8098,
29918,
15094,
25634,
1125,
1822,
17010,
580,
13,
9651,
736,
6864,
2111,
2450,
29898,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
16652,
29892,
2030,
29918,
5479,
29892,
1583,
29889,
5479,
511,
6213,
13,
4706,
736,
6213,
29892,
6213,
13,
1678,
822,
6088,
29918,
3257,
29898,
1311,
29892,
1852,
1125,
13,
4706,
565,
1852,
29889,
27382,
2541,
29898,
1311,
29889,
29911,
1806,
1307,
29918,
15094,
25634,
1125,
13,
9651,
2030,
29918,
3257,
353,
1583,
29889,
3257,
13,
9651,
1583,
29889,
3257,
353,
1852,
29961,
2435,
29898,
1311,
29889,
29911,
1806,
1307,
29918,
15094,
25634,
1125,
1822,
17010,
580,
13,
9651,
736,
6864,
2111,
2450,
29898,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
29911,
1806,
1307,
29892,
2030,
29918,
3257,
29892,
1583,
29889,
3257,
511,
6213,
13,
4706,
736,
6213,
29892,
6213,
13,
1678,
822,
6088,
29918,
2271,
29898,
1311,
29892,
1852,
1125,
13,
4706,
565,
1852,
29889,
27382,
2541,
29898,
1311,
29889,
4219,
29918,
15094,
25634,
1125,
13,
9651,
2030,
29918,
2271,
353,
1583,
29889,
2271,
29918,
1807,
13,
9651,
1741,
29889,
842,
29918,
2271,
29898,
1191,
29961,
2435,
29898,
1311,
29889,
4219,
29918,
15094,
25634,
1125,
1822,
17010,
3101,
13,
9651,
736,
6864,
2111,
2450,
29898,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29918,
4219,
29892,
2030,
29918,
2271,
29892,
1741,
29889,
2271,
29918,
1807,
511,
6213,
13,
4706,
736,
6213,
29892,
6213,
13,
1678,
822,
3402,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
1125,
13,
4706,
736,
285,
29915,
29912,
2543,
789,
29918,
333,
7402,
29912,
12719,
29918,
333,
10162,
13,
1678,
822,
6088,
29918,
8345,
29918,
333,
29898,
12719,
29918,
333,
29918,
710,
29901,
851,
1125,
13,
4706,
8242,
29918,
710,
29918,
6146,
1516,
353,
8242,
29918,
333,
29918,
710,
29889,
5451,
877,
29899,
1495,
13,
4706,
565,
7431,
29898,
12719,
29918,
710,
29918,
6146,
1516,
29897,
6736,
29871,
29906,
29901,
13,
9651,
736,
938,
29898,
12719,
29918,
710,
29918,
6146,
1516,
29961,
29900,
11724,
938,
29898,
12719,
29918,
710,
29918,
6146,
1516,
29961,
29896,
2314,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
29892,
6213,
13,
1678,
822,
731,
29918,
4841,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
29892,
1899,
29918,
4906,
29918,
333,
1125,
13,
4706,
1583,
29889,
2543,
789,
29918,
333,
353,
1410,
789,
29918,
333,
13,
4706,
1583,
29889,
12719,
29918,
333,
353,
8242,
29918,
333,
13,
4706,
1583,
29889,
4906,
29918,
333,
353,
2643,
29918,
333,
13,
4706,
1583,
29889,
6519,
29918,
4906,
29918,
333,
353,
1899,
29918,
4906,
29918,
333,
13,
1678,
822,
1404,
29918,
2798,
29879,
29898,
1311,
1125,
13,
4706,
3431,
29918,
2798,
353,
6213,
13,
4706,
8736,
29918,
2798,
353,
6213,
13,
4706,
565,
1583,
29889,
4906,
338,
451,
6213,
29901,
13,
9651,
3431,
29918,
2798,
353,
29871,
29900,
13,
9651,
8736,
29918,
2798,
353,
29871,
29900,
13,
9651,
363,
19848,
297,
1583,
29889,
4906,
29889,
5638,
1953,
29901,
13,
18884,
565,
19848,
29889,
15810,
2397,
1275,
1583,
29889,
1525,
24705,
29918,
8949,
29901,
13,
462,
1678,
3431,
29918,
2798,
353,
19848,
29889,
2798,
13,
462,
1678,
565,
19848,
29889,
1004,
29901,
13,
462,
4706,
3431,
29918,
2798,
22361,
29871,
29896,
13,
18884,
25342,
19848,
29889,
15810,
2397,
1275,
1583,
29889,
1525,
24705,
29918,
9312,
29901,
13,
462,
1678,
8736,
29918,
2798,
353,
19848,
29889,
2798,
13,
462,
1678,
565,
19848,
29889,
1004,
29901,
13,
462,
4706,
8736,
29918,
2798,
22361,
29871,
29896,
13,
4706,
736,
3431,
29918,
2798,
29892,
8736,
29918,
2798,
13,
1678,
822,
2643,
29918,
2271,
29898,
1311,
1125,
13,
4706,
736,
285,
29915,
991,
597,
2218,
16090,
932,
29889,
510,
29914,
305,
12629,
19248,
1311,
29889,
2543,
789,
29918,
333,
6822,
29912,
1311,
29889,
12719,
29918,
333,
6822,
29912,
1311,
29889,
4906,
29918,
333,
10162,
13,
1678,
822,
15837,
29898,
1311,
1125,
13,
4706,
9886,
29918,
16700,
29918,
1807,
353,
6629,
13,
4706,
9886,
29918,
16700,
353,
1583,
29889,
1745,
17225,
29918,
16700,
580,
13,
4706,
565,
9886,
29918,
16700,
338,
451,
6213,
29901,
13,
9651,
565,
9886,
29918,
16700,
1405,
29871,
29896,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29889,
4830,
29898,
1745,
17225,
29918,
16700,
2915,
29930,
29915,
13,
9651,
25342,
9886,
29918,
16700,
1275,
29871,
29896,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
29924,
1955,
25180,
29913,
29930,
29915,
13,
9651,
25342,
9886,
29918,
16700,
1275,
29871,
29900,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
28658,
29913,
29930,
29915,
13,
4706,
565,
1583,
29889,
4906,
338,
451,
6213,
29901,
13,
9651,
3431,
29918,
2798,
29892,
8736,
29918,
2798,
353,
1583,
29889,
1792,
29918,
2798,
29879,
580,
13,
9651,
3142,
29918,
1595,
353,
6629,
13,
9651,
565,
1583,
29889,
2271,
29918,
1807,
29901,
13,
18884,
3142,
29918,
1212,
2029,
353,
3142,
1982,
29889,
5510,
29889,
2271,
5510,
29898,
1311,
29889,
2271,
29918,
1807,
9601,
29896,
29962,
13,
18884,
3142,
29918,
1595,
353,
285,
29915,
3070,
19660,
2271,
29918,
1212,
2029,
18456,
29912,
1311,
29889,
2271,
29918,
1807,
1800,
7528,
29915,
13,
9651,
736,
285,
29915,
29961,
1068,
29912,
1311,
29889,
3257,
29913,
1068,
850,
29912,
1311,
29889,
4906,
29918,
2271,
580,
1800,
29912,
2271,
29918,
1595,
1157,
1745,
17225,
29918,
16700,
29918,
1807,
1012,
29876,
29912,
2624,
29889,
1525,
24705,
29918,
8949,
29913,
3579,
29912,
554,
29918,
2798,
29913,
1068,
29905,
29876,
29912,
2624,
29889,
1525,
24705,
29918,
9312,
29913,
3579,
29912,
865,
29918,
2798,
29913,
1068,
29915,
13,
4706,
1683,
29901,
13,
9651,
736,
285,
29915,
29961,
1068,
29912,
1311,
29889,
3257,
29913,
1068,
850,
29912,
1311,
29889,
4906,
29918,
2271,
580,
1800,
29912,
1745,
17225,
29918,
16700,
29918,
1807,
10162,
13,
1678,
822,
731,
29918,
2271,
29898,
1311,
29892,
3142,
29918,
1807,
1125,
13,
4706,
1583,
29889,
2271,
29918,
1807,
353,
3142,
29918,
1807,
13,
1678,
822,
304,
29918,
15550,
13902,
29898,
1311,
1125,
13,
4706,
7797,
13902,
353,
426,
525,
29873,
2396,
1583,
29889,
3257,
29892,
525,
29887,
2396,
1583,
29889,
2543,
789,
29918,
333,
29892,
525,
29883,
2396,
1583,
29889,
12719,
29918,
333,
29892,
525,
29885,
2396,
1583,
29889,
4906,
29918,
333,
29892,
525,
4912,
2396,
1583,
29889,
6519,
29918,
4906,
29918,
333,
500,
13,
4706,
565,
1583,
29889,
2271,
29918,
1807,
29901,
13,
9651,
7797,
13902,
1839,
2271,
2033,
353,
1583,
29889,
2271,
29918,
1807,
13,
4706,
565,
1583,
29889,
8216,
29901,
13,
9651,
7797,
13902,
1839,
14273,
2033,
353,
1583,
29889,
8216,
13,
4706,
565,
1583,
29889,
5479,
29901,
13,
9651,
7797,
13902,
1839,
2029,
2033,
353,
1583,
29889,
5479,
13,
4706,
2635,
353,
1583,
29889,
657,
29918,
1256,
29918,
1807,
580,
13,
4706,
565,
2635,
29901,
13,
9651,
7797,
13902,
1839,
1256,
2033,
353,
2635,
13,
4706,
565,
1583,
29889,
2271,
29918,
386,
21145,
29901,
13,
9651,
7797,
13902,
1839,
386,
2033,
353,
1583,
29889,
2271,
29918,
386,
21145,
13,
4706,
565,
1583,
29889,
13492,
29918,
1792,
29918,
333,
29901,
13,
9651,
7797,
13902,
1839,
283,
333,
2033,
353,
1583,
29889,
13492,
29918,
1792,
29918,
333,
13,
4706,
736,
7797,
13902,
13,
1678,
822,
515,
29918,
2783,
261,
616,
13902,
29898,
2783,
261,
616,
13902,
1125,
13,
4706,
1018,
29901,
13,
9651,
565,
6702,
29887,
29915,
297,
16964,
616,
13902,
29897,
322,
6702,
29883,
29915,
297,
16964,
616,
13902,
29897,
322,
6702,
29885,
29915,
297,
16964,
616,
13902,
29897,
322,
6702,
29873,
29915,
297,
16964,
616,
13902,
1125,
13,
18884,
1741,
353,
6864,
29898,
710,
29898,
2783,
261,
616,
13902,
1839,
29873,
25901,
13,
18884,
1410,
789,
29918,
333,
353,
938,
29898,
2783,
261,
616,
13902,
1839,
29887,
11287,
13,
18884,
8242,
29918,
333,
353,
938,
29898,
2783,
261,
616,
13902,
1839,
29883,
11287,
13,
18884,
2643,
29918,
333,
353,
938,
29898,
2783,
261,
616,
13902,
1839,
29885,
11287,
13,
18884,
1899,
29918,
4906,
29918,
333,
353,
938,
29898,
2783,
261,
616,
13902,
1839,
4912,
11287,
13,
18884,
1741,
29889,
842,
29918,
4841,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
29892,
1899,
29918,
4906,
29918,
333,
29897,
13,
18884,
565,
525,
2271,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
842,
29918,
2271,
29898,
2783,
261,
616,
13902,
1839,
2271,
11287,
13,
18884,
565,
525,
8216,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
8216,
353,
16964,
616,
13902,
1839,
8216,
2033,
13,
18884,
565,
525,
1256,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
842,
29918,
1256,
29918,
3166,
29918,
1807,
29898,
2783,
261,
616,
13902,
1839,
1256,
11287,
13,
18884,
565,
525,
386,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
2271,
29918,
386,
21145,
353,
851,
29898,
2783,
261,
616,
13902,
1839,
386,
11287,
13,
18884,
565,
525,
2029,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
5479,
353,
851,
29898,
2783,
261,
616,
13902,
1839,
2029,
11287,
13,
18884,
565,
525,
283,
333,
29915,
297,
16964,
616,
13902,
29901,
13,
462,
1678,
1741,
29889,
13492,
29918,
1792,
29918,
333,
353,
938,
29898,
2783,
261,
616,
13902,
1839,
283,
333,
11287,
13,
18884,
736,
1741,
13,
4706,
5174,
8960,
408,
4589,
29901,
13,
9651,
1596,
29898,
29888,
29915,
2392,
16964,
616,
5281,
1741,
29901,
426,
3126,
29889,
15070,
29898,
2783,
261,
616,
13902,
2915,
29901,
426,
3127,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
4706,
736,
6213,
13,
1678,
822,
731,
29918,
1256,
29918,
3166,
29918,
1807,
29898,
1311,
29892,
2635,
29918,
1807,
1125,
13,
4706,
1583,
29889,
1256,
353,
6213,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
1256,
353,
12865,
29889,
12673,
29889,
710,
415,
603,
29898,
1256,
29918,
1807,
29892,
1583,
29889,
6248,
29918,
19094,
1299,
29897,
13,
4706,
5174,
8960,
408,
4589,
29901,
13,
9651,
1596,
29898,
29888,
29915,
2392,
5183,
2635,
1347,
426,
1256,
29918,
1807,
6177,
426,
3127,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
4706,
1583,
29889,
1256,
353,
1583,
29889,
1256,
29889,
6506,
29898,
18721,
29922,
29896,
29896,
29892,
11015,
29922,
29945,
29929,
29897,
13,
1678,
822,
679,
29918,
1256,
29918,
1807,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
1256,
29901,
13,
9651,
736,
1583,
29889,
1256,
29889,
710,
615,
603,
29898,
1311,
29889,
6248,
29918,
19094,
1299,
29897,
13,
4706,
736,
6213,
13,
1678,
822,
5706,
29918,
1256,
29918,
1199,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
1256,
29901,
13,
9651,
1208,
353,
29871,
1199,
29889,
17447,
580,
13,
9651,
1208,
29918,
3696,
353,
29871,
1199,
29889,
2624,
580,
13,
9651,
1208,
29918,
3696,
29889,
978,
353,
1583,
29889,
3257,
13,
9651,
1208,
29918,
3696,
29889,
463,
353,
1583,
29889,
1256,
13,
9651,
1208,
29918,
3696,
29889,
11600,
353,
12865,
29889,
12673,
29889,
27765,
580,
13,
9651,
1208,
29918,
3696,
29889,
8216,
353,
1583,
29889,
8216,
13,
9651,
1208,
29918,
3696,
29889,
5479,
353,
1583,
29889,
5479,
13,
9651,
565,
1583,
29889,
2271,
29918,
1807,
29901,
13,
18884,
1208,
29918,
3696,
29889,
2271,
353,
1583,
29889,
2271,
29918,
1807,
13,
9651,
1208,
29918,
3696,
29889,
5675,
29918,
497,
29918,
3250,
580,
13,
9651,
1208,
29889,
13604,
29889,
1202,
29898,
1052,
29918,
3696,
29897,
13,
632,
1199,
29918,
14834,
29918,
9040,
353,
12013,
29889,
1231,
5971,
580,
13,
632,
1199,
29918,
14834,
29918,
9040,
29889,
8231,
24210,
29898,
1052,
29897,
13,
632,
1199,
29918,
14834,
29918,
9040,
29889,
344,
1416,
29898,
29900,
29892,
29871,
29900,
29897,
13,
9651,
736,
29871,
1199,
29918,
14834,
29918,
9040,
13,
4706,
736,
6213,
13,
1678,
7465,
822,
5706,
29918,
2218,
16090,
29918,
17987,
29898,
1311,
1125,
13,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
28577,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
1311,
29889,
3257,
511,
13,
9651,
1134,
353,
525,
4018,
742,
13,
9651,
6139,
353,
1583,
29889,
8216,
13,
4706,
1723,
13,
4706,
565,
1583,
29889,
13492,
29918,
1792,
29918,
333,
29901,
13,
9651,
2441,
29918,
1792,
353,
9225,
29889,
657,
29918,
1792,
29898,
1311,
29889,
13492,
29918,
1792,
29918,
333,
29897,
13,
9651,
565,
2441,
29918,
1792,
29901,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
3035,
2287,
29928,
29918,
22716,
29892,
995,
353,
2441,
29918,
1792,
29889,
358,
291,
29897,
13,
4706,
565,
1583,
29889,
1256,
29901,
13,
9651,
9886,
29918,
16700,
29918,
1807,
353,
6629,
13,
9651,
9886,
29918,
16700,
353,
1583,
29889,
1745,
17225,
29918,
16700,
580,
13,
9651,
565,
9886,
29918,
16700,
1405,
29871,
29896,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29889,
4830,
29898,
1745,
17225,
29918,
16700,
2915,
29930,
29915,
13,
9651,
25342,
9886,
29918,
16700,
1275,
29871,
29896,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
29924,
1955,
25180,
29913,
29930,
29915,
13,
9651,
25342,
9886,
29918,
16700,
1275,
29871,
29900,
29901,
13,
18884,
9886,
29918,
16700,
29918,
1807,
353,
285,
29915,
334,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
28658,
29913,
29930,
29915,
13,
9651,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
1583,
29889,
657,
29918,
1256,
29918,
1807,
3285,
995,
353,
9886,
29918,
16700,
29918,
1807,
29889,
5030,
2410,
675,
3101,
13,
4706,
565,
1583,
29889,
2271,
29918,
1807,
29901,
13,
9651,
8297,
29889,
2271,
353,
1583,
29889,
2271,
29918,
1807,
13,
4706,
565,
1583,
29889,
5479,
2804,
525,
2396,
13,
9651,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
16652,
8098,
29892,
995,
353,
1583,
29889,
5479,
29897,
13,
4706,
565,
1583,
29889,
4906,
29901,
13,
9651,
7272,
1583,
29889,
17158,
29918,
1202,
29918,
554,
29918,
865,
29918,
17987,
29918,
9621,
29898,
17987,
29897,
13,
4706,
565,
1583,
29889,
2271,
29918,
386,
21145,
29901,
13,
9651,
8297,
29889,
842,
29918,
386,
21145,
29898,
2271,
353,
1583,
29889,
2271,
29918,
386,
21145,
29897,
13,
4706,
736,
8297,
13,
1678,
7465,
822,
3431,
29918,
7193,
29898,
1311,
1125,
13,
4706,
4160,
353,
5159,
13,
4706,
363,
19848,
297,
1583,
29889,
4906,
29889,
5638,
1953,
29901,
13,
9651,
565,
19848,
29889,
15810,
2397,
1275,
1583,
29889,
1525,
24705,
29918,
8949,
29901,
13,
18884,
7465,
363,
1404,
297,
19848,
29889,
7193,
7295,
13,
462,
1678,
565,
1404,
2804,
9225,
29889,
1792,
29901,
13,
462,
4706,
4160,
29889,
4397,
29898,
1792,
29897,
13,
4706,
736,
4160,
13,
1678,
7465,
822,
8736,
29918,
7193,
29898,
1311,
1125,
13,
4706,
4160,
353,
5159,
13,
4706,
363,
19848,
297,
1583,
29889,
4906,
29889,
5638,
1953,
29901,
13,
9651,
565,
19848,
29889,
15810,
2397,
1275,
1583,
29889,
1525,
24705,
29918,
9312,
29901,
13,
18884,
7465,
363,
1404,
297,
19848,
29889,
7193,
7295,
13,
462,
1678,
565,
1404,
2804,
9225,
29889,
1792,
29901,
13,
462,
4706,
4160,
29889,
4397,
29898,
1792,
29897,
13,
4706,
736,
4160,
13,
1678,
7465,
822,
5706,
29918,
1202,
29918,
554,
29918,
865,
29918,
17987,
29918,
9621,
29898,
1311,
29892,
8297,
1125,
13,
4706,
3431,
29918,
2798,
29892,
8736,
29918,
2798,
353,
1583,
29889,
1792,
29918,
2798,
29879,
580,
13,
4706,
565,
313,
554,
29918,
2798,
322,
313,
554,
29918,
2798,
1405,
29871,
29900,
876,
470,
313,
865,
29918,
2798,
322,
313,
865,
29918,
2798,
1405,
29871,
29900,
22164,
13,
9651,
3431,
29918,
358,
1080,
353,
518,
1792,
29889,
358,
291,
363,
1404,
297,
7272,
1583,
29889,
554,
29918,
7193,
580,
29962,
13,
9651,
8736,
29918,
358,
1080,
353,
518,
1792,
29889,
358,
291,
363,
1404,
297,
7272,
1583,
29889,
865,
29918,
7193,
580,
29962,
13,
9651,
565,
3431,
29918,
2798,
1405,
29871,
29900,
29901,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
24360,
29918,
27047,
29889,
4830,
29898,
1311,
29889,
1525,
24705,
29918,
8949,
29892,
3431,
29918,
2798,
511,
995,
353,
11297,
29876,
4286,
7122,
29898,
554,
29918,
358,
1080,
876,
13,
9651,
565,
8736,
29918,
2798,
1405,
29871,
29900,
29901,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
24360,
29918,
27047,
29889,
4830,
29898,
1311,
29889,
1525,
24705,
29918,
8949,
29892,
8736,
29918,
2798,
511,
995,
353,
11297,
29876,
4286,
7122,
29898,
865,
29918,
358,
1080,
876,
13,
1678,
7465,
822,
731,
29918,
4906,
29898,
1311,
29892,
2643,
1125,
13,
4706,
1583,
29889,
4906,
353,
2643,
13,
4706,
396,
7641,
278,
2643,
13,
4706,
8297,
353,
7272,
1583,
29889,
17158,
29918,
2218,
16090,
29918,
17987,
580,
13,
4706,
7272,
2643,
29889,
5628,
29898,
17987,
353,
8297,
29897,
13,
1678,
822,
9826,
29898,
1311,
1125,
13,
4706,
736,
12865,
29889,
12673,
29889,
17743,
457,
29898,
12673,
29889,
12673,
29889,
27765,
3285,
12865,
29889,
2230,
29898,
18721,
353,
1583,
29889,
1256,
29889,
18721,
29892,
11015,
353,
1583,
29889,
1256,
29889,
1195,
1082,
29892,
1473,
353,
1583,
29889,
1256,
29889,
7496,
29892,
9200,
7496,
353,
1583,
29889,
1256,
29889,
29885,
2357,
7496,
29892,
260,
29920,
3888,
353,
1583,
29889,
1256,
29889,
17559,
3888,
876,
13,
1678,
822,
1603,
29918,
4925,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
1256,
29901,
13,
9651,
9826,
353,
1583,
29889,
27765,
580,
13,
9651,
19471,
353,
1583,
29889,
1256,
448,
9826,
13,
9651,
736,
938,
29898,
4181,
29889,
16700,
29897,
6736,
29871,
29900,
13,
4706,
1683,
29901,
13,
9651,
736,
5852,
13,
1678,
822,
9886,
29918,
16700,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
1256,
29901,
13,
9651,
9826,
353,
1583,
29889,
27765,
580,
13,
9651,
19471,
353,
1583,
29889,
1256,
448,
9826,
13,
9651,
736,
938,
29898,
4181,
29889,
16700,
29897,
13,
4706,
736,
6213,
13,
1678,
7465,
822,
11086,
29918,
4906,
29898,
1311,
29892,
2313,
536,
29918,
4906,
519,
1125,
13,
4706,
2643,
353,
7272,
2313,
536,
29918,
4906,
519,
29889,
9155,
29918,
4906,
29898,
524,
29898,
1311,
29889,
4906,
29918,
333,
876,
13,
4706,
565,
2643,
29901,
13,
9651,
7272,
1583,
29889,
842,
29918,
4906,
29898,
4906,
29897,
13,
9651,
736,
2643,
13,
4706,
736,
6213,
13,
13,
1990,
22354,
1171,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9225,
29901,
8260,
29889,
29933,
327,
1125,
13,
4706,
1583,
29889,
7451,
353,
9225,
13,
4706,
1583,
29889,
1267,
420,
29918,
24622,
29918,
262,
353,
5159,
13,
4706,
1583,
29889,
13604,
29918,
24622,
29918,
262,
353,
5159,
13,
4706,
1583,
29889,
13604,
353,
6571,
13,
4706,
1583,
29889,
2917,
29918,
9507,
353,
8707,
18667,
29918,
7724,
5813,
13,
4706,
1583,
29889,
1272,
29918,
9507,
353,
360,
8254,
29918,
7249,
29918,
7724,
5813,
13,
4706,
1583,
29889,
5992,
29918,
1267,
420,
29918,
26381,
353,
7700,
13,
4706,
1583,
29889,
5992,
29918,
3696,
29918,
26381,
353,
7700,
13,
4706,
1583,
29889,
2344,
29918,
816,
11272,
580,
13,
1678,
822,
2254,
29918,
2917,
29898,
1311,
1125,
13,
4706,
411,
1722,
29898,
1311,
29889,
2917,
29918,
9507,
29892,
525,
29878,
1495,
408,
2295,
29918,
1445,
29901,
13,
9651,
848,
353,
343,
8807,
29889,
11177,
29918,
1359,
29898,
2917,
29918,
1445,
29897,
13,
9651,
565,
525,
2218,
16090,
29918,
2754,
29918,
6979,
29915,
451,
297,
848,
29901,
13,
18884,
1596,
29898,
29888,
29915,
2392,
29901,
426,
1311,
29889,
2917,
29918,
9507,
29913,
947,
451,
4529,
278,
1820,
376,
6979,
29908,
1495,
13,
9651,
1583,
29889,
6979,
353,
848,
1839,
2218,
16090,
29918,
2754,
29918,
6979,
2033,
13,
9651,
565,
525,
1267,
420,
29918,
24622,
29918,
262,
29915,
297,
848,
29901,
13,
18884,
1583,
29889,
1267,
420,
29918,
24622,
29918,
262,
353,
518,
13438,
29889,
3166,
29918,
1807,
29898,
2042,
29918,
1807,
29897,
363,
4004,
29918,
1807,
297,
848,
1839,
1267,
420,
29918,
24622,
29918,
262,
2033,
29962,
13,
9651,
565,
525,
13604,
29918,
24622,
29918,
262,
29915,
297,
848,
29901,
13,
18884,
1583,
29889,
13604,
29918,
24622,
29918,
262,
353,
518,
13438,
29889,
3166,
29918,
1807,
29898,
2042,
29918,
1807,
29897,
363,
4004,
29918,
1807,
297,
848,
1839,
13604,
29918,
24622,
29918,
262,
2033,
29962,
13,
9651,
565,
525,
5992,
29918,
1267,
420,
29918,
26381,
29915,
297,
848,
29901,
13,
18884,
1583,
29889,
5992,
29918,
1267,
420,
29918,
26381,
353,
6120,
29898,
1272,
1839,
5992,
29918,
1267,
420,
29918,
26381,
11287,
13,
9651,
565,
525,
5992,
29918,
3696,
29918,
26381,
29915,
297,
848,
29901,
13,
18884,
1583,
29889,
5992,
29918,
3696,
29918,
26381,
353,
6120,
29898,
1272,
1839,
5992,
29918,
3696,
29918,
26381,
11287,
13,
1678,
822,
2254,
29918,
1272,
29898,
1311,
1125,
13,
4706,
1053,
2897,
29889,
2084,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
1272,
29918,
9507,
1125,
13,
9651,
411,
1722,
29898,
1311,
29889,
1272,
29918,
9507,
29892,
525,
29878,
1495,
408,
848,
29918,
1445,
29901,
13,
18884,
848,
29918,
3126,
353,
4390,
29889,
1359,
29898,
1272,
29918,
1445,
29897,
13,
18884,
565,
848,
29918,
3126,
338,
451,
6213,
29901,
13,
462,
1678,
565,
525,
13604,
29915,
297,
848,
29918,
3126,
29901,
13,
462,
4706,
1583,
29889,
13604,
353,
6571,
13,
462,
4706,
363,
8242,
29918,
333,
29918,
1989,
29892,
1741,
29918,
1761,
29918,
3126,
297,
848,
29918,
3126,
1839,
13604,
13359,
7076,
7295,
13,
462,
9651,
1583,
29889,
13604,
29961,
12719,
29918,
333,
29918,
1989,
29962,
353,
5159,
13,
462,
9651,
363,
1741,
29918,
3126,
297,
1741,
29918,
1761,
29918,
3126,
29901,
13,
462,
18884,
1741,
353,
6864,
29889,
3166,
29918,
2783,
261,
616,
13902,
29898,
3696,
29918,
3126,
29897,
13,
462,
18884,
1596,
29898,
29888,
29915,
4002,
261,
616,
1891,
1741,
426,
3696,
29889,
3257,
29913,
1495,
13,
462,
18884,
565,
1741,
338,
451,
6213,
29901,
13,
462,
462,
1678,
1583,
29889,
13604,
29961,
12719,
29918,
333,
29918,
1989,
1822,
4397,
29898,
3696,
29897,
13,
462,
462,
1678,
1596,
29898,
29888,
29915,
2528,
287,
1741,
426,
3696,
29889,
3257,
29913,
304,
426,
12719,
29918,
333,
29918,
1989,
29913,
1495,
13,
1678,
822,
4078,
29918,
1272,
29898,
1311,
1125,
13,
4706,
848,
29918,
3126,
353,
6571,
13,
4706,
848,
29918,
3126,
1839,
13604,
2033,
353,
6571,
13,
4706,
363,
8242,
29918,
333,
29918,
1989,
29892,
1741,
29918,
1761,
297,
1583,
29889,
13604,
29889,
7076,
7295,
13,
9651,
1741,
29918,
1761,
29918,
3126,
353,
5159,
13,
9651,
565,
1741,
29918,
1761,
338,
451,
6213,
29901,
13,
18884,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
462,
1678,
1741,
29918,
1761,
29918,
3126,
29889,
4397,
29898,
3696,
29889,
517,
29918,
15550,
13902,
3101,
13,
18884,
848,
29918,
3126,
1839,
13604,
2033,
29961,
710,
29898,
12719,
29918,
333,
29918,
1989,
4638,
353,
1741,
29918,
1761,
29918,
3126,
13,
4706,
411,
1722,
29898,
1311,
29889,
1272,
29918,
9507,
29892,
525,
29893,
1495,
408,
848,
29918,
1445,
29901,
13,
9651,
4390,
29889,
15070,
29898,
1272,
29918,
3126,
29892,
848,
29918,
1445,
29897,
13,
1678,
822,
788,
29918,
3696,
29898,
1311,
29892,
1741,
1125,
13,
4706,
565,
313,
3696,
29889,
2543,
789,
29918,
333,
338,
451,
6213,
29897,
322,
313,
3696,
29889,
12719,
29918,
333,
338,
451,
6213,
29897,
322,
313,
3696,
29889,
4906,
29918,
333,
338,
451,
6213,
1125,
13,
9651,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
3696,
29889,
2543,
789,
29918,
333,
29892,
1741,
29889,
12719,
29918,
333,
29897,
13,
9651,
565,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
338,
6213,
29901,
13,
18884,
1583,
29889,
13604,
29961,
333,
29918,
710,
29962,
353,
5159,
13,
9651,
1583,
29889,
13604,
29961,
333,
29918,
710,
1822,
4397,
29898,
3696,
29897,
13,
9651,
1583,
29889,
7620,
29918,
1272,
580,
13,
1678,
822,
2821,
29918,
13604,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29897,
13,
4706,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
1583,
29889,
13604,
29961,
333,
29918,
710,
29962,
353,
6213,
13,
4706,
1583,
29889,
7620,
29918,
1272,
580,
13,
4706,
736,
1741,
29918,
1761,
13,
1678,
822,
679,
29918,
3696,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29897,
13,
4706,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
565,
1741,
29918,
1761,
29901,
13,
9651,
736,
518,
3696,
363,
1741,
297,
1741,
29918,
1761,
565,
313,
3696,
29889,
4906,
29918,
333,
1275,
2643,
29918,
333,
4638,
13,
1678,
822,
679,
29918,
13604,
29918,
1609,
29918,
3257,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
1741,
29918,
3257,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29897,
13,
4706,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
9651,
565,
1741,
29889,
3257,
29889,
17010,
580,
1275,
1741,
29918,
3257,
29889,
17010,
7295,
13,
18884,
7709,
1741,
13,
1678,
822,
5217,
29918,
13604,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
1741,
29918,
3257,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29897,
13,
4706,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
11132,
29918,
13604,
353,
5159,
13,
4706,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
9651,
565,
1741,
29889,
3257,
1275,
1741,
29918,
3257,
29901,
13,
18884,
11132,
29918,
13604,
29889,
4397,
29898,
3696,
29897,
13,
4706,
363,
1741,
297,
11132,
29918,
13604,
29901,
13,
9651,
1741,
29918,
1761,
29889,
5992,
29898,
3696,
29897,
13,
9651,
1596,
29898,
29888,
29915,
7301,
8238,
1741,
426,
3696,
29889,
3257,
29913,
515,
426,
333,
29918,
710,
29913,
1495,
13,
9651,
7709,
1741,
13,
1678,
7465,
822,
11086,
29918,
12719,
29918,
13604,
29898,
1311,
29892,
8242,
1125,
13,
4706,
565,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
9651,
1410,
789,
353,
8242,
29889,
2543,
789,
13,
9651,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29897,
13,
9651,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
9651,
565,
1741,
29918,
1761,
338,
451,
6213,
29901,
13,
18884,
1596,
29898,
29888,
29915,
5620,
690,
2790,
1741,
1051,
363,
426,
333,
29918,
710,
29913,
1495,
13,
18884,
4959,
29918,
517,
29918,
8143,
353,
5159,
13,
18884,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
462,
1678,
565,
1741,
29889,
303,
453,
29918,
4925,
7295,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
4706,
5174,
2313,
536,
29889,
17413,
29901,
13,
462,
9651,
1596,
29898,
29888,
29915,
3728,
426,
3696,
29889,
4906,
29918,
333,
29913,
451,
1476,
29892,
21228,
1741,
426,
3696,
29889,
3257,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
462,
9651,
4959,
29918,
517,
29918,
8143,
29889,
4397,
29898,
3696,
29897,
13,
462,
4706,
5174,
8960,
408,
4589,
29901,
13,
462,
9651,
1596,
29898,
29888,
29915,
2392,
2143,
690,
2790,
4959,
363,
2643,
426,
3696,
29889,
4906,
29918,
333,
6177,
426,
3127,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
4959,
29918,
517,
29918,
8143,
29889,
4397,
29898,
3696,
29897,
13,
18884,
363,
1741,
297,
4959,
29918,
517,
29918,
8143,
29901,
13,
462,
1678,
1596,
29898,
29888,
29915,
7301,
8238,
1741,
426,
3696,
29889,
3257,
29913,
515,
426,
333,
29918,
710,
29913,
1495,
13,
462,
1678,
1741,
29918,
1761,
29889,
5992,
29898,
3696,
29897,
13,
18884,
1583,
29889,
7620,
29918,
1272,
580,
13,
1678,
822,
679,
29918,
12719,
29918,
3166,
29918,
4841,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
871,
29918,
361,
29918,
3068,
29918,
6717,
353,
7700,
1125,
13,
4706,
8242,
353,
1583,
29889,
7451,
29889,
657,
29918,
12719,
29898,
12719,
29918,
333,
29897,
13,
4706,
565,
8242,
322,
5135,
1333,
871,
29918,
361,
29918,
3068,
29918,
6717,
29897,
470,
8242,
29889,
17858,
6847,
29918,
1454,
29898,
12719,
29889,
2543,
789,
29889,
1004,
467,
6717,
29918,
19158,
1125,
13,
9651,
736,
8242,
13,
4706,
736,
6213,
13,
1678,
7465,
822,
373,
29918,
3696,
29918,
4906,
29918,
8143,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29897,
13,
4706,
1741,
29918,
1761,
353,
1583,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
565,
1741,
29918,
1761,
29901,
13,
9651,
16285,
29918,
517,
29918,
5992,
353,
5159,
13,
9651,
4959,
29918,
517,
29918,
8143,
353,
518,
3696,
363,
1741,
297,
1741,
29918,
1761,
565,
1741,
29889,
4906,
29918,
333,
1275,
2643,
29918,
333,
29962,
13,
9651,
565,
7431,
29898,
13604,
29918,
517,
29918,
8143,
29897,
1405,
29871,
29900,
29901,
13,
18884,
363,
1741,
297,
4959,
29918,
517,
29918,
8143,
29901,
13,
462,
1678,
1741,
29918,
1761,
29889,
5992,
29898,
3696,
29897,
13,
18884,
1583,
29889,
7620,
29918,
1272,
580,
13,
18884,
8242,
353,
1583,
29889,
657,
29918,
12719,
29918,
3166,
29918,
4841,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
871,
29918,
361,
29918,
3068,
29918,
6717,
353,
5852,
29897,
13,
18884,
565,
8242,
29901,
13,
462,
1678,
363,
1741,
297,
4959,
29918,
517,
29918,
8143,
29901,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
29911,
1806,
1307,
29892,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
2287,
7187,
29889,
4830,
29898,
3696,
29889,
3257,
876,
13,
462,
4706,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
1678,
7465,
822,
373,
29918,
3696,
29918,
276,
2467,
29918,
1202,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
29892,
1404,
29918,
333,
29892,
953,
29877,
2397,
1125,
13,
4706,
565,
1404,
29918,
333,
2804,
1583,
29889,
7451,
29889,
1792,
29889,
333,
322,
953,
29877,
2397,
29889,
978,
297,
6864,
29889,
1525,
24705,
29903,
29901,
13,
9651,
8242,
353,
1583,
29889,
657,
29918,
12719,
29918,
3166,
29918,
4841,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
871,
29918,
361,
29918,
3068,
29918,
6717,
353,
5852,
29897,
13,
9651,
565,
8242,
29901,
13,
18884,
363,
1741,
297,
1583,
29889,
657,
29918,
3696,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
1125,
13,
462,
1678,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
1678,
4509,
353,
9225,
29889,
657,
29918,
2543,
789,
29898,
2543,
789,
29918,
333,
467,
657,
29918,
14242,
29898,
1792,
29918,
333,
29897,
13,
462,
1678,
565,
4509,
29901,
13,
462,
4706,
5153,
29918,
4906,
353,
6213,
13,
462,
4706,
565,
953,
29877,
2397,
29889,
978,
1275,
6864,
29889,
1525,
24705,
29918,
8949,
29901,
13,
462,
9651,
5153,
29918,
4906,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
17923,
29918,
8949,
13,
462,
4706,
25342,
953,
29877,
2397,
29889,
978,
1275,
6864,
29889,
1525,
24705,
29918,
9312,
29901,
13,
462,
9651,
5153,
29918,
4906,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
17923,
29918,
9312,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
13,
462,
9651,
3611,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
17923,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
3696,
29889,
3257,
511,
13,
462,
9651,
6139,
353,
5153,
29918,
4906,
29889,
4830,
29898,
14242,
29889,
358,
291,
29892,
1741,
29889,
3257,
29892,
1741,
29889,
4906,
29918,
2271,
3101,
13,
462,
4706,
1723,
13,
462,
4706,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
1678,
7465,
822,
373,
29918,
3696,
29918,
276,
2467,
29918,
5992,
29898,
1311,
29892,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
29892,
1404,
29918,
333,
29892,
953,
29877,
2397,
1125,
13,
4706,
565,
1404,
29918,
333,
2804,
1583,
29889,
7451,
29889,
1792,
29889,
333,
322,
953,
29877,
2397,
29889,
978,
297,
6864,
29889,
1525,
24705,
29903,
29901,
13,
9651,
8242,
353,
1583,
29889,
657,
29918,
12719,
29918,
3166,
29918,
4841,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
871,
29918,
361,
29918,
3068,
29918,
6717,
353,
5852,
29897,
13,
9651,
565,
8242,
29901,
13,
18884,
363,
1741,
297,
1583,
29889,
657,
29918,
3696,
29898,
2543,
789,
29918,
333,
29892,
8242,
29918,
333,
29892,
2643,
29918,
333,
1125,
13,
462,
1678,
396,
565,
727,
526,
694,
901,
337,
7387,
310,
445,
953,
29877,
2397,
769,
788,
372,
1250,
13,
462,
1678,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
1678,
565,
953,
29877,
2397,
29889,
978,
1275,
6864,
29889,
1525,
24705,
29918,
8949,
29901,
13,
462,
4706,
4509,
353,
9225,
29889,
657,
29918,
2543,
789,
29898,
2543,
789,
29918,
333,
467,
657,
29918,
14242,
29898,
1792,
29918,
333,
29897,
13,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
13,
462,
9651,
3611,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
17923,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
3696,
29889,
3257,
511,
13,
462,
9651,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
17923,
29918,
9312,
29889,
4830,
29898,
14242,
29889,
358,
291,
29892,
1741,
29889,
3257,
29892,
1741,
29889,
4906,
29918,
2271,
3101,
13,
462,
4706,
1723,
13,
462,
4706,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
1678,
396,
931,
310,
2462,
363,
1083,
513,
414,
13,
1678,
317,
3210,
3352,
29965,
1307,
29918,
15307,
353,
12865,
29889,
2230,
29898,
18721,
29922,
29929,
29897,
13,
1678,
382,
29963,
3919,
29918,
7698,
21554,
353,
518,
13,
4706,
313,
29955,
29892,
285,
29915,
29912,
4300,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29889,
4830,
29898,
29955,
2915,
5477,
13,
4706,
313,
29896,
29892,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
29924,
1955,
25180,
511,
13,
4706,
313,
29900,
29892,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
11690,
29918,
1525,
29032,
4214,
29918,
7698,
21554,
29918,
4986,
28658,
511,
13,
1678,
4514,
13,
1678,
822,
2069,
29918,
816,
11272,
29898,
1311,
1125,
13,
4706,
1286,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
4706,
1583,
29889,
4622,
29918,
816,
11272,
353,
12865,
29889,
12673,
29889,
17743,
457,
29898,
12673,
29889,
12673,
29889,
27765,
3285,
1583,
29889,
29903,
3210,
3352,
29965,
1307,
29918,
15307,
29897,
13,
4706,
565,
1286,
1405,
1583,
29889,
4622,
29918,
816,
11272,
29901,
13,
9651,
1583,
29889,
4622,
29918,
816,
11272,
4619,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
29896,
29897,
13,
1678,
7465,
822,
4959,
29918,
816,
14989,
29918,
9057,
29898,
1311,
1125,
13,
4706,
7272,
1583,
29889,
7451,
29889,
10685,
29918,
29305,
29918,
2040,
580,
13,
4706,
565,
451,
1583,
29889,
7451,
29889,
275,
29918,
15603,
7295,
13,
9651,
1286,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
9651,
565,
313,
3707,
6736,
1583,
29889,
4622,
29918,
816,
11272,
1125,
13,
18884,
1596,
29898,
29888,
29915,
27795,
21467,
4959,
1423,
1495,
13,
18884,
1583,
29889,
4230,
29918,
816,
11272,
353,
1286,
13,
18884,
1583,
29889,
4622,
29918,
816,
11272,
353,
12865,
29889,
12673,
29889,
17743,
457,
29898,
12673,
29889,
12673,
29889,
27765,
580,
718,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
29896,
511,
1583,
29889,
29903,
3210,
3352,
29965,
1307,
29918,
15307,
29897,
13,
18884,
1596,
29898,
29888,
29915,
9190,
20410,
29901,
426,
1311,
29889,
4622,
29918,
816,
11272,
29913,
1495,
13,
18884,
363,
8242,
29918,
333,
29918,
1989,
29892,
1741,
29918,
1761,
297,
1583,
29889,
13604,
29889,
7076,
7295,
13,
462,
1678,
1410,
789,
29918,
333,
29892,
8242,
29918,
333,
353,
6864,
29889,
5510,
29918,
8345,
29918,
333,
29898,
12719,
29918,
333,
29918,
1989,
29897,
13,
462,
1678,
565,
1410,
789,
29918,
333,
322,
8242,
29918,
333,
29901,
13,
462,
4706,
8242,
353,
1583,
29889,
7451,
29889,
657,
29918,
12719,
29898,
12719,
29918,
333,
29897,
13,
462,
4706,
565,
8242,
29901,
13,
462,
9651,
363,
3841,
29918,
1745,
17225,
29892,
1741,
29918,
1256,
29918,
4906,
297,
1583,
29889,
22240,
3919,
29918,
7698,
21554,
29901,
13,
462,
18884,
4959,
29918,
517,
29918,
2763,
353,
5159,
13,
462,
18884,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
462,
462,
1678,
1018,
29901,
13,
462,
462,
4706,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
462,
4706,
565,
1741,
29889,
1745,
17225,
29918,
16700,
580,
1275,
3841,
29918,
1745,
17225,
29901,
13,
462,
462,
9651,
4959,
29918,
517,
29918,
2763,
29889,
4397,
29898,
3696,
29897,
13,
462,
462,
9651,
1596,
29898,
29888,
29915,
2624,
297,
426,
16700,
29918,
1745,
17225,
29913,
2462,
29898,
29879,
29897,
15974,
3696,
29918,
1256,
29918,
4906,
29913,
5387,
29850,
3696,
29889,
3257,
5038,
1495,
13,
462,
462,
1678,
5174,
2313,
536,
29889,
17413,
29901,
13,
462,
462,
4706,
1596,
29898,
29888,
29915,
3728,
426,
3696,
29889,
4906,
29918,
333,
29913,
21313,
3696,
29889,
3257,
1800,
451,
1476,
29892,
5330,
8253,
363,
21467,
1423,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
462,
18884,
565,
7431,
29898,
13604,
29918,
517,
29918,
2763,
29897,
1405,
29871,
29900,
29901,
13,
462,
462,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
1525,
16173,
8032,
29918,
29911,
1806,
1307,
29892,
13,
462,
462,
9651,
1134,
353,
525,
4018,
29915,
13,
462,
462,
4706,
1723,
13,
462,
462,
4706,
363,
1741,
297,
4959,
29918,
517,
29918,
2763,
29901,
13,
462,
462,
9651,
3431,
29918,
358,
1080,
353,
518,
1792,
29889,
358,
291,
363,
1404,
297,
7272,
1741,
29889,
554,
29918,
7193,
580,
29962,
13,
462,
462,
9651,
3431,
29918,
358,
1080,
29918,
1807,
353,
11297,
29876,
4286,
7122,
29898,
554,
29918,
358,
1080,
29897,
13,
462,
462,
9651,
565,
7431,
29898,
554,
29918,
358,
1080,
29918,
1807,
29897,
1405,
29871,
29900,
29901,
13,
462,
462,
18884,
3431,
29918,
358,
1080,
29918,
1807,
353,
11297,
29876,
29915,
718,
3431,
29918,
358,
1080,
29918,
1807,
13,
462,
462,
9651,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
285,
29915,
29912,
3696,
29918,
1256,
29918,
4906,
29913,
742,
995,
353,
285,
29915,
19660,
3696,
29889,
3257,
18456,
29912,
3696,
29889,
4906,
29918,
2271,
580,
1800,
29912,
554,
29918,
358,
1080,
29918,
1807,
29913,
1495,
13,
462,
462,
4706,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
1596,
29898,
29888,
29915,
13599,
451,
1476,
29901,
426,
12719,
29918,
333,
29913,
426,
2435,
29898,
3696,
29918,
1761,
2915,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
1678,
7465,
822,
2425,
29918,
2230,
29918,
3198,
29898,
1311,
1125,
13,
4706,
7272,
1583,
29889,
7451,
29889,
10685,
29918,
29305,
29918,
2040,
580,
13,
4706,
1550,
451,
1583,
29889,
7451,
29889,
275,
29918,
15603,
7295,
13,
9651,
7272,
1583,
29889,
13604,
29918,
816,
14989,
29918,
9057,
580,
13,
9651,
7272,
408,
948,
3934,
29889,
17059,
29898,
29953,
29900,
29897,
13,
308,
13,
13,
7451,
353,
8260,
29889,
29933,
327,
29898,
6519,
29918,
13506,
2433,
29914,
1495,
13,
7451,
29889,
517,
29890,
1171,
353,
22354,
1171,
29898,
7451,
29897,
13,
7451,
29889,
517,
29890,
1171,
29889,
1359,
29918,
2917,
580,
13,
7451,
29889,
517,
29890,
1171,
29889,
1359,
29918,
1272,
580,
13,
13,
29992,
7451,
29889,
3696,
13,
12674,
822,
373,
29918,
2040,
7295,
13,
1678,
1596,
29898,
29888,
29915,
10454,
13817,
297,
408,
426,
7451,
29889,
1792,
29889,
978,
29913,
426,
7451,
29889,
1792,
29889,
333,
29913,
1495,
13,
13,
29992,
7451,
29889,
3696,
13,
12674,
822,
373,
29918,
2543,
789,
29918,
16515,
29898,
2543,
789,
1125,
13,
1678,
1596,
29898,
29888,
29915,
6585,
287,
1410,
789,
426,
2543,
789,
29913,
1495,
13,
1678,
565,
451,
1410,
789,
29889,
1004,
29889,
2543,
789,
29918,
17858,
6847,
29889,
1171,
482,
29918,
19158,
29901,
13,
4706,
1596,
877,
29089,
10933,
7191,
1495,
13,
1678,
565,
451,
1410,
789,
29889,
1004,
29889,
2543,
789,
29918,
17858,
6847,
29889,
1171,
482,
29918,
19254,
7039,
29901,
13,
4706,
1596,
877,
29089,
10933,
25985,
7039,
1495,
13,
1678,
7272,
1410,
789,
29889,
1004,
29889,
5628,
29898,
19254,
353,
9225,
29889,
1792,
29889,
978,
29897,
13,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
1267,
420,
1495,
13,
12674,
822,
19508,
29898,
13073,
29892,
4509,
29918,
333,
29892,
304,
29918,
978,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
4509,
29918,
6370,
29918,
333,
353,
6213,
13,
1678,
565,
7431,
29898,
14242,
29918,
333,
29897,
6736,
29871,
29946,
29901,
13,
4706,
1018,
29901,
13,
9651,
4509,
29918,
6370,
29918,
333,
353,
938,
29898,
14242,
29918,
333,
29889,
6506,
877,
29992,
742,
525,
2824,
6506,
877,
29966,
742,
525,
2824,
6506,
877,
29991,
742,
525,
2824,
6506,
877,
29958,
742,
6629,
876,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
1596,
29898,
29888,
29915,
2525,
519,
304,
1303,
4509,
1178,
515,
426,
14242,
29918,
333,
29913,
1495,
13,
9651,
4509,
29918,
6370,
29918,
333,
353,
6213,
13,
1678,
4509,
353,
6213,
13,
1678,
565,
4509,
29918,
6370,
29918,
333,
338,
451,
6213,
29901,
13,
4706,
4509,
353,
7272,
1410,
789,
29889,
9155,
29918,
14242,
29898,
14242,
29918,
6370,
29918,
333,
29897,
13,
1678,
1596,
29898,
29888,
29915,
29934,
3871,
1899,
29901,
1018,
426,
14242,
29918,
333,
29913,
21313,
14242,
1800,
1599,
426,
517,
29918,
978,
29913,
1495,
29871,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
8921,
338,
451,
6213,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
1267,
420,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
4706,
565,
313,
14242,
338,
451,
6213,
29897,
322,
313,
1333,
4509,
29889,
7451,
1125,
13,
9651,
2441,
29918,
978,
353,
4509,
29889,
19254,
470,
4509,
29889,
978,
13,
9651,
1596,
29898,
29888,
29915,
29934,
3871,
1899,
29901,
1735,
426,
13492,
29918,
978,
29913,
304,
426,
517,
29918,
978,
29913,
1495,
13,
9651,
7272,
4509,
29889,
5628,
29898,
19254,
353,
304,
29918,
978,
29897,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
29934,
1430,
25797,
29918,
29911,
1806,
1307,
29892,
1134,
353,
525,
4018,
742,
6139,
353,
4103,
18411,
29889,
29934,
1430,
25797,
29918,
2303,
1799,
10461,
29889,
4830,
29898,
8921,
29889,
358,
291,
29892,
2441,
29918,
978,
29892,
4509,
29889,
358,
291,
876,
13,
9651,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
4706,
1683,
29901,
13,
9651,
7272,
4148,
29889,
6717,
29898,
4300,
18411,
29889,
3904,
6181,
29918,
29934,
1430,
25797,
29918,
11889,
29889,
4830,
29898,
14242,
29918,
333,
876,
13,
4706,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
1267,
420,
29918,
26381,
29901,
13,
9651,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
3696,
29889,
1482,
1495,
13,
12674,
822,
1741,
29898,
13073,
29892,
334,
5085,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
1333,
4148,
29889,
7451,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
29897,
322,
7431,
29898,
5085,
29897,
1405,
29871,
29900,
29901,
13,
4706,
1741,
29892,
1059,
29918,
1853,
353,
6864,
29889,
5510,
29918,
1482,
29918,
6519,
29898,
13073,
29889,
4906,
29892,
6389,
29897,
13,
4706,
565,
1741,
29901,
13,
9651,
8297,
353,
7272,
1741,
29889,
17158,
29918,
2218,
16090,
29918,
17987,
580,
13,
632,
1199,
29918,
1052,
29918,
1445,
353,
1741,
29889,
17158,
29918,
1256,
29918,
1199,
580,
13,
9651,
565,
29871,
1199,
29918,
1052,
29918,
1445,
29901,
13,
462,
1199,
29918,
1052,
29918,
1445,
353,
2313,
536,
29889,
2283,
29898,
1199,
29918,
1052,
29918,
1445,
29892,
10422,
353,
4103,
18411,
29889,
22240,
3919,
29918,
5454,
1307,
2797,
1718,
29918,
7724,
5813,
29889,
4830,
29898,
710,
29898,
3696,
29889,
3257,
4961,
13,
9651,
2643,
353,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29892,
934,
353,
29871,
1199,
29918,
1052,
29918,
1445,
29897,
13,
9651,
1741,
29889,
842,
29918,
4841,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29892,
2643,
29889,
333,
29892,
12893,
29889,
4906,
29889,
333,
29897,
13,
9651,
1741,
29889,
13492,
29918,
1792,
29918,
333,
353,
12893,
29889,
4906,
29889,
8921,
29889,
333,
13,
9651,
9225,
29889,
517,
29890,
1171,
29889,
1202,
29918,
3696,
29898,
3696,
29897,
13,
9651,
396,
2322,
337,
7387,
13,
9651,
7272,
2643,
29889,
1202,
29918,
276,
2467,
29898,
2624,
29889,
1525,
24705,
29918,
8949,
29897,
13,
9651,
7272,
2643,
29889,
1202,
29918,
276,
2467,
29898,
2624,
29889,
1525,
24705,
29918,
9312,
29897,
13,
9651,
7272,
1741,
29889,
842,
29918,
4906,
29898,
4906,
29897,
13,
9651,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
3696,
29918,
26381,
29901,
13,
18884,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
4706,
25342,
1059,
29918,
1853,
1275,
6864,
2392,
29889,
6248,
29918,
11432,
29901,
13,
9651,
1059,
29918,
17987,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
28577,
29918,
11432,
29892,
1134,
353,
525,
4018,
742,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
28577,
29918,
11432,
29918,
6248,
29918,
19094,
1299,
29889,
4830,
29898,
1191,
29892,
6864,
29889,
6248,
29918,
19094,
1299,
876,
13,
9651,
2643,
353,
7272,
8242,
29889,
6717,
29898,
17987,
353,
1059,
29918,
17987,
29897,
13,
4706,
1683,
29901,
13,
9651,
2643,
353,
7272,
8242,
29889,
6717,
29898,
22240,
3919,
29903,
29918,
28577,
29918,
11432,
29897,
13,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
3696,
29889,
1761,
1495,
13,
12674,
822,
1741,
29898,
13073,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
1333,
4148,
29889,
7451,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
4706,
1178,
29918,
710,
353,
6864,
29889,
4830,
29918,
8345,
29918,
333,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29897,
13,
4706,
1596,
29898,
29888,
29915,
1293,
4959,
363,
8242,
426,
333,
29918,
710,
29913,
1495,
13,
4706,
1741,
29918,
1761,
353,
9225,
29889,
517,
29890,
1171,
29889,
13604,
29889,
657,
29898,
333,
29918,
710,
29897,
13,
4706,
565,
313,
3696,
29918,
1761,
338,
6213,
29897,
470,
313,
2435,
29898,
3696,
29918,
1761,
29897,
1275,
29871,
29900,
1125,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
24360,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
12719,
29889,
978,
511,
13,
18884,
1134,
353,
525,
4018,
742,
13,
18884,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
24360,
29918,
29940,
12413,
29889,
4830,
29898,
12719,
29889,
978,
29897,
13,
9651,
1723,
13,
9651,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
4706,
1683,
29901,
13,
9651,
7272,
9225,
29889,
517,
29890,
1171,
29889,
22379,
29918,
12719,
29918,
13604,
29898,
12719,
29897,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
24360,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
12719,
29889,
978,
511,
13,
18884,
1134,
353,
525,
4018,
742,
13,
18884,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
24360,
29918,
2287,
7187,
29889,
4830,
29898,
12719,
29889,
978,
29892,
7431,
29898,
3696,
29918,
1761,
876,
13,
9651,
1723,
13,
9651,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
1741,
29889,
3257,
29892,
995,
353,
1741,
29889,
7727,
3101,
13,
9651,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
9651,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
3696,
29918,
26381,
29901,
13,
18884,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
3696,
29889,
5628,
1495,
13,
12674,
822,
1741,
29898,
13073,
29892,
1741,
29918,
3257,
29901,
851,
29892,
334,
5085,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
1333,
4148,
29889,
7451,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
4706,
1741,
29918,
1761,
353,
1051,
29898,
7451,
29889,
517,
29890,
1171,
29889,
657,
29918,
13604,
29918,
1609,
29918,
3257,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29892,
1741,
29918,
3257,
876,
13,
4706,
565,
1741,
29918,
1761,
322,
7431,
29898,
3696,
29918,
1761,
29897,
1405,
29871,
29900,
29901,
13,
9651,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
18884,
26278,
353,
1051,
29898,
3696,
29889,
5510,
29918,
5628,
29918,
6519,
29898,
5085,
876,
13,
18884,
1059,
29918,
2798,
353,
29871,
29900,
13,
18884,
363,
21733,
29892,
1059,
297,
26278,
29901,
13,
462,
1678,
565,
1059,
29901,
13,
462,
4706,
565,
1059,
1275,
6864,
2392,
29889,
6248,
29918,
11432,
29901,
13,
462,
9651,
1059,
29918,
17987,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
28577,
29918,
11432,
29892,
1134,
353,
525,
4018,
742,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
28577,
29918,
11432,
29918,
6248,
29918,
19094,
1299,
29889,
4830,
29898,
1191,
29892,
6864,
29889,
6248,
29918,
19094,
1299,
876,
13,
462,
9651,
2643,
353,
7272,
8242,
29889,
6717,
29898,
17987,
353,
1059,
29918,
17987,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
1596,
29898,
29888,
29915,
2392,
426,
2704,
29913,
1550,
23815,
1741,
426,
3696,
29889,
3257,
1118,
1899,
29901,
426,
5085,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
462,
4706,
1059,
29918,
2798,
4619,
29871,
29896,
13,
18884,
565,
313,
2435,
29898,
1545,
8232,
29897,
1405,
29871,
29900,
29897,
322,
313,
2704,
29918,
2798,
1275,
29871,
29900,
1125,
13,
462,
1678,
9225,
29889,
517,
29890,
1171,
29889,
7620,
29918,
1272,
580,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
2643,
353,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
4706,
565,
2643,
29901,
13,
462,
9651,
716,
29918,
17987,
353,
7272,
1741,
29889,
17158,
29918,
2218,
16090,
29918,
17987,
580,
13,
462,
9651,
396,
1815,
29915,
29873,
10641,
263,
934,
304,
263,
2643,
3863,
856,
13,
462,
9651,
396,
29871,
1199,
29918,
1052,
29918,
1445,
353,
2313,
536,
29889,
2283,
29898,
3696,
29889,
17158,
29918,
1256,
29918,
1199,
3285,
10422,
353,
4103,
18411,
29889,
22240,
3919,
29918,
5454,
1307,
2797,
1718,
29918,
7724,
5813,
29889,
4830,
29898,
3696,
29889,
3257,
876,
13,
462,
9651,
7272,
2643,
29889,
5628,
29898,
17987,
353,
716,
29918,
17987,
29897,
13,
462,
1678,
5174,
2313,
536,
29889,
17413,
29901,
13,
462,
4706,
1596,
29898,
29888,
29915,
3728,
426,
3696,
29889,
4906,
29918,
333,
29913,
451,
1476,
29892,
23815,
1741,
426,
3696,
29889,
3257,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
462,
1678,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
12378,
29918,
29911,
1806,
1307,
29892,
13,
462,
4706,
1134,
353,
525,
4018,
742,
13,
462,
4706,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
12378,
29918,
2287,
7187,
29889,
4830,
29898,
3696,
29889,
3257,
29892,
1741,
29889,
4906,
29918,
2271,
3101,
13,
462,
1678,
1723,
13,
462,
1678,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
12378,
29918,
22716,
29892,
995,
353,
12893,
29889,
4906,
29889,
8921,
29889,
358,
291,
29897,
13,
462,
1678,
7272,
1741,
29889,
17158,
29918,
1202,
29918,
554,
29918,
865,
29918,
17987,
29918,
9621,
29898,
17987,
29897,
13,
462,
1678,
363,
21733,
29892,
1059,
297,
26278,
29901,
13,
462,
4706,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
6720,
4571,
29943,
28541,
29892,
995,
353,
851,
29898,
1545,
2450,
876,
13,
462,
1678,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
18884,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
3696,
29918,
26381,
29901,
13,
462,
1678,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
4706,
1683,
29901,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
12378,
29918,
29911,
1806,
1307,
29892,
13,
18884,
1134,
353,
525,
4018,
742,
13,
18884,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
12378,
29918,
29940,
12413,
29889,
4830,
29898,
3696,
29918,
3257,
29897,
13,
9651,
1723,
13,
9651,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
3696,
29889,
8143,
1495,
13,
12674,
822,
1741,
29898,
13073,
29892,
1741,
29918,
3257,
29901,
851,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
1333,
4148,
29889,
7451,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
4706,
1741,
29918,
1761,
353,
1051,
29898,
7451,
29889,
517,
29890,
1171,
29889,
8143,
29918,
13604,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29892,
1741,
29918,
3257,
876,
13,
4706,
9225,
29889,
517,
29890,
1171,
29889,
7620,
29918,
1272,
580,
13,
4706,
565,
1741,
29918,
1761,
322,
7431,
29898,
3696,
29918,
1761,
29897,
1405,
29871,
29900,
29901,
13,
9651,
363,
1741,
297,
1741,
29918,
1761,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1741,
29918,
4906,
353,
7272,
1741,
29889,
22379,
29918,
4906,
29898,
12719,
29897,
13,
462,
1678,
7272,
1741,
29918,
4906,
29889,
8143,
580,
13,
18884,
5174,
2313,
536,
29889,
17413,
29901,
13,
462,
1678,
1596,
29898,
29888,
29915,
3728,
426,
3696,
29889,
4906,
29918,
333,
29913,
451,
1476,
29892,
21228,
1741,
426,
3696,
29889,
3257,
29913,
742,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
29911,
1806,
1307,
29892,
13,
462,
1678,
1134,
353,
525,
4018,
742,
13,
462,
1678,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
2287,
7187,
29889,
4830,
29898,
3696,
29889,
3257,
29897,
13,
18884,
1723,
13,
18884,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
22716,
29892,
995,
353,
12893,
29889,
4906,
29889,
8921,
29889,
358,
291,
29897,
13,
18884,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
9651,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
3696,
29918,
26381,
29901,
13,
18884,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
4706,
1683,
29901,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
29911,
1806,
1307,
29892,
13,
18884,
1134,
353,
525,
4018,
742,
13,
18884,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
2287,
18476,
29918,
29940,
12413,
29889,
4830,
29898,
3696,
29918,
3257,
29897,
13,
9651,
1723,
13,
9651,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
308,
13,
29992,
7451,
29889,
6519,
29898,
978,
2433,
3696,
29889,
8551,
1495,
13,
12674,
822,
1741,
29898,
13073,
1125,
13,
1678,
1410,
789,
353,
12893,
29889,
2543,
789,
13,
1678,
4148,
353,
12893,
29889,
8921,
13,
1678,
8242,
353,
12893,
29889,
4906,
29889,
12719,
13,
1678,
565,
313,
2543,
789,
338,
451,
6213,
29897,
322,
313,
1333,
4148,
29889,
7451,
29897,
322,
9779,
29889,
1761,
29918,
29888,
1169,
29898,
7451,
29889,
517,
29890,
1171,
29889,
13604,
29918,
24622,
29918,
262,
29892,
8242,
1125,
13,
4706,
1741,
29918,
1761,
353,
9225,
29889,
517,
29890,
1171,
29889,
8551,
29918,
13604,
29898,
2543,
789,
29889,
333,
29892,
8242,
29889,
333,
29897,
13,
4706,
1741,
29918,
2798,
353,
29871,
29900,
13,
4706,
565,
1741,
29918,
1761,
338,
451,
6213,
29901,
13,
9651,
1741,
29918,
2798,
353,
7431,
29898,
3696,
29918,
1761,
29897,
13,
4706,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
29907,
1307,
1718,
29918,
29911,
1806,
1307,
29889,
4830,
29898,
12719,
29889,
978,
511,
13,
9651,
1134,
353,
525,
4018,
742,
13,
9651,
6139,
353,
4103,
18411,
29889,
22240,
3919,
29903,
29918,
29907,
1307,
1718,
29918,
2287,
7187,
29889,
4830,
29898,
3696,
29918,
2798,
29897,
13,
4706,
1723,
13,
4706,
7272,
8242,
29889,
6717,
29898,
17987,
353,
8297,
29897,
13,
4706,
565,
9225,
29889,
517,
29890,
1171,
29889,
5992,
29918,
3696,
29918,
26381,
29901,
13,
9651,
7272,
12893,
29889,
4906,
29889,
8143,
580,
13,
13,
29992,
7451,
29889,
3696,
13,
12674,
822,
373,
29918,
1610,
29918,
4906,
29918,
8143,
29898,
1610,
29918,
8143,
29918,
3696,
1125,
13,
1678,
7272,
9225,
29889,
517,
29890,
1171,
29889,
265,
29918,
3696,
29918,
4906,
29918,
8143,
29898,
1610,
29918,
8143,
29918,
3696,
29889,
2543,
789,
29918,
333,
29892,
10650,
29918,
8143,
29918,
3696,
29889,
12719,
29918,
333,
29892,
10650,
29918,
8143,
29918,
3696,
29889,
4906,
29918,
333,
29897,
13,
13,
29992,
7451,
29889,
3696,
13,
12674,
822,
373,
29918,
1610,
29918,
276,
2467,
29918,
1202,
29898,
1610,
29918,
276,
2467,
29918,
3696,
1125,
13,
1678,
7272,
9225,
29889,
517,
29890,
1171,
29889,
265,
29918,
3696,
29918,
276,
2467,
29918,
1202,
29898,
1610,
29918,
276,
2467,
29918,
3696,
29889,
2543,
789,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
12719,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
4906,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
1792,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
15810,
2397,
29897,
13,
13,
29992,
7451,
29889,
3696,
13,
12674,
822,
373,
29918,
1610,
29918,
276,
2467,
29918,
5992,
29898,
1610,
29918,
276,
2467,
29918,
3696,
1125,
13,
1678,
7272,
9225,
29889,
517,
29890,
1171,
29889,
265,
29918,
3696,
29918,
276,
2467,
29918,
5992,
29898,
1610,
29918,
276,
2467,
29918,
3696,
29889,
2543,
789,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
12719,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
4906,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
1792,
29918,
333,
29892,
10650,
29918,
276,
2467,
29918,
3696,
29889,
15810,
2397,
29897,
13,
13,
7451,
29889,
7888,
29889,
3258,
29918,
7662,
29898,
7451,
29889,
517,
29890,
1171,
29889,
7888,
29918,
2230,
29918,
3198,
3101,
13,
13,
7451,
29889,
3389,
29898,
7451,
29889,
517,
29890,
1171,
29889,
6979,
29897,
13,
2
] |
cupy/logic/type_test.py | umitanuki/chainer | 0 | 61490 | <filename>cupy/logic/type_test.py
def iscomplex(a):
# TODO(beam2d): Implement it
raise NotImplementedError
def iscomplexobj(x):
# TODO(beam2d): Implement it
raise NotImplementedError
def isfortran(a):
# TODO(beam2d): Implement it
raise NotImplementedError
def isreal(x):
# TODO(beam2d): Implement it
raise NotImplementedError
def isrealobj(x):
# TODO(beam2d): Implement it
raise NotImplementedError
| [
1,
529,
9507,
29958,
5231,
29891,
29914,
19227,
29914,
1853,
29918,
1688,
29889,
2272,
13,
1753,
338,
19676,
29898,
29874,
1125,
13,
1678,
396,
14402,
29898,
915,
314,
29906,
29881,
1125,
1954,
2037,
372,
13,
1678,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
13,
1753,
338,
19676,
5415,
29898,
29916,
1125,
13,
1678,
396,
14402,
29898,
915,
314,
29906,
29881,
1125,
1954,
2037,
372,
13,
1678,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
13,
1753,
338,
3921,
661,
29898,
29874,
1125,
13,
1678,
396,
14402,
29898,
915,
314,
29906,
29881,
1125,
1954,
2037,
372,
13,
1678,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
13,
1753,
338,
6370,
29898,
29916,
1125,
13,
1678,
396,
14402,
29898,
915,
314,
29906,
29881,
1125,
1954,
2037,
372,
13,
1678,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
13,
1753,
338,
6370,
5415,
29898,
29916,
1125,
13,
1678,
396,
14402,
29898,
915,
314,
29906,
29881,
1125,
1954,
2037,
372,
13,
1678,
12020,
2216,
1888,
2037,
287,
2392,
13,
2
] |
apps/api/views/user.py | Praetorian-Defence/praetorian-api | 2 | 116078 | import base64
from datetime import datetime
from io import BytesIO
from http import HTTPStatus
import pyotp
import qrcode
import six
from django.conf import settings
from django.db import transaction
from django.http import HttpResponse
from django.utils import timezone
from django.utils.crypto import salted_hmac
from django.utils.decorators import method_decorator
from django.utils.http import int_to_base36
from django.views import View
from django.utils.translation import gettext_lazy as _
from rolepermissions.roles import assign_role, clear_roles
from apps.api.filters.user import UserFilter
from apps.api.auth.decorators import token_required
from apps.api.errors import ValidationException, ApiException
from apps.api.forms.password import PasswordActivateForm
from apps.api.forms.user import UserForms
from apps.api.permissions import permission_required
from apps.api.response import SingleResponse, PaginationResponse
from apps.core.models import User
from apps.core.models.password_recovery import PasswordRecovery
from apps.core.serializers.password import PasswordRecoverySerializer
from apps.core.serializers.user import UserSerializer
from apps.core.services.notification import NotificationService
class UserProfile(View):
@method_decorator(token_required)
def get(self, request):
return SingleResponse(request, request.user, serializer=UserSerializer.Base)
@transaction.atomic
@method_decorator(token_required)
def delete(self, request):
user = request.user
if user.is_temporary:
user.delete()
else:
raise ApiException(request, _('Permission denied.'), status_code=HTTPStatus.FORBIDDEN)
return HttpResponse(status=HTTPStatus.NO_CONTENT)
class UserManagement(View):
@transaction.atomic
@method_decorator(token_required)
@method_decorator(permission_required('core.add_user'))
def post(self, request):
form = UserForms.Create.create_from_request(request)
if not form.is_valid():
raise ValidationException(request, form)
password = form.cleaned_data.get('password')
role = form.cleaned_data.get('role')
user = User()
form.fill(user)
user.set_password(password)
user.username = user.email
assign_role(user, role.name)
user.is_active = False
user.save()
return SingleResponse(request, user, status=HTTPStatus.CREATED, serializer=UserSerializer.Base)
@method_decorator(token_required)
@method_decorator(permission_required('core.read_user'))
def get(self, request):
users = UserFilter(request.GET, queryset=User.objects.all(), request=request).qs
return PaginationResponse(request, users, serializer=UserSerializer.Base)
class UserDetail(View):
@method_decorator(token_required)
@method_decorator(permission_required('core.read_user'))
def get(self, request, user_id):
try:
user = User.objects.get(pk=user_id)
except User.DoesNotExist:
raise ApiException(request, _('User does not exist.'), status_code=HTTPStatus.NOT_FOUND)
return SingleResponse(request, user, serializer=UserSerializer.Detail)
@transaction.atomic
@method_decorator(token_required)
@method_decorator(permission_required('core.add_user'))
def put(self, request, user_id):
try:
user = User.objects.get(pk=user_id)
except User.DoesNotExist:
raise ApiException(request, _('User does not exist.'), status_code=HTTPStatus.NOT_FOUND)
form = UserForms.Update.create_from_request(request)
if not form.is_valid():
raise ValidationException(request, form)
email = form.cleaned_data.get('email')
assign_projects = form.cleaned_data.get('assign_projects')
role = form.cleaned_data.get('role')
if email != user.email:
if User.objects.filter(email=email).exists():
raise ApiException(request, _('Email is already used.'), status_code=HTTPStatus.CONFLICT)
form.fill(user)
user.username = email
if assign_projects is not None:
user.assign_projects(request, assign_projects)
if role:
clear_roles(user)
assign_role(user, role.value)
user.save()
return SingleResponse(request, data=user, status=HTTPStatus.OK, serializer=UserSerializer.Base)
@transaction.atomic
@method_decorator(token_required)
@method_decorator(permission_required('core.delete_user'))
def delete(self, request, user_id):
try:
user = User.objects.get(pk=user_id)
except User.DoesNotExist:
raise ApiException(request, _('User does not exist.'), status_code=HTTPStatus.NOT_FOUND)
user.delete()
return HttpResponse(status=HTTPStatus.NO_CONTENT)
class User2faActivate(View):
@method_decorator(token_required)
def get(self, request, user_id):
try:
user = User.objects.get(pk=user_id)
except User.DoesNotExist:
raise ApiException(request, _('User does not exist.'), status_code=HTTPStatus.NOT_FOUND)
otp_secret = pyotp.random_base32()
qr_code_url = pyotp.totp.TOTP(otp_secret).provisioning_uri(
name=user.email,
issuer_name="Praetorian API"
)
response = {'qr_code': qr_code_url}
if user.additional_data:
user.additional_data['otp_secret'] = otp_secret
else:
user.additional_data = {'otp_secret': otp_secret}
user.is_2fa = True
user.save()
NotificationService.create(
recipients=[user.email],
sender=f"{settings.EMAIL_SENDER_NAME} <{settings.EMAIL_SENDER}>",
subject=_('[Praetorian API] - Two factor authentication'),
content={
'message': _(
'test'
),
'qr_code_url': self.make_qr_code(qr_code_url),
'email_text': _('QR code to activate your two factor authentication.')
},
template='_emails/2fa_activation.html'
).send_email()
return SingleResponse(request, response, status=HTTPStatus.CREATED, serializer=UserSerializer.Base)
@staticmethod
def make_qr_code(text):
qr = qrcode.QRCode(
version=5,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=8,
border=4
)
qr.add_data(text)
qr.make(fit=True)
img = qr.make_image()
img_buffer = BytesIO()
img.save(img_buffer, format="PNG")
img_str = base64.b64encode(img_buffer.getvalue()).decode("utf-8")
return img_str
class PasswordRecoveryManagement(View):
@transaction.atomic
def get(self, request, email):
try:
user = User.objects.get(email=email)
except User.DoesNotExist:
raise ApiException(
request, _('User with specified email does not exist.'), status_code=HTTPStatus.NOT_FOUND
)
timestamp = int(datetime.utcnow().timestamp())
ts_b36 = int_to_base36(timestamp)
login_timestamp = '' if user.last_login is None else user.last_login.replace(microsecond=0, tzinfo=None)
hash_value = six.text_type(user.pk) + user.password + six.text_type(login_timestamp) + six.text_type(timestamp)
recovery_hash = salted_hmac(
settings.SECRET_KEY,
hash_value,
).hexdigest()[::2]
password_recovery = PasswordRecovery.objects.create(
value="%s-%s" % (ts_b36, recovery_hash),
user=user,
expires_at=timezone.now() + settings.PASSWORD_RECOVERY_TIME
)
recovery_url = f'{settings.BASE_URL}/password/activate/{password_recovery.value}'
NotificationService.create(
recipients=[user.email],
sender=f"{settings.EMAIL_SENDER_NAME} <{settings.EMAIL_SENDER}>",
subject=_('[Praetorian API] - Email recovery'),
content={
'message': _(
'test'
),
'recovery_url': recovery_url,
'email_text': _('Your recovery link to Praetorian API is: ')
},
template='_emails/password_recovery.html'
).send_email()
return SingleResponse(
request, password_recovery, status=HTTPStatus.CREATED, serializer=PasswordRecoverySerializer.Base
)
class PasswordActivateManagement(View):
@transaction.atomic
def post(self, request):
form = PasswordActivateForm.create_from_request(request)
if not form.is_valid():
raise ValidationException(request, form)
request_data = form.cleaned_data
try:
password_recovery = PasswordRecovery.objects.get(
value=request_data.get('hashed_recovery'),
expires_at__gt=timezone.now()
)
except PasswordRecovery.DoesNotExist:
raise ApiException(request, _('Password recovery does not exist.'), status_code=HTTPStatus.NOT_FOUND)
password_recovery.user.set_password(request_data.get('password'))
password_recovery.user.save()
PasswordRecovery.objects.filter(user=password_recovery.user).delete()
return SingleResponse(request, None, status=HTTPStatus.NO_CONTENT)
| [
1,
1053,
2967,
29953,
29946,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
12013,
1053,
2648,
2167,
5971,
13,
3166,
1732,
1053,
7331,
5709,
13,
13,
5215,
11451,
327,
29886,
13,
5215,
3855,
29878,
401,
13,
5215,
4832,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
2585,
1053,
10804,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
3166,
9557,
29889,
13239,
29889,
29883,
17929,
1053,
15795,
287,
29918,
7184,
562,
13,
3166,
9557,
29889,
13239,
29889,
19557,
4097,
1053,
1158,
29918,
19557,
1061,
13,
3166,
9557,
29889,
13239,
29889,
1124,
1053,
938,
29918,
517,
29918,
3188,
29941,
29953,
13,
3166,
9557,
29889,
7406,
1053,
4533,
13,
3166,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
679,
726,
29918,
433,
1537,
408,
903,
13,
3166,
6297,
17858,
6847,
29889,
307,
793,
1053,
3566,
29918,
12154,
29892,
2821,
29918,
307,
793,
13,
13,
3166,
11446,
29889,
2754,
29889,
26705,
29889,
1792,
1053,
4911,
5072,
13,
3166,
11446,
29889,
2754,
29889,
5150,
29889,
19557,
4097,
1053,
5993,
29918,
12403,
13,
3166,
11446,
29889,
2754,
29889,
12523,
1053,
15758,
362,
2451,
29892,
29749,
2451,
13,
3166,
11446,
29889,
2754,
29889,
9514,
29889,
5630,
1053,
25280,
21786,
403,
2500,
13,
3166,
11446,
29889,
2754,
29889,
9514,
29889,
1792,
1053,
4911,
12605,
13,
3166,
11446,
29889,
2754,
29889,
17858,
6847,
1053,
10751,
29918,
12403,
13,
3166,
11446,
29889,
2754,
29889,
5327,
1053,
16740,
5103,
29892,
349,
351,
3381,
5103,
13,
3166,
11446,
29889,
3221,
29889,
9794,
1053,
4911,
13,
3166,
11446,
29889,
3221,
29889,
9794,
29889,
5630,
29918,
3757,
22205,
1053,
25280,
4789,
22205,
13,
3166,
11446,
29889,
3221,
29889,
15550,
19427,
29889,
5630,
1053,
25280,
4789,
22205,
17679,
13,
3166,
11446,
29889,
3221,
29889,
15550,
19427,
29889,
1792,
1053,
4911,
17679,
13,
3166,
11446,
29889,
3221,
29889,
9916,
29889,
24671,
1053,
28578,
3170,
13,
13,
13,
1990,
4911,
13909,
29898,
1043,
1125,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
1125,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
2009,
29889,
1792,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
5160,
29897,
13,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
1125,
13,
4706,
1404,
353,
2009,
29889,
1792,
13,
13,
4706,
565,
1404,
29889,
275,
29918,
1356,
1971,
653,
29901,
13,
9651,
1404,
29889,
8143,
580,
13,
4706,
1683,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
27293,
17935,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
22051,
29933,
1367,
29928,
1430,
29897,
13,
13,
4706,
736,
9056,
5103,
29898,
4882,
29922,
10493,
5709,
29889,
6632,
29918,
22412,
3919,
29897,
13,
13,
13,
1990,
4911,
27107,
29898,
1043,
1125,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
16074,
29918,
12403,
877,
3221,
29889,
1202,
29918,
1792,
8785,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
1125,
13,
4706,
883,
353,
4911,
12605,
29889,
4391,
29889,
3258,
29918,
3166,
29918,
3827,
29898,
3827,
29897,
13,
13,
4706,
565,
451,
883,
29889,
275,
29918,
3084,
7295,
13,
9651,
12020,
15758,
362,
2451,
29898,
3827,
29892,
883,
29897,
13,
13,
4706,
4800,
353,
883,
29889,
14941,
287,
29918,
1272,
29889,
657,
877,
5630,
1495,
13,
4706,
6297,
353,
883,
29889,
14941,
287,
29918,
1272,
29889,
657,
877,
12154,
1495,
13,
13,
4706,
1404,
353,
4911,
580,
13,
4706,
883,
29889,
5589,
29898,
1792,
29897,
13,
13,
4706,
1404,
29889,
842,
29918,
5630,
29898,
5630,
29897,
13,
4706,
1404,
29889,
6786,
353,
1404,
29889,
5269,
13,
4706,
3566,
29918,
12154,
29898,
1792,
29892,
6297,
29889,
978,
29897,
13,
4706,
1404,
29889,
275,
29918,
4925,
353,
7700,
13,
4706,
1404,
29889,
7620,
580,
13,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
1404,
29892,
4660,
29922,
10493,
5709,
29889,
27045,
29928,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
5160,
29897,
13,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
16074,
29918,
12403,
877,
3221,
29889,
949,
29918,
1792,
8785,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
1125,
13,
4706,
4160,
353,
4911,
5072,
29898,
3827,
29889,
7194,
29892,
2346,
842,
29922,
2659,
29889,
12650,
29889,
497,
3285,
2009,
29922,
3827,
467,
29939,
29879,
13,
13,
4706,
736,
349,
351,
3381,
5103,
29898,
3827,
29892,
4160,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
5160,
29897,
13,
13,
13,
1990,
4911,
16570,
29898,
1043,
1125,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
16074,
29918,
12403,
877,
3221,
29889,
949,
29918,
1792,
8785,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
333,
1125,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
20571,
29922,
1792,
29918,
333,
29897,
13,
4706,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
2659,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
29897,
13,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
1404,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
16570,
29897,
13,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
16074,
29918,
12403,
877,
3221,
29889,
1202,
29918,
1792,
8785,
13,
1678,
822,
1925,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
333,
1125,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
20571,
29922,
1792,
29918,
333,
29897,
13,
4706,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
2659,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
29897,
13,
13,
4706,
883,
353,
4911,
12605,
29889,
6422,
29889,
3258,
29918,
3166,
29918,
3827,
29898,
3827,
29897,
13,
13,
4706,
565,
451,
883,
29889,
275,
29918,
3084,
7295,
13,
9651,
12020,
15758,
362,
2451,
29898,
3827,
29892,
883,
29897,
13,
13,
4706,
4876,
353,
883,
29889,
14941,
287,
29918,
1272,
29889,
657,
877,
5269,
1495,
13,
4706,
3566,
29918,
16418,
353,
883,
29889,
14941,
287,
29918,
1272,
29889,
657,
877,
16645,
29918,
16418,
1495,
13,
4706,
6297,
353,
883,
29889,
14941,
287,
29918,
1272,
29889,
657,
877,
12154,
1495,
13,
13,
4706,
565,
4876,
2804,
1404,
29889,
5269,
29901,
13,
9651,
565,
4911,
29889,
12650,
29889,
4572,
29898,
5269,
29922,
5269,
467,
9933,
7295,
13,
18884,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
9823,
338,
2307,
1304,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
6007,
29943,
5265,
1783,
29897,
13,
13,
4706,
883,
29889,
5589,
29898,
1792,
29897,
13,
4706,
1404,
29889,
6786,
353,
4876,
13,
4706,
565,
3566,
29918,
16418,
338,
451,
6213,
29901,
13,
9651,
1404,
29889,
16645,
29918,
16418,
29898,
3827,
29892,
3566,
29918,
16418,
29897,
13,
4706,
565,
6297,
29901,
13,
9651,
2821,
29918,
307,
793,
29898,
1792,
29897,
13,
9651,
3566,
29918,
12154,
29898,
1792,
29892,
6297,
29889,
1767,
29897,
13,
4706,
1404,
29889,
7620,
580,
13,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
848,
29922,
1792,
29892,
4660,
29922,
10493,
5709,
29889,
8949,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
5160,
29897,
13,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
16074,
29918,
12403,
877,
3221,
29889,
8143,
29918,
1792,
8785,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
333,
1125,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
20571,
29922,
1792,
29918,
333,
29897,
13,
4706,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
2659,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
29897,
13,
13,
4706,
1404,
29889,
8143,
580,
13,
13,
4706,
736,
9056,
5103,
29898,
4882,
29922,
10493,
5709,
29889,
6632,
29918,
22412,
3919,
29897,
13,
13,
13,
1990,
4911,
29906,
5444,
21786,
403,
29898,
1043,
1125,
13,
1678,
732,
5696,
29918,
19557,
1061,
29898,
6979,
29918,
12403,
29897,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
333,
1125,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
20571,
29922,
1792,
29918,
333,
29897,
13,
4706,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
2659,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
29897,
13,
13,
4706,
4932,
29886,
29918,
19024,
353,
11451,
327,
29886,
29889,
8172,
29918,
3188,
29941,
29906,
580,
13,
4706,
3855,
29878,
29918,
401,
29918,
2271,
353,
11451,
327,
29886,
29889,
4260,
29886,
29889,
29911,
2891,
29925,
29898,
327,
29886,
29918,
19024,
467,
771,
4924,
292,
29918,
5338,
29898,
13,
9651,
1024,
29922,
1792,
29889,
5269,
29892,
13,
9651,
1721,
2853,
29918,
978,
543,
29925,
336,
300,
272,
713,
3450,
29908,
13,
4706,
1723,
13,
4706,
2933,
353,
11117,
29939,
29878,
29918,
401,
2396,
3855,
29878,
29918,
401,
29918,
2271,
29913,
13,
13,
4706,
565,
1404,
29889,
1202,
3245,
29918,
1272,
29901,
13,
9651,
1404,
29889,
1202,
3245,
29918,
1272,
1839,
327,
29886,
29918,
19024,
2033,
353,
4932,
29886,
29918,
19024,
13,
4706,
1683,
29901,
13,
9651,
1404,
29889,
1202,
3245,
29918,
1272,
353,
11117,
327,
29886,
29918,
19024,
2396,
4932,
29886,
29918,
19024,
29913,
13,
4706,
1404,
29889,
275,
29918,
29906,
5444,
353,
5852,
13,
4706,
1404,
29889,
7620,
580,
13,
13,
4706,
28578,
3170,
29889,
3258,
29898,
13,
9651,
23957,
10070,
11759,
1792,
29889,
5269,
1402,
13,
9651,
10004,
29922,
29888,
29908,
29912,
11027,
29889,
26862,
6227,
29918,
29903,
1430,
8032,
29918,
5813,
29913,
529,
29912,
11027,
29889,
26862,
6227,
29918,
29903,
1430,
8032,
17428,
613,
13,
9651,
4967,
29922,
29918,
877,
29961,
29925,
336,
300,
272,
713,
3450,
29962,
448,
7803,
7329,
10760,
5477,
13,
9651,
2793,
3790,
13,
18884,
525,
4906,
2396,
903,
29898,
13,
462,
1678,
525,
1688,
29915,
13,
18884,
10353,
13,
18884,
525,
29939,
29878,
29918,
401,
29918,
2271,
2396,
1583,
29889,
5675,
29918,
29939,
29878,
29918,
401,
29898,
29939,
29878,
29918,
401,
29918,
2271,
511,
13,
18884,
525,
5269,
29918,
726,
2396,
903,
877,
29984,
29934,
775,
304,
5039,
403,
596,
1023,
7329,
10760,
29889,
1495,
13,
9651,
2981,
13,
9651,
4472,
2433,
29918,
331,
2234,
29914,
29906,
5444,
29918,
11236,
362,
29889,
1420,
29915,
13,
4706,
13742,
6717,
29918,
5269,
580,
13,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
2933,
29892,
4660,
29922,
10493,
5709,
29889,
27045,
29928,
29892,
7797,
3950,
29922,
2659,
17679,
29889,
5160,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1207,
29918,
29939,
29878,
29918,
401,
29898,
726,
1125,
13,
4706,
3855,
29878,
353,
3855,
29878,
401,
29889,
29984,
29934,
3399,
29898,
13,
9651,
1873,
29922,
29945,
29892,
13,
9651,
1059,
29918,
2616,
276,
428,
29922,
29939,
29878,
401,
29889,
3075,
1934,
29889,
11432,
29918,
29907,
1955,
26282,
29918,
29931,
29892,
13,
9651,
3800,
29918,
2311,
29922,
29947,
29892,
13,
9651,
5139,
29922,
29946,
13,
4706,
1723,
13,
4706,
3855,
29878,
29889,
1202,
29918,
1272,
29898,
726,
29897,
13,
4706,
3855,
29878,
29889,
5675,
29898,
9202,
29922,
5574,
29897,
13,
4706,
10153,
353,
3855,
29878,
29889,
5675,
29918,
3027,
580,
13,
4706,
10153,
29918,
9040,
353,
2648,
2167,
5971,
580,
13,
13,
4706,
10153,
29889,
7620,
29898,
2492,
29918,
9040,
29892,
3402,
543,
29925,
9312,
1159,
13,
4706,
10153,
29918,
710,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
2492,
29918,
9040,
29889,
657,
1767,
16655,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
736,
10153,
29918,
710,
13,
13,
13,
1990,
25280,
4789,
22205,
27107,
29898,
1043,
1125,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
4876,
1125,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
5269,
29922,
5269,
29897,
13,
4706,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
13,
18884,
2009,
29892,
903,
877,
2659,
411,
6790,
4876,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
13,
9651,
1723,
13,
13,
4706,
14334,
353,
938,
29898,
12673,
29889,
329,
29883,
3707,
2141,
16394,
3101,
13,
4706,
18696,
29918,
29890,
29941,
29953,
353,
938,
29918,
517,
29918,
3188,
29941,
29953,
29898,
16394,
29897,
13,
4706,
6464,
29918,
16394,
353,
6629,
565,
1404,
29889,
4230,
29918,
7507,
338,
6213,
1683,
1404,
29889,
4230,
29918,
7507,
29889,
6506,
29898,
29885,
2357,
7496,
29922,
29900,
29892,
260,
29920,
3888,
29922,
8516,
29897,
13,
4706,
6608,
29918,
1767,
353,
4832,
29889,
726,
29918,
1853,
29898,
1792,
29889,
20571,
29897,
718,
1404,
29889,
5630,
718,
4832,
29889,
726,
29918,
1853,
29898,
7507,
29918,
16394,
29897,
718,
4832,
29889,
726,
29918,
1853,
29898,
16394,
29897,
13,
13,
4706,
24205,
29918,
8568,
353,
15795,
287,
29918,
7184,
562,
29898,
13,
9651,
6055,
29889,
1660,
22245,
29911,
29918,
10818,
29892,
13,
9651,
6608,
29918,
1767,
29892,
13,
4706,
13742,
20970,
7501,
342,
580,
29961,
1057,
29906,
29962,
13,
13,
4706,
4800,
29918,
3757,
22205,
353,
25280,
4789,
22205,
29889,
12650,
29889,
3258,
29898,
13,
9651,
995,
543,
29995,
29879,
19222,
29879,
29908,
1273,
313,
1372,
29918,
29890,
29941,
29953,
29892,
24205,
29918,
8568,
511,
13,
9651,
1404,
29922,
1792,
29892,
13,
9651,
1518,
2658,
29918,
271,
29922,
2230,
8028,
29889,
3707,
580,
718,
6055,
29889,
25711,
17013,
29918,
1525,
3217,
5348,
29979,
29918,
15307,
13,
4706,
1723,
13,
13,
4706,
24205,
29918,
2271,
353,
285,
29915,
29912,
11027,
29889,
25416,
29918,
4219,
6822,
5630,
29914,
11236,
403,
19248,
5630,
29918,
3757,
22205,
29889,
1767,
10162,
13,
13,
4706,
28578,
3170,
29889,
3258,
29898,
13,
9651,
23957,
10070,
11759,
1792,
29889,
5269,
1402,
13,
9651,
10004,
29922,
29888,
29908,
29912,
11027,
29889,
26862,
6227,
29918,
29903,
1430,
8032,
29918,
5813,
29913,
529,
29912,
11027,
29889,
26862,
6227,
29918,
29903,
1430,
8032,
17428,
613,
13,
9651,
4967,
29922,
29918,
877,
29961,
29925,
336,
300,
272,
713,
3450,
29962,
448,
22608,
24205,
5477,
13,
9651,
2793,
3790,
13,
18884,
525,
4906,
2396,
903,
29898,
13,
462,
1678,
525,
1688,
29915,
13,
18884,
10353,
13,
18884,
525,
3757,
22205,
29918,
2271,
2396,
24205,
29918,
2271,
29892,
13,
18884,
525,
5269,
29918,
726,
2396,
903,
877,
10858,
24205,
1544,
304,
9002,
300,
272,
713,
3450,
338,
29901,
25710,
13,
9651,
2981,
13,
9651,
4472,
2433,
29918,
331,
2234,
29914,
5630,
29918,
3757,
22205,
29889,
1420,
29915,
13,
4706,
13742,
6717,
29918,
5269,
580,
13,
13,
4706,
736,
16740,
5103,
29898,
13,
9651,
2009,
29892,
4800,
29918,
3757,
22205,
29892,
4660,
29922,
10493,
5709,
29889,
27045,
29928,
29892,
7797,
3950,
29922,
10048,
4789,
22205,
17679,
29889,
5160,
13,
4706,
1723,
13,
13,
13,
1990,
25280,
21786,
403,
27107,
29898,
1043,
1125,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
1125,
13,
4706,
883,
353,
25280,
21786,
403,
2500,
29889,
3258,
29918,
3166,
29918,
3827,
29898,
3827,
29897,
13,
13,
4706,
565,
451,
883,
29889,
275,
29918,
3084,
7295,
13,
9651,
12020,
15758,
362,
2451,
29898,
3827,
29892,
883,
29897,
13,
13,
4706,
2009,
29918,
1272,
353,
883,
29889,
14941,
287,
29918,
1272,
13,
13,
4706,
1018,
29901,
13,
9651,
4800,
29918,
3757,
22205,
353,
25280,
4789,
22205,
29889,
12650,
29889,
657,
29898,
13,
18884,
995,
29922,
3827,
29918,
1272,
29889,
657,
877,
8568,
287,
29918,
3757,
22205,
5477,
13,
18884,
1518,
2658,
29918,
271,
1649,
4141,
29922,
2230,
8028,
29889,
3707,
580,
13,
9651,
1723,
13,
4706,
5174,
25280,
4789,
22205,
29889,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
29749,
2451,
29898,
3827,
29892,
903,
877,
10048,
24205,
947,
451,
1863,
29889,
5477,
4660,
29918,
401,
29922,
10493,
5709,
29889,
12256,
29918,
5800,
18783,
29897,
13,
13,
4706,
4800,
29918,
3757,
22205,
29889,
1792,
29889,
842,
29918,
5630,
29898,
3827,
29918,
1272,
29889,
657,
877,
5630,
8785,
13,
4706,
4800,
29918,
3757,
22205,
29889,
1792,
29889,
7620,
580,
13,
4706,
25280,
4789,
22205,
29889,
12650,
29889,
4572,
29898,
1792,
29922,
5630,
29918,
3757,
22205,
29889,
1792,
467,
8143,
580,
13,
13,
4706,
736,
16740,
5103,
29898,
3827,
29892,
6213,
29892,
4660,
29922,
10493,
5709,
29889,
6632,
29918,
22412,
3919,
29897,
13,
2
] |
setup.py | bbrzycki/bl-scint-analysis | 0 | 1609360 | <reponame>bbrzycki/bl-scint-analysis
import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='blscint',
version='0.0.1',
author='<NAME>',
author_email='<EMAIL>',
description='SETI scintillation utilities',
long_description=long_description,
long_description_content_type='text/markdown',
# url='https://github.com/bbrzycki/setigen',
# project_urls={
# 'Documentation': 'https://setigen.readthedocs.io/en/latest/',
# 'Source': 'https://github.com/bbrzycki/setigen'
# },
packages=setuptools.find_packages(),
include_package_data=True,
install_requires=[
'numpy>=1.18.1',
'scipy>=1.4.1',
'astropy>=4.0',
'blimpy>=2.0.0',
'setigen>=2.0.6',
'galpy>=1.7.2',
'matplotlib>=3.1.3',
'seaborn>=0.11.2',
'pandas>=1.4.2',
'tqdm>=4.47.0',
'sphinx-rtd-theme>=0.4.3'
],
# dependency_links=['https://github.com/h5py/h5py',
# 'https://github.com/kiyo-masui/bitshuffle'],
classifiers=(
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
),
)
| [
1,
529,
276,
1112,
420,
29958,
29890,
1182,
1537,
22736,
29914,
2204,
29899,
1557,
524,
29899,
15916,
13,
5215,
731,
21245,
8789,
13,
13,
2541,
1722,
877,
16310,
2303,
29889,
3487,
742,
525,
29878,
1495,
408,
285,
29882,
29901,
13,
1678,
1472,
29918,
8216,
353,
285,
29882,
29889,
949,
580,
13,
13,
842,
21245,
8789,
29889,
14669,
29898,
13,
1678,
1024,
2433,
2204,
1557,
524,
742,
13,
1678,
1873,
2433,
29900,
29889,
29900,
29889,
29896,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
6139,
2433,
10490,
29902,
885,
524,
453,
362,
3667,
1907,
742,
13,
1678,
1472,
29918,
8216,
29922,
5426,
29918,
8216,
29892,
13,
1678,
1472,
29918,
8216,
29918,
3051,
29918,
1853,
2433,
726,
29914,
3502,
3204,
742,
13,
29937,
268,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
29890,
1182,
1537,
22736,
29914,
842,
2101,
742,
13,
29937,
268,
2060,
29918,
26045,
3790,
13,
29937,
308,
525,
6268,
362,
2396,
525,
991,
597,
842,
2101,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
29937,
308,
525,
4435,
2396,
525,
991,
597,
3292,
29889,
510,
29914,
29890,
1182,
1537,
22736,
29914,
842,
2101,
29915,
13,
29937,
268,
2981,
13,
1678,
9741,
29922,
842,
21245,
8789,
29889,
2886,
29918,
8318,
3285,
13,
1678,
3160,
29918,
5113,
29918,
1272,
29922,
5574,
29892,
13,
1678,
2601,
29918,
276,
339,
2658,
11759,
13,
539,
525,
23749,
18572,
29896,
29889,
29896,
29947,
29889,
29896,
742,
13,
539,
525,
26167,
2272,
18572,
29896,
29889,
29946,
29889,
29896,
742,
13,
539,
525,
579,
14441,
18572,
29946,
29889,
29900,
742,
13,
539,
525,
2204,
326,
2272,
18572,
29906,
29889,
29900,
29889,
29900,
742,
13,
539,
525,
842,
2101,
18572,
29906,
29889,
29900,
29889,
29953,
742,
13,
539,
525,
23014,
2272,
18572,
29896,
29889,
29955,
29889,
29906,
742,
13,
539,
525,
2922,
17357,
18572,
29941,
29889,
29896,
29889,
29941,
742,
13,
539,
525,
344,
370,
1398,
18572,
29900,
29889,
29896,
29896,
29889,
29906,
742,
13,
539,
525,
15112,
18572,
29896,
29889,
29946,
29889,
29906,
742,
13,
539,
525,
29873,
29939,
18933,
18572,
29946,
29889,
29946,
29955,
29889,
29900,
742,
13,
539,
525,
29879,
561,
14668,
29899,
29878,
1594,
29899,
18193,
18572,
29900,
29889,
29946,
29889,
29941,
29915,
13,
1678,
21251,
13,
29937,
268,
10609,
29918,
4965,
29922,
1839,
991,
597,
3292,
29889,
510,
29914,
29882,
29945,
2272,
29914,
29882,
29945,
2272,
742,
13,
29937,
462,
539,
525,
991,
597,
3292,
29889,
510,
29914,
1984,
9029,
29899,
8247,
1481,
29914,
2966,
845,
21897,
7464,
13,
1678,
770,
14903,
7607,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
742,
13,
4706,
525,
29931,
293,
1947,
4761,
438,
5425,
28268,
1490,
4761,
341,
1806,
19245,
742,
13,
4706,
525,
7094,
1218,
2184,
4761,
6570,
25266,
742,
13,
1678,
10353,
13,
29897,
13,
2
] |
exerc010.py | RafaelGomesXavier/ExerciciosPython | 0 | 189965 | # Crie um programa que leia quanto dinheiro uma pessoa tem na carteira e mostre quantos dólares ela pode comprar.
#considerando dólar a 3,27
dinheiro = float(input('Digite o valor em Reais para conversão em Dólares: '))
dolar = 3.27
soma = dinheiro/dolar
print('Com o valor de R$ {:.2f}, você pode comprar ${:.2f}.'.format(dinheiro, soma)) | [
1,
396,
315,
2546,
1922,
16914,
712,
454,
423,
18600,
4538,
354,
3350,
3672,
23109,
29874,
1350,
1055,
20206,
3055,
321,
1556,
276,
4323,
359,
270,
29980,
4675,
267,
25192,
13279,
7199,
279,
22993,
13,
29937,
3200,
1241,
1743,
270,
29980,
4675,
263,
29871,
29941,
29892,
29906,
29955,
30004,
13,
30004,
13,
24581,
354,
3350,
353,
5785,
29898,
2080,
877,
14991,
568,
288,
16497,
953,
830,
1759,
1702,
9678,
1368,
953,
360,
29980,
4675,
267,
29901,
525,
876,
30004,
13,
29881,
10170,
353,
29871,
29941,
29889,
29906,
29955,
30004,
13,
29879,
4125,
353,
4538,
354,
3350,
29914,
29881,
10170,
30004,
13,
2158,
877,
1523,
288,
16497,
316,
390,
29938,
12365,
29889,
29906,
29888,
1118,
7931,
30037,
13279,
7199,
279,
6435,
29901,
29889,
29906,
29888,
1836,
4286,
4830,
29898,
24581,
354,
3350,
29892,
1047,
29874,
876,
2
] |
testing/utils.py | grantsrb/planet | 0 | 43243 |
class RigPacket:
def __init__(self, velocity=0, direction=0):
self.velocity = velocity
self.direction = direction
| [
1,
29871,
13,
1990,
390,
335,
16638,
300,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
12885,
29922,
29900,
29892,
5305,
29922,
29900,
1125,
13,
4706,
1583,
29889,
955,
25245,
353,
12885,
13,
4706,
1583,
29889,
20845,
353,
5305,
13,
13,
2
] |
lib/davis/python/lib/davis/measures/t_stability.py | varunjampani/video_prop_networks | 99 | 137997 |
import cv2
import sys
import numpy as np
import scipy.spatial.distance as ssd
from tstab import *
def get_bijective_pairs(pairs,costmat):
bij_pairs = bij_pairs_one_dim(pairs, costmat,0)
bij_pairs = bij_pairs_one_dim(bij_pairs, costmat.T,1)
return bij_pairs
def bij_pairs_one_dim(pairs, costmat, left_or_right):
bij_pairs = []
ids1 = np.unique(pairs[:,left_or_right])
for ii in range(len(ids1)):
curr_pairs = pairs[pairs[:,left_or_right]==ids1[ii],:].astype(np.int)
curr_costs = costmat[curr_pairs[:,left_or_right], curr_pairs[:,1-left_or_right]]
b = np.argmin(curr_costs)
bij_pairs.append(curr_pairs[b])
return np.array(bij_pairs)
def hist_cost_2(BH1,BH2):
nsamp1,nbins=BH1.shape
nsamp2,nbins=BH2.shape
eps = 2.2204e-16
BH1n = BH1 / (np.sum(BH1,axis=1,keepdims=True)+eps)
BH2n = BH2 / (np.sum(BH2,axis=1,keepdims=True)+eps)
tmp1 = np.tile(np.transpose(np.atleast_3d(BH1n),[0,2,1]),(1,nsamp2,1))
tmp2 = np.tile(np.transpose(np.atleast_3d(BH2n.T),[2,1,0]),(nsamp1,1,1))
HC = 0.5*np.sum((tmp1-tmp2)**2/(tmp1+tmp2+eps),axis=2)
return HC
def sc_compute(Bsamp,Tsamp,mean_dist,nbins_theta,nbins_r,r_inner,r_outer,out_vec):
in_vec = (out_vec==0).ravel()
nsamp = Bsamp.shape[1]
r_array=ssd.squareform(ssd.pdist(Bsamp.T)).T
theta_array_abs0=Bsamp[1,:].reshape(-1,1).dot(np.ones((1,nsamp))) - \
np.ones((nsamp,1)).dot(Bsamp[1,:].reshape(1,-1))
theta_array_abs1=Bsamp[0,:].reshape(-1,1).dot(np.ones((1,nsamp))) - \
np.ones((nsamp,1)).dot(Bsamp[0,:].reshape(1,-1))
theta_array_abs = np.arctan2(theta_array_abs0,theta_array_abs1).T
theta_array=theta_array_abs-Tsamp.T.dot(np.ones((1,nsamp)))
if mean_dist is None:
mean_dist = np.mean(r_array[in_vec].T[in_vec].T)
r_array_n = r_array / mean_dist
r_bin_edges=np.logspace(np.log10(r_inner),np.log10(r_outer),nbins_r)
r_array_q=np.zeros((nsamp,nsamp))
for m in range(int(nbins_r)):
r_array_q=r_array_q+(r_array_n<r_bin_edges[m])
fz = r_array_q > 0
theta_array_2 = np.fmod(np.fmod(theta_array,2*np.pi)+2*np.pi,2*np.pi)
theta_array_q = 1+np.floor(theta_array_2/(2*np.pi/nbins_theta))
nbins=nbins_theta*nbins_r
BH=np.zeros((nsamp,nbins))
count = 0
for n in range(nsamp):
fzn=fz[n]&in_vec
Sn = np.zeros((nbins_theta,nbins_r))
coords = np.hstack((theta_array_q[n,fzn].reshape(-1,1),
r_array_q[n,fzn].astype(np.int).reshape(-1,1)))
# SLOW...
#for i,j in coords:
#Sn[i-1,j-1] += 1
# FASTER
ids = np.ravel_multi_index((coords.T-1).astype(np.int),Sn.shape)
Sn = np.bincount(ids.ravel(),minlength = np.prod(Sn.shape)).reshape(Sn.shape)
BH[n,:] = Sn.T[:].ravel()
return BH.astype(np.int),mean_dist
def db_eval_t_stab(fgmask,ground_truth,timing=True):
"""
Calculates the temporal stability index between two masks
Arguments:
fgmask (ndarray): Foreground Object mask at frame t
ground_truth (ndarray): Foreground Object mask at frame t+1
Return:
T (ndarray): Temporal (in-)stability
raw_results (ndarray): Supplemental values
"""
cont_th = 3
cont_th_up = 3
# Shape context parameters
r_inner = 1.0/8.0
r_outer = 2.0
nbins_r = 5.0
nbins_theta = 12.0
poly1 = mask2poly(fgmask,cont_th)
poly2 = mask2poly(ground_truth,cont_th)
if len(poly1.contour_coords) == 0 or \
len(poly2.contour_coords) == 0:
return np.nan
Cs1 = get_longest_cont(poly1.contour_coords)
Cs2 = get_longest_cont(poly2.contour_coords)
upCs1 = contour_upsample(Cs1,cont_th_up)
upCs2 = contour_upsample(Cs2,cont_th_up)
scs1,_=sc_compute(upCs1.T,np.zeros((1,upCs1.shape[0])),None,
nbins_theta,nbins_r,r_inner,r_outer,np.zeros((1,upCs1.shape[0])))
scs2,_=sc_compute(upCs2.T,np.zeros((1,upCs2.shape[0])),None,
nbins_theta,nbins_r,r_inner,r_outer,np.zeros((1,upCs2.shape[0])))
# Match with the 0-0 alignment
costmat = hist_cost_2(scs1,scs2)
pairs ,max_sx,max_sy = match_dijkstra(np.ascontiguousarray(costmat))
# Shift costmat
costmat2 = np.roll(costmat ,-(max_sy+1),axis=1)
costmat2 = np.roll(costmat2,-(max_sx+1),axis=0)
# Redo again with the correct alignment
pairs,_,_ = match_dijkstra(costmat2)
# Put the pairs back to the original place
pairs[:,0] = np.mod(pairs[:,0]+max_sx+1, costmat.shape[0])
pairs[:,1] = np.mod(pairs[:,1]+max_sy+1, costmat.shape[1])
pairs = get_bijective_pairs(pairs,costmat)
pairs_cost = costmat[pairs[:,0], pairs[:,1]]
min_cost = np.average(pairs_cost)
return min_cost
| [
1,
29871,
13,
5215,
13850,
29906,
13,
5215,
10876,
13,
5215,
12655,
408,
7442,
13,
5215,
4560,
2272,
29889,
1028,
15238,
29889,
19244,
408,
269,
4928,
13,
3166,
260,
29256,
1053,
334,
13,
13,
1753,
679,
29918,
5365,
25674,
29918,
29886,
7121,
29898,
29886,
7121,
29892,
18253,
2922,
1125,
13,
12,
19352,
29918,
29886,
7121,
353,
5928,
29918,
29886,
7121,
29918,
650,
29918,
6229,
29898,
29886,
7121,
29892,
3438,
2922,
29892,
29900,
29897,
13,
12,
19352,
29918,
29886,
7121,
353,
5928,
29918,
29886,
7121,
29918,
650,
29918,
6229,
29898,
19352,
29918,
29886,
7121,
29892,
3438,
2922,
29889,
29911,
29892,
29896,
29897,
13,
12,
2457,
5928,
29918,
29886,
7121,
13,
13,
1753,
5928,
29918,
29886,
7121,
29918,
650,
29918,
6229,
29898,
29886,
7121,
29892,
3438,
2922,
29892,
2175,
29918,
272,
29918,
1266,
1125,
13,
13,
12,
19352,
29918,
29886,
7121,
353,
5159,
13,
12,
4841,
29896,
418,
353,
7442,
29889,
13092,
29898,
29886,
7121,
7503,
29892,
1563,
29918,
272,
29918,
1266,
2314,
13,
13,
12,
1454,
13607,
297,
3464,
29898,
2435,
29898,
4841,
29896,
22164,
13,
12,
12,
21962,
29918,
29886,
7121,
353,
11000,
29961,
29886,
7121,
7503,
29892,
1563,
29918,
272,
29918,
1266,
29962,
1360,
4841,
29896,
29961,
2236,
1402,
29901,
1822,
579,
668,
29898,
9302,
29889,
524,
29897,
13,
12,
12,
21962,
29918,
18253,
29879,
353,
3438,
2922,
29961,
21962,
29918,
29886,
7121,
7503,
29892,
1563,
29918,
272,
29918,
1266,
1402,
16256,
29918,
29886,
7121,
7503,
29892,
29896,
29899,
1563,
29918,
272,
29918,
1266,
5262,
13,
12,
12,
29890,
353,
7442,
29889,
1191,
1195,
29898,
21962,
29918,
18253,
29879,
29897,
13,
12,
12,
19352,
29918,
29886,
7121,
29889,
4397,
29898,
21962,
29918,
29886,
7121,
29961,
29890,
2314,
13,
13,
12,
2457,
7442,
29889,
2378,
29898,
19352,
29918,
29886,
7121,
29897,
13,
13,
1753,
9825,
29918,
18253,
29918,
29906,
29898,
29933,
29950,
29896,
29892,
29933,
29950,
29906,
1125,
13,
13,
12,
1983,
1160,
29896,
29892,
9877,
1144,
29922,
29933,
29950,
29896,
29889,
12181,
13,
12,
1983,
1160,
29906,
29892,
9877,
1144,
29922,
29933,
29950,
29906,
29889,
12181,
13,
13,
12,
8961,
29871,
353,
29871,
29906,
29889,
29906,
29906,
29900,
29946,
29872,
29899,
29896,
29953,
13,
12,
29933,
29950,
29896,
29876,
353,
350,
29950,
29896,
847,
313,
9302,
29889,
2083,
29898,
29933,
29950,
29896,
29892,
8990,
29922,
29896,
29892,
17462,
6229,
29879,
29922,
5574,
7240,
8961,
29897,
13,
12,
29933,
29950,
29906,
29876,
353,
350,
29950,
29906,
847,
313,
9302,
29889,
2083,
29898,
29933,
29950,
29906,
29892,
8990,
29922,
29896,
29892,
17462,
6229,
29879,
29922,
5574,
7240,
8961,
29897,
13,
13,
12,
7050,
29896,
353,
7442,
29889,
29873,
488,
29898,
9302,
29889,
3286,
4220,
29898,
9302,
29889,
271,
280,
579,
29918,
29941,
29881,
29898,
29933,
29950,
29896,
29876,
511,
29961,
29900,
29892,
29906,
29892,
29896,
11724,
29898,
29896,
29892,
1983,
1160,
29906,
29892,
29896,
876,
13,
12,
7050,
29906,
353,
7442,
29889,
29873,
488,
29898,
9302,
29889,
3286,
4220,
29898,
9302,
29889,
271,
280,
579,
29918,
29941,
29881,
29898,
29933,
29950,
29906,
29876,
29889,
29911,
511,
29961,
29906,
29892,
29896,
29892,
29900,
11724,
29898,
1983,
1160,
29896,
29892,
29896,
29892,
29896,
876,
13,
12,
19127,
353,
29871,
29900,
29889,
29945,
29930,
9302,
29889,
2083,
3552,
7050,
29896,
29899,
7050,
29906,
29897,
1068,
29906,
14571,
7050,
29896,
29974,
7050,
29906,
29974,
8961,
511,
8990,
29922,
29906,
29897,
13,
13,
12,
2457,
379,
29907,
13,
13,
1753,
885,
29918,
26017,
29898,
29933,
29879,
1160,
29892,
29911,
29879,
1160,
29892,
12676,
29918,
5721,
29892,
9877,
1144,
29918,
3416,
29892,
9877,
1144,
29918,
29878,
29892,
29878,
29918,
3993,
29892,
29878,
29918,
5561,
29892,
449,
29918,
2003,
1125,
13,
12,
262,
29918,
2003,
353,
313,
449,
29918,
2003,
1360,
29900,
467,
336,
955,
580,
13,
12,
1983,
1160,
353,
350,
29879,
1160,
29889,
12181,
29961,
29896,
29962,
13,
12,
29878,
29918,
2378,
29922,
893,
29881,
29889,
17619,
689,
29898,
893,
29881,
29889,
29886,
5721,
29898,
29933,
29879,
1160,
29889,
29911,
8106,
29911,
13,
13,
12,
3416,
29918,
2378,
29918,
6897,
29900,
29922,
29933,
29879,
1160,
29961,
29896,
29892,
29901,
1822,
690,
14443,
6278,
29896,
29892,
29896,
467,
6333,
29898,
9302,
29889,
2873,
3552,
29896,
29892,
1983,
1160,
4961,
448,
320,
13,
12,
12,
12,
9302,
29889,
2873,
3552,
1983,
1160,
29892,
29896,
8106,
6333,
29898,
29933,
29879,
1160,
29961,
29896,
29892,
29901,
1822,
690,
14443,
29898,
29896,
6653,
29896,
876,
13,
13,
12,
3416,
29918,
2378,
29918,
6897,
29896,
29922,
29933,
29879,
1160,
29961,
29900,
29892,
29901,
1822,
690,
14443,
6278,
29896,
29892,
29896,
467,
6333,
29898,
9302,
29889,
2873,
3552,
29896,
29892,
1983,
1160,
4961,
448,
320,
13,
12,
12,
12,
9302,
29889,
2873,
3552,
1983,
1160,
29892,
29896,
8106,
6333,
29898,
29933,
29879,
1160,
29961,
29900,
29892,
29901,
1822,
690,
14443,
29898,
29896,
6653,
29896,
876,
13,
13,
12,
3416,
29918,
2378,
29918,
6897,
353,
7442,
29889,
27014,
273,
29906,
29898,
3416,
29918,
2378,
29918,
6897,
29900,
29892,
3416,
29918,
2378,
29918,
6897,
29896,
467,
29911,
13,
12,
3416,
29918,
2378,
29922,
3416,
29918,
2378,
29918,
6897,
29899,
29911,
29879,
1160,
29889,
29911,
29889,
6333,
29898,
9302,
29889,
2873,
3552,
29896,
29892,
1983,
1160,
4961,
13,
13,
12,
361,
2099,
29918,
5721,
338,
6213,
29901,
13,
12,
12,
12676,
29918,
5721,
353,
7442,
29889,
12676,
29898,
29878,
29918,
2378,
29961,
262,
29918,
2003,
1822,
29911,
29961,
262,
29918,
2003,
1822,
29911,
29897,
13,
13,
12,
29878,
29918,
2378,
29918,
29876,
353,
364,
29918,
2378,
847,
2099,
29918,
5721,
13,
13,
12,
29878,
29918,
2109,
29918,
287,
2710,
29922,
9302,
29889,
1188,
3493,
29898,
9302,
29889,
1188,
29896,
29900,
29898,
29878,
29918,
3993,
511,
9302,
29889,
1188,
29896,
29900,
29898,
29878,
29918,
5561,
511,
9877,
1144,
29918,
29878,
29897,
13,
12,
29878,
29918,
2378,
29918,
29939,
29922,
9302,
29889,
3298,
359,
3552,
1983,
1160,
29892,
1983,
1160,
876,
13,
13,
12,
1454,
286,
297,
3464,
29898,
524,
29898,
9877,
1144,
29918,
29878,
22164,
13,
12,
12,
29878,
29918,
2378,
29918,
29939,
29922,
29878,
29918,
2378,
29918,
29939,
17108,
29878,
29918,
2378,
29918,
29876,
29966,
29878,
29918,
2109,
29918,
287,
2710,
29961,
29885,
2314,
13,
13,
12,
29888,
29920,
353,
364,
29918,
2378,
29918,
29939,
1405,
29871,
29900,
13,
12,
3416,
29918,
2378,
29918,
29906,
353,
7442,
29889,
29888,
1545,
29898,
9302,
29889,
29888,
1545,
29898,
3416,
29918,
2378,
29892,
29906,
29930,
9302,
29889,
1631,
7240,
29906,
29930,
9302,
29889,
1631,
29892,
29906,
29930,
9302,
29889,
1631,
29897,
13,
12,
3416,
29918,
2378,
29918,
29939,
353,
29871,
29896,
29974,
9302,
29889,
14939,
29898,
3416,
29918,
2378,
29918,
29906,
14571,
29906,
29930,
9302,
29889,
1631,
29914,
9877,
1144,
29918,
3416,
876,
13,
13,
12,
9877,
1144,
29922,
9877,
1144,
29918,
3416,
29930,
9877,
1144,
29918,
29878,
13,
12,
29933,
29950,
29922,
9302,
29889,
3298,
359,
3552,
1983,
1160,
29892,
9877,
1144,
876,
13,
12,
2798,
353,
29871,
29900,
13,
12,
1454,
302,
297,
3464,
29898,
1983,
1160,
1125,
13,
12,
12,
29888,
3749,
29922,
29888,
29920,
29961,
29876,
29962,
29987,
262,
29918,
2003,
13,
12,
12,
29903,
29876,
353,
7442,
29889,
3298,
359,
3552,
9877,
1144,
29918,
3416,
29892,
9877,
1144,
29918,
29878,
876,
13,
12,
12,
1111,
4339,
353,
7442,
29889,
29882,
1429,
3552,
3416,
29918,
2378,
29918,
29939,
29961,
29876,
29892,
29888,
3749,
1822,
690,
14443,
6278,
29896,
29892,
29896,
511,
13,
12,
12,
12,
29878,
29918,
2378,
29918,
29939,
29961,
29876,
29892,
29888,
3749,
1822,
579,
668,
29898,
9302,
29889,
524,
467,
690,
14443,
6278,
29896,
29892,
29896,
4961,
13,
13,
12,
12,
29937,
317,
27998,
856,
13,
12,
12,
29937,
1454,
474,
29892,
29926,
297,
1302,
4339,
29901,
13,
12,
12,
12,
29937,
29903,
29876,
29961,
29875,
29899,
29896,
29892,
29926,
29899,
29896,
29962,
4619,
29871,
29896,
13,
13,
12,
12,
29937,
13515,
1254,
1001,
13,
12,
12,
4841,
353,
7442,
29889,
336,
955,
29918,
9910,
29918,
2248,
3552,
1111,
4339,
29889,
29911,
29899,
29896,
467,
579,
668,
29898,
9302,
29889,
524,
511,
29903,
29876,
29889,
12181,
29897,
13,
12,
12,
29903,
29876,
29871,
353,
7442,
29889,
2109,
2798,
29898,
4841,
29889,
336,
955,
3285,
1195,
2848,
353,
7442,
29889,
10633,
29898,
29903,
29876,
29889,
12181,
8106,
690,
14443,
29898,
29903,
29876,
29889,
12181,
29897,
13,
13,
13,
12,
12,
29933,
29950,
29961,
29876,
29892,
17531,
353,
22639,
29889,
29911,
7503,
1822,
336,
955,
580,
13,
13,
12,
2457,
350,
29950,
29889,
579,
668,
29898,
9302,
29889,
524,
511,
12676,
29918,
5721,
13,
13,
1753,
4833,
29918,
14513,
29918,
29873,
29918,
29256,
29898,
16434,
13168,
29892,
2057,
29918,
509,
2806,
29892,
9346,
292,
29922,
5574,
1125,
13,
12,
15945,
29908,
13,
13,
12,
27065,
1078,
278,
25406,
25806,
2380,
1546,
1023,
11105,
29879,
13,
13,
12,
26915,
29901,
13,
12,
12,
12,
12,
12,
16434,
13168,
313,
299,
2378,
1125,
29871,
1152,
18128,
4669,
11105,
472,
3515,
260,
13,
12,
12,
2057,
29918,
509,
2806,
313,
299,
2378,
1125,
29871,
1152,
18128,
4669,
11105,
472,
3515,
260,
29974,
29896,
13,
13,
12,
11609,
29901,
13,
12,
12,
12,
12,
12,
12,
12,
323,
313,
299,
2378,
1125,
29871,
6789,
1971,
284,
313,
262,
15805,
303,
3097,
13,
12,
259,
10650,
29918,
9902,
313,
299,
2378,
1125,
29871,
9179,
944,
284,
1819,
13,
12,
15945,
29908,
13,
13,
12,
1285,
29918,
386,
353,
29871,
29941,
13,
12,
1285,
29918,
386,
29918,
786,
353,
29871,
29941,
13,
13,
12,
29937,
1383,
4085,
3030,
4128,
13,
12,
29878,
29918,
3993,
268,
353,
29871,
29896,
29889,
29900,
29914,
29947,
29889,
29900,
13,
12,
29878,
29918,
5561,
268,
353,
29871,
29906,
29889,
29900,
13,
12,
9877,
1144,
29918,
29878,
268,
353,
29871,
29945,
29889,
29900,
13,
12,
9877,
1144,
29918,
3416,
353,
29871,
29896,
29906,
29889,
29900,
13,
13,
12,
22678,
29896,
353,
11105,
29906,
22678,
29898,
16434,
13168,
29892,
1285,
29918,
386,
29897,
13,
12,
22678,
29906,
353,
11105,
29906,
22678,
29898,
2057,
29918,
509,
2806,
29892,
1285,
29918,
386,
29897,
13,
13,
12,
361,
7431,
29898,
22678,
29896,
29889,
1285,
473,
29918,
1111,
4339,
29897,
1275,
29871,
29900,
470,
320,
13,
12,
12,
12,
2435,
29898,
22678,
29906,
29889,
1285,
473,
29918,
1111,
4339,
29897,
1275,
29871,
29900,
29901,
13,
12,
12,
2457,
7442,
29889,
13707,
13,
13,
12,
29907,
29879,
29896,
353,
679,
29918,
5426,
342,
29918,
1285,
29898,
22678,
29896,
29889,
1285,
473,
29918,
1111,
4339,
29897,
13,
12,
29907,
29879,
29906,
353,
679,
29918,
5426,
342,
29918,
1285,
29898,
22678,
29906,
29889,
1285,
473,
29918,
1111,
4339,
29897,
13,
13,
12,
786,
29907,
29879,
29896,
353,
640,
473,
29918,
14340,
981,
29898,
29907,
29879,
29896,
29892,
1285,
29918,
386,
29918,
786,
29897,
13,
12,
786,
29907,
29879,
29906,
353,
640,
473,
29918,
14340,
981,
29898,
29907,
29879,
29906,
29892,
1285,
29918,
386,
29918,
786,
29897,
13,
13,
12,
1557,
29879,
29896,
29892,
29918,
29922,
1557,
29918,
26017,
29898,
786,
29907,
29879,
29896,
29889,
29911,
29892,
9302,
29889,
3298,
359,
3552,
29896,
29892,
786,
29907,
29879,
29896,
29889,
12181,
29961,
29900,
2314,
511,
8516,
29892,
13,
12,
12,
12,
9877,
1144,
29918,
3416,
29892,
9877,
1144,
29918,
29878,
29892,
29878,
29918,
3993,
29892,
29878,
29918,
5561,
29892,
9302,
29889,
3298,
359,
3552,
29896,
29892,
786,
29907,
29879,
29896,
29889,
12181,
29961,
29900,
29962,
4961,
13,
13,
12,
1557,
29879,
29906,
29892,
29918,
29922,
1557,
29918,
26017,
29898,
786,
29907,
29879,
29906,
29889,
29911,
29892,
9302,
29889,
3298,
359,
3552,
29896,
29892,
786,
29907,
29879,
29906,
29889,
12181,
29961,
29900,
2314,
511,
8516,
29892,
13,
12,
12,
12,
9877,
1144,
29918,
3416,
29892,
9877,
1144,
29918,
29878,
29892,
29878,
29918,
3993,
29892,
29878,
29918,
5561,
29892,
9302,
29889,
3298,
359,
3552,
29896,
29892,
786,
29907,
29879,
29906,
29889,
12181,
29961,
29900,
29962,
4961,
13,
13,
12,
29937,
14514,
411,
278,
29871,
29900,
29899,
29900,
22239,
13,
12,
18253,
2922,
795,
353,
9825,
29918,
18253,
29918,
29906,
29898,
1557,
29879,
29896,
29892,
1557,
29879,
29906,
29897,
13,
12,
29886,
7121,
1919,
3317,
29918,
29879,
29916,
29892,
3317,
29918,
29879,
29891,
353,
1993,
29918,
29881,
13535,
4151,
29898,
9302,
29889,
294,
1285,
5526,
681,
2378,
29898,
18253,
2922,
876,
13,
13,
13,
12,
29937,
1383,
2027,
3438,
2922,
13,
12,
18253,
2922,
29906,
353,
7442,
29889,
1245,
29898,
18253,
2922,
1919,
17722,
3317,
29918,
29879,
29891,
29974,
29896,
511,
8990,
29922,
29896,
29897,
13,
12,
18253,
2922,
29906,
353,
7442,
29889,
1245,
29898,
18253,
2922,
29906,
6653,
29898,
3317,
29918,
29879,
29916,
29974,
29896,
511,
8990,
29922,
29900,
29897,
13,
13,
12,
29937,
4367,
29877,
1449,
411,
278,
1959,
22239,
13,
12,
29886,
7121,
29892,
3383,
29918,
353,
1993,
29918,
29881,
13535,
4151,
29898,
18253,
2922,
29906,
29897,
13,
13,
12,
29937,
12065,
278,
11000,
1250,
304,
278,
2441,
2058,
13,
12,
29886,
7121,
7503,
29892,
29900,
29962,
353,
7442,
29889,
1545,
29898,
29886,
7121,
7503,
29892,
29900,
10062,
3317,
29918,
29879,
29916,
29974,
29896,
29892,
3438,
2922,
29889,
12181,
29961,
29900,
2314,
13,
12,
29886,
7121,
7503,
29892,
29896,
29962,
353,
7442,
29889,
1545,
29898,
29886,
7121,
7503,
29892,
29896,
10062,
3317,
29918,
29879,
29891,
29974,
29896,
29892,
3438,
2922,
29889,
12181,
29961,
29896,
2314,
13,
13,
12,
29886,
7121,
353,
679,
29918,
5365,
25674,
29918,
29886,
7121,
29898,
29886,
7121,
29892,
18253,
2922,
29897,
13,
13,
12,
29886,
7121,
29918,
18253,
353,
3438,
2922,
29961,
29886,
7121,
7503,
29892,
29900,
1402,
11000,
7503,
29892,
29896,
5262,
13,
12,
1195,
29918,
18253,
259,
353,
7442,
29889,
12483,
482,
29898,
29886,
7121,
29918,
18253,
29897,
13,
13,
12,
2457,
1375,
29918,
18253,
13,
2
] |
0290.word_pattern/solution.py | WZMJ/Algorithms | 5 | 128440 | <filename>0290.word_pattern/solution.py
class Solution:
def word_pattern(self, pattern: str, str: str) -> bool:
words = str.split(" ")
return len(pattern) == len(words) and len(set(pattern)) == len(set(words)) == len(set(zip(pattern, words)))
| [
1,
529,
9507,
29958,
29900,
29906,
29929,
29900,
29889,
1742,
29918,
11037,
29914,
2929,
918,
29889,
2272,
13,
1990,
24380,
29901,
13,
1678,
822,
1734,
29918,
11037,
29898,
1311,
29892,
4766,
29901,
851,
29892,
851,
29901,
851,
29897,
1599,
6120,
29901,
13,
4706,
3838,
353,
851,
29889,
5451,
703,
16521,
13,
4706,
736,
7431,
29898,
11037,
29897,
1275,
7431,
29898,
9303,
29897,
322,
7431,
29898,
842,
29898,
11037,
876,
1275,
7431,
29898,
842,
29898,
9303,
876,
1275,
7431,
29898,
842,
29898,
7554,
29898,
11037,
29892,
3838,
4961,
13,
2
] |
classic_NN/nn.py | disooqi/learning-machine-learning | 1 | 16095 | <filename>classic_NN/nn.py<gh_stars>1-10
import numpy as np
from scipy.special import expit, logit
import time
import logging
np.random.seed(4) # 4
logger = logging.getLogger(__name__)
fr = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s')
sh = logging.StreamHandler()
# sh.setFormatter(fr)
logger.addHandler(sh)
logger.setLevel(logging.DEBUG)
logger2 = logging.getLogger('other')
file_handler = logging.FileHandler('run.log')
file_handler.setFormatter(fr)
file_handler.setLevel(logging.INFO)
logger2.addHandler(file_handler)
logger2.setLevel(logging.INFO)
class HiddenLayer:
def __init__(self):
pass
class ConvLayer(HiddenLayer):
def __init__(self):
super().__init__()
class FullyConnectedLayer(HiddenLayer):
def __init__(self, n_units, n_in, activation='sigmoid', output_layer=False, keep_prob=1):
super().__init__()
self.n_units = n_units
# It means at every iteration you shut down each neurons of the layer with "1-keep_prob" probability.
self.keep_prob = keep_prob
# todo (3): weight initialization should be in the Network class
if activation == 'sigmoid':
self.activation = self.sigmoid
self.dAdZ = self.sigmoid_prime
self._weights_initialization(n_in)
elif activation == 'relu':
self.activation = self.relu
self.dAdZ = self.relu_prime
self._He_initialization(n_in)
elif activation == 'tanh':
self.activation = self.tanh
self.dAdZ = self.tanh_prime
self._Xavier_initialization(n_in)
elif activation == 'leaky_relu':
self.activation = self.leaky_relu
self.dAdZ = self.leaky_relu_prime
self._He_initialization(n_in)
self.activation_type = activation
self.output_layer = output_layer
def _weights_initialization(self, n_in):
# multiplying W by a small number makes the learning fast
# however from a practical point of view when multiplied by 0.01 using l>2 the NN does not converge
# that is beacuse it runs into gradients vanishing problem
self.W = np.random.randn(self.n_units, n_in) * 0.01
self.b = np.zeros((self.n_units, 1))
def _He_initialization(self, n_in):
self.W = np.random.randn(self.n_units, n_in) * np.sqrt(2 / n_in)
self.b = np.zeros((self.n_units, 1))
def _Xavier_initialization(self, n_in):
"""Initialize weight W using Xavier Initialization
So if the input features of activations are roughly mean 0 and standard variance and variance 1 then this would
cause z to also take on a similar scale and this doesn't solve, but it definitely helps reduce the vanishing,
exploding gradients problem because it's trying to set each of the weight matrices W so that it's not
too much bigger than 1 and not too much less than 1 so it doesn't explode or vanish too quickly.
"""
self.W = np.random.randn(self.n_units, n_in) * np.sqrt(1 / n_in)
self.b = np.zeros((self.n_units, 1))
def _Benjio_initialization(self, n_in):
self.W = np.random.randn(self.n_units, n_in) * np.sqrt(2 / (n_in + self.n_units))
self.b = np.zeros((self.n_units, 1))
@staticmethod
def softmax(Z):
"""Compute softmax of Matrix Z
:param Z: is in the shape of (n * m), where n is the number of classes and m is the number of examples
:return:
"""
Z_exp = np.exp(Z)
return Z_exp/np.sum(Z_exp, axis=0)
@staticmethod
def stable_softmax(Z):
"""Compute the softmax of vector Z in a numerically stable way."""
shift_Z = Z - np.max(Z, axis=0)
Z_exp = np.exp(shift_Z)
return Z_exp / np.sum(Z_exp, axis=0)
@staticmethod
def softmax_prime(A):
"""N/A
https://eli.thegreenplace.net/2016/the-softmax-function-and-its-derivative/
# Kronecker delta function
:param A:
:return:
"""
pass
@staticmethod
def sigmoid(Z):
# https://docs.scipy.org/doc/scipy/reference/generated /scipy.special.expit.html
# return 1 / (1 + np.exp(-Z))
return expit(np.clip(Z, -709, 36.73))
@classmethod
def sigmoid_prime(cls, A):
""" calculate dAdZ
:param A:
:return: dAdZ
"""
return A * (1 - A)
@staticmethod
def tanh(Z):
return (np.exp(Z) - np.exp(-Z)) / (np.exp(Z) + np.exp(-Z))
@classmethod
def tanh_prime(cls, A):
return 1 - A ** 2
@staticmethod
def relu(Z):
# a[a<0] = 0
# return np.clip(Z, 0, Z)
return np.maximum(Z, 0)
@staticmethod
def relu_prime(A):
A[A > 0] = 1
return A
@staticmethod
def leaky_relu(Z, alpha=0.01):
'''
:param Z:
:param alpha: Slope of the activation function at x < 0.
:return:
'''
# return np.clip(Z, alpha * Z, Z)
return np.where(Z < 0, alpha * Z, Z)
@staticmethod
def leaky_relu_prime(A, alpha=0.01):
return np.where(A > 0, 1, alpha)
def __repr__(self):
return 'FullyConnectedLayer(n_units={}, activation={}, output_layer={}, keep_prob={})'.format(
self.n_units, self.activation_type, self.output_layer, self.keep_prob)
class NN:
def __init__(self, n_features, n_classes):
self.n = n_features
self.n_classes = n_classes
self.layers = list()
def add_layer(self, n_units, activation='sigmoid', dropout_keep_prob=1):
if self.layers:
n_units_previous_layer = self.layers[-1].n_units
else:
n_units_previous_layer = self.n
layer = FullyConnectedLayer(n_units, n_units_previous_layer, activation=activation, keep_prob=dropout_keep_prob)
self.layers.append(layer)
def add_output_layer(self):
if not self.layers:
self.add_layer(self.n_classes, activation='sigmoid')
self.layers[-1].output_layer = True
if not self.layers[-1].output_layer:
self.add_layer(self.n_classes, activation='sigmoid')
self.layers[-1].output_layer = True
else:
# TODO: you should raise an error and message that says you need to delete existing output_layer
pass
@staticmethod
def _calculate_single_layer_gradients(dLdA, layer_cache, compute_dLdA_1=True):
'''
:param dJdA:
:return: dJdA_1, dJdW, dJdb
'''
# For the first iteration where loss is cross entropy and activation func of output layer
# is sigmoid, that could be shorten to,
# dZ[L] = A[L]-Y
# In general, you can compute dZ as follows
# dZ = dA * g'(Z) TODO: currently we pass A instead of Z, I guess it is much better to follow "A. Ng" and pass Z
# During forward propagation, you had divided A1 by keep_prob. In backpropagation, you'll therefore have to
# divide dA1 by keep_prob again (the calculus interpretation is that if A[1]A[1] is scaled by keep_prob, then
# its derivative dA[1]dA[1] is also scaled by the same keep_prob).
dLdA = np.multiply(dLdA, layer_cache.D) / layer_cache.keep_prob
dAdZ = layer_cache.dAdZ(layer_cache.A)
dLdZ = dLdA * dAdZ # Element-wise product
# dw = dz . a[l-1]
dZdW = layer_cache.A_l_1
dJdW = np.dot(dLdZ, dZdW.T) / dLdA.shape[1] # this is two steps in one line; getting dLdw and then dJdW
dJdb = np.sum(dLdZ, axis=1, keepdims=True) / dLdA.shape[1]
dLdA_1 = None
if compute_dLdA_1:
# da[l-1] = w[l].T . dz[l]
dZdA_1 = layer_cache.W
dLdA_1 = np.dot(dZdA_1.T, dLdZ) # computing dLd(A-1)
return dLdA_1, dJdW, dJdb
def accuracy(self, X, y):
# You only use dropout during training. Don't use dropout (randomly eliminate nodes) during test time.
A = X
for layer in self.layers:
Z = np.dot(layer.W, A) + layer.b
A = layer.activation(Z)
else:
y = y.argmax(axis=0) + 1
prediction = A.argmax(axis=0) + 1
res = np.equal(prediction, y)
return 100 * np.sum(res) / y.size
class Optimization:
def __init__(self, loss='cross_entropy', method='gradient-descent'):
self.method = method
self.VsnSs = list()
if loss == 'cross_entropy':
self.loss = self.cross_entropy_loss
self.activation_prime = self.cross_entropy_loss_prime
if method == 'gradient-descent':
self.optimizer = self.gradient_descent
elif method == 'gd-with-momentum':
self.optimizer = self.gradient_descent_with_momentum
elif method == 'rmsprop':
self.optimizer = self.RMSprop
elif method == 'adam':
self.optimizer = self.adam
@staticmethod
def weight_decay(m, alpha, lmbda):
# L2 Regularization
return 1 - ((alpha * lmbda) / m)
@staticmethod
def learning_rate_decay(decay_rate, epoch_num):
return 1/(1+decay_rate*epoch_num)
@staticmethod
def o_learning_rate_decay(k, epoch_num):
return k/np.sqrt(epoch_num)
@staticmethod
def exponential_learning_rate_decay(decay_rate, epoch_num):
return 0.95**epoch_num
def discrete_staircase_learning_rate_decay(self):
pass
@classmethod
def learning_rate(cls, alpha, decay_rate, epoch_num):
return cls.learning_rate_decay(decay_rate, epoch_num) * alpha
@classmethod
def gradient_descent(cls, dJdW, dJdb, W, b, m, **kwargs):
alpha0 = kwargs['alpha']
lmbda = kwargs['lmbda']
epoch_num = kwargs['epoch']
decay_rate = kwargs['decay_rate']
alpha = cls.learning_rate(alpha0, decay_rate, epoch_num)
W = cls.weight_decay(m, alpha, lmbda) * W - alpha * dJdW
b -= alpha * dJdb
return W, b
@classmethod
def gradient_descent_with_momentum(cls, dJdW, dJdb, W, b, m, **kwargs):
beta1 = kwargs['beta1']
Vs = kwargs['VS']
alpha0 = kwargs['alpha']
lmbda = kwargs['lmbda']
epoch_num = kwargs['epoch']
decay_rate = kwargs['decay_rate']
alpha = cls.learning_rate(alpha0, decay_rate, epoch_num)
Vs['Vdw'] = beta1*Vs['Vdw'] + (1-beta1)*dJdW
Vs['Vdb'] = beta1*Vs['Vdb'] + (1-beta1)*dJdb
W = cls.weight_decay(m, alpha, lmbda) * W - alpha * Vs['Vdw']
b = b - alpha * Vs['Vdb']
return W, b
@classmethod
def RMSprop(cls, dJdW, dJdb, W, b, m, **kwargs):
beta2 = kwargs['beta2']
Ss = kwargs['VS']
alpha0 = kwargs['alpha']
lmbda = kwargs['lmbda']
epoch_num = kwargs['epoch']
decay_rate = kwargs['decay_rate']
alpha = cls.learning_rate(alpha0, decay_rate, epoch_num)
epsilon = np.finfo(np.float32).eps
Ss['Sdw'] = beta2 * Ss['Sdw'] + (1 - beta2) * np.square(dJdW)
Ss['Sdb'] = beta2 * Ss['Sdb'] + (1 - beta2) * np.square(dJdb)
W = cls.weight_decay(m, alpha, lmbda)*W - alpha * (dJdW/(np.sqrt(Ss['Sdw'])+epsilon))
b = b - alpha * (dJdb/(np.sqrt(Ss['Sdb'])+epsilon))
return W, b
@classmethod
def adam(cls, dJdW, dJdb, W, b, m, **kwargs):
beta1 = kwargs['beta1']
beta2 = kwargs['beta2']
VsSs = kwargs['VS']
t = kwargs['t']
alpha0 = kwargs['alpha']
lmbda = kwargs['lmbda']
epoch_num = kwargs['epoch']
decay_rate = kwargs['decay_rate']
alpha = cls.learning_rate(alpha0, decay_rate, epoch_num)
epsilon = np.finfo(np.float32).eps
VsSs['Vdw'] = beta1 * VsSs['Vdw'] + (1 - beta1) * dJdW
VsSs['Vdb'] = beta1 * VsSs['Vdb'] + (1 - beta1) * dJdb
VsSs['Sdw'] = beta2 * VsSs['Sdw'] + (1 - beta2) * np.square(dJdW)
VsSs['Sdb'] = beta2 * VsSs['Sdb'] + (1 - beta2) * np.square(dJdb)
Vdw_corrected = VsSs['Vdw']/(1-beta1**t)
Vdb_corrected = VsSs['Vdb']/(1-beta1**t)
Sdw_corrected = VsSs['Sdw']/(1-beta2**t)
Sdb_corrected = VsSs['Sdb']/(1-beta2**t)
W = cls.weight_decay(m, alpha, lmbda) * W - alpha * (Vdw_corrected / (np.sqrt(Sdw_corrected) + epsilon))
b = b - alpha * (Vdb_corrected / (np.sqrt(Sdb_corrected) + epsilon))
return W, b
@staticmethod
def cross_entropy_loss(y, a):
# http://christopher5106.github.io/deep/learning/2016/09/16/about-loss-functions-multinomial-logistic-logarithm-cross-entropy-square-errors-euclidian-absolute-frobenius-hinge.html
# https://stats.stackexchange.com/questions/260505/machine-learning-should-i-use-a-categorical-cross-entropy-or-binary-cross-entro
# here we penalize every class even the zero ones
# the classes here are independent i.e you can reduce the error of one without affecting the other
return -(y * np.log(a) + (1 - y) * np.log(1 - a))
@staticmethod
def softmax_loss(y, a):
# here we penalize only the targeted class and this is intuitive because they are all dependent i.e. if targeted
# error is reduced the rest will give less probability because of the softmax relation
return - np.sum(y * np.log(a), axis=0, keepdims=True)
@staticmethod
def cross_entropy_loss_prime(y, a):
return -y / a + (1 - y) / (1 - a)
@staticmethod
def softmax_loss_prime(y, a):
return -np.sum(y/a)
@staticmethod
def regularization_term(network, m, lmbda):
agg = 0
for layer in network.layers:
agg = np.sum(np.square(layer.W))
else:
return (lmbda / (2 * m)) * agg
def cost(self, network, X, y, lmbda=0):
A = X
for layer in network.layers:
Z = np.dot(layer.W, A) + layer.b
A = layer.activation(Z)
else:
loss_matrix = self.loss(y, A)
sum_over_all_examples = np.sum(loss_matrix, axis=1) / loss_matrix.shape[1]
return (np.sum(sum_over_all_examples) / sum_over_all_examples.size) + self.regularization_term(network,
X.shape[1],
lmbda=lmbda)
def _update_weights(self, X, y, network, alpha, lmbda, t, beta1, beta2, decay_rate, epoch_num):
A = X
for layer in network.layers:
layer.A_l_1 = A # this is A-1 from last loop step
Z = np.dot(layer.W, A) + layer.b # (called "logits" in ML folklore)
A = layer.activation(Z)
# NB! we don't not apply dropout to the input layer or output layer.
D = np.random.rand(*A.shape) <= layer.keep_prob # dropout
A = np.multiply(A, D) / layer.keep_prob # inverted dropout
layer.D = D
layer.A = A
with np.errstate(invalid='raise'):
try:
dLdA = self.activation_prime(y, A)
except FloatingPointError:
raise
# To avoid the confusion: reversed() doesn't modify the list. reversed() doesn't make a copy of the list
# (otherwise it would require O(N) additional memory). If you need to modify the list use alist.reverse(); if
# you need a copy of the list in reversed order use alist[::-1]
for l, layer, VsnSs in zip(range(len(network.layers), 0, -1), reversed(network.layers), reversed(self.VsnSs)):
dLdA, dJdW, dJdb = network._calculate_single_layer_gradients(dLdA, layer, compute_dLdA_1=(l > 1))
layer.W, layer.b = self.optimizer(dJdW, dJdb, layer.W, layer.b, X.shape[1], alpha=alpha, lmbda=lmbda,
VS=VsnSs, beta1=beta1, beta2=beta2, t=t, decay_rate=decay_rate, epoch=epoch_num)
def minimize(self, network, epochs=1, mini_batch_size=0, learning_rate=0.1, regularization_parameter=0,
momentum=0.9, beta2=0.999, learning_rate_decay=0, dataset=None):
bef = time.time()
for layer in network.layers:
self.VsnSs.append({"Vdw": np.zeros_like(layer.W), "Vdb": np.zeros_like(layer.b),
"Sdw": np.zeros_like(layer.W), "Sdb": np.zeros_like(layer.b)})
for epoch in range(1, epochs+1):
for t, mini_batch in enumerate(dataset.next_mini_batch(size=mini_batch_size), start=1):
self._update_weights(mini_batch.X, mini_batch.y, network, learning_rate,
regularization_parameter, t, beta1=momentum, beta2=beta2, decay_rate=learning_rate_decay, epoch_num=epoch)
else:
if epoch % 10 == 0:
cost = self.cost(network, dataset.X_train, dataset.y_train, lmbda=regularization_parameter)
logger.info('epoch {} (error: {:.5f})'.format(epoch, cost))
else:
aft = time.time()
cost = self.cost(network, dataset.X_train, dataset.y_train, lmbda=regularization_parameter)
logger.debug('-' * 80)
logger.debug('| Summary')
logger.debug('-' * 80)
logger.debug('training time: {:.2f} SECs'.format(aft - bef))
logger.debug('-' * 80)
logger.debug('Finish error: {:.5f}'.format(
self.cost(network, dataset.X_train, dataset.y_train, lmbda=regularization_parameter)))
ss = ''
for i, layer in enumerate(network.layers):
ss += '\n layer# ' + str(i + 1) + ' - ' + repr(layer)
logger2.info('train error: {:.2f}, '
'time: {:.2f}SECs, '
'#layers {}, '
'#epochs: {}, '
'learning rate: {},\n'
'regularization parameter: {}, '
'mini-batch size: {}, '
'optimizer: [{}], '
'dataset: [{}, dev_size:{}, shuffle:{}], {}'.format(cost, aft - bef, len(network.layers),
epochs, learning_rate,
regularization_parameter, mini_batch_size,
self.method, dataset.name, dataset.dev_size,
dataset.shuffle, ss))
if __name__ == '__main__':
pass
| [
1,
529,
9507,
29958,
1990,
293,
29918,
10262,
29914,
15755,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
18732,
1053,
1518,
277,
29892,
1480,
277,
13,
5215,
931,
13,
5215,
12183,
13,
13,
9302,
29889,
8172,
29889,
26776,
29898,
29946,
29897,
29871,
396,
29871,
29946,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
1341,
353,
12183,
29889,
18522,
877,
29995,
29898,
294,
312,
603,
29897,
29879,
16664,
29898,
5563,
978,
29897,
29879,
16664,
29898,
4906,
29897,
29879,
1495,
13,
845,
353,
12183,
29889,
3835,
4598,
580,
13,
29937,
528,
29889,
842,
18522,
29898,
1341,
29897,
13,
21707,
29889,
1202,
4598,
29898,
845,
29897,
13,
21707,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
13,
21707,
29906,
353,
12183,
29889,
657,
16363,
877,
1228,
1495,
13,
1445,
29918,
13789,
353,
12183,
29889,
2283,
4598,
877,
3389,
29889,
1188,
1495,
13,
1445,
29918,
13789,
29889,
842,
18522,
29898,
1341,
29897,
13,
1445,
29918,
13789,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
21707,
29906,
29889,
1202,
4598,
29898,
1445,
29918,
13789,
29897,
13,
13,
21707,
29906,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
13,
13,
1990,
379,
4215,
14420,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
1281,
29894,
14420,
29898,
25108,
14420,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
13,
1990,
23004,
368,
20971,
2954,
14420,
29898,
25108,
14420,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
302,
29918,
348,
1169,
29892,
302,
29918,
262,
29892,
26229,
2433,
18816,
29885,
3398,
742,
1962,
29918,
13148,
29922,
8824,
29892,
3013,
29918,
22795,
29922,
29896,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
29876,
29918,
348,
1169,
353,
302,
29918,
348,
1169,
13,
4706,
396,
29871,
739,
2794,
472,
1432,
12541,
366,
12522,
1623,
1269,
26808,
787,
310,
278,
7546,
411,
376,
29896,
29899,
17462,
29918,
22795,
29908,
6976,
29889,
13,
4706,
1583,
29889,
17462,
29918,
22795,
353,
3013,
29918,
22795,
13,
4706,
396,
10481,
313,
29941,
1125,
7688,
17865,
881,
367,
297,
278,
8527,
770,
13,
4706,
565,
26229,
1275,
525,
18816,
29885,
3398,
2396,
13,
9651,
1583,
29889,
11236,
362,
353,
1583,
29889,
18816,
29885,
3398,
13,
9651,
1583,
29889,
29881,
3253,
29999,
353,
1583,
29889,
18816,
29885,
3398,
29918,
10080,
13,
9651,
1583,
3032,
705,
5861,
29918,
11228,
2133,
29898,
29876,
29918,
262,
29897,
13,
4706,
25342,
26229,
1275,
525,
2674,
29884,
2396,
13,
9651,
1583,
29889,
11236,
362,
353,
1583,
29889,
2674,
29884,
13,
9651,
1583,
29889,
29881,
3253,
29999,
353,
1583,
29889,
2674,
29884,
29918,
10080,
13,
9651,
1583,
3032,
3868,
29918,
11228,
2133,
29898,
29876,
29918,
262,
29897,
13,
4706,
25342,
26229,
1275,
525,
13161,
29882,
2396,
13,
9651,
1583,
29889,
11236,
362,
353,
1583,
29889,
13161,
29882,
13,
9651,
1583,
29889,
29881,
3253,
29999,
353,
1583,
29889,
13161,
29882,
29918,
10080,
13,
9651,
1583,
3032,
29990,
18852,
29918,
11228,
2133,
29898,
29876,
29918,
262,
29897,
13,
4706,
25342,
26229,
1275,
525,
280,
557,
29891,
29918,
2674,
29884,
2396,
13,
9651,
1583,
29889,
11236,
362,
353,
1583,
29889,
280,
557,
29891,
29918,
2674,
29884,
13,
9651,
1583,
29889,
29881,
3253,
29999,
353,
1583,
29889,
280,
557,
29891,
29918,
2674,
29884,
29918,
10080,
13,
9651,
1583,
3032,
3868,
29918,
11228,
2133,
29898,
29876,
29918,
262,
29897,
13,
13,
4706,
1583,
29889,
11236,
362,
29918,
1853,
353,
26229,
13,
4706,
1583,
29889,
4905,
29918,
13148,
353,
1962,
29918,
13148,
13,
13,
1678,
822,
903,
705,
5861,
29918,
11228,
2133,
29898,
1311,
29892,
302,
29918,
262,
1125,
13,
4706,
396,
6674,
5890,
399,
491,
263,
2319,
1353,
3732,
278,
6509,
5172,
13,
4706,
396,
3138,
515,
263,
15031,
1298,
310,
1776,
746,
6674,
2957,
491,
29871,
29900,
29889,
29900,
29896,
773,
301,
29958,
29906,
278,
405,
29940,
947,
451,
5486,
479,
13,
4706,
396,
393,
338,
367,
562,
1509,
372,
6057,
964,
4656,
10070,
1109,
14424,
1108,
13,
4706,
1583,
29889,
29956,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
1311,
29889,
29876,
29918,
348,
1169,
29892,
302,
29918,
262,
29897,
334,
29871,
29900,
29889,
29900,
29896,
13,
4706,
1583,
29889,
29890,
353,
7442,
29889,
3298,
359,
3552,
1311,
29889,
29876,
29918,
348,
1169,
29892,
29871,
29896,
876,
13,
13,
1678,
822,
903,
3868,
29918,
11228,
2133,
29898,
1311,
29892,
302,
29918,
262,
1125,
13,
4706,
1583,
29889,
29956,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
1311,
29889,
29876,
29918,
348,
1169,
29892,
302,
29918,
262,
29897,
334,
7442,
29889,
3676,
29898,
29906,
847,
302,
29918,
262,
29897,
13,
4706,
1583,
29889,
29890,
353,
7442,
29889,
3298,
359,
3552,
1311,
29889,
29876,
29918,
348,
1169,
29892,
29871,
29896,
876,
13,
13,
1678,
822,
903,
29990,
18852,
29918,
11228,
2133,
29898,
1311,
29892,
302,
29918,
262,
1125,
13,
4706,
9995,
6644,
6646,
7688,
399,
773,
1060,
18852,
17250,
2133,
13,
13,
4706,
1105,
565,
278,
1881,
5680,
310,
5039,
800,
526,
20928,
2099,
29871,
29900,
322,
3918,
20162,
322,
20162,
29871,
29896,
769,
445,
723,
13,
4706,
4556,
503,
304,
884,
2125,
373,
263,
2788,
6287,
322,
445,
1838,
29915,
29873,
4505,
29892,
541,
372,
11630,
6911,
10032,
278,
1109,
14424,
29892,
13,
4706,
3902,
3689,
4656,
10070,
1108,
1363,
372,
29915,
29879,
1811,
304,
731,
1269,
310,
278,
7688,
13516,
399,
577,
393,
372,
29915,
29879,
451,
13,
4706,
2086,
1568,
16600,
1135,
29871,
29896,
322,
451,
2086,
1568,
3109,
1135,
29871,
29896,
577,
372,
1838,
29915,
29873,
3902,
356,
470,
1109,
728,
2086,
9098,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
29956,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
1311,
29889,
29876,
29918,
348,
1169,
29892,
302,
29918,
262,
29897,
334,
7442,
29889,
3676,
29898,
29896,
847,
302,
29918,
262,
29897,
13,
4706,
1583,
29889,
29890,
353,
7442,
29889,
3298,
359,
3552,
1311,
29889,
29876,
29918,
348,
1169,
29892,
29871,
29896,
876,
13,
13,
1678,
822,
903,
20841,
29926,
601,
29918,
11228,
2133,
29898,
1311,
29892,
302,
29918,
262,
1125,
13,
4706,
1583,
29889,
29956,
353,
7442,
29889,
8172,
29889,
9502,
29876,
29898,
1311,
29889,
29876,
29918,
348,
1169,
29892,
302,
29918,
262,
29897,
334,
7442,
29889,
3676,
29898,
29906,
847,
313,
29876,
29918,
262,
718,
1583,
29889,
29876,
29918,
348,
1169,
876,
13,
4706,
1583,
29889,
29890,
353,
7442,
29889,
3298,
359,
3552,
1311,
29889,
29876,
29918,
348,
1169,
29892,
29871,
29896,
876,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4964,
3317,
29898,
29999,
1125,
13,
4706,
9995,
20606,
29872,
4964,
3317,
310,
22513,
796,
13,
13,
4706,
584,
3207,
796,
29901,
338,
297,
278,
8267,
310,
313,
29876,
334,
286,
511,
988,
302,
338,
278,
1353,
310,
4413,
322,
286,
338,
278,
1353,
310,
6455,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
796,
29918,
4548,
353,
7442,
29889,
4548,
29898,
29999,
29897,
13,
4706,
736,
796,
29918,
4548,
29914,
9302,
29889,
2083,
29898,
29999,
29918,
4548,
29892,
9685,
29922,
29900,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
13714,
29918,
2695,
3317,
29898,
29999,
1125,
13,
4706,
9995,
20606,
29872,
278,
4964,
3317,
310,
4608,
796,
297,
263,
4825,
1711,
13714,
982,
1213,
15945,
13,
13,
4706,
9500,
29918,
29999,
353,
796,
448,
7442,
29889,
3317,
29898,
29999,
29892,
9685,
29922,
29900,
29897,
13,
4706,
796,
29918,
4548,
353,
7442,
29889,
4548,
29898,
10889,
29918,
29999,
29897,
13,
4706,
736,
796,
29918,
4548,
847,
7442,
29889,
2083,
29898,
29999,
29918,
4548,
29892,
9685,
29922,
29900,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4964,
3317,
29918,
10080,
29898,
29909,
1125,
13,
4706,
9995,
29940,
29914,
29909,
13,
13,
4706,
2045,
597,
5037,
29889,
1552,
12692,
6689,
29889,
1212,
29914,
29906,
29900,
29896,
29953,
29914,
1552,
29899,
2695,
3317,
29899,
2220,
29899,
392,
29899,
1169,
29899,
672,
440,
1230,
29914,
13,
4706,
396,
7365,
650,
4937,
19471,
740,
13,
4706,
584,
3207,
319,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
1209,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4365,
29885,
3398,
29898,
29999,
1125,
13,
4706,
396,
2045,
597,
2640,
29889,
26167,
2272,
29889,
990,
29914,
1514,
29914,
26167,
2272,
29914,
5679,
29914,
13525,
847,
26167,
2272,
29889,
18732,
29889,
4548,
277,
29889,
1420,
13,
4706,
396,
736,
29871,
29896,
847,
313,
29896,
718,
7442,
29889,
4548,
6278,
29999,
876,
13,
4706,
736,
1518,
277,
29898,
9302,
29889,
24049,
29898,
29999,
29892,
448,
29955,
29900,
29929,
29892,
29871,
29941,
29953,
29889,
29955,
29941,
876,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4365,
29885,
3398,
29918,
10080,
29898,
25932,
29892,
319,
1125,
13,
4706,
9995,
8147,
270,
3253,
29999,
13,
13,
4706,
584,
3207,
319,
29901,
13,
4706,
584,
2457,
29901,
270,
3253,
29999,
13,
4706,
9995,
13,
4706,
736,
319,
334,
313,
29896,
448,
319,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
10345,
29882,
29898,
29999,
1125,
13,
4706,
736,
313,
9302,
29889,
4548,
29898,
29999,
29897,
448,
7442,
29889,
4548,
6278,
29999,
876,
847,
313,
9302,
29889,
4548,
29898,
29999,
29897,
718,
7442,
29889,
4548,
6278,
29999,
876,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
10345,
29882,
29918,
10080,
29898,
25932,
29892,
319,
1125,
13,
4706,
736,
29871,
29896,
448,
319,
3579,
29871,
29906,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1104,
29884,
29898,
29999,
1125,
13,
4706,
396,
263,
29961,
29874,
29966,
29900,
29962,
353,
29871,
29900,
13,
4706,
396,
736,
7442,
29889,
24049,
29898,
29999,
29892,
29871,
29900,
29892,
796,
29897,
13,
4706,
736,
7442,
29889,
27525,
398,
29898,
29999,
29892,
29871,
29900,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1104,
29884,
29918,
10080,
29898,
29909,
1125,
13,
4706,
319,
29961,
29909,
1405,
29871,
29900,
29962,
353,
29871,
29896,
13,
4706,
736,
319,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
24993,
29891,
29918,
2674,
29884,
29898,
29999,
29892,
15595,
29922,
29900,
29889,
29900,
29896,
1125,
13,
4706,
14550,
13,
4706,
584,
3207,
796,
29901,
13,
4706,
584,
3207,
15595,
29901,
16275,
412,
310,
278,
26229,
740,
472,
921,
529,
29871,
29900,
29889,
13,
4706,
584,
2457,
29901,
13,
13,
4706,
14550,
13,
4706,
396,
736,
7442,
29889,
24049,
29898,
29999,
29892,
15595,
334,
796,
29892,
796,
29897,
13,
4706,
736,
7442,
29889,
3062,
29898,
29999,
529,
29871,
29900,
29892,
15595,
334,
796,
29892,
796,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
24993,
29891,
29918,
2674,
29884,
29918,
10080,
29898,
29909,
29892,
15595,
29922,
29900,
29889,
29900,
29896,
1125,
13,
4706,
736,
7442,
29889,
3062,
29898,
29909,
1405,
29871,
29900,
29892,
29871,
29896,
29892,
15595,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
525,
29943,
352,
368,
20971,
2954,
14420,
29898,
29876,
29918,
348,
1169,
3790,
1118,
26229,
3790,
1118,
1962,
29918,
13148,
3790,
1118,
3013,
29918,
22795,
3790,
1800,
4286,
4830,
29898,
13,
9651,
1583,
29889,
29876,
29918,
348,
1169,
29892,
1583,
29889,
11236,
362,
29918,
1853,
29892,
1583,
29889,
4905,
29918,
13148,
29892,
1583,
29889,
17462,
29918,
22795,
29897,
13,
13,
13,
1990,
405,
29940,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
302,
29918,
22100,
29892,
302,
29918,
13203,
1125,
13,
4706,
1583,
29889,
29876,
353,
302,
29918,
22100,
13,
4706,
1583,
29889,
29876,
29918,
13203,
353,
302,
29918,
13203,
13,
4706,
1583,
29889,
29277,
353,
1051,
580,
13,
13,
1678,
822,
788,
29918,
13148,
29898,
1311,
29892,
302,
29918,
348,
1169,
29892,
26229,
2433,
18816,
29885,
3398,
742,
5768,
449,
29918,
17462,
29918,
22795,
29922,
29896,
1125,
13,
4706,
565,
1583,
29889,
29277,
29901,
13,
9651,
302,
29918,
348,
1169,
29918,
24957,
29918,
13148,
353,
1583,
29889,
29277,
14352,
29896,
1822,
29876,
29918,
348,
1169,
13,
4706,
1683,
29901,
13,
9651,
302,
29918,
348,
1169,
29918,
24957,
29918,
13148,
353,
1583,
29889,
29876,
13,
13,
4706,
7546,
353,
23004,
368,
20971,
2954,
14420,
29898,
29876,
29918,
348,
1169,
29892,
302,
29918,
348,
1169,
29918,
24957,
29918,
13148,
29892,
26229,
29922,
11236,
362,
29892,
3013,
29918,
22795,
29922,
8865,
449,
29918,
17462,
29918,
22795,
29897,
13,
13,
4706,
1583,
29889,
29277,
29889,
4397,
29898,
13148,
29897,
13,
13,
1678,
822,
788,
29918,
4905,
29918,
13148,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
29277,
29901,
13,
9651,
1583,
29889,
1202,
29918,
13148,
29898,
1311,
29889,
29876,
29918,
13203,
29892,
26229,
2433,
18816,
29885,
3398,
1495,
13,
9651,
1583,
29889,
29277,
14352,
29896,
1822,
4905,
29918,
13148,
353,
5852,
13,
4706,
565,
451,
1583,
29889,
29277,
14352,
29896,
1822,
4905,
29918,
13148,
29901,
13,
9651,
1583,
29889,
1202,
29918,
13148,
29898,
1311,
29889,
29876,
29918,
13203,
29892,
26229,
2433,
18816,
29885,
3398,
1495,
13,
9651,
1583,
29889,
29277,
14352,
29896,
1822,
4905,
29918,
13148,
353,
5852,
13,
4706,
1683,
29901,
13,
9651,
396,
14402,
29901,
366,
881,
12020,
385,
1059,
322,
2643,
393,
4083,
366,
817,
304,
5217,
5923,
1962,
29918,
13148,
13,
9651,
1209,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
15807,
403,
29918,
14369,
29918,
13148,
29918,
5105,
10070,
29898,
29881,
29931,
29881,
29909,
29892,
7546,
29918,
8173,
29892,
10272,
29918,
29881,
29931,
29881,
29909,
29918,
29896,
29922,
5574,
1125,
13,
4706,
14550,
13,
4706,
584,
3207,
270,
29967,
29881,
29909,
29901,
13,
4706,
584,
2457,
29901,
270,
29967,
29881,
29909,
29918,
29896,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
13,
4706,
14550,
13,
4706,
396,
1152,
278,
937,
12541,
988,
6410,
338,
4891,
24687,
322,
26229,
3653,
310,
1962,
7546,
13,
4706,
396,
338,
4365,
29885,
3398,
29892,
393,
1033,
367,
3273,
264,
304,
29892,
13,
4706,
396,
270,
29999,
29961,
29931,
29962,
353,
319,
29961,
29931,
29962,
29899,
29979,
13,
4706,
396,
512,
2498,
29892,
366,
508,
10272,
270,
29999,
408,
4477,
13,
4706,
396,
270,
29999,
353,
270,
29909,
334,
330,
12215,
29999,
29897,
14402,
29901,
5279,
591,
1209,
319,
2012,
310,
796,
29892,
306,
4140,
372,
338,
1568,
2253,
304,
1101,
376,
29909,
29889,
29170,
29908,
322,
1209,
796,
13,
13,
4706,
396,
7133,
6375,
13089,
362,
29892,
366,
750,
13931,
319,
29896,
491,
3013,
29918,
22795,
29889,
512,
1250,
7728,
351,
362,
29892,
366,
29915,
645,
5480,
505,
304,
13,
4706,
396,
16429,
270,
29909,
29896,
491,
3013,
29918,
22795,
1449,
313,
1552,
24282,
19854,
338,
393,
565,
29871,
319,
29961,
29896,
29962,
29909,
29961,
29896,
29962,
29871,
338,
6287,
29881,
491,
3013,
29918,
22795,
29892,
769,
13,
4706,
396,
967,
16291,
29871,
270,
29909,
29961,
29896,
29962,
29881,
29909,
29961,
29896,
29962,
29871,
338,
884,
6287,
29881,
491,
278,
1021,
3013,
29918,
22795,
467,
13,
4706,
270,
29931,
29881,
29909,
353,
7442,
29889,
18056,
368,
29898,
29881,
29931,
29881,
29909,
29892,
7546,
29918,
8173,
29889,
29928,
29897,
847,
7546,
29918,
8173,
29889,
17462,
29918,
22795,
13,
4706,
270,
3253,
29999,
353,
7546,
29918,
8173,
29889,
29881,
3253,
29999,
29898,
13148,
29918,
8173,
29889,
29909,
29897,
13,
4706,
270,
29931,
29881,
29999,
353,
270,
29931,
29881,
29909,
334,
270,
3253,
29999,
29871,
396,
10619,
29899,
3538,
3234,
13,
13,
4706,
396,
11988,
353,
9275,
869,
263,
29961,
29880,
29899,
29896,
29962,
13,
4706,
270,
29999,
29881,
29956,
353,
7546,
29918,
8173,
29889,
29909,
29918,
29880,
29918,
29896,
13,
4706,
270,
29967,
29881,
29956,
353,
7442,
29889,
6333,
29898,
29881,
29931,
29881,
29999,
29892,
270,
29999,
29881,
29956,
29889,
29911,
29897,
847,
270,
29931,
29881,
29909,
29889,
12181,
29961,
29896,
29962,
29871,
396,
445,
338,
1023,
6576,
297,
697,
1196,
29936,
2805,
270,
29931,
28012,
322,
769,
270,
29967,
29881,
29956,
13,
4706,
270,
29967,
2585,
353,
7442,
29889,
2083,
29898,
29881,
29931,
29881,
29999,
29892,
9685,
29922,
29896,
29892,
3013,
6229,
29879,
29922,
5574,
29897,
847,
270,
29931,
29881,
29909,
29889,
12181,
29961,
29896,
29962,
13,
4706,
270,
29931,
29881,
29909,
29918,
29896,
353,
6213,
13,
4706,
565,
10272,
29918,
29881,
29931,
29881,
29909,
29918,
29896,
29901,
13,
9651,
396,
1146,
29961,
29880,
29899,
29896,
29962,
353,
281,
29961,
29880,
1822,
29911,
869,
9275,
29961,
29880,
29962,
13,
9651,
270,
29999,
29881,
29909,
29918,
29896,
353,
7546,
29918,
8173,
29889,
29956,
13,
9651,
270,
29931,
29881,
29909,
29918,
29896,
353,
7442,
29889,
6333,
29898,
29881,
29999,
29881,
29909,
29918,
29896,
29889,
29911,
29892,
270,
29931,
29881,
29999,
29897,
29871,
396,
20602,
270,
29931,
29881,
29898,
29909,
29899,
29896,
29897,
13,
4706,
736,
270,
29931,
29881,
29909,
29918,
29896,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
13,
13,
1678,
822,
13600,
29898,
1311,
29892,
1060,
29892,
343,
1125,
13,
4706,
396,
887,
871,
671,
5768,
449,
2645,
6694,
29889,
3872,
29915,
29873,
671,
5768,
449,
313,
8172,
368,
27399,
7573,
29897,
2645,
1243,
931,
29889,
13,
4706,
319,
353,
1060,
13,
4706,
363,
7546,
297,
1583,
29889,
29277,
29901,
13,
9651,
796,
353,
7442,
29889,
6333,
29898,
13148,
29889,
29956,
29892,
319,
29897,
718,
7546,
29889,
29890,
13,
9651,
319,
353,
7546,
29889,
11236,
362,
29898,
29999,
29897,
13,
4706,
1683,
29901,
13,
9651,
343,
353,
343,
29889,
1191,
3317,
29898,
8990,
29922,
29900,
29897,
718,
29871,
29896,
13,
9651,
18988,
353,
319,
29889,
1191,
3317,
29898,
8990,
29922,
29900,
29897,
718,
29871,
29896,
13,
9651,
620,
353,
7442,
29889,
11745,
29898,
11965,
2463,
29892,
343,
29897,
13,
9651,
736,
29871,
29896,
29900,
29900,
334,
7442,
29889,
2083,
29898,
690,
29897,
847,
343,
29889,
2311,
13,
13,
13,
1990,
20693,
326,
2133,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6410,
2433,
19128,
29918,
296,
14441,
742,
1158,
2433,
24970,
29899,
2783,
1760,
29374,
13,
4706,
1583,
29889,
5696,
353,
1158,
13,
4706,
1583,
29889,
29963,
16586,
29903,
29879,
353,
1051,
580,
13,
4706,
565,
6410,
1275,
525,
19128,
29918,
296,
14441,
2396,
13,
9651,
1583,
29889,
6758,
353,
1583,
29889,
19128,
29918,
296,
14441,
29918,
6758,
13,
9651,
1583,
29889,
11236,
362,
29918,
10080,
353,
1583,
29889,
19128,
29918,
296,
14441,
29918,
6758,
29918,
10080,
13,
13,
4706,
565,
1158,
1275,
525,
24970,
29899,
2783,
1760,
2396,
13,
9651,
1583,
29889,
20640,
3950,
353,
1583,
29889,
24970,
29918,
2783,
1760,
13,
4706,
25342,
1158,
1275,
525,
29887,
29881,
29899,
2541,
29899,
29885,
2932,
398,
2396,
13,
9651,
1583,
29889,
20640,
3950,
353,
1583,
29889,
24970,
29918,
2783,
1760,
29918,
2541,
29918,
29885,
2932,
398,
13,
4706,
25342,
1158,
1275,
525,
29878,
1516,
7728,
2396,
13,
9651,
1583,
29889,
20640,
3950,
353,
1583,
29889,
29934,
4345,
7728,
13,
4706,
25342,
1158,
1275,
525,
328,
314,
2396,
13,
9651,
1583,
29889,
20640,
3950,
353,
1583,
29889,
328,
314,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
7688,
29918,
7099,
388,
29898,
29885,
29892,
15595,
29892,
301,
8337,
1388,
1125,
13,
4706,
396,
365,
29906,
2169,
1070,
2133,
13,
4706,
736,
29871,
29896,
448,
5135,
2312,
334,
301,
8337,
1388,
29897,
847,
286,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
6509,
29918,
10492,
29918,
7099,
388,
29898,
7099,
388,
29918,
10492,
29892,
21502,
305,
29918,
1949,
1125,
13,
4706,
736,
29871,
29896,
14571,
29896,
29974,
7099,
388,
29918,
10492,
29930,
1022,
2878,
29918,
1949,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
288,
29918,
21891,
29918,
10492,
29918,
7099,
388,
29898,
29895,
29892,
21502,
305,
29918,
1949,
1125,
13,
4706,
736,
413,
29914,
9302,
29889,
3676,
29898,
1022,
2878,
29918,
1949,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
25658,
29918,
21891,
29918,
10492,
29918,
7099,
388,
29898,
7099,
388,
29918,
10492,
29892,
21502,
305,
29918,
1949,
1125,
13,
4706,
736,
29871,
29900,
29889,
29929,
29945,
1068,
1022,
2878,
29918,
1949,
13,
13,
1678,
822,
19554,
29918,
303,
1466,
4878,
29918,
21891,
29918,
10492,
29918,
7099,
388,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6509,
29918,
10492,
29898,
25932,
29892,
15595,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
1125,
13,
4706,
736,
1067,
29879,
29889,
21891,
29918,
10492,
29918,
7099,
388,
29898,
7099,
388,
29918,
10492,
29892,
21502,
305,
29918,
1949,
29897,
334,
15595,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
16030,
29918,
2783,
1760,
29898,
25932,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
29892,
399,
29892,
289,
29892,
286,
29892,
3579,
19290,
1125,
13,
4706,
15595,
29900,
353,
9049,
5085,
1839,
2312,
2033,
13,
4706,
301,
8337,
1388,
353,
9049,
5085,
1839,
29880,
8337,
1388,
2033,
13,
4706,
21502,
305,
29918,
1949,
353,
9049,
5085,
1839,
1022,
2878,
2033,
13,
4706,
20228,
29918,
10492,
353,
9049,
5085,
1839,
7099,
388,
29918,
10492,
2033,
13,
4706,
15595,
353,
1067,
29879,
29889,
21891,
29918,
10492,
29898,
2312,
29900,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
29897,
13,
4706,
399,
353,
1067,
29879,
29889,
7915,
29918,
7099,
388,
29898,
29885,
29892,
15595,
29892,
301,
8337,
1388,
29897,
334,
399,
448,
15595,
334,
270,
29967,
29881,
29956,
13,
4706,
289,
22361,
15595,
334,
270,
29967,
2585,
13,
13,
4706,
736,
399,
29892,
289,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
16030,
29918,
2783,
1760,
29918,
2541,
29918,
29885,
2932,
398,
29898,
25932,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
29892,
399,
29892,
289,
29892,
286,
29892,
3579,
19290,
1125,
13,
4706,
21762,
29896,
353,
9049,
5085,
1839,
3571,
29896,
2033,
13,
4706,
478,
29879,
353,
9049,
5085,
1839,
21819,
2033,
13,
4706,
15595,
29900,
353,
9049,
5085,
1839,
2312,
2033,
13,
4706,
301,
8337,
1388,
353,
9049,
5085,
1839,
29880,
8337,
1388,
2033,
13,
4706,
21502,
305,
29918,
1949,
353,
9049,
5085,
1839,
1022,
2878,
2033,
13,
4706,
20228,
29918,
10492,
353,
9049,
5085,
1839,
7099,
388,
29918,
10492,
2033,
13,
4706,
15595,
353,
1067,
29879,
29889,
21891,
29918,
10492,
29898,
2312,
29900,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
29897,
13,
4706,
478,
29879,
1839,
29963,
28012,
2033,
353,
21762,
29896,
29930,
29963,
29879,
1839,
29963,
28012,
2033,
718,
313,
29896,
29899,
3571,
29896,
11877,
29881,
29967,
29881,
29956,
13,
4706,
478,
29879,
1839,
29963,
2585,
2033,
353,
21762,
29896,
29930,
29963,
29879,
1839,
29963,
2585,
2033,
718,
313,
29896,
29899,
3571,
29896,
11877,
29881,
29967,
2585,
13,
13,
4706,
399,
353,
1067,
29879,
29889,
7915,
29918,
7099,
388,
29898,
29885,
29892,
15595,
29892,
301,
8337,
1388,
29897,
334,
399,
448,
15595,
334,
478,
29879,
1839,
29963,
28012,
2033,
13,
4706,
289,
353,
289,
448,
15595,
334,
478,
29879,
1839,
29963,
2585,
2033,
13,
13,
4706,
736,
399,
29892,
289,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
390,
4345,
7728,
29898,
25932,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
29892,
399,
29892,
289,
29892,
286,
29892,
3579,
19290,
1125,
13,
4706,
21762,
29906,
353,
9049,
5085,
1839,
3571,
29906,
2033,
13,
4706,
317,
29879,
353,
9049,
5085,
1839,
21819,
2033,
13,
4706,
15595,
29900,
353,
9049,
5085,
1839,
2312,
2033,
13,
4706,
301,
8337,
1388,
353,
9049,
5085,
1839,
29880,
8337,
1388,
2033,
13,
4706,
21502,
305,
29918,
1949,
353,
9049,
5085,
1839,
1022,
2878,
2033,
13,
4706,
20228,
29918,
10492,
353,
9049,
5085,
1839,
7099,
388,
29918,
10492,
2033,
13,
4706,
15595,
353,
1067,
29879,
29889,
21891,
29918,
10492,
29898,
2312,
29900,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
29897,
13,
4706,
321,
3232,
353,
7442,
29889,
29888,
3888,
29898,
9302,
29889,
7411,
29941,
29906,
467,
8961,
13,
4706,
317,
29879,
1839,
29903,
28012,
2033,
353,
21762,
29906,
334,
317,
29879,
1839,
29903,
28012,
2033,
718,
313,
29896,
448,
21762,
29906,
29897,
334,
7442,
29889,
17619,
29898,
29881,
29967,
29881,
29956,
29897,
13,
4706,
317,
29879,
1839,
29903,
2585,
2033,
353,
21762,
29906,
334,
317,
29879,
1839,
29903,
2585,
2033,
718,
313,
29896,
448,
21762,
29906,
29897,
334,
7442,
29889,
17619,
29898,
29881,
29967,
2585,
29897,
13,
13,
4706,
399,
353,
1067,
29879,
29889,
7915,
29918,
7099,
388,
29898,
29885,
29892,
15595,
29892,
301,
8337,
1388,
11877,
29956,
448,
15595,
334,
313,
29881,
29967,
29881,
29956,
14571,
9302,
29889,
3676,
29898,
29903,
29879,
1839,
29903,
28012,
2033,
7240,
5463,
876,
13,
4706,
289,
353,
289,
448,
15595,
334,
313,
29881,
29967,
2585,
14571,
9302,
29889,
3676,
29898,
29903,
29879,
1839,
29903,
2585,
2033,
7240,
5463,
876,
13,
13,
4706,
736,
399,
29892,
289,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
594,
314,
29898,
25932,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
29892,
399,
29892,
289,
29892,
286,
29892,
3579,
19290,
1125,
13,
4706,
21762,
29896,
353,
9049,
5085,
1839,
3571,
29896,
2033,
13,
4706,
21762,
29906,
353,
9049,
5085,
1839,
3571,
29906,
2033,
13,
4706,
478,
29879,
29903,
29879,
353,
9049,
5085,
1839,
21819,
2033,
13,
4706,
260,
353,
9049,
5085,
1839,
29873,
2033,
13,
4706,
15595,
29900,
353,
9049,
5085,
1839,
2312,
2033,
13,
4706,
301,
8337,
1388,
353,
9049,
5085,
1839,
29880,
8337,
1388,
2033,
13,
4706,
21502,
305,
29918,
1949,
353,
9049,
5085,
1839,
1022,
2878,
2033,
13,
4706,
20228,
29918,
10492,
353,
9049,
5085,
1839,
7099,
388,
29918,
10492,
2033,
13,
4706,
15595,
353,
1067,
29879,
29889,
21891,
29918,
10492,
29898,
2312,
29900,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
29897,
13,
4706,
321,
3232,
353,
7442,
29889,
29888,
3888,
29898,
9302,
29889,
7411,
29941,
29906,
467,
8961,
13,
13,
4706,
478,
29879,
29903,
29879,
1839,
29963,
28012,
2033,
353,
21762,
29896,
334,
478,
29879,
29903,
29879,
1839,
29963,
28012,
2033,
718,
313,
29896,
448,
21762,
29896,
29897,
334,
270,
29967,
29881,
29956,
13,
4706,
478,
29879,
29903,
29879,
1839,
29963,
2585,
2033,
353,
21762,
29896,
334,
478,
29879,
29903,
29879,
1839,
29963,
2585,
2033,
718,
313,
29896,
448,
21762,
29896,
29897,
334,
270,
29967,
2585,
13,
4706,
478,
29879,
29903,
29879,
1839,
29903,
28012,
2033,
353,
21762,
29906,
334,
478,
29879,
29903,
29879,
1839,
29903,
28012,
2033,
718,
313,
29896,
448,
21762,
29906,
29897,
334,
7442,
29889,
17619,
29898,
29881,
29967,
29881,
29956,
29897,
13,
4706,
478,
29879,
29903,
29879,
1839,
29903,
2585,
2033,
353,
21762,
29906,
334,
478,
29879,
29903,
29879,
1839,
29903,
2585,
2033,
718,
313,
29896,
448,
21762,
29906,
29897,
334,
7442,
29889,
17619,
29898,
29881,
29967,
2585,
29897,
13,
13,
4706,
478,
28012,
29918,
15728,
287,
353,
478,
29879,
29903,
29879,
1839,
29963,
28012,
2033,
14571,
29896,
29899,
3571,
29896,
1068,
29873,
29897,
13,
4706,
478,
2585,
29918,
15728,
287,
353,
478,
29879,
29903,
29879,
1839,
29963,
2585,
2033,
14571,
29896,
29899,
3571,
29896,
1068,
29873,
29897,
13,
4706,
317,
28012,
29918,
15728,
287,
353,
478,
29879,
29903,
29879,
1839,
29903,
28012,
2033,
14571,
29896,
29899,
3571,
29906,
1068,
29873,
29897,
13,
4706,
317,
2585,
29918,
15728,
287,
353,
478,
29879,
29903,
29879,
1839,
29903,
2585,
2033,
14571,
29896,
29899,
3571,
29906,
1068,
29873,
29897,
13,
13,
4706,
399,
353,
1067,
29879,
29889,
7915,
29918,
7099,
388,
29898,
29885,
29892,
15595,
29892,
301,
8337,
1388,
29897,
334,
399,
448,
15595,
334,
313,
29963,
28012,
29918,
15728,
287,
847,
313,
9302,
29889,
3676,
29898,
29903,
28012,
29918,
15728,
287,
29897,
718,
321,
3232,
876,
13,
4706,
289,
353,
289,
448,
15595,
334,
313,
29963,
2585,
29918,
15728,
287,
847,
313,
9302,
29889,
3676,
29898,
29903,
2585,
29918,
15728,
287,
29897,
718,
321,
3232,
876,
13,
13,
4706,
736,
399,
29892,
289,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4891,
29918,
296,
14441,
29918,
6758,
29898,
29891,
29892,
263,
1125,
13,
4706,
396,
1732,
597,
305,
2021,
13434,
29945,
29896,
29900,
29953,
29889,
3292,
29889,
601,
29914,
24535,
29914,
21891,
29914,
29906,
29900,
29896,
29953,
29914,
29900,
29929,
29914,
29896,
29953,
29914,
12717,
29899,
6758,
29899,
12171,
29899,
4713,
262,
7615,
29899,
1188,
4695,
29899,
1188,
23830,
29885,
29899,
19128,
29899,
296,
14441,
29899,
17619,
29899,
12523,
29899,
12932,
695,
333,
713,
29899,
23552,
29899,
29888,
307,
1785,
2482,
29899,
2790,
29872,
29889,
1420,
13,
4706,
396,
2045,
597,
16202,
29889,
7041,
29889,
510,
29914,
2619,
29914,
29906,
29953,
29900,
29945,
29900,
29945,
29914,
23523,
29899,
21891,
29899,
9344,
29899,
29875,
29899,
1509,
29899,
29874,
29899,
29883,
20440,
936,
29899,
19128,
29899,
296,
14441,
29899,
272,
29899,
19541,
29899,
19128,
29899,
296,
307,
13,
4706,
396,
1244,
591,
6584,
284,
675,
1432,
770,
1584,
278,
5225,
6743,
13,
4706,
396,
278,
4413,
1244,
526,
7417,
474,
29889,
29872,
366,
508,
10032,
278,
1059,
310,
697,
1728,
6602,
292,
278,
916,
13,
4706,
736,
19691,
29891,
334,
7442,
29889,
1188,
29898,
29874,
29897,
718,
313,
29896,
448,
343,
29897,
334,
7442,
29889,
1188,
29898,
29896,
448,
263,
876,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4964,
3317,
29918,
6758,
29898,
29891,
29892,
263,
1125,
13,
4706,
396,
1244,
591,
6584,
284,
675,
871,
278,
3646,
287,
770,
322,
445,
338,
27951,
573,
1363,
896,
526,
599,
14278,
474,
29889,
29872,
29889,
565,
3646,
287,
13,
4706,
396,
1059,
338,
12212,
278,
1791,
674,
2367,
3109,
6976,
1363,
310,
278,
4964,
3317,
8220,
13,
4706,
736,
448,
7442,
29889,
2083,
29898,
29891,
334,
7442,
29889,
1188,
29898,
29874,
511,
9685,
29922,
29900,
29892,
3013,
6229,
29879,
29922,
5574,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4891,
29918,
296,
14441,
29918,
6758,
29918,
10080,
29898,
29891,
29892,
263,
1125,
13,
4706,
736,
448,
29891,
847,
263,
718,
313,
29896,
448,
343,
29897,
847,
313,
29896,
448,
263,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4964,
3317,
29918,
6758,
29918,
10080,
29898,
29891,
29892,
263,
1125,
13,
4706,
736,
448,
9302,
29889,
2083,
29898,
29891,
29914,
29874,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
4943,
2133,
29918,
8489,
29898,
11618,
29892,
286,
29892,
301,
8337,
1388,
1125,
13,
4706,
946,
29887,
353,
29871,
29900,
13,
4706,
363,
7546,
297,
3564,
29889,
29277,
29901,
13,
9651,
946,
29887,
353,
7442,
29889,
2083,
29898,
9302,
29889,
17619,
29898,
13148,
29889,
29956,
876,
13,
4706,
1683,
29901,
13,
9651,
736,
313,
29880,
8337,
1388,
847,
313,
29906,
334,
286,
876,
334,
946,
29887,
13,
13,
1678,
822,
3438,
29898,
1311,
29892,
3564,
29892,
1060,
29892,
343,
29892,
301,
8337,
1388,
29922,
29900,
1125,
13,
4706,
319,
353,
1060,
13,
4706,
363,
7546,
297,
3564,
29889,
29277,
29901,
13,
9651,
796,
353,
7442,
29889,
6333,
29898,
13148,
29889,
29956,
29892,
319,
29897,
718,
7546,
29889,
29890,
13,
9651,
319,
353,
7546,
29889,
11236,
362,
29898,
29999,
29897,
13,
4706,
1683,
29901,
13,
9651,
6410,
29918,
5344,
353,
1583,
29889,
6758,
29898,
29891,
29892,
319,
29897,
13,
9651,
2533,
29918,
957,
29918,
497,
29918,
19057,
353,
7442,
29889,
2083,
29898,
6758,
29918,
5344,
29892,
9685,
29922,
29896,
29897,
847,
6410,
29918,
5344,
29889,
12181,
29961,
29896,
29962,
13,
9651,
736,
313,
9302,
29889,
2083,
29898,
2083,
29918,
957,
29918,
497,
29918,
19057,
29897,
847,
2533,
29918,
957,
29918,
497,
29918,
19057,
29889,
2311,
29897,
718,
1583,
29889,
15227,
2133,
29918,
8489,
29898,
11618,
29892,
13,
462,
462,
462,
462,
462,
462,
965,
1060,
29889,
12181,
29961,
29896,
1402,
13,
462,
462,
462,
462,
462,
462,
965,
301,
8337,
1388,
29922,
29880,
8337,
1388,
29897,
13,
13,
1678,
822,
903,
5504,
29918,
705,
5861,
29898,
1311,
29892,
1060,
29892,
343,
29892,
3564,
29892,
15595,
29892,
301,
8337,
1388,
29892,
260,
29892,
21762,
29896,
29892,
21762,
29906,
29892,
20228,
29918,
10492,
29892,
21502,
305,
29918,
1949,
1125,
13,
4706,
319,
353,
1060,
13,
4706,
363,
7546,
297,
3564,
29889,
29277,
29901,
13,
9651,
7546,
29889,
29909,
29918,
29880,
29918,
29896,
353,
319,
29871,
396,
445,
338,
319,
29899,
29896,
515,
1833,
2425,
4331,
13,
9651,
796,
353,
7442,
29889,
6333,
29898,
13148,
29889,
29956,
29892,
319,
29897,
718,
7546,
29889,
29890,
29871,
396,
313,
13998,
376,
1188,
1169,
29908,
297,
23158,
900,
6321,
487,
29897,
13,
9651,
319,
353,
7546,
29889,
11236,
362,
29898,
29999,
29897,
13,
13,
9651,
396,
405,
29933,
29991,
591,
1016,
29915,
29873,
451,
3394,
5768,
449,
304,
278,
1881,
7546,
470,
1962,
7546,
29889,
13,
9651,
360,
353,
7442,
29889,
8172,
29889,
9502,
10456,
29909,
29889,
12181,
29897,
5277,
7546,
29889,
17462,
29918,
22795,
29871,
396,
5768,
449,
13,
9651,
319,
353,
7442,
29889,
18056,
368,
29898,
29909,
29892,
360,
29897,
847,
7546,
29889,
17462,
29918,
22795,
29871,
396,
21292,
287,
5768,
449,
13,
13,
9651,
7546,
29889,
29928,
353,
360,
13,
9651,
7546,
29889,
29909,
353,
319,
13,
13,
4706,
411,
7442,
29889,
3127,
3859,
29898,
20965,
2433,
22692,
29374,
13,
9651,
1018,
29901,
13,
18884,
270,
29931,
29881,
29909,
353,
1583,
29889,
11236,
362,
29918,
10080,
29898,
29891,
29892,
319,
29897,
13,
9651,
5174,
26043,
1218,
5228,
2392,
29901,
13,
18884,
12020,
13,
4706,
396,
1763,
4772,
278,
14679,
29901,
18764,
287,
580,
1838,
29915,
29873,
6623,
278,
1051,
29889,
18764,
287,
580,
1838,
29915,
29873,
1207,
263,
3509,
310,
278,
1051,
13,
4706,
396,
313,
1228,
3538,
372,
723,
1996,
438,
29898,
29940,
29897,
5684,
3370,
467,
960,
366,
817,
304,
6623,
278,
1051,
671,
394,
391,
29889,
24244,
890,
565,
13,
4706,
396,
366,
817,
263,
3509,
310,
278,
1051,
297,
18764,
287,
1797,
671,
394,
391,
29961,
1057,
29899,
29896,
29962,
13,
4706,
363,
301,
29892,
7546,
29892,
478,
16586,
29903,
29879,
297,
14319,
29898,
3881,
29898,
2435,
29898,
11618,
29889,
29277,
511,
29871,
29900,
29892,
448,
29896,
511,
18764,
287,
29898,
11618,
29889,
29277,
511,
18764,
287,
29898,
1311,
29889,
29963,
16586,
29903,
29879,
22164,
13,
9651,
270,
29931,
29881,
29909,
29892,
270,
29967,
29881,
29956,
29892,
270,
29967,
2585,
353,
3564,
3032,
15807,
403,
29918,
14369,
29918,
13148,
29918,
5105,
10070,
29898,
29881,
29931,
29881,
29909,
29892,
7546,
29892,
10272,
29918,
29881,
29931,
29881,
29909,
29918,
29896,
7607,
29880,
1405,
29871,
29896,
876,
13,
13,
9651,
7546,
29889,
29956,
29892,
7546,
29889,
29890,
353,
1583,
29889,
20640,
3950,
29898,
29881,
29967,
29881,
29956,
29892,
270,
29967,
2585,
29892,
7546,
29889,
29956,
29892,
7546,
29889,
29890,
29892,
1060,
29889,
12181,
29961,
29896,
1402,
15595,
29922,
2312,
29892,
301,
8337,
1388,
29922,
29880,
8337,
1388,
29892,
13,
462,
462,
795,
12221,
29922,
29963,
16586,
29903,
29879,
29892,
21762,
29896,
29922,
3571,
29896,
29892,
21762,
29906,
29922,
3571,
29906,
29892,
260,
29922,
29873,
29892,
20228,
29918,
10492,
29922,
7099,
388,
29918,
10492,
29892,
21502,
305,
29922,
1022,
2878,
29918,
1949,
29897,
13,
13,
1678,
822,
6260,
675,
29898,
1311,
29892,
3564,
29892,
21502,
12168,
29922,
29896,
29892,
20629,
29918,
16175,
29918,
2311,
29922,
29900,
29892,
6509,
29918,
10492,
29922,
29900,
29889,
29896,
29892,
4943,
2133,
29918,
15501,
29922,
29900,
29892,
13,
462,
19399,
29922,
29900,
29889,
29929,
29892,
21762,
29906,
29922,
29900,
29889,
29929,
29929,
29929,
29892,
6509,
29918,
10492,
29918,
7099,
388,
29922,
29900,
29892,
8783,
29922,
8516,
1125,
13,
4706,
15823,
353,
931,
29889,
2230,
580,
13,
4706,
363,
7546,
297,
3564,
29889,
29277,
29901,
13,
9651,
1583,
29889,
29963,
16586,
29903,
29879,
29889,
4397,
3319,
29908,
29963,
28012,
1115,
7442,
29889,
3298,
359,
29918,
4561,
29898,
13148,
29889,
29956,
511,
376,
29963,
2585,
1115,
7442,
29889,
3298,
359,
29918,
4561,
29898,
13148,
29889,
29890,
511,
13,
462,
1669,
376,
29903,
28012,
1115,
7442,
29889,
3298,
359,
29918,
4561,
29898,
13148,
29889,
29956,
511,
376,
29903,
2585,
1115,
7442,
29889,
3298,
359,
29918,
4561,
29898,
13148,
29889,
29890,
26972,
13,
13,
4706,
363,
21502,
305,
297,
3464,
29898,
29896,
29892,
21502,
12168,
29974,
29896,
1125,
13,
9651,
363,
260,
29892,
20629,
29918,
16175,
297,
26985,
29898,
24713,
29889,
4622,
29918,
1195,
29875,
29918,
16175,
29898,
2311,
29922,
1195,
29875,
29918,
16175,
29918,
2311,
511,
1369,
29922,
29896,
1125,
13,
18884,
1583,
3032,
5504,
29918,
705,
5861,
29898,
1195,
29875,
29918,
16175,
29889,
29990,
29892,
20629,
29918,
16175,
29889,
29891,
29892,
3564,
29892,
6509,
29918,
10492,
29892,
13,
462,
462,
268,
4943,
2133,
29918,
15501,
29892,
260,
29892,
21762,
29896,
29922,
29885,
2932,
398,
29892,
21762,
29906,
29922,
3571,
29906,
29892,
20228,
29918,
10492,
29922,
21891,
29918,
10492,
29918,
7099,
388,
29892,
21502,
305,
29918,
1949,
29922,
1022,
2878,
29897,
13,
9651,
1683,
29901,
13,
18884,
565,
21502,
305,
1273,
29871,
29896,
29900,
1275,
29871,
29900,
29901,
13,
462,
1678,
3438,
353,
1583,
29889,
18253,
29898,
11618,
29892,
8783,
29889,
29990,
29918,
14968,
29892,
8783,
29889,
29891,
29918,
14968,
29892,
301,
8337,
1388,
29922,
15227,
2133,
29918,
15501,
29897,
13,
462,
1678,
17927,
29889,
3888,
877,
1022,
2878,
6571,
313,
2704,
29901,
12365,
29889,
29945,
29888,
1800,
4286,
4830,
29898,
1022,
2878,
29892,
3438,
876,
13,
4706,
1683,
29901,
13,
9651,
263,
615,
353,
931,
29889,
2230,
580,
13,
9651,
3438,
353,
1583,
29889,
18253,
29898,
11618,
29892,
8783,
29889,
29990,
29918,
14968,
29892,
8783,
29889,
29891,
29918,
14968,
29892,
301,
8337,
1388,
29922,
15227,
2133,
29918,
15501,
29897,
13,
9651,
17927,
29889,
8382,
877,
29899,
29915,
334,
29871,
29947,
29900,
29897,
13,
9651,
17927,
29889,
8382,
877,
29989,
6991,
5219,
1495,
13,
9651,
17927,
29889,
8382,
877,
29899,
29915,
334,
29871,
29947,
29900,
29897,
13,
9651,
17927,
29889,
8382,
877,
26495,
931,
29901,
12365,
29889,
29906,
29888,
29913,
3725,
29907,
29879,
4286,
4830,
29898,
2051,
448,
15823,
876,
13,
9651,
17927,
29889,
8382,
877,
29899,
29915,
334,
29871,
29947,
29900,
29897,
13,
9651,
17927,
29889,
8382,
877,
12881,
728,
1059,
29901,
12365,
29889,
29945,
29888,
29913,
4286,
4830,
29898,
13,
18884,
1583,
29889,
18253,
29898,
11618,
29892,
8783,
29889,
29990,
29918,
14968,
29892,
8783,
29889,
29891,
29918,
14968,
29892,
301,
8337,
1388,
29922,
15227,
2133,
29918,
15501,
4961,
13,
13,
9651,
17971,
353,
6629,
13,
9651,
363,
474,
29892,
7546,
297,
26985,
29898,
11618,
29889,
29277,
1125,
13,
18884,
17971,
4619,
11297,
29876,
7546,
29937,
525,
718,
851,
29898,
29875,
718,
29871,
29896,
29897,
718,
525,
448,
525,
718,
2062,
29898,
13148,
29897,
13,
13,
9651,
17927,
29906,
29889,
3888,
877,
14968,
1059,
29901,
12365,
29889,
29906,
29888,
1118,
525,
13,
462,
308,
525,
2230,
29901,
12365,
29889,
29906,
29888,
29913,
1660,
29907,
29879,
29892,
525,
13,
462,
308,
16321,
29277,
24335,
525,
13,
462,
308,
16321,
1022,
2878,
29879,
29901,
24335,
525,
13,
462,
308,
525,
21891,
6554,
29901,
426,
7570,
29876,
29915,
13,
462,
308,
525,
15227,
2133,
3443,
29901,
24335,
525,
13,
462,
308,
525,
1195,
29875,
29899,
16175,
2159,
29901,
24335,
525,
13,
462,
308,
525,
20640,
3950,
29901,
518,
8875,
1402,
525,
13,
462,
308,
525,
24713,
29901,
15974,
1118,
2906,
29918,
2311,
26254,
1118,
528,
21897,
29901,
8875,
1402,
6571,
4286,
4830,
29898,
18253,
29892,
263,
615,
448,
15823,
29892,
7431,
29898,
11618,
29889,
29277,
511,
13,
462,
462,
462,
462,
632,
21502,
12168,
29892,
6509,
29918,
10492,
29892,
13,
462,
462,
462,
462,
632,
4943,
2133,
29918,
15501,
29892,
20629,
29918,
16175,
29918,
2311,
29892,
13,
462,
462,
462,
462,
632,
1583,
29889,
5696,
29892,
8783,
29889,
978,
29892,
8783,
29889,
3359,
29918,
2311,
29892,
13,
462,
462,
462,
462,
632,
8783,
29889,
845,
21897,
29892,
17971,
876,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1209,
13,
2
] |
src/capha_module.py | Innsmouth-trip/aiogram-telegram-bot | 0 | 125939 | <reponame>Innsmouth-trip/aiogram-telegram-bot
# Модуль капчи
# Подключение необходимых модулей
from src import users_module
from src import supergroup_module
from src import bot_module
from src import welcome_module
# Загрузка необходимых параметров
bot = bot_module.bot
chat_id = bot_module.chat_id
# Создание капчи
async def send_capha(message):
# Проверка на то новый ли это юзер
if message.from_user not in message.new_chat_members:
return
# Сохранение данных о новом пользователе
new_member = message.new_chat_members[0]
users_module.add_new_user({
'user_name' : new_member.first_name,
'user_id' : new_member.id,
'message_id' : message.message_id + 1
})
# Выдаем мут новому пользователю
await supergroup_module.give_a_mute(new_member.id, "infinity")
# Создаем капчу
markup = bot_module.types.InlineKeyboardMarkup(row_width=2)
item1 = bot_module.types.InlineKeyboardButton("Я бот", callback_data='ban_new_user')
item2 = bot_module.types.InlineKeyboardButton("Я не бот", callback_data='unmute_new_user')
item3 = bot_module.types.InlineKeyboardButton("Я не знаю кто я", callback_data='fun_kik_new_user')
markup.add(item1, item2, item3)
# Отправляем сообщение с капчей
await message.reply("Вы бот?", reply_markup=markup)
# Снимаем бан с нового пользователя и приветствуем его
async def unmute_user(message):
# Проверка пользователя
if users_module.is_user_exist(message.from_user.id):
# Получаем пользователя по id
user = users_module.get_user_by_user_id(message.from_user.id)
# Снятие мута с нового пользователя и удаление сообщения с капчей
await supergroup_module.delete_message(user.get('message_id'))
await supergroup_module.give_a_mute(user.get('user_id'), "unmute")
# Отправка сообщения с приветствием
await welcome_module.send_welcome_message(message)
# Удаление пользователя из списка новых пользователей
await users_module.remove_user_by_user_id(message.from_user.id)
else:
# <NAME>
await supergroup_module.give_a_mute(message.from_user.id, 70)
# Баним бота ну или просто невнимательного пользователя
async def ban_user(message):
# Проверка на пользователя
if users_module.is_user_exist(message.from_user.id):
# Получаем пользователя по id
user = users_module.get_user_by_user_id(message.from_user.id)
# Бан пользователя и удаление сообщения с капчей
await supergroup_module.delete_message(user.get('message_id'))
await supergroup_module.give_a_ban(user.get('user_id'))
# Отправка сообщения с извещением о том что пользователь бот
await bot.send_message(chat_id, "Пошутил - проиграл")
# Удаление пользователя из списка новых пользователей
await users_module.remove_user_by_user_id(message.from_user.id)
else:
# <NAME>
await supergroup_module.give_a_mute(message.from_user.id, 70)
# Выкидываем пользователя из чата и насмехаемся над ним
async def kik_user(message):
# Проверка на пользователя
if users_module.is_user_exist(message.from_user.id):
# Получаем пользователя по id
user = users_module.get_user_by_user_id(message.from_user.id)
# Удаляем сообщение с капчей и насмехаемся над пользователем
await supergroup_module.delete_message(user.get('message_id'))
await bot.send_message(chat_id, "Подумай над своим ответом")
# Выкидываем пользователя из чата
await supergroup_module.give_a_kik(user.get('user_id'))
# Удаление пользователя из списка новых пользователей
await users_module.remove_user_by_user_id(message.from_user.id)
else:
# <NAME>
await supergroup_module.give_a_mute(message.from_user.id, 70)
| [
1,
529,
276,
1112,
420,
29958,
797,
1983,
21026,
29899,
3626,
29886,
29914,
1794,
13342,
29899,
15494,
1393,
29899,
7451,
13,
29937,
8936,
1520,
693,
1787,
29964,
1499,
13,
29937,
20266,
8776,
12854,
23842,
4647,
5588,
29988,
2569,
1520,
6188,
13,
3166,
4765,
1053,
4160,
29918,
5453,
13,
3166,
4765,
1053,
2428,
2972,
29918,
5453,
13,
3166,
4765,
1053,
9225,
29918,
5453,
13,
3166,
4765,
1053,
12853,
29918,
5453,
13,
13,
29937,
3982,
29969,
1086,
29972,
642,
23842,
4647,
5588,
29988,
19714,
12274,
2899,
13,
7451,
353,
9225,
29918,
5453,
29889,
7451,
13,
13496,
29918,
333,
353,
9225,
29918,
5453,
29889,
13496,
29918,
333,
13,
13,
29937,
5579,
8728,
1755,
1787,
29964,
1499,
13,
12674,
822,
3638,
29918,
5030,
2350,
29898,
4906,
1125,
13,
1678,
396,
971,
2899,
780,
642,
665,
2721,
13074,
11767,
3550,
6408,
8053,
13690,
13,
1678,
565,
2643,
29889,
3166,
29918,
1792,
451,
297,
2643,
29889,
1482,
29918,
13496,
29918,
28109,
29901,
13,
4706,
736,
13,
13,
1678,
396,
5579,
15177,
16990,
11650,
2430,
614,
22404,
29959,
18636,
9718,
730,
753,
13,
1678,
716,
29918,
14242,
353,
2643,
29889,
1482,
29918,
13496,
29918,
28109,
29961,
29900,
29962,
13,
1678,
4160,
29918,
5453,
29889,
1202,
29918,
1482,
29918,
1792,
3319,
13,
4706,
525,
1792,
29918,
978,
29915,
584,
716,
29918,
14242,
29889,
4102,
29918,
978,
29892,
13,
4706,
525,
1792,
29918,
333,
29915,
584,
716,
29918,
14242,
29889,
333,
29892,
13,
4706,
525,
4906,
29918,
333,
29915,
584,
2643,
29889,
4906,
29918,
333,
718,
29871,
29896,
13,
1678,
5615,
13,
13,
1678,
396,
14966,
840,
3098,
4179,
29932,
22404,
1805,
18636,
9718,
730,
2583,
13,
1678,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29885,
1082,
29898,
1482,
29918,
14242,
29889,
333,
29892,
376,
262,
4951,
537,
1159,
13,
13,
1678,
396,
5579,
8728,
3098,
1787,
29964,
9797,
13,
1678,
24986,
353,
9225,
29918,
5453,
29889,
8768,
29889,
797,
1220,
2558,
3377,
9802,
786,
29898,
798,
29918,
2103,
29922,
29906,
29897,
13,
1678,
2944,
29896,
353,
9225,
29918,
5453,
29889,
8768,
29889,
797,
1220,
2558,
3377,
3125,
703,
30096,
3419,
29932,
613,
6939,
29918,
1272,
2433,
2571,
29918,
1482,
29918,
1792,
1495,
13,
1678,
2944,
29906,
353,
9225,
29918,
5453,
29889,
8768,
29889,
797,
1220,
2558,
3377,
3125,
703,
30096,
1538,
3419,
29932,
613,
6939,
29918,
1272,
2433,
348,
29885,
1082,
29918,
1482,
29918,
1792,
1495,
13,
1678,
2944,
29941,
353,
9225,
29918,
5453,
29889,
8768,
29889,
797,
1220,
2558,
3377,
3125,
703,
30096,
1538,
6253,
30005,
1186,
702,
2282,
613,
6939,
29918,
1272,
2433,
7692,
29918,
29895,
638,
29918,
1482,
29918,
1792,
1495,
13,
1678,
24986,
29889,
1202,
29898,
667,
29896,
29892,
2944,
29906,
29892,
2944,
29941,
29897,
13,
13,
1678,
396,
14809,
6842,
1225,
3098,
25032,
24849,
531,
1787,
29964,
22587,
13,
1678,
7272,
2643,
29889,
3445,
368,
703,
30012,
29982,
3419,
29932,
29973,
613,
8908,
29918,
3502,
786,
29922,
3502,
786,
29897,
13,
13,
29937,
857,
7949,
3098,
24391,
531,
6968,
11913,
18636,
9718,
11146,
606,
1695,
7616,
8864,
3098,
5686,
13,
12674,
822,
443,
29885,
1082,
29918,
1792,
29898,
4906,
1125,
13,
1678,
396,
971,
2899,
780,
642,
18636,
9718,
11146,
13,
1678,
565,
4160,
29918,
5453,
29889,
275,
29918,
1792,
29918,
28997,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
1125,
13,
4706,
396,
2195,
1844,
1282,
3098,
18636,
9718,
11146,
733,
1178,
13,
4706,
1404,
353,
4160,
29918,
5453,
29889,
657,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
13,
4706,
396,
857,
1200,
18380,
4179,
676,
531,
6968,
11913,
18636,
9718,
11146,
606,
19871,
6195,
25032,
14483,
531,
1787,
29964,
22587,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
8143,
29918,
4906,
29898,
1792,
29889,
657,
877,
4906,
29918,
333,
8785,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29885,
1082,
29898,
1792,
29889,
657,
877,
1792,
29918,
333,
5477,
376,
348,
29885,
1082,
1159,
13,
13,
4706,
396,
14809,
6842,
642,
25032,
14483,
531,
1695,
7616,
7926,
3098,
13,
4706,
7272,
12853,
29918,
5453,
29889,
6717,
29918,
20466,
2763,
29918,
4906,
29898,
4906,
29897,
13,
13,
4706,
396,
2014,
840,
6195,
18636,
9718,
11146,
1866,
27768,
2494,
13074,
9240,
18636,
9718,
11572,
13,
4706,
7272,
4160,
29918,
5453,
29889,
5992,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
1678,
1683,
29901,
13,
4706,
396,
529,
5813,
29958,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29885,
1082,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29892,
29871,
29955,
29900,
29897,
13,
13,
29937,
6049,
5472,
3419,
676,
26367,
7082,
1471,
1578,
1538,
29942,
7949,
2584,
1868,
18636,
9718,
11146,
13,
12674,
822,
9892,
29918,
1792,
29898,
4906,
1125,
13,
1678,
396,
971,
2899,
780,
642,
665,
18636,
9718,
11146,
13,
1678,
565,
4160,
29918,
5453,
29889,
275,
29918,
1792,
29918,
28997,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
1125,
13,
4706,
396,
2195,
1844,
1282,
3098,
18636,
9718,
11146,
733,
1178,
13,
4706,
1404,
353,
4160,
29918,
5453,
29889,
657,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
13,
4706,
396,
1386,
745,
18636,
9718,
11146,
606,
19871,
6195,
25032,
14483,
531,
1787,
29964,
22587,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
8143,
29918,
4906,
29898,
1792,
29889,
657,
877,
4906,
29918,
333,
8785,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
2571,
29898,
1792,
29889,
657,
877,
1792,
29918,
333,
8785,
13,
13,
4706,
396,
14809,
6842,
642,
25032,
14483,
531,
1866,
1521,
2402,
8751,
614,
13610,
4281,
18636,
9718,
2584,
3419,
29932,
13,
4706,
7272,
9225,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
376,
20093,
10360,
26765,
448,
1471,
25087,
29944,
1159,
13,
13,
4706,
396,
2014,
840,
6195,
18636,
9718,
11146,
1866,
27768,
2494,
13074,
9240,
18636,
9718,
11572,
13,
4706,
7272,
4160,
29918,
5453,
29889,
5992,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
1678,
1683,
29901,
13,
4706,
396,
529,
5813,
29958,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29885,
1082,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29892,
29871,
29955,
29900,
29897,
13,
13,
29937,
14966,
717,
4184,
846,
3098,
18636,
9718,
11146,
1866,
3655,
676,
606,
665,
29935,
1488,
3369,
3098,
1198,
8082,
29871,
5472,
13,
12674,
822,
413,
638,
29918,
1792,
29898,
4906,
1125,
13,
1678,
396,
971,
2899,
780,
642,
665,
18636,
9718,
11146,
13,
1678,
565,
4160,
29918,
5453,
29889,
275,
29918,
1792,
29918,
28997,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
1125,
13,
4706,
396,
2195,
1844,
1282,
3098,
18636,
9718,
11146,
733,
1178,
13,
4706,
1404,
353,
4160,
29918,
5453,
29889,
657,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
13,
4706,
396,
2014,
840,
1225,
3098,
25032,
24849,
531,
1787,
29964,
22587,
606,
665,
29935,
1488,
3369,
3098,
1198,
8082,
18636,
9718,
17584,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
8143,
29918,
4906,
29898,
1792,
29889,
657,
877,
4906,
29918,
333,
8785,
13,
4706,
7272,
9225,
29889,
6717,
29918,
4906,
29898,
13496,
29918,
333,
29892,
376,
20093,
1520,
27152,
8082,
3862,
9430,
1685,
1521,
4816,
1159,
13,
13,
4706,
396,
14966,
717,
4184,
846,
3098,
18636,
9718,
11146,
1866,
3655,
676,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29895,
638,
29898,
1792,
29889,
657,
877,
1792,
29918,
333,
8785,
13,
13,
4706,
396,
2014,
840,
6195,
18636,
9718,
11146,
1866,
27768,
2494,
13074,
9240,
18636,
9718,
11572,
13,
4706,
7272,
4160,
29918,
5453,
29889,
5992,
29918,
1792,
29918,
1609,
29918,
1792,
29918,
333,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29897,
13,
1678,
1683,
29901,
13,
4706,
396,
529,
5813,
29958,
13,
4706,
7272,
2428,
2972,
29918,
5453,
29889,
29887,
573,
29918,
29874,
29918,
29885,
1082,
29898,
4906,
29889,
3166,
29918,
1792,
29889,
333,
29892,
29871,
29955,
29900,
29897,
13,
2
] |
ms2ldaviz/ms1analysis/models.py | RP0001/ms2ldaviz | 0 | 114989 | from __future__ import unicode_literals
from django.db import models
from basicviz.models import Document, Experiment, Mass2Motif
from basicviz.constants import EXPERIMENT_STATUS_CODE
from decomposition.models import Decomposition, GlobalMotif
## tables for LDA experiment
class Sample(models.Model):
name = models.CharField(max_length=128)
experiment = models.ForeignKey(Experiment)
class DocSampleIntensity(models.Model):
sample = models.ForeignKey(Sample)
document = models.ForeignKey(Document)
intensity = models.FloatField(null=True)
class Analysis(models.Model):
name = models.CharField(max_length=128)
description = models.CharField(max_length=1024)
experiment = models.ForeignKey(Experiment)
group1 = models.CharField(max_length=2048)
group2 = models.CharField(max_length=2048)
ready_code, _ = EXPERIMENT_STATUS_CODE[1]
status = models.CharField(max_length=128, choices=EXPERIMENT_STATUS_CODE,
null=True, default=ready_code)
use_logarithm = models.CharField(max_length=128, choices=[('N', 'No'), ('Y', 'Yes'),],
null=True, default='N')
class AnalysisResult(models.Model):
analysis = models.ForeignKey(Analysis)
document = models.ForeignKey(Document)
pValue = models.FloatField(null=True)
foldChange = models.FloatField(null=True)
class AnalysisResultPlage(models.Model):
analysis = models.ForeignKey(Analysis)
mass2motif = models.ForeignKey(Mass2Motif)
plage_t_value = models.FloatField(null=True)
plage_p_value = models.FloatField(null=True)
## tables for Decomposition
## currently just similar to LDA experiment settings, and change 'Experiment' to 'Decomposition'
## may avoid this duplication in the future
## decomposition shares the same idea of loading peaklist file and parsing it to databse
## so use the same Sample and DocSampleIntensity
## Analysis for Decomposition, change experiment to decomposition
## if we want to get the corresponding experiment id, we can use decomposition id to search:
## Experiment.objects.get(id = decomposition.experiment_id)
class DecompositionAnalysis(models.Model):
name = models.CharField(max_length=128)
description = models.CharField(max_length=1024)
decomposition = models.ForeignKey(Decomposition) ## diff
group1 = models.CharField(max_length=2048)
group2 = models.CharField(max_length=2048)
ready_code, _ = EXPERIMENT_STATUS_CODE[1]
status = models.CharField(max_length=128, choices=EXPERIMENT_STATUS_CODE,
null=True, default=ready_code)
use_logarithm = models.CharField(max_length=128, choices=[('N', 'No'), ('Y', 'Yes'),],
null=True, default='N')
class DecompositionAnalysisResult(models.Model):
analysis = models.ForeignKey(DecompositionAnalysis) ## diff
document = models.ForeignKey(Document)
pValue = models.FloatField(null=True)
foldChange = models.FloatField(null=True)
class DecompositionAnalysisResultPlage(models.Model):
analysis = models.ForeignKey(DecompositionAnalysis) ## diff
globalmotif = models.ForeignKey(GlobalMotif) ## diff
plage_t_value = models.FloatField(null=True)
plage_p_value = models.FloatField(null=True)
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
6996,
29894,
466,
29889,
9794,
1053,
10854,
29892,
1222,
15362,
29892,
7360,
29906,
29924,
327,
361,
13,
3166,
6996,
29894,
466,
29889,
3075,
1934,
1053,
8528,
13171,
7833,
3919,
29918,
27047,
29918,
16524,
13,
3166,
26227,
29889,
9794,
1053,
897,
510,
3283,
29892,
12002,
29924,
327,
361,
13,
13,
2277,
6131,
363,
365,
7698,
7639,
13,
1990,
21029,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29897,
13,
1678,
7639,
353,
4733,
29889,
27755,
2558,
29898,
1252,
15362,
29897,
13,
13,
1990,
28197,
17708,
2928,
575,
537,
29898,
9794,
29889,
3195,
1125,
13,
1678,
4559,
353,
4733,
29889,
27755,
2558,
29898,
17708,
29897,
13,
1678,
1842,
353,
4733,
29889,
27755,
2558,
29898,
6268,
29897,
13,
1678,
26171,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
13,
1990,
24352,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29897,
13,
1678,
6139,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29900,
29906,
29946,
29897,
13,
1678,
7639,
353,
4733,
29889,
27755,
2558,
29898,
1252,
15362,
29897,
13,
1678,
2318,
29896,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29946,
29947,
29897,
13,
1678,
2318,
29906,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29946,
29947,
29897,
13,
1678,
7960,
29918,
401,
29892,
903,
353,
8528,
13171,
7833,
3919,
29918,
27047,
29918,
16524,
29961,
29896,
29962,
13,
1678,
4660,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29892,
19995,
29922,
5746,
13171,
7833,
3919,
29918,
27047,
29918,
16524,
29892,
13,
462,
795,
1870,
29922,
5574,
29892,
2322,
29922,
2040,
29918,
401,
29897,
13,
1678,
671,
29918,
1188,
23830,
29885,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29892,
19995,
11759,
877,
29940,
742,
525,
3782,
5477,
6702,
29979,
742,
525,
8241,
5477,
1402,
13,
462,
795,
1870,
29922,
5574,
29892,
2322,
2433,
29940,
1495,
13,
13,
1990,
24352,
3591,
29898,
9794,
29889,
3195,
1125,
13,
1678,
7418,
353,
4733,
29889,
27755,
2558,
29898,
21067,
4848,
29897,
13,
1678,
1842,
353,
4733,
29889,
27755,
2558,
29898,
6268,
29897,
13,
1678,
282,
1917,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
1678,
900,
29881,
7277,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
13,
1990,
24352,
3591,
3247,
482,
29898,
9794,
29889,
3195,
1125,
13,
1678,
7418,
353,
4733,
29889,
27755,
2558,
29898,
21067,
4848,
29897,
13,
1678,
4158,
29906,
14817,
361,
353,
4733,
29889,
27755,
2558,
29898,
29924,
465,
29906,
29924,
327,
361,
29897,
13,
1678,
715,
482,
29918,
29873,
29918,
1767,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
1678,
715,
482,
29918,
29886,
29918,
1767,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
13,
2277,
6131,
363,
897,
510,
3283,
13,
2277,
5279,
925,
2788,
304,
365,
7698,
7639,
6055,
29892,
322,
1735,
525,
1252,
15362,
29915,
304,
525,
2772,
510,
3283,
29915,
13,
2277,
1122,
4772,
445,
5141,
1414,
297,
278,
5434,
13,
13,
2277,
26227,
29358,
278,
1021,
2969,
310,
8363,
19224,
1761,
934,
322,
13755,
372,
304,
16236,
344,
13,
2277,
577,
671,
278,
1021,
21029,
322,
28197,
17708,
2928,
575,
537,
13,
13,
13,
2277,
24352,
363,
897,
510,
3283,
29892,
1735,
7639,
304,
26227,
13,
2277,
565,
591,
864,
304,
679,
278,
6590,
7639,
1178,
29892,
591,
508,
671,
26227,
1178,
304,
2740,
29901,
13,
2277,
1222,
15362,
29889,
12650,
29889,
657,
29898,
333,
353,
26227,
29889,
735,
15362,
29918,
333,
29897,
13,
1990,
897,
510,
3283,
21067,
4848,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29897,
13,
1678,
6139,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29900,
29906,
29946,
29897,
13,
1678,
26227,
353,
4733,
29889,
27755,
2558,
29898,
2772,
510,
3283,
29897,
444,
2923,
13,
1678,
2318,
29896,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29946,
29947,
29897,
13,
1678,
2318,
29906,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29900,
29946,
29947,
29897,
13,
1678,
7960,
29918,
401,
29892,
903,
353,
8528,
13171,
7833,
3919,
29918,
27047,
29918,
16524,
29961,
29896,
29962,
13,
1678,
4660,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29892,
19995,
29922,
5746,
13171,
7833,
3919,
29918,
27047,
29918,
16524,
29892,
13,
462,
795,
1870,
29922,
5574,
29892,
2322,
29922,
2040,
29918,
401,
29897,
13,
1678,
671,
29918,
1188,
23830,
29885,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29906,
29947,
29892,
19995,
11759,
877,
29940,
742,
525,
3782,
5477,
6702,
29979,
742,
525,
8241,
5477,
1402,
13,
462,
795,
1870,
29922,
5574,
29892,
2322,
2433,
29940,
1495,
13,
13,
1990,
897,
510,
3283,
21067,
4848,
3591,
29898,
9794,
29889,
3195,
1125,
13,
1678,
7418,
353,
4733,
29889,
27755,
2558,
29898,
2772,
510,
3283,
21067,
4848,
29897,
444,
2923,
13,
1678,
1842,
353,
4733,
29889,
27755,
2558,
29898,
6268,
29897,
13,
1678,
282,
1917,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
1678,
900,
29881,
7277,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
13,
1990,
897,
510,
3283,
21067,
4848,
3591,
3247,
482,
29898,
9794,
29889,
3195,
1125,
13,
1678,
7418,
353,
4733,
29889,
27755,
2558,
29898,
2772,
510,
3283,
21067,
4848,
29897,
444,
2923,
13,
1678,
5534,
14817,
361,
353,
4733,
29889,
27755,
2558,
29898,
12756,
29924,
327,
361,
29897,
444,
2923,
13,
1678,
715,
482,
29918,
29873,
29918,
1767,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
1678,
715,
482,
29918,
29886,
29918,
1767,
353,
4733,
29889,
11031,
3073,
29898,
4304,
29922,
5574,
29897,
13,
2
] |
utils/alertcheck.py | sethusaim/Shredder-Machine-System | 0 | 113994 | <filename>utils/alertcheck.py
import os
import cv2
from playsound import playsound
def drawboxtosafeline(image_np, p1, p2, Line_Position2, Orientation):
if Orientation == "bt":
bounding_mid = (int((p1[0] + p2[0]) / 2), int(p1[1]))
if bounding_mid:
cv2.line(
img=image_np,
pt1=bounding_mid,
pt2=(bounding_mid[0], Line_Position2),
color=(255, 0, 0),
thickness=1,
lineType=8,
shift=0,
)
distance_from_line = bounding_mid[1] - Line_Position2
elif Orientation == "tb":
bounding_mid = (int((p1[0] + p2[0]) / 2), int(p2[1]))
if bounding_mid:
cv2.line(
img=image_np,
pt1=bounding_mid,
pt2=(bounding_mid[0], Line_Position2),
color=(255, 0, 0),
thickness=1,
lineType=8,
shift=0,
)
distance_from_line = Line_Position2 - bounding_mid[1]
elif Orientation == "lr":
bounding_mid = (int(p2[0]), int((p1[1] + p2[1]) / 2))
if bounding_mid:
cv2.line(
img=image_np,
pt1=bounding_mid,
pt2=(Line_Position2, bounding_mid[1]),
color=(255, 0, 0),
thickness=1,
lineType=8,
shift=0,
)
distance_from_line = Line_Position2 - bounding_mid[0]
elif Orientation == "rl":
bounding_mid = (int(p1[0]), int((p1[1] + p2[1]) / 2))
if bounding_mid:
cv2.line(
img=image_np,
pt1=bounding_mid,
pt2=(Line_Position2, bounding_mid[1]),
color=(255, 0, 0),
thickness=1,
lineType=8,
shift=0,
)
distance_from_line = bounding_mid[1] - Line_Position2
if distance_from_line <= 0:
posii = int(image_np.shape[1] / 2)
cv2.putText(
image_np,
"ALERT",
(posii, 50),
cv2.FONT_HERSHEY_SIMPLEX,
0.75,
(255, 0, 0),
2,
)
sound = os.path.join("utils", "alert.wav")
playsound(sound=sound)
cv2.rectangle(
image_np,
(posii - 20, 20),
(posii + 85, 60),
(255, 0, 0),
thickness=3,
lineType=8,
shift=0,
)
return 1
else:
return 0
| [
1,
529,
9507,
29958,
13239,
29914,
12888,
3198,
29889,
2272,
13,
5215,
2897,
13,
13,
5215,
13850,
29906,
13,
3166,
13582,
618,
1053,
13582,
618,
13,
13,
13,
1753,
4216,
833,
486,
359,
2142,
5570,
29898,
3027,
29918,
9302,
29892,
282,
29896,
29892,
282,
29906,
29892,
7407,
29918,
8003,
29906,
29892,
11678,
9233,
1125,
13,
1678,
565,
11678,
9233,
1275,
376,
3116,
1115,
13,
4706,
3216,
292,
29918,
6563,
353,
313,
524,
3552,
29886,
29896,
29961,
29900,
29962,
718,
282,
29906,
29961,
29900,
2314,
847,
29871,
29906,
511,
938,
29898,
29886,
29896,
29961,
29896,
12622,
13,
13,
4706,
565,
3216,
292,
29918,
6563,
29901,
13,
9651,
13850,
29906,
29889,
1220,
29898,
13,
18884,
10153,
29922,
3027,
29918,
9302,
29892,
13,
18884,
19592,
29896,
29922,
9917,
292,
29918,
6563,
29892,
13,
18884,
19592,
29906,
7607,
9917,
292,
29918,
6563,
29961,
29900,
1402,
7407,
29918,
8003,
29906,
511,
13,
18884,
2927,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
18884,
12003,
2264,
29922,
29896,
29892,
13,
18884,
1196,
1542,
29922,
29947,
29892,
13,
18884,
9500,
29922,
29900,
29892,
13,
9651,
1723,
13,
13,
9651,
5418,
29918,
3166,
29918,
1220,
353,
3216,
292,
29918,
6563,
29961,
29896,
29962,
448,
7407,
29918,
8003,
29906,
13,
13,
1678,
25342,
11678,
9233,
1275,
376,
22625,
1115,
13,
4706,
3216,
292,
29918,
6563,
353,
313,
524,
3552,
29886,
29896,
29961,
29900,
29962,
718,
282,
29906,
29961,
29900,
2314,
847,
29871,
29906,
511,
938,
29898,
29886,
29906,
29961,
29896,
12622,
13,
13,
4706,
565,
3216,
292,
29918,
6563,
29901,
13,
9651,
13850,
29906,
29889,
1220,
29898,
13,
18884,
10153,
29922,
3027,
29918,
9302,
29892,
13,
18884,
19592,
29896,
29922,
9917,
292,
29918,
6563,
29892,
13,
18884,
19592,
29906,
7607,
9917,
292,
29918,
6563,
29961,
29900,
1402,
7407,
29918,
8003,
29906,
511,
13,
18884,
2927,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
18884,
12003,
2264,
29922,
29896,
29892,
13,
18884,
1196,
1542,
29922,
29947,
29892,
13,
18884,
9500,
29922,
29900,
29892,
13,
9651,
1723,
13,
13,
9651,
5418,
29918,
3166,
29918,
1220,
353,
7407,
29918,
8003,
29906,
448,
3216,
292,
29918,
6563,
29961,
29896,
29962,
13,
13,
1678,
25342,
11678,
9233,
1275,
376,
29212,
1115,
13,
4706,
3216,
292,
29918,
6563,
353,
313,
524,
29898,
29886,
29906,
29961,
29900,
11724,
938,
3552,
29886,
29896,
29961,
29896,
29962,
718,
282,
29906,
29961,
29896,
2314,
847,
29871,
29906,
876,
13,
13,
4706,
565,
3216,
292,
29918,
6563,
29901,
13,
9651,
13850,
29906,
29889,
1220,
29898,
13,
18884,
10153,
29922,
3027,
29918,
9302,
29892,
13,
18884,
19592,
29896,
29922,
9917,
292,
29918,
6563,
29892,
13,
18884,
19592,
29906,
7607,
3542,
29918,
8003,
29906,
29892,
3216,
292,
29918,
6563,
29961,
29896,
11724,
13,
18884,
2927,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
18884,
12003,
2264,
29922,
29896,
29892,
13,
18884,
1196,
1542,
29922,
29947,
29892,
13,
18884,
9500,
29922,
29900,
29892,
13,
9651,
1723,
13,
13,
9651,
5418,
29918,
3166,
29918,
1220,
353,
7407,
29918,
8003,
29906,
448,
3216,
292,
29918,
6563,
29961,
29900,
29962,
13,
13,
1678,
25342,
11678,
9233,
1275,
376,
2096,
1115,
13,
4706,
3216,
292,
29918,
6563,
353,
313,
524,
29898,
29886,
29896,
29961,
29900,
11724,
938,
3552,
29886,
29896,
29961,
29896,
29962,
718,
282,
29906,
29961,
29896,
2314,
847,
29871,
29906,
876,
13,
13,
4706,
565,
3216,
292,
29918,
6563,
29901,
13,
9651,
13850,
29906,
29889,
1220,
29898,
13,
18884,
10153,
29922,
3027,
29918,
9302,
29892,
13,
18884,
19592,
29896,
29922,
9917,
292,
29918,
6563,
29892,
13,
18884,
19592,
29906,
7607,
3542,
29918,
8003,
29906,
29892,
3216,
292,
29918,
6563,
29961,
29896,
11724,
13,
18884,
2927,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
18884,
12003,
2264,
29922,
29896,
29892,
13,
18884,
1196,
1542,
29922,
29947,
29892,
13,
18884,
9500,
29922,
29900,
29892,
13,
9651,
1723,
13,
13,
9651,
5418,
29918,
3166,
29918,
1220,
353,
3216,
292,
29918,
6563,
29961,
29896,
29962,
448,
7407,
29918,
8003,
29906,
13,
13,
1678,
565,
5418,
29918,
3166,
29918,
1220,
5277,
29871,
29900,
29901,
13,
4706,
926,
2236,
353,
938,
29898,
3027,
29918,
9302,
29889,
12181,
29961,
29896,
29962,
847,
29871,
29906,
29897,
13,
13,
4706,
13850,
29906,
29889,
649,
1626,
29898,
13,
9651,
1967,
29918,
9302,
29892,
13,
9651,
376,
1964,
20161,
613,
13,
9651,
313,
1066,
2236,
29892,
29871,
29945,
29900,
511,
13,
9651,
13850,
29906,
29889,
29943,
1164,
29911,
29918,
4448,
7068,
13282,
29918,
5425,
3580,
1307,
29990,
29892,
13,
632,
29900,
29889,
29955,
29945,
29892,
13,
9651,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
632,
29906,
29892,
13,
4706,
1723,
13,
13,
4706,
6047,
353,
2897,
29889,
2084,
29889,
7122,
703,
13239,
613,
376,
12888,
29889,
29893,
485,
1159,
13,
13,
4706,
13582,
618,
29898,
29802,
29922,
29802,
29897,
13,
13,
4706,
13850,
29906,
29889,
1621,
2521,
29898,
13,
9651,
1967,
29918,
9302,
29892,
13,
9651,
313,
1066,
2236,
448,
29871,
29906,
29900,
29892,
29871,
29906,
29900,
511,
13,
9651,
313,
1066,
2236,
718,
29871,
29947,
29945,
29892,
29871,
29953,
29900,
511,
13,
9651,
313,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
9651,
12003,
2264,
29922,
29941,
29892,
13,
9651,
1196,
1542,
29922,
29947,
29892,
13,
9651,
9500,
29922,
29900,
29892,
13,
4706,
1723,
13,
13,
4706,
736,
29871,
29896,
13,
13,
1678,
1683,
29901,
13,
4706,
736,
29871,
29900,
13,
2
] |
read_iceye_h5.py | eciraci/iceye_gamma_proc | 0 | 23344 | <gh_stars>0
#!/usr/bin/env python
u"""
read_iceye_h5.py
Written by <NAME>' (03/2022)
Read ICEYE Single Look Complex and Parameter file using GAMMA's Python
integration with the py_gamma module.
usage: read_iceye_h5.py [-h] [--directory DIRECTORY]
TEST: Read ICEye Single Look Complex and Parameter.
optional arguments:
-h, --help show this help message and exit
--directory DIRECTORY, -D DIRECTORY
Project data directory.
--slc SLC, -C SLC Process and single SLC.
PYTHON DEPENDENCIES:
argparse: Parser for command-line options, arguments and sub-commands
https://docs.python.org/3/library/argparse.html
datetime: Basic date and time types
https://docs.python.org/3/library/datetime.html#module-datetime
tqdm: Progress Bar in Python.
https://tqdm.github.io/
py_gamma: GAMMA's Python integration with the py_gamma module
UPDATE HISTORY:
"""
# - Python Dependencies
from __future__ import print_function
import os
import argparse
import datetime
from tqdm import tqdm
# - GAMMA's Python integration with the py_gamma module
import py_gamma as pg
# - Utility Function
from utils.make_dir import make_dir
def main():
parser = argparse.ArgumentParser(
description="""TEST: Read ICEye Single Look Complex and Parameter."""
)
# - Absolute Path to directory containing input data.
default_dir = os.path.join(os.path.expanduser('~'), 'Desktop',
'iceye_gamma_test')
parser.add_argument('--directory', '-D',
type=lambda p: os.path.abspath(os.path.expanduser(p)),
default=default_dir,
help='Project data directory.')
parser.add_argument('--slc', '-C', type=str,
default=None, help='Process and single SLC.')
args = parser.parse_args()
# - Path to Test directory
data_dir = os.path.join(args.directory, 'input')
# - create output directory
out_dir = make_dir(args.directory, 'output')
out_dir = make_dir(out_dir, 'slc+par')
# - ICEye Suffix
ieye_suff = 'ICEYE_X7_SLC_SM_'
if args.slc is not None:
# - Process a single SLC
b_input = os.path.join(data_dir, args.slc)
# - Read input Binary File Name
b_input_name = b_input.split('/')[-1].replace(ieye_suff, '')
slc_name = os.path.join(out_dir,
str(b_input_name.replace('.h5', '.slc')))
par_name = os.path.join(out_dir,
str(b_input_name.replace('.h5', '.par')))
# - Extract SLC and Parameter File
# - Set dtype equal to zero to save the SLC in FCOMPLEX format.
pg.par_ICEYE_SLC(b_input, par_name, slc_name, 0)
else:
# - Process hte entire input directory content
# - List Directory Content
data_dir_list = [os.path.join(data_dir, x) for x in os.listdir(data_dir)
if x.endswith('.h5')]
for b_input in tqdm(data_dir_list, total=len(data_dir_list), ncols=60):
# - Read input Binary File Name
b_input_name = b_input.split('/')[-1].replace(ieye_suff, '')
slc_name = os.path.join(out_dir, b_input_name.replace('.h5', '.slc'))
par_name = os.path.join(out_dir, b_input_name.replace('.h5', '.par'))
# - Extract SLC and Parameter File
# - Set dtype equal to zero to save the SLC in FCOMPLEX format.
pg.par_ICEYE_SLC(b_input, par_name, slc_name, 0)
# - run main program
if __name__ == '__main__':
start_time = datetime.datetime.now()
main()
end_time = datetime.datetime.now()
print(f"# - Computation Time: {end_time - start_time}")
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29884,
15945,
29908,
13,
949,
29918,
625,
4099,
29918,
29882,
29945,
29889,
2272,
13,
29956,
20833,
491,
529,
5813,
16299,
313,
29900,
29941,
29914,
29906,
29900,
29906,
29906,
29897,
13,
6359,
306,
4741,
29979,
29923,
16740,
7419,
26596,
322,
24953,
934,
773,
29871,
402,
5194,
1529,
29915,
29879,
5132,
13,
27925,
411,
278,
11451,
29918,
4283,
3883,
29889,
13,
13,
21125,
29901,
1303,
29918,
625,
4099,
29918,
29882,
29945,
29889,
2272,
21069,
29882,
29962,
518,
489,
12322,
22471,
26282,
18929,
29962,
13,
13,
18267,
29901,
7523,
306,
4741,
4099,
16740,
7419,
26596,
322,
24953,
29889,
13,
13,
25253,
6273,
29901,
13,
29871,
448,
29882,
29892,
1192,
8477,
9651,
1510,
445,
1371,
2643,
322,
6876,
13,
29871,
1192,
12322,
22471,
26282,
18929,
29892,
448,
29928,
22471,
26282,
18929,
13,
462,
4706,
8010,
848,
3884,
29889,
13,
29871,
1192,
2536,
29883,
317,
12182,
29892,
448,
29907,
317,
12182,
268,
10554,
322,
2323,
317,
12182,
29889,
13,
13,
20055,
4690,
1164,
5012,
29925,
11794,
1430,
8426,
2890,
29901,
13,
1678,
1852,
5510,
29901,
1459,
643,
363,
1899,
29899,
1220,
3987,
29892,
6273,
322,
1014,
29899,
26381,
13,
965,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29941,
29914,
5258,
29914,
1191,
5510,
29889,
1420,
13,
1678,
12865,
29901,
19219,
2635,
322,
931,
4072,
13,
965,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29941,
29914,
5258,
29914,
12673,
29889,
1420,
29937,
5453,
29899,
12673,
13,
1678,
260,
29939,
18933,
29901,
20018,
2261,
297,
5132,
29889,
13,
3986,
2045,
597,
29873,
29939,
18933,
29889,
3292,
29889,
601,
29914,
13,
1678,
11451,
29918,
4283,
29901,
402,
5194,
1529,
29915,
29879,
5132,
13465,
411,
278,
11451,
29918,
4283,
3883,
13,
13,
14474,
379,
9047,
18929,
29901,
13,
13,
15945,
29908,
13,
29937,
448,
5132,
10034,
7158,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
2897,
13,
5215,
1852,
5510,
13,
5215,
12865,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
29937,
448,
402,
5194,
1529,
29915,
29879,
5132,
13465,
411,
278,
11451,
29918,
4283,
3883,
13,
5215,
11451,
29918,
4283,
408,
23822,
13,
29937,
448,
22310,
537,
6680,
13,
3166,
3667,
29879,
29889,
5675,
29918,
3972,
1053,
1207,
29918,
3972,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
4706,
6139,
13776,
29908,
18267,
29901,
7523,
306,
4741,
4099,
16740,
7419,
26596,
322,
24953,
1213,
15945,
13,
1678,
1723,
13,
1678,
396,
448,
1976,
14977,
10802,
304,
3884,
6943,
1881,
848,
29889,
13,
1678,
2322,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
18837,
1792,
877,
30022,
5477,
525,
17600,
742,
13,
462,
1669,
525,
625,
4099,
29918,
4283,
29918,
1688,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
12322,
742,
17411,
29928,
742,
13,
462,
4706,
1134,
29922,
2892,
282,
29901,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
18837,
1792,
29898,
29886,
8243,
13,
462,
4706,
2322,
29922,
4381,
29918,
3972,
29892,
13,
462,
4706,
1371,
2433,
7653,
848,
3884,
29889,
1495,
13,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
2536,
29883,
742,
17411,
29907,
742,
1134,
29922,
710,
29892,
13,
462,
4706,
2322,
29922,
8516,
29892,
1371,
2433,
7032,
322,
2323,
317,
12182,
29889,
1495,
13,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
396,
448,
10802,
304,
4321,
3884,
13,
1678,
848,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
12322,
29892,
525,
2080,
1495,
13,
13,
1678,
396,
448,
1653,
1962,
3884,
13,
1678,
714,
29918,
3972,
353,
1207,
29918,
3972,
29898,
5085,
29889,
12322,
29892,
525,
4905,
1495,
13,
1678,
714,
29918,
3972,
353,
1207,
29918,
3972,
29898,
449,
29918,
3972,
29892,
525,
2536,
29883,
29974,
862,
1495,
13,
13,
1678,
396,
448,
306,
4741,
4099,
2166,
600,
861,
13,
1678,
19282,
4099,
29918,
2146,
600,
353,
525,
12107,
29979,
29923,
29918,
29990,
29955,
29918,
29903,
12182,
29918,
17061,
29918,
29915,
13,
13,
1678,
565,
6389,
29889,
2536,
29883,
338,
451,
6213,
29901,
13,
4706,
396,
448,
10554,
263,
2323,
317,
12182,
13,
4706,
289,
29918,
2080,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
6389,
29889,
2536,
29883,
29897,
13,
4706,
396,
448,
7523,
1881,
29479,
3497,
4408,
13,
4706,
289,
29918,
2080,
29918,
978,
353,
289,
29918,
2080,
29889,
5451,
11219,
1495,
14352,
29896,
1822,
6506,
29898,
347,
4099,
29918,
2146,
600,
29892,
27255,
13,
4706,
2243,
29883,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
449,
29918,
3972,
29892,
13,
462,
18884,
851,
29898,
29890,
29918,
2080,
29918,
978,
29889,
6506,
12839,
29882,
29945,
742,
15300,
2536,
29883,
29915,
4961,
13,
4706,
610,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
449,
29918,
3972,
29892,
13,
462,
18884,
851,
29898,
29890,
29918,
2080,
29918,
978,
29889,
6506,
12839,
29882,
29945,
742,
15300,
862,
29915,
4961,
13,
4706,
396,
448,
7338,
1461,
317,
12182,
322,
24953,
3497,
13,
4706,
396,
448,
3789,
26688,
5186,
304,
5225,
304,
4078,
278,
317,
12182,
297,
383,
21514,
1307,
29990,
3402,
29889,
13,
4706,
23822,
29889,
862,
29918,
12107,
29979,
29923,
29918,
29903,
12182,
29898,
29890,
29918,
2080,
29892,
610,
29918,
978,
29892,
2243,
29883,
29918,
978,
29892,
29871,
29900,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
396,
448,
10554,
298,
371,
4152,
1881,
3884,
2793,
13,
4706,
396,
448,
2391,
18862,
10576,
13,
4706,
848,
29918,
3972,
29918,
1761,
353,
518,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
921,
29897,
363,
921,
297,
2897,
29889,
1761,
3972,
29898,
1272,
29918,
3972,
29897,
13,
462,
308,
565,
921,
29889,
1975,
2541,
12839,
29882,
29945,
1495,
29962,
13,
13,
4706,
363,
289,
29918,
2080,
297,
260,
29939,
18933,
29898,
1272,
29918,
3972,
29918,
1761,
29892,
3001,
29922,
2435,
29898,
1272,
29918,
3972,
29918,
1761,
511,
302,
22724,
29922,
29953,
29900,
1125,
13,
9651,
396,
448,
7523,
1881,
29479,
3497,
4408,
13,
9651,
289,
29918,
2080,
29918,
978,
353,
289,
29918,
2080,
29889,
5451,
11219,
1495,
14352,
29896,
1822,
6506,
29898,
347,
4099,
29918,
2146,
600,
29892,
27255,
13,
9651,
2243,
29883,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
449,
29918,
3972,
29892,
289,
29918,
2080,
29918,
978,
29889,
6506,
12839,
29882,
29945,
742,
15300,
2536,
29883,
8785,
13,
9651,
610,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
449,
29918,
3972,
29892,
289,
29918,
2080,
29918,
978,
29889,
6506,
12839,
29882,
29945,
742,
15300,
862,
8785,
13,
9651,
396,
448,
7338,
1461,
317,
12182,
322,
24953,
3497,
13,
9651,
396,
448,
3789,
26688,
5186,
304,
5225,
304,
4078,
278,
317,
12182,
297,
383,
21514,
1307,
29990,
3402,
29889,
13,
9651,
23822,
29889,
862,
29918,
12107,
29979,
29923,
29918,
29903,
12182,
29898,
29890,
29918,
2080,
29892,
610,
29918,
978,
29892,
2243,
29883,
29918,
978,
29892,
29871,
29900,
29897,
13,
13,
13,
29937,
448,
1065,
1667,
1824,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1369,
29918,
2230,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
1678,
1667,
580,
13,
1678,
1095,
29918,
2230,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
1678,
1596,
29898,
29888,
29908,
29937,
448,
11796,
362,
5974,
29901,
426,
355,
29918,
2230,
448,
1369,
29918,
2230,
27195,
13,
2
] |
genEM3/training/classifier.py | generem/generem | 0 | 1608123 | import os
import datetime
from typing import List, Union, Dict
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
import torch
from torch import nn
from torch.utils.tensorboard import SummaryWriter
from torch import device as torchDevice
from genEM3.util import gpu
from genEM3.training.metrics import Metrics
class Trainer:
def __init__(self,
run_name: str,
run_root: str,
model: nn.Module,
optimizer: torch.optim.Optimizer,
criterion: nn.MSELoss,
data_loaders: Union[List, Dict],
num_epoch: int = 100,
log_int: int = 10,
device: str = 'cpu',
save: bool = False,
save_int: int = 1,
resume: bool = False,
gpu_id: int = None,
balance_factor: List = None):
"""balance_factor: is a list which contains the balance factor for each training epoch"""
self.run_name = run_name
self.run_root = run_root
self.model = model
self.optimizer = optimizer
self.criterion = criterion
self.num_epoch = num_epoch
self.log_int = log_int
self.save = save
self.save_int = save_int
self.resume = resume
self.balance_factor = balance_factor
if device == 'cuda':
gpu.get_gpu(gpu_id)
device = torch.device(torch.cuda.current_device())
self.device = torchDevice(device)
self.log_root = os.path.join(run_root, '.log', run_name)
self.data_loaders = data_loaders
# can only get the lengths when a single set of data loaders are used
if isinstance(data_loaders, dict):
self.data_lengths = dict(zip(self.data_loaders.keys(), [len(loader) for loader in self.data_loaders]))
else:
self.data_lengths = {}
if save:
if not os.path.exists(self.log_root):
os.makedirs(self.log_root)
def train(self):
if self.resume:
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Resuming training ... ')
checkpoint = torch.load(os.path.join(self.log_root, 'torch_model'))
self.model.load_state_dict(checkpoint['model_state_dict'])
self.optimizer.load_state_dict(checkpoint['optimizer_state_dict'])
else:
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Starting training ... ')
writer = SummaryWriter(self.log_root)
self.model = self.model.to(self.device)
epoch = int(self.model.epoch) + 1
it = int(self.model.iteration)
sample_inds = dict()
for epoch in range(epoch, epoch + self.num_epoch):
if isinstance(self.data_loaders, list):
# each element of the list is a data loader for an epoch
loader_change_interval = self.num_epoch / len(self.data_loaders)
division_index, _ = divmod(epoch, loader_change_interval)
# Make sure that the index does not exceed the length of the data_loader list
index = round(min(division_index, len(self.data_loaders)-1))
cur_data_loaders = self.data_loaders[index]
else:
# same dataloaders for all epochs
cur_data_loaders = self.data_loaders
# Dictionary (of dictionaries) to collect four metrics from different phases for tensorboard
epoch_metric_names = ['epoch_loss', 'epoch_accuracy', 'precision/PPV', 'recall/TPR']
epoch_metric_dict = {metric_name: dict.fromkeys(cur_data_loaders.keys()) for metric_name in epoch_metric_names}
epoch_root = 'epoch_{:02d}'.format(epoch)
if not os.path.exists(os.path.join(self.log_root, epoch_root)):
os.makedirs(os.path.join(self.log_root, epoch_root))
for phase in cur_data_loaders.keys():
if phase == 'train':
self.model.train(True)
else:
self.model.train(False)
epoch_loss = 0
running_loss = 0.0
target_sum = 0
predicted_sum = 0
correct_sum = 0
batch_idx_start = 0
num_items = len(cur_data_loaders[phase].batch_sampler.sampler)
inputs_phase = -np.ones((num_items, 1, 140, 140)).astype(float)
outputs_phase = -np.ones((num_items, self.model.classifier.num_output)).astype(float)
predictions_phase = -np.ones(num_items).astype(int)
targets_phase = -np.ones(num_items).astype(int)
correct_phase = -np.ones(num_items).astype(int)
sample_ind_phase = []
for i, data in enumerate(cur_data_loaders[phase]):
it += 1
# copy input and targets to the device object
inputs = data['input'].to(self.device)
targets = data['target'].to(self.device)
sample_ind_batch = data['sample_idx']
sample_ind_phase.extend(sample_ind_batch)
# zero the parameter gradients
self.optimizer.zero_grad()
# forward + backward + optimize
outputs = self.model(inputs).squeeze()
loss = self.criterion(outputs, targets)
if phase == 'train':
loss.backward()
self.optimizer.step()
inputs, outputs, targets = Trainer.copy2cpu(inputs, outputs, targets)
predicted_classes = np.argmax(np.exp(outputs.detach().numpy()), axis=1)
predicted_sum += np.sum(predicted_classes)
target_classes = targets.detach().numpy()
target_sum += np.sum(target_classes)
correct_classes = predicted_classes == target_classes
correct_sum += np.sum(correct_classes)
if i > 0:
batch_idx_start = batch_idx_end
batch_idx_end = batch_idx_start + len(targets)
inputs_phase[batch_idx_start:batch_idx_end, :, :, :] = inputs.detach().numpy()
outputs_phase[batch_idx_start:batch_idx_end, :] = outputs.detach().numpy()
predictions_phase[batch_idx_start:batch_idx_end] = predicted_classes
targets_phase[batch_idx_start:batch_idx_end] = target_classes
correct_phase[batch_idx_start:batch_idx_end] = correct_classes
running_loss += loss.item()
epoch_loss += loss.item()
# Report fraction of clean data in mini batch
clean_num = float((targets == 0).sum())
debris_num = float((targets == 1).sum())
fraction_clean = clean_num / (debris_num + clean_num)
writer.add_scalars('Fraction_clean_samples', {phase: fraction_clean}, it)
if i % self.log_int == 0:
running_loss_log = float(running_loss) / batch_idx_end
running_accuracy_log = float(correct_sum) / batch_idx_end
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ')' + ' Phase: ' + phase +
', epoch: {}, batch: {}, running loss: {:0.4f}, running accuracy: {:0.3f} '.
format(epoch, i, running_loss_log, running_accuracy_log))
writer.add_scalars('running_loss', {phase: running_loss_log}, it)
writer.add_scalars('running_accuracy', {phase: running_accuracy_log}, it)
epoch_loss_log = float(epoch_loss) / num_items
epoch_accuracy_log = float(correct_sum) / num_items
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ')' + ' Phase: ' + phase +
', epoch: {}: epoch loss: {:0.4f}, epoch accuracy: {:0.3f} '.
format(epoch, epoch_loss_log, epoch_accuracy_log))
metrics = Metrics(
targets=targets_phase, outputs=outputs_phase, output_prob_fn=lambda x: np.exp(x[:, 1]),
sample_ind=sample_ind_phase)
metrics.confusion_table(
path_out=os.path.join(self.log_root, epoch_root, 'confusion_table_' + phase + '.csv'))
metrics.prediction_table(
path_out=os.path.join(self.log_root, epoch_root, 'prediction_table_' + phase + '.csv'))
# Set the current values of the epoch error metrics
cur_metrics = [epoch_loss_log, epoch_accuracy_log, metrics.metrics['PPV'], metrics.metrics['TPR']]
for i, metric_name in enumerate(epoch_metric_names):
epoch_metric_dict[metric_name][phase] = cur_metrics[i]
fig = Trainer.show_imgs(inputs=inputs_phase, outputs=outputs_phase, predictions=predictions_phase,
targets=targets_phase,
sample_ind=sample_ind_phase)
figname = 'image_examples_'
fig.savefig(os.path.join(self.log_root, epoch_root, figname + '_' + phase + '.png'))
writer.add_figure(figname + phase, fig, epoch)
fig = Trainer.show_classification_matrix(targets=targets_phase, predictions=predictions_phase,
metrics=metrics.metrics)
figname = 'targets_outputs_correct_'
fig.savefig(os.path.join(self.log_root, epoch_root, figname + '_' + phase + '.png'))
fig.savefig(os.path.join(self.log_root, epoch_root, figname + '_' + phase + '.eps'))
writer.add_figure(figname + phase, fig, epoch)
writer.add_pr_curve(
'pr_curve_'+phase, labels=targets_phase, predictions=np.exp(outputs_phase[:, 1]), global_step=epoch,
num_thresholds=50)
if self.save & (phase == 'train') & (epoch % self.save_int == 0):
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Writing model graph ... ')
# writer.add_graph(self.model, inputs)
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Saving model state... ')
self.model.epoch = torch.nn.Parameter(torch.tensor(epoch), requires_grad=False)
self.model.iteration = torch.nn.Parameter(torch.tensor(it), requires_grad=False)
torch.save({
'model_state_dict': self.model.state_dict(),
}, os.path.join(self.log_root, epoch_root, 'model_state_dict'))
torch.save({
'optimizer_state_dict': self.optimizer.state_dict()
}, os.path.join(self.log_root, 'optimizer_state_dict'))
# write the epoch related metrics to the tensorboard
for metric_name in epoch_metric_names:
writer.add_scalars(metric_name, epoch_metric_dict[metric_name], epoch)
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Finished training ... ')
writer.close()
print('(' + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + ') Closed writer ... ')
@staticmethod
def copy2cpu(inputs, outputs, targets):
if inputs.is_cuda:
inputs = inputs.cpu()
if outputs.is_cuda:
outputs = outputs.cpu()
if targets.is_cuda:
targets = targets.cpu()
return inputs, outputs, targets
@staticmethod
def n1hw_to_n3hw(data):
return data.cpu().repeat(1, 3, 1, 1)
@staticmethod
def show_img(inputs, outputs, idx):
inputs, outputs = Trainer.copy2cpu(inputs, outputs)
fig, axs = plt.subplots(1, 2, figsize=(4, 3))
axs[0].imshow(inputs[idx].data.numpy().squeeze(), cmap='gray')
axs[1].imshow(outputs[idx].data.numpy().squeeze(), cmap='gray')
return fig
@staticmethod
def show_imgs(inputs, outputs, predictions, targets, sample_ind, class_idx=1, plot_ind=None):
if plot_ind is None:
plot_ind = list(range(5))
fig, axs = plt.subplots(2, len(plot_ind), figsize=(3 * len(plot_ind), 6))
for i, sample_idx in enumerate(np.asarray(sample_ind)[plot_ind]):
input = inputs[i, 0, :, :].squeeze()
axs[0, i].imshow(input, cmap='gray')
axs[0, i].axis('off')
output = np.tile(np.exp((outputs[i][class_idx])), (int(input.shape[0]/3), int(input.shape[1])))
prediction = np.tile(int(predictions[i]), (int(input.shape[0]/3), int(input.shape[1])))
target = np.tile(int(targets[i]), (int(input.shape[0]/3), int(input.shape[1])))
fused = np.concatenate((output, prediction, target), axis=0)
axs[1, i].imshow(fused, cmap='gray', vmin=0, vmax=1)
axs[1, i].text(0.5, 0.875, 'sample_idx: {}'.format(sample_idx),
transform=axs[1, i].transAxes, ha='center', va='center', c=[0.8, 0.8, 0.2])
axs[1, i].text(0.5, 0.75, 'output (class {:d}): {:01.2f}'.format(class_idx, np.exp((outputs[i][class_idx]))),
transform=axs[1, i].transAxes, ha='center', va='center', c=[0.8, 0.8, 0.2])
axs[1, i].text(0.5, 0.5, 'prediction class: {:d}'.format(int(predictions[i])),
transform=axs[1, i].transAxes, ha='center', va='center', c=[0.5, 0.5, 0.5])
axs[1, i].text(0.5, 0.2, 'target class: {:d}'.format(int(targets[i])),
transform=axs[1, i].transAxes, ha='center', va='center', c=[0.5, 0.5, 0.5])
axs[1, i].axis('off')
axs[0, i].set_ylabel('sample_idx: {}'.format(sample_idx))
plt.tight_layout()
return fig
@staticmethod
def show_classification_matrix(targets, predictions, metrics):
targets_pr = targets.copy().astype(int)
predictions_pr = predictions.copy().astype(int)
correct_pr = ((targets_pr == 0) == (predictions_pr == 0)) | ((targets_pr == 1) == (predictions_pr == 1)) + 2
code_pr = targets_pr.copy()
code_pr[metrics['TN_idx']] = 4
code_pr[metrics['TP_idx']] = 5
code_pr[predictions_pr > targets_pr] = 6
code_pr[predictions_pr < targets_pr] = 7
mat = np.stack((targets_pr, predictions_pr, correct_pr, code_pr), axis=0)
colors = [[0.0, 0.0, 0.0, 1],
[1.0, 1.0, 1.0, 1],
[1.0, 0.0, 0.0, 1],
[0.0, 1.0, 0.0, 1],
[0.4, 0.1, 0.9, 1],
[0.3, 0.5, 0.9, 1],
[0.9, 0.4, 0.1, 1],
[0.9, 0.1, 0.5, 1]]
cmap = ListedColormap(colors=colors)
fig_width_mult = min(max([0.5, len(targets)/2000]), 3)
fig, axs = plt.subplots(figsize=(12*fig_width_mult, 6))
axs.matshow(mat, cmap=cmap, vmin=0, vmax=7)
axs.set_yticks([0, 1, 2, 3])
axs.set_yticklabels(['targets', 'outputs', 'accuracy', 'confusion'])
axs.set_aspect(10)
bbox = axs.get_position().bounds
axs2 = plt.axes((bbox[0], 0.1, bbox[2], 0.2), sharex=axs)
axs2.text(0.010, 1.00, 'target|output', c=(0.2, 0.2, 0.2), weight='bold', transform=axs2.transAxes)
axs2.text(0.017, 0.75, 'artifact: {}'.format(metrics['P']), c=(0.2, 0.2, 0.2), backgroundcolor=colors[1], transform=axs2.transAxes)
axs2.text(0.017, 0.50, 'no artifact: {}'.format(metrics['N']), c=(0.8, 0.8, 0.8), backgroundcolor=colors[0], transform=axs2.transAxes)
axs2.text(0.27, 1.00, 'accuracy', c=(0.2, 0.2, 0.2), weight='bold', transform=axs2.transAxes)
axs2.text(0.20, 0.75, 'frac correct: {:03d}/{:03d}={:01.2f}'.format(metrics['TP'] +
metrics['TN'], len(targets), (metrics['TP'] +
metrics['TN'])/len(targets)), c=(0.2, 0.2, 0.2), backgroundcolor=colors[3],
transform=axs2.transAxes)
axs2.text(0.20, 0.50, 'frac incorrect: {:03d}/{:03d}={:01.2f}'.format(metrics['FP'] +
metrics['FN'], len(targets), (metrics['FP'] +
metrics['FN'])/len(targets)), c=(0.2, 0.2, 0.2), backgroundcolor=colors[2],
transform=axs2.transAxes)
axs2.text(0.60, 1.00, 'confusion', c=(0.2, 0.2, 0.2), weight='bold', transform=axs2.transAxes)
axs2.text(0.50, 0.75, 'TP: {:01.0f}'.format(metrics['TP']).ljust(12), c=(0.8, 0.8, 0.8),
backgroundcolor=colors[5], transform=axs2.transAxes)
axs2.text(0.60, 0.75, 'FP: {:01.0f}'.format(metrics['FP']).ljust(12), c=(0.2, 0.2, 0.2),
backgroundcolor=colors[6], transform=axs2.transAxes)
axs2.text(0.50, 0.50, 'FN: {:01.0f}'.format(metrics['FN']).ljust(12), c=(0.2, 0.2, 0.2),
backgroundcolor=colors[7], transform=axs2.transAxes)
axs2.text(0.60, 0.50, 'TN: {:01.0f}'.format(metrics['TN']).ljust(12), c=(0.8, 0.8, 0.8),
backgroundcolor=colors[4], transform=axs2.transAxes)
axs2.text(0.70, 0.75, 'Precision: {:01.2f}'.format(metrics['PPV']).ljust(20), c=(0.2, 0.2, 0.2),
backgroundcolor=(0.7, 0.7, 0.7), transform=axs2.transAxes)
axs2.text(0.70, 0.50, 'Recall: {:01.2f}'.format(metrics['TPR']).ljust(20), c=(0.2, 0.2, 0.2),
backgroundcolor=(0.7, 0.7, 0.7), transform=axs2.transAxes)
axs2.axis('off')
return fig
| [
1,
1053,
2897,
13,
5215,
12865,
13,
3166,
19229,
1053,
2391,
29892,
7761,
29892,
360,
919,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
22889,
29889,
27703,
1053,
2391,
287,
1625,
555,
481,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
29889,
13239,
29889,
20158,
3377,
1053,
6991,
5219,
10507,
13,
3166,
4842,
305,
1053,
4742,
408,
4842,
305,
11501,
13,
3166,
2531,
12665,
29941,
29889,
4422,
1053,
330,
3746,
13,
3166,
2531,
12665,
29941,
29889,
26495,
29889,
2527,
10817,
1053,
4737,
10817,
13,
13,
13,
1990,
3201,
4983,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1065,
29918,
978,
29901,
851,
29892,
13,
462,
1065,
29918,
4632,
29901,
851,
29892,
13,
462,
1904,
29901,
302,
29876,
29889,
7355,
29892,
13,
462,
5994,
3950,
29901,
4842,
305,
29889,
20640,
29889,
20624,
326,
3950,
29892,
13,
462,
28770,
291,
29901,
302,
29876,
29889,
29924,
1660,
29931,
2209,
29892,
13,
462,
848,
29918,
1359,
414,
29901,
7761,
29961,
1293,
29892,
360,
919,
1402,
13,
462,
954,
29918,
1022,
2878,
29901,
938,
353,
29871,
29896,
29900,
29900,
29892,
13,
462,
1480,
29918,
524,
29901,
938,
353,
29871,
29896,
29900,
29892,
13,
462,
4742,
29901,
851,
353,
525,
21970,
742,
13,
462,
4078,
29901,
6120,
353,
7700,
29892,
13,
462,
4078,
29918,
524,
29901,
938,
353,
29871,
29896,
29892,
13,
462,
620,
2017,
29901,
6120,
353,
7700,
29892,
13,
462,
330,
3746,
29918,
333,
29901,
938,
353,
6213,
29892,
13,
462,
17346,
29918,
19790,
29901,
2391,
353,
6213,
1125,
13,
4706,
9995,
5521,
749,
29918,
19790,
29901,
338,
263,
1051,
607,
3743,
278,
17346,
7329,
363,
1269,
6694,
21502,
305,
15945,
29908,
13,
4706,
1583,
29889,
3389,
29918,
978,
353,
1065,
29918,
978,
13,
4706,
1583,
29889,
3389,
29918,
4632,
353,
1065,
29918,
4632,
13,
4706,
1583,
29889,
4299,
353,
1904,
13,
4706,
1583,
29889,
20640,
3950,
353,
5994,
3950,
13,
4706,
1583,
29889,
29883,
5385,
291,
353,
28770,
291,
13,
4706,
1583,
29889,
1949,
29918,
1022,
2878,
353,
954,
29918,
1022,
2878,
13,
4706,
1583,
29889,
1188,
29918,
524,
353,
1480,
29918,
524,
13,
4706,
1583,
29889,
7620,
353,
4078,
13,
4706,
1583,
29889,
7620,
29918,
524,
353,
4078,
29918,
524,
13,
4706,
1583,
29889,
690,
2017,
353,
620,
2017,
13,
4706,
1583,
29889,
5521,
749,
29918,
19790,
353,
17346,
29918,
19790,
13,
4706,
565,
4742,
1275,
525,
29883,
6191,
2396,
13,
9651,
330,
3746,
29889,
657,
29918,
29887,
3746,
29898,
29887,
3746,
29918,
333,
29897,
13,
9651,
4742,
353,
4842,
305,
29889,
10141,
29898,
7345,
305,
29889,
29883,
6191,
29889,
3784,
29918,
10141,
3101,
13,
308,
13,
4706,
1583,
29889,
10141,
353,
4842,
305,
11501,
29898,
10141,
29897,
13,
4706,
1583,
29889,
1188,
29918,
4632,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3389,
29918,
4632,
29892,
15300,
1188,
742,
1065,
29918,
978,
29897,
13,
4706,
1583,
29889,
1272,
29918,
1359,
414,
353,
848,
29918,
1359,
414,
13,
4706,
396,
508,
871,
679,
278,
27497,
746,
263,
2323,
731,
310,
848,
2254,
414,
526,
1304,
13,
4706,
565,
338,
8758,
29898,
1272,
29918,
1359,
414,
29892,
9657,
1125,
13,
9651,
1583,
29889,
1272,
29918,
2848,
29879,
353,
9657,
29898,
7554,
29898,
1311,
29889,
1272,
29918,
1359,
414,
29889,
8149,
3285,
518,
2435,
29898,
12657,
29897,
363,
23466,
297,
1583,
29889,
1272,
29918,
1359,
414,
12622,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
1272,
29918,
2848,
29879,
353,
6571,
13,
4706,
565,
4078,
29901,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
1188,
29918,
4632,
1125,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
1188,
29918,
4632,
29897,
13,
13,
1678,
822,
7945,
29898,
1311,
1125,
13,
13,
4706,
565,
1583,
29889,
690,
2017,
29901,
13,
9651,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
2538,
9929,
6694,
2023,
25710,
13,
9651,
1423,
3149,
353,
4842,
305,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
525,
7345,
305,
29918,
4299,
8785,
13,
9651,
1583,
29889,
4299,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
4299,
29918,
3859,
29918,
8977,
11287,
13,
9651,
1583,
29889,
20640,
3950,
29889,
1359,
29918,
3859,
29918,
8977,
29898,
3198,
3149,
1839,
20640,
3950,
29918,
3859,
29918,
8977,
11287,
13,
4706,
1683,
29901,
13,
9651,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
23748,
6694,
2023,
25710,
13,
13,
4706,
9227,
353,
6991,
5219,
10507,
29898,
1311,
29889,
1188,
29918,
4632,
29897,
13,
4706,
1583,
29889,
4299,
353,
1583,
29889,
4299,
29889,
517,
29898,
1311,
29889,
10141,
29897,
13,
13,
4706,
21502,
305,
353,
938,
29898,
1311,
29889,
4299,
29889,
1022,
2878,
29897,
718,
29871,
29896,
13,
4706,
372,
353,
938,
29898,
1311,
29889,
4299,
29889,
1524,
362,
29897,
13,
4706,
4559,
29918,
12772,
353,
9657,
580,
13,
4706,
363,
21502,
305,
297,
3464,
29898,
1022,
2878,
29892,
21502,
305,
718,
1583,
29889,
1949,
29918,
1022,
2878,
1125,
13,
9651,
565,
338,
8758,
29898,
1311,
29889,
1272,
29918,
1359,
414,
29892,
1051,
1125,
13,
18884,
396,
1269,
1543,
310,
278,
1051,
338,
263,
848,
23466,
363,
385,
21502,
305,
13,
18884,
23466,
29918,
3167,
29918,
19207,
353,
1583,
29889,
1949,
29918,
1022,
2878,
847,
7431,
29898,
1311,
29889,
1272,
29918,
1359,
414,
29897,
13,
18884,
8542,
29918,
2248,
29892,
903,
353,
1933,
1545,
29898,
1022,
2878,
29892,
23466,
29918,
3167,
29918,
19207,
29897,
13,
18884,
396,
8561,
1854,
393,
278,
2380,
947,
451,
13461,
278,
3309,
310,
278,
848,
29918,
12657,
1051,
13,
18884,
2380,
353,
4513,
29898,
1195,
29898,
4563,
2459,
29918,
2248,
29892,
7431,
29898,
1311,
29889,
1272,
29918,
1359,
414,
6817,
29896,
876,
13,
18884,
3151,
29918,
1272,
29918,
1359,
414,
353,
1583,
29889,
1272,
29918,
1359,
414,
29961,
2248,
29962,
13,
9651,
1683,
29901,
13,
18884,
396,
1021,
1418,
7003,
24574,
363,
599,
21502,
12168,
13,
18884,
3151,
29918,
1272,
29918,
1359,
414,
353,
1583,
29889,
1272,
29918,
1359,
414,
13,
9651,
396,
13343,
313,
974,
21503,
4314,
29897,
304,
6314,
3023,
21556,
515,
1422,
29540,
363,
12489,
3377,
13,
9651,
21502,
305,
29918,
16414,
29918,
7039,
353,
6024,
1022,
2878,
29918,
6758,
742,
525,
1022,
2878,
29918,
562,
2764,
4135,
742,
525,
17990,
2459,
29914,
18009,
29963,
742,
525,
3757,
497,
29914,
3557,
29934,
2033,
13,
9651,
21502,
305,
29918,
16414,
29918,
8977,
353,
426,
16414,
29918,
978,
29901,
9657,
29889,
3166,
8149,
29898,
2764,
29918,
1272,
29918,
1359,
414,
29889,
8149,
3101,
363,
12714,
29918,
978,
297,
21502,
305,
29918,
16414,
29918,
7039,
29913,
13,
9651,
21502,
305,
29918,
4632,
353,
525,
1022,
2878,
648,
29901,
29900,
29906,
29881,
29913,
4286,
4830,
29898,
1022,
2878,
29897,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
22164,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
876,
13,
13,
9651,
363,
8576,
297,
3151,
29918,
1272,
29918,
1359,
414,
29889,
8149,
7295,
13,
13,
18884,
565,
8576,
1275,
525,
14968,
2396,
13,
462,
1678,
1583,
29889,
4299,
29889,
14968,
29898,
5574,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
1583,
29889,
4299,
29889,
14968,
29898,
8824,
29897,
13,
13,
18884,
21502,
305,
29918,
6758,
353,
29871,
29900,
13,
18884,
2734,
29918,
6758,
353,
29871,
29900,
29889,
29900,
13,
18884,
3646,
29918,
2083,
353,
29871,
29900,
13,
18884,
25383,
29918,
2083,
353,
29871,
29900,
13,
18884,
1959,
29918,
2083,
353,
29871,
29900,
13,
18884,
9853,
29918,
13140,
29918,
2962,
353,
29871,
29900,
13,
13,
18884,
954,
29918,
7076,
353,
7431,
29898,
2764,
29918,
1272,
29918,
1359,
414,
29961,
21646,
1822,
16175,
29918,
13445,
20069,
29889,
13445,
20069,
29897,
13,
13,
18884,
10970,
29918,
21646,
353,
448,
9302,
29889,
2873,
3552,
1949,
29918,
7076,
29892,
29871,
29896,
29892,
29871,
29896,
29946,
29900,
29892,
29871,
29896,
29946,
29900,
8106,
579,
668,
29898,
7411,
29897,
13,
18884,
14391,
29918,
21646,
353,
448,
9302,
29889,
2873,
3552,
1949,
29918,
7076,
29892,
1583,
29889,
4299,
29889,
1990,
3709,
29889,
1949,
29918,
4905,
8106,
579,
668,
29898,
7411,
29897,
13,
18884,
27303,
29918,
21646,
353,
448,
9302,
29889,
2873,
29898,
1949,
29918,
7076,
467,
579,
668,
29898,
524,
29897,
13,
18884,
22525,
29918,
21646,
353,
448,
9302,
29889,
2873,
29898,
1949,
29918,
7076,
467,
579,
668,
29898,
524,
29897,
13,
18884,
1959,
29918,
21646,
353,
448,
9302,
29889,
2873,
29898,
1949,
29918,
7076,
467,
579,
668,
29898,
524,
29897,
13,
13,
18884,
4559,
29918,
513,
29918,
21646,
353,
5159,
13,
18884,
363,
474,
29892,
848,
297,
26985,
29898,
2764,
29918,
1272,
29918,
1359,
414,
29961,
21646,
29962,
1125,
13,
13,
462,
1678,
372,
4619,
29871,
29896,
13,
13,
462,
1678,
396,
3509,
1881,
322,
22525,
304,
278,
4742,
1203,
13,
462,
1678,
10970,
353,
848,
1839,
2080,
13359,
517,
29898,
1311,
29889,
10141,
29897,
13,
462,
1678,
22525,
353,
848,
1839,
5182,
13359,
517,
29898,
1311,
29889,
10141,
29897,
13,
462,
1678,
4559,
29918,
513,
29918,
16175,
353,
848,
1839,
11249,
29918,
13140,
2033,
13,
462,
1678,
4559,
29918,
513,
29918,
21646,
29889,
21843,
29898,
11249,
29918,
513,
29918,
16175,
29897,
13,
13,
462,
1678,
396,
5225,
278,
3443,
4656,
10070,
13,
462,
1678,
1583,
29889,
20640,
3950,
29889,
9171,
29918,
5105,
580,
13,
13,
462,
1678,
396,
6375,
718,
1250,
1328,
718,
24656,
13,
462,
1678,
14391,
353,
1583,
29889,
4299,
29898,
2080,
29879,
467,
29879,
802,
29872,
911,
580,
13,
462,
1678,
6410,
353,
1583,
29889,
29883,
5385,
291,
29898,
4905,
29879,
29892,
22525,
29897,
13,
13,
462,
1678,
565,
8576,
1275,
525,
14968,
2396,
13,
462,
4706,
6410,
29889,
1627,
1328,
580,
13,
462,
4706,
1583,
29889,
20640,
3950,
29889,
10568,
580,
13,
13,
462,
1678,
10970,
29892,
14391,
29892,
22525,
353,
3201,
4983,
29889,
8552,
29906,
21970,
29898,
2080,
29879,
29892,
14391,
29892,
22525,
29897,
13,
13,
462,
1678,
25383,
29918,
13203,
353,
7442,
29889,
1191,
3317,
29898,
9302,
29889,
4548,
29898,
4905,
29879,
29889,
4801,
496,
2141,
23749,
25739,
9685,
29922,
29896,
29897,
13,
462,
1678,
25383,
29918,
2083,
4619,
7442,
29889,
2083,
29898,
11965,
18186,
29918,
13203,
29897,
13,
462,
1678,
3646,
29918,
13203,
353,
22525,
29889,
4801,
496,
2141,
23749,
580,
13,
462,
1678,
3646,
29918,
2083,
4619,
7442,
29889,
2083,
29898,
5182,
29918,
13203,
29897,
13,
462,
1678,
1959,
29918,
13203,
353,
25383,
29918,
13203,
1275,
3646,
29918,
13203,
13,
462,
1678,
1959,
29918,
2083,
4619,
7442,
29889,
2083,
29898,
15728,
29918,
13203,
29897,
13,
13,
462,
1678,
565,
474,
1405,
29871,
29900,
29901,
13,
462,
4706,
9853,
29918,
13140,
29918,
2962,
353,
9853,
29918,
13140,
29918,
355,
13,
462,
1678,
9853,
29918,
13140,
29918,
355,
353,
9853,
29918,
13140,
29918,
2962,
718,
7431,
29898,
5182,
29879,
29897,
13,
462,
1678,
10970,
29918,
21646,
29961,
16175,
29918,
13140,
29918,
2962,
29901,
16175,
29918,
13140,
29918,
355,
29892,
584,
29892,
584,
29892,
584,
29962,
353,
10970,
29889,
4801,
496,
2141,
23749,
580,
13,
462,
1678,
14391,
29918,
21646,
29961,
16175,
29918,
13140,
29918,
2962,
29901,
16175,
29918,
13140,
29918,
355,
29892,
584,
29962,
353,
14391,
29889,
4801,
496,
2141,
23749,
580,
13,
462,
1678,
27303,
29918,
21646,
29961,
16175,
29918,
13140,
29918,
2962,
29901,
16175,
29918,
13140,
29918,
355,
29962,
353,
25383,
29918,
13203,
13,
462,
1678,
22525,
29918,
21646,
29961,
16175,
29918,
13140,
29918,
2962,
29901,
16175,
29918,
13140,
29918,
355,
29962,
353,
3646,
29918,
13203,
13,
462,
1678,
1959,
29918,
21646,
29961,
16175,
29918,
13140,
29918,
2962,
29901,
16175,
29918,
13140,
29918,
355,
29962,
353,
1959,
29918,
13203,
13,
13,
462,
1678,
2734,
29918,
6758,
4619,
6410,
29889,
667,
580,
13,
462,
1678,
21502,
305,
29918,
6758,
4619,
6410,
29889,
667,
580,
13,
462,
1678,
396,
13969,
15958,
310,
5941,
848,
297,
20629,
9853,
13,
462,
1678,
5941,
29918,
1949,
353,
5785,
3552,
5182,
29879,
1275,
29871,
29900,
467,
2083,
3101,
13,
462,
1678,
316,
1182,
275,
29918,
1949,
353,
5785,
3552,
5182,
29879,
1275,
29871,
29896,
467,
2083,
3101,
13,
462,
1678,
15958,
29918,
14941,
353,
5941,
29918,
1949,
847,
313,
311,
1182,
275,
29918,
1949,
718,
5941,
29918,
1949,
29897,
13,
462,
1678,
9227,
29889,
1202,
29918,
19529,
1503,
877,
29943,
13857,
29918,
14941,
29918,
27736,
742,
426,
21646,
29901,
15958,
29918,
14941,
1118,
372,
29897,
13,
13,
462,
1678,
565,
474,
1273,
1583,
29889,
1188,
29918,
524,
1275,
29871,
29900,
29901,
13,
462,
4706,
2734,
29918,
6758,
29918,
1188,
353,
5785,
29898,
21094,
29918,
6758,
29897,
847,
9853,
29918,
13140,
29918,
355,
13,
462,
4706,
2734,
29918,
562,
2764,
4135,
29918,
1188,
353,
5785,
29898,
15728,
29918,
2083,
29897,
847,
9853,
29918,
13140,
29918,
355,
13,
462,
4706,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
525,
16029,
718,
525,
1963,
559,
29901,
525,
718,
8576,
718,
13,
462,
795,
13420,
21502,
305,
29901,
24335,
9853,
29901,
24335,
2734,
6410,
29901,
12365,
29900,
29889,
29946,
29888,
1118,
2734,
13600,
29901,
12365,
29900,
29889,
29941,
29888,
29913,
15300,
13,
462,
795,
3402,
29898,
1022,
2878,
29892,
474,
29892,
2734,
29918,
6758,
29918,
1188,
29892,
2734,
29918,
562,
2764,
4135,
29918,
1188,
876,
13,
462,
4706,
9227,
29889,
1202,
29918,
19529,
1503,
877,
21094,
29918,
6758,
742,
426,
21646,
29901,
2734,
29918,
6758,
29918,
1188,
1118,
372,
29897,
13,
462,
4706,
9227,
29889,
1202,
29918,
19529,
1503,
877,
21094,
29918,
562,
2764,
4135,
742,
426,
21646,
29901,
2734,
29918,
562,
2764,
4135,
29918,
1188,
1118,
372,
29897,
13,
13,
18884,
21502,
305,
29918,
6758,
29918,
1188,
353,
5785,
29898,
1022,
2878,
29918,
6758,
29897,
847,
954,
29918,
7076,
13,
18884,
21502,
305,
29918,
562,
2764,
4135,
29918,
1188,
353,
5785,
29898,
15728,
29918,
2083,
29897,
847,
954,
29918,
7076,
13,
18884,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
525,
16029,
718,
525,
1963,
559,
29901,
525,
718,
8576,
718,
13,
462,
418,
13420,
21502,
305,
29901,
426,
6177,
21502,
305,
6410,
29901,
12365,
29900,
29889,
29946,
29888,
1118,
21502,
305,
13600,
29901,
12365,
29900,
29889,
29941,
29888,
29913,
15300,
13,
462,
418,
3402,
29898,
1022,
2878,
29892,
21502,
305,
29918,
6758,
29918,
1188,
29892,
21502,
305,
29918,
562,
2764,
4135,
29918,
1188,
876,
13,
13,
18884,
21556,
353,
4737,
10817,
29898,
13,
462,
1678,
22525,
29922,
5182,
29879,
29918,
21646,
29892,
14391,
29922,
4905,
29879,
29918,
21646,
29892,
1962,
29918,
22795,
29918,
9144,
29922,
2892,
921,
29901,
7442,
29889,
4548,
29898,
29916,
7503,
29892,
29871,
29896,
11724,
13,
462,
1678,
4559,
29918,
513,
29922,
11249,
29918,
513,
29918,
21646,
29897,
13,
18884,
21556,
29889,
5527,
3958,
29918,
2371,
29898,
13,
462,
1678,
2224,
29918,
449,
29922,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
525,
5527,
3958,
29918,
2371,
29918,
29915,
718,
8576,
718,
15300,
7638,
8785,
13,
18884,
21556,
29889,
11965,
2463,
29918,
2371,
29898,
13,
462,
1678,
2224,
29918,
449,
29922,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
525,
11965,
2463,
29918,
2371,
29918,
29915,
718,
8576,
718,
15300,
7638,
8785,
13,
18884,
396,
3789,
278,
1857,
1819,
310,
278,
21502,
305,
1059,
21556,
13,
18884,
3151,
29918,
2527,
10817,
353,
518,
1022,
2878,
29918,
6758,
29918,
1188,
29892,
21502,
305,
29918,
562,
2764,
4135,
29918,
1188,
29892,
21556,
29889,
2527,
10817,
1839,
18009,
29963,
7464,
21556,
29889,
2527,
10817,
1839,
3557,
29934,
2033,
29962,
13,
18884,
363,
474,
29892,
12714,
29918,
978,
297,
26985,
29898,
1022,
2878,
29918,
16414,
29918,
7039,
1125,
13,
462,
1678,
21502,
305,
29918,
16414,
29918,
8977,
29961,
16414,
29918,
978,
3816,
21646,
29962,
353,
3151,
29918,
2527,
10817,
29961,
29875,
29962,
13,
13,
18884,
2537,
353,
3201,
4983,
29889,
4294,
29918,
2492,
29879,
29898,
2080,
29879,
29922,
2080,
29879,
29918,
21646,
29892,
14391,
29922,
4905,
29879,
29918,
21646,
29892,
27303,
29922,
27711,
1080,
29918,
21646,
29892,
13,
462,
462,
4706,
22525,
29922,
5182,
29879,
29918,
21646,
29892,
13,
462,
462,
4706,
4559,
29918,
513,
29922,
11249,
29918,
513,
29918,
21646,
29897,
13,
18884,
285,
647,
420,
353,
525,
3027,
29918,
19057,
29918,
29915,
13,
18884,
2537,
29889,
7620,
1003,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
285,
647,
420,
718,
22868,
29915,
718,
8576,
718,
15300,
2732,
8785,
13,
18884,
9227,
29889,
1202,
29918,
4532,
29898,
29888,
647,
420,
718,
8576,
29892,
2537,
29892,
21502,
305,
29897,
13,
13,
18884,
2537,
353,
3201,
4983,
29889,
4294,
29918,
1990,
2450,
29918,
5344,
29898,
5182,
29879,
29922,
5182,
29879,
29918,
21646,
29892,
27303,
29922,
27711,
1080,
29918,
21646,
29892,
13,
462,
462,
462,
308,
21556,
29922,
2527,
10817,
29889,
2527,
10817,
29897,
13,
18884,
285,
647,
420,
353,
525,
5182,
29879,
29918,
4905,
29879,
29918,
15728,
29918,
29915,
13,
18884,
2537,
29889,
7620,
1003,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
285,
647,
420,
718,
22868,
29915,
718,
8576,
718,
15300,
2732,
8785,
13,
18884,
2537,
29889,
7620,
1003,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
285,
647,
420,
718,
22868,
29915,
718,
8576,
718,
15300,
8961,
8785,
13,
18884,
9227,
29889,
1202,
29918,
4532,
29898,
29888,
647,
420,
718,
8576,
29892,
2537,
29892,
21502,
305,
29897,
13,
13,
18884,
9227,
29889,
1202,
29918,
558,
29918,
2764,
345,
29898,
13,
462,
1678,
525,
558,
29918,
2764,
345,
29918,
18717,
21646,
29892,
11073,
29922,
5182,
29879,
29918,
21646,
29892,
27303,
29922,
9302,
29889,
4548,
29898,
4905,
29879,
29918,
21646,
7503,
29892,
29871,
29896,
11724,
5534,
29918,
10568,
29922,
1022,
2878,
29892,
13,
462,
1678,
954,
29918,
386,
3781,
3361,
29922,
29945,
29900,
29897,
13,
13,
18884,
565,
1583,
29889,
7620,
669,
313,
21646,
1275,
525,
14968,
1495,
669,
313,
1022,
2878,
1273,
1583,
29889,
7620,
29918,
524,
1275,
29871,
29900,
1125,
13,
462,
1678,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
28676,
1904,
3983,
2023,
25710,
13,
462,
1678,
396,
9227,
29889,
1202,
29918,
4262,
29898,
1311,
29889,
4299,
29892,
10970,
29897,
13,
13,
462,
1678,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
317,
5555,
1904,
2106,
856,
25710,
13,
462,
1678,
1583,
29889,
4299,
29889,
1022,
2878,
353,
4842,
305,
29889,
15755,
29889,
9329,
29898,
7345,
305,
29889,
20158,
29898,
1022,
2878,
511,
6858,
29918,
5105,
29922,
8824,
29897,
13,
462,
1678,
1583,
29889,
4299,
29889,
1524,
362,
353,
4842,
305,
29889,
15755,
29889,
9329,
29898,
7345,
305,
29889,
20158,
29898,
277,
511,
6858,
29918,
5105,
29922,
8824,
29897,
13,
462,
1678,
4842,
305,
29889,
7620,
3319,
13,
462,
4706,
525,
4299,
29918,
3859,
29918,
8977,
2396,
1583,
29889,
4299,
29889,
3859,
29918,
8977,
3285,
13,
462,
1678,
2981,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
21502,
305,
29918,
4632,
29892,
525,
4299,
29918,
3859,
29918,
8977,
8785,
13,
462,
1678,
4842,
305,
29889,
7620,
3319,
13,
462,
4706,
525,
20640,
3950,
29918,
3859,
29918,
8977,
2396,
1583,
29889,
20640,
3950,
29889,
3859,
29918,
8977,
580,
13,
462,
1678,
2981,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1188,
29918,
4632,
29892,
525,
20640,
3950,
29918,
3859,
29918,
8977,
8785,
13,
9651,
396,
2436,
278,
21502,
305,
4475,
21556,
304,
278,
12489,
3377,
13,
9651,
363,
12714,
29918,
978,
297,
21502,
305,
29918,
16414,
29918,
7039,
29901,
13,
18884,
9227,
29889,
1202,
29918,
19529,
1503,
29898,
16414,
29918,
978,
29892,
21502,
305,
29918,
16414,
29918,
8977,
29961,
16414,
29918,
978,
1402,
21502,
305,
29897,
13,
4706,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
4231,
3276,
6694,
2023,
25710,
13,
13,
4706,
9227,
29889,
5358,
580,
13,
4706,
1596,
877,
877,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
718,
25710,
2233,
2662,
9227,
2023,
25710,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
3509,
29906,
21970,
29898,
2080,
29879,
29892,
14391,
29892,
22525,
1125,
13,
4706,
565,
10970,
29889,
275,
29918,
29883,
6191,
29901,
13,
9651,
10970,
353,
10970,
29889,
21970,
580,
13,
4706,
565,
14391,
29889,
275,
29918,
29883,
6191,
29901,
13,
9651,
14391,
353,
14391,
29889,
21970,
580,
13,
4706,
565,
22525,
29889,
275,
29918,
29883,
6191,
29901,
13,
9651,
22525,
353,
22525,
29889,
21970,
580,
13,
4706,
736,
10970,
29892,
14391,
29892,
22525,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
302,
29896,
26828,
29918,
517,
29918,
29876,
29941,
26828,
29898,
1272,
1125,
13,
4706,
736,
848,
29889,
21970,
2141,
14358,
29898,
29896,
29892,
29871,
29941,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1510,
29918,
2492,
29898,
2080,
29879,
29892,
14391,
29892,
22645,
1125,
13,
4706,
10970,
29892,
14391,
353,
3201,
4983,
29889,
8552,
29906,
21970,
29898,
2080,
29879,
29892,
14391,
29897,
13,
4706,
2537,
29892,
4853,
29879,
353,
14770,
29889,
1491,
26762,
29898,
29896,
29892,
29871,
29906,
29892,
2537,
2311,
7607,
29946,
29892,
29871,
29941,
876,
13,
4706,
4853,
29879,
29961,
29900,
1822,
326,
4294,
29898,
2080,
29879,
29961,
13140,
1822,
1272,
29889,
23749,
2141,
29879,
802,
29872,
911,
3285,
274,
1958,
2433,
21012,
1495,
13,
4706,
4853,
29879,
29961,
29896,
1822,
326,
4294,
29898,
4905,
29879,
29961,
13140,
1822,
1272,
29889,
23749,
2141,
29879,
802,
29872,
911,
3285,
274,
1958,
2433,
21012,
1495,
13,
4706,
736,
2537,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1510,
29918,
2492,
29879,
29898,
2080,
29879,
29892,
14391,
29892,
27303,
29892,
22525,
29892,
4559,
29918,
513,
29892,
770,
29918,
13140,
29922,
29896,
29892,
6492,
29918,
513,
29922,
8516,
1125,
13,
13,
4706,
565,
6492,
29918,
513,
338,
6213,
29901,
13,
9651,
6492,
29918,
513,
353,
1051,
29898,
3881,
29898,
29945,
876,
13,
13,
4706,
2537,
29892,
4853,
29879,
353,
14770,
29889,
1491,
26762,
29898,
29906,
29892,
7431,
29898,
5317,
29918,
513,
511,
2537,
2311,
7607,
29941,
334,
7431,
29898,
5317,
29918,
513,
511,
29871,
29953,
876,
13,
4706,
363,
474,
29892,
4559,
29918,
13140,
297,
26985,
29898,
9302,
29889,
294,
2378,
29898,
11249,
29918,
513,
9601,
5317,
29918,
513,
29962,
1125,
13,
9651,
1881,
353,
10970,
29961,
29875,
29892,
29871,
29900,
29892,
584,
29892,
584,
1822,
29879,
802,
29872,
911,
580,
13,
9651,
4853,
29879,
29961,
29900,
29892,
474,
1822,
326,
4294,
29898,
2080,
29892,
274,
1958,
2433,
21012,
1495,
13,
9651,
4853,
29879,
29961,
29900,
29892,
474,
1822,
8990,
877,
2696,
1495,
13,
9651,
1962,
353,
7442,
29889,
29873,
488,
29898,
9302,
29889,
4548,
3552,
4905,
29879,
29961,
29875,
3816,
1990,
29918,
13140,
2314,
511,
313,
524,
29898,
2080,
29889,
12181,
29961,
29900,
16261,
29941,
511,
938,
29898,
2080,
29889,
12181,
29961,
29896,
29962,
4961,
13,
9651,
18988,
353,
7442,
29889,
29873,
488,
29898,
524,
29898,
27711,
1080,
29961,
29875,
11724,
313,
524,
29898,
2080,
29889,
12181,
29961,
29900,
16261,
29941,
511,
938,
29898,
2080,
29889,
12181,
29961,
29896,
29962,
4961,
13,
9651,
3646,
353,
7442,
29889,
29873,
488,
29898,
524,
29898,
5182,
29879,
29961,
29875,
11724,
313,
524,
29898,
2080,
29889,
12181,
29961,
29900,
16261,
29941,
511,
938,
29898,
2080,
29889,
12181,
29961,
29896,
29962,
4961,
13,
9651,
285,
3880,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
4905,
29892,
18988,
29892,
3646,
511,
9685,
29922,
29900,
29897,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
326,
4294,
29898,
29888,
3880,
29892,
274,
1958,
2433,
21012,
742,
325,
1195,
29922,
29900,
29892,
325,
3317,
29922,
29896,
29897,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
726,
29898,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29947,
29955,
29945,
29892,
525,
11249,
29918,
13140,
29901,
6571,
4286,
4830,
29898,
11249,
29918,
13140,
511,
13,
462,
965,
4327,
29922,
1165,
29879,
29961,
29896,
29892,
474,
1822,
3286,
29909,
9100,
29892,
447,
2433,
5064,
742,
2947,
2433,
5064,
742,
274,
11759,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29906,
2314,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
726,
29898,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
4905,
313,
1990,
12365,
29881,
29913,
1125,
12365,
29900,
29896,
29889,
29906,
29888,
29913,
4286,
4830,
29898,
1990,
29918,
13140,
29892,
7442,
29889,
4548,
3552,
4905,
29879,
29961,
29875,
3816,
1990,
29918,
13140,
12622,
511,
13,
462,
632,
4327,
29922,
1165,
29879,
29961,
29896,
29892,
474,
1822,
3286,
29909,
9100,
29892,
447,
2433,
5064,
742,
2947,
2433,
5064,
742,
274,
11759,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29906,
2314,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
726,
29898,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29945,
29892,
525,
11965,
2463,
770,
29901,
12365,
29881,
29913,
4286,
4830,
29898,
524,
29898,
27711,
1080,
29961,
29875,
2314,
511,
13,
462,
632,
4327,
29922,
1165,
29879,
29961,
29896,
29892,
474,
1822,
3286,
29909,
9100,
29892,
447,
2433,
5064,
742,
2947,
2433,
5064,
742,
274,
11759,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29945,
2314,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
726,
29898,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29906,
29892,
525,
5182,
770,
29901,
12365,
29881,
29913,
4286,
4830,
29898,
524,
29898,
5182,
29879,
29961,
29875,
2314,
511,
13,
462,
632,
4327,
29922,
1165,
29879,
29961,
29896,
29892,
474,
1822,
3286,
29909,
9100,
29892,
447,
2433,
5064,
742,
2947,
2433,
5064,
742,
274,
11759,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29945,
2314,
13,
9651,
4853,
29879,
29961,
29896,
29892,
474,
1822,
8990,
877,
2696,
1495,
13,
9651,
4853,
29879,
29961,
29900,
29892,
474,
1822,
842,
29918,
29891,
1643,
877,
11249,
29918,
13140,
29901,
6571,
4286,
4830,
29898,
11249,
29918,
13140,
876,
13,
13,
4706,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
13,
4706,
736,
2537,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1510,
29918,
1990,
2450,
29918,
5344,
29898,
5182,
29879,
29892,
27303,
29892,
21556,
1125,
13,
13,
4706,
22525,
29918,
558,
353,
22525,
29889,
8552,
2141,
579,
668,
29898,
524,
29897,
13,
4706,
27303,
29918,
558,
353,
27303,
29889,
8552,
2141,
579,
668,
29898,
524,
29897,
13,
4706,
1959,
29918,
558,
353,
5135,
5182,
29879,
29918,
558,
1275,
29871,
29900,
29897,
1275,
313,
27711,
1080,
29918,
558,
1275,
29871,
29900,
876,
891,
5135,
5182,
29879,
29918,
558,
1275,
29871,
29896,
29897,
1275,
313,
27711,
1080,
29918,
558,
1275,
29871,
29896,
876,
718,
29871,
29906,
13,
4706,
775,
29918,
558,
353,
22525,
29918,
558,
29889,
8552,
580,
13,
4706,
775,
29918,
558,
29961,
2527,
10817,
1839,
29911,
29940,
29918,
13140,
2033,
29962,
353,
29871,
29946,
13,
4706,
775,
29918,
558,
29961,
2527,
10817,
1839,
3557,
29918,
13140,
2033,
29962,
353,
29871,
29945,
13,
4706,
775,
29918,
558,
29961,
27711,
1080,
29918,
558,
1405,
22525,
29918,
558,
29962,
353,
29871,
29953,
13,
4706,
775,
29918,
558,
29961,
27711,
1080,
29918,
558,
529,
22525,
29918,
558,
29962,
353,
29871,
29955,
13,
13,
4706,
1775,
353,
7442,
29889,
1429,
3552,
5182,
29879,
29918,
558,
29892,
27303,
29918,
558,
29892,
1959,
29918,
558,
29892,
775,
29918,
558,
511,
9685,
29922,
29900,
29897,
13,
13,
4706,
11955,
353,
5519,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29896,
29889,
29900,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29896,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29889,
29900,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29889,
29946,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29929,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29889,
29941,
29892,
29871,
29900,
29889,
29945,
29892,
29871,
29900,
29889,
29929,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29889,
29929,
29892,
29871,
29900,
29889,
29946,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29889,
29929,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29945,
29892,
29871,
29896,
5262,
13,
4706,
274,
1958,
353,
2391,
287,
1625,
555,
481,
29898,
27703,
29922,
27703,
29897,
13,
4706,
2537,
29918,
2103,
29918,
4713,
353,
1375,
29898,
3317,
4197,
29900,
29889,
29945,
29892,
7431,
29898,
5182,
29879,
6802,
29906,
29900,
29900,
29900,
11724,
29871,
29941,
29897,
13,
4706,
2537,
29892,
4853,
29879,
353,
14770,
29889,
1491,
26762,
29898,
1003,
2311,
7607,
29896,
29906,
29930,
1003,
29918,
2103,
29918,
4713,
29892,
29871,
29953,
876,
13,
4706,
4853,
29879,
29889,
2922,
4294,
29898,
2922,
29892,
274,
1958,
29922,
29883,
1958,
29892,
325,
1195,
29922,
29900,
29892,
325,
3317,
29922,
29955,
29897,
13,
4706,
4853,
29879,
29889,
842,
29918,
3637,
7358,
4197,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
4706,
4853,
29879,
29889,
842,
29918,
3637,
860,
21134,
18959,
5182,
29879,
742,
525,
4905,
29879,
742,
525,
562,
2764,
4135,
742,
525,
5527,
3958,
11287,
13,
4706,
4853,
29879,
29889,
842,
29918,
294,
1103,
29898,
29896,
29900,
29897,
13,
4706,
289,
1884,
353,
4853,
29879,
29889,
657,
29918,
3283,
2141,
23687,
13,
4706,
4853,
29879,
29906,
353,
14770,
29889,
1165,
267,
3552,
29890,
1884,
29961,
29900,
1402,
29871,
29900,
29889,
29896,
29892,
289,
1884,
29961,
29906,
1402,
29871,
29900,
29889,
29906,
511,
6232,
29916,
29922,
1165,
29879,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29900,
29896,
29900,
29892,
29871,
29896,
29889,
29900,
29900,
29892,
525,
5182,
29989,
4905,
742,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
7688,
2433,
8934,
742,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29900,
29896,
29955,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
8813,
29901,
6571,
4286,
4830,
29898,
2527,
10817,
1839,
29925,
2033,
511,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
3239,
2780,
29922,
27703,
29961,
29896,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29900,
29896,
29955,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
525,
1217,
24238,
29901,
6571,
4286,
4830,
29898,
2527,
10817,
1839,
29940,
2033,
511,
274,
7607,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
511,
3239,
2780,
29922,
27703,
29961,
29900,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29906,
29955,
29892,
29871,
29896,
29889,
29900,
29900,
29892,
525,
562,
2764,
4135,
742,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
7688,
2433,
8934,
742,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29906,
29900,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
1154,
1959,
29901,
259,
12365,
29900,
29941,
29881,
6822,
25641,
29900,
29941,
29881,
29913,
3790,
29901,
29900,
29896,
29889,
29906,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
3557,
2033,
718,
13,
462,
29871,
21556,
1839,
29911,
29940,
7464,
7431,
29898,
5182,
29879,
511,
313,
2527,
10817,
1839,
3557,
2033,
718,
13,
462,
29871,
21556,
1839,
29911,
29940,
2033,
6802,
2435,
29898,
5182,
29879,
8243,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
3239,
2780,
29922,
27703,
29961,
29941,
1402,
13,
462,
29871,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29906,
29900,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
525,
1154,
10240,
29901,
12365,
29900,
29941,
29881,
6822,
25641,
29900,
29941,
29881,
29913,
3790,
29901,
29900,
29896,
29889,
29906,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
26353,
2033,
718,
13,
462,
29871,
21556,
1839,
29943,
29940,
7464,
7431,
29898,
5182,
29879,
511,
313,
2527,
10817,
1839,
26353,
2033,
718,
13,
462,
29871,
21556,
1839,
29943,
29940,
2033,
6802,
2435,
29898,
5182,
29879,
8243,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
3239,
2780,
29922,
27703,
29961,
29906,
1402,
13,
462,
29871,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29953,
29900,
29892,
29871,
29896,
29889,
29900,
29900,
29892,
525,
5527,
3958,
742,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
7688,
2433,
8934,
742,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29945,
29900,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
3557,
29901,
12365,
29900,
29896,
29889,
29900,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
3557,
2033,
467,
29880,
5143,
29898,
29896,
29906,
511,
274,
7607,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
511,
13,
462,
29871,
3239,
2780,
29922,
27703,
29961,
29945,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29953,
29900,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
26353,
29901,
12365,
29900,
29896,
29889,
29900,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
26353,
2033,
467,
29880,
5143,
29898,
29896,
29906,
511,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
13,
462,
29871,
3239,
2780,
29922,
27703,
29961,
29953,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29945,
29900,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
525,
29943,
29940,
29901,
12365,
29900,
29896,
29889,
29900,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
29943,
29940,
2033,
467,
29880,
5143,
29898,
29896,
29906,
511,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
13,
462,
29871,
3239,
2780,
29922,
27703,
29961,
29955,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29953,
29900,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
525,
29911,
29940,
29901,
12365,
29900,
29896,
29889,
29900,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
29911,
29940,
2033,
467,
29880,
5143,
29898,
29896,
29906,
511,
274,
7607,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29947,
511,
13,
462,
29871,
3239,
2780,
29922,
27703,
29961,
29946,
1402,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29955,
29900,
29892,
29871,
29900,
29889,
29955,
29945,
29892,
525,
29925,
3757,
2459,
29901,
12365,
29900,
29896,
29889,
29906,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
18009,
29963,
2033,
467,
29880,
5143,
29898,
29906,
29900,
511,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
13,
462,
29871,
3239,
2780,
7607,
29900,
29889,
29955,
29892,
29871,
29900,
29889,
29955,
29892,
29871,
29900,
29889,
29955,
511,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
726,
29898,
29900,
29889,
29955,
29900,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
525,
4789,
497,
29901,
12365,
29900,
29896,
29889,
29906,
29888,
29913,
4286,
4830,
29898,
2527,
10817,
1839,
3557,
29934,
2033,
467,
29880,
5143,
29898,
29906,
29900,
511,
274,
7607,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
29892,
29871,
29900,
29889,
29906,
511,
13,
462,
29871,
3239,
2780,
7607,
29900,
29889,
29955,
29892,
29871,
29900,
29889,
29955,
29892,
29871,
29900,
29889,
29955,
511,
4327,
29922,
1165,
29879,
29906,
29889,
3286,
29909,
9100,
29897,
13,
4706,
4853,
29879,
29906,
29889,
8990,
877,
2696,
1495,
13,
13,
4706,
736,
2537,
13,
2
] |
scripts/libopen3d.py | mepix/GPUaccelOpen3D | 0 | 43275 | <reponame>mepix/GPUaccelOpen3D<gh_stars>0
#!/usr/bin/env python3
import numpy as np
import open3d as o3d
import copy
import matplotlib.pyplot as plt
class WrapperOpen3d(object):
"""This lightweight wrapper on Open3D converts a .ply point cloud into a NumPy Array"""
def __init__(self, path_to_ply):
self.path_to_ply = path_to_ply
self.point_cloud_loaded = False
return None
def plyOpen(self,distance_thresh=-1,downsample_size=-1,verbose=True):
"""Opens the point cloud from a .ply file specificied at class initialization"""
if verbose: print("Opening",self.path_to_ply)
self.pcd = o3d.io.read_point_cloud(self.path_to_ply)
# Removes Points Outside Distance Threshold
if distance_thresh > 0:
self.pcd = self.distanceThresh(self.pcd,distance_thresh)
# Down Sample
if downsample_size > 0:
self.pcd = self.pcd.voxel_down_sample(voxel_size=downsample_size)
# Display Information About the Point Cloud
if verbose: print(self.pcd)
# Set the loaded flag to True
self.point_cloud_loaded = True
return None
def loadPointCloud(self,pcd):
"""Loads a Point Cloud into the class"""
self.pcd = pcd
self.point_cloud_loaded = True
def visPointCloud(self):
"""Visualizes the loaded point cloud"""
if self.point_cloud_loaded:
o3d.visualization.draw_geometries([self.pcd])
else:
print("No Point Cloud Loaded, Cannot Visualize")
return None
def visPointCloudClusters(self,pcd,labels):
"""
Colorizes the clusters in the procided point cloud. The internal point
cloud self.pcd is NOT changed by this routine
"""
max_label = labels.max()
print(f"point cloud has {max_label + 1} clusters")
colors = plt.get_cmap("tab20")(labels / (max_label if max_label > 0 else 1))
colors[labels < 0] = 0
pcd.colors = o3d.utility.Vector3dVector(colors[:, :3])
o3d.visualization.draw_geometries([pcd])
def distanceThresh(self,pcd,thresh=0.5):
"""
Removes all points that are outside the thresh from the origin
"""
# https://stackoverflow.com/questions/65731659/open3dpython-how-to-remove-points-from-ply
# Get the Numpy Points
points = np.asarray(pcd.points)
# Sphere center and radius
center = np.array([0, 0, 0])
# Calculate distances to center, set new points
distances = np.linalg.norm(points - center, axis=1)
# pcd1.points = open3d.utility.Vector3dVector(points[distances <= radius])
idx = np.where(distances < thresh)[0]
pcd_thresh = pcd.select_by_index(idx)
return pcd_thresh
def getNumPyPts(self):
"""Returns the opened point cloud as a NumPy Array"""
if self.point_cloud_loaded:
return np.asarray(self.pcd.points)
else:
print("No Point Cloud Loaded, Cannot Get Points")
return None
def getNumPyNorms(self):
"""Estimates the normals for reach point, returns as NumPy Array if True"""
# self.pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
if self.point_cloud_loaded:
return np.asarray(self.pcd.normals)
else:
print("No Point Cloud Loaded, Cannot Get Normals")
return None
def getNumPyColors(self):
"""Returns the opened point colors as a NumPy Array"""
if self.point_cloud_loaded:
return np.asarray(self.pcd.colors)
else:
print("No Point Cloud Loaded, Cannot Get Colors")
return None
def getClusterLabels(self,visualize=False):
"""Uses DBSCAN to cluster the point cloud and returns a NumPy label array"""
if self.point_cloud_loaded:
# Run the Clustering Algorithm
with o3d.utility.VerbosityContextManager(o3d.utility.VerbosityLevel.Debug) as cm:
labels = np.array(self.pcd.cluster_dbscan(eps=0.02, min_points=10, print_progress=True))
# Display the Colored Point Cloud
if visualize:
self.visPointCloudClusters(copy.deepcopy(self.pcd),labels)
return labels
else:
print("No Point Cloud Loaded, Cannot Cluster Points")
return None
def fitPlane(self):
"""
Uses the built in RANSAC to fit a plane to the loaded point cloud
"""
plane_model, inliers = self.pcd.segment_plane(distance_threshold=0.01,
ransac_n=3,
num_iterations=1000)
[a, b, c, d] = plane_model
print(f"Plane equation: {a:.2f}x + {b:.2f}y + {c:.2f}z + {d:.2f} = 0")
inlier_cloud = self.pcd.select_by_index(inliers)
inlier_cloud.paint_uniform_color([1.0, 0, 0])
outlier_cloud = self.pcd.select_by_index(inliers, invert=True)
o3d.visualization.draw_geometries([inlier_cloud, outlier_cloud])
def drawBox(self):
print("Let\'s draw a cubic using o3d.geometry.LineSet")
points = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [1, 1, 0], [0, 0, 1], [1, 0, 1],
[0, 1, 1], [1, 1, 1]]
lines = [[0, 1], [0, 2], [1, 3], [2, 3], [4, 5], [4, 6], [5, 7], [6, 7],
[0, 4], [1, 5], [2, 6], [3, 7]]
colors = [[1, 0, 0] for i in range(len(lines))]
line_set = o3d.geometry.LineSet()
line_set.points = o3d.utility.Vector3dVector(points)
line_set.lines = o3d.utility.Vector2iVector(lines)
line_set.colors = o3d.utility.Vector3dVector(colors)
o3d.visualization.draw_geometries([line_set])
def drawOrigin(self):
points = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]]
lines = [[0, 1], [0, 2], [0, 3]]
colors = [[1, 0, 0],[0,1,0],[0,0,1]]
line_set = o3d.geometry.LineSet()
line_set.points = o3d.utility.Vector3dVector(points)
line_set.lines = o3d.utility.Vector2iVector(lines)
line_set.colors = o3d.utility.Vector3dVector(colors)
o3d.visualization.draw_geometries([line_set,self.pcd])
def drawLine(self,pt1=[0,0,0],pt2=[1,1,1],color_rgb=[1,0,0],vis=False):
"""
Creates a geometry object representing a line between pt1 and pt2.
Set the vis flat to [T] to draw in a 3D viewer
"""
line_set = o3d.geometry.LineSet()
line_set.points = o3d.utility.Vector3dVector([pt1, pt2])
line_set.lines = o3d.utility.Vector2iVector([[0, 1]])
line_set.colors = o3d.utility.Vector3dVector([color_rgb])
if vis: o3d.visualization.draw_geometries([line_set,self.pcd])
return line_set
def getNumpyAll(self,verbose=False):
"""Returns an array of [X,Y,Z,R,G,B,NormX,NormY,NormZ]"""
# Get a Points
npd = self.getNumPyPts()
if verbose:
print(npd.shape)
print(npd)
# Get Colors
npc = self.getNumPyColors()
if verbose:
print(npc.shape)
print(npc)
# Get Normals
npn = self.getNumPyNorms()
if verbose:
print(npn.shape)
print(npn)
# Concatenate Array
npa = np.hstack((npd,npc,npn))
if verbose:
print(npa.shape)
print(npa)
# Output combined NumPy array
return npa
def convertNumPyToPointCloud(self,arr):
"""Converts a Nx9 NumPy array [X,Y,Z,R,G,B,NormX,NormY,NormZ] to Open3d"""
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(arr[:,[0,1,2]])
pcd.colors = o3d.utility.Vector3dVector(arr[:,[3,4,5]])
pcd.normals = o3d.utility.Vector3dVector(arr[:,[6,7,8]])
return pcd
if __name__ == '__main__':
try:
print("Testing Open3D")
# Intialize the Class
myOpen3d = WrapperOpen3d("../data/LeafPointCloud.ply")
# Open the Point Cloud
myOpen3d.plyOpen(distance_thresh=0.5,downsample=False)
# Visualize the Point Cloud
myOpen3d.visPointCloud()
# Get the NumPy Data (Pts,Colors,Normals)
myNumPyArray = myOpen3d.getNumpyAll(verbose=True)
# Convert the NumPy Data back to Point Cloud
myOpen3d.pcd = myOpen3d.convertNumPyToPointCloud(myNumPyArray)
myOpen3d.visPointCloud()
# TODO: Clean this up, this is mostly scratch work
print(myOpen3d.getClusterLabels(True))
myOpen3d.drawOrigin()
myOpen3d.drawLine(vis=True)
except:
print("ERROR, EXCEPTION THROWN")
| [
1,
529,
276,
1112,
420,
29958,
1004,
29886,
861,
29914,
29954,
7056,
562,
2242,
6585,
29941,
29928,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
1722,
29941,
29881,
408,
288,
29941,
29881,
13,
5215,
3509,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
1990,
399,
6794,
6585,
29941,
29881,
29898,
3318,
1125,
13,
1678,
9995,
4013,
3578,
7915,
14476,
373,
4673,
29941,
29928,
29436,
263,
869,
17632,
1298,
9570,
964,
263,
11848,
19737,
4398,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2224,
29918,
517,
29918,
17632,
1125,
13,
4706,
1583,
29889,
2084,
29918,
517,
29918,
17632,
353,
2224,
29918,
517,
29918,
17632,
13,
4706,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
353,
7700,
13,
4706,
736,
6213,
13,
13,
1678,
822,
282,
368,
6585,
29898,
1311,
29892,
19244,
29918,
386,
3781,
10457,
29896,
29892,
3204,
11249,
29918,
2311,
10457,
29896,
29892,
369,
15828,
29922,
5574,
1125,
13,
4706,
9995,
11746,
575,
278,
1298,
9570,
515,
263,
869,
17632,
934,
2702,
1000,
472,
770,
17865,
15945,
29908,
13,
4706,
565,
26952,
29901,
1596,
703,
6585,
292,
613,
1311,
29889,
2084,
29918,
517,
29918,
17632,
29897,
13,
4706,
1583,
29889,
29886,
2252,
353,
288,
29941,
29881,
29889,
601,
29889,
949,
29918,
3149,
29918,
9274,
29898,
1311,
29889,
2084,
29918,
517,
29918,
17632,
29897,
13,
13,
4706,
396,
5240,
586,
267,
8984,
29879,
4451,
2975,
6652,
749,
498,
12268,
13,
4706,
565,
5418,
29918,
386,
3781,
1405,
29871,
29900,
29901,
13,
9651,
1583,
29889,
29886,
2252,
353,
1583,
29889,
19244,
1349,
3781,
29898,
1311,
29889,
29886,
2252,
29892,
19244,
29918,
386,
3781,
29897,
13,
13,
4706,
396,
9943,
21029,
13,
4706,
565,
1623,
11249,
29918,
2311,
1405,
29871,
29900,
29901,
13,
9651,
1583,
29889,
29886,
2252,
353,
1583,
29889,
29886,
2252,
29889,
1365,
29916,
295,
29918,
3204,
29918,
11249,
29898,
1365,
29916,
295,
29918,
2311,
29922,
3204,
11249,
29918,
2311,
29897,
13,
13,
4706,
396,
17440,
10343,
13611,
278,
8984,
14293,
13,
4706,
565,
26952,
29901,
1596,
29898,
1311,
29889,
29886,
2252,
29897,
13,
13,
4706,
396,
3789,
278,
7500,
7353,
304,
5852,
13,
4706,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
353,
5852,
13,
4706,
736,
6213,
13,
13,
1678,
822,
2254,
5228,
20442,
29898,
1311,
29892,
29886,
2252,
1125,
13,
4706,
9995,
5896,
29879,
263,
8984,
14293,
964,
278,
770,
15945,
29908,
13,
4706,
1583,
29889,
29886,
2252,
353,
282,
2252,
13,
4706,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
353,
5852,
13,
13,
1678,
822,
1998,
5228,
20442,
29898,
1311,
1125,
13,
4706,
9995,
16227,
7093,
278,
7500,
1298,
9570,
15945,
29908,
13,
4706,
565,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
29901,
13,
9651,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
1311,
29889,
29886,
2252,
2314,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
3782,
8984,
14293,
4309,
11932,
29892,
15808,
9249,
675,
1159,
13,
4706,
736,
6213,
13,
13,
1678,
822,
1998,
5228,
20442,
6821,
504,
414,
29898,
1311,
29892,
29886,
2252,
29892,
21134,
1125,
13,
4706,
9995,
13,
4706,
9159,
7093,
278,
24554,
297,
278,
9580,
2618,
1298,
9570,
29889,
450,
7463,
1298,
13,
4706,
9570,
1583,
29889,
29886,
2252,
338,
6058,
3939,
491,
445,
26529,
13,
4706,
9995,
13,
4706,
4236,
29918,
1643,
353,
11073,
29889,
3317,
580,
13,
4706,
1596,
29898,
29888,
29908,
3149,
9570,
756,
426,
3317,
29918,
1643,
718,
29871,
29896,
29913,
24554,
1159,
13,
4706,
11955,
353,
14770,
29889,
657,
29918,
29883,
1958,
703,
3891,
29906,
29900,
1159,
29898,
21134,
847,
313,
3317,
29918,
1643,
565,
4236,
29918,
1643,
1405,
29871,
29900,
1683,
29871,
29896,
876,
13,
4706,
11955,
29961,
21134,
529,
29871,
29900,
29962,
353,
29871,
29900,
13,
4706,
282,
2252,
29889,
27703,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
27703,
7503,
29892,
584,
29941,
2314,
13,
4706,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
29886,
2252,
2314,
13,
13,
13,
1678,
822,
5418,
1349,
3781,
29898,
1311,
29892,
29886,
2252,
29892,
386,
3781,
29922,
29900,
29889,
29945,
1125,
13,
4706,
9995,
13,
4706,
5240,
586,
267,
599,
3291,
393,
526,
5377,
278,
266,
3781,
515,
278,
3978,
13,
4706,
9995,
13,
4706,
396,
2045,
597,
2417,
29889,
510,
29914,
2619,
29914,
29953,
29945,
29955,
29941,
29896,
29953,
29945,
29929,
29914,
3150,
29941,
29881,
4691,
29899,
3525,
29899,
517,
29899,
5992,
29899,
9748,
29899,
3166,
29899,
17632,
13,
13,
4706,
396,
3617,
278,
11848,
2272,
8984,
29879,
13,
4706,
3291,
353,
7442,
29889,
294,
2378,
29898,
29886,
2252,
29889,
9748,
29897,
13,
13,
4706,
396,
317,
9085,
4818,
322,
11855,
13,
4706,
4818,
353,
7442,
29889,
2378,
4197,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
2314,
13,
13,
4706,
396,
20535,
403,
24610,
304,
4818,
29892,
731,
716,
3291,
13,
4706,
24610,
353,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
9748,
448,
4818,
29892,
9685,
29922,
29896,
29897,
13,
4706,
396,
282,
2252,
29896,
29889,
9748,
353,
1722,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
9748,
29961,
5721,
2925,
5277,
11855,
2314,
13,
13,
4706,
22645,
353,
7442,
29889,
3062,
29898,
5721,
2925,
529,
266,
3781,
9601,
29900,
29962,
13,
4706,
282,
2252,
29918,
386,
3781,
353,
282,
2252,
29889,
2622,
29918,
1609,
29918,
2248,
29898,
13140,
29897,
13,
13,
4706,
736,
282,
2252,
29918,
386,
3781,
13,
13,
1678,
822,
679,
8009,
19737,
29925,
1372,
29898,
1311,
1125,
13,
4706,
9995,
11609,
29879,
278,
6496,
1298,
9570,
408,
263,
11848,
19737,
4398,
15945,
29908,
13,
4706,
565,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
29901,
13,
9651,
736,
7442,
29889,
294,
2378,
29898,
1311,
29889,
29886,
2252,
29889,
9748,
29897,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
3782,
8984,
14293,
4309,
11932,
29892,
15808,
3617,
8984,
29879,
1159,
13,
9651,
736,
6213,
13,
13,
1678,
822,
679,
8009,
19737,
29940,
555,
29879,
29898,
1311,
1125,
13,
4706,
9995,
12787,
326,
1078,
278,
6056,
1338,
363,
6159,
1298,
29892,
3639,
408,
11848,
19737,
4398,
565,
5852,
15945,
29908,
13,
4706,
396,
1583,
29889,
29886,
2252,
29889,
342,
6490,
29918,
12324,
1338,
29898,
4478,
29918,
3207,
29922,
29877,
29941,
29881,
29889,
19156,
29889,
29968,
29928,
9643,
7974,
4736,
26322,
19515,
29898,
13471,
29922,
29900,
29889,
29896,
29892,
4236,
29918,
15755,
29922,
29941,
29900,
876,
13,
4706,
565,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
29901,
13,
9651,
736,
7442,
29889,
294,
2378,
29898,
1311,
29889,
29886,
2252,
29889,
12324,
1338,
29897,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
3782,
8984,
14293,
4309,
11932,
29892,
15808,
3617,
5655,
1338,
1159,
13,
9651,
736,
6213,
13,
13,
1678,
822,
679,
8009,
19737,
1625,
943,
29898,
1311,
1125,
13,
4706,
9995,
11609,
29879,
278,
6496,
1298,
11955,
408,
263,
11848,
19737,
4398,
15945,
29908,
13,
4706,
565,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
29901,
13,
9651,
736,
7442,
29889,
294,
2378,
29898,
1311,
29889,
29886,
2252,
29889,
27703,
29897,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
3782,
8984,
14293,
4309,
11932,
29892,
15808,
3617,
29183,
1159,
13,
9651,
736,
6213,
13,
13,
1678,
822,
679,
6821,
5402,
4775,
29879,
29898,
1311,
29892,
20119,
675,
29922,
8824,
1125,
13,
4706,
9995,
15922,
267,
6535,
7187,
2190,
304,
9867,
278,
1298,
9570,
322,
3639,
263,
11848,
19737,
3858,
1409,
15945,
29908,
13,
4706,
565,
1583,
29889,
3149,
29918,
9274,
29918,
15638,
29901,
13,
9651,
396,
7525,
278,
2233,
504,
3241,
29068,
13,
9651,
411,
288,
29941,
29881,
29889,
329,
1793,
29889,
6565,
27737,
537,
2677,
3260,
29898,
29877,
29941,
29881,
29889,
329,
1793,
29889,
6565,
27737,
537,
10108,
29889,
11862,
29897,
408,
7477,
29901,
13,
18884,
11073,
353,
7442,
29889,
2378,
29898,
1311,
29889,
29886,
2252,
29889,
19594,
29918,
2585,
16192,
29898,
8961,
29922,
29900,
29889,
29900,
29906,
29892,
1375,
29918,
9748,
29922,
29896,
29900,
29892,
1596,
29918,
18035,
29922,
5574,
876,
13,
13,
9651,
396,
17440,
278,
1530,
4395,
8984,
14293,
13,
9651,
565,
7604,
675,
29901,
13,
18884,
1583,
29889,
1730,
5228,
20442,
6821,
504,
414,
29898,
8552,
29889,
24535,
8552,
29898,
1311,
29889,
29886,
2252,
511,
21134,
29897,
13,
13,
9651,
736,
11073,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
3782,
8984,
14293,
4309,
11932,
29892,
15808,
2233,
5402,
8984,
29879,
1159,
13,
9651,
736,
6213,
13,
13,
1678,
822,
6216,
3247,
1662,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
10783,
267,
278,
4240,
297,
390,
2190,
29903,
2477,
304,
6216,
263,
10694,
304,
278,
7500,
1298,
9570,
13,
4706,
9995,
13,
4706,
10694,
29918,
4299,
29892,
297,
27801,
353,
1583,
29889,
29886,
2252,
29889,
28192,
29918,
22116,
29898,
19244,
29918,
386,
12268,
29922,
29900,
29889,
29900,
29896,
29892,
13,
462,
462,
308,
364,
550,
562,
29918,
29876,
29922,
29941,
29892,
13,
462,
462,
308,
954,
29918,
1524,
800,
29922,
29896,
29900,
29900,
29900,
29897,
13,
4706,
518,
29874,
29892,
289,
29892,
274,
29892,
270,
29962,
353,
10694,
29918,
4299,
13,
4706,
1596,
29898,
29888,
29908,
3247,
1662,
6306,
29901,
426,
29874,
29901,
29889,
29906,
29888,
29913,
29916,
718,
426,
29890,
29901,
29889,
29906,
29888,
29913,
29891,
718,
426,
29883,
29901,
29889,
29906,
29888,
29913,
29920,
718,
426,
29881,
29901,
29889,
29906,
29888,
29913,
353,
29871,
29900,
1159,
13,
13,
4706,
297,
4926,
29918,
9274,
353,
1583,
29889,
29886,
2252,
29889,
2622,
29918,
1609,
29918,
2248,
29898,
262,
27801,
29897,
13,
4706,
297,
4926,
29918,
9274,
29889,
29886,
2365,
29918,
29590,
29918,
2780,
4197,
29896,
29889,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
2314,
13,
4706,
714,
4926,
29918,
9274,
353,
1583,
29889,
29886,
2252,
29889,
2622,
29918,
1609,
29918,
2248,
29898,
262,
27801,
29892,
21292,
29922,
5574,
29897,
13,
4706,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
262,
4926,
29918,
9274,
29892,
714,
4926,
29918,
9274,
2314,
13,
13,
1678,
822,
4216,
3313,
29898,
1311,
1125,
13,
4706,
1596,
703,
12024,
20333,
29879,
4216,
263,
13630,
293,
773,
288,
29941,
29881,
29889,
19156,
29889,
3542,
2697,
1159,
13,
4706,
3291,
353,
5519,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
13,
462,
29871,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
5262,
13,
4706,
3454,
353,
5519,
29900,
29892,
29871,
29896,
1402,
518,
29900,
29892,
29871,
29906,
1402,
518,
29896,
29892,
29871,
29941,
1402,
518,
29906,
29892,
29871,
29941,
1402,
518,
29946,
29892,
29871,
29945,
1402,
518,
29946,
29892,
29871,
29953,
1402,
518,
29945,
29892,
29871,
29955,
1402,
518,
29953,
29892,
29871,
29955,
1402,
13,
462,
518,
29900,
29892,
29871,
29946,
1402,
518,
29896,
29892,
29871,
29945,
1402,
518,
29906,
29892,
29871,
29953,
1402,
518,
29941,
29892,
29871,
29955,
5262,
13,
4706,
11955,
353,
5519,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29962,
363,
474,
297,
3464,
29898,
2435,
29898,
9012,
28166,
13,
4706,
1196,
29918,
842,
353,
288,
29941,
29881,
29889,
19156,
29889,
3542,
2697,
580,
13,
4706,
1196,
29918,
842,
29889,
9748,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
9748,
29897,
13,
4706,
1196,
29918,
842,
29889,
9012,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29906,
29875,
12877,
29898,
9012,
29897,
13,
4706,
1196,
29918,
842,
29889,
27703,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
27703,
29897,
13,
4706,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
1220,
29918,
842,
2314,
13,
13,
1678,
822,
4216,
23182,
29898,
1311,
1125,
13,
4706,
3291,
353,
5519,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
5262,
13,
4706,
3454,
353,
5519,
29900,
29892,
29871,
29896,
1402,
518,
29900,
29892,
29871,
29906,
1402,
518,
29900,
29892,
29871,
29941,
5262,
13,
4706,
11955,
353,
5519,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
16272,
29900,
29892,
29896,
29892,
29900,
16272,
29900,
29892,
29900,
29892,
29896,
5262,
13,
4706,
1196,
29918,
842,
353,
288,
29941,
29881,
29889,
19156,
29889,
3542,
2697,
580,
13,
4706,
1196,
29918,
842,
29889,
9748,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
9748,
29897,
13,
4706,
1196,
29918,
842,
29889,
9012,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29906,
29875,
12877,
29898,
9012,
29897,
13,
4706,
1196,
29918,
842,
29889,
27703,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
27703,
29897,
13,
4706,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
1220,
29918,
842,
29892,
1311,
29889,
29886,
2252,
2314,
13,
13,
1678,
822,
4216,
3542,
29898,
1311,
29892,
415,
29896,
11759,
29900,
29892,
29900,
29892,
29900,
1402,
415,
29906,
11759,
29896,
29892,
29896,
29892,
29896,
1402,
2780,
29918,
23973,
11759,
29896,
29892,
29900,
29892,
29900,
1402,
1730,
29922,
8824,
1125,
13,
4706,
9995,
13,
4706,
6760,
1078,
263,
16303,
1203,
15783,
263,
1196,
1546,
19592,
29896,
322,
19592,
29906,
29889,
13,
4706,
3789,
278,
1998,
12151,
304,
518,
29911,
29962,
304,
4216,
297,
263,
29871,
29941,
29928,
6316,
556,
13,
4706,
9995,
13,
4706,
1196,
29918,
842,
353,
288,
29941,
29881,
29889,
19156,
29889,
3542,
2697,
580,
13,
4706,
1196,
29918,
842,
29889,
9748,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
4197,
415,
29896,
29892,
19592,
29906,
2314,
13,
4706,
1196,
29918,
842,
29889,
9012,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29906,
29875,
12877,
4197,
29961,
29900,
29892,
29871,
29896,
24960,
13,
4706,
1196,
29918,
842,
29889,
27703,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
4197,
2780,
29918,
23973,
2314,
13,
4706,
565,
1998,
29901,
288,
29941,
29881,
29889,
20119,
2133,
29889,
4012,
29918,
479,
3297,
2722,
4197,
1220,
29918,
842,
29892,
1311,
29889,
29886,
2252,
2314,
13,
4706,
736,
1196,
29918,
842,
13,
13,
1678,
822,
679,
8009,
2272,
3596,
29898,
1311,
29892,
369,
15828,
29922,
8824,
1125,
13,
4706,
9995,
11609,
29879,
385,
1409,
310,
518,
29990,
29892,
29979,
29892,
29999,
29892,
29934,
29892,
29954,
29892,
29933,
29892,
29940,
555,
29990,
29892,
29940,
555,
29979,
29892,
29940,
555,
29999,
29962,
15945,
29908,
13,
4706,
396,
3617,
263,
8984,
29879,
13,
4706,
7442,
29881,
353,
1583,
29889,
657,
8009,
19737,
29925,
1372,
580,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
29898,
9302,
29881,
29889,
12181,
29897,
13,
9651,
1596,
29898,
9302,
29881,
29897,
13,
13,
4706,
396,
3617,
29183,
13,
4706,
302,
6739,
353,
1583,
29889,
657,
8009,
19737,
1625,
943,
580,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
29898,
29876,
6739,
29889,
12181,
29897,
13,
9651,
1596,
29898,
29876,
6739,
29897,
13,
13,
4706,
396,
3617,
5655,
1338,
13,
4706,
7442,
29876,
353,
1583,
29889,
657,
8009,
19737,
29940,
555,
29879,
580,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
29898,
9302,
29876,
29889,
12181,
29897,
13,
9651,
1596,
29898,
9302,
29876,
29897,
13,
13,
4706,
396,
23924,
2579,
403,
4398,
13,
4706,
302,
3274,
353,
7442,
29889,
29882,
1429,
3552,
9302,
29881,
29892,
29876,
6739,
29892,
9302,
29876,
876,
13,
4706,
565,
26952,
29901,
13,
9651,
1596,
29898,
29876,
3274,
29889,
12181,
29897,
13,
9651,
1596,
29898,
29876,
3274,
29897,
13,
13,
4706,
396,
10604,
12420,
11848,
19737,
1409,
13,
4706,
736,
302,
3274,
13,
13,
1678,
822,
3588,
8009,
19737,
1762,
5228,
20442,
29898,
1311,
29892,
2749,
1125,
13,
4706,
9995,
1168,
369,
1372,
263,
405,
29916,
29929,
11848,
19737,
1409,
518,
29990,
29892,
29979,
29892,
29999,
29892,
29934,
29892,
29954,
29892,
29933,
29892,
29940,
555,
29990,
29892,
29940,
555,
29979,
29892,
29940,
555,
29999,
29962,
304,
4673,
29941,
29881,
15945,
29908,
13,
4706,
282,
2252,
353,
288,
29941,
29881,
29889,
19156,
29889,
5228,
20442,
580,
13,
4706,
282,
2252,
29889,
9748,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
2749,
7503,
17094,
29900,
29892,
29896,
29892,
29906,
24960,
13,
4706,
282,
2252,
29889,
27703,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
2749,
7503,
17094,
29941,
29892,
29946,
29892,
29945,
24960,
13,
4706,
282,
2252,
29889,
12324,
1338,
353,
288,
29941,
29881,
29889,
329,
1793,
29889,
12877,
29941,
29881,
12877,
29898,
2749,
7503,
17094,
29953,
29892,
29955,
29892,
29947,
24960,
13,
4706,
736,
282,
2252,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1018,
29901,
13,
4706,
1596,
703,
3057,
292,
4673,
29941,
29928,
1159,
13,
13,
4706,
396,
3159,
6646,
278,
4134,
13,
4706,
590,
6585,
29941,
29881,
353,
399,
6794,
6585,
29941,
29881,
703,
6995,
1272,
29914,
3226,
2142,
5228,
20442,
29889,
17632,
1159,
13,
13,
4706,
396,
4673,
278,
8984,
14293,
13,
4706,
590,
6585,
29941,
29881,
29889,
17632,
6585,
29898,
19244,
29918,
386,
3781,
29922,
29900,
29889,
29945,
29892,
3204,
11249,
29922,
8824,
29897,
13,
13,
4706,
396,
9249,
675,
278,
8984,
14293,
13,
4706,
590,
6585,
29941,
29881,
29889,
1730,
5228,
20442,
580,
13,
13,
4706,
396,
3617,
278,
11848,
19737,
3630,
313,
29925,
1372,
29892,
1625,
943,
29892,
29940,
555,
1338,
29897,
13,
4706,
590,
8009,
19737,
2588,
353,
590,
6585,
29941,
29881,
29889,
657,
8009,
2272,
3596,
29898,
369,
15828,
29922,
5574,
29897,
13,
13,
4706,
396,
14806,
278,
11848,
19737,
3630,
1250,
304,
8984,
14293,
13,
4706,
590,
6585,
29941,
29881,
29889,
29886,
2252,
353,
590,
6585,
29941,
29881,
29889,
13441,
8009,
19737,
1762,
5228,
20442,
29898,
1357,
8009,
19737,
2588,
29897,
13,
4706,
590,
6585,
29941,
29881,
29889,
1730,
5228,
20442,
580,
13,
13,
4706,
396,
14402,
29901,
315,
14044,
445,
701,
29892,
445,
338,
11149,
22728,
664,
13,
4706,
1596,
29898,
1357,
6585,
29941,
29881,
29889,
657,
6821,
5402,
4775,
29879,
29898,
5574,
876,
13,
4706,
590,
6585,
29941,
29881,
29889,
4012,
23182,
580,
13,
4706,
590,
6585,
29941,
29881,
29889,
4012,
3542,
29898,
1730,
29922,
5574,
29897,
13,
13,
13,
1678,
5174,
29901,
13,
4706,
1596,
703,
11432,
29892,
8528,
4741,
7982,
2725,
3446,
1672,
16048,
1159,
13,
2
] |
tests/rules/test_result.py | victor-torres/arche | 0 | 137501 | from arche.rules.result import Level, Message, Result
from conftest import create_named_df, create_result
import pandas as pd
import pytest
@pytest.mark.parametrize(
"source, target",
[(("summary", "details", {"err": ["1"]}), ("summary", "details", {"err": ["1"]}))],
)
def test_message_eq(source, target):
assert Message(*source) == Message(*target)
@pytest.mark.parametrize(
"source, target",
[
(
("summary", "details", {"err": ["0"]}),
("summary", "details", {"err": ["1"]}),
),
(("summary", "details"), ("summary", "other")),
],
)
def test_message_not_eq(source, target):
assert Message(*source) != Message(*target)
@pytest.mark.parametrize(
"source, target",
[
(
pd.Series([0, 1], index=["f", "l"], name="n"),
pd.Series([0, 1], index=["f", "l"], name="n"),
),
(pd.DataFrame([0, 1]), pd.DataFrame([0, 1])),
],
)
def test_tensors_equal(source, target):
assert Result.tensors_equal(source, target)
@pytest.mark.parametrize(
"source, target",
[
(
pd.Series([0, 1], index=["f", "l"], name="s"),
pd.Series([0, 1], index=["f", "l"], name="n"),
),
(pd.DataFrame([0, 1]), pd.DataFrame([0, 1], index=["m", "s"])),
],
)
def test_tensors_not_equal(source, target):
assert not Result.tensors_equal(source, target)
@pytest.mark.parametrize(
"message, stats, expected_details",
[
(
{Level.INFO: [("summary", "very detailed message")]},
[pd.Series([1, 2], name="Fields coverage")],
"\nrule name here:\n\tsummary\nvery detailed message\n",
),
(
{Level.INFO: [("summary",)]},
[
create_named_df(
{"s": [0.25]}, index=["us"], name="Coverage for boolean fields"
)
],
"\nrule name here:\n\tsummary\n",
),
],
)
def test_show(mocker, capsys, message, stats, expected_details):
mock_pio_show = mocker.patch("plotly.io.show", autospec=True)
r = create_result("rule name here", message, stats=stats)
r.show()
mock_pio_show.assert_called_once_with(r.figures[0])
assert capsys.readouterr().out == expected_details
@pytest.mark.parametrize(
"left_params, right_params",
[
(
(
"s",
{Level.INFO: ["sum", "det", {"err1": [0, 1]}]},
[pd.Series([0], name="s"), pd.DataFrame({"s": [0]})],
2,
["err1"],
1,
),
(
"s",
{Level.INFO: ["sum", "det", {"err1": [0, 1]}]},
[pd.Series([0], name="s"), pd.DataFrame({"s": [0]})],
2,
["err1"],
1,
),
),
(("s",), ("s",)),
],
)
def test_result_equal(left_params, right_params):
assert Result(*left_params) == Result(*right_params)
@pytest.mark.parametrize(
"left_params, right_params",
[
(
(
"s",
{Level.INFO: ["sum", "det", {"err1": [0, 1]}]},
[pd.Series([0], name="A name"), pd.DataFrame([0])],
2,
["err1"],
1,
),
(
"s",
{Level.INFO: ["sum", "det", {"err1": [0, 1]}]},
[pd.Series([0], name="A series name"), pd.DataFrame([0])],
2,
["err1"],
1,
),
),
(("s",), ("t",)),
],
)
def test_result_not_equal(left_params, right_params):
assert Result(*left_params) != Result(*right_params)
| [
1,
515,
564,
1173,
29889,
19238,
29889,
2914,
1053,
21597,
29892,
7777,
29892,
7867,
13,
3166,
378,
615,
342,
1053,
1653,
29918,
17514,
29918,
2176,
29892,
1653,
29918,
2914,
13,
5215,
11701,
408,
10518,
13,
5215,
11451,
1688,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
4993,
29892,
3646,
613,
13,
1678,
17288,
703,
7727,
613,
376,
14144,
613,
8853,
3127,
1115,
6796,
29896,
3108,
9594,
4852,
7727,
613,
376,
14144,
613,
8853,
3127,
1115,
6796,
29896,
3108,
20073,
1402,
13,
29897,
13,
1753,
1243,
29918,
4906,
29918,
1837,
29898,
4993,
29892,
3646,
1125,
13,
1678,
4974,
7777,
10456,
4993,
29897,
1275,
7777,
10456,
5182,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
4993,
29892,
3646,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
4852,
7727,
613,
376,
14144,
613,
8853,
3127,
1115,
6796,
29900,
3108,
9594,
13,
9651,
4852,
7727,
613,
376,
14144,
613,
8853,
3127,
1115,
6796,
29896,
3108,
9594,
13,
4706,
10353,
13,
4706,
313,
703,
7727,
613,
376,
14144,
4968,
4852,
7727,
613,
376,
1228,
1159,
511,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
4906,
29918,
1333,
29918,
1837,
29898,
4993,
29892,
3646,
1125,
13,
1678,
4974,
7777,
10456,
4993,
29897,
2804,
7777,
10456,
5182,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
4993,
29892,
3646,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
10518,
29889,
19204,
4197,
29900,
29892,
29871,
29896,
1402,
2380,
29922,
3366,
29888,
613,
376,
29880,
12436,
1024,
543,
29876,
4968,
13,
9651,
10518,
29889,
19204,
4197,
29900,
29892,
29871,
29896,
1402,
2380,
29922,
3366,
29888,
613,
376,
29880,
12436,
1024,
543,
29876,
4968,
13,
4706,
10353,
13,
4706,
313,
15926,
29889,
17271,
4197,
29900,
29892,
29871,
29896,
11724,
10518,
29889,
17271,
4197,
29900,
29892,
29871,
29896,
2314,
511,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
29873,
575,
943,
29918,
11745,
29898,
4993,
29892,
3646,
1125,
13,
1678,
4974,
7867,
29889,
29873,
575,
943,
29918,
11745,
29898,
4993,
29892,
3646,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
4993,
29892,
3646,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
10518,
29889,
19204,
4197,
29900,
29892,
29871,
29896,
1402,
2380,
29922,
3366,
29888,
613,
376,
29880,
12436,
1024,
543,
29879,
4968,
13,
9651,
10518,
29889,
19204,
4197,
29900,
29892,
29871,
29896,
1402,
2380,
29922,
3366,
29888,
613,
376,
29880,
12436,
1024,
543,
29876,
4968,
13,
4706,
10353,
13,
4706,
313,
15926,
29889,
17271,
4197,
29900,
29892,
29871,
29896,
11724,
10518,
29889,
17271,
4197,
29900,
29892,
29871,
29896,
1402,
2380,
29922,
3366,
29885,
613,
376,
29879,
20068,
511,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
29873,
575,
943,
29918,
1333,
29918,
11745,
29898,
4993,
29892,
3646,
1125,
13,
1678,
4974,
451,
7867,
29889,
29873,
575,
943,
29918,
11745,
29898,
4993,
29892,
3646,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
4906,
29892,
22663,
29892,
3806,
29918,
14144,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
426,
10108,
29889,
11690,
29901,
518,
703,
7727,
613,
376,
1201,
13173,
2643,
13531,
1118,
13,
9651,
518,
15926,
29889,
19204,
4197,
29896,
29892,
29871,
29906,
1402,
1024,
543,
14256,
23746,
1159,
1402,
13,
9651,
6634,
29876,
7491,
1024,
1244,
3583,
29876,
29905,
1372,
398,
5219,
29905,
29876,
1201,
13173,
2643,
29905,
29876,
613,
13,
4706,
10353,
13,
4706,
313,
13,
9651,
426,
10108,
29889,
11690,
29901,
518,
703,
7727,
613,
4638,
1118,
13,
9651,
518,
13,
18884,
1653,
29918,
17514,
29918,
2176,
29898,
13,
462,
1678,
8853,
29879,
1115,
518,
29900,
29889,
29906,
29945,
29962,
1118,
2380,
29922,
3366,
375,
12436,
1024,
543,
29907,
957,
482,
363,
7223,
4235,
29908,
13,
18884,
1723,
13,
9651,
21251,
13,
9651,
6634,
29876,
7491,
1024,
1244,
3583,
29876,
29905,
1372,
398,
5219,
29905,
29876,
613,
13,
4706,
10353,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
4294,
29898,
29885,
8658,
29892,
2117,
9675,
29892,
2643,
29892,
22663,
29892,
3806,
29918,
14144,
1125,
13,
1678,
11187,
29918,
16168,
29918,
4294,
353,
286,
8658,
29889,
5041,
703,
5317,
368,
29889,
601,
29889,
4294,
613,
1120,
359,
3135,
29922,
5574,
29897,
13,
1678,
364,
353,
1653,
29918,
2914,
703,
7491,
1024,
1244,
613,
2643,
29892,
22663,
29922,
16202,
29897,
13,
1678,
364,
29889,
4294,
580,
13,
1678,
11187,
29918,
16168,
29918,
4294,
29889,
9294,
29918,
13998,
29918,
10646,
29918,
2541,
29898,
29878,
29889,
1003,
1973,
29961,
29900,
2314,
13,
1678,
4974,
2117,
9675,
29889,
949,
5561,
29878,
2141,
449,
1275,
3806,
29918,
14144,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
1563,
29918,
7529,
29892,
1492,
29918,
7529,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
313,
13,
18884,
376,
29879,
613,
13,
18884,
426,
10108,
29889,
11690,
29901,
6796,
2083,
613,
376,
4801,
613,
8853,
3127,
29896,
1115,
518,
29900,
29892,
29871,
29896,
29962,
6525,
1118,
13,
18884,
518,
15926,
29889,
19204,
4197,
29900,
1402,
1024,
543,
29879,
4968,
10518,
29889,
17271,
3319,
29908,
29879,
1115,
518,
29900,
29962,
1800,
1402,
13,
462,
29906,
29892,
13,
18884,
6796,
3127,
29896,
12436,
13,
462,
29896,
29892,
13,
9651,
10353,
13,
9651,
313,
13,
18884,
376,
29879,
613,
13,
18884,
426,
10108,
29889,
11690,
29901,
6796,
2083,
613,
376,
4801,
613,
8853,
3127,
29896,
1115,
518,
29900,
29892,
29871,
29896,
29962,
6525,
1118,
13,
18884,
518,
15926,
29889,
19204,
4197,
29900,
1402,
1024,
543,
29879,
4968,
10518,
29889,
17271,
3319,
29908,
29879,
1115,
518,
29900,
29962,
1800,
1402,
13,
462,
29906,
29892,
13,
18884,
6796,
3127,
29896,
12436,
13,
462,
29896,
29892,
13,
9651,
10353,
13,
4706,
10353,
13,
4706,
313,
703,
29879,
613,
511,
4852,
29879,
613,
8243,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
2914,
29918,
11745,
29898,
1563,
29918,
7529,
29892,
1492,
29918,
7529,
1125,
13,
1678,
4974,
7867,
10456,
1563,
29918,
7529,
29897,
1275,
7867,
10456,
1266,
29918,
7529,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
1563,
29918,
7529,
29892,
1492,
29918,
7529,
613,
13,
1678,
518,
13,
4706,
313,
13,
9651,
313,
13,
18884,
376,
29879,
613,
13,
18884,
426,
10108,
29889,
11690,
29901,
6796,
2083,
613,
376,
4801,
613,
8853,
3127,
29896,
1115,
518,
29900,
29892,
29871,
29896,
29962,
6525,
1118,
13,
18884,
518,
15926,
29889,
19204,
4197,
29900,
1402,
1024,
543,
29909,
1024,
4968,
10518,
29889,
17271,
4197,
29900,
2314,
1402,
13,
462,
29906,
29892,
13,
18884,
6796,
3127,
29896,
12436,
13,
462,
29896,
29892,
13,
9651,
10353,
13,
9651,
313,
13,
18884,
376,
29879,
613,
13,
18884,
426,
10108,
29889,
11690,
29901,
6796,
2083,
613,
376,
4801,
613,
8853,
3127,
29896,
1115,
518,
29900,
29892,
29871,
29896,
29962,
6525,
1118,
13,
18884,
518,
15926,
29889,
19204,
4197,
29900,
1402,
1024,
543,
29909,
3652,
1024,
4968,
10518,
29889,
17271,
4197,
29900,
2314,
1402,
13,
462,
29906,
29892,
13,
18884,
6796,
3127,
29896,
12436,
13,
462,
29896,
29892,
13,
9651,
10353,
13,
4706,
10353,
13,
4706,
313,
703,
29879,
613,
511,
4852,
29873,
613,
8243,
13,
1678,
21251,
13,
29897,
13,
1753,
1243,
29918,
2914,
29918,
1333,
29918,
11745,
29898,
1563,
29918,
7529,
29892,
1492,
29918,
7529,
1125,
13,
1678,
4974,
7867,
10456,
1563,
29918,
7529,
29897,
2804,
7867,
10456,
1266,
29918,
7529,
29897,
13,
2
] |
homeassistant/components/sensor/hddtemp.py | mdonoughe/home-assistant | 2 | 4115 | """
Support for getting the disk temperature of a host.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.hddtemp/
"""
import logging
from datetime import timedelta
from telnetlib import Telnet
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_NAME, CONF_HOST, CONF_PORT, TEMP_CELSIUS, TEMP_FAHRENHEIT, CONF_DISKS)
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
ATTR_DEVICE = 'device'
ATTR_MODEL = 'model'
DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 7634
DEFAULT_NAME = 'HD Temperature'
DEFAULT_TIMEOUT = 5
SCAN_INTERVAL = timedelta(minutes=1)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_DISKS, default=[]): vol.All(cv.ensure_list, [cv.string]),
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the HDDTemp sensor."""
name = config.get(CONF_NAME)
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
disks = config.get(CONF_DISKS)
hddtemp = HddTempData(host, port)
hddtemp.update()
if hddtemp.data is None:
return False
if not disks:
disks = [next(iter(hddtemp.data)).split('|')[0]]
dev = []
for disk in disks:
if disk in hddtemp.data:
dev.append(HddTempSensor(name, disk, hddtemp))
add_devices(dev, True)
class HddTempSensor(Entity):
"""Representation of a HDDTemp sensor."""
def __init__(self, name, disk, hddtemp):
"""Initialize a HDDTemp sensor."""
self.hddtemp = hddtemp
self.disk = disk
self._name = '{} {}'.format(name, disk)
self._state = None
self._details = None
@property
def name(self):
"""Return the name of the sensor."""
return self._name
@property
def state(self):
"""Return the state of the device."""
return self._state
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
if self._details[3] == 'C':
return TEMP_CELSIUS
return TEMP_FAHRENHEIT
@property
def device_state_attributes(self):
"""Return the state attributes of the sensor."""
return {
ATTR_DEVICE: self._details[0],
ATTR_MODEL: self._details[1],
}
def update(self):
"""Get the latest data from HDDTemp daemon and updates the state."""
self.hddtemp.update()
if self.hddtemp.data and self.disk in self.hddtemp.data:
self._details = self.hddtemp.data[self.disk].split('|')
self._state = self._details[2]
else:
self._state = None
class HddTempData(object):
"""Get the latest data from HDDTemp and update the states."""
def __init__(self, host, port):
"""Initialize the data object."""
self.host = host
self.port = port
self.data = None
def update(self):
"""Get the latest data from HDDTemp running as daemon."""
try:
connection = Telnet(
host=self.host, port=self.port, timeout=DEFAULT_TIMEOUT)
data = connection.read_all().decode(
'ascii').lstrip('|').rstrip('|').split('||')
self.data = {data[i].split('|')[0]: data[i]
for i in range(0, len(data), 1)}
except ConnectionRefusedError:
_LOGGER.error(
"HDDTemp is not available at %s:%s", self.host, self.port)
self.data = None
| [
1,
9995,
13,
14039,
363,
2805,
278,
8086,
10430,
310,
263,
3495,
29889,
13,
13,
2831,
901,
4902,
1048,
445,
7481,
29892,
3113,
2737,
304,
278,
5106,
472,
13,
991,
597,
5184,
29899,
465,
22137,
29889,
601,
29914,
14036,
29914,
29879,
6073,
29889,
29882,
1289,
7382,
29914,
13,
15945,
29908,
13,
5215,
12183,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
3166,
13547,
1212,
1982,
1053,
18815,
1212,
13,
13,
5215,
1700,
21245,
17269,
408,
1700,
13,
13,
5215,
3271,
465,
22137,
29889,
3952,
6774,
29889,
2917,
29918,
18157,
408,
13850,
13,
3166,
3271,
465,
22137,
29889,
14036,
29889,
29879,
6073,
1053,
16507,
1299,
19094,
29918,
29903,
3210,
26862,
13,
3166,
3271,
465,
22137,
29889,
3075,
1053,
313,
13,
1678,
8707,
29943,
29918,
5813,
29892,
8707,
29943,
29918,
20832,
29892,
8707,
29943,
29918,
15082,
29892,
17067,
3580,
29918,
4741,
29931,
5425,
3308,
29892,
17067,
3580,
29918,
4519,
20938,
1430,
9606,
1806,
29892,
8707,
29943,
29918,
23711,
17557,
29897,
13,
3166,
3271,
465,
22137,
29889,
3952,
6774,
29889,
10041,
1053,
14945,
13,
13,
29918,
14480,
17070,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
1299,
5659,
29918,
2287,
19059,
353,
525,
10141,
29915,
13,
1299,
5659,
29918,
20387,
29931,
353,
525,
4299,
29915,
13,
13,
23397,
29918,
20832,
353,
525,
7640,
29915,
13,
23397,
29918,
15082,
353,
29871,
29955,
29953,
29941,
29946,
13,
23397,
29918,
5813,
353,
525,
26124,
6789,
546,
1535,
29915,
13,
23397,
29918,
15307,
12015,
353,
29871,
29945,
13,
13,
7187,
2190,
29918,
23845,
8932,
353,
5335,
287,
2554,
29898,
1195,
2667,
29922,
29896,
29897,
13,
13,
7390,
1299,
19094,
29918,
29903,
3210,
26862,
353,
16507,
1299,
19094,
29918,
29903,
3210,
26862,
29889,
21843,
3319,
13,
1678,
1700,
29889,
27636,
29898,
6007,
29943,
29918,
23711,
17557,
29892,
2322,
29922,
2636,
1125,
1700,
29889,
3596,
29898,
11023,
29889,
7469,
29918,
1761,
29892,
518,
11023,
29889,
1807,
11724,
13,
1678,
1700,
29889,
27636,
29898,
6007,
29943,
29918,
20832,
29892,
2322,
29922,
23397,
29918,
20832,
1125,
13850,
29889,
1807,
29892,
13,
1678,
1700,
29889,
27636,
29898,
6007,
29943,
29918,
15082,
29892,
2322,
29922,
23397,
29918,
15082,
1125,
13850,
29889,
637,
29892,
13,
1678,
1700,
29889,
27636,
29898,
6007,
29943,
29918,
5813,
29892,
2322,
29922,
23397,
29918,
5813,
1125,
13850,
29889,
1807,
29892,
13,
1800,
13,
13,
13,
1753,
6230,
29918,
12120,
29898,
29882,
465,
29892,
2295,
29892,
788,
29918,
3359,
1575,
29892,
20699,
29918,
3888,
29922,
8516,
1125,
13,
1678,
9995,
2697,
701,
278,
379,
7858,
15637,
23530,
1213,
15945,
13,
1678,
1024,
353,
2295,
29889,
657,
29898,
6007,
29943,
29918,
5813,
29897,
13,
1678,
3495,
353,
2295,
29889,
657,
29898,
6007,
29943,
29918,
20832,
29897,
13,
1678,
2011,
353,
2295,
29889,
657,
29898,
6007,
29943,
29918,
15082,
29897,
13,
1678,
766,
2039,
353,
2295,
29889,
657,
29898,
6007,
29943,
29918,
23711,
17557,
29897,
13,
13,
1678,
298,
1289,
7382,
353,
379,
1289,
15637,
1469,
29898,
3069,
29892,
2011,
29897,
13,
1678,
298,
1289,
7382,
29889,
5504,
580,
13,
13,
1678,
565,
298,
1289,
7382,
29889,
1272,
338,
6213,
29901,
13,
4706,
736,
7700,
13,
13,
1678,
565,
451,
766,
2039,
29901,
13,
4706,
766,
2039,
353,
518,
4622,
29898,
1524,
29898,
29882,
1289,
7382,
29889,
1272,
8106,
5451,
877,
29989,
29861,
29900,
5262,
13,
13,
1678,
2906,
353,
5159,
13,
1678,
363,
8086,
297,
766,
2039,
29901,
13,
4706,
565,
8086,
297,
298,
1289,
7382,
29889,
1272,
29901,
13,
9651,
2906,
29889,
4397,
29898,
29950,
1289,
15637,
29903,
6073,
29898,
978,
29892,
8086,
29892,
298,
1289,
7382,
876,
13,
13,
1678,
788,
29918,
3359,
1575,
29898,
3359,
29892,
5852,
29897,
13,
13,
13,
1990,
379,
1289,
15637,
29903,
6073,
29898,
6691,
1125,
13,
1678,
9995,
1123,
26081,
310,
263,
379,
7858,
15637,
23530,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
8086,
29892,
298,
1289,
7382,
1125,
13,
4706,
9995,
6644,
6646,
263,
379,
7858,
15637,
23530,
1213,
15945,
13,
4706,
1583,
29889,
29882,
1289,
7382,
353,
298,
1289,
7382,
13,
4706,
1583,
29889,
20960,
353,
8086,
13,
4706,
1583,
3032,
978,
353,
525,
8875,
6571,
4286,
4830,
29898,
978,
29892,
8086,
29897,
13,
4706,
1583,
3032,
3859,
353,
6213,
13,
4706,
1583,
3032,
14144,
353,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1024,
29898,
1311,
1125,
13,
4706,
9995,
11609,
278,
1024,
310,
278,
23530,
1213,
15945,
13,
4706,
736,
1583,
3032,
978,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2106,
29898,
1311,
1125,
13,
4706,
9995,
11609,
278,
2106,
310,
278,
4742,
1213,
15945,
13,
4706,
736,
1583,
3032,
3859,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5190,
29918,
974,
29918,
26658,
358,
29898,
1311,
1125,
13,
4706,
9995,
11609,
278,
5190,
278,
995,
338,
13384,
297,
1213,
15945,
13,
4706,
565,
1583,
3032,
14144,
29961,
29941,
29962,
1275,
525,
29907,
2396,
13,
9651,
736,
17067,
3580,
29918,
4741,
29931,
5425,
3308,
13,
4706,
736,
17067,
3580,
29918,
4519,
20938,
1430,
9606,
1806,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4742,
29918,
3859,
29918,
15697,
29898,
1311,
1125,
13,
4706,
9995,
11609,
278,
2106,
8393,
310,
278,
23530,
1213,
15945,
13,
4706,
736,
426,
13,
9651,
15531,
5659,
29918,
2287,
19059,
29901,
1583,
3032,
14144,
29961,
29900,
1402,
13,
9651,
15531,
5659,
29918,
20387,
29931,
29901,
1583,
3032,
14144,
29961,
29896,
1402,
13,
4706,
500,
13,
13,
1678,
822,
2767,
29898,
1311,
1125,
13,
4706,
9995,
2577,
278,
9281,
848,
515,
379,
7858,
15637,
1146,
9857,
322,
11217,
278,
2106,
1213,
15945,
13,
4706,
1583,
29889,
29882,
1289,
7382,
29889,
5504,
580,
13,
13,
4706,
565,
1583,
29889,
29882,
1289,
7382,
29889,
1272,
322,
1583,
29889,
20960,
297,
1583,
29889,
29882,
1289,
7382,
29889,
1272,
29901,
13,
9651,
1583,
3032,
14144,
353,
1583,
29889,
29882,
1289,
7382,
29889,
1272,
29961,
1311,
29889,
20960,
1822,
5451,
877,
29989,
1495,
13,
9651,
1583,
3032,
3859,
353,
1583,
3032,
14144,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
3859,
353,
6213,
13,
13,
13,
1990,
379,
1289,
15637,
1469,
29898,
3318,
1125,
13,
1678,
9995,
2577,
278,
9281,
848,
515,
379,
7858,
15637,
322,
2767,
278,
5922,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3495,
29892,
2011,
1125,
13,
4706,
9995,
6644,
6646,
278,
848,
1203,
1213,
15945,
13,
4706,
1583,
29889,
3069,
353,
3495,
13,
4706,
1583,
29889,
637,
353,
2011,
13,
4706,
1583,
29889,
1272,
353,
6213,
13,
13,
1678,
822,
2767,
29898,
1311,
1125,
13,
4706,
9995,
2577,
278,
9281,
848,
515,
379,
7858,
15637,
2734,
408,
1146,
9857,
1213,
15945,
13,
4706,
1018,
29901,
13,
9651,
3957,
353,
18815,
1212,
29898,
13,
18884,
3495,
29922,
1311,
29889,
3069,
29892,
2011,
29922,
1311,
29889,
637,
29892,
11815,
29922,
23397,
29918,
15307,
12015,
29897,
13,
9651,
848,
353,
3957,
29889,
949,
29918,
497,
2141,
13808,
29898,
13,
18884,
525,
294,
18869,
2824,
29880,
17010,
877,
29989,
2824,
29878,
17010,
877,
29989,
2824,
5451,
877,
8876,
1495,
13,
9651,
1583,
29889,
1272,
353,
426,
1272,
29961,
29875,
1822,
5451,
877,
29989,
29861,
29900,
5387,
848,
29961,
29875,
29962,
13,
462,
308,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
1272,
511,
29871,
29896,
2915,
13,
4706,
5174,
15160,
5620,
3880,
2392,
29901,
13,
9651,
903,
14480,
17070,
29889,
2704,
29898,
13,
18884,
376,
29950,
7858,
15637,
338,
451,
3625,
472,
1273,
29879,
16664,
29879,
613,
1583,
29889,
3069,
29892,
1583,
29889,
637,
29897,
13,
9651,
1583,
29889,
1272,
353,
6213,
13,
2
] |
code/routines/test_all.py | oliverruoff/PiBot_v4 | 5 | 1609263 | <gh_stars>1-10
from time import sleep
def test_top_stepper_and_bottom_steppers(top_stepper, left_stepper, right_stepper):
print('Turning left stepper 360°.')
left_stepper.turn_stepper(360)
print('Turning right stepper 360°.')
right_stepper.turn_stepper(360)
print('Switching stepper directions and reversing movement.')
left_stepper.set_direction(False)
right_stepper.set_direction(False)
left_stepper.turn_stepper(360)
right_stepper.turn_stepper(360)
print('Checking continuous movement for 0.5s forward and back.')
left_stepper.run_continuously()
right_stepper.run_continuously()
sleep(0.5)
left_stepper.set_direction(True)
right_stepper.set_direction(True)
sleep(0.5)
left_stepper.stop_continuous()
right_stepper.stop_continuous()
print('Checking top stepper 360° clockwise and ccw.')
top_stepper.turn_stepper_angle(360)
top_stepper.set_direction(False)
top_stepper.turn_stepper_angle(360)
print('Done')
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
931,
1053,
8709,
13,
13,
13,
1753,
1243,
29918,
3332,
29918,
1655,
2496,
29918,
392,
29918,
8968,
29918,
1655,
22437,
29898,
3332,
29918,
1655,
2496,
29892,
2175,
29918,
1655,
2496,
29892,
1492,
29918,
1655,
2496,
1125,
13,
1678,
1596,
877,
27407,
292,
2175,
1886,
2496,
29871,
29941,
29953,
29900,
30073,
29889,
1495,
13,
1678,
2175,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29898,
29941,
29953,
29900,
29897,
13,
1678,
1596,
877,
27407,
292,
1492,
1886,
2496,
29871,
29941,
29953,
29900,
30073,
29889,
1495,
13,
1678,
1492,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29898,
29941,
29953,
29900,
29897,
13,
1678,
1596,
877,
24995,
292,
1886,
2496,
18112,
322,
18764,
292,
10298,
29889,
1495,
13,
1678,
2175,
29918,
1655,
2496,
29889,
842,
29918,
20845,
29898,
8824,
29897,
13,
1678,
1492,
29918,
1655,
2496,
29889,
842,
29918,
20845,
29898,
8824,
29897,
13,
1678,
2175,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29898,
29941,
29953,
29900,
29897,
13,
1678,
1492,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29898,
29941,
29953,
29900,
29897,
13,
1678,
1596,
877,
5596,
292,
9126,
10298,
363,
29871,
29900,
29889,
29945,
29879,
6375,
322,
1250,
29889,
1495,
13,
1678,
2175,
29918,
1655,
2496,
29889,
3389,
29918,
20621,
5794,
580,
13,
1678,
1492,
29918,
1655,
2496,
29889,
3389,
29918,
20621,
5794,
580,
13,
1678,
8709,
29898,
29900,
29889,
29945,
29897,
13,
1678,
2175,
29918,
1655,
2496,
29889,
842,
29918,
20845,
29898,
5574,
29897,
13,
1678,
1492,
29918,
1655,
2496,
29889,
842,
29918,
20845,
29898,
5574,
29897,
13,
1678,
8709,
29898,
29900,
29889,
29945,
29897,
13,
1678,
2175,
29918,
1655,
2496,
29889,
9847,
29918,
20621,
681,
580,
13,
1678,
1492,
29918,
1655,
2496,
29889,
9847,
29918,
20621,
681,
580,
13,
1678,
1596,
877,
5596,
292,
2246,
1886,
2496,
29871,
29941,
29953,
29900,
30073,
12006,
3538,
322,
21759,
29893,
29889,
1495,
13,
1678,
2246,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29918,
2521,
29898,
29941,
29953,
29900,
29897,
13,
1678,
2246,
29918,
1655,
2496,
29889,
842,
29918,
20845,
29898,
8824,
29897,
13,
1678,
2246,
29918,
1655,
2496,
29889,
685,
29918,
1655,
2496,
29918,
2521,
29898,
29941,
29953,
29900,
29897,
13,
1678,
1596,
877,
25632,
1495,
13,
2
] |
wordCount.py | I3ck/wordCount | 0 | 160063 | <filename>wordCount.py
import sys
import getopt
import operator
inputfile = ""
outputfile = ""
wordcounts = dict()
if __name__ == "__main__":
argv = sys.argv[1:]
try:
opts, args = getopt.getopt(argv,"hi:o:",["inputfile=","outputfile="])
except getopt.GetoptError:
print 'wordCount.py -i <inputfile> -o <outputfile>'
sys.exit(1)
for opt, arg in opts:
if opt == '-h':
print 'wordCount.py -i <inputfile> -o <outputfile>'
sys.exit()
elif opt in ("-i", "--ifile"):
inputfile = arg
elif opt in ("-o", "--ofile"):
outputfile = arg
if inputfile == "" or outputfile == "":
print "something went wrong, use wordCount.py -h"
sys.exit(2)
with open(inputfile) as f:
for line in f:
words = line.split()
for word in words:
containsSpecial = False
for s in word:
if not s.isalnum():
containsSpecial = True
if not containsSpecial:
if word in wordcounts:
wordcounts[word] +=1
else:
wordcounts[word] = 1
sortedcounts = sorted(wordcounts.items(), key=operator.itemgetter(1))
sortedcounts.reverse()
with open(outputfile, 'w') as f:
for item in sortedcounts:
word = item[0]
count = item[1]
f.write(str(count).zfill(4) + " * " + word + "\n")
| [
1,
529,
9507,
29958,
1742,
3981,
29889,
2272,
13,
5215,
10876,
13,
5215,
679,
3670,
13,
5215,
5455,
13,
13,
2080,
1445,
353,
5124,
13,
4905,
1445,
353,
5124,
13,
1742,
2798,
29879,
353,
9657,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
12,
19218,
353,
10876,
29889,
19218,
29961,
29896,
17531,
13,
13,
12,
2202,
29901,
13,
12,
12,
25707,
29892,
6389,
353,
679,
3670,
29889,
657,
3670,
29898,
19218,
1699,
2918,
29901,
29877,
29901,
613,
3366,
2080,
1445,
543,
1699,
4905,
1445,
543,
2314,
13,
12,
19499,
679,
3670,
29889,
2577,
3670,
2392,
29901,
13,
12,
12,
2158,
525,
1742,
3981,
29889,
2272,
448,
29875,
529,
2080,
1445,
29958,
448,
29877,
529,
4905,
1445,
16299,
13,
12,
12,
9675,
29889,
13322,
29898,
29896,
29897,
13,
12,
1454,
3523,
29892,
1852,
297,
29111,
29901,
13,
12,
12,
361,
3523,
1275,
17411,
29882,
2396,
13,
12,
12,
12,
2158,
525,
1742,
3981,
29889,
2272,
448,
29875,
529,
2080,
1445,
29958,
448,
29877,
529,
4905,
1445,
16299,
13,
12,
12,
12,
9675,
29889,
13322,
580,
13,
12,
12,
23681,
3523,
297,
4852,
29899,
29875,
613,
376,
489,
361,
488,
29908,
1125,
13,
12,
12,
12,
2080,
1445,
353,
1852,
13,
12,
12,
23681,
3523,
297,
4852,
29899,
29877,
613,
376,
489,
974,
488,
29908,
1125,
13,
12,
12,
12,
4905,
1445,
353,
1852,
13,
12,
361,
1881,
1445,
1275,
5124,
470,
1962,
1445,
1275,
376,
1115,
13,
12,
12,
2158,
376,
14481,
3512,
2743,
29892,
671,
1734,
3981,
29889,
2272,
448,
29882,
29908,
13,
12,
12,
9675,
29889,
13322,
29898,
29906,
29897,
13,
13,
13,
12,
2541,
1722,
29898,
2080,
1445,
29897,
408,
285,
29901,
13,
12,
12,
1454,
1196,
297,
285,
29901,
13,
12,
12,
12,
9303,
353,
1196,
29889,
5451,
580,
13,
12,
12,
12,
1454,
1734,
297,
3838,
29901,
13,
12,
12,
12,
12,
11516,
24780,
353,
7700,
13,
12,
12,
12,
12,
1454,
269,
297,
1734,
29901,
13,
12,
12,
12,
12,
12,
361,
451,
269,
29889,
275,
284,
1949,
7295,
13,
12,
12,
12,
12,
12,
12,
11516,
24780,
353,
5852,
13,
12,
12,
12,
12,
361,
451,
3743,
24780,
29901,
13,
12,
12,
12,
12,
12,
361,
1734,
297,
1734,
2798,
29879,
29901,
13,
12,
12,
12,
12,
12,
12,
1742,
2798,
29879,
29961,
1742,
29962,
4619,
29896,
13,
12,
12,
12,
12,
12,
2870,
29901,
13,
12,
12,
12,
12,
12,
12,
1742,
2798,
29879,
29961,
1742,
29962,
353,
29871,
29896,
13,
13,
12,
24582,
2798,
29879,
353,
12705,
29898,
1742,
2798,
29879,
29889,
7076,
3285,
1820,
29922,
6891,
29889,
667,
657,
357,
29898,
29896,
876,
13,
12,
24582,
2798,
29879,
29889,
24244,
580,
13,
13,
12,
2541,
1722,
29898,
4905,
1445,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
13,
13,
12,
12,
1454,
2944,
297,
12705,
2798,
29879,
29901,
13,
12,
12,
12,
1742,
353,
2944,
29961,
29900,
29962,
13,
12,
12,
12,
2798,
353,
2944,
29961,
29896,
29962,
13,
12,
12,
12,
29888,
29889,
3539,
29898,
710,
29898,
2798,
467,
29920,
5589,
29898,
29946,
29897,
718,
376,
334,
376,
718,
1734,
718,
6634,
29876,
1159,
13,
13,
2
] |
awx/main/tests/old/ad_hoc.py | doziya/ansible | 1 | 187933 | <reponame>doziya/ansible
# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import glob
import os
import subprocess
import tempfile
import mock
import unittest2 as unittest
# Django
from django.conf import settings
from django.core.urlresolvers import reverse
# Django-CRUM
from crum import impersonate
# AWX
from awx.main.utils import * # noqa
from awx.main.models import * # noqa
from awx.main.tests.base import BaseJobExecutionTest
from awx.main.tests.data.ssh import (
TEST_SSH_KEY_DATA,
TEST_SSH_KEY_DATA_LOCKED,
TEST_SSH_KEY_DATA_UNLOCK,
)
__all__ = ['RunAdHocCommandTest', 'AdHocCommandApiTest']
class BaseAdHocCommandTest(BaseJobExecutionTest):
'''
Common initialization for testing ad hoc commands.
'''
def setUp(self):
with ignore_inventory_computed_fields():
super(BaseAdHocCommandTest, self).setUp()
self.setup_instances()
self.setup_users()
self.organization = self.make_organizations(self.super_django_user, 1)[0]
self.organization.admin_role.members.add(self.normal_django_user)
self.inventory = self.organization.inventories.create(name='test-inventory', description='description for test-inventory')
self.host = self.inventory.hosts.create(name='host.example.com')
self.host2 = self.inventory.hosts.create(name='host2.example.com')
self.group = self.inventory.groups.create(name='test-group')
self.group2 = self.inventory.groups.create(name='test-group2')
self.group.hosts.add(self.host)
self.group2.hosts.add(self.host, self.host2)
self.inventory2 = self.organization.inventories.create(name='test-inventory2')
self.host3 = self.inventory2.hosts.create(name='host3.example.com')
self.credential = None
settings.INTERNAL_API_URL = self.live_server_url
settings.CALLBACK_CONSUMER_PORT = ''
def create_test_credential(self, **kwargs):
self.credential = self.make_credential(**kwargs)
return self.credential
@unittest.skipIf(os.environ.get('SKIP_SLOW_TESTS', False), 'Skipping slow test')
class RunAdHocCommandTest(BaseAdHocCommandTest):
'''
Test cases for RunAdHocCommand celery task.
'''
def create_test_ad_hoc_command(self, **kwargs):
with impersonate(self.super_django_user):
opts = {
'inventory': self.inventory,
'credential': self.credential,
'job_type': 'run',
'module_name': 'command',
'module_args': 'uptime',
}
opts.update(kwargs)
self.ad_hoc_command = AdHocCommand.objects.create(**opts)
return self.ad_hoc_command
def check_ad_hoc_command_events(self, ad_hoc_command, runner_status='ok',
hosts=None):
ad_hoc_command_events = ad_hoc_command.ad_hoc_command_events.all()
for ad_hoc_command_event in ad_hoc_command_events:
unicode(ad_hoc_command_event) # For test coverage.
should_be_failed = bool(runner_status not in ('ok', 'skipped'))
should_be_changed = bool(runner_status in ('ok', 'failed') and ad_hoc_command.job_type == 'run')
if hosts is not None:
host_pks = set([x.pk for x in hosts])
else:
host_pks = set(ad_hoc_command.inventory.hosts.values_list('pk', flat=True))
qs = ad_hoc_command_events.filter(event=('runner_on_%s' % runner_status))
self.assertEqual(qs.count(), len(host_pks))
for evt in qs:
self.assertTrue(evt.host_id in host_pks)
self.assertTrue(evt.host_name)
self.assertEqual(evt.failed, should_be_failed)
self.assertEqual(evt.changed, should_be_changed)
def test_run_ad_hoc_command(self):
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command, 'ok')
def test_check_mode_ad_hoc_command(self):
ad_hoc_command = self.create_test_ad_hoc_command(module_name='ping', module_args='', job_type='check')
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command, 'ok')
def test_run_ad_hoc_command_that_fails(self):
ad_hoc_command = self.create_test_ad_hoc_command(module_args='false')
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'failed')
self.check_ad_hoc_command_events(ad_hoc_command, 'failed')
def test_check_mode_where_command_would_fail(self):
ad_hoc_command = self.create_test_ad_hoc_command(job_type='check', module_args='false')
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command, 'skipped')
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('canceled', 0))
def test_cancel_ad_hoc_command(self, ignore):
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.cancel_flag)
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
ad_hoc_command.cancel_flag = True
ad_hoc_command.save(update_fields=['cancel_flag'])
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'canceled')
self.assertTrue(ad_hoc_command.cancel_flag)
# Calling cancel afterwards just returns the cancel flag.
self.assertTrue(ad_hoc_command.cancel())
# Read attribute for test coverage.
ad_hoc_command.celery_task
ad_hoc_command.celery_task_id = ''
ad_hoc_command.save(update_fields=['celery_task_id'])
self.assertEqual(ad_hoc_command.celery_task, None)
# Unable to start ad hoc command again.
self.assertFalse(ad_hoc_command.signal_start())
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_ad_hoc_command_options(self, ignore):
ad_hoc_command = self.create_test_ad_hoc_command(forks=2, verbosity=2)
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertTrue('"--forks=2"' in ad_hoc_command.job_args)
self.assertTrue('"-vv"' in ad_hoc_command.job_args)
# Test with basic become privilege escalation
ad_hoc_command2 = self.create_test_ad_hoc_command(become_enabled=True)
self.assertEqual(ad_hoc_command2.status, 'new')
self.assertFalse(ad_hoc_command2.passwords_needed_to_start)
self.assertTrue(ad_hoc_command2.signal_start())
ad_hoc_command2 = AdHocCommand.objects.get(pk=ad_hoc_command2.pk)
self.check_job_result(ad_hoc_command2, ('successful', 'failed'))
self.assertTrue('"--become"' in ad_hoc_command2.job_args)
def test_limit_option(self):
# Test limit by hostname.
ad_hoc_command = self.create_test_ad_hoc_command(limit='host.example.com')
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command, 'ok', hosts=[self.host])
self.assertTrue('"host.example.com"' in ad_hoc_command.job_args)
# Test limit by group name.
ad_hoc_command2 = self.create_test_ad_hoc_command(limit='test-group')
self.assertEqual(ad_hoc_command2.status, 'new')
self.assertFalse(ad_hoc_command2.passwords_needed_to_start)
self.assertTrue(ad_hoc_command2.signal_start())
ad_hoc_command2 = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command2, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command2, 'ok', hosts=[self.host])
# Test limit by host not in inventory.
ad_hoc_command3 = self.create_test_ad_hoc_command(limit='bad-host')
self.assertEqual(ad_hoc_command3.status, 'new')
self.assertFalse(ad_hoc_command3.passwords_needed_to_start)
self.assertTrue(ad_hoc_command3.signal_start())
ad_hoc_command3 = AdHocCommand.objects.get(pk=ad_hoc_command3.pk)
self.check_job_result(ad_hoc_command3, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command3, 'ok', hosts=[])
self.assertEqual(ad_hoc_command3.ad_hoc_command_events.count(), 0)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_ssh_username_and_password(self, ignore):
self.create_test_credential(username='sshuser', password='<PASSWORD>')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertIn('"-u"', ad_hoc_command.job_args)
self.assertIn('"--ask-pass"', ad_hoc_command.job_args)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_ssh_ask_password(self, ignore):
self.create_test_credential(password='<PASSWORD>')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertTrue(ad_hoc_command.passwords_needed_to_start)
self.assertTrue('ssh_password' in ad_hoc_command.passwords_needed_to_start)
self.assertFalse(ad_hoc_command.signal_start())
self.assertTrue(ad_hoc_command.signal_start(ssh_password='<PASSWORD>'))
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertIn('"--ask-pass"', ad_hoc_command.job_args)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_sudo_username_and_password(self, ignore):
self.create_test_credential(become_method="sudo",
become_username='sudouser',
become_password='<PASSWORD>')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, ('successful', 'failed'))
self.assertIn('"--become-method"', ad_hoc_command.job_args)
self.assertIn('"--become-user"', ad_hoc_command.job_args)
self.assertIn('"--ask-become-pass"', ad_hoc_command.job_args)
self.assertNotIn('"--become"', ad_hoc_command.job_args)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_sudo_ask_password(self, ignore):
self.create_test_credential(become_password='<PASSWORD>')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertTrue(ad_hoc_command.passwords_needed_to_start)
self.assertTrue('become_password' in ad_hoc_command.passwords_needed_to_start)
self.assertFalse(ad_hoc_command.signal_start())
self.assertTrue(ad_hoc_command.signal_start(become_password='<PASSWORD>'))
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, ('successful', 'failed'))
self.assertIn('"--ask-become-pass"', ad_hoc_command.job_args)
self.assertNotIn('"--become-user"', ad_hoc_command.job_args)
self.assertNotIn('"--become"', ad_hoc_command.job_args)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('successful', 0))
def test_unlocked_ssh_key(self, ignore):
self.create_test_credential(ssh_key_data=TEST_SSH_KEY_DATA)
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertNotIn('"--private-key=', ad_hoc_command.job_args)
self.assertIn('ssh-agent', ad_hoc_command.job_args)
def test_locked_ssh_key_with_password(self):
self.create_test_credential(ssh_key_data=TEST_SSH_KEY_DATA_LOCKED,
ssh_key_unlock=TEST_SSH_KEY_DATA_UNLOCK)
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertIn('ssh-agent', ad_hoc_command.job_args)
self.assertNotIn('Bad passphrase', ad_hoc_command.result_stdout)
def test_locked_ssh_key_with_bad_password(self):
self.create_test_credential(ssh_key_data=TEST_SSH_KEY_DATA_LOCKED,
ssh_key_unlock='not the passphrase')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'failed')
self.assertIn('ssh-agent', ad_hoc_command.job_args)
self.assertIn('Bad passphrase', ad_hoc_command.result_stdout)
def test_locked_ssh_key_ask_password(self):
self.create_test_credential(ssh_key_data=TEST_SSH_KEY_DATA_LOCKED,
ssh_key_unlock='ASK')
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertTrue(ad_hoc_command.passwords_needed_to_start)
self.assertTrue('ssh_key_unlock' in ad_hoc_command.passwords_needed_to_start)
self.assertFalse(ad_hoc_command.signal_start())
self.assertTrue(ad_hoc_command.signal_start(ssh_key_unlock='not it'))
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'failed')
self.assertTrue('ssh-agent' in ad_hoc_command.job_args)
self.assertTrue('Bad passphrase' in ad_hoc_command.result_stdout)
# Try again and pass correct password.
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertTrue(ad_hoc_command.passwords_needed_to_start)
self.assertTrue('ssh_key_unlock' in ad_hoc_command.passwords_needed_to_start)
self.assertFalse(ad_hoc_command.signal_start())
self.assertTrue(ad_hoc_command.signal_start(ssh_key_unlock=TEST_SSH_KEY_DATA_UNLOCK))
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.assertIn('ssh-agent', ad_hoc_command.job_args)
self.assertNotIn('Bad passphrase', ad_hoc_command.result_stdout)
def test_run_with_bubblewrap(self):
# Only run test if bubblewrap is installed
cmd = [getattr(settings, 'AWX_PROOT_CMD', 'bwrap'), '--version']
try:
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc.communicate()
has_bubblewrap = bool(proc.returncode == 0)
except (OSError, ValueError):
has_bubblewrap = False
if not has_bubblewrap:
self.skipTest('bubblewrap is not installed')
# Enable bubblewrap for this test.
settings.AWX_PROOT_ENABLED = True
# Hide local settings path.
settings.AWX_PROOT_HIDE_PATHS = [os.path.join(settings.BASE_DIR, 'settings')]
# Create list of paths that should not be visible to the command.
hidden_paths = [
os.path.join(settings.PROJECTS_ROOT, '*'),
os.path.join(settings.JOBOUTPUT_ROOT, '*'),
]
# Create a temp directory that should not be visible to the command.
temp_path = tempfile.mkdtemp()
self._temp_paths.append(temp_path)
hidden_paths.append(temp_path)
# Find a file in supervisor logs that should not be visible.
try:
supervisor_log_path = glob.glob('/var/log/supervisor/*')[0]
except IndexError:
supervisor_log_path = None
if supervisor_log_path:
hidden_paths.append(supervisor_log_path)
# Create and run ad hoc command.
module_args = ' && '.join(['echo %s && test ! -e %s' % (x, x) for x in hidden_paths])
ad_hoc_command = self.create_test_ad_hoc_command(module_name='shell', module_args=module_args, verbosity=2)
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'successful')
self.check_ad_hoc_command_events(ad_hoc_command, 'ok')
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', return_value=('failed', 0))
def test_run_with_bubblewrap_not_installed(self, ignore):
# Enable bubblewrap for this test, specify invalid bubblewrap cmd.
settings.AWX_PROOT_ENABLED = True
settings.AWX_PROOT_CMD = 'PR00T'
ad_hoc_command = self.create_test_ad_hoc_command()
self.assertEqual(ad_hoc_command.status, 'new')
self.assertFalse(ad_hoc_command.passwords_needed_to_start)
self.assertTrue(ad_hoc_command.signal_start())
ad_hoc_command = AdHocCommand.objects.get(pk=ad_hoc_command.pk)
self.check_job_result(ad_hoc_command, 'error', expect_traceback=True)
def run_pexpect_mock(self, *args, **kwargs):
return 'successful', 0
@unittest.skipIf(os.environ.get('SKIP_SLOW_TESTS', False), 'Skipping slow test')
class AdHocCommandApiTest(BaseAdHocCommandTest):
'''
Test API list/detail views for ad hoc commands.
'''
def setUp(self):
super(AdHocCommandApiTest, self).setUp()
self.create_test_credential(user=self.normal_django_user)
def run_test_ad_hoc_command(self, **kwargs):
# Post to list to start a new ad hoc command.
expect = kwargs.pop('expect', 201)
url = kwargs.pop('url', reverse('api:ad_hoc_command_list'))
data = {
'inventory': self.inventory.pk,
'credential': self.credential.pk,
'module_name': 'command',
'module_args': 'uptime',
}
data.update(kwargs)
for k,v in data.items():
if v is None:
del data[k]
return self.post(url, data, expect=expect)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', side_effect=run_pexpect_mock)
def test_ad_hoc_command_detail(self, ignore):
with self.current_user('admin'):
response1 = self.run_test_ad_hoc_command()
response2 = self.run_test_ad_hoc_command()
response3 = self.run_test_ad_hoc_command()
# Retrieve detail for ad hoc command. Only GET is supported.
with self.current_user('admin'):
url = reverse('api:ad_hoc_command_detail', args=(response1['id'],))
self.assertEqual(url, response1['url'])
response = self.get(url, expect=200)
self.assertEqual(response['credential'], self.credential.pk)
self.assertEqual(response['related']['credential'],
reverse('api:credential_detail', args=(self.credential.pk,)))
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['related']['inventory'],
reverse('api:inventory_detail', args=(self.inventory.pk,)))
self.assertTrue(response['related']['stdout'])
self.assertTrue(response['related']['cancel'])
self.assertTrue(response['related']['relaunch'])
self.assertTrue(response['related']['events'])
self.assertTrue(response['related']['activity_stream'])
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=204)
self.delete(url, expect=404)
with self.current_user('normal'):
url = reverse('api:ad_hoc_command_detail', args=(response2['id'],))
self.assertEqual(url, response2['url'])
response = self.get(url, expect=200)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=204)
self.delete(url, expect=404)
url = reverse('api:ad_hoc_command_detail', args=(response3['id'],))
self.assertEqual(url, response3['url'])
with self.current_user('other'):
response = self.get(url, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=403)
with self.current_user('nobody'):
response = self.get(url, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=403)
with self.current_user(None):
response = self.get(url, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Verify that the credential and inventory are null when they have
# been deleted, can delete an ad hoc command without inventory or
# credential.
self.credential.delete()
self.inventory.delete()
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['credential'], None)
self.assertEqual(response['inventory'], None)
self.delete(url, expect=204)
self.delete(url, expect=404)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', side_effect=run_pexpect_mock)
def test_ad_hoc_command_cancel(self, ignore):
# Override setting so that ad hoc command isn't actually started.
with self.settings(CELERY_UNIT_TEST=False):
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
# Retrieve the cancel URL, should indicate it can be canceled.
url = reverse('api:ad_hoc_command_cancel', args=(response['id'],))
self.assertEqual(url, response['related']['cancel'])
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['can_cancel'], True)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['can_cancel'], True)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Cancel ad hoc command (before it starts) and verify the can_cancel
# flag is False and attempts to cancel again fail.
with self.current_user('normal'):
self.post(url, {}, expect=202)
response = self.get(url, expect=200)
self.assertEqual(response['can_cancel'], False)
self.post(url, {}, expect=403)
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['can_cancel'], False)
self.post(url, {}, expect=405)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', side_effect=run_pexpect_mock)
def test_ad_hoc_command_relaunch(self, ignore):
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
# Retrieve the relaunch URL, should indicate no passwords are needed
# and it can be relaunched. Relaunch and fetch the new command.
url = reverse('api:ad_hoc_command_relaunch', args=(response['id'],))
self.assertEqual(url, response['related']['relaunch'])
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['passwords_needed_to_start'], [])
response = self.post(url, {}, expect=201)
self.assertTrue(response['ad_hoc_command'])
self.get(response['url'], expect=200)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['passwords_needed_to_start'], [])
response = self.post(url, {}, expect=201)
self.assertTrue(response['ad_hoc_command'])
self.get(response['url'], expect=200)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Try to relaunch ad hoc command when module has been removed from
# allowed list of modules.
try:
ad_hoc_commands = settings.AD_HOC_COMMANDS
settings.AD_HOC_COMMANDS = []
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['passwords_needed_to_start'], [])
response = self.post(url, {}, expect=400)
finally:
settings.AD_HOC_COMMANDS = ad_hoc_commands
# Try to relaunch after the inventory has been marked inactive.
self.inventory.delete()
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['passwords_needed_to_start'], [])
response = self.post(url, {}, expect=400)
# Try to relaunch with expired license.
with self.current_user('admin'):
response = self.run_test_ad_hoc_command(inventory=self.inventory2.pk)
self.create_expired_license_file()
with self.current_user('admin'):
self.post(response['related']['relaunch'], {}, expect=403)
def test_ad_hoc_command_events_list(self):
# TODO: Create test events instead of relying on playbooks execution
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
response = self.run_test_ad_hoc_command()
# Check list of ad hoc command events for a specific ad hoc command.
ad_hoc_command_id = response['id']
url = reverse('api:ad_hoc_command_ad_hoc_command_events_list', args=(ad_hoc_command_id,))
self.assertEqual(url, response['related']['events'])
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], self.inventory.hosts.count())
for result in response['results']:
self.assertEqual(result['ad_hoc_command'], ad_hoc_command_id)
self.assertTrue(result['id'])
self.assertTrue(result['url'])
self.assertEqual(result['event'], 'runner_on_ok')
self.assertFalse(result['failed'])
self.assertTrue(result['changed'])
self.assertTrue(result['host'] in set(self.inventory.hosts.values_list('pk', flat=True)))
self.assertTrue(result['host_name'] in set(self.inventory.hosts.values_list('name', flat=True)))
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], self.inventory.hosts.count())
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Test top level ad hoc command events list.
url = reverse('api:ad_hoc_command_event_list')
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 2 * self.inventory.hosts.count())
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 2 * self.inventory.hosts.count())
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 0)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 0)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
def test_ad_hoc_command_event_detail(self):
# TODO: Mock pexpect. Create test events instead of relying on playbooks execution
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
# Check ad hoc command event detail view.
ad_hoc_command_event_ids = AdHocCommandEvent.objects.values_list('pk', flat=True)
with self.current_user('admin'):
for ahce_id in ad_hoc_command_event_ids:
url = reverse('api:ad_hoc_command_event_detail', args=(ahce_id,))
response = self.get(url, expect=200)
self.assertTrue(response['ad_hoc_command'])
self.assertEqual(response['id'], ahce_id)
self.assertEqual(response['url'], url)
self.assertEqual(response['event'], 'runner_on_ok')
self.assertFalse(response['failed'])
self.assertTrue(response['changed'])
self.assertTrue(response['host'] in set(self.inventory.hosts.values_list('pk', flat=True)))
self.assertTrue(response['host_name'] in set(self.inventory.hosts.values_list('name', flat=True)))
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
for ahce_id in ad_hoc_command_event_ids:
url = reverse('api:ad_hoc_command_event_detail', args=(ahce_id,))
self.get(url, expect=200)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
for ahce_id in ad_hoc_command_event_ids:
url = reverse('api:ad_hoc_command_event_detail', args=(ahce_id,))
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
for ahce_id in ad_hoc_command_event_ids:
url = reverse('api:ad_hoc_command_event_detail', args=(ahce_id,))
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
for ahce_id in ad_hoc_command_event_ids:
url = reverse('api:ad_hoc_command_event_detail', args=(ahce_id,))
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
@mock.patch('awx.main.tasks.BaseTask.run_pexpect', side_effect=run_pexpect_mock)
def test_ad_hoc_command_activity_stream(self, ignore):
# TODO: Test non-enterprise license
self.create_test_license_file()
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
# Check activity stream for ad hoc command. There should only be one
# entry when it was created; other changes made while running should
# not show up.
url = reverse('api:ad_hoc_command_activity_stream_list', args=(response['id'],))
self.assertEqual(url, response['related']['activity_stream'])
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 1)
result = response['results'][0]
self.assertTrue(result['id'])
self.assertTrue(result['url'])
self.assertEqual(result['operation'], 'create')
self.assertTrue(result['changes'])
self.assertTrue(result['timestamp'])
self.assertEqual(result['object1'], 'ad_hoc_command')
self.assertEqual(result['object2'], '')
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 1)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
def test_host_ad_hoc_commands_list(self):
# TODO: Figure out why this test needs pexpect
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
response = self.run_test_ad_hoc_command(limit=self.host2.name)
# Test the ad hoc commands list for a host. Should only return the ad
# hoc command(s) run against that host. Posting should start a new ad
# hoc command and always set the inventory and limit based on URL.
url = reverse('api:host_ad_hoc_commands_list', args=(self.host.pk,))
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 1)
response = self.run_test_ad_hoc_command(url=url, inventory=None, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.host.name)
response = self.run_test_ad_hoc_command(url=url, inventory=self.inventory2.pk, limit=self.host2.name, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.host.name)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 3)
response = self.run_test_ad_hoc_command(url=url, inventory=None, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.host.name)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Try to run with expired license.
self.create_expired_license_file()
with self.current_user('admin'):
self.run_test_ad_hoc_command(url=url, expect=403)
with self.current_user('normal'):
self.run_test_ad_hoc_command(url=url, expect=403)
def test_group_ad_hoc_commands_list(self):
# TODO: Figure out why this test needs pexpect
with self.current_user('admin'):
response = self.run_test_ad_hoc_command() # self.host + self.host2
response = self.run_test_ad_hoc_command(limit=self.group.name) # self.host
response = self.run_test_ad_hoc_command(limit=self.host2.name) # self.host2
# Test the ad hoc commands list for a group. Should return the ad
# hoc command(s) run against any hosts in that group. Posting should
# start a new ad hoc command and always set the inventory and limit
# based on URL.
url = reverse('api:group_ad_hoc_commands_list', args=(self.group.pk,)) # only self.host
url2 = reverse('api:group_ad_hoc_commands_list', args=(self.group2.pk,)) # self.host + self.host2
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 2)
response = self.get(url2, expect=200)
self.assertEqual(response['count'], 3)
response = self.run_test_ad_hoc_command(url=url, inventory=None, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.group.name)
response = self.run_test_ad_hoc_command(url=url, inventory=self.inventory2.pk, limit=self.group2.name, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.group.name)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 4)
response = self.run_test_ad_hoc_command(url=url, inventory=None, expect=201)
self.assertEqual(response['inventory'], self.inventory.pk)
self.assertEqual(response['limit'], self.group.name)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=403)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
# Try to run with expired license.
self.create_expired_license_file()
with self.current_user('admin'):
self.run_test_ad_hoc_command(url=url, expect=403)
with self.current_user('normal'):
self.run_test_ad_hoc_command(url=url, expect=403)
def test_host_ad_hoc_command_events_list(self):
# TODO: Mock run_pexpect. Create test events instead of relying on playbooks execution
with self.current_user('admin'):
response = self.run_test_ad_hoc_command()
# Test the ad hoc command events list for a host. Should return the
# events only for that particular host.
url = reverse('api:host_ad_hoc_command_events_list', args=(self.host.pk,))
with self.current_user('admin'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 1)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('normal'):
response = self.get(url, expect=200)
self.assertEqual(response['count'], 1)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('other'):
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user('nobody'):
self.get(url, expect=403)
self.post(url, {}, expect=405)
self.put(url, {}, expect=405)
self.patch(url, {}, expect=405)
self.delete(url, expect=405)
with self.current_user(None):
self.get(url, expect=401)
self.post(url, {}, expect=401)
self.put(url, {}, expect=401)
self.patch(url, {}, expect=401)
self.delete(url, expect=401)
| [
1,
529,
276,
1112,
420,
29958,
1867,
2526,
3761,
29914,
550,
1821,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
530,
1687,
29892,
9266,
29889,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
13,
29937,
5132,
13,
5215,
13149,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
5215,
5694,
1445,
13,
5215,
11187,
13,
5215,
443,
27958,
29906,
408,
443,
27958,
13,
13,
13,
29937,
15337,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
3221,
29889,
2271,
9778,
874,
1053,
11837,
13,
13,
29937,
15337,
29899,
11341,
5005,
13,
3166,
2181,
398,
1053,
2411,
1330,
403,
13,
13,
29937,
319,
29956,
29990,
13,
3166,
3773,
29916,
29889,
3396,
29889,
13239,
1053,
334,
396,
694,
25621,
13,
3166,
3773,
29916,
29889,
3396,
29889,
9794,
1053,
334,
396,
694,
25621,
13,
3166,
3773,
29916,
29889,
3396,
29889,
21150,
29889,
3188,
1053,
7399,
11947,
20418,
3057,
13,
3166,
3773,
29916,
29889,
3396,
29889,
21150,
29889,
1272,
29889,
15269,
1053,
313,
13,
1678,
17067,
1254,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29892,
13,
1678,
17067,
1254,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
21339,
3352,
29892,
13,
1678,
17067,
1254,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
3904,
21339,
29892,
13,
29897,
13,
13,
1649,
497,
1649,
353,
6024,
6558,
3253,
29950,
542,
6255,
3057,
742,
525,
3253,
29950,
542,
6255,
11713,
3057,
2033,
13,
13,
13,
1990,
7399,
3253,
29950,
542,
6255,
3057,
29898,
5160,
11947,
20418,
3057,
1125,
13,
1678,
14550,
13,
1678,
13103,
17865,
363,
6724,
594,
298,
542,
8260,
29889,
13,
1678,
14550,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
411,
11455,
29918,
262,
23886,
29918,
12097,
287,
29918,
9621,
7295,
13,
9651,
2428,
29898,
5160,
3253,
29950,
542,
6255,
3057,
29892,
1583,
467,
842,
3373,
580,
13,
9651,
1583,
29889,
14669,
29918,
2611,
2925,
580,
13,
9651,
1583,
29889,
14669,
29918,
7193,
580,
13,
9651,
1583,
29889,
6388,
2133,
353,
1583,
29889,
5675,
29918,
6388,
17063,
29898,
1311,
29889,
9136,
29918,
14095,
29918,
1792,
29892,
29871,
29896,
9601,
29900,
29962,
13,
9651,
1583,
29889,
6388,
2133,
29889,
6406,
29918,
12154,
29889,
28109,
29889,
1202,
29898,
1311,
29889,
8945,
29918,
14095,
29918,
1792,
29897,
13,
9651,
1583,
29889,
262,
23886,
353,
1583,
29889,
6388,
2133,
29889,
262,
794,
3842,
29889,
3258,
29898,
978,
2433,
1688,
29899,
262,
23886,
742,
6139,
2433,
8216,
363,
1243,
29899,
262,
23886,
1495,
13,
9651,
1583,
29889,
3069,
353,
1583,
29889,
262,
23886,
29889,
23525,
29889,
3258,
29898,
978,
2433,
3069,
29889,
4773,
29889,
510,
1495,
13,
9651,
1583,
29889,
3069,
29906,
353,
1583,
29889,
262,
23886,
29889,
23525,
29889,
3258,
29898,
978,
2433,
3069,
29906,
29889,
4773,
29889,
510,
1495,
13,
9651,
1583,
29889,
2972,
353,
1583,
29889,
262,
23886,
29889,
13155,
29889,
3258,
29898,
978,
2433,
1688,
29899,
2972,
1495,
13,
9651,
1583,
29889,
2972,
29906,
353,
1583,
29889,
262,
23886,
29889,
13155,
29889,
3258,
29898,
978,
2433,
1688,
29899,
2972,
29906,
1495,
13,
9651,
1583,
29889,
2972,
29889,
23525,
29889,
1202,
29898,
1311,
29889,
3069,
29897,
13,
9651,
1583,
29889,
2972,
29906,
29889,
23525,
29889,
1202,
29898,
1311,
29889,
3069,
29892,
1583,
29889,
3069,
29906,
29897,
13,
9651,
1583,
29889,
262,
23886,
29906,
353,
1583,
29889,
6388,
2133,
29889,
262,
794,
3842,
29889,
3258,
29898,
978,
2433,
1688,
29899,
262,
23886,
29906,
1495,
13,
9651,
1583,
29889,
3069,
29941,
353,
1583,
29889,
262,
23886,
29906,
29889,
23525,
29889,
3258,
29898,
978,
2433,
3069,
29941,
29889,
4773,
29889,
510,
1495,
13,
9651,
1583,
29889,
11944,
2556,
353,
6213,
13,
9651,
6055,
29889,
23845,
29940,
1964,
29918,
8787,
29918,
4219,
353,
1583,
29889,
9258,
29918,
2974,
29918,
2271,
13,
9651,
6055,
29889,
29907,
9818,
29933,
11375,
29918,
6007,
25021,
1001,
29918,
15082,
353,
6629,
13,
13,
1678,
822,
1653,
29918,
1688,
29918,
11944,
2556,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
1583,
29889,
11944,
2556,
353,
1583,
29889,
5675,
29918,
11944,
2556,
29898,
1068,
19290,
29897,
13,
4706,
736,
1583,
29889,
11944,
2556,
13,
13,
13,
29992,
348,
27958,
29889,
11014,
3644,
29898,
359,
29889,
21813,
29889,
657,
877,
16033,
5690,
29918,
29903,
27998,
29918,
18267,
29903,
742,
7700,
511,
525,
29903,
1984,
3262,
5232,
1243,
1495,
13,
1990,
7525,
3253,
29950,
542,
6255,
3057,
29898,
5160,
3253,
29950,
542,
6255,
3057,
1125,
13,
1678,
14550,
13,
1678,
4321,
4251,
363,
7525,
3253,
29950,
542,
6255,
6432,
708,
3414,
29889,
13,
1678,
14550,
13,
13,
1678,
822,
1653,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
411,
2411,
1330,
403,
29898,
1311,
29889,
9136,
29918,
14095,
29918,
1792,
1125,
13,
9651,
29111,
353,
426,
13,
18884,
525,
262,
23886,
2396,
1583,
29889,
262,
23886,
29892,
13,
18884,
525,
11944,
2556,
2396,
1583,
29889,
11944,
2556,
29892,
13,
18884,
525,
9057,
29918,
1853,
2396,
525,
3389,
742,
13,
18884,
525,
5453,
29918,
978,
2396,
525,
6519,
742,
13,
18884,
525,
5453,
29918,
5085,
2396,
525,
21245,
603,
742,
13,
9651,
500,
13,
9651,
29111,
29889,
5504,
29898,
19290,
29897,
13,
9651,
1583,
29889,
328,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
3258,
29898,
1068,
25707,
29897,
13,
4706,
736,
1583,
29889,
328,
29918,
29882,
542,
29918,
6519,
13,
13,
1678,
822,
1423,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
1311,
29892,
594,
29918,
29882,
542,
29918,
6519,
29892,
28877,
29918,
4882,
2433,
554,
742,
13,
462,
462,
1678,
18982,
29922,
8516,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29918,
13604,
353,
594,
29918,
29882,
542,
29918,
6519,
29889,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29889,
497,
580,
13,
4706,
363,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29901,
13,
9651,
29104,
29898,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29897,
29871,
396,
1152,
1243,
23746,
29889,
13,
4706,
881,
29918,
915,
29918,
26061,
353,
6120,
29898,
27492,
29918,
4882,
451,
297,
6702,
554,
742,
525,
2574,
2986,
8785,
13,
4706,
881,
29918,
915,
29918,
15033,
353,
6120,
29898,
27492,
29918,
4882,
297,
6702,
554,
742,
525,
26061,
1495,
322,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
1853,
1275,
525,
3389,
1495,
13,
4706,
565,
18982,
338,
451,
6213,
29901,
13,
9651,
3495,
29918,
29886,
2039,
353,
731,
4197,
29916,
29889,
20571,
363,
921,
297,
18982,
2314,
13,
4706,
1683,
29901,
13,
9651,
3495,
29918,
29886,
2039,
353,
731,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
262,
23886,
29889,
23525,
29889,
5975,
29918,
1761,
877,
20571,
742,
12151,
29922,
5574,
876,
13,
4706,
3855,
29879,
353,
594,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29889,
4572,
29898,
3696,
29922,
877,
27492,
29918,
265,
29918,
29995,
29879,
29915,
1273,
28877,
29918,
4882,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29939,
29879,
29889,
2798,
3285,
7431,
29898,
3069,
29918,
29886,
2039,
876,
13,
4706,
363,
3415,
29873,
297,
3855,
29879,
29901,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5750,
29873,
29889,
3069,
29918,
333,
297,
3495,
29918,
29886,
2039,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5750,
29873,
29889,
3069,
29918,
978,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5750,
29873,
29889,
26061,
29892,
881,
29918,
915,
29918,
26061,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5750,
29873,
29889,
15033,
29892,
881,
29918,
915,
29918,
15033,
29897,
13,
13,
1678,
822,
1243,
29918,
3389,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
1311,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
554,
1495,
13,
13,
1678,
822,
1243,
29918,
3198,
29918,
8513,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
1311,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
5453,
29918,
978,
2433,
15702,
742,
3883,
29918,
5085,
2433,
742,
4982,
29918,
1853,
2433,
3198,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
554,
1495,
13,
13,
1678,
822,
1243,
29918,
3389,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
5747,
29918,
29888,
2234,
29898,
1311,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
5453,
29918,
5085,
2433,
4541,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
26061,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
26061,
1495,
13,
13,
1678,
822,
1243,
29918,
3198,
29918,
8513,
29918,
3062,
29918,
6519,
29918,
29893,
483,
29918,
14057,
29898,
1311,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
9057,
29918,
1853,
2433,
3198,
742,
3883,
29918,
5085,
2433,
4541,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
2574,
2986,
1495,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
29883,
749,
839,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
20713,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
1311,
29892,
11455,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
20713,
29918,
15581,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29889,
20713,
29918,
15581,
353,
5852,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29889,
7620,
29898,
5504,
29918,
9621,
29922,
1839,
20713,
29918,
15581,
11287,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
29883,
749,
839,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
20713,
29918,
15581,
29897,
13,
4706,
396,
8251,
292,
12611,
12335,
925,
3639,
278,
12611,
7353,
29889,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
20713,
3101,
13,
4706,
396,
7523,
5352,
363,
1243,
23746,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29889,
2242,
708,
29918,
7662,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29889,
2242,
708,
29918,
7662,
29918,
333,
353,
6629,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29889,
7620,
29898,
5504,
29918,
9621,
29922,
1839,
2242,
708,
29918,
7662,
29918,
333,
11287,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
2242,
708,
29918,
7662,
29892,
6213,
29897,
13,
4706,
396,
20065,
304,
1369,
594,
298,
542,
1899,
1449,
29889,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
6768,
29898,
1311,
29892,
11455,
1125,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
29888,
548,
29879,
29922,
29906,
29892,
9750,
359,
537,
29922,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
5574,
877,
29908,
489,
29888,
548,
29879,
29922,
29906,
29908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
29908,
29899,
29894,
29894,
29908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
396,
4321,
411,
6996,
4953,
14828,
479,
831,
1052,
362,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29906,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
915,
2763,
29918,
17590,
29922,
5574,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29906,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29892,
6702,
8698,
1319,
742,
525,
26061,
8785,
13,
4706,
1583,
29889,
9294,
5574,
877,
29908,
489,
915,
2763,
29908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29906,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
822,
1243,
29918,
13400,
29918,
3385,
29898,
1311,
1125,
13,
4706,
396,
4321,
4046,
491,
3495,
978,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
2433,
3069,
29889,
4773,
29889,
510,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
554,
742,
18982,
11759,
1311,
29889,
3069,
2314,
13,
4706,
1583,
29889,
9294,
5574,
877,
29908,
3069,
29889,
4773,
29889,
510,
29908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
396,
4321,
4046,
491,
2318,
1024,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29906,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
2433,
1688,
29899,
2972,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29906,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29906,
29892,
525,
554,
742,
18982,
11759,
1311,
29889,
3069,
2314,
13,
4706,
396,
4321,
4046,
491,
3495,
451,
297,
11817,
706,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29941,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
2433,
12313,
29899,
3069,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29941,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29941,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29892,
525,
554,
742,
18982,
11759,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29941,
29889,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29889,
2798,
3285,
29871,
29900,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
15269,
29918,
6786,
29918,
392,
29918,
5630,
29898,
1311,
29892,
11455,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
6786,
2433,
15269,
1792,
742,
4800,
2433,
29966,
25711,
17013,
29958,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
29899,
29884,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
1278,
29899,
3364,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
15269,
29918,
1278,
29918,
5630,
29898,
1311,
29892,
11455,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
5630,
2433,
29966,
25711,
17013,
29958,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
15269,
29918,
5630,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
29898,
15269,
29918,
5630,
2433,
29966,
25711,
17013,
29958,
8785,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
1278,
29899,
3364,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
15360,
29918,
6786,
29918,
392,
29918,
5630,
29898,
1311,
29892,
11455,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
915,
2763,
29918,
5696,
543,
15360,
613,
13,
462,
462,
1678,
4953,
29918,
6786,
2433,
29879,
566,
283,
643,
742,
13,
462,
462,
1678,
4953,
29918,
5630,
2433,
29966,
25711,
17013,
29958,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
6702,
8698,
1319,
742,
525,
26061,
8785,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
915,
2763,
29899,
5696,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
915,
2763,
29899,
1792,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
1278,
29899,
915,
2763,
29899,
3364,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
29908,
489,
915,
2763,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
15360,
29918,
1278,
29918,
5630,
29898,
1311,
29892,
11455,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
915,
2763,
29918,
5630,
2433,
29966,
25711,
17013,
29958,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
915,
2763,
29918,
5630,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
29898,
915,
2763,
29918,
5630,
2433,
29966,
25711,
17013,
29958,
8785,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
6702,
8698,
1319,
742,
525,
26061,
8785,
13,
4706,
1583,
29889,
9294,
797,
877,
29908,
489,
1278,
29899,
915,
2763,
29899,
3364,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
29908,
489,
915,
2763,
29899,
1792,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
29908,
489,
915,
2763,
29908,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
8698,
1319,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
348,
29113,
29918,
15269,
29918,
1989,
29898,
1311,
29892,
11455,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
15269,
29918,
1989,
29918,
1272,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29897,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
29908,
489,
9053,
29899,
1989,
29922,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
797,
877,
15269,
29899,
14748,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
13,
1678,
822,
1243,
29918,
29113,
29918,
15269,
29918,
1989,
29918,
2541,
29918,
5630,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
15269,
29918,
1989,
29918,
1272,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
21339,
3352,
29892,
13,
462,
462,
1678,
13927,
29918,
1989,
29918,
348,
908,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
3904,
21339,
29897,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
797,
877,
15269,
29899,
14748,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
22050,
1209,
24588,
559,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
2914,
29918,
25393,
29897,
13,
13,
1678,
822,
1243,
29918,
29113,
29918,
15269,
29918,
1989,
29918,
2541,
29918,
12313,
29918,
5630,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
15269,
29918,
1989,
29918,
1272,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
21339,
3352,
29892,
13,
462,
462,
1678,
13927,
29918,
1989,
29918,
348,
908,
2433,
1333,
278,
1209,
24588,
559,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
26061,
1495,
13,
4706,
1583,
29889,
9294,
797,
877,
15269,
29899,
14748,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
797,
877,
22050,
1209,
24588,
559,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
2914,
29918,
25393,
29897,
13,
13,
1678,
822,
1243,
29918,
29113,
29918,
15269,
29918,
1989,
29918,
1278,
29918,
5630,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
15269,
29918,
1989,
29918,
1272,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
21339,
3352,
29892,
13,
462,
462,
1678,
13927,
29918,
1989,
29918,
348,
908,
2433,
3289,
29968,
1495,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
15269,
29918,
1989,
29918,
348,
908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
29898,
15269,
29918,
1989,
29918,
348,
908,
2433,
1333,
372,
8785,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
26061,
1495,
13,
4706,
1583,
29889,
9294,
5574,
877,
15269,
29899,
14748,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
22050,
1209,
24588,
559,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
2914,
29918,
25393,
29897,
13,
4706,
396,
3967,
1449,
322,
1209,
1959,
4800,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
877,
15269,
29918,
1989,
29918,
348,
908,
29915,
297,
594,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
29898,
15269,
29918,
1989,
29918,
348,
908,
29922,
18267,
29918,
1799,
29950,
29918,
10818,
29918,
14573,
29918,
3904,
21339,
876,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
9294,
797,
877,
15269,
29899,
14748,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
9057,
29918,
5085,
29897,
13,
4706,
1583,
29889,
9294,
3664,
797,
877,
22050,
1209,
24588,
559,
742,
594,
29918,
29882,
542,
29918,
6519,
29889,
2914,
29918,
25393,
29897,
13,
13,
1678,
822,
1243,
29918,
3389,
29918,
2541,
29918,
29890,
23232,
6312,
29898,
1311,
1125,
13,
4706,
396,
9333,
1065,
1243,
565,
289,
23232,
6312,
338,
5130,
13,
4706,
9920,
353,
518,
657,
5552,
29898,
11027,
29892,
525,
29376,
29990,
29918,
8618,
2891,
29918,
29907,
5773,
742,
525,
29890,
6312,
5477,
525,
489,
3259,
2033,
13,
4706,
1018,
29901,
13,
9651,
9580,
353,
1014,
5014,
29889,
29925,
3150,
29898,
9006,
29892,
27591,
29922,
1491,
5014,
29889,
2227,
4162,
29892,
13,
462,
462,
1678,
380,
20405,
29922,
1491,
5014,
29889,
2227,
4162,
29897,
13,
9651,
9580,
29889,
27820,
403,
580,
13,
9651,
756,
29918,
29890,
23232,
6312,
353,
6120,
29898,
15439,
29889,
2457,
401,
1275,
29871,
29900,
29897,
13,
4706,
5174,
313,
29949,
29173,
29892,
7865,
2392,
1125,
13,
9651,
756,
29918,
29890,
23232,
6312,
353,
7700,
13,
4706,
565,
451,
756,
29918,
29890,
23232,
6312,
29901,
13,
9651,
1583,
29889,
11014,
3057,
877,
29890,
23232,
6312,
338,
451,
5130,
1495,
13,
4706,
396,
1174,
519,
289,
23232,
6312,
363,
445,
1243,
29889,
13,
4706,
6055,
29889,
29376,
29990,
29918,
8618,
2891,
29918,
1430,
6181,
29928,
353,
5852,
13,
4706,
396,
379,
680,
1887,
6055,
2224,
29889,
13,
4706,
6055,
29889,
29376,
29990,
29918,
8618,
2891,
29918,
29950,
22027,
29918,
10145,
29903,
353,
518,
359,
29889,
2084,
29889,
7122,
29898,
11027,
29889,
25416,
29918,
9464,
29892,
525,
11027,
1495,
29962,
13,
4706,
396,
6204,
1051,
310,
10898,
393,
881,
451,
367,
7962,
304,
278,
1899,
29889,
13,
4706,
7934,
29918,
24772,
353,
518,
13,
9651,
2897,
29889,
2084,
29889,
7122,
29898,
11027,
29889,
8618,
17637,
29903,
29918,
21289,
29892,
525,
29930,
5477,
13,
9651,
2897,
29889,
2084,
29889,
7122,
29898,
11027,
29889,
29967,
29949,
8456,
2692,
12336,
29918,
21289,
29892,
525,
29930,
5477,
13,
4706,
4514,
13,
4706,
396,
6204,
263,
5694,
3884,
393,
881,
451,
367,
7962,
304,
278,
1899,
29889,
13,
4706,
5694,
29918,
2084,
353,
5694,
1445,
29889,
11256,
29881,
7382,
580,
13,
4706,
1583,
3032,
7382,
29918,
24772,
29889,
4397,
29898,
7382,
29918,
2084,
29897,
13,
4706,
7934,
29918,
24772,
29889,
4397,
29898,
7382,
29918,
2084,
29897,
13,
4706,
396,
10987,
263,
934,
297,
2428,
19188,
10748,
393,
881,
451,
367,
7962,
29889,
13,
4706,
1018,
29901,
13,
9651,
2428,
19188,
29918,
1188,
29918,
2084,
353,
13149,
29889,
23705,
11219,
1707,
29914,
1188,
29914,
9136,
19188,
5515,
29861,
29900,
29962,
13,
4706,
5174,
11374,
2392,
29901,
13,
9651,
2428,
19188,
29918,
1188,
29918,
2084,
353,
6213,
13,
4706,
565,
2428,
19188,
29918,
1188,
29918,
2084,
29901,
13,
9651,
7934,
29918,
24772,
29889,
4397,
29898,
9136,
19188,
29918,
1188,
29918,
2084,
29897,
13,
4706,
396,
6204,
322,
1065,
594,
298,
542,
1899,
29889,
13,
4706,
3883,
29918,
5085,
353,
525,
2607,
15300,
7122,
18959,
8057,
1273,
29879,
2607,
1243,
1738,
448,
29872,
1273,
29879,
29915,
1273,
313,
29916,
29892,
921,
29897,
363,
921,
297,
7934,
29918,
24772,
2314,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
5453,
29918,
978,
2433,
15903,
742,
3883,
29918,
5085,
29922,
5453,
29918,
5085,
29892,
9750,
359,
537,
29922,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
8698,
1319,
1495,
13,
4706,
1583,
29889,
3198,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
554,
1495,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
736,
29918,
1767,
29922,
877,
26061,
742,
29871,
29900,
876,
13,
1678,
822,
1243,
29918,
3389,
29918,
2541,
29918,
29890,
23232,
6312,
29918,
1333,
29918,
25537,
29898,
1311,
29892,
11455,
1125,
13,
4706,
396,
1174,
519,
289,
23232,
6312,
363,
445,
1243,
29892,
6084,
8340,
289,
23232,
6312,
9920,
29889,
13,
4706,
6055,
29889,
29376,
29990,
29918,
8618,
2891,
29918,
1430,
6181,
29928,
353,
5852,
13,
4706,
6055,
29889,
29376,
29990,
29918,
8618,
2891,
29918,
29907,
5773,
353,
525,
10593,
29900,
29900,
29911,
29915,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
1583,
29889,
3258,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
4882,
29892,
525,
1482,
1495,
13,
4706,
1583,
29889,
9294,
8824,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
328,
29918,
29882,
542,
29918,
6519,
29889,
25436,
29918,
2962,
3101,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
353,
2087,
29950,
542,
6255,
29889,
12650,
29889,
657,
29898,
20571,
29922,
328,
29918,
29882,
542,
29918,
6519,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3198,
29918,
9057,
29918,
2914,
29898,
328,
29918,
29882,
542,
29918,
6519,
29892,
525,
2704,
742,
2149,
29918,
15003,
1627,
29922,
5574,
29897,
13,
13,
13,
1753,
1065,
29918,
412,
29916,
1103,
29918,
17640,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
1678,
736,
525,
8698,
1319,
742,
29871,
29900,
13,
13,
13,
29992,
348,
27958,
29889,
11014,
3644,
29898,
359,
29889,
21813,
29889,
657,
877,
16033,
5690,
29918,
29903,
27998,
29918,
18267,
29903,
742,
7700,
511,
525,
29903,
1984,
3262,
5232,
1243,
1495,
13,
1990,
2087,
29950,
542,
6255,
11713,
3057,
29898,
5160,
3253,
29950,
542,
6255,
3057,
1125,
13,
1678,
14550,
13,
1678,
4321,
3450,
1051,
29914,
16432,
8386,
363,
594,
298,
542,
8260,
29889,
13,
1678,
14550,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
3253,
29950,
542,
6255,
11713,
3057,
29892,
1583,
467,
842,
3373,
580,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
11944,
2556,
29898,
1792,
29922,
1311,
29889,
8945,
29918,
14095,
29918,
1792,
29897,
13,
13,
1678,
822,
1065,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
396,
4918,
304,
1051,
304,
1369,
263,
716,
594,
298,
542,
1899,
29889,
13,
4706,
2149,
353,
9049,
5085,
29889,
7323,
877,
17854,
742,
29871,
29906,
29900,
29896,
29897,
13,
4706,
3142,
353,
9049,
5085,
29889,
7323,
877,
2271,
742,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
1761,
8785,
13,
4706,
848,
353,
426,
13,
9651,
525,
262,
23886,
2396,
1583,
29889,
262,
23886,
29889,
20571,
29892,
13,
9651,
525,
11944,
2556,
2396,
1583,
29889,
11944,
2556,
29889,
20571,
29892,
13,
9651,
525,
5453,
29918,
978,
2396,
525,
6519,
742,
13,
9651,
525,
5453,
29918,
5085,
2396,
525,
21245,
603,
742,
13,
4706,
500,
13,
4706,
848,
29889,
5504,
29898,
19290,
29897,
13,
4706,
363,
413,
29892,
29894,
297,
848,
29889,
7076,
7295,
13,
9651,
565,
325,
338,
6213,
29901,
13,
18884,
628,
848,
29961,
29895,
29962,
13,
4706,
736,
1583,
29889,
2490,
29898,
2271,
29892,
848,
29892,
2149,
29922,
17854,
29897,
13,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
2625,
29918,
15987,
29922,
3389,
29918,
412,
29916,
1103,
29918,
17640,
29897,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
16432,
29898,
1311,
29892,
11455,
1125,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
29896,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
9651,
2933,
29906,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
9651,
2933,
29941,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
4649,
29878,
2418,
9493,
363,
594,
298,
542,
1899,
29889,
29871,
9333,
12354,
338,
6969,
29889,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
16432,
742,
6389,
7607,
5327,
29896,
1839,
333,
7464,
876,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
29896,
1839,
2271,
11287,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
11944,
2556,
7464,
1583,
29889,
11944,
2556,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
12817,
16215,
11944,
2556,
7464,
13,
462,
632,
11837,
877,
2754,
29901,
11944,
2556,
29918,
16432,
742,
6389,
7607,
1311,
29889,
11944,
2556,
29889,
20571,
29892,
4961,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
12817,
16215,
262,
23886,
7464,
13,
462,
632,
11837,
877,
2754,
29901,
262,
23886,
29918,
16432,
742,
6389,
7607,
1311,
29889,
262,
23886,
29889,
20571,
29892,
4961,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
12817,
16215,
25393,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
12817,
16215,
20713,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
12817,
16215,
276,
15343,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
12817,
16215,
13604,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
12817,
16215,
10072,
29918,
5461,
11287,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29946,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29946,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
16432,
742,
6389,
7607,
5327,
29906,
1839,
333,
7464,
876,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
29906,
1839,
2271,
11287,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29946,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29946,
29897,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
16432,
742,
6389,
7607,
5327,
29941,
1839,
333,
7464,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
29941,
1839,
2271,
11287,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
1798,
1598,
393,
278,
6625,
2556,
322,
11817,
706,
526,
1870,
746,
896,
505,
13,
4706,
396,
1063,
11132,
29892,
508,
5217,
385,
594,
298,
542,
1899,
1728,
11817,
706,
470,
13,
4706,
396,
6625,
2556,
29889,
13,
4706,
1583,
29889,
11944,
2556,
29889,
8143,
580,
13,
4706,
1583,
29889,
262,
23886,
29889,
8143,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
11944,
2556,
7464,
6213,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
6213,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29946,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29946,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
2625,
29918,
15987,
29922,
3389,
29918,
412,
29916,
1103,
29918,
17640,
29897,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
20713,
29898,
1311,
29892,
11455,
1125,
13,
4706,
396,
6811,
2426,
4444,
577,
393,
594,
298,
542,
1899,
3508,
29915,
29873,
2869,
4687,
29889,
13,
4706,
411,
1583,
29889,
11027,
29898,
4741,
29931,
24422,
29918,
3904,
1806,
29918,
18267,
29922,
8824,
1125,
13,
9651,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
18884,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
4649,
29878,
2418,
278,
12611,
3988,
29892,
881,
12266,
372,
508,
367,
508,
346,
839,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
20713,
742,
6389,
7607,
5327,
1839,
333,
7464,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
1839,
12817,
16215,
20713,
11287,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
3068,
29918,
20713,
7464,
5852,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
3068,
29918,
20713,
7464,
5852,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
1815,
2242,
594,
298,
542,
1899,
313,
11083,
372,
8665,
29897,
322,
11539,
278,
508,
29918,
20713,
13,
4706,
396,
7353,
338,
7700,
322,
14734,
304,
12611,
1449,
4418,
29889,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29906,
29900,
29906,
29897,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
3068,
29918,
20713,
7464,
7700,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
3068,
29918,
20713,
7464,
7700,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
2625,
29918,
15987,
29922,
3389,
29918,
412,
29916,
1103,
29918,
17640,
29897,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
276,
15343,
29898,
1311,
29892,
11455,
1125,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
4649,
29878,
2418,
278,
10208,
3322,
3988,
29892,
881,
12266,
694,
27630,
526,
4312,
13,
4706,
396,
322,
372,
508,
367,
10208,
3322,
287,
29889,
29871,
390,
3100,
3322,
322,
6699,
278,
716,
1899,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
276,
15343,
742,
6389,
7607,
5327,
1839,
333,
7464,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
1839,
12817,
16215,
276,
15343,
11287,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
7464,
518,
2314,
13,
9651,
2933,
353,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
328,
29918,
29882,
542,
29918,
6519,
11287,
13,
9651,
1583,
29889,
657,
29898,
5327,
1839,
2271,
7464,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
7464,
518,
2314,
13,
9651,
2933,
353,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
328,
29918,
29882,
542,
29918,
6519,
11287,
13,
9651,
1583,
29889,
657,
29898,
5327,
1839,
2271,
7464,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
3967,
304,
10208,
3322,
594,
298,
542,
1899,
746,
3883,
756,
1063,
6206,
515,
13,
4706,
396,
6068,
1051,
310,
10585,
29889,
13,
4706,
1018,
29901,
13,
9651,
594,
29918,
29882,
542,
29918,
26381,
353,
6055,
29889,
3035,
29918,
8187,
29907,
29918,
19795,
1529,
2797,
29903,
13,
9651,
6055,
29889,
3035,
29918,
8187,
29907,
29918,
19795,
1529,
2797,
29903,
353,
5159,
13,
9651,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
18884,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
18884,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
7464,
518,
2314,
13,
18884,
2933,
353,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29900,
29897,
13,
4706,
7146,
29901,
13,
9651,
6055,
29889,
3035,
29918,
8187,
29907,
29918,
19795,
1529,
2797,
29903,
353,
594,
29918,
29882,
542,
29918,
26381,
13,
13,
4706,
396,
3967,
304,
10208,
3322,
1156,
278,
11817,
706,
756,
1063,
10902,
297,
4925,
29889,
13,
4706,
1583,
29889,
262,
23886,
29889,
8143,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
5630,
29879,
29918,
484,
19226,
29918,
517,
29918,
2962,
7464,
518,
2314,
13,
9651,
2933,
353,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29900,
29897,
13,
13,
4706,
396,
3967,
304,
10208,
3322,
411,
1518,
2859,
19405,
29889,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
262,
23886,
29922,
1311,
29889,
262,
23886,
29906,
29889,
20571,
29897,
13,
4706,
1583,
29889,
3258,
29918,
4548,
2859,
29918,
506,
1947,
29918,
1445,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
1583,
29889,
2490,
29898,
5327,
1839,
12817,
16215,
276,
15343,
7464,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29918,
1761,
29898,
1311,
1125,
13,
4706,
396,
14402,
29901,
6204,
1243,
4959,
2012,
310,
337,
5890,
373,
1708,
12733,
8225,
13,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
5399,
1051,
310,
594,
298,
542,
1899,
4959,
363,
263,
2702,
594,
298,
542,
1899,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29918,
333,
353,
2933,
1839,
333,
2033,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29918,
1761,
742,
6389,
7607,
328,
29918,
29882,
542,
29918,
6519,
29918,
333,
29892,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
1839,
12817,
16215,
13604,
11287,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
1583,
29889,
262,
23886,
29889,
23525,
29889,
2798,
3101,
13,
9651,
363,
1121,
297,
2933,
1839,
9902,
2033,
29901,
13,
18884,
1583,
29889,
9294,
9843,
29898,
2914,
1839,
328,
29918,
29882,
542,
29918,
6519,
7464,
594,
29918,
29882,
542,
29918,
6519,
29918,
333,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
333,
11287,
13,
18884,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
2271,
11287,
13,
18884,
1583,
29889,
9294,
9843,
29898,
2914,
1839,
3696,
7464,
525,
27492,
29918,
265,
29918,
554,
1495,
13,
18884,
1583,
29889,
9294,
8824,
29898,
2914,
1839,
26061,
11287,
13,
18884,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
15033,
11287,
13,
18884,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
3069,
2033,
297,
731,
29898,
1311,
29889,
262,
23886,
29889,
23525,
29889,
5975,
29918,
1761,
877,
20571,
742,
12151,
29922,
5574,
4961,
13,
18884,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
3069,
29918,
978,
2033,
297,
731,
29898,
1311,
29889,
262,
23886,
29889,
23525,
29889,
5975,
29918,
1761,
877,
978,
742,
12151,
29922,
5574,
4961,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
1583,
29889,
262,
23886,
29889,
23525,
29889,
2798,
3101,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
4321,
2246,
3233,
594,
298,
542,
1899,
4959,
1051,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
1761,
1495,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29906,
334,
1583,
29889,
262,
23886,
29889,
23525,
29889,
2798,
3101,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29906,
334,
1583,
29889,
262,
23886,
29889,
23525,
29889,
2798,
3101,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29900,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29900,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
29898,
1311,
1125,
13,
4706,
396,
14402,
29901,
26297,
282,
17854,
29889,
6204,
1243,
4959,
2012,
310,
337,
5890,
373,
1708,
12733,
8225,
13,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
5399,
594,
298,
542,
1899,
1741,
9493,
1776,
29889,
13,
4706,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
353,
2087,
29950,
542,
6255,
2624,
29889,
12650,
29889,
5975,
29918,
1761,
877,
20571,
742,
12151,
29922,
5574,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
363,
21023,
346,
29918,
333,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
29901,
13,
18884,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
742,
6389,
7607,
801,
346,
29918,
333,
29892,
876,
13,
18884,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
18884,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
328,
29918,
29882,
542,
29918,
6519,
11287,
13,
18884,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
333,
7464,
21023,
346,
29918,
333,
29897,
13,
18884,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2271,
7464,
3142,
29897,
13,
18884,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
3696,
7464,
525,
27492,
29918,
265,
29918,
554,
1495,
13,
18884,
1583,
29889,
9294,
8824,
29898,
5327,
1839,
26061,
11287,
13,
18884,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
15033,
11287,
13,
18884,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
3069,
2033,
297,
731,
29898,
1311,
29889,
262,
23886,
29889,
23525,
29889,
5975,
29918,
1761,
877,
20571,
742,
12151,
29922,
5574,
4961,
13,
18884,
1583,
29889,
9294,
5574,
29898,
5327,
1839,
3069,
29918,
978,
2033,
297,
731,
29898,
1311,
29889,
262,
23886,
29889,
23525,
29889,
5975,
29918,
1761,
877,
978,
742,
12151,
29922,
5574,
4961,
13,
18884,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
363,
21023,
346,
29918,
333,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
29901,
13,
18884,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
742,
6389,
7607,
801,
346,
29918,
333,
29892,
876,
13,
18884,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
18884,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
363,
21023,
346,
29918,
333,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
29901,
13,
18884,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
742,
6389,
7607,
801,
346,
29918,
333,
29892,
876,
13,
18884,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
18884,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
363,
21023,
346,
29918,
333,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
29901,
13,
18884,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
742,
6389,
7607,
801,
346,
29918,
333,
29892,
876,
13,
18884,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
18884,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
18884,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
363,
21023,
346,
29918,
333,
297,
594,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
4841,
29901,
13,
18884,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
3696,
29918,
16432,
742,
6389,
7607,
801,
346,
29918,
333,
29892,
876,
13,
18884,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
18884,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
18884,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
18884,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
18884,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
1450,
29916,
29889,
3396,
29889,
20673,
29889,
5160,
5398,
29889,
3389,
29918,
412,
29916,
1103,
742,
2625,
29918,
15987,
29922,
3389,
29918,
412,
29916,
1103,
29918,
17640,
29897,
13,
1678,
822,
1243,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
10072,
29918,
5461,
29898,
1311,
29892,
11455,
1125,
13,
4706,
396,
14402,
29901,
4321,
1661,
29899,
5893,
7734,
19405,
13,
4706,
1583,
29889,
3258,
29918,
1688,
29918,
506,
1947,
29918,
1445,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
5399,
6354,
4840,
363,
594,
298,
542,
1899,
29889,
29871,
1670,
881,
871,
367,
697,
13,
4706,
396,
6251,
746,
372,
471,
2825,
29936,
916,
3620,
1754,
1550,
2734,
881,
13,
4706,
396,
451,
1510,
701,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
328,
29918,
29882,
542,
29918,
6519,
29918,
10072,
29918,
5461,
29918,
1761,
742,
6389,
7607,
5327,
1839,
333,
7464,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2271,
29892,
2933,
1839,
12817,
16215,
10072,
29918,
5461,
11287,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29896,
29897,
13,
9651,
1121,
353,
2933,
1839,
9902,
2033,
29961,
29900,
29962,
13,
9651,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
333,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
2271,
11287,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2914,
1839,
16453,
7464,
525,
3258,
1495,
13,
9651,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
25990,
11287,
13,
9651,
1583,
29889,
9294,
5574,
29898,
2914,
1839,
16394,
11287,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2914,
1839,
3318,
29896,
7464,
525,
328,
29918,
29882,
542,
29918,
6519,
1495,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2914,
1839,
3318,
29906,
7464,
27255,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
13,
1678,
822,
1243,
29918,
3069,
29918,
328,
29918,
29882,
542,
29918,
26381,
29918,
1761,
29898,
1311,
1125,
13,
4706,
396,
14402,
29901,
11479,
714,
2020,
445,
1243,
4225,
282,
17854,
13,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
29922,
1311,
29889,
3069,
29906,
29889,
978,
29897,
13,
13,
4706,
396,
4321,
278,
594,
298,
542,
8260,
1051,
363,
263,
3495,
29889,
29871,
10575,
871,
736,
278,
594,
13,
4706,
396,
298,
542,
1899,
29898,
29879,
29897,
1065,
2750,
393,
3495,
29889,
29871,
4918,
292,
881,
1369,
263,
716,
594,
13,
4706,
396,
298,
542,
1899,
322,
2337,
731,
278,
11817,
706,
322,
4046,
2729,
373,
3988,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
3069,
29918,
328,
29918,
29882,
542,
29918,
26381,
29918,
1761,
742,
6389,
7607,
1311,
29889,
3069,
29889,
20571,
29892,
876,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29896,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
8516,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
3069,
29889,
978,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
1311,
29889,
262,
23886,
29906,
29889,
20571,
29892,
4046,
29922,
1311,
29889,
3069,
29906,
29889,
978,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
3069,
29889,
978,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29941,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
8516,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
3069,
29889,
978,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
3967,
304,
1065,
411,
1518,
2859,
19405,
29889,
13,
4706,
1583,
29889,
3258,
29918,
4548,
2859,
29918,
506,
1947,
29918,
1445,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
2972,
29918,
328,
29918,
29882,
542,
29918,
26381,
29918,
1761,
29898,
1311,
1125,
13,
4706,
396,
14402,
29901,
11479,
714,
2020,
445,
1243,
4225,
282,
17854,
13,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
396,
1583,
29889,
3069,
718,
1583,
29889,
3069,
29906,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
29922,
1311,
29889,
2972,
29889,
978,
29897,
396,
1583,
29889,
3069,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
13400,
29922,
1311,
29889,
3069,
29906,
29889,
978,
29897,
396,
1583,
29889,
3069,
29906,
13,
13,
4706,
396,
4321,
278,
594,
298,
542,
8260,
1051,
363,
263,
2318,
29889,
29871,
10575,
736,
278,
594,
13,
4706,
396,
298,
542,
1899,
29898,
29879,
29897,
1065,
2750,
738,
18982,
297,
393,
2318,
29889,
29871,
4918,
292,
881,
13,
4706,
396,
1369,
263,
716,
594,
298,
542,
1899,
322,
2337,
731,
278,
11817,
706,
322,
4046,
13,
4706,
396,
2729,
373,
3988,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
2972,
29918,
328,
29918,
29882,
542,
29918,
26381,
29918,
1761,
742,
6389,
7607,
1311,
29889,
2972,
29889,
20571,
29892,
876,
396,
871,
1583,
29889,
3069,
13,
4706,
3142,
29906,
353,
11837,
877,
2754,
29901,
2972,
29918,
328,
29918,
29882,
542,
29918,
26381,
29918,
1761,
742,
6389,
7607,
1311,
29889,
2972,
29906,
29889,
20571,
29892,
876,
396,
1583,
29889,
3069,
718,
1583,
29889,
3069,
29906,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29906,
29897,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29906,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29941,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
8516,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
2972,
29889,
978,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
1311,
29889,
262,
23886,
29906,
29889,
20571,
29892,
4046,
29922,
1311,
29889,
2972,
29906,
29889,
978,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
2972,
29889,
978,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29946,
29897,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
11817,
706,
29922,
8516,
29892,
2149,
29922,
29906,
29900,
29896,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
262,
23886,
7464,
1583,
29889,
262,
23886,
29889,
20571,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
13400,
7464,
1583,
29889,
2972,
29889,
978,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
13,
4706,
396,
3967,
304,
1065,
411,
1518,
2859,
19405,
29889,
13,
4706,
1583,
29889,
3258,
29918,
4548,
2859,
29918,
506,
1947,
29918,
1445,
580,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
29898,
2271,
29922,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
3069,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29918,
1761,
29898,
1311,
1125,
13,
4706,
396,
14402,
29901,
26297,
1065,
29918,
412,
29916,
1103,
29889,
6204,
1243,
4959,
2012,
310,
337,
5890,
373,
1708,
12733,
8225,
13,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
3389,
29918,
1688,
29918,
328,
29918,
29882,
542,
29918,
6519,
580,
13,
13,
4706,
396,
4321,
278,
594,
298,
542,
1899,
4959,
1051,
363,
263,
3495,
29889,
29871,
10575,
736,
278,
13,
4706,
396,
4959,
871,
363,
393,
3153,
3495,
29889,
13,
4706,
3142,
353,
11837,
877,
2754,
29901,
3069,
29918,
328,
29918,
29882,
542,
29918,
6519,
29918,
13604,
29918,
1761,
742,
6389,
7607,
1311,
29889,
3069,
29889,
20571,
29892,
876,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
6406,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
8945,
29374,
13,
9651,
2933,
353,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29906,
29900,
29900,
29897,
13,
9651,
1583,
29889,
9294,
9843,
29898,
5327,
1839,
2798,
7464,
29871,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
1228,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
877,
29876,
711,
1486,
29374,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29941,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29945,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29945,
29897,
13,
4706,
411,
1583,
29889,
3784,
29918,
1792,
29898,
8516,
1125,
13,
9651,
1583,
29889,
657,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
2490,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
649,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
5041,
29898,
2271,
29892,
24335,
2149,
29922,
29946,
29900,
29896,
29897,
13,
9651,
1583,
29889,
8143,
29898,
2271,
29892,
2149,
29922,
29946,
29900,
29896,
29897,
13,
2
] |
services/prefect/flows/update_api_view.py | MattSidor/can-scrapers | 7 | 71216 | <filename>services/prefect/flows/update_api_view.py
from contextlib import closing
from datetime import timedelta
import os
import pathlib
from prefect import triggers
import pandas as pd
import prefect
import sqlalchemy as sa
from prefect import Flow, task
from prefect.schedules import CronSchedule
from prefect.tasks.secrets import EnvVarSecret
from prefect.tasks.shell import ShellTask
DATA_PATH = pathlib.Path(os.environ["DATAPATH"]) / "final"
CSV_FN = DATA_PATH / "can_scrape_api_covid_us.csv"
DATA_PATH.mkdir(parents=True, exist_ok=True)
FN_STR = "can_scrape_api_covid_us{}"
@task(max_retries=3, retry_delay=timedelta(minutes=1))
def export_to_csv(connstr: str):
db = sa.create_engine(connstr)
with open(CSV_FN, "w") as f:
with closing(db.raw_connection()) as conn:
with closing(conn.cursor()) as cur:
cur.copy_expert(
"COPY (SELECT * From covid_us) TO STDOUT CSV HEADER;", f
)
return True
@task(
max_retries=3,
retry_delay=timedelta(minutes=1),
nout=2,
trigger=triggers.all_finished,
)
def create_parquet(_success):
ts = prefect.context.scheduled_start_time
dt_str = pd.to_datetime(ts).strftime("%Y-%m-%dT%H")
vintage_fn = FN_STR.format(dt_str) + ".parquet"
fn = FN_STR.format("") + ".parquet"
df = pd.read_csv(CSV_FN, parse_dates=["dt"])
df.to_parquet(DATA_PATH / vintage_fn, index=False)
df.to_parquet(DATA_PATH / fn, index=False)
return vintage_fn, fn
@task
def get_gcs_cmd(fn):
return f"gsutil acl ch -u AllUsers:R gs://can-scrape-outputs/final/{fn}"
shell = ShellTask()
with Flow("UpdateParquetFiles", CronSchedule("10 */2 * * *")) as f:
connstr = EnvVarSecret("COVID_DB_CONN_URI")
success = export_to_csv(connstr)
vintage_fn, fn = create_parquet(success)
shell(get_gcs_cmd(vintage_fn))
shell(get_gcs_cmd(fn))
f.register(project_name="can-scrape")
| [
1,
529,
9507,
29958,
9916,
29914,
29886,
999,
522,
29914,
1731,
29879,
29914,
5504,
29918,
2754,
29918,
1493,
29889,
2272,
13,
3166,
3030,
1982,
1053,
14382,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
5215,
2897,
13,
5215,
2224,
1982,
13,
3166,
758,
3647,
1053,
23660,
13,
5215,
11701,
408,
10518,
13,
5215,
758,
3647,
13,
5215,
4576,
284,
305,
6764,
408,
872,
13,
3166,
758,
3647,
1053,
22787,
29892,
3414,
13,
3166,
758,
3647,
29889,
816,
287,
2540,
1053,
315,
1617,
4504,
11272,
13,
3166,
758,
3647,
29889,
20673,
29889,
344,
1037,
1372,
1053,
1174,
29894,
9037,
28459,
13,
3166,
758,
3647,
29889,
20673,
29889,
15903,
1053,
1383,
514,
5398,
13,
13,
14573,
29918,
10145,
353,
2224,
1982,
29889,
2605,
29898,
359,
29889,
21813,
3366,
25832,
3301,
7534,
20068,
847,
376,
8394,
29908,
13,
29907,
7597,
29918,
29943,
29940,
353,
360,
8254,
29918,
10145,
847,
376,
3068,
29918,
1557,
336,
412,
29918,
2754,
29918,
24542,
333,
29918,
375,
29889,
7638,
29908,
13,
14573,
29918,
10145,
29889,
11256,
3972,
29898,
862,
1237,
29922,
5574,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
29943,
29940,
29918,
10810,
353,
376,
3068,
29918,
1557,
336,
412,
29918,
2754,
29918,
24542,
333,
29918,
375,
29912,
5038,
13,
13,
13,
29992,
7662,
29898,
3317,
29918,
2267,
2722,
29922,
29941,
29892,
337,
2202,
29918,
18829,
29922,
9346,
287,
2554,
29898,
1195,
2667,
29922,
29896,
876,
13,
1753,
5609,
29918,
517,
29918,
7638,
29898,
13082,
710,
29901,
851,
1125,
13,
1678,
4833,
353,
872,
29889,
3258,
29918,
10599,
29898,
13082,
710,
29897,
13,
1678,
411,
1722,
29898,
29907,
7597,
29918,
29943,
29940,
29892,
376,
29893,
1159,
408,
285,
29901,
13,
4706,
411,
14382,
29898,
2585,
29889,
1610,
29918,
9965,
3101,
408,
11009,
29901,
13,
9651,
411,
14382,
29898,
13082,
29889,
18127,
3101,
408,
3151,
29901,
13,
18884,
3151,
29889,
8552,
29918,
735,
10700,
29898,
13,
462,
1678,
376,
3217,
20055,
313,
6404,
334,
3645,
18838,
333,
29918,
375,
29897,
7495,
6850,
3970,
2692,
16874,
17714,
3035,
1001,
29936,
613,
285,
13,
18884,
1723,
13,
13,
1678,
736,
5852,
13,
13,
13,
29992,
7662,
29898,
13,
1678,
4236,
29918,
2267,
2722,
29922,
29941,
29892,
13,
1678,
337,
2202,
29918,
18829,
29922,
9346,
287,
2554,
29898,
1195,
2667,
29922,
29896,
511,
13,
1678,
302,
449,
29922,
29906,
29892,
13,
1678,
7135,
29922,
509,
335,
5743,
29889,
497,
29918,
4951,
3276,
29892,
13,
29897,
13,
1753,
1653,
29918,
862,
12621,
7373,
8698,
1125,
13,
1678,
18696,
353,
758,
3647,
29889,
4703,
29889,
816,
14989,
29918,
2962,
29918,
2230,
13,
1678,
11636,
29918,
710,
353,
10518,
29889,
517,
29918,
12673,
29898,
1372,
467,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
29911,
29995,
29950,
1159,
13,
1678,
325,
524,
482,
29918,
9144,
353,
383,
29940,
29918,
10810,
29889,
4830,
29898,
6008,
29918,
710,
29897,
718,
11393,
862,
12621,
29908,
13,
1678,
7876,
353,
383,
29940,
29918,
10810,
29889,
4830,
703,
1159,
718,
11393,
862,
12621,
29908,
13,
13,
1678,
4489,
353,
10518,
29889,
949,
29918,
7638,
29898,
29907,
7597,
29918,
29943,
29940,
29892,
6088,
29918,
15190,
29922,
3366,
6008,
20068,
13,
1678,
4489,
29889,
517,
29918,
862,
12621,
29898,
14573,
29918,
10145,
847,
325,
524,
482,
29918,
9144,
29892,
2380,
29922,
8824,
29897,
13,
1678,
4489,
29889,
517,
29918,
862,
12621,
29898,
14573,
29918,
10145,
847,
7876,
29892,
2380,
29922,
8824,
29897,
13,
1678,
736,
325,
524,
482,
29918,
9144,
29892,
7876,
13,
13,
13,
29992,
7662,
13,
1753,
679,
29918,
29887,
2395,
29918,
9006,
29898,
9144,
1125,
13,
1678,
736,
285,
29908,
3174,
4422,
263,
695,
521,
448,
29884,
2178,
5959,
29901,
29934,
330,
29879,
597,
3068,
29899,
1557,
336,
412,
29899,
4905,
29879,
29914,
8394,
19248,
9144,
5038,
13,
13,
13,
15903,
353,
1383,
514,
5398,
580,
13,
2541,
22787,
703,
6422,
2177,
12621,
10547,
613,
315,
1617,
4504,
11272,
703,
29896,
29900,
3776,
29906,
334,
334,
334,
5783,
408,
285,
29901,
13,
1678,
11009,
710,
353,
1174,
29894,
9037,
28459,
703,
3217,
13044,
29918,
4051,
29918,
6007,
29940,
29918,
15551,
1159,
13,
1678,
2551,
353,
5609,
29918,
517,
29918,
7638,
29898,
13082,
710,
29897,
13,
1678,
325,
524,
482,
29918,
9144,
29892,
7876,
353,
1653,
29918,
862,
12621,
29898,
8698,
29897,
13,
1678,
6473,
29898,
657,
29918,
29887,
2395,
29918,
9006,
29898,
29894,
524,
482,
29918,
9144,
876,
13,
1678,
6473,
29898,
657,
29918,
29887,
2395,
29918,
9006,
29898,
9144,
876,
13,
13,
29888,
29889,
9573,
29898,
4836,
29918,
978,
543,
3068,
29899,
1557,
336,
412,
1159,
13,
2
] |
day_1/7_sum.py | waskitaTREK/python_bim_engineer | 1 | 181273 | <gh_stars>1-10
numbers = [1,2,3,4,5,6,7,11]
res = 0
for num in numbers:
res = res + num
print("with sum: ",sum(numbers))
print("without sum: ",res) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
20326,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29896,
29896,
29962,
13,
13,
690,
353,
29871,
29900,
13,
13,
1454,
954,
297,
3694,
29901,
13,
1678,
620,
353,
620,
718,
954,
13,
13,
2158,
703,
2541,
2533,
29901,
9162,
2083,
29898,
20326,
876,
13,
2158,
703,
14037,
2533,
29901,
9162,
690,
29897,
2
] |
ocs_ci/deployment/multicluster_deployment.py | sagareavdhoot82gmailcom/ocs-ci | 0 | 185170 | import os
import logging
from ocs_ci.deployment.deployment import Deployment
from ocs_ci.framework import config
from ocs_ci.ocs.exceptions import ACMClusterDeployException, ACMClusterDestroyException
from ocs_ci.ocs.ui import acm_ui
from ocs_ci.ocs.utils import get_non_acm_cluster_config
from ocs_ci.ocs.acm import acm
from ocs_ci.ocs import constants
logger = logging.getLogger(__name__)
class OCPDeployWithACM(Deployment):
"""
When we instantiate this class, the assumption is we already have
an OCP cluster with ACM installed and current context is ACM
"""
def __init__(self):
"""
When we init Deployment class it will have all the
ACM cluster's context
"""
super().__init__()
self.multicluster_mode = config.MULTICLUSTER.get("multicluster_mode", None)
# Used for housekeeping during multiple OCP cluster deployments
self.deployment_cluster_list = list()
# Whether to start deployment in asynchronous mode or synchronous mode
# In async deploy mode, we will have a single wait method waiting for
# all the cluster deployments to finish
self.deploy_sync_mode = config.MULTICLUSTER.get("deploy_sync_mode", "async")
self.ui_driver = None
self.factory = acm_ui.ACMOCPDeploymentFactory()
def do_deploy_ocp(self, log_cli_level="INFO"):
"""
This function overrides the parent's function in order accomodate
ACM based OCP cluster deployments
"""
if config.ENV_DATA["skip_ocp_deployment"]:
logger.warning(
"Skipping OCP deployment through ACM because skip_ocp_deployment "
"has been specified"
)
return
if self.multicluster_mode == constants.RDR_MODE:
self.do_rdr_acm_ocp_deploy()
self.post_deploy_ops()
def post_deploy_ops(self):
"""
1. Install ingress certificates on OCP clusters deployed through ACM
2. Run post_ocp_deploy on OCP clusters
"""
prev = config.cur_index
for cluster in get_non_acm_cluster_config():
config.switch_ctx(cluster.MULTICLUSTER["multicluster_index"])
ssl_key = config.DEPLOYMENT.get("ingress_ssl_key")
ssl_cert = config.DEPLOYMENT.get("ingress_ssl_cert")
for key in [ssl_key, ssl_cert]:
if os.path.exists(key):
os.unlink(key)
logger.info("Running post ocp deploy ops")
self.post_ocp_deploy()
config.switch_ctx(prev)
def do_rdr_acm_ocp_deploy(self):
"""
Specific to regional DR OCP cluster deployments
"""
self.ui_driver = acm.login_to_acm()
if self.deploy_sync_mode == "async":
rdr_clusters = get_non_acm_cluster_config()
for c in rdr_clusters:
logger.info(f"{c.ENV_DATA['cluster_name']}")
logger.info(f"{c.ENV_DATA['platform']}")
logger.info(f"{c.ENV_DATA['deployment_type']}")
for cluster_conf in rdr_clusters:
deployer = self.factory.get_platform_instance(
self.ui_driver, cluster_conf
)
deployer.create_cluster_prereq()
deployer.create_cluster()
self.deployment_cluster_list.append(deployer)
# At this point deployment of all non-acm ocp clusters have been
# triggered, we need to wait for all of them to succeed
self.wait_for_all_clusters_async()
# Download kubeconfig to the respective directories
for cluster in self.deployment_cluster_list:
cluster.download_cluster_conf_files()
def wait_for_all_clusters_async(self):
# We will say done only when none of the clusters are in
# 'Creating' state. Either they have to be in 'Ready' state
# OR 'Failed' state
done_waiting = False
while not done_waiting:
done_waiting = True
for cluster in self.deployment_cluster_list:
if cluster.deployment_status not in ["ready", "failed"]:
cluster.get_deployment_status()
done_waiting = False
# We will fail even if one of the clusters failed to deploy
failed_list = list()
success_list = list()
for cluster in self.deployment_cluster_list:
if cluster.deployment_status == "failed":
failed_list.append(cluster)
else:
success_list.append(cluster)
if success_list:
logger.info("Deployment for following clusters Passed")
logger.info(f"{[c.cluster_name for c in success_list]}")
if failed_list:
logger.error("Deployment failed for following clusters")
logger.error(f"{[c.cluster_name for c in failed_list]}")
raise ACMClusterDeployException("one or more Cluster Deployment failed ")
def deploy_cluster(self, log_cli_level="INFO"):
"""
We deploy new OCP clusters using ACM
Note: Importing cluster through ACM has been implemented as part
of Jenkins pipeline
"""
super().deploy_cluster(log_cli_level=log_cli_level)
def destroy_cluster(self, log_cli_level=None):
"""
Teardown OCP clusters deployed through ACM
"""
self.ui_driver = acm.login_to_acm()
cluster_list = list()
rdr_clusters = get_non_acm_cluster_config()
logger.info("Following ACM deployed OCP clusters will be destroyed")
for cluster in rdr_clusters:
logger.info(
f"[{cluster.ENV_DATA['cluster_name']}"
f"{cluster.ENV_DATA['platform']}_"
f"{cluster.ENV_DATA['deployment_type']}]"
)
for cluster_conf in rdr_clusters:
destroyer = self.factory.get_platform_instance(self.ui_driver, cluster_conf)
destroyer.destroy_cluster()
cluster_list.append(destroyer)
self.wait_for_all_cluster_async_destroy(cluster_list)
self.post_destroy_ops(cluster_list)
def wait_for_all_cluster_async_destroy(self, destroy_cluster_list):
# Wait until all the clusters are in 'Done' or 'Failed state
destroyed_clusters = list()
failed_clusters = list()
done_waiting = False
while not done_waiting:
done_waiting = True
for cluster in destroy_cluster_list:
if cluster.destroy_status not in ["Done", "Failed"]:
cluster.get_destroy_status()
done_waiting = False
for cluster in destroy_cluster_list:
if cluster.destroy_status == "Done":
destroyed_clusters.append(cluster)
else:
failed_clusters.append(cluster)
if destroyed_clusters:
logger.info(
f"Destroyed clusters: {[c.cluster_name for c in destroyed_clusters]}"
)
if failed_clusters:
raise ACMClusterDestroyException(
f"Failed to destroy clusters:{[c.cluster_name for c in failed_clusters]} "
)
def post_destroy_ops(self, cluster_list):
"""
Post destroy ops mainly includes ip clean up and dns cleanup
Args:
cluster_list (list[ACMOCPClusterDeploy]): list of platform specific instances
"""
for cluster in cluster_list:
cluster.post_destroy_ops()
| [
1,
1053,
2897,
13,
13,
5215,
12183,
13,
13,
3166,
288,
2395,
29918,
455,
29889,
16519,
358,
29889,
16519,
358,
1053,
10034,
22812,
13,
3166,
288,
2395,
29918,
455,
29889,
4468,
1053,
2295,
13,
3166,
288,
2395,
29918,
455,
29889,
12332,
29889,
11739,
29879,
1053,
14614,
29924,
6821,
5402,
8498,
2376,
2451,
29892,
14614,
29924,
6821,
5402,
14994,
4727,
2451,
13,
3166,
288,
2395,
29918,
455,
29889,
12332,
29889,
1481,
1053,
1274,
29885,
29918,
1481,
13,
3166,
288,
2395,
29918,
455,
29889,
12332,
29889,
13239,
1053,
679,
29918,
5464,
29918,
562,
29885,
29918,
19594,
29918,
2917,
13,
3166,
288,
2395,
29918,
455,
29889,
12332,
29889,
562,
29885,
1053,
1274,
29885,
13,
3166,
288,
2395,
29918,
455,
29889,
12332,
1053,
17727,
13,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
438,
6271,
8498,
2376,
3047,
2477,
29924,
29898,
8498,
22812,
1125,
13,
1678,
9995,
13,
1678,
1932,
591,
25112,
445,
770,
29892,
278,
11833,
338,
591,
2307,
505,
13,
1678,
385,
438,
6271,
9867,
411,
14614,
29924,
5130,
322,
1857,
3030,
338,
14614,
29924,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
9995,
13,
4706,
1932,
591,
2069,
10034,
22812,
770,
372,
674,
505,
599,
278,
13,
4706,
14614,
29924,
9867,
29915,
29879,
3030,
13,
4706,
9995,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
4713,
293,
29880,
5402,
29918,
8513,
353,
2295,
29889,
29924,
8647,
2965,
29931,
17321,
1001,
29889,
657,
703,
4713,
293,
29880,
5402,
29918,
8513,
613,
6213,
29897,
13,
4706,
396,
501,
8485,
363,
3699,
17462,
292,
2645,
2999,
438,
6271,
9867,
7246,
1860,
13,
4706,
1583,
29889,
16519,
358,
29918,
19594,
29918,
1761,
353,
1051,
580,
13,
4706,
396,
26460,
304,
1369,
18209,
297,
20489,
4464,
470,
12231,
681,
4464,
13,
4706,
396,
512,
7465,
7246,
4464,
29892,
591,
674,
505,
263,
2323,
4480,
1158,
10534,
363,
13,
4706,
396,
599,
278,
9867,
7246,
1860,
304,
8341,
13,
4706,
1583,
29889,
16519,
29918,
16593,
29918,
8513,
353,
2295,
29889,
29924,
8647,
2965,
29931,
17321,
1001,
29889,
657,
703,
16519,
29918,
16593,
29918,
8513,
613,
376,
12674,
1159,
13,
4706,
1583,
29889,
1481,
29918,
9465,
353,
6213,
13,
4706,
1583,
29889,
14399,
353,
1274,
29885,
29918,
1481,
29889,
2477,
6720,
6271,
8498,
22812,
5126,
580,
13,
13,
1678,
822,
437,
29918,
16519,
29918,
542,
29886,
29898,
1311,
29892,
1480,
29918,
11303,
29918,
5563,
543,
11690,
29908,
1125,
13,
4706,
9995,
13,
4706,
910,
740,
975,
24040,
278,
3847,
29915,
29879,
740,
297,
1797,
7954,
397,
403,
13,
4706,
14614,
29924,
2729,
438,
6271,
9867,
7246,
1860,
13,
13,
4706,
9995,
13,
4706,
565,
2295,
29889,
25838,
29918,
14573,
3366,
11014,
29918,
542,
29886,
29918,
16519,
358,
3108,
29901,
13,
9651,
17927,
29889,
27392,
29898,
13,
18884,
376,
29903,
1984,
3262,
438,
6271,
18209,
1549,
14614,
29924,
1363,
14383,
29918,
542,
29886,
29918,
16519,
358,
376,
13,
18884,
376,
5349,
1063,
6790,
29908,
13,
9651,
1723,
13,
9651,
736,
13,
4706,
565,
1583,
29889,
4713,
293,
29880,
5402,
29918,
8513,
1275,
17727,
29889,
29934,
8353,
29918,
20387,
29901,
13,
9651,
1583,
29889,
1867,
29918,
5499,
29878,
29918,
562,
29885,
29918,
542,
29886,
29918,
16519,
580,
13,
9651,
1583,
29889,
2490,
29918,
16519,
29918,
3554,
580,
13,
13,
1678,
822,
1400,
29918,
16519,
29918,
3554,
29898,
1311,
1125,
13,
4706,
9995,
13,
308,
29896,
29889,
16052,
2348,
1253,
23199,
1078,
373,
438,
6271,
24554,
21168,
1549,
14614,
29924,
13,
308,
29906,
29889,
7525,
1400,
29918,
542,
29886,
29918,
16519,
373,
438,
6271,
24554,
13,
13,
4706,
9995,
13,
4706,
12379,
353,
2295,
29889,
2764,
29918,
2248,
13,
4706,
363,
9867,
297,
679,
29918,
5464,
29918,
562,
29885,
29918,
19594,
29918,
2917,
7295,
13,
9651,
2295,
29889,
15123,
29918,
13073,
29898,
19594,
29889,
29924,
8647,
2965,
29931,
17321,
1001,
3366,
4713,
293,
29880,
5402,
29918,
2248,
20068,
13,
9651,
24250,
29918,
1989,
353,
2295,
29889,
2287,
29925,
3927,
29979,
13780,
29889,
657,
703,
292,
1253,
29918,
16265,
29918,
1989,
1159,
13,
9651,
24250,
29918,
6327,
353,
2295,
29889,
2287,
29925,
3927,
29979,
13780,
29889,
657,
703,
292,
1253,
29918,
16265,
29918,
6327,
1159,
13,
9651,
363,
1820,
297,
518,
16265,
29918,
1989,
29892,
24250,
29918,
6327,
5387,
13,
18884,
565,
2897,
29889,
2084,
29889,
9933,
29898,
1989,
1125,
13,
462,
1678,
2897,
29889,
348,
2324,
29898,
1989,
29897,
13,
9651,
17927,
29889,
3888,
703,
27795,
1400,
288,
6814,
7246,
288,
567,
1159,
13,
9651,
1583,
29889,
2490,
29918,
542,
29886,
29918,
16519,
580,
13,
4706,
2295,
29889,
15123,
29918,
13073,
29898,
16304,
29897,
13,
13,
1678,
822,
437,
29918,
5499,
29878,
29918,
562,
29885,
29918,
542,
29886,
29918,
16519,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
21220,
304,
14014,
26900,
438,
6271,
9867,
7246,
1860,
13,
13,
4706,
9995,
13,
4706,
1583,
29889,
1481,
29918,
9465,
353,
1274,
29885,
29889,
7507,
29918,
517,
29918,
562,
29885,
580,
13,
13,
4706,
565,
1583,
29889,
16519,
29918,
16593,
29918,
8513,
1275,
376,
12674,
1115,
13,
9651,
364,
7707,
29918,
695,
504,
414,
353,
679,
29918,
5464,
29918,
562,
29885,
29918,
19594,
29918,
2917,
580,
13,
9651,
363,
274,
297,
364,
7707,
29918,
695,
504,
414,
29901,
13,
18884,
17927,
29889,
3888,
29898,
29888,
29908,
29912,
29883,
29889,
25838,
29918,
14573,
1839,
19594,
29918,
978,
2033,
27195,
13,
18884,
17927,
29889,
3888,
29898,
29888,
29908,
29912,
29883,
29889,
25838,
29918,
14573,
1839,
12120,
2033,
27195,
13,
18884,
17927,
29889,
3888,
29898,
29888,
29908,
29912,
29883,
29889,
25838,
29918,
14573,
1839,
16519,
358,
29918,
1853,
2033,
27195,
13,
9651,
363,
9867,
29918,
5527,
297,
364,
7707,
29918,
695,
504,
414,
29901,
13,
18884,
7246,
261,
353,
1583,
29889,
14399,
29889,
657,
29918,
12120,
29918,
8758,
29898,
13,
462,
1678,
1583,
29889,
1481,
29918,
9465,
29892,
9867,
29918,
5527,
13,
18884,
1723,
13,
18884,
7246,
261,
29889,
3258,
29918,
19594,
29918,
558,
406,
29939,
580,
13,
18884,
7246,
261,
29889,
3258,
29918,
19594,
580,
13,
18884,
1583,
29889,
16519,
358,
29918,
19594,
29918,
1761,
29889,
4397,
29898,
16519,
261,
29897,
13,
9651,
396,
2180,
445,
1298,
18209,
310,
599,
1661,
29899,
562,
29885,
288,
6814,
24554,
505,
1063,
13,
9651,
396,
19799,
29892,
591,
817,
304,
4480,
363,
599,
310,
963,
304,
9269,
13,
9651,
1583,
29889,
10685,
29918,
1454,
29918,
497,
29918,
695,
504,
414,
29918,
12674,
580,
13,
9651,
396,
25553,
413,
4003,
2917,
304,
278,
18067,
17525,
13,
9651,
363,
9867,
297,
1583,
29889,
16519,
358,
29918,
19594,
29918,
1761,
29901,
13,
18884,
9867,
29889,
10382,
29918,
19594,
29918,
5527,
29918,
5325,
580,
13,
13,
1678,
822,
4480,
29918,
1454,
29918,
497,
29918,
695,
504,
414,
29918,
12674,
29898,
1311,
1125,
13,
4706,
396,
1334,
674,
1827,
2309,
871,
746,
5642,
310,
278,
24554,
526,
297,
13,
4706,
396,
525,
9832,
1218,
29915,
2106,
29889,
20370,
896,
505,
304,
367,
297,
525,
28181,
29915,
2106,
13,
4706,
396,
6323,
525,
17776,
29915,
2106,
13,
4706,
2309,
29918,
10685,
292,
353,
7700,
13,
4706,
1550,
451,
2309,
29918,
10685,
292,
29901,
13,
9651,
2309,
29918,
10685,
292,
353,
5852,
13,
9651,
363,
9867,
297,
1583,
29889,
16519,
358,
29918,
19594,
29918,
1761,
29901,
13,
18884,
565,
9867,
29889,
16519,
358,
29918,
4882,
451,
297,
6796,
2040,
613,
376,
26061,
3108,
29901,
13,
462,
1678,
9867,
29889,
657,
29918,
16519,
358,
29918,
4882,
580,
13,
462,
1678,
2309,
29918,
10685,
292,
353,
7700,
13,
4706,
396,
1334,
674,
4418,
1584,
565,
697,
310,
278,
24554,
5229,
304,
7246,
13,
4706,
5229,
29918,
1761,
353,
1051,
580,
13,
4706,
2551,
29918,
1761,
353,
1051,
580,
13,
4706,
363,
9867,
297,
1583,
29889,
16519,
358,
29918,
19594,
29918,
1761,
29901,
13,
9651,
565,
9867,
29889,
16519,
358,
29918,
4882,
1275,
376,
26061,
1115,
13,
18884,
5229,
29918,
1761,
29889,
4397,
29898,
19594,
29897,
13,
9651,
1683,
29901,
13,
18884,
2551,
29918,
1761,
29889,
4397,
29898,
19594,
29897,
13,
13,
4706,
565,
2551,
29918,
1761,
29901,
13,
9651,
17927,
29889,
3888,
703,
8498,
22812,
363,
1494,
24554,
6978,
287,
1159,
13,
9651,
17927,
29889,
3888,
29898,
29888,
29908,
13970,
29883,
29889,
19594,
29918,
978,
363,
274,
297,
2551,
29918,
1761,
12258,
1159,
13,
4706,
565,
5229,
29918,
1761,
29901,
13,
9651,
17927,
29889,
2704,
703,
8498,
22812,
5229,
363,
1494,
24554,
1159,
13,
9651,
17927,
29889,
2704,
29898,
29888,
29908,
13970,
29883,
29889,
19594,
29918,
978,
363,
274,
297,
5229,
29918,
1761,
12258,
1159,
13,
9651,
12020,
14614,
29924,
6821,
5402,
8498,
2376,
2451,
703,
650,
470,
901,
2233,
5402,
10034,
22812,
5229,
16521,
13,
13,
1678,
822,
7246,
29918,
19594,
29898,
1311,
29892,
1480,
29918,
11303,
29918,
5563,
543,
11690,
29908,
1125,
13,
4706,
9995,
13,
4706,
1334,
7246,
716,
438,
6271,
24554,
773,
14614,
29924,
13,
4706,
3940,
29901,
16032,
292,
9867,
1549,
14614,
29924,
756,
1063,
8762,
408,
760,
13,
4706,
310,
23750,
16439,
13,
13,
4706,
9995,
13,
13,
4706,
2428,
2141,
16519,
29918,
19594,
29898,
1188,
29918,
11303,
29918,
5563,
29922,
1188,
29918,
11303,
29918,
5563,
29897,
13,
13,
1678,
822,
8174,
29918,
19594,
29898,
1311,
29892,
1480,
29918,
11303,
29918,
5563,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
1920,
538,
776,
438,
6271,
24554,
21168,
1549,
14614,
29924,
13,
13,
4706,
9995,
13,
4706,
1583,
29889,
1481,
29918,
9465,
353,
1274,
29885,
29889,
7507,
29918,
517,
29918,
562,
29885,
580,
13,
4706,
9867,
29918,
1761,
353,
1051,
580,
13,
13,
4706,
364,
7707,
29918,
695,
504,
414,
353,
679,
29918,
5464,
29918,
562,
29885,
29918,
19594,
29918,
2917,
580,
13,
4706,
17927,
29889,
3888,
703,
29943,
2952,
292,
14614,
29924,
21168,
438,
6271,
24554,
674,
367,
14416,
1159,
13,
4706,
363,
9867,
297,
364,
7707,
29918,
695,
504,
414,
29901,
13,
9651,
17927,
29889,
3888,
29898,
13,
18884,
285,
29908,
19660,
19594,
29889,
25838,
29918,
14573,
1839,
19594,
29918,
978,
2033,
5038,
13,
18884,
285,
29908,
29912,
19594,
29889,
25838,
29918,
14573,
1839,
12120,
2033,
2403,
29908,
13,
18884,
285,
29908,
29912,
19594,
29889,
25838,
29918,
14573,
1839,
16519,
358,
29918,
1853,
2033,
6525,
29908,
13,
9651,
1723,
13,
4706,
363,
9867,
29918,
5527,
297,
364,
7707,
29918,
695,
504,
414,
29901,
13,
9651,
8174,
261,
353,
1583,
29889,
14399,
29889,
657,
29918,
12120,
29918,
8758,
29898,
1311,
29889,
1481,
29918,
9465,
29892,
9867,
29918,
5527,
29897,
13,
9651,
8174,
261,
29889,
20524,
29918,
19594,
580,
13,
9651,
9867,
29918,
1761,
29889,
4397,
29898,
20524,
261,
29897,
13,
13,
4706,
1583,
29889,
10685,
29918,
1454,
29918,
497,
29918,
19594,
29918,
12674,
29918,
20524,
29898,
19594,
29918,
1761,
29897,
13,
4706,
1583,
29889,
2490,
29918,
20524,
29918,
3554,
29898,
19594,
29918,
1761,
29897,
13,
13,
1678,
822,
4480,
29918,
1454,
29918,
497,
29918,
19594,
29918,
12674,
29918,
20524,
29898,
1311,
29892,
8174,
29918,
19594,
29918,
1761,
1125,
13,
4706,
396,
20340,
2745,
599,
278,
24554,
526,
297,
525,
25632,
29915,
470,
525,
17776,
2106,
13,
4706,
14416,
29918,
695,
504,
414,
353,
1051,
580,
13,
4706,
5229,
29918,
695,
504,
414,
353,
1051,
580,
13,
4706,
2309,
29918,
10685,
292,
353,
7700,
13,
4706,
1550,
451,
2309,
29918,
10685,
292,
29901,
13,
9651,
2309,
29918,
10685,
292,
353,
5852,
13,
9651,
363,
9867,
297,
8174,
29918,
19594,
29918,
1761,
29901,
13,
18884,
565,
9867,
29889,
20524,
29918,
4882,
451,
297,
6796,
25632,
613,
376,
17776,
3108,
29901,
13,
462,
1678,
9867,
29889,
657,
29918,
20524,
29918,
4882,
580,
13,
462,
1678,
2309,
29918,
10685,
292,
353,
7700,
13,
4706,
363,
9867,
297,
8174,
29918,
19594,
29918,
1761,
29901,
13,
9651,
565,
9867,
29889,
20524,
29918,
4882,
1275,
376,
25632,
1115,
13,
18884,
14416,
29918,
695,
504,
414,
29889,
4397,
29898,
19594,
29897,
13,
9651,
1683,
29901,
13,
18884,
5229,
29918,
695,
504,
414,
29889,
4397,
29898,
19594,
29897,
13,
13,
4706,
565,
14416,
29918,
695,
504,
414,
29901,
13,
9651,
17927,
29889,
3888,
29898,
13,
18884,
285,
29908,
14994,
4727,
287,
24554,
29901,
426,
29961,
29883,
29889,
19594,
29918,
978,
363,
274,
297,
14416,
29918,
695,
504,
414,
29962,
5038,
13,
9651,
1723,
13,
4706,
565,
5229,
29918,
695,
504,
414,
29901,
13,
9651,
12020,
14614,
29924,
6821,
5402,
14994,
4727,
2451,
29898,
13,
18884,
285,
29908,
17776,
304,
8174,
24554,
29901,
13970,
29883,
29889,
19594,
29918,
978,
363,
274,
297,
5229,
29918,
695,
504,
414,
12258,
376,
13,
9651,
1723,
13,
13,
1678,
822,
1400,
29918,
20524,
29918,
3554,
29898,
1311,
29892,
9867,
29918,
1761,
1125,
13,
4706,
9995,
13,
4706,
4918,
8174,
288,
567,
14364,
7805,
10377,
5941,
701,
322,
270,
1983,
5941,
786,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
9867,
29918,
1761,
313,
1761,
29961,
2477,
6720,
6271,
6821,
5402,
8498,
2376,
29962,
1125,
1051,
310,
7481,
2702,
8871,
13,
13,
4706,
9995,
13,
4706,
363,
9867,
297,
9867,
29918,
1761,
29901,
13,
9651,
9867,
29889,
2490,
29918,
20524,
29918,
3554,
580,
13,
2
] |
tests/01_human_readable_errors.py | Hakujou/osc-sdk-python | 0 | 63098 | import sys
sys.path.append("..")
from osc_sdk_python import Gateway
gw = Gateway()
res = gw.CreateNet(IpRange='192.168.127.12/32')
error = [error for error in res['Errors'] if error.get('Code') == '4014' and error.get('Details') == 'invalid-block-size']
assert len(error) == 1
| [
1,
1053,
10876,
13,
9675,
29889,
2084,
29889,
4397,
703,
636,
1159,
13,
3166,
15199,
29918,
15348,
29918,
4691,
1053,
22510,
1582,
13,
29887,
29893,
353,
22510,
1582,
580,
13,
690,
353,
330,
29893,
29889,
4391,
6779,
29898,
29902,
29886,
6069,
2433,
29896,
29929,
29906,
29889,
29896,
29953,
29947,
29889,
29896,
29906,
29955,
29889,
29896,
29906,
29914,
29941,
29906,
1495,
13,
2704,
353,
518,
2704,
363,
1059,
297,
620,
1839,
22463,
2033,
565,
1059,
29889,
657,
877,
3399,
1495,
1275,
525,
29946,
29900,
29896,
29946,
29915,
322,
1059,
29889,
657,
877,
10602,
1495,
1275,
525,
20965,
29899,
1271,
29899,
2311,
2033,
13,
9294,
7431,
29898,
2704,
29897,
1275,
29871,
29896,
13,
13,
2
] |
libai/data/samplers/samplers.py | Oneflow-Inc/libai | 55 | 29082 | # coding=utf-8
# Copyright 2021 The OneFlow Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import oneflow as flow
from oneflow.utils.data import Sampler
class CyclicSampler(Sampler):
"""
This sampler supports cyclic sampling, and it is also compatible with
non-data parallelism and data parallelism.
Arguments:
dataset: dataset to be sampled.
micro_batch_size: batch size for per model instance.
global_batch_size is micro_batch_size times data_parallel_size.
shuffle: whether to shuffle the dataset.
consumed_samples: the number of samples that have been trained at the current time,
used for resuming training (default: ``0``).
data_parallel_rank: local rank for data parallelism.
data_parallel_size: the size of data parallelism.
seed: random seed, used for reproducing experiments (default: ``0``).
"""
def __init__(
self,
dataset,
micro_batch_size,
shuffle=False,
consumed_samples=0,
data_parallel_rank=0,
data_parallel_size=1,
seed=0,
):
self.dataset = dataset
self.data_size = len(self.dataset)
self.shuffle = shuffle
self.data_parallel_rank = data_parallel_rank
self.data_parallel_size = data_parallel_size
self.micro_batch_size = micro_batch_size
self.actual_batch_size = self.micro_batch_size * self.data_parallel_size
self.data_size_per_epoch = self.data_size // self.actual_batch_size * self.micro_batch_size
self.consumed_samples = consumed_samples
self.seed = seed
def __iter__(self):
"""divide the data into data_parallel_size buckets,
and shuffle it if `shuffle` is set to `True`.
Each processor samples from its own buckets and data_loader
will load the corresponding data.
"""
epoch = self.consumed_samples // self.data_size_per_epoch
current_epoch_samples = self.consumed_samples % self.data_size_per_epoch
batch = []
while True:
bucket_offset = current_epoch_samples // self.data_parallel_size
start_idx = self.data_parallel_rank * self.data_size_per_epoch
if self.shuffle:
generator = flow.Generator()
generator.manual_seed(self.seed + epoch)
random_idx = flow.randperm(self.data_size_per_epoch, generator=generator).tolist()
indices = [start_idx + x for x in random_idx[bucket_offset:]]
else:
seq_idx = flow.arange(self.data_size_per_epoch).tolist()
indices = [start_idx + x for x in seq_idx[bucket_offset:]]
epoch += 1
if hasattr(self.dataset, "supports_prefetch") and self.dataset.supports_prefetch:
self.dataset.prefetch(indices)
for idx in indices:
batch.append(idx)
if len(batch) == self.micro_batch_size:
self.consumed_samples += self.actual_batch_size
yield batch
batch = []
current_epoch_samples = 0
def __len__(self):
return self.data_size
def set_consumed_samples(self, consumed_samples):
"""You can recover the training iteration by setting `consumed_samples`."""
self.consumed_samples = consumed_samples
def set_epoch(self, epoch):
"""Used for restoring training status."""
self.epoch = epoch
class SingleRoundSampler(Sampler):
"""
This sampler supports single round sampling, and it is also compatible with
non data parallelism and data parallelism.
Arguments:
dataset: dataset to be sampled.
micro_batch_size: batch size for per model instance, global_batch_size
is micro_batch_size times data_parallel_size.
shuffle: whether to shuffle the dataset.
data_parallel_rank: local rank for data parallelism.
data_parallel_size: the size of data parallelism.
seed: random seed, used for reproducing experiments (default: ``0``).
drop_last: whether to drop the remaining data (default: ``False``).
"""
def __init__(
self,
dataset,
micro_batch_size,
shuffle=False,
data_parallel_rank=0,
data_parallel_size=1,
seed=0,
drop_last=False,
):
self.dataset = dataset
self.data_size = len(self.dataset)
self.shuffle = shuffle
self.data_parallel_rank = data_parallel_rank
self.data_parallel_size = data_parallel_size
self.micro_batch_size = micro_batch_size
self.seed = seed
self.drop_last = drop_last
def __iter__(self):
bucket_size = self.data_size // self.data_parallel_size
remain = self.data_size % self.data_parallel_size
start_idx = self.data_parallel_rank * bucket_size
if self.data_parallel_rank < remain:
bucket_size += 1
start_idx += min(self.data_parallel_rank, remain)
if self.shuffle:
generator = flow.Generator()
generator.manual_seed(self.seed)
random_idx = flow.randperm(bucket_size, generator=generator).tolist()
indices = [start_idx + x for x in random_idx]
else:
seq_idx = flow.arange(bucket_size).tolist()
indices = [start_idx + x for x in seq_idx]
if hasattr(self.dataset, "supports_prefetch") and self.dataset.supports_prefetch:
self.dataset.prefetch(indices)
batch = []
for idx in indices:
batch.append(idx)
if len(batch) == self.micro_batch_size:
yield batch
batch = []
if not self.drop_last:
if self.data_parallel_rank >= remain and remain > 0:
batch.append(0)
if len(batch) > 0:
yield batch
def __len__(self):
global_batch_size = self.micro_batch_size * self.data_parallel_size
if self.drop_last:
return self.data_size // global_batch_size
else:
return (self.data_size + global_batch_size - 1) // global_batch_size
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
450,
3118,
17907,
13189,
943,
29889,
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,
13,
5215,
697,
1731,
408,
4972,
13,
3166,
697,
1731,
29889,
13239,
29889,
1272,
1053,
3685,
20069,
13,
13,
13,
1990,
8045,
28746,
22966,
20069,
29898,
22966,
20069,
1125,
13,
1678,
9995,
13,
1678,
910,
3514,
20069,
11286,
5094,
28746,
23460,
29892,
322,
372,
338,
884,
15878,
411,
13,
1678,
1661,
29899,
1272,
8943,
1608,
322,
848,
8943,
1608,
29889,
13,
13,
1678,
11842,
9331,
29901,
13,
4706,
8783,
29901,
8783,
304,
367,
4559,
29881,
29889,
13,
4706,
9200,
29918,
16175,
29918,
2311,
29901,
9853,
2159,
363,
639,
1904,
2777,
29889,
13,
4706,
5534,
29918,
16175,
29918,
2311,
338,
9200,
29918,
16175,
29918,
2311,
3064,
848,
29918,
23482,
29918,
2311,
29889,
13,
4706,
528,
21897,
29901,
3692,
304,
528,
21897,
278,
8783,
29889,
13,
4706,
11233,
287,
29918,
27736,
29901,
278,
1353,
310,
11916,
393,
505,
1063,
16370,
472,
278,
1857,
931,
29892,
13,
9651,
1304,
363,
620,
9929,
6694,
313,
4381,
29901,
4954,
29900,
29952,
12913,
13,
4706,
848,
29918,
23482,
29918,
10003,
29901,
1887,
7115,
363,
848,
8943,
1608,
29889,
13,
4706,
848,
29918,
23482,
29918,
2311,
29901,
278,
2159,
310,
848,
8943,
1608,
29889,
13,
4706,
16717,
29901,
4036,
16717,
29892,
1304,
363,
9483,
3277,
15729,
313,
4381,
29901,
4954,
29900,
29952,
12913,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
8783,
29892,
13,
4706,
9200,
29918,
16175,
29918,
2311,
29892,
13,
4706,
528,
21897,
29922,
8824,
29892,
13,
4706,
11233,
287,
29918,
27736,
29922,
29900,
29892,
13,
4706,
848,
29918,
23482,
29918,
10003,
29922,
29900,
29892,
13,
4706,
848,
29918,
23482,
29918,
2311,
29922,
29896,
29892,
13,
4706,
16717,
29922,
29900,
29892,
13,
268,
1125,
13,
4706,
1583,
29889,
24713,
353,
8783,
13,
4706,
1583,
29889,
1272,
29918,
2311,
353,
7431,
29898,
1311,
29889,
24713,
29897,
13,
4706,
1583,
29889,
845,
21897,
353,
528,
21897,
13,
13,
4706,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
353,
848,
29918,
23482,
29918,
10003,
13,
4706,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
353,
848,
29918,
23482,
29918,
2311,
13,
4706,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
353,
9200,
29918,
16175,
29918,
2311,
13,
4706,
1583,
29889,
19304,
29918,
16175,
29918,
2311,
353,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
334,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
13,
4706,
1583,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
353,
1583,
29889,
1272,
29918,
2311,
849,
1583,
29889,
19304,
29918,
16175,
29918,
2311,
334,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
13,
4706,
1583,
29889,
25978,
287,
29918,
27736,
353,
11233,
287,
29918,
27736,
13,
13,
4706,
1583,
29889,
26776,
353,
16717,
13,
13,
1678,
822,
4770,
1524,
12035,
1311,
1125,
13,
4706,
9995,
4563,
680,
278,
848,
964,
848,
29918,
23482,
29918,
2311,
1321,
9737,
29892,
13,
4706,
322,
528,
21897,
372,
565,
421,
845,
21897,
29952,
338,
731,
304,
421,
5574,
1412,
13,
4706,
7806,
21433,
11916,
515,
967,
1914,
1321,
9737,
322,
848,
29918,
12657,
13,
4706,
674,
2254,
278,
6590,
848,
29889,
13,
4706,
9995,
13,
4706,
21502,
305,
353,
1583,
29889,
25978,
287,
29918,
27736,
849,
1583,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
13,
4706,
1857,
29918,
1022,
2878,
29918,
27736,
353,
1583,
29889,
25978,
287,
29918,
27736,
1273,
1583,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
13,
4706,
9853,
353,
5159,
13,
13,
4706,
1550,
5852,
29901,
13,
9651,
20968,
29918,
10289,
353,
1857,
29918,
1022,
2878,
29918,
27736,
849,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
13,
9651,
1369,
29918,
13140,
353,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
334,
1583,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
13,
13,
9651,
565,
1583,
29889,
845,
21897,
29901,
13,
18884,
15299,
353,
4972,
29889,
21575,
580,
13,
18884,
15299,
29889,
11288,
29918,
26776,
29898,
1311,
29889,
26776,
718,
21502,
305,
29897,
13,
18884,
4036,
29918,
13140,
353,
4972,
29889,
9502,
17858,
29898,
1311,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
29892,
15299,
29922,
27959,
467,
25027,
391,
580,
13,
18884,
16285,
353,
518,
2962,
29918,
13140,
718,
921,
363,
921,
297,
4036,
29918,
13140,
29961,
21454,
29918,
10289,
29901,
5262,
13,
9651,
1683,
29901,
13,
18884,
19359,
29918,
13140,
353,
4972,
29889,
279,
927,
29898,
1311,
29889,
1272,
29918,
2311,
29918,
546,
29918,
1022,
2878,
467,
25027,
391,
580,
13,
18884,
16285,
353,
518,
2962,
29918,
13140,
718,
921,
363,
921,
297,
19359,
29918,
13140,
29961,
21454,
29918,
10289,
29901,
5262,
13,
13,
9651,
21502,
305,
4619,
29871,
29896,
13,
13,
9651,
565,
756,
5552,
29898,
1311,
29889,
24713,
29892,
376,
5924,
29879,
29918,
29886,
999,
3486,
1159,
322,
1583,
29889,
24713,
29889,
5924,
29879,
29918,
29886,
999,
3486,
29901,
13,
18884,
1583,
29889,
24713,
29889,
29886,
999,
3486,
29898,
513,
1575,
29897,
13,
13,
9651,
363,
22645,
297,
16285,
29901,
13,
18884,
9853,
29889,
4397,
29898,
13140,
29897,
13,
18884,
565,
7431,
29898,
16175,
29897,
1275,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
29901,
13,
462,
1678,
1583,
29889,
25978,
287,
29918,
27736,
4619,
1583,
29889,
19304,
29918,
16175,
29918,
2311,
13,
462,
1678,
7709,
9853,
13,
462,
1678,
9853,
353,
5159,
13,
13,
9651,
1857,
29918,
1022,
2878,
29918,
27736,
353,
29871,
29900,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1272,
29918,
2311,
13,
13,
1678,
822,
731,
29918,
25978,
287,
29918,
27736,
29898,
1311,
29892,
11233,
287,
29918,
27736,
1125,
13,
4706,
9995,
3492,
508,
9792,
278,
6694,
12541,
491,
4444,
421,
25978,
287,
29918,
27736,
29952,
1213,
15945,
13,
4706,
1583,
29889,
25978,
287,
29918,
27736,
353,
11233,
287,
29918,
27736,
13,
13,
1678,
822,
731,
29918,
1022,
2878,
29898,
1311,
29892,
21502,
305,
1125,
13,
4706,
9995,
29965,
8485,
363,
1791,
8253,
6694,
4660,
1213,
15945,
13,
4706,
1583,
29889,
1022,
2878,
353,
21502,
305,
13,
13,
13,
1990,
16740,
29934,
618,
22966,
20069,
29898,
22966,
20069,
1125,
13,
1678,
9995,
13,
1678,
910,
3514,
20069,
11286,
2323,
4513,
23460,
29892,
322,
372,
338,
884,
15878,
411,
13,
1678,
1661,
848,
8943,
1608,
322,
848,
8943,
1608,
29889,
13,
13,
1678,
11842,
9331,
29901,
13,
4706,
8783,
29901,
8783,
304,
367,
4559,
29881,
29889,
13,
4706,
9200,
29918,
16175,
29918,
2311,
29901,
9853,
2159,
363,
639,
1904,
2777,
29892,
5534,
29918,
16175,
29918,
2311,
13,
462,
3986,
338,
9200,
29918,
16175,
29918,
2311,
3064,
848,
29918,
23482,
29918,
2311,
29889,
13,
4706,
528,
21897,
29901,
3692,
304,
528,
21897,
278,
8783,
29889,
13,
4706,
848,
29918,
23482,
29918,
10003,
29901,
1887,
7115,
363,
848,
8943,
1608,
29889,
13,
4706,
848,
29918,
23482,
29918,
2311,
29901,
278,
2159,
310,
848,
8943,
1608,
29889,
13,
4706,
16717,
29901,
4036,
16717,
29892,
1304,
363,
9483,
3277,
15729,
313,
4381,
29901,
4954,
29900,
29952,
12913,
13,
4706,
5768,
29918,
4230,
29901,
3692,
304,
5768,
278,
9886,
848,
313,
4381,
29901,
4954,
8824,
29952,
12913,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
8783,
29892,
13,
4706,
9200,
29918,
16175,
29918,
2311,
29892,
13,
4706,
528,
21897,
29922,
8824,
29892,
13,
4706,
848,
29918,
23482,
29918,
10003,
29922,
29900,
29892,
13,
4706,
848,
29918,
23482,
29918,
2311,
29922,
29896,
29892,
13,
4706,
16717,
29922,
29900,
29892,
13,
4706,
5768,
29918,
4230,
29922,
8824,
29892,
13,
268,
1125,
13,
4706,
1583,
29889,
24713,
353,
8783,
13,
4706,
1583,
29889,
1272,
29918,
2311,
353,
7431,
29898,
1311,
29889,
24713,
29897,
13,
4706,
1583,
29889,
845,
21897,
353,
528,
21897,
13,
13,
4706,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
353,
848,
29918,
23482,
29918,
10003,
13,
4706,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
353,
848,
29918,
23482,
29918,
2311,
13,
4706,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
353,
9200,
29918,
16175,
29918,
2311,
13,
13,
4706,
1583,
29889,
26776,
353,
16717,
13,
4706,
1583,
29889,
8865,
29918,
4230,
353,
5768,
29918,
4230,
13,
13,
1678,
822,
4770,
1524,
12035,
1311,
1125,
13,
4706,
20968,
29918,
2311,
353,
1583,
29889,
1272,
29918,
2311,
849,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
13,
4706,
3933,
353,
1583,
29889,
1272,
29918,
2311,
1273,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
13,
4706,
1369,
29918,
13140,
353,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
334,
20968,
29918,
2311,
13,
13,
4706,
565,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
529,
3933,
29901,
13,
9651,
20968,
29918,
2311,
4619,
29871,
29896,
13,
4706,
1369,
29918,
13140,
4619,
1375,
29898,
1311,
29889,
1272,
29918,
23482,
29918,
10003,
29892,
3933,
29897,
13,
13,
4706,
565,
1583,
29889,
845,
21897,
29901,
13,
9651,
15299,
353,
4972,
29889,
21575,
580,
13,
9651,
15299,
29889,
11288,
29918,
26776,
29898,
1311,
29889,
26776,
29897,
13,
9651,
4036,
29918,
13140,
353,
4972,
29889,
9502,
17858,
29898,
21454,
29918,
2311,
29892,
15299,
29922,
27959,
467,
25027,
391,
580,
13,
9651,
16285,
353,
518,
2962,
29918,
13140,
718,
921,
363,
921,
297,
4036,
29918,
13140,
29962,
13,
4706,
1683,
29901,
13,
9651,
19359,
29918,
13140,
353,
4972,
29889,
279,
927,
29898,
21454,
29918,
2311,
467,
25027,
391,
580,
13,
9651,
16285,
353,
518,
2962,
29918,
13140,
718,
921,
363,
921,
297,
19359,
29918,
13140,
29962,
13,
13,
4706,
565,
756,
5552,
29898,
1311,
29889,
24713,
29892,
376,
5924,
29879,
29918,
29886,
999,
3486,
1159,
322,
1583,
29889,
24713,
29889,
5924,
29879,
29918,
29886,
999,
3486,
29901,
13,
9651,
1583,
29889,
24713,
29889,
29886,
999,
3486,
29898,
513,
1575,
29897,
13,
13,
4706,
9853,
353,
5159,
13,
4706,
363,
22645,
297,
16285,
29901,
13,
9651,
9853,
29889,
4397,
29898,
13140,
29897,
13,
9651,
565,
7431,
29898,
16175,
29897,
1275,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
29901,
13,
18884,
7709,
9853,
13,
18884,
9853,
353,
5159,
13,
13,
4706,
565,
451,
1583,
29889,
8865,
29918,
4230,
29901,
13,
9651,
565,
1583,
29889,
1272,
29918,
23482,
29918,
10003,
6736,
3933,
322,
3933,
1405,
29871,
29900,
29901,
13,
18884,
9853,
29889,
4397,
29898,
29900,
29897,
13,
9651,
565,
7431,
29898,
16175,
29897,
1405,
29871,
29900,
29901,
13,
18884,
7709,
9853,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
5534,
29918,
16175,
29918,
2311,
353,
1583,
29889,
29885,
2357,
29918,
16175,
29918,
2311,
334,
1583,
29889,
1272,
29918,
23482,
29918,
2311,
13,
4706,
565,
1583,
29889,
8865,
29918,
4230,
29901,
13,
9651,
736,
1583,
29889,
1272,
29918,
2311,
849,
5534,
29918,
16175,
29918,
2311,
13,
4706,
1683,
29901,
13,
9651,
736,
313,
1311,
29889,
1272,
29918,
2311,
718,
5534,
29918,
16175,
29918,
2311,
448,
29871,
29896,
29897,
849,
5534,
29918,
16175,
29918,
2311,
13,
2
] |
Solutions/262.py | ruppysuppy/Daily-Coding-Problem-Solutions | 70 | 63860 | """
Problem:
A bridge in a connected (undirected) graph is an edge that, if removed, causes the
graph to become disconnected. Find all the bridges in a graph.
"""
from sys import maxsize
from typing import Dict, List, Optional, Set, Tuple
from DataStructures.Graph import GraphUndirectedUnweighted
def get_bridges_helper(
graph: GraphUndirectedUnweighted,
node: int,
visited: Set[int],
parent: Dict[int, Optional[int]],
low: Dict[int, int],
disc: Dict[int, int],
bridges: List[Tuple[int, int]],
) -> None:
# find all bridges using dfs
visited.add(node)
disc[node] = graph.time
low[node] = graph.time
graph.time += 1
for neighbour in graph.connections[node]:
if neighbour not in visited:
parent[neighbour] = node
get_bridges_helper(graph, neighbour, visited, parent, low, disc, bridges)
# check if the subtree rooted with neighbour has a connection to one of the
# ancestors of node
low[node] = min(low[node], low[neighbour])
# if the lowest vertex reachable from subtree under neighbour is below node
# in DFS tree, then node-neighbour is a bridge
if low[neighbour] > disc[node]:
bridges.append((node, neighbour))
elif neighbour != parent[node]:
low[node] = min(low[node], disc[neighbour])
def get_bridges(graph: GraphUndirectedUnweighted) -> List[Tuple[int, int]]:
visited = set()
disc = {node: maxsize for node in graph.connections}
low = {node: maxsize for node in graph.connections}
parent = {node: None for node in graph.connections}
bridges = []
graph.time = 0
for node in graph.connections:
if node not in visited:
get_bridges_helper(graph, node, visited, parent, low, disc, bridges)
return bridges
if __name__ == "__main__":
g1 = GraphUndirectedUnweighted()
g1.add_edge(1, 0)
g1.add_edge(0, 2)
g1.add_edge(2, 1)
g1.add_edge(0, 3)
g1.add_edge(3, 4)
print("Bridges in first graph:")
print(*get_bridges(g1))
g2 = GraphUndirectedUnweighted()
g2.add_edge(0, 1)
g2.add_edge(1, 2)
g2.add_edge(2, 3)
print("\nBridges in second graph:")
print(*get_bridges(g2))
g3 = GraphUndirectedUnweighted()
g3.add_edge(0, 1)
g3.add_edge(1, 2)
g3.add_edge(2, 0)
g3.add_edge(1, 3)
g3.add_edge(1, 4)
g3.add_edge(1, 6)
g3.add_edge(3, 5)
g3.add_edge(4, 5)
print("\nBridges in third graph:")
print(*get_bridges(g3))
"""
SPECS:
TIME COMPLEXITY: O(v + e)
SPACE COMPLEXITY: O(v)
"""
| [
1,
9995,
13,
26604,
29901,
13,
13,
29909,
12945,
297,
263,
6631,
313,
870,
1088,
287,
29897,
3983,
338,
385,
7636,
393,
29892,
565,
6206,
29892,
9946,
278,
13,
4262,
304,
4953,
766,
18045,
29889,
10987,
599,
278,
28635,
2710,
297,
263,
3983,
29889,
13,
15945,
29908,
13,
13,
3166,
10876,
1053,
4236,
2311,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
29892,
28379,
29892,
3789,
29892,
12603,
552,
13,
13,
3166,
3630,
19560,
1973,
29889,
9527,
1053,
12367,
25263,
1088,
287,
2525,
7915,
287,
13,
13,
13,
1753,
679,
29918,
19515,
2710,
29918,
20907,
29898,
13,
1678,
3983,
29901,
12367,
25263,
1088,
287,
2525,
7915,
287,
29892,
13,
1678,
2943,
29901,
938,
29892,
13,
1678,
16669,
29901,
3789,
29961,
524,
1402,
13,
1678,
3847,
29901,
360,
919,
29961,
524,
29892,
28379,
29961,
524,
20526,
13,
1678,
4482,
29901,
360,
919,
29961,
524,
29892,
938,
1402,
13,
1678,
2313,
29901,
360,
919,
29961,
524,
29892,
938,
1402,
13,
1678,
28635,
2710,
29901,
2391,
29961,
23215,
552,
29961,
524,
29892,
938,
20526,
13,
29897,
1599,
6213,
29901,
13,
1678,
396,
1284,
599,
28635,
2710,
773,
4489,
29879,
13,
1678,
16669,
29889,
1202,
29898,
3177,
29897,
13,
1678,
2313,
29961,
3177,
29962,
353,
3983,
29889,
2230,
13,
1678,
4482,
29961,
3177,
29962,
353,
3983,
29889,
2230,
13,
1678,
3983,
29889,
2230,
4619,
29871,
29896,
13,
1678,
363,
17647,
297,
3983,
29889,
11958,
1953,
29961,
3177,
5387,
13,
4706,
565,
17647,
451,
297,
16669,
29901,
13,
9651,
3847,
29961,
484,
1141,
6526,
29962,
353,
2943,
13,
9651,
679,
29918,
19515,
2710,
29918,
20907,
29898,
4262,
29892,
17647,
29892,
16669,
29892,
3847,
29892,
4482,
29892,
2313,
29892,
28635,
2710,
29897,
13,
9651,
396,
1423,
565,
278,
1014,
8336,
3876,
287,
411,
17647,
756,
263,
3957,
304,
697,
310,
278,
13,
9651,
396,
19525,
943,
310,
2943,
13,
9651,
4482,
29961,
3177,
29962,
353,
1375,
29898,
677,
29961,
3177,
1402,
4482,
29961,
484,
1141,
6526,
2314,
13,
9651,
396,
565,
278,
19604,
12688,
6159,
519,
515,
1014,
8336,
1090,
17647,
338,
2400,
2943,
13,
9651,
396,
297,
360,
9998,
5447,
29892,
769,
2943,
29899,
484,
1141,
6526,
338,
263,
12945,
13,
9651,
565,
4482,
29961,
484,
1141,
6526,
29962,
1405,
2313,
29961,
3177,
5387,
13,
18884,
28635,
2710,
29889,
4397,
3552,
3177,
29892,
17647,
876,
13,
4706,
25342,
17647,
2804,
3847,
29961,
3177,
5387,
13,
9651,
4482,
29961,
3177,
29962,
353,
1375,
29898,
677,
29961,
3177,
1402,
2313,
29961,
484,
1141,
6526,
2314,
13,
13,
13,
1753,
679,
29918,
19515,
2710,
29898,
4262,
29901,
12367,
25263,
1088,
287,
2525,
7915,
287,
29897,
1599,
2391,
29961,
23215,
552,
29961,
524,
29892,
938,
5262,
29901,
13,
1678,
16669,
353,
731,
580,
13,
1678,
2313,
353,
426,
3177,
29901,
4236,
2311,
363,
2943,
297,
3983,
29889,
11958,
1953,
29913,
13,
1678,
4482,
353,
426,
3177,
29901,
4236,
2311,
363,
2943,
297,
3983,
29889,
11958,
1953,
29913,
13,
1678,
3847,
353,
426,
3177,
29901,
6213,
363,
2943,
297,
3983,
29889,
11958,
1953,
29913,
13,
1678,
28635,
2710,
353,
5159,
13,
1678,
3983,
29889,
2230,
353,
29871,
29900,
13,
1678,
363,
2943,
297,
3983,
29889,
11958,
1953,
29901,
13,
4706,
565,
2943,
451,
297,
16669,
29901,
13,
9651,
679,
29918,
19515,
2710,
29918,
20907,
29898,
4262,
29892,
2943,
29892,
16669,
29892,
3847,
29892,
4482,
29892,
2313,
29892,
28635,
2710,
29897,
13,
1678,
736,
28635,
2710,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
330,
29896,
353,
12367,
25263,
1088,
287,
2525,
7915,
287,
580,
13,
1678,
330,
29896,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29900,
29897,
13,
1678,
330,
29896,
29889,
1202,
29918,
12864,
29898,
29900,
29892,
29871,
29906,
29897,
13,
1678,
330,
29896,
29889,
1202,
29918,
12864,
29898,
29906,
29892,
29871,
29896,
29897,
13,
1678,
330,
29896,
29889,
1202,
29918,
12864,
29898,
29900,
29892,
29871,
29941,
29897,
13,
1678,
330,
29896,
29889,
1202,
29918,
12864,
29898,
29941,
29892,
29871,
29946,
29897,
13,
1678,
1596,
703,
29933,
2429,
2710,
297,
937,
3983,
29901,
1159,
13,
1678,
1596,
10456,
657,
29918,
19515,
2710,
29898,
29887,
29896,
876,
13,
13,
1678,
330,
29906,
353,
12367,
25263,
1088,
287,
2525,
7915,
287,
580,
13,
1678,
330,
29906,
29889,
1202,
29918,
12864,
29898,
29900,
29892,
29871,
29896,
29897,
13,
1678,
330,
29906,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29906,
29897,
13,
1678,
330,
29906,
29889,
1202,
29918,
12864,
29898,
29906,
29892,
29871,
29941,
29897,
13,
1678,
1596,
14182,
29876,
29933,
2429,
2710,
297,
1473,
3983,
29901,
1159,
13,
1678,
1596,
10456,
657,
29918,
19515,
2710,
29898,
29887,
29906,
876,
13,
13,
1678,
330,
29941,
353,
12367,
25263,
1088,
287,
2525,
7915,
287,
580,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29900,
29892,
29871,
29896,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29906,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29906,
29892,
29871,
29900,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29941,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29946,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29896,
29892,
29871,
29953,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29941,
29892,
29871,
29945,
29897,
13,
1678,
330,
29941,
29889,
1202,
29918,
12864,
29898,
29946,
29892,
29871,
29945,
29897,
13,
1678,
1596,
14182,
29876,
29933,
2429,
2710,
297,
4654,
3983,
29901,
1159,
13,
1678,
1596,
10456,
657,
29918,
19515,
2710,
29898,
29887,
29941,
876,
13,
13,
13,
15945,
29908,
13,
29903,
4162,
9295,
29901,
13,
13,
15307,
4810,
3580,
1307,
29990,
11937,
29901,
438,
29898,
29894,
718,
321,
29897,
13,
5550,
11538,
4810,
3580,
1307,
29990,
11937,
29901,
438,
29898,
29894,
29897,
13,
15945,
29908,
13,
2
] |
ryu/app/curly.py | doup123/diplomas | 0 | 181578 | <reponame>doup123/diplomas
import pycurl
from StringIO import StringIO
class Curl:
def __init__(self,host):
self.url=str(host)
def get_page(self,file=None):
try:
buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, self.url)
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
body = buffer.getvalue()
#print body
try:
open(file, 'w').write(body)
except:
None#ds
return body
except (pycurl.error):
print "Error"
| [
1,
529,
276,
1112,
420,
29958,
29881,
1132,
29896,
29906,
29941,
29914,
6051,
8840,
294,
13,
5215,
282,
11078,
2271,
13,
3166,
1714,
5971,
1053,
1714,
5971,
13,
13,
1990,
315,
2271,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3069,
1125,
13,
4706,
1583,
29889,
2271,
29922,
710,
29898,
3069,
29897,
13,
13,
1678,
822,
679,
29918,
3488,
29898,
1311,
29892,
1445,
29922,
8516,
1125,
13,
4706,
1018,
29901,
13,
9651,
6835,
353,
1714,
5971,
580,
13,
9651,
274,
353,
282,
11078,
2271,
29889,
29907,
2271,
580,
13,
9651,
274,
29889,
28393,
29898,
29883,
29889,
4219,
29892,
1583,
29889,
2271,
29897,
13,
9651,
274,
29889,
28393,
29898,
29883,
29889,
9980,
1806,
3352,
8254,
29892,
6835,
29897,
13,
9651,
274,
29889,
19826,
580,
13,
9651,
274,
29889,
5358,
580,
13,
9651,
3573,
353,
6835,
29889,
657,
1767,
580,
13,
9651,
396,
2158,
3573,
13,
9651,
1018,
29901,
13,
1669,
1722,
29898,
1445,
29892,
525,
29893,
2824,
3539,
29898,
2587,
29897,
13,
9651,
5174,
29901,
13,
18884,
6213,
29937,
6289,
13,
13,
9651,
736,
3573,
13,
4706,
5174,
313,
2272,
18963,
29889,
2704,
1125,
13,
9651,
1596,
376,
2392,
29908,
13,
13,
13,
13,
2
] |
philander/__init__.py | pfirsich/philander | 1 | 91108 | <reponame>pfirsich/philander
from .philander import *
| [
1,
529,
276,
1112,
420,
29958,
7810,
12935,
436,
29914,
561,
309,
3825,
13,
3166,
869,
561,
309,
3825,
1053,
334,
13,
2
] |
src/poliastro/plotting/porkchop.py | niharsalunke/poliastro | 2 | 193036 | <reponame>niharsalunke/poliastro
"""
This is the implementation of porkchop plot
"""
import numpy as np
from astropy import coordinates as coord, units as u
from matplotlib import pyplot as plt
from poliastro.bodies import (
Earth,
Jupiter,
Mars,
Mercury,
Moon,
Neptune,
Pluto,
Saturn,
Sun,
Uranus,
Venus,
)
from poliastro.maneuver import Maneuver
from poliastro.twobody.orbit import Orbit
from poliastro.util import norm
def _get_state(body, time):
""" Computes the position of a body for a given time. """
solar_system_bodies = [
Sun,
Mercury,
Venus,
Earth,
Moon,
Mars,
Jupiter,
Saturn,
Uranus,
Neptune,
Pluto,
]
# We check if body belongs to poliastro.bodies
if body in solar_system_bodies:
rr, vv = coord.get_body_barycentric_posvel(body.name, time)
else:
rr, vv = body.propagate(time).rv()
rr = coord.CartesianRepresentation(rr)
vv = coord.CartesianRepresentation(vv)
return rr.xyz, vv.xyz
def _targetting(departure_body, target_body, t_launch, t_arrival):
"""This function returns the increment in departure and arrival velocities."""
# Get position and velocities for departure and arrival
rr_dpt_body, vv_dpt_body = _get_state(departure_body, t_launch)
rr_arr_body, vv_arr_body = _get_state(target_body, t_arrival)
# Transform into Orbit objects
attractor = departure_body.parent
ss_dpt = Orbit.from_vectors(attractor, rr_dpt_body, vv_dpt_body, epoch=t_launch)
ss_arr = Orbit.from_vectors(attractor, rr_arr_body, vv_arr_body, epoch=t_arrival)
# Define time of flight
tof = ss_arr.epoch - ss_dpt.epoch
if tof <= 0:
return None, None, None, None, None
try:
# Lambert is now a Maneuver object
man_lambert = Maneuver.lambert(ss_dpt, ss_arr)
# Get norm delta velocities
dv_dpt = norm(man_lambert.impulses[0][1])
dv_arr = norm(man_lambert.impulses[1][1])
# Compute all the output variables
c3_launch = dv_dpt ** 2
c3_arrival = dv_arr ** 2
return (
dv_dpt.to(u.km / u.s).value,
dv_arr.to(u.km / u.s).value,
c3_launch.to(u.km ** 2 / u.s ** 2).value,
c3_arrival.to(u.km ** 2 / u.s ** 2).value,
tof.jd,
)
except AssertionError:
return None, None, None, None, None
# numpy.vectorize is amazing
targetting_vec = np.vectorize(
_targetting,
otypes=[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray],
excluded=[0, 1],
)
class PorkchopPlotter:
"""
Class Implementation for Porkchop Plot
Parameters
----------
departure_body: poliastro.bodies.Body
Body from which departure is done
target_body: poliastro.bodies.Body
Body for targetting
launch_span: astropy.time.Time
Time span for launch
arrival_span: astropy.time.Time
Time span for arrival
ax: matplotlib.axes.Axes:
For custom figures
tfl: boolean
For plotting time flight contour lines
vhp: boolean
For plotting arrival velocity contour lines
max_c3: float
Sets the maximum C3 value for porkchop
max_vhp: float
Sets the maximum arrival velocity for porkchop
"""
def __init__(
self,
departure_body,
target_body,
launch_span,
arrival_span,
ax=None,
tfl=True,
vhp=True,
max_c3=45.0 * u.km ** 2 / u.s ** 2,
max_vhp=5 * u.km / u.s,
):
self.departure_body = departure_body
self.target_body = target_body
self.launch_span = launch_span
self.arrival_span = arrival_span
self.ax = ax
self.tfl = tfl
self.vhp = vhp
self.max_c3 = max_c3
self.max_vhp = max_vhp
def porkchop(self):
"""Plots porkchop between two bodies.
Returns
-------
dv_launch: np.ndarray
Launch delta v
dv_arrival: np.ndarray
Arrival delta v
c3_launch: np.ndarray
Characteristic launch energy
c3_arrrival: np.ndarray
Characteristic arrival energy
tof: np.ndarray
Time of flight for each transfer
Example
-------
>>> from poliastro.plotting.porkchop import PorkchopPlotter
>>> from poliastro.bodies import Earth, Mars
>>> from poliastro.util import time_range
>>> launch_span = time_range("2005-04-30", end="2005-10-07")
>>> arrival_span = time_range("2005-11-16", end="2006-12-21")
>>> porkchop_plot = PorkchopPlotter(Earth, Mars, launch_span, arrival_span)
>>> dv_launch, dev_dpt, c3dpt, c3arr, tof = porkchop_plot.porkchop()
"""
dv_launch, dv_arrival, c3_launch, c3_arrival, tof = targetting_vec(
self.departure_body,
self.target_body,
self.launch_span[np.newaxis, :],
self.arrival_span[:, np.newaxis],
)
# Start drawing porkchop
if self.ax is None:
fig, self.ax = plt.subplots(figsize=(15, 15))
else:
fig = self.ax.figure
c3_levels = np.linspace(0, self.max_c3.to(u.km ** 2 / u.s ** 2).value, 30)
c = self.ax.contourf(
[D.to_datetime() for D in self.launch_span],
[A.to_datetime() for A in self.arrival_span],
c3_launch,
c3_levels,
)
line = self.ax.contour(
[D.to_datetime() for D in self.launch_span],
[A.to_datetime() for A in self.arrival_span],
c3_launch,
c3_levels,
colors="black",
linestyles="solid",
)
cbar = fig.colorbar(c)
cbar.set_label("km2 / s2")
self.ax.clabel(line, inline=1, fmt="%1.1f", colors="k", fontsize=10)
if self.tfl:
time_levels = np.linspace(100, 500, 5)
tfl_contour = self.ax.contour(
[D.to_datetime() for D in self.launch_span],
[A.to_datetime() for A in self.arrival_span],
tof,
time_levels,
colors="red",
linestyles="dashed",
linewidths=3.5,
)
self.ax.clabel(tfl_contour, inline=1, fmt="%1.1f", colors="r", fontsize=14)
if self.vhp:
vhp_levels = np.linspace(0, self.max_vhp.to(u.km / u.s).value, 5)
vhp_contour = self.ax.contour(
[D.to_datetime() for D in self.launch_span],
[A.to_datetime() for A in self.arrival_span],
dv_arrival,
vhp_levels,
colors="navy",
linewidths=2.0,
)
self.ax.clabel(
vhp_contour, inline=1, fmt="%1.1f", colors="navy", fontsize=12
)
self.ax.grid()
fig.autofmt_xdate()
if not hasattr(self.target_body, "name"):
self.ax.set_title(
f"{self.departure_body.name} - Target Body for year {self.launch_span[0].datetime.year}, C3 Launch",
fontsize=14,
fontweight="bold",
)
else:
self.ax.set_title(
f"{self.departure_body.name} - {self.target_body.name} for year {self.launch_span[0].datetime.year}, C3 Launch",
fontsize=14,
fontweight="bold",
)
self.ax.set_xlabel("Launch date", fontsize=10, fontweight="bold")
self.ax.set_ylabel("Arrival date", fontsize=10, fontweight="bold")
return (
dv_launch * u.km / u.s,
dv_arrival * u.km / u.s,
c3_launch * u.km ** 2 / u.s ** 2,
c3_arrival * u.km ** 2 / u.s ** 2,
tof * u.d,
)
| [
1,
529,
276,
1112,
420,
29958,
13428,
1503,
284,
348,
446,
29914,
3733,
15736,
307,
13,
15945,
29908,
13,
4013,
338,
278,
5314,
310,
282,
548,
305,
459,
6492,
13,
15945,
29908,
13,
5215,
12655,
408,
7442,
13,
3166,
8717,
14441,
1053,
10350,
408,
29311,
29892,
10340,
408,
318,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
13,
3166,
1248,
15736,
307,
29889,
29890,
397,
583,
1053,
313,
13,
1678,
11563,
29892,
13,
1678,
27441,
1524,
29892,
13,
1678,
16852,
29892,
13,
1678,
29389,
29891,
29892,
13,
1678,
17549,
29892,
13,
1678,
2448,
415,
1540,
29892,
13,
1678,
1858,
3066,
29892,
13,
1678,
12178,
595,
29892,
13,
1678,
8991,
29892,
13,
1678,
501,
661,
375,
29892,
13,
1678,
9548,
375,
29892,
13,
29897,
13,
3166,
1248,
15736,
307,
29889,
1171,
12932,
369,
1053,
341,
1662,
29884,
369,
13,
3166,
1248,
15736,
307,
29889,
7516,
711,
1486,
29889,
272,
2966,
1053,
1394,
2966,
13,
3166,
1248,
15736,
307,
29889,
4422,
1053,
6056,
13,
13,
13,
1753,
903,
657,
29918,
3859,
29898,
2587,
29892,
931,
1125,
13,
1678,
9995,
11796,
267,
278,
2602,
310,
263,
3573,
363,
263,
2183,
931,
29889,
9995,
13,
13,
1678,
21635,
29918,
5205,
29918,
29890,
397,
583,
353,
518,
13,
4706,
8991,
29892,
13,
4706,
29389,
29891,
29892,
13,
4706,
9548,
375,
29892,
13,
4706,
11563,
29892,
13,
4706,
17549,
29892,
13,
4706,
16852,
29892,
13,
4706,
27441,
1524,
29892,
13,
4706,
12178,
595,
29892,
13,
4706,
501,
661,
375,
29892,
13,
4706,
2448,
415,
1540,
29892,
13,
4706,
1858,
3066,
29892,
13,
1678,
4514,
13,
13,
1678,
396,
1334,
1423,
565,
3573,
14393,
304,
1248,
15736,
307,
29889,
29890,
397,
583,
13,
1678,
565,
3573,
297,
21635,
29918,
5205,
29918,
29890,
397,
583,
29901,
13,
4706,
364,
29878,
29892,
325,
29894,
353,
29311,
29889,
657,
29918,
2587,
29918,
29890,
653,
1760,
2200,
29918,
1066,
955,
29898,
2587,
29889,
978,
29892,
931,
29897,
13,
1678,
1683,
29901,
13,
4706,
364,
29878,
29892,
325,
29894,
353,
3573,
29889,
7728,
351,
403,
29898,
2230,
467,
15291,
580,
13,
4706,
364,
29878,
353,
29311,
29889,
25233,
18970,
1123,
26081,
29898,
21478,
29897,
13,
4706,
325,
29894,
353,
29311,
29889,
25233,
18970,
1123,
26081,
29898,
29894,
29894,
29897,
13,
13,
1678,
736,
364,
29878,
29889,
20230,
29892,
325,
29894,
29889,
20230,
13,
13,
13,
1753,
903,
5182,
1259,
29898,
311,
1595,
545,
29918,
2587,
29892,
3646,
29918,
2587,
29892,
260,
29918,
15343,
29892,
260,
29918,
279,
15081,
1125,
13,
1678,
9995,
4013,
740,
3639,
278,
11924,
297,
25619,
322,
18517,
9110,
1907,
1213,
15945,
13,
13,
1678,
396,
3617,
2602,
322,
9110,
1907,
363,
25619,
322,
18517,
13,
1678,
364,
29878,
29918,
29881,
415,
29918,
2587,
29892,
325,
29894,
29918,
29881,
415,
29918,
2587,
353,
903,
657,
29918,
3859,
29898,
311,
1595,
545,
29918,
2587,
29892,
260,
29918,
15343,
29897,
13,
1678,
364,
29878,
29918,
2749,
29918,
2587,
29892,
325,
29894,
29918,
2749,
29918,
2587,
353,
903,
657,
29918,
3859,
29898,
5182,
29918,
2587,
29892,
260,
29918,
279,
15081,
29897,
13,
13,
1678,
396,
4103,
689,
964,
1394,
2966,
3618,
13,
1678,
13978,
272,
353,
25619,
29918,
2587,
29889,
3560,
13,
1678,
17971,
29918,
29881,
415,
353,
1394,
2966,
29889,
3166,
29918,
345,
14359,
29898,
1131,
28891,
29892,
364,
29878,
29918,
29881,
415,
29918,
2587,
29892,
325,
29894,
29918,
29881,
415,
29918,
2587,
29892,
21502,
305,
29922,
29873,
29918,
15343,
29897,
13,
1678,
17971,
29918,
2749,
353,
1394,
2966,
29889,
3166,
29918,
345,
14359,
29898,
1131,
28891,
29892,
364,
29878,
29918,
2749,
29918,
2587,
29892,
325,
29894,
29918,
2749,
29918,
2587,
29892,
21502,
305,
29922,
29873,
29918,
279,
15081,
29897,
13,
13,
1678,
396,
22402,
931,
310,
16286,
13,
1678,
304,
29888,
353,
17971,
29918,
2749,
29889,
1022,
2878,
448,
17971,
29918,
29881,
415,
29889,
1022,
2878,
13,
13,
1678,
565,
304,
29888,
5277,
29871,
29900,
29901,
13,
4706,
736,
6213,
29892,
6213,
29892,
6213,
29892,
6213,
29892,
6213,
13,
13,
1678,
1018,
29901,
13,
4706,
396,
12718,
2151,
338,
1286,
263,
341,
1662,
29884,
369,
1203,
13,
4706,
767,
29918,
5288,
2151,
353,
341,
1662,
29884,
369,
29889,
5288,
2151,
29898,
893,
29918,
29881,
415,
29892,
17971,
29918,
2749,
29897,
13,
13,
4706,
396,
3617,
6056,
19471,
9110,
1907,
13,
4706,
14897,
29918,
29881,
415,
353,
6056,
29898,
1171,
29918,
5288,
2151,
29889,
6574,
7273,
267,
29961,
29900,
3816,
29896,
2314,
13,
4706,
14897,
29918,
2749,
353,
6056,
29898,
1171,
29918,
5288,
2151,
29889,
6574,
7273,
267,
29961,
29896,
3816,
29896,
2314,
13,
13,
4706,
396,
11796,
29872,
599,
278,
1962,
3651,
13,
4706,
274,
29941,
29918,
15343,
353,
14897,
29918,
29881,
415,
3579,
29871,
29906,
13,
4706,
274,
29941,
29918,
279,
15081,
353,
14897,
29918,
2749,
3579,
29871,
29906,
13,
13,
4706,
736,
313,
13,
9651,
14897,
29918,
29881,
415,
29889,
517,
29898,
29884,
29889,
8848,
847,
318,
29889,
29879,
467,
1767,
29892,
13,
9651,
14897,
29918,
2749,
29889,
517,
29898,
29884,
29889,
8848,
847,
318,
29889,
29879,
467,
1767,
29892,
13,
9651,
274,
29941,
29918,
15343,
29889,
517,
29898,
29884,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
467,
1767,
29892,
13,
9651,
274,
29941,
29918,
279,
15081,
29889,
517,
29898,
29884,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
467,
1767,
29892,
13,
9651,
304,
29888,
29889,
26012,
29892,
13,
4706,
1723,
13,
13,
1678,
5174,
16499,
291,
2392,
29901,
13,
4706,
736,
6213,
29892,
6213,
29892,
6213,
29892,
6213,
29892,
6213,
13,
13,
13,
29937,
12655,
29889,
8111,
675,
338,
21863,
292,
13,
5182,
1259,
29918,
2003,
353,
7442,
29889,
8111,
675,
29898,
13,
1678,
903,
5182,
1259,
29892,
13,
1678,
288,
8768,
11759,
9302,
29889,
299,
2378,
29892,
7442,
29889,
299,
2378,
29892,
7442,
29889,
299,
2378,
29892,
7442,
29889,
299,
2378,
29892,
7442,
29889,
299,
2378,
1402,
13,
1678,
429,
13347,
11759,
29900,
29892,
29871,
29896,
1402,
13,
29897,
13,
13,
13,
1990,
349,
548,
305,
459,
20867,
357,
29901,
13,
13,
1678,
9995,
13,
1678,
4134,
1954,
14607,
363,
349,
548,
305,
459,
18399,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
25619,
29918,
2587,
29901,
1248,
15736,
307,
29889,
29890,
397,
583,
29889,
8434,
13,
4706,
24928,
515,
607,
25619,
338,
2309,
13,
1678,
3646,
29918,
2587,
29901,
1248,
15736,
307,
29889,
29890,
397,
583,
29889,
8434,
13,
4706,
24928,
363,
3646,
1259,
13,
1678,
6826,
29918,
9653,
29901,
8717,
14441,
29889,
2230,
29889,
2481,
13,
4706,
5974,
10638,
363,
6826,
13,
1678,
18517,
29918,
9653,
29901,
8717,
14441,
29889,
2230,
29889,
2481,
13,
4706,
5974,
10638,
363,
18517,
13,
1678,
4853,
29901,
22889,
29889,
1165,
267,
29889,
29909,
9100,
29901,
13,
4706,
1152,
2888,
13994,
13,
1678,
260,
1579,
29901,
7223,
13,
4706,
1152,
6492,
1259,
931,
16286,
640,
473,
3454,
13,
1678,
325,
28887,
29901,
7223,
13,
4706,
1152,
6492,
1259,
18517,
12885,
640,
473,
3454,
13,
1678,
4236,
29918,
29883,
29941,
29901,
5785,
13,
4706,
317,
1691,
278,
7472,
315,
29941,
995,
363,
282,
548,
305,
459,
13,
1678,
4236,
29918,
29894,
28887,
29901,
5785,
13,
4706,
317,
1691,
278,
7472,
18517,
12885,
363,
282,
548,
305,
459,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
25619,
29918,
2587,
29892,
13,
4706,
3646,
29918,
2587,
29892,
13,
4706,
6826,
29918,
9653,
29892,
13,
4706,
18517,
29918,
9653,
29892,
13,
4706,
4853,
29922,
8516,
29892,
13,
4706,
260,
1579,
29922,
5574,
29892,
13,
4706,
325,
28887,
29922,
5574,
29892,
13,
4706,
4236,
29918,
29883,
29941,
29922,
29946,
29945,
29889,
29900,
334,
318,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
29892,
13,
4706,
4236,
29918,
29894,
28887,
29922,
29945,
334,
318,
29889,
8848,
847,
318,
29889,
29879,
29892,
13,
268,
1125,
13,
4706,
1583,
29889,
311,
1595,
545,
29918,
2587,
353,
25619,
29918,
2587,
13,
4706,
1583,
29889,
5182,
29918,
2587,
353,
3646,
29918,
2587,
13,
4706,
1583,
29889,
15343,
29918,
9653,
353,
6826,
29918,
9653,
13,
4706,
1583,
29889,
279,
15081,
29918,
9653,
353,
18517,
29918,
9653,
13,
4706,
1583,
29889,
1165,
353,
4853,
13,
4706,
1583,
29889,
29873,
1579,
353,
260,
1579,
13,
4706,
1583,
29889,
29894,
28887,
353,
325,
28887,
13,
4706,
1583,
29889,
3317,
29918,
29883,
29941,
353,
4236,
29918,
29883,
29941,
13,
4706,
1583,
29889,
3317,
29918,
29894,
28887,
353,
4236,
29918,
29894,
28887,
13,
13,
1678,
822,
282,
548,
305,
459,
29898,
1311,
1125,
13,
4706,
9995,
3247,
1862,
282,
548,
305,
459,
1546,
1023,
17873,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
14897,
29918,
15343,
29901,
7442,
29889,
299,
2378,
13,
9651,
997,
3322,
19471,
325,
13,
4706,
14897,
29918,
279,
15081,
29901,
7442,
29889,
299,
2378,
13,
9651,
826,
15081,
19471,
325,
13,
4706,
274,
29941,
29918,
15343,
29901,
7442,
29889,
299,
2378,
13,
9651,
26804,
4695,
6826,
5864,
13,
4706,
274,
29941,
29918,
2749,
15081,
29901,
7442,
29889,
299,
2378,
13,
9651,
26804,
4695,
18517,
5864,
13,
4706,
304,
29888,
29901,
7442,
29889,
299,
2378,
13,
9651,
5974,
310,
16286,
363,
1269,
6782,
13,
13,
4706,
8741,
13,
4706,
448,
22158,
13,
4706,
8653,
515,
1248,
15736,
307,
29889,
5317,
1259,
29889,
29886,
548,
305,
459,
1053,
349,
548,
305,
459,
20867,
357,
13,
4706,
8653,
515,
1248,
15736,
307,
29889,
29890,
397,
583,
1053,
11563,
29892,
16852,
13,
4706,
8653,
515,
1248,
15736,
307,
29889,
4422,
1053,
931,
29918,
3881,
13,
4706,
8653,
6826,
29918,
9653,
353,
931,
29918,
3881,
703,
29906,
29900,
29900,
29945,
29899,
29900,
29946,
29899,
29941,
29900,
613,
1095,
543,
29906,
29900,
29900,
29945,
29899,
29896,
29900,
29899,
29900,
29955,
1159,
13,
4706,
8653,
18517,
29918,
9653,
353,
931,
29918,
3881,
703,
29906,
29900,
29900,
29945,
29899,
29896,
29896,
29899,
29896,
29953,
613,
1095,
543,
29906,
29900,
29900,
29953,
29899,
29896,
29906,
29899,
29906,
29896,
1159,
13,
4706,
8653,
282,
548,
305,
459,
29918,
5317,
353,
349,
548,
305,
459,
20867,
357,
29898,
29923,
28696,
29892,
16852,
29892,
6826,
29918,
9653,
29892,
18517,
29918,
9653,
29897,
13,
4706,
8653,
14897,
29918,
15343,
29892,
2906,
29918,
29881,
415,
29892,
274,
29941,
29881,
415,
29892,
274,
29941,
2749,
29892,
304,
29888,
353,
282,
548,
305,
459,
29918,
5317,
29889,
29886,
548,
305,
459,
580,
13,
13,
4706,
9995,
13,
13,
4706,
14897,
29918,
15343,
29892,
14897,
29918,
279,
15081,
29892,
274,
29941,
29918,
15343,
29892,
274,
29941,
29918,
279,
15081,
29892,
304,
29888,
353,
3646,
1259,
29918,
2003,
29898,
13,
9651,
1583,
29889,
311,
1595,
545,
29918,
2587,
29892,
13,
9651,
1583,
29889,
5182,
29918,
2587,
29892,
13,
9651,
1583,
29889,
15343,
29918,
9653,
29961,
9302,
29889,
1482,
8990,
29892,
584,
1402,
13,
9651,
1583,
29889,
279,
15081,
29918,
9653,
7503,
29892,
7442,
29889,
1482,
8990,
1402,
13,
4706,
1723,
13,
13,
4706,
396,
7370,
11580,
282,
548,
305,
459,
13,
13,
4706,
565,
1583,
29889,
1165,
338,
6213,
29901,
13,
9651,
2537,
29892,
1583,
29889,
1165,
353,
14770,
29889,
1491,
26762,
29898,
1003,
2311,
7607,
29896,
29945,
29892,
29871,
29896,
29945,
876,
13,
4706,
1683,
29901,
13,
9651,
2537,
353,
1583,
29889,
1165,
29889,
4532,
13,
13,
4706,
274,
29941,
29918,
5563,
29879,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
1583,
29889,
3317,
29918,
29883,
29941,
29889,
517,
29898,
29884,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
467,
1767,
29892,
29871,
29941,
29900,
29897,
13,
13,
4706,
274,
353,
1583,
29889,
1165,
29889,
1285,
473,
29888,
29898,
13,
9651,
518,
29928,
29889,
517,
29918,
12673,
580,
363,
360,
297,
1583,
29889,
15343,
29918,
9653,
1402,
13,
9651,
518,
29909,
29889,
517,
29918,
12673,
580,
363,
319,
297,
1583,
29889,
279,
15081,
29918,
9653,
1402,
13,
9651,
274,
29941,
29918,
15343,
29892,
13,
9651,
274,
29941,
29918,
5563,
29879,
29892,
13,
4706,
1723,
13,
13,
4706,
1196,
353,
1583,
29889,
1165,
29889,
1285,
473,
29898,
13,
9651,
518,
29928,
29889,
517,
29918,
12673,
580,
363,
360,
297,
1583,
29889,
15343,
29918,
9653,
1402,
13,
9651,
518,
29909,
29889,
517,
29918,
12673,
580,
363,
319,
297,
1583,
29889,
279,
15081,
29918,
9653,
1402,
13,
9651,
274,
29941,
29918,
15343,
29892,
13,
9651,
274,
29941,
29918,
5563,
29879,
29892,
13,
9651,
11955,
543,
8517,
613,
13,
9651,
6276,
342,
5577,
543,
2929,
333,
613,
13,
4706,
1723,
13,
13,
4706,
274,
1646,
353,
2537,
29889,
2780,
1646,
29898,
29883,
29897,
13,
4706,
274,
1646,
29889,
842,
29918,
1643,
703,
8848,
29906,
847,
269,
29906,
1159,
13,
4706,
1583,
29889,
1165,
29889,
695,
1107,
29898,
1220,
29892,
10583,
29922,
29896,
29892,
19200,
543,
29995,
29896,
29889,
29896,
29888,
613,
11955,
543,
29895,
613,
4079,
2311,
29922,
29896,
29900,
29897,
13,
13,
4706,
565,
1583,
29889,
29873,
1579,
29901,
13,
13,
9651,
931,
29918,
5563,
29879,
353,
7442,
29889,
1915,
3493,
29898,
29896,
29900,
29900,
29892,
29871,
29945,
29900,
29900,
29892,
29871,
29945,
29897,
13,
13,
9651,
260,
1579,
29918,
1285,
473,
353,
1583,
29889,
1165,
29889,
1285,
473,
29898,
13,
18884,
518,
29928,
29889,
517,
29918,
12673,
580,
363,
360,
297,
1583,
29889,
15343,
29918,
9653,
1402,
13,
18884,
518,
29909,
29889,
517,
29918,
12673,
580,
363,
319,
297,
1583,
29889,
279,
15081,
29918,
9653,
1402,
13,
18884,
304,
29888,
29892,
13,
18884,
931,
29918,
5563,
29879,
29892,
13,
18884,
11955,
543,
1127,
613,
13,
18884,
6276,
342,
5577,
543,
14592,
287,
613,
13,
18884,
1196,
2103,
29879,
29922,
29941,
29889,
29945,
29892,
13,
9651,
1723,
13,
13,
9651,
1583,
29889,
1165,
29889,
695,
1107,
29898,
29873,
1579,
29918,
1285,
473,
29892,
10583,
29922,
29896,
29892,
19200,
543,
29995,
29896,
29889,
29896,
29888,
613,
11955,
543,
29878,
613,
4079,
2311,
29922,
29896,
29946,
29897,
13,
13,
4706,
565,
1583,
29889,
29894,
28887,
29901,
13,
13,
9651,
325,
28887,
29918,
5563,
29879,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
1583,
29889,
3317,
29918,
29894,
28887,
29889,
517,
29898,
29884,
29889,
8848,
847,
318,
29889,
29879,
467,
1767,
29892,
29871,
29945,
29897,
13,
13,
9651,
325,
28887,
29918,
1285,
473,
353,
1583,
29889,
1165,
29889,
1285,
473,
29898,
13,
18884,
518,
29928,
29889,
517,
29918,
12673,
580,
363,
360,
297,
1583,
29889,
15343,
29918,
9653,
1402,
13,
18884,
518,
29909,
29889,
517,
29918,
12673,
580,
363,
319,
297,
1583,
29889,
279,
15081,
29918,
9653,
1402,
13,
18884,
14897,
29918,
279,
15081,
29892,
13,
18884,
325,
28887,
29918,
5563,
29879,
29892,
13,
18884,
11955,
543,
29876,
5301,
613,
13,
18884,
1196,
2103,
29879,
29922,
29906,
29889,
29900,
29892,
13,
9651,
1723,
13,
13,
9651,
1583,
29889,
1165,
29889,
695,
1107,
29898,
13,
18884,
325,
28887,
29918,
1285,
473,
29892,
10583,
29922,
29896,
29892,
19200,
543,
29995,
29896,
29889,
29896,
29888,
613,
11955,
543,
29876,
5301,
613,
4079,
2311,
29922,
29896,
29906,
13,
9651,
1723,
13,
13,
4706,
1583,
29889,
1165,
29889,
7720,
580,
13,
4706,
2537,
29889,
1300,
974,
4378,
29918,
29916,
1256,
580,
13,
13,
4706,
565,
451,
756,
5552,
29898,
1311,
29889,
5182,
29918,
2587,
29892,
376,
978,
29908,
1125,
13,
9651,
1583,
29889,
1165,
29889,
842,
29918,
3257,
29898,
13,
18884,
285,
29908,
29912,
1311,
29889,
311,
1595,
545,
29918,
2587,
29889,
978,
29913,
448,
17157,
24928,
363,
1629,
426,
1311,
29889,
15343,
29918,
9653,
29961,
29900,
1822,
12673,
29889,
6360,
1118,
315,
29941,
997,
3322,
613,
13,
18884,
4079,
2311,
29922,
29896,
29946,
29892,
13,
18884,
4079,
7915,
543,
8934,
613,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
1165,
29889,
842,
29918,
3257,
29898,
13,
18884,
285,
29908,
29912,
1311,
29889,
311,
1595,
545,
29918,
2587,
29889,
978,
29913,
448,
426,
1311,
29889,
5182,
29918,
2587,
29889,
978,
29913,
363,
1629,
426,
1311,
29889,
15343,
29918,
9653,
29961,
29900,
1822,
12673,
29889,
6360,
1118,
315,
29941,
997,
3322,
613,
13,
18884,
4079,
2311,
29922,
29896,
29946,
29892,
13,
18884,
4079,
7915,
543,
8934,
613,
13,
9651,
1723,
13,
13,
4706,
1583,
29889,
1165,
29889,
842,
29918,
29916,
1643,
703,
17641,
2635,
613,
4079,
2311,
29922,
29896,
29900,
29892,
4079,
7915,
543,
8934,
1159,
13,
4706,
1583,
29889,
1165,
29889,
842,
29918,
29891,
1643,
703,
1433,
15081,
2635,
613,
4079,
2311,
29922,
29896,
29900,
29892,
4079,
7915,
543,
8934,
1159,
13,
13,
4706,
736,
313,
13,
9651,
14897,
29918,
15343,
334,
318,
29889,
8848,
847,
318,
29889,
29879,
29892,
13,
9651,
14897,
29918,
279,
15081,
334,
318,
29889,
8848,
847,
318,
29889,
29879,
29892,
13,
9651,
274,
29941,
29918,
15343,
334,
318,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
29892,
13,
9651,
274,
29941,
29918,
279,
15081,
334,
318,
29889,
8848,
3579,
29871,
29906,
847,
318,
29889,
29879,
3579,
29871,
29906,
29892,
13,
9651,
304,
29888,
334,
318,
29889,
29881,
29892,
13,
4706,
1723,
13,
2
] |
utils.py | zrongcheng/srcnn | 0 | 39508 | <reponame>zrongcheng/srcnn
"""
Scipy version > 0.18 is needed, due to 'mode' option from scipy.misc.imread function
"""
import os
import glob
import h5py
import random
import matplotlib.pyplot as plt
from PIL import Image # for loading images as YCbCr format
import Scipy.misc
import Scipy.ndimage
import numpy as np
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS#全局变量
def read_data(path):
"""
Read h5 format data file
Args:
path: file path of desired file所需文件
data: '.h5' file format that contains train data values
label: '.h5' file format that contains train label values
"""
with h5py.File(path, 'r') as hf:
data = np.array(hf.get('data'))
label = np.array(hf.get('label'))
return data, label
def preprocess(path, scale=3):
"""
Preprocess single image file
(1) Read original image as YCbCr format (and grayscale as default)
(2) Normalize
(3) Apply image file with bicubic interpolation
唯一的预处理操作
Args:
path: file path of desired file
input_: image applied bicubic interpolation (low-resolution)
label_: image with original resolution (high-resolution)
"""
image = imread(path, is_grayscale=True)#??为什么灰度处理
label_ = modcrop(image, scale)
# Must be normalized
#image = image / 255.
label_ = label_ / 255.
#两次为了降低精度
input_ = Scipy.ndimage.interpolation.zoom(label_, zoom=(1. / scale), prefilter=False)#一次
input_ = Scipy.ndimage.interpolation.zoom(input_, zoom=(scale / 1.), prefilter=False)#二次,bicubic
#imsave(input_,r'F:\tf_py\srcnn\sample\test1.png')
#imsave(label_, r'F:\tf_py\srcnn\sample\test2.png')
return input_, label_
def prepare_data(dataset):
"""
Args:
dataset: choose train dataset or test dataset
For train dataset, output data would be ['.../t1.bmp', '.../t2.bmp', ..., '.../t99.bmp']
"""
if FLAGS.is_train:
#filenames = os.listdir(dataset)
data_dir = os.path.join(os.getcwd(), dataset)
# glob.glob()获取当前目录或相对路径所有文件的路径,输出一个list,读取字符中的*(通配符)
data = glob.glob(os.path.join(data_dir, "*.bmp"))
else:
data_dir = os.path.join(os.sep, (os.path.join(os.getcwd(), dataset)), "Set5")
data = glob.glob(os.path.join(data_dir, "*.bmp"))
return data
def make_data(data, label):
"""
Make input data as h5 file format
Depending on 'is_train' (flag value), savepath would be changed.
"""
if FLAGS.is_train:
savepath = os.path.join(os.getcwd(), 'checkpoint/train.h5')
else:
savepath = os.path.join(os.getcwd(), 'checkpoint/test.h5')
with h5py.File(savepath, 'w') as hf:
hf.create_dataset('data', data=data)
hf.create_dataset('label', data=label)
def imread(path, is_grayscale=True):
"""
Read image using its path.
Default value is gray-scale, and image is read by YCbCr format as the paper said.
"""
if is_grayscale:
return Scipy.misc.imread(path, flatten=True, mode='YCbCr').astype(np.float)#将图像转灰度
else:
return Scipy.misc.imread(path, mode='YCbCr').astype(np.float)#默认为false
def modcrop(image, scale=3):
"""
To scale down and up the original image, first thing to do is to have no remainder while scaling operation.
We need to find modulo of height (and width) and scale factor.
Then, subtract the modulo from height (and width) of original image size.
There would be no remainder even after scaling operation.
要缩放原始图像, 首先要做的是在缩放操作时没有余数。
我们需要找到高度 (和宽度) 和比例因子的模。
然后, 减去原始图像大小的高度 (和宽度) 的模。
即使在缩放操作之后, 也不会有余数。
"""
if len(image.shape) == 3:#彩色 800*600*3
h, w, _ = image.shape
h = h - np.mod(h, scale)
w = w - np.mod(w, scale)
image = image[0:h, 0:w, :]
else:#灰度 800*600
h, w = image.shape
h = h - np.mod(h, scale)
w = w - np.mod(w, scale)
image = image[0:h, 0:w]
return image
def input_setup(config):
"""
Read image files and make their sub-images and saved them as a h5 file format.
"""
# Load data path
if config.is_train:
data = prepare_data(dataset="Train")
else:
data = prepare_data(dataset="Test")
sub_input_sequence = []
sub_label_sequence = []
padding = abs(config.image_size - config.label_size) // 2 # 6 填充
if config.is_train:
for i in range(len(data)):
input_, label_ = preprocess(data[i], config.scale)#data[i]为数据目录
if len(input_.shape) == 3:
h, w, _ = input_.shape
else:
h, w = input_.shape
#。。。
for x in range(0, h-config.image_size+1, config.stride):
for y in range(0, w-config.image_size+1, config.stride):
sub_input = input_[x:x+config.image_size, y:y+config.image_size] # [33 x 33]
sub_label = label_[x+padding:x+padding+config.label_size,
y+padding:y+padding+config.label_size] # [21 x 21]
# Make channel value,颜色通道1
sub_input = sub_input.reshape([config.image_size, config.image_size, 1])
sub_label = sub_label.reshape([config.label_size, config.label_size, 1])
sub_input_sequence.append(sub_input)
sub_label_sequence.append(sub_label)
# Make list to numpy array. With this transform
arrdata = np.asarray(sub_input_sequence) # [?, 33, 33, 1]
arrlabel = np.asarray(sub_label_sequence) # [?, 21, 21, 1]
make_data(arrdata, arrlabel) # 把处理好的数据进行存储,路径为checkpoint/..
else:
input_, label_ = preprocess(data[4], config.scale)
if len(input_.shape) == 3:
h, w, _ = input_.shape
else:
h, w = input_.shape
input = input_.reshape([h,w,1])
label=label_[6:h-6,6:w-6]
label=label.reshape([h-12,w-12,1])
sub_input_sequence.append(input)
sub_label_sequence.append(label)
input1 = np.asarray(sub_input_sequence)
label1 = np.asarray(sub_label_sequence)
#label=label_.reshape([height,weight,1])
return input1,label1,h,w
# # Numbers of sub-images in height and width of image are needed to compute merge operation.
# nx = ny = 0
# for x in range(0, h-config.image_size+1, config.stride):
# nx += 1; ny = 0
# for y in range(0, w-config.image_size+1, config.stride):
# ny += 1
# sub_input = input_[x:x+config.image_size, y:y+config.image_size] # [33 x 33]
# sub_label = label_[x+padding:x+padding+config.label_size,
# y+padding:y+padding+config.label_size] # [21 x 21]
#
# sub_input = sub_input.reshape([config.image_size, config.image_size, 1])
# sub_label = sub_label.reshape([config.label_size, config.label_size, 1])
#
# sub_input_sequence.append(sub_input)
# sub_label_sequence.append(sub_label)
"""
len(sub_input_sequence) : the number of sub_input (33 x 33 x ch) in one image
(sub_input_sequence[0]).shape : (33, 33, 1)
"""
# if not config.is_train:
# return nx, ny
def imsave(image, path):
return Scipy.misc.imsave(path, image)
# def merge(images, size):
# h, w = images.shape[1], images.shape[2]#21*21
# p,q,j=0,0,0
# img = np.zeros((14*(size[0]-1)+21, 14*(size[1]-1)+21, 1))
# for idx, image in enumerate(images):#image.shape=(21,21,1)
# i = idx % size[1]#余数
# t=j
# j = idx // size[1]#商
# if (j-t)==1:
# p=p+14
# q=0
# #img[0:21,0:21,:]=image
# img[p:p+h, q:q+w, :] = image
#
# q=q+14
#
# return img
| [
1,
529,
276,
1112,
420,
29958,
29920,
29373,
305,
996,
29914,
4351,
15755,
13,
15945,
29908,
13,
29903,
455,
2272,
1873,
1405,
29871,
29900,
29889,
29896,
29947,
338,
4312,
29892,
2861,
304,
525,
8513,
29915,
2984,
515,
4560,
2272,
29889,
29885,
10669,
29889,
326,
949,
740,
13,
15945,
29908,
13,
13,
5215,
2897,
13,
5215,
13149,
13,
5215,
298,
29945,
2272,
13,
5215,
4036,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
3166,
349,
6227,
1053,
7084,
29871,
396,
363,
8363,
4558,
408,
612,
29907,
29890,
20647,
3402,
13,
5215,
5636,
2272,
29889,
29885,
10669,
13,
5215,
5636,
2272,
29889,
299,
3027,
13,
5215,
12655,
408,
7442,
13,
13,
5215,
26110,
408,
15886,
13,
13,
18823,
10749,
353,
15886,
29889,
932,
29889,
15764,
29889,
18823,
10749,
29937,
30753,
31655,
31462,
31180,
13,
1753,
1303,
29918,
1272,
29898,
2084,
1125,
13,
29871,
9995,
13,
29871,
7523,
298,
29945,
3402,
848,
934,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2224,
29901,
934,
2224,
310,
7429,
934,
30744,
31383,
30333,
30631,
13,
1678,
848,
29901,
15300,
29882,
29945,
29915,
934,
3402,
393,
3743,
7945,
848,
1819,
13,
1678,
3858,
29901,
15300,
29882,
29945,
29915,
934,
3402,
393,
3743,
7945,
3858,
1819,
13,
29871,
9995,
13,
29871,
411,
298,
29945,
2272,
29889,
2283,
29898,
2084,
29892,
525,
29878,
1495,
408,
298,
29888,
29901,
13,
1678,
848,
353,
7442,
29889,
2378,
29898,
29882,
29888,
29889,
657,
877,
1272,
8785,
13,
1678,
3858,
353,
7442,
29889,
2378,
29898,
29882,
29888,
29889,
657,
877,
1643,
8785,
13,
1678,
736,
848,
29892,
3858,
13,
13,
1753,
758,
5014,
29898,
2084,
29892,
6287,
29922,
29941,
1125,
13,
29871,
9995,
13,
29871,
4721,
5014,
2323,
1967,
934,
29871,
13,
1678,
313,
29896,
29897,
7523,
2441,
1967,
408,
612,
29907,
29890,
20647,
3402,
313,
392,
16749,
7052,
408,
2322,
29897,
13,
1678,
313,
29906,
29897,
21981,
675,
13,
1678,
313,
29941,
29897,
2401,
368,
1967,
934,
411,
289,
293,
431,
293,
29694,
13,
268,
232,
151,
178,
30287,
30210,
236,
165,
135,
31548,
30687,
31904,
30732,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2224,
29901,
934,
2224,
310,
7429,
934,
13,
1678,
1881,
29918,
29901,
1967,
7436,
289,
293,
431,
293,
29694,
313,
677,
29899,
9778,
918,
29897,
13,
1678,
3858,
29918,
29901,
1967,
411,
2441,
10104,
313,
9812,
29899,
9778,
918,
29897,
13,
29871,
9995,
13,
29871,
1967,
353,
527,
949,
29898,
2084,
29892,
338,
29918,
21012,
7052,
29922,
5574,
29897,
29937,
30882,
30882,
30573,
231,
190,
131,
31882,
234,
132,
179,
30898,
31548,
30687,
13,
29871,
3858,
29918,
353,
878,
29883,
1336,
29898,
3027,
29892,
6287,
29897,
13,
13,
29871,
396,
19928,
367,
4226,
1891,
13,
29871,
396,
3027,
353,
1967,
847,
29871,
29906,
29945,
29945,
29889,
13,
29871,
3858,
29918,
353,
3858,
29918,
847,
29871,
29906,
29945,
29945,
29889,
13,
29871,
396,
31977,
30936,
30573,
30743,
236,
156,
144,
231,
192,
145,
234,
181,
193,
30898,
13,
29871,
1881,
29918,
353,
5636,
2272,
29889,
299,
3027,
29889,
1639,
3733,
362,
29889,
2502,
290,
29898,
1643,
3383,
19342,
7607,
29896,
29889,
847,
6287,
511,
758,
4572,
29922,
8824,
29897,
29937,
30287,
30936,
13,
29871,
1881,
29918,
353,
5636,
2272,
29889,
299,
3027,
29889,
1639,
3733,
362,
29889,
2502,
290,
29898,
2080,
3383,
19342,
7607,
7052,
847,
29871,
29896,
9774,
758,
4572,
29922,
8824,
29897,
29937,
30685,
30936,
30214,
29890,
293,
431,
293,
13,
29871,
396,
326,
7620,
29898,
2080,
3383,
29878,
29915,
29943,
3583,
13264,
29918,
2272,
29905,
4351,
15755,
29905,
11249,
29905,
1688,
29896,
29889,
2732,
1495,
13,
29871,
396,
326,
7620,
29898,
1643,
3383,
364,
29915,
29943,
3583,
13264,
29918,
2272,
29905,
4351,
15755,
29905,
11249,
29905,
1688,
29906,
29889,
2732,
1495,
13,
29871,
736,
1881,
3383,
3858,
29918,
13,
13,
1753,
19012,
29918,
1272,
29898,
24713,
1125,
13,
29871,
9995,
13,
29871,
826,
3174,
29901,
13,
1678,
8783,
29901,
6755,
7945,
8783,
470,
1243,
8783,
13,
268,
13,
1678,
1152,
7945,
8783,
29892,
1962,
848,
723,
367,
6024,
856,
29914,
29873,
29896,
29889,
29890,
1526,
742,
525,
856,
29914,
29873,
29906,
29889,
29890,
1526,
742,
2023,
29892,
525,
856,
29914,
29873,
29929,
29929,
29889,
29890,
1526,
2033,
13,
29871,
9995,
13,
29871,
565,
383,
4375,
10749,
29889,
275,
29918,
14968,
29901,
13,
1678,
396,
1777,
264,
1280,
353,
2897,
29889,
1761,
3972,
29898,
24713,
29897,
13,
1678,
848,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
8783,
29897,
13,
1678,
396,
13149,
29889,
23705,
580,
31024,
30683,
30948,
30658,
30895,
31283,
31391,
30990,
30783,
30874,
232,
193,
135,
30744,
30417,
30333,
30631,
30210,
30874,
232,
193,
135,
30214,
31573,
30544,
30287,
30502,
1761,
30214,
235,
178,
190,
30683,
30578,
31277,
30275,
30210,
16395,
30768,
31361,
31277,
29897,
13,
1678,
848,
353,
13149,
29889,
23705,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
376,
10521,
29890,
1526,
5783,
13,
29871,
1683,
29901,
13,
1678,
848,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
19570,
29892,
313,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
8783,
8243,
376,
2697,
29945,
1159,
13,
1678,
848,
353,
13149,
29889,
23705,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
376,
10521,
29890,
1526,
5783,
13,
13,
29871,
736,
848,
13,
13,
1753,
1207,
29918,
1272,
29898,
1272,
29892,
3858,
1125,
13,
29871,
9995,
13,
29871,
8561,
1881,
848,
408,
298,
29945,
934,
3402,
13,
29871,
28277,
373,
525,
275,
29918,
14968,
29915,
313,
15581,
995,
511,
4078,
2084,
723,
367,
3939,
29889,
13,
29871,
9995,
13,
29871,
565,
383,
4375,
10749,
29889,
275,
29918,
14968,
29901,
13,
1678,
4078,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
525,
3198,
3149,
29914,
14968,
29889,
29882,
29945,
1495,
13,
29871,
1683,
29901,
13,
1678,
4078,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
525,
3198,
3149,
29914,
1688,
29889,
29882,
29945,
1495,
13,
13,
29871,
411,
298,
29945,
2272,
29889,
2283,
29898,
7620,
2084,
29892,
525,
29893,
1495,
408,
298,
29888,
29901,
13,
1678,
298,
29888,
29889,
3258,
29918,
24713,
877,
1272,
742,
848,
29922,
1272,
29897,
13,
1678,
298,
29888,
29889,
3258,
29918,
24713,
877,
1643,
742,
848,
29922,
1643,
29897,
13,
13,
1753,
527,
949,
29898,
2084,
29892,
338,
29918,
21012,
7052,
29922,
5574,
1125,
13,
29871,
9995,
13,
29871,
7523,
1967,
773,
967,
2224,
29889,
13,
29871,
13109,
995,
338,
16749,
29899,
7052,
29892,
322,
1967,
338,
1303,
491,
612,
29907,
29890,
20647,
3402,
408,
278,
5650,
1497,
29889,
13,
29871,
9995,
13,
29871,
565,
338,
29918,
21012,
7052,
29901,
13,
1678,
736,
5636,
2272,
29889,
29885,
10669,
29889,
326,
949,
29898,
2084,
29892,
1652,
8606,
29922,
5574,
29892,
4464,
2433,
29979,
29907,
29890,
20647,
2824,
579,
668,
29898,
9302,
29889,
7411,
29897,
29937,
30998,
30861,
31551,
31415,
234,
132,
179,
30898,
13,
29871,
1683,
29901,
13,
1678,
736,
5636,
2272,
29889,
29885,
10669,
29889,
326,
949,
29898,
2084,
29892,
4464,
2433,
29979,
29907,
29890,
20647,
2824,
579,
668,
29898,
9302,
29889,
7411,
29897,
29937,
31735,
31439,
30573,
4541,
13,
13,
1753,
878,
29883,
1336,
29898,
3027,
29892,
6287,
29922,
29941,
1125,
13,
29871,
9995,
13,
29871,
1763,
6287,
1623,
322,
701,
278,
2441,
1967,
29892,
937,
2655,
304,
437,
338,
304,
505,
694,
21162,
1550,
21640,
5858,
29889,
13,
259,
13,
29871,
1334,
817,
304,
1284,
878,
7207,
310,
3171,
313,
392,
2920,
29897,
322,
6287,
7329,
29889,
13,
29871,
1987,
29892,
23197,
278,
878,
7207,
515,
3171,
313,
392,
2920,
29897,
310,
2441,
1967,
2159,
29889,
13,
29871,
1670,
723,
367,
694,
21162,
1584,
1156,
21640,
5858,
29889,
13,
259,
30698,
234,
191,
172,
31182,
30667,
31020,
30861,
31551,
29892,
29871,
31688,
31244,
30698,
232,
132,
157,
30210,
30392,
30505,
234,
191,
172,
31182,
31904,
30732,
30594,
31423,
30417,
231,
192,
156,
30354,
30267,
13,
13,
259,
30672,
31381,
31383,
30698,
233,
140,
193,
30780,
30528,
30898,
313,
30503,
232,
177,
192,
30898,
29897,
29871,
30503,
31419,
31507,
31570,
30319,
30210,
31382,
30267,
13,
259,
31516,
30822,
29892,
29871,
232,
138,
146,
31475,
30667,
31020,
30861,
31551,
30257,
30446,
30210,
30528,
30898,
313,
30503,
232,
177,
192,
30898,
29897,
29871,
30210,
31382,
30267,
13,
259,
232,
144,
182,
30785,
30505,
234,
191,
172,
31182,
31904,
30732,
30577,
30822,
29892,
29871,
30953,
30413,
30437,
30417,
231,
192,
156,
30354,
30267,
13,
29871,
9995,
13,
29871,
565,
7431,
29898,
3027,
29889,
12181,
29897,
1275,
29871,
29941,
21968,
232,
192,
172,
31085,
29871,
29947,
29900,
29900,
29930,
29953,
29900,
29900,
29930,
29941,
13,
1678,
298,
29892,
281,
29892,
903,
353,
1967,
29889,
12181,
13,
1678,
298,
353,
298,
448,
7442,
29889,
1545,
29898,
29882,
29892,
6287,
29897,
13,
1678,
281,
353,
281,
448,
7442,
29889,
1545,
29898,
29893,
29892,
6287,
29897,
13,
1678,
1967,
353,
1967,
29961,
29900,
29901,
29882,
29892,
29871,
29900,
29901,
29893,
29892,
584,
29962,
13,
29871,
1683,
21968,
234,
132,
179,
30898,
29871,
29947,
29900,
29900,
29930,
29953,
29900,
29900,
13,
1678,
298,
29892,
281,
353,
1967,
29889,
12181,
13,
1678,
298,
353,
298,
448,
7442,
29889,
1545,
29898,
29882,
29892,
6287,
29897,
13,
1678,
281,
353,
281,
448,
7442,
29889,
1545,
29898,
29893,
29892,
6287,
29897,
13,
1678,
1967,
353,
1967,
29961,
29900,
29901,
29882,
29892,
29871,
29900,
29901,
29893,
29962,
13,
29871,
736,
1967,
13,
13,
1753,
1881,
29918,
14669,
29898,
2917,
1125,
13,
29871,
9995,
13,
29871,
7523,
1967,
2066,
322,
1207,
1009,
1014,
29899,
8346,
322,
7160,
963,
408,
263,
298,
29945,
934,
3402,
29889,
13,
29871,
9995,
13,
29871,
396,
16012,
848,
2224,
13,
29871,
565,
2295,
29889,
275,
29918,
14968,
29901,
13,
1678,
848,
353,
19012,
29918,
1272,
29898,
24713,
543,
5323,
262,
1159,
13,
29871,
1683,
29901,
13,
1678,
848,
353,
19012,
29918,
1272,
29898,
24713,
543,
3057,
1159,
13,
13,
29871,
1014,
29918,
2080,
29918,
16506,
353,
5159,
13,
29871,
1014,
29918,
1643,
29918,
16506,
353,
5159,
13,
29871,
7164,
353,
6425,
29898,
2917,
29889,
3027,
29918,
2311,
448,
2295,
29889,
1643,
29918,
2311,
29897,
849,
29871,
29906,
396,
29871,
29953,
29871,
232,
164,
174,
232,
136,
136,
13,
13,
29871,
565,
2295,
29889,
275,
29918,
14968,
29901,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1272,
22164,
13,
418,
1881,
3383,
3858,
29918,
353,
758,
5014,
29898,
1272,
29961,
29875,
1402,
2295,
29889,
7052,
29897,
29937,
1272,
29961,
29875,
29962,
30573,
30354,
30763,
30895,
31283,
13,
13,
418,
565,
7431,
29898,
2080,
5396,
12181,
29897,
1275,
29871,
29941,
29901,
13,
4706,
298,
29892,
281,
29892,
903,
353,
1881,
5396,
12181,
13,
418,
1683,
29901,
13,
4706,
298,
29892,
281,
353,
1881,
5396,
12181,
13,
418,
396,
30267,
30267,
30267,
13,
418,
363,
921,
297,
3464,
29898,
29900,
29892,
298,
29899,
2917,
29889,
3027,
29918,
2311,
29974,
29896,
29892,
2295,
29889,
303,
2426,
1125,
13,
4706,
363,
343,
297,
3464,
29898,
29900,
29892,
281,
29899,
2917,
29889,
3027,
29918,
2311,
29974,
29896,
29892,
2295,
29889,
303,
2426,
1125,
13,
3986,
1014,
29918,
2080,
353,
1881,
29918,
29961,
29916,
29901,
29916,
29974,
2917,
29889,
3027,
29918,
2311,
29892,
343,
29901,
29891,
29974,
2917,
29889,
3027,
29918,
2311,
29962,
396,
518,
29941,
29941,
921,
29871,
29941,
29941,
29962,
13,
3986,
1014,
29918,
1643,
353,
3858,
29918,
29961,
29916,
29974,
12791,
29901,
29916,
29974,
12791,
29974,
2917,
29889,
1643,
29918,
2311,
29892,
13,
462,
418,
343,
29974,
12791,
29901,
29891,
29974,
12791,
29974,
2917,
29889,
1643,
29918,
2311,
29962,
396,
518,
29906,
29896,
921,
29871,
29906,
29896,
29962,
13,
13,
3986,
396,
8561,
8242,
995,
29892,
236,
165,
159,
31085,
30768,
30397,
29896,
13,
3986,
1014,
29918,
2080,
353,
1014,
29918,
2080,
29889,
690,
14443,
4197,
2917,
29889,
3027,
29918,
2311,
29892,
2295,
29889,
3027,
29918,
2311,
29892,
29871,
29896,
2314,
13,
3986,
1014,
29918,
1643,
353,
1014,
29918,
1643,
29889,
690,
14443,
4197,
2917,
29889,
1643,
29918,
2311,
29892,
2295,
29889,
1643,
29918,
2311,
29892,
29871,
29896,
2314,
13,
13,
3986,
1014,
29918,
2080,
29918,
16506,
29889,
4397,
29898,
1491,
29918,
2080,
29897,
13,
3986,
1014,
29918,
1643,
29918,
16506,
29889,
4397,
29898,
1491,
29918,
1643,
29897,
13,
1678,
396,
8561,
1051,
304,
12655,
1409,
29889,
2973,
445,
4327,
13,
1678,
3948,
1272,
353,
7442,
29889,
294,
2378,
29898,
1491,
29918,
2080,
29918,
16506,
29897,
29871,
396,
518,
14579,
29871,
29941,
29941,
29892,
29871,
29941,
29941,
29892,
29871,
29896,
29962,
13,
1678,
3948,
1643,
353,
7442,
29889,
294,
2378,
29898,
1491,
29918,
1643,
29918,
16506,
29897,
29871,
396,
518,
14579,
29871,
29906,
29896,
29892,
29871,
29906,
29896,
29892,
29871,
29896,
29962,
13,
13,
1678,
1207,
29918,
1272,
29898,
2749,
1272,
29892,
3948,
1643,
29897,
29871,
396,
29871,
233,
141,
141,
31548,
30687,
31076,
30210,
30354,
30763,
31174,
30448,
30946,
232,
133,
171,
30214,
30874,
232,
193,
135,
30573,
3198,
3149,
29914,
636,
13,
29871,
1683,
29901,
13,
1678,
1881,
3383,
3858,
29918,
353,
758,
5014,
29898,
1272,
29961,
29946,
1402,
2295,
29889,
7052,
29897,
13,
13,
1678,
565,
7431,
29898,
2080,
5396,
12181,
29897,
1275,
29871,
29941,
29901,
13,
418,
298,
29892,
281,
29892,
903,
353,
1881,
5396,
12181,
13,
1678,
1683,
29901,
13,
418,
298,
29892,
281,
353,
1881,
5396,
12181,
13,
1678,
1881,
353,
1881,
5396,
690,
14443,
4197,
29882,
29892,
29893,
29892,
29896,
2314,
13,
13,
1678,
3858,
29922,
1643,
29918,
29961,
29953,
29901,
29882,
29899,
29953,
29892,
29953,
29901,
29893,
29899,
29953,
29962,
13,
1678,
3858,
29922,
1643,
29889,
690,
14443,
4197,
29882,
29899,
29896,
29906,
29892,
29893,
29899,
29896,
29906,
29892,
29896,
2314,
13,
13,
1678,
1014,
29918,
2080,
29918,
16506,
29889,
4397,
29898,
2080,
29897,
13,
1678,
1014,
29918,
1643,
29918,
16506,
29889,
4397,
29898,
1643,
29897,
13,
13,
1678,
1881,
29896,
353,
7442,
29889,
294,
2378,
29898,
1491,
29918,
2080,
29918,
16506,
29897,
13,
1678,
3858,
29896,
353,
7442,
29889,
294,
2378,
29898,
1491,
29918,
1643,
29918,
16506,
29897,
13,
1678,
396,
1643,
29922,
1643,
5396,
690,
14443,
4197,
3545,
29892,
7915,
29892,
29896,
2314,
13,
1678,
736,
1881,
29896,
29892,
1643,
29896,
29892,
29882,
29892,
29893,
13,
1678,
396,
396,
11848,
2596,
310,
1014,
29899,
8346,
297,
3171,
322,
2920,
310,
1967,
526,
4312,
304,
10272,
10366,
5858,
29889,
13,
1678,
396,
302,
29916,
353,
7098,
353,
29871,
29900,
13,
1678,
396,
363,
921,
297,
3464,
29898,
29900,
29892,
298,
29899,
2917,
29889,
3027,
29918,
2311,
29974,
29896,
29892,
2295,
29889,
303,
2426,
1125,
13,
1678,
396,
259,
302,
29916,
4619,
29871,
29896,
29936,
7098,
353,
29871,
29900,
13,
1678,
396,
259,
363,
343,
297,
3464,
29898,
29900,
29892,
281,
29899,
2917,
29889,
3027,
29918,
2311,
29974,
29896,
29892,
2295,
29889,
303,
2426,
1125,
13,
1678,
396,
268,
7098,
4619,
29871,
29896,
13,
1678,
396,
268,
1014,
29918,
2080,
353,
1881,
29918,
29961,
29916,
29901,
29916,
29974,
2917,
29889,
3027,
29918,
2311,
29892,
343,
29901,
29891,
29974,
2917,
29889,
3027,
29918,
2311,
29962,
396,
518,
29941,
29941,
921,
29871,
29941,
29941,
29962,
13,
1678,
396,
268,
1014,
29918,
1643,
353,
3858,
29918,
29961,
29916,
29974,
12791,
29901,
29916,
29974,
12791,
29974,
2917,
29889,
1643,
29918,
2311,
29892,
13,
1678,
396,
462,
343,
29974,
12791,
29901,
29891,
29974,
12791,
29974,
2917,
29889,
1643,
29918,
2311,
29962,
396,
518,
29906,
29896,
921,
29871,
29906,
29896,
29962,
13,
1678,
396,
13,
1678,
396,
268,
1014,
29918,
2080,
353,
1014,
29918,
2080,
29889,
690,
14443,
4197,
2917,
29889,
3027,
29918,
2311,
29892,
2295,
29889,
3027,
29918,
2311,
29892,
29871,
29896,
2314,
13,
1678,
396,
268,
1014,
29918,
1643,
353,
1014,
29918,
1643,
29889,
690,
14443,
4197,
2917,
29889,
1643,
29918,
2311,
29892,
2295,
29889,
1643,
29918,
2311,
29892,
29871,
29896,
2314,
13,
1678,
396,
13,
1678,
396,
268,
1014,
29918,
2080,
29918,
16506,
29889,
4397,
29898,
1491,
29918,
2080,
29897,
13,
1678,
396,
268,
1014,
29918,
1643,
29918,
16506,
29889,
4397,
29898,
1491,
29918,
1643,
29897,
13,
13,
29871,
9995,
13,
29871,
7431,
29898,
1491,
29918,
2080,
29918,
16506,
29897,
584,
278,
1353,
310,
1014,
29918,
2080,
313,
29941,
29941,
921,
29871,
29941,
29941,
921,
521,
29897,
297,
697,
1967,
13,
29871,
313,
1491,
29918,
2080,
29918,
16506,
29961,
29900,
14664,
12181,
584,
313,
29941,
29941,
29892,
29871,
29941,
29941,
29892,
29871,
29896,
29897,
13,
29871,
9995,
13,
13,
13,
13,
29871,
396,
565,
451,
2295,
29889,
275,
29918,
14968,
29901,
13,
29871,
396,
259,
736,
302,
29916,
29892,
7098,
13,
268,
13,
1753,
527,
7620,
29898,
3027,
29892,
2224,
1125,
13,
29871,
736,
5636,
2272,
29889,
29885,
10669,
29889,
326,
7620,
29898,
2084,
29892,
1967,
29897,
13,
13,
29937,
822,
10366,
29898,
8346,
29892,
2159,
1125,
13,
29937,
259,
298,
29892,
281,
353,
4558,
29889,
12181,
29961,
29896,
1402,
4558,
29889,
12181,
29961,
29906,
29962,
29937,
29906,
29896,
29930,
29906,
29896,
13,
29937,
259,
282,
29892,
29939,
29892,
29926,
29922,
29900,
29892,
29900,
29892,
29900,
13,
29937,
259,
10153,
353,
7442,
29889,
3298,
359,
3552,
29896,
29946,
16395,
2311,
29961,
29900,
29962,
29899,
29896,
7240,
29906,
29896,
29892,
29871,
29896,
29946,
16395,
2311,
29961,
29896,
29962,
29899,
29896,
7240,
29906,
29896,
29892,
29871,
29896,
876,
13,
29937,
259,
363,
22645,
29892,
1967,
297,
26985,
29898,
8346,
1125,
29937,
3027,
29889,
12181,
7607,
29906,
29896,
29892,
29906,
29896,
29892,
29896,
29897,
13,
29937,
268,
474,
353,
22645,
1273,
2159,
29961,
29896,
29962,
29937,
231,
192,
156,
30354,
13,
29937,
268,
260,
29922,
29926,
13,
29937,
268,
432,
353,
22645,
849,
2159,
29961,
29896,
29962,
29937,
31427,
13,
29937,
268,
565,
313,
29926,
29899,
29873,
29897,
1360,
29896,
29901,
13,
29937,
539,
282,
29922,
29886,
29974,
29896,
29946,
13,
29937,
539,
3855,
29922,
29900,
13,
29937,
268,
396,
2492,
29961,
29900,
29901,
29906,
29896,
29892,
29900,
29901,
29906,
29896,
29892,
29901,
13192,
3027,
13,
29937,
268,
10153,
29961,
29886,
29901,
29886,
29974,
29882,
29892,
3855,
29901,
29939,
29974,
29893,
29892,
584,
29962,
353,
1967,
13,
29937,
13,
29937,
268,
3855,
29922,
29939,
29974,
29896,
29946,
13,
29937,
13,
29937,
259,
736,
10153,
13,
2
] |
tests/base.py | RussellLuo/goodjob | 1 | 89827 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shlex
from multiprocessing import Process
from goodjob.jobs.models import Job, Operation
class TestCase(object):
def create_job(self, name='test', command='echo test'):
args = shlex.split(command)
provider = Operation(type='shell', command=args[0], args=args[1:])
job = Job(name=name, provider=provider)
job.save()
return job
def apply_async(self, func, args=()):
proc = Process(target=func, args=args)
proc.daemon = True
return proc
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
528,
2506,
13,
3166,
6674,
307,
985,
292,
1053,
10554,
13,
13,
3166,
1781,
9057,
29889,
9057,
29879,
29889,
9794,
1053,
17163,
29892,
20462,
13,
13,
13,
1990,
4321,
8259,
29898,
3318,
1125,
13,
1678,
822,
1653,
29918,
9057,
29898,
1311,
29892,
1024,
2433,
1688,
742,
1899,
2433,
8057,
1243,
29374,
13,
4706,
6389,
353,
528,
2506,
29889,
5451,
29898,
6519,
29897,
13,
4706,
13113,
353,
20462,
29898,
1853,
2433,
15903,
742,
1899,
29922,
5085,
29961,
29900,
1402,
6389,
29922,
5085,
29961,
29896,
29901,
2314,
13,
4706,
4982,
353,
17163,
29898,
978,
29922,
978,
29892,
13113,
29922,
18121,
29897,
13,
4706,
4982,
29889,
7620,
580,
13,
4706,
736,
4982,
13,
13,
1678,
822,
3394,
29918,
12674,
29898,
1311,
29892,
3653,
29892,
6389,
29922,
580,
1125,
13,
4706,
9580,
353,
10554,
29898,
5182,
29922,
9891,
29892,
6389,
29922,
5085,
29897,
13,
4706,
9580,
29889,
1388,
9857,
353,
5852,
13,
4706,
736,
9580,
13,
2
] |
mysql-creat table&load csv.py | feilongwang92/mining-app-data | 0 | 56266 |
# currScenRecQuery = """
# SELECT * from 'pla_scenario_values_new2' where rid='{rId}' and qno='{qNo}'
# """.format(rId=1, qNo=2)
# currScenRec = db.fetch_results(currScenRecQuery, single_row=True)
#
# updateBetaAttrQuery = """
# UPDATE 'pla_scenario_values_new2' SET 'beta_sde' = '{beta_sde}',
# 'beta_tts' = '{beta_tts}', 'beta_rp' = '{beta_rp}', 'beta_sdl' = '{beta_sdl}'
# WHERE 'pla_scenario_values_new2'.'rid' = {rId} AND 'pla_scenario_values_new2'.'qno' = '{num}';
# """.format(beta_sde=1, beta_tts=2, beta_rp=3, beta_sdl=4, rId=5, num=6)
# db.execute(updateBetaAttrQuery)
################### make query to fetch data ################
## start mysql service manually if failed (run->services.msc->mysql (right click) ->start)
id = 'a0be48f6b592ebcbd536f6a615be005f2066335665973d868907bd32706fe81c'
acc = 21
query = """
SELECT * from `testtest_mysql1` where id='{id}' and accuracy='{acc}'
""".format(id=id, acc=acc)
## two methods
## use db.py
import db
results = db.fetch_results('cuebiq201911', query)
print (results)
## use directly
import pymysql as mysql
dbconnect = mysql.connect(host='localhost', database='cuebiq201911', user='root', password='<PASSWORD>')
dbcursor = dbconnect.cursor()
dbcursor.execute(query)
results = dbcursor.fetchall() # is a duple of duples
[list(item) for item in results] # turn into a list of lists
dbcursor.close()
dbconnect.close()
############################ creat database ####################
import pymysql as mysql
dbconnect = mysql.connect(host='localhost', user='root', password='<PASSWORD>')
dbcursor = dbconnect.cursor()
dbcursor.execute("CREATE DATABASE cuebiq201801to03;") #SHOW DATABASES; USE cuebiq201911; #
dbconnect.commit() # commit before close; if commit, return None, else, return result
dbcursor.close()
dbconnect.close()
################### creat table and load csv ################
## creat table: two method: 1) use db.py; 2) use directly
query1 = """
CREATE TABLE {table} (
row_i INT NOT NULL AUTO_INCREMENT, unix_time INT NOT NULL, id VARCHAR(255) NOT NULL, type TINYINT NOT NULL,
latitude FLOAT NOT NULL, longitude FLOAT NOT NULL, accuracy SMALLINT NOT NULL, timezone SMALLINT NOT NULL,
PRIMARY KEY (row_i), INDEX id (id))
""".format(table='upzip') # '{table}' return error
db.execute('cuebiq201801to03', query1)
## load csv: cannot use db.py because of the reason specified below
## Make sure to have autocommit turned on. To upload files, you need to set the local_infile parameter to 1.
usedatabase = 'cuebiq201801to03'
usetable = 'upzip'
dbconnect = mysql.connect(host='localhost', database=usedatabase, user='root', password='<PASSWORD>', autocommit=True, local_infile=1)
dbcursor = dbconnect.cursor()
import os
filedaylist = os.listdir('E:\\cuebiq_psrc_2019\\sorted')
filedaylist = [fileday for fileday in filedaylist if fileday.startswith('unzip20') and fileday <= 'unzip20180331.csv']
for filename in filedaylist:
infilepath = 'E:/cuebiq_psrc_2019/sorted/' + filename #'E:/cuebiq_psrc_2019/sorted/testtest_mysql.csv'
print (infilepath)
query2 = """
LOAD DATA LOCAL INFILE '{infilepath}' INTO TABLE {totable}
FIELDS TERMINATED BY '\\t'
LINES TERMINATED BY '\\n'
(unix_time, id, type, latitude, longitude, accuracy, timezone);
""".format(infilepath=infilepath, totable=usetable) # {infilepath} return error
# db.execute('cuebiq201911', query2) # Error: InternalError(1148, u'The used command is not allowed with this MySQL version')
dbcursor.execute(query2)
dbconnect.commit()
dbcursor.close()
dbconnect.close()
| [
1,
6756,
13,
29937,
16256,
4421,
264,
4789,
3010,
353,
9995,
30004,
13,
29937,
462,
4706,
5097,
334,
515,
525,
13974,
29918,
1557,
24893,
29918,
5975,
29918,
1482,
29906,
29915,
988,
8177,
2433,
29912,
29878,
1204,
10162,
322,
3855,
1217,
2433,
29912,
29939,
3782,
10162,
30004,
13,
29937,
462,
268,
5124,
1642,
4830,
29898,
29878,
1204,
29922,
29896,
29892,
3855,
3782,
29922,
29906,
8443,
13,
29937,
16256,
4421,
264,
4789,
353,
4833,
29889,
9155,
29918,
9902,
29898,
21962,
4421,
264,
4789,
3010,
29892,
2323,
29918,
798,
29922,
5574,
8443,
13,
29937,
30004,
13,
29937,
2767,
29933,
1187,
25098,
3010,
353,
9995,
30004,
13,
29937,
462,
268,
16924,
525,
13974,
29918,
1557,
24893,
29918,
5975,
29918,
1482,
29906,
29915,
11368,
525,
3571,
29918,
29879,
311,
29915,
353,
22372,
3571,
29918,
29879,
311,
29913,
23592,
13,
29937,
462,
268,
525,
3571,
29918,
698,
29879,
29915,
353,
22372,
3571,
29918,
698,
29879,
29913,
742,
525,
3571,
29918,
19080,
29915,
353,
22372,
3571,
29918,
19080,
29913,
742,
525,
3571,
29918,
29222,
29915,
353,
22372,
3571,
29918,
29222,
10162,
30004,
13,
29937,
462,
268,
5754,
525,
13974,
29918,
1557,
24893,
29918,
5975,
29918,
1482,
29906,
4286,
29915,
2429,
29915,
353,
426,
29878,
1204,
29913,
5300,
525,
13974,
29918,
1557,
24893,
29918,
5975,
29918,
1482,
29906,
4286,
29915,
29939,
1217,
29915,
353,
22372,
1949,
10162,
2104,
13,
29937,
462,
268,
5124,
1642,
4830,
29898,
3571,
29918,
29879,
311,
29922,
29896,
29892,
21762,
29918,
698,
29879,
29922,
29906,
29892,
21762,
29918,
19080,
29922,
29941,
29892,
21762,
29918,
29222,
29922,
29946,
29892,
364,
1204,
29922,
29945,
29892,
954,
29922,
29953,
8443,
13,
29937,
4833,
29889,
7978,
29898,
5504,
29933,
1187,
25098,
3010,
8443,
13,
30004,
13,
30004,
13,
13383,
2277,
29937,
1207,
2346,
304,
6699,
848,
835,
7346,
4136,
29937,
30004,
13,
2277,
1369,
5749,
2669,
7522,
565,
5229,
313,
3389,
976,
9916,
29889,
1516,
29883,
976,
7938,
313,
1266,
2828,
29897,
1599,
2962,
8443,
13,
333,
353,
525,
29874,
29900,
915,
29946,
29947,
29888,
29953,
29890,
29945,
29929,
29906,
774,
29883,
6448,
29945,
29941,
29953,
29888,
29953,
29874,
29953,
29896,
29945,
915,
29900,
29900,
29945,
29888,
29906,
29900,
29953,
29953,
29941,
29941,
29945,
29953,
29953,
29945,
29929,
29955,
29941,
29881,
29947,
29953,
29947,
29929,
29900,
29955,
6448,
29941,
29906,
29955,
29900,
29953,
1725,
29947,
29896,
29883,
29915,
30004,
13,
5753,
353,
29871,
29906,
29896,
30004,
13,
1972,
353,
9995,
30004,
13,
9651,
5097,
334,
515,
421,
1688,
1688,
29918,
7938,
29896,
29952,
988,
1178,
2433,
29912,
333,
10162,
322,
13600,
2433,
29912,
5753,
10162,
30004,
13,
4706,
5124,
1642,
4830,
29898,
333,
29922,
333,
29892,
1035,
29922,
5753,
8443,
13,
30004,
13,
2277,
1023,
3519,
30004,
13,
2277,
671,
4833,
29889,
2272,
30004,
13,
5215,
4833,
30004,
13,
9902,
353,
4833,
29889,
9155,
29918,
9902,
877,
18376,
5365,
29939,
29906,
29900,
29896,
29929,
29896,
29896,
742,
2346,
8443,
13,
2158,
313,
9902,
8443,
13,
30004,
13,
2277,
671,
4153,
30004,
13,
5215,
282,
962,
952,
1519,
408,
5749,
30004,
13,
2585,
6915,
353,
5749,
29889,
6915,
29898,
3069,
2433,
7640,
742,
2566,
2433,
18376,
5365,
29939,
29906,
29900,
29896,
29929,
29896,
29896,
742,
1404,
2433,
4632,
742,
4800,
2433,
29966,
25711,
17013,
29958,
1495,
30004,
13,
11140,
5966,
353,
4833,
6915,
29889,
18127,
26471,
13,
11140,
5966,
29889,
7978,
29898,
1972,
8443,
13,
9902,
353,
4833,
18127,
29889,
9155,
497,
580,
396,
338,
263,
868,
552,
310,
868,
2701,
30004,
13,
29961,
1761,
29898,
667,
29897,
363,
2944,
297,
2582,
29962,
396,
2507,
964,
263,
1051,
310,
8857,
30004,
13,
30004,
13,
11140,
5966,
29889,
5358,
26471,
13,
2585,
6915,
29889,
5358,
26471,
13,
30004,
13,
13383,
7346,
4136,
907,
271,
2566,
835,
13383,
29937,
30004,
13,
5215,
282,
962,
952,
1519,
408,
5749,
30004,
13,
2585,
6915,
353,
5749,
29889,
6915,
29898,
3069,
2433,
7640,
742,
1404,
2433,
4632,
742,
4800,
2433,
29966,
25711,
17013,
29958,
1495,
30004,
13,
11140,
5966,
353,
4833,
6915,
29889,
18127,
26471,
13,
11140,
5966,
29889,
7978,
703,
27045,
27640,
27982,
274,
434,
5365,
29939,
29906,
29900,
29896,
29947,
29900,
29896,
517,
29900,
29941,
29936,
1159,
396,
7068,
9806,
27640,
27982,
29903,
29936,
29871,
501,
1660,
274,
434,
5365,
29939,
29906,
29900,
29896,
29929,
29896,
29896,
29936,
396,
30004,
13,
2585,
6915,
29889,
15060,
580,
396,
9063,
1434,
3802,
29936,
29871,
565,
9063,
29892,
736,
6213,
29892,
1683,
29892,
736,
1121,
30004,
13,
11140,
5966,
29889,
5358,
26471,
13,
2585,
6915,
29889,
5358,
26471,
13,
30004,
13,
30004,
13,
13383,
2277,
29937,
907,
271,
1591,
322,
2254,
11799,
835,
7346,
4136,
29937,
30004,
13,
2277,
907,
271,
1591,
29901,
1023,
1158,
29901,
29871,
29896,
29897,
671,
4833,
29889,
2272,
29936,
29871,
29906,
29897,
671,
4153,
30004,
13,
1972,
29896,
353,
9995,
30004,
13,
9651,
14602,
10911,
426,
2371,
29913,
313,
30004,
13,
9651,
1948,
29918,
29875,
19578,
6058,
4265,
26524,
29949,
29918,
1177,
22245,
13780,
29892,
28167,
29918,
2230,
19578,
6058,
4265,
29892,
1178,
21748,
29898,
29906,
29945,
29945,
29897,
6058,
4265,
29892,
1134,
323,
1177,
29979,
10192,
6058,
4265,
29892,
6756,
13,
9651,
26271,
383,
3927,
1299,
6058,
4265,
29892,
28745,
383,
3927,
1299,
6058,
4265,
29892,
13600,
317,
1529,
2208,
10192,
6058,
4265,
29892,
29431,
317,
1529,
2208,
10192,
6058,
4265,
29892,
6756,
13,
9651,
29778,
14636,
313,
798,
29918,
29875,
511,
2672,
19577,
1178,
313,
333,
876,
6756,
13,
308,
5124,
1642,
4830,
29898,
2371,
2433,
786,
7554,
1495,
396,
22372,
2371,
10162,
736,
1059,
30004,
13,
2585,
29889,
7978,
877,
18376,
5365,
29939,
29906,
29900,
29896,
29947,
29900,
29896,
517,
29900,
29941,
742,
2346,
29896,
8443,
13,
30004,
13,
2277,
2254,
11799,
29901,
2609,
671,
4833,
29889,
2272,
1363,
310,
278,
2769,
6790,
2400,
30004,
13,
2277,
8561,
1854,
304,
505,
4469,
15060,
6077,
373,
29889,
1763,
6441,
2066,
29892,
366,
817,
304,
731,
278,
1887,
29918,
262,
1445,
3443,
304,
29871,
29896,
22993,
13,
3880,
3223,
353,
525,
18376,
5365,
29939,
29906,
29900,
29896,
29947,
29900,
29896,
517,
29900,
29941,
29915,
30004,
13,
11616,
519,
353,
525,
786,
7554,
29915,
30004,
13,
2585,
6915,
353,
5749,
29889,
6915,
29898,
3069,
2433,
7640,
742,
2566,
29922,
3880,
3223,
29892,
1404,
2433,
4632,
742,
4800,
2433,
29966,
25711,
17013,
29958,
742,
4469,
15060,
29922,
5574,
29892,
1887,
29918,
262,
1445,
29922,
29896,
8443,
13,
11140,
5966,
353,
4833,
6915,
29889,
18127,
26471,
13,
30004,
13,
5215,
2897,
30004,
13,
1445,
3250,
1761,
353,
2897,
29889,
1761,
3972,
877,
29923,
22298,
18376,
5365,
29939,
29918,
567,
2214,
29918,
29906,
29900,
29896,
29929,
1966,
24582,
1495,
30004,
13,
1445,
3250,
1761,
353,
518,
1445,
3250,
363,
934,
3250,
297,
934,
3250,
1761,
565,
934,
3250,
29889,
27382,
2541,
877,
348,
7554,
29906,
29900,
1495,
322,
934,
3250,
5277,
525,
348,
7554,
29906,
29900,
29896,
29947,
29900,
29941,
29941,
29896,
29889,
7638,
2033,
30004,
13,
30004,
13,
1454,
10422,
297,
934,
3250,
1761,
29901,
30004,
13,
1678,
297,
1445,
2084,
353,
525,
29923,
8419,
18376,
5365,
29939,
29918,
567,
2214,
29918,
29906,
29900,
29896,
29929,
29914,
24582,
22208,
718,
10422,
396,
29915,
29923,
8419,
18376,
5365,
29939,
29918,
567,
2214,
29918,
29906,
29900,
29896,
29929,
29914,
24582,
29914,
1688,
1688,
29918,
7938,
29889,
7638,
29915,
30004,
13,
1678,
1596,
313,
262,
1445,
2084,
8443,
13,
1678,
2346,
29906,
353,
9995,
30004,
13,
18884,
11247,
3035,
360,
8254,
11247,
29907,
1964,
2672,
7724,
22372,
262,
1445,
2084,
10162,
11646,
10911,
426,
4260,
519,
29913,
6756,
13,
18884,
9338,
6670,
8452,
323,
1001,
16173,
3040,
29928,
6770,
525,
1966,
29873,
29915,
29871,
6756,
13,
18884,
21724,
2890,
323,
1001,
16173,
3040,
29928,
6770,
525,
1966,
29876,
29915,
6756,
13,
18884,
313,
24538,
29918,
2230,
29892,
1178,
29892,
1134,
29892,
26271,
29892,
28745,
29892,
13600,
29892,
29431,
6075,
13,
9651,
5124,
1642,
4830,
29898,
262,
1445,
2084,
29922,
262,
1445,
2084,
29892,
2025,
519,
29922,
11616,
519,
29897,
29871,
396,
426,
262,
1445,
2084,
29913,
736,
1059,
30004,
13,
30004,
13,
1678,
396,
4833,
29889,
7978,
877,
18376,
5365,
29939,
29906,
29900,
29896,
29929,
29896,
29896,
742,
2346,
29906,
29897,
396,
4829,
29901,
512,
1890,
2392,
29898,
29896,
29896,
29946,
29947,
29892,
318,
29915,
1576,
1304,
1899,
338,
451,
6068,
411,
445,
9254,
1873,
1495,
30004,
13,
30004,
13,
1678,
4833,
18127,
29889,
7978,
29898,
1972,
29906,
8443,
13,
1678,
4833,
6915,
29889,
15060,
26471,
13,
30004,
13,
11140,
5966,
29889,
5358,
26471,
13,
2585,
6915,
29889,
5358,
26471,
13,
30004,
13,
30004,
13,
2
] |
holmscan/webscan.py | dynamist/holmscan | 7 | 1608593 | <gh_stars>1-10
# -*- coding: utf-8 -*-
# python std lib
import logging
# holmscan imports
from holmscan.interface import HolmscanModule
log = logging.getLogger(__name__)
class Webscan(HolmscanModule):
def __init__(self, controller):
super(Webscan, self).__init__(controller)
def get_web_scan(self, uuid):
path = "/web-scans/{0}".format(uuid)
response = self.controller.get(path)
return response.json()
def get_web_assets(self):
path = "/web-scans/assets"
response = self.controller.get(path)
return response.json()
def get_web_profiles(self):
path = "/web-scans/scan-profiles"
response = self.controller.get(path)
return response.json()
def get_web_schedules(self):
path = "/web-scans/schedules"
response = self.controller.get(path)
return response.json()
def list_web_scans(self):
path = "/web-scans"
# FIXME handle pagination (see next, previous)
query = {"params": {"limit": 10000}}
response = self.controller.get(path, **query)
return response.json()
def start_web_scan(self, asset, profile):
path = "/web-scans"
body = {
"json": {
"name": "Scan via API",
"profile_uuid": profile,
"webapp_asset_uuid": asset,
}
}
response = self.controller.post(path, **body)
return response.json()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
3017,
3659,
4303,
13,
5215,
12183,
13,
13,
29937,
8753,
1516,
3068,
24802,
13,
3166,
8753,
1516,
3068,
29889,
13248,
1053,
4168,
1516,
3068,
7355,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
2563,
16192,
29898,
19984,
1516,
3068,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4701,
1125,
13,
4706,
2428,
29898,
3609,
16192,
29892,
1583,
467,
1649,
2344,
12035,
8299,
29897,
13,
13,
1678,
822,
679,
29918,
2676,
29918,
16192,
29898,
1311,
29892,
318,
5416,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
19248,
29900,
29913,
1642,
4830,
29898,
25118,
29897,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
657,
29898,
2084,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
13,
1678,
822,
679,
29918,
2676,
29918,
16596,
29898,
1311,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
29914,
16596,
29908,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
657,
29898,
2084,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
13,
1678,
822,
679,
29918,
2676,
29918,
771,
5325,
29898,
1311,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
29914,
16192,
29899,
771,
5325,
29908,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
657,
29898,
2084,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
13,
1678,
822,
679,
29918,
2676,
29918,
816,
287,
2540,
29898,
1311,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
29914,
816,
287,
2540,
29908,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
657,
29898,
2084,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
13,
1678,
822,
1051,
29918,
2676,
29918,
1557,
550,
29898,
1311,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
29908,
13,
4706,
396,
383,
6415,
2303,
4386,
10203,
3381,
313,
4149,
2446,
29892,
3517,
29897,
13,
4706,
2346,
353,
8853,
7529,
1115,
8853,
13400,
1115,
29871,
29896,
29900,
29900,
29900,
29900,
930,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
657,
29898,
2084,
29892,
3579,
1972,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
13,
1678,
822,
1369,
29918,
2676,
29918,
16192,
29898,
1311,
29892,
24342,
29892,
8722,
1125,
13,
4706,
2224,
353,
5591,
2676,
29899,
1557,
550,
29908,
13,
4706,
3573,
353,
426,
13,
9651,
376,
3126,
1115,
426,
13,
18884,
376,
978,
1115,
376,
29083,
3025,
3450,
613,
13,
18884,
376,
10185,
29918,
25118,
1115,
8722,
29892,
13,
18884,
376,
2676,
932,
29918,
24129,
29918,
25118,
1115,
24342,
29892,
13,
9651,
500,
13,
4706,
500,
13,
4706,
2933,
353,
1583,
29889,
8299,
29889,
2490,
29898,
2084,
29892,
3579,
2587,
29897,
13,
4706,
736,
2933,
29889,
3126,
580,
13,
2
] |
SerialConnection.py | scottrfrancis/Pentair-Thing | 1 | 151384 | # See https://web.archive.org/web/20171130091506/https:/www.sdyoung.com/home/decoding-the-pentair-easytouch-rs-485-protocol/
# For details on pentair protocol
#
import serial
from Connection import Connection, IOConnection
class SerialConnection(IOConnection):
def __init__(self, device):
super().__init__()
self.device = device
self.ser = serial.Serial(
port=self.device,
baudrate=9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS, timeout=0.1, write_timeout=0.1
)
def open(self):
self.ser.open()
def isOpen(self):
return self.ser.isOpen()
def send(self, message):
count = self.ser.write(message)
return count
def listen(self):
# events = []
n = self.ser.inWaiting()
if n > 0:
try:
self.readbuffer = self.ser.read(n)
except Exception as e:
print("Exception " + e + " while reading from Serial port")
return self.readbuffer
| [
1,
396,
2823,
2045,
597,
2676,
29889,
10867,
29889,
990,
29914,
2676,
29914,
29906,
29900,
29896,
29955,
29896,
29896,
29941,
29900,
29900,
29929,
29896,
29945,
29900,
29953,
29914,
991,
8419,
1636,
29889,
29879,
4518,
283,
865,
29889,
510,
29914,
5184,
29914,
7099,
3689,
29899,
1552,
29899,
22825,
1466,
29899,
29872,
294,
3637,
3222,
29899,
2288,
29899,
29946,
29947,
29945,
29899,
20464,
29914,
13,
29937,
1152,
4902,
373,
11137,
1466,
9608,
13,
29937,
13,
5215,
7797,
13,
3166,
15160,
1053,
15160,
29892,
10663,
5350,
13,
13,
13,
1990,
18896,
5350,
29898,
5971,
5350,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4742,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
10141,
353,
4742,
13,
4706,
1583,
29889,
643,
353,
7797,
29889,
9125,
29898,
13,
9651,
2011,
29922,
1311,
29889,
10141,
29892,
13,
9651,
9922,
566,
10492,
29922,
29929,
29953,
29900,
29900,
29892,
13,
9651,
610,
537,
29922,
15550,
29889,
16320,
11937,
29918,
29940,
12413,
29892,
13,
9651,
5040,
14836,
29922,
15550,
29889,
1254,
4590,
22698,
29903,
29918,
12413,
29892,
13,
9651,
6262,
675,
29922,
15550,
29889,
29923,
22530,
22698,
29903,
29892,
11815,
29922,
29900,
29889,
29896,
29892,
2436,
29918,
15619,
29922,
29900,
29889,
29896,
13,
4706,
1723,
13,
13,
1678,
822,
1722,
29898,
1311,
1125,
13,
4706,
1583,
29889,
643,
29889,
3150,
580,
13,
13,
1678,
822,
338,
6585,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
643,
29889,
275,
6585,
580,
13,
13,
1678,
822,
3638,
29898,
1311,
29892,
2643,
1125,
13,
4706,
2302,
353,
1583,
29889,
643,
29889,
3539,
29898,
4906,
29897,
13,
4706,
736,
2302,
13,
13,
1678,
822,
11621,
29898,
1311,
1125,
13,
4706,
396,
4959,
353,
5159,
13,
4706,
302,
353,
1583,
29889,
643,
29889,
262,
15716,
292,
580,
13,
4706,
565,
302,
1405,
29871,
29900,
29901,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
949,
9040,
353,
1583,
29889,
643,
29889,
949,
29898,
29876,
29897,
29871,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1596,
703,
2451,
376,
718,
321,
718,
376,
1550,
5183,
515,
18896,
2011,
1159,
13,
13,
4706,
736,
1583,
29889,
949,
9040,
13,
2
] |
src/graphwerk.py | LivingInABubble/inpredo | 1 | 41370 | <reponame>LivingInABubble/inpredo<filename>src/graphwerk.py
import os
import matplotlib.pyplot as plt
import numpy as np
from mplfinance.original_flavor import candlestick2_ochl
from tqdm import tqdm
def convolve_sma(array, period):
return np.convolve(array, np.ones((period,)) / period, mode='valid')
def graphwerk(start, finish):
opened, closed, high, low, volume, date = [], [], [], [], [], []
for x in range(start, finish):
# Below filtering is valid for eurusd.csv file. Other financial data files have different orders
# so you need to find out what means open, high and closed in their respective order.
opened.append(float(pd[x][3]))
high.append(float(pd[x][4]))
low.append(float(pd[x][5]))
closed.append(float(pd[x][6]))
volume.append(float(pd[x][7]))
date.append(pd[x][1])
close_next = float(pd[finish][6])
sma = convolve_sma(closed, 5)
smb = list(sma)
diff = sma[-1] - sma[-2]
for x in range(len(closed) - len(smb)):
smb.append(smb[-1] + diff)
fig = plt.figure(num=1, figsize=(3, 3), dpi=50, facecolor='w', edgecolor='k')
dx = fig.add_subplot(111)
# mpl_finance.volume_overlay(ax, opened, closed, volume, width=0.4, colorup='b', colordown='b', alpha=1)
candlestick2_ochl(dx, opened, closed, high, low, width=1.5, colorup='g', colordown='r', alpha=0.5)
plt.autoscale()
plt.plot(smb, color="blue", linewidth=10, alpha=0.5)
plt.axis('off')
# comp_ratio = close_next / closed[-1]
# print(comp_ratio)
filename = f'{date[0]} ~ {date[-1]}.jpg'.replace(':00:00', '')
if closed[-1] > close_next:
# print('close value is bigger')
# print('last value: ' + str(closed[-1]))
# print('next value: ' + str(close_next))
# print('sell')
plt.savefig(sell_dir + filename, bbox_inches='tight')
else:
# print('close value is smaller')
# print('last value: ' + str(closed[-1]))
# print('next value: ' + str(close_next))
# print('buy')
plt.savefig(buy_dir + filename, bbox_inches='tight')
# plt.show()
plt.close()
if __name__ == '__main__':
buy_dir = '../data/buy/'
if not os.path.exists(buy_dir):
os.makedirs(buy_dir)
sell_dir = '../data/sell/'
if not os.path.exists(sell_dir):
os.makedirs(sell_dir)
# Input your csv file here with historical data
ad = np.genfromtxt('../financial_data/gemini_BTCUSD_1hr.csv', delimiter=',', dtype=str)
pd = np.flipud(ad)
for i in tqdm(range(int(len(pd) / 2) - 6)):
graphwerk(i * 2, i * 2 + 12)
| [
1,
529,
276,
1112,
420,
29958,
29931,
4357,
797,
2882,
23232,
29914,
262,
11965,
29877,
29966,
9507,
29958,
4351,
29914,
4262,
9888,
29889,
2272,
13,
5215,
2897,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
3166,
286,
572,
4951,
749,
29889,
13492,
29918,
29888,
4112,
272,
1053,
23794,
29880,
342,
860,
29906,
29918,
2878,
29880,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
13,
1753,
378,
1555,
345,
29918,
29879,
655,
29898,
2378,
29892,
3785,
1125,
13,
1678,
736,
7442,
29889,
535,
1555,
345,
29898,
2378,
29892,
7442,
29889,
2873,
3552,
19145,
29892,
876,
847,
3785,
29892,
4464,
2433,
3084,
1495,
13,
13,
13,
1753,
3983,
9888,
29898,
2962,
29892,
8341,
1125,
13,
1678,
6496,
29892,
5764,
29892,
1880,
29892,
4482,
29892,
7977,
29892,
2635,
353,
19997,
19997,
19997,
19997,
19997,
5159,
13,
1678,
363,
921,
297,
3464,
29898,
2962,
29892,
8341,
1125,
13,
4706,
396,
13866,
21166,
338,
2854,
363,
321,
17142,
29881,
29889,
7638,
934,
29889,
5901,
18161,
848,
2066,
505,
1422,
11299,
13,
4706,
396,
577,
366,
817,
304,
1284,
714,
825,
2794,
1722,
29892,
1880,
322,
5764,
297,
1009,
18067,
1797,
29889,
13,
4706,
6496,
29889,
4397,
29898,
7411,
29898,
15926,
29961,
29916,
3816,
29941,
12622,
13,
4706,
1880,
29889,
4397,
29898,
7411,
29898,
15926,
29961,
29916,
3816,
29946,
12622,
13,
4706,
4482,
29889,
4397,
29898,
7411,
29898,
15926,
29961,
29916,
3816,
29945,
12622,
13,
4706,
5764,
29889,
4397,
29898,
7411,
29898,
15926,
29961,
29916,
3816,
29953,
12622,
13,
4706,
7977,
29889,
4397,
29898,
7411,
29898,
15926,
29961,
29916,
3816,
29955,
12622,
13,
4706,
2635,
29889,
4397,
29898,
15926,
29961,
29916,
3816,
29896,
2314,
13,
13,
1678,
3802,
29918,
4622,
353,
5785,
29898,
15926,
29961,
4951,
728,
3816,
29953,
2314,
13,
13,
1678,
269,
655,
353,
378,
1555,
345,
29918,
29879,
655,
29898,
15603,
29892,
29871,
29945,
29897,
13,
1678,
1560,
29890,
353,
1051,
29898,
29879,
655,
29897,
13,
1678,
2923,
353,
269,
655,
14352,
29896,
29962,
448,
269,
655,
14352,
29906,
29962,
13,
13,
1678,
363,
921,
297,
3464,
29898,
2435,
29898,
15603,
29897,
448,
7431,
29898,
3844,
29890,
22164,
13,
4706,
1560,
29890,
29889,
4397,
29898,
3844,
29890,
14352,
29896,
29962,
718,
2923,
29897,
13,
13,
1678,
2537,
353,
14770,
29889,
4532,
29898,
1949,
29922,
29896,
29892,
2537,
2311,
7607,
29941,
29892,
29871,
29941,
511,
270,
1631,
29922,
29945,
29900,
29892,
3700,
2780,
2433,
29893,
742,
7636,
2780,
2433,
29895,
1495,
13,
1678,
15414,
353,
2537,
29889,
1202,
29918,
1491,
5317,
29898,
29896,
29896,
29896,
29897,
13,
1678,
396,
286,
572,
29918,
4951,
749,
29889,
24623,
29918,
957,
8387,
29898,
1165,
29892,
6496,
29892,
5764,
29892,
7977,
29892,
2920,
29922,
29900,
29889,
29946,
29892,
2927,
786,
2433,
29890,
742,
784,
536,
776,
2433,
29890,
742,
15595,
29922,
29896,
29897,
13,
1678,
23794,
29880,
342,
860,
29906,
29918,
2878,
29880,
29898,
8235,
29892,
6496,
29892,
5764,
29892,
1880,
29892,
4482,
29892,
2920,
29922,
29896,
29889,
29945,
29892,
2927,
786,
2433,
29887,
742,
784,
536,
776,
2433,
29878,
742,
15595,
29922,
29900,
29889,
29945,
29897,
13,
13,
1678,
14770,
29889,
1300,
14174,
744,
580,
13,
1678,
14770,
29889,
5317,
29898,
3844,
29890,
29892,
2927,
543,
9539,
613,
1196,
2103,
29922,
29896,
29900,
29892,
15595,
29922,
29900,
29889,
29945,
29897,
13,
1678,
14770,
29889,
8990,
877,
2696,
1495,
13,
1678,
396,
752,
29918,
3605,
601,
353,
3802,
29918,
4622,
847,
5764,
14352,
29896,
29962,
13,
1678,
396,
1596,
29898,
2388,
29918,
3605,
601,
29897,
13,
13,
1678,
10422,
353,
285,
29915,
29912,
1256,
29961,
29900,
12258,
3695,
426,
1256,
14352,
29896,
29962,
1836,
6173,
4286,
6506,
877,
29901,
29900,
29900,
29901,
29900,
29900,
742,
27255,
13,
1678,
565,
5764,
14352,
29896,
29962,
1405,
3802,
29918,
4622,
29901,
13,
4706,
396,
1596,
877,
5358,
995,
338,
16600,
1495,
13,
4706,
396,
1596,
877,
4230,
995,
29901,
525,
718,
851,
29898,
15603,
14352,
29896,
12622,
13,
4706,
396,
1596,
877,
4622,
995,
29901,
525,
718,
851,
29898,
5358,
29918,
4622,
876,
13,
4706,
396,
1596,
877,
29879,
514,
1495,
13,
4706,
14770,
29889,
7620,
1003,
29898,
29879,
514,
29918,
3972,
718,
10422,
29892,
289,
1884,
29918,
262,
6609,
2433,
29873,
523,
1495,
13,
1678,
1683,
29901,
13,
4706,
396,
1596,
877,
5358,
995,
338,
7968,
1495,
13,
4706,
396,
1596,
877,
4230,
995,
29901,
525,
718,
851,
29898,
15603,
14352,
29896,
12622,
13,
4706,
396,
1596,
877,
4622,
995,
29901,
525,
718,
851,
29898,
5358,
29918,
4622,
876,
13,
4706,
396,
1596,
877,
2423,
29891,
1495,
13,
4706,
14770,
29889,
7620,
1003,
29898,
2423,
29891,
29918,
3972,
718,
10422,
29892,
289,
1884,
29918,
262,
6609,
2433,
29873,
523,
1495,
13,
13,
1678,
396,
14770,
29889,
4294,
580,
13,
1678,
14770,
29889,
5358,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
15649,
29918,
3972,
353,
525,
6995,
1272,
29914,
2423,
29891,
22208,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2423,
29891,
29918,
3972,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
2423,
29891,
29918,
3972,
29897,
13,
13,
1678,
19417,
29918,
3972,
353,
525,
6995,
1272,
29914,
29879,
514,
22208,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
29879,
514,
29918,
3972,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
29879,
514,
29918,
3972,
29897,
13,
13,
1678,
396,
10567,
596,
11799,
934,
1244,
411,
15839,
848,
13,
1678,
594,
353,
7442,
29889,
1885,
3166,
3945,
877,
6995,
4951,
273,
1455,
29918,
1272,
29914,
17797,
2172,
29918,
29933,
9472,
3308,
29928,
29918,
29896,
1092,
29889,
7638,
742,
28552,
29922,
742,
742,
26688,
29922,
710,
29897,
13,
1678,
10518,
353,
7442,
29889,
29888,
3466,
566,
29898,
328,
29897,
13,
13,
1678,
363,
474,
297,
260,
29939,
18933,
29898,
3881,
29898,
524,
29898,
2435,
29898,
15926,
29897,
847,
29871,
29906,
29897,
448,
29871,
29953,
22164,
13,
4706,
3983,
9888,
29898,
29875,
334,
29871,
29906,
29892,
474,
334,
29871,
29906,
718,
29871,
29896,
29906,
29897,
13,
2
] |
tools/moduletests/unit/test_arpignore.py | ketanbhut/aws-ec2rescue-linux | 0 | 102437 | # Copyright 2016-2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
#
# or in the "license" file accompanying this file. This file 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.
"""
Unit tests for the arpignore module
"""
import os
import subprocess
import sys
import unittest
import mock
import moduletests.src.arpignore
try:
# Python 2.x
from cStringIO import StringIO
except ImportError:
# Python 3.x
from io import StringIO
if sys.hexversion >= 0x3040000:
# contextlib.redirect_stdout was introduced in Python 3.4
import contextlib
else:
# contextlib2 is a backport of contextlib from Python 3.5 and is compatible with Python2/3
import contextlib2 as contextlib
# builtins was named __builtin__ in Python 2 so accommodate the change for the purposes of mocking the open call
if sys.version_info >= (3,):
builtins_name = "builtins"
else:
builtins_name = "__builtin__"
class Testarpignore(unittest.TestCase):
config_file_path = "/etc/sysctl.d/55-arp-ignore.conf"
def setUp(self):
self.output = StringIO()
def tearDown(self):
self.output.close()
@mock.patch("subprocess.check_output")
def test_detect_noproblem(self, check_output_mock):
"""Test that no problem is detected with expected-good output."""
check_output_mock.return_value = "arp_ignore = 0"
self.assertFalse(moduletests.src.arpignore.detect())
self.assertTrue(check_output_mock.called)
@mock.patch("subprocess.check_output")
def test_detect_problem(self, check_output_mock):
"""Test that the problem is detected with expected-bad output."""
check_output_mock.return_value = "arp_ignore = 1"
self.assertTrue(moduletests.src.arpignore.detect())
self.assertTrue(check_output_mock.called)
@mock.patch("subprocess.check_output", side_effect=["net.ipv4.conf.all.arp_ignore = 1",
subprocess.CalledProcessError(1, "test")])
def test_fix_sysctlfail(self, check_output_mock):
with contextlib.redirect_stdout(self.output):
self.assertRaises(subprocess.CalledProcessError, moduletests.src.arpignore.fix, self.config_file_path)
self.assertTrue(check_output_mock.called)
self.assertTrue(self.output.getvalue().endswith(
"[UNFIXED] net.ipv4.conf.all.arp_ignore=0 failed for running system\n"))
@mock.patch("subprocess.check_output")
@mock.patch("moduletests.src.arpignore.os.path.exists", side_effect=[False])
@mock.patch("moduletests.src.arpignore.open", side_effect=IOError)
def test_fix_write_new_fail(self, open_mock, exists_mock, check_output_mock):
check_output_mock.return_value = "net.ipv4.conf.lo.arp_announce = 0\nnet.ipv4.conf.all.arp_ignore = 1"
with contextlib.redirect_stdout(self.output):
self.assertRaises(IOError, moduletests.src.arpignore.fix, self.config_file_path)
self.assertTrue(open_mock.called)
self.assertTrue(exists_mock.called)
self.assertTrue(check_output_mock.called)
self.assertTrue(self.output.getvalue().endswith(
"[UNFIXED] Unable to open /etc/sysctl.d/55-arp-ignore.conf and write to it.\n"))
@mock.patch("subprocess.check_output")
@mock.patch("moduletests.src.arpignore.os.path.exists", side_effect=[False])
@mock.patch("moduletests.src.arpignore.open", mock.mock_open())
def test_fix_write_new_success(self, exists_mock, check_output_mock):
check_output_mock.return_value = "net.ipv4.conf.lo.arp_announce = 0\nnet.ipv4.conf.all.arp_ignore = 1"
with contextlib.redirect_stdout(self.output):
self.assertTrue(moduletests.src.arpignore.fix(self.config_file_path))
self.assertTrue(self.output.getvalue().endswith("[FIXED] /etc/sysctl.d/55-arp-ignore.conf written.\n"))
self.assertTrue(exists_mock.called)
self.assertTrue(check_output_mock.called)
@mock.patch("subprocess.check_output")
@mock.patch("moduletests.src.arpignore.os.path.exists", side_effect=[True])
def test_fix_success(self, exists_mock, check_output_mock):
check_output_mock.return_value = "net.ipv4.conf.all.arp_ignore = 1\nsome_other = 0"
open_mock = mock.mock_open(read_data="#comment\n"
"net.ipv4.conf.all.arp_ignore = 1\n"
"net.ipv4.conf.lo.arp_ignore = 0\n"
"garbage\n")
# mock_open does not have support for iteration so it must be added manually
# readline() until a blank line is reached (the sentinel)
def iter_func(self):
return iter(self.readline, "")
open_mock.return_value.__iter__ = iter_func
def py3_next_func(self):
return next(iter(self.readline, ""))
if sys.hexversion >= 0x3000000:
open_mock.return_value.__next__ = py3_next_func
with mock.patch("moduletests.src.arpignore.open", open_mock):
with contextlib.redirect_stdout(self.output):
self.assertTrue(moduletests.src.arpignore.fix(self.config_file_path))
self.assertTrue(self.output.getvalue().endswith("[FIXED] /etc/sysctl.d/55-arp-ignore.conf written.\n"))
self.assertEqual(str(open_mock.mock_calls), "[call('/etc/sysctl.d/55-arp-ignore.conf', 'r'),\n"
" call().__enter__(),\n call().readlines(),\n"
" call().__exit__(None, None, None),\n"
" call('/etc/sysctl.d/55-arp-ignore.conf', 'w'),\n"
" call().__enter__(),\n"
" call().write('#comment\\nnet.ipv4.conf.lo.arp_ignore = 0'),\n"
" call().write('\\n'),\n"
" call().write('net.ipv4.conf.all.arp_ignore = 0'),\n"
" call().write('\\n'),\n"
" call().__exit__(None, None, None)]")
self.assertTrue(exists_mock.called)
self.assertTrue(check_output_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict", return_value=dict())
@mock.patch("moduletests.src.arpignore.detect", return_value=False)
def test_run_success(self, detect_mock, config_mock):
with contextlib.redirect_stdout(self.output):
self.assertTrue(moduletests.src.arpignore.run())
self.assertEqual(self.output.getvalue(), "Determining if any interfaces are set to ignore arp requests\n"
"[SUCCESS] arp ignore is disabled for all interfaces.\n")
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict")
@mock.patch("moduletests.src.arpignore.detect", return_value=True)
def test_run_no_remediate(self, detect_mock, config_mock):
config_mock.return_value = {"BACKUP_DIR": "/var/tmp/ec2rl",
"LOG_DIR": "/var/tmp/ec2rl",
"BACKED_FILES": dict(),
"REMEDIATE": False,
"SUDO": True}
with contextlib.redirect_stdout(self.output):
self.assertFalse(moduletests.src.arpignore.run())
self.assertTrue("[UNFIXED] Remediation impossible without sudo and --remediate.\n"
"-- Running as root/sudo: True\n"
"-- Required --remediate flag specified: False\n"
"[FAILURE] arp ignore is enabled for one or more interfaces. Please see the module log\n"
in self.output.getvalue())
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict")
@mock.patch("moduletests.src.arpignore.detect", return_value=True)
@mock.patch("moduletests.src.arpignore.os.path.isfile", return_value=True)
@mock.patch("moduletests.src.arpignore.backup", return_value=True)
@mock.patch("moduletests.src.arpignore.fix", return_value=True)
@mock.patch("moduletests.src.arpignore.restore", return_value=True)
def test_run_failure_isfile(self,
restore_mock,
fix_mock,
backup_mock,
isfile_mock,
detect_mock,
config_mock):
config_mock.return_value = {"BACKUP_DIR": "/var/tmp/ec2rl",
"LOG_DIR": "/var/tmp/ec2rl",
"BACKED_FILES": {self.config_file_path: "/some/path"},
"REMEDIATE": True,
"SUDO": True}
with contextlib.redirect_stdout(self.output):
self.assertFalse(moduletests.src.arpignore.run())
self.assertTrue("[FAILURE] arp ignore is enabled for one or more interfaces. "
"Please see the module log"
in self.output.getvalue())
self.assertTrue(restore_mock.called)
self.assertTrue(fix_mock.called)
self.assertTrue(backup_mock.called)
self.assertTrue(isfile_mock.called)
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict")
@mock.patch("moduletests.src.arpignore.detect", return_value=True)
@mock.patch("moduletests.src.arpignore.os.path.isfile", return_value=False)
@mock.patch("moduletests.src.arpignore.fix", return_value=True)
def test_run_failure(self, fix_mock, isfile_mock, detect_mock, config_mock):
config_mock.return_value = {"BACKUP_DIR": "/var/tmp/ec2rl",
"LOG_DIR": "/var/tmp/ec2rl",
"BACKED_FILES": dict(),
"REMEDIATE": True,
"SUDO": True}
with contextlib.redirect_stdout(self.output):
self.assertFalse(moduletests.src.arpignore.run())
self.assertTrue("[FAILURE] arp ignore is enabled for one or more interfaces. "
"Please see the module log"
in self.output.getvalue())
self.assertTrue(fix_mock.called)
self.assertTrue(isfile_mock.called)
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict")
@mock.patch("moduletests.src.arpignore.detect", side_effect=(True, False))
@mock.patch("moduletests.src.arpignore.os.path.isfile", return_value=False)
@mock.patch("moduletests.src.arpignore.fix", return_value=True)
def test_run_fix(self, fix_mock, isfile_mock, detect_mock, config_mock):
config_mock.return_value = {"BACKUP_DIR": "/var/tmp/ec2rl",
"LOG_DIR": "/var/tmp/ec2rl",
"BACKED_FILES": dict(),
"REMEDIATE": True,
"SUDO": True}
with contextlib.redirect_stdout(self.output):
self.assertTrue(moduletests.src.arpignore.run())
self.assertEqual(self.output.getvalue(), "Determining if any interfaces are set to ignore arp requests\n"
"[SUCCESS] arp ignore is disabled for all interfaces "
"after remediation.\n")
self.assertTrue(fix_mock.called)
self.assertTrue(isfile_mock.called)
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict")
@mock.patch("moduletests.src.arpignore.detect", side_effect=Exception)
@mock.patch("moduletests.src.arpignore.restore", return_value=True)
def test_run_exception(self, restore_mock, detect_mock, config_mock):
config_mock.return_value = {"BACKUP_DIR": "/var/tmp/ec2rl",
"LOG_DIR": "/var/tmp/ec2rl",
"BACKED_FILES": {self.config_file_path: "/some/path"},
"REMEDIATE": True,
"SUDO": True}
with contextlib.redirect_stdout(self.output):
self.assertFalse(moduletests.src.arpignore.run())
self.assertTrue(restore_mock.called)
self.assertTrue(detect_mock.called)
self.assertTrue(config_mock.called)
@mock.patch("moduletests.src.arpignore.get_config_dict", side_effect=IOError)
def test_run_failure_config_exception(self, config_mock):
with contextlib.redirect_stdout(self.output):
self.assertFalse(moduletests.src.arpignore.run())
self.assertTrue(self.output.getvalue().endswith("Review the logs to determine the cause of the issue.\n"))
self.assertTrue(config_mock.called)
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
29899,
29906,
29900,
29896,
29947,
16631,
29889,
510,
29892,
9266,
29889,
470,
967,
23736,
1078,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
2564,
887,
13,
29937,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
319,
3509,
310,
13,
29937,
278,
19245,
338,
5982,
472,
13,
29937,
13,
29937,
268,
1732,
597,
10467,
29889,
17260,
29889,
510,
29914,
4288,
29906,
29889,
29900,
29914,
13,
29937,
13,
29937,
13,
29937,
470,
297,
278,
376,
506,
1947,
29908,
934,
10259,
1384,
292,
445,
934,
29889,
910,
934,
338,
13,
29937,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13,
29937,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
2823,
278,
19245,
363,
278,
2702,
13,
29937,
4086,
14765,
1076,
11239,
322,
27028,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
8325,
6987,
363,
278,
564,
29886,
17281,
3883,
13,
15945,
29908,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
5215,
10876,
13,
5215,
443,
27958,
13,
13,
5215,
11187,
13,
13,
5215,
878,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
13,
13,
2202,
29901,
13,
1678,
396,
5132,
29871,
29906,
29889,
29916,
13,
1678,
515,
274,
1231,
5971,
1053,
1714,
5971,
13,
19499,
16032,
2392,
29901,
13,
1678,
396,
5132,
29871,
29941,
29889,
29916,
13,
1678,
515,
12013,
1053,
1714,
5971,
13,
13,
361,
10876,
29889,
20970,
3259,
6736,
29871,
29900,
29916,
29941,
29900,
29946,
29900,
29900,
29900,
29900,
29901,
13,
1678,
396,
3030,
1982,
29889,
17886,
29918,
25393,
471,
9129,
297,
5132,
29871,
29941,
29889,
29946,
13,
1678,
1053,
3030,
1982,
13,
2870,
29901,
13,
1678,
396,
3030,
1982,
29906,
338,
263,
1250,
637,
310,
3030,
1982,
515,
5132,
29871,
29941,
29889,
29945,
322,
338,
15878,
411,
5132,
29906,
29914,
29941,
13,
1678,
1053,
3030,
1982,
29906,
408,
3030,
1982,
13,
13,
29937,
4240,
1144,
471,
4257,
4770,
16145,
262,
1649,
297,
5132,
29871,
29906,
577,
24803,
403,
278,
1735,
363,
278,
11976,
310,
11187,
292,
278,
1722,
1246,
13,
361,
10876,
29889,
3259,
29918,
3888,
6736,
313,
29941,
29892,
1125,
13,
1678,
4240,
1144,
29918,
978,
353,
376,
16145,
1144,
29908,
13,
2870,
29901,
13,
1678,
4240,
1144,
29918,
978,
353,
376,
1649,
16145,
262,
1649,
29908,
13,
13,
13,
1990,
4321,
6834,
17281,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
2295,
29918,
1445,
29918,
2084,
353,
5591,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
29908,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4905,
353,
1714,
5971,
580,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4905,
29889,
5358,
580,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
1159,
13,
1678,
822,
1243,
29918,
4801,
522,
29918,
29876,
26555,
1031,
29898,
1311,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
9995,
3057,
393,
694,
1108,
338,
17809,
411,
3806,
29899,
16773,
1962,
1213,
15945,
13,
4706,
1423,
29918,
4905,
29918,
17640,
29889,
2457,
29918,
1767,
353,
376,
6834,
29918,
17281,
353,
29871,
29900,
29908,
13,
4706,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
1159,
13,
1678,
822,
1243,
29918,
4801,
522,
29918,
17199,
29898,
1311,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
9995,
3057,
393,
278,
1108,
338,
17809,
411,
3806,
29899,
12313,
1962,
1213,
15945,
13,
4706,
1423,
29918,
4905,
29918,
17640,
29889,
2457,
29918,
1767,
353,
376,
6834,
29918,
17281,
353,
29871,
29896,
29908,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
613,
2625,
29918,
15987,
29922,
3366,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29896,
613,
13,
462,
462,
462,
4706,
1014,
5014,
29889,
29907,
4212,
7032,
2392,
29898,
29896,
29892,
376,
1688,
1159,
2314,
13,
1678,
822,
1243,
29918,
5878,
29918,
9675,
16948,
14057,
29898,
1311,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1491,
5014,
29889,
29907,
4212,
7032,
2392,
29892,
878,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
29892,
1583,
29889,
2917,
29918,
1445,
29918,
2084,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1311,
29889,
4905,
29889,
657,
1767,
2141,
1975,
2541,
29898,
13,
9651,
14704,
3904,
25634,
3352,
29962,
7787,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
29922,
29900,
5229,
363,
2734,
1788,
29905,
29876,
5783,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
9933,
613,
2625,
29918,
15987,
11759,
8824,
2314,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3150,
613,
2625,
29918,
15987,
29922,
5971,
2392,
29897,
13,
1678,
822,
1243,
29918,
5878,
29918,
3539,
29918,
1482,
29918,
14057,
29898,
1311,
29892,
1722,
29918,
17640,
29892,
4864,
29918,
17640,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
1423,
29918,
4905,
29918,
17640,
29889,
2457,
29918,
1767,
353,
376,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
417,
29889,
6834,
29918,
812,
21543,
353,
29871,
29900,
29905,
29876,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29896,
29908,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
29934,
1759,
267,
29898,
5971,
2392,
29892,
878,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
29892,
1583,
29889,
2917,
29918,
1445,
29918,
2084,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3150,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
9933,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1311,
29889,
4905,
29889,
657,
1767,
2141,
1975,
2541,
29898,
13,
9651,
14704,
3904,
25634,
3352,
29962,
20065,
304,
1722,
847,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
322,
2436,
304,
372,
7790,
29876,
5783,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
9933,
613,
2625,
29918,
15987,
11759,
8824,
2314,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3150,
613,
11187,
29889,
17640,
29918,
3150,
3101,
13,
1678,
822,
1243,
29918,
5878,
29918,
3539,
29918,
1482,
29918,
8698,
29898,
1311,
29892,
4864,
29918,
17640,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
1423,
29918,
4905,
29918,
17640,
29889,
2457,
29918,
1767,
353,
376,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
417,
29889,
6834,
29918,
812,
21543,
353,
29871,
29900,
29905,
29876,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29896,
29908,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
5574,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
29898,
1311,
29889,
2917,
29918,
1445,
29918,
2084,
876,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1311,
29889,
4905,
29889,
657,
1767,
2141,
1975,
2541,
703,
29961,
25634,
3352,
29962,
847,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
3971,
7790,
29876,
5783,
13,
4706,
1583,
29889,
9294,
5574,
29898,
9933,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1491,
5014,
29889,
3198,
29918,
4905,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
9933,
613,
2625,
29918,
15987,
11759,
5574,
2314,
13,
1678,
822,
1243,
29918,
5878,
29918,
8698,
29898,
1311,
29892,
4864,
29918,
17640,
29892,
1423,
29918,
4905,
29918,
17640,
1125,
13,
4706,
1423,
29918,
4905,
29918,
17640,
29889,
2457,
29918,
1767,
353,
376,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29896,
29905,
1983,
608,
29918,
1228,
353,
29871,
29900,
29908,
13,
4706,
1722,
29918,
17640,
353,
11187,
29889,
17640,
29918,
3150,
29898,
949,
29918,
1272,
9880,
9342,
29905,
29876,
29908,
13,
462,
462,
632,
376,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29896,
29905,
29876,
29908,
13,
462,
462,
632,
376,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
417,
29889,
6834,
29918,
17281,
353,
29871,
29900,
29905,
29876,
29908,
13,
462,
462,
632,
376,
5397,
17807,
29905,
29876,
1159,
13,
13,
4706,
396,
11187,
29918,
3150,
947,
451,
505,
2304,
363,
12541,
577,
372,
1818,
367,
2715,
7522,
13,
4706,
396,
1303,
1220,
580,
2745,
263,
9654,
1196,
338,
7450,
313,
1552,
2665,
262,
295,
29897,
13,
4706,
822,
4256,
29918,
9891,
29898,
1311,
1125,
13,
9651,
736,
4256,
29898,
1311,
29889,
949,
1220,
29892,
20569,
13,
13,
4706,
1722,
29918,
17640,
29889,
2457,
29918,
1767,
17255,
1524,
1649,
353,
4256,
29918,
9891,
13,
13,
4706,
822,
11451,
29941,
29918,
4622,
29918,
9891,
29898,
1311,
1125,
13,
9651,
736,
2446,
29898,
1524,
29898,
1311,
29889,
949,
1220,
29892,
5124,
876,
13,
13,
4706,
565,
10876,
29889,
20970,
3259,
6736,
29871,
29900,
29916,
29941,
29900,
29900,
29900,
29900,
29900,
29900,
29901,
13,
9651,
1722,
29918,
17640,
29889,
2457,
29918,
1767,
17255,
4622,
1649,
353,
11451,
29941,
29918,
4622,
29918,
9891,
13,
4706,
411,
11187,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3150,
613,
1722,
29918,
17640,
1125,
13,
9651,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
18884,
1583,
29889,
9294,
5574,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
29898,
1311,
29889,
2917,
29918,
1445,
29918,
2084,
876,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1311,
29889,
4905,
29889,
657,
1767,
2141,
1975,
2541,
703,
29961,
25634,
3352,
29962,
847,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
3971,
7790,
29876,
5783,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
3150,
29918,
17640,
29889,
17640,
29918,
29883,
4293,
511,
14704,
4804,
11219,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
742,
525,
29878,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
1649,
5893,
1649,
3285,
29905,
29876,
1246,
2141,
949,
9012,
3285,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
1649,
13322,
12035,
8516,
29892,
6213,
29892,
6213,
20481,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
11219,
7070,
29914,
9675,
16948,
29889,
29881,
29914,
29945,
29945,
29899,
6834,
29899,
17281,
29889,
5527,
742,
525,
29893,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
1649,
5893,
1649,
3285,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
3539,
14237,
9342,
1966,
29876,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
417,
29889,
6834,
29918,
17281,
353,
29871,
29900,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
3539,
877,
1966,
29876,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
3539,
877,
1212,
29889,
666,
29894,
29946,
29889,
5527,
29889,
497,
29889,
6834,
29918,
17281,
353,
29871,
29900,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
3539,
877,
1966,
29876,
5477,
29905,
29876,
29908,
13,
462,
462,
462,
1678,
376,
1246,
2141,
1649,
13322,
12035,
8516,
29892,
6213,
29892,
6213,
4638,
1159,
13,
4706,
1583,
29889,
9294,
5574,
29898,
9933,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
3198,
29918,
4905,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
613,
736,
29918,
1767,
29922,
8977,
3101,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
736,
29918,
1767,
29922,
8824,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
8698,
29898,
1311,
29892,
6459,
29918,
17640,
29892,
2295,
29918,
17640,
1125,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
5574,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
4905,
29889,
657,
1767,
3285,
376,
6362,
837,
2827,
565,
738,
19510,
526,
731,
304,
11455,
564,
29886,
7274,
29905,
29876,
29908,
13,
462,
462,
462,
14704,
14605,
26925,
29962,
564,
29886,
11455,
338,
12708,
363,
599,
19510,
7790,
29876,
1159,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
1217,
29918,
1745,
15844,
403,
29898,
1311,
29892,
6459,
29918,
17640,
29892,
2295,
29918,
17640,
1125,
13,
4706,
2295,
29918,
17640,
29889,
2457,
29918,
1767,
353,
8853,
29933,
11375,
4897,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
14480,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
29933,
11375,
3352,
29918,
24483,
1115,
9657,
3285,
13,
462,
462,
1678,
376,
1525,
2303,
4571,
3040,
1115,
7700,
29892,
13,
462,
462,
1678,
376,
14605,
3970,
1115,
5852,
29913,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
5574,
703,
29961,
3904,
25634,
3352,
29962,
5240,
287,
11685,
9301,
1728,
9196,
322,
1192,
1745,
15844,
403,
7790,
29876,
29908,
13,
462,
4706,
376,
489,
19509,
408,
3876,
29914,
15360,
29901,
5852,
29905,
29876,
29908,
13,
462,
4706,
376,
489,
830,
5958,
1192,
1745,
15844,
403,
7353,
6790,
29901,
7700,
29905,
29876,
29908,
13,
462,
4706,
14704,
4519,
6227,
11499,
29962,
564,
29886,
11455,
338,
9615,
363,
697,
470,
901,
19510,
29889,
3529,
1074,
278,
3883,
1480,
29905,
29876,
29908,
13,
462,
4706,
297,
1583,
29889,
4905,
29889,
657,
1767,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
275,
1445,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
1627,
786,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5060,
487,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
14057,
545,
29918,
275,
1445,
29898,
1311,
29892,
13,
462,
18884,
17749,
29918,
17640,
29892,
13,
462,
18884,
2329,
29918,
17640,
29892,
13,
462,
18884,
16199,
29918,
17640,
29892,
13,
462,
18884,
338,
1445,
29918,
17640,
29892,
13,
462,
18884,
6459,
29918,
17640,
29892,
13,
462,
18884,
2295,
29918,
17640,
1125,
13,
4706,
2295,
29918,
17640,
29889,
2457,
29918,
1767,
353,
8853,
29933,
11375,
4897,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
14480,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
29933,
11375,
3352,
29918,
24483,
1115,
426,
1311,
29889,
2917,
29918,
1445,
29918,
2084,
29901,
5591,
5372,
29914,
2084,
10758,
13,
462,
462,
1678,
376,
1525,
2303,
4571,
3040,
1115,
5852,
29892,
13,
462,
462,
1678,
376,
14605,
3970,
1115,
5852,
29913,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
5574,
703,
29961,
4519,
6227,
11499,
29962,
564,
29886,
11455,
338,
9615,
363,
697,
470,
901,
19510,
29889,
376,
13,
462,
4706,
376,
12148,
1074,
278,
3883,
1480,
29908,
13,
462,
4706,
297,
1583,
29889,
4905,
29889,
657,
1767,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5060,
487,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5878,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1627,
786,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
275,
1445,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
275,
1445,
613,
736,
29918,
1767,
29922,
8824,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
14057,
545,
29898,
1311,
29892,
2329,
29918,
17640,
29892,
338,
1445,
29918,
17640,
29892,
6459,
29918,
17640,
29892,
2295,
29918,
17640,
1125,
13,
4706,
2295,
29918,
17640,
29889,
2457,
29918,
1767,
353,
8853,
29933,
11375,
4897,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
14480,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
29933,
11375,
3352,
29918,
24483,
1115,
9657,
3285,
13,
462,
462,
1678,
376,
1525,
2303,
4571,
3040,
1115,
5852,
29892,
13,
462,
462,
1678,
376,
14605,
3970,
1115,
5852,
29913,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
5574,
703,
29961,
4519,
6227,
11499,
29962,
564,
29886,
11455,
338,
9615,
363,
697,
470,
901,
19510,
29889,
376,
13,
462,
4706,
376,
12148,
1074,
278,
3883,
1480,
29908,
13,
462,
4706,
297,
1583,
29889,
4905,
29889,
657,
1767,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5878,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
275,
1445,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
2625,
29918,
15987,
7607,
5574,
29892,
7700,
876,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
359,
29889,
2084,
29889,
275,
1445,
613,
736,
29918,
1767,
29922,
8824,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5878,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
5878,
29898,
1311,
29892,
2329,
29918,
17640,
29892,
338,
1445,
29918,
17640,
29892,
6459,
29918,
17640,
29892,
2295,
29918,
17640,
1125,
13,
4706,
2295,
29918,
17640,
29889,
2457,
29918,
1767,
353,
8853,
29933,
11375,
4897,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
14480,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
29933,
11375,
3352,
29918,
24483,
1115,
9657,
3285,
13,
462,
462,
1678,
376,
1525,
2303,
4571,
3040,
1115,
5852,
29892,
13,
462,
462,
1678,
376,
14605,
3970,
1115,
5852,
29913,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
5574,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
4905,
29889,
657,
1767,
3285,
376,
6362,
837,
2827,
565,
738,
19510,
526,
731,
304,
11455,
564,
29886,
7274,
29905,
29876,
29908,
13,
462,
462,
462,
14704,
14605,
26925,
29962,
564,
29886,
11455,
338,
12708,
363,
599,
19510,
376,
13,
462,
462,
462,
376,
7045,
1083,
287,
11685,
7790,
29876,
1159,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5878,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
275,
1445,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
1159,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
4801,
522,
613,
2625,
29918,
15987,
29922,
2451,
29897,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
5060,
487,
613,
736,
29918,
1767,
29922,
5574,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
11739,
29898,
1311,
29892,
17749,
29918,
17640,
29892,
6459,
29918,
17640,
29892,
2295,
29918,
17640,
1125,
13,
4706,
2295,
29918,
17640,
29889,
2457,
29918,
1767,
353,
8853,
29933,
11375,
4897,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
14480,
29918,
9464,
1115,
5591,
1707,
29914,
7050,
29914,
687,
29906,
2096,
613,
13,
462,
462,
1678,
376,
29933,
11375,
3352,
29918,
24483,
1115,
426,
1311,
29889,
2917,
29918,
1445,
29918,
2084,
29901,
5591,
5372,
29914,
2084,
10758,
13,
462,
462,
1678,
376,
1525,
2303,
4571,
3040,
1115,
5852,
29892,
13,
462,
462,
1678,
376,
14605,
3970,
1115,
5852,
29913,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5060,
487,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
4801,
522,
29918,
17640,
29889,
13998,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
657,
29918,
2917,
29918,
8977,
613,
2625,
29918,
15987,
29922,
5971,
2392,
29897,
13,
1678,
822,
1243,
29918,
3389,
29918,
14057,
545,
29918,
2917,
29918,
11739,
29898,
1311,
29892,
2295,
29918,
17640,
1125,
13,
4706,
411,
3030,
1982,
29889,
17886,
29918,
25393,
29898,
1311,
29889,
4905,
1125,
13,
9651,
1583,
29889,
9294,
8824,
29898,
1545,
29884,
1026,
9197,
29889,
4351,
29889,
6834,
17281,
29889,
3389,
3101,
13,
4706,
1583,
29889,
9294,
5574,
29898,
1311,
29889,
4905,
29889,
657,
1767,
2141,
1975,
2541,
703,
1123,
1493,
278,
10748,
304,
8161,
278,
4556,
310,
278,
2228,
7790,
29876,
5783,
13,
4706,
1583,
29889,
9294,
5574,
29898,
2917,
29918,
17640,
29889,
13998,
29897,
13,
2
] |
moyu_engine/config/system/save_system.py | MoYuStudio/MYSG01 | 0 | 79883 | <reponame>MoYuStudio/MYSG01<gh_stars>0
import pickle
import moyu_engine.config.data.constants as C
class SavaSystem:
def save_tilemap():
f=open('moyu_engine/config/data/game_save','wb')
save_data = {'window':C.window}
pickle.dump(save_data, f)
f.close()
def read_tilemap():
f=open('moyu_engine/config/data/game_save', 'rb')
read_data = pickle.load(f)
C.window = read_data['window']
f.close() | [
1,
529,
276,
1112,
420,
29958,
22638,
29979,
29884,
28867,
29914,
17870,
26016,
29900,
29896,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
5215,
5839,
280,
13,
13,
5215,
19966,
29884,
29918,
10599,
29889,
2917,
29889,
1272,
29889,
3075,
1934,
408,
315,
13,
13,
1990,
317,
879,
3924,
29901,
13,
268,
13,
1678,
822,
4078,
29918,
29873,
488,
1958,
7295,
13,
13,
4706,
285,
29922,
3150,
877,
4346,
29891,
29884,
29918,
10599,
29914,
2917,
29914,
1272,
29914,
11802,
29918,
7620,
3788,
29893,
29890,
1495,
13,
4706,
4078,
29918,
1272,
353,
11117,
7165,
2396,
29907,
29889,
7165,
29913,
13,
4706,
5839,
280,
29889,
15070,
29898,
7620,
29918,
1272,
29892,
285,
29897,
13,
4706,
285,
29889,
5358,
580,
13,
13,
1678,
822,
1303,
29918,
29873,
488,
1958,
7295,
13,
13,
4706,
285,
29922,
3150,
877,
4346,
29891,
29884,
29918,
10599,
29914,
2917,
29914,
1272,
29914,
11802,
29918,
7620,
742,
525,
6050,
1495,
13,
4706,
1303,
29918,
1272,
353,
5839,
280,
29889,
1359,
29898,
29888,
29897,
13,
4706,
315,
29889,
7165,
353,
1303,
29918,
1272,
1839,
7165,
2033,
13,
4706,
285,
29889,
5358,
580,
2
] |
bzt/modules/shellexec.py | dreading/taurus | 0 | 132045 | <reponame>dreading/taurus
"""
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import os
import subprocess
from subprocess import CalledProcessError
from bzt import TaurusConfigError
from bzt.engine import Service
from bzt.six import iteritems
from bzt.utils import ensure_is_dict
from bzt.utils import shutdown_process, BetterDict, is_windows
ARTIFACTS_DIR_ENVVAR = "TAURUS_ARTIFACTS_DIR"
class ShellExecutor(Service):
def __init__(self):
super(ShellExecutor, self).__init__()
self.prepare_tasks = []
self.startup_tasks = []
self.check_tasks = []
self.shutdown_tasks = []
self.postprocess_tasks = []
def _load_tasks(self, stage, container):
if not isinstance(self.parameters.get(stage, []), list):
self.parameters[stage] = [self.parameters[stage]]
for index, stage_task in enumerate(self.parameters.get(stage, [])):
stage_task = ensure_is_dict(self.parameters[stage], index, "command")
task_config = self.parameters[stage][index]
default_cwd = self.settings.get("default-cwd", None)
cwd = self.engine.find_file(task_config.get("cwd", default_cwd))
if cwd is None:
working_dir = self.engine.default_cwd
elif cwd == 'artifacts-dir':
working_dir = self.engine.artifacts_dir
else:
working_dir = cwd
# todo: move it to new env
env = BetterDict.from_dict({k: os.environ.get(k) for k in os.environ.keys()})
env.merge(self.settings.get('env'))
env.merge(task_config.get('env'))
env.merge({"PYTHONPATH": working_dir})
if os.getenv("PYTHONPATH"):
env['PYTHONPATH'] = os.getenv("PYTHONPATH") + os.pathsep + env['PYTHONPATH']
env[ARTIFACTS_DIR_ENVVAR] = self.engine.artifacts_dir
for name, value in iteritems(env):
env[str(name)] = str(value)
task = Task(task_config, self.log, working_dir, env)
container.append(task)
self.log.debug("Added %s task: %s", stage, stage_task)
def prepare(self):
"""
Configure Tasks
:return:
"""
self._load_tasks('prepare', self.prepare_tasks)
self._load_tasks('startup', self.startup_tasks)
self._load_tasks('check', self.check_tasks)
self._load_tasks('shutdown', self.shutdown_tasks)
self._load_tasks('post-process', self.postprocess_tasks)
for task in self.prepare_tasks:
task.start()
def startup(self):
for task in self.startup_tasks:
task.start()
def check(self):
for task in self.check_tasks:
task.start()
for task in self.prepare_tasks + self.startup_tasks + self.check_tasks:
task.check()
return super(ShellExecutor, self).check()
def shutdown(self):
for task in self.shutdown_tasks:
task.start()
for task in self.check_tasks + self.startup_tasks:
task.shutdown()
def post_process(self):
for task in self.shutdown_tasks + self.check_tasks + self.startup_tasks + self.prepare_tasks:
task.shutdown()
for task in self.postprocess_tasks:
task.start()
task.shutdown()
class Task(object):
"""
:type process: subprocess.Popen
"""
def __init__(self, config, parent_log, working_dir, env):
self.log = parent_log.getChild(self.__class__.__name__)
self.working_dir = working_dir
self.env = env
self.command = config.get("command", TaurusConfigError("Parameter is required: command"))
self.is_background = config.get("background", False)
self.ignore_failure = config.get("ignore-failure", False)
self.err = config.get("err", subprocess.PIPE)
self.out = config.get("out", subprocess.PIPE)
self.process = None
self.ret_code = None
def start(self):
"""
Start task
"""
if self.process:
self.check()
self.log.info("Process still running: %s", self)
return
if self.out is not None and self.out != subprocess.PIPE:
out = open(self.out, 'at')
else:
out = self.out
if self.err is not None and self.err != subprocess.PIPE:
err = open(self.err, 'at')
else:
err = self.err
kwargs = {
'args': self.command,
'stdout': out,
'stderr': err,
'cwd': self.working_dir,
'env': self.env,
'shell': True
}
# FIXME: shouldn't we bother closing opened descriptors?
if not is_windows():
kwargs['preexec_fn'] = os.setpgrp
kwargs['close_fds'] = True
self.log.info("Starting shell command: %s", self)
self.process = subprocess.Popen(**kwargs)
if self.is_background:
self.log.debug("Task started, PID: %d", self.process.pid)
else:
self.check(sync=True)
def check(self, sync=False):
if not self.process or self.ret_code is not None: # finished task
return
self.ret_code = self.process.poll()
if self.ret_code is None and not sync:
self.log.debug('Task: %s is not finished yet', self)
return False
stdout, stderr = self.process.communicate()
self.ret_code = self.process.poll()
if stdout and (self.out == subprocess.PIPE):
self.log.debug("Output for %s:\n%s", self, stdout)
if stderr and (self.err == subprocess.PIPE):
self.log.warning("Errors for %s:\n%s", self, stderr)
self.log.debug("Task was finished with exit code %s: %s", self.ret_code, self)
if not self.ignore_failure and self.ret_code != 0:
if self.out != subprocess.PIPE:
self.log.warning("Output for %s:\n%s", self, stdout)
raise CalledProcessError(self.ret_code, self)
return True
def shutdown(self):
"""
If task was not completed, kill process, provide output
else provide output
:return:
"""
self.check()
if self.process and self.ret_code is None:
self.log.info("Background task was not completed, shutting it down: %s", self)
shutdown_process(self.process, self.log)
self.process = None
def __repr__(self):
return self.command
| [
1,
529,
276,
1112,
420,
29958,
29881,
19715,
29914,
941,
17142,
13,
15945,
29908,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29945,
10465,
911,
29924,
1308,
9266,
29889,
13,
13,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
6293,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
3492,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
259,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
2525,
2222,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
5721,
7541,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29956,
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,
13393,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
13400,
800,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
3166,
1014,
5014,
1053,
3037,
839,
7032,
2392,
13,
13,
3166,
289,
2065,
1053,
323,
6698,
375,
3991,
2392,
13,
3166,
289,
2065,
29889,
10599,
1053,
6692,
13,
3166,
289,
2065,
29889,
28319,
1053,
4256,
7076,
13,
3166,
289,
2065,
29889,
13239,
1053,
9801,
29918,
275,
29918,
8977,
13,
3166,
289,
2065,
29889,
13239,
1053,
12522,
3204,
29918,
5014,
29892,
26965,
21533,
29892,
338,
29918,
10499,
13,
13,
8322,
29902,
4519,
1783,
29903,
29918,
9464,
29918,
25838,
26865,
353,
376,
6040,
4574,
3308,
29918,
8322,
29902,
4519,
1783,
29903,
29918,
9464,
29908,
13,
13,
13,
1990,
1383,
514,
13366,
29898,
3170,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
16037,
13366,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
19125,
29918,
20673,
353,
5159,
13,
4706,
1583,
29889,
2962,
786,
29918,
20673,
353,
5159,
13,
4706,
1583,
29889,
3198,
29918,
20673,
353,
5159,
13,
4706,
1583,
29889,
845,
329,
3204,
29918,
20673,
353,
5159,
13,
4706,
1583,
29889,
2490,
5014,
29918,
20673,
353,
5159,
13,
13,
1678,
822,
903,
1359,
29918,
20673,
29898,
1311,
29892,
7408,
29892,
5639,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
1311,
29889,
16744,
29889,
657,
29898,
19190,
29892,
5159,
511,
1051,
1125,
13,
9651,
1583,
29889,
16744,
29961,
19190,
29962,
353,
518,
1311,
29889,
16744,
29961,
19190,
5262,
13,
13,
4706,
363,
2380,
29892,
7408,
29918,
7662,
297,
26985,
29898,
1311,
29889,
16744,
29889,
657,
29898,
19190,
29892,
5159,
22164,
13,
9651,
7408,
29918,
7662,
353,
9801,
29918,
275,
29918,
8977,
29898,
1311,
29889,
16744,
29961,
19190,
1402,
2380,
29892,
376,
6519,
1159,
13,
9651,
3414,
29918,
2917,
353,
1583,
29889,
16744,
29961,
19190,
3816,
2248,
29962,
13,
9651,
2322,
29918,
29883,
9970,
353,
1583,
29889,
11027,
29889,
657,
703,
4381,
29899,
29883,
9970,
613,
6213,
29897,
13,
9651,
274,
9970,
353,
1583,
29889,
10599,
29889,
2886,
29918,
1445,
29898,
7662,
29918,
2917,
29889,
657,
703,
29883,
9970,
613,
2322,
29918,
29883,
9970,
876,
13,
9651,
565,
274,
9970,
338,
6213,
29901,
13,
18884,
1985,
29918,
3972,
353,
1583,
29889,
10599,
29889,
4381,
29918,
29883,
9970,
13,
9651,
25342,
274,
9970,
1275,
525,
8813,
29879,
29899,
3972,
2396,
13,
18884,
1985,
29918,
3972,
353,
1583,
29889,
10599,
29889,
8813,
29879,
29918,
3972,
13,
9651,
1683,
29901,
13,
18884,
1985,
29918,
3972,
353,
274,
9970,
13,
13,
9651,
396,
10481,
29901,
4337,
372,
304,
716,
8829,
13,
9651,
8829,
353,
26965,
21533,
29889,
3166,
29918,
8977,
3319,
29895,
29901,
2897,
29889,
21813,
29889,
657,
29898,
29895,
29897,
363,
413,
297,
2897,
29889,
21813,
29889,
8149,
580,
1800,
13,
9651,
8829,
29889,
14634,
29898,
1311,
29889,
11027,
29889,
657,
877,
6272,
8785,
13,
9651,
8829,
29889,
14634,
29898,
7662,
29918,
2917,
29889,
657,
877,
6272,
8785,
13,
9651,
8829,
29889,
14634,
3319,
29908,
20055,
4690,
1164,
10145,
1115,
1985,
29918,
3972,
1800,
13,
9651,
565,
2897,
29889,
657,
6272,
703,
20055,
4690,
1164,
10145,
29908,
1125,
13,
18884,
8829,
1839,
20055,
4690,
1164,
10145,
2033,
353,
2897,
29889,
657,
6272,
703,
20055,
4690,
1164,
10145,
1159,
718,
2897,
29889,
2084,
19570,
718,
8829,
1839,
20055,
4690,
1164,
10145,
2033,
13,
9651,
8829,
29961,
8322,
29902,
4519,
1783,
29903,
29918,
9464,
29918,
25838,
26865,
29962,
353,
1583,
29889,
10599,
29889,
8813,
29879,
29918,
3972,
13,
13,
9651,
363,
1024,
29892,
995,
297,
4256,
7076,
29898,
6272,
1125,
13,
18884,
8829,
29961,
710,
29898,
978,
4638,
353,
851,
29898,
1767,
29897,
13,
13,
9651,
3414,
353,
9330,
29898,
7662,
29918,
2917,
29892,
1583,
29889,
1188,
29892,
1985,
29918,
3972,
29892,
8829,
29897,
13,
9651,
5639,
29889,
4397,
29898,
7662,
29897,
13,
9651,
1583,
29889,
1188,
29889,
8382,
703,
2528,
287,
1273,
29879,
3414,
29901,
1273,
29879,
613,
7408,
29892,
7408,
29918,
7662,
29897,
13,
13,
1678,
822,
19012,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
1281,
4532,
9330,
29879,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
1583,
3032,
1359,
29918,
20673,
877,
19125,
742,
1583,
29889,
19125,
29918,
20673,
29897,
13,
4706,
1583,
3032,
1359,
29918,
20673,
877,
2962,
786,
742,
1583,
29889,
2962,
786,
29918,
20673,
29897,
13,
4706,
1583,
3032,
1359,
29918,
20673,
877,
3198,
742,
1583,
29889,
3198,
29918,
20673,
29897,
13,
4706,
1583,
3032,
1359,
29918,
20673,
877,
845,
329,
3204,
742,
1583,
29889,
845,
329,
3204,
29918,
20673,
29897,
13,
4706,
1583,
3032,
1359,
29918,
20673,
877,
2490,
29899,
5014,
742,
1583,
29889,
2490,
5014,
29918,
20673,
29897,
13,
13,
4706,
363,
3414,
297,
1583,
29889,
19125,
29918,
20673,
29901,
13,
9651,
3414,
29889,
2962,
580,
13,
13,
1678,
822,
20234,
29898,
1311,
1125,
13,
4706,
363,
3414,
297,
1583,
29889,
2962,
786,
29918,
20673,
29901,
13,
9651,
3414,
29889,
2962,
580,
13,
13,
1678,
822,
1423,
29898,
1311,
1125,
13,
4706,
363,
3414,
297,
1583,
29889,
3198,
29918,
20673,
29901,
13,
9651,
3414,
29889,
2962,
580,
13,
13,
4706,
363,
3414,
297,
1583,
29889,
19125,
29918,
20673,
718,
1583,
29889,
2962,
786,
29918,
20673,
718,
1583,
29889,
3198,
29918,
20673,
29901,
13,
9651,
3414,
29889,
3198,
580,
13,
13,
4706,
736,
2428,
29898,
16037,
13366,
29892,
1583,
467,
3198,
580,
13,
13,
1678,
822,
12522,
3204,
29898,
1311,
1125,
13,
4706,
363,
3414,
297,
1583,
29889,
845,
329,
3204,
29918,
20673,
29901,
13,
9651,
3414,
29889,
2962,
580,
13,
13,
4706,
363,
3414,
297,
1583,
29889,
3198,
29918,
20673,
718,
1583,
29889,
2962,
786,
29918,
20673,
29901,
13,
9651,
3414,
29889,
845,
329,
3204,
580,
13,
13,
1678,
822,
1400,
29918,
5014,
29898,
1311,
1125,
13,
4706,
363,
3414,
297,
1583,
29889,
845,
329,
3204,
29918,
20673,
718,
1583,
29889,
3198,
29918,
20673,
718,
1583,
29889,
2962,
786,
29918,
20673,
718,
1583,
29889,
19125,
29918,
20673,
29901,
13,
9651,
3414,
29889,
845,
329,
3204,
580,
13,
13,
4706,
363,
3414,
297,
1583,
29889,
2490,
5014,
29918,
20673,
29901,
13,
9651,
3414,
29889,
2962,
580,
13,
9651,
3414,
29889,
845,
329,
3204,
580,
13,
13,
13,
1990,
9330,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
584,
1853,
1889,
29901,
1014,
5014,
29889,
29925,
3150,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2295,
29892,
3847,
29918,
1188,
29892,
1985,
29918,
3972,
29892,
8829,
1125,
13,
4706,
1583,
29889,
1188,
353,
3847,
29918,
1188,
29889,
657,
5938,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29897,
13,
4706,
1583,
29889,
22899,
29918,
3972,
353,
1985,
29918,
3972,
13,
4706,
1583,
29889,
6272,
353,
8829,
13,
13,
4706,
1583,
29889,
6519,
353,
2295,
29889,
657,
703,
6519,
613,
323,
6698,
375,
3991,
2392,
703,
9329,
338,
3734,
29901,
1899,
5783,
13,
4706,
1583,
29889,
275,
29918,
7042,
353,
2295,
29889,
657,
703,
7042,
613,
7700,
29897,
13,
4706,
1583,
29889,
17281,
29918,
14057,
545,
353,
2295,
29889,
657,
703,
17281,
29899,
14057,
545,
613,
7700,
29897,
13,
4706,
1583,
29889,
3127,
353,
2295,
29889,
657,
703,
3127,
613,
1014,
5014,
29889,
2227,
4162,
29897,
13,
4706,
1583,
29889,
449,
353,
2295,
29889,
657,
703,
449,
613,
1014,
5014,
29889,
2227,
4162,
29897,
13,
4706,
1583,
29889,
5014,
353,
6213,
13,
4706,
1583,
29889,
2267,
29918,
401,
353,
6213,
13,
13,
1678,
822,
1369,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7370,
3414,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
5014,
29901,
13,
9651,
1583,
29889,
3198,
580,
13,
9651,
1583,
29889,
1188,
29889,
3888,
703,
7032,
1603,
2734,
29901,
1273,
29879,
613,
1583,
29897,
13,
9651,
736,
13,
13,
4706,
565,
1583,
29889,
449,
338,
451,
6213,
322,
1583,
29889,
449,
2804,
1014,
5014,
29889,
2227,
4162,
29901,
13,
9651,
714,
353,
1722,
29898,
1311,
29889,
449,
29892,
525,
271,
1495,
13,
4706,
1683,
29901,
13,
9651,
714,
353,
1583,
29889,
449,
13,
13,
4706,
565,
1583,
29889,
3127,
338,
451,
6213,
322,
1583,
29889,
3127,
2804,
1014,
5014,
29889,
2227,
4162,
29901,
13,
9651,
4589,
353,
1722,
29898,
1311,
29889,
3127,
29892,
525,
271,
1495,
13,
4706,
1683,
29901,
13,
9651,
4589,
353,
1583,
29889,
3127,
13,
13,
4706,
9049,
5085,
353,
426,
13,
9651,
525,
5085,
2396,
1583,
29889,
6519,
29892,
13,
9651,
525,
25393,
2396,
714,
29892,
13,
9651,
525,
303,
20405,
2396,
4589,
29892,
13,
9651,
525,
29883,
9970,
2396,
1583,
29889,
22899,
29918,
3972,
29892,
13,
9651,
525,
6272,
2396,
1583,
29889,
6272,
29892,
13,
9651,
525,
15903,
2396,
5852,
13,
4706,
500,
13,
4706,
396,
383,
6415,
2303,
29901,
9273,
29915,
29873,
591,
24738,
14382,
6496,
29037,
943,
29973,
13,
4706,
565,
451,
338,
29918,
10499,
7295,
13,
9651,
9049,
5085,
1839,
1457,
4258,
29918,
9144,
2033,
353,
2897,
29889,
842,
29886,
629,
29886,
13,
9651,
9049,
5085,
1839,
5358,
29918,
29888,
6289,
2033,
353,
5852,
13,
13,
4706,
1583,
29889,
1188,
29889,
3888,
703,
4763,
292,
6473,
1899,
29901,
1273,
29879,
613,
1583,
29897,
13,
4706,
1583,
29889,
5014,
353,
1014,
5014,
29889,
29925,
3150,
29898,
1068,
19290,
29897,
13,
4706,
565,
1583,
29889,
275,
29918,
7042,
29901,
13,
9651,
1583,
29889,
1188,
29889,
8382,
703,
5398,
4687,
29892,
349,
1367,
29901,
1273,
29881,
613,
1583,
29889,
5014,
29889,
5935,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3198,
29898,
16593,
29922,
5574,
29897,
13,
13,
1678,
822,
1423,
29898,
1311,
29892,
16523,
29922,
8824,
1125,
13,
4706,
565,
451,
1583,
29889,
5014,
470,
1583,
29889,
2267,
29918,
401,
338,
451,
6213,
29901,
259,
396,
7743,
3414,
13,
9651,
736,
13,
13,
4706,
1583,
29889,
2267,
29918,
401,
353,
1583,
29889,
5014,
29889,
29886,
3028,
580,
13,
13,
4706,
565,
1583,
29889,
2267,
29918,
401,
338,
6213,
322,
451,
16523,
29901,
13,
9651,
1583,
29889,
1188,
29889,
8382,
877,
5398,
29901,
1273,
29879,
338,
451,
7743,
3447,
742,
1583,
29897,
13,
9651,
736,
7700,
13,
13,
4706,
27591,
29892,
380,
20405,
353,
1583,
29889,
5014,
29889,
27820,
403,
580,
13,
4706,
1583,
29889,
2267,
29918,
401,
353,
1583,
29889,
5014,
29889,
29886,
3028,
580,
13,
13,
4706,
565,
27591,
322,
313,
1311,
29889,
449,
1275,
1014,
5014,
29889,
2227,
4162,
1125,
13,
9651,
1583,
29889,
1188,
29889,
8382,
703,
6466,
363,
1273,
29879,
3583,
29876,
29995,
29879,
613,
1583,
29892,
27591,
29897,
13,
13,
4706,
565,
380,
20405,
322,
313,
1311,
29889,
3127,
1275,
1014,
5014,
29889,
2227,
4162,
1125,
13,
9651,
1583,
29889,
1188,
29889,
27392,
703,
22463,
363,
1273,
29879,
3583,
29876,
29995,
29879,
613,
1583,
29892,
380,
20405,
29897,
13,
13,
4706,
1583,
29889,
1188,
29889,
8382,
703,
5398,
471,
7743,
411,
6876,
775,
1273,
29879,
29901,
1273,
29879,
613,
1583,
29889,
2267,
29918,
401,
29892,
1583,
29897,
13,
4706,
565,
451,
1583,
29889,
17281,
29918,
14057,
545,
322,
1583,
29889,
2267,
29918,
401,
2804,
29871,
29900,
29901,
13,
9651,
565,
1583,
29889,
449,
2804,
1014,
5014,
29889,
2227,
4162,
29901,
13,
18884,
1583,
29889,
1188,
29889,
27392,
703,
6466,
363,
1273,
29879,
3583,
29876,
29995,
29879,
613,
1583,
29892,
27591,
29897,
13,
9651,
12020,
3037,
839,
7032,
2392,
29898,
1311,
29889,
2267,
29918,
401,
29892,
1583,
29897,
13,
4706,
736,
5852,
13,
13,
1678,
822,
12522,
3204,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
960,
3414,
471,
451,
8676,
29892,
12088,
1889,
29892,
3867,
1962,
13,
4706,
1683,
3867,
1962,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
1583,
29889,
3198,
580,
13,
13,
4706,
565,
1583,
29889,
5014,
322,
1583,
29889,
2267,
29918,
401,
338,
6213,
29901,
13,
9651,
1583,
29889,
1188,
29889,
3888,
703,
10581,
3414,
471,
451,
8676,
29892,
12522,
1259,
372,
1623,
29901,
1273,
29879,
613,
1583,
29897,
13,
9651,
12522,
3204,
29918,
5014,
29898,
1311,
29889,
5014,
29892,
1583,
29889,
1188,
29897,
13,
13,
4706,
1583,
29889,
5014,
353,
6213,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
6519,
13,
2
] |
milefrienddb/models/clients.py | jcrjaci/mil_test | 0 | 1602130 | <filename>milefrienddb/models/clients.py
"""Clients's app models."""
import uuid
from django.db import models
class Client(models.Model):
"""Model representing a client."""
DRIVER_LICENSE_PATH = 'clients/driver_license'
PHOTO_PATH = 'clients/photos'
CERT_INCORPORATION_PATH = 'clients/certificate_incorporation'
UTILITY_BILL_PATH = 'clients/utility_bill'
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
first_name = models.CharField(max_length=32)
last_name = models.CharField(max_length=32)
street = models.CharField(max_length=255)
city = models.CharField(max_length=255)
state = models.CharField(max_length=255)
phone = models.CharField(max_length=16)
email = models.CharField(max_length=64)
driver_license = models.FileField(upload_to=DRIVER_LICENSE_PATH, blank=True)
photo = models.FileField(upload_to=PHOTO_PATH)
bank_name = models.CharField(max_length=32)
bank_account_number = models.CharField(max_length=255)
insured_score = models.FloatField(default=0)
is_company = models.BooleanField(default=False)
certificate_incorporation = models.FileField(upload_to=CERT_INCORPORATION_PATH, blank=True)
utility_bill = models.FileField(upload_to=UTILITY_BILL_PATH, blank=True)
def __str__(self):
"""String representation of the object."""
return "{0}, {1} {2}".format(self.id, self.first_name, self.last_name)
class Meta:
db_table = 'clients_client'
app_label = 'milefrienddb'
| [
1,
529,
9507,
29958,
26763,
18326,
2585,
29914,
9794,
29914,
11303,
1237,
29889,
2272,
13,
15945,
29908,
29907,
492,
1237,
29915,
29879,
623,
4733,
1213,
15945,
13,
13,
5215,
318,
5416,
13,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
1990,
12477,
29898,
9794,
29889,
3195,
1125,
13,
1678,
9995,
3195,
15783,
263,
3132,
1213,
15945,
13,
13,
1678,
360,
3960,
5348,
29918,
27888,
1430,
1660,
29918,
10145,
353,
525,
11303,
1237,
29914,
9465,
29918,
506,
1947,
29915,
13,
1678,
349,
29950,
2891,
29949,
29918,
10145,
353,
525,
11303,
1237,
29914,
561,
15788,
29915,
13,
1678,
315,
20161,
29918,
1177,
29907,
1955,
29925,
1955,
8098,
29918,
10145,
353,
525,
11303,
1237,
29914,
6327,
8021,
29918,
262,
2616,
1971,
362,
29915,
13,
1678,
501,
29911,
6227,
11937,
29918,
12809,
2208,
29918,
10145,
353,
525,
11303,
1237,
29914,
329,
1793,
29918,
29890,
453,
29915,
13,
13,
1678,
1178,
353,
4733,
29889,
29965,
11150,
3073,
29898,
16072,
29918,
1989,
29922,
5574,
29892,
2322,
29922,
25118,
29889,
25118,
29946,
29892,
3863,
519,
29922,
8824,
29897,
13,
1678,
937,
29918,
978,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29906,
29897,
13,
1678,
1833,
29918,
978,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29906,
29897,
13,
1678,
11952,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
4272,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
2106,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
9008,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29953,
29897,
13,
1678,
4876,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29953,
29946,
29897,
13,
1678,
7156,
29918,
506,
1947,
353,
4733,
29889,
2283,
3073,
29898,
9009,
29918,
517,
29922,
29928,
3960,
5348,
29918,
27888,
1430,
1660,
29918,
10145,
29892,
9654,
29922,
5574,
29897,
13,
1678,
15373,
353,
4733,
29889,
2283,
3073,
29898,
9009,
29918,
517,
29922,
19689,
2891,
29949,
29918,
10145,
29897,
13,
1678,
9124,
29918,
978,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29906,
29897,
13,
1678,
9124,
29918,
10149,
29918,
4537,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
1663,
2955,
29918,
13628,
353,
4733,
29889,
11031,
3073,
29898,
4381,
29922,
29900,
29897,
13,
1678,
338,
29918,
14518,
353,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
29897,
13,
1678,
12289,
29918,
262,
2616,
1971,
362,
353,
4733,
29889,
2283,
3073,
29898,
9009,
29918,
517,
29922,
29907,
20161,
29918,
1177,
29907,
1955,
29925,
1955,
8098,
29918,
10145,
29892,
9654,
29922,
5574,
29897,
13,
1678,
19725,
29918,
29890,
453,
353,
4733,
29889,
2283,
3073,
29898,
9009,
29918,
517,
29922,
2692,
6227,
11937,
29918,
12809,
2208,
29918,
10145,
29892,
9654,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
9995,
1231,
8954,
310,
278,
1203,
1213,
15945,
13,
4706,
736,
29850,
29900,
1118,
426,
29896,
29913,
426,
29906,
29913,
1642,
4830,
29898,
1311,
29889,
333,
29892,
1583,
29889,
4102,
29918,
978,
29892,
1583,
29889,
4230,
29918,
978,
29897,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
4833,
29918,
2371,
353,
525,
11303,
1237,
29918,
4645,
29915,
13,
4706,
623,
29918,
1643,
353,
525,
26763,
18326,
2585,
29915,
13,
2
] |
exercises/028.py | rpoliselit/python-for-dummies | 0 | 71184 | <gh_stars>0
"""
Make a program that the user has to guess a number
between 1 and 5, then returns winner or loser.
"""
from random import randint
w, l = 0, 0
play = 'y'
while play == 'y':
guess = int(input('Make your guess: '))
number = randint(1,5)
if guess == number:
print('You wins!')
w += 1
else:
print('You lose!\nCorrect answer is {}.'.format(number))
l += 1
play = str(input('Play again? [y/n]\n')).strip().lower()
score = 100 * w / (w + l)
print('Score = {:.1f}%.\nW: {}\nL: {}'.format(score,w,l))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
9984,
263,
1824,
393,
278,
1404,
756,
304,
4140,
263,
1353,
13,
14811,
29871,
29896,
322,
29871,
29945,
29892,
769,
3639,
19576,
470,
1232,
261,
29889,
13,
15945,
29908,
13,
13,
3166,
4036,
1053,
20088,
524,
13,
29893,
29892,
301,
353,
29871,
29900,
29892,
29871,
29900,
13,
13,
1456,
353,
525,
29891,
29915,
13,
8000,
1708,
1275,
525,
29891,
2396,
13,
13,
1678,
4140,
353,
938,
29898,
2080,
877,
9984,
596,
4140,
29901,
525,
876,
13,
1678,
1353,
353,
20088,
524,
29898,
29896,
29892,
29945,
29897,
13,
13,
1678,
565,
4140,
1275,
1353,
29901,
13,
4706,
1596,
877,
3492,
21614,
29991,
1495,
13,
4706,
281,
4619,
29871,
29896,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
3492,
14074,
9903,
29876,
12521,
1621,
1234,
338,
426,
1836,
4286,
4830,
29898,
4537,
876,
13,
4706,
301,
4619,
29871,
29896,
13,
13,
1678,
1708,
353,
851,
29898,
2080,
877,
13454,
1449,
29973,
518,
29891,
29914,
29876,
10725,
29876,
1495,
467,
17010,
2141,
13609,
580,
13,
13,
13628,
353,
29871,
29896,
29900,
29900,
334,
281,
847,
313,
29893,
718,
301,
29897,
13,
2158,
877,
20097,
353,
12365,
29889,
29896,
29888,
10560,
7790,
29876,
29956,
29901,
426,
1012,
29876,
29931,
29901,
6571,
4286,
4830,
29898,
13628,
29892,
29893,
29892,
29880,
876,
13,
2
] |
landlab/components/soil_moisture/__init__.py | awickert/landlab | 1 | 133833 | <filename>landlab/components/soil_moisture/__init__.py
from .soil_moisture_dynamics import SoilMoisture
from .infiltrate_soil_green_ampt import SoilInfiltrationGreenAmpt
__all__ = ['SoilMoisture',
'SoilInfiltrationGreenAmpt', ]
| [
1,
529,
9507,
29958,
1049,
8205,
29914,
14036,
29914,
578,
309,
29918,
4346,
391,
545,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
578,
309,
29918,
4346,
391,
545,
29918,
29881,
2926,
1199,
1053,
1105,
309,
22638,
391,
545,
13,
3166,
869,
262,
1777,
509,
403,
29918,
578,
309,
29918,
12692,
29918,
314,
415,
1053,
1105,
309,
797,
1777,
509,
362,
24599,
6833,
415,
13,
13,
13,
1649,
497,
1649,
353,
6024,
6295,
309,
22638,
391,
545,
742,
13,
965,
525,
6295,
309,
797,
1777,
509,
362,
24599,
6833,
415,
742,
4514,
13,
2
] |
plugins/python/tasks.py | BBVA/deeptracy | 85 | 3826 | import json
from washer.worker.actions import AppendStdout, AppendStderr
from washer.worker.actions import CreateNamedLog, AppendToLog
from washer.worker.actions import SetProperty
from washer.worker.commands import washertask
def pipenv_graph2deps(rawgraph):
graph = json.loads(rawgraph)
def build_entry(data):
if 'required_version' in data:
spec = data['key'] + data['required_version']
else:
spec = data['key']
return {'installer': 'pipenv',
'spec': spec,
'source': 'pypi',
'name': data['package_name'],
'version': data['installed_version']}
def extract_dependencies(entries):
for entry in entries:
if 'package' in entry:
package = entry['package']
dependencies = entry.get('dependencies', [])
yield build_entry(package)
yield from extract_dependencies(dependencies)
else:
yield build_entry(entry)
yield from extract_dependencies(graph)
@washertask
def pip_install(repopath, path=".", **kwargs):
import invoke
c = invoke.Context()
with c.cd(repopath):
with c.cd(path):
res = c.run("pipenv install .")
deps = c.run("pipenv graph --json")
yield AppendStdout(res.stdout)
yield AppendStderr(res.stderr)
yield SetProperty("dependencies", list(pipenv_graph2deps(deps.stdout)))
return True
@washertask
def requirement_file(repopath, requirement="requirements.txt",
path=".", **kwargs):
import invoke
c = invoke.Context()
with c.cd(repopath):
with c.cd(path):
res = c.run("pipenv install -r %s" % requirement)
deps = c.run("pipenv graph --json")
yield AppendStdout(res.stdout)
yield AppendStderr(res.stderr)
yield SetProperty("dependencies", list(pipenv_graph2deps(deps.stdout)))
return True
| [
1,
1053,
4390,
13,
13,
3166,
471,
2276,
29889,
24602,
29889,
7387,
1053,
22871,
855,
29881,
449,
29892,
22871,
855,
20405,
13,
3166,
471,
2276,
29889,
24602,
29889,
7387,
1053,
6204,
22175,
3403,
29892,
22871,
1762,
3403,
13,
3166,
471,
2276,
29889,
24602,
29889,
7387,
1053,
3789,
4854,
13,
3166,
471,
2276,
29889,
24602,
29889,
26381,
1053,
471,
29882,
814,
1278,
13,
13,
13,
1753,
8450,
6272,
29918,
4262,
29906,
311,
567,
29898,
1610,
4262,
1125,
13,
1678,
3983,
353,
4390,
29889,
18132,
29898,
1610,
4262,
29897,
13,
13,
1678,
822,
2048,
29918,
8269,
29898,
1272,
1125,
13,
4706,
565,
525,
12403,
29918,
3259,
29915,
297,
848,
29901,
13,
9651,
1580,
353,
848,
1839,
1989,
2033,
718,
848,
1839,
12403,
29918,
3259,
2033,
13,
4706,
1683,
29901,
13,
9651,
1580,
353,
848,
1839,
1989,
2033,
13,
13,
4706,
736,
11117,
6252,
261,
2396,
525,
13096,
6272,
742,
13,
18884,
525,
6550,
2396,
1580,
29892,
13,
18884,
525,
4993,
2396,
525,
29886,
1478,
29875,
742,
13,
18884,
525,
978,
2396,
848,
1839,
5113,
29918,
978,
7464,
13,
18884,
525,
3259,
2396,
848,
1839,
25537,
29918,
3259,
2033,
29913,
13,
13,
1678,
822,
6597,
29918,
22594,
29898,
26586,
1125,
13,
4706,
363,
6251,
297,
9976,
29901,
13,
9651,
565,
525,
5113,
29915,
297,
6251,
29901,
13,
18884,
3577,
353,
6251,
1839,
5113,
2033,
13,
18884,
9962,
353,
6251,
29889,
657,
877,
22594,
742,
518,
2314,
13,
18884,
7709,
2048,
29918,
8269,
29898,
5113,
29897,
13,
18884,
7709,
515,
6597,
29918,
22594,
29898,
22594,
29897,
13,
9651,
1683,
29901,
13,
18884,
7709,
2048,
29918,
8269,
29898,
8269,
29897,
13,
13,
1678,
7709,
515,
6597,
29918,
22594,
29898,
4262,
29897,
13,
13,
13,
29992,
29893,
1161,
814,
1278,
13,
1753,
8450,
29918,
6252,
29898,
3445,
459,
493,
29892,
2224,
543,
19602,
3579,
19290,
1125,
13,
1678,
1053,
15928,
13,
1678,
274,
353,
15928,
29889,
2677,
580,
13,
13,
1678,
411,
274,
29889,
2252,
29898,
3445,
459,
493,
1125,
13,
4706,
411,
274,
29889,
2252,
29898,
2084,
1125,
13,
9651,
620,
353,
274,
29889,
3389,
703,
13096,
6272,
2601,
869,
1159,
13,
9651,
316,
567,
353,
274,
29889,
3389,
703,
13096,
6272,
3983,
1192,
3126,
1159,
13,
13,
1678,
7709,
22871,
855,
29881,
449,
29898,
690,
29889,
25393,
29897,
13,
1678,
7709,
22871,
855,
20405,
29898,
690,
29889,
303,
20405,
29897,
13,
1678,
7709,
3789,
4854,
703,
22594,
613,
1051,
29898,
13096,
6272,
29918,
4262,
29906,
311,
567,
29898,
311,
567,
29889,
25393,
4961,
13,
13,
1678,
736,
5852,
13,
13,
13,
29992,
29893,
1161,
814,
1278,
13,
1753,
11809,
29918,
1445,
29898,
3445,
459,
493,
29892,
11809,
543,
12277,
1860,
29889,
3945,
613,
13,
462,
268,
2224,
543,
19602,
3579,
19290,
1125,
13,
1678,
1053,
15928,
13,
1678,
274,
353,
15928,
29889,
2677,
580,
13,
13,
1678,
411,
274,
29889,
2252,
29898,
3445,
459,
493,
1125,
13,
4706,
411,
274,
29889,
2252,
29898,
2084,
1125,
13,
9651,
620,
353,
274,
29889,
3389,
703,
13096,
6272,
2601,
448,
29878,
1273,
29879,
29908,
1273,
11809,
29897,
13,
9651,
316,
567,
353,
274,
29889,
3389,
703,
13096,
6272,
3983,
1192,
3126,
1159,
13,
13,
1678,
7709,
22871,
855,
29881,
449,
29898,
690,
29889,
25393,
29897,
13,
1678,
7709,
22871,
855,
20405,
29898,
690,
29889,
303,
20405,
29897,
13,
1678,
7709,
3789,
4854,
703,
22594,
613,
1051,
29898,
13096,
6272,
29918,
4262,
29906,
311,
567,
29898,
311,
567,
29889,
25393,
4961,
13,
13,
1678,
736,
5852,
13,
2
] |
cms/templatetags/html.py | cresset-group/cms | 13 | 1603438 | <gh_stars>10-100
'''Template tags used for processing HTML.'''
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django_jinja import library
from cms.html import process as process_html
@library.filter
@stringfilter
def html(text):
'''
Processes HTML text.
The text is checked for permalinks embedded in <a> tags, expanding the
permalinks to their referenced URL. Images containing a permalink source
are checked for size and thumbnailed as appropriate.
'''
if not text:
return ''
text = process_html(text)
return mark_safe(text)
@library.filter
@stringfilter
def truncate_paragraphs(text, number):
'''Returns HTML text truncated to the given number of paragraphs.'''
position = 0
count = 0
while count < number and position < len(text):
position = text.find('</p>', position)
if position == -1:
position = len(text)
else:
position += 4
count += 1
return text[:position]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
12008,
6733,
8282,
1304,
363,
9068,
4544,
29889,
12008,
13,
13,
3166,
9557,
29889,
6886,
29889,
4381,
26705,
1053,
1347,
4572,
13,
3166,
9557,
29889,
13239,
29889,
29879,
2142,
342,
5393,
1053,
2791,
29918,
11177,
13,
3166,
9557,
29918,
28789,
1764,
1053,
3489,
13,
13,
3166,
274,
1516,
29889,
1420,
1053,
1889,
408,
1889,
29918,
1420,
13,
13,
13,
29992,
5258,
29889,
4572,
13,
29992,
1807,
4572,
13,
1753,
3472,
29898,
726,
1125,
13,
1678,
14550,
13,
1678,
10554,
267,
4544,
1426,
29889,
13,
13,
1678,
450,
1426,
338,
7120,
363,
3635,
284,
19363,
15685,
297,
529,
29874,
29958,
8282,
29892,
7985,
292,
278,
13,
1678,
3635,
284,
19363,
304,
1009,
16180,
3988,
29889,
1954,
1179,
6943,
263,
3635,
284,
682,
2752,
13,
1678,
526,
7120,
363,
2159,
322,
28968,
1056,
2356,
408,
8210,
29889,
13,
1678,
14550,
13,
1678,
565,
451,
1426,
29901,
13,
4706,
736,
6629,
13,
1678,
1426,
353,
1889,
29918,
1420,
29898,
726,
29897,
13,
1678,
736,
2791,
29918,
11177,
29898,
726,
29897,
13,
13,
13,
29992,
5258,
29889,
4572,
13,
29992,
1807,
4572,
13,
1753,
21022,
403,
29918,
26956,
29879,
29898,
726,
29892,
1353,
1125,
13,
1678,
14550,
11609,
29879,
4544,
1426,
21022,
630,
304,
278,
2183,
1353,
310,
14880,
29879,
29889,
12008,
13,
1678,
2602,
353,
29871,
29900,
13,
1678,
2302,
353,
29871,
29900,
13,
1678,
1550,
2302,
529,
1353,
322,
2602,
529,
7431,
29898,
726,
1125,
13,
4706,
2602,
353,
1426,
29889,
2886,
877,
829,
29886,
29958,
742,
2602,
29897,
13,
4706,
565,
2602,
1275,
448,
29896,
29901,
13,
9651,
2602,
353,
7431,
29898,
726,
29897,
13,
4706,
1683,
29901,
13,
9651,
2602,
4619,
29871,
29946,
13,
4706,
2302,
4619,
29871,
29896,
13,
1678,
736,
1426,
7503,
3283,
29962,
13,
2
] |
tests/bugs/core_6088_test.py | reevespaul/firebird-qa | 0 | 146689 | #coding:utf-8
#
# id: bugs.core_6088
# title: "SIMILAR TO" hangs when processing parenthesis
# decription:
# Confirmed normal work (evaluation for less than 5 ms) on WI-T4.0.0.1598
# 31.12.2020: increased max duration threshold from 100 to 150 ms.
#
# tracker_id: CORE-6088
# min_versions: ['4.0']
# versions: 4.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 4.0
# resources: None
substitutions_1 = []
init_script_1 = """"""
db_1 = db_factory(sql_dialect=3, init=init_script_1)
test_script_1 = """
set list on;
set count on;
set term ^;
execute block as
begin
rdb$set_context( 'USER_SESSION','DTS_START', cast('now' as timestamp) );
rdb$set_context( 'USER_SESSION','MAX_THRESHOLD_MS', 150 );
-- ^
-- |
-- #############################
-- MAX ALLOWED EXECUTION TIME,MS
-- #############################
end
^
set term ;^
select 1 as result from RDB$DATABASE
where 'a-b c(d)'
similar to '[[:WHITESPACE:]a-z\\-]{0,199}' escape '\\'
-- ^
-- |
-- ATTENTION: TWO BACKSLASHES MUST BE HERE WHEN USE FBT_RUN TO CHECK
-- ###############
;
set count off;
select
iif( evaluated_ms <= max_allowed_ms
,'acceptable'
,'TOO LONG: ' || evaluated_ms || ' ms - this is more then threshold = ' || max_allowed_ms || ' ms'
) as duration
from (
select
datediff( millisecond from cast(rdb$get_context( 'USER_SESSION','DTS_START') as timestamp) to current_timestamp ) evaluated_ms
,cast( rdb$get_context( 'USER_SESSION','MAX_THRESHOLD_MS' ) as int ) as max_allowed_ms
from rdb$database
);
"""
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
expected_stdout_1 = """
Records affected: 0
DURATION acceptable
"""
@pytest.mark.version('>=4.0')
def test_1(act_1: Action):
act_1.expected_stdout = expected_stdout_1
act_1.execute()
assert act_1.clean_expected_stdout == act_1.clean_stdout
| [
1,
396,
29883,
3689,
29901,
9420,
29899,
29947,
13,
29937,
13,
29937,
1178,
29901,
965,
24557,
29889,
3221,
29918,
29953,
29900,
29947,
29947,
13,
29937,
3611,
29901,
4706,
376,
5425,
29924,
6227,
1718,
7495,
29908,
13958,
29879,
746,
9068,
3847,
29882,
6656,
13,
29937,
316,
3395,
29901,
1678,
13,
29937,
462,
1678,
10811,
381,
2168,
4226,
664,
313,
24219,
362,
363,
3109,
1135,
29871,
29945,
10887,
29897,
373,
399,
29902,
29899,
29911,
29946,
29889,
29900,
29889,
29900,
29889,
29896,
29945,
29929,
29947,
13,
29937,
462,
268,
29941,
29896,
29889,
29896,
29906,
29889,
29906,
29900,
29906,
29900,
29901,
11664,
4236,
14385,
16897,
515,
29871,
29896,
29900,
29900,
304,
29871,
29896,
29945,
29900,
10887,
29889,
13,
29937,
462,
13,
29937,
1020,
4937,
29918,
333,
29901,
259,
4810,
1525,
29899,
29953,
29900,
29947,
29947,
13,
29937,
1375,
29918,
26100,
29901,
6024,
29946,
29889,
29900,
2033,
13,
29937,
6910,
29901,
418,
29946,
29889,
29900,
13,
29937,
3855,
6563,
29901,
308,
6213,
13,
13,
5215,
11451,
1688,
13,
3166,
3974,
18513,
29889,
25621,
1053,
4833,
29918,
14399,
29892,
338,
1519,
29918,
627,
29892,
9123,
13,
13,
29937,
1873,
29901,
29871,
29946,
29889,
29900,
13,
29937,
7788,
29901,
6213,
13,
13,
22492,
5008,
29879,
29918,
29896,
353,
5159,
13,
13,
2344,
29918,
2154,
29918,
29896,
353,
9995,
15945,
29908,
13,
13,
2585,
29918,
29896,
353,
4833,
29918,
14399,
29898,
2850,
29918,
15321,
781,
29922,
29941,
29892,
2069,
29922,
2344,
29918,
2154,
29918,
29896,
29897,
13,
13,
1688,
29918,
2154,
29918,
29896,
353,
9995,
13,
1678,
731,
1051,
373,
29936,
13,
1678,
731,
2302,
373,
29936,
13,
13,
1678,
731,
1840,
6228,
29936,
13,
1678,
6222,
2908,
408,
13,
1678,
3380,
13,
4706,
364,
2585,
29938,
842,
29918,
4703,
29898,
525,
11889,
29918,
17493,
3788,
29928,
9375,
29918,
25826,
742,
4320,
877,
3707,
29915,
408,
14334,
29897,
3482,
13,
4706,
364,
2585,
29938,
842,
29918,
4703,
29898,
525,
11889,
29918,
17493,
3788,
12648,
29918,
4690,
1525,
7068,
5607,
29928,
29918,
4345,
742,
259,
29896,
29945,
29900,
3482,
13,
4706,
1192,
462,
462,
462,
1678,
6228,
13,
4706,
1192,
462,
462,
462,
1678,
891,
13,
4706,
1192,
462,
462,
418,
835,
13383,
7346,
2277,
13,
4706,
1192,
462,
462,
418,
18134,
15149,
9806,
3352,
8528,
11206,
2692,
2725,
323,
8890,
29892,
4345,
13,
4706,
1192,
462,
462,
418,
835,
13383,
7346,
2277,
13,
1678,
1095,
13,
1678,
6228,
13,
1678,
731,
1840,
2056,
29985,
13,
13,
13,
1678,
1831,
29871,
29896,
408,
1121,
515,
390,
4051,
29938,
25832,
27982,
29871,
13,
1678,
988,
525,
29874,
29899,
29890,
274,
29898,
29881,
16029,
29871,
13,
1678,
2788,
304,
525,
29961,
7503,
25039,
1806,
2890,
29925,
11538,
17531,
29874,
29899,
29920,
1966,
29899,
3199,
29900,
29892,
29896,
29929,
29929,
10162,
10169,
525,
1966,
29915,
13,
1678,
1192,
462,
462,
18884,
6228,
13,
1678,
1192,
462,
462,
18884,
891,
13,
1678,
1192,
462,
795,
15531,
29911,
3919,
2725,
29901,
323,
29956,
29949,
350,
11375,
12750,
24943,
2890,
341,
17321,
20700,
379,
27267,
17980,
501,
1660,
28816,
29911,
29918,
29934,
3904,
7495,
23557,
13,
1678,
1192,
462,
462,
308,
835,
7346,
4136,
13,
1678,
2056,
29871,
13,
13,
1678,
731,
2302,
1283,
29936,
13,
1678,
1831,
29871,
13,
4706,
474,
361,
29898,
19030,
29918,
1516,
5277,
4236,
29918,
24622,
29918,
1516,
13,
9651,
1919,
29915,
16044,
519,
29915,
13,
9651,
1919,
29915,
4986,
29949,
365,
20614,
29901,
525,
3830,
19030,
29918,
1516,
3830,
525,
10887,
448,
445,
338,
901,
769,
16897,
353,
525,
3830,
4236,
29918,
24622,
29918,
1516,
3830,
525,
10887,
29915,
13,
965,
1723,
408,
14385,
13,
1678,
515,
313,
13,
4706,
1831,
29871,
13,
632,
29797,
2593,
29898,
3533,
18802,
515,
4320,
29898,
29878,
2585,
29938,
657,
29918,
4703,
29898,
525,
11889,
29918,
17493,
3788,
29928,
9375,
29918,
25826,
1495,
408,
14334,
29897,
304,
1857,
29918,
16394,
1723,
19030,
29918,
1516,
13,
9651,
1919,
4384,
29898,
364,
2585,
29938,
657,
29918,
4703,
29898,
525,
11889,
29918,
17493,
3788,
12648,
29918,
4690,
1525,
7068,
5607,
29928,
29918,
4345,
29915,
1723,
408,
938,
1723,
408,
4236,
29918,
24622,
29918,
1516,
13,
4706,
515,
364,
2585,
29938,
9803,
13,
1678,
3482,
13,
29871,
9995,
13,
13,
627,
29918,
29896,
353,
338,
1519,
29918,
627,
877,
2585,
29918,
29896,
742,
1243,
29918,
2154,
29918,
29896,
29892,
23697,
29879,
29922,
22492,
5008,
29879,
29918,
29896,
29897,
13,
13,
9684,
29918,
25393,
29918,
29896,
353,
9995,
13,
1678,
7983,
15201,
29901,
29871,
29900,
13,
1678,
360,
4574,
8098,
462,
4706,
22691,
13,
29871,
9995,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3259,
877,
18572,
29946,
29889,
29900,
1495,
13,
1753,
1243,
29918,
29896,
29898,
627,
29918,
29896,
29901,
9123,
1125,
13,
1678,
1044,
29918,
29896,
29889,
9684,
29918,
25393,
353,
3806,
29918,
25393,
29918,
29896,
13,
1678,
1044,
29918,
29896,
29889,
7978,
580,
13,
1678,
4974,
1044,
29918,
29896,
29889,
14941,
29918,
9684,
29918,
25393,
1275,
1044,
29918,
29896,
29889,
14941,
29918,
25393,
13,
13,
2
] |
data-scraper/main.py | tmthyln/MarylandMaps | 0 | 129165 | import requests
import csv
from bs4 import BeautifulSoup
import time
import wget
import ssl
import random
ssl._create_default_https_context = ssl._create_unverified_context
domain = "https://digital.lib.umd.edu"
attributes = {'Title'}
downloaded_map_cnt = 0
def download_image(record):
time.sleep(random.random() * 1)
link = domain + record.find('a')['href']
try:
return wget.download(link)
except:
return link
def get_map(link, fields, dowwnload_the_image):
link = domain + link
print(link)
map_page = requests.get(link)
map_soup = BeautifulSoup(map_page.content, 'html.parser')
divs = map_soup.find_all("div", {"class": "search-record"})
title_div = map_soup.find("div", {"id": "main-content"})
title_text = title_div.find("h1").text.strip()
map_record = {'Title': title_text}
for d in divs:
record = d.find_all("div")
key = record[0].text.strip()[:-1]
if key == "Digital Image":
val = download_image(record[1])
else:
val = record[1].text.strip()
map_record[key] = val
fields.add(key)
print(map_record)
return map_record
def parse_maps():
url_base = "https://digital.lib.umd.edu/mdmap/search/facet/Digitized/Yes?pageNumber="
maps = []
map_cnt = 0
for i in range(1,7):
page = requests.get(url_base+str(i))
soup = BeautifulSoup(page.content, 'html.parser')
divs = soup.find_all("div", {"class": "search-record"})
for d in divs:
time.sleep(random.random()*2+5)
maps.append(get_map(d.find('a')['href'], attributes, map_cnt>=downloaded_map_cnt))
map_cnt += 1
return maps
mapslist = parse_maps()
with open('maps.csv', 'w', newline='') as csvfile:
writer = csv.DictWriter(csvfile, fieldnames=attributes)
writer.writeheader()
writer.writerows(mapslist) | [
1,
1053,
7274,
13,
5215,
11799,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
5215,
931,
13,
5215,
281,
657,
13,
5215,
24250,
13,
5215,
4036,
13,
13,
16265,
3032,
3258,
29918,
4381,
29918,
991,
29918,
4703,
353,
24250,
3032,
3258,
29918,
348,
369,
2164,
29918,
4703,
13,
7247,
353,
376,
991,
597,
7501,
2410,
29889,
1982,
29889,
398,
29881,
29889,
6085,
29908,
13,
15697,
353,
11117,
7030,
10827,
13,
10382,
287,
29918,
1958,
29918,
20047,
353,
29871,
29900,
13,
13,
1753,
5142,
29918,
3027,
29898,
11651,
1125,
13,
1678,
931,
29889,
17059,
29898,
8172,
29889,
8172,
580,
334,
29871,
29896,
29897,
13,
1678,
1544,
353,
5354,
718,
2407,
29889,
2886,
877,
29874,
1495,
1839,
12653,
2033,
13,
1678,
1018,
29901,
13,
4706,
736,
281,
657,
29889,
10382,
29898,
2324,
29897,
13,
1678,
5174,
29901,
13,
4706,
736,
1544,
13,
13,
1753,
679,
29918,
1958,
29898,
2324,
29892,
4235,
29892,
16611,
1233,
1359,
29918,
1552,
29918,
3027,
1125,
13,
1678,
1544,
353,
5354,
718,
1544,
13,
1678,
1596,
29898,
2324,
29897,
13,
1678,
2910,
29918,
3488,
353,
7274,
29889,
657,
29898,
2324,
29897,
13,
1678,
2910,
29918,
29879,
1132,
353,
25685,
29903,
1132,
29898,
1958,
29918,
3488,
29889,
3051,
29892,
525,
1420,
29889,
16680,
1495,
13,
1678,
24641,
353,
2910,
29918,
29879,
1132,
29889,
2886,
29918,
497,
703,
4563,
613,
8853,
1990,
1115,
376,
4478,
29899,
11651,
29908,
1800,
13,
1678,
3611,
29918,
4563,
353,
2910,
29918,
29879,
1132,
29889,
2886,
703,
4563,
613,
29871,
8853,
333,
1115,
376,
3396,
29899,
3051,
29908,
1800,
13,
1678,
3611,
29918,
726,
353,
3611,
29918,
4563,
29889,
2886,
703,
29882,
29896,
2564,
726,
29889,
17010,
580,
13,
1678,
2910,
29918,
11651,
353,
11117,
7030,
2396,
3611,
29918,
726,
29913,
13,
1678,
363,
270,
297,
24641,
29901,
13,
4706,
2407,
353,
270,
29889,
2886,
29918,
497,
703,
4563,
1159,
13,
4706,
1820,
353,
2407,
29961,
29900,
1822,
726,
29889,
17010,
580,
7503,
29899,
29896,
29962,
13,
4706,
565,
1820,
1275,
376,
27103,
7084,
1115,
13,
9651,
659,
353,
5142,
29918,
3027,
29898,
11651,
29961,
29896,
2314,
13,
4706,
1683,
29901,
13,
9651,
659,
353,
2407,
29961,
29896,
1822,
726,
29889,
17010,
580,
13,
4706,
2910,
29918,
11651,
29961,
1989,
29962,
353,
659,
13,
4706,
4235,
29889,
1202,
29898,
1989,
29897,
13,
1678,
1596,
29898,
1958,
29918,
11651,
29897,
13,
1678,
736,
2910,
29918,
11651,
13,
13,
1753,
6088,
29918,
10339,
7295,
13,
1678,
3142,
29918,
3188,
353,
376,
991,
597,
7501,
2410,
29889,
1982,
29889,
398,
29881,
29889,
6085,
29914,
3487,
1958,
29914,
4478,
29914,
17470,
300,
29914,
14991,
277,
1891,
29914,
8241,
29973,
3488,
4557,
543,
13,
1678,
11053,
353,
5159,
13,
1678,
2910,
29918,
20047,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
29955,
1125,
13,
4706,
1813,
353,
7274,
29889,
657,
29898,
2271,
29918,
3188,
29974,
710,
29898,
29875,
876,
13,
4706,
22300,
353,
25685,
29903,
1132,
29898,
3488,
29889,
3051,
29892,
525,
1420,
29889,
16680,
1495,
13,
4706,
24641,
353,
22300,
29889,
2886,
29918,
497,
703,
4563,
613,
8853,
1990,
1115,
376,
4478,
29899,
11651,
29908,
1800,
13,
4706,
363,
270,
297,
24641,
29901,
13,
9651,
931,
29889,
17059,
29898,
8172,
29889,
8172,
580,
29930,
29906,
29974,
29945,
29897,
13,
9651,
11053,
29889,
4397,
29898,
657,
29918,
1958,
29898,
29881,
29889,
2886,
877,
29874,
1495,
1839,
12653,
7464,
8393,
29892,
2910,
29918,
20047,
18572,
10382,
287,
29918,
1958,
29918,
20047,
876,
13,
9651,
2910,
29918,
20047,
4619,
29871,
29896,
13,
1678,
736,
11053,
13,
13,
10339,
1761,
353,
6088,
29918,
10339,
580,
13,
2541,
1722,
877,
10339,
29889,
7638,
742,
525,
29893,
742,
25899,
2433,
1495,
408,
11799,
1445,
29901,
13,
1678,
9227,
353,
11799,
29889,
21533,
10507,
29898,
7638,
1445,
29892,
1746,
7039,
29922,
15697,
29897,
13,
1678,
9227,
29889,
3539,
6672,
580,
13,
1678,
9227,
29889,
13236,
1242,
29898,
10339,
1761,
29897,
2
] |
examples/basic/wire_feedthrough.py | souviksaha97/spydrnet-physical | 0 | 4224 | """
==========================================
Genrating feedthrough from single instance
==========================================
This example demostrates how to generate a feedthrough wire connection for
a given scalar or vector wires.
**Initial Design**
.. hdl-diagram:: ../../../examples/basic/_initial_design.v
:type: netlistsvg
:align: center
:module: top
**Output1** ``wire0`` feedthough from ``inst_2_1``
.. hdl-diagram:: ../../../examples/basic/_output_wire.v
:type: netlistsvg
:align: center
:module: top
**Output2** ``bus_in`` feedthrough from ``inst_1_0``
.. hdl-diagram:: ../../../examples/basic/_output_bus.v
:type: netlistsvg
:align: center
:module: top
"""
from os import path
import spydrnet as sdn
import spydrnet_physical as sdnphy
netlist = sdnphy.load_netlist_by_name('basic_hierarchy')
top = netlist.top_instance.reference
cable0 = next(top.get_cables("wire0"))
inst2 = next(top.get_instances("inst_2_0"))
sdn.compose(netlist, '_initial_design.v', skip_constraints=True)
top.create_feedthrough(inst2, cable0)
top.create_unconn_wires()
sdn.compose(netlist, '_output_wire.v', skip_constraints=True)
netlist = sdnphy.load_netlist_by_name('basic_hierarchy')
top = netlist.top_instance.reference
bus_in = next(top.get_cables("bus_in"))
inst1 = next(top.get_instances("inst_1_0"))
cables = top.create_feedthrough(inst1, bus_in)
top.create_unconn_wires()
sdn.compose(netlist, '_output_bus.v', skip_constraints=True)
| [
1,
9995,
13,
9166,
9166,
4936,
1360,
13,
15462,
29741,
8343,
20678,
515,
2323,
2777,
13,
9166,
9166,
4936,
1360,
13,
13,
4013,
1342,
1261,
520,
29878,
1078,
920,
304,
5706,
263,
8343,
20678,
8014,
3957,
363,
13,
29874,
2183,
17336,
470,
4608,
281,
2658,
29889,
13,
13,
1068,
15514,
12037,
1068,
13,
13,
636,
298,
11671,
29899,
6051,
14442,
1057,
29772,
21546,
19057,
29914,
16121,
19891,
11228,
29918,
13892,
29889,
29894,
13,
259,
584,
1853,
29901,
7787,
1761,
15120,
13,
259,
584,
2520,
29901,
4818,
13,
259,
584,
5453,
29901,
2246,
13,
13,
13,
1068,
6466,
29896,
1068,
4954,
22376,
29900,
16159,
8343,
3592,
515,
4954,
2611,
29918,
29906,
29918,
29896,
16159,
13,
13,
636,
298,
11671,
29899,
6051,
14442,
1057,
29772,
21546,
19057,
29914,
16121,
19891,
4905,
29918,
22376,
29889,
29894,
13,
259,
584,
1853,
29901,
7787,
1761,
15120,
13,
259,
584,
2520,
29901,
4818,
13,
259,
584,
5453,
29901,
2246,
13,
13,
1068,
6466,
29906,
1068,
4954,
8262,
29918,
262,
16159,
8343,
20678,
515,
4954,
2611,
29918,
29896,
29918,
29900,
16159,
13,
13,
636,
298,
11671,
29899,
6051,
14442,
1057,
29772,
21546,
19057,
29914,
16121,
19891,
4905,
29918,
8262,
29889,
29894,
13,
259,
584,
1853,
29901,
7787,
1761,
15120,
13,
259,
584,
2520,
29901,
4818,
13,
259,
584,
5453,
29901,
2246,
13,
13,
15945,
29908,
13,
13,
3166,
2897,
1053,
2224,
13,
5215,
805,
2941,
29878,
1212,
408,
269,
5200,
13,
5215,
805,
2941,
29878,
1212,
29918,
14017,
936,
408,
269,
5200,
11461,
13,
13,
1212,
1761,
353,
269,
5200,
11461,
29889,
1359,
29918,
1212,
1761,
29918,
1609,
29918,
978,
877,
16121,
29918,
29882,
631,
12040,
1495,
13,
13,
3332,
353,
7787,
1761,
29889,
3332,
29918,
8758,
29889,
5679,
13,
29883,
519,
29900,
353,
2446,
29898,
3332,
29889,
657,
29918,
29883,
1849,
703,
22376,
29900,
5783,
13,
2611,
29906,
353,
2446,
29898,
3332,
29889,
657,
29918,
2611,
2925,
703,
2611,
29918,
29906,
29918,
29900,
5783,
13,
13,
4928,
29876,
29889,
19438,
29898,
1212,
1761,
29892,
22868,
11228,
29918,
13892,
29889,
29894,
742,
14383,
29918,
13646,
29879,
29922,
5574,
29897,
13,
13,
13,
3332,
29889,
3258,
29918,
18798,
20678,
29898,
2611,
29906,
29892,
21387,
29900,
29897,
13,
3332,
29889,
3258,
29918,
348,
13082,
29918,
29893,
2658,
580,
13,
4928,
29876,
29889,
19438,
29898,
1212,
1761,
29892,
22868,
4905,
29918,
22376,
29889,
29894,
742,
14383,
29918,
13646,
29879,
29922,
5574,
29897,
13,
13,
13,
1212,
1761,
353,
269,
5200,
11461,
29889,
1359,
29918,
1212,
1761,
29918,
1609,
29918,
978,
877,
16121,
29918,
29882,
631,
12040,
1495,
13,
13,
3332,
353,
7787,
1761,
29889,
3332,
29918,
8758,
29889,
5679,
13,
8262,
29918,
262,
353,
2446,
29898,
3332,
29889,
657,
29918,
29883,
1849,
703,
8262,
29918,
262,
5783,
13,
2611,
29896,
353,
2446,
29898,
3332,
29889,
657,
29918,
2611,
2925,
703,
2611,
29918,
29896,
29918,
29900,
5783,
13,
13,
29883,
1849,
353,
2246,
29889,
3258,
29918,
18798,
20678,
29898,
2611,
29896,
29892,
3593,
29918,
262,
29897,
13,
3332,
29889,
3258,
29918,
348,
13082,
29918,
29893,
2658,
580,
13,
4928,
29876,
29889,
19438,
29898,
1212,
1761,
29892,
22868,
4905,
29918,
8262,
29889,
29894,
742,
14383,
29918,
13646,
29879,
29922,
5574,
29897,
13,
2
] |
mmdnn/conversion/examples/tensorflow/extractor.py | ferriswym/MMdnn | 0 | 17863 | <filename>mmdnn/conversion/examples/tensorflow/extractor.py
#----------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#----------------------------------------------------------------------------------------------
from __future__ import absolute_import
import os
import tensorflow as tf
from tensorflow.contrib.slim.nets import vgg
from tensorflow.contrib.slim.nets import inception
from tensorflow.contrib.slim.nets import resnet_v1
from tensorflow.contrib.slim.nets import resnet_v2
from mmdnn.conversion.examples.tensorflow.models import inception_resnet_v2
from mmdnn.conversion.examples.tensorflow.models import mobilenet_v1
from mmdnn.conversion.examples.tensorflow.models import nasnet
from mmdnn.conversion.examples.tensorflow.models.mobilenet import mobilenet_v2
from mmdnn.conversion.examples.tensorflow.models import inception_resnet_v1
from mmdnn.conversion.examples.tensorflow.models import test_rnn
slim = tf.contrib.slim
from mmdnn.conversion.examples.imagenet_test import TestKit
from mmdnn.conversion.examples.extractor import base_extractor
from mmdnn.conversion.common.utils import download_file
# https://github.com/tensorflow/tensorflow/issues/24496
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
class tensorflow_extractor(base_extractor):
MMDNN_BASE_URL = 'http://mmdnn.eastasia.cloudapp.azure.com:89/models/'
architecture_map = {
'vgg16' : {
'url' : 'http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz',
'filename' : 'vgg_16.ckpt',
'builder' : lambda : vgg.vgg_16,
'arg_scope' : vgg.vgg_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1000,
},
'vgg19' : {
'url' : 'http://download.tensorflow.org/models/vgg_19_2016_08_28.tar.gz',
'filename' : 'vgg_19.ckpt',
'builder' : lambda : vgg.vgg_19,
'arg_scope' : vgg.vgg_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1000,
},
'inception_v1' : {
'url' : 'http://download.tensorflow.org/models/inception_v1_2016_08_28.tar.gz',
'filename' : 'inception_v1.ckpt',
'builder' : lambda : inception.inception_v1,
'arg_scope' : inception.inception_v3_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1001,
},
'inception_v1_frozen' : {
'url' : 'https://storage.googleapis.com/download.tensorflow.org/models/inception_v1_2016_08_28_frozen.pb.tar.gz',
'filename' : 'inception_v1_2016_08_28_frozen.pb',
'tensor_out' : ['InceptionV1/Logits/Predictions/Reshape_1:0'],
'tensor_in' : ['input:0'],
'input_shape' : [[224, 224, 3]], # input_shape of the elem in tensor_in
'feed_dict' :lambda img: {'input:0':img},
'num_classes' : 1001,
},
'inception_v3' : {
'url' : 'http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz',
'filename' : 'inception_v3.ckpt',
'builder' : lambda : inception.inception_v3,
'arg_scope' : inception.inception_v3_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'inception_v3_frozen' : {
'url' : 'https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz',
'filename' : 'inception_v3_2016_08_28_frozen.pb',
'tensor_out' : ['InceptionV3/Predictions/Softmax:0'],
'tensor_in' : ['input:0'],
'input_shape' : [[299, 299, 3]], # input_shape of the elem in tensor_in
'feed_dict' :lambda img: {'input:0':img},
'num_classes' : 1001,
},
'resnet_v1_50' : {
'url' : 'http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz',
'filename' : 'resnet_v1_50.ckpt',
'builder' : lambda : resnet_v1.resnet_v1_50,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1000,
},
'resnet_v1_152' : {
'url' : 'http://download.tensorflow.org/models/resnet_v1_152_2016_08_28.tar.gz',
'filename' : 'resnet_v1_152.ckpt',
'builder' : lambda : resnet_v1.resnet_v1_152,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1000,
},
'resnet_v2_50' : {
'url' : 'http://download.tensorflow.org/models/resnet_v2_50_2017_04_14.tar.gz',
'filename' : 'resnet_v2_50.ckpt',
'builder' : lambda : resnet_v2.resnet_v2_50,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'resnet_v2_101' : {
'url' : 'http://download.tensorflow.org/models/resnet_v2_101_2017_04_14.tar.gz',
'filename' : 'resnet_v2_101.ckpt',
'builder' : lambda : resnet_v2.resnet_v2_101,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'resnet_v2_152' : {
'url' : 'http://download.tensorflow.org/models/resnet_v2_152_2017_04_14.tar.gz',
'filename' : 'resnet_v2_152.ckpt',
'builder' : lambda : resnet_v2.resnet_v2_152,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'resnet_v2_200' : {
'url' : 'http://download.tensorflow.org/models/resnet_v2_200_2017_04_14.tar.gz',
'filename' : 'resnet_v2_200.ckpt',
'builder' : lambda : resnet_v2.resnet_v2_200,
'arg_scope' : resnet_v2.resnet_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'mobilenet_v1_1.0' : {
'url' : 'http://download.tensorflow.org/models/mobilenet_v1_1.0_224_2017_06_14.tar.gz',
'filename' : 'mobilenet_v1_1.0_224.ckpt',
'builder' : lambda : mobilenet_v1.mobilenet_v1,
'arg_scope' : mobilenet_v1.mobilenet_v1_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1001,
},
'mobilenet_v1_1.0_frozen' : {
'url' : 'https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_1.0_224_frozen.tgz',
'filename' : 'mobilenet_v1_1.0_224/frozen_graph.pb',
'tensor_out' : ['MobilenetV1/Predictions/Softmax:0'],
'tensor_in' : ['input:0'],
'input_shape' : [[224, 224, 3]], # input_shape of the elem in tensor_in
'feed_dict' :lambda img: {'input:0':img},
'num_classes' : 1001,
},
'mobilenet_v2_1.0_224':{
'url' : 'https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz',
'filename' : 'mobilenet_v2_1.0_224.ckpt',
'builder' : lambda : mobilenet_v2.mobilenet,
'arg_scope' : mobilenet_v2.training_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 224, 224, 3]),
'num_classes' : 1001,
},
'inception_resnet_v2' : {
'url' : 'http://download.tensorflow.org/models/inception_resnet_v2_2016_08_30.tar.gz',
'filename' : 'inception_resnet_v2_2016_08_30.ckpt',
'builder' : lambda : inception_resnet_v2.inception_resnet_v2,
'arg_scope' : inception_resnet_v2.inception_resnet_v2_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 299, 299, 3]),
'num_classes' : 1001,
},
'nasnet-a_large' : {
'url' : 'https://storage.googleapis.com/download.tensorflow.org/models/nasnet-a_large_04_10_2017.tar.gz',
'filename' : 'model.ckpt',
'builder' : lambda : nasnet.build_nasnet_large,
'arg_scope' : nasnet.nasnet_large_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 331, 331, 3]),
'num_classes' : 1001,
},
'facenet' : {
'url' : MMDNN_BASE_URL + 'tensorflow/facenet/20180408-102900.zip',
'filename' : '20180408-102900/model-20180408-102900.ckpt-90',
'builder' : lambda : inception_resnet_v1.inception_resnet_v1,
'arg_scope' : inception_resnet_v1.inception_resnet_v1_arg_scope,
'input' : lambda : tf.placeholder(name='input', dtype=tf.float32, shape=[None, 160, 160, 3]),
'feed_dict' : lambda img: {'input:0':img,'phase_train:0':False},
'num_classes' : 0,
},
'facenet_frozen' : {
'url' : MMDNN_BASE_URL + 'tensorflow/facenet/20180408-102900.zip',
'filename' : '20180408-102900/20180408-102900.pb',
'tensor_out' : ['InceptionResnetV1/Logits/AvgPool_1a_8x8/AvgPool:0'],
'tensor_in' : ['input:0','phase_train:0'],
'input_shape' : [[160, 160, 3],1], # input_shape of the elem in tensor_in
'feed_dict' : lambda img: {'input:0':img,'phase_train:0':False},
'num_classes' : 0,
},
'rnn_lstm_gru_stacked': {
'url' : MMDNN_BASE_URL + 'tensorflow/tf_rnn/tf_rnn.zip', # Note this is just a model used for test, not a standard rnn model.
'filename' :'tf_rnn/tf_lstm_gru_stacked.ckpt',
'builder' :lambda: test_rnn.create_symbol,
'arg_scope' :test_rnn.dummy_arg_scope,
'input' :lambda: tf.placeholder(name='input', dtype=tf.int32, shape=[None, 150]),
'feed_dict' :lambda x:{'input:0': x},
'num_classes' : 0
}
}
@classmethod
def handle_checkpoint(cls, architecture, path):
with slim.arg_scope(cls.architecture_map[architecture]['arg_scope']()):
data_input = cls.architecture_map[architecture]['input']()
logits, endpoints = cls.architecture_map[architecture]['builder']()(
data_input,
num_classes=cls.architecture_map[architecture]['num_classes'],
is_training=False)
if logits.op.type == 'Squeeze':
labels = tf.identity(logits, name='MMdnn_Output')
else:
labels = tf.squeeze(logits, name='MMdnn_Output')
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
saver = tf.train.Saver()
saver.restore(sess, path + cls.architecture_map[architecture]['filename'])
save_path = saver.save(sess, path + "imagenet_{}.ckpt".format(architecture))
print("Model saved in file: %s" % save_path)
import tensorflow.contrib.keras as keras
keras.backend.clear_session()
@classmethod
def handle_frozen_graph(cls, architecture, path):
return
# raise NotImplementedError()
@classmethod
def get_frozen_para(cls, architecture):
frozenname = architecture + '_frozen'
tensor_in = list(map(lambda x:x.split(':')[0], cls.architecture_map[frozenname]['tensor_in']))
tensor_out = list(map(lambda x:x.split(':')[0], cls.architecture_map[frozenname]['tensor_out']))
return cls.architecture_map[frozenname]['filename'], cls.architecture_map[frozenname]['input_shape'], tensor_in, tensor_out
@classmethod
def download(cls, architecture, path="./"):
if cls.sanity_check(architecture):
architecture_file = download_file(cls.architecture_map[architecture]['url'], directory=path, auto_unzip=True)
if not architecture_file:
return None
tf.reset_default_graph()
if 'ckpt' in cls.architecture_map[architecture]['filename']:
cls.handle_checkpoint(architecture, path)
elif cls.architecture_map[architecture]['filename'].endswith('pb'):
cls.handle_frozen_graph(architecture, path)
else:
raise ValueError("Unknown file name [{}].".format(cls.architecture_map[architecture]['filename']))
return architecture_file
else:
return None
@classmethod
def inference(cls, architecture, files, path, test_input_path, is_frozen=False):
if is_frozen:
architecture_ = architecture + "_frozen"
else:
architecture_ = architecture
if cls.download(architecture_, path):
import numpy as np
if 'rnn' not in architecture_:
func = TestKit.preprocess_func['tensorflow'][architecture]
img = func(test_input_path)
img = np.expand_dims(img, axis=0)
input_data = img
else:
input_data = np.load(test_input_path)
if is_frozen:
tf_model_path = cls.architecture_map[architecture_]['filename']
with open(path + tf_model_path, 'rb') as f:
serialized = f.read()
tf.reset_default_graph()
original_gdef = tf.GraphDef()
original_gdef.ParseFromString(serialized)
tf_output_name = cls.architecture_map[architecture_]['tensor_out']
tf_input_name = cls.architecture_map[architecture_]['tensor_in']
feed_dict = cls.architecture_map[architecture_]['feed_dict']
with tf.Graph().as_default() as g:
tf.import_graph_def(original_gdef, name='')
with tf.Session(graph = g, config=config) as sess:
tf_out = sess.run(tf_output_name[0], feed_dict=feed_dict(input_data)) # temporarily think the num of out nodes is one
predict = np.squeeze(tf_out)
return predict
else:
with slim.arg_scope(cls.architecture_map[architecture]['arg_scope']()):
data_input = cls.architecture_map[architecture]['input']()
logits, endpoints = cls.architecture_map[architecture]['builder']()(
data_input,
num_classes=cls.architecture_map[architecture]['num_classes'],
is_training=False)
labels = tf.squeeze(logits)
init = tf.global_variables_initializer()
with tf.Session(config=config) as sess:
sess.run(init)
saver = tf.train.Saver()
saver.restore(sess, path + cls.architecture_map[architecture]['filename'])
predict = sess.run(logits, feed_dict = {data_input : input_data})
import tensorflow.contrib.keras as keras
keras.backend.clear_session()
predict = np.squeeze(predict)
return predict
else:
return None
| [
1,
529,
9507,
29958,
29885,
3487,
15755,
29914,
535,
3259,
29914,
19057,
29914,
29056,
29914,
21111,
272,
29889,
2272,
13,
29937,
2683,
2683,
2683,
2683,
2683,
9072,
489,
13,
29937,
29871,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
29871,
10413,
21144,
1090,
278,
341,
1806,
19245,
29889,
2823,
19245,
29889,
3945,
297,
278,
2060,
3876,
363,
19405,
2472,
29889,
13,
29937,
2683,
2683,
2683,
2683,
2683,
9072,
489,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
2897,
13,
5215,
26110,
408,
15886,
13,
13,
3166,
26110,
29889,
21570,
29889,
2536,
326,
29889,
1212,
29879,
1053,
325,
1505,
13,
3166,
26110,
29889,
21570,
29889,
2536,
326,
29889,
1212,
29879,
1053,
297,
1441,
13,
3166,
26110,
29889,
21570,
29889,
2536,
326,
29889,
1212,
29879,
1053,
620,
1212,
29918,
29894,
29896,
13,
3166,
26110,
29889,
21570,
29889,
2536,
326,
29889,
1212,
29879,
1053,
620,
1212,
29918,
29894,
29906,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
1053,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
1053,
27227,
264,
300,
29918,
29894,
29896,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
1053,
8281,
1212,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
29889,
29885,
12213,
264,
300,
1053,
27227,
264,
300,
29918,
29894,
29906,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
1053,
297,
1441,
29918,
690,
1212,
29918,
29894,
29896,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
29056,
29889,
9794,
1053,
1243,
29918,
29878,
15755,
13,
2536,
326,
353,
15886,
29889,
21570,
29889,
2536,
326,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
326,
5370,
300,
29918,
1688,
1053,
4321,
13117,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
19057,
29889,
21111,
272,
1053,
2967,
29918,
21111,
272,
13,
3166,
286,
3487,
15755,
29889,
535,
3259,
29889,
9435,
29889,
13239,
1053,
5142,
29918,
1445,
13,
13,
29937,
2045,
597,
3292,
29889,
510,
29914,
29056,
29914,
29056,
29914,
12175,
29914,
29906,
29946,
29946,
29929,
29953,
13,
2917,
353,
15886,
29889,
3991,
1184,
517,
580,
13,
2917,
29889,
29887,
3746,
29918,
6768,
29889,
9536,
29918,
29887,
798,
386,
353,
5852,
13,
13,
1990,
26110,
29918,
21111,
272,
29898,
3188,
29918,
21111,
272,
1125,
13,
13,
1678,
341,
5773,
10262,
29918,
25416,
29918,
4219,
353,
525,
1124,
597,
29885,
3487,
15755,
29889,
23027,
26252,
29889,
9274,
932,
29889,
17688,
29889,
510,
29901,
29947,
29929,
29914,
9794,
22208,
13,
13,
1678,
11258,
29918,
1958,
353,
426,
13,
4706,
525,
29894,
1505,
29896,
29953,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
29894,
1505,
29918,
29896,
29953,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29894,
1505,
29918,
29896,
29953,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
325,
1505,
29889,
29894,
1505,
29918,
29896,
29953,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
325,
1505,
29889,
29894,
1505,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
29894,
1505,
29896,
29929,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
29894,
1505,
29918,
29896,
29929,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29894,
1505,
29918,
29896,
29929,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
325,
1505,
29889,
29894,
1505,
29918,
29896,
29929,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
325,
1505,
29889,
29894,
1505,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
1239,
683,
29918,
29894,
29896,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
1239,
683,
29918,
29894,
29896,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
1239,
683,
29918,
29894,
29896,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
297,
1441,
29889,
1239,
683,
29918,
29894,
29896,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
297,
1441,
29889,
1239,
683,
29918,
29894,
29941,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
1239,
683,
29918,
29894,
29896,
29918,
29888,
307,
2256,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
1239,
683,
29918,
29894,
29896,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29918,
29888,
307,
2256,
29889,
24381,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
1239,
683,
29918,
29894,
29896,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29918,
29888,
307,
2256,
29889,
24381,
742,
13,
9651,
525,
20158,
29918,
449,
29915,
29871,
584,
6024,
797,
1441,
29963,
29896,
29914,
3403,
1169,
29914,
23084,
919,
1080,
29914,
1666,
14443,
29918,
29896,
29901,
29900,
7464,
13,
9651,
525,
20158,
29918,
262,
29915,
259,
584,
6024,
2080,
29901,
29900,
7464,
13,
9651,
525,
2080,
29918,
12181,
29915,
584,
5519,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
20526,
29871,
396,
1881,
29918,
12181,
310,
278,
21268,
297,
12489,
29918,
262,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
2892,
10153,
29901,
11117,
2080,
29901,
29900,
2396,
2492,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
1239,
683,
29918,
29894,
29941,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
1239,
683,
29918,
29894,
29941,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
1239,
683,
29918,
29894,
29941,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
297,
1441,
29889,
1239,
683,
29918,
29894,
29941,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
297,
1441,
29889,
1239,
683,
29918,
29894,
29941,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
1239,
683,
29918,
29894,
29941,
29918,
29888,
307,
2256,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
1239,
683,
29918,
29894,
29941,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29918,
29888,
307,
2256,
29889,
24381,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
1239,
683,
29918,
29894,
29941,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29918,
29888,
307,
2256,
29889,
24381,
742,
13,
9651,
525,
20158,
29918,
449,
29915,
29871,
584,
6024,
797,
1441,
29963,
29941,
29914,
23084,
919,
1080,
29914,
6295,
615,
3317,
29901,
29900,
7464,
13,
9651,
525,
20158,
29918,
262,
29915,
259,
584,
6024,
2080,
29901,
29900,
7464,
13,
9651,
525,
2080,
29918,
12181,
29915,
584,
5519,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
20526,
396,
1881,
29918,
12181,
310,
278,
21268,
297,
12489,
29918,
262,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
2892,
10153,
29901,
11117,
2080,
29901,
29900,
2396,
2492,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29896,
29918,
29945,
29900,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29896,
29918,
29945,
29900,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29896,
29918,
29945,
29900,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29896,
29889,
690,
1212,
29918,
29894,
29896,
29918,
29945,
29900,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29896,
29918,
29896,
29945,
29906,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29896,
29918,
29896,
29945,
29906,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29906,
29947,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29896,
29918,
29896,
29945,
29906,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29896,
29889,
690,
1212,
29918,
29894,
29896,
29918,
29896,
29945,
29906,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29906,
29918,
29945,
29900,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29906,
29918,
29945,
29900,
29918,
29906,
29900,
29896,
29955,
29918,
29900,
29946,
29918,
29896,
29946,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29906,
29918,
29945,
29900,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
29894,
29906,
29918,
29945,
29900,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29900,
29896,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29900,
29896,
29918,
29906,
29900,
29896,
29955,
29918,
29900,
29946,
29918,
29896,
29946,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29900,
29896,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29900,
29896,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29945,
29906,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29945,
29906,
29918,
29906,
29900,
29896,
29955,
29918,
29900,
29946,
29918,
29896,
29946,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29945,
29906,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
29894,
29906,
29918,
29896,
29945,
29906,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29900,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29900,
29918,
29906,
29900,
29896,
29955,
29918,
29900,
29946,
29918,
29896,
29946,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29900,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29900,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
620,
1212,
29918,
29894,
29906,
29889,
690,
1212,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29918,
29906,
29900,
29896,
29955,
29918,
29900,
29953,
29918,
29896,
29946,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
27227,
264,
300,
29918,
29894,
29896,
29889,
29885,
12213,
264,
300,
29918,
29894,
29896,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
27227,
264,
300,
29918,
29894,
29896,
29889,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29918,
29888,
307,
2256,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29918,
29888,
307,
2256,
29889,
29873,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29885,
12213,
264,
300,
29918,
29894,
29896,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29914,
29888,
307,
2256,
29918,
4262,
29889,
24381,
742,
13,
9651,
525,
20158,
29918,
449,
29915,
29871,
584,
6024,
29924,
12213,
264,
300,
29963,
29896,
29914,
23084,
919,
1080,
29914,
6295,
615,
3317,
29901,
29900,
7464,
13,
9651,
525,
20158,
29918,
262,
29915,
259,
584,
6024,
2080,
29901,
29900,
7464,
13,
9651,
525,
2080,
29918,
12181,
29915,
584,
5519,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
20526,
396,
1881,
29918,
12181,
310,
278,
21268,
297,
12489,
29918,
262,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
2892,
10153,
29901,
11117,
2080,
29901,
29900,
2396,
2492,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
29885,
12213,
264,
300,
29918,
29894,
29906,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
2396,
29912,
13,
9651,
525,
2271,
29915,
308,
584,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
29885,
12213,
264,
300,
29918,
29894,
29906,
29914,
3198,
9748,
29914,
29885,
12213,
264,
300,
29918,
29894,
29906,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29889,
29873,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29885,
12213,
264,
300,
29918,
29894,
29906,
29918,
29896,
29889,
29900,
29918,
29906,
29906,
29946,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
27227,
264,
300,
29918,
29894,
29906,
29889,
29885,
12213,
264,
300,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
27227,
264,
300,
29918,
29894,
29906,
29889,
26495,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
1124,
597,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29941,
29900,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29918,
29906,
29900,
29896,
29953,
29918,
29900,
29947,
29918,
29941,
29900,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
29889,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
297,
1441,
29918,
690,
1212,
29918,
29894,
29906,
29889,
1239,
683,
29918,
690,
1212,
29918,
29894,
29906,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29906,
29929,
29929,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
22911,
1212,
29899,
29874,
29918,
16961,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
10382,
29889,
29056,
29889,
990,
29914,
9794,
29914,
22911,
1212,
29899,
29874,
29918,
16961,
29918,
29900,
29946,
29918,
29896,
29900,
29918,
29906,
29900,
29896,
29955,
29889,
12637,
29889,
18828,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
4299,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
8281,
1212,
29889,
4282,
29918,
22911,
1212,
29918,
16961,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
8281,
1212,
29889,
22911,
1212,
29918,
16961,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29941,
29941,
29896,
29892,
29871,
29941,
29941,
29896,
29892,
29871,
29941,
11724,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29896,
29900,
29900,
29896,
29892,
13,
4706,
2981,
13,
4706,
525,
17470,
264,
300,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
341,
5773,
10262,
29918,
25416,
29918,
4219,
718,
525,
29056,
29914,
17470,
264,
300,
29914,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29889,
7554,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29914,
4299,
29899,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29889,
384,
415,
29899,
29929,
29900,
742,
13,
9651,
525,
16409,
29915,
268,
584,
14013,
584,
297,
1441,
29918,
690,
1212,
29918,
29894,
29896,
29889,
1239,
683,
29918,
690,
1212,
29918,
29894,
29896,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
297,
1441,
29918,
690,
1212,
29918,
29894,
29896,
29889,
1239,
683,
29918,
690,
1212,
29918,
29894,
29896,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
14013,
584,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29896,
29953,
29900,
29892,
29871,
29896,
29953,
29900,
29892,
29871,
29941,
11724,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
14013,
10153,
29901,
11117,
2080,
29901,
29900,
2396,
2492,
5501,
21646,
29918,
14968,
29901,
29900,
2396,
8824,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
17470,
264,
300,
29918,
29888,
307,
2256,
29915,
584,
426,
13,
9651,
525,
2271,
29915,
308,
584,
341,
5773,
10262,
29918,
25416,
29918,
4219,
718,
525,
29056,
29914,
17470,
264,
300,
29914,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29889,
7554,
742,
13,
9651,
525,
9507,
29915,
1678,
584,
525,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29914,
29906,
29900,
29896,
29947,
29900,
29946,
29900,
29947,
29899,
29896,
29900,
29906,
29929,
29900,
29900,
29889,
24381,
742,
13,
9651,
525,
20158,
29918,
449,
29915,
29871,
584,
6024,
797,
1441,
1666,
1212,
29963,
29896,
29914,
3403,
1169,
29914,
12810,
29887,
11426,
29918,
29896,
29874,
29918,
29947,
29916,
29947,
29914,
12810,
29887,
11426,
29901,
29900,
7464,
13,
9651,
525,
20158,
29918,
262,
29915,
259,
584,
6024,
2080,
29901,
29900,
3788,
21646,
29918,
14968,
29901,
29900,
7464,
13,
9651,
525,
2080,
29918,
12181,
29915,
584,
5519,
29896,
29953,
29900,
29892,
29871,
29896,
29953,
29900,
29892,
29871,
29941,
1402,
29896,
1402,
396,
1881,
29918,
12181,
310,
278,
21268,
297,
12489,
29918,
262,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
14013,
10153,
29901,
11117,
2080,
29901,
29900,
2396,
2492,
5501,
21646,
29918,
14968,
29901,
29900,
2396,
8824,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29900,
29892,
13,
4706,
2981,
13,
4706,
525,
29878,
15755,
29918,
20155,
29885,
29918,
7108,
29918,
1429,
287,
2396,
426,
13,
9651,
525,
2271,
29915,
308,
584,
341,
5773,
10262,
29918,
25416,
29918,
4219,
718,
525,
29056,
29914,
13264,
29918,
29878,
15755,
29914,
13264,
29918,
29878,
15755,
29889,
7554,
742,
29871,
396,
3940,
445,
338,
925,
263,
1904,
1304,
363,
1243,
29892,
451,
263,
3918,
364,
15755,
1904,
29889,
13,
9651,
525,
9507,
29915,
1678,
584,
29915,
13264,
29918,
29878,
15755,
29914,
13264,
29918,
20155,
29885,
29918,
7108,
29918,
1429,
287,
29889,
384,
415,
742,
13,
9651,
525,
16409,
29915,
268,
584,
2892,
29901,
1243,
29918,
29878,
15755,
29889,
3258,
29918,
18098,
29892,
13,
9651,
525,
1191,
29918,
6078,
29915,
259,
584,
1688,
29918,
29878,
15755,
29889,
29881,
11770,
29918,
1191,
29918,
6078,
29892,
13,
9651,
525,
2080,
29915,
539,
584,
2892,
29901,
15886,
29889,
27074,
29898,
978,
2433,
2080,
742,
26688,
29922,
13264,
29889,
524,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29896,
29945,
29900,
11724,
13,
9651,
525,
18798,
29918,
8977,
29915,
259,
584,
2892,
921,
29901,
10998,
2080,
29901,
29900,
2396,
921,
1118,
13,
9651,
525,
1949,
29918,
13203,
29915,
584,
29871,
29900,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4386,
29918,
3198,
3149,
29898,
25932,
29892,
11258,
29892,
2224,
1125,
13,
4706,
411,
2243,
326,
29889,
1191,
29918,
6078,
29898,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
1191,
29918,
6078,
2033,
580,
1125,
13,
9651,
848,
29918,
2080,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
2080,
2033,
580,
13,
9651,
1480,
1169,
29892,
1095,
9748,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
16409,
2033,
580,
29898,
13,
18884,
848,
29918,
2080,
29892,
13,
18884,
954,
29918,
13203,
29922,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
1949,
29918,
13203,
7464,
13,
18884,
338,
29918,
26495,
29922,
8824,
29897,
13,
13,
9651,
565,
1480,
1169,
29889,
459,
29889,
1853,
1275,
525,
29903,
802,
29872,
911,
2396,
13,
18884,
11073,
353,
15886,
29889,
22350,
29898,
1188,
1169,
29892,
1024,
2433,
7428,
5200,
29876,
29918,
6466,
1495,
13,
9651,
1683,
29901,
13,
18884,
11073,
353,
15886,
29889,
29879,
802,
29872,
911,
29898,
1188,
1169,
29892,
1024,
2433,
7428,
5200,
29876,
29918,
6466,
1495,
13,
308,
13,
13,
4706,
2069,
353,
15886,
29889,
10945,
29918,
20897,
29918,
11228,
3950,
580,
13,
4706,
411,
15886,
29889,
7317,
580,
408,
27937,
29901,
13,
9651,
27937,
29889,
3389,
29898,
2344,
29897,
13,
9651,
872,
369,
353,
15886,
29889,
14968,
29889,
29903,
12483,
580,
13,
9651,
872,
369,
29889,
5060,
487,
29898,
29879,
404,
29892,
2224,
718,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
9507,
11287,
13,
9651,
4078,
29918,
2084,
353,
872,
369,
29889,
7620,
29898,
29879,
404,
29892,
2224,
718,
376,
326,
5370,
300,
648,
1836,
384,
415,
1642,
4830,
29898,
25428,
876,
13,
9651,
1596,
703,
3195,
7160,
297,
934,
29901,
1273,
29879,
29908,
1273,
4078,
29918,
2084,
29897,
13,
13,
4706,
1053,
26110,
29889,
21570,
29889,
3946,
294,
408,
13023,
294,
13,
4706,
13023,
294,
29889,
27852,
29889,
8551,
29918,
7924,
580,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4386,
29918,
29888,
307,
2256,
29918,
4262,
29898,
25932,
29892,
11258,
29892,
2224,
1125,
13,
4706,
736,
13,
4706,
396,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
679,
29918,
29888,
307,
2256,
29918,
22752,
29898,
25932,
29892,
11258,
1125,
13,
4706,
14671,
2256,
978,
353,
11258,
718,
22868,
29888,
307,
2256,
29915,
13,
4706,
12489,
29918,
262,
353,
29871,
1051,
29898,
1958,
29898,
2892,
921,
29901,
29916,
29889,
5451,
877,
29901,
29861,
29900,
1402,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
29888,
307,
2256,
978,
22322,
20158,
29918,
262,
25901,
13,
4706,
12489,
29918,
449,
353,
1051,
29898,
1958,
29898,
2892,
921,
29901,
29916,
29889,
5451,
877,
29901,
29861,
29900,
1402,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
29888,
307,
2256,
978,
22322,
20158,
29918,
449,
25901,
13,
4706,
736,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
29888,
307,
2256,
978,
22322,
9507,
7464,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
29888,
307,
2256,
978,
22322,
2080,
29918,
12181,
7464,
12489,
29918,
262,
29892,
12489,
29918,
449,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
5142,
29898,
25932,
29892,
11258,
29892,
2224,
543,
6904,
29908,
1125,
13,
4706,
565,
1067,
29879,
29889,
28455,
537,
29918,
3198,
29898,
25428,
1125,
13,
9651,
11258,
29918,
1445,
353,
5142,
29918,
1445,
29898,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
2271,
7464,
3884,
29922,
2084,
29892,
4469,
29918,
348,
7554,
29922,
5574,
29897,
13,
9651,
565,
451,
11258,
29918,
1445,
29901,
13,
18884,
736,
6213,
13,
13,
9651,
15886,
29889,
12071,
29918,
4381,
29918,
4262,
580,
13,
13,
9651,
565,
525,
384,
415,
29915,
297,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
9507,
2033,
29901,
13,
18884,
1067,
29879,
29889,
8411,
29918,
3198,
3149,
29898,
25428,
29892,
2224,
29897,
13,
13,
9651,
25342,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
9507,
13359,
1975,
2541,
877,
24381,
29374,
13,
18884,
1067,
29879,
29889,
8411,
29918,
29888,
307,
2256,
29918,
4262,
29898,
25428,
29892,
2224,
29897,
13,
632,
13,
9651,
1683,
29901,
13,
18884,
12020,
7865,
2392,
703,
14148,
934,
1024,
15974,
6525,
1213,
29889,
4830,
29898,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
9507,
25901,
13,
13,
9651,
736,
11258,
29918,
1445,
13,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
27262,
29898,
25932,
29892,
11258,
29892,
2066,
29892,
2224,
29892,
1243,
29918,
2080,
29918,
2084,
29892,
338,
29918,
29888,
307,
2256,
29922,
8824,
1125,
13,
4706,
565,
338,
29918,
29888,
307,
2256,
29901,
13,
9651,
11258,
29918,
353,
11258,
718,
11119,
29888,
307,
2256,
29908,
13,
4706,
1683,
29901,
13,
9651,
11258,
29918,
353,
11258,
13,
13,
4706,
565,
1067,
29879,
29889,
10382,
29898,
25428,
3383,
2224,
1125,
13,
9651,
1053,
12655,
408,
7442,
13,
9651,
565,
525,
29878,
15755,
29915,
451,
297,
11258,
29918,
29901,
13,
18884,
3653,
353,
4321,
13117,
29889,
1457,
5014,
29918,
9891,
1839,
29056,
2033,
29961,
25428,
29962,
13,
18884,
10153,
353,
3653,
29898,
1688,
29918,
2080,
29918,
2084,
29897,
13,
18884,
10153,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
2492,
29892,
9685,
29922,
29900,
29897,
13,
18884,
1881,
29918,
1272,
353,
10153,
13,
9651,
1683,
29901,
13,
18884,
1881,
29918,
1272,
353,
7442,
29889,
1359,
29898,
1688,
29918,
2080,
29918,
2084,
29897,
13,
13,
9651,
565,
338,
29918,
29888,
307,
2256,
29901,
13,
18884,
15886,
29918,
4299,
29918,
2084,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
29918,
22322,
9507,
2033,
13,
18884,
411,
1722,
29898,
2084,
718,
15886,
29918,
4299,
29918,
2084,
29892,
525,
6050,
1495,
408,
285,
29901,
13,
462,
1678,
7797,
1891,
353,
285,
29889,
949,
580,
13,
18884,
15886,
29889,
12071,
29918,
4381,
29918,
4262,
580,
13,
18884,
2441,
29918,
29887,
1753,
353,
15886,
29889,
9527,
3206,
580,
13,
18884,
2441,
29918,
29887,
1753,
29889,
12914,
4591,
1231,
29898,
15550,
1891,
29897,
13,
18884,
15886,
29918,
4905,
29918,
978,
353,
29871,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
29918,
22322,
20158,
29918,
449,
2033,
13,
18884,
15886,
29918,
2080,
29918,
978,
353,
29871,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
29918,
22322,
20158,
29918,
262,
2033,
13,
18884,
8343,
29918,
8977,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
29918,
22322,
18798,
29918,
8977,
2033,
13,
13,
18884,
411,
15886,
29889,
9527,
2141,
294,
29918,
4381,
580,
408,
330,
29901,
13,
462,
1678,
15886,
29889,
5215,
29918,
4262,
29918,
1753,
29898,
13492,
29918,
29887,
1753,
29892,
1024,
2433,
1495,
13,
18884,
411,
15886,
29889,
7317,
29898,
4262,
353,
330,
29892,
2295,
29922,
2917,
29897,
408,
27937,
29901,
13,
462,
1678,
15886,
29918,
449,
353,
27937,
29889,
3389,
29898,
13264,
29918,
4905,
29918,
978,
29961,
29900,
1402,
8343,
29918,
8977,
29922,
18798,
29918,
8977,
29898,
2080,
29918,
1272,
876,
396,
5382,
6275,
1348,
278,
954,
310,
714,
7573,
338,
697,
13,
18884,
8500,
353,
7442,
29889,
29879,
802,
29872,
911,
29898,
13264,
29918,
449,
29897,
13,
18884,
736,
8500,
13,
13,
9651,
1683,
29901,
13,
18884,
411,
2243,
326,
29889,
1191,
29918,
6078,
29898,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
1191,
29918,
6078,
2033,
580,
1125,
13,
462,
1678,
848,
29918,
2080,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
2080,
2033,
580,
13,
462,
1678,
1480,
1169,
29892,
1095,
9748,
353,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
16409,
2033,
580,
29898,
13,
462,
4706,
848,
29918,
2080,
29892,
13,
462,
4706,
954,
29918,
13203,
29922,
25932,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
1949,
29918,
13203,
7464,
13,
462,
4706,
338,
29918,
26495,
29922,
8824,
29897,
13,
462,
1678,
11073,
353,
15886,
29889,
29879,
802,
29872,
911,
29898,
1188,
1169,
29897,
13,
13,
18884,
2069,
353,
15886,
29889,
10945,
29918,
20897,
29918,
11228,
3950,
580,
13,
18884,
411,
15886,
29889,
7317,
29898,
2917,
29922,
2917,
29897,
408,
27937,
29901,
13,
462,
1678,
27937,
29889,
3389,
29898,
2344,
29897,
13,
462,
1678,
872,
369,
353,
15886,
29889,
14968,
29889,
29903,
12483,
580,
13,
462,
1678,
872,
369,
29889,
5060,
487,
29898,
29879,
404,
29892,
2224,
718,
1067,
29879,
29889,
25428,
29918,
1958,
29961,
25428,
22322,
9507,
11287,
13,
462,
1678,
8500,
353,
27937,
29889,
3389,
29898,
1188,
1169,
29892,
8343,
29918,
8977,
353,
426,
1272,
29918,
2080,
584,
1881,
29918,
1272,
1800,
13,
13,
18884,
1053,
26110,
29889,
21570,
29889,
3946,
294,
408,
13023,
294,
13,
18884,
13023,
294,
29889,
27852,
29889,
8551,
29918,
7924,
580,
13,
13,
18884,
8500,
353,
7442,
29889,
29879,
802,
29872,
911,
29898,
27711,
29897,
13,
18884,
736,
8500,
13,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
2
] |
tests/unit/configuration/twindb_backup_config/test_gcs.py | denssk/backup | 69 | 119926 | from twindb_backup.configuration import TwinDBBackupConfig
def test_gcs(config_file):
tbc = TwinDBBackupConfig(config_file=str(config_file))
assert tbc.gcs.gc_credentials_file == 'XXXXX'
assert tbc.gcs.gc_encryption_key == ''
assert tbc.gcs.bucket == 'twindb-backups'
def test_no_gcs_section(tmpdir):
cfg_file = tmpdir.join('twindb-backup.cfg')
with open(str(cfg_file), 'w') as fp:
fp.write('')
tbc = TwinDBBackupConfig(config_file=str(cfg_file))
assert tbc.gcs is None
| [
1,
515,
3252,
513,
29890,
29918,
1627,
786,
29889,
13305,
1053,
323,
5080,
4051,
5841,
786,
3991,
13,
13,
13,
1753,
1243,
29918,
29887,
2395,
29898,
2917,
29918,
1445,
1125,
13,
1678,
260,
12328,
353,
323,
5080,
4051,
5841,
786,
3991,
29898,
2917,
29918,
1445,
29922,
710,
29898,
2917,
29918,
1445,
876,
13,
1678,
4974,
260,
12328,
29889,
29887,
2395,
29889,
27354,
29918,
11944,
9409,
29918,
1445,
1275,
525,
19165,
29990,
29915,
13,
1678,
4974,
260,
12328,
29889,
29887,
2395,
29889,
27354,
29918,
3977,
14272,
29918,
1989,
1275,
6629,
13,
1678,
4974,
260,
12328,
29889,
29887,
2395,
29889,
21454,
1275,
525,
7516,
513,
29890,
29899,
1627,
14340,
29915,
13,
13,
13,
1753,
1243,
29918,
1217,
29918,
29887,
2395,
29918,
2042,
29898,
7050,
3972,
1125,
13,
1678,
274,
16434,
29918,
1445,
353,
13128,
3972,
29889,
7122,
877,
7516,
513,
29890,
29899,
1627,
786,
29889,
16859,
1495,
13,
1678,
411,
1722,
29898,
710,
29898,
16859,
29918,
1445,
511,
525,
29893,
1495,
408,
285,
29886,
29901,
13,
4706,
285,
29886,
29889,
3539,
877,
1495,
13,
1678,
260,
12328,
353,
323,
5080,
4051,
5841,
786,
3991,
29898,
2917,
29918,
1445,
29922,
710,
29898,
16859,
29918,
1445,
876,
13,
1678,
4974,
260,
12328,
29889,
29887,
2395,
338,
6213,
13,
2
] |
agent/sniffer_no_db.py | irtlab/thingscope | 0 | 1602028 | <reponame>irtlab/thingscope
from scapy.all import *
from new_dns_callback import DNSCallback
import sys
import argparse
from colorprint import ColorPrint as color
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--devname", help="Enter the name of the device", default="example")
parser.add_argument("--devmodel", help="Enter the model of the device", default="example")
parser.add_argument("--manuname", help="Enter the name of the manufacturer", default="example")
parser.add_argument("--manuweb", help="Enter the website of the manufacturer", default="http://example.com")
parser.add_argument("--ignore", help="Enter MAC address of device to ignore", default="")
args = parser.parse_args()
print(color.OKBLUE + "[INFO] Observing Network Traffic" + color.ENDC)
dns_callback = DNSCallback(device_name=args.devname, device_model=args.devmodel, manufacturer_name=args.manuname, manufacturer_website=args.manuweb, ignore_device=args.ignore)
# Add router MAC to list of devices seen
# router_mac = sys.argv[1]
# dns_callback.add_to_ignore_device_list(router_mac)
try:
sniff(prn=dns_callback.pktHandler, iface="wlan0")
except Exception as e:
print(color.ERROR + "[ERROR] Sniffer File: " + e + color.ENDC) | [
1,
529,
276,
1112,
420,
29958,
2728,
8205,
29914,
386,
886,
4338,
13,
3166,
885,
27580,
29889,
497,
1053,
334,
13,
3166,
716,
29918,
29881,
1983,
29918,
14035,
1053,
16332,
10717,
13,
5215,
10876,
13,
5215,
1852,
5510,
13,
3166,
2927,
2158,
1053,
9159,
11816,
408,
2927,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
3359,
978,
613,
1371,
543,
10399,
278,
1024,
310,
278,
4742,
613,
2322,
543,
4773,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
3359,
4299,
613,
1371,
543,
10399,
278,
1904,
310,
278,
4742,
613,
2322,
543,
4773,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
1171,
348,
420,
613,
1371,
543,
10399,
278,
1024,
310,
278,
12012,
9945,
613,
2322,
543,
4773,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
1171,
29884,
2676,
613,
1371,
543,
10399,
278,
4700,
310,
278,
12012,
9945,
613,
2322,
543,
1124,
597,
4773,
29889,
510,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
17281,
613,
1371,
543,
10399,
26750,
3211,
310,
4742,
304,
11455,
613,
2322,
543,
1159,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
268,
13,
1678,
1596,
29898,
2780,
29889,
8949,
13367,
4462,
718,
14704,
11690,
29962,
4250,
643,
1747,
8527,
3201,
2416,
29908,
718,
2927,
29889,
11794,
29907,
29897,
13,
268,
13,
1678,
270,
1983,
29918,
14035,
353,
16332,
10717,
29898,
10141,
29918,
978,
29922,
5085,
29889,
3359,
978,
29892,
4742,
29918,
4299,
29922,
5085,
29889,
3359,
4299,
29892,
12012,
9945,
29918,
978,
29922,
5085,
29889,
1171,
348,
420,
29892,
12012,
9945,
29918,
22942,
29922,
5085,
29889,
1171,
29884,
2676,
29892,
11455,
29918,
10141,
29922,
5085,
29889,
17281,
29897,
13,
268,
13,
1678,
396,
3462,
12876,
26750,
304,
1051,
310,
9224,
3595,
13,
1678,
396,
12876,
29918,
8628,
353,
29871,
10876,
29889,
19218,
29961,
29896,
29962,
13,
1678,
396,
270,
1983,
29918,
14035,
29889,
1202,
29918,
517,
29918,
17281,
29918,
10141,
29918,
1761,
29898,
15140,
29918,
8628,
29897,
13,
268,
13,
1678,
1018,
29901,
13,
4706,
5807,
2593,
29898,
558,
29876,
29922,
29881,
1983,
29918,
14035,
29889,
29886,
1193,
4598,
29892,
565,
815,
543,
29893,
6468,
29900,
1159,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
1596,
29898,
2780,
29889,
11432,
718,
14704,
11432,
29962,
22639,
8349,
3497,
29901,
376,
718,
321,
718,
2927,
29889,
11794,
29907,
29897,
2
] |
examples/semanticClustering/experimentUtil.py | mikiec84/SemanticModels.jl | 0 | 164140 | import pandas as pd
import numpy as np
import umap
import sklearn.cluster as cluster
from sklearn.cluster import KMeans
from sklearn.cluster import DBSCAN
import spacy
import unicodedata
import matplotlib.pyplot as plt
import logging
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO)
logging.getLogger().setLevel(logging.INFO)
JULIA_VARIABLE_CSV_PATH = "ExperimentData/JuliaVariableData.csv"
CLUSTER_LABEL_CSV_PATH = "clusteringLabels.csv"
KMEANS_CLUSTER_LABEL_CSV_PATH = "ExperimentData/KmeansCluster.csv"
KMEANS_CLUSTER_TRUTH_CSV_PATH = "ExperimentData/KmeanClusterTruths.csv"
KMEANS_PREDICTED_CSV_PATH = "ExperimentData/KmeansPredicted.csv"
PREDICTED_UMAP_CSV_PATH = "ExperimentData/simPredictedUmapClusters.csv"
def createWord2Vec(data):
nlp = spacy.load('en_core_web_md')
tokenList = []
for phrase in data:
token = nlp(phrase)
tokenList.append(token.vector)
return np.asarray(tokenList)
def useUMAP(tokenList):
db = DBSCAN(eps=0.3, min_samples=2).fit(np.asarray(tokenList))
umapModel = umap.UMAP(random_state=42).fit(np.asarray(tokenList))
standardEmbedding = umapModel.transform(tokenList)
db_umap = DBSCAN(eps=0.3, min_samples=2).fit(standardEmbedding)
return np.asarray(db.labels_), np.asarray(db_umap.labels_)
def writeUMAP_DBSCAN_CSV(subj_array, labels, umapLabels, labelsSimArray, \
uMapLabelsSimArray, OutSampleLabelsSimArray, OutSampleUMAPSimArray):
logging.info("Writing CSV")
outputString = "node,labels,umapLabels,dbscanSim,UMAPsim,out_sampleDBSCAN,out_sampleUMAP\n"
for i in range(len(labels)):
outputString += str(subj_array[i]) + ","\
+ str(labels[i]) + ","\
+str(umapLabels[i]) + ","\
+ str(labelsSimArray[i]) + ","\
+ str(uMapLabelsSimArray[i])+ ","\
+ str(OutSampleLabelsSimArray[i]) + ","\
+ str(OutSampleUMAPSimArray[i]) + "\n"
with open(CLUSTER_LABEL_CSV_PATH, 'w') as filetowrite:
filetowrite.write(outputString)
filetowrite.close()
def generatePairs(labels, umapLabels, data):
nlp = spacy.load('en_core_web_md')
labelsSimArray = []
uMapLabelsSimArray = []
OutSampleLabelsSimArray = []
OutSampleUMAPSimArray = []
labels_sim = 0;
umapLabels_sim = 0;
outsample_labels_sim = 0;
outsample_umap_sim = 0;
for i in range(len(data)):
logging.info("Iterating Word " + str(i))
for j in range(len(data)):
if i != j:
token1 = nlp(data[i])
token2 = nlp(data[j])
if(labels[i] == labels[j]):
labels_sim += token1.similarity(token2)
if(umapLabels[i] == umapLabels[j]):
umapLabels_sim += token1.similarity(token2)
if(labels [i] != labels[j]):
outsample_labels_sim += token1.similarity(token2)
if(umapLabels[i] != umapLabels[j]):
outsample_umap_sim += token1.similarity(token2)
if j == len(data)-1:
labelsSimArray.append(float(labels_sim/(list(labels).count(labels[i])-1)))
uMapLabelsSimArray.append(float(umapLabels_sim/(list(umapLabels).count(umapLabels[i])-1)))
if len(labels)-list(labels).count(labels[i]) == 0:
OutSampleLabelsSimArray.append(1)
else:
OutSampleLabelsSimArray.append(float(outsample_labels_sim/(len(labels)-1-list(labels).count(labels[i]))))
if len(umapLabels)-list(umapLabels).count(umapLabels[i]) == 0:
OutSampleUMAPSimArray.append(1)
else:
OutSampleUMAPSimArray.append(float(outsample_umap_sim/(len(umapLabels)-1-list(umapLabels).count(umapLabels[i]))))
labels_sim = 0;
umapLabels_sim = 0;
outsample_labels_sim = 0;
outsample_umap_sim = 0;
return labelsSimArray, uMapLabelsSimArray, OutSampleLabelsSimArray, OutSampleUMAPSimArray
def createCluster(svoFile):
SVOdata = pd.read_csv(svoFile)
subj_array = list(SVOdata["subject"])
obj_array = list(SVOdata["object"])
totalNodes = subj_array + obj_array
tokenList = createWord2Vec(totalNodes)
#Use UMAP Clustering
labels,umapLabels = useUMAP(tokenList)
#Retrieves Labels for Similarity
labelsSimArray, uMapLabelsSimArray, OutSampleLabelsSimArray, OutSampleUMAPSimArray = \
generatePairs(labels, umapLabels, totalNodes)
#Writes CSV for UMAP vs DBScan Labels
writeUMAP_DBSCAN_CSV(totalNodes, labels, umapLabels, labelsSimArray, \
uMapLabelsSimArray, OutSampleLabelsSimArray, OutSampleUMAPSimArray )
def cleanVariables(variableArray):
for i in range(len(variableArray)):
variableArray[i] = str(variableArray[i]).replace(",", " ")
variableArray[i] = str(variableArray[i]).replace("_", " ")
variableArray[i] = containsGreek(variableArray[i])
return variableArray
def containsGreek(inputString):
greekLetters = []
for s in inputString:
name = unicodedata.name(chr(ord(s)))
if "GREEK" in name:
greekLetters.append(s)
for letter in greekLetters:
name = unicodedata.name(chr(ord(letter))).split(" ")[3]
name = name.lower().capitalize()
inputString = inputString.replace(letter, str(name) + str(" "))
return inputString
def useKmeans(trainTokenList, K_size, variableTokenList):
print(type(trainTokenList), type(K_size), type(variableTokenList))
umapModel = umap.UMAP(random_state=42).fit(np.asarray(trainTokenList))
trainEmbedding = umapModel.transform(trainTokenList)
predictEmbedding = umapModel.transform(variableTokenList)
kmeans = KMeans(n_clusters=K_size, random_state = 0).fit(trainEmbedding)
return kmeans.labels_, kmeans.predict(predictEmbedding)
def writeCSV(variable_array, predictedLabels, fileName):
logging.info("generating CSV " + fileName)
outputString = "variable,cluster\n"
for i in range(len(variable_array)):
outputString += str(variable_array[i].replace(",", " ")) + "," + str(predictedLabels[i]) + "\n"
with open(fileName, 'w') as filetowrite:
filetowrite.write(outputString)
filetowrite.close()
def groupNodesByCluster(umapData):
maxNoClusters = max(list(umapData["umapLabels"]))
clusteredNodes = []
for i in range(maxNoClusters + 1):
temp_bin = []
for j in range(len(list(umapData["umapLabels"]))):
if list(umapData["umapLabels"])[j] == i:
temp_bin.append(list(umapData["node"])[j])
clusteredNodes.append(temp_bin)
return clusteredNodes
def groupNodesByKMeansCluster(kMeansData):
maxNoClusters = max(list(kMeansData["cluster"]))
clusteredNodes = []
for i in range(maxNoClusters + 1):
temp_bin = []
for j in range(len(list(kMeansData["cluster"]))):
if list(kMeansData["cluster"])[j] == i:
temp_bin.append(list(kMeansData["variable"])[j])
clusteredNodes.append(temp_bin)
return clusteredNodes
def getSimilarityLabels(clusteredNodes, variable_array):
labels = []
nlp = spacy.load('en_core_web_md')
count = 0
for variable in variable_array:
logging.info("Comparing Variable No: " + str(count))
count += 1
variableToken = nlp(variable)
highest_average = -9000
label = 0
for clusterNo in range(len(clusteredNodes)):
average = 0
for node in clusteredNodes[clusterNo]:
nodeToken = nlp(node)
average += variableToken.similarity(nodeToken)
average /= len(clusteredNodes[clusterNo])
if average > highest_average:
highest_average = average
label = clusterNo
labels.append(label)
return labels
def calculateKMeansAccuracy():
labeledData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
predictedData = pd.read_csv(KMEANS_PREDICTED_CSV_PATH)
labeled = list(labeledData["KMeansLabels"])
predicted = list(predictedData["cluster"])
count = 0
for i in range(len(predicted)):
if labeled[i] == predicted[i]:
count += 1
logging.info("KMeans Accuracy is : " + str(float(count/len(predicted))))
def calculateSimAccuracy():
labeledData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
predictedData = pd.read_csv(PREDICTED_UMAP_CSV_PATH)
labeled = list(labeledData["DBSCANLabels"])
predicted = list(predictedData["cluster"])
count = 0
for i in range(len(predicted)):
if labeled[i] == predicted[i]:
count += 1
logging.info("Similar Cluster Assignment Accuracy is : " + str(float(count/len(predicted))))
def runKMeansExp():
variableData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
umapData = pd.read_csv(CLUSTER_LABEL_CSV_PATH)
umapData = umapData[umapData.umapLabels != -1]
kmeansTrainData = list(umapData["node"])
variable_array = list(variableData["variable"])
variable_array = cleanVariables(variable_array)
variableTokenList = createWord2Vec(variable_array)
trainTokenList = createWord2Vec(kmeansTrainData)
print(len(trainTokenList))
K_size = max(list(umapData["umapLabels"]))
trainLabels, predictedLabels = useKmeans(trainTokenList, K_size, variableTokenList)
writeCSV(kmeansTrainData, trainLabels, KMEANS_CLUSTER_LABEL_CSV_PATH)
writeCSV(variable_array, predictedLabels, KMEANS_PREDICTED_CSV_PATH)
calculateKMeansAccuracy()
def runUMapSimilarityExp():
variableData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
umapData = pd.read_csv(CLUSTER_LABEL_CSV_PATH)
umapData = umapData[umapData.umapLabels != -1]
variable_array = list(variableData["variable"])
variable_array = cleanVariables(variable_array)
clusteredNodes = groupNodesByCluster(umapData)
labels = getSimilarityLabels(clusteredNodes, variable_array)
writeCSV(variable_array, labels, PREDICTED_UMAP_CSV_PATH)
calculateSimAccuracy()
def getAverageSimilarity(variable_array, clusteredNodes, predictedLabels):
nlp = spacy.load('en_core_web_md')
averageSimArray = []
for i in range(len(variable_array)):
averageSim = 0
for word in clusteredNodes[predictedLabels[i]]:
token1 = nlp(word)
token2 = nlp(variable_array[i])
averageSim += token1.similarity(token2)
averageSimArray.append(float(averageSim/ len(clusteredNodes[predictedLabels[i]])))
return averageSimArray
def runCombinationExp():
variableData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
umapData = pd.read_csv(CLUSTER_LABEL_CSV_PATH)
umapData = umapData[umapData.umapLabels != -1]
kmeansTrainData = list(umapData["node"])
variable_array = list(variableData["variable"])
variable_array = cleanVariables(variable_array)
variableTokenList = createWord2Vec(variable_array)
trainTokenList = createWord2Vec(kmeansTrainData)
K_size = max(list(umapData["umapLabels"]))
trainLabels, predictedLabels = useKmeans(trainTokenList, K_size, variableTokenList)
writeCSV(kmeansTrainData, trainLabels, KMEANS_CLUSTER_LABEL_CSV_PATH)
clusteredNodes = groupNodesByKMeansCluster(pd.read_csv(KMEANS_CLUSTER_LABEL_CSV_PATH))
averageSimArray = getAverageSimilarity(variable_array, clusteredNodes, predictedLabels)
writeCSV(variable_array, predictedLabels, KMEANS_PREDICTED_CSV_PATH)
graphCombinationExp(averageSimArray)
return averageSimArray
def graphCombinationExp(averageSimArray):
labeledData = pd.read_csv(JULIA_VARIABLE_CSV_PATH)
predictedData = pd.read_csv(KMEANS_CLUSTER_TRUTH_CSV_PATH)
labeled = list(labeledData["KMeansLabels"])
predicted = list(predictedData["cluster"])
thresholdArray = []
accuracy = []
numberOfAssignments = []
threshold = .01
while threshold < .95:
assignmentCount = 0
denominatorCount = 0
for i in range(len(predicted)):
if averageSimArray[i] > threshold:
denominatorCount += 1
if labeled[i] == predicted[i] and averageSimArray[i] > threshold:
assignmentCount += 1
if denominatorCount != 0:
accuracy.append(float(assignmentCount/denominatorCount))
else:
accuracy.append(1.0)
numberOfAssignments.append(float(assignmentCount/len(predicted)))
thresholdArray.append(threshold)
threshold += .02
numberOfAssignments = np.divide(np.asarray(numberOfAssignments), numberOfAssignments[0])
plt.figure(0)
plt.title("Accuracy vs Normalized True Assignments")
plt.plot(thresholdArray, accuracy, color="blue", label="Accuracy")
plt.plot(thresholdArray, numberOfAssignments, color="orange", label="Normalized True Assigns" )
plt.legend(loc="upper right")
plt.xticks(np.arange(0, 1, step=0.1))
plt.xlabel("Similarity Threshold")
plt.ylabel("Normalized Values")
idx = np.argwhere(np.diff(np.sign(numberOfAssignments - accuracy))).flatten()
plt.plot(thresholdArray[int(idx)], numberOfAssignments[int(idx)], 'ro')
logging.info("Intersection Threshold is: " + str(thresholdArray[int(idx)]))
| [
1,
1053,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
1922,
481,
13,
5215,
2071,
19668,
29889,
19594,
408,
9867,
13,
3166,
2071,
19668,
29889,
19594,
1053,
476,
6816,
550,
13,
3166,
2071,
19668,
29889,
19594,
1053,
6535,
7187,
2190,
13,
5215,
805,
4135,
13,
5215,
443,
293,
6797,
532,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12183,
13,
21027,
29889,
16121,
3991,
29898,
4830,
2433,
29995,
29898,
294,
312,
603,
29897,
29879,
1273,
29898,
4906,
29897,
29879,
742,
3233,
29922,
21027,
29889,
11690,
29897,
13,
21027,
29889,
657,
16363,
2141,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
13,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
353,
376,
1252,
15362,
1469,
29914,
27501,
423,
16174,
1469,
29889,
7638,
29908,
13,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
353,
376,
695,
504,
3241,
4775,
29879,
29889,
7638,
29908,
13,
29968,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
353,
376,
1252,
15362,
1469,
29914,
29968,
1004,
550,
6821,
5402,
29889,
7638,
29908,
13,
29968,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
5659,
2692,
29950,
29918,
29907,
7597,
29918,
10145,
353,
376,
1252,
15362,
1469,
29914,
29968,
12676,
6821,
5402,
2308,
2806,
29879,
29889,
7638,
29908,
13,
29968,
2303,
2190,
29903,
29918,
15094,
4571,
1783,
3352,
29918,
29907,
7597,
29918,
10145,
353,
376,
1252,
15362,
1469,
29914,
29968,
1004,
550,
23084,
18186,
29889,
7638,
29908,
13,
15094,
4571,
1783,
3352,
29918,
29965,
23827,
29918,
29907,
7597,
29918,
10145,
353,
376,
1252,
15362,
1469,
29914,
3601,
23084,
18186,
29965,
1958,
6821,
504,
414,
29889,
7638,
29908,
13,
13,
13,
13,
13,
13,
1753,
1653,
14463,
29906,
25987,
29898,
1272,
1125,
13,
13,
13,
1678,
302,
22833,
353,
805,
4135,
29889,
1359,
877,
264,
29918,
3221,
29918,
2676,
29918,
3487,
1495,
13,
1678,
5993,
1293,
353,
5159,
13,
1678,
363,
16549,
297,
848,
29901,
13,
4706,
5993,
353,
302,
22833,
29898,
24588,
559,
29897,
13,
4706,
5993,
1293,
29889,
4397,
29898,
6979,
29889,
8111,
29897,
13,
13,
1678,
736,
7442,
29889,
294,
2378,
29898,
6979,
1293,
29897,
13,
13,
13,
13,
13,
13,
13,
13,
1753,
671,
29965,
23827,
29898,
6979,
1293,
1125,
13,
13,
1678,
4833,
353,
6535,
7187,
2190,
29898,
8961,
29922,
29900,
29889,
29941,
29892,
1375,
29918,
27736,
29922,
29906,
467,
9202,
29898,
9302,
29889,
294,
2378,
29898,
6979,
1293,
876,
13,
13,
1678,
1922,
481,
3195,
353,
1922,
481,
29889,
29965,
23827,
29898,
8172,
29918,
3859,
29922,
29946,
29906,
467,
9202,
29898,
9302,
29889,
294,
2378,
29898,
6979,
1293,
876,
13,
13,
1678,
3918,
6026,
2580,
8497,
353,
1922,
481,
3195,
29889,
9067,
29898,
6979,
1293,
29897,
13,
13,
1678,
4833,
29918,
398,
481,
353,
6535,
7187,
2190,
29898,
8961,
29922,
29900,
29889,
29941,
29892,
1375,
29918,
27736,
29922,
29906,
467,
9202,
29898,
15770,
6026,
2580,
8497,
29897,
13,
13,
1678,
736,
7442,
29889,
294,
2378,
29898,
2585,
29889,
21134,
29918,
511,
7442,
29889,
294,
2378,
29898,
2585,
29918,
398,
481,
29889,
21134,
19925,
13,
13,
13,
13,
13,
13,
13,
1753,
2436,
29965,
23827,
29918,
4051,
7187,
2190,
29918,
29907,
7597,
29898,
1491,
29926,
29918,
2378,
29892,
11073,
29892,
1922,
481,
4775,
29879,
29892,
11073,
8942,
2588,
29892,
320,
13,
632,
318,
3388,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
29965,
1529,
7024,
326,
2588,
1125,
13,
1678,
12183,
29889,
3888,
703,
29956,
768,
292,
16874,
1159,
13,
13,
1678,
1962,
1231,
353,
376,
3177,
29892,
21134,
29892,
398,
481,
4775,
29879,
29892,
2585,
16192,
8942,
29892,
29965,
23827,
3601,
29892,
449,
29918,
11249,
4051,
7187,
2190,
29892,
449,
29918,
11249,
29965,
23827,
29905,
29876,
29908,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
21134,
22164,
13,
4706,
1962,
1231,
4619,
851,
29898,
1491,
29926,
29918,
2378,
29961,
29875,
2314,
718,
28796,
29905,
13,
4706,
718,
851,
29898,
21134,
29961,
29875,
2314,
718,
28796,
29905,
13,
4706,
718,
710,
29898,
398,
481,
4775,
29879,
29961,
29875,
2314,
718,
28796,
29905,
13,
4706,
718,
851,
29898,
21134,
8942,
2588,
29961,
29875,
2314,
718,
28796,
29905,
13,
4706,
718,
851,
29898,
29884,
3388,
4775,
29879,
8942,
2588,
29961,
29875,
2314,
29974,
28796,
29905,
13,
4706,
718,
851,
29898,
3744,
17708,
4775,
29879,
8942,
2588,
29961,
29875,
2314,
718,
28796,
29905,
13,
4706,
718,
851,
29898,
3744,
17708,
29965,
1529,
7024,
326,
2588,
29961,
29875,
2314,
718,
6634,
29876,
29908,
13,
13,
13,
1678,
411,
1722,
29898,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29892,
525,
29893,
1495,
408,
934,
29873,
340,
1377,
29901,
13,
4706,
934,
29873,
340,
1377,
29889,
3539,
29898,
4905,
1231,
29897,
13,
4706,
934,
29873,
340,
1377,
29889,
5358,
580,
13,
13,
13,
13,
13,
1753,
5706,
29925,
7121,
29898,
21134,
29892,
1922,
481,
4775,
29879,
29892,
848,
1125,
13,
13,
1678,
302,
22833,
353,
805,
4135,
29889,
1359,
877,
264,
29918,
3221,
29918,
2676,
29918,
3487,
1495,
13,
1678,
11073,
8942,
2588,
353,
5159,
13,
1678,
318,
3388,
4775,
29879,
8942,
2588,
353,
5159,
13,
1678,
4451,
17708,
4775,
29879,
8942,
2588,
353,
5159,
13,
1678,
4451,
17708,
29965,
1529,
7024,
326,
2588,
353,
5159,
13,
13,
1678,
11073,
29918,
3601,
353,
29871,
29900,
29936,
13,
1678,
1922,
481,
4775,
29879,
29918,
3601,
353,
29871,
29900,
29936,
13,
1678,
714,
11249,
29918,
21134,
29918,
3601,
353,
29871,
29900,
29936,
13,
1678,
714,
11249,
29918,
398,
481,
29918,
3601,
353,
29871,
29900,
29936,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1272,
22164,
13,
4706,
12183,
29889,
3888,
703,
13463,
1218,
10803,
376,
718,
851,
29898,
29875,
876,
13,
4706,
363,
432,
297,
3464,
29898,
2435,
29898,
1272,
22164,
13,
9651,
565,
474,
2804,
432,
29901,
13,
13,
18884,
5993,
29896,
353,
302,
22833,
29898,
1272,
29961,
29875,
2314,
13,
18884,
5993,
29906,
353,
302,
22833,
29898,
1272,
29961,
29926,
2314,
13,
18884,
565,
29898,
21134,
29961,
29875,
29962,
1275,
11073,
29961,
29926,
29962,
1125,
13,
462,
1678,
11073,
29918,
3601,
4619,
5993,
29896,
29889,
29764,
537,
29898,
6979,
29906,
29897,
13,
13,
18884,
565,
29898,
398,
481,
4775,
29879,
29961,
29875,
29962,
1275,
1922,
481,
4775,
29879,
29961,
29926,
29962,
1125,
13,
462,
1678,
1922,
481,
4775,
29879,
29918,
3601,
4619,
5993,
29896,
29889,
29764,
537,
29898,
6979,
29906,
29897,
13,
13,
18884,
565,
29898,
21134,
518,
29875,
29962,
2804,
11073,
29961,
29926,
29962,
1125,
13,
462,
1678,
714,
11249,
29918,
21134,
29918,
3601,
4619,
5993,
29896,
29889,
29764,
537,
29898,
6979,
29906,
29897,
13,
13,
18884,
565,
29898,
398,
481,
4775,
29879,
29961,
29875,
29962,
2804,
1922,
481,
4775,
29879,
29961,
29926,
29962,
1125,
13,
462,
1678,
714,
11249,
29918,
398,
481,
29918,
3601,
4619,
5993,
29896,
29889,
29764,
537,
29898,
6979,
29906,
29897,
13,
13,
9651,
565,
432,
1275,
7431,
29898,
1272,
6817,
29896,
29901,
13,
13,
18884,
11073,
8942,
2588,
29889,
4397,
29898,
7411,
29898,
21134,
29918,
3601,
14571,
1761,
29898,
21134,
467,
2798,
29898,
21134,
29961,
29875,
2314,
29899,
29896,
4961,
13,
18884,
318,
3388,
4775,
29879,
8942,
2588,
29889,
4397,
29898,
7411,
29898,
398,
481,
4775,
29879,
29918,
3601,
14571,
1761,
29898,
398,
481,
4775,
29879,
467,
2798,
29898,
398,
481,
4775,
29879,
29961,
29875,
2314,
29899,
29896,
4961,
13,
13,
13,
18884,
565,
7431,
29898,
21134,
6817,
1761,
29898,
21134,
467,
2798,
29898,
21134,
29961,
29875,
2314,
1275,
29871,
29900,
29901,
13,
462,
1678,
4451,
17708,
4775,
29879,
8942,
2588,
29889,
4397,
29898,
29896,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
4451,
17708,
4775,
29879,
8942,
2588,
29889,
4397,
29898,
7411,
29898,
449,
11249,
29918,
21134,
29918,
3601,
14571,
2435,
29898,
21134,
6817,
29896,
29899,
1761,
29898,
21134,
467,
2798,
29898,
21134,
29961,
29875,
12622,
876,
13,
13,
18884,
565,
7431,
29898,
398,
481,
4775,
29879,
6817,
1761,
29898,
398,
481,
4775,
29879,
467,
2798,
29898,
398,
481,
4775,
29879,
29961,
29875,
2314,
1275,
29871,
29900,
29901,
13,
462,
1678,
4451,
17708,
29965,
1529,
7024,
326,
2588,
29889,
4397,
29898,
29896,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
4451,
17708,
29965,
1529,
7024,
326,
2588,
29889,
4397,
29898,
7411,
29898,
449,
11249,
29918,
398,
481,
29918,
3601,
14571,
2435,
29898,
398,
481,
4775,
29879,
6817,
29896,
29899,
1761,
29898,
398,
481,
4775,
29879,
467,
2798,
29898,
398,
481,
4775,
29879,
29961,
29875,
12622,
876,
13,
13,
18884,
11073,
29918,
3601,
353,
29871,
29900,
29936,
13,
18884,
1922,
481,
4775,
29879,
29918,
3601,
353,
29871,
29900,
29936,
13,
18884,
714,
11249,
29918,
21134,
29918,
3601,
353,
29871,
29900,
29936,
13,
18884,
714,
11249,
29918,
398,
481,
29918,
3601,
353,
29871,
29900,
29936,
13,
13,
13,
1678,
736,
11073,
8942,
2588,
29892,
318,
3388,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
29965,
1529,
7024,
326,
2588,
13,
13,
13,
13,
1753,
1653,
6821,
5402,
29898,
29879,
1365,
2283,
1125,
13,
1678,
13955,
29949,
1272,
353,
10518,
29889,
949,
29918,
7638,
29898,
29879,
1365,
2283,
29897,
13,
13,
1678,
1014,
29926,
29918,
2378,
353,
1051,
29898,
7597,
29949,
1272,
3366,
16009,
20068,
13,
1678,
5446,
29918,
2378,
353,
1051,
29898,
7597,
29949,
1272,
3366,
3318,
20068,
13,
1678,
3001,
20284,
353,
1014,
29926,
29918,
2378,
718,
5446,
29918,
2378,
13,
13,
13,
13,
1678,
5993,
1293,
353,
1653,
14463,
29906,
25987,
29898,
7827,
20284,
29897,
13,
13,
13,
1678,
396,
11403,
501,
23827,
2233,
504,
3241,
13,
1678,
11073,
29892,
398,
481,
4775,
29879,
353,
671,
29965,
23827,
29898,
6979,
1293,
29897,
13,
13,
13,
1678,
396,
8015,
2546,
1960,
15796,
29879,
363,
13999,
537,
13,
1678,
11073,
8942,
2588,
29892,
318,
3388,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
29965,
1529,
7024,
326,
2588,
353,
320,
13,
4706,
5706,
29925,
7121,
29898,
21134,
29892,
1922,
481,
4775,
29879,
29892,
3001,
20284,
29897,
13,
13,
1678,
396,
29956,
768,
267,
16874,
363,
501,
23827,
7186,
6535,
29083,
15796,
29879,
13,
1678,
2436,
29965,
23827,
29918,
4051,
7187,
2190,
29918,
29907,
7597,
29898,
7827,
20284,
29892,
11073,
29892,
1922,
481,
4775,
29879,
29892,
11073,
8942,
2588,
29892,
320,
13,
632,
318,
3388,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
4775,
29879,
8942,
2588,
29892,
4451,
17708,
29965,
1529,
7024,
326,
2588,
1723,
13,
13,
13,
13,
1753,
5941,
10444,
1849,
29898,
11918,
2588,
1125,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
11918,
2588,
22164,
13,
13,
4706,
2286,
2588,
29961,
29875,
29962,
353,
851,
29898,
11918,
2588,
29961,
29875,
14664,
6506,
28165,
613,
376,
16521,
13,
4706,
2286,
2588,
29961,
29875,
29962,
353,
851,
29898,
11918,
2588,
29961,
29875,
14664,
6506,
703,
29918,
613,
376,
16521,
13,
4706,
2286,
2588,
29961,
29875,
29962,
353,
3743,
29954,
7285,
29898,
11918,
2588,
29961,
29875,
2314,
13,
13,
13,
13,
1678,
736,
2286,
2588,
13,
13,
13,
1753,
3743,
29954,
7285,
29898,
2080,
1231,
1125,
13,
1678,
330,
7285,
12024,
2153,
353,
5159,
13,
1678,
363,
269,
297,
1881,
1231,
29901,
13,
4706,
1024,
353,
443,
293,
6797,
532,
29889,
978,
29898,
22495,
29898,
536,
29898,
29879,
4961,
13,
4706,
565,
376,
29954,
21661,
29968,
29908,
297,
1024,
29901,
13,
9651,
330,
7285,
12024,
2153,
29889,
4397,
29898,
29879,
29897,
13,
13,
13,
1678,
363,
5497,
297,
330,
7285,
12024,
2153,
29901,
13,
4706,
1024,
353,
443,
293,
6797,
532,
29889,
978,
29898,
22495,
29898,
536,
29898,
15670,
876,
467,
5451,
703,
376,
9601,
29941,
29962,
13,
4706,
1024,
353,
1024,
29889,
13609,
2141,
5030,
2410,
675,
580,
13,
4706,
1881,
1231,
353,
1881,
1231,
29889,
6506,
29898,
15670,
29892,
851,
29898,
978,
29897,
718,
851,
703,
376,
876,
13,
13,
1678,
736,
1881,
1231,
13,
13,
13,
1753,
671,
29968,
1004,
550,
29898,
14968,
6066,
1293,
29892,
476,
29918,
2311,
29892,
2286,
6066,
1293,
1125,
13,
1678,
1596,
29898,
1853,
29898,
14968,
6066,
1293,
511,
1134,
29898,
29968,
29918,
2311,
511,
1134,
29898,
11918,
6066,
1293,
876,
13,
1678,
1922,
481,
3195,
353,
1922,
481,
29889,
29965,
23827,
29898,
8172,
29918,
3859,
29922,
29946,
29906,
467,
9202,
29898,
9302,
29889,
294,
2378,
29898,
14968,
6066,
1293,
876,
13,
1678,
7945,
6026,
2580,
8497,
353,
1922,
481,
3195,
29889,
9067,
29898,
14968,
6066,
1293,
29897,
13,
1678,
8500,
6026,
2580,
8497,
353,
1922,
481,
3195,
29889,
9067,
29898,
11918,
6066,
1293,
29897,
13,
13,
13,
1678,
413,
1004,
550,
353,
476,
6816,
550,
29898,
29876,
29918,
695,
504,
414,
29922,
29968,
29918,
2311,
29892,
4036,
29918,
3859,
353,
29871,
29900,
467,
9202,
29898,
14968,
6026,
2580,
8497,
29897,
13,
13,
13,
1678,
736,
413,
1004,
550,
29889,
21134,
3383,
413,
1004,
550,
29889,
27711,
29898,
27711,
6026,
2580,
8497,
29897,
13,
13,
1753,
2436,
29907,
7597,
29898,
11918,
29918,
2378,
29892,
25383,
4775,
29879,
29892,
29729,
1125,
13,
1678,
12183,
29889,
3888,
703,
4738,
1218,
16874,
376,
718,
29729,
29897,
13,
1678,
1962,
1231,
353,
376,
11918,
29892,
19594,
29905,
29876,
29908,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
11918,
29918,
2378,
22164,
13,
4706,
1962,
1231,
4619,
851,
29898,
11918,
29918,
2378,
29961,
29875,
1822,
6506,
28165,
613,
376,
376,
876,
718,
28796,
718,
851,
29898,
11965,
18186,
4775,
29879,
29961,
29875,
2314,
718,
6634,
29876,
29908,
13,
13,
1678,
411,
1722,
29898,
28926,
29892,
525,
29893,
1495,
408,
934,
29873,
340,
1377,
29901,
13,
4706,
934,
29873,
340,
1377,
29889,
3539,
29898,
4905,
1231,
29897,
13,
4706,
934,
29873,
340,
1377,
29889,
5358,
580,
13,
13,
13,
13,
13,
13,
1753,
2318,
20284,
2059,
6821,
5402,
29898,
398,
481,
1469,
1125,
13,
1678,
4236,
3782,
6821,
504,
414,
353,
4236,
29898,
1761,
29898,
398,
481,
1469,
3366,
398,
481,
4775,
29879,
3108,
876,
13,
1678,
9867,
287,
20284,
353,
5159,
13,
13,
1678,
363,
474,
297,
3464,
29898,
3317,
3782,
6821,
504,
414,
718,
29871,
29896,
1125,
13,
4706,
5694,
29918,
2109,
353,
5159,
13,
4706,
363,
432,
297,
3464,
29898,
2435,
29898,
1761,
29898,
398,
481,
1469,
3366,
398,
481,
4775,
29879,
3108,
876,
1125,
13,
9651,
565,
1051,
29898,
398,
481,
1469,
3366,
398,
481,
4775,
29879,
20068,
29961,
29926,
29962,
1275,
474,
29901,
13,
18884,
5694,
29918,
2109,
29889,
4397,
29898,
1761,
29898,
398,
481,
1469,
3366,
3177,
20068,
29961,
29926,
2314,
13,
4706,
9867,
287,
20284,
29889,
4397,
29898,
7382,
29918,
2109,
29897,
13,
13,
1678,
736,
9867,
287,
20284,
13,
13,
1753,
2318,
20284,
2059,
29968,
6816,
550,
6821,
5402,
29898,
29895,
6816,
550,
1469,
1125,
13,
1678,
4236,
3782,
6821,
504,
414,
353,
4236,
29898,
1761,
29898,
29895,
6816,
550,
1469,
3366,
19594,
3108,
876,
13,
1678,
9867,
287,
20284,
353,
5159,
13,
13,
1678,
363,
474,
297,
3464,
29898,
3317,
3782,
6821,
504,
414,
718,
29871,
29896,
1125,
13,
4706,
5694,
29918,
2109,
353,
5159,
13,
4706,
363,
432,
297,
3464,
29898,
2435,
29898,
1761,
29898,
29895,
6816,
550,
1469,
3366,
19594,
3108,
876,
1125,
13,
9651,
565,
1051,
29898,
29895,
6816,
550,
1469,
3366,
19594,
20068,
29961,
29926,
29962,
1275,
474,
29901,
13,
18884,
5694,
29918,
2109,
29889,
4397,
29898,
1761,
29898,
29895,
6816,
550,
1469,
3366,
11918,
20068,
29961,
29926,
2314,
13,
4706,
9867,
287,
20284,
29889,
4397,
29898,
7382,
29918,
2109,
29897,
13,
13,
1678,
736,
9867,
287,
20284,
13,
13,
13,
1753,
679,
8942,
2327,
537,
4775,
29879,
29898,
19594,
287,
20284,
29892,
2286,
29918,
2378,
1125,
13,
1678,
11073,
353,
5159,
13,
1678,
302,
22833,
353,
805,
4135,
29889,
1359,
877,
264,
29918,
3221,
29918,
2676,
29918,
3487,
1495,
13,
13,
1678,
2302,
353,
29871,
29900,
13,
1678,
363,
2286,
297,
2286,
29918,
2378,
29901,
13,
4706,
12183,
29889,
3888,
703,
1523,
862,
292,
28736,
1939,
29901,
376,
718,
851,
29898,
2798,
876,
13,
4706,
2302,
4619,
29871,
29896,
13,
4706,
2286,
6066,
353,
302,
22833,
29898,
11918,
29897,
13,
4706,
9939,
29918,
12483,
482,
353,
448,
29929,
29900,
29900,
29900,
13,
4706,
3858,
353,
29871,
29900,
13,
13,
4706,
363,
9867,
3782,
297,
3464,
29898,
2435,
29898,
19594,
287,
20284,
22164,
13,
9651,
6588,
353,
29871,
29900,
13,
9651,
363,
2943,
297,
9867,
287,
20284,
29961,
19594,
3782,
5387,
13,
18884,
2943,
6066,
353,
302,
22833,
29898,
3177,
29897,
13,
18884,
6588,
4619,
2286,
6066,
29889,
29764,
537,
29898,
3177,
6066,
29897,
13,
9651,
6588,
847,
29922,
7431,
29898,
19594,
287,
20284,
29961,
19594,
3782,
2314,
13,
9651,
565,
6588,
1405,
9939,
29918,
12483,
482,
29901,
13,
18884,
9939,
29918,
12483,
482,
353,
6588,
13,
18884,
3858,
353,
9867,
3782,
13,
13,
4706,
11073,
29889,
4397,
29898,
1643,
29897,
13,
13,
1678,
736,
11073,
13,
13,
13,
1753,
8147,
29968,
6816,
550,
7504,
332,
4135,
7295,
13,
1678,
301,
24025,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
25383,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29968,
2303,
2190,
29903,
29918,
15094,
4571,
1783,
3352,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
1678,
301,
24025,
353,
1051,
29898,
29880,
24025,
1469,
3366,
29968,
6816,
550,
4775,
29879,
20068,
13,
1678,
25383,
353,
1051,
29898,
11965,
18186,
1469,
3366,
19594,
20068,
13,
13,
1678,
2302,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
11965,
18186,
22164,
13,
4706,
565,
301,
24025,
29961,
29875,
29962,
1275,
25383,
29961,
29875,
5387,
13,
9651,
2302,
4619,
29871,
29896,
13,
13,
1678,
12183,
29889,
3888,
703,
29968,
6816,
550,
4831,
332,
4135,
338,
584,
376,
718,
851,
29898,
7411,
29898,
2798,
29914,
2435,
29898,
11965,
18186,
13697,
13,
13,
13,
1753,
8147,
8942,
7504,
332,
4135,
7295,
13,
1678,
301,
24025,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
25383,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
15094,
4571,
1783,
3352,
29918,
29965,
23827,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
1678,
301,
24025,
353,
1051,
29898,
29880,
24025,
1469,
3366,
4051,
7187,
2190,
4775,
29879,
20068,
13,
1678,
25383,
353,
1051,
29898,
11965,
18186,
1469,
3366,
19594,
20068,
13,
13,
1678,
2302,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
11965,
18186,
22164,
13,
4706,
565,
301,
24025,
29961,
29875,
29962,
1275,
25383,
29961,
29875,
5387,
13,
9651,
2302,
4619,
29871,
29896,
13,
13,
1678,
12183,
29889,
3888,
703,
8942,
2327,
2233,
5402,
4007,
10194,
4831,
332,
4135,
338,
584,
376,
718,
851,
29898,
7411,
29898,
2798,
29914,
2435,
29898,
11965,
18186,
13697,
13,
13,
13,
1753,
1065,
29968,
6816,
550,
9544,
7295,
13,
1678,
2286,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
1922,
481,
1469,
29961,
398,
481,
1469,
29889,
398,
481,
4775,
29879,
2804,
448,
29896,
29962,
13,
13,
1678,
413,
1004,
550,
5323,
262,
1469,
353,
1051,
29898,
398,
481,
1469,
3366,
3177,
20068,
13,
1678,
2286,
29918,
2378,
353,
1051,
29898,
11918,
1469,
3366,
11918,
20068,
13,
1678,
2286,
29918,
2378,
353,
5941,
10444,
1849,
29898,
11918,
29918,
2378,
29897,
13,
13,
1678,
2286,
6066,
1293,
353,
1653,
14463,
29906,
25987,
29898,
11918,
29918,
2378,
29897,
13,
1678,
7945,
6066,
1293,
353,
1653,
14463,
29906,
25987,
29898,
29895,
1004,
550,
5323,
262,
1469,
29897,
13,
1678,
1596,
29898,
2435,
29898,
14968,
6066,
1293,
876,
13,
1678,
476,
29918,
2311,
353,
4236,
29898,
1761,
29898,
398,
481,
1469,
3366,
398,
481,
4775,
29879,
3108,
876,
13,
13,
13,
1678,
7945,
4775,
29879,
29892,
25383,
4775,
29879,
353,
671,
29968,
1004,
550,
29898,
14968,
6066,
1293,
29892,
476,
29918,
2311,
29892,
2286,
6066,
1293,
29897,
13,
1678,
2436,
29907,
7597,
29898,
29895,
1004,
550,
5323,
262,
1469,
29892,
7945,
4775,
29879,
29892,
476,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
2436,
29907,
7597,
29898,
11918,
29918,
2378,
29892,
25383,
4775,
29879,
29892,
476,
2303,
2190,
29903,
29918,
15094,
4571,
1783,
3352,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
1678,
8147,
29968,
6816,
550,
7504,
332,
4135,
580,
13,
13,
13,
13,
13,
1753,
1065,
29965,
3388,
8942,
2327,
537,
9544,
7295,
13,
1678,
2286,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
1922,
481,
1469,
29961,
398,
481,
1469,
29889,
398,
481,
4775,
29879,
2804,
448,
29896,
29962,
13,
1678,
2286,
29918,
2378,
353,
1051,
29898,
11918,
1469,
3366,
11918,
20068,
13,
1678,
2286,
29918,
2378,
353,
5941,
10444,
1849,
29898,
11918,
29918,
2378,
29897,
13,
13,
1678,
9867,
287,
20284,
353,
2318,
20284,
2059,
6821,
5402,
29898,
398,
481,
1469,
29897,
13,
1678,
11073,
353,
679,
8942,
2327,
537,
4775,
29879,
29898,
19594,
287,
20284,
29892,
2286,
29918,
2378,
29897,
13,
13,
1678,
2436,
29907,
7597,
29898,
11918,
29918,
2378,
29892,
11073,
29892,
349,
1525,
4571,
1783,
3352,
29918,
29965,
23827,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
1678,
8147,
8942,
7504,
332,
4135,
580,
13,
13,
1753,
679,
29909,
19698,
8942,
2327,
537,
29898,
11918,
29918,
2378,
29892,
9867,
287,
20284,
29892,
25383,
4775,
29879,
1125,
13,
1678,
302,
22833,
353,
805,
4135,
29889,
1359,
877,
264,
29918,
3221,
29918,
2676,
29918,
3487,
1495,
13,
1678,
6588,
8942,
2588,
353,
5159,
13,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
11918,
29918,
2378,
22164,
13,
4706,
6588,
8942,
353,
29871,
29900,
13,
4706,
363,
1734,
297,
9867,
287,
20284,
29961,
11965,
18186,
4775,
29879,
29961,
29875,
5262,
29901,
13,
9651,
5993,
29896,
353,
302,
22833,
29898,
1742,
29897,
13,
9651,
5993,
29906,
353,
302,
22833,
29898,
11918,
29918,
2378,
29961,
29875,
2314,
13,
9651,
6588,
8942,
4619,
5993,
29896,
29889,
29764,
537,
29898,
6979,
29906,
29897,
13,
4706,
6588,
8942,
2588,
29889,
4397,
29898,
7411,
29898,
12483,
482,
8942,
29914,
7431,
29898,
19594,
287,
20284,
29961,
11965,
18186,
4775,
29879,
29961,
29875,
5262,
4961,
13,
13,
1678,
736,
6588,
8942,
2588,
13,
13,
13,
13,
13,
1753,
1065,
1523,
2109,
362,
9544,
7295,
13,
1678,
2286,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
1922,
481,
1469,
353,
1922,
481,
1469,
29961,
398,
481,
1469,
29889,
398,
481,
4775,
29879,
2804,
448,
29896,
29962,
13,
13,
1678,
413,
1004,
550,
5323,
262,
1469,
353,
1051,
29898,
398,
481,
1469,
3366,
3177,
20068,
13,
1678,
2286,
29918,
2378,
353,
1051,
29898,
11918,
1469,
3366,
11918,
20068,
13,
1678,
2286,
29918,
2378,
353,
5941,
10444,
1849,
29898,
11918,
29918,
2378,
29897,
13,
13,
1678,
2286,
6066,
1293,
353,
1653,
14463,
29906,
25987,
29898,
11918,
29918,
2378,
29897,
13,
1678,
7945,
6066,
1293,
353,
1653,
14463,
29906,
25987,
29898,
29895,
1004,
550,
5323,
262,
1469,
29897,
13,
1678,
476,
29918,
2311,
353,
4236,
29898,
1761,
29898,
398,
481,
1469,
3366,
398,
481,
4775,
29879,
3108,
876,
13,
13,
13,
1678,
7945,
4775,
29879,
29892,
25383,
4775,
29879,
353,
671,
29968,
1004,
550,
29898,
14968,
6066,
1293,
29892,
476,
29918,
2311,
29892,
2286,
6066,
1293,
29897,
13,
1678,
2436,
29907,
7597,
29898,
29895,
1004,
550,
5323,
262,
1469,
29892,
7945,
4775,
29879,
29892,
476,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
13,
1678,
9867,
287,
20284,
353,
2318,
20284,
2059,
29968,
6816,
550,
6821,
5402,
29898,
15926,
29889,
949,
29918,
7638,
29898,
29968,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
24461,
6670,
29918,
29907,
7597,
29918,
10145,
876,
13,
1678,
6588,
8942,
2588,
353,
679,
29909,
19698,
8942,
2327,
537,
29898,
11918,
29918,
2378,
29892,
9867,
287,
20284,
29892,
25383,
4775,
29879,
29897,
13,
13,
1678,
2436,
29907,
7597,
29898,
11918,
29918,
2378,
29892,
25383,
4775,
29879,
29892,
476,
2303,
2190,
29903,
29918,
15094,
4571,
1783,
3352,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
13,
1678,
3983,
1523,
2109,
362,
9544,
29898,
12483,
482,
8942,
2588,
29897,
13,
13,
1678,
736,
6588,
8942,
2588,
13,
13,
1753,
3983,
1523,
2109,
362,
9544,
29898,
12483,
482,
8942,
2588,
1125,
13,
13,
1678,
301,
24025,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29967,
29965,
5265,
29909,
29918,
26865,
29902,
6181,
29918,
29907,
7597,
29918,
10145,
29897,
13,
1678,
25383,
1469,
353,
10518,
29889,
949,
29918,
7638,
29898,
29968,
2303,
2190,
29903,
29918,
6154,
17321,
1001,
29918,
5659,
2692,
29950,
29918,
29907,
7597,
29918,
10145,
29897,
13,
13,
13,
1678,
301,
24025,
353,
1051,
29898,
29880,
24025,
1469,
3366,
29968,
6816,
550,
4775,
29879,
20068,
13,
1678,
25383,
353,
1051,
29898,
11965,
18186,
1469,
3366,
19594,
20068,
13,
13,
1678,
16897,
2588,
353,
5159,
13,
1678,
13600,
353,
5159,
13,
1678,
1353,
2776,
7900,
647,
1860,
353,
5159,
13,
13,
1678,
16897,
353,
869,
29900,
29896,
13,
1678,
1550,
16897,
529,
869,
29929,
29945,
29901,
13,
13,
4706,
12827,
3981,
353,
29871,
29900,
13,
4706,
14267,
1061,
3981,
353,
29871,
29900,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
11965,
18186,
22164,
13,
9651,
565,
6588,
8942,
2588,
29961,
29875,
29962,
1405,
16897,
29901,
13,
18884,
14267,
1061,
3981,
4619,
29871,
29896,
13,
13,
9651,
565,
301,
24025,
29961,
29875,
29962,
1275,
25383,
29961,
29875,
29962,
322,
6588,
8942,
2588,
29961,
29875,
29962,
1405,
16897,
29901,
13,
18884,
12827,
3981,
4619,
29871,
29896,
13,
13,
4706,
565,
14267,
1061,
3981,
2804,
29871,
29900,
29901,
13,
9651,
13600,
29889,
4397,
29898,
7411,
29898,
465,
10194,
3981,
29914,
1145,
5817,
1061,
3981,
876,
13,
4706,
1683,
29901,
13,
9651,
13600,
29889,
4397,
29898,
29896,
29889,
29900,
29897,
13,
4706,
1353,
2776,
7900,
647,
1860,
29889,
4397,
29898,
7411,
29898,
465,
10194,
3981,
29914,
2435,
29898,
11965,
18186,
4961,
13,
4706,
16897,
2588,
29889,
4397,
29898,
386,
12268,
29897,
13,
4706,
16897,
4619,
869,
29900,
29906,
13,
1678,
1353,
2776,
7900,
647,
1860,
353,
7442,
29889,
4563,
680,
29898,
9302,
29889,
294,
2378,
29898,
4537,
2776,
7900,
647,
1860,
511,
1353,
2776,
7900,
647,
1860,
29961,
29900,
2314,
13,
1678,
14770,
29889,
4532,
29898,
29900,
29897,
13,
1678,
14770,
29889,
3257,
703,
7504,
332,
4135,
7186,
21981,
1891,
5852,
4007,
647,
1860,
1159,
13,
1678,
14770,
29889,
5317,
29898,
386,
12268,
2588,
29892,
13600,
29892,
2927,
543,
9539,
613,
3858,
543,
7504,
332,
4135,
1159,
13,
1678,
14770,
29889,
5317,
29898,
386,
12268,
2588,
29892,
1353,
2776,
7900,
647,
1860,
29892,
2927,
543,
272,
927,
613,
3858,
543,
19077,
1891,
5852,
4007,
647,
29879,
29908,
1723,
13,
1678,
14770,
29889,
26172,
29898,
2029,
543,
21064,
1492,
1159,
13,
1678,
14770,
29889,
486,
7358,
29898,
9302,
29889,
279,
927,
29898,
29900,
29892,
29871,
29896,
29892,
4331,
29922,
29900,
29889,
29896,
876,
13,
1678,
14770,
29889,
29916,
1643,
703,
8942,
2327,
537,
498,
12268,
1159,
13,
1678,
14770,
29889,
29891,
1643,
703,
19077,
1891,
2630,
1041,
1159,
13,
1678,
22645,
353,
7442,
29889,
1191,
3062,
29898,
9302,
29889,
12765,
29898,
9302,
29889,
4530,
29898,
4537,
2776,
7900,
647,
1860,
448,
13600,
876,
467,
1579,
8606,
580,
13,
1678,
14770,
29889,
5317,
29898,
386,
12268,
2588,
29961,
524,
29898,
13140,
29897,
1402,
1353,
2776,
7900,
647,
1860,
29961,
524,
29898,
13140,
29897,
1402,
525,
307,
1495,
13,
1678,
12183,
29889,
3888,
703,
4074,
2042,
498,
12268,
338,
29901,
376,
718,
851,
29898,
386,
12268,
2588,
29961,
524,
29898,
13140,
4638,
876,
13,
2
] |
anymesh/tests/reactortester.py | AnyMesh/anyMesh-Python | 39 | 32523 | <reponame>AnyMesh/anyMesh-Python<filename>anymesh/tests/reactortester.py
import unittest
from twisted.internet import reactor, task
class ReactorTestCase(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(ReactorTestCase, self).__init__(*args, **kwargs)
self.done = False
def timeOutAfter(self, seconds):
f = reactor.callLater(seconds, self.timedOut)
f.start(seconds)
def timedOut(self):
self.done = True
self.assertTrue(False, "test timed out!")
print "Test Timed Out!"
if reactor.running:
reactor.stop()
def reactorAssert(self, success, msg):
if not self.done:
self.assertTrue(success, msg)
def reactorTestComplete(self):
self.done = True
self.assertTrue(True, "test complete!")
print "Test Complete!"
if reactor.running:
reactor.stop()
| [
1,
529,
276,
1112,
420,
29958,
10773,
29924,
12094,
29914,
1384,
29924,
12094,
29899,
11980,
29966,
9507,
29958,
273,
962,
12094,
29914,
21150,
29914,
8423,
441,
4156,
29889,
2272,
13,
5215,
443,
27958,
13,
3166,
3252,
12652,
29889,
14168,
300,
1053,
337,
7168,
29892,
3414,
13,
13,
1990,
830,
7168,
3057,
8259,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
1123,
7168,
3057,
8259,
29892,
1583,
467,
1649,
2344,
1649,
10456,
5085,
29892,
3579,
19290,
29897,
13,
4706,
1583,
29889,
15091,
353,
7700,
13,
13,
1678,
822,
931,
3744,
13555,
29898,
1311,
29892,
6923,
1125,
13,
4706,
285,
353,
337,
7168,
29889,
4804,
29931,
1008,
29898,
23128,
29892,
1583,
29889,
9346,
287,
3744,
29897,
13,
4706,
285,
29889,
2962,
29898,
23128,
29897,
13,
13,
1678,
822,
5335,
287,
3744,
29898,
1311,
1125,
13,
4706,
1583,
29889,
15091,
353,
5852,
13,
4706,
1583,
29889,
9294,
5574,
29898,
8824,
29892,
376,
1688,
5335,
287,
714,
29991,
1159,
13,
4706,
1596,
376,
3057,
7870,
287,
4451,
3850,
13,
4706,
565,
337,
7168,
29889,
21094,
29901,
13,
9651,
337,
7168,
29889,
9847,
580,
13,
13,
1678,
822,
337,
7168,
14697,
29898,
1311,
29892,
2551,
29892,
10191,
1125,
13,
4706,
565,
451,
1583,
29889,
15091,
29901,
13,
9651,
1583,
29889,
9294,
5574,
29898,
8698,
29892,
10191,
29897,
13,
13,
1678,
822,
337,
7168,
3057,
17813,
29898,
1311,
1125,
13,
4706,
1583,
29889,
15091,
353,
5852,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5574,
29892,
376,
1688,
4866,
29991,
1159,
13,
4706,
1596,
376,
3057,
25034,
3850,
13,
4706,
565,
337,
7168,
29889,
21094,
29901,
13,
9651,
337,
7168,
29889,
9847,
580,
13,
2
] |
dgcnn/__init__.py | Temigo/dynamic-gcnn | 49 | 163661 | from iotool import io_factory
from model import build
from trainval import trainval
import ops
from flags import DGCNN_FLAGS
| [
1,
515,
474,
327,
1507,
1053,
12013,
29918,
14399,
13,
3166,
1904,
1053,
2048,
13,
3166,
7945,
791,
1053,
7945,
791,
13,
5215,
288,
567,
13,
3166,
13449,
1053,
360,
8766,
10262,
29918,
18823,
10749,
13,
2
] |
app/app.py | kyoungd/material-stock-finder | 0 | 175049 | <gh_stars>0
import sys
import logging
import pandas as pd
from datetime import datetime
from alpaca import *
from util import PushToServer, SetInterval
from study import *
from dbase import *
from correlate import *
def isTagInOptions(tag:str, cmds:list):
return True if tag in cmds else False
def AppDaily():
Run()
AlpacaSnapshots.All()
AlpacaHistoricalData.All()
StockFinancial.All(isDebug=True, isForceDownloadYahoo=False)
RemoveNoDataStocks()
FilterAtr.All()
FilterEma.All()
FilterKeyLevels.All()
FilterFibonacciRetracement.All()
FilterThreeBars.All()
FilterRelativeVolume.All()
FilterVolumeProfile.All()
FilterGapper.All()
FilterCandlePattern.All()
FilterDoubleTop.All()
FilterTrends.All()
FilterRsiDivergence.All()
FilterCorrelate.All()
PushToServer()
def AppCorrelation():
Run()
AlpacaDaily.All()
YahooDaily.All()
AlpacaCrypto.All()
AtrCalculate.All()
CorrelateAssets.All(isSendToServer=True, days=45, minAtr=5)
CorrelateAssets.All(isSendToServer=True, days=90, minAtr=5)
CorrelateAssets.All(isSendToServer=True, days=180, minAtr=5)
def AppMarketOpen():
LastNightGapper.All(False)
PushToServer()
def RunApp():
today = datetime.now()
print(f'{today.hour} {today.minute}')
if today.hour == 23 and today.minute == 50:
AppDaily()
elif today.hour == 5 and today.minute == 0:
AppMarketOpen()
elif today.hour == 5 and today.minute == 30:
AppMarketOpen()
elif today.hour == 6 and today.minute == 0:
AppMarketOpen()
if __name__ == "__main__":
formatter = '%(asctime)s %(levelname)s %(funcName)s(%(lineno)d) %(message)s'
logging.basicConfig(level=logging.INFO, format=formatter,
datefmt='%d-%b-%y %H:%M:%S', filename="analyzer.log")
logging.info("APP.PY Started")
if isTagInOptions('--test', sys.argv):
# Run()
# AlpacaDaily.All()
# YahooDaily.All()
# AlpacaCrypto.All()
AtrCalculate.All()
# CorrelateAssets.All(isSendToServer=False, days=45, minAtr=5)
# CorrelateAssets.All(isSendToServer=False, days=90, minAtr=5)
# CorrelateAssets.All(isSendToServer=False, days=180, minAtr=5)
# db = MarketDataDb()
# db.WriteMarket('AAPL', [{'close': 120, 'open': 110}, {'close': 115, 'open': 105}], name='Apple, Inc.')
# isOk, data = db.ReadMarket('AAPL')
# df: pd.DataFrame = db.LoadDataFrame(data)
# print(df)
elif isTagInOptions('--corr', sys.argv):
AppCorrelation()
elif isTagInOptions('--day', sys.argv):
AppDaily()
elif isTagInOptions('--fin', sys.argv):
StockFinancial.All(isDebug=True, isForceDownloadYahoo=True)
else:
SetInterval(60, RunApp)
# db = SecDb()
# db.SetLastDaily('AAPL', 170.33, '2020-01-28')
# data = db.GetLastDaily('AAPL')
# print(data)
# LastNightGapper.All("-s")
logging.info('done')
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
10876,
13,
5215,
12183,
13,
5215,
11701,
408,
10518,
13,
3166,
12865,
1053,
12865,
13,
3166,
394,
29886,
11989,
1053,
334,
13,
3166,
3667,
1053,
349,
1878,
1762,
6004,
29892,
3789,
12506,
13,
3166,
6559,
1053,
334,
13,
3166,
270,
3188,
1053,
334,
13,
3166,
18088,
1053,
334,
13,
13,
1753,
338,
8176,
797,
5856,
29898,
4039,
29901,
710,
29892,
9920,
29879,
29901,
1761,
1125,
13,
1678,
736,
5852,
565,
4055,
297,
9920,
29879,
1683,
7700,
13,
13,
1753,
2401,
29928,
8683,
7295,
13,
1678,
7525,
580,
13,
1678,
838,
29886,
11989,
29903,
8971,
845,
1862,
29889,
3596,
580,
13,
1678,
838,
29886,
11989,
29950,
2118,
936,
1469,
29889,
3596,
580,
13,
1678,
10224,
12881,
273,
1455,
29889,
3596,
29898,
275,
11862,
29922,
5574,
29892,
338,
2831,
346,
22954,
29979,
26779,
29922,
8824,
29897,
13,
1678,
15154,
3782,
1469,
20754,
4684,
580,
13,
1678,
19916,
29909,
509,
29889,
3596,
580,
13,
1678,
19916,
29923,
655,
29889,
3596,
580,
13,
1678,
19916,
2558,
10108,
29879,
29889,
3596,
580,
13,
1678,
19916,
29943,
747,
265,
21566,
8015,
945,
882,
29889,
3596,
580,
13,
1678,
19916,
28575,
29933,
1503,
29889,
3596,
580,
13,
1678,
19916,
18278,
24679,
29889,
3596,
580,
13,
1678,
19916,
24679,
13909,
29889,
3596,
580,
13,
1678,
19916,
29954,
23239,
29889,
3596,
580,
13,
1678,
19916,
29907,
392,
280,
17144,
29889,
3596,
580,
13,
1678,
19916,
11843,
7031,
29889,
3596,
580,
13,
1678,
19916,
2308,
1975,
29889,
3596,
580,
13,
1678,
19916,
29934,
1039,
29928,
2147,
10238,
29889,
3596,
580,
13,
1678,
19916,
12521,
2674,
403,
29889,
3596,
580,
13,
1678,
349,
1878,
1762,
6004,
580,
13,
13,
1753,
2401,
12521,
23445,
7295,
13,
1678,
7525,
580,
13,
1678,
838,
29886,
11989,
29928,
8683,
29889,
3596,
580,
13,
1678,
612,
26779,
29928,
8683,
29889,
3596,
580,
13,
1678,
838,
29886,
11989,
29907,
17929,
29889,
3596,
580,
13,
1678,
319,
509,
27065,
403,
29889,
3596,
580,
13,
1678,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
5574,
29892,
3841,
29922,
29946,
29945,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
1678,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
5574,
29892,
3841,
29922,
29929,
29900,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
1678,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
5574,
29892,
3841,
29922,
29896,
29947,
29900,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
13,
1753,
2401,
9802,
300,
6585,
7295,
13,
1678,
9208,
29940,
523,
29954,
23239,
29889,
3596,
29898,
8824,
29897,
13,
1678,
349,
1878,
1762,
6004,
580,
13,
13,
1753,
7525,
2052,
7295,
13,
1678,
9826,
353,
12865,
29889,
3707,
580,
13,
1678,
1596,
29898,
29888,
29915,
29912,
27765,
29889,
18721,
29913,
426,
27765,
29889,
1195,
1082,
29913,
1495,
13,
1678,
565,
9826,
29889,
18721,
1275,
29871,
29906,
29941,
322,
9826,
29889,
1195,
1082,
1275,
29871,
29945,
29900,
29901,
13,
4706,
2401,
29928,
8683,
580,
13,
1678,
25342,
9826,
29889,
18721,
1275,
29871,
29945,
322,
9826,
29889,
1195,
1082,
1275,
29871,
29900,
29901,
13,
4706,
2401,
9802,
300,
6585,
580,
13,
1678,
25342,
9826,
29889,
18721,
1275,
29871,
29945,
322,
9826,
29889,
1195,
1082,
1275,
29871,
29941,
29900,
29901,
13,
4706,
2401,
9802,
300,
6585,
580,
13,
1678,
25342,
9826,
29889,
18721,
1275,
29871,
29953,
322,
9826,
29889,
1195,
1082,
1275,
29871,
29900,
29901,
13,
4706,
2401,
9802,
300,
6585,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
883,
2620,
353,
14210,
29898,
294,
312,
603,
29897,
29879,
1273,
29898,
5563,
978,
29897,
29879,
1273,
29898,
9891,
1170,
29897,
29879,
29414,
29898,
1915,
8154,
29897,
29881,
29897,
1273,
29898,
4906,
29897,
29879,
29915,
13,
1678,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
11690,
29892,
3402,
29922,
689,
2620,
29892,
13,
462,
4706,
2635,
23479,
2433,
29995,
29881,
19222,
29890,
19222,
29891,
1273,
29950,
16664,
29924,
16664,
29903,
742,
10422,
543,
24209,
3298,
29889,
1188,
1159,
13,
1678,
12183,
29889,
3888,
703,
20576,
29889,
20055,
7370,
287,
1159,
13,
13,
1678,
565,
338,
8176,
797,
5856,
877,
489,
1688,
742,
10876,
29889,
19218,
1125,
13,
4706,
396,
7525,
580,
13,
4706,
396,
838,
29886,
11989,
29928,
8683,
29889,
3596,
580,
13,
4706,
396,
612,
26779,
29928,
8683,
29889,
3596,
580,
13,
4706,
396,
838,
29886,
11989,
29907,
17929,
29889,
3596,
580,
13,
4706,
319,
509,
27065,
403,
29889,
3596,
580,
13,
4706,
396,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
8824,
29892,
3841,
29922,
29946,
29945,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
4706,
396,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
8824,
29892,
3841,
29922,
29929,
29900,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
4706,
396,
2994,
2674,
403,
2887,
7224,
29889,
3596,
29898,
275,
12600,
1762,
6004,
29922,
8824,
29892,
3841,
29922,
29896,
29947,
29900,
29892,
1375,
29909,
509,
29922,
29945,
29897,
13,
13,
4706,
396,
4833,
353,
28794,
1469,
10234,
580,
13,
4706,
396,
4833,
29889,
6113,
9802,
300,
877,
29909,
3301,
29931,
742,
518,
10998,
5358,
2396,
29871,
29896,
29906,
29900,
29892,
525,
3150,
2396,
29871,
29896,
29896,
29900,
1118,
11117,
5358,
2396,
29871,
29896,
29896,
29945,
29892,
525,
3150,
2396,
29871,
29896,
29900,
29945,
29913,
1402,
1024,
2433,
2052,
280,
29892,
9266,
29889,
1495,
13,
4706,
396,
338,
20434,
29892,
848,
353,
4833,
29889,
6359,
9802,
300,
877,
29909,
3301,
29931,
1495,
13,
4706,
396,
4489,
29901,
10518,
29889,
17271,
353,
4833,
29889,
5896,
17271,
29898,
1272,
29897,
13,
4706,
396,
1596,
29898,
2176,
29897,
13,
1678,
25342,
338,
8176,
797,
5856,
877,
489,
29725,
742,
10876,
29889,
19218,
1125,
13,
4706,
2401,
12521,
23445,
580,
13,
1678,
25342,
338,
8176,
797,
5856,
877,
489,
3250,
742,
10876,
29889,
19218,
1125,
13,
4706,
2401,
29928,
8683,
580,
13,
1678,
25342,
338,
8176,
797,
5856,
877,
489,
4951,
742,
10876,
29889,
19218,
1125,
13,
4706,
10224,
12881,
273,
1455,
29889,
3596,
29898,
275,
11862,
29922,
5574,
29892,
338,
2831,
346,
22954,
29979,
26779,
29922,
5574,
29897,
13,
1678,
1683,
29901,
13,
4706,
3789,
12506,
29898,
29953,
29900,
29892,
7525,
2052,
29897,
13,
13,
1678,
396,
4833,
353,
5356,
10234,
580,
13,
1678,
396,
4833,
29889,
2697,
8897,
29928,
8683,
877,
29909,
3301,
29931,
742,
29871,
29896,
29955,
29900,
29889,
29941,
29941,
29892,
525,
29906,
29900,
29906,
29900,
29899,
29900,
29896,
29899,
29906,
29947,
1495,
13,
1678,
396,
848,
353,
4833,
29889,
2577,
8897,
29928,
8683,
877,
29909,
3301,
29931,
1495,
29871,
13,
1678,
396,
1596,
29898,
1272,
29897,
13,
1678,
396,
9208,
29940,
523,
29954,
23239,
29889,
3596,
703,
29899,
29879,
1159,
13,
1678,
12183,
29889,
3888,
877,
15091,
1495,
13,
2
] |
src/main.py | DantasB/smart-speaker | 1 | 125794 | import os
import re
import requests
from datetime import datetime as dt
import dotenv
from shared_library.shared_library import generate_workfolder, delete_workfolder
from listener.listener import Listener
from speaker.speaker import Speaker
dotenv.load_dotenv()
ACTIVATION_WORD = os.environ.get("ACTIVATION_WORD")
print("ACTIVATION WORD:", ACTIVATION_WORD)
if __name__ == "__main__":
workfolder = generate_workfolder()
speaker = Speaker(workfolder.name)
listener = Listener()
while True:
try:
content = str(listener.listen()).lower()
print('>', content)
if content.startswith(ACTIVATION_WORD):
print("como posso ajudar?")
speaker.play_audio(speaker.create_audio("como posso ajudar?"))
command = str(listener.listen()).lower()
print('>', command)
if command == "que horas são":
time = dt.now()
s_hour = 's' if time.hour != 1 else ''
s_minute = 's' if time.minute != 1 else ''
time_str = f"são {time.hour} hora{s_hour} e {time.minute} minuto{s_minute}"
print(time_str)
speaker.play_audio(speaker.create_audio(time_str))
elif re.match("(.* )?temperatura (em|no|na) .*", command):
cidade = command[command.index("temperatura") + 15:]
# r = requests.get(f"https://goweather.herokuapp.com/weather/{cidade}")
r = requests.get(f"https://wttr.in/{cidade}?format=\"%t\"")
if r.status_code != 200:
print("não sei a temperatura para essa cidade")
speaker.play_audio(speaker.create_audio("não sei a temperatura para essa cidade"))
else:
# temperatura = r.json()["temperature"][:3].replace("+", "")
temperatura = r.text.replace("+", "")
prep = command[command.index("temperatura") + 12:command.index("temperatura") + 14]
response_text = f"Está fazendo {temperatura} {prep} {cidade}"
print(response_text)
speaker.play_audio(speaker.create_audio(response_text))
elif re.match("qual (o valor|a cotação) do (dolar|euro|dólar) em reais", command):
moeda = command[command.index("do") + 3:command.index("em reais")-1]
# print(moeda)
if moeda == "dólar" or moeda == "dolar":
moeda_symbol = "usd"
elif moeda == "euro":
moeda_symbol = "eur"
else:
raise ZeroDivisionError()
r = requests.get(f"https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/brl/{moeda_symbol}.json")
if r.status_code != 200:
raise ZeroDivisionError()
else:
conv = round(1/r.json()[moeda_symbol],2)
response_text = f"O valor do {moeda} é de {conv} reais"
print(response_text)
speaker.play_audio(speaker.create_audio(response_text))
elif re.match("quanto(s)? são (\$)?(\d+) (dolar|euro|dólar)(s|es)? em reais", command):
valores = command[command.index("são") + 4:command.index("em reais")-1].split(" ")
# print(valores)
if valores[1].startswith("dólar") or valores[1].startswith("dolar"):
moeda_symbol = "usd"
elif valores[1].startswith("euro"):
moeda_symbol = "eur"
else:
raise ZeroDivisionError()
r = requests.get(f"https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/brl/{moeda_symbol}.json")
if r.status_code != 200:
raise ZeroDivisionError()
else:
conv = round(1/r.json()[moeda_symbol],2)
result = int(valores[0])*conv
response_text = f"{valores[0]} {valores[1]} são {result} reais"
print(response_text)
speaker.play_audio(speaker.create_audio(response_text))
else:
print("não consigo te ajudar com isso")
speaker.play_audio(speaker.create_audio("não consigo te ajudar com isso"))
except ZeroDivisionError:
print("não consigo te ajudar com isso")
speaker.play_audio(speaker.create_audio("não consigo te ajudar com isso"))
continue
except KeyboardInterrupt: break
# except:
# print("não consigo te ajudar com isso")
# speaker.play_audio(speaker.create_audio("não consigo te ajudar com isso"))
# continue
delete_workfolder(workfolder)
| [
1,
1053,
2897,
13,
5215,
337,
13,
5215,
7274,
13,
3166,
12865,
1053,
12865,
408,
11636,
13,
5215,
8329,
6272,
13,
3166,
7258,
29918,
5258,
29889,
12366,
29918,
5258,
1053,
5706,
29918,
1287,
12083,
29892,
5217,
29918,
1287,
12083,
13,
3166,
13254,
29889,
25894,
1053,
2391,
759,
13,
3166,
25657,
29889,
5965,
5790,
1053,
5013,
5790,
13,
13,
6333,
6272,
29889,
1359,
29918,
6333,
6272,
580,
13,
13,
17923,
5667,
8098,
29918,
17013,
353,
2897,
29889,
21813,
29889,
657,
703,
17923,
5667,
8098,
29918,
17013,
1159,
13,
13,
2158,
703,
17923,
5667,
8098,
399,
25593,
29901,
613,
319,
1783,
5667,
8098,
29918,
17013,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
664,
12083,
353,
5706,
29918,
1287,
12083,
580,
13,
1678,
25657,
353,
5013,
5790,
29898,
1287,
12083,
29889,
978,
29897,
13,
1678,
13254,
353,
2391,
759,
580,
13,
13,
1678,
1550,
5852,
29901,
13,
4706,
1018,
29901,
13,
9651,
2793,
353,
851,
29898,
25894,
29889,
20631,
16655,
13609,
580,
13,
9651,
1596,
877,
29958,
742,
2793,
29897,
13,
9651,
565,
2793,
29889,
27382,
2541,
29898,
17923,
5667,
8098,
29918,
17013,
1125,
13,
18884,
1596,
703,
23700,
926,
578,
13612,
566,
279,
29973,
1159,
13,
18884,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
703,
23700,
926,
578,
13612,
566,
279,
3026,
876,
13,
18884,
1899,
353,
851,
29898,
25894,
29889,
20631,
16655,
13609,
580,
13,
18884,
1596,
877,
29958,
742,
1899,
29897,
13,
18884,
565,
1899,
1275,
376,
802,
4029,
294,
12777,
1115,
13,
462,
1678,
931,
353,
11636,
29889,
3707,
580,
13,
462,
1678,
269,
29918,
18721,
353,
525,
29879,
29915,
565,
931,
29889,
18721,
2804,
29871,
29896,
1683,
6629,
13,
462,
1678,
269,
29918,
1195,
1082,
353,
525,
29879,
29915,
565,
931,
29889,
1195,
1082,
2804,
29871,
29896,
1683,
6629,
13,
462,
1678,
931,
29918,
710,
353,
285,
29908,
29879,
1368,
426,
2230,
29889,
18721,
29913,
298,
2207,
29912,
29879,
29918,
18721,
29913,
321,
426,
2230,
29889,
1195,
1082,
29913,
1375,
3066,
29912,
29879,
29918,
1195,
1082,
5038,
13,
462,
1678,
1596,
29898,
2230,
29918,
710,
29897,
13,
462,
1678,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
29898,
2230,
29918,
710,
876,
13,
18884,
25342,
337,
29889,
4352,
703,
28104,
1723,
29973,
12863,
7969,
313,
331,
29989,
1217,
29989,
1056,
29897,
869,
29930,
613,
1899,
1125,
13,
462,
1678,
17931,
353,
1899,
29961,
6519,
29889,
2248,
703,
12863,
7969,
1159,
718,
29871,
29896,
29945,
17531,
13,
462,
1678,
396,
364,
353,
7274,
29889,
657,
29898,
29888,
29908,
991,
597,
29887,
4657,
1624,
29889,
2276,
9154,
932,
29889,
510,
29914,
705,
1624,
19248,
29883,
5558,
27195,
13,
462,
1678,
364,
353,
7274,
29889,
657,
29898,
29888,
29908,
991,
597,
14554,
509,
29889,
262,
19248,
29883,
5558,
29913,
29973,
4830,
14672,
29995,
29873,
5931,
1159,
13,
462,
1678,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
462,
4706,
1596,
703,
29876,
1368,
13106,
263,
6238,
7969,
1702,
3686,
29874,
17931,
1159,
13,
462,
4706,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
703,
29876,
1368,
13106,
263,
6238,
7969,
1702,
3686,
29874,
17931,
5783,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
396,
6238,
7969,
353,
364,
29889,
3126,
580,
3366,
12863,
1535,
3108,
7503,
29941,
1822,
6506,
703,
29974,
613,
20569,
13,
462,
4706,
6238,
7969,
353,
364,
29889,
726,
29889,
6506,
703,
29974,
613,
20569,
13,
462,
4706,
8273,
353,
1899,
29961,
6519,
29889,
2248,
703,
12863,
7969,
1159,
718,
29871,
29896,
29906,
29901,
6519,
29889,
2248,
703,
12863,
7969,
1159,
718,
29871,
29896,
29946,
29962,
13,
462,
4706,
2933,
29918,
726,
353,
285,
29908,
12787,
29976,
16928,
2765,
426,
12863,
7969,
29913,
426,
15287,
29913,
426,
29883,
5558,
5038,
13,
462,
4706,
1596,
29898,
5327,
29918,
726,
29897,
13,
462,
4706,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
29898,
5327,
29918,
726,
876,
13,
18884,
25342,
337,
29889,
4352,
703,
15380,
313,
29877,
16497,
29989,
29874,
274,
4616,
2340,
29897,
437,
313,
29881,
10170,
29989,
29872,
2192,
29989,
29881,
29980,
4675,
29897,
953,
337,
1759,
613,
1899,
1125,
13,
462,
1678,
2730,
8710,
353,
1899,
29961,
6519,
29889,
2248,
703,
1867,
1159,
718,
29871,
29941,
29901,
6519,
29889,
2248,
703,
331,
337,
1759,
1159,
29899,
29896,
29962,
13,
462,
1678,
396,
1596,
29898,
4346,
8710,
29897,
13,
462,
1678,
565,
2730,
8710,
1275,
376,
29881,
29980,
4675,
29908,
470,
2730,
8710,
1275,
376,
29881,
10170,
1115,
13,
462,
4706,
2730,
8710,
29918,
18098,
353,
376,
375,
29881,
29908,
13,
462,
1678,
25342,
2730,
8710,
1275,
376,
29872,
2192,
1115,
13,
462,
4706,
2730,
8710,
29918,
18098,
353,
376,
5411,
29908,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
12020,
28933,
12596,
2459,
2392,
580,
13,
462,
1678,
364,
353,
7274,
29889,
657,
29898,
29888,
29908,
991,
597,
13687,
29889,
1315,
6144,
440,
29878,
29889,
1212,
29914,
12443,
29914,
29888,
1450,
834,
801,
2168,
29900,
29914,
26095,
29899,
2754,
29992,
29896,
29914,
12333,
29914,
21962,
15942,
29914,
1182,
29880,
19248,
4346,
8710,
29918,
18098,
1836,
3126,
1159,
13,
462,
1678,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
462,
4706,
12020,
28933,
12596,
2459,
2392,
580,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
7602,
353,
4513,
29898,
29896,
29914,
29878,
29889,
3126,
580,
29961,
4346,
8710,
29918,
18098,
1402,
29906,
29897,
13,
462,
4706,
2933,
29918,
726,
353,
285,
29908,
29949,
16497,
437,
426,
4346,
8710,
29913,
904,
316,
426,
20580,
29913,
337,
1759,
29908,
13,
462,
4706,
1596,
29898,
5327,
29918,
726,
29897,
13,
462,
4706,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
29898,
5327,
29918,
726,
876,
13,
18884,
25342,
337,
29889,
4352,
703,
339,
5361,
29898,
29879,
6877,
12777,
3441,
29938,
6877,
1194,
29881,
28135,
313,
29881,
10170,
29989,
29872,
2192,
29989,
29881,
29980,
4675,
5033,
29879,
29989,
267,
6877,
953,
337,
1759,
613,
1899,
1125,
13,
462,
1678,
659,
2361,
353,
1899,
29961,
6519,
29889,
2248,
703,
29879,
1368,
1159,
718,
29871,
29946,
29901,
6519,
29889,
2248,
703,
331,
337,
1759,
1159,
29899,
29896,
1822,
5451,
703,
16521,
13,
462,
1678,
396,
1596,
29898,
791,
2361,
29897,
13,
462,
1678,
565,
659,
2361,
29961,
29896,
1822,
27382,
2541,
703,
29881,
29980,
4675,
1159,
470,
659,
2361,
29961,
29896,
1822,
27382,
2541,
703,
29881,
10170,
29908,
1125,
13,
462,
4706,
2730,
8710,
29918,
18098,
353,
376,
375,
29881,
29908,
13,
462,
1678,
25342,
659,
2361,
29961,
29896,
1822,
27382,
2541,
703,
29872,
2192,
29908,
1125,
13,
462,
4706,
2730,
8710,
29918,
18098,
353,
376,
5411,
29908,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
12020,
28933,
12596,
2459,
2392,
580,
13,
462,
1678,
364,
353,
7274,
29889,
657,
29898,
29888,
29908,
991,
597,
13687,
29889,
1315,
6144,
440,
29878,
29889,
1212,
29914,
12443,
29914,
29888,
1450,
834,
801,
2168,
29900,
29914,
26095,
29899,
2754,
29992,
29896,
29914,
12333,
29914,
21962,
15942,
29914,
1182,
29880,
19248,
4346,
8710,
29918,
18098,
1836,
3126,
1159,
13,
462,
1678,
565,
364,
29889,
4882,
29918,
401,
2804,
29871,
29906,
29900,
29900,
29901,
13,
462,
4706,
12020,
28933,
12596,
2459,
2392,
580,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
7602,
353,
4513,
29898,
29896,
29914,
29878,
29889,
3126,
580,
29961,
4346,
8710,
29918,
18098,
1402,
29906,
29897,
13,
462,
4706,
1121,
353,
938,
29898,
791,
2361,
29961,
29900,
2314,
29930,
20580,
13,
462,
4706,
2933,
29918,
726,
353,
285,
29908,
29912,
791,
2361,
29961,
29900,
12258,
426,
791,
2361,
29961,
29896,
12258,
12777,
426,
2914,
29913,
337,
1759,
29908,
13,
462,
4706,
1596,
29898,
5327,
29918,
726,
29897,
13,
462,
4706,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
29898,
5327,
29918,
726,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
1596,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
1159,
13,
462,
1678,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
5783,
13,
4706,
5174,
28933,
12596,
2459,
2392,
29901,
13,
9651,
1596,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
1159,
13,
9651,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
5783,
13,
9651,
6773,
13,
4706,
5174,
7670,
3377,
4074,
6685,
29901,
2867,
13,
4706,
396,
5174,
29901,
13,
4706,
396,
268,
1596,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
1159,
13,
4706,
396,
268,
25657,
29889,
1456,
29918,
18494,
29898,
5965,
5790,
29889,
3258,
29918,
18494,
703,
29876,
1368,
1136,
5973,
734,
13612,
566,
279,
419,
338,
578,
5783,
13,
4706,
396,
268,
6773,
13,
1678,
5217,
29918,
1287,
12083,
29898,
1287,
12083,
29897,
13,
2
] |
datatableview/tests/test_helpers.py | gregneagle/sal | 2 | 1648 | <filename>datatableview/tests/test_helpers.py
# -*- encoding: utf-8 -*-
from datetime import datetime
from functools import partial
from django import get_version
from datatableview import helpers
import six
from .testcase import DatatableViewTestCase
from .test_app.models import ExampleModel, RelatedM2MModel
if get_version().split('.') < ['1', '7']:
test_data_fixture = 'test_data_legacy.json'
else:
test_data_fixture = 'test_data.json'
class HelpersTests(DatatableViewTestCase):
fixtures = [test_data_fixture]
def test_link_to_model(self):
""" Verifies that link_to_model works. """
helper = helpers.link_to_model
# Verify that a model without get_absolute_url() raises a complaint
related = RelatedM2MModel.objects.get(pk=1)
with self.assertRaises(AttributeError) as cm:
helper(related)
self.assertEqual(str(cm.exception), "'RelatedM2MModel' object has no attribute 'get_absolute_url'")
# Verify simple use
instance = ExampleModel.objects.get(pk=1)
output = helper(instance)
self.assertEqual(output, '<a href="#1">ExampleModel 1</a>')
# Verify text override
output = helper(instance, text="Special text")
self.assertEqual(output, '<a href="#1">Special text</a>')
# Verify ``key`` access to transition an instance to a related field
instance = ExampleModel.objects.get(pk=2)
secondary_helper = helper(key=lambda o: o.related)
output = secondary_helper(instance)
self.assertEqual(output, '<a href="#1">RelatedModel object</a>')
# Verify ``key`` access version of custom text
output = secondary_helper(instance, text="Special text")
self.assertEqual(output, '<a href="#1">Special text</a>')
def test_make_boolean_checkmark(self):
""" Verifies that make_boolean_checkmark works. """
helper = helpers.make_boolean_checkmark
# Verify simple use
output = helper("True-ish value")
self.assertEqual(output, '✔')
output = helper("")
self.assertEqual(output, '✘')
# Verify custom values
output = helper("True-ish value", true_value="Yes", false_value="No")
self.assertEqual(output, 'Yes')
output = helper("", true_value="Yes", false_value="No")
self.assertEqual(output, 'No')
def test_format_date(self):
""" Verifies that format_date works. """
helper = helpers.format_date
# Verify simple use
data = datetime.now()
secondary_helper = helper("%m/%d/%Y")
output = secondary_helper(data)
self.assertEqual(output, data.strftime("%m/%d/%Y"))
# Verify that None objects get swallowed without complaint.
# This helps promise that the helper won't blow up for models.DateTimeField that are allowed
# to be null.
output = secondary_helper(None)
self.assertEqual(output, "")
def test_format(self):
""" Verifies that format works. """
helper = helpers.format
# Verify simple use
data = 1234567890
secondary_helper = helper("{0:,}")
output = secondary_helper(data)
self.assertEqual(output, "{0:,}".format(data))
# Verify ``cast`` argument
data = "1234.56789"
secondary_helper = helper("{0:.2f}", cast=float)
output = secondary_helper(data)
self.assertEqual(output, "{0:.2f}".format(float(data)))
def test_through_filter(self):
""" Verifies that through_filter works. """
helper = helpers.through_filter
target_function = lambda data, arg=None: (data, arg)
# Verify simple use
data = "Data string"
secondary_helper = helper(target_function)
output = secondary_helper(data)
self.assertEqual(output, (data, None))
# Verify ``arg`` argument
secondary_helper = helper(target_function, arg="Arg data")
output = secondary_helper(data)
self.assertEqual(output, (data, "Arg data"))
def test_itemgetter(self):
""" Verifies that itemgetter works. """
helper = helpers.itemgetter
# Verify simple index access
data = list(range(5))
secondary_helper = helper(-1)
output = secondary_helper(data)
self.assertEqual(output, data[-1])
# Verify slicing access
secondary_helper = helper(slice(1, 3))
output = secondary_helper(data)
self.assertEqual(output, data[1:3])
# Verify ellipsis works for strings
data = str(range(10))
secondary_helper = helper(slice(0, 5), ellipsis=True)
output = secondary_helper(data)
self.assertEqual(output, data[:5] + "...")
# Verify ellipsis can be customized
secondary_helper = helper(slice(0, 5), ellipsis="custom")
output = secondary_helper(data)
self.assertEqual(output, data[:5] + "custom")
# Verify ellipsis does nothing for non-string data types
data = range(10)
output = secondary_helper(data)
self.assertEqual(output, data[:5])
def test_attrgetter(self):
""" Verifies that attrgetter works. """
helper = helpers.attrgetter
# Verify simple attr lookup
data = ExampleModel.objects.get(pk=1)
secondary_helper = helper('pk')
output = secondary_helper(data)
self.assertEqual(output, data.pk)
# Verify bad attribrute lookup
data = ExampleModel.objects.get(pk=1)
secondary_helper = helper('bad field name')
with self.assertRaises(AttributeError) as cm:
output = secondary_helper(data)
self.assertEqual(str(cm.exception), "'ExampleModel' object has no attribute 'bad field name'")
def test_make_xeditable(self):
""" Verifies that make_xeditable works. """
helper = helpers.make_xeditable
# Items that the helper normally expects in a callback context
internals = {'field_name': 'name'}
# Verify chain calls don't trigger rendering
secondary_helper = helper()
tertiary_helper = secondary_helper()
self.assertEqual(type(secondary_helper), partial)
self.assertEqual(type(tertiary_helper), partial)
# Verify chain ends with provision of a value
data = ExampleModel.objects.get(pk=1)
# This needs a "url" arg because we want to test successful use
output = tertiary_helper(data, url="/", **internals)
self.assertTrue(isinstance(output, six.string_types))
# Verify that no "view" kwarg means the url is required from the call
with self.assertRaises(ValueError) as cm:
tertiary_helper(data, **internals)
self.assertEqual(str(cm.exception), "'make_xeditable' cannot determine a value for 'url'.")
# Verify kwargs accumulate
kwargs1 = { 'type': 'textarea' }
kwargs2 = { 'other_arg': True }
secondary_helper = helper(**kwargs1)
expected_kwargs = dict(kwargs1, extra_attrs=[])
self.assertEqual(secondary_helper.keywords, expected_kwargs)
tertiary_helper = secondary_helper(**kwargs2)
expected_kwargs = dict(kwargs1, **dict(kwargs2, extra_attrs=[]))
self.assertEqual(tertiary_helper.keywords, expected_kwargs)
# Verify default kwarg names end up as attributes
data = ExampleModel.objects.get(pk=1)
kwargs = {
'pk': "PK DATA",
'type': "TYPE DATA",
'url': "URL DATA",
'source': "SOURCE DATA",
'title': "TITLE DATA",
'placeholder': "PLACEHOLDER DATA",
# Extra stuff not in anticipated to appear in rendered string
'special': "SPECIAL DATA",
'data_custom': "DATA-CUSTOM DATA",
}
secondary_helper = helper(**kwargs)
output = secondary_helper(data, **internals)
expected_output = """
<a href="#" data-name="name"
data-pk="PK DATA"
data-placeholder="PLACEHOLDER DATA"
data-source="SOURCE DATA"
data-title="TITLE DATA"
data-type="TYPE DATA"
data-url="URL DATA"
data-value="1"
data-xeditable="xeditable">
ExampleModel 1
</a>
"""
self.assertHTMLEqual(output, expected_output)
# Verify that explicit additions via ``extra_attrs`` allows kwargs to appear in HTML as
# "data-*" attributes.
secondary_helper = helper(extra_attrs=['special', 'data_custom', 'fake'], **kwargs)
output = secondary_helper(data, **internals)
expected_output = """
<a href="#" data-name="name"
data-pk="PK DATA"
data-placeholder="PLACEHOLDER DATA"
data-source="SOURCE DATA"
data-title="TITLE DATA"
data-type="TYPE DATA"
data-url="URL DATA"
data-value="1"
data-special="SPECIAL DATA"
data-custom="DATA-CUSTOM DATA"
data-xeditable="xeditable">
ExampleModel 1
</a>
"""
self.assertHTMLEqual(output, expected_output)
| [
1,
529,
9507,
29958,
4130,
17219,
1493,
29914,
21150,
29914,
1688,
29918,
3952,
6774,
29889,
2272,
13,
29937,
448,
29930,
29899,
8025,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
13,
3166,
9557,
1053,
679,
29918,
3259,
13,
13,
3166,
1418,
17219,
1493,
1053,
1371,
414,
13,
13,
5215,
4832,
13,
13,
3166,
869,
1688,
4878,
1053,
13373,
17219,
1043,
3057,
8259,
13,
3166,
869,
1688,
29918,
932,
29889,
9794,
1053,
8741,
3195,
29892,
6376,
630,
29924,
29906,
29924,
3195,
13,
13,
361,
679,
29918,
3259,
2141,
5451,
12839,
1495,
529,
6024,
29896,
742,
525,
29955,
2033,
29901,
13,
1678,
1243,
29918,
1272,
29918,
7241,
15546,
353,
525,
1688,
29918,
1272,
29918,
1397,
4135,
29889,
3126,
29915,
13,
2870,
29901,
13,
1678,
1243,
29918,
1272,
29918,
7241,
15546,
353,
525,
1688,
29918,
1272,
29889,
3126,
29915,
13,
13,
13,
1990,
6162,
6774,
24376,
29898,
16390,
17219,
1043,
3057,
8259,
1125,
13,
1678,
5713,
486,
1973,
353,
518,
1688,
29918,
1272,
29918,
7241,
15546,
29962,
13,
13,
1678,
822,
1243,
29918,
2324,
29918,
517,
29918,
4299,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
1544,
29918,
517,
29918,
4299,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
2324,
29918,
517,
29918,
4299,
13,
13,
4706,
396,
1798,
1598,
393,
263,
1904,
1728,
679,
29918,
23552,
29918,
2271,
580,
1153,
4637,
263,
15313,
524,
13,
4706,
4475,
353,
6376,
630,
29924,
29906,
29924,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
29897,
408,
7477,
29901,
13,
9651,
16876,
29898,
12817,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
4912,
29889,
11739,
511,
13577,
9662,
630,
29924,
29906,
29924,
3195,
29915,
1203,
756,
694,
5352,
525,
657,
29918,
23552,
29918,
2271,
29915,
1159,
13,
13,
4706,
396,
1798,
1598,
2560,
671,
13,
4706,
2777,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
1962,
353,
16876,
29898,
8758,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
12801,
29874,
2822,
9880,
29896,
1013,
14023,
3195,
29871,
29896,
829,
29874,
29958,
1495,
13,
13,
4706,
396,
1798,
1598,
1426,
5712,
13,
4706,
1962,
353,
16876,
29898,
8758,
29892,
1426,
543,
24780,
1426,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
12801,
29874,
2822,
9880,
29896,
1013,
24780,
1426,
829,
29874,
29958,
1495,
13,
13,
4706,
396,
1798,
1598,
4954,
1989,
16159,
2130,
304,
9558,
385,
2777,
304,
263,
4475,
1746,
13,
4706,
2777,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29906,
29897,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
1989,
29922,
2892,
288,
29901,
288,
29889,
12817,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
8758,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
12801,
29874,
2822,
9880,
29896,
1013,
9662,
630,
3195,
1203,
829,
29874,
29958,
1495,
13,
13,
4706,
396,
1798,
1598,
4954,
1989,
16159,
2130,
1873,
310,
2888,
1426,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
8758,
29892,
1426,
543,
24780,
1426,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
12801,
29874,
2822,
9880,
29896,
1013,
24780,
1426,
829,
29874,
29958,
1495,
13,
13,
1678,
822,
1243,
29918,
5675,
29918,
20054,
29918,
3198,
3502,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
1207,
29918,
20054,
29918,
3198,
3502,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
5675,
29918,
20054,
29918,
3198,
3502,
13,
13,
4706,
396,
1798,
1598,
2560,
671,
13,
4706,
1962,
353,
16876,
703,
5574,
29899,
728,
995,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
525,
9137,
29896,
29900,
29900,
29900,
29946,
29936,
1495,
13,
4706,
1962,
353,
16876,
703,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
525,
9137,
29896,
29900,
29900,
29900,
29947,
29936,
1495,
13,
13,
4706,
396,
1798,
1598,
2888,
1819,
13,
4706,
1962,
353,
16876,
703,
5574,
29899,
728,
995,
613,
1565,
29918,
1767,
543,
8241,
613,
2089,
29918,
1767,
543,
3782,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
525,
8241,
1495,
13,
4706,
1962,
353,
16876,
703,
613,
1565,
29918,
1767,
543,
8241,
613,
2089,
29918,
1767,
543,
3782,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
525,
3782,
1495,
13,
13,
1678,
822,
1243,
29918,
4830,
29918,
1256,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
3402,
29918,
1256,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
4830,
29918,
1256,
13,
13,
4706,
396,
1798,
1598,
2560,
671,
13,
4706,
848,
353,
12865,
29889,
3707,
580,
13,
4706,
16723,
29918,
20907,
353,
16876,
11702,
29885,
22584,
29881,
22584,
29979,
1159,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
29889,
710,
615,
603,
11702,
29885,
22584,
29881,
22584,
29979,
5783,
13,
13,
4706,
396,
1798,
1598,
393,
6213,
3618,
679,
2381,
24622,
1728,
15313,
524,
29889,
13,
4706,
396,
910,
6911,
11640,
393,
278,
16876,
2113,
29915,
29873,
13031,
701,
363,
4733,
29889,
11384,
3073,
393,
526,
6068,
13,
4706,
396,
304,
367,
1870,
29889,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
8516,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
20569,
13,
13,
1678,
822,
1243,
29918,
4830,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
3402,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
4830,
13,
13,
4706,
396,
1798,
1598,
2560,
671,
13,
4706,
848,
353,
29871,
29896,
29906,
29941,
29946,
29945,
29953,
29955,
29947,
29929,
29900,
13,
4706,
16723,
29918,
20907,
353,
16876,
703,
29912,
29900,
29901,
29892,
27195,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
29850,
29900,
29901,
29892,
29913,
1642,
4830,
29898,
1272,
876,
13,
13,
4706,
396,
1798,
1598,
4954,
4384,
16159,
2980,
13,
4706,
848,
353,
376,
29896,
29906,
29941,
29946,
29889,
29945,
29953,
29955,
29947,
29929,
29908,
13,
4706,
16723,
29918,
20907,
353,
16876,
703,
29912,
29900,
29901,
29889,
29906,
29888,
17671,
4320,
29922,
7411,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
29850,
29900,
29901,
29889,
29906,
29888,
29913,
1642,
4830,
29898,
7411,
29898,
1272,
4961,
13,
13,
1678,
822,
1243,
29918,
20678,
29918,
4572,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
1549,
29918,
4572,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
20678,
29918,
4572,
13,
13,
4706,
3646,
29918,
2220,
353,
14013,
848,
29892,
1852,
29922,
8516,
29901,
313,
1272,
29892,
1852,
29897,
13,
13,
4706,
396,
1798,
1598,
2560,
671,
13,
4706,
848,
353,
376,
1469,
1347,
29908,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
5182,
29918,
2220,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
313,
1272,
29892,
6213,
876,
13,
13,
4706,
396,
1798,
1598,
4954,
1191,
16159,
2980,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
5182,
29918,
2220,
29892,
1852,
543,
8559,
848,
1159,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
313,
1272,
29892,
376,
8559,
848,
5783,
13,
13,
1678,
822,
1243,
29918,
667,
657,
357,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
2944,
657,
357,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
667,
657,
357,
13,
13,
4706,
396,
1798,
1598,
2560,
2380,
2130,
13,
4706,
848,
353,
1051,
29898,
3881,
29898,
29945,
876,
13,
4706,
16723,
29918,
20907,
353,
16876,
6278,
29896,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
14352,
29896,
2314,
13,
13,
4706,
396,
1798,
1598,
269,
506,
292,
2130,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
18337,
29898,
29896,
29892,
29871,
29941,
876,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
29961,
29896,
29901,
29941,
2314,
13,
13,
4706,
396,
1798,
1598,
22434,
567,
275,
1736,
363,
6031,
13,
4706,
848,
353,
851,
29898,
3881,
29898,
29896,
29900,
876,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
18337,
29898,
29900,
29892,
29871,
29945,
511,
22434,
567,
275,
29922,
5574,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
7503,
29945,
29962,
718,
29804,
1159,
13,
13,
4706,
396,
1798,
1598,
22434,
567,
275,
508,
367,
2888,
1891,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
18337,
29898,
29900,
29892,
29871,
29945,
511,
22434,
567,
275,
543,
6341,
1159,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
7503,
29945,
29962,
718,
376,
6341,
1159,
13,
13,
4706,
396,
1798,
1598,
22434,
567,
275,
947,
3078,
363,
1661,
29899,
1807,
848,
4072,
13,
4706,
848,
353,
3464,
29898,
29896,
29900,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
7503,
29945,
2314,
13,
13,
1678,
822,
1243,
29918,
5552,
657,
357,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
12421,
657,
357,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
5552,
657,
357,
13,
13,
4706,
396,
1798,
1598,
2560,
12421,
16280,
13,
4706,
848,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
16723,
29918,
20907,
353,
16876,
877,
20571,
1495,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
4905,
29892,
848,
29889,
20571,
29897,
13,
13,
4706,
396,
1798,
1598,
4319,
1098,
1091,
29878,
1082,
16280,
13,
4706,
848,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
16723,
29918,
20907,
353,
16876,
877,
12313,
1746,
1024,
1495,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
29897,
408,
7477,
29901,
13,
9651,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
4912,
29889,
11739,
511,
13577,
14023,
3195,
29915,
1203,
756,
694,
5352,
525,
12313,
1746,
1024,
29915,
1159,
13,
13,
1678,
822,
1243,
29918,
5675,
29918,
29916,
5628,
519,
29898,
1311,
1125,
13,
4706,
9995,
1798,
11057,
393,
1207,
29918,
29916,
5628,
519,
1736,
29889,
9995,
13,
4706,
16876,
353,
1371,
414,
29889,
5675,
29918,
29916,
5628,
519,
13,
13,
4706,
396,
25085,
393,
278,
16876,
12891,
23347,
297,
263,
6939,
3030,
13,
4706,
2836,
1338,
353,
11117,
2671,
29918,
978,
2396,
525,
978,
10827,
13,
13,
4706,
396,
1798,
1598,
9704,
5717,
1016,
29915,
29873,
7135,
15061,
13,
4706,
16723,
29918,
20907,
353,
16876,
580,
13,
4706,
260,
814,
29875,
653,
29918,
20907,
353,
16723,
29918,
20907,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1853,
29898,
7496,
653,
29918,
20907,
511,
7687,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1853,
29898,
357,
2034,
653,
29918,
20907,
511,
7687,
29897,
13,
13,
4706,
396,
1798,
1598,
9704,
10614,
411,
25161,
310,
263,
995,
13,
4706,
848,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
396,
910,
4225,
263,
376,
2271,
29908,
1852,
1363,
591,
864,
304,
1243,
9150,
671,
13,
4706,
1962,
353,
260,
814,
29875,
653,
29918,
20907,
29898,
1272,
29892,
3142,
13802,
613,
3579,
14168,
1338,
29897,
13,
4706,
1583,
29889,
9294,
5574,
29898,
275,
8758,
29898,
4905,
29892,
4832,
29889,
1807,
29918,
8768,
876,
13,
13,
4706,
396,
1798,
1598,
393,
694,
376,
1493,
29908,
9049,
1191,
2794,
278,
3142,
338,
3734,
515,
278,
1246,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1917,
2392,
29897,
408,
7477,
29901,
13,
9651,
260,
814,
29875,
653,
29918,
20907,
29898,
1272,
29892,
3579,
14168,
1338,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
4912,
29889,
11739,
511,
13577,
5675,
29918,
29916,
5628,
519,
29915,
2609,
8161,
263,
995,
363,
525,
2271,
4286,
1159,
13,
13,
4706,
396,
1798,
1598,
9049,
5085,
18414,
5987,
13,
4706,
9049,
5085,
29896,
353,
426,
525,
1853,
2396,
525,
20433,
29915,
500,
13,
4706,
9049,
5085,
29906,
353,
426,
525,
1228,
29918,
1191,
2396,
5852,
500,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
1068,
19290,
29896,
29897,
13,
4706,
3806,
29918,
19290,
353,
9657,
29898,
19290,
29896,
29892,
4805,
29918,
5552,
29879,
11759,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
7496,
653,
29918,
20907,
29889,
1989,
9303,
29892,
3806,
29918,
19290,
29897,
13,
4706,
260,
814,
29875,
653,
29918,
20907,
353,
16723,
29918,
20907,
29898,
1068,
19290,
29906,
29897,
13,
4706,
3806,
29918,
19290,
353,
9657,
29898,
19290,
29896,
29892,
3579,
8977,
29898,
19290,
29906,
29892,
4805,
29918,
5552,
29879,
29922,
2636,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
357,
2034,
653,
29918,
20907,
29889,
1989,
9303,
29892,
3806,
29918,
19290,
29897,
13,
13,
4706,
396,
1798,
1598,
2322,
9049,
1191,
2983,
1095,
701,
408,
8393,
13,
4706,
848,
353,
8741,
3195,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29896,
29897,
13,
4706,
9049,
5085,
353,
426,
13,
9651,
525,
20571,
2396,
376,
21738,
360,
8254,
613,
13,
9651,
525,
1853,
2396,
376,
11116,
360,
8254,
613,
13,
9651,
525,
2271,
2396,
376,
4219,
360,
8254,
613,
13,
9651,
525,
4993,
2396,
376,
27839,
4741,
360,
8254,
613,
13,
9651,
525,
3257,
2396,
376,
29911,
1806,
1307,
360,
8254,
613,
13,
9651,
525,
27074,
2396,
376,
7390,
11538,
29950,
5607,
8032,
360,
8254,
613,
13,
13,
9651,
396,
7338,
336,
6433,
451,
297,
23483,
630,
304,
2615,
297,
13751,
1347,
13,
9651,
525,
18732,
2396,
376,
29903,
4162,
8426,
1964,
360,
8254,
613,
13,
9651,
525,
1272,
29918,
6341,
2396,
376,
14573,
29899,
29907,
17321,
6488,
360,
8254,
613,
13,
4706,
500,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
1068,
19290,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29892,
3579,
14168,
1338,
29897,
13,
4706,
3806,
29918,
4905,
353,
9995,
13,
4706,
529,
29874,
2822,
9880,
29908,
848,
29899,
978,
543,
978,
29908,
13,
462,
1678,
848,
29899,
20571,
543,
21738,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
27074,
543,
7390,
11538,
29950,
5607,
8032,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
4993,
543,
27839,
4741,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
3257,
543,
29911,
1806,
1307,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
1853,
543,
11116,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
2271,
543,
4219,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
1767,
543,
29896,
29908,
13,
462,
1678,
848,
29899,
29916,
5628,
519,
543,
29916,
5628,
519,
1013,
13,
9651,
8741,
3195,
29871,
29896,
13,
4706,
1533,
29874,
29958,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
3912,
29924,
1307,
15380,
29898,
4905,
29892,
3806,
29918,
4905,
29897,
13,
13,
4706,
396,
1798,
1598,
393,
6261,
788,
2187,
3025,
4954,
17833,
29918,
5552,
29879,
16159,
6511,
9049,
5085,
304,
2615,
297,
4544,
408,
13,
4706,
396,
376,
1272,
29899,
20605,
8393,
29889,
13,
4706,
16723,
29918,
20907,
353,
16876,
29898,
17833,
29918,
5552,
29879,
29922,
1839,
18732,
742,
525,
1272,
29918,
6341,
742,
525,
29888,
1296,
7464,
3579,
19290,
29897,
13,
4706,
1962,
353,
16723,
29918,
20907,
29898,
1272,
29892,
3579,
14168,
1338,
29897,
13,
4706,
3806,
29918,
4905,
353,
9995,
13,
4706,
529,
29874,
2822,
9880,
29908,
848,
29899,
978,
543,
978,
29908,
13,
462,
1678,
848,
29899,
20571,
543,
21738,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
27074,
543,
7390,
11538,
29950,
5607,
8032,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
4993,
543,
27839,
4741,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
3257,
543,
29911,
1806,
1307,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
1853,
543,
11116,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
2271,
543,
4219,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
1767,
543,
29896,
29908,
13,
462,
1678,
848,
29899,
18732,
543,
29903,
4162,
8426,
1964,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
6341,
543,
14573,
29899,
29907,
17321,
6488,
360,
8254,
29908,
13,
462,
1678,
848,
29899,
29916,
5628,
519,
543,
29916,
5628,
519,
1013,
13,
9651,
8741,
3195,
29871,
29896,
13,
4706,
1533,
29874,
29958,
13,
4706,
9995,
13,
4706,
1583,
29889,
9294,
3912,
29924,
1307,
15380,
29898,
4905,
29892,
3806,
29918,
4905,
29897,
13,
2
] |
benchcamera.py | healeycodes/Raspberry-Pi-Live-Cam | 6 | 103959 | import io
import time
import picamera
framerate = 90
quality = 100
resolutions = [(1920, 1080), (1280, 720), (800, 600), (640, 480), (320, 240)]
samples = 50
with picamera.PiCamera(framerate=framerate) as camera:
time.sleep(2) # camera warm-up time
for res in resolutions:
camera.resolution = res
timer = time.time()
sum_time = 0
for _ in range(0, samples):
image = io.BytesIO()
camera.capture(image, 'jpeg', quality=quality, use_video_port=True)
sum_time += time.time() - timer
timer = time.time()
print(res)
print(sum_time / samples)
| [
1,
1053,
12013,
13,
5215,
931,
13,
5215,
11942,
314,
1572,
13,
13,
1341,
4183,
403,
353,
29871,
29929,
29900,
13,
29567,
353,
29871,
29896,
29900,
29900,
13,
9778,
17925,
353,
17288,
29896,
29929,
29906,
29900,
29892,
29871,
29896,
29900,
29947,
29900,
511,
313,
29896,
29906,
29947,
29900,
29892,
29871,
29955,
29906,
29900,
511,
313,
29947,
29900,
29900,
29892,
29871,
29953,
29900,
29900,
511,
313,
29953,
29946,
29900,
29892,
29871,
29946,
29947,
29900,
511,
313,
29941,
29906,
29900,
29892,
29871,
29906,
29946,
29900,
4638,
13,
27736,
353,
29871,
29945,
29900,
13,
2541,
11942,
314,
1572,
29889,
12197,
20717,
29898,
1341,
4183,
403,
29922,
1341,
4183,
403,
29897,
408,
10656,
29901,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
29871,
396,
10656,
14294,
29899,
786,
931,
13,
1678,
363,
620,
297,
10104,
29879,
29901,
13,
4706,
10656,
29889,
9778,
918,
353,
620,
13,
4706,
12237,
353,
931,
29889,
2230,
580,
13,
4706,
2533,
29918,
2230,
353,
29871,
29900,
13,
4706,
363,
903,
297,
3464,
29898,
29900,
29892,
11916,
1125,
13,
9651,
1967,
353,
12013,
29889,
11207,
5971,
580,
13,
9651,
10656,
29889,
17885,
545,
29898,
3027,
29892,
525,
26568,
742,
11029,
29922,
29567,
29892,
671,
29918,
9641,
29918,
637,
29922,
5574,
29897,
13,
9651,
2533,
29918,
2230,
4619,
931,
29889,
2230,
580,
448,
12237,
13,
9651,
12237,
353,
931,
29889,
2230,
580,
13,
4706,
1596,
29898,
690,
29897,
13,
4706,
1596,
29898,
2083,
29918,
2230,
847,
11916,
29897,
13,
2
] |
tests/test_pyglobal.py | justengel/pyglobal | 0 | 57641 |
def test_simple():
import pyglobal
import settings
assert pyglobal.get('abc') == 123
assert pyglobal.get('qwerty') == ''
assert pyglobal.get('Hello') == 'World!'
assert pyglobal.get('SECRET_KEY') == '!!!CHANGE!!!'
def test_hack():
import pyglobal
pyglobal.set('SECRET_KEY', '*******')
# Check if library can access the page global variable
def get_glob(*args, **kwargs):
global GLOBAL_SETTING
try:
len(GLOBAL_SETTING)
raise AssertionError('Should not be able to access this object!')
except (AttributeError, NameError):
pass
pyglobal.get = get_glob
pyglobal.get('SECRET_KEY', None)
# User can still manually grab the variable even though it is not defined in __all__.
pyglobal.GLOBAL_SETTING
try:
len(pyglobal.GLOBAL_SETTING)
raise AssertionError('Global Settings should not have a length')
except (TypeError, AttributeError):
pass
try:
for k in pyglobal.GLOBAL_SETTING:
pass
raise AssertionError('Global Settings should not be iterable')
except (TypeError, AttributeError):
pass
def run_memory():
# Check your memory usage. It should not go up continuously.
import pyglobal
while True:
pyglobal.default('default', 'oi')
pyglobal.set('SECRET_KEY', "Hello World!")
pyglobal.set('Other', {'a': 1, "b": 2})
pyglobal.set('SECRET_KEY', "Hello World!", scope='MyScope')
pyglobal.get('SECRET_KEY')
pyglobal.get('SECRET_KEY', scope='MyScope')
if __name__ == '__main__':
import sys
test_simple()
test_hack()
# sys.argv.append('--run_memory')
if '--run_memory' in sys.argv:
run_memory()
print('All pyglobal tests finished successfully!')
| [
1,
29871,
13,
1753,
1243,
29918,
12857,
7295,
13,
1678,
1053,
19484,
3157,
13,
1678,
1053,
6055,
13,
13,
1678,
4974,
19484,
3157,
29889,
657,
877,
10736,
1495,
1275,
29871,
29896,
29906,
29941,
13,
1678,
4974,
19484,
3157,
29889,
657,
877,
29939,
556,
1017,
1495,
1275,
6629,
13,
1678,
4974,
19484,
3157,
29889,
657,
877,
10994,
1495,
1275,
525,
14058,
20714,
13,
13,
1678,
4974,
19484,
3157,
29889,
657,
877,
1660,
22245,
29911,
29918,
10818,
1495,
1275,
525,
21004,
3210,
24336,
6824,
20714,
13,
13,
13,
1753,
1243,
29918,
29882,
547,
7295,
13,
1678,
1053,
19484,
3157,
13,
13,
1678,
19484,
3157,
29889,
842,
877,
1660,
22245,
29911,
29918,
10818,
742,
525,
2328,
17435,
1495,
13,
13,
1678,
396,
5399,
565,
3489,
508,
2130,
278,
1813,
5534,
2286,
13,
1678,
822,
679,
29918,
23705,
10456,
5085,
29892,
3579,
19290,
1125,
13,
4706,
5534,
402,
28902,
1964,
29918,
10490,
29911,
4214,
13,
4706,
1018,
29901,
13,
9651,
7431,
29898,
29954,
28902,
1964,
29918,
10490,
29911,
4214,
29897,
13,
9651,
12020,
16499,
291,
2392,
877,
26857,
451,
367,
2221,
304,
2130,
445,
1203,
29991,
1495,
13,
4706,
5174,
313,
6708,
2392,
29892,
4408,
2392,
1125,
13,
9651,
1209,
13,
13,
1678,
19484,
3157,
29889,
657,
353,
679,
29918,
23705,
13,
1678,
19484,
3157,
29889,
657,
877,
1660,
22245,
29911,
29918,
10818,
742,
6213,
29897,
13,
13,
1678,
396,
4911,
508,
1603,
7522,
17229,
278,
2286,
1584,
2466,
372,
338,
451,
3342,
297,
4770,
497,
26914,
13,
1678,
19484,
3157,
29889,
29954,
28902,
1964,
29918,
10490,
29911,
4214,
13,
1678,
1018,
29901,
13,
4706,
7431,
29898,
2272,
10945,
29889,
29954,
28902,
1964,
29918,
10490,
29911,
4214,
29897,
13,
4706,
12020,
16499,
291,
2392,
877,
12756,
19215,
881,
451,
505,
263,
3309,
1495,
13,
1678,
5174,
313,
1542,
2392,
29892,
23833,
2392,
1125,
13,
4706,
1209,
13,
1678,
1018,
29901,
13,
4706,
363,
413,
297,
19484,
3157,
29889,
29954,
28902,
1964,
29918,
10490,
29911,
4214,
29901,
13,
9651,
1209,
13,
4706,
12020,
16499,
291,
2392,
877,
12756,
19215,
881,
451,
367,
4256,
519,
1495,
13,
1678,
5174,
313,
1542,
2392,
29892,
23833,
2392,
1125,
13,
4706,
1209,
13,
13,
13,
1753,
1065,
29918,
14834,
7295,
13,
1678,
396,
5399,
596,
3370,
8744,
29889,
739,
881,
451,
748,
701,
3133,
5794,
29889,
13,
1678,
1053,
19484,
3157,
13,
13,
1678,
1550,
5852,
29901,
13,
4706,
19484,
3157,
29889,
4381,
877,
4381,
742,
525,
7768,
1495,
13,
4706,
19484,
3157,
29889,
842,
877,
1660,
22245,
29911,
29918,
10818,
742,
376,
10994,
2787,
29991,
1159,
13,
4706,
19484,
3157,
29889,
842,
877,
16107,
742,
11117,
29874,
2396,
29871,
29896,
29892,
376,
29890,
1115,
29871,
29906,
1800,
13,
4706,
19484,
3157,
29889,
842,
877,
1660,
22245,
29911,
29918,
10818,
742,
376,
10994,
2787,
29991,
613,
6874,
2433,
3421,
15289,
1495,
13,
4706,
19484,
3157,
29889,
657,
877,
1660,
22245,
29911,
29918,
10818,
1495,
13,
4706,
19484,
3157,
29889,
657,
877,
1660,
22245,
29911,
29918,
10818,
742,
6874,
2433,
3421,
15289,
1495,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1053,
10876,
13,
13,
1678,
1243,
29918,
12857,
580,
13,
1678,
1243,
29918,
29882,
547,
580,
13,
13,
1678,
396,
10876,
29889,
19218,
29889,
4397,
877,
489,
3389,
29918,
14834,
1495,
13,
1678,
565,
525,
489,
3389,
29918,
14834,
29915,
297,
10876,
29889,
19218,
29901,
13,
4706,
1065,
29918,
14834,
580,
13,
13,
1678,
1596,
877,
3596,
19484,
3157,
6987,
7743,
8472,
29991,
1495,
13,
2
] |
Sem-5/PIP/Minor Assignment 8/A8Q3.py | rituraj-iter/ASSIGNMENTS | 10 | 87135 | <reponame>rituraj-iter/ASSIGNMENTS<filename>Sem-5/PIP/Minor Assignment 8/A8Q3.py<gh_stars>1-10
def power(n, m):
if m == 0:
return 1
elif m == 1:
return n
return (n*power(n, m-1))
print(power(2,3)) | [
1,
529,
276,
1112,
420,
29958,
768,
332,
1175,
29899,
1524,
29914,
22933,
17298,
13780,
29903,
29966,
9507,
29958,
28516,
29899,
29945,
29914,
2227,
29925,
29914,
8140,
272,
4007,
10194,
29871,
29947,
29914,
29909,
29947,
29984,
29941,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1753,
3081,
29898,
29876,
29892,
286,
1125,
30004,
13,
1678,
565,
286,
1275,
29871,
29900,
29901,
30004,
13,
4706,
736,
29871,
29896,
30004,
13,
1678,
25342,
286,
1275,
29871,
29896,
29901,
30004,
13,
4706,
736,
302,
30004,
13,
1678,
736,
313,
29876,
29930,
13519,
29898,
29876,
29892,
286,
29899,
29896,
876,
30004,
13,
2158,
29898,
13519,
29898,
29906,
29892,
29941,
876,
2
] |
kafka_streamer/topic/datatype/base.py | sam-mosleh/kafka-streamer | 1 | 37609 | <reponame>sam-mosleh/kafka-streamer<filename>kafka_streamer/topic/datatype/base.py
from abc import ABC, abstractmethod
from typing import Type, Union
from kafka_streamer.models import SchematicRecord, Serializable
class KafkaDataType(ABC):
_MAGIC_BYTE = 0
@abstractmethod
def deserialize(self, data: bytes):
pass
@abstractmethod
def serialize(
self, data: Union[SchematicRecord, Type[Serializable], bytes, None]
) -> bytes:
pass
| [
1,
529,
276,
1112,
420,
29958,
13445,
29899,
7681,
280,
29882,
29914,
28510,
29899,
5461,
261,
29966,
9507,
29958,
28510,
29918,
5461,
261,
29914,
13010,
29914,
4130,
23179,
29914,
3188,
29889,
2272,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
3166,
19229,
1053,
5167,
29892,
7761,
13,
13,
3166,
413,
20817,
29918,
5461,
261,
29889,
9794,
1053,
1102,
19217,
9182,
29892,
18896,
13902,
13,
13,
13,
1990,
476,
20817,
1469,
1542,
29898,
19658,
1125,
13,
1678,
903,
1529,
29954,
2965,
29918,
22716,
4330,
353,
29871,
29900,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
16964,
6646,
29898,
1311,
29892,
848,
29901,
6262,
1125,
13,
4706,
1209,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
28755,
29898,
13,
4706,
1583,
29892,
848,
29901,
7761,
29961,
4504,
19217,
9182,
29892,
5167,
29961,
9125,
13902,
1402,
6262,
29892,
6213,
29962,
13,
1678,
1723,
1599,
6262,
29901,
13,
4706,
1209,
13,
2
] |
tests/test_rectangle.py | trejsu/shaper | 0 | 46671 | <filename>tests/test_rectangle.py<gh_stars>0
import numpy as np
import pytest
from shapes.shape import Quadrangle
def test_from_normalized_params():
normalized = [1, 0.2866666666666667, 0.85, 0.32666666666666666, 0.65, 0.013333333333333334, 0.8,
-0.02, 1, 2, 3, 0.5]
w = 100
h = 150
expected_points = np.array([[100, 43], [85, 49], [65, 2], [80, -3]])
expected_color = np.array([1, 2, 3])
r = Quadrangle.from_normalized_params(w, h, *normalized)
assert np.array_equal(r.points, expected_points)
assert r.alpha == 0.5
assert np.array_equal(r.color, expected_color)
def test_normalized_params():
r = Quadrangle.from_params(*[100, 43, 85, 49, 65, 2, 80, -3, 1, 2, 3, 0.5])
w = 100
h = 150
expected = np.array(
[1, 0.2866666666666667, 0.85, 0.32666666666666666, 0.65, 0.013333333333333334, 0.8,
-0.02, 1, 2, 3, 0.5])
normalized = r.normalized_params(w, h)
assert np.array_equal(normalized, expected)
@pytest.mark.parametrize(
"edge_start, edge_end, start_new_x_sign, start_new_y_sign, end_new_x_sign, end_new_y_sign", [
(0, 1, 1, 0, 1, 0),
(1, 2, 0, 1, 1, 0),
(2, 3, -1, 0, -1, 0),
(3, 0, -1, 0, 0, -1)
])
def test_without_edge(edge_start, edge_end, start_new_x_sign, start_new_y_sign, end_new_x_sign,
end_new_y_sign):
points = np.array([[-51, 159], [-16, 82], [37, 60], [125, 114]])
q = Quadrangle.without_edge(points=points.copy(), edge=[edge_start, edge_end], alpha=1)
assert np.sign(q.points[edge_start][0] - points[edge_start][0]) == start_new_x_sign
assert np.sign(q.points[edge_start][1] - points[edge_start][1]) == start_new_y_sign
assert np.sign(q.points[edge_end][0] - points[edge_end][0]) == end_new_x_sign
assert np.sign(q.points[edge_end][1] - points[edge_end][1]) == end_new_y_sign
| [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
1621,
2521,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
1688,
13,
13,
3166,
25834,
29889,
12181,
1053,
751,
328,
5854,
13,
13,
13,
1753,
1243,
29918,
3166,
29918,
8945,
1891,
29918,
7529,
7295,
13,
1678,
4226,
1891,
353,
518,
29896,
29892,
29871,
29900,
29889,
29906,
29947,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
29892,
29871,
29900,
29889,
29947,
29945,
29892,
29871,
29900,
29889,
29941,
29906,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29900,
29889,
29953,
29945,
29892,
29871,
29900,
29889,
29900,
29896,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29947,
29892,
13,
462,
29871,
448,
29900,
29889,
29900,
29906,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29900,
29889,
29945,
29962,
13,
1678,
281,
353,
29871,
29896,
29900,
29900,
13,
1678,
298,
353,
29871,
29896,
29945,
29900,
13,
1678,
3806,
29918,
9748,
353,
7442,
29889,
2378,
4197,
29961,
29896,
29900,
29900,
29892,
29871,
29946,
29941,
1402,
518,
29947,
29945,
29892,
29871,
29946,
29929,
1402,
518,
29953,
29945,
29892,
29871,
29906,
1402,
518,
29947,
29900,
29892,
448,
29941,
24960,
13,
1678,
3806,
29918,
2780,
353,
7442,
29889,
2378,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
1678,
364,
353,
751,
328,
5854,
29889,
3166,
29918,
8945,
1891,
29918,
7529,
29898,
29893,
29892,
298,
29892,
334,
8945,
1891,
29897,
13,
1678,
4974,
7442,
29889,
2378,
29918,
11745,
29898,
29878,
29889,
9748,
29892,
3806,
29918,
9748,
29897,
13,
1678,
4974,
364,
29889,
2312,
1275,
29871,
29900,
29889,
29945,
13,
1678,
4974,
7442,
29889,
2378,
29918,
11745,
29898,
29878,
29889,
2780,
29892,
3806,
29918,
2780,
29897,
13,
13,
13,
1753,
1243,
29918,
8945,
1891,
29918,
7529,
7295,
13,
1678,
364,
353,
751,
328,
5854,
29889,
3166,
29918,
7529,
10456,
29961,
29896,
29900,
29900,
29892,
29871,
29946,
29941,
29892,
29871,
29947,
29945,
29892,
29871,
29946,
29929,
29892,
29871,
29953,
29945,
29892,
29871,
29906,
29892,
29871,
29947,
29900,
29892,
448,
29941,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29900,
29889,
29945,
2314,
13,
1678,
281,
353,
29871,
29896,
29900,
29900,
13,
1678,
298,
353,
29871,
29896,
29945,
29900,
13,
1678,
3806,
353,
7442,
29889,
2378,
29898,
13,
4706,
518,
29896,
29892,
29871,
29900,
29889,
29906,
29947,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
29892,
29871,
29900,
29889,
29947,
29945,
29892,
29871,
29900,
29889,
29941,
29906,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29900,
29889,
29953,
29945,
29892,
29871,
29900,
29889,
29900,
29896,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29947,
29892,
13,
308,
448,
29900,
29889,
29900,
29906,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29900,
29889,
29945,
2314,
13,
1678,
4226,
1891,
353,
364,
29889,
8945,
1891,
29918,
7529,
29898,
29893,
29892,
298,
29897,
13,
1678,
4974,
7442,
29889,
2378,
29918,
11745,
29898,
8945,
1891,
29892,
3806,
29897,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
29898,
13,
1678,
376,
12864,
29918,
2962,
29892,
7636,
29918,
355,
29892,
1369,
29918,
1482,
29918,
29916,
29918,
4530,
29892,
1369,
29918,
1482,
29918,
29891,
29918,
4530,
29892,
1095,
29918,
1482,
29918,
29916,
29918,
4530,
29892,
1095,
29918,
1482,
29918,
29891,
29918,
4530,
613,
518,
13,
4706,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
511,
13,
4706,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
511,
13,
4706,
313,
29906,
29892,
29871,
29941,
29892,
448,
29896,
29892,
29871,
29900,
29892,
448,
29896,
29892,
29871,
29900,
511,
13,
4706,
313,
29941,
29892,
29871,
29900,
29892,
448,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
448,
29896,
29897,
13,
268,
2314,
13,
1753,
1243,
29918,
14037,
29918,
12864,
29898,
12864,
29918,
2962,
29892,
7636,
29918,
355,
29892,
1369,
29918,
1482,
29918,
29916,
29918,
4530,
29892,
1369,
29918,
1482,
29918,
29891,
29918,
4530,
29892,
1095,
29918,
1482,
29918,
29916,
29918,
4530,
29892,
13,
1678,
1095,
29918,
1482,
29918,
29891,
29918,
4530,
1125,
13,
1678,
3291,
353,
7442,
29889,
2378,
4197,
14352,
29945,
29896,
29892,
29871,
29896,
29945,
29929,
1402,
21069,
29896,
29953,
29892,
29871,
29947,
29906,
1402,
518,
29941,
29955,
29892,
29871,
29953,
29900,
1402,
518,
29896,
29906,
29945,
29892,
29871,
29896,
29896,
29946,
24960,
13,
1678,
3855,
353,
751,
328,
5854,
29889,
14037,
29918,
12864,
29898,
9748,
29922,
9748,
29889,
8552,
3285,
7636,
11759,
12864,
29918,
2962,
29892,
7636,
29918,
355,
1402,
15595,
29922,
29896,
29897,
13,
1678,
4974,
7442,
29889,
4530,
29898,
29939,
29889,
9748,
29961,
12864,
29918,
2962,
3816,
29900,
29962,
448,
3291,
29961,
12864,
29918,
2962,
3816,
29900,
2314,
1275,
1369,
29918,
1482,
29918,
29916,
29918,
4530,
13,
1678,
4974,
7442,
29889,
4530,
29898,
29939,
29889,
9748,
29961,
12864,
29918,
2962,
3816,
29896,
29962,
448,
3291,
29961,
12864,
29918,
2962,
3816,
29896,
2314,
1275,
1369,
29918,
1482,
29918,
29891,
29918,
4530,
13,
1678,
4974,
7442,
29889,
4530,
29898,
29939,
29889,
9748,
29961,
12864,
29918,
355,
3816,
29900,
29962,
448,
3291,
29961,
12864,
29918,
355,
3816,
29900,
2314,
1275,
1095,
29918,
1482,
29918,
29916,
29918,
4530,
13,
1678,
4974,
7442,
29889,
4530,
29898,
29939,
29889,
9748,
29961,
12864,
29918,
355,
3816,
29896,
29962,
448,
3291,
29961,
12864,
29918,
355,
3816,
29896,
2314,
1275,
1095,
29918,
1482,
29918,
29891,
29918,
4530,
13,
2
] |
PythonVSCode/DP_GFG/LongestCommonSubstring.py | porcelainruler/InterviewPrep | 0 | 69132 | '''
The longest common suffix has following optimal substructure property.
If last characters match, then we reduce both lengths by 1
LCSuff(X, Y, m, n) = LCSuff(X, Y, m-1, n-1) + 1 if X[m-1] = Y[n-1]
If last characters do not match, then result is 0, i.e.,
LCSuff(X, Y, m, n) = 0 if (X[m-1] != Y[n-1])
Now we consider suffixes of different substrings ending at different indexes.
The maximum length Longest Common Suffix is the longest common substring.
LCSubStr(X, Y, m, n) = Max(LCSuff(X, Y, i, j)) where 1 <= i <= m and 1 <= j <= n
'''
from sys import stdin
import math
def dp(a: str, b: str, m: int, n: int):
dp = [[0]*(n+1) for i in range(m+1)]
maxLen = 0
for i in range(m+1):
for j in range(n+1):
if i==0 or j==0:
dp[i][j] = 0
elif a[i-1] == b[j-1]:
dp[i][j] = dp[i-1][j-1] + 1
maxLen = max(maxLen, dp[i][j])
else:
dp[i][j] = 0
return maxLen
def main():
t = int(input())
for i in range(t):
m, n = map(int, stdin.readline().split())
a = input()
b = input()
ans = dp(a, b, m, n)
print(ans)
if __name__ == '__main__':
main() | [
1,
14550,
13,
13,
1576,
27217,
3619,
25557,
756,
1494,
14413,
1014,
23905,
2875,
29889,
13,
13,
3644,
1833,
4890,
1993,
29892,
769,
591,
10032,
1716,
27497,
491,
29871,
29896,
13,
29931,
9295,
3096,
29898,
29990,
29892,
612,
29892,
286,
29892,
302,
29897,
353,
365,
9295,
3096,
29898,
29990,
29892,
612,
29892,
286,
29899,
29896,
29892,
302,
29899,
29896,
29897,
718,
29871,
29896,
565,
1060,
29961,
29885,
29899,
29896,
29962,
353,
612,
29961,
29876,
29899,
29896,
29962,
13,
3644,
1833,
4890,
437,
451,
1993,
29892,
769,
1121,
338,
29871,
29900,
29892,
474,
29889,
29872,
1696,
13,
29931,
9295,
3096,
29898,
29990,
29892,
612,
29892,
286,
29892,
302,
29897,
353,
29871,
29900,
565,
313,
29990,
29961,
29885,
29899,
29896,
29962,
2804,
612,
29961,
29876,
29899,
29896,
2314,
13,
13,
10454,
591,
2050,
25557,
267,
310,
1422,
1014,
19651,
17140,
472,
1422,
18111,
29889,
13,
1576,
7472,
3309,
6242,
342,
13103,
2166,
600,
861,
338,
278,
27217,
3619,
28228,
29889,
13,
12182,
4035,
5015,
29898,
29990,
29892,
612,
29892,
286,
29892,
302,
29897,
353,
5918,
29898,
29931,
9295,
3096,
29898,
29990,
29892,
612,
29892,
474,
29892,
432,
876,
988,
29871,
29896,
5277,
474,
5277,
286,
322,
29871,
29896,
5277,
432,
5277,
302,
13,
13,
12008,
13,
13,
3166,
10876,
1053,
3659,
262,
13,
5215,
5844,
13,
13,
1753,
270,
29886,
29898,
29874,
29901,
851,
29892,
289,
29901,
851,
29892,
286,
29901,
938,
29892,
302,
29901,
938,
1125,
13,
1678,
270,
29886,
353,
5519,
29900,
14178,
29898,
29876,
29974,
29896,
29897,
363,
474,
297,
3464,
29898,
29885,
29974,
29896,
4638,
13,
13,
1678,
4236,
21515,
353,
29871,
29900,
13,
13,
1678,
363,
474,
297,
3464,
29898,
29885,
29974,
29896,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29876,
29974,
29896,
1125,
13,
9651,
565,
474,
1360,
29900,
470,
432,
1360,
29900,
29901,
13,
18884,
270,
29886,
29961,
29875,
3816,
29926,
29962,
353,
29871,
29900,
13,
9651,
25342,
263,
29961,
29875,
29899,
29896,
29962,
1275,
289,
29961,
29926,
29899,
29896,
5387,
13,
18884,
270,
29886,
29961,
29875,
3816,
29926,
29962,
353,
270,
29886,
29961,
29875,
29899,
29896,
3816,
29926,
29899,
29896,
29962,
718,
29871,
29896,
13,
18884,
4236,
21515,
353,
4236,
29898,
3317,
21515,
29892,
270,
29886,
29961,
29875,
3816,
29926,
2314,
13,
9651,
1683,
29901,
13,
18884,
270,
29886,
29961,
29875,
3816,
29926,
29962,
353,
29871,
29900,
13,
13,
1678,
736,
4236,
21515,
13,
13,
1753,
1667,
7295,
13,
1678,
260,
353,
938,
29898,
2080,
3101,
13,
13,
1678,
363,
474,
297,
3464,
29898,
29873,
1125,
13,
4706,
286,
29892,
302,
353,
2910,
29898,
524,
29892,
3659,
262,
29889,
949,
1220,
2141,
5451,
3101,
13,
4706,
263,
353,
1881,
580,
13,
4706,
289,
353,
1881,
580,
13,
308,
13,
4706,
6063,
353,
270,
29886,
29898,
29874,
29892,
289,
29892,
286,
29892,
302,
29897,
13,
4706,
1596,
29898,
550,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
2
] |
src/tools/training.py | gpatsiaouras/multimodal-har-thesis | 4 | 164917 | <filename>src/tools/training.py
import os
import time
import torch
import torch.nn.functional as functional
from sklearn.metrics import confusion_matrix
from sklearn.neighbors import KNeighborsClassifier
from visualizers import plot_confusion_matrix, print_epoch_info
from .model_tools import save_model
def train(model, criterion, optimizer, train_loader, validation_loader, num_epochs, device, experiment, writer=None):
"""
Performs training process based on the configuration provided as input. Automatically saves accuracy, loss and
confusion matrix plots.
:param model: Model to train
:param criterion: Loss function
:param optimizer: Optimizer
:param train_loader: Training data
:param validation_loader: Validation data
:param num_epochs: Number of epochs to train
:param experiment: Name of the experiment running
:param device: Device
:param writer: SummaryWriter for tensorboard
"""
# Statistics
start_time = time.time()
time_per_epoch = []
train_accuracies = []
validation_accuracies = []
train_losses = []
validation_losses = []
saved_model_path = None
# Train Network
for epoch in range(num_epochs):
train_running_loss = .0
num_correct = 0
num_samples = 0
epoch_start_time = time.time()
# Iterate mini batches
for batch_idx, (data, labels) in enumerate(train_loader):
# Turn inference mode off (in case)
model.train()
# Get data to cuda if possible
data = data.float().to(device)
labels = labels.long().to(device)
# forward
scores = model(data)
_, input_indices = torch.max(labels, dim=1)
loss = criterion(scores, input_indices)
# train accuracy
num_correct += get_num_correct_predictions(scores, labels)
num_samples += len(labels)
# backward
optimizer.zero_grad()
loss.backward()
# gradient descent or adam step
optimizer.step()
train_running_loss += loss.item()
##########
# Losses #
##########
# Training Loss
train_loss = train_running_loss / len(train_loader)
train_losses.append(train_loss)
# Validation Loss
validation_loss, _, _ = get_loss(validation_loader, model, device, criterion)
##############
# Accuracies #
##############
# Train accuracy
train_acc = float(num_correct) / float(num_samples)
train_accuracies.append(train_acc)
# Validation accuracy
validation_acc = get_accuracy(validation_loader, model, device)
# Save the model if the validation accuracy is the highest
if len(validation_accuracies) > 0 and validation_acc > max(validation_accuracies):
if saved_model_path is not None:
os.remove(saved_model_path)
saved_model_path = save_model(model, '%s_best_val.pt' % experiment)
validation_accuracies.append(validation_acc)
validation_losses.append(validation_loss)
# Tensorboard
if writer:
writer.add_scalar('Loss/train', train_loss, global_step=epoch)
writer.add_scalar('Loss/validation', validation_loss, global_step=epoch)
writer.add_scalar('Accuracy/train', train_acc, global_step=epoch)
writer.add_scalar('Accuracy/validation', validation_acc, global_step=epoch)
# Debug information
print_epoch_info(start_time, epoch_start_time, time_per_epoch, epoch, num_epochs, train_loss, validation_loss,
train_acc, validation_acc)
return train_accuracies, validation_accuracies, train_losses, validation_losses
def add_histograms(writer, model, step, subtitle=''):
"""
Adds histogram data according to the model to tensorboard.
:param writer: SummaryWriter
:param model: Model
:param step: global step
:param subtitle: When going deeper provide a name to separate the fc1, fc2, fc3
:return:
"""
if hasattr(model, 'fc1'):
writer.add_histogram(subtitle + 'fc1', model.fc1.weight, global_step=step)
if hasattr(model, 'fc2'):
writer.add_histogram(subtitle + 'fc2', model.fc2.weight, global_step=step)
if hasattr(model, 'fc3'):
writer.add_histogram(subtitle + 'fc3', model.fc3.weight, global_step=step)
if hasattr(model, 'last_fc'):
writer.add_histogram(subtitle + 'last_fc', model.last_fc.weight, global_step=step)
if hasattr(model, 'mlp'):
add_histograms(writer, model.mlp, step, subtitle='mlp')
if hasattr(model, 'n1'):
add_histograms(writer, model.mlp, step, subtitle='n1')
if hasattr(model, 'n2'):
add_histograms(writer, model.mlp, step, subtitle='n2')
if hasattr(model, 'n3'):
add_histograms(writer, model.mlp, step, subtitle='n3')
def train_triplet_loss(model, criterion, optimizer, class_names, train_loader, val_loader, num_epochs, device,
experiment, n_neighbors, writer, scheduler=None, verbose=False, skip_accuracy=False):
start_time = time.time()
time_per_epoch = []
saved_model_path = None
train_losses = []
train_accuracies = []
val_losses = []
val_accuracies = []
train_accuracy = -1
val_accuracy = -1
scores_concat = None
labels_concat = None
for epoch in range(num_epochs):
scores_concat = torch.tensor([], device=device)
labels_concat = torch.tensor([], device=device)
train_running_loss = .0
epoch_start_time = time.time()
for batch_idx, (data, targets) in enumerate(train_loader):
# Turn inference mode off (in case)
model.train()
# Get data to cuda if possible
if isinstance(data, list):
data = tuple(d.float().to(device) for d in data)
else:
data = data.float().to(device)
targets = targets.to(device)
# Train scores
scores = model(data)
labels = targets.argmax(dim=1)
loss = criterion(scores, labels)
train_running_loss += loss.item()
# backward
optimizer.zero_grad()
loss.backward()
optimizer.step()
train_losses.append(loss.item())
scores_concat = torch.cat((scores_concat, scores), dim=0)
labels_concat = torch.cat((labels_concat, labels), dim=0)
add_histograms(writer, model, epoch)
writer.add_scalar('Embeddings/distances', torch.sum(torch.cdist(scores_concat, scores_concat)),
global_step=epoch)
# Calculations
train_loss = train_running_loss / len(train_loader)
writer.add_scalar('Loss/train', train_loss, global_step=epoch)
val_loss, val_scores, _ = get_loss(val_loader, model, device, criterion)
if len(val_losses) > 0:
# After the first save only for better result in validation
if val_loss < min(val_losses):
os.remove(saved_model_path)
saved_model_path = save_model(model, '%s_best_val.pt' % experiment)
else:
# Save the model the first time without checking that the validation was reduced.
print('Saved model for the first time')
saved_model_path = save_model(model, '%s_initial.pt' % experiment)
val_losses.append(val_loss)
if not skip_accuracy:
writer.add_scalar('Embeddings/distances_val', torch.sum(torch.cdist(val_scores, val_scores)),
global_step=epoch)
writer.add_scalar('Loss/validation', val_loss, global_step=epoch)
if scheduler:
scheduler.step(val_loss)
# Confusion in general
val_cm, val_accuracy, _, _ = get_predictions_with_knn(n_neighbors, train_loader, val_loader, model, device)
train_cm, train_accuracy, _, _ = get_predictions_with_knn(n_neighbors, train_loader, train_loader, model,
device)
val_accuracies.append(val_accuracy)
train_accuracies.append(train_accuracy)
writer.add_scalar('Accuracy/validation', val_accuracy, global_step=epoch)
writer.add_scalar('Accuracy/train', train_accuracy, global_step=epoch)
train_image = plot_confusion_matrix(
cm=train_cm,
title='Confusion Matrix - Percentage % - Train Loader',
normalize=False,
save=False,
show_figure=False,
classes=class_names
)
val_image = plot_confusion_matrix(
cm=val_cm,
title='Confusion Matrix - Percentage % - Val Loader',
normalize=False,
save=False,
show_figure=False,
classes=class_names
)
writer.add_images('ConfusionMatrix/Train', train_image, dataformats='CHW', global_step=epoch)
writer.add_images('ConfusionMatrix/Validation', val_image, dataformats='CHW', global_step=epoch)
if verbose:
# Timing
total_epoch_time = time.time() - epoch_start_time
time_per_epoch.append(total_epoch_time)
# Debug information
print_epoch_info(start_time, epoch_start_time, time_per_epoch, epoch, num_epochs, train_loss, val_loss,
train_accuracy, val_accuracy)
writer.add_embedding(scores_concat, metadata=[class_names[idx] for idx in labels_concat.int().tolist()],
tag="train (%f%%)" % train_accuracy)
return train_losses, val_losses, val_accuracies, train_accuracies
def train_simple(model, criterion, optimizer, epochs, data, labels):
model.train()
for epoch in range(epochs):
scores = model(data)
loss = criterion(scores, labels.argmax(1))
accu = get_num_correct_predictions(scores, labels) / labels.shape[0]
# backward
optimizer.zero_grad()
loss.backward()
optimizer.step()
if epoch % 10 == 0:
print('Epoch %d/%d: loss %.2f accu %.2f' % (epoch, epochs, loss.item(), accu))
@torch.no_grad()
def get_loss(data_loader, model, device, criterion):
"""
Get inference loss of data_loader
:param data_loader: DataLoader
:param model: Model
:param device: Device (cuda or cpu)
:param criterion: Loss function
:return: loss
"""
model.eval()
scores, labels = get_predictions(data_loader, model, device, apply_softmax=False)
loss = criterion(scores, labels.argmax(dim=1))
return loss.item(), scores, labels
def get_accuracy(data_loader, model, device):
"""
Calculates the accuracy of the model given (inference mode) applied in the dataset of the data_loader
:param data_loader: Data loader
:param model: Model to be used for predictions
:param device: Device to be used
:return: accuracy percentage %
"""
all_predictions, all_labels = get_predictions(data_loader, model, device, apply_softmax=True)
correct_pred_max = get_num_correct_predictions(all_predictions, all_labels)
return correct_pred_max / all_predictions.shape[0]
@torch.no_grad()
def get_accuracy_simple(model, data, labels):
model.eval()
test_scores = model(data)
test_scores = functional.softmax(test_scores, 1)
return get_num_correct_predictions(test_scores, labels) / labels.shape[0]
def get_confusion_matrix(data_loader, model, device):
"""
Retrieves predictions for the whole dataset, calculates and returns the confusion matrix
:param data_loader: Data loader
:param model: Model to be used for predictions
:param device: Device to be used
:return: confusion matrix
"""
all_predictions, all_labels = get_predictions(data_loader, model, device, apply_softmax=True)
num_classes = all_labels.shape[1]
stacked = torch.stack((all_labels.argmax(dim=1), all_predictions.argmax(dim=1)), dim=1)
cmt = torch.zeros(num_classes, num_classes, dtype=torch.int64)
for p in stacked:
true_label, predicted_label = p.tolist()
cmt[true_label, predicted_label] = cmt[true_label, predicted_label] + 1
return cmt
def get_confusion_matrix_multiple_models(data_loaders, models, device):
"""
Gets predictions from multiple models, fuses scores based on product rule and calculates and returns
confusion matrix
:param data_loaders: List of data loaders
:param models: List of models
:param device: Device to be used
:return: confusion matrix
"""
# TODO change hardcoded numbers
c_scores = torch.zeros((len(models), 416, 27))
c_labels = torch.zeros((len(models), 416, 27))
for idx in range(len(models)):
all_predictions, all_labels = get_predictions(data_loaders[idx], models[idx], device, apply_softmax=True)
c_scores[idx, :, :] = all_predictions
c_labels[idx, :, :] = all_labels
fused_scores = c_scores.prod(dim=0)
num_classes = c_labels[0].shape[1]
stacked = torch.stack((c_labels[0].argmax(dim=1), fused_scores.argmax(dim=1)), dim=1)
cmt = torch.zeros(num_classes, num_classes, dtype=torch.int64)
for p in stacked:
true_label, predicted_label = p.tolist()
cmt[true_label, predicted_label] = cmt[true_label, predicted_label] + 1
return cmt
@torch.no_grad()
def get_predictions(data_loader, model, device, apply_softmax=False):
"""
Receives a dataloader a model and a device, runs all the batches to get the predictions
and returns a tensor with all the predictions and corresponding labels for every sample of the dataset
:param data_loader: Data loader
:param model: Model
:param device: Device to be used
:param apply_softmax: Whether to apply softmax in the end
:return: predictions, labels
"""
# Set the model to inference mode
model.eval()
# Initiate tensors to hold predictions and labels
all_predictions = torch.tensor([], device=device)
all_labels = torch.tensor([], device=device)
for (data, labels) in data_loader:
if isinstance(data, list):
data = tuple(d.float().to(device) for d in data)
else:
data = data.float().to(device)
labels = labels.long().to(device=device)
out = model(data)
if apply_softmax:
scores = functional.softmax(out, 1)
else:
scores = out
all_predictions = torch.cat((all_predictions, scores), dim=0)
all_labels = torch.cat((all_labels, labels), dim=0)
return all_predictions, all_labels
def get_num_correct_predictions(scores, labels):
"""
Calculates the number of correct prediction given the scores (output of model for every sample) and the labels
:param scores: tensor
:param labels: tensor
:return: number of correct predictions
"""
return int((labels.argmax(1) == scores.argmax(1)).sum())
def get_predictions_with_knn(n_neighbors, train_loader, test_loader, model, device):
"""
Receives the train and test loaders and number of neighbors and trains a KNN classifier on the train data, and then
predicts on the test loader. Returns the confusion matrix, test accuracy, scores and labes
:param n_neighbors: Number of neighbors for the KNN
:param train_loader: Train loader
:param test_loader: Test Loader
:param model: Model to use
:param device: Torch device
:return: confusion matrix, test accuracy, scores, labels
"""
train_scores, train_labels = get_predictions(train_loader, model, device, apply_softmax=False)
test_scores, test_labels = get_predictions(test_loader, model, device, apply_softmax=False)
test_labels = test_labels.argmax(1)
classifier = KNeighborsClassifier(n_neighbors=n_neighbors)
if device.type == 'cuda':
train_scores = train_scores.cpu()
train_labels = train_labels.cpu()
test_scores = test_scores.cpu()
test_labels = test_labels.cpu()
classifier.fit(train_scores, train_labels.argmax(1))
test_knn_pred = classifier.predict(test_scores)
# y_pred = y_pred.argmax(1)
test_accuracy = int((test_labels == torch.Tensor(test_knn_pred)).sum()) / test_labels.shape[0]
cm = confusion_matrix(test_labels, test_knn_pred)
return cm, test_accuracy, test_scores, test_labels
| [
1,
529,
9507,
29958,
4351,
29914,
8504,
29914,
26495,
29889,
2272,
13,
5215,
2897,
13,
5215,
931,
13,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
13303,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
14679,
29918,
5344,
13,
3166,
2071,
19668,
29889,
484,
1141,
29890,
943,
1053,
476,
8139,
1141,
29890,
943,
2385,
3709,
13,
13,
3166,
7604,
19427,
1053,
6492,
29918,
5527,
3958,
29918,
5344,
29892,
1596,
29918,
1022,
2878,
29918,
3888,
13,
3166,
869,
4299,
29918,
8504,
1053,
4078,
29918,
4299,
13,
13,
13,
1753,
7945,
29898,
4299,
29892,
28770,
291,
29892,
5994,
3950,
29892,
7945,
29918,
12657,
29892,
8845,
29918,
12657,
29892,
954,
29918,
1022,
2878,
29879,
29892,
4742,
29892,
7639,
29892,
9227,
29922,
8516,
1125,
13,
1678,
9995,
13,
1678,
2431,
9514,
6694,
1889,
2729,
373,
278,
5285,
4944,
408,
1881,
29889,
15854,
19574,
27401,
13600,
29892,
6410,
322,
13,
1678,
14679,
4636,
24580,
29889,
13,
1678,
584,
3207,
1904,
29901,
8125,
304,
7945,
13,
1678,
584,
3207,
28770,
291,
29901,
365,
2209,
740,
13,
1678,
584,
3207,
5994,
3950,
29901,
20693,
326,
3950,
13,
1678,
584,
3207,
7945,
29918,
12657,
29901,
26101,
848,
13,
1678,
584,
3207,
8845,
29918,
12657,
29901,
15758,
362,
848,
13,
1678,
584,
3207,
954,
29918,
1022,
2878,
29879,
29901,
9681,
310,
21502,
12168,
304,
7945,
13,
1678,
584,
3207,
7639,
29901,
4408,
310,
278,
7639,
2734,
13,
1678,
584,
3207,
4742,
29901,
21830,
13,
1678,
584,
3207,
9227,
29901,
6991,
5219,
10507,
363,
12489,
3377,
13,
1678,
9995,
13,
1678,
396,
27098,
13,
1678,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
931,
29918,
546,
29918,
1022,
2878,
353,
5159,
13,
1678,
7945,
29918,
5753,
2002,
2478,
353,
5159,
13,
1678,
8845,
29918,
5753,
2002,
2478,
353,
5159,
13,
1678,
7945,
29918,
6758,
267,
353,
5159,
13,
1678,
8845,
29918,
6758,
267,
353,
5159,
13,
1678,
7160,
29918,
4299,
29918,
2084,
353,
6213,
13,
13,
1678,
396,
28186,
8527,
13,
1678,
363,
21502,
305,
297,
3464,
29898,
1949,
29918,
1022,
2878,
29879,
1125,
13,
4706,
7945,
29918,
21094,
29918,
6758,
353,
869,
29900,
13,
4706,
954,
29918,
15728,
353,
29871,
29900,
13,
4706,
954,
29918,
27736,
353,
29871,
29900,
13,
4706,
21502,
305,
29918,
2962,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
13,
4706,
396,
20504,
403,
20629,
9853,
267,
13,
4706,
363,
9853,
29918,
13140,
29892,
313,
1272,
29892,
11073,
29897,
297,
26985,
29898,
14968,
29918,
12657,
1125,
13,
9651,
396,
9603,
27262,
4464,
1283,
313,
262,
1206,
29897,
13,
9651,
1904,
29889,
14968,
580,
13,
9651,
396,
3617,
848,
304,
274,
6191,
565,
1950,
13,
9651,
848,
353,
848,
29889,
7411,
2141,
517,
29898,
10141,
29897,
13,
9651,
11073,
353,
11073,
29889,
5426,
2141,
517,
29898,
10141,
29897,
13,
13,
9651,
396,
6375,
13,
9651,
19435,
353,
1904,
29898,
1272,
29897,
13,
13,
9651,
17117,
1881,
29918,
513,
1575,
353,
4842,
305,
29889,
3317,
29898,
21134,
29892,
3964,
29922,
29896,
29897,
13,
9651,
6410,
353,
28770,
291,
29898,
1557,
2361,
29892,
1881,
29918,
513,
1575,
29897,
13,
13,
9651,
396,
7945,
13600,
13,
9651,
954,
29918,
15728,
4619,
679,
29918,
1949,
29918,
15728,
29918,
27711,
1080,
29898,
1557,
2361,
29892,
11073,
29897,
13,
9651,
954,
29918,
27736,
4619,
7431,
29898,
21134,
29897,
13,
13,
9651,
396,
1250,
1328,
13,
9651,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
9651,
6410,
29889,
1627,
1328,
580,
13,
13,
9651,
396,
16030,
26815,
470,
594,
314,
4331,
13,
9651,
5994,
3950,
29889,
10568,
580,
13,
13,
9651,
7945,
29918,
21094,
29918,
6758,
4619,
6410,
29889,
667,
580,
13,
13,
4706,
835,
4136,
2277,
29937,
13,
4706,
396,
365,
2209,
267,
396,
13,
4706,
835,
4136,
2277,
29937,
13,
4706,
396,
26101,
365,
2209,
13,
4706,
7945,
29918,
6758,
353,
7945,
29918,
21094,
29918,
6758,
847,
7431,
29898,
14968,
29918,
12657,
29897,
13,
4706,
7945,
29918,
6758,
267,
29889,
4397,
29898,
14968,
29918,
6758,
29897,
13,
4706,
396,
15758,
362,
365,
2209,
13,
4706,
8845,
29918,
6758,
29892,
17117,
903,
353,
679,
29918,
6758,
29898,
18157,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
28770,
291,
29897,
13,
13,
4706,
835,
7346,
2277,
29937,
13,
4706,
396,
4831,
2002,
2478,
396,
13,
4706,
835,
7346,
2277,
29937,
13,
4706,
396,
28186,
13600,
13,
4706,
7945,
29918,
5753,
353,
5785,
29898,
1949,
29918,
15728,
29897,
847,
5785,
29898,
1949,
29918,
27736,
29897,
13,
4706,
7945,
29918,
5753,
2002,
2478,
29889,
4397,
29898,
14968,
29918,
5753,
29897,
13,
4706,
396,
15758,
362,
13600,
13,
4706,
8845,
29918,
5753,
353,
679,
29918,
562,
2764,
4135,
29898,
18157,
29918,
12657,
29892,
1904,
29892,
4742,
29897,
13,
4706,
396,
16913,
278,
1904,
565,
278,
8845,
13600,
338,
278,
9939,
13,
4706,
565,
7431,
29898,
18157,
29918,
5753,
2002,
2478,
29897,
1405,
29871,
29900,
322,
8845,
29918,
5753,
1405,
4236,
29898,
18157,
29918,
5753,
2002,
2478,
1125,
13,
9651,
565,
7160,
29918,
4299,
29918,
2084,
338,
451,
6213,
29901,
13,
18884,
2897,
29889,
5992,
29898,
17314,
29918,
4299,
29918,
2084,
29897,
13,
9651,
7160,
29918,
4299,
29918,
2084,
353,
4078,
29918,
4299,
29898,
4299,
29892,
14210,
29879,
29918,
13318,
29918,
791,
29889,
415,
29915,
1273,
7639,
29897,
13,
4706,
8845,
29918,
5753,
2002,
2478,
29889,
4397,
29898,
18157,
29918,
5753,
29897,
13,
4706,
8845,
29918,
6758,
267,
29889,
4397,
29898,
18157,
29918,
6758,
29897,
13,
13,
4706,
396,
323,
6073,
3377,
13,
4706,
565,
9227,
29901,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
29931,
2209,
29914,
14968,
742,
7945,
29918,
6758,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
29931,
2209,
29914,
18157,
742,
8845,
29918,
6758,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
7504,
332,
4135,
29914,
14968,
742,
7945,
29918,
5753,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
7504,
332,
4135,
29914,
18157,
742,
8845,
29918,
5753,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
13,
4706,
396,
16171,
2472,
13,
4706,
1596,
29918,
1022,
2878,
29918,
3888,
29898,
2962,
29918,
2230,
29892,
21502,
305,
29918,
2962,
29918,
2230,
29892,
931,
29918,
546,
29918,
1022,
2878,
29892,
21502,
305,
29892,
954,
29918,
1022,
2878,
29879,
29892,
7945,
29918,
6758,
29892,
8845,
29918,
6758,
29892,
13,
462,
308,
7945,
29918,
5753,
29892,
8845,
29918,
5753,
29897,
13,
13,
1678,
736,
7945,
29918,
5753,
2002,
2478,
29892,
8845,
29918,
5753,
2002,
2478,
29892,
7945,
29918,
6758,
267,
29892,
8845,
29918,
6758,
267,
13,
13,
13,
1753,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29892,
4331,
29892,
1014,
3257,
2433,
29374,
13,
1678,
9995,
13,
1678,
3462,
29879,
9825,
13342,
848,
5034,
304,
278,
1904,
304,
12489,
3377,
29889,
13,
1678,
584,
3207,
9227,
29901,
6991,
5219,
10507,
13,
1678,
584,
3207,
1904,
29901,
8125,
13,
1678,
584,
3207,
4331,
29901,
5534,
4331,
13,
1678,
584,
3207,
1014,
3257,
29901,
1932,
2675,
25871,
3867,
263,
1024,
304,
5004,
278,
285,
29883,
29896,
29892,
285,
29883,
29906,
29892,
285,
29883,
29941,
13,
1678,
584,
2457,
29901,
13,
1678,
9995,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
13801,
29896,
29374,
13,
4706,
9227,
29889,
1202,
29918,
29882,
391,
13342,
29898,
1491,
3257,
718,
525,
13801,
29896,
742,
1904,
29889,
13801,
29896,
29889,
7915,
29892,
5534,
29918,
10568,
29922,
10568,
29897,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
13801,
29906,
29374,
13,
4706,
9227,
29889,
1202,
29918,
29882,
391,
13342,
29898,
1491,
3257,
718,
525,
13801,
29906,
742,
1904,
29889,
13801,
29906,
29889,
7915,
29892,
5534,
29918,
10568,
29922,
10568,
29897,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
13801,
29941,
29374,
13,
4706,
9227,
29889,
1202,
29918,
29882,
391,
13342,
29898,
1491,
3257,
718,
525,
13801,
29941,
742,
1904,
29889,
13801,
29941,
29889,
7915,
29892,
5534,
29918,
10568,
29922,
10568,
29897,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
4230,
29918,
13801,
29374,
13,
4706,
9227,
29889,
1202,
29918,
29882,
391,
13342,
29898,
1491,
3257,
718,
525,
4230,
29918,
13801,
742,
1904,
29889,
4230,
29918,
13801,
29889,
7915,
29892,
5534,
29918,
10568,
29922,
10568,
29897,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
828,
29886,
29374,
13,
4706,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29889,
828,
29886,
29892,
4331,
29892,
1014,
3257,
2433,
828,
29886,
1495,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
29876,
29896,
29374,
13,
4706,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29889,
828,
29886,
29892,
4331,
29892,
1014,
3257,
2433,
29876,
29896,
1495,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
29876,
29906,
29374,
13,
4706,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29889,
828,
29886,
29892,
4331,
29892,
1014,
3257,
2433,
29876,
29906,
1495,
13,
1678,
565,
756,
5552,
29898,
4299,
29892,
525,
29876,
29941,
29374,
13,
4706,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29889,
828,
29886,
29892,
4331,
29892,
1014,
3257,
2433,
29876,
29941,
1495,
13,
13,
13,
1753,
7945,
29918,
3626,
552,
29873,
29918,
6758,
29898,
4299,
29892,
28770,
291,
29892,
5994,
3950,
29892,
770,
29918,
7039,
29892,
7945,
29918,
12657,
29892,
659,
29918,
12657,
29892,
954,
29918,
1022,
2878,
29879,
29892,
4742,
29892,
13,
462,
539,
7639,
29892,
302,
29918,
484,
1141,
29890,
943,
29892,
9227,
29892,
1364,
14952,
29922,
8516,
29892,
26952,
29922,
8824,
29892,
14383,
29918,
562,
2764,
4135,
29922,
8824,
1125,
13,
1678,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
931,
29918,
546,
29918,
1022,
2878,
353,
5159,
13,
1678,
7160,
29918,
4299,
29918,
2084,
353,
6213,
13,
1678,
7945,
29918,
6758,
267,
353,
5159,
13,
1678,
7945,
29918,
5753,
2002,
2478,
353,
5159,
13,
1678,
659,
29918,
6758,
267,
353,
5159,
13,
1678,
659,
29918,
5753,
2002,
2478,
353,
5159,
13,
1678,
7945,
29918,
562,
2764,
4135,
353,
448,
29896,
13,
1678,
659,
29918,
562,
2764,
4135,
353,
448,
29896,
13,
1678,
19435,
29918,
17685,
353,
6213,
13,
1678,
11073,
29918,
17685,
353,
6213,
13,
13,
1678,
363,
21502,
305,
297,
3464,
29898,
1949,
29918,
1022,
2878,
29879,
1125,
13,
4706,
19435,
29918,
17685,
353,
4842,
305,
29889,
20158,
4197,
1402,
4742,
29922,
10141,
29897,
13,
4706,
11073,
29918,
17685,
353,
4842,
305,
29889,
20158,
4197,
1402,
4742,
29922,
10141,
29897,
13,
4706,
7945,
29918,
21094,
29918,
6758,
353,
869,
29900,
13,
4706,
21502,
305,
29918,
2962,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
363,
9853,
29918,
13140,
29892,
313,
1272,
29892,
22525,
29897,
297,
26985,
29898,
14968,
29918,
12657,
1125,
13,
9651,
396,
9603,
27262,
4464,
1283,
313,
262,
1206,
29897,
13,
9651,
1904,
29889,
14968,
580,
13,
9651,
396,
3617,
848,
304,
274,
6191,
565,
1950,
13,
9651,
565,
338,
8758,
29898,
1272,
29892,
1051,
1125,
13,
18884,
848,
353,
18761,
29898,
29881,
29889,
7411,
2141,
517,
29898,
10141,
29897,
363,
270,
297,
848,
29897,
13,
9651,
1683,
29901,
13,
18884,
848,
353,
848,
29889,
7411,
2141,
517,
29898,
10141,
29897,
13,
9651,
22525,
353,
22525,
29889,
517,
29898,
10141,
29897,
13,
13,
9651,
396,
28186,
19435,
13,
9651,
19435,
353,
1904,
29898,
1272,
29897,
13,
9651,
11073,
353,
22525,
29889,
1191,
3317,
29898,
6229,
29922,
29896,
29897,
13,
9651,
6410,
353,
28770,
291,
29898,
1557,
2361,
29892,
11073,
29897,
13,
9651,
7945,
29918,
21094,
29918,
6758,
4619,
6410,
29889,
667,
580,
13,
13,
9651,
396,
1250,
1328,
13,
9651,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
9651,
6410,
29889,
1627,
1328,
580,
13,
9651,
5994,
3950,
29889,
10568,
580,
13,
13,
9651,
7945,
29918,
6758,
267,
29889,
4397,
29898,
6758,
29889,
667,
3101,
13,
13,
9651,
19435,
29918,
17685,
353,
4842,
305,
29889,
4117,
3552,
1557,
2361,
29918,
17685,
29892,
19435,
511,
3964,
29922,
29900,
29897,
13,
9651,
11073,
29918,
17685,
353,
4842,
305,
29889,
4117,
3552,
21134,
29918,
17685,
29892,
11073,
511,
3964,
29922,
29900,
29897,
13,
13,
4706,
788,
29918,
29882,
391,
468,
25402,
29898,
13236,
29892,
1904,
29892,
21502,
305,
29897,
13,
4706,
9227,
29889,
1202,
29918,
19529,
279,
877,
6026,
2580,
29881,
886,
29914,
5721,
2925,
742,
4842,
305,
29889,
2083,
29898,
7345,
305,
29889,
2252,
391,
29898,
1557,
2361,
29918,
17685,
29892,
19435,
29918,
17685,
8243,
13,
462,
3986,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
4706,
396,
20535,
800,
13,
4706,
7945,
29918,
6758,
353,
7945,
29918,
21094,
29918,
6758,
847,
7431,
29898,
14968,
29918,
12657,
29897,
13,
4706,
9227,
29889,
1202,
29918,
19529,
279,
877,
29931,
2209,
29914,
14968,
742,
7945,
29918,
6758,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
4706,
659,
29918,
6758,
29892,
659,
29918,
1557,
2361,
29892,
903,
353,
679,
29918,
6758,
29898,
791,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
28770,
291,
29897,
13,
4706,
565,
7431,
29898,
791,
29918,
6758,
267,
29897,
1405,
29871,
29900,
29901,
13,
9651,
396,
2860,
278,
937,
4078,
871,
363,
2253,
1121,
297,
8845,
13,
9651,
565,
659,
29918,
6758,
529,
1375,
29898,
791,
29918,
6758,
267,
1125,
13,
18884,
2897,
29889,
5992,
29898,
17314,
29918,
4299,
29918,
2084,
29897,
13,
18884,
7160,
29918,
4299,
29918,
2084,
353,
4078,
29918,
4299,
29898,
4299,
29892,
14210,
29879,
29918,
13318,
29918,
791,
29889,
415,
29915,
1273,
7639,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
16913,
278,
1904,
278,
937,
931,
1728,
8454,
393,
278,
8845,
471,
12212,
29889,
13,
9651,
1596,
877,
29903,
10511,
1904,
363,
278,
937,
931,
1495,
13,
9651,
7160,
29918,
4299,
29918,
2084,
353,
4078,
29918,
4299,
29898,
4299,
29892,
14210,
29879,
29918,
11228,
29889,
415,
29915,
1273,
7639,
29897,
13,
4706,
659,
29918,
6758,
267,
29889,
4397,
29898,
791,
29918,
6758,
29897,
13,
4706,
565,
451,
14383,
29918,
562,
2764,
4135,
29901,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
6026,
2580,
29881,
886,
29914,
5721,
2925,
29918,
791,
742,
4842,
305,
29889,
2083,
29898,
7345,
305,
29889,
2252,
391,
29898,
791,
29918,
1557,
2361,
29892,
659,
29918,
1557,
2361,
8243,
13,
462,
795,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
29931,
2209,
29914,
18157,
742,
659,
29918,
6758,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
565,
1364,
14952,
29901,
13,
18884,
1364,
14952,
29889,
10568,
29898,
791,
29918,
6758,
29897,
13,
9651,
396,
10811,
3958,
297,
2498,
13,
9651,
659,
29918,
4912,
29892,
659,
29918,
562,
2764,
4135,
29892,
17117,
903,
353,
679,
29918,
27711,
1080,
29918,
2541,
29918,
3959,
29876,
29898,
29876,
29918,
484,
1141,
29890,
943,
29892,
7945,
29918,
12657,
29892,
659,
29918,
12657,
29892,
1904,
29892,
4742,
29897,
13,
9651,
7945,
29918,
4912,
29892,
7945,
29918,
562,
2764,
4135,
29892,
17117,
903,
353,
679,
29918,
27711,
1080,
29918,
2541,
29918,
3959,
29876,
29898,
29876,
29918,
484,
1141,
29890,
943,
29892,
7945,
29918,
12657,
29892,
7945,
29918,
12657,
29892,
1904,
29892,
13,
462,
462,
462,
462,
418,
4742,
29897,
13,
13,
9651,
659,
29918,
5753,
2002,
2478,
29889,
4397,
29898,
791,
29918,
562,
2764,
4135,
29897,
13,
9651,
7945,
29918,
5753,
2002,
2478,
29889,
4397,
29898,
14968,
29918,
562,
2764,
4135,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
7504,
332,
4135,
29914,
18157,
742,
659,
29918,
562,
2764,
4135,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
19529,
279,
877,
7504,
332,
4135,
29914,
14968,
742,
7945,
29918,
562,
2764,
4135,
29892,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
7945,
29918,
3027,
353,
6492,
29918,
5527,
3958,
29918,
5344,
29898,
13,
18884,
7477,
29922,
14968,
29918,
4912,
29892,
13,
18884,
3611,
2433,
16376,
3958,
22513,
448,
2431,
1760,
482,
1273,
448,
28186,
4309,
1664,
742,
13,
18884,
4226,
675,
29922,
8824,
29892,
13,
18884,
4078,
29922,
8824,
29892,
13,
18884,
1510,
29918,
4532,
29922,
8824,
29892,
13,
18884,
4413,
29922,
1990,
29918,
7039,
13,
9651,
1723,
13,
9651,
659,
29918,
3027,
353,
6492,
29918,
5527,
3958,
29918,
5344,
29898,
13,
18884,
7477,
29922,
791,
29918,
4912,
29892,
13,
18884,
3611,
2433,
16376,
3958,
22513,
448,
2431,
1760,
482,
1273,
448,
2630,
4309,
1664,
742,
13,
18884,
4226,
675,
29922,
8824,
29892,
13,
18884,
4078,
29922,
8824,
29892,
13,
18884,
1510,
29918,
4532,
29922,
8824,
29892,
13,
18884,
4413,
29922,
1990,
29918,
7039,
13,
9651,
1723,
13,
9651,
9227,
29889,
1202,
29918,
8346,
877,
16376,
3958,
14609,
29914,
5323,
262,
742,
7945,
29918,
3027,
29892,
848,
689,
1446,
2433,
3210,
29956,
742,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
9651,
9227,
29889,
1202,
29918,
8346,
877,
16376,
3958,
14609,
29914,
19448,
742,
659,
29918,
3027,
29892,
848,
689,
1446,
2433,
3210,
29956,
742,
5534,
29918,
10568,
29922,
1022,
2878,
29897,
13,
13,
4706,
565,
26952,
29901,
13,
9651,
396,
7870,
292,
13,
9651,
3001,
29918,
1022,
2878,
29918,
2230,
353,
931,
29889,
2230,
580,
448,
21502,
305,
29918,
2962,
29918,
2230,
13,
9651,
931,
29918,
546,
29918,
1022,
2878,
29889,
4397,
29898,
7827,
29918,
1022,
2878,
29918,
2230,
29897,
13,
13,
9651,
396,
16171,
2472,
13,
9651,
1596,
29918,
1022,
2878,
29918,
3888,
29898,
2962,
29918,
2230,
29892,
21502,
305,
29918,
2962,
29918,
2230,
29892,
931,
29918,
546,
29918,
1022,
2878,
29892,
21502,
305,
29892,
954,
29918,
1022,
2878,
29879,
29892,
7945,
29918,
6758,
29892,
659,
29918,
6758,
29892,
13,
462,
632,
7945,
29918,
562,
2764,
4135,
29892,
659,
29918,
562,
2764,
4135,
29897,
13,
13,
1678,
9227,
29889,
1202,
29918,
17987,
8497,
29898,
1557,
2361,
29918,
17685,
29892,
15562,
11759,
1990,
29918,
7039,
29961,
13140,
29962,
363,
22645,
297,
11073,
29918,
17685,
29889,
524,
2141,
25027,
391,
580,
1402,
13,
462,
308,
4055,
543,
14968,
313,
29995,
29888,
7686,
5513,
1273,
7945,
29918,
562,
2764,
4135,
29897,
13,
1678,
736,
7945,
29918,
6758,
267,
29892,
659,
29918,
6758,
267,
29892,
659,
29918,
5753,
2002,
2478,
29892,
7945,
29918,
5753,
2002,
2478,
13,
13,
13,
1753,
7945,
29918,
12857,
29898,
4299,
29892,
28770,
291,
29892,
5994,
3950,
29892,
21502,
12168,
29892,
848,
29892,
11073,
1125,
13,
1678,
1904,
29889,
14968,
580,
13,
1678,
363,
21502,
305,
297,
3464,
29898,
1022,
2878,
29879,
1125,
13,
4706,
19435,
353,
1904,
29898,
1272,
29897,
13,
4706,
6410,
353,
28770,
291,
29898,
1557,
2361,
29892,
11073,
29889,
1191,
3317,
29898,
29896,
876,
13,
4706,
1035,
29884,
353,
679,
29918,
1949,
29918,
15728,
29918,
27711,
1080,
29898,
1557,
2361,
29892,
11073,
29897,
847,
11073,
29889,
12181,
29961,
29900,
29962,
13,
13,
4706,
396,
1250,
1328,
13,
4706,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
4706,
6410,
29889,
1627,
1328,
580,
13,
4706,
5994,
3950,
29889,
10568,
580,
13,
4706,
565,
21502,
305,
1273,
29871,
29896,
29900,
1275,
29871,
29900,
29901,
13,
9651,
1596,
877,
29923,
1129,
305,
1273,
29881,
22584,
29881,
29901,
6410,
18695,
29906,
29888,
1035,
29884,
18695,
29906,
29888,
29915,
1273,
313,
1022,
2878,
29892,
21502,
12168,
29892,
6410,
29889,
667,
3285,
1035,
29884,
876,
13,
13,
13,
29992,
7345,
305,
29889,
1217,
29918,
5105,
580,
13,
1753,
679,
29918,
6758,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
28770,
291,
1125,
13,
1678,
9995,
13,
1678,
3617,
27262,
6410,
310,
848,
29918,
12657,
13,
1678,
584,
3207,
848,
29918,
12657,
29901,
3630,
10036,
13,
1678,
584,
3207,
1904,
29901,
8125,
13,
1678,
584,
3207,
4742,
29901,
21830,
313,
29883,
6191,
470,
26403,
29897,
13,
1678,
584,
3207,
28770,
291,
29901,
365,
2209,
740,
13,
1678,
584,
2457,
29901,
6410,
13,
1678,
9995,
13,
1678,
1904,
29889,
14513,
580,
13,
1678,
19435,
29892,
11073,
353,
679,
29918,
27711,
1080,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
8824,
29897,
13,
1678,
6410,
353,
28770,
291,
29898,
1557,
2361,
29892,
11073,
29889,
1191,
3317,
29898,
6229,
29922,
29896,
876,
13,
13,
1678,
736,
6410,
29889,
667,
3285,
19435,
29892,
11073,
13,
13,
13,
1753,
679,
29918,
562,
2764,
4135,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
1125,
13,
1678,
9995,
13,
1678,
20535,
1078,
278,
13600,
310,
278,
1904,
2183,
313,
262,
1659,
4464,
29897,
7436,
297,
278,
8783,
310,
278,
848,
29918,
12657,
13,
1678,
584,
3207,
848,
29918,
12657,
29901,
3630,
23466,
13,
1678,
584,
3207,
1904,
29901,
8125,
304,
367,
1304,
363,
27303,
13,
1678,
584,
3207,
4742,
29901,
21830,
304,
367,
1304,
13,
1678,
584,
2457,
29901,
13600,
19649,
1273,
13,
1678,
9995,
13,
1678,
599,
29918,
27711,
1080,
29892,
599,
29918,
21134,
353,
679,
29918,
27711,
1080,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
5574,
29897,
13,
13,
1678,
1959,
29918,
11965,
29918,
3317,
353,
679,
29918,
1949,
29918,
15728,
29918,
27711,
1080,
29898,
497,
29918,
27711,
1080,
29892,
599,
29918,
21134,
29897,
13,
13,
1678,
736,
1959,
29918,
11965,
29918,
3317,
847,
599,
29918,
27711,
1080,
29889,
12181,
29961,
29900,
29962,
13,
13,
13,
29992,
7345,
305,
29889,
1217,
29918,
5105,
580,
13,
1753,
679,
29918,
562,
2764,
4135,
29918,
12857,
29898,
4299,
29892,
848,
29892,
11073,
1125,
13,
1678,
1904,
29889,
14513,
580,
13,
1678,
1243,
29918,
1557,
2361,
353,
1904,
29898,
1272,
29897,
13,
1678,
1243,
29918,
1557,
2361,
353,
13303,
29889,
2695,
3317,
29898,
1688,
29918,
1557,
2361,
29892,
29871,
29896,
29897,
13,
13,
1678,
736,
679,
29918,
1949,
29918,
15728,
29918,
27711,
1080,
29898,
1688,
29918,
1557,
2361,
29892,
11073,
29897,
847,
11073,
29889,
12181,
29961,
29900,
29962,
13,
13,
13,
1753,
679,
29918,
5527,
3958,
29918,
5344,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
1125,
13,
1678,
9995,
13,
1678,
19338,
1960,
27303,
363,
278,
3353,
8783,
29892,
3408,
1078,
322,
3639,
278,
14679,
4636,
13,
1678,
584,
3207,
848,
29918,
12657,
29901,
3630,
23466,
13,
1678,
584,
3207,
1904,
29901,
8125,
304,
367,
1304,
363,
27303,
13,
1678,
584,
3207,
4742,
29901,
21830,
304,
367,
1304,
13,
1678,
584,
2457,
29901,
14679,
4636,
13,
1678,
9995,
13,
1678,
599,
29918,
27711,
1080,
29892,
599,
29918,
21134,
353,
679,
29918,
27711,
1080,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
5574,
29897,
13,
13,
1678,
954,
29918,
13203,
353,
599,
29918,
21134,
29889,
12181,
29961,
29896,
29962,
13,
1678,
5096,
287,
353,
4842,
305,
29889,
1429,
3552,
497,
29918,
21134,
29889,
1191,
3317,
29898,
6229,
29922,
29896,
511,
599,
29918,
27711,
1080,
29889,
1191,
3317,
29898,
6229,
29922,
29896,
8243,
3964,
29922,
29896,
29897,
13,
1678,
274,
4378,
353,
4842,
305,
29889,
3298,
359,
29898,
1949,
29918,
13203,
29892,
954,
29918,
13203,
29892,
26688,
29922,
7345,
305,
29889,
524,
29953,
29946,
29897,
13,
1678,
363,
282,
297,
5096,
287,
29901,
13,
4706,
1565,
29918,
1643,
29892,
25383,
29918,
1643,
353,
282,
29889,
25027,
391,
580,
13,
4706,
274,
4378,
29961,
3009,
29918,
1643,
29892,
25383,
29918,
1643,
29962,
353,
274,
4378,
29961,
3009,
29918,
1643,
29892,
25383,
29918,
1643,
29962,
718,
29871,
29896,
13,
13,
1678,
736,
274,
4378,
13,
13,
13,
1753,
679,
29918,
5527,
3958,
29918,
5344,
29918,
20787,
29918,
9794,
29898,
1272,
29918,
1359,
414,
29892,
4733,
29892,
4742,
1125,
13,
1678,
9995,
13,
1678,
402,
1691,
27303,
515,
2999,
4733,
29892,
285,
6394,
19435,
2729,
373,
3234,
5751,
322,
3408,
1078,
322,
3639,
13,
1678,
14679,
4636,
13,
1678,
584,
3207,
848,
29918,
1359,
414,
29901,
2391,
310,
848,
2254,
414,
13,
1678,
584,
3207,
4733,
29901,
2391,
310,
4733,
13,
1678,
584,
3207,
4742,
29901,
21830,
304,
367,
1304,
13,
1678,
584,
2457,
29901,
14679,
4636,
13,
1678,
9995,
13,
1678,
396,
14402,
1735,
2898,
29659,
3694,
13,
1678,
274,
29918,
1557,
2361,
353,
4842,
305,
29889,
3298,
359,
3552,
2435,
29898,
9794,
511,
29871,
29946,
29896,
29953,
29892,
29871,
29906,
29955,
876,
13,
1678,
274,
29918,
21134,
353,
4842,
305,
29889,
3298,
359,
3552,
2435,
29898,
9794,
511,
29871,
29946,
29896,
29953,
29892,
29871,
29906,
29955,
876,
13,
13,
1678,
363,
22645,
297,
3464,
29898,
2435,
29898,
9794,
22164,
13,
4706,
599,
29918,
27711,
1080,
29892,
599,
29918,
21134,
353,
679,
29918,
27711,
1080,
29898,
1272,
29918,
1359,
414,
29961,
13140,
1402,
4733,
29961,
13140,
1402,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
5574,
29897,
13,
13,
4706,
274,
29918,
1557,
2361,
29961,
13140,
29892,
584,
29892,
584,
29962,
353,
599,
29918,
27711,
1080,
13,
4706,
274,
29918,
21134,
29961,
13140,
29892,
584,
29892,
584,
29962,
353,
599,
29918,
21134,
13,
13,
1678,
285,
3880,
29918,
1557,
2361,
353,
274,
29918,
1557,
2361,
29889,
10633,
29898,
6229,
29922,
29900,
29897,
13,
1678,
954,
29918,
13203,
353,
274,
29918,
21134,
29961,
29900,
1822,
12181,
29961,
29896,
29962,
13,
1678,
5096,
287,
353,
4842,
305,
29889,
1429,
3552,
29883,
29918,
21134,
29961,
29900,
1822,
1191,
3317,
29898,
6229,
29922,
29896,
511,
285,
3880,
29918,
1557,
2361,
29889,
1191,
3317,
29898,
6229,
29922,
29896,
8243,
3964,
29922,
29896,
29897,
13,
1678,
274,
4378,
353,
4842,
305,
29889,
3298,
359,
29898,
1949,
29918,
13203,
29892,
954,
29918,
13203,
29892,
26688,
29922,
7345,
305,
29889,
524,
29953,
29946,
29897,
13,
1678,
363,
282,
297,
5096,
287,
29901,
13,
4706,
1565,
29918,
1643,
29892,
25383,
29918,
1643,
353,
282,
29889,
25027,
391,
580,
13,
4706,
274,
4378,
29961,
3009,
29918,
1643,
29892,
25383,
29918,
1643,
29962,
353,
274,
4378,
29961,
3009,
29918,
1643,
29892,
25383,
29918,
1643,
29962,
718,
29871,
29896,
13,
13,
1678,
736,
274,
4378,
13,
13,
13,
29992,
7345,
305,
29889,
1217,
29918,
5105,
580,
13,
1753,
679,
29918,
27711,
1080,
29898,
1272,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
8824,
1125,
13,
1678,
9995,
13,
1678,
24328,
3145,
263,
1418,
7003,
1664,
263,
1904,
322,
263,
4742,
29892,
6057,
599,
278,
9853,
267,
304,
679,
278,
27303,
13,
1678,
322,
3639,
263,
12489,
411,
599,
278,
27303,
322,
6590,
11073,
363,
1432,
4559,
310,
278,
8783,
13,
1678,
584,
3207,
848,
29918,
12657,
29901,
3630,
23466,
13,
1678,
584,
3207,
1904,
29901,
8125,
13,
1678,
584,
3207,
4742,
29901,
21830,
304,
367,
1304,
13,
1678,
584,
3207,
3394,
29918,
2695,
3317,
29901,
26460,
304,
3394,
4964,
3317,
297,
278,
1095,
13,
1678,
584,
2457,
29901,
27303,
29892,
11073,
13,
1678,
9995,
13,
1678,
396,
3789,
278,
1904,
304,
27262,
4464,
13,
1678,
1904,
29889,
14513,
580,
13,
13,
1678,
396,
512,
4812,
403,
25187,
943,
304,
4808,
27303,
322,
11073,
13,
1678,
599,
29918,
27711,
1080,
353,
4842,
305,
29889,
20158,
4197,
1402,
4742,
29922,
10141,
29897,
13,
1678,
599,
29918,
21134,
353,
4842,
305,
29889,
20158,
4197,
1402,
4742,
29922,
10141,
29897,
13,
13,
1678,
363,
313,
1272,
29892,
11073,
29897,
297,
848,
29918,
12657,
29901,
13,
4706,
565,
338,
8758,
29898,
1272,
29892,
1051,
1125,
13,
9651,
848,
353,
18761,
29898,
29881,
29889,
7411,
2141,
517,
29898,
10141,
29897,
363,
270,
297,
848,
29897,
13,
4706,
1683,
29901,
13,
9651,
848,
353,
848,
29889,
7411,
2141,
517,
29898,
10141,
29897,
13,
4706,
11073,
353,
11073,
29889,
5426,
2141,
517,
29898,
10141,
29922,
10141,
29897,
13,
13,
4706,
714,
353,
1904,
29898,
1272,
29897,
13,
4706,
565,
3394,
29918,
2695,
3317,
29901,
13,
9651,
19435,
353,
13303,
29889,
2695,
3317,
29898,
449,
29892,
29871,
29896,
29897,
13,
4706,
1683,
29901,
13,
9651,
19435,
353,
714,
13,
4706,
599,
29918,
27711,
1080,
353,
4842,
305,
29889,
4117,
3552,
497,
29918,
27711,
1080,
29892,
19435,
511,
3964,
29922,
29900,
29897,
13,
4706,
599,
29918,
21134,
353,
4842,
305,
29889,
4117,
3552,
497,
29918,
21134,
29892,
11073,
511,
3964,
29922,
29900,
29897,
13,
13,
1678,
736,
599,
29918,
27711,
1080,
29892,
599,
29918,
21134,
13,
13,
13,
1753,
679,
29918,
1949,
29918,
15728,
29918,
27711,
1080,
29898,
1557,
2361,
29892,
11073,
1125,
13,
1678,
9995,
13,
1678,
20535,
1078,
278,
1353,
310,
1959,
18988,
2183,
278,
19435,
313,
4905,
310,
1904,
363,
1432,
4559,
29897,
322,
278,
11073,
13,
1678,
584,
3207,
19435,
29901,
12489,
13,
1678,
584,
3207,
11073,
29901,
12489,
13,
1678,
584,
2457,
29901,
1353,
310,
1959,
27303,
13,
1678,
9995,
13,
1678,
736,
938,
3552,
21134,
29889,
1191,
3317,
29898,
29896,
29897,
1275,
19435,
29889,
1191,
3317,
29898,
29896,
8106,
2083,
3101,
13,
13,
13,
1753,
679,
29918,
27711,
1080,
29918,
2541,
29918,
3959,
29876,
29898,
29876,
29918,
484,
1141,
29890,
943,
29892,
7945,
29918,
12657,
29892,
1243,
29918,
12657,
29892,
1904,
29892,
4742,
1125,
13,
1678,
9995,
13,
1678,
24328,
3145,
278,
7945,
322,
1243,
2254,
414,
322,
1353,
310,
22092,
943,
322,
22983,
263,
476,
10262,
770,
3709,
373,
278,
7945,
848,
29892,
322,
769,
13,
1678,
8500,
29879,
373,
278,
1243,
23466,
29889,
16969,
278,
14679,
4636,
29892,
1243,
13600,
29892,
19435,
322,
9775,
267,
13,
1678,
584,
3207,
302,
29918,
484,
1141,
29890,
943,
29901,
9681,
310,
22092,
943,
363,
278,
476,
10262,
13,
1678,
584,
3207,
7945,
29918,
12657,
29901,
28186,
23466,
13,
1678,
584,
3207,
1243,
29918,
12657,
29901,
4321,
4309,
1664,
13,
1678,
584,
3207,
1904,
29901,
8125,
304,
671,
13,
1678,
584,
3207,
4742,
29901,
4794,
305,
4742,
13,
1678,
584,
2457,
29901,
14679,
4636,
29892,
1243,
13600,
29892,
19435,
29892,
11073,
13,
1678,
9995,
13,
1678,
7945,
29918,
1557,
2361,
29892,
7945,
29918,
21134,
353,
679,
29918,
27711,
1080,
29898,
14968,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
8824,
29897,
13,
1678,
1243,
29918,
1557,
2361,
29892,
1243,
29918,
21134,
353,
679,
29918,
27711,
1080,
29898,
1688,
29918,
12657,
29892,
1904,
29892,
4742,
29892,
3394,
29918,
2695,
3317,
29922,
8824,
29897,
13,
1678,
1243,
29918,
21134,
353,
1243,
29918,
21134,
29889,
1191,
3317,
29898,
29896,
29897,
13,
1678,
770,
3709,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
29898,
29876,
29918,
484,
1141,
29890,
943,
29922,
29876,
29918,
484,
1141,
29890,
943,
29897,
13,
1678,
565,
4742,
29889,
1853,
1275,
525,
29883,
6191,
2396,
13,
4706,
7945,
29918,
1557,
2361,
353,
7945,
29918,
1557,
2361,
29889,
21970,
580,
13,
4706,
7945,
29918,
21134,
353,
7945,
29918,
21134,
29889,
21970,
580,
13,
4706,
1243,
29918,
1557,
2361,
353,
1243,
29918,
1557,
2361,
29889,
21970,
580,
13,
4706,
1243,
29918,
21134,
353,
1243,
29918,
21134,
29889,
21970,
580,
13,
1678,
770,
3709,
29889,
9202,
29898,
14968,
29918,
1557,
2361,
29892,
7945,
29918,
21134,
29889,
1191,
3317,
29898,
29896,
876,
13,
1678,
1243,
29918,
3959,
29876,
29918,
11965,
353,
770,
3709,
29889,
27711,
29898,
1688,
29918,
1557,
2361,
29897,
13,
1678,
396,
343,
29918,
11965,
353,
343,
29918,
11965,
29889,
1191,
3317,
29898,
29896,
29897,
13,
1678,
1243,
29918,
562,
2764,
4135,
353,
938,
3552,
1688,
29918,
21134,
1275,
4842,
305,
29889,
29911,
6073,
29898,
1688,
29918,
3959,
29876,
29918,
11965,
8106,
2083,
3101,
847,
1243,
29918,
21134,
29889,
12181,
29961,
29900,
29962,
13,
1678,
7477,
353,
14679,
29918,
5344,
29898,
1688,
29918,
21134,
29892,
1243,
29918,
3959,
29876,
29918,
11965,
29897,
13,
13,
1678,
736,
7477,
29892,
1243,
29918,
562,
2764,
4135,
29892,
1243,
29918,
1557,
2361,
29892,
1243,
29918,
21134,
13,
2
] |
files/autoupdate-you-resume-for-hh.ru/16_for_input_end=''.py | SKDCO/SKDCO | 2 | 180411 | <reponame>SKDCO/SKDCO
Когда Павел учился в школе, он запоминал таблицу умножения прямоугольными блоками.
Для тренировок ему бы очень пригодилась программа, которая показывала бы блок таблицы умножения.
Напишите программу, на вход которой даются четыре числа a, b, c и d,
каждое в своей строке. Программа должна вывести фрагмент таблицы умножения
для всех чисел отрезка [a;b] на все числа отрезка [c;d].
Числа a, b, c и d являются натуральными и не превосходят 10, a≤b, c≤d.
Следуйте формату вывода из примера, для разделения элементов внутри
строки используйте '\t' — символ табуляции.
Заметьте, что левым столбцом и верхней строкой выводятся
сами числа из заданных отрезков — заголовочные столбец и строка таблицы.
# put your python code here
a =int (input())
b =int (input())
c =int (input())
d =int (input())
for g in range (c,d+1):
print('\t'+str(g),end='')
print(end='\n')
for i in range (a,b+1):
print(str(i)+'\t',end='')
for j in range (c,d+1):
print(str(i*j),end='\t')
print(end='\n')
| [
1,
529,
276,
1112,
420,
29958,
16033,
29928,
3217,
29914,
16033,
29928,
3217,
13,
26022,
9077,
5390,
1521,
29944,
15517,
4633,
490,
12351,
753,
29892,
6524,
1077,
1268,
12189,
29944,
1710,
5116,
9062,
863,
29959,
570,
11268,
23380,
1630,
29960,
588,
693,
8535,
836,
843,
13021,
29889,
29871,
13,
30032,
1225,
8847,
507,
7735,
29951,
22785,
2188,
614,
23963,
1695,
588,
956,
7476,
20796,
1155,
29892,
21105,
25693,
10706,
684,
2188,
836,
16023,
1710,
5116,
10566,
863,
29959,
570,
11268,
29889,
13,
13,
19193,
1668,
1911,
730,
20796,
1805,
29892,
665,
490,
11011,
20935,
3574,
9480,
24998,
587,
5787,
12329,
263,
29892,
289,
29892,
274,
606,
270,
29892,
29871,
13,
642,
29998,
1802,
29919,
490,
21530,
2091,
576,
2476,
29889,
6807,
2194,
29959,
1155,
19611,
477,
2771,
1521,
1415,
1606,
494,
29969,
12275,
1710,
5116,
10566,
863,
29959,
570,
11268,
29871,
13,
29957,
1225,
23103,
5787,
1502,
29944,
1685,
10485,
642,
518,
29874,
29936,
29890,
29962,
665,
6495,
5787,
12329,
1685,
10485,
642,
518,
29883,
29936,
29881,
1822,
13,
13,
30076,
11452,
684,
263,
29892,
289,
29892,
274,
606,
270,
9960,
9480,
665,
7217,
693,
8535,
606,
1538,
2102,
984,
29935,
14375,
29932,
29871,
29896,
29900,
29892,
263,
30248,
29890,
29892,
274,
30248,
29881,
29889,
13,
13,
30008,
753,
1520,
29977,
730,
9116,
1155,
1500,
2771,
984,
840,
1866,
1695,
1488,
494,
29892,
3807,
3212,
1216,
6052,
2352,
25469,
4820,
490,
1864,
7678,
29871,
13,
7966,
717,
24160,
29977,
730,
11297,
29873,
29915,
813,
20468,
984,
29944,
1710,
3378,
1225,
3540,
29889,
29871,
13,
15578,
12274,
29978,
730,
29892,
4281,
4674,
4938,
29959,
7349,
29944,
29975,
29996,
9530,
606,
8060,
29988,
8150,
2091,
576,
7337,
2771,
984,
5640,
7489,
29871,
13,
2019,
989,
5787,
12329,
1866,
1077,
6798,
2430,
1685,
10485,
2530,
813,
1077,
588,
19071,
20125,
7349,
29944,
3759,
29996,
606,
2091,
576,
642,
1710,
5116,
10566,
29889,
13,
13,
29937,
1925,
596,
3017,
775,
1244,
13,
29874,
353,
524,
313,
2080,
3101,
13,
29890,
353,
524,
313,
2080,
3101,
13,
29883,
353,
524,
313,
2080,
3101,
13,
29881,
353,
524,
313,
2080,
3101,
13,
1454,
330,
297,
3464,
313,
29883,
29892,
29881,
29974,
29896,
1125,
13,
1678,
1596,
28909,
29873,
18717,
710,
29898,
29887,
511,
355,
2433,
1495,
13,
2158,
29898,
355,
2433,
29905,
29876,
1495,
13,
1454,
474,
297,
3464,
313,
29874,
29892,
29890,
29974,
29896,
1125,
13,
1678,
1596,
29898,
710,
29898,
29875,
7240,
12764,
29873,
742,
355,
2433,
1495,
13,
1678,
363,
432,
297,
3464,
313,
29883,
29892,
29881,
29974,
29896,
1125,
13,
4706,
1596,
29898,
710,
29898,
29875,
29930,
29926,
511,
355,
2433,
29905,
29873,
1495,
13,
1678,
1596,
29898,
355,
2433,
29905,
29876,
1495,
13,
2
] |
lib/socket/exceptions.py | mrcrgl/gge-storage | 0 | 86902 |
class DeadConnectionException(Exception):
pass | [
1,
29871,
13,
13,
1990,
16992,
5350,
2451,
29898,
2451,
1125,
13,
1678,
1209,
2
] |
seisflow/scripts/shared/change_simulation_type.py | ziyixi/seisflow | 2 | 120771 | <filename>seisflow/scripts/shared/change_simulation_type.py
"""
change_simulation_type.py: change the simulation type in specfem massively.
"""
from glob import glob
from os.path import join
import sh
if __name__ == "__main__":
import click
@click.command()
@click.option('--base_directory', required=True, type=str, help="the simulation directory")
@click.option('--simulation_type', required=True, type=str, help="can be forward, source, structure and forward_save")
def main(base_directory, simulation_type):
flag = None
if(simulation_type == "forward"):
flag = "-f"
elif(simulation_type == "source"):
flag = "-a"
elif(simulation_type == "structure"):
flag = "-b"
elif(simulation_type == "forward_save"):
flag = "-F"
else:
raise Exception("no such simulation type")
all_simulation_directories = sorted(glob(join(base_directory, "*")))
current_path = str(sh.pwd())[:-1] # pylint: disable=not-callable
for each_simulation_directory in all_simulation_directories:
sh.cd(each_simulation_directory)
sh.perl("change_simulation_type.pl", flag)
sh.cd(current_path)
main() # pylint: disable=no-value-for-parameter
| [
1,
529,
9507,
29958,
344,
275,
1731,
29914,
16713,
29914,
12366,
29914,
3167,
29918,
3601,
2785,
29918,
1853,
29889,
2272,
13,
15945,
29908,
13,
3167,
29918,
3601,
2785,
29918,
1853,
29889,
2272,
29901,
1735,
278,
17402,
1134,
297,
1580,
29888,
331,
4158,
3598,
29889,
13,
15945,
29908,
13,
13,
3166,
13149,
1053,
13149,
13,
3166,
2897,
29889,
2084,
1053,
5988,
13,
13,
5215,
528,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1053,
2828,
13,
13,
1678,
732,
3808,
29889,
6519,
580,
13,
1678,
732,
3808,
29889,
3385,
877,
489,
3188,
29918,
12322,
742,
3734,
29922,
5574,
29892,
1134,
29922,
710,
29892,
1371,
543,
1552,
17402,
3884,
1159,
13,
1678,
732,
3808,
29889,
3385,
877,
489,
3601,
2785,
29918,
1853,
742,
3734,
29922,
5574,
29892,
1134,
29922,
710,
29892,
1371,
543,
3068,
367,
6375,
29892,
2752,
29892,
3829,
322,
6375,
29918,
7620,
1159,
13,
1678,
822,
1667,
29898,
3188,
29918,
12322,
29892,
17402,
29918,
1853,
1125,
13,
4706,
7353,
353,
6213,
13,
4706,
565,
29898,
3601,
2785,
29918,
1853,
1275,
376,
11333,
29908,
1125,
13,
9651,
7353,
353,
11663,
29888,
29908,
13,
4706,
25342,
29898,
3601,
2785,
29918,
1853,
1275,
376,
4993,
29908,
1125,
13,
9651,
7353,
353,
11663,
29874,
29908,
13,
4706,
25342,
29898,
3601,
2785,
29918,
1853,
1275,
376,
23905,
29908,
1125,
13,
9651,
7353,
353,
11663,
29890,
29908,
13,
4706,
25342,
29898,
3601,
2785,
29918,
1853,
1275,
376,
11333,
29918,
7620,
29908,
1125,
13,
9651,
7353,
353,
11663,
29943,
29908,
13,
4706,
1683,
29901,
13,
9651,
12020,
8960,
703,
1217,
1316,
17402,
1134,
1159,
13,
4706,
599,
29918,
3601,
2785,
29918,
11851,
3842,
353,
12705,
29898,
23705,
29898,
7122,
29898,
3188,
29918,
12322,
29892,
376,
20605,
4961,
13,
4706,
1857,
29918,
2084,
353,
851,
29898,
845,
29889,
29886,
9970,
3101,
7503,
29899,
29896,
29962,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
1333,
29899,
4804,
519,
13,
4706,
363,
1269,
29918,
3601,
2785,
29918,
12322,
297,
599,
29918,
3601,
2785,
29918,
11851,
3842,
29901,
13,
9651,
528,
29889,
2252,
29898,
4204,
29918,
3601,
2785,
29918,
12322,
29897,
13,
9651,
528,
29889,
22032,
703,
3167,
29918,
3601,
2785,
29918,
1853,
29889,
572,
613,
7353,
29897,
13,
9651,
528,
29889,
2252,
29898,
3784,
29918,
2084,
29897,
13,
1678,
1667,
580,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
1217,
29899,
1767,
29899,
1454,
29899,
15501,
13,
2
] |
tests/test_wikipedia.py | cauliyang/test-poetry | 0 | 52304 | from test_poetry import wikipedia
def test_random_page_use_given_language(mock_requests_get):
wikipedia.random_page(language="de")
| [
1,
515,
1243,
29918,
1129,
27184,
1053,
281,
638,
4652,
13,
13,
13,
1753,
1243,
29918,
8172,
29918,
3488,
29918,
1509,
29918,
29887,
5428,
29918,
11675,
29898,
17640,
29918,
24830,
29918,
657,
1125,
13,
1678,
281,
638,
4652,
29889,
8172,
29918,
3488,
29898,
11675,
543,
311,
1159,
13,
2
] |
example/testapp/__init__.py | Ecotrust/rpc4django | 28 | 90202 | # -*- coding: utf-8 -*-
from rpc4django import rpcmethod
from .othermodule import intro, getrequest
from .secretmodule import * # imports protected method
@rpcmethod(name='rpc4django.mytestmethod',signature=['int', 'int', 'int', 'int'])
def mytestmethod(a, b, c):
'''
Adds the three parameters together and returns the sum
Parameters:
- `a` - the first parameter
- `b` - the second parameter
- `c` - the third parameter
Returns
the sum of the 3 parameters
'''
return a + b + c
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
364,
6739,
29946,
14095,
1053,
364,
29886,
4912,
959,
13,
3166,
869,
720,
837,
397,
1297,
1053,
22909,
29892,
679,
3827,
13,
3166,
869,
19024,
5453,
1053,
334,
396,
24802,
6364,
1158,
13,
13,
29992,
19080,
4912,
959,
29898,
978,
2433,
29878,
6739,
29946,
14095,
29889,
1357,
1688,
5696,
742,
4530,
1535,
29922,
1839,
524,
742,
525,
524,
742,
525,
524,
742,
525,
524,
11287,
13,
1753,
590,
1688,
5696,
29898,
29874,
29892,
289,
29892,
274,
1125,
13,
1678,
14550,
13,
1678,
3462,
29879,
278,
2211,
4128,
4208,
322,
3639,
278,
2533,
13,
268,
13,
1678,
12662,
2699,
29901,
13,
1678,
13,
1678,
448,
421,
29874,
29952,
448,
278,
937,
3443,
13,
1678,
448,
421,
29890,
29952,
448,
278,
1473,
3443,
13,
1678,
448,
421,
29883,
29952,
448,
278,
4654,
3443,
13,
268,
13,
1678,
16969,
13,
418,
278,
2533,
310,
278,
29871,
29941,
4128,
13,
539,
13,
1678,
14550,
13,
268,
13,
1678,
736,
263,
718,
289,
718,
274,
13,
2
] |
evaluation/filters.py | tmolitor-stud-tu/AnonPubSub | 0 | 154548 |
# *** these filters do NOT see ping messages, nor do routers see them ***
# *** global imports are NOT accessible, do imports in __init__ and bind them to an attribute ***
class Filters(Base):
def __init__(self, logger):
# init parent class
super().__init__(logger)
# some imports needed later
self.random = __import__("random")
self.base64 = __import__("base64")
self._thread = __import__("_thread")
self.time = __import__("time")
# some vars
#self.master_killed = False
self.started = 0
self.data_received = {}
self.overlay_constructed = False
self.mutation_logged = False
def gui_command_incoming(self, command):
global task
pass
def gui_command_completed(self, command, error):
global task
if command["_command"] == "start":
if not error:
pass #self.logger.info("*********** STARTED")
else:
pass #self.logger.info("*********** ERROR STARTING ROUTER: %s" % str(error))
def gui_event_outgoing(self, event):
global task
pass
def router_command_incoming(self, command, router):
global task
if command["_command"] == "subscribe":
self.started = self.time.time()
if command["_command"] == "remove_connection" and task["name"] in ["test", "all_reconnects_on_packetloss"]:
self.logger.error("*********** CODE_EVENT(remove_connection): reconnects += 1")
def subscribed_datamsg_incoming(self, msg, router):
global task
pass
def covert_msg_incoming(self, msg, con):
global task
if msg.get_type() == "Flooding_advertise" and not msg["reflood"] and task["name"] in ["flooding_suboptimal_paths"]:
channel = msg["channel"]
nonce = self.base64.b64decode(bytes(msg["nonce"], "ascii")) # decode nonce
peer_id = con.get_peer_id()
chain = (self.router._find_nonce(nonce, self.router.advertisement_routing_table[channel])
if channel in self.router.advertisement_routing_table else None)
if chain: # new advertisements (chain == None) aren't relevant here
sorting = self.router._compare_nonces(nonce, self.router.advertisement_routing_table[channel][chain].peekitem(0)[0])
if sorting != -1:
return # received advertisement is longer than already known one
publisher = self.router._canonize_active_path_identifier(channel, msg['nonce'])
for subscriber in self.router._ActivePathsMixin__reverse_edges[channel]:
if publisher in self.router._ActivePathsMixin__reverse_edges[channel][subscriber]:
active_peer = self.router._ActivePathsMixin__reverse_edges[channel][subscriber][publisher]["peer"]
if sorting == -1 and active_peer != peer_id:
if self.router.node_id == subscriber:
self.logger.error("*********** CODE_EVENT(shorter_nonce): shorter_subscribers += 1")
else:
self.logger.error("*********** CODE_EVENT(shorter_nonce): shorter_intermediates += 1")
self.logger.info("*********** DEBUG_DATA: node_id=%s, subscriber=%s, msg=%s" % (self.router.node_id, subscriber, str(msg)))
def covert_msg_outgoing(self, msg, con):
global task
# only check first advertisements
if msg.get_type() == "Flooding_advertise" and not msg["reflood"] and task["name"] in ["flooding_master_count"]:
channel = msg["channel"]
nonce = self.base64.b64decode(bytes(msg["nonce"], "ascii")) # decode nonce
peer_id = con.get_peer_id()
chain = (self.router._find_nonce(nonce, self.router.advertisement_routing_table[channel])
if channel in self.router.advertisement_routing_table else None)
shortest_nonce = self.router.advertisement_routing_table[channel][chain].peekitem(0)[0]
if None in self.router.advertisement_routing_table[channel][chain][shortest_nonce] and not self.mutation_logged:
self.logger.error("*********** CODE_EVENT(become_master): master_publishers += 1")
self.logger.info("*********** DEBUG_DATA: node_id=%s" % self.router.node_id)
self.mutation_logged = True
def msg_incoming(self, msg, con):
global task
if task["name"] in [
"test",
"flooding_overlay_construction",
"aco_overlay_construction",
"aco_overlay_construction_bandwidth",
"flooding_overlay_construction_packetloss",
"aco_overlay_construction_packetloss",
"simple_overlay_construction",
"simple_overlay_construction_packetloss",
]:
if msg["channel"] in self.router.subscriptions and msg["id"] not in self.router.seen_data_ids: # only check subscriber perspective
if msg["data"] not in self.data_received:
self.data_received[msg["data"]] = 0
self.data_received[msg["data"]] += 1
self.logger.info("*********** DEBUG_DATA: data_received[%s] --> %s" % (str(msg["data"]), str(self.data_received[msg["data"]])))
if self.data_received[msg["data"]] == task["publishers"] and not self.overlay_constructed:
self.logger.error("*********** CODE_EVENT(overlay_constructed): overlay_construction.append(%.3f)" % (self.time.time() - self.started))
self.logger.info("*********** DEBUG_DATA: node_id = %s" % self.router.node_id)
#TODO: this should be used by the evaluator to stop evaluation earlier if possible
self.logger.info("*********** MEASUREMENT_COMPLETED: %s" % self.router.node_id)
self.overlay_constructed = True
def msg_outgoing(self, msg, con):
global task
#if msg.get_type() == "Flooding_data":
#if self.time.time() - self.started > 60 and "test" in self.router.master and self.router.master["test"] and not self.master_killed:
#self.logger.info("*********** KILLING MASTER NODE: node_id=%s" % self.router.node_id)
#self.master_killed = True
#self._thread.interrupt_main()
pass
| [
1,
29871,
13,
29937,
18610,
1438,
18094,
437,
6058,
1074,
24543,
7191,
29892,
3643,
437,
16053,
2153,
1074,
963,
18610,
13,
29937,
18610,
5534,
24802,
526,
6058,
15579,
29892,
437,
24802,
297,
4770,
2344,
1649,
322,
7868,
963,
304,
385,
5352,
18610,
13,
13,
1990,
2514,
2153,
29898,
5160,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
17927,
1125,
13,
308,
13,
4706,
396,
2069,
3847,
770,
13,
4706,
2428,
2141,
1649,
2344,
12035,
21707,
29897,
13,
308,
13,
4706,
396,
777,
24802,
4312,
2678,
13,
4706,
1583,
29889,
8172,
353,
4770,
5215,
1649,
703,
8172,
1159,
13,
4706,
1583,
29889,
3188,
29953,
29946,
353,
4770,
5215,
1649,
703,
3188,
29953,
29946,
1159,
13,
4706,
1583,
3032,
7097,
353,
4770,
5215,
1649,
703,
29918,
7097,
1159,
13,
4706,
1583,
29889,
2230,
353,
4770,
5215,
1649,
703,
2230,
1159,
13,
308,
13,
4706,
396,
777,
24987,
13,
4706,
396,
1311,
29889,
6207,
29918,
16757,
839,
353,
7700,
13,
4706,
1583,
29889,
2962,
287,
353,
29871,
29900,
13,
4706,
1583,
29889,
1272,
29918,
13556,
2347,
353,
6571,
13,
4706,
1583,
29889,
957,
8387,
29918,
11433,
287,
353,
7700,
13,
4706,
1583,
29889,
6149,
362,
29918,
1188,
3192,
353,
7700,
13,
268,
13,
1678,
822,
1410,
29875,
29918,
6519,
29918,
262,
11506,
29898,
1311,
29892,
1899,
1125,
13,
4706,
5534,
3414,
13,
4706,
1209,
13,
268,
13,
1678,
822,
1410,
29875,
29918,
6519,
29918,
5729,
9446,
29898,
1311,
29892,
1899,
29892,
1059,
1125,
13,
4706,
5534,
3414,
13,
4706,
565,
1899,
3366,
29918,
6519,
3108,
1275,
376,
2962,
1115,
13,
9651,
565,
451,
1059,
29901,
13,
18884,
1209,
1678,
396,
1311,
29889,
21707,
29889,
3888,
703,
4189,
17435,
6850,
8322,
3352,
1159,
13,
9651,
1683,
29901,
13,
18884,
1209,
1678,
396,
1311,
29889,
21707,
29889,
3888,
703,
4189,
17435,
14431,
6850,
8322,
4214,
390,
12015,
1001,
29901,
1273,
29879,
29908,
1273,
851,
29898,
2704,
876,
13,
268,
13,
1678,
822,
1410,
29875,
29918,
3696,
29918,
449,
17696,
29898,
1311,
29892,
1741,
1125,
13,
4706,
5534,
3414,
13,
4706,
1209,
13,
268,
13,
1678,
822,
12876,
29918,
6519,
29918,
262,
11506,
29898,
1311,
29892,
1899,
29892,
12876,
1125,
13,
4706,
5534,
3414,
13,
4706,
565,
1899,
3366,
29918,
6519,
3108,
1275,
376,
19496,
1115,
13,
9651,
1583,
29889,
2962,
287,
353,
1583,
29889,
2230,
29889,
2230,
580,
13,
4706,
565,
1899,
3366,
29918,
6519,
3108,
1275,
376,
5992,
29918,
9965,
29908,
322,
3414,
3366,
978,
3108,
297,
6796,
1688,
613,
376,
497,
29918,
276,
6915,
29879,
29918,
265,
29918,
4058,
300,
6758,
3108,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
4189,
17435,
4810,
2287,
29918,
22240,
3919,
29898,
5992,
29918,
9965,
1125,
337,
6915,
29879,
4619,
29871,
29896,
1159,
13,
268,
13,
1678,
822,
21696,
2580,
29918,
4130,
2232,
29887,
29918,
262,
11506,
29898,
1311,
29892,
10191,
29892,
12876,
1125,
13,
4706,
5534,
3414,
13,
4706,
1209,
13,
268,
13,
1678,
822,
4612,
29873,
29918,
7645,
29918,
262,
11506,
29898,
1311,
29892,
10191,
29892,
378,
1125,
13,
4706,
5534,
3414,
13,
4706,
565,
10191,
29889,
657,
29918,
1853,
580,
1275,
376,
29943,
417,
3689,
29918,
328,
1765,
895,
29908,
322,
451,
10191,
3366,
999,
417,
397,
3108,
322,
3414,
3366,
978,
3108,
297,
6796,
29888,
417,
3689,
29918,
1491,
3670,
3039,
29918,
24772,
3108,
29901,
13,
9651,
8242,
353,
10191,
3366,
12719,
3108,
13,
9651,
1661,
346,
353,
1583,
29889,
3188,
29953,
29946,
29889,
29890,
29953,
29946,
13808,
29898,
13193,
29898,
7645,
3366,
5464,
346,
12436,
376,
294,
18869,
5783,
1678,
396,
21822,
1661,
346,
13,
9651,
23533,
29918,
333,
353,
378,
29889,
657,
29918,
412,
261,
29918,
333,
580,
13,
9651,
9704,
353,
313,
1311,
29889,
15140,
3032,
2886,
29918,
5464,
346,
29898,
5464,
346,
29892,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
29961,
12719,
2314,
13,
462,
4706,
565,
8242,
297,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
1683,
6213,
29897,
13,
9651,
565,
9704,
29901,
539,
396,
716,
18811,
275,
4110,
313,
14153,
1275,
6213,
29897,
9455,
29915,
29873,
8018,
1244,
13,
18884,
16548,
353,
1583,
29889,
15140,
3032,
18307,
29918,
5464,
778,
29898,
5464,
346,
29892,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
29961,
12719,
3816,
14153,
1822,
412,
1416,
667,
29898,
29900,
9601,
29900,
2314,
13,
18884,
565,
16548,
2804,
448,
29896,
29901,
13,
462,
1678,
736,
418,
396,
4520,
18811,
275,
882,
338,
5520,
1135,
2307,
2998,
697,
13,
18884,
9805,
261,
353,
1583,
29889,
15140,
3032,
3068,
265,
675,
29918,
4925,
29918,
2084,
29918,
25378,
29898,
12719,
29892,
10191,
1839,
5464,
346,
11287,
13,
18884,
363,
21696,
495,
297,
1583,
29889,
15140,
3032,
9966,
2605,
29879,
29924,
861,
262,
1649,
24244,
29918,
287,
2710,
29961,
12719,
5387,
13,
462,
1678,
565,
9805,
261,
297,
1583,
29889,
15140,
3032,
9966,
2605,
29879,
29924,
861,
262,
1649,
24244,
29918,
287,
2710,
29961,
12719,
3816,
1491,
7588,
495,
5387,
13,
462,
4706,
6136,
29918,
412,
261,
353,
1583,
29889,
15140,
3032,
9966,
2605,
29879,
29924,
861,
262,
1649,
24244,
29918,
287,
2710,
29961,
12719,
3816,
1491,
7588,
495,
3816,
23679,
261,
29962,
3366,
412,
261,
3108,
13,
462,
4706,
565,
16548,
1275,
448,
29896,
322,
6136,
29918,
412,
261,
2804,
23533,
29918,
333,
29901,
13,
462,
9651,
565,
1583,
29889,
15140,
29889,
3177,
29918,
333,
1275,
21696,
495,
29901,
13,
462,
18884,
1583,
29889,
21707,
29889,
2704,
703,
4189,
17435,
4810,
2287,
29918,
22240,
3919,
29898,
845,
9555,
29918,
5464,
346,
1125,
20511,
29918,
1491,
7588,
2596,
4619,
29871,
29896,
1159,
13,
462,
9651,
1683,
29901,
13,
462,
18884,
1583,
29889,
21707,
29889,
2704,
703,
4189,
17435,
4810,
2287,
29918,
22240,
3919,
29898,
845,
9555,
29918,
5464,
346,
1125,
20511,
29918,
1639,
4210,
1078,
4619,
29871,
29896,
1159,
13,
462,
9651,
1583,
29889,
21707,
29889,
3888,
703,
4189,
17435,
21681,
29918,
14573,
29901,
2943,
29918,
333,
16328,
29879,
29892,
21696,
495,
16328,
29879,
29892,
10191,
16328,
29879,
29908,
1273,
313,
1311,
29889,
15140,
29889,
3177,
29918,
333,
29892,
21696,
495,
29892,
851,
29898,
7645,
4961,
13,
13,
1678,
822,
4612,
29873,
29918,
7645,
29918,
449,
17696,
29898,
1311,
29892,
10191,
29892,
378,
1125,
13,
4706,
5534,
3414,
13,
4706,
396,
871,
1423,
937,
18811,
275,
4110,
13,
4706,
565,
10191,
29889,
657,
29918,
1853,
580,
1275,
376,
29943,
417,
3689,
29918,
328,
1765,
895,
29908,
322,
451,
10191,
3366,
999,
417,
397,
3108,
322,
3414,
3366,
978,
3108,
297,
6796,
29888,
417,
3689,
29918,
6207,
29918,
2798,
3108,
29901,
13,
9651,
8242,
353,
10191,
3366,
12719,
3108,
13,
9651,
1661,
346,
353,
1583,
29889,
3188,
29953,
29946,
29889,
29890,
29953,
29946,
13808,
29898,
13193,
29898,
7645,
3366,
5464,
346,
12436,
376,
294,
18869,
5783,
268,
396,
21822,
1661,
346,
13,
9651,
23533,
29918,
333,
353,
378,
29889,
657,
29918,
412,
261,
29918,
333,
580,
13,
9651,
9704,
353,
313,
1311,
29889,
15140,
3032,
2886,
29918,
5464,
346,
29898,
5464,
346,
29892,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
29961,
12719,
2314,
13,
462,
4706,
565,
8242,
297,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
1683,
6213,
29897,
13,
9651,
3273,
342,
29918,
5464,
346,
353,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
29961,
12719,
3816,
14153,
1822,
412,
1416,
667,
29898,
29900,
9601,
29900,
29962,
13,
9651,
565,
6213,
297,
1583,
29889,
15140,
29889,
328,
1765,
275,
882,
29918,
14608,
292,
29918,
2371,
29961,
12719,
3816,
14153,
3816,
12759,
342,
29918,
5464,
346,
29962,
322,
451,
1583,
29889,
6149,
362,
29918,
1188,
3192,
29901,
13,
18884,
1583,
29889,
21707,
29889,
2704,
703,
4189,
17435,
4810,
2287,
29918,
22240,
3919,
29898,
915,
2763,
29918,
6207,
1125,
5835,
29918,
23679,
414,
4619,
29871,
29896,
1159,
13,
18884,
1583,
29889,
21707,
29889,
3888,
703,
4189,
17435,
21681,
29918,
14573,
29901,
2943,
29918,
333,
16328,
29879,
29908,
1273,
1583,
29889,
15140,
29889,
3177,
29918,
333,
29897,
13,
18884,
1583,
29889,
6149,
362,
29918,
1188,
3192,
353,
5852,
13,
268,
13,
1678,
822,
10191,
29918,
262,
11506,
29898,
1311,
29892,
10191,
29892,
378,
1125,
13,
4706,
5534,
3414,
13,
308,
13,
4706,
565,
3414,
3366,
978,
3108,
297,
518,
13,
9651,
376,
1688,
613,
13,
9651,
376,
29888,
417,
3689,
29918,
957,
8387,
29918,
3075,
4080,
613,
13,
9651,
376,
11216,
29918,
957,
8387,
29918,
3075,
4080,
613,
13,
9651,
376,
11216,
29918,
957,
8387,
29918,
3075,
4080,
29918,
4980,
2103,
613,
13,
9651,
376,
29888,
417,
3689,
29918,
957,
8387,
29918,
3075,
4080,
29918,
4058,
300,
6758,
613,
13,
9651,
376,
11216,
29918,
957,
8387,
29918,
3075,
4080,
29918,
4058,
300,
6758,
613,
13,
9651,
376,
12857,
29918,
957,
8387,
29918,
3075,
4080,
613,
13,
9651,
376,
12857,
29918,
957,
8387,
29918,
3075,
4080,
29918,
4058,
300,
6758,
613,
13,
4706,
4514,
29901,
13,
9651,
565,
10191,
3366,
12719,
3108,
297,
1583,
29889,
15140,
29889,
1491,
7588,
1980,
322,
10191,
3366,
333,
3108,
451,
297,
1583,
29889,
15140,
29889,
28026,
29918,
1272,
29918,
4841,
29901,
418,
396,
871,
1423,
21696,
495,
18520,
13,
18884,
565,
10191,
3366,
1272,
3108,
451,
297,
1583,
29889,
1272,
29918,
13556,
2347,
29901,
13,
462,
1678,
1583,
29889,
1272,
29918,
13556,
2347,
29961,
7645,
3366,
1272,
3108,
29962,
353,
29871,
29900,
13,
18884,
1583,
29889,
1272,
29918,
13556,
2347,
29961,
7645,
3366,
1272,
3108,
29962,
4619,
29871,
29896,
13,
18884,
1583,
29889,
21707,
29889,
3888,
703,
4189,
17435,
21681,
29918,
14573,
29901,
848,
29918,
13556,
2347,
29961,
29995,
29879,
29962,
6660,
1273,
29879,
29908,
1273,
313,
710,
29898,
7645,
3366,
1272,
3108,
511,
851,
29898,
1311,
29889,
1272,
29918,
13556,
2347,
29961,
7645,
3366,
1272,
3108,
29962,
4961,
13,
18884,
565,
1583,
29889,
1272,
29918,
13556,
2347,
29961,
7645,
3366,
1272,
3108,
29962,
1275,
3414,
3366,
23679,
414,
3108,
322,
451,
1583,
29889,
957,
8387,
29918,
11433,
287,
29901,
13,
462,
1678,
1583,
29889,
21707,
29889,
2704,
703,
4189,
17435,
4810,
2287,
29918,
22240,
3919,
29898,
957,
8387,
29918,
11433,
287,
1125,
27292,
29918,
3075,
4080,
29889,
4397,
29898,
15543,
29941,
29888,
5513,
1273,
313,
1311,
29889,
2230,
29889,
2230,
580,
448,
1583,
29889,
2962,
287,
876,
13,
462,
1678,
1583,
29889,
21707,
29889,
3888,
703,
4189,
17435,
21681,
29918,
14573,
29901,
2943,
29918,
333,
353,
1273,
29879,
29908,
1273,
1583,
29889,
15140,
29889,
3177,
29918,
333,
29897,
13,
462,
1678,
396,
4986,
3970,
29901,
445,
881,
367,
1304,
491,
278,
6161,
1061,
304,
5040,
17983,
8859,
565,
1950,
13,
462,
1678,
1583,
29889,
21707,
29889,
3888,
703,
4189,
17435,
22986,
3289,
11499,
13780,
29918,
21514,
1307,
29911,
3352,
29901,
1273,
29879,
29908,
1273,
1583,
29889,
15140,
29889,
3177,
29918,
333,
29897,
13,
462,
1678,
1583,
29889,
957,
8387,
29918,
11433,
287,
353,
5852,
13,
268,
13,
1678,
822,
10191,
29918,
449,
17696,
29898,
1311,
29892,
10191,
29892,
378,
1125,
13,
4706,
5534,
3414,
13,
4706,
396,
361,
10191,
29889,
657,
29918,
1853,
580,
1275,
376,
29943,
417,
3689,
29918,
1272,
1115,
13,
9651,
396,
361,
1583,
29889,
2230,
29889,
2230,
580,
448,
1583,
29889,
2962,
287,
1405,
29871,
29953,
29900,
322,
376,
1688,
29908,
297,
1583,
29889,
15140,
29889,
6207,
322,
1583,
29889,
15140,
29889,
6207,
3366,
1688,
3108,
322,
451,
1583,
29889,
6207,
29918,
16757,
839,
29901,
13,
18884,
396,
1311,
29889,
21707,
29889,
3888,
703,
4189,
17435,
476,
24071,
4214,
14861,
1254,
1001,
11698,
2287,
29901,
2943,
29918,
333,
16328,
29879,
29908,
1273,
1583,
29889,
15140,
29889,
3177,
29918,
333,
29897,
13,
18884,
396,
1311,
29889,
6207,
29918,
16757,
839,
353,
5852,
13,
18884,
396,
1311,
3032,
7097,
29889,
1639,
6685,
29918,
3396,
580,
13,
4706,
1209,
13,
2
] |
bika/lims/browser/worksheet/views/analyses_transposed.py | hocinebendou/bika.gsoc | 0 | 15166 | # coding=utf-8
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from bika.lims.browser.bika_listing import BikaListingTable
from bika.lims.browser.worksheet.views.analyses import AnalysesView
class AnalysesTransposedView(AnalysesView):
""" The view for displaying the table of manage_results transposed.
Analysis Requests are displayed in columns and analyses in rows.
Uses most of the logic provided by BikaListingView through
bika.lims.worksheet.views.AnalysesView to generate the items,
but renders its own template, which is highly specific for
display analysis results. Because of this, some generic
BikaListing functionalities, such as sorting, pagination,
contextual menus for columns, etc. will not work in this view.
"""
def contents_table(self, table_only = True):
""" Overrides contents_table method from the parent class
BikaListingView, using the transposed template instead
of the classic template.
"""
table = AnalysesTransposedTable(bika_listing = self, table_only = True)
return table.render(self)
class AnalysesTransposedTable(BikaListingTable):
""" The BikaListingTable that uses a transposed template for
displaying the results.
"""
render = ViewPageTemplateFile("../templates/analyses_transposed.pt")
render_cell = ViewPageTemplateFile("../templates/analyses_transposed_cell.pt")
def __init__(self, bika_listing = None, table_only = False):
BikaListingTable.__init__(self, bika_listing, True)
self.rows_headers = []
self.trans_items = {}
self.positions = []
self._transpose_data()
def _transpose_data(self):
cached = []
index = 0
#ignore = ['Analysis', 'Service', 'Result', 'ResultDM']
include = ['Attachments', 'DetectionLimit', 'DueDate','Pos', 'ResultDM']
for col in self.bika_listing.review_state['columns']:
if col == 'Result':
# Further interims will be inserted in this position
resindex = index
if col not in include:
continue
lcol = self.bika_listing.columns[col]
self.rows_headers.append({'id': col,
'title': lcol['title'],
'type': lcol.get('type',''),
'row_type': 'field',
'hidden': not lcol.get('toggle', True),
'input_class': lcol.get('input_class',''),
'input_width': lcol.get('input_width','')})
cached.append(col)
index += 1
for item in self.items:
if item['Service'] not in cached:
self.rows_headers.insert(resindex,
{'id': item['Service'],
'title': item['title'],
'type': item.get('type',''),
'row_type': 'analysis',
'index': index})
resindex += 1
cached.append(item['Service'])
pos = item['Pos']
if pos in self.trans_items:
self.trans_items[pos][item['Service']] = item
else:
self.trans_items[pos] = {item['Service']: item}
if pos not in self.positions:
self.positions.append(pos)
def rendered_items(self, cat=None, **kwargs):
return ''
def render_row_cell(self, rowheader, position = ''):
self.current_rowhead = rowheader
self.current_position = position
if rowheader['row_type'] == 'field':
# Only the first item for this position contains common
# data for all the analyses with the same position
its = [i for i in self.items if i['Pos'] == position]
self.current_item = its[0] if its else {}
elif position in self.trans_items \
and rowheader['id'] in self.trans_items[position]:
self.current_item = self.trans_items[position][rowheader['id']]
else:
return ''
return self.render_cell()
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
3166,
10969,
29879,
29889,
29943,
573,
29889,
15965,
29889,
13573,
300,
331,
2341,
1445,
1053,
4533,
5074,
6733,
2283,
13,
3166,
289,
4106,
29889,
2576,
29879,
29889,
15965,
29889,
29890,
4106,
29918,
1761,
292,
1053,
350,
4106,
1293,
292,
3562,
13,
3166,
289,
4106,
29889,
2576,
29879,
29889,
15965,
29889,
1287,
9855,
29889,
7406,
29889,
7054,
952,
267,
1053,
11597,
952,
267,
1043,
13,
13,
13,
1990,
11597,
952,
267,
4300,
4752,
1043,
29898,
21067,
952,
267,
1043,
1125,
13,
1678,
9995,
450,
1776,
363,
16384,
278,
1591,
310,
10933,
29918,
9902,
1301,
4752,
29889,
13,
4706,
24352,
10729,
29879,
526,
8833,
297,
4341,
322,
3483,
952,
267,
297,
4206,
29889,
13,
4706,
10783,
267,
1556,
310,
278,
5900,
4944,
491,
350,
4106,
1293,
292,
1043,
1549,
13,
4706,
289,
4106,
29889,
2576,
29879,
29889,
1287,
9855,
29889,
7406,
29889,
21067,
952,
267,
1043,
304,
5706,
278,
4452,
29892,
13,
4706,
541,
7697,
414,
967,
1914,
4472,
29892,
607,
338,
10712,
2702,
363,
13,
4706,
2479,
7418,
2582,
29889,
7311,
310,
445,
29892,
777,
10035,
13,
4706,
350,
4106,
1293,
292,
13303,
1907,
29892,
1316,
408,
16548,
29892,
10203,
3381,
29892,
13,
4706,
3030,
950,
1757,
375,
363,
4341,
29892,
2992,
29889,
674,
451,
664,
297,
445,
1776,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
8118,
29918,
2371,
29898,
1311,
29892,
1591,
29918,
6194,
353,
5852,
1125,
13,
4706,
9995,
6811,
24040,
8118,
29918,
2371,
1158,
515,
278,
3847,
770,
13,
9651,
350,
4106,
1293,
292,
1043,
29892,
773,
278,
1301,
4752,
4472,
2012,
13,
9651,
310,
278,
22037,
4472,
29889,
13,
4706,
9995,
13,
4706,
1591,
353,
11597,
952,
267,
4300,
4752,
3562,
29898,
29890,
4106,
29918,
1761,
292,
353,
1583,
29892,
1591,
29918,
6194,
353,
5852,
29897,
13,
4706,
736,
1591,
29889,
9482,
29898,
1311,
29897,
13,
13,
13,
1990,
11597,
952,
267,
4300,
4752,
3562,
29898,
29933,
4106,
1293,
292,
3562,
1125,
13,
1678,
9995,
450,
350,
4106,
1293,
292,
3562,
393,
3913,
263,
1301,
4752,
4472,
363,
13,
4706,
16384,
278,
2582,
29889,
13,
1678,
9995,
13,
1678,
4050,
353,
4533,
5074,
6733,
2283,
703,
6995,
20943,
29914,
7054,
952,
267,
29918,
3286,
4752,
29889,
415,
1159,
13,
1678,
4050,
29918,
3729,
353,
4533,
5074,
6733,
2283,
703,
6995,
20943,
29914,
7054,
952,
267,
29918,
3286,
4752,
29918,
3729,
29889,
415,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
289,
4106,
29918,
1761,
292,
353,
6213,
29892,
1591,
29918,
6194,
353,
7700,
1125,
13,
4706,
350,
4106,
1293,
292,
3562,
17255,
2344,
12035,
1311,
29892,
289,
4106,
29918,
1761,
292,
29892,
5852,
29897,
13,
4706,
1583,
29889,
5727,
29918,
13662,
353,
5159,
13,
4706,
1583,
29889,
3286,
29918,
7076,
353,
6571,
13,
4706,
1583,
29889,
1066,
2187,
353,
5159,
13,
4706,
1583,
3032,
3286,
4220,
29918,
1272,
580,
13,
13,
1678,
822,
903,
3286,
4220,
29918,
1272,
29898,
1311,
1125,
13,
4706,
22152,
353,
5159,
13,
4706,
2380,
353,
29871,
29900,
13,
4706,
396,
17281,
353,
6024,
21067,
4848,
742,
525,
3170,
742,
525,
3591,
742,
525,
3591,
23560,
2033,
13,
4706,
3160,
353,
6024,
4165,
496,
1860,
742,
525,
29928,
2650,
428,
24445,
742,
525,
29928,
434,
2539,
3788,
9135,
742,
525,
3591,
23560,
2033,
13,
4706,
363,
784,
297,
1583,
29889,
29890,
4106,
29918,
1761,
292,
29889,
27828,
29918,
3859,
1839,
13099,
2033,
29901,
13,
9651,
565,
784,
1275,
525,
3591,
2396,
13,
18884,
396,
8725,
1006,
9893,
674,
367,
15478,
297,
445,
2602,
13,
18884,
620,
2248,
353,
2380,
13,
9651,
565,
784,
451,
297,
3160,
29901,
13,
18884,
6773,
13,
9651,
301,
1054,
353,
1583,
29889,
29890,
4106,
29918,
1761,
292,
29889,
13099,
29961,
1054,
29962,
13,
9651,
1583,
29889,
5727,
29918,
13662,
29889,
4397,
3319,
29915,
333,
2396,
784,
29892,
13,
462,
308,
525,
3257,
2396,
301,
1054,
1839,
3257,
7464,
13,
462,
308,
525,
1853,
2396,
301,
1054,
29889,
657,
877,
1853,
3788,
5477,
13,
462,
308,
525,
798,
29918,
1853,
2396,
525,
2671,
742,
13,
462,
308,
525,
10892,
2396,
451,
301,
1054,
29889,
657,
877,
13270,
742,
5852,
511,
13,
462,
308,
525,
2080,
29918,
1990,
2396,
301,
1054,
29889,
657,
877,
2080,
29918,
1990,
3788,
5477,
13,
462,
308,
525,
2080,
29918,
2103,
2396,
301,
1054,
29889,
657,
877,
2080,
29918,
2103,
3788,
1495,
1800,
13,
9651,
22152,
29889,
4397,
29898,
1054,
29897,
13,
9651,
2380,
4619,
29871,
29896,
13,
13,
4706,
363,
2944,
297,
1583,
29889,
7076,
29901,
13,
9651,
565,
2944,
1839,
3170,
2033,
451,
297,
22152,
29901,
13,
18884,
1583,
29889,
5727,
29918,
13662,
29889,
7851,
29898,
690,
2248,
29892,
13,
462,
9651,
11117,
333,
2396,
2944,
1839,
3170,
7464,
13,
462,
632,
525,
3257,
2396,
2944,
1839,
3257,
7464,
13,
462,
632,
525,
1853,
2396,
2944,
29889,
657,
877,
1853,
3788,
5477,
13,
462,
632,
525,
798,
29918,
1853,
2396,
525,
15916,
742,
13,
462,
632,
525,
2248,
2396,
2380,
1800,
13,
18884,
620,
2248,
4619,
29871,
29896,
13,
18884,
22152,
29889,
4397,
29898,
667,
1839,
3170,
11287,
13,
13,
9651,
926,
353,
2944,
1839,
9135,
2033,
13,
9651,
565,
926,
297,
1583,
29889,
3286,
29918,
7076,
29901,
13,
18884,
1583,
29889,
3286,
29918,
7076,
29961,
1066,
3816,
667,
1839,
3170,
2033,
29962,
353,
2944,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
3286,
29918,
7076,
29961,
1066,
29962,
353,
426,
667,
1839,
3170,
2033,
29901,
2944,
29913,
13,
9651,
565,
926,
451,
297,
1583,
29889,
1066,
2187,
29901,
13,
18884,
1583,
29889,
1066,
2187,
29889,
4397,
29898,
1066,
29897,
13,
13,
1678,
822,
13751,
29918,
7076,
29898,
1311,
29892,
6635,
29922,
8516,
29892,
3579,
19290,
1125,
13,
4706,
736,
6629,
13,
13,
1678,
822,
4050,
29918,
798,
29918,
3729,
29898,
1311,
29892,
1948,
6672,
29892,
2602,
353,
6629,
1125,
13,
4706,
1583,
29889,
3784,
29918,
798,
2813,
353,
1948,
6672,
13,
4706,
1583,
29889,
3784,
29918,
3283,
353,
2602,
13,
4706,
565,
1948,
6672,
1839,
798,
29918,
1853,
2033,
1275,
525,
2671,
2396,
13,
9651,
396,
9333,
278,
937,
2944,
363,
445,
2602,
3743,
3619,
13,
9651,
396,
848,
363,
599,
278,
3483,
952,
267,
411,
278,
1021,
2602,
13,
9651,
967,
353,
518,
29875,
363,
474,
297,
1583,
29889,
7076,
565,
474,
1839,
9135,
2033,
1275,
2602,
29962,
13,
9651,
1583,
29889,
3784,
29918,
667,
353,
967,
29961,
29900,
29962,
565,
967,
1683,
6571,
13,
13,
4706,
25342,
2602,
297,
1583,
29889,
3286,
29918,
7076,
320,
13,
9651,
322,
1948,
6672,
1839,
333,
2033,
297,
1583,
29889,
3286,
29918,
7076,
29961,
3283,
5387,
13,
9651,
1583,
29889,
3784,
29918,
667,
353,
1583,
29889,
3286,
29918,
7076,
29961,
3283,
3816,
798,
6672,
1839,
333,
2033,
29962,
13,
13,
4706,
1683,
29901,
13,
9651,
736,
6629,
13,
13,
4706,
736,
1583,
29889,
9482,
29918,
3729,
580,
13,
2
] |
ExperimentBasics/migrations/0013_retryexperimentparticipation_retryuseranswer.py | tifat58/lsv-c4-django-webexperiment | 1 | 144220 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2019-01-31 02:10
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Users', '0010_auto_20180606_0002'),
('ExperimentBasics', '0012_auto_20180626_0248'),
]
operations = [
migrations.CreateModel(
name='RetryExperimentParticipation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('started_on', models.DateTimeField(auto_now=True)),
('completed_on', models.DateTimeField(null=True)),
('retry_count', models.IntegerField(default=0)),
('is_active', models.NullBooleanField(default=True)),
('is_delete', models.NullBooleanField(default=False)),
('experiment', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ExperimentBasics.Experiment')),
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Users.UserInfo')),
],
),
migrations.CreateModel(
name='RetryUserAnswer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('re_answer_date', models.DateTimeField(null=True)),
('re_answer_given', models.BooleanField(default=False)),
('re_is_exactly_correct', models.NullBooleanField()),
('re_normalized_form_is_correct', models.NullBooleanField()),
('re_time_spent', models.IntegerField(null=True, validators=[django.core.validators.MinValueValidator(0)])),
('re_answered_question', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='re_answers', to='ExperimentBasics.Question')),
('re_answering_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='re_given_answers', to='Users.UserInfo')),
('re_experiment_participation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='re_given_answers', to='ExperimentBasics.RetryExperimentParticipation')),
],
options={
'db_table': 'retry_user_answers',
},
),
]
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29929,
29889,
29929,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
29941,
29896,
29871,
29900,
29906,
29901,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
9557,
29889,
3221,
29889,
3084,
4097,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
5215,
9557,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
5959,
742,
525,
29900,
29900,
29896,
29900,
29918,
6921,
29918,
29906,
29900,
29896,
29947,
29900,
29953,
29900,
29953,
29918,
29900,
29900,
29900,
29906,
5477,
13,
4706,
6702,
1252,
15362,
9496,
1199,
742,
525,
29900,
29900,
29896,
29906,
29918,
6921,
29918,
29906,
29900,
29896,
29947,
29900,
29953,
29906,
29953,
29918,
29900,
29906,
29946,
29947,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
13,
9651,
1024,
2433,
8015,
719,
1252,
15362,
7439,
12654,
362,
742,
13,
9651,
4235,
11759,
13,
18884,
6702,
333,
742,
4733,
29889,
12300,
3073,
29898,
6921,
29918,
11600,
29922,
5574,
29892,
7601,
29918,
1989,
29922,
5574,
29892,
28755,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1367,
1495,
511,
13,
18884,
6702,
2962,
287,
29918,
265,
742,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29922,
5574,
8243,
13,
18884,
6702,
5729,
9446,
29918,
265,
742,
4733,
29889,
11384,
3073,
29898,
4304,
29922,
5574,
8243,
13,
18884,
6702,
276,
2202,
29918,
2798,
742,
4733,
29889,
7798,
3073,
29898,
4381,
29922,
29900,
8243,
13,
18884,
6702,
275,
29918,
4925,
742,
4733,
29889,
7327,
18146,
3073,
29898,
4381,
29922,
5574,
8243,
13,
18884,
6702,
275,
29918,
8143,
742,
4733,
29889,
7327,
18146,
3073,
29898,
4381,
29922,
8824,
8243,
13,
18884,
6702,
735,
15362,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
304,
2433,
1252,
15362,
9496,
1199,
29889,
1252,
15362,
1495,
511,
13,
18884,
6702,
1792,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
304,
2433,
5959,
29889,
2659,
3401,
1495,
511,
13,
9651,
21251,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
4391,
3195,
29898,
13,
9651,
1024,
2433,
8015,
719,
2659,
22550,
742,
13,
9651,
4235,
11759,
13,
18884,
6702,
333,
742,
4733,
29889,
12300,
3073,
29898,
6921,
29918,
11600,
29922,
5574,
29892,
7601,
29918,
1989,
29922,
5574,
29892,
28755,
29922,
8824,
29892,
26952,
29918,
978,
2433,
1367,
1495,
511,
13,
18884,
6702,
276,
29918,
12011,
29918,
1256,
742,
4733,
29889,
11384,
3073,
29898,
4304,
29922,
5574,
8243,
13,
18884,
6702,
276,
29918,
12011,
29918,
29887,
5428,
742,
4733,
29889,
18146,
3073,
29898,
4381,
29922,
8824,
8243,
13,
18884,
6702,
276,
29918,
275,
29918,
735,
23617,
29918,
15728,
742,
4733,
29889,
7327,
18146,
3073,
25739,
13,
18884,
6702,
276,
29918,
8945,
1891,
29918,
689,
29918,
275,
29918,
15728,
742,
4733,
29889,
7327,
18146,
3073,
25739,
13,
18884,
6702,
276,
29918,
2230,
29918,
1028,
296,
742,
4733,
29889,
7798,
3073,
29898,
4304,
29922,
5574,
29892,
2854,
4097,
11759,
14095,
29889,
3221,
29889,
3084,
4097,
29889,
8140,
1917,
24204,
29898,
29900,
29897,
2314,
511,
13,
18884,
6702,
276,
29918,
12011,
287,
29918,
12470,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
4475,
29918,
978,
2433,
276,
29918,
550,
17538,
742,
304,
2433,
1252,
15362,
9496,
1199,
29889,
16492,
1495,
511,
13,
18884,
6702,
276,
29918,
12011,
292,
29918,
1792,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
4475,
29918,
978,
2433,
276,
29918,
29887,
5428,
29918,
550,
17538,
742,
304,
2433,
5959,
29889,
2659,
3401,
1495,
511,
13,
18884,
6702,
276,
29918,
735,
15362,
29918,
1595,
12654,
362,
742,
4733,
29889,
27755,
2558,
29898,
4304,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
4475,
29918,
978,
2433,
276,
29918,
29887,
5428,
29918,
550,
17538,
742,
304,
2433,
1252,
15362,
9496,
1199,
29889,
8015,
719,
1252,
15362,
7439,
12654,
362,
1495,
511,
13,
9651,
21251,
13,
9651,
3987,
3790,
13,
18884,
525,
2585,
29918,
2371,
2396,
525,
276,
2202,
29918,
1792,
29918,
550,
17538,
742,
13,
9651,
2981,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
dianhua/worker/crawler/china_telecom/guangxi/main.py | Svolcano/python_exercise | 6 | 185060 | # -*- coding: utf-8 -*-
from lxml import etree
from datetime import date
import traceback
import time
import sys
import re
from des_js import des_encode
# 这段代码是用于解决中文报错的问题
reload(sys)
sys.setdefaultencoding("utf8")
from dateutil.relativedelta import relativedelta
if __name__ == '__main__':
sys.path.append('../..')
sys.path.append('../../..')
sys.path.append('../../../..')
from crawler.base_crawler import BaseCrawler
else:
from worker.crawler.base_crawler import BaseCrawler
class Crawler(BaseCrawler):
"""
kwargs 包含
'tel': str,
'pin_pwd': str,
'id_card': str,
'full_name': unicode,
'sms_code': str,
'captcha_code': str
錯誤等級
0: 成功
1: 帳號密碼錯誤
2: 認證碼錯誤
9: 其他錯誤
"""
def __init__(self, **kwargs):
"""
初始化
"""
super(Crawler, self).__init__(**kwargs)
today = date.today()
self.this_month = "%d%02d" % (today.year, today.month)
self.user_no = ''
# 查询方式1,查询方式2
self.flag = 1
def need_parameters(self, **kwargs):
return ['pin_pwd', 'full_name', 'id_card']
def get_login_verify_type(self, **kwargs):
pass
def get_verify_type(self, **kwargs):
return 'SMS'
def login(self, **kwargs):
url = "http://gx.189.cn/public/common/control/dwr/engine.js"
code, key, resp = self.get(url)
if code != 0:
return code, key
try:
scriptSessionId = re.findall('dwr.engine._origScriptSessionId = "([\S]+)";', resp.text)[0]
except:
error = traceback.format_exc()
self.log("crawler", u'获取scriptSessionId失败:{}'.format(error), '')
return 9, 'crawl_error'
# 请求key 用于密码加密
url = 'http://gx.189.cn/chaxun/iframe/user_center.jsp'
code, key, resp = self.get(url)
if code != 0:
return code, key
key1 = re.findall("var key1='(.*?)';", resp.text)
key2 = re.findall("var key2='(.*?)';", resp.text)
key3 = re.findall("var key3='(.*?)';", resp.text)
try:
pin_pwd = '__' + str(des_encode(kwargs['pin_pwd'], key1[0], key2[0], key3[0]))
except:
error = traceback.format_exc()
self.log("crawler", u'加密失败:{}'.format(error), '')
return 9, 'crawl_error'
# 增加访问连接
url = 'http://gx.189.cn/dwr/call/plaincall/Service.excute.dwr'
row_data = """callCount=1
page=/chaxun/iframe/user_center.jsp
httpSessionId=
scriptSessionId={}
c0-scriptName=Service
c0-methodName=excute
c0-id=0
c0-param0=string:WB_IP_ACTION_QRY
c0-param1=boolean:true
c0-e1=string:0.0.0.0
c0-e2=string:24
c0-e3=string:2
c0-param2=Object_Object:{}
batchId=0
""".format(scriptSessionId, '{CUST_IP:reference:c0-e1, TIME_RANGE:reference:c0-e2, LOG_TYPE:reference:c0-e3}')
headers = {
'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp',
'Content-Type': 'text/plain',
'Origin': 'http://gx.189.cn',
}
code, key, resp = self.post(url, data=row_data.replace(' ', ''), headers=headers)
if code != 0:
return code, key
login_url = "http://gx.189.cn/public/login.jsp"
login_data = {
'LOGIN_TYPE': '21',
'RAND_TYPE': '001',
'AREA_CODE': '',
'logon_name': kwargs['tel'],
'password_type_ra': '1',
'logon_passwd': <PASSWORD>,
'logon_valid': '请输入验证码'
}
header = {'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp'}
code, key, login_req = self.post(login_url, data=login_data, headers=header)
if code != 0:
return code, key
if '<flag>0</flag>' in login_req.text:
self.log('crawler', '登录返回信息', login_req)
try:
self.user_no = re.findall('<user_no>(.*)</user_no>', login_req.text)[0]
except:
error = traceback.format_exc()
self.log('website', u'登录出错{}'.format(error), resp)
return 9, 'website_busy_error'
return 0, 'success'
#密码错误时会返回: 对不起,您已经连续输错了2次密码,如连续错误达5次,您的账号将被限制登陆6小时
elif u'验证码错误' in login_req.text:
self.log("website", 'website_busy_error', login_req)
return 9, 'website_busy_error'
elif u'如连续错误达5次' in login_req.text or u'密码错误' in login_req.text:
self.log('user', 'pin_pwd_error', login_req)
return 1, 'pin_pwd_error'
elif u'密码过于简单' in login_req.text:
self.log('user', 'sample_pwd', login_req)
return 1, 'sample_pwd'
elif u'号码不存在' in login_req.text:
self.log('user', 'invalid_tel', login_req)
return 1, 'invalid_tel'
elif u'您的账号在6小时内被限制登陆' in login_req.text:
self.log('user', 'over_query_limit', login_req)
return 9, 'over_query_limit'
elif u'系统繁忙' in login_req.text or '<?xml version="1.0" encoding="utf-8" ?>' in login_req.text:
self.log('website', 'website_busy_error', login_req)
return 9, 'website_busy_error'
elif u'密码锁定' in login_req.text or 'data-resultcode="9113"' in login_req.text:
self.log('crawler', 'website_busy_error', login_req)
return 9, 'website_busy_error'
elif u"信息核对失败" in login_req.text:
self.log("user", "website_busy_error", login_req)
return 9, "website_busy_error"
else:
self.log('crawler', 'html_error', login_req)
return 9, 'html_error'
def send_verify_request(self, **kwargs):
get_iframe_url = "http://gx.189.cn/chaxun/iframe/user_center.jsp"
headers = {
"Referer": "http://gx.189.cn/chaxun/iframe/user_center.jsp"
}
error = u'获取prod_type失败'
for i in range(3):
code, key, resp = self.get(get_iframe_url, headers=headers)
if code != 0:
return code, key, ''
try:
acc_nbr = re.findall(r"ACC_NBR:'(.*?)'", resp.text)[0]
prod_type = re.findall(r"PROD_TYPE:'(.*?)'", resp.text)[0]
break
except:
error = traceback.format_exc()
data = {
'Logon_Name': kwargs['tel'],
'USER_FLAG': '001',
'USE_PROTOCOL': '',
'LOGIN_TYPE': '21',
'USER_NO': self.user_no,
'ESFlag': '8',
'REDIRECT_URL': '/2015/',
}
agree_url = 'http://gx.189.cn/public/user_protocol.jsp'
code, key, response = self.post(agree_url, headers=headers, data=data)
if code != 0:
return code, key, ''
self.log('user', u'用户协议页面', response)
agree_url02 = 'http://gx.189.cn/public/protocollogin.jsp'
data = {
'OPEN_TYPE': '1',
'LOGIN_TYPE': '21',
'USER_NO': self.user_no,
'CUSTBRAND': '',
'ESFlag': '8',
'REDIRECT_URL': '/2015/',
}
code, key, response = self.post(agree_url02, headers=headers, data=data)
if code != 0:
return code, key, ''
self.log('user', u'用户同意页面', response)
next_url = 'http://gx.189.cn/sales/chipmap/chipmaplogin.jsp'
n_header = {
'X-Requested-With': 'XMLHttpRequest',
'Referer': 'http://gx.189.cn/public/protocollogin.jsp',
}
code, key, response = self.post(next_url, headers=n_header)
if code != 0:
return code, key, ''
self.log('user', u'用户同意跳转页面', response)
next_url02 = 'http://gx.189.cn/sales/chipmap/chipmapRecom.jsp'
code, key, response = self.post(next_url02, headers=n_header)
if code != 0:
return code, key, ''
self.log('user', u'用户同意跳转页面02', response)
else:
self.log("crawler", 'html_error: {}'.format(error), resp)
return 9, "html_error", ""
get_post_data_url = "http://gx.189.cn/chaxun/iframe/qdcx.jsp"
headers = {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded",
"Referer": "http://gx.189.cn/chaxun/iframe/user_center.jsp"
}
data = {
"ACC_NBR": acc_nbr,
"PROD_TYPE": prod_type
}
code, key, resp = self.post(get_post_data_url, headers=headers, data=data)
if code != 0:
return code, key, ""
sms_data = {}
try:
et = etree.HTML(resp.text)
er_name = et.xpath('//form[@id="frmGetPwd"]/input/@name')
er_value = et.xpath('//form[@id="frmGetPwd"]/input/@value')
for name, value in zip(er_name, er_value):
sms_data[name] = value
except:
error = traceback.format_exc()
self.log("crawler", "html_error{}".format(error), resp)
return 9, "html_error", ""
sms_url = 'http://gx.189.cn/service/bill/getRand.jsp'
header = {
'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp'
}
data = {
'FIND_TYPE': '1031', # 市话
'radioQryType': 'on', # 按月查询
'ACCT_DATE': self.this_month,
'ACCT_DATE_1': self.this_month,
'PASSWORD': '',
'CUST_NAME': '',
'CARD_TYPE': '1', # 使用居民身份证
'CARD_NO': ''
}
data.update(sms_data)
code, key, resp = self.post(sms_url, data=data, headers=header)
if code != 0:
return code, key, ''
if '<flag>0</flag>' in resp.text:
return 0, "success", ""
elif u'您短时间内不能重复获取随机密码' in resp.text:
self.log('crawler', 'send_sms_too_quick_error', resp)
return 9, 'send_sms_too_quick_error', ''
elif u'您输入的手机号码有误或不存在' in resp.text:
self.log('user', 'invalid_tel', resp)
return 1, 'invalid_tel', ''
else:
self.log('crawler', 'html_error', resp)
return 9, 'html_error', ''
def verify(self, **kwargs):
cookie_url = 'http://gx.189.cn/public/realname/checkRealName.jsp'
header = {
'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp',
'Content-Type': 'application/x-www-form-urlencoded'
}
data = {
'NUM': kwargs['tel'],
'V_PASSWORD': kwargs['<PASSWORD>'],
'CUST_NAME': kwargs['full_name'].encode("utf8"),
'CARD_NO': kwargs['id_card'],
'CARD_TYPE': '1',
'RAND_TYPE': '002'
}
code, key, resp = self.post(cookie_url, data=data, headers=header)
if code != 0:
return code, key
if '<PrivilegeLevel>1</PrivilegeLevel>' in resp.text:
verify_url = 'http://gx.189.cn/chaxun/iframe/inxxall_new.jsp'
header = {
'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp',
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/x-www-form-urlencoded'
}
data = {
'PRODTYPE': '2020966',
'RAND_TYPE': '002',
'BureauCode': '1300',
'ACC_NBR': kwargs['tel'],
'PROD_TYPE': '2020966',
'PROD_PWD': '',
'REFRESH_FLAG': '1',
'BEGIN_DATE': '',
'END_DATE': '',
'SERV_NO': '',
'QRY_FLAG': '1',
'MOBILE_NAME': kwargs['tel'],
'OPER_TYPE': 'CR1',
'FIND_TYPE': '1041',
'radioQryType': 'on',
'ACCT_DATE': self.this_month,
'ACCT_DATE_1': self.this_month,
'PASSWORD': kwargs['<PASSWORD>'],
'CUST_NAME': kwargs['full_name'].encode("utf8"),
'CARD_TYPE': '1',
'CARD_NO': kwargs['id_card']
}
code, key, response = self.post(verify_url, data=data, headers=header)
if code != 0:
return code, key
if 'mask_div_id' in response.text:
if '<option value="1037" >本地拨打异地清单</option>' in response.text:
self.flag = 2
return 0, 'success'
else:
self.log('crawler', 'html_error', response)
return 9, 'html_error'
elif u'对不起,您输入的名字或证件号码不正确' in resp.text:
self.log('user', 'user_name_error or user_id_error', resp)
return 2, 'user_name_error'
elif u'验证码错误' in resp.text:
self.log('user', 'verify_error', resp)
return 2, 'verify_error'
elif u'系统繁忙' in resp.text:
self.log("website", 'website_busy_error', resp)
return 9, 'website_busy_error'
elif u'未进行实名验证' in resp.text:
self.log("user", u"您的号码未进行实名验证,请您携带有效证件到当地营业厅办理实名登记", resp)
return 9, 'real_name_registration_error'
else:
self.log('crawler', 'html_error', resp)
return 9, 'html_error'
def crawl_call_log(self, **kwargs):
missing_list = []
possibly_missing_list = []
website_num = 0
crawler_num = 0
today = date.today()
call_log = []
search_month = [x for x in range(0, -6, -1)]
#这个列表 表示详单类型, 1041是漫游通话清单, 1040是长话清单,1031是市话清单,1035是国际及港澳台清单
if self.flag == 1:
FIND_TYPE_LIST = ['1041', '1040', '1031', '1035']
else:
FIND_TYPE_LIST = ['1037', '1038', '1039']
for each_month in search_month:
#这个变量用来统计这个月的可能缺失类型个数, 当可能缺失类型个数达到4个的时候, 加到possibly_missing
month_type = 0
for call_type in FIND_TYPE_LIST:
query_date = today + relativedelta(months=each_month)
query_month = "%d%02d" % (query_date.year, query_date.month)
if query_month == self.this_month:
last_month = query_month
else:
query_date = query_date + relativedelta(months=1)
last_month = "%d%02d" % (query_date.year, query_date.month)
key, level, call_log_history, wrong_flag = self.deal_call_log(call_type, kwargs['tel'], query_month, last_month)
if level == -1:
month_type += 1
elif level != 0:
missing_list.append(query_month)
if wrong_flag == 'website':
website_num += 1
elif wrong_flag == 'crawler':
crawler_num += 1
else:
if call_log_history:
call_log.extend(call_log_history)
else:
month_type += 1
if month_type == 4:
possibly_missing_list.append(query_month)
missing_list = list(set(missing_list))
if len(missing_list) == 6 or len(possibly_missing_list) == 6:
return 9, 'website_busy_error', call_log, missing_list, possibly_missing_list
if crawler_num > 0:
return 9, 'crawl_error', call_log, missing_list, possibly_missing_list
return 0, "success", call_log, missing_list, possibly_missing_list
def deal_call_log(self, call_type, tel, query_month, last_month):
call_log_url = 'http://gx.189.cn/chaxun/iframe/inxxall_new.jsp'
header = {
'Referer': 'http://gx.189.cn/chaxun/iframe/user_center.jsp'
}
data = {
'ACC_NBR': tel,
'PROD_TYPE': '2020966',
'BEGIN_DATE': '',
'END_DATE': '',
'REFRESH_FLAG': '1',
'QRY_FLAG': '1',
'FIND_TYPE': call_type,
'radioQryType': 'on',
'ACCT_DATE': query_month,
'ACCT_DATE_1': last_month
}
for retry in xrange(self.max_retry):
code, key, resp = self.post(call_log_url, headers=header, data=data)
if code != 0 or u'无记录</td>' in resp.text or u'错误日志序号' in resp.text:
continue
else:
break
else:
if code != 0:
return key, code, [], 'website'
else:
self.log('crawler', '没有查找到相关数据', resp)
return '', -1, '', ''
key, level, message, call_month_log = self.call_log_get(resp.text, query_month)
if level != 0:
self.log('crawler', message, resp)
return "html_error", 9, [], 'crawler'
if not call_month_log:
self.log('website', 'no data', resp)
return 'success', 0, call_month_log, ''
def call_log_get(self, response, query_month):
"""
`call_tel` | string | 18202541892 | 电话号码 |
| `call_cost` | string | 0.00 | 通话费用 |
| `call_time` | timestamp | `1487900810` | 通话起始时间, 如果运营商原始数据不是时间戳,需要转换成时间戳 |
| `call_method` | string | 主叫 | 呼叫类型, 固定枚举类型: `主叫`, `被叫`, 如果运营商原始数据不是主叫被叫,需要转换成主叫被叫字符串 |
| `call_type` | string | 本地 | 通话类型(本地, 长途) |
| `call_from` | string | 北京市 | 本机通话地 |
| `call_to` | string | 长沙市 | 对方归属地 |
| `call_duration` | integer | 300 | 通话时长(秒),
"""
call_month_log = []
try:
html_tree = etree.HTML(response)
log_list = html_tree.xpath('//table[@id="list_table"]/tr')[2:-1]
for log in log_list:
data = {}
row_data = log.xpath('./td/text()')
if len(row_data) <= 1:
continue
call_time = log.xpath('./td[2]/text()')[0]
is_time = len(call_time.split(":"))
if is_time == 3:
data['month'] = query_month
data['call_method'] = log.xpath('./td[4]/text()')[0]
data['call_tel'] = log.xpath('./td[5]/text()')[0] if log.xpath('./td[5]/text()') else ''
call_time = log.xpath('./td[2]/text()')[0]
data['call_time'] = self.time_format(call_time)
call_duration = log.xpath('./td[6]/text()')[0]
time_temp = call_duration.split(':')
data['call_duration'] = str(int(time_temp[0]) * 60 * 60 + int(time_temp[1]) * 60 + int(time_temp[2]))
data['call_type'] = ''
# data['call_from'] = log.xpath('./td[3]/text()')[0] if log.xpath('./td[3]/text()') else ''
raw_call_from = log.xpath('./td[3]/text()')[0] if log.xpath('./td[3]/text()') else ''
call_from, error = self.formatarea(raw_call_from)
if call_from:
data['call_from'] = call_from
else:
self.log("crawler", "{} {}".format(error, raw_call_from), "")
data['call_from'] = raw_call_from
data['call_to'] = ''
data['call_cost'] = log.xpath('./td[8]/text()')[0] if log.xpath('./td[8]/text()') else ''
call_month_log.append(data)
else:
call_method = log.xpath('./td[2]/text()')[0]
# 目录走这个,其余会走上面
if call_method == u'起始时间':
continue
data['month'] = query_month
data['call_method'] = call_method
data['call_tel'] = log.xpath('./td[5]/text()')[0] if log.xpath('./td[5]/text()') else ''
call_time = log.xpath('./td[6]/text()')[0]
data['call_time'] = self.time_format(call_time)
data['call_duration'] = log.xpath('./td[7]/text()')[0]
data['call_type'] = ''
data['call_from'] = log.xpath('./td[3]/text()')[0] if log.xpath('./td[3]/text()') else ''
data['call_to'] = ''
data['call_cost'] = log.xpath('./td[9]/text()')[0] if log.xpath('./td[9]/text()') else ''
call_month_log.append(data)
except:
error = traceback.format_exc()
return 'html_error', 9, 'html_error ' + error, call_month_log
return 'success', 0, 'success', call_month_log
def crawl_info(self, **kwargs):
"""
爬取帳戶資訊
return
status_key: str, 狀態碼金鑰,參考status_code
level: int, 錯个i他誤等級
message: unicode, 詳細的錯誤信息
info: dict, 帳戶信息,參考帳戶信息格式
"""
info_url = 'http://gx.189.cn/service/manage/my_selfinfo.jsp'
header = {
'X-Requested-With': 'XMLHttpRequest',
}
code, key, res = self.post(info_url, headers=header)
if code != 0:
return code, key, {}
full_name = re.findall(u'name="USER_NAME" value="(.*?)"', res.text)
full_name = full_name[0] if full_name else ''
user_info_data = {
'full_name': full_name,
'id_card': '',
'open_date': '',
'address': ''
}
return 0, "success", user_info_data
def time_format(self, timeoo):
call_time = re.findall('\d{2}', timeoo)
call_time_change = call_time[0] + call_time[1] + '-' + call_time[2] + '-' + call_time[
3] + ' ' + call_time[4] + ':' + call_time[5] + ':' + call_time[6]
timeArray = time.strptime(call_time_change, "%Y-%m-%d %H:%M:%S")
call_time_timeStamp = str(int(time.mktime(timeArray)))
return call_time_timeStamp
def crawl_phone_bill(self, **kwargs):
missing_list = []
phone_bill = list()
today = date.today()
# 没有当月账单
search_month = [x for x in range(-1, -6, -1)]
bill_url = 'http://gx.189.cn/chaxun/iframe/cust_zd.jsp'
header = {'X-Requested-With': 'XMLHttpRequest'}
crawl_num = 0
for each_month in search_month:
query_date = today + relativedelta(months=each_month)
query_month = "%d%02d" % (query_date.year, query_date.month)
params = {
'ACC_NBR': kwargs['tel'],
'DATE': query_month,
'_': int(time.time() * 1000)
}
for retry in xrange(self.max_retry):
code, key, resp = self.get(bill_url, params=params, headers=header)
if code != 0:
continue
if u'错误日志序号:' in resp.text:
if retry == self.max_retry - 1:
self.log('user', '账单为空', resp)
continue
code, key, message, result = self.crawl_month_bill(query_month, resp.text)
if code != 0:
if retry == self.max_retry - 1:
crawl_num += 1
self.log('crawler', message, resp)
continue
phone_bill.append(result)
break
else:
# 访问出错不再记日志
missing_list.append(query_month)
if len(missing_list) == 5:
if crawl_num > 1:
return 9, 'crawl_error', phone_bill, missing_list
return 9, 'website_busy_error', phone_bill, missing_list
return 0, 'success', phone_bill, missing_list
def crawl_month_bill(self, query_month, resp):
month_fee_data = {}
month_fee_data['bill_month'] = query_month
month_fee_data['bill_amount'] = ''
month_fee_data['bill_ext_calls'] = ''
month_fee_data['bill_ext_data'] = ''
month_fee_data['bill_ext_sms'] = ''
month_fee_data['bill_zengzhifei'] = ''
month_fee_data['bill_daishoufei'] = ''
month_fee_data['bill_qita'] = ''
try:
bill_package = re.findall(u'套餐月基本费.*?x">(\d+\.\d+)<', resp, re.S)
month_fee_data['bill_package'] = bill_package[0] if len(bill_package) else ''
bill_ext_sms = re.findall(u'国内短信费.*?x">(\d+\.\d+)<', resp, re.S)
month_fee_data['bill_ext_sms'] = bill_ext_sms[0] if len(bill_ext_sms) else ''
bill_amount = re.findall(u'本期费用合计:(\d+\.\d+)元', resp, re.S)
month_fee_data['bill_amount'] = bill_amount[0] if len(bill_amount) else ''
except:
error = traceback.format_exc()
return 9, 'html_error', 'html_error'+error, {}
return 0, 'success', 'success', month_fee_data
if __name__ == '__main__':
c = Crawler()
# TEL = "18076766149"
# USER_PASSWORD = "<PASSWORD>"
# ID_CARD = '14072319930902003X'
# USER_NAME = '青培'
# TEL = "18078454964"
# USER_PASSWORD = "941667"
# ID_CARD = '110229199501253824'
# USER_NAME = '王阳'
USER_PASSWORD = "<PASSWORD>"
ID_CARD = '130981199605276614'
USER_NAME = '韩映辉'
TEL = "17377135156"
# TEL = "17377135152"
# self_test
c.self_test(tel=TEL, pin_pwd=<PASSWORD>, id_card=ID_CARD, full_name=USER_NAME) | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
3166,
301,
3134,
1053,
634,
929,
30004,
13,
3166,
12865,
1053,
2635,
30004,
13,
5215,
9637,
1627,
30004,
13,
5215,
931,
30004,
13,
5215,
10876,
30004,
13,
5215,
337,
30004,
13,
3166,
553,
29918,
1315,
1053,
553,
29918,
12508,
30004,
13,
29937,
29871,
30810,
31559,
30690,
31183,
30392,
30406,
30909,
31201,
232,
137,
182,
30275,
30333,
233,
141,
168,
31745,
30210,
31658,
31596,
30004,
13,
28120,
29898,
9675,
8443,
13,
9675,
29889,
842,
4381,
22331,
703,
9420,
29947,
1159,
30004,
13,
3166,
2635,
4422,
29889,
2674,
1926,
287,
2554,
1053,
14215,
287,
2554,
30004,
13,
30004,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
30004,
13,
1678,
10876,
29889,
2084,
29889,
4397,
877,
6995,
636,
1495,
30004,
13,
1678,
10876,
29889,
2084,
29889,
4397,
877,
21546,
636,
1495,
30004,
13,
1678,
10876,
29889,
2084,
29889,
4397,
877,
21546,
6995,
636,
1495,
30004,
13,
1678,
515,
29349,
1358,
29889,
3188,
29918,
29883,
1610,
1358,
1053,
7399,
29907,
1610,
1358,
30004,
13,
2870,
29901,
30004,
13,
1678,
515,
15645,
29889,
29883,
1610,
1358,
29889,
3188,
29918,
29883,
1610,
1358,
1053,
7399,
29907,
1610,
1358,
30004,
13,
30004,
13,
1990,
315,
1610,
1358,
29898,
5160,
29907,
1610,
1358,
1125,
30004,
13,
1678,
9995,
30004,
13,
30004,
13,
1678,
9049,
5085,
29871,
31473,
232,
147,
174,
30004,
13,
4706,
525,
28497,
2396,
851,
11167,
13,
4706,
525,
12687,
29918,
29886,
9970,
2396,
851,
11167,
13,
4706,
525,
333,
29918,
7543,
2396,
851,
11167,
13,
4706,
525,
8159,
29918,
978,
2396,
29104,
11167,
13,
4706,
525,
29879,
1516,
29918,
401,
2396,
851,
11167,
13,
4706,
525,
17885,
5815,
29918,
401,
2396,
851,
30004,
13,
268,
236,
143,
178,
235,
173,
167,
31184,
234,
183,
157,
30004,
13,
308,
29900,
29901,
29871,
30494,
31134,
30004,
13,
308,
29896,
29901,
29871,
232,
187,
182,
235,
156,
162,
31461,
234,
165,
191,
236,
143,
178,
235,
173,
167,
30004,
13,
308,
29906,
29901,
29871,
235,
173,
144,
235,
176,
140,
234,
165,
191,
236,
143,
178,
235,
173,
167,
30004,
13,
308,
29929,
29901,
29871,
31149,
31221,
236,
143,
178,
235,
173,
167,
30004,
13,
1678,
9995,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
9995,
30004,
13,
308,
31120,
31020,
30705,
30004,
13,
4706,
9995,
30004,
13,
4706,
2428,
29898,
29907,
1610,
1358,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
8443,
13,
4706,
9826,
353,
2635,
29889,
27765,
26471,
13,
4706,
1583,
29889,
1366,
29918,
10874,
353,
11860,
29881,
29995,
29900,
29906,
29881,
29908,
1273,
313,
27765,
29889,
6360,
29892,
9826,
29889,
10874,
8443,
13,
4706,
1583,
29889,
1792,
29918,
1217,
353,
6629,
30004,
13,
30004,
13,
4706,
396,
29871,
31213,
235,
178,
165,
30525,
30607,
29896,
30214,
31213,
235,
178,
165,
30525,
30607,
29906,
30004,
13,
4706,
1583,
29889,
15581,
353,
29871,
29896,
30004,
13,
30004,
13,
1678,
822,
817,
29918,
16744,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
736,
6024,
12687,
29918,
29886,
9970,
742,
525,
8159,
29918,
978,
742,
525,
333,
29918,
7543,
2033,
30004,
13,
30004,
13,
1678,
822,
679,
29918,
7507,
29918,
27902,
29918,
1853,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
679,
29918,
27902,
29918,
1853,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
736,
525,
29903,
4345,
29915,
30004,
13,
30004,
13,
1678,
822,
6464,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
3142,
353,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
9435,
29914,
6451,
29914,
29881,
15866,
29914,
10599,
29889,
1315,
19451,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
657,
29898,
2271,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
2471,
7317,
1204,
353,
337,
29889,
2886,
497,
877,
29881,
15866,
29889,
10599,
3032,
12683,
4081,
7317,
1204,
353,
376,
4197,
29905,
29903,
10062,
29897,
1769,
742,
4613,
29889,
726,
9601,
29900,
29962,
30004,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
9651,
1583,
29889,
1188,
703,
29883,
1610,
1358,
613,
318,
29915,
31024,
30683,
2154,
7317,
1204,
31369,
31955,
29901,
8875,
4286,
4830,
29898,
2704,
511,
27255,
30004,
13,
9651,
736,
29871,
29929,
29892,
525,
29883,
1610,
29880,
29918,
2704,
29915,
30004,
13,
30004,
13,
4706,
396,
29871,
31088,
31376,
1989,
29871,
30406,
30909,
31461,
31183,
30666,
31461,
30004,
13,
4706,
3142,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
29915,
30004,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
657,
29898,
2271,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
30004,
13,
4706,
1820,
29896,
353,
337,
29889,
2886,
497,
703,
1707,
1820,
29896,
2433,
28104,
7897,
2670,
613,
4613,
29889,
726,
8443,
13,
4706,
1820,
29906,
353,
337,
29889,
2886,
497,
703,
1707,
1820,
29906,
2433,
28104,
7897,
2670,
613,
4613,
29889,
726,
8443,
13,
4706,
1820,
29941,
353,
337,
29889,
2886,
497,
703,
1707,
1820,
29941,
2433,
28104,
7897,
2670,
613,
4613,
29889,
726,
8443,
13,
4706,
1018,
29901,
30004,
13,
9651,
12534,
29918,
29886,
9970,
353,
525,
1649,
29915,
718,
851,
29898,
2783,
29918,
12508,
29898,
19290,
1839,
12687,
29918,
29886,
9970,
7464,
1820,
29896,
29961,
29900,
1402,
1820,
29906,
29961,
29900,
1402,
1820,
29941,
29961,
29900,
12622,
30004,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
9651,
1583,
29889,
1188,
703,
29883,
1610,
1358,
613,
318,
29915,
30666,
31461,
31369,
31955,
29901,
8875,
4286,
4830,
29898,
2704,
511,
27255,
30004,
13,
9651,
736,
29871,
29929,
29892,
525,
29883,
1610,
29880,
29918,
2704,
29915,
30004,
13,
30004,
13,
4706,
396,
29871,
232,
165,
161,
30666,
235,
177,
194,
31658,
31903,
31092,
30004,
13,
4706,
3142,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
29881,
15866,
29914,
4804,
29914,
13974,
3742,
497,
29914,
3170,
29889,
735,
29883,
1082,
29889,
29881,
15866,
29915,
30004,
13,
4706,
1948,
29918,
1272,
353,
9995,
4804,
3981,
29922,
29896,
30004,
13,
4706,
1813,
14327,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
30004,
13,
4706,
1732,
7317,
1204,
29922,
30004,
13,
4706,
2471,
7317,
1204,
3790,
8117,
13,
4706,
274,
29900,
29899,
2154,
1170,
29922,
3170,
30004,
13,
4706,
274,
29900,
29899,
5696,
1170,
29922,
735,
29883,
1082,
30004,
13,
4706,
274,
29900,
29899,
333,
29922,
29900,
30004,
13,
4706,
274,
29900,
29899,
3207,
29900,
29922,
1807,
29901,
29956,
29933,
29918,
5690,
29918,
24705,
29918,
29984,
13207,
30004,
13,
4706,
274,
29900,
29899,
3207,
29896,
29922,
20054,
29901,
3009,
30004,
13,
4706,
274,
29900,
29899,
29872,
29896,
29922,
1807,
29901,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
30004,
13,
4706,
274,
29900,
29899,
29872,
29906,
29922,
1807,
29901,
29906,
29946,
30004,
13,
4706,
274,
29900,
29899,
29872,
29941,
29922,
1807,
29901,
29906,
30004,
13,
4706,
274,
29900,
29899,
3207,
29906,
29922,
2061,
29918,
2061,
26254,
8117,
13,
4706,
9853,
1204,
29922,
29900,
30004,
13,
4706,
5124,
1642,
4830,
29898,
2154,
7317,
1204,
29892,
22372,
29907,
17321,
29918,
5690,
29901,
5679,
29901,
29883,
29900,
29899,
29872,
29896,
29892,
323,
8890,
29918,
29934,
24336,
29901,
5679,
29901,
29883,
29900,
29899,
29872,
29906,
29892,
25401,
29918,
11116,
29901,
5679,
29901,
29883,
29900,
29899,
29872,
29941,
29913,
1495,
30004,
13,
4706,
9066,
353,
3336,
13,
9651,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
23592,
13,
9651,
525,
3916,
29899,
1542,
2396,
525,
726,
29914,
24595,
23592,
13,
9651,
525,
23182,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
23592,
13,
4706,
4970,
13,
30004,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
2490,
29898,
2271,
29892,
848,
29922,
798,
29918,
1272,
29889,
6506,
877,
13420,
525,
5477,
9066,
29922,
13662,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
30004,
13,
30004,
13,
4706,
6464,
29918,
2271,
353,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
7507,
29889,
21318,
19451,
13,
4706,
6464,
29918,
1272,
353,
3336,
13,
9651,
525,
14480,
1177,
29918,
11116,
2396,
525,
29906,
29896,
23592,
13,
9651,
525,
29934,
9468,
29918,
11116,
2396,
525,
29900,
29900,
29896,
23592,
13,
9651,
525,
29909,
1525,
29909,
29918,
16524,
2396,
15516,
30004,
13,
9651,
525,
1188,
265,
29918,
978,
2396,
9049,
5085,
1839,
28497,
7464,
30004,
13,
9651,
525,
5630,
29918,
1853,
29918,
336,
2396,
12,
29915,
29896,
23592,
13,
9651,
525,
1188,
265,
29918,
3364,
9970,
2396,
529,
25711,
17013,
10202,
30004,
13,
9651,
525,
1188,
265,
29918,
3084,
2396,
525,
31088,
31573,
30752,
236,
173,
143,
235,
178,
132,
31183,
29915,
30004,
13,
4706,
4970,
13,
4706,
4839,
353,
11117,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
29915,
8117,
13,
4706,
775,
29892,
1820,
29892,
6464,
29918,
7971,
353,
1583,
29889,
2490,
29898,
7507,
29918,
2271,
29892,
848,
29922,
7507,
29918,
1272,
29892,
9066,
29922,
6672,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
30004,
13,
30004,
13,
4706,
565,
12801,
15581,
29958,
29900,
829,
15581,
16299,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
31451,
31283,
31086,
30742,
30689,
31021,
742,
6464,
29918,
7971,
8443,
13,
9651,
1018,
29901,
30004,
13,
18884,
1583,
29889,
1792,
29918,
1217,
353,
337,
29889,
2886,
497,
877,
29966,
1792,
29918,
1217,
5961,
5575,
29897,
829,
1792,
29918,
1217,
29958,
742,
6464,
29918,
7971,
29889,
726,
9601,
29900,
29962,
30004,
13,
9651,
5174,
29901,
30004,
13,
18884,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
18884,
1583,
29889,
1188,
877,
22942,
742,
318,
29915,
31451,
31283,
30544,
31745,
8875,
4286,
4830,
29898,
2704,
511,
4613,
8443,
13,
18884,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
29915,
30004,
13,
9651,
736,
29871,
29900,
29892,
525,
8698,
29915,
30004,
13,
9651,
396,
31461,
31183,
31745,
235,
178,
178,
30594,
30437,
31086,
30742,
30383,
29871,
30783,
30413,
31558,
30214,
233,
133,
171,
31290,
31412,
31903,
234,
190,
176,
31573,
31745,
30743,
29906,
30936,
31461,
31183,
30214,
30847,
31903,
234,
190,
176,
31745,
235,
178,
178,
31798,
29945,
30936,
30214,
233,
133,
171,
30210,
235,
183,
169,
30850,
30998,
31407,
31175,
31072,
31451,
236,
156,
137,
29953,
30446,
30594,
30004,
13,
4706,
25342,
318,
29915,
236,
173,
143,
235,
178,
132,
31183,
31745,
235,
178,
178,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
703,
22942,
613,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
30847,
31903,
234,
190,
176,
31745,
235,
178,
178,
31798,
29945,
30936,
29915,
297,
6464,
29918,
7971,
29889,
726,
470,
318,
29915,
31461,
31183,
31745,
235,
178,
178,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
12687,
29918,
29886,
9970,
29918,
2704,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29896,
29892,
525,
12687,
29918,
29886,
9970,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
31461,
31183,
31138,
30909,
234,
177,
131,
31166,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
11249,
29918,
29886,
9970,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29896,
29892,
525,
11249,
29918,
29886,
9970,
29915,
30004,
13,
4706,
25342,
318,
29915,
30850,
31183,
30413,
30946,
30505,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
20965,
29918,
28497,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29896,
29892,
525,
20965,
29918,
28497,
29915,
30004,
13,
4706,
25342,
318,
29915,
233,
133,
171,
30210,
235,
183,
169,
30850,
30505,
29953,
30446,
30594,
30728,
31407,
31175,
31072,
31451,
236,
156,
137,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
957,
29918,
1972,
29918,
13400,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
957,
29918,
1972,
29918,
13400,
29915,
30004,
13,
4706,
25342,
318,
29915,
31185,
31675,
234,
188,
132,
232,
194,
156,
29915,
297,
6464,
29918,
7971,
29889,
726,
470,
525,
8169,
3134,
1873,
543,
29896,
29889,
29900,
29908,
8025,
543,
9420,
29899,
29947,
29908,
6681,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
22942,
742,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
31461,
31183,
236,
151,
132,
30495,
29915,
297,
6464,
29918,
7971,
29889,
726,
470,
525,
1272,
29899,
2914,
401,
543,
29929,
29896,
29896,
29941,
29908,
29915,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29908,
30689,
31021,
233,
163,
187,
30783,
31369,
31955,
29908,
297,
6464,
29918,
7971,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
703,
1792,
613,
376,
22942,
29918,
8262,
29891,
29918,
2704,
613,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
376,
22942,
29918,
8262,
29891,
29918,
2704,
19451,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
1420,
29918,
2704,
742,
6464,
29918,
7971,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
1420,
29918,
2704,
29915,
30004,
13,
30004,
13,
1678,
822,
3638,
29918,
27902,
29918,
3827,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
679,
29918,
22000,
29918,
2271,
353,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
19451,
13,
4706,
9066,
353,
3336,
13,
9651,
376,
1123,
571,
261,
1115,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
19451,
13,
4706,
4970,
13,
4706,
1059,
353,
318,
29915,
31024,
30683,
10633,
29918,
1853,
31369,
31955,
29915,
30004,
13,
4706,
363,
474,
297,
3464,
29898,
29941,
1125,
30004,
13,
9651,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
657,
29898,
657,
29918,
22000,
29918,
2271,
29892,
9066,
29922,
13662,
8443,
13,
9651,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
18884,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
9651,
1018,
29901,
30004,
13,
18884,
1035,
29918,
29876,
1182,
353,
337,
29889,
2886,
497,
29898,
29878,
29908,
2477,
29907,
29918,
29940,
15176,
11283,
28104,
7897,
29915,
613,
4613,
29889,
726,
9601,
29900,
29962,
30004,
13,
18884,
11859,
29918,
1853,
353,
337,
29889,
2886,
497,
29898,
29878,
29908,
8618,
29928,
29918,
11116,
11283,
28104,
7897,
29915,
613,
4613,
29889,
726,
9601,
29900,
29962,
30004,
13,
18884,
2867,
30004,
13,
9651,
5174,
29901,
30004,
13,
18884,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
18884,
848,
353,
3336,
13,
462,
1678,
525,
3403,
265,
29918,
1170,
2396,
9049,
5085,
1839,
28497,
7464,
30004,
13,
462,
1678,
525,
11889,
29918,
26516,
2396,
525,
29900,
29900,
29896,
23592,
13,
462,
1678,
525,
17171,
29918,
8618,
4986,
15032,
2396,
15516,
30004,
13,
462,
1678,
525,
14480,
1177,
29918,
11116,
2396,
525,
29906,
29896,
23592,
13,
462,
1678,
525,
11889,
29918,
6632,
2396,
1583,
29889,
1792,
29918,
1217,
11167,
13,
462,
1678,
525,
2890,
21979,
2396,
525,
29947,
23592,
13,
462,
1678,
525,
1525,
4571,
26282,
29918,
4219,
2396,
8207,
29906,
29900,
29896,
29945,
29914,
23592,
13,
18884,
4970,
13,
18884,
8661,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
1792,
29918,
20464,
29889,
21318,
29915,
30004,
13,
18884,
775,
29892,
1820,
29892,
2933,
353,
1583,
29889,
2490,
29898,
351,
929,
29918,
2271,
29892,
9066,
29922,
13662,
29892,
848,
29922,
1272,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
18884,
1583,
29889,
1188,
877,
1792,
742,
318,
29915,
30406,
31229,
232,
144,
146,
235,
177,
177,
31610,
30806,
742,
2933,
8443,
13,
18884,
8661,
29918,
2271,
29900,
29906,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
20464,
7507,
29889,
21318,
29915,
30004,
13,
18884,
848,
353,
3336,
13,
462,
1678,
525,
4590,
1430,
29918,
11116,
2396,
525,
29896,
23592,
13,
462,
1678,
525,
14480,
1177,
29918,
11116,
2396,
525,
29906,
29896,
23592,
13,
462,
1678,
525,
11889,
29918,
6632,
2396,
1583,
29889,
1792,
29918,
1217,
11167,
13,
462,
1678,
525,
29907,
17321,
15176,
9468,
2396,
15516,
30004,
13,
462,
1678,
525,
2890,
21979,
2396,
525,
29947,
23592,
13,
462,
1678,
525,
1525,
4571,
26282,
29918,
4219,
2396,
8207,
29906,
29900,
29896,
29945,
29914,
23592,
13,
18884,
4970,
13,
18884,
775,
29892,
1820,
29892,
2933,
353,
1583,
29889,
2490,
29898,
351,
929,
29918,
2271,
29900,
29906,
29892,
9066,
29922,
13662,
29892,
848,
29922,
1272,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
18884,
1583,
29889,
1188,
877,
1792,
742,
318,
29915,
30406,
31229,
30980,
31474,
31610,
30806,
742,
2933,
8443,
13,
30004,
13,
18884,
2446,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
29879,
2122,
29914,
305,
666,
1958,
29914,
305,
666,
1958,
7507,
29889,
21318,
29915,
30004,
13,
18884,
302,
29918,
6672,
353,
3336,
13,
462,
1678,
525,
29990,
29899,
3089,
287,
29899,
3047,
2396,
525,
9165,
26021,
23592,
13,
462,
1678,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
20464,
7507,
29889,
21318,
23592,
13,
18884,
4970,
13,
18884,
775,
29892,
1820,
29892,
2933,
353,
1583,
29889,
2490,
29898,
4622,
29918,
2271,
29892,
9066,
29922,
29876,
29918,
6672,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
30004,
13,
18884,
1583,
29889,
1188,
877,
1792,
742,
318,
29915,
30406,
31229,
30980,
31474,
235,
186,
182,
31415,
31610,
30806,
742,
2933,
8443,
13,
18884,
2446,
29918,
2271,
29900,
29906,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
29879,
2122,
29914,
305,
666,
1958,
29914,
305,
666,
1958,
1123,
510,
29889,
21318,
29915,
30004,
13,
18884,
775,
29892,
1820,
29892,
2933,
353,
1583,
29889,
2490,
29898,
4622,
29918,
2271,
29900,
29906,
29892,
9066,
29922,
29876,
29918,
6672,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
18884,
1583,
29889,
1188,
877,
1792,
742,
318,
29915,
30406,
31229,
30980,
31474,
235,
186,
182,
31415,
31610,
30806,
29900,
29906,
742,
2933,
8443,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
29889,
1188,
703,
29883,
1610,
1358,
613,
525,
1420,
29918,
2704,
29901,
6571,
4286,
4830,
29898,
2704,
511,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
376,
1420,
29918,
2704,
613,
5124,
30004,
13,
30004,
13,
4706,
679,
29918,
2490,
29918,
1272,
29918,
2271,
353,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
29939,
13891,
29916,
29889,
21318,
19451,
13,
4706,
9066,
353,
3336,
13,
9651,
376,
29990,
29899,
3089,
287,
29899,
3047,
1115,
376,
9165,
26021,
15231,
13,
9651,
376,
3916,
29899,
1542,
1115,
376,
6214,
29914,
29916,
29899,
1636,
29899,
689,
29899,
2271,
26716,
15231,
13,
9651,
376,
1123,
571,
261,
1115,
376,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
19451,
13,
4706,
4970,
13,
4706,
848,
353,
3336,
13,
9651,
376,
2477,
29907,
29918,
29940,
15176,
1115,
1035,
29918,
29876,
1182,
11167,
13,
9651,
376,
8618,
29928,
29918,
11116,
1115,
11859,
29918,
1853,
30004,
13,
4706,
4970,
13,
30004,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
2490,
29898,
657,
29918,
2490,
29918,
1272,
29918,
2271,
29892,
9066,
29922,
13662,
29892,
848,
29922,
1272,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
29892,
5124,
30004,
13,
4706,
269,
1516,
29918,
1272,
353,
6571,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
634,
353,
634,
929,
29889,
7020,
29898,
13713,
29889,
726,
8443,
13,
9651,
604,
29918,
978,
353,
634,
29889,
23635,
877,
458,
689,
17548,
333,
543,
1341,
29885,
2577,
29925,
9970,
3108,
29914,
2080,
29368,
978,
1495,
30004,
13,
9651,
604,
29918,
1767,
353,
634,
29889,
23635,
877,
458,
689,
17548,
333,
543,
1341,
29885,
2577,
29925,
9970,
3108,
29914,
2080,
29368,
1767,
1495,
30004,
13,
9651,
363,
1024,
29892,
995,
297,
14319,
29898,
261,
29918,
978,
29892,
604,
29918,
1767,
1125,
30004,
13,
18884,
269,
1516,
29918,
1272,
29961,
978,
29962,
353,
995,
30004,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
9651,
1583,
29889,
1188,
703,
29883,
1610,
1358,
613,
376,
1420,
29918,
2704,
8875,
1642,
4830,
29898,
2704,
511,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
376,
1420,
29918,
2704,
613,
5124,
30004,
13,
30004,
13,
4706,
269,
1516,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
5509,
29914,
29890,
453,
29914,
657,
29934,
392,
29889,
21318,
29915,
30004,
13,
4706,
4839,
353,
3336,
13,
9651,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
29915,
30004,
13,
4706,
4970,
13,
4706,
848,
353,
3336,
13,
9651,
525,
29943,
22255,
29918,
11116,
2396,
525,
29896,
29900,
29941,
29896,
742,
259,
396,
29871,
30461,
31852,
30004,
13,
9651,
525,
13399,
29984,
719,
1542,
2396,
12,
29915,
265,
742,
29871,
396,
29871,
31590,
30534,
31213,
235,
178,
165,
30004,
13,
9651,
525,
2477,
1783,
29918,
6248,
2396,
1583,
29889,
1366,
29918,
10874,
11167,
13,
9651,
525,
2477,
1783,
29918,
6248,
29918,
29896,
2396,
1583,
29889,
1366,
29918,
10874,
11167,
13,
9651,
525,
25711,
17013,
2396,
15516,
30004,
13,
9651,
525,
29907,
17321,
29918,
5813,
2396,
15516,
30004,
13,
9651,
525,
29907,
17011,
29918,
11116,
2396,
525,
29896,
742,
29871,
396,
29871,
30785,
30406,
31924,
30855,
31687,
231,
190,
192,
235,
178,
132,
30004,
13,
9651,
525,
29907,
17011,
29918,
6632,
2396,
6629,
30004,
13,
4706,
4970,
13,
4706,
848,
29889,
5504,
29898,
29879,
1516,
29918,
1272,
8443,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
2490,
29898,
29879,
1516,
29918,
2271,
29892,
848,
29922,
1272,
29892,
9066,
29922,
6672,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
29892,
6629,
30004,
13,
4706,
565,
12801,
15581,
29958,
29900,
829,
15581,
16299,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
736,
29871,
29900,
29892,
376,
8698,
613,
5124,
30004,
13,
4706,
25342,
318,
29915,
233,
133,
171,
234,
162,
176,
30594,
31016,
30728,
30413,
30815,
30908,
31810,
31024,
30683,
236,
157,
146,
31429,
31461,
31183,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
6717,
29918,
29879,
1516,
29918,
517,
29877,
29918,
24561,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
6717,
29918,
29879,
1516,
29918,
517,
29877,
29918,
24561,
29918,
2704,
742,
6629,
30004,
13,
4706,
25342,
318,
29915,
233,
133,
171,
31573,
30752,
30210,
30880,
31429,
30850,
31183,
30417,
235,
178,
178,
31391,
30413,
30946,
30505,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
20965,
29918,
28497,
742,
4613,
8443,
13,
9651,
736,
29871,
29896,
29892,
525,
20965,
29918,
28497,
742,
6629,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
1420,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
1420,
29918,
2704,
742,
6629,
30004,
13,
30004,
13,
1678,
822,
11539,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
15327,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
3597,
29914,
6370,
978,
29914,
3198,
21713,
1170,
29889,
21318,
29915,
30004,
13,
4706,
4839,
353,
3336,
13,
9651,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
23592,
13,
9651,
525,
3916,
29899,
1542,
2396,
525,
6214,
29914,
29916,
29899,
1636,
29899,
689,
29899,
2271,
26716,
29915,
30004,
13,
4706,
4970,
13,
4706,
848,
353,
3336,
13,
9651,
525,
13967,
2396,
12,
19290,
1839,
28497,
7464,
30004,
13,
9651,
525,
29963,
29918,
25711,
17013,
2396,
9049,
5085,
1839,
29966,
25711,
17013,
29958,
7464,
30004,
13,
9651,
525,
29907,
17321,
29918,
5813,
2396,
9049,
5085,
1839,
8159,
29918,
978,
13359,
12508,
703,
9420,
29947,
4968,
30004,
13,
9651,
525,
29907,
17011,
29918,
6632,
2396,
9049,
5085,
1839,
333,
29918,
7543,
7464,
30004,
13,
9651,
525,
29907,
17011,
29918,
11116,
2396,
525,
29896,
23592,
13,
9651,
525,
29934,
9468,
29918,
11116,
2396,
525,
29900,
29900,
29906,
29915,
30004,
13,
4706,
4970,
13,
4706,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
2490,
29898,
21509,
29918,
2271,
29892,
848,
29922,
1272,
29892,
9066,
29922,
6672,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
30004,
13,
4706,
565,
12801,
29925,
1150,
488,
479,
10108,
29958,
29896,
829,
29925,
1150,
488,
479,
10108,
16299,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
11539,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
262,
4419,
497,
29918,
1482,
29889,
21318,
29915,
30004,
13,
9651,
4839,
353,
3336,
13,
18884,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
23592,
13,
18884,
525,
29990,
29899,
3089,
287,
29899,
3047,
2396,
525,
9165,
26021,
23592,
13,
18884,
525,
3916,
29899,
1542,
2396,
525,
6214,
29914,
29916,
29899,
1636,
29899,
689,
29899,
2271,
26716,
29915,
30004,
13,
9651,
4970,
13,
9651,
848,
353,
3336,
13,
18884,
525,
8618,
29928,
11116,
2396,
525,
29906,
29900,
29906,
29900,
29929,
29953,
29953,
23592,
13,
18884,
525,
29934,
9468,
29918,
11116,
2396,
525,
29900,
29900,
29906,
23592,
13,
18884,
525,
29933,
13411,
3399,
2396,
525,
29896,
29941,
29900,
29900,
23592,
13,
18884,
525,
2477,
29907,
29918,
29940,
15176,
2396,
9049,
5085,
1839,
28497,
7464,
30004,
13,
18884,
525,
8618,
29928,
29918,
11116,
2396,
525,
29906,
29900,
29906,
29900,
29929,
29953,
29953,
23592,
13,
18884,
525,
8618,
29928,
29918,
29925,
24668,
2396,
15516,
30004,
13,
18884,
525,
25866,
1525,
7068,
29918,
26516,
2396,
12,
29915,
29896,
23592,
13,
18884,
525,
29933,
17958,
29918,
6248,
2396,
15516,
30004,
13,
18884,
525,
11794,
29918,
6248,
2396,
15516,
30004,
13,
18884,
525,
6304,
29963,
29918,
6632,
2396,
15516,
30004,
13,
18884,
525,
29984,
13207,
29918,
26516,
2396,
12,
29915,
29896,
23592,
13,
18884,
525,
6720,
12809,
1307,
29918,
5813,
2396,
9049,
5085,
1839,
28497,
7464,
30004,
13,
18884,
525,
4590,
1001,
29918,
11116,
2396,
525,
11341,
29896,
23592,
13,
18884,
525,
29943,
22255,
29918,
11116,
2396,
525,
29896,
29900,
29946,
29896,
23592,
13,
18884,
525,
13399,
29984,
719,
1542,
2396,
12,
29915,
265,
23592,
13,
18884,
525,
2477,
1783,
29918,
6248,
2396,
1583,
29889,
1366,
29918,
10874,
11167,
13,
18884,
525,
2477,
1783,
29918,
6248,
29918,
29896,
2396,
1583,
29889,
1366,
29918,
10874,
11167,
13,
18884,
525,
25711,
17013,
2396,
12,
19290,
1839,
29966,
25711,
17013,
29958,
7464,
30004,
13,
18884,
525,
29907,
17321,
29918,
5813,
2396,
9049,
5085,
1839,
8159,
29918,
978,
13359,
12508,
703,
9420,
29947,
4968,
30004,
13,
18884,
525,
29907,
17011,
29918,
11116,
2396,
525,
29896,
23592,
13,
18884,
525,
29907,
17011,
29918,
6632,
2396,
9049,
5085,
1839,
333,
29918,
7543,
2033,
30004,
13,
9651,
4970,
13,
9651,
775,
29892,
1820,
29892,
2933,
353,
1583,
29889,
2490,
29898,
27902,
29918,
2271,
29892,
848,
29922,
1272,
29892,
9066,
29922,
6672,
8443,
13,
9651,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
18884,
736,
775,
29892,
1820,
30004,
13,
9651,
565,
525,
13168,
29918,
4563,
29918,
333,
29915,
297,
2933,
29889,
726,
29901,
30004,
13,
18884,
565,
12801,
3385,
995,
543,
29896,
29900,
29941,
29955,
29908,
29871,
1405,
30346,
30533,
233,
142,
171,
31656,
232,
191,
133,
30533,
30989,
31166,
829,
3385,
16299,
297,
2933,
29889,
726,
29901,
30004,
13,
462,
1678,
1583,
29889,
15581,
353,
29871,
29906,
30004,
13,
18884,
736,
29871,
29900,
29892,
525,
8698,
29915,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
1420,
29918,
2704,
742,
2933,
8443,
13,
18884,
736,
29871,
29929,
29892,
525,
1420,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
30783,
30413,
31558,
29892,
233,
133,
171,
31573,
30752,
30210,
30548,
30578,
31391,
235,
178,
132,
30631,
30850,
31183,
30413,
30724,
31835,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
1792,
29918,
978,
29918,
2704,
470,
1404,
29918,
333,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29906,
29892,
525,
1792,
29918,
978,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
236,
173,
143,
235,
178,
132,
31183,
31745,
235,
178,
178,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
1792,
742,
525,
27902,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29906,
29892,
525,
27902,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
31185,
31675,
234,
188,
132,
232,
194,
156,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
703,
22942,
613,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
29915,
30004,
13,
4706,
25342,
318,
29915,
31295,
31174,
30448,
31195,
30548,
236,
173,
143,
235,
178,
132,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
9651,
1583,
29889,
1188,
703,
1792,
613,
318,
29908,
233,
133,
171,
30210,
30850,
31183,
31295,
31174,
30448,
31195,
30548,
236,
173,
143,
235,
178,
132,
30214,
31088,
233,
133,
171,
233,
147,
189,
232,
187,
169,
30417,
31944,
235,
178,
132,
30631,
30780,
30948,
30533,
235,
147,
168,
31729,
232,
145,
136,
232,
141,
161,
30687,
31195,
30548,
31451,
31410,
613,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
6370,
29918,
978,
29918,
1727,
8306,
29918,
2704,
29915,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
1420,
29918,
2704,
742,
4613,
8443,
13,
9651,
736,
29871,
29929,
29892,
525,
1420,
29918,
2704,
29915,
30004,
13,
30004,
13,
1678,
822,
29349,
29880,
29918,
4804,
29918,
1188,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
4567,
29918,
1761,
353,
5159,
30004,
13,
4706,
10075,
29918,
27259,
29918,
1761,
353,
5159,
30004,
13,
4706,
4700,
29918,
1949,
353,
29871,
29900,
30004,
13,
4706,
29349,
1358,
29918,
1949,
353,
29871,
29900,
30004,
13,
4706,
9826,
353,
2635,
29889,
27765,
26471,
13,
4706,
1246,
29918,
1188,
353,
5159,
30004,
13,
30004,
13,
4706,
2740,
29918,
10874,
353,
518,
29916,
363,
921,
297,
3464,
29898,
29900,
29892,
448,
29953,
29892,
448,
29896,
4638,
30004,
13,
4706,
396,
30810,
30502,
31025,
30746,
29871,
30746,
30858,
235,
178,
169,
31166,
30832,
30883,
30214,
29871,
29896,
29900,
29946,
29896,
30392,
233,
191,
174,
233,
187,
187,
30768,
31852,
30989,
31166,
30214,
29871,
29896,
29900,
29946,
29900,
30392,
31143,
31852,
30989,
31166,
30214,
29896,
29900,
29941,
29896,
30392,
30461,
31852,
30989,
31166,
30214,
29896,
29900,
29941,
29945,
30392,
30356,
236,
156,
136,
31436,
31449,
233,
193,
182,
31037,
30989,
31166,
30004,
13,
4706,
565,
1583,
29889,
15581,
1275,
29871,
29896,
29901,
30004,
13,
9651,
383,
22255,
29918,
11116,
29918,
24360,
353,
6024,
29896,
29900,
29946,
29896,
742,
525,
29896,
29900,
29946,
29900,
742,
525,
29896,
29900,
29941,
29896,
742,
525,
29896,
29900,
29941,
29945,
2033,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
383,
22255,
29918,
11116,
29918,
24360,
353,
6024,
29896,
29900,
29941,
29955,
742,
525,
29896,
29900,
29941,
29947,
742,
525,
29896,
29900,
29941,
29929,
2033,
30004,
13,
30004,
13,
4706,
363,
1269,
29918,
10874,
297,
2740,
29918,
10874,
29901,
30004,
13,
9651,
396,
30810,
30502,
31462,
31180,
30406,
30805,
31675,
31466,
30810,
30502,
30534,
30210,
30682,
30815,
234,
191,
189,
31369,
30832,
30883,
30502,
30354,
30214,
29871,
30948,
30682,
30815,
234,
191,
189,
31369,
30832,
30883,
30502,
30354,
31798,
30780,
29946,
30502,
30210,
30594,
31974,
30214,
29871,
30666,
30780,
28802,
14981,
29918,
27259,
30004,
13,
9651,
4098,
29918,
1853,
353,
29871,
29900,
30004,
13,
9651,
363,
1246,
29918,
1853,
297,
383,
22255,
29918,
11116,
29918,
24360,
29901,
30004,
13,
18884,
2346,
29918,
1256,
353,
9826,
718,
14215,
287,
2554,
29898,
10874,
29879,
29922,
4204,
29918,
10874,
8443,
13,
18884,
2346,
29918,
10874,
353,
11860,
29881,
29995,
29900,
29906,
29881,
29908,
1273,
313,
1972,
29918,
1256,
29889,
6360,
29892,
2346,
29918,
1256,
29889,
10874,
8443,
13,
18884,
565,
2346,
29918,
10874,
1275,
1583,
29889,
1366,
29918,
10874,
29901,
30004,
13,
462,
1678,
1833,
29918,
10874,
353,
2346,
29918,
10874,
30004,
13,
18884,
1683,
29901,
30004,
13,
462,
1678,
2346,
29918,
1256,
353,
2346,
29918,
1256,
718,
14215,
287,
2554,
29898,
10874,
29879,
29922,
29896,
8443,
13,
462,
1678,
1833,
29918,
10874,
353,
11860,
29881,
29995,
29900,
29906,
29881,
29908,
1273,
313,
1972,
29918,
1256,
29889,
6360,
29892,
2346,
29918,
1256,
29889,
10874,
8443,
13,
30004,
13,
18884,
1820,
29892,
3233,
29892,
1246,
29918,
1188,
29918,
18434,
29892,
2743,
29918,
15581,
353,
1583,
29889,
311,
284,
29918,
4804,
29918,
1188,
29898,
4804,
29918,
1853,
29892,
9049,
5085,
1839,
28497,
7464,
2346,
29918,
10874,
29892,
1833,
29918,
10874,
8443,
13,
18884,
565,
3233,
1275,
448,
29896,
29901,
30004,
13,
462,
1678,
4098,
29918,
1853,
4619,
29871,
29896,
30004,
13,
18884,
25342,
3233,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
4567,
29918,
1761,
29889,
4397,
29898,
1972,
29918,
10874,
8443,
13,
462,
1678,
565,
2743,
29918,
15581,
1275,
525,
22942,
2396,
30004,
13,
462,
4706,
4700,
29918,
1949,
4619,
29871,
29896,
30004,
13,
462,
1678,
25342,
2743,
29918,
15581,
1275,
525,
29883,
1610,
1358,
2396,
30004,
13,
462,
4706,
29349,
1358,
29918,
1949,
4619,
29871,
29896,
30004,
13,
18884,
1683,
29901,
30004,
13,
462,
1678,
565,
1246,
29918,
1188,
29918,
18434,
29901,
30004,
13,
462,
4706,
1246,
29918,
1188,
29889,
21843,
29898,
4804,
29918,
1188,
29918,
18434,
8443,
13,
462,
1678,
1683,
29901,
30004,
13,
462,
4706,
4098,
29918,
1853,
4619,
29871,
29896,
30004,
13,
9651,
565,
4098,
29918,
1853,
1275,
29871,
29946,
29901,
30004,
13,
18884,
10075,
29918,
27259,
29918,
1761,
29889,
4397,
29898,
1972,
29918,
10874,
8443,
13,
4706,
4567,
29918,
1761,
353,
1051,
29898,
842,
29898,
27259,
29918,
1761,
876,
30004,
13,
4706,
565,
7431,
29898,
27259,
29918,
1761,
29897,
1275,
29871,
29953,
470,
7431,
29898,
28802,
14981,
29918,
27259,
29918,
1761,
29897,
1275,
29871,
29953,
29901,
30004,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
1246,
29918,
1188,
29892,
4567,
29918,
1761,
29892,
10075,
29918,
27259,
29918,
1761,
30004,
13,
4706,
565,
29349,
1358,
29918,
1949,
1405,
29871,
29900,
29901,
30004,
13,
9651,
736,
29871,
29929,
29892,
525,
29883,
1610,
29880,
29918,
2704,
742,
1246,
29918,
1188,
29892,
4567,
29918,
1761,
29892,
10075,
29918,
27259,
29918,
1761,
30004,
13,
4706,
736,
29871,
29900,
29892,
376,
8698,
613,
1246,
29918,
1188,
29892,
4567,
29918,
1761,
29892,
10075,
29918,
27259,
29918,
1761,
30004,
13,
30004,
13,
1678,
822,
5376,
29918,
4804,
29918,
1188,
29898,
1311,
29892,
1246,
29918,
1853,
29892,
13547,
29892,
2346,
29918,
10874,
29892,
1833,
29918,
10874,
1125,
30004,
13,
4706,
1246,
29918,
1188,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
262,
4419,
497,
29918,
1482,
29889,
21318,
29915,
30004,
13,
4706,
4839,
353,
3336,
13,
9651,
525,
1123,
571,
261,
2396,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
1792,
29918,
5064,
29889,
21318,
29915,
30004,
13,
4706,
4970,
13,
4706,
848,
353,
3336,
13,
9651,
525,
2477,
29907,
29918,
29940,
15176,
2396,
13547,
11167,
13,
9651,
525,
8618,
29928,
29918,
11116,
2396,
525,
29906,
29900,
29906,
29900,
29929,
29953,
29953,
23592,
13,
9651,
525,
29933,
17958,
29918,
6248,
2396,
15516,
30004,
13,
9651,
525,
11794,
29918,
6248,
2396,
15516,
30004,
13,
9651,
525,
25866,
1525,
7068,
29918,
26516,
2396,
525,
29896,
23592,
13,
9651,
525,
29984,
13207,
29918,
26516,
2396,
525,
29896,
23592,
13,
9651,
525,
29943,
22255,
29918,
11116,
2396,
1246,
29918,
1853,
11167,
13,
9651,
525,
13399,
29984,
719,
1542,
2396,
525,
265,
23592,
13,
9651,
525,
2477,
1783,
29918,
6248,
2396,
2346,
29918,
10874,
11167,
13,
9651,
525,
2477,
1783,
29918,
6248,
29918,
29896,
2396,
1833,
29918,
10874,
30004,
13,
4706,
4970,
13,
4706,
363,
337,
2202,
297,
921,
3881,
29898,
1311,
29889,
3317,
29918,
276,
2202,
1125,
30004,
13,
9651,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
2490,
29898,
4804,
29918,
1188,
29918,
2271,
29892,
9066,
29922,
6672,
29892,
848,
29922,
1272,
8443,
13,
9651,
565,
775,
2804,
29871,
29900,
470,
318,
29915,
31352,
31410,
31283,
829,
1594,
16299,
297,
4613,
29889,
726,
470,
318,
29915,
31745,
235,
178,
178,
30325,
31096,
31463,
30850,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
18884,
6773,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
2867,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
18884,
736,
1820,
29892,
775,
29892,
19997,
525,
22942,
29915,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
525,
31423,
30417,
31213,
233,
140,
193,
30780,
30990,
31057,
30354,
30763,
742,
4613,
8443,
13,
18884,
736,
15516,
448,
29896,
29892,
15516,
6629,
30004,
13,
4706,
1820,
29892,
3233,
29892,
2643,
29892,
1246,
29918,
10874,
29918,
1188,
353,
1583,
29889,
4804,
29918,
1188,
29918,
657,
29898,
13713,
29889,
726,
29892,
2346,
29918,
10874,
8443,
13,
4706,
565,
3233,
2804,
29871,
29900,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
2643,
29892,
4613,
8443,
13,
9651,
736,
376,
1420,
29918,
2704,
613,
29871,
29929,
29892,
19997,
525,
29883,
1610,
1358,
29915,
30004,
13,
4706,
565,
451,
1246,
29918,
10874,
29918,
1188,
29901,
30004,
13,
9651,
1583,
29889,
1188,
877,
22942,
742,
525,
1217,
848,
742,
4613,
8443,
13,
4706,
736,
525,
8698,
742,
29871,
29900,
29892,
1246,
29918,
10874,
29918,
1188,
29892,
6629,
30004,
13,
30004,
13,
1678,
822,
1246,
29918,
1188,
29918,
657,
29898,
1311,
29892,
2933,
29892,
2346,
29918,
10874,
1125,
30004,
13,
4706,
9995,
30004,
13,
4706,
421,
4804,
29918,
28497,
29952,
891,
1347,
891,
29871,
29896,
29947,
29906,
29900,
29906,
29945,
29946,
29896,
29947,
29929,
29906,
891,
29871,
31679,
31852,
30850,
31183,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
18253,
29952,
891,
1347,
891,
29871,
29900,
29889,
29900,
29900,
891,
29871,
30768,
31852,
235,
183,
188,
30406,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
2230,
29952,
891,
14334,
891,
421,
29896,
29946,
29947,
29955,
29929,
29900,
29900,
29947,
29896,
29900,
29952,
891,
29871,
30768,
31852,
31558,
31020,
30594,
31016,
29892,
29871,
30847,
30801,
31894,
235,
147,
168,
31427,
30667,
31020,
30354,
30763,
30413,
30392,
30594,
31016,
233,
139,
182,
30214,
31383,
30698,
31415,
31640,
30494,
30594,
31016,
233,
139,
182,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
5696,
29952,
891,
1347,
891,
29871,
30888,
232,
146,
174,
891,
29871,
232,
148,
191,
232,
146,
174,
30832,
30883,
29892,
29871,
232,
158,
189,
30495,
233,
161,
157,
231,
187,
193,
30832,
30883,
30383,
421,
30888,
232,
146,
174,
1673,
421,
31407,
232,
146,
174,
1673,
29871,
30847,
30801,
31894,
235,
147,
168,
31427,
30667,
31020,
30354,
30763,
30413,
30392,
30888,
232,
146,
174,
31407,
232,
146,
174,
30214,
31383,
30698,
31415,
31640,
30494,
30888,
232,
146,
174,
31407,
232,
146,
174,
30578,
31277,
31767,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
1853,
29952,
891,
1347,
891,
29871,
30346,
30533,
891,
29871,
30768,
31852,
30832,
30883,
30419,
30346,
30533,
29892,
29871,
31143,
236,
131,
151,
30409,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
3166,
29952,
891,
1347,
891,
29871,
30662,
30675,
30461,
891,
29871,
30346,
31429,
30768,
31852,
30533,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
517,
29952,
891,
1347,
891,
29871,
31143,
31476,
30461,
891,
29871,
30783,
30525,
232,
192,
149,
31360,
30533,
891,
30004,
13,
4706,
891,
421,
4804,
29918,
19708,
29952,
891,
6043,
891,
29871,
29941,
29900,
29900,
891,
29871,
30768,
31852,
30594,
31143,
29898,
234,
170,
149,
511,
30004,
13,
4706,
9995,
30004,
13,
4706,
1246,
29918,
10874,
29918,
1188,
353,
5159,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
3472,
29918,
8336,
353,
634,
929,
29889,
7020,
29898,
5327,
8443,
13,
9651,
1480,
29918,
1761,
353,
3472,
29918,
8336,
29889,
23635,
877,
458,
2371,
17548,
333,
543,
1761,
29918,
2371,
3108,
29914,
509,
29861,
29906,
13018,
29896,
29962,
30004,
13,
9651,
363,
1480,
297,
1480,
29918,
1761,
29901,
30004,
13,
18884,
848,
353,
6571,
30004,
13,
18884,
1948,
29918,
1272,
353,
1480,
29889,
23635,
877,
6904,
1594,
29914,
726,
580,
1495,
30004,
13,
18884,
565,
7431,
29898,
798,
29918,
1272,
29897,
5277,
29871,
29896,
29901,
30004,
13,
462,
1678,
6773,
30004,
13,
18884,
1246,
29918,
2230,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29906,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
18884,
338,
29918,
2230,
353,
7431,
29898,
4804,
29918,
2230,
29889,
5451,
703,
29901,
5783,
30004,
13,
18884,
565,
338,
29918,
2230,
1275,
29871,
29941,
29901,
30004,
13,
462,
1678,
848,
1839,
10874,
2033,
353,
2346,
29918,
10874,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
5696,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29946,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
28497,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29945,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29945,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
1246,
29918,
2230,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29906,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
2230,
2033,
353,
1583,
29889,
2230,
29918,
4830,
29898,
4804,
29918,
2230,
8443,
13,
462,
1678,
1246,
29918,
19708,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29953,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
931,
29918,
7382,
353,
1246,
29918,
19708,
29889,
5451,
877,
29901,
1495,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
19708,
2033,
353,
851,
29898,
524,
29898,
2230,
29918,
7382,
29961,
29900,
2314,
334,
29871,
29953,
29900,
334,
29871,
29953,
29900,
718,
938,
29898,
2230,
29918,
7382,
29961,
29896,
2314,
334,
29871,
29953,
29900,
718,
938,
29898,
2230,
29918,
7382,
29961,
29906,
12622,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
1853,
2033,
353,
6629,
30004,
13,
462,
1678,
396,
848,
1839,
4804,
29918,
3166,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
30004,
13,
462,
1678,
10650,
29918,
4804,
29918,
3166,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
1246,
29918,
3166,
29892,
1059,
353,
1583,
29889,
689,
532,
5638,
29898,
1610,
29918,
4804,
29918,
3166,
8443,
13,
462,
1678,
565,
1246,
29918,
3166,
29901,
30004,
13,
462,
4706,
848,
1839,
4804,
29918,
3166,
2033,
353,
1246,
29918,
3166,
30004,
13,
462,
1678,
1683,
29901,
30004,
13,
462,
4706,
1583,
29889,
1188,
703,
29883,
1610,
1358,
613,
376,
8875,
29871,
6571,
1642,
4830,
29898,
2704,
29892,
10650,
29918,
4804,
29918,
3166,
511,
20569,
30004,
13,
462,
4706,
848,
1839,
4804,
29918,
3166,
2033,
353,
10650,
29918,
4804,
29918,
3166,
30004,
13,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
517,
2033,
353,
6629,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
18253,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29947,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29947,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
1246,
29918,
10874,
29918,
1188,
29889,
4397,
29898,
1272,
8443,
13,
18884,
1683,
29901,
30004,
13,
462,
1678,
1246,
29918,
5696,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29906,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
396,
29871,
30895,
31283,
235,
184,
179,
30810,
30502,
30214,
31149,
231,
192,
156,
30437,
235,
184,
179,
30429,
30806,
30004,
13,
462,
1678,
565,
1246,
29918,
5696,
1275,
318,
29915,
31558,
31020,
30594,
31016,
2396,
30004,
13,
462,
4706,
6773,
30004,
13,
30004,
13,
462,
1678,
848,
1839,
10874,
2033,
353,
2346,
29918,
10874,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
5696,
2033,
353,
1246,
29918,
5696,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
28497,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29945,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29945,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
1246,
29918,
2230,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29953,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
2230,
2033,
353,
1583,
29889,
2230,
29918,
4830,
29898,
4804,
29918,
2230,
8443,
13,
462,
1678,
848,
1839,
4804,
29918,
19708,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29955,
16261,
726,
580,
29861,
29900,
29962,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
1853,
2033,
353,
6629,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
3166,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29941,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
517,
2033,
353,
6629,
30004,
13,
462,
1678,
848,
1839,
4804,
29918,
18253,
2033,
353,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29929,
16261,
726,
580,
29861,
29900,
29962,
565,
1480,
29889,
23635,
877,
6904,
1594,
29961,
29929,
16261,
726,
580,
1495,
1683,
6629,
30004,
13,
462,
1678,
1246,
29918,
10874,
29918,
1188,
29889,
4397,
29898,
1272,
8443,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
9651,
736,
525,
1420,
29918,
2704,
742,
29871,
29929,
29892,
525,
1420,
29918,
2704,
525,
718,
1059,
29892,
1246,
29918,
10874,
29918,
1188,
30004,
13,
4706,
736,
525,
8698,
742,
29871,
29900,
29892,
525,
8698,
742,
1246,
29918,
10874,
29918,
1188,
30004,
13,
30004,
13,
1678,
822,
29349,
29880,
29918,
3888,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
9995,
30004,
13,
308,
234,
139,
175,
30683,
232,
187,
182,
233,
139,
185,
235,
182,
138,
235,
171,
141,
30004,
13,
4706,
736,
30004,
13,
9651,
4660,
29918,
1989,
29901,
851,
29892,
29871,
234,
142,
131,
233,
136,
142,
234,
165,
191,
30659,
236,
148,
179,
30214,
232,
146,
134,
235,
131,
134,
4882,
29918,
401,
30004,
13,
9651,
3233,
29901,
938,
29892,
29871,
236,
143,
178,
30502,
29875,
31221,
235,
173,
167,
31184,
234,
183,
157,
30004,
13,
9651,
2643,
29901,
29104,
29892,
29871,
235,
172,
182,
234,
183,
179,
30210,
236,
143,
178,
235,
173,
167,
30689,
31021,
30004,
13,
9651,
5235,
29901,
9657,
29892,
29871,
232,
187,
182,
233,
139,
185,
30689,
31021,
30214,
232,
146,
134,
235,
131,
134,
232,
187,
182,
233,
139,
185,
30689,
31021,
31168,
30607,
30004,
13,
4706,
9995,
30004,
13,
4706,
5235,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
5509,
29914,
1171,
482,
29914,
1357,
29918,
1311,
3888,
29889,
21318,
29915,
30004,
13,
4706,
4839,
353,
3336,
13,
9651,
525,
29990,
29899,
3089,
287,
29899,
3047,
2396,
525,
9165,
26021,
23592,
13,
4706,
4970,
13,
4706,
775,
29892,
1820,
29892,
620,
353,
1583,
29889,
2490,
29898,
3888,
29918,
2271,
29892,
9066,
29922,
6672,
8443,
13,
4706,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
9651,
736,
775,
29892,
1820,
29892,
6571,
30004,
13,
4706,
2989,
29918,
978,
353,
337,
29889,
2886,
497,
29898,
29884,
29915,
978,
543,
11889,
29918,
5813,
29908,
995,
543,
28104,
29973,
5513,
742,
620,
29889,
726,
8443,
13,
4706,
2989,
29918,
978,
353,
2989,
29918,
978,
29961,
29900,
29962,
565,
2989,
29918,
978,
1683,
6629,
30004,
13,
30004,
13,
4706,
1404,
29918,
3888,
29918,
1272,
353,
3336,
13,
9651,
525,
8159,
29918,
978,
2396,
2989,
29918,
978,
11167,
13,
9651,
525,
333,
29918,
7543,
2396,
15516,
30004,
13,
9651,
525,
3150,
29918,
1256,
2396,
15516,
30004,
13,
9651,
525,
7328,
2396,
6629,
30004,
13,
4706,
4970,
13,
4706,
736,
29871,
29900,
29892,
376,
8698,
613,
1404,
29918,
3888,
29918,
1272,
30004,
13,
30004,
13,
1678,
822,
931,
29918,
4830,
29898,
1311,
29892,
931,
3634,
1125,
30004,
13,
4706,
1246,
29918,
2230,
353,
337,
29889,
2886,
497,
28909,
29881,
29912,
29906,
29913,
742,
931,
3634,
8443,
13,
4706,
1246,
29918,
2230,
29918,
3167,
353,
1246,
29918,
2230,
29961,
29900,
29962,
718,
1246,
29918,
2230,
29961,
29896,
29962,
718,
17411,
29915,
718,
1246,
29918,
2230,
29961,
29906,
29962,
718,
17411,
29915,
718,
1246,
29918,
2230,
29961,
30004,
13,
632,
29941,
29962,
718,
525,
525,
718,
1246,
29918,
2230,
29961,
29946,
29962,
718,
525,
11283,
718,
1246,
29918,
2230,
29961,
29945,
29962,
718,
525,
11283,
718,
1246,
29918,
2230,
29961,
29953,
29962,
30004,
13,
4706,
931,
2588,
353,
931,
29889,
710,
415,
603,
29898,
4804,
29918,
2230,
29918,
3167,
29892,
11860,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
30004,
13,
4706,
1246,
29918,
2230,
29918,
2230,
855,
1160,
353,
851,
29898,
524,
29898,
2230,
29889,
29885,
1193,
603,
29898,
2230,
2588,
4961,
30004,
13,
4706,
736,
1246,
29918,
2230,
29918,
2230,
855,
1160,
30004,
13,
30004,
13,
1678,
822,
29349,
29880,
29918,
6710,
29918,
29890,
453,
29898,
1311,
29892,
3579,
19290,
1125,
30004,
13,
4706,
4567,
29918,
1761,
353,
5159,
30004,
13,
4706,
9008,
29918,
29890,
453,
353,
1051,
26471,
13,
4706,
9826,
353,
2635,
29889,
27765,
26471,
13,
4706,
396,
29871,
31423,
30417,
30948,
30534,
235,
183,
169,
31166,
30004,
13,
4706,
2740,
29918,
10874,
353,
518,
29916,
363,
921,
297,
3464,
6278,
29896,
29892,
448,
29953,
29892,
448,
29896,
4638,
30004,
13,
4706,
11118,
29918,
2271,
353,
525,
1124,
597,
29887,
29916,
29889,
29896,
29947,
29929,
29889,
18038,
29914,
305,
1165,
348,
29914,
22000,
29914,
29883,
504,
29918,
8849,
29889,
21318,
29915,
30004,
13,
4706,
4839,
353,
11117,
29990,
29899,
3089,
287,
29899,
3047,
2396,
525,
9165,
26021,
29915,
8117,
13,
4706,
29349,
29880,
29918,
1949,
353,
29871,
29900,
30004,
13,
30004,
13,
4706,
363,
1269,
29918,
10874,
297,
2740,
29918,
10874,
29901,
30004,
13,
9651,
2346,
29918,
1256,
353,
9826,
718,
14215,
287,
2554,
29898,
10874,
29879,
29922,
4204,
29918,
10874,
8443,
13,
9651,
2346,
29918,
10874,
353,
11860,
29881,
29995,
29900,
29906,
29881,
29908,
1273,
313,
1972,
29918,
1256,
29889,
6360,
29892,
2346,
29918,
1256,
29889,
10874,
8443,
13,
9651,
8636,
353,
3336,
13,
18884,
525,
2477,
29907,
29918,
29940,
15176,
2396,
9049,
5085,
1839,
28497,
7464,
30004,
13,
18884,
525,
6248,
2396,
2346,
29918,
10874,
11167,
13,
18884,
22868,
2396,
938,
29898,
2230,
29889,
2230,
580,
334,
29871,
29896,
29900,
29900,
29900,
8443,
13,
9651,
4970,
13,
9651,
363,
337,
2202,
297,
921,
3881,
29898,
1311,
29889,
3317,
29918,
276,
2202,
1125,
30004,
13,
18884,
775,
29892,
1820,
29892,
4613,
353,
1583,
29889,
657,
29898,
29890,
453,
29918,
2271,
29892,
8636,
29922,
7529,
29892,
9066,
29922,
6672,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
6773,
30004,
13,
18884,
565,
318,
29915,
31745,
235,
178,
178,
30325,
31096,
31463,
30850,
30383,
29915,
297,
4613,
29889,
726,
29901,
30004,
13,
462,
1678,
565,
337,
2202,
1275,
1583,
29889,
3317,
29918,
276,
2202,
448,
29871,
29896,
29901,
30004,
13,
462,
4706,
1583,
29889,
1188,
877,
1792,
742,
525,
235,
183,
169,
31166,
30573,
30816,
742,
4613,
8443,
13,
462,
1678,
6773,
30004,
13,
18884,
775,
29892,
1820,
29892,
2643,
29892,
1121,
353,
1583,
29889,
29883,
1610,
29880,
29918,
10874,
29918,
29890,
453,
29898,
1972,
29918,
10874,
29892,
4613,
29889,
726,
8443,
13,
18884,
565,
775,
2804,
29871,
29900,
29901,
30004,
13,
462,
1678,
565,
337,
2202,
1275,
1583,
29889,
3317,
29918,
276,
2202,
448,
29871,
29896,
29901,
30004,
13,
462,
4706,
29349,
29880,
29918,
1949,
4619,
29871,
29896,
30004,
13,
462,
4706,
1583,
29889,
1188,
877,
29883,
1610,
1358,
742,
2643,
29892,
4613,
8443,
13,
462,
1678,
6773,
30004,
13,
18884,
9008,
29918,
29890,
453,
29889,
4397,
29898,
2914,
8443,
13,
18884,
2867,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
396,
29871,
235,
177,
194,
31658,
30544,
31745,
30413,
31733,
31410,
30325,
31096,
30004,
13,
18884,
4567,
29918,
1761,
29889,
4397,
29898,
1972,
29918,
10874,
8443,
13,
30004,
13,
4706,
565,
7431,
29898,
27259,
29918,
1761,
29897,
1275,
29871,
29945,
29901,
30004,
13,
9651,
565,
29349,
29880,
29918,
1949,
1405,
29871,
29896,
29901,
30004,
13,
18884,
736,
29871,
29929,
29892,
525,
29883,
1610,
29880,
29918,
2704,
742,
9008,
29918,
29890,
453,
29892,
4567,
29918,
1761,
30004,
13,
9651,
736,
29871,
29929,
29892,
525,
22942,
29918,
8262,
29891,
29918,
2704,
742,
9008,
29918,
29890,
453,
29892,
4567,
29918,
1761,
30004,
13,
4706,
736,
29871,
29900,
29892,
525,
8698,
742,
9008,
29918,
29890,
453,
29892,
4567,
29918,
1761,
30004,
13,
30004,
13,
1678,
822,
29349,
29880,
29918,
10874,
29918,
29890,
453,
29898,
1311,
29892,
2346,
29918,
10874,
29892,
4613,
1125,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
353,
6571,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
10874,
2033,
353,
2346,
29918,
10874,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
14506,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
1062,
29918,
29883,
4293,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
1062,
29918,
1272,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
1062,
29918,
29879,
1516,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
29920,
996,
17599,
1607,
29875,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
1388,
728,
283,
1725,
29875,
2033,
353,
6629,
30004,
13,
4706,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
29939,
2028,
2033,
353,
6629,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
11118,
29918,
5113,
353,
337,
29889,
2886,
497,
29898,
29884,
29915,
232,
168,
154,
236,
167,
147,
30534,
31359,
30346,
235,
183,
188,
5575,
29973,
29916,
1013,
1194,
29881,
3124,
7790,
29881,
28135,
29966,
742,
4613,
29892,
337,
29889,
29903,
8443,
13,
9651,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
5113,
2033,
353,
11118,
29918,
5113,
29961,
29900,
29962,
565,
7431,
29898,
29890,
453,
29918,
5113,
29897,
1683,
6629,
30004,
13,
30004,
13,
9651,
11118,
29918,
1062,
29918,
29879,
1516,
353,
337,
29889,
2886,
497,
29898,
29884,
29915,
30356,
30728,
234,
162,
176,
30689,
235,
183,
188,
5575,
29973,
29916,
1013,
1194,
29881,
3124,
7790,
29881,
28135,
29966,
742,
4613,
29892,
337,
29889,
29903,
8443,
13,
9651,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
1062,
29918,
29879,
1516,
2033,
353,
11118,
29918,
1062,
29918,
29879,
1516,
29961,
29900,
29962,
565,
7431,
29898,
29890,
453,
29918,
1062,
29918,
29879,
1516,
29897,
1683,
6629,
30004,
13,
30004,
13,
9651,
11118,
29918,
14506,
353,
337,
29889,
2886,
497,
29898,
29884,
29915,
30346,
31117,
235,
183,
188,
30406,
30733,
31466,
29901,
1194,
29881,
3124,
7790,
29881,
28135,
30824,
742,
4613,
29892,
337,
29889,
29903,
8443,
13,
9651,
4098,
29918,
1725,
29872,
29918,
1272,
1839,
29890,
453,
29918,
14506,
2033,
353,
11118,
29918,
14506,
29961,
29900,
29962,
565,
7431,
29898,
29890,
453,
29918,
14506,
29897,
1683,
6629,
30004,
13,
30004,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
353,
9637,
1627,
29889,
4830,
29918,
735,
29883,
26471,
13,
9651,
736,
29871,
29929,
29892,
525,
1420,
29918,
2704,
742,
525,
1420,
29918,
2704,
18717,
2704,
29892,
6571,
30004,
13,
4706,
736,
29871,
29900,
29892,
525,
8698,
742,
525,
8698,
742,
4098,
29918,
1725,
29872,
29918,
1272,
30004,
13,
30004,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
30004,
13,
1678,
274,
353,
315,
1610,
1358,
26471,
13,
30004,
13,
1678,
396,
323,
6670,
353,
376,
29896,
29947,
29900,
29955,
29953,
29955,
29953,
29953,
29896,
29946,
29929,
19451,
13,
1678,
396,
3148,
1001,
29918,
25711,
17013,
353,
9872,
25711,
17013,
11903,
30004,
13,
1678,
396,
3553,
29918,
29907,
17011,
353,
525,
29896,
29946,
29900,
29955,
29906,
29941,
29896,
29929,
29929,
29941,
29900,
29929,
29900,
29906,
29900,
29900,
29941,
29990,
29915,
30004,
13,
1678,
396,
3148,
1001,
29918,
5813,
353,
525,
30986,
232,
162,
188,
29915,
30004,
13,
30004,
13,
1678,
396,
323,
6670,
353,
376,
29896,
29947,
29900,
29955,
29947,
29946,
29945,
29946,
29929,
29953,
29946,
19451,
13,
1678,
396,
3148,
1001,
29918,
25711,
17013,
353,
376,
29929,
29946,
29896,
29953,
29953,
29955,
19451,
13,
1678,
396,
3553,
29918,
29907,
17011,
353,
525,
29896,
29896,
29900,
29906,
29906,
29929,
29896,
29929,
29929,
29945,
29900,
29896,
29906,
29945,
29941,
29947,
29906,
29946,
29915,
30004,
13,
1678,
396,
3148,
1001,
29918,
5813,
353,
525,
30462,
31430,
29915,
30004,
13,
30004,
13,
1678,
3148,
1001,
29918,
25711,
17013,
353,
9872,
25711,
17013,
11903,
30004,
13,
1678,
3553,
29918,
29907,
17011,
353,
525,
29896,
29941,
29900,
29929,
29947,
29896,
29896,
29929,
29929,
29953,
29900,
29945,
29906,
29955,
29953,
29953,
29896,
29946,
29915,
30004,
13,
1678,
3148,
1001,
29918,
5813,
353,
525,
236,
162,
172,
233,
155,
163,
235,
193,
140,
29915,
30004,
13,
1678,
323,
6670,
353,
376,
29896,
29955,
29941,
29955,
29955,
29896,
29941,
29945,
29896,
29945,
29953,
19451,
13,
1678,
396,
323,
6670,
353,
376,
29896,
29955,
29941,
29955,
29955,
29896,
29941,
29945,
29896,
29945,
29906,
19451,
13,
30004,
13,
30004,
13,
30004,
13,
1678,
396,
1583,
29918,
1688,
30004,
13,
1678,
274,
29889,
1311,
29918,
1688,
29898,
28497,
29922,
4330,
29931,
29892,
12534,
29918,
29886,
9970,
29922,
29966,
25711,
17013,
10202,
1178,
29918,
7543,
29922,
1367,
29918,
29907,
17011,
29892,
2989,
29918,
978,
29922,
11889,
29918,
5813,
29897,
2
] |
web_fetch/sudoku_extract.py | widyaageng/Sudoku_auto | 0 | 196197 | <gh_stars>0
from util import svg_dict
from web_fetch import fetch
import numpy as np
def get_field():
# Create board matrix
sudoku_field = []
# Retrieve plain HTML source
soup = fetch.get_html_txt_headless('https://sudoku.com/medium/')
fetch.close_html_txt_headless()
# Getting row list
tr_row_elem = soup.find_all("div", attrs={"class": "cell-value"})
for elem in tr_row_elem:
if elem.contents[0] == "\xa0":
# print("X")
sudoku_field.append(0)
else:
# print(svg_dict.get_svg_to_num(elem.svg.path["d"]))
sudoku_field.append(svg_dict.get_svg_to_num(elem.svg.path["d"]))
sudoku_field = np.reshape(sudoku_field, (9, 9))
return sudoku_field
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
3667,
1053,
25773,
29918,
8977,
13,
3166,
1856,
29918,
9155,
1053,
6699,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
679,
29918,
2671,
7295,
13,
1678,
396,
6204,
7613,
4636,
13,
1678,
5053,
9154,
29918,
2671,
353,
5159,
13,
13,
1678,
396,
4649,
29878,
2418,
8656,
4544,
2752,
13,
1678,
22300,
353,
6699,
29889,
657,
29918,
1420,
29918,
3945,
29918,
2813,
2222,
877,
991,
597,
29879,
566,
9154,
29889,
510,
29914,
27891,
29914,
1495,
13,
1678,
6699,
29889,
5358,
29918,
1420,
29918,
3945,
29918,
2813,
2222,
580,
13,
13,
1678,
396,
24162,
1948,
1051,
13,
1678,
534,
29918,
798,
29918,
20461,
353,
22300,
29889,
2886,
29918,
497,
703,
4563,
613,
12421,
29879,
3790,
29908,
1990,
1115,
376,
3729,
29899,
1767,
29908,
1800,
13,
1678,
363,
21268,
297,
534,
29918,
798,
29918,
20461,
29901,
13,
4706,
565,
21268,
29889,
10853,
29961,
29900,
29962,
1275,
6634,
17367,
29900,
1115,
13,
9651,
396,
1596,
703,
29990,
1159,
13,
9651,
5053,
9154,
29918,
2671,
29889,
4397,
29898,
29900,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
1596,
29898,
15120,
29918,
8977,
29889,
657,
29918,
15120,
29918,
517,
29918,
1949,
29898,
20461,
29889,
15120,
29889,
2084,
3366,
29881,
3108,
876,
13,
9651,
5053,
9154,
29918,
2671,
29889,
4397,
29898,
15120,
29918,
8977,
29889,
657,
29918,
15120,
29918,
517,
29918,
1949,
29898,
20461,
29889,
15120,
29889,
2084,
3366,
29881,
3108,
876,
13,
13,
1678,
5053,
9154,
29918,
2671,
353,
7442,
29889,
690,
14443,
29898,
29879,
566,
9154,
29918,
2671,
29892,
313,
29929,
29892,
29871,
29929,
876,
13,
1678,
736,
5053,
9154,
29918,
2671,
13,
13,
2
] |
digits/keras_lenet_kernel.py | muggle14/kaggle_projects | 33 | 67720 | <filename>digits/keras_lenet_kernel.py
import pandas as pd
import numpy as np
from keras.models import Sequential
from keras.utils import np_utils
from keras.layers.convolutional import Convolution2D
from keras.layers.convolutional import MaxPooling2D
from keras.layers.core import Activation
from keras.layers.core import Flatten
from keras.layers.core import Dense
if __name__ == "__main__":
train = pd.read_csv('./data/train.csv').values
test = pd.read_csv('./data/test.csv').values
img_rows, img_cols = 28, 28
X_train = train[:,1:].reshape(train.shape[0], img_rows, img_cols, 1)
X_train = X_train.astype(float)
X_train = X_train/255.0
X_test = test.reshape(test.shape[0], img_rows, img_cols, 1)
X_test = X_test.astype(float)
X_test = X_test/255.0
y_train = np_utils.to_categorical(train[:,0])
num_classes = y_train.shape[1]
#cnn parameters
num_filters_l1 = 32
filter_size_l1 = 5
num_filters_l2 = 64
filter_size_l2 = 5
cnn = Sequential()
#CONV -> RELU -> MAXPOOL
cnn.add(Convolution2D(num_filters_l1, filter_size_l1, filter_size_l1, input_shape=(img_rows, img_cols, 1), border_mode='same'))
cnn.add(Activation('relu'))
cnn.add(MaxPooling2D(pool_size=(2,2), strides=(2,2)))
#CONV -> RELU -> MAXPOOL
cnn.add(Convolution2D(num_filters_l2, filter_size_l2, filter_size_l2, border_mode='same'))
cnn.add(Activation('relu'))
cnn.add(MaxPooling2D(pool_size=(2,2), strides=(2,2)))
#FC -> RELU
cnn.add(Flatten())
cnn.add(Dense(128))
cnn.add(Activation('relu'))
#Softmax Classifier
cnn.add(Dense(num_classes))
cnn.add(Activation('softmax'))
cnn.summary()
cnn.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
cnn.fit(X_train, y_train, batch_size=128, nb_epoch=1, verbose=1)
y_pred = cnn.predict_classes(X_test)
#create submission
submission = pd.DataFrame(index=pd.RangeIndex(start=1, stop=28001, step=1), columns=['Label'])
submission['Label'] = y_pred.reshape(-1,1)
submission.index.name = "ImageId"
submission.to_csv('./lenet_pred.csv', index=True, header=True)
| [
1,
529,
9507,
29958,
7501,
1169,
29914,
3946,
294,
29918,
2435,
300,
29918,
17460,
29889,
2272,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
13023,
294,
29889,
9794,
1053,
922,
339,
2556,
13,
3166,
13023,
294,
29889,
13239,
1053,
7442,
29918,
13239,
13,
3166,
13023,
294,
29889,
29277,
29889,
535,
4068,
284,
1053,
1281,
4068,
29906,
29928,
13,
3166,
13023,
294,
29889,
29277,
29889,
535,
4068,
284,
1053,
5918,
11426,
292,
29906,
29928,
29871,
13,
3166,
13023,
294,
29889,
29277,
29889,
3221,
1053,
21775,
362,
13,
3166,
13023,
294,
29889,
29277,
29889,
3221,
1053,
2379,
8606,
13,
3166,
13023,
294,
29889,
29277,
29889,
3221,
1053,
360,
1947,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
13,
1678,
7945,
353,
10518,
29889,
949,
29918,
7638,
877,
6904,
1272,
29914,
14968,
29889,
7638,
2824,
5975,
13,
1678,
1243,
29871,
353,
10518,
29889,
949,
29918,
7638,
877,
6904,
1272,
29914,
1688,
29889,
7638,
2824,
5975,
13,
13,
1678,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
353,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
13,
268,
13,
1678,
1060,
29918,
14968,
353,
7945,
7503,
29892,
29896,
29901,
1822,
690,
14443,
29898,
14968,
29889,
12181,
29961,
29900,
1402,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
29892,
29871,
29896,
29897,
13,
1678,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29889,
579,
668,
29898,
7411,
29897,
13,
1678,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29914,
29906,
29945,
29945,
29889,
29900,
13,
1678,
13,
1678,
1060,
29918,
1688,
353,
1243,
29889,
690,
14443,
29898,
1688,
29889,
12181,
29961,
29900,
1402,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
29892,
29871,
29896,
29897,
29871,
13,
1678,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29889,
579,
668,
29898,
7411,
29897,
13,
1678,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29914,
29906,
29945,
29945,
29889,
29900,
13,
13,
1678,
343,
29918,
14968,
353,
7442,
29918,
13239,
29889,
517,
29918,
29883,
20440,
936,
29898,
14968,
7503,
29892,
29900,
2314,
13,
1678,
954,
29918,
13203,
353,
343,
29918,
14968,
29889,
12181,
29961,
29896,
29962,
13,
13,
1678,
396,
29883,
15755,
4128,
13,
1678,
954,
29918,
26705,
29918,
29880,
29896,
353,
29871,
29941,
29906,
13,
1678,
4175,
29918,
2311,
29918,
29880,
29896,
353,
29871,
29945,
13,
1678,
954,
29918,
26705,
29918,
29880,
29906,
353,
29871,
29953,
29946,
13,
1678,
4175,
29918,
2311,
29918,
29880,
29906,
353,
29871,
29945,
13,
13,
1678,
274,
15755,
353,
922,
339,
2556,
580,
13,
1678,
396,
6007,
29963,
1599,
5195,
29931,
29965,
1599,
18134,
13152,
5607,
13,
1678,
274,
15755,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
1949,
29918,
26705,
29918,
29880,
29896,
29892,
4175,
29918,
2311,
29918,
29880,
29896,
29892,
4175,
29918,
2311,
29918,
29880,
29896,
29892,
1881,
29918,
12181,
7607,
2492,
29918,
5727,
29892,
10153,
29918,
22724,
29892,
29871,
29896,
511,
5139,
29918,
8513,
2433,
17642,
8785,
13,
1678,
274,
15755,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
1678,
274,
15755,
29889,
1202,
29898,
7976,
11426,
292,
29906,
29928,
29898,
10109,
29918,
2311,
7607,
29906,
29892,
29906,
511,
851,
2247,
7607,
29906,
29892,
29906,
4961,
13,
13,
1678,
396,
6007,
29963,
1599,
5195,
29931,
29965,
1599,
18134,
13152,
5607,
13,
1678,
274,
15755,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
1949,
29918,
26705,
29918,
29880,
29906,
29892,
4175,
29918,
2311,
29918,
29880,
29906,
29892,
4175,
29918,
2311,
29918,
29880,
29906,
29892,
5139,
29918,
8513,
2433,
17642,
8785,
13,
1678,
274,
15755,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
1678,
274,
15755,
29889,
1202,
29898,
7976,
11426,
292,
29906,
29928,
29898,
10109,
29918,
2311,
7607,
29906,
29892,
29906,
511,
851,
2247,
7607,
29906,
29892,
29906,
4961,
13,
13,
1678,
396,
8610,
1599,
5195,
29931,
29965,
13,
1678,
274,
15755,
29889,
1202,
29898,
29943,
5066,
841,
3101,
13,
1678,
274,
15755,
29889,
1202,
29898,
29928,
1947,
29898,
29896,
29906,
29947,
876,
13,
1678,
274,
15755,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
13,
1678,
396,
6295,
615,
3317,
4134,
3709,
13,
1678,
274,
15755,
29889,
1202,
29898,
29928,
1947,
29898,
1949,
29918,
13203,
876,
13,
1678,
274,
15755,
29889,
1202,
29898,
21786,
362,
877,
2695,
3317,
8785,
259,
13,
13,
1678,
274,
15755,
29889,
7727,
580,
13,
1678,
274,
15755,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
5994,
3950,
2433,
328,
314,
742,
21556,
29922,
1839,
562,
2764,
4135,
11287,
13,
13,
1678,
274,
15755,
29889,
9202,
29898,
29990,
29918,
14968,
29892,
343,
29918,
14968,
29892,
9853,
29918,
2311,
29922,
29896,
29906,
29947,
29892,
302,
29890,
29918,
1022,
2878,
29922,
29896,
29892,
26952,
29922,
29896,
29897,
13,
13,
1678,
343,
29918,
11965,
353,
274,
15755,
29889,
27711,
29918,
13203,
29898,
29990,
29918,
1688,
29897,
29871,
13,
13,
1678,
396,
3258,
29240,
29871,
13,
1678,
29240,
353,
10518,
29889,
17271,
29898,
2248,
29922,
15926,
29889,
6069,
3220,
29898,
2962,
29922,
29896,
29892,
5040,
29922,
29906,
29947,
29900,
29900,
29896,
29892,
4331,
29922,
29896,
511,
4341,
29922,
1839,
4775,
11287,
13,
1678,
29240,
1839,
4775,
2033,
353,
343,
29918,
11965,
29889,
690,
14443,
6278,
29896,
29892,
29896,
29897,
13,
1678,
29240,
29889,
2248,
29889,
978,
353,
376,
2940,
1204,
29908,
13,
1678,
29240,
29889,
517,
29918,
7638,
877,
6904,
2435,
300,
29918,
11965,
29889,
7638,
742,
2380,
29922,
5574,
29892,
4839,
29922,
5574,
29897,
13,
13,
13,
259,
13,
13,
13,
13,
2
] |
research/cv/resnet50_bam/src/config.py | leelige/mindspore | 1 | 1609463 | <filename>research/cv/resnet50_bam/src/config.py
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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.
# ============================================================================
"""
network config setting, will be used in main.py
"""
from easydict import EasyDict as edict
imagenet_cfg = edict({
'name': 'imagenet',
'pre_trained': False,
'num_classes': 1000,
'lr_init': 0.02, # 1P: 0.02, 8P: 0.18
'batch_size': 128,
'epoch_size': 160,
'momentum': 0.9,
'weight_decay': 1e-4,
'image_height': 224,
'image_width': 224,
'data_path': '/data/ILSVRC2012_train/',
'val_data_path': '/data/ILSVRC2012_val/',
'device_target': 'Ascend',
'device_id': 0,
'keep_checkpoint_max': 25,
'checkpoint_path': None,
'onnx_filename': 'resnet50-bam',
'air_filename': 'resnet50-bam',
# optimizer and lr related
'lr_scheduler': 'cosine_annealing',
'lr_epochs': [30, 60, 90, 120],
'lr_gamma': 0.3,
'eta_min': 0.0,
'T_max': 150,
'warmup_epochs': 0,
# loss related
'is_dynamic_loss_scale': 0,
'loss_scale': 1024,
'label_smooth_factor': 0.1,
'use_label_smooth': True,
})
| [
1,
529,
9507,
29958,
690,
2842,
29914,
11023,
29914,
690,
1212,
29945,
29900,
29918,
29890,
314,
29914,
4351,
29914,
2917,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
379,
3357,
26599,
8364,
11763,
3189,
1696,
19806,
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,
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,
1360,
13,
15945,
29908,
13,
11618,
2295,
4444,
29892,
674,
367,
1304,
297,
1667,
29889,
2272,
13,
15945,
29908,
13,
3166,
2240,
2941,
919,
1053,
382,
8995,
21533,
408,
1226,
919,
13,
13,
326,
5370,
300,
29918,
16859,
353,
1226,
919,
3319,
13,
1678,
525,
978,
2396,
525,
326,
5370,
300,
742,
13,
1678,
525,
1457,
29918,
3018,
1312,
2396,
7700,
29892,
13,
1678,
525,
1949,
29918,
13203,
2396,
29871,
29896,
29900,
29900,
29900,
29892,
13,
1678,
525,
29212,
29918,
2344,
2396,
29871,
29900,
29889,
29900,
29906,
29892,
29871,
396,
29871,
29896,
29925,
29901,
29871,
29900,
29889,
29900,
29906,
29892,
29871,
29947,
29925,
29901,
29871,
29900,
29889,
29896,
29947,
13,
1678,
525,
16175,
29918,
2311,
2396,
29871,
29896,
29906,
29947,
29892,
13,
1678,
525,
1022,
2878,
29918,
2311,
2396,
29871,
29896,
29953,
29900,
29892,
13,
1678,
525,
29885,
2932,
398,
2396,
29871,
29900,
29889,
29929,
29892,
13,
1678,
525,
7915,
29918,
7099,
388,
2396,
29871,
29896,
29872,
29899,
29946,
29892,
13,
1678,
525,
3027,
29918,
3545,
2396,
29871,
29906,
29906,
29946,
29892,
13,
1678,
525,
3027,
29918,
2103,
2396,
29871,
29906,
29906,
29946,
29892,
13,
1678,
525,
1272,
29918,
2084,
2396,
8207,
1272,
29914,
6227,
7597,
10363,
29906,
29900,
29896,
29906,
29918,
14968,
29914,
742,
13,
1678,
525,
791,
29918,
1272,
29918,
2084,
2396,
8207,
1272,
29914,
6227,
7597,
10363,
29906,
29900,
29896,
29906,
29918,
791,
29914,
742,
13,
1678,
525,
10141,
29918,
5182,
2396,
525,
29909,
1557,
355,
742,
13,
1678,
525,
10141,
29918,
333,
2396,
29871,
29900,
29892,
13,
1678,
525,
17462,
29918,
3198,
3149,
29918,
3317,
2396,
29871,
29906,
29945,
29892,
13,
1678,
525,
3198,
3149,
29918,
2084,
2396,
6213,
29892,
13,
1678,
525,
3409,
29916,
29918,
9507,
2396,
525,
690,
1212,
29945,
29900,
29899,
29890,
314,
742,
13,
1678,
525,
1466,
29918,
9507,
2396,
525,
690,
1212,
29945,
29900,
29899,
29890,
314,
742,
13,
13,
1678,
396,
5994,
3950,
322,
301,
29878,
4475,
13,
1678,
525,
29212,
29918,
816,
14952,
2396,
525,
3944,
457,
29918,
11276,
12818,
742,
13,
1678,
525,
29212,
29918,
1022,
2878,
29879,
2396,
518,
29941,
29900,
29892,
29871,
29953,
29900,
29892,
29871,
29929,
29900,
29892,
29871,
29896,
29906,
29900,
1402,
13,
1678,
525,
29212,
29918,
4283,
2396,
29871,
29900,
29889,
29941,
29892,
13,
1678,
525,
1187,
29918,
1195,
2396,
29871,
29900,
29889,
29900,
29892,
13,
1678,
525,
29911,
29918,
3317,
2396,
29871,
29896,
29945,
29900,
29892,
13,
1678,
525,
29893,
2817,
786,
29918,
1022,
2878,
29879,
2396,
29871,
29900,
29892,
13,
13,
1678,
396,
6410,
4475,
13,
1678,
525,
275,
29918,
16626,
29918,
6758,
29918,
7052,
2396,
29871,
29900,
29892,
13,
1678,
525,
6758,
29918,
7052,
2396,
29871,
29896,
29900,
29906,
29946,
29892,
13,
1678,
525,
1643,
29918,
3844,
6983,
29918,
19790,
2396,
29871,
29900,
29889,
29896,
29892,
13,
1678,
525,
1509,
29918,
1643,
29918,
3844,
6983,
2396,
5852,
29892,
13,
1800,
13,
2
] |
actor_critic/pretrain.py | tttslab/armos | 0 | 1614027 | <reponame>tttslab/armos
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import models
import utils
import configparser
import time
import logging
import librosa
import random
import copy
logging.basicConfig(filename='log/pretrain.log', level=logging.INFO)
### Hyperparameters
conf = configparser.SafeConfigParser()
conf.read("config.ini")
IN_SIZE = int(conf.get('main', 'in_size'))
OUT_SIZE = int(conf.get('main', 'out_size'))
P_HIDDEN_SIZE = int(conf.get('actor', 'hidden_size'))
P_NUM_LAYERS = int(conf.get('actor', 'num_layers'))
Q_HIDDEN_SIZE = int(conf.get('critic', 'hidden_size'))
BATCH_SIZE = int(conf.get('main', 'batch_size'))
SAMPLING_RATE = int(conf.get('main', 'sampling_rate'))
NUM_PARAL = int(conf.get('main', 'num_paral'))
AUDIO_SEGMENT = int(conf.get('main', 'audio_segment'))
### Condition Setting
device = 'cuda' if torch.cuda.is_available() else 'cpu'
policy = models.stacked_BLSTM(IN_SIZE, OUT_SIZE, P_HIDDEN_SIZE, P_NUM_LAYERS).to(device)
loss_fun = nn.MSELoss()
p_optim = torch.optim.Adam(policy.parameters(), lr=1e-3)
train_loader = utils.Batch_generator('training', BATCH_SIZE)
for iteration in range(100):
policy.train()
start = time.time()
### Assume the duration is multiple of 10ms.
### For example, if the time length of input feature is 101, this sound is from 1000ms to 1009ms,
### but I regard this as 1000ms and ignore the last feature.
inputs, length, _ = next(train_loader)
feats = np.zeros((BATCH_SIZE, AUDIO_SEGMENT, IN_SIZE))
for i in range(BATCH_SIZE):
s_pos = np.random.randint(length[i]-AUDIO_SEGMENT+1)
feats[i] = inputs[i, s_pos:s_pos+AUDIO_SEGMENT,:]
inputs = np.asarray(feats, dtype=np.float32)
inputs = torch.from_numpy(inputs).to(device)
length = np.asarray(length, dtype=np.int32) - 1
length = np.where(length > AUDIO_SEGMENT, AUDIO_SEGMENT, length)
dur = 1.0*length / frameRate_Hz ### dimension is sec.
m_target = torch.ones(BATCH_SIZE, AUDIO_SEGMENT, OUT_SIZE).to(device) * 0.5
v_target = torch.ones(BATCH_SIZE, AUDIO_SEGMENT, OUT_SIZE).to(device) * 0.1
### Get action
mean, var = policy(inputs, length.tolist())
loss = F.mse_loss(mean, m_target) + F.mse_loss(var, v_target)
if iteration % 10 == 0:
x=1+1
p_optim.zero_grad()
loss.backward()
p_optim.step()
logging.info('iter: {}\tloss: {}\telapse: {:.02f}'.format(iteration+1,\
loss.item(),\
time.time()-start))
torch.save(policy.state_dict(), './exp/pretrain.model')
| [
1,
529,
276,
1112,
420,
29958,
698,
1372,
8205,
29914,
2817,
359,
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,
5215,
12655,
408,
7442,
13,
5215,
4733,
13,
5215,
3667,
29879,
13,
5215,
2295,
16680,
13,
5215,
931,
13,
5215,
12183,
13,
5215,
4303,
1883,
29874,
13,
5215,
4036,
13,
5215,
3509,
13,
13,
21027,
29889,
16121,
3991,
29898,
9507,
2433,
1188,
29914,
1457,
14968,
29889,
1188,
742,
3233,
29922,
21027,
29889,
11690,
29897,
13,
13,
2277,
29937,
26078,
16744,
13,
5527,
353,
2295,
16680,
29889,
17618,
1725,
3991,
11726,
580,
13,
5527,
29889,
949,
703,
2917,
29889,
2172,
1159,
13,
1177,
29918,
14226,
632,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
262,
29918,
2311,
8785,
13,
12015,
29918,
14226,
9651,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
449,
29918,
2311,
8785,
13,
29925,
29918,
29950,
1367,
29928,
1430,
29918,
14226,
539,
353,
938,
29898,
5527,
29889,
657,
877,
7168,
742,
525,
10892,
29918,
2311,
8785,
13,
29925,
29918,
13967,
29918,
18799,
23598,
4706,
353,
938,
29898,
5527,
29889,
657,
877,
7168,
742,
525,
1949,
29918,
29277,
8785,
13,
29984,
29918,
29950,
1367,
29928,
1430,
29918,
14226,
539,
353,
938,
29898,
5527,
29889,
657,
877,
9695,
293,
742,
525,
10892,
29918,
2311,
8785,
13,
29933,
14789,
29918,
14226,
3986,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
16175,
29918,
2311,
8785,
13,
8132,
3580,
29931,
4214,
29918,
29934,
3040,
539,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
13445,
10335,
29918,
10492,
8785,
13,
13967,
29918,
16320,
1964,
965,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
1949,
29918,
862,
284,
8785,
13,
25951,
4571,
29949,
29918,
1660,
29954,
13780,
539,
353,
938,
29898,
5527,
29889,
657,
877,
3396,
742,
525,
18494,
29918,
28192,
8785,
13,
13,
2277,
29937,
11790,
654,
21605,
13,
10141,
539,
353,
525,
29883,
6191,
29915,
565,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
580,
1683,
525,
21970,
29915,
13,
22197,
539,
353,
4733,
29889,
1429,
287,
29918,
13367,
1254,
29924,
29898,
1177,
29918,
14226,
29892,
19474,
29918,
14226,
29892,
349,
29918,
29950,
1367,
29928,
1430,
29918,
14226,
29892,
349,
29918,
13967,
29918,
18799,
23598,
467,
517,
29898,
10141,
29897,
13,
6758,
29918,
7692,
268,
353,
302,
29876,
29889,
29924,
1660,
29931,
2209,
580,
13,
29886,
29918,
20640,
418,
353,
4842,
305,
29889,
20640,
29889,
3253,
314,
29898,
22197,
29889,
16744,
3285,
301,
29878,
29922,
29896,
29872,
29899,
29941,
29897,
13,
14968,
29918,
12657,
353,
3667,
29879,
29889,
23145,
29918,
27959,
877,
26495,
742,
350,
14789,
29918,
14226,
29897,
13,
13,
1454,
12541,
297,
3464,
29898,
29896,
29900,
29900,
1125,
13,
1678,
8898,
29889,
14968,
580,
13,
1678,
1369,
353,
931,
29889,
2230,
580,
13,
13,
1678,
835,
22680,
278,
14385,
338,
2999,
310,
29871,
29896,
29900,
1516,
29889,
13,
1678,
835,
1152,
1342,
29892,
565,
278,
931,
3309,
310,
1881,
4682,
338,
29871,
29896,
29900,
29896,
29892,
445,
6047,
338,
515,
29871,
29896,
29900,
29900,
29900,
1516,
304,
29871,
29896,
29900,
29900,
29929,
1516,
29892,
13,
1678,
835,
541,
306,
4880,
445,
408,
29871,
29896,
29900,
29900,
29900,
1516,
322,
11455,
278,
1833,
4682,
29889,
13,
1678,
10970,
29892,
3309,
29892,
903,
353,
2446,
29898,
14968,
29918,
12657,
29897,
13,
13,
1678,
1238,
1446,
353,
7442,
29889,
3298,
359,
3552,
29933,
14789,
29918,
14226,
29892,
319,
29965,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
2672,
29918,
14226,
876,
13,
1678,
363,
474,
297,
3464,
29898,
29933,
14789,
29918,
14226,
1125,
13,
4706,
269,
29918,
1066,
1678,
353,
7442,
29889,
8172,
29889,
9502,
524,
29898,
2848,
29961,
29875,
29962,
29899,
25951,
4571,
29949,
29918,
1660,
29954,
13780,
29974,
29896,
29897,
13,
4706,
1238,
1446,
29961,
29875,
29962,
353,
10970,
29961,
29875,
29892,
269,
29918,
1066,
29901,
29879,
29918,
1066,
29974,
25951,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
17531,
13,
1678,
10970,
353,
7442,
29889,
294,
2378,
29898,
1725,
1446,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
10970,
9651,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
2080,
29879,
467,
517,
29898,
10141,
29897,
13,
1678,
3309,
9651,
353,
7442,
29889,
294,
2378,
29898,
2848,
29892,
26688,
29922,
9302,
29889,
524,
29941,
29906,
29897,
448,
29871,
29896,
13,
1678,
3309,
9651,
353,
7442,
29889,
3062,
29898,
2848,
1405,
319,
29965,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
319,
29965,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
3309,
29897,
13,
1678,
1411,
1669,
353,
29871,
29896,
29889,
29900,
29930,
2848,
847,
3515,
19907,
29918,
12661,
835,
9927,
338,
5226,
29889,
13,
1678,
286,
29918,
5182,
353,
4842,
305,
29889,
2873,
29898,
29933,
14789,
29918,
14226,
29892,
319,
29965,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
19474,
29918,
14226,
467,
517,
29898,
10141,
29897,
334,
29871,
29900,
29889,
29945,
13,
1678,
325,
29918,
5182,
353,
4842,
305,
29889,
2873,
29898,
29933,
14789,
29918,
14226,
29892,
319,
29965,
4571,
29949,
29918,
1660,
29954,
13780,
29892,
19474,
29918,
14226,
467,
517,
29898,
10141,
29897,
334,
29871,
29900,
29889,
29896,
13,
13,
1678,
835,
3617,
3158,
13,
1678,
2099,
29892,
722,
353,
8898,
29898,
2080,
29879,
29892,
3309,
29889,
25027,
391,
3101,
13,
1678,
6410,
418,
353,
383,
29889,
29885,
344,
29918,
6758,
29898,
12676,
29892,
286,
29918,
5182,
29897,
718,
383,
29889,
29885,
344,
29918,
6758,
29898,
1707,
29892,
325,
29918,
5182,
29897,
13,
1678,
565,
12541,
1273,
29871,
29896,
29900,
1275,
29871,
29900,
29901,
13,
4706,
921,
29922,
29896,
29974,
29896,
13,
1678,
282,
29918,
20640,
29889,
9171,
29918,
5105,
580,
13,
1678,
6410,
29889,
1627,
1328,
580,
13,
1678,
282,
29918,
20640,
29889,
10568,
580,
13,
13,
1678,
12183,
29889,
3888,
877,
1524,
29901,
426,
1012,
29873,
6758,
29901,
426,
1012,
28497,
481,
344,
29901,
12365,
29889,
29900,
29906,
29888,
29913,
4286,
4830,
29898,
1524,
362,
29974,
29896,
2053,
13,
462,
462,
462,
795,
6410,
29889,
667,
3285,
29905,
13,
462,
462,
462,
795,
931,
29889,
2230,
580,
29899,
2962,
876,
13,
7345,
305,
29889,
7620,
29898,
22197,
29889,
3859,
29918,
8977,
3285,
29871,
19283,
4548,
29914,
1457,
14968,
29889,
4299,
1495,
13,
2
] |
aioqiwi/wallet/urls.py | Derad6709/aioqiwi | 33 | 107065 | from ..core.tooling.htstrings import HeadTailString
class WalletURL(HeadTailString):
__head__ = "https://edge.qiwi.com/"
class urls:
me = WalletURL("person-profile/v1/profile/current")
identification = WalletURL("identification/v1/persons/{}/identification")
history = WalletURL("payment-history/v2/persons/{}/payments")
stats = WalletURL("payment-history/v2/persons/{}/payments/total")
cheque = WalletURL("payment-history/v1/transactions/{}/cheque/file")
request_cheque = WalletURL("payment-history/v1/transactions/{}/cheque/send")
payment_info = WalletURL("payment-history/v2/transactions/{}")
class web_hooks:
register = WalletURL("payment-notifier/v1/hooks")
active = WalletURL("/active", head=register)
test = WalletURL("/test", head=register)
delete = WalletURL("/{}", head=register)
class balance:
base = WalletURL("funding-sources/v2/persons/")
balance = WalletURL("{}/accounts", head=base)
available_aliases = WalletURL("/offer", head=balance)
set_new_balance = WalletURL("/{}", head=balance)
class payments:
base = WalletURL("sinap/api/v2/terms/{}/payments")
providers = WalletURL("", head="https://qiwi.com/mobile/detect.action")
commission = WalletURL("sinap/providers/{}/onlineCommission")
| [
1,
515,
6317,
3221,
29889,
10154,
292,
29889,
400,
19651,
1053,
12252,
29911,
737,
1231,
13,
13,
13,
1990,
5260,
1026,
4219,
29898,
5494,
29911,
737,
1231,
1125,
13,
1678,
4770,
2813,
1649,
353,
376,
991,
597,
12864,
29889,
26461,
4353,
29889,
510,
12975,
13,
13,
13,
1990,
23942,
29901,
13,
1678,
592,
353,
5260,
1026,
4219,
703,
10532,
29899,
10185,
29914,
29894,
29896,
29914,
10185,
29914,
3784,
1159,
13,
1678,
29769,
353,
5260,
1026,
4219,
703,
1693,
2450,
29914,
29894,
29896,
29914,
6774,
787,
19248,
6822,
1693,
2450,
1159,
13,
1678,
4955,
353,
5260,
1026,
4219,
703,
27825,
29899,
18434,
29914,
29894,
29906,
29914,
6774,
787,
19248,
6822,
10472,
1860,
1159,
13,
1678,
22663,
353,
5260,
1026,
4219,
703,
27825,
29899,
18434,
29914,
29894,
29906,
29914,
6774,
787,
19248,
6822,
10472,
1860,
29914,
7827,
1159,
13,
1678,
923,
802,
353,
5260,
1026,
4219,
703,
27825,
29899,
18434,
29914,
29894,
29896,
29914,
3286,
7387,
19248,
6822,
1173,
802,
29914,
1445,
1159,
13,
1678,
2009,
29918,
1173,
802,
353,
5260,
1026,
4219,
703,
27825,
29899,
18434,
29914,
29894,
29896,
29914,
3286,
7387,
19248,
6822,
1173,
802,
29914,
6717,
1159,
13,
1678,
19179,
29918,
3888,
353,
5260,
1026,
4219,
703,
27825,
29899,
18434,
29914,
29894,
29906,
29914,
3286,
7387,
29914,
8875,
1159,
13,
13,
1678,
770,
1856,
29918,
1251,
12117,
29901,
13,
4706,
6036,
353,
5260,
1026,
4219,
703,
27825,
29899,
1333,
3709,
29914,
29894,
29896,
29914,
1251,
12117,
1159,
13,
4706,
6136,
353,
5260,
1026,
4219,
11974,
4925,
613,
2343,
29922,
9573,
29897,
13,
4706,
1243,
353,
5260,
1026,
4219,
11974,
1688,
613,
2343,
29922,
9573,
29897,
13,
4706,
5217,
353,
5260,
1026,
4219,
11974,
8875,
613,
2343,
29922,
9573,
29897,
13,
13,
1678,
770,
17346,
29901,
13,
4706,
2967,
353,
5260,
1026,
4219,
703,
27159,
292,
29899,
29879,
2863,
29914,
29894,
29906,
29914,
6774,
787,
29914,
1159,
13,
4706,
17346,
353,
5260,
1026,
4219,
703,
29912,
6822,
10149,
29879,
613,
2343,
29922,
3188,
29897,
13,
4706,
3625,
29918,
2606,
2129,
353,
5260,
1026,
4219,
11974,
974,
571,
613,
2343,
29922,
5521,
749,
29897,
13,
4706,
731,
29918,
1482,
29918,
5521,
749,
353,
5260,
1026,
4219,
11974,
8875,
613,
2343,
29922,
5521,
749,
29897,
13,
13,
1678,
770,
5146,
1860,
29901,
13,
4706,
2967,
353,
5260,
1026,
4219,
703,
5223,
481,
29914,
2754,
29914,
29894,
29906,
29914,
357,
1516,
19248,
6822,
10472,
1860,
1159,
13,
4706,
1326,
11376,
353,
5260,
1026,
4219,
703,
613,
2343,
543,
991,
597,
26461,
4353,
29889,
510,
29914,
16769,
29914,
4801,
522,
29889,
2467,
1159,
13,
4706,
12969,
353,
5260,
1026,
4219,
703,
5223,
481,
29914,
771,
29454,
19248,
6822,
14627,
5261,
2333,
1159,
13,
2
] |
carla_utils/agents/__init__.py | zhangdongkun98/carla-utils | 6 | 136470 | <reponame>zhangdongkun98/carla-utils
from .agents_route_planner import AgentsRoutePlanner
from .agents_master import AgentListMaster
from .controller import Controller
from .vehicle_model import RealModel, BicycleModel2D, BicycleModel2DParallel
from .agent_abc import AgentABC
from .agent_base import BaseAgent
from .agent_keyboard import KeyboardAgent
from .agent_naive import NaiveAgent
from .agent_idm import IdmAgent
from .agent_obstacle import BaseAgentObstacle
| [
1,
529,
276,
1112,
420,
29958,
29920,
11895,
29881,
549,
29895,
348,
29929,
29947,
29914,
4287,
433,
29899,
13239,
13,
13,
3166,
869,
351,
1237,
29918,
13134,
29918,
572,
7310,
1053,
4059,
1237,
12085,
3247,
7310,
13,
3166,
869,
351,
1237,
29918,
6207,
1053,
28330,
1293,
19203,
13,
13,
3166,
869,
8299,
1053,
15830,
13,
3166,
869,
345,
29882,
2512,
29918,
4299,
1053,
8195,
3195,
29892,
350,
4245,
2841,
3195,
29906,
29928,
29892,
350,
4245,
2841,
3195,
29906,
29928,
2177,
6553,
13,
13,
3166,
869,
14748,
29918,
10736,
1053,
28330,
19658,
13,
3166,
869,
14748,
29918,
3188,
1053,
7399,
19661,
13,
3166,
869,
14748,
29918,
1989,
3377,
1053,
7670,
3377,
19661,
13,
13,
3166,
869,
14748,
29918,
1056,
573,
1053,
4465,
573,
19661,
13,
3166,
869,
14748,
29918,
333,
29885,
1053,
5163,
29885,
19661,
13,
13,
3166,
869,
14748,
29918,
711,
303,
6436,
1053,
7399,
19661,
6039,
303,
6436,
13,
13,
2
] |
itglue/resources.py | lisath92/itglue-py | 6 | 1612592 | from . import connection
from . import process_path
import re
__all__ = [
"Organization",
"Configuration",
"ConfigurationType",
"ConfigurationStatus",
"ConfigurationInterface",
"Location",
"FlexibleAsset",
"FlexibleAssetField",
"FlexibleAssetType"
]
class ResourceBase(object):
class ResourceError(Exception):
pass
class ResourceMismatchError(ResourceError):
pass
@classmethod
def resource_type(cls):
raise NotImplementedError('resource_type not implemented for class {}'.format(cls.__name__))
def __init__(self, id=None, **attributes):
self.attributes = attributes
self.id = id
def __repr__(self):
return "<{class_name} id: {id}, attributes: {attributes}>".format(
class_name=self.__class__.__name__,
id=self.id,
attributes=self.attributes
)
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.resource_type() == other.resource_type() and self.id == other.id and self.attributes == other.attributes
return False
def get_attr(self, attr_name):
"""
Get the value of an attribute.
:param attr_name str: the name of the attribute being fetched
:returns: the attribute value or None if it is not set
"""
return self.attributes.get(attr_name)
def set_attr(self, attr_name, attr_value):
"""
Set the value of an attribute.
:param attr_name str: the name of the attribute being set
:param attr_value: the value of the attribute being set
:returns: the attribute value
"""
self.attributes[attr_name] = attr_value
return attr_value
def set_attributes(self, **attributes_dict):
"""
Set the value of multiple attributes.
:param attributes_dict dict: a dictionary containing key-value pairs as attribute names and values to be set
:returns: the resource itself
"""
for attr_name, attr_value in attributes_dict.items():
self.set_attr(attr_name, attr_value)
return self
def save(self, parent=None):
"""
Either creates a resource or updates it (if it already has an id).
This will trigger an api POST or PATCH request.
:returns: the resource itself
"""
if self.id:
return self.update(parent=parent)
else:
return self.create(parent=parent)
def create(self, parent=None, **relationships):
"""
Creates the resource. This will trigger an api POST request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param **relationships: any number of lists as keyword arguments to be submitted as relationships
for the request, e.g. relationship_name=[resource1, resource2]
:raises ResourceError: if the resource has an id (already exists)
:returns: the resource itself
"""
if self.id:
raise self.ResourceError('cannot create a resource with an existing ID')
data = self.__class__._process_request(
connection.post,
parent=parent,
payload=self.payload(),
relationships=self._relationships_payload(relationships)
)
return self._reload(data)
def update(self, parent=None):
"""
Updates the resource. This will trigger an api PATCH request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:raises ResourceError: if the resource does not have an id (does not exist yet)
:returns: the resource itself
"""
if not self.id:
raise self.ResourceError('cannot update a resource without an ID')
data = self.__class__._process_request(
connection.patch,
parent=parent,
id=self.id,
payload=self.payload()
)
return self._reload(data)
def _reload(self, data):
# Loads the id and attributes properties based on a data dict
self._assert_valid_data(data)
self.id = data['id']
self.attributes = data['attributes']
return self
def payload(self):
"""
Renders the resource payload.
:returns: a dict representing the object to be used as payload for a request
"""
payload = {'type': self.resource_type(), 'attributes': self.attributes}
if self.id:
payload['id'] = self.id
return payload
@staticmethod
def _relationships_payload(relationships):
# Returns a dict representing the relationships, used as a payload for a request
rel_payload = {}
for rel_name, rel_items in relationships.items():
rel_payload[rel_name] = list(map(lambda rel_item: rel_item.payload(), rel_items))
return rel_payload
@classmethod
def get(cls, parent=None):
"""
Gets all resources of the given type and parent (if provided). This will trigger an api GET request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:returns: a list of matching resources
"""
data = cls._process_request(connection.get, parent=parent)
return cls._load_resources(data)
@classmethod
def filter(cls, parent=None, **filters):
"""
Gets all resources of the given type and parent (if provided) which match the given filters.
This will trigger an api GET request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param **filters: any number of keyword arguments to filter by, e.g name='example name'
:returns: a list of matching resources
"""
data = cls._process_filter_request(parent, **filters)
return cls._load_resources(data)
@classmethod
def find(cls, id, parent=None):
"""
Gets the resource of the given type and parent (if provided) with matching id.
This will trigger an api GET request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param id int: the id of the resource to be fetched
:returns: the matching resource
:raises ResourceError: if the resource cannot be found
"""
try:
data = cls._process_request(connection.get, parent=parent, id=id)
return cls._load_resource(data)
except connection.RequestError as error:
raise cls.ResourceError(error)
@classmethod
def first_or_create(cls, parent=None, **attributes):
"""
Attempts to find the first resource with the same attributes, creates the resource if no matches are found.
This will trigger an api GET request and a POST request if the resource does not exist.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param **attributes: any number of keyword arguments as attributes to search/create the resource
:returns: a resource instance - the existing one if found, otherwise the newly created one
"""
existing_resource = cls.find_by(parent, **attributes)
if existing_resource:
return existing_resource
return cls(**attributes).create()
@classmethod
def first_or_initialize(cls, parent=None, **attributes):
"""
Attempts to find the first resource with the same attributes, initialized the resource if no matches are found.
This will trigger an api GET request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param **attributes: any number of keyword arguments as attributes to search/initialize the resource
:returns: a resource instance - the existing one if found, otherwise the newly instantiated one
"""
existing_resource = cls.find_by(parent, **attributes)
if existing_resource:
return existing_resource
return cls(**attributes)
@classmethod
def find_by(cls, parent=None, **attributes):
"""
Gets the first resource of the given type and parent (if provided) with matching attributes.
This will trigger an api GET request.
:param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
:param **attributes: any number of keyword arguments as attributes to search the resource by
:returns: the matching resource, None if not found
:raises ResourceError: if the no valid attributes are provided
"""
all_nones = not all(attributes.values())
if not attributes or all_nones:
raise cls.ResourceError('at least one attribute must be provided')
matches = cls.filter(parent, **attributes)
if matches:
return matches[0]
@classmethod
def _process_request(cls, request_func, parent=None, id=None, **request_args):
# Processes the request by processing the path and executing the request_func with request_args
path = cls._process_path(parent=parent, id=id)
return request_func(path, **request_args)
@classmethod
def _process_filter_request(cls, parent=None, **filters):
# Processes a filter get request ensuring the request arguments are formatted properly
all_nones = not all(filters.values())
if not filters or all_nones:
raise cls.ResourceError('at least one valid filter must be provided')
params = {'filter': filters}
return cls._process_request(connection.get, parent=parent, params=params)
@classmethod
def _process_path(cls, parent, id=None):
# Delegates path processing to path_processor.process_path, ensuring the correct arguments are provided
if parent:
if not parent.resource_type():
raise cls.ResourceError('provided parent does not have a resource_type')
elif not parent.id:
raise cls.ResourceError('provided parent does not have an id')
else:
return process_path(cls.resource_type(), parent_type=parent.resource_type(), parent_id=parent.id, id=id)
else:
return process_path(cls.resource_type(), id=id)
@classmethod
def _load_resources(cls, data):
# Loads a number of resources by instantiating them with the given data list
instances = []
for item in data:
instances.append(cls._load_resource(item))
return instances
@classmethod
def _load_resource(cls, data):
# Loads one resource by instantiating it witha given data dict
cls._assert_valid_data(data)
resource_id = data['id']
resource_attributes = data['attributes']
return cls(id=resource_id, **resource_attributes)
@classmethod
def _assert_valid_data(cls, data):
data_keys = data.keys()
if not all(key in data_keys for key in ['type', 'id', 'attributes']):
raise cls.ResourceError(
"Unable to load data. Expected keys 'type', 'id' and 'attributes', got: {}".format(data_keys)
)
data_type = re.sub('-', '_', str(data['type']))
if not data_type == cls.resource_type():
raise cls.ResourceMismatchError(
"Received data type '{}' but expected '{}'".format(data['type'], cls.resource_type())
)
return True
class Organization(ResourceBase):
@classmethod
def resource_type(cls):
return 'organizations'
class Configuration(ResourceBase):
@classmethod
def resource_type(cls):
return 'configurations'
class ConfigurationType(ResourceBase):
@classmethod
def resource_type(cls):
return 'configuration_types'
class ConfigurationStatus(ResourceBase):
@classmethod
def resource_type(cls):
return 'configuration_statuses'
class ConfigurationInterface(ResourceBase):
@classmethod
def resource_type(cls):
return 'configuration_interfaces'
class Location(ResourceBase):
@classmethod
def resource_type(cls):
return 'locations'
class FlexibleAsset(ResourceBase):
@classmethod
def resource_type(cls):
return 'flexible_assets'
class FlexibleAssetType(ResourceBase):
@classmethod
def resource_type(cls):
return 'flexible_asset_types'
class FlexibleAssetField(ResourceBase):
@classmethod
def resource_type(cls):
return 'flexible_asset_fields'
| [
1,
515,
869,
1053,
3957,
13,
3166,
869,
1053,
1889,
29918,
2084,
13,
5215,
337,
13,
13,
1649,
497,
1649,
353,
518,
13,
1678,
376,
27356,
2133,
613,
13,
1678,
376,
8614,
613,
13,
1678,
376,
8614,
1542,
613,
13,
1678,
376,
8614,
5709,
613,
13,
1678,
376,
8614,
10448,
613,
13,
1678,
376,
6508,
613,
13,
1678,
376,
29943,
2506,
1821,
26405,
613,
13,
1678,
376,
29943,
2506,
1821,
26405,
3073,
613,
13,
1678,
376,
29943,
2506,
1821,
26405,
1542,
29908,
13,
29962,
13,
13,
13,
1990,
18981,
5160,
29898,
3318,
1125,
13,
1678,
770,
18981,
2392,
29898,
2451,
1125,
13,
4706,
1209,
13,
13,
1678,
770,
18981,
29924,
1608,
905,
2392,
29898,
6848,
2392,
1125,
13,
4706,
1209,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
877,
10314,
29918,
1853,
451,
8762,
363,
770,
6571,
4286,
4830,
29898,
25932,
17255,
978,
1649,
876,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1178,
29922,
8516,
29892,
3579,
15697,
1125,
13,
4706,
1583,
29889,
15697,
353,
8393,
13,
4706,
1583,
29889,
333,
353,
1178,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
9872,
29912,
1990,
29918,
978,
29913,
1178,
29901,
426,
333,
1118,
8393,
29901,
426,
15697,
17428,
1642,
4830,
29898,
13,
9651,
770,
29918,
978,
29922,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29892,
13,
9651,
1178,
29922,
1311,
29889,
333,
29892,
13,
9651,
8393,
29922,
1311,
29889,
15697,
13,
4706,
1723,
13,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
4706,
565,
338,
8758,
29898,
1228,
29892,
1583,
17255,
1990,
1649,
1125,
13,
9651,
736,
1583,
29889,
10314,
29918,
1853,
580,
1275,
916,
29889,
10314,
29918,
1853,
580,
322,
1583,
29889,
333,
1275,
916,
29889,
333,
322,
1583,
29889,
15697,
1275,
916,
29889,
15697,
13,
4706,
736,
7700,
13,
13,
1678,
822,
679,
29918,
5552,
29898,
1311,
29892,
12421,
29918,
978,
1125,
13,
4706,
9995,
13,
4706,
3617,
278,
995,
310,
385,
5352,
29889,
13,
4706,
584,
3207,
12421,
29918,
978,
851,
29901,
278,
1024,
310,
278,
5352,
1641,
6699,
287,
13,
4706,
584,
18280,
29901,
278,
5352,
995,
470,
6213,
565,
372,
338,
451,
731,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
15697,
29889,
657,
29898,
5552,
29918,
978,
29897,
13,
13,
1678,
822,
731,
29918,
5552,
29898,
1311,
29892,
12421,
29918,
978,
29892,
12421,
29918,
1767,
1125,
13,
4706,
9995,
13,
4706,
3789,
278,
995,
310,
385,
5352,
29889,
13,
4706,
584,
3207,
12421,
29918,
978,
851,
29901,
278,
1024,
310,
278,
5352,
1641,
731,
13,
4706,
584,
3207,
12421,
29918,
1767,
29901,
278,
995,
310,
278,
5352,
1641,
731,
13,
4706,
584,
18280,
29901,
278,
5352,
995,
13,
4706,
9995,
13,
4706,
1583,
29889,
15697,
29961,
5552,
29918,
978,
29962,
353,
12421,
29918,
1767,
13,
4706,
736,
12421,
29918,
1767,
13,
13,
1678,
822,
731,
29918,
15697,
29898,
1311,
29892,
3579,
15697,
29918,
8977,
1125,
13,
4706,
9995,
13,
4706,
3789,
278,
995,
310,
2999,
8393,
29889,
13,
4706,
584,
3207,
8393,
29918,
8977,
9657,
29901,
263,
8600,
6943,
1820,
29899,
1767,
11000,
408,
5352,
2983,
322,
1819,
304,
367,
731,
13,
4706,
584,
18280,
29901,
278,
6503,
3528,
13,
4706,
9995,
13,
4706,
363,
12421,
29918,
978,
29892,
12421,
29918,
1767,
297,
8393,
29918,
8977,
29889,
7076,
7295,
13,
9651,
1583,
29889,
842,
29918,
5552,
29898,
5552,
29918,
978,
29892,
12421,
29918,
1767,
29897,
13,
4706,
736,
1583,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
3847,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
20370,
10017,
263,
6503,
470,
11217,
372,
313,
361,
372,
2307,
756,
385,
1178,
467,
13,
4706,
910,
674,
7135,
385,
7882,
11971,
470,
349,
14789,
2009,
29889,
13,
4706,
584,
18280,
29901,
278,
6503,
3528,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
333,
29901,
13,
9651,
736,
1583,
29889,
5504,
29898,
3560,
29922,
3560,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
3258,
29898,
3560,
29922,
3560,
29897,
13,
13,
1678,
822,
1653,
29898,
1311,
29892,
3847,
29922,
8516,
29892,
3579,
2674,
800,
14587,
1125,
13,
4706,
9995,
13,
4706,
6760,
1078,
278,
6503,
29889,
910,
674,
7135,
385,
7882,
11971,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
3579,
2674,
800,
14587,
29901,
738,
1353,
310,
8857,
408,
13553,
6273,
304,
367,
18397,
408,
21702,
13,
9651,
363,
278,
2009,
29892,
321,
29889,
29887,
29889,
9443,
29918,
978,
11759,
10314,
29896,
29892,
6503,
29906,
29962,
13,
4706,
584,
336,
4637,
18981,
2392,
29901,
565,
278,
6503,
756,
385,
1178,
313,
284,
2040,
4864,
29897,
13,
4706,
584,
18280,
29901,
278,
6503,
3528,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
333,
29901,
13,
9651,
12020,
1583,
29889,
6848,
2392,
877,
29883,
6735,
1653,
263,
6503,
411,
385,
5923,
3553,
1495,
13,
4706,
848,
353,
1583,
17255,
1990,
1649,
3032,
5014,
29918,
3827,
29898,
13,
9651,
3957,
29889,
2490,
29892,
13,
9651,
3847,
29922,
3560,
29892,
13,
9651,
20092,
29922,
1311,
29889,
23813,
3285,
13,
9651,
21702,
29922,
1311,
3032,
2674,
800,
14587,
29918,
23813,
29898,
2674,
800,
14587,
29897,
13,
4706,
1723,
13,
4706,
736,
1583,
3032,
28120,
29898,
1272,
29897,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
3847,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
5020,
15190,
278,
6503,
29889,
910,
674,
7135,
385,
7882,
349,
14789,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
336,
4637,
18981,
2392,
29901,
565,
278,
6503,
947,
451,
505,
385,
1178,
313,
13221,
451,
1863,
3447,
29897,
13,
4706,
584,
18280,
29901,
278,
6503,
3528,
13,
4706,
9995,
13,
4706,
565,
451,
1583,
29889,
333,
29901,
13,
9651,
12020,
1583,
29889,
6848,
2392,
877,
29883,
6735,
2767,
263,
6503,
1728,
385,
3553,
1495,
13,
4706,
848,
353,
1583,
17255,
1990,
1649,
3032,
5014,
29918,
3827,
29898,
13,
9651,
3957,
29889,
5041,
29892,
13,
9651,
3847,
29922,
3560,
29892,
13,
9651,
1178,
29922,
1311,
29889,
333,
29892,
13,
9651,
20092,
29922,
1311,
29889,
23813,
580,
13,
4706,
1723,
13,
4706,
736,
1583,
3032,
28120,
29898,
1272,
29897,
13,
13,
1678,
822,
903,
28120,
29898,
1311,
29892,
848,
1125,
13,
4706,
396,
4309,
7925,
278,
1178,
322,
8393,
4426,
2729,
373,
263,
848,
9657,
13,
4706,
1583,
3032,
9294,
29918,
3084,
29918,
1272,
29898,
1272,
29897,
13,
4706,
1583,
29889,
333,
353,
848,
1839,
333,
2033,
13,
4706,
1583,
29889,
15697,
353,
848,
1839,
15697,
2033,
13,
4706,
736,
1583,
13,
13,
1678,
822,
20092,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
390,
21043,
278,
6503,
20092,
29889,
13,
4706,
584,
18280,
29901,
263,
9657,
15783,
278,
1203,
304,
367,
1304,
408,
20092,
363,
263,
2009,
13,
4706,
9995,
13,
4706,
20092,
353,
11117,
1853,
2396,
1583,
29889,
10314,
29918,
1853,
3285,
525,
15697,
2396,
1583,
29889,
15697,
29913,
13,
4706,
565,
1583,
29889,
333,
29901,
13,
9651,
20092,
1839,
333,
2033,
353,
1583,
29889,
333,
13,
4706,
736,
20092,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
2674,
800,
14587,
29918,
23813,
29898,
2674,
800,
14587,
1125,
13,
4706,
396,
16969,
263,
9657,
15783,
278,
21702,
29892,
1304,
408,
263,
20092,
363,
263,
2009,
13,
4706,
1104,
29918,
23813,
353,
6571,
13,
4706,
363,
1104,
29918,
978,
29892,
1104,
29918,
7076,
297,
21702,
29889,
7076,
7295,
13,
9651,
1104,
29918,
23813,
29961,
2674,
29918,
978,
29962,
353,
1051,
29898,
1958,
29898,
2892,
1104,
29918,
667,
29901,
1104,
29918,
667,
29889,
23813,
3285,
1104,
29918,
7076,
876,
13,
4706,
736,
1104,
29918,
23813,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
679,
29898,
25932,
29892,
3847,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
402,
1691,
599,
7788,
310,
278,
2183,
1134,
322,
3847,
313,
361,
4944,
467,
910,
674,
7135,
385,
7882,
12354,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
18280,
29901,
263,
1051,
310,
9686,
7788,
13,
4706,
9995,
13,
4706,
848,
353,
1067,
29879,
3032,
5014,
29918,
3827,
29898,
9965,
29889,
657,
29892,
3847,
29922,
3560,
29897,
13,
4706,
736,
1067,
29879,
3032,
1359,
29918,
13237,
29898,
1272,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4175,
29898,
25932,
29892,
3847,
29922,
8516,
29892,
3579,
26705,
1125,
13,
4706,
9995,
13,
4706,
402,
1691,
599,
7788,
310,
278,
2183,
1134,
322,
3847,
313,
361,
4944,
29897,
607,
1993,
278,
2183,
18094,
29889,
13,
4706,
910,
674,
7135,
385,
7882,
12354,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
3579,
26705,
29901,
738,
1353,
310,
13553,
6273,
304,
4175,
491,
29892,
321,
29889,
29887,
1024,
2433,
4773,
1024,
29915,
13,
4706,
584,
18280,
29901,
263,
1051,
310,
9686,
7788,
13,
4706,
9995,
13,
4706,
848,
353,
1067,
29879,
3032,
5014,
29918,
4572,
29918,
3827,
29898,
3560,
29892,
3579,
26705,
29897,
13,
4706,
736,
1067,
29879,
3032,
1359,
29918,
13237,
29898,
1272,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
1284,
29898,
25932,
29892,
1178,
29892,
3847,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
402,
1691,
278,
6503,
310,
278,
2183,
1134,
322,
3847,
313,
361,
4944,
29897,
411,
9686,
1178,
29889,
13,
4706,
910,
674,
7135,
385,
7882,
12354,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
1178,
938,
29901,
278,
1178,
310,
278,
6503,
304,
367,
6699,
287,
13,
4706,
584,
18280,
29901,
278,
9686,
6503,
13,
4706,
584,
336,
4637,
18981,
2392,
29901,
565,
278,
6503,
2609,
367,
1476,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
848,
353,
1067,
29879,
3032,
5014,
29918,
3827,
29898,
9965,
29889,
657,
29892,
3847,
29922,
3560,
29892,
1178,
29922,
333,
29897,
13,
9651,
736,
1067,
29879,
3032,
1359,
29918,
10314,
29898,
1272,
29897,
13,
4706,
5174,
3957,
29889,
3089,
2392,
408,
1059,
29901,
13,
9651,
12020,
1067,
29879,
29889,
6848,
2392,
29898,
2704,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
937,
29918,
272,
29918,
3258,
29898,
25932,
29892,
3847,
29922,
8516,
29892,
3579,
15697,
1125,
13,
4706,
9995,
13,
4706,
6212,
3456,
29879,
304,
1284,
278,
937,
6503,
411,
278,
1021,
8393,
29892,
10017,
278,
6503,
565,
694,
7087,
526,
1476,
29889,
13,
4706,
910,
674,
7135,
385,
7882,
12354,
2009,
322,
263,
11971,
2009,
565,
278,
6503,
947,
451,
1863,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
3579,
15697,
29901,
738,
1353,
310,
13553,
6273,
408,
8393,
304,
2740,
29914,
3258,
278,
6503,
13,
4706,
584,
18280,
29901,
263,
6503,
2777,
448,
278,
5923,
697,
565,
1476,
29892,
6467,
278,
15141,
2825,
697,
13,
4706,
9995,
13,
4706,
5923,
29918,
10314,
353,
1067,
29879,
29889,
2886,
29918,
1609,
29898,
3560,
29892,
3579,
15697,
29897,
13,
4706,
565,
5923,
29918,
10314,
29901,
13,
9651,
736,
5923,
29918,
10314,
13,
4706,
736,
1067,
29879,
29898,
1068,
15697,
467,
3258,
580,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
937,
29918,
272,
29918,
24926,
29898,
25932,
29892,
3847,
29922,
8516,
29892,
3579,
15697,
1125,
13,
4706,
9995,
13,
4706,
6212,
3456,
29879,
304,
1284,
278,
937,
6503,
411,
278,
1021,
8393,
29892,
16601,
278,
6503,
565,
694,
7087,
526,
1476,
29889,
13,
4706,
910,
674,
7135,
385,
7882,
12354,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
3579,
15697,
29901,
738,
1353,
310,
13553,
6273,
408,
8393,
304,
2740,
29914,
24926,
278,
6503,
13,
4706,
584,
18280,
29901,
263,
6503,
2777,
448,
278,
5923,
697,
565,
1476,
29892,
6467,
278,
15141,
13213,
630,
697,
13,
4706,
9995,
13,
4706,
5923,
29918,
10314,
353,
1067,
29879,
29889,
2886,
29918,
1609,
29898,
3560,
29892,
3579,
15697,
29897,
13,
4706,
565,
5923,
29918,
10314,
29901,
13,
9651,
736,
5923,
29918,
10314,
13,
4706,
736,
1067,
29879,
29898,
1068,
15697,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
1284,
29918,
1609,
29898,
25932,
29892,
3847,
29922,
8516,
29892,
3579,
15697,
1125,
13,
4706,
9995,
13,
4706,
402,
1691,
278,
937,
6503,
310,
278,
2183,
1134,
322,
3847,
313,
361,
4944,
29897,
411,
9686,
8393,
29889,
13,
4706,
910,
674,
7135,
385,
7882,
12354,
2009,
29889,
13,
4706,
584,
3207,
3847,
18981,
5160,
29901,
278,
3847,
310,
278,
6503,
448,
1304,
363,
17763,
292,
278,
2009,
3142,
29892,
13136,
13,
4706,
584,
3207,
3579,
15697,
29901,
738,
1353,
310,
13553,
6273,
408,
8393,
304,
2740,
278,
6503,
491,
13,
4706,
584,
18280,
29901,
278,
9686,
6503,
29892,
6213,
565,
451,
1476,
13,
4706,
584,
336,
4637,
18981,
2392,
29901,
565,
278,
694,
2854,
8393,
526,
4944,
13,
4706,
9995,
13,
4706,
599,
29918,
29876,
2873,
353,
451,
599,
29898,
15697,
29889,
5975,
3101,
13,
4706,
565,
451,
8393,
470,
599,
29918,
29876,
2873,
29901,
13,
9651,
12020,
1067,
29879,
29889,
6848,
2392,
877,
271,
3203,
697,
5352,
1818,
367,
4944,
1495,
13,
4706,
7087,
353,
1067,
29879,
29889,
4572,
29898,
3560,
29892,
3579,
15697,
29897,
13,
4706,
565,
7087,
29901,
13,
9651,
736,
7087,
29961,
29900,
29962,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
5014,
29918,
3827,
29898,
25932,
29892,
2009,
29918,
9891,
29892,
3847,
29922,
8516,
29892,
1178,
29922,
8516,
29892,
3579,
3827,
29918,
5085,
1125,
13,
4706,
396,
10554,
267,
278,
2009,
491,
9068,
278,
2224,
322,
14012,
278,
2009,
29918,
9891,
411,
2009,
29918,
5085,
13,
4706,
2224,
353,
1067,
29879,
3032,
5014,
29918,
2084,
29898,
3560,
29922,
3560,
29892,
1178,
29922,
333,
29897,
13,
4706,
736,
2009,
29918,
9891,
29898,
2084,
29892,
3579,
3827,
29918,
5085,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
5014,
29918,
4572,
29918,
3827,
29898,
25932,
29892,
3847,
29922,
8516,
29892,
3579,
26705,
1125,
13,
4706,
396,
10554,
267,
263,
4175,
679,
2009,
5662,
3864,
278,
2009,
6273,
526,
20917,
6284,
13,
4706,
599,
29918,
29876,
2873,
353,
451,
599,
29898,
26705,
29889,
5975,
3101,
13,
4706,
565,
451,
18094,
470,
599,
29918,
29876,
2873,
29901,
13,
9651,
12020,
1067,
29879,
29889,
6848,
2392,
877,
271,
3203,
697,
2854,
4175,
1818,
367,
4944,
1495,
13,
4706,
8636,
353,
11117,
4572,
2396,
18094,
29913,
13,
4706,
736,
1067,
29879,
3032,
5014,
29918,
3827,
29898,
9965,
29889,
657,
29892,
3847,
29922,
3560,
29892,
8636,
29922,
7529,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
5014,
29918,
2084,
29898,
25932,
29892,
3847,
29892,
1178,
29922,
8516,
1125,
13,
4706,
396,
897,
1397,
1078,
2224,
9068,
304,
2224,
29918,
26482,
29889,
5014,
29918,
2084,
29892,
5662,
3864,
278,
1959,
6273,
526,
4944,
13,
4706,
565,
3847,
29901,
13,
9651,
565,
451,
3847,
29889,
10314,
29918,
1853,
7295,
13,
18884,
12020,
1067,
29879,
29889,
6848,
2392,
877,
16123,
2618,
3847,
947,
451,
505,
263,
6503,
29918,
1853,
1495,
13,
9651,
25342,
451,
3847,
29889,
333,
29901,
13,
18884,
12020,
1067,
29879,
29889,
6848,
2392,
877,
16123,
2618,
3847,
947,
451,
505,
385,
1178,
1495,
13,
9651,
1683,
29901,
13,
18884,
736,
1889,
29918,
2084,
29898,
25932,
29889,
10314,
29918,
1853,
3285,
3847,
29918,
1853,
29922,
3560,
29889,
10314,
29918,
1853,
3285,
3847,
29918,
333,
29922,
3560,
29889,
333,
29892,
1178,
29922,
333,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1889,
29918,
2084,
29898,
25932,
29889,
10314,
29918,
1853,
3285,
1178,
29922,
333,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
1359,
29918,
13237,
29898,
25932,
29892,
848,
1125,
13,
4706,
396,
4309,
7925,
263,
1353,
310,
7788,
491,
13213,
1218,
963,
411,
278,
2183,
848,
1051,
13,
4706,
8871,
353,
5159,
13,
4706,
363,
2944,
297,
848,
29901,
13,
9651,
8871,
29889,
4397,
29898,
25932,
3032,
1359,
29918,
10314,
29898,
667,
876,
13,
4706,
736,
8871,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
1359,
29918,
10314,
29898,
25932,
29892,
848,
1125,
13,
4706,
396,
4309,
7925,
697,
6503,
491,
13213,
1218,
372,
411,
29874,
2183,
848,
9657,
13,
4706,
1067,
29879,
3032,
9294,
29918,
3084,
29918,
1272,
29898,
1272,
29897,
13,
4706,
6503,
29918,
333,
353,
848,
1839,
333,
2033,
13,
4706,
6503,
29918,
15697,
353,
848,
1839,
15697,
2033,
13,
4706,
736,
1067,
29879,
29898,
333,
29922,
10314,
29918,
333,
29892,
3579,
10314,
29918,
15697,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
903,
9294,
29918,
3084,
29918,
1272,
29898,
25932,
29892,
848,
1125,
13,
4706,
848,
29918,
8149,
353,
848,
29889,
8149,
580,
13,
4706,
565,
451,
599,
29898,
1989,
297,
848,
29918,
8149,
363,
1820,
297,
6024,
1853,
742,
525,
333,
742,
525,
15697,
2033,
1125,
13,
9651,
12020,
1067,
29879,
29889,
6848,
2392,
29898,
13,
18884,
376,
2525,
519,
304,
2254,
848,
29889,
1222,
6021,
6611,
525,
1853,
742,
525,
333,
29915,
322,
525,
15697,
742,
2355,
29901,
6571,
1642,
4830,
29898,
1272,
29918,
8149,
29897,
13,
9651,
1723,
13,
4706,
848,
29918,
1853,
353,
337,
29889,
1491,
877,
29899,
742,
22868,
742,
851,
29898,
1272,
1839,
1853,
25901,
13,
4706,
565,
451,
848,
29918,
1853,
1275,
1067,
29879,
29889,
10314,
29918,
1853,
7295,
13,
9651,
12020,
1067,
29879,
29889,
6848,
29924,
1608,
905,
2392,
29898,
13,
18884,
376,
29816,
848,
1134,
525,
8875,
29915,
541,
3806,
525,
8875,
29915,
1642,
4830,
29898,
1272,
1839,
1853,
7464,
1067,
29879,
29889,
10314,
29918,
1853,
3101,
13,
9651,
1723,
13,
4706,
736,
5852,
13,
13,
13,
1990,
9205,
2133,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
6388,
17063,
29915,
13,
13,
13,
1990,
20999,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
2917,
332,
800,
29915,
13,
13,
13,
1990,
20999,
1542,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
13305,
29918,
8768,
29915,
13,
13,
13,
1990,
20999,
5709,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
13305,
29918,
4882,
267,
29915,
13,
13,
13,
1990,
20999,
10448,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
13305,
29918,
1639,
8726,
29915,
13,
13,
13,
1990,
17015,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
2029,
800,
29915,
13,
13,
13,
1990,
383,
2506,
1821,
26405,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
16041,
1821,
29918,
16596,
29915,
13,
13,
13,
1990,
383,
2506,
1821,
26405,
1542,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
16041,
1821,
29918,
24129,
29918,
8768,
29915,
13,
13,
13,
1990,
383,
2506,
1821,
26405,
3073,
29898,
6848,
5160,
1125,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6503,
29918,
1853,
29898,
25932,
1125,
13,
4706,
736,
525,
16041,
1821,
29918,
24129,
29918,
9621,
29915,
13,
2
] |
mozumder/models/i18n/scripts.py | mozumder/django-mozumder | 1 | 118130 | from django.db import models
from datetime import date
# Create your models here.
class Script(models.Model):
"""
For the script designator, use the ISO 15924 standard, four letters with the first letter
uppercase and the last three lowercase.
"""
iso_15294 = models.CharField(max_length=4,unique=True)
code_number = models.CharField(max_length=3,unique=True)
unicode_alias = models.CharField(max_length=75)
unicode_version = models.CharField(max_length=4)
version_date = models.DateField(default=date.today)
def __str__(self):
return self.iso_15294
class ScriptLang(models.Model):
script = models.ForeignKey('Script', related_name='names', on_delete=models.CASCADE)
name = models.CharField(max_length=30)
lang = models.ForeignKey('Lang', related_name='script_langs', on_delete=models.CASCADE)
class Meta:
constraints = [
models.UniqueConstraint(
fields = [
'script',
'lang',
],
name='scriptlang_uniquetogether'
)
]
def __str__(self):
return self.name
| [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
12865,
1053,
2635,
13,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
13,
1990,
14415,
29898,
9794,
29889,
3195,
1125,
13,
1678,
9995,
13,
1678,
1152,
278,
2471,
2874,
1061,
29892,
671,
278,
17723,
29871,
29896,
29945,
29929,
29906,
29946,
3918,
29892,
3023,
8721,
411,
278,
937,
5497,
13,
1678,
7568,
4878,
322,
278,
1833,
2211,
5224,
4878,
29889,
13,
1678,
9995,
13,
1678,
338,
29877,
29918,
29896,
29945,
29906,
29929,
29946,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29946,
29892,
13092,
29922,
5574,
29897,
13,
1678,
775,
29918,
4537,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29892,
13092,
29922,
5574,
29897,
13,
1678,
29104,
29918,
19973,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29955,
29945,
29897,
13,
1678,
29104,
29918,
3259,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29946,
29897,
13,
1678,
1873,
29918,
1256,
353,
4733,
29889,
2539,
3073,
29898,
4381,
29922,
1256,
29889,
27765,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
10718,
29918,
29896,
29945,
29906,
29929,
29946,
13,
13,
1990,
14415,
29931,
574,
29898,
9794,
29889,
3195,
1125,
13,
1678,
2471,
353,
4733,
29889,
27755,
2558,
877,
4081,
742,
4475,
29918,
978,
2433,
7039,
742,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
29897,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29900,
29897,
13,
1678,
6361,
353,
4733,
29889,
27755,
2558,
877,
29931,
574,
742,
4475,
29918,
978,
2433,
2154,
29918,
3893,
29879,
742,
373,
29918,
8143,
29922,
9794,
29889,
29907,
3289,
5454,
2287,
29897,
13,
1678,
770,
20553,
29901,
13,
4706,
11938,
353,
518,
13,
9651,
4733,
29889,
8110,
802,
21529,
29898,
13,
18884,
4235,
353,
518,
13,
462,
1678,
525,
2154,
742,
13,
462,
1678,
525,
3893,
742,
13,
462,
1678,
21251,
13,
18884,
1024,
2433,
2154,
3893,
29918,
3909,
12621,
12966,
29915,
13,
9651,
1723,
13,
4706,
4514,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
13,
2
] |
custom/icds_reports/data_pull/exceptions.py | scottwedge/commcare-hq | 0 | 170202 | <reponame>scottwedge/commcare-hq
class UnboundDataPullException(Exception):
pass
class DataPullInProgressError(Exception):
pass
| [
1,
529,
276,
1112,
420,
29958,
1557,
1501,
17864,
29914,
2055,
18020,
29899,
29882,
29939,
13,
1990,
853,
9917,
1469,
29925,
913,
2451,
29898,
2451,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
3630,
29925,
913,
797,
14470,
2392,
29898,
2451,
1125,
13,
1678,
1209,
13,
2
] |
lib/zkv/zkv.py | csernazs/zkv | 0 | 112202 | <reponame>csernazs/zkv
from .exc import Error
class ZKVError(Error):
pass
class ZKV:
def __init__(self, backend, key_transforms=None, value_transforms=None):
self.backend = backend
if key_transforms is None:
key_transforms = []
if value_transforms is None:
value_transforms = []
self.key_transforms = key_transforms
self.value_transforms = value_transforms
def connect(self, pool):
return ZKVConnection(self.backend.connect(pool), self.key_transforms, self.value_transforms)
class ZKVConnection:
def __init__(self, pool, key_transforms, value_transforms):
self.pool = pool
self.key_transforms = key_transforms
self.value_transforms = value_transforms
def get(self, key, default=None):
try:
return self[key]
except KeyError:
return default
def __getitem__(self, key):
for transform in self.key_transforms:
key = transform.encode(key)
value = self.pool.get(key)
for transform in self.value_transforms:
value = transform.decode(value)
return value
def __setitem__(self, key, value):
for transform in self.key_transforms:
key = transform.decode(key)
new = self.pool.create(key)
for transform in self.value_transforms:
value = transform.encode(value)
new.write(value)
new.close()
def __delitem__(self, key):
self.pool.delete(key)
def __contains__(self, key):
return self.pool.contains(key)
def iterkeys(self):
return self.pool.iterkeys()
| [
1,
529,
276,
1112,
420,
29958,
29883,
643,
29876,
834,
29879,
29914,
7730,
29894,
13,
13,
3166,
869,
735,
29883,
1053,
4829,
13,
13,
13,
1990,
796,
29968,
29963,
2392,
29898,
2392,
1125,
13,
1678,
1209,
13,
13,
13,
1990,
796,
29968,
29963,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
14998,
29892,
1820,
29918,
9067,
29879,
29922,
8516,
29892,
995,
29918,
9067,
29879,
29922,
8516,
1125,
13,
4706,
1583,
29889,
27852,
353,
14998,
13,
4706,
565,
1820,
29918,
9067,
29879,
338,
6213,
29901,
13,
9651,
1820,
29918,
9067,
29879,
353,
5159,
13,
13,
4706,
565,
995,
29918,
9067,
29879,
338,
6213,
29901,
13,
9651,
995,
29918,
9067,
29879,
353,
5159,
13,
13,
4706,
1583,
29889,
1989,
29918,
9067,
29879,
353,
1820,
29918,
9067,
29879,
13,
4706,
1583,
29889,
1767,
29918,
9067,
29879,
353,
995,
29918,
9067,
29879,
13,
13,
1678,
822,
4511,
29898,
1311,
29892,
11565,
1125,
13,
4706,
736,
796,
29968,
29963,
5350,
29898,
1311,
29889,
27852,
29889,
6915,
29898,
10109,
511,
1583,
29889,
1989,
29918,
9067,
29879,
29892,
1583,
29889,
1767,
29918,
9067,
29879,
29897,
13,
13,
1990,
796,
29968,
29963,
5350,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
11565,
29892,
1820,
29918,
9067,
29879,
29892,
995,
29918,
9067,
29879,
1125,
13,
4706,
1583,
29889,
10109,
353,
11565,
13,
4706,
1583,
29889,
1989,
29918,
9067,
29879,
353,
1820,
29918,
9067,
29879,
13,
4706,
1583,
29889,
1767,
29918,
9067,
29879,
353,
995,
29918,
9067,
29879,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
1820,
29892,
2322,
29922,
8516,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
29961,
1989,
29962,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
736,
2322,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
363,
4327,
297,
1583,
29889,
1989,
29918,
9067,
29879,
29901,
13,
9651,
1820,
353,
4327,
29889,
12508,
29898,
1989,
29897,
13,
13,
4706,
995,
353,
1583,
29889,
10109,
29889,
657,
29898,
1989,
29897,
13,
13,
4706,
363,
4327,
297,
1583,
29889,
1767,
29918,
9067,
29879,
29901,
13,
9651,
995,
353,
4327,
29889,
13808,
29898,
1767,
29897,
13,
13,
4706,
736,
995,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
995,
1125,
13,
4706,
363,
4327,
297,
1583,
29889,
1989,
29918,
9067,
29879,
29901,
13,
9651,
1820,
353,
4327,
29889,
13808,
29898,
1989,
29897,
13,
13,
4706,
716,
353,
1583,
29889,
10109,
29889,
3258,
29898,
1989,
29897,
13,
13,
4706,
363,
4327,
297,
1583,
29889,
1767,
29918,
9067,
29879,
29901,
13,
9651,
995,
353,
4327,
29889,
12508,
29898,
1767,
29897,
13,
13,
4706,
716,
29889,
3539,
29898,
1767,
29897,
13,
4706,
716,
29889,
5358,
580,
13,
13,
1678,
822,
4770,
6144,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
1583,
29889,
10109,
29889,
8143,
29898,
1989,
29897,
13,
13,
1678,
822,
4770,
11516,
12035,
1311,
29892,
1820,
1125,
13,
4706,
736,
1583,
29889,
10109,
29889,
11516,
29898,
1989,
29897,
13,
13,
1678,
822,
4256,
8149,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
10109,
29889,
1524,
8149,
580,
13,
13,
2
] |
tests/dummies.py | arvindmuralie77/gradsflow | 253 | 797 | # Copyright (c) 2021 GradsFlow. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import torch
from gradsflow.models import Model
class DummyModel(Model):
def __init__(self):
learner = torch.nn.Linear(1, 4)
super().__init__(learner)
def backward(self, loss: torch.Tensor):
return None
def train_step(self, batch):
return {"loss": torch.as_tensor(1), "metrics": {"accuracy": 1}}
def val_step(self, batch):
return {"loss": torch.as_tensor(1), "metrics": {"accuracy": 1}}
| [
1,
396,
29871,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
1632,
7925,
17907,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
29871,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
29871,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
29871,
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,
29871,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
29871,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
29871,
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,
29871,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
29871,
27028,
1090,
278,
19245,
29889,
13,
13,
5215,
4842,
305,
13,
13,
3166,
4656,
29879,
1731,
29889,
9794,
1053,
8125,
13,
13,
13,
1990,
360,
11770,
3195,
29898,
3195,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
24298,
1089,
353,
4842,
305,
29889,
15755,
29889,
12697,
29898,
29896,
29892,
29871,
29946,
29897,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1945,
1089,
29897,
13,
13,
1678,
822,
1250,
1328,
29898,
1311,
29892,
6410,
29901,
4842,
305,
29889,
29911,
6073,
1125,
13,
4706,
736,
6213,
13,
13,
1678,
822,
7945,
29918,
10568,
29898,
1311,
29892,
9853,
1125,
13,
4706,
736,
8853,
6758,
1115,
4842,
305,
29889,
294,
29918,
20158,
29898,
29896,
511,
376,
2527,
10817,
1115,
8853,
562,
2764,
4135,
1115,
29871,
29896,
930,
13,
13,
1678,
822,
659,
29918,
10568,
29898,
1311,
29892,
9853,
1125,
13,
4706,
736,
8853,
6758,
1115,
4842,
305,
29889,
294,
29918,
20158,
29898,
29896,
511,
376,
2527,
10817,
1115,
8853,
562,
2764,
4135,
1115,
29871,
29896,
930,
13,
2
] |
networks/network.py | valeoai/POCO | 13 | 154973 | <gh_stars>10-100
import torch
from torch_geometric.data import Data
import logging
from .backbone import *
from .decoder import *
from lightconvpoint.spatial import knn, sampling_quantized as sampling
from lightconvpoint.utils.functional import batch_gather
from lightconvpoint.nn import max_pool, interpolate
def count_parameters(model):
return sum(p.numel() for p in model.parameters() if p.requires_grad)
class Network(torch.nn.Module):
def __init__(self, in_channels, latent_size, out_channels, backbone, decoder, **kwargs):
super().__init__()
self.net = eval(backbone)(in_channels, latent_size, segmentation=True, dropout=0)
self.projection = eval(decoder["name"])(latent_size, out_channels, decoder["k"])
self.lcp_preprocess = True
logging.info(f"Network -- backbone -- {count_parameters(self.net)} parameters")
logging.info(f"Network -- projection -- {count_parameters(self.projection)} parameters")
def forward(self, data, spatial_only=False, spectral_only=False):
if spatial_only:
net_data = self.net(data, spatial_only=spatial_only)
if "output_support" in net_data:
data["output_support"] = net_data["output_support"]
proj_data = self.projection.forward_spatial(data)
net_data["proj_indices"] = proj_data["proj_indices"]
return net_data
if not spectral_only:
spatial_data = self.net.forward_spatial(data)
if "output_support" in spatial_data:
data["output_support"] = spatial_data["output_support"]
proj_data = self.projection.forward_spatial(data)
spatial_data["proj_indices"] = proj_data["proj_indices"]
for key, value in spatial_data.items():
data[key] = value
latents = self.net(data, spectral_only=True)
data["latents"] = latents
ret_data = self.projection(data, spectral_only=True)
return ret_data
def get_latent(self, data, with_correction=False, spatial_only=False, spectral_only=False):
latents = self.net(data, spatial_only=spatial_only, spectral_only=spectral_only)
data["latents"] = latents
data["proj_correction"] = None
if with_correction:
data_in_proj = {"latents":latents, "pos":data["pos"], "pos_non_manifold":data["pos"].clone(), "proj_correction":None}
data_proj = self.projection(data_in_proj, spectral_only=False)
data["proj_correction"] = data_proj
return data
def from_latent(self, data):
data_proj = self.projection(data)
return data_proj#["outputs"]
class NetworkMultiScale(torch.nn.Module):
def __init__(self, in_channels, latent_size, out_channels, backbone, decoder, **kwargs):
super().__init__()
self.net = eval(backbone)(in_channels, latent_size, segmentation=True, dropout=0)
self.merge_latent = torch.nn.Sequential(
torch.nn.Conv1d(2*latent_size, latent_size,1),
torch.nn.ReLU(),
torch.nn.Conv1d(latent_size, latent_size,1),
torch.nn.ReLU(),
torch.nn.Conv1d(latent_size, latent_size,1)
)
if "Radius" in decoder["name"]:
self.projection = eval(decoder["name"])(latent_size, out_channels, decoder["radius"])
else:
self.projection = eval(decoder["name"])(latent_size, out_channels, decoder["k"])
self.lcp_preprocess = True
logging.info(f"Network -- backbone -- {count_parameters(self.net)} parameters")
logging.info(f"Network -- projection -- {count_parameters(self.projection)} parameters")
def forward(self, data):
# compute the down sampled latents
# ids_down = torch.rand((data["pos"].shape[0], 3000), device=data["pos"].device) * data["pos"].shape[2]
# ids_down = ids_down.long()
with torch.no_grad():
pos_down, idsDown = sampling(data["pos"], n_support=3000)
x_down = batch_gather(data["x"], dim=2, index=idsDown).contiguous()
data_down = {'x':x_down, 'pos':pos_down}
latents_down = self.net(data_down)
idsUp = knn(pos_down, data["pos"], 1)
latents_down = interpolate(latents_down, idsUp)
latents = self.net(data)
latents = torch.cat([latents, latents_down], dim=1)
latents = self.merge_latent(latents)
data["latents"] = latents
ret_data = self.projection(data)
return ret_data
def train(self, mode=True):
r"""Sets the module in training mode."""
self.training = mode
# set only the merge to train
for module in self.children():
module.train(False)
self.merge_latent.train(mode)
return self
def get_latent(self, data, with_correction=False, spatial_only=False, spectral_only=False):
latents = self.net(data, spatial_only=spatial_only, spectral_only=spectral_only)
data["latents"] = latents
data["proj_correction"] = None
if with_correction:
data_in_proj = {"latents":latents, "pos":data["pos"], "pos_non_manifold":data["pos"].clone(), "proj_correction":None}
data_proj = self.projection(data_in_proj, spectral_only=False)
data["proj_correction"] = data_proj
return data
def from_latent(self, data):
data_proj = self.projection(data)
return data_proj#["outputs"]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
1272,
1053,
3630,
13,
5215,
12183,
13,
3166,
869,
1627,
15933,
1053,
334,
13,
3166,
869,
7099,
6119,
1053,
334,
13,
3166,
3578,
20580,
3149,
29889,
1028,
15238,
1053,
889,
29876,
29892,
23460,
29918,
12150,
1891,
408,
23460,
13,
3166,
3578,
20580,
3149,
29889,
13239,
29889,
2220,
284,
1053,
9853,
29918,
29887,
1624,
13,
3166,
3578,
20580,
3149,
29889,
15755,
1053,
4236,
29918,
10109,
29892,
20064,
403,
13,
13,
1753,
2302,
29918,
16744,
29898,
4299,
1125,
13,
1678,
736,
2533,
29898,
29886,
29889,
1949,
295,
580,
363,
282,
297,
1904,
29889,
16744,
580,
565,
282,
29889,
276,
339,
2658,
29918,
5105,
29897,
13,
13,
13,
1990,
8527,
29898,
7345,
305,
29889,
15755,
29889,
7355,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29892,
3405,
296,
29918,
2311,
29892,
714,
29918,
305,
12629,
29892,
1250,
15933,
29892,
1602,
6119,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
29889,
1212,
353,
19745,
29898,
1627,
15933,
5033,
262,
29918,
305,
12629,
29892,
3405,
296,
29918,
2311,
29892,
10768,
362,
29922,
5574,
29892,
5768,
449,
29922,
29900,
29897,
13,
4706,
1583,
29889,
771,
6929,
353,
19745,
29898,
7099,
6119,
3366,
978,
20068,
29898,
5066,
296,
29918,
2311,
29892,
714,
29918,
305,
12629,
29892,
1602,
6119,
3366,
29895,
20068,
13,
4706,
1583,
29889,
29880,
6814,
29918,
1457,
5014,
353,
5852,
13,
13,
4706,
12183,
29889,
3888,
29898,
29888,
29908,
13724,
1192,
1250,
15933,
1192,
426,
2798,
29918,
16744,
29898,
1311,
29889,
1212,
2915,
4128,
1159,
13,
4706,
12183,
29889,
3888,
29898,
29888,
29908,
13724,
1192,
18246,
1192,
426,
2798,
29918,
16744,
29898,
1311,
29889,
771,
6929,
2915,
4128,
1159,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
848,
29892,
18652,
29918,
6194,
29922,
8824,
29892,
23161,
29918,
6194,
29922,
8824,
1125,
13,
13,
4706,
565,
18652,
29918,
6194,
29901,
13,
9651,
7787,
29918,
1272,
353,
1583,
29889,
1212,
29898,
1272,
29892,
18652,
29918,
6194,
29922,
1028,
15238,
29918,
6194,
29897,
13,
9651,
565,
376,
4905,
29918,
5924,
29908,
297,
7787,
29918,
1272,
29901,
13,
18884,
848,
3366,
4905,
29918,
5924,
3108,
353,
7787,
29918,
1272,
3366,
4905,
29918,
5924,
3108,
13,
9651,
410,
29926,
29918,
1272,
353,
1583,
29889,
771,
6929,
29889,
11333,
29918,
1028,
15238,
29898,
1272,
29897,
13,
9651,
7787,
29918,
1272,
3366,
20865,
29918,
513,
1575,
3108,
353,
410,
29926,
29918,
1272,
3366,
20865,
29918,
513,
1575,
3108,
13,
9651,
736,
7787,
29918,
1272,
13,
13,
4706,
565,
451,
23161,
29918,
6194,
29901,
13,
9651,
18652,
29918,
1272,
353,
1583,
29889,
1212,
29889,
11333,
29918,
1028,
15238,
29898,
1272,
29897,
13,
9651,
565,
376,
4905,
29918,
5924,
29908,
297,
18652,
29918,
1272,
29901,
13,
18884,
848,
3366,
4905,
29918,
5924,
3108,
353,
18652,
29918,
1272,
3366,
4905,
29918,
5924,
3108,
13,
9651,
410,
29926,
29918,
1272,
353,
1583,
29889,
771,
6929,
29889,
11333,
29918,
1028,
15238,
29898,
1272,
29897,
13,
9651,
18652,
29918,
1272,
3366,
20865,
29918,
513,
1575,
3108,
353,
410,
29926,
29918,
1272,
3366,
20865,
29918,
513,
1575,
3108,
13,
9651,
363,
1820,
29892,
995,
297,
18652,
29918,
1272,
29889,
7076,
7295,
13,
18884,
848,
29961,
1989,
29962,
353,
995,
13,
13,
4706,
3405,
1237,
353,
1583,
29889,
1212,
29898,
1272,
29892,
23161,
29918,
6194,
29922,
5574,
29897,
13,
4706,
848,
3366,
5066,
1237,
3108,
353,
3405,
1237,
13,
4706,
3240,
29918,
1272,
353,
1583,
29889,
771,
6929,
29898,
1272,
29892,
23161,
29918,
6194,
29922,
5574,
29897,
13,
13,
4706,
736,
3240,
29918,
1272,
13,
13,
13,
13,
1678,
822,
679,
29918,
5066,
296,
29898,
1311,
29892,
848,
29892,
411,
29918,
2616,
276,
428,
29922,
8824,
29892,
18652,
29918,
6194,
29922,
8824,
29892,
23161,
29918,
6194,
29922,
8824,
1125,
13,
13,
4706,
3405,
1237,
353,
1583,
29889,
1212,
29898,
1272,
29892,
18652,
29918,
6194,
29922,
1028,
15238,
29918,
6194,
29892,
23161,
29918,
6194,
29922,
21494,
1705,
29918,
6194,
29897,
13,
4706,
848,
3366,
5066,
1237,
3108,
353,
3405,
1237,
13,
13,
4706,
848,
3366,
20865,
29918,
2616,
276,
428,
3108,
353,
6213,
13,
4706,
565,
411,
29918,
2616,
276,
428,
29901,
13,
9651,
848,
29918,
262,
29918,
20865,
353,
8853,
5066,
1237,
1115,
5066,
1237,
29892,
376,
1066,
1115,
1272,
3366,
1066,
12436,
376,
1066,
29918,
5464,
29918,
1171,
361,
1025,
1115,
1272,
3366,
1066,
16862,
16513,
3285,
376,
20865,
29918,
2616,
276,
428,
1115,
8516,
29913,
13,
9651,
848,
29918,
20865,
353,
1583,
29889,
771,
6929,
29898,
1272,
29918,
262,
29918,
20865,
29892,
23161,
29918,
6194,
29922,
8824,
29897,
13,
9651,
848,
3366,
20865,
29918,
2616,
276,
428,
3108,
353,
848,
29918,
20865,
13,
4706,
736,
848,
13,
13,
1678,
822,
515,
29918,
5066,
296,
29898,
1311,
29892,
848,
1125,
13,
4706,
848,
29918,
20865,
353,
1583,
29889,
771,
6929,
29898,
1272,
29897,
13,
4706,
736,
848,
29918,
20865,
29937,
3366,
4905,
29879,
3108,
13,
13,
13,
1990,
8527,
15329,
17185,
29898,
7345,
305,
29889,
15755,
29889,
7355,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29892,
3405,
296,
29918,
2311,
29892,
714,
29918,
305,
12629,
29892,
1250,
15933,
29892,
1602,
6119,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
29889,
1212,
353,
19745,
29898,
1627,
15933,
5033,
262,
29918,
305,
12629,
29892,
3405,
296,
29918,
2311,
29892,
10768,
362,
29922,
5574,
29892,
5768,
449,
29922,
29900,
29897,
13,
13,
4706,
1583,
29889,
14634,
29918,
5066,
296,
353,
4842,
305,
29889,
15755,
29889,
16941,
2556,
29898,
13,
9651,
4842,
305,
29889,
15755,
29889,
1168,
29894,
29896,
29881,
29898,
29906,
29930,
5066,
296,
29918,
2311,
29892,
3405,
296,
29918,
2311,
29892,
29896,
511,
13,
9651,
4842,
305,
29889,
15755,
29889,
1123,
29931,
29965,
3285,
13,
9651,
4842,
305,
29889,
15755,
29889,
1168,
29894,
29896,
29881,
29898,
5066,
296,
29918,
2311,
29892,
3405,
296,
29918,
2311,
29892,
29896,
511,
13,
9651,
4842,
305,
29889,
15755,
29889,
1123,
29931,
29965,
3285,
13,
9651,
4842,
305,
29889,
15755,
29889,
1168,
29894,
29896,
29881,
29898,
5066,
296,
29918,
2311,
29892,
3405,
296,
29918,
2311,
29892,
29896,
29897,
13,
4706,
1723,
13,
13,
4706,
565,
376,
20494,
29908,
297,
1602,
6119,
3366,
978,
3108,
29901,
13,
9651,
1583,
29889,
771,
6929,
353,
19745,
29898,
7099,
6119,
3366,
978,
20068,
29898,
5066,
296,
29918,
2311,
29892,
714,
29918,
305,
12629,
29892,
1602,
6119,
3366,
13471,
20068,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
771,
6929,
353,
19745,
29898,
7099,
6119,
3366,
978,
20068,
29898,
5066,
296,
29918,
2311,
29892,
714,
29918,
305,
12629,
29892,
1602,
6119,
3366,
29895,
20068,
13,
4706,
1583,
29889,
29880,
6814,
29918,
1457,
5014,
353,
5852,
13,
13,
4706,
12183,
29889,
3888,
29898,
29888,
29908,
13724,
1192,
1250,
15933,
1192,
426,
2798,
29918,
16744,
29898,
1311,
29889,
1212,
2915,
4128,
1159,
13,
4706,
12183,
29889,
3888,
29898,
29888,
29908,
13724,
1192,
18246,
1192,
426,
2798,
29918,
16744,
29898,
1311,
29889,
771,
6929,
2915,
4128,
1159,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
848,
1125,
13,
13,
4706,
396,
10272,
278,
1623,
4559,
29881,
3405,
1237,
13,
4706,
396,
18999,
29918,
3204,
353,
4842,
305,
29889,
9502,
3552,
1272,
3366,
1066,
16862,
12181,
29961,
29900,
1402,
29871,
29941,
29900,
29900,
29900,
511,
4742,
29922,
1272,
3366,
1066,
16862,
10141,
29897,
334,
848,
3366,
1066,
16862,
12181,
29961,
29906,
29962,
13,
4706,
396,
18999,
29918,
3204,
353,
18999,
29918,
3204,
29889,
5426,
580,
13,
13,
4706,
411,
4842,
305,
29889,
1217,
29918,
5105,
7295,
13,
9651,
926,
29918,
3204,
29892,
18999,
6767,
353,
23460,
29898,
1272,
3366,
1066,
12436,
302,
29918,
5924,
29922,
29941,
29900,
29900,
29900,
29897,
13,
9651,
921,
29918,
3204,
353,
9853,
29918,
29887,
1624,
29898,
1272,
3366,
29916,
12436,
3964,
29922,
29906,
29892,
2380,
29922,
4841,
6767,
467,
1285,
5526,
681,
580,
13,
9651,
848,
29918,
3204,
353,
11117,
29916,
2396,
29916,
29918,
3204,
29892,
525,
1066,
2396,
1066,
29918,
3204,
29913,
13,
9651,
3405,
1237,
29918,
3204,
353,
1583,
29889,
1212,
29898,
1272,
29918,
3204,
29897,
13,
9651,
18999,
3373,
353,
889,
29876,
29898,
1066,
29918,
3204,
29892,
848,
3366,
1066,
12436,
29871,
29896,
29897,
13,
9651,
3405,
1237,
29918,
3204,
353,
20064,
403,
29898,
5066,
1237,
29918,
3204,
29892,
18999,
3373,
29897,
13,
308,
13,
4706,
3405,
1237,
353,
1583,
29889,
1212,
29898,
1272,
29897,
13,
308,
13,
4706,
3405,
1237,
353,
4842,
305,
29889,
4117,
4197,
5066,
1237,
29892,
3405,
1237,
29918,
3204,
1402,
3964,
29922,
29896,
29897,
13,
4706,
3405,
1237,
353,
1583,
29889,
14634,
29918,
5066,
296,
29898,
5066,
1237,
29897,
13,
13,
4706,
848,
3366,
5066,
1237,
3108,
353,
3405,
1237,
13,
4706,
3240,
29918,
1272,
353,
1583,
29889,
771,
6929,
29898,
1272,
29897,
13,
13,
4706,
736,
3240,
29918,
1272,
13,
13,
1678,
822,
7945,
29898,
1311,
29892,
4464,
29922,
5574,
1125,
13,
4706,
364,
15945,
29908,
29903,
1691,
278,
3883,
297,
6694,
4464,
1213,
15945,
539,
13,
4706,
1583,
29889,
26495,
353,
4464,
13,
4706,
396,
731,
871,
278,
10366,
304,
7945,
13,
4706,
363,
3883,
297,
1583,
29889,
11991,
7295,
13,
9651,
3883,
29889,
14968,
29898,
8824,
29897,
13,
4706,
1583,
29889,
14634,
29918,
5066,
296,
29889,
14968,
29898,
8513,
29897,
13,
4706,
736,
1583,
13,
13,
1678,
822,
679,
29918,
5066,
296,
29898,
1311,
29892,
848,
29892,
411,
29918,
2616,
276,
428,
29922,
8824,
29892,
18652,
29918,
6194,
29922,
8824,
29892,
23161,
29918,
6194,
29922,
8824,
1125,
13,
13,
4706,
3405,
1237,
353,
1583,
29889,
1212,
29898,
1272,
29892,
18652,
29918,
6194,
29922,
1028,
15238,
29918,
6194,
29892,
23161,
29918,
6194,
29922,
21494,
1705,
29918,
6194,
29897,
13,
4706,
848,
3366,
5066,
1237,
3108,
353,
3405,
1237,
13,
13,
4706,
848,
3366,
20865,
29918,
2616,
276,
428,
3108,
353,
6213,
13,
4706,
565,
411,
29918,
2616,
276,
428,
29901,
13,
9651,
848,
29918,
262,
29918,
20865,
353,
8853,
5066,
1237,
1115,
5066,
1237,
29892,
376,
1066,
1115,
1272,
3366,
1066,
12436,
376,
1066,
29918,
5464,
29918,
1171,
361,
1025,
1115,
1272,
3366,
1066,
16862,
16513,
3285,
376,
20865,
29918,
2616,
276,
428,
1115,
8516,
29913,
13,
9651,
848,
29918,
20865,
353,
1583,
29889,
771,
6929,
29898,
1272,
29918,
262,
29918,
20865,
29892,
23161,
29918,
6194,
29922,
8824,
29897,
13,
9651,
848,
3366,
20865,
29918,
2616,
276,
428,
3108,
353,
848,
29918,
20865,
13,
4706,
736,
848,
13,
13,
1678,
822,
515,
29918,
5066,
296,
29898,
1311,
29892,
848,
1125,
13,
4706,
848,
29918,
20865,
353,
1583,
29889,
771,
6929,
29898,
1272,
29897,
13,
4706,
736,
848,
29918,
20865,
29937,
3366,
4905,
29879,
3108,
13,
2
] |
mergecli-runner.py | srp33/ShapeShifter-CLI | 1 | 110394 | #!/usr/bin/env python
from mergecli.mergecli import main
if __name__ == '__main__':
main() | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
10366,
11303,
29889,
14634,
11303,
1053,
1667,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
2
] |
tools/visualize_results_v2.py | kruda/DetectAndTrack | 1,007 | 67458 | <reponame>kruda/DetectAndTrack
##############################################################
# Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
##############################################################
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os.path as osp
import sys
import cPickle as pickle
import cv2
import logging
import numpy as np
from tqdm import tqdm
from core.test_engine import get_roidb_and_dataset
import utils.vis as vis_utils
import utils.image as image_utils
from core.config import (
cfg_from_file, assert_and_infer_cfg, get_output_dir, cfg_from_list)
import utils.general as gen_utils
FORMAT = '%(levelname)s %(filename)s:%(lineno)4d: %(message)s'
logging.basicConfig(level=logging.INFO, format=FORMAT, stream=sys.stdout)
logger = logging.getLogger(__name__)
def _parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
'--cfg', dest='cfg_file', help='Config file', type=str)
parser.add_argument(
'--thresh', dest='thresh',
help='detection prob threshold',
default=0.9, type=float)
parser.add_argument(
'opts', help='See lib/core/config.py for all options', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
def _id_or_index(ix, val):
if len(val) == 0:
return val
else:
return val[ix]
def _vis_single_frame(im, cls_boxes_i, cls_segms_i, cls_keyps_i, cls_tracks_i, thresh):
res = vis_utils.vis_one_image_opencv(
im, cls_boxes_i,
segms=cls_segms_i, keypoints=cls_keyps_i,
tracks=cls_tracks_i, thresh=thresh,
show_box=True, show_class=False, linewidth=3)
if res is None:
return im
return res
def _convert_roidb_to_pred_boxes(boxes):
return np.hstack((boxes, np.ones((boxes.shape[0], 1))))
def _convert_roidb_to_pred_keyps(poses):
poses = poses.astype(np.float32)
res = []
for i in range(poses.shape[0]):
poses[i, 2, poses[i, 2, :] >= 2] += 10.0
res.append(np.vstack((poses[i], np.zeros((1, poses[i].shape[1])))))
return res
def _convert_roidb_to_pred_tracks(tracks):
return tracks.reshape((-1, )).tolist()
def _generate_visualizations(entry, ix, all_boxes, all_keyps, all_tracks, thresh):
im = image_utils.read_image_video(entry, key_frame_only=True)[0]
cls_boxes_i = [
_id_or_index(ix, all_boxes[j]) for j in range(len(all_boxes))]
if all_keyps is not None:
cls_keyps_i = [
_id_or_index(ix, all_keyps[j]) for j in range(len(all_keyps))]
else:
cls_keyps_i = None
if all_tracks is not None:
cls_tracks_i = [
_id_or_index(ix, all_tracks[j]) for j in range(len(all_tracks))]
else:
cls_tracks_i = None
pred = _vis_single_frame(
im.copy(), cls_boxes_i, None, cls_keyps_i, cls_tracks_i, thresh)
gt = _vis_single_frame(
im.copy(),
[[], _convert_roidb_to_pred_boxes(entry['boxes'])],
None,
[[], _convert_roidb_to_pred_keyps(entry['gt_keypoints'])],
[[], _convert_roidb_to_pred_tracks(entry['tracks'])],
0.1)
return gt, pred
def vis(roidb, detections_pkl, thresh, output_dir):
if len(roidb) == 0:
return
with open(detections_pkl, 'rb') as f:
dets = pickle.load(f)
all_boxes = dets['all_boxes']
if 'all_keyps' in dets:
all_keyps = dets['all_keyps']
else:
all_keyps = None
if 'all_tracks' in dets:
all_tracks = dets['all_tracks']
else:
all_tracks = None
for ix, entry in enumerate(tqdm(roidb)):
if entry['boxes'] is None or entry['boxes'].shape[0] == 0:
continue
gt, pred = _generate_visualizations(
entry, ix, all_boxes, all_keyps, all_tracks, thresh)
combined = np.hstack((gt, pred))
im_name = entry['image']
if isinstance(im_name, list):
im_name = im_name[len(im_name) // 2]
out_name = im_name[len(dataset.image_directory):]
out_path = osp.join(output_dir, out_name)
gen_utils.mkdir_p(osp.dirname(out_path))
cv2.imwrite(out_path, combined)
if __name__ == '__main__':
args = _parse_args()
if args.cfg_file is not None:
cfg_from_file(args.cfg_file)
if args.opts is not None:
cfg_from_list(args.opts)
assert_and_infer_cfg()
test_output_dir = get_output_dir(training=False)
det_file = osp.join(test_output_dir, 'detections.pkl')
tracking_det_file = osp.join(test_output_dir, 'detections_withTracks.pkl')
if osp.exists(tracking_det_file):
det_file = tracking_det_file
output_dir = osp.join(test_output_dir, 'vis/')
if not osp.exists(det_file):
raise ValueError('Output file not found {}'.format(det_file))
else:
logger.info('Visualizing {}'.format(det_file))
# Set include_gt True when using the roidb to evalute directly. Not doing
# that currently
roidb, dataset, _, _, _ = get_roidb_and_dataset(None, include_gt=True)
vis(roidb, det_file, args.thresh, output_dir)
| [
1,
529,
276,
1112,
420,
29958,
12748,
6191,
29914,
6362,
522,
2855,
17936,
13,
13383,
13383,
13383,
7346,
4136,
2277,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
29899,
6338,
29892,
13327,
29892,
9266,
29889,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
910,
2752,
775,
338,
7794,
21144,
1090,
278,
19405,
1476,
297,
278,
13,
29937,
365,
2965,
1430,
1660,
934,
297,
278,
3876,
3884,
310,
445,
2752,
5447,
29889,
13,
13383,
13383,
13383,
7346,
4136,
2277,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
1852,
5510,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
5215,
10876,
13,
5215,
274,
29925,
860,
280,
408,
5839,
280,
13,
5215,
13850,
29906,
13,
5215,
12183,
13,
5215,
12655,
408,
7442,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
3166,
7136,
29889,
1688,
29918,
10599,
1053,
679,
29918,
1007,
29890,
29918,
392,
29918,
24713,
13,
5215,
3667,
29879,
29889,
1730,
408,
1998,
29918,
13239,
13,
5215,
3667,
29879,
29889,
3027,
408,
1967,
29918,
13239,
13,
3166,
7136,
29889,
2917,
1053,
313,
13,
1678,
274,
16434,
29918,
3166,
29918,
1445,
29892,
4974,
29918,
392,
29918,
262,
571,
29918,
16859,
29892,
679,
29918,
4905,
29918,
3972,
29892,
274,
16434,
29918,
3166,
29918,
1761,
29897,
13,
5215,
3667,
29879,
29889,
17492,
408,
2531,
29918,
13239,
13,
13,
19094,
1299,
353,
14210,
29898,
5563,
978,
29897,
29879,
1273,
29898,
9507,
29897,
29879,
16664,
29898,
1915,
8154,
29897,
29946,
29881,
29901,
1273,
29898,
4906,
29897,
29879,
29915,
13,
21027,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
11690,
29892,
3402,
29922,
19094,
1299,
29892,
4840,
29922,
9675,
29889,
25393,
29897,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1753,
903,
5510,
29918,
5085,
7295,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
489,
16859,
742,
2731,
2433,
16859,
29918,
1445,
742,
1371,
2433,
3991,
934,
742,
1134,
29922,
710,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
489,
386,
3781,
742,
2731,
2433,
386,
3781,
742,
13,
4706,
1371,
2433,
29881,
2650,
428,
2070,
16897,
742,
13,
4706,
2322,
29922,
29900,
29889,
29929,
29892,
1134,
29922,
7411,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
25707,
742,
1371,
2433,
13393,
4303,
29914,
3221,
29914,
2917,
29889,
2272,
363,
599,
3987,
742,
2322,
29922,
8516,
29892,
13,
4706,
302,
5085,
29922,
1191,
5510,
29889,
1525,
29032,
8032,
29897,
13,
1678,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1275,
29871,
29896,
29901,
13,
4706,
13812,
29889,
2158,
29918,
8477,
580,
13,
4706,
10876,
29889,
13322,
29898,
29896,
29897,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
736,
6389,
13,
13,
13,
1753,
903,
333,
29918,
272,
29918,
2248,
29898,
861,
29892,
659,
1125,
13,
1678,
565,
7431,
29898,
791,
29897,
1275,
29871,
29900,
29901,
13,
4706,
736,
659,
13,
1678,
1683,
29901,
13,
4706,
736,
659,
29961,
861,
29962,
13,
13,
13,
1753,
903,
1730,
29918,
14369,
29918,
2557,
29898,
326,
29892,
1067,
29879,
29918,
1884,
267,
29918,
29875,
29892,
1067,
29879,
29918,
10199,
1516,
29918,
29875,
29892,
1067,
29879,
29918,
1989,
567,
29918,
29875,
29892,
1067,
29879,
29918,
3018,
4684,
29918,
29875,
29892,
266,
3781,
1125,
13,
1678,
620,
353,
1998,
29918,
13239,
29889,
1730,
29918,
650,
29918,
3027,
29918,
3150,
11023,
29898,
13,
4706,
527,
29892,
1067,
29879,
29918,
1884,
267,
29918,
29875,
29892,
13,
4706,
2377,
1516,
29922,
25932,
29918,
10199,
1516,
29918,
29875,
29892,
1820,
9748,
29922,
25932,
29918,
1989,
567,
29918,
29875,
29892,
13,
4706,
16257,
29922,
25932,
29918,
3018,
4684,
29918,
29875,
29892,
266,
3781,
29922,
386,
3781,
29892,
13,
4706,
1510,
29918,
1884,
29922,
5574,
29892,
1510,
29918,
1990,
29922,
8824,
29892,
1196,
2103,
29922,
29941,
29897,
13,
1678,
565,
620,
338,
6213,
29901,
13,
4706,
736,
527,
13,
1678,
736,
620,
13,
13,
13,
1753,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
1884,
267,
29898,
1884,
267,
1125,
13,
1678,
736,
7442,
29889,
29882,
1429,
3552,
1884,
267,
29892,
7442,
29889,
2873,
3552,
1884,
267,
29889,
12181,
29961,
29900,
1402,
29871,
29896,
13697,
13,
13,
13,
1753,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
1989,
567,
29898,
10590,
1125,
13,
1678,
926,
267,
353,
926,
267,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
620,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
10590,
29889,
12181,
29961,
29900,
29962,
1125,
13,
4706,
926,
267,
29961,
29875,
29892,
29871,
29906,
29892,
926,
267,
29961,
29875,
29892,
29871,
29906,
29892,
584,
29962,
6736,
29871,
29906,
29962,
4619,
29871,
29896,
29900,
29889,
29900,
13,
4706,
620,
29889,
4397,
29898,
9302,
29889,
29894,
1429,
3552,
10590,
29961,
29875,
1402,
7442,
29889,
3298,
359,
3552,
29896,
29892,
926,
267,
29961,
29875,
1822,
12181,
29961,
29896,
12622,
4961,
13,
1678,
736,
620,
13,
13,
13,
1753,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
3018,
4684,
29898,
3018,
4684,
1125,
13,
1678,
736,
16257,
29889,
690,
14443,
3552,
29899,
29896,
29892,
1723,
467,
25027,
391,
580,
13,
13,
13,
1753,
903,
17158,
29918,
20119,
17063,
29898,
8269,
29892,
474,
29916,
29892,
599,
29918,
1884,
267,
29892,
599,
29918,
1989,
567,
29892,
599,
29918,
3018,
4684,
29892,
266,
3781,
1125,
13,
1678,
527,
353,
1967,
29918,
13239,
29889,
949,
29918,
3027,
29918,
9641,
29898,
8269,
29892,
1820,
29918,
2557,
29918,
6194,
29922,
5574,
9601,
29900,
29962,
13,
1678,
1067,
29879,
29918,
1884,
267,
29918,
29875,
353,
518,
13,
4706,
903,
333,
29918,
272,
29918,
2248,
29898,
861,
29892,
599,
29918,
1884,
267,
29961,
29926,
2314,
363,
432,
297,
3464,
29898,
2435,
29898,
497,
29918,
1884,
267,
28166,
13,
1678,
565,
599,
29918,
1989,
567,
338,
451,
6213,
29901,
13,
4706,
1067,
29879,
29918,
1989,
567,
29918,
29875,
353,
518,
13,
9651,
903,
333,
29918,
272,
29918,
2248,
29898,
861,
29892,
599,
29918,
1989,
567,
29961,
29926,
2314,
363,
432,
297,
3464,
29898,
2435,
29898,
497,
29918,
1989,
567,
28166,
13,
1678,
1683,
29901,
13,
4706,
1067,
29879,
29918,
1989,
567,
29918,
29875,
353,
6213,
13,
1678,
565,
599,
29918,
3018,
4684,
338,
451,
6213,
29901,
13,
4706,
1067,
29879,
29918,
3018,
4684,
29918,
29875,
353,
518,
13,
9651,
903,
333,
29918,
272,
29918,
2248,
29898,
861,
29892,
599,
29918,
3018,
4684,
29961,
29926,
2314,
363,
432,
297,
3464,
29898,
2435,
29898,
497,
29918,
3018,
4684,
28166,
13,
1678,
1683,
29901,
13,
4706,
1067,
29879,
29918,
3018,
4684,
29918,
29875,
353,
6213,
13,
1678,
4450,
353,
903,
1730,
29918,
14369,
29918,
2557,
29898,
13,
4706,
527,
29889,
8552,
3285,
1067,
29879,
29918,
1884,
267,
29918,
29875,
29892,
6213,
29892,
1067,
29879,
29918,
1989,
567,
29918,
29875,
29892,
1067,
29879,
29918,
3018,
4684,
29918,
29875,
29892,
266,
3781,
29897,
13,
1678,
330,
29873,
353,
903,
1730,
29918,
14369,
29918,
2557,
29898,
13,
4706,
527,
29889,
8552,
3285,
13,
4706,
5519,
1402,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
1884,
267,
29898,
8269,
1839,
1884,
267,
11287,
1402,
13,
4706,
6213,
29892,
13,
4706,
5519,
1402,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
1989,
567,
29898,
8269,
1839,
4141,
29918,
1989,
9748,
11287,
1402,
13,
4706,
5519,
1402,
903,
13441,
29918,
1007,
29890,
29918,
517,
29918,
11965,
29918,
3018,
4684,
29898,
8269,
1839,
3018,
4684,
11287,
1402,
13,
308,
29900,
29889,
29896,
29897,
13,
1678,
736,
330,
29873,
29892,
4450,
13,
13,
13,
1753,
1998,
29898,
1007,
29890,
29892,
1439,
29872,
1953,
29918,
29886,
6321,
29892,
266,
3781,
29892,
1962,
29918,
3972,
1125,
13,
1678,
565,
7431,
29898,
1007,
29890,
29897,
1275,
29871,
29900,
29901,
13,
4706,
736,
13,
1678,
411,
1722,
29898,
29881,
2650,
1953,
29918,
29886,
6321,
29892,
525,
6050,
1495,
408,
285,
29901,
13,
4706,
1439,
29879,
353,
5839,
280,
29889,
1359,
29898,
29888,
29897,
13,
13,
1678,
599,
29918,
1884,
267,
353,
1439,
29879,
1839,
497,
29918,
1884,
267,
2033,
13,
1678,
565,
525,
497,
29918,
1989,
567,
29915,
297,
1439,
29879,
29901,
13,
4706,
599,
29918,
1989,
567,
353,
1439,
29879,
1839,
497,
29918,
1989,
567,
2033,
13,
1678,
1683,
29901,
13,
4706,
599,
29918,
1989,
567,
353,
6213,
13,
1678,
565,
525,
497,
29918,
3018,
4684,
29915,
297,
1439,
29879,
29901,
13,
4706,
599,
29918,
3018,
4684,
353,
1439,
29879,
1839,
497,
29918,
3018,
4684,
2033,
13,
1678,
1683,
29901,
13,
4706,
599,
29918,
3018,
4684,
353,
6213,
13,
13,
1678,
363,
474,
29916,
29892,
6251,
297,
26985,
29898,
29873,
29939,
18933,
29898,
1007,
29890,
22164,
13,
4706,
565,
6251,
1839,
1884,
267,
2033,
338,
6213,
470,
6251,
1839,
1884,
267,
13359,
12181,
29961,
29900,
29962,
1275,
29871,
29900,
29901,
13,
9651,
6773,
13,
4706,
330,
29873,
29892,
4450,
353,
903,
17158,
29918,
20119,
17063,
29898,
13,
9651,
6251,
29892,
474,
29916,
29892,
599,
29918,
1884,
267,
29892,
599,
29918,
1989,
567,
29892,
599,
29918,
3018,
4684,
29892,
266,
3781,
29897,
13,
4706,
12420,
353,
7442,
29889,
29882,
1429,
3552,
4141,
29892,
4450,
876,
13,
4706,
527,
29918,
978,
353,
6251,
1839,
3027,
2033,
13,
4706,
565,
338,
8758,
29898,
326,
29918,
978,
29892,
1051,
1125,
13,
9651,
527,
29918,
978,
353,
527,
29918,
978,
29961,
2435,
29898,
326,
29918,
978,
29897,
849,
29871,
29906,
29962,
13,
4706,
714,
29918,
978,
353,
527,
29918,
978,
29961,
2435,
29898,
24713,
29889,
3027,
29918,
12322,
1125,
29962,
13,
4706,
714,
29918,
2084,
353,
288,
1028,
29889,
7122,
29898,
4905,
29918,
3972,
29892,
714,
29918,
978,
29897,
13,
4706,
2531,
29918,
13239,
29889,
11256,
3972,
29918,
29886,
29898,
4705,
29889,
25721,
29898,
449,
29918,
2084,
876,
13,
4706,
13850,
29906,
29889,
326,
3539,
29898,
449,
29918,
2084,
29892,
12420,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
6389,
353,
903,
5510,
29918,
5085,
580,
13,
1678,
565,
6389,
29889,
16859,
29918,
1445,
338,
451,
6213,
29901,
13,
4706,
274,
16434,
29918,
3166,
29918,
1445,
29898,
5085,
29889,
16859,
29918,
1445,
29897,
13,
1678,
565,
6389,
29889,
25707,
338,
451,
6213,
29901,
13,
4706,
274,
16434,
29918,
3166,
29918,
1761,
29898,
5085,
29889,
25707,
29897,
13,
1678,
4974,
29918,
392,
29918,
262,
571,
29918,
16859,
580,
13,
1678,
1243,
29918,
4905,
29918,
3972,
353,
679,
29918,
4905,
29918,
3972,
29898,
26495,
29922,
8824,
29897,
13,
1678,
1439,
29918,
1445,
353,
288,
1028,
29889,
7122,
29898,
1688,
29918,
4905,
29918,
3972,
29892,
525,
29881,
2650,
1953,
29889,
29886,
6321,
1495,
13,
1678,
23110,
29918,
4801,
29918,
1445,
353,
288,
1028,
29889,
7122,
29898,
1688,
29918,
4905,
29918,
3972,
29892,
525,
29881,
2650,
1953,
29918,
2541,
5323,
4684,
29889,
29886,
6321,
1495,
13,
1678,
565,
288,
1028,
29889,
9933,
29898,
11294,
292,
29918,
4801,
29918,
1445,
1125,
13,
4706,
1439,
29918,
1445,
353,
23110,
29918,
4801,
29918,
1445,
13,
1678,
1962,
29918,
3972,
353,
288,
1028,
29889,
7122,
29898,
1688,
29918,
4905,
29918,
3972,
29892,
525,
1730,
29914,
1495,
13,
1678,
565,
451,
288,
1028,
29889,
9933,
29898,
4801,
29918,
1445,
1125,
13,
4706,
12020,
7865,
2392,
877,
6466,
934,
451,
1476,
6571,
4286,
4830,
29898,
4801,
29918,
1445,
876,
13,
1678,
1683,
29901,
13,
4706,
17927,
29889,
3888,
877,
16227,
5281,
6571,
4286,
4830,
29898,
4801,
29918,
1445,
876,
13,
1678,
396,
3789,
3160,
29918,
4141,
5852,
746,
773,
278,
696,
333,
29890,
304,
19745,
1082,
4153,
29889,
2216,
2599,
13,
1678,
396,
393,
5279,
13,
1678,
696,
333,
29890,
29892,
8783,
29892,
17117,
17117,
903,
353,
679,
29918,
1007,
29890,
29918,
392,
29918,
24713,
29898,
8516,
29892,
3160,
29918,
4141,
29922,
5574,
29897,
13,
1678,
1998,
29898,
1007,
29890,
29892,
1439,
29918,
1445,
29892,
6389,
29889,
386,
3781,
29892,
1962,
29918,
3972,
29897,
13,
2
] |
irods/constants.py | trel/python-irodsclient | 54 | 120797 | <reponame>trel/python-irodsclient
SYS_SVR_TO_CLI_COLL_STAT = 99999996
SYS_CLI_TO_SVR_COLL_STAT_REPLY = 99999997
| [
1,
529,
276,
1112,
420,
29958,
2484,
29880,
29914,
4691,
29899,
3350,
29881,
1557,
1593,
13,
13,
14816,
29903,
29918,
7597,
29934,
29918,
4986,
29918,
27205,
29918,
3217,
2208,
29918,
17816,
353,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29953,
13,
14816,
29903,
29918,
27205,
29918,
4986,
29918,
7597,
29934,
29918,
3217,
2208,
29918,
17816,
29918,
1525,
7390,
29979,
353,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29955,
13,
2
] |
modules/blog.py | rdelfin/personal-site | 0 | 30098 | <gh_stars>0
from flask import Blueprint, Response, abort, render_template
from utils import blog as blog_utils
from utils import tags as tag_utils
bp = Blueprint("blog", __name__)
@bp.route("/", methods=["GET"])
def blog():
return blog_utils.respond_blog_list()
@bp.route("/post_<post_name>", methods=["GET"])
def blog_post(post_name: str) -> Response:
return blog_utils.respond_blog(post_name)
@bp.route("/tags", methods=["GET"])
def tags() -> Response:
tags = tag_utils.list_tags()
return render_template('blog_tags.html', tags=sorted(tags, key=lambda t: t.name))
@bp.route("/tag/<tag_name>", methods=["GET"])
def tag(tag_name: str) -> Response:
tag = tag_utils.get_tag(tag_name)
if not tag:
abort(404)
blogs = blog_utils.get_blogs_with_tag(tag_name)
sorted_blogs = sorted(blogs.items(), reverse=True, key=lambda t: t[1].creation_time)
return render_template("blog_tag_page.html", tag=tag, blogs=sorted_blogs)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
29784,
1053,
10924,
2158,
29892,
13291,
29892,
27450,
29892,
4050,
29918,
6886,
13,
13,
3166,
3667,
29879,
1053,
12618,
408,
12618,
29918,
13239,
13,
3166,
3667,
29879,
1053,
8282,
408,
4055,
29918,
13239,
13,
13,
25288,
353,
10924,
2158,
703,
7312,
613,
4770,
978,
1649,
29897,
13,
13,
13,
29992,
25288,
29889,
13134,
11974,
613,
3519,
29922,
3366,
7194,
20068,
13,
1753,
12618,
7295,
13,
1678,
736,
12618,
29918,
13239,
29889,
3636,
29918,
7312,
29918,
1761,
580,
13,
13,
13,
29992,
25288,
29889,
13134,
11974,
2490,
29918,
29966,
2490,
29918,
978,
28341,
3519,
29922,
3366,
7194,
20068,
13,
1753,
12618,
29918,
2490,
29898,
2490,
29918,
978,
29901,
851,
29897,
1599,
13291,
29901,
13,
1678,
736,
12618,
29918,
13239,
29889,
3636,
29918,
7312,
29898,
2490,
29918,
978,
29897,
13,
13,
13,
29992,
25288,
29889,
13134,
11974,
11338,
613,
3519,
29922,
3366,
7194,
20068,
13,
1753,
8282,
580,
1599,
13291,
29901,
13,
1678,
8282,
353,
4055,
29918,
13239,
29889,
1761,
29918,
11338,
580,
13,
1678,
736,
4050,
29918,
6886,
877,
7312,
29918,
11338,
29889,
1420,
742,
8282,
29922,
24582,
29898,
11338,
29892,
1820,
29922,
2892,
260,
29901,
260,
29889,
978,
876,
13,
13,
29992,
25288,
29889,
13134,
11974,
4039,
29914,
29966,
4039,
29918,
978,
28341,
3519,
29922,
3366,
7194,
20068,
13,
1753,
4055,
29898,
4039,
29918,
978,
29901,
851,
29897,
1599,
13291,
29901,
13,
1678,
4055,
353,
4055,
29918,
13239,
29889,
657,
29918,
4039,
29898,
4039,
29918,
978,
29897,
13,
1678,
565,
451,
4055,
29901,
13,
4706,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
12618,
29879,
353,
12618,
29918,
13239,
29889,
657,
29918,
25762,
29918,
2541,
29918,
4039,
29898,
4039,
29918,
978,
29897,
13,
1678,
12705,
29918,
25762,
353,
12705,
29898,
25762,
29889,
7076,
3285,
11837,
29922,
5574,
29892,
1820,
29922,
2892,
260,
29901,
260,
29961,
29896,
1822,
1037,
362,
29918,
2230,
29897,
13,
13,
1678,
736,
4050,
29918,
6886,
703,
7312,
29918,
4039,
29918,
3488,
29889,
1420,
613,
4055,
29922,
4039,
29892,
12618,
29879,
29922,
24582,
29918,
25762,
29897,
13,
2
] |
webnmap/__init__.py | jtdub/webnmap | 0 | 84771 | <gh_stars>0
from webnmap.celery import app as celery_app
__all__ = ('celery_app',)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1856,
29876,
1958,
29889,
2242,
708,
1053,
623,
408,
6432,
708,
29918,
932,
13,
13,
13,
1649,
497,
1649,
353,
6702,
2242,
708,
29918,
932,
742,
29897,
13,
2
] |
scripts/python/routines/plot/violin.py | GillianGrayson/dnamvae | 1 | 82808 | <reponame>GillianGrayson/dnamvae
import plotly.graph_objects as go
def add_violin_trace(fig, y, name):
showlegend = False if name == "" else True
fig.add_trace(
go.Violin(
y=y,
name=name,
box_visible=True,
showlegend=showlegend,
)
)
| [
1,
529,
276,
1112,
420,
29958,
29954,
453,
713,
29954,
764,
1100,
29914,
5200,
314,
1564,
29872,
13,
5215,
6492,
368,
29889,
4262,
29918,
12650,
408,
748,
13,
13,
13,
1753,
788,
29918,
1403,
22878,
29918,
15003,
29898,
1003,
29892,
343,
29892,
1024,
1125,
13,
1678,
1510,
26172,
353,
7700,
565,
1024,
1275,
5124,
1683,
5852,
13,
1678,
2537,
29889,
1202,
29918,
15003,
29898,
13,
4706,
748,
29889,
29963,
29875,
22878,
29898,
13,
9651,
343,
29922,
29891,
29892,
13,
9651,
1024,
29922,
978,
29892,
13,
9651,
3800,
29918,
12872,
29922,
5574,
29892,
13,
9651,
1510,
26172,
29922,
4294,
26172,
29892,
13,
4706,
1723,
13,
1678,
1723,
13,
2
] |
notebook_xterm/terminalserver.py | marcotessarotto/notebook_xterm | 15 | 98522 | from __future__ import (absolute_import, division,
print_function, unicode_literals)
import pty, os, tty, termios, time, sys, base64, struct, signal
from fcntl import fcntl, F_GETFL, F_SETFL, ioctl
class TerminalServer:
def __init__(self):
self.closed = False
self.pid, self.fd = pty.fork()
if self.pid == pty.CHILD:
# we are in the forked process
# blow it away and replace with a shell
os.execvp('bash',['bash'])
else:
tty.setraw(self.fd, termios.TCSANOW)
#open the shell process file descriptor as read-write
if sys.version_info >= (3, 0):
self.file = os.fdopen(self.fd,'wb+', buffering=0)
else:
#python 2 compatible code
self.file = os.fdopen(self.fd,'wb+', 0)
#set the file reads to be nonblocking
flags = fcntl(self.file, F_GETFL)
fcntl(self.file, F_SETFL, flags | os.O_NONBLOCK)
def transmit(self,data):
# data in the "channel" is b64 encoded so that control characters
# don't get lost
os.write(self.fd, base64.b64decode(data))
self.receive()
def receive(self):
try:
data = os.read(self.fd, 8192)
except OSError:
data = b''
sys.stdout.write(base64.b64encode(data))
def update_window_size(self, rows, cols):
#notify that the pty size should change to match xterm.js
TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', -2146929561)
s = struct.pack('HHHH', rows, cols, 0, 0)
ioctl(self.fd, TIOCSWINSZ, s)
self.receive()
def close(self):
if not self.closed:
#send hang up to bash since the xterm is closing
os.kill(self.pid, signal.SIGHUP)
def __del__(self):
self.close()
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
313,
23552,
29918,
5215,
29892,
8542,
29892,
13,
462,
4706,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
29897,
13,
13,
5215,
282,
1017,
29892,
2897,
29892,
260,
1017,
29892,
1840,
2363,
29892,
931,
29892,
10876,
29892,
2967,
29953,
29946,
29892,
2281,
29892,
7182,
13,
3166,
285,
20047,
29880,
1053,
285,
20047,
29880,
29892,
383,
29918,
7194,
10536,
29892,
383,
29918,
1660,
8969,
29931,
29892,
12013,
16948,
13,
13,
1990,
29175,
6004,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
15603,
353,
7700,
13,
4706,
1583,
29889,
5935,
29892,
1583,
29889,
11512,
353,
282,
1017,
29889,
29888,
548,
580,
13,
4706,
565,
1583,
29889,
5935,
1275,
282,
1017,
29889,
3210,
6227,
29928,
29901,
13,
9651,
396,
591,
526,
297,
278,
363,
17713,
1889,
13,
9651,
396,
13031,
372,
3448,
322,
5191,
411,
263,
6473,
13,
9651,
2897,
29889,
4258,
29894,
29886,
877,
13067,
742,
1839,
13067,
11287,
13,
4706,
1683,
29901,
13,
9651,
260,
1017,
29889,
842,
1610,
29898,
1311,
29889,
11512,
29892,
1840,
2363,
29889,
29911,
9295,
2190,
9806,
29897,
13,
13,
9651,
396,
3150,
278,
6473,
1889,
934,
553,
11709,
408,
1303,
29899,
3539,
13,
9651,
565,
10876,
29889,
3259,
29918,
3888,
6736,
313,
29941,
29892,
29871,
29900,
1125,
13,
18884,
1583,
29889,
1445,
353,
2897,
29889,
11512,
3150,
29898,
1311,
29889,
11512,
5501,
29893,
29890,
29974,
742,
6835,
292,
29922,
29900,
29897,
13,
9651,
1683,
29901,
13,
18884,
396,
4691,
29871,
29906,
15878,
775,
13,
18884,
1583,
29889,
1445,
353,
2897,
29889,
11512,
3150,
29898,
1311,
29889,
11512,
5501,
29893,
29890,
29974,
742,
29871,
29900,
29897,
13,
13,
9651,
396,
842,
278,
934,
13623,
304,
367,
1661,
1271,
292,
13,
9651,
13449,
353,
285,
20047,
29880,
29898,
1311,
29889,
1445,
29892,
383,
29918,
7194,
10536,
29897,
13,
9651,
285,
20047,
29880,
29898,
1311,
29889,
1445,
29892,
383,
29918,
1660,
8969,
29931,
29892,
13449,
891,
2897,
29889,
29949,
29918,
29940,
1164,
29933,
21339,
29897,
13,
13,
1678,
822,
22649,
29898,
1311,
29892,
1272,
1125,
13,
4706,
396,
848,
297,
278,
376,
12719,
29908,
338,
289,
29953,
29946,
18511,
577,
393,
2761,
4890,
13,
4706,
396,
1016,
29915,
29873,
679,
5714,
13,
4706,
2897,
29889,
3539,
29898,
1311,
29889,
11512,
29892,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
13808,
29898,
1272,
876,
13,
4706,
1583,
29889,
13556,
573,
580,
13,
13,
1678,
822,
7150,
29898,
1311,
1125,
13,
4706,
1018,
29901,
13,
9651,
848,
353,
2897,
29889,
949,
29898,
1311,
29889,
11512,
29892,
29871,
29947,
29896,
29929,
29906,
29897,
13,
4706,
5174,
438,
29173,
29901,
13,
9651,
848,
353,
289,
4907,
13,
4706,
10876,
29889,
25393,
29889,
3539,
29898,
3188,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
1272,
876,
13,
13,
1678,
822,
2767,
29918,
7165,
29918,
2311,
29898,
1311,
29892,
4206,
29892,
28730,
1125,
13,
4706,
396,
25140,
393,
278,
282,
1017,
2159,
881,
1735,
304,
1993,
921,
8489,
29889,
1315,
13,
4706,
323,
5971,
9295,
25152,
29903,
29999,
353,
679,
5552,
29898,
8489,
2363,
29892,
525,
29911,
5971,
9295,
25152,
29903,
29999,
742,
448,
29906,
29896,
29946,
29953,
29929,
29906,
29929,
29945,
29953,
29896,
29897,
13,
4706,
269,
353,
2281,
29889,
4058,
877,
27590,
27590,
742,
4206,
29892,
28730,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
4706,
12013,
16948,
29898,
1311,
29889,
11512,
29892,
323,
5971,
9295,
25152,
29903,
29999,
29892,
269,
29897,
13,
4706,
1583,
29889,
13556,
573,
580,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
15603,
29901,
13,
9651,
396,
6717,
13958,
701,
304,
10891,
1951,
278,
921,
8489,
338,
14382,
13,
9651,
2897,
29889,
21174,
29898,
1311,
29889,
5935,
29892,
7182,
29889,
5425,
29954,
29950,
4897,
29897,
13,
13,
1678,
822,
4770,
6144,
12035,
1311,
1125,
13,
4706,
1583,
29889,
5358,
580,
13,
2
] |
mut/viz.py | RPGroup-PBoC/mwc_mutants | 3 | 29167 | import bokeh.io
import bokeh.plotting
import bokeh.layouts
import bokeh.palettes
import seaborn as sns
import numpy as np
import os
import matplotlib.pyplot as plt
import matplotlib
def plotting_style(grid=True):
"""
Sets the style to the publication style
"""
rc = {'axes.facecolor': '#E3DCD0',
'font.family': 'Lucida Sans Unicode',
'grid.linestyle': '-',
'grid.linewidth': 0.5,
'grid.alpha': 0.75,
'grid.color': '#ffffff',
'axes.grid': grid,
'ytick.direction': 'in',
'xtick.direction': 'in',
'xtick.gridOn': True,
'ytick.gridOn': True,
'ytick.major.width':5,
'xtick.major.width':5,
'ytick.major.size': 5,
'xtick.major.size': 5,
'mathtext.fontset': 'stixsans',
'mathtext.sf': 'sans',
'legend.frameon': True,
'legend.facecolor': '#FFEDCE',
'figure.dpi': 150,
'xtick.color': 'k',
'ytick.color': 'k'}
plt.rc('text.latex', preamble=r'\usepackage{sfmath}')
plt.rc('mathtext', fontset='stixsans', sf='sans')
sns.set_style('darkgrid', rc=rc)
def color_selector(style):
"""
Select the color palette of your choice.
Parameters
----------
style: str "mut" or "pboc"
A string identifier for the style. "mut" gives colors for single and double mutants.
"pboc" returns the PBoC2e color palette.
Returns
-------
colors: dict
Dictionary of colors. If "dna", "double", or "inducer" is the selected style,
keys will be the mutants in upper case. Double mutant keys will be DNA-IND. For
pboc, the keys will be the typical color descriptors.
"""
# Ensure the provided style name makes sense.
if style.lower() not in ['mut', 'pboc']:
raise ValueError("Provided style must be 'pboc' or 'mut'. {} provided.".format(style))
# Set the color styles and return.
if style.lower() == 'mut':
colors = {'Y20I': '#738FC1', 'Q21A': '#7AA974', 'Q21M': '#AB85AC',
'F164T': '#A97C50', 'Q294K': '#5D737E', 'Q294V': '#D56C55',
'Q294R': '#B2AF58', 'Y20I-F164T': '#2d98da', 'Y20I-Q294K': '#34495e',
'Y20I-Q294V': '#8854d0', 'Q21A-F164T': '#4b6584', 'Q21A-Q294K': '#EE5A24',
'Q21A-Q294V': '#009432', 'Q21M-F164T': '#1289A7', 'Q21M-Q294K': '#6F1E51',
'Q21M-Q294V': '#006266', 'WT': '#3C3C3C'}
elif style.lower() == 'pboc':
colors = {'green': '#7AA974', 'light_green': '#BFD598',
'pale_green': '#DCECCB', 'yellow': '#EAC264',
'light_yellow': '#F3DAA9', 'pale_yellow': '#FFEDCE',
'blue': '#738FC1', 'light_blue': '#A9BFE3',
'pale_blue': '#C9D7EE', 'red': '#D56C55', 'light_red': '#E8B19D',
'pale_red': '#F1D4C9', 'purple': '#AB85AC',
'light_purple': '#D4C2D9', 'dark_green':'#7E9D90', 'dark_brown':'#905426'}
return colors
| [
1,
1053,
1045,
446,
29882,
29889,
601,
13,
5215,
1045,
446,
29882,
29889,
5317,
1259,
13,
5215,
1045,
446,
29882,
29889,
2680,
29879,
13,
5215,
1045,
446,
29882,
29889,
29886,
744,
698,
267,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
22889,
13,
13,
1753,
6492,
1259,
29918,
3293,
29898,
7720,
29922,
5574,
1125,
13,
1678,
9995,
13,
1678,
317,
1691,
278,
3114,
304,
278,
17745,
3114,
13,
1678,
9995,
13,
1678,
364,
29883,
353,
11117,
1165,
267,
29889,
2161,
2780,
2396,
16321,
29923,
29941,
29928,
6530,
29900,
742,
13,
3986,
525,
5657,
29889,
11922,
2396,
525,
29931,
1682,
1458,
27677,
23862,
742,
13,
3986,
525,
7720,
29889,
1915,
342,
1508,
2396,
17411,
742,
13,
3986,
525,
7720,
29889,
16292,
2396,
29871,
29900,
29889,
29945,
29892,
13,
3986,
525,
7720,
29889,
2312,
2396,
29871,
29900,
29889,
29955,
29945,
29892,
13,
3986,
525,
7720,
29889,
2780,
2396,
16321,
17156,
600,
742,
13,
3986,
525,
1165,
267,
29889,
7720,
2396,
6856,
29892,
13,
3986,
525,
3637,
860,
29889,
20845,
2396,
525,
262,
742,
13,
3986,
525,
486,
860,
29889,
20845,
2396,
525,
262,
742,
13,
3986,
525,
486,
860,
29889,
7720,
2951,
2396,
5852,
29892,
13,
3986,
525,
3637,
860,
29889,
7720,
2951,
2396,
5852,
29892,
13,
3986,
525,
3637,
860,
29889,
21355,
29889,
2103,
2396,
29945,
29892,
13,
3986,
525,
486,
860,
29889,
21355,
29889,
2103,
2396,
29945,
29892,
13,
3986,
525,
3637,
860,
29889,
21355,
29889,
2311,
2396,
29871,
29945,
29892,
13,
3986,
525,
486,
860,
29889,
21355,
29889,
2311,
2396,
29871,
29945,
29892,
13,
3986,
525,
755,
726,
29889,
5657,
842,
2396,
525,
303,
861,
29879,
550,
742,
13,
3986,
525,
755,
726,
29889,
4668,
2396,
525,
29879,
550,
742,
13,
3986,
525,
26172,
29889,
2557,
265,
2396,
5852,
29892,
13,
3986,
525,
26172,
29889,
2161,
2780,
2396,
16321,
4198,
3352,
4741,
742,
13,
3986,
525,
4532,
29889,
29881,
1631,
2396,
29871,
29896,
29945,
29900,
29892,
13,
965,
525,
486,
860,
29889,
2780,
2396,
525,
29895,
742,
13,
965,
525,
3637,
860,
29889,
2780,
2396,
525,
29895,
10827,
13,
1678,
14770,
29889,
2214,
877,
726,
29889,
25694,
742,
758,
314,
569,
29922,
29878,
12764,
9096,
29912,
4668,
755,
29913,
1495,
13,
1678,
14770,
29889,
2214,
877,
755,
726,
742,
4079,
842,
2433,
303,
861,
29879,
550,
742,
18668,
2433,
29879,
550,
1495,
13,
1678,
269,
1983,
29889,
842,
29918,
3293,
877,
26031,
7720,
742,
364,
29883,
29922,
2214,
29897,
13,
13,
1753,
2927,
29918,
14357,
29898,
3293,
1125,
13,
1678,
9995,
13,
1678,
7605,
278,
2927,
282,
26456,
310,
596,
7348,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
3114,
29901,
851,
376,
6149,
29908,
470,
376,
24381,
542,
29908,
13,
4706,
319,
1347,
15882,
363,
278,
3114,
29889,
376,
6149,
29908,
4076,
11955,
363,
2323,
322,
3765,
5478,
1934,
29889,
13,
4706,
376,
24381,
542,
29908,
3639,
278,
349,
8431,
29907,
29906,
29872,
2927,
282,
26456,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
11955,
29901,
9657,
13,
4706,
13343,
310,
11955,
29889,
960,
376,
29881,
1056,
613,
376,
8896,
613,
470,
376,
513,
1682,
261,
29908,
338,
278,
4629,
3114,
29892,
13,
4706,
6611,
674,
367,
278,
5478,
1934,
297,
7568,
1206,
29889,
11599,
5478,
424,
6611,
674,
367,
25348,
29899,
22255,
29889,
1152,
13,
4706,
282,
29890,
542,
29892,
278,
6611,
674,
367,
278,
15662,
2927,
29037,
943,
29889,
29871,
13,
13,
1678,
9995,
13,
1678,
396,
22521,
545,
278,
4944,
3114,
1024,
3732,
4060,
29889,
13,
1678,
565,
29871,
3114,
29889,
13609,
580,
451,
297,
6024,
6149,
742,
525,
24381,
542,
2033,
29901,
13,
4706,
12020,
7865,
2392,
703,
1184,
29894,
2618,
3114,
1818,
367,
525,
24381,
542,
29915,
470,
525,
6149,
4286,
6571,
4944,
1213,
29889,
4830,
29898,
3293,
876,
13,
13,
1678,
396,
3789,
278,
2927,
11949,
322,
736,
29889,
13,
1678,
565,
29871,
3114,
29889,
13609,
580,
1275,
525,
6149,
2396,
13,
4706,
11955,
353,
11117,
29979,
29906,
29900,
29902,
2396,
16321,
29955,
29941,
29947,
8610,
29896,
742,
525,
29984,
29906,
29896,
29909,
2396,
16321,
29955,
6344,
29929,
29955,
29946,
742,
525,
29984,
29906,
29896,
29924,
2396,
16321,
2882,
29947,
29945,
2477,
742,
13,
462,
29871,
525,
29943,
29896,
29953,
29946,
29911,
2396,
16321,
29909,
29929,
29955,
29907,
29945,
29900,
742,
525,
29984,
29906,
29929,
29946,
29968,
2396,
16321,
29945,
29928,
29955,
29941,
29955,
29923,
742,
525,
29984,
29906,
29929,
29946,
29963,
2396,
16321,
29928,
29945,
29953,
29907,
29945,
29945,
742,
13,
462,
29871,
525,
29984,
29906,
29929,
29946,
29934,
2396,
16321,
29933,
29906,
5098,
29945,
29947,
742,
525,
29979,
29906,
29900,
29902,
29899,
29943,
29896,
29953,
29946,
29911,
2396,
16321,
29906,
29881,
29929,
29947,
1388,
742,
525,
29979,
29906,
29900,
29902,
29899,
29984,
29906,
29929,
29946,
29968,
2396,
16321,
29941,
29946,
29946,
29929,
29945,
29872,
742,
13,
462,
29871,
525,
29979,
29906,
29900,
29902,
29899,
29984,
29906,
29929,
29946,
29963,
2396,
16321,
29947,
29947,
29945,
29946,
29881,
29900,
742,
525,
29984,
29906,
29896,
29909,
29899,
29943,
29896,
29953,
29946,
29911,
2396,
16321,
29946,
29890,
29953,
29945,
29947,
29946,
742,
525,
29984,
29906,
29896,
29909,
29899,
29984,
29906,
29929,
29946,
29968,
2396,
16321,
17896,
29945,
29909,
29906,
29946,
742,
13,
462,
29871,
525,
29984,
29906,
29896,
29909,
29899,
29984,
29906,
29929,
29946,
29963,
2396,
16321,
29900,
29900,
29929,
29946,
29941,
29906,
742,
525,
29984,
29906,
29896,
29924,
29899,
29943,
29896,
29953,
29946,
29911,
2396,
16321,
29896,
29906,
29947,
29929,
29909,
29955,
742,
525,
29984,
29906,
29896,
29924,
29899,
29984,
29906,
29929,
29946,
29968,
2396,
16321,
29953,
29943,
29896,
29923,
29945,
29896,
742,
13,
462,
29871,
525,
29984,
29906,
29896,
29924,
29899,
29984,
29906,
29929,
29946,
29963,
2396,
16321,
29900,
29900,
29953,
29906,
29953,
29953,
742,
525,
17755,
2396,
16321,
29941,
29907,
29941,
29907,
29941,
29907,
10827,
29871,
13,
13,
1678,
25342,
3114,
29889,
13609,
580,
1275,
525,
24381,
542,
2396,
13,
4706,
11955,
353,
11117,
12692,
2396,
16321,
29955,
6344,
29929,
29955,
29946,
742,
525,
4366,
29918,
12692,
2396,
16321,
29933,
26453,
29945,
29929,
29947,
742,
13,
795,
525,
29886,
744,
29918,
12692,
2396,
16321,
29928,
4741,
4174,
29933,
742,
525,
29136,
2396,
16321,
29923,
2477,
29906,
29953,
29946,
742,
13,
795,
525,
4366,
29918,
29136,
2396,
16321,
29943,
29941,
29928,
6344,
29929,
742,
525,
29886,
744,
29918,
29136,
2396,
16321,
4198,
3352,
4741,
742,
13,
795,
525,
9539,
2396,
16321,
29955,
29941,
29947,
8610,
29896,
742,
525,
4366,
29918,
9539,
2396,
16321,
29909,
29929,
29933,
16359,
29941,
742,
13,
795,
525,
29886,
744,
29918,
9539,
2396,
16321,
29907,
29929,
29928,
29955,
17896,
742,
525,
1127,
2396,
16321,
29928,
29945,
29953,
29907,
29945,
29945,
742,
525,
4366,
29918,
1127,
2396,
16321,
29923,
29947,
29933,
29896,
29929,
29928,
742,
13,
795,
525,
29886,
744,
29918,
1127,
2396,
16321,
29943,
29896,
29928,
29946,
29907,
29929,
742,
525,
15503,
552,
2396,
16321,
2882,
29947,
29945,
2477,
742,
13,
795,
525,
4366,
29918,
15503,
552,
2396,
16321,
29928,
29946,
29907,
29906,
29928,
29929,
742,
525,
26031,
29918,
12692,
22099,
29937,
29955,
29923,
29929,
29928,
29929,
29900,
742,
525,
26031,
29918,
29890,
4708,
22099,
29937,
29929,
29900,
29945,
29946,
29906,
29953,
10827,
13,
1678,
736,
11955,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.