content
stringlengths 1
1.04M
| input_ids
sequencelengths 1
774k
| ratio_char_token
float64 0.38
22.9
| token_count
int64 1
774k
|
---|---|---|---|
import sklearn.linear_model as skl
| [
11748,
1341,
35720,
13,
29127,
62,
19849,
355,
1341,
75,
198
] | 3.181818 | 11 |
import pytest
from pmxbot import util
@pytest.mark.xfail(reason="Wordnik is unreliable")
@pytest.mark.xfail(reason="#97: Google is unreliable")
| [
11748,
12972,
9288,
198,
198,
6738,
9114,
87,
13645,
1330,
7736,
628,
198,
31,
9078,
9288,
13,
4102,
13,
26152,
603,
7,
41181,
2625,
26449,
17187,
318,
29954,
4943,
628,
198,
31,
9078,
9288,
13,
4102,
13,
26152,
603,
7,
41181,
25698,
5607,
25,
3012,
318,
29954,
4943,
628
] | 3.061224 | 49 |
#!/usr/bin/env python
""" This example a coupe of ways to visualize statistic data.
As an example I took the monthly temperature in the region where I live
(Twente, The Netherlands) over the period 1983-2010.
This data was extracted from publicly available data obtained from the
Royal Netherlands Meteorological Institute (KNMI).
"""
import visvis as vv
temp_data = """
1983: 8.00 2.73 9.00 13.02 14.63 21.10 25.03 23.73 17.72 13.34 9.31 5.35
1984: 4.78 4.06 7.38 12.24 14.14 16.86 19.19 22.24 15.99 14.15 10.44 5.81
1985: -1.87 2.28 6.50 12.06 17.67 17.36 21.03 19.73 17.49 13.55 4.06 6.92
1986: 3.55 -1.30 8.03 10.64 18.54 20.93 20.98 20.06 15.50 15.02 10.55 6.59
1987: -1.62 4.52 4.78 15.06 14.49 17.57 20.66 19.66 18.74 14.17 7.96 5.66
1988: 8.05 6.71 7.18 13.00 19.37 18.68 19.80 21.29 17.60 13.82 8.05 7.34
1989: 6.14 7.77 11.48 10.21 19.58 21.05 23.14 22.44 19.95 15.92 8.97 7.34
1990: 6.83 10.82 11.90 13.47 19.58 19.13 21.06 23.80 16.24 16.02 8.08 5.35
1991: 5.21 2.29 12.43 13.33 14.11 15.99 23.49 22.87 19.74 13.52 7.78 5.55
1992: 4.51 7.43 9.67 12.23 20.38 22.42 23.49 22.80 18.91 10.58 10.04 5.55
1993: 7.36 3.32 9.72 15.79 19.33 20.09 20.57 20.01 16.89 12.36 4.46 6.51
1994: 6.84 4.08 10.51 13.15 17.34 20.39 27.51 23.17 17.45 13.45 11.60 7.52
1995: 5.52 9.00 8.98 13.40 18.29 19.56 25.85 25.53 18.28 17.12 8.99 0.83
1996: 1.00 2.14 6.78 15.10 15.34 20.58 21.24 22.86 16.43 14.54 7.61 1.52
1997: 1.17 8.71 11.46 12.30 17.79 21.28 22.90 25.80 19.04 13.29 8.25 6.25
1998: 6.73 9.04 10.72 12.91 19.81 20.46 20.56 21.63 18.72 11.91 5.95 6.01
1999: 7.07 5.34 10.54 14.59 18.72 20.39 24.65 22.39 22.83 14.03 8.96 6.36
2000: 5.74 8.43 9.52 15.49 20.22 21.51 19.71 22.83 19.35 14.59 10.13 6.67
2001: 5.02 7.23 7.25 12.46 19.85 20.12 23.71 23.79 16.70 17.72 9.14 4.59
2002: 6.23 9.74 11.19 14.14 18.40 21.86 22.44 23.75 19.25 12.91 10.19 3.69
2003: 4.35 5.25 12.38 15.38 18.71 23.96 24.06 25.77 20.04 11.27 10.53 6.45
2004: 4.99 7.15 10.00 15.85 17.26 20.93 21.72 24.33 19.94 14.91 8.67 4.96
2005: 6.95 4.32 9.85 15.66 18.07 21.97 22.92 21.07 21.04 17.72 8.86 5.37
2006: 3.31 4.14 7.05 13.51 19.30 22.37 29.29 20.75 23.03 17.04 11.67 8.46
2007: 8.73 8.41 12.24 19.28 18.81 22.45 21.69 22.05 17.97 13.48 8.96 5.48
2008: 8.07 8.98 9.21 13.43 20.70 22.55 23.44 22.24 18.40 13.50 8.62 4.18
2009: 2.98 5.27 9.47 18.89 19.56 20.85 23.36 24.04 20.04 13.60 11.57 3.95
2010: 0.20 3.60 10.17 15.41 15.21 22.88 27.06 21.16 17.20 13.73 7.35 -0.62
"""
# Collect data per month (just put all years on a heap)
# Not the most readable code, but this example is about what we do with
# the data next.
temps_per_month = [[] for i in range(12)]
for line in temp_data.splitlines():
if ":" not in line:
continue
temps = [float(t) for t in line.split(': ')[1].split(' ')]
for i in range(12):
temps_per_month[i].append(temps[i])
# Calculate means
mean = lambda x: sum(x)/len(x)
mean_temps_per_month = [mean(tt) for tt in temps_per_month]
# Prepare figure
vv.figure(1); vv.clf()
# Show means in a normal bar chart
a1 = vv.subplot(221);
b2 = vv.bar(mean_temps_per_month)
b2.color = 'r'
# Show means in a 3D bar chart
a2 = vv.subplot(222);
b3 = vv.bar3(mean_temps_per_month)
b3.color = 'g'
a2.daspect = 1,1,0.3
# Show box plot
a3 = vv.subplot(223)
bp = vv.boxplot(temps_per_month)
bp.lc = 'b'
bp.lw = 2
# Show violin plot
a4 = vv.subplot(224)
vp = vv.boxplot(temps_per_month, whiskers='violin')
vp.lc = 'm'
vp.lw = 3
# Set legends and ticks for each axes
for a in [a1, a2, a3, a4]:
a.axis.xTicks = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split()
if a is a2:
a.axis.zLabel = 'Temperature [C^o]'
a.axis.showGridZ = True
else:
a.axis.yLabel = 'Temperature [C^o]'
a.axis.showGridY = True
a.axis.xTicksAngle = -30
app = vv.use()
app.Run()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
770,
1672,
257,
2284,
431,
286,
2842,
284,
38350,
24696,
1366,
13,
198,
198,
1722,
281,
1672,
314,
1718,
262,
9651,
5951,
287,
262,
3814,
810,
314,
2107,
220,
198,
7,
5080,
21872,
11,
383,
12671,
8,
625,
262,
2278,
13540,
12,
10333,
13,
198,
198,
1212,
1366,
373,
21242,
422,
7271,
1695,
1366,
6492,
422,
262,
198,
41861,
12671,
25582,
2770,
5136,
357,
29132,
8895,
737,
198,
198,
37811,
198,
11748,
1490,
4703,
355,
410,
85,
198,
198,
29510,
62,
7890,
796,
37227,
198,
29279,
25,
807,
13,
405,
362,
13,
4790,
860,
13,
405,
1511,
13,
2999,
1478,
13,
5066,
2310,
13,
940,
1679,
13,
3070,
2242,
13,
4790,
1596,
13,
4761,
1511,
13,
2682,
860,
13,
3132,
642,
13,
2327,
198,
28296,
25,
604,
13,
3695,
604,
13,
3312,
767,
13,
2548,
1105,
13,
1731,
1478,
13,
1415,
1467,
13,
4521,
678,
13,
1129,
2534,
13,
1731,
1315,
13,
2079,
1478,
13,
1314,
838,
13,
2598,
642,
13,
6659,
198,
29110,
25,
532,
16,
13,
5774,
362,
13,
2078,
718,
13,
1120,
1105,
13,
3312,
1596,
13,
3134,
1596,
13,
2623,
2310,
13,
3070,
678,
13,
4790,
1596,
13,
2920,
1511,
13,
2816,
604,
13,
3312,
718,
13,
5892,
198,
28054,
25,
513,
13,
2816,
532,
16,
13,
1270,
807,
13,
3070,
838,
13,
2414,
1248,
13,
4051,
1160,
13,
6052,
1160,
13,
4089,
1160,
13,
3312,
1315,
13,
1120,
1315,
13,
2999,
838,
13,
2816,
718,
13,
3270,
198,
27301,
25,
532,
16,
13,
5237,
604,
13,
4309,
604,
13,
3695,
1315,
13,
3312,
1478,
13,
2920,
1596,
13,
3553,
1160,
13,
2791,
678,
13,
2791,
1248,
13,
4524,
1478,
13,
1558,
767,
13,
4846,
642,
13,
2791,
198,
26709,
25,
807,
13,
2713,
718,
13,
4869,
767,
13,
1507,
1511,
13,
405,
678,
13,
2718,
1248,
13,
3104,
678,
13,
1795,
2310,
13,
1959,
1596,
13,
1899,
1511,
13,
6469,
807,
13,
2713,
767,
13,
2682,
198,
25475,
25,
718,
13,
1415,
767,
13,
3324,
1367,
13,
2780,
838,
13,
2481,
678,
13,
3365,
2310,
13,
2713,
2242,
13,
1415,
2534,
13,
2598,
678,
13,
3865,
1315,
13,
5892,
807,
13,
5607,
767,
13,
2682,
198,
19891,
25,
718,
13,
5999,
838,
13,
6469,
1367,
13,
3829,
1511,
13,
2857,
678,
13,
3365,
678,
13,
1485,
2310,
13,
3312,
2242,
13,
1795,
1467,
13,
1731,
1467,
13,
2999,
807,
13,
2919,
642,
13,
2327,
198,
24529,
25,
642,
13,
2481,
362,
13,
1959,
1105,
13,
3559,
1511,
13,
2091,
1478,
13,
1157,
1315,
13,
2079,
2242,
13,
2920,
2534,
13,
5774,
678,
13,
4524,
1511,
13,
4309,
767,
13,
3695,
642,
13,
2816,
198,
23847,
25,
604,
13,
4349,
767,
13,
3559,
860,
13,
3134,
1105,
13,
1954,
1160,
13,
2548,
2534,
13,
3682,
2242,
13,
2920,
2534,
13,
1795,
1248,
13,
6420,
838,
13,
3365,
838,
13,
3023,
642,
13,
2816,
198,
24465,
25,
767,
13,
2623,
513,
13,
2624,
860,
13,
4761,
1315,
13,
3720,
678,
13,
2091,
1160,
13,
2931,
1160,
13,
3553,
1160,
13,
486,
1467,
13,
4531,
1105,
13,
2623,
604,
13,
3510,
718,
13,
4349,
198,
22666,
25,
718,
13,
5705,
604,
13,
2919,
838,
13,
4349,
1511,
13,
1314,
1596,
13,
2682,
1160,
13,
2670,
2681,
13,
4349,
2242,
13,
1558,
1596,
13,
2231,
1511,
13,
2231,
1367,
13,
1899,
767,
13,
4309,
198,
21908,
25,
642,
13,
4309,
860,
13,
405,
807,
13,
4089,
1511,
13,
1821,
1248,
13,
1959,
678,
13,
3980,
1679,
13,
5332,
1679,
13,
4310,
1248,
13,
2078,
1596,
13,
1065,
807,
13,
2079,
657,
13,
5999,
198,
22288,
25,
352,
13,
405,
362,
13,
1415,
718,
13,
3695,
1315,
13,
940,
1315,
13,
2682,
1160,
13,
3365,
2310,
13,
1731,
2534,
13,
4521,
1467,
13,
3559,
1478,
13,
4051,
767,
13,
5333,
352,
13,
4309,
198,
21498,
25,
352,
13,
1558,
807,
13,
4869,
1367,
13,
3510,
1105,
13,
1270,
1596,
13,
3720,
2310,
13,
2078,
2534,
13,
3829,
1679,
13,
1795,
678,
13,
3023,
1511,
13,
1959,
807,
13,
1495,
718,
13,
1495,
198,
21113,
25,
718,
13,
4790,
860,
13,
3023,
838,
13,
4761,
1105,
13,
6420,
678,
13,
6659,
1160,
13,
3510,
1160,
13,
3980,
2310,
13,
5066,
1248,
13,
4761,
1367,
13,
6420,
642,
13,
3865,
718,
13,
486,
198,
18946,
25,
767,
13,
2998,
642,
13,
2682,
838,
13,
4051,
1478,
13,
3270,
1248,
13,
4761,
1160,
13,
2670,
1987,
13,
2996,
2534,
13,
2670,
2534,
13,
5999,
1478,
13,
3070,
807,
13,
4846,
718,
13,
2623,
198,
11024,
25,
642,
13,
4524,
807,
13,
3559,
860,
13,
4309,
1315,
13,
2920,
1160,
13,
1828,
2310,
13,
4349,
678,
13,
4869,
2534,
13,
5999,
678,
13,
2327,
1478,
13,
3270,
838,
13,
1485,
718,
13,
3134,
198,
14585,
25,
642,
13,
2999,
767,
13,
1954,
767,
13,
1495,
1105,
13,
3510,
678,
13,
5332,
1160,
13,
1065,
2242,
13,
4869,
2242,
13,
3720,
1467,
13,
2154,
1596,
13,
4761,
860,
13,
1415,
604,
13,
3270,
198,
16942,
25,
718,
13,
1954,
860,
13,
4524,
1367,
13,
1129,
1478,
13,
1415,
1248,
13,
1821,
2310,
13,
4521,
2534,
13,
2598,
2242,
13,
2425,
678,
13,
1495,
1105,
13,
6420,
838,
13,
1129,
513,
13,
3388,
198,
16088,
25,
604,
13,
2327,
642,
13,
1495,
1105,
13,
2548,
1315,
13,
2548,
1248,
13,
4869,
2242,
13,
4846,
1987,
13,
3312,
1679,
13,
3324,
1160,
13,
3023,
1367,
13,
1983,
838,
13,
4310,
718,
13,
2231,
198,
15724,
25,
604,
13,
2079,
767,
13,
1314,
838,
13,
405,
1315,
13,
5332,
1596,
13,
2075,
1160,
13,
6052,
2310,
13,
4761,
1987,
13,
2091,
678,
13,
5824,
1478,
13,
6420,
807,
13,
3134,
604,
13,
4846,
198,
14315,
25,
718,
13,
3865,
604,
13,
2624,
860,
13,
5332,
1315,
13,
2791,
1248,
13,
2998,
2310,
13,
5607,
2534,
13,
5892,
2310,
13,
2998,
2310,
13,
3023,
1596,
13,
4761,
807,
13,
4521,
642,
13,
2718,
198,
13330,
25,
513,
13,
3132,
604,
13,
1415,
767,
13,
2713,
1511,
13,
4349,
678,
13,
1270,
2534,
13,
2718,
2808,
13,
1959,
1160,
13,
2425,
2242,
13,
3070,
1596,
13,
3023,
1367,
13,
3134,
807,
13,
3510,
198,
12726,
25,
807,
13,
4790,
807,
13,
3901,
1105,
13,
1731,
678,
13,
2078,
1248,
13,
6659,
2534,
13,
2231,
2310,
13,
3388,
2534,
13,
2713,
1596,
13,
5607,
1511,
13,
2780,
807,
13,
4846,
642,
13,
2780,
198,
11528,
25,
807,
13,
2998,
807,
13,
4089,
860,
13,
2481,
1511,
13,
3559,
1160,
13,
2154,
2534,
13,
2816,
2242,
13,
2598,
2534,
13,
1731,
1248,
13,
1821,
1511,
13,
1120,
807,
13,
5237,
604,
13,
1507,
198,
10531,
25,
362,
13,
4089,
642,
13,
1983,
860,
13,
2857,
1248,
13,
4531,
678,
13,
3980,
1160,
13,
5332,
2242,
13,
2623,
1987,
13,
3023,
1160,
13,
3023,
1511,
13,
1899,
1367,
13,
3553,
513,
13,
3865,
198,
10333,
25,
657,
13,
1238,
513,
13,
1899,
838,
13,
1558,
1315,
13,
3901,
1315,
13,
2481,
2534,
13,
3459,
2681,
13,
3312,
2310,
13,
1433,
1596,
13,
1238,
1511,
13,
4790,
767,
13,
2327,
532,
15,
13,
5237,
198,
37811,
198,
198,
2,
9745,
1366,
583,
1227,
357,
3137,
1234,
477,
812,
319,
257,
24575,
8,
198,
2,
1892,
262,
749,
31744,
2438,
11,
475,
428,
1672,
318,
546,
644,
356,
466,
351,
198,
2,
262,
1366,
1306,
13,
198,
11498,
862,
62,
525,
62,
8424,
796,
16410,
60,
329,
1312,
287,
2837,
7,
1065,
15437,
198,
1640,
1627,
287,
20218,
62,
7890,
13,
35312,
6615,
33529,
198,
220,
220,
220,
611,
366,
11097,
407,
287,
1627,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
2169,
862,
796,
685,
22468,
7,
83,
8,
329,
256,
287,
1627,
13,
35312,
7,
10354,
705,
38381,
16,
4083,
35312,
10786,
705,
15437,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
1065,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2169,
862,
62,
525,
62,
8424,
58,
72,
4083,
33295,
7,
11498,
862,
58,
72,
12962,
198,
198,
2,
27131,
378,
1724,
198,
32604,
796,
37456,
2124,
25,
2160,
7,
87,
20679,
11925,
7,
87,
8,
198,
32604,
62,
11498,
862,
62,
525,
62,
8424,
796,
685,
32604,
7,
926,
8,
329,
256,
83,
287,
2169,
862,
62,
525,
62,
8424,
60,
198,
198,
2,
43426,
3785,
198,
25093,
13,
26875,
7,
16,
1776,
410,
85,
13,
565,
69,
3419,
198,
198,
2,
5438,
1724,
287,
257,
3487,
2318,
8262,
198,
64,
16,
796,
410,
85,
13,
7266,
29487,
7,
26115,
1776,
220,
198,
65,
17,
796,
410,
85,
13,
5657,
7,
32604,
62,
11498,
862,
62,
525,
62,
8424,
8,
198,
65,
17,
13,
8043,
796,
705,
81,
6,
198,
198,
2,
5438,
1724,
287,
257,
513,
35,
2318,
8262,
198,
64,
17,
796,
410,
85,
13,
7266,
29487,
7,
23148,
1776,
220,
198,
65,
18,
796,
410,
85,
13,
5657,
18,
7,
32604,
62,
11498,
862,
62,
525,
62,
8424,
8,
198,
65,
18,
13,
8043,
796,
705,
70,
6,
198,
64,
17,
13,
67,
292,
806,
796,
352,
11,
16,
11,
15,
13,
18,
198,
198,
2,
5438,
3091,
7110,
198,
64,
18,
796,
410,
85,
13,
7266,
29487,
7,
22047,
8,
198,
46583,
796,
410,
85,
13,
3524,
29487,
7,
11498,
862,
62,
525,
62,
8424,
8,
198,
46583,
13,
44601,
796,
705,
65,
6,
198,
46583,
13,
75,
86,
796,
362,
198,
198,
2,
5438,
38283,
7110,
198,
64,
19,
796,
410,
85,
13,
7266,
29487,
7,
24137,
8,
198,
36133,
796,
410,
85,
13,
3524,
29487,
7,
11498,
862,
62,
525,
62,
8424,
11,
21060,
364,
11639,
17069,
259,
11537,
198,
36133,
13,
44601,
796,
705,
76,
6,
198,
36133,
13,
75,
86,
796,
513,
198,
198,
2,
5345,
24901,
290,
36066,
329,
1123,
34197,
198,
1640,
257,
287,
685,
64,
16,
11,
257,
17,
11,
257,
18,
11,
257,
19,
5974,
198,
220,
220,
220,
257,
13,
22704,
13,
87,
51,
3378,
796,
705,
12128,
3158,
1526,
2758,
1737,
7653,
5979,
2447,
8621,
2556,
5267,
4280,
4458,
35312,
3419,
198,
220,
220,
220,
611,
257,
318,
257,
17,
25,
198,
220,
220,
220,
220,
220,
220,
220,
257,
13,
22704,
13,
89,
33986,
796,
705,
42492,
685,
34,
61,
78,
49946,
198,
220,
220,
220,
220,
220,
220,
220,
257,
13,
22704,
13,
12860,
41339,
57,
796,
6407,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
257,
13,
22704,
13,
88,
33986,
796,
705,
42492,
685,
34,
61,
78,
49946,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
257,
13,
22704,
13,
12860,
41339,
56,
796,
6407,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
257,
13,
22704,
13,
87,
51,
3378,
13450,
293,
796,
532,
1270,
198,
198,
1324,
796,
410,
85,
13,
1904,
3419,
198,
1324,
13,
10987,
3419,
198
] | 2.106887 | 1,815 |
import unittest
import hcl2
from checkov.common.models.enums import CheckResult
from checkov.terraform.checks.resource.gcp.CloudStorageLogging import check
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
11748,
289,
565,
17,
198,
198,
6738,
2198,
709,
13,
11321,
13,
27530,
13,
268,
5700,
1330,
6822,
23004,
198,
6738,
2198,
709,
13,
353,
430,
687,
13,
42116,
13,
31092,
13,
70,
13155,
13,
18839,
31425,
11187,
2667,
1330,
2198,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.957143 | 70 |
from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.context import (
ContextServer,
)
from antarest.study.storage.rawstudy.model.filesystem.ini_file_node import (
IniFileNode,
)
| [
6738,
1885,
12423,
13,
44517,
13,
35350,
13,
1831,
44517,
13,
19849,
13,
16624,
6781,
13,
11250,
13,
19849,
1330,
357,
198,
220,
220,
220,
9220,
39841,
27660,
16934,
11,
198,
8,
198,
6738,
1885,
12423,
13,
44517,
13,
35350,
13,
1831,
44517,
13,
19849,
13,
16624,
6781,
13,
22866,
1330,
357,
198,
220,
220,
220,
30532,
10697,
11,
198,
8,
198,
6738,
1885,
12423,
13,
44517,
13,
35350,
13,
1831,
44517,
13,
19849,
13,
16624,
6781,
13,
5362,
62,
7753,
62,
17440,
1330,
357,
198,
220,
220,
220,
554,
72,
8979,
19667,
11,
198,
8,
628
] | 3.010309 | 97 |
from __future__ import absolute_import
'''Resnet for cifar dataset.
Ported form
https://github.com/facebook/fb.resnet.torch
and
https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py
(c) YANG, Wei
'''
import torch.nn as nn
import math
import torch
import numpy as np
__all__ = ['resnet','resnet50']
def conv3x3(in_planes, out_planes, stride=1):
"3x3 convolution with padding"
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=1, bias=False)
def resnet(**kwargs):
"""
Constructs a ResNet model.
"""
return ResNet(**kwargs)
class Dconv_shuffle(nn.Module):
"""
Deformable convolution with random shuffling of the feature map.
Random shuffling only happened within each page independently.
The sampling locations are generated for each forward pass during the training.
"""
def resnet50(**kwargs):
"""
Constructs a ResNet model.
"""
return Resnet50(**kwargs) | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
7061,
6,
4965,
3262,
329,
269,
361,
283,
27039,
13,
198,
47,
9741,
1296,
198,
5450,
1378,
12567,
13,
785,
14,
19024,
14,
21855,
13,
411,
3262,
13,
13165,
354,
198,
392,
198,
5450,
1378,
12567,
13,
785,
14,
9078,
13165,
354,
14,
10178,
14,
2436,
672,
14,
9866,
14,
13165,
354,
10178,
14,
27530,
14,
411,
3262,
13,
9078,
198,
7,
66,
8,
575,
15567,
11,
29341,
198,
7061,
6,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
10688,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
198,
834,
439,
834,
796,
37250,
411,
3262,
41707,
411,
3262,
1120,
20520,
198,
198,
4299,
3063,
18,
87,
18,
7,
259,
62,
22587,
11,
503,
62,
22587,
11,
33769,
28,
16,
2599,
198,
220,
220,
220,
366,
18,
87,
18,
3063,
2122,
351,
24511,
1,
198,
220,
220,
220,
1441,
299,
77,
13,
3103,
85,
17,
67,
7,
259,
62,
22587,
11,
503,
62,
22587,
11,
9720,
62,
7857,
28,
18,
11,
33769,
28,
2536,
485,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24511,
28,
16,
11,
10690,
28,
25101,
8,
628,
628,
198,
198,
4299,
581,
3262,
7,
1174,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
28407,
82,
257,
1874,
7934,
2746,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
1874,
7934,
7,
1174,
46265,
22046,
8,
628,
198,
4871,
360,
42946,
62,
1477,
18137,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1024,
687,
540,
3063,
2122,
351,
4738,
32299,
1359,
286,
262,
3895,
3975,
13,
198,
220,
220,
220,
14534,
32299,
1359,
691,
3022,
1626,
1123,
2443,
14799,
13,
198,
220,
220,
220,
383,
19232,
7064,
389,
7560,
329,
1123,
2651,
1208,
1141,
262,
3047,
13,
198,
220,
220,
220,
37227,
198,
198,
4299,
581,
3262,
1120,
7,
1174,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
28407,
82,
257,
1874,
7934,
2746,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
1874,
3262,
1120,
7,
1174,
46265,
22046,
8
] | 2.679245 | 371 |
# Read in serifxml then save it an make sure the files are
# essentially identical
import sys, os
script_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(script_dir, ".."))
import serifxml3
if len(sys.argv) != 3:
print("Usage: " + sys.argv[0] + " input-serifxml-file output-serifxml-file")
sys.exit(1)
input_file, output_file = sys.argv[1:]
if os.path.exists(output_file):
os.remove(output_file)
doc = serifxml3.Document(input_file)
doc.save(output_file)
print("Reading input serifxml")
i = open(input_file)
print("Writing output serifxml")
o = open(output_file)
i_contents = i.read()
o_contents = o.read()
i.close()
o.close()
print("Checking")
if i_contents.strip() != o_contents.strip():
print("Serifxml files differ")
sys.exit(1)
print("Serifxml files match")
| [
2,
4149,
287,
1055,
361,
19875,
788,
3613,
340,
281,
787,
1654,
262,
3696,
389,
220,
198,
2,
6986,
10411,
198,
198,
11748,
25064,
11,
28686,
198,
12048,
62,
15908,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
4008,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
12048,
62,
15908,
11,
366,
492,
48774,
198,
11748,
1055,
361,
19875,
18,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
513,
25,
198,
220,
220,
220,
3601,
7203,
28350,
25,
366,
1343,
25064,
13,
853,
85,
58,
15,
60,
1343,
366,
5128,
12,
2655,
361,
19875,
12,
7753,
5072,
12,
2655,
361,
19875,
12,
7753,
4943,
198,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
198,
15414,
62,
7753,
11,
5072,
62,
7753,
796,
25064,
13,
853,
85,
58,
16,
47715,
198,
198,
361,
28686,
13,
6978,
13,
1069,
1023,
7,
22915,
62,
7753,
2599,
198,
220,
220,
220,
28686,
13,
28956,
7,
22915,
62,
7753,
8,
198,
198,
15390,
796,
1055,
361,
19875,
18,
13,
24941,
7,
15414,
62,
7753,
8,
198,
15390,
13,
21928,
7,
22915,
62,
7753,
8,
198,
198,
4798,
7203,
36120,
5128,
1055,
361,
19875,
4943,
198,
72,
796,
1280,
7,
15414,
62,
7753,
8,
198,
4798,
7203,
33874,
5072,
1055,
361,
19875,
4943,
198,
78,
796,
1280,
7,
22915,
62,
7753,
8,
198,
198,
72,
62,
3642,
658,
796,
1312,
13,
961,
3419,
198,
78,
62,
3642,
658,
796,
267,
13,
961,
3419,
198,
198,
72,
13,
19836,
3419,
198,
78,
13,
19836,
3419,
198,
198,
4798,
7203,
9787,
278,
4943,
198,
361,
1312,
62,
3642,
658,
13,
36311,
3419,
14512,
267,
62,
3642,
658,
13,
36311,
33529,
198,
220,
220,
220,
3601,
7203,
7089,
361,
19875,
3696,
13238,
4943,
198,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
198,
4798,
7203,
7089,
361,
19875,
3696,
2872,
4943,
198
] | 2.535385 | 325 |
import numpy as np
import numba as nb
@nb.njit | [
11748,
299,
32152,
355,
45941,
198,
11748,
997,
7012,
355,
299,
65,
628,
198,
31,
46803,
13,
77,
45051
] | 2.526316 | 19 |
import os
ROOT = '/home/xjw/Downloads/code/mmsegmentation-0.21.0/'
def txt2filename(txt_path):
"""
@param txt_path:
@return: 返回数据集中包含的所有图片的名称
"""
data = []
with open(txt_path, 'r') as f:
for ch in f.readlines():
data.append(ch.strip())
return data
if __name__ == '__main__':
filename2txt('/home/xjw/Downloads/code/mmsegmentation-0.21.0/data/xiangtan/images/validation',
ROOT + 'SeRe/tools/data_pre/val.txt')
| [
11748,
28686,
198,
198,
13252,
2394,
796,
31051,
11195,
14,
87,
73,
86,
14,
10002,
82,
14,
8189,
14,
3020,
325,
5154,
341,
12,
15,
13,
2481,
13,
15,
14,
6,
628,
198,
198,
4299,
256,
742,
17,
34345,
7,
14116,
62,
6978,
2599,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
2488,
17143,
256,
742,
62,
6978,
25,
198,
220,
220,
220,
2488,
7783,
25,
5525,
123,
242,
32368,
252,
46763,
108,
162,
235,
106,
37239,
228,
40792,
44293,
227,
28938,
104,
21410,
33699,
222,
17312,
231,
32368,
122,
31965,
229,
21410,
28938,
235,
163,
100,
108,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1366,
796,
17635,
198,
220,
220,
220,
351,
1280,
7,
14116,
62,
6978,
11,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
329,
442,
287,
277,
13,
961,
6615,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
13,
33295,
7,
354,
13,
36311,
28955,
198,
220,
220,
220,
1441,
1366,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
29472,
17,
14116,
10786,
14,
11195,
14,
87,
73,
86,
14,
10002,
82,
14,
8189,
14,
3020,
325,
5154,
341,
12,
15,
13,
2481,
13,
15,
14,
7890,
14,
87,
15483,
38006,
14,
17566,
14,
12102,
341,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15107,
2394,
1343,
705,
4653,
3041,
14,
31391,
14,
7890,
62,
3866,
14,
2100,
13,
14116,
11537,
198
] | 1.868726 | 259 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example TeraRanger MultiFlex configuration script.
For more information about how to use this script, please refer to this document:
https://www.terabee.com/wp-content/uploads/2017/09/TR-MF-Python-ReadMe.pdf
"""
import sys
import binascii
import serial
if __name__ == "__main__":
if len(sys.argv) < 2:
print '\n \n[ERROR] Correct usage $ python multiflex_binary.py port'
sys.exit(1)
port_name = sys.argv[1]
multiflex = serial.Serial(port_name, 115200, timeout=5, writeTimeout=5)
print 'Connected to TeraRanger MultiFlex'
multiflex.flushInput()
multiflex.flushOutput()
multiflex.write(bytearray([0x00, 0x11, 0x02, 0x4C]))
response = multiflex.read(16)
response = binascii.hexlify(response)
if response.find("52451100d4") != -1:
print 'ACK'
if response.find("524511ff27") != -1:
print 'NACK'
multiflex.close()
sys.exit(0)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
16281,
3813,
64,
49,
2564,
15237,
37,
2588,
8398,
4226,
13,
198,
1890,
517,
1321,
546,
703,
284,
779,
428,
4226,
11,
3387,
3522,
284,
428,
3188,
25,
198,
5450,
1378,
2503,
13,
353,
32580,
13,
785,
14,
24142,
12,
11299,
14,
39920,
14,
5539,
14,
2931,
14,
5446,
12,
49800,
12,
37906,
12,
5569,
5308,
13,
12315,
198,
37811,
198,
11748,
25064,
198,
11748,
9874,
292,
979,
72,
198,
11748,
11389,
220,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
220,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
1279,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
59,
77,
3467,
77,
58,
24908,
60,
22941,
8748,
720,
21015,
43543,
2588,
62,
39491,
13,
9078,
2493,
6,
198,
220,
220,
220,
220,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
2493,
62,
3672,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
220,
220,
220,
43543,
2588,
796,
11389,
13,
32634,
7,
634,
62,
3672,
11,
12279,
2167,
11,
26827,
28,
20,
11,
3551,
48031,
28,
20,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
3601,
705,
13313,
276,
284,
3813,
64,
49,
2564,
15237,
37,
2588,
6,
198,
220,
220,
220,
43543,
2588,
13,
25925,
20560,
3419,
198,
220,
220,
220,
43543,
2588,
13,
25925,
26410,
3419,
198,
220,
220,
220,
43543,
2588,
13,
13564,
7,
1525,
83,
451,
2433,
26933,
15,
87,
405,
11,
657,
87,
1157,
11,
657,
87,
2999,
11,
657,
87,
19,
34,
60,
4008,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2882,
796,
43543,
2588,
13,
961,
7,
1433,
8,
198,
220,
220,
220,
2882,
796,
9874,
292,
979,
72,
13,
33095,
75,
1958,
7,
26209,
8,
198,
220,
220,
220,
220,
198,
220,
220,
220,
611,
2882,
13,
19796,
7203,
20,
22995,
42060,
67,
19,
4943,
14512,
532,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
8120,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
611,
2882,
13,
19796,
7203,
20,
22995,
1157,
487,
1983,
4943,
14512,
532,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
705,
45,
8120,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
43543,
2588,
13,
19836,
3419,
198,
220,
220,
220,
25064,
13,
37023,
7,
15,
8,
198
] | 2.261161 | 448 |
# Generated by Django 4.0 on 2021-12-15 07:28
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
319,
33448,
12,
1065,
12,
1314,
8753,
25,
2078,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.904762 | 42 |
# coding: utf-8
"""
Gate API v4
Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from gate_api.configuration import Configuration
class OptionsUnderlyingTicker(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {'trade_put': 'int', 'trade_call': 'int', 'index_price': 'str'}
attribute_map = {'trade_put': 'trade_put', 'trade_call': 'trade_call', 'index_price': 'index_price'}
def __init__(self, trade_put=None, trade_call=None, index_price=None, local_vars_configuration=None): # noqa: E501
# type: (int, int, str, Configuration) -> None
"""OptionsUnderlyingTicker - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._trade_put = None
self._trade_call = None
self._index_price = None
self.discriminator = None
if trade_put is not None:
self.trade_put = trade_put
if trade_call is not None:
self.trade_call = trade_call
if index_price is not None:
self.index_price = index_price
@property
def trade_put(self):
"""Gets the trade_put of this OptionsUnderlyingTicker. # noqa: E501
Total put options trades amount in last 24h # noqa: E501
:return: The trade_put of this OptionsUnderlyingTicker. # noqa: E501
:rtype: int
"""
return self._trade_put
@trade_put.setter
def trade_put(self, trade_put):
"""Sets the trade_put of this OptionsUnderlyingTicker.
Total put options trades amount in last 24h # noqa: E501
:param trade_put: The trade_put of this OptionsUnderlyingTicker. # noqa: E501
:type: int
"""
self._trade_put = trade_put
@property
def trade_call(self):
"""Gets the trade_call of this OptionsUnderlyingTicker. # noqa: E501
Total call options trades amount in last 24h # noqa: E501
:return: The trade_call of this OptionsUnderlyingTicker. # noqa: E501
:rtype: int
"""
return self._trade_call
@trade_call.setter
def trade_call(self, trade_call):
"""Sets the trade_call of this OptionsUnderlyingTicker.
Total call options trades amount in last 24h # noqa: E501
:param trade_call: The trade_call of this OptionsUnderlyingTicker. # noqa: E501
:type: int
"""
self._trade_call = trade_call
@property
def index_price(self):
"""Gets the index_price of this OptionsUnderlyingTicker. # noqa: E501
Index price # noqa: E501
:return: The index_price of this OptionsUnderlyingTicker. # noqa: E501
:rtype: str
"""
return self._index_price
@index_price.setter
def index_price(self, index_price):
"""Sets the index_price of this OptionsUnderlyingTicker.
Index price # noqa: E501
:param index_price: The index_price of this OptionsUnderlyingTicker. # noqa: E501
:type: str
"""
self._index_price = index_price
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
value.items(),
)
)
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, OptionsUnderlyingTicker):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, OptionsUnderlyingTicker):
return True
return self.to_dict() != other.to_dict()
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
12816,
7824,
410,
19,
628,
220,
220,
220,
19134,
284,
12816,
13,
952,
7824,
220,
7824,
85,
19,
3769,
4136,
11,
10330,
290,
25650,
7313,
4560,
13,
1318,
389,
1171,
23113,
284,
19818,
262,
1103,
12,
2435,
1910,
7869,
11,
290,
2839,
23113,
543,
2476,
18239,
284,
3292,
319,
2836,
338,
8378,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
14039,
25,
1104,
31,
4529,
13,
10494,
13,
952,
198,
220,
220,
220,
2980,
515,
416,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
198,
37811,
628,
198,
11748,
279,
4798,
198,
11748,
302,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
11748,
2237,
198,
198,
6738,
8946,
62,
15042,
13,
11250,
3924,
1330,
28373,
628,
198,
4871,
18634,
9203,
3157,
51,
15799,
7,
15252,
2599,
198,
220,
220,
220,
37227,
16580,
25,
770,
1398,
318,
8295,
7560,
416,
4946,
17614,
35986,
13,
198,
220,
220,
220,
6524,
25,
3740,
1378,
9654,
15042,
12,
8612,
1352,
13,
13670,
628,
220,
220,
220,
2141,
407,
4370,
262,
1398,
14500,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
220,
220,
1280,
15042,
62,
19199,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
262,
1988,
318,
11688,
2099,
13,
198,
220,
220,
220,
220,
220,
11688,
62,
8899,
357,
11600,
2599,
383,
1994,
318,
11688,
1438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
290,
262,
1988,
318,
33918,
1994,
287,
6770,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1280,
15042,
62,
19199,
796,
1391,
6,
25351,
62,
1996,
10354,
705,
600,
3256,
705,
25351,
62,
13345,
10354,
705,
600,
3256,
705,
9630,
62,
20888,
10354,
705,
2536,
6,
92,
628,
220,
220,
220,
11688,
62,
8899,
796,
1391,
6,
25351,
62,
1996,
10354,
705,
25351,
62,
1996,
3256,
705,
25351,
62,
13345,
10354,
705,
25351,
62,
13345,
3256,
705,
9630,
62,
20888,
10354,
705,
9630,
62,
20888,
6,
92,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
3292,
62,
1996,
28,
14202,
11,
3292,
62,
13345,
28,
14202,
11,
6376,
62,
20888,
28,
14202,
11,
1957,
62,
85,
945,
62,
11250,
3924,
28,
14202,
2599,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
357,
600,
11,
493,
11,
965,
11,
28373,
8,
4613,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
29046,
9203,
3157,
51,
15799,
532,
257,
2746,
5447,
287,
4946,
17614,
37811,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1957,
62,
85,
945,
62,
11250,
3924,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1957,
62,
85,
945,
62,
11250,
3924,
796,
28373,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
12001,
62,
85,
945,
62,
11250,
3924,
796,
1957,
62,
85,
945,
62,
11250,
3924,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25351,
62,
1996,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25351,
62,
13345,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9630,
62,
20888,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
15410,
3036,
20900,
796,
6045,
628,
220,
220,
220,
220,
220,
220,
220,
611,
3292,
62,
1996,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
25351,
62,
1996,
796,
3292,
62,
1996,
198,
220,
220,
220,
220,
220,
220,
220,
611,
3292,
62,
13345,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
25351,
62,
13345,
796,
3292,
62,
13345,
198,
220,
220,
220,
220,
220,
220,
220,
611,
6376,
62,
20888,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9630,
62,
20888,
796,
6376,
62,
20888,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
3292,
62,
1996,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
3292,
62,
1996,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
7472,
1234,
3689,
17674,
2033,
287,
938,
1987,
71,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
3292,
62,
1996,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25351,
62,
1996,
628,
220,
220,
220,
2488,
25351,
62,
1996,
13,
2617,
353,
198,
220,
220,
220,
825,
3292,
62,
1996,
7,
944,
11,
3292,
62,
1996,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
3292,
62,
1996,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
628,
220,
220,
220,
220,
220,
220,
220,
7472,
1234,
3689,
17674,
2033,
287,
938,
1987,
71,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
3292,
62,
1996,
25,
383,
3292,
62,
1996,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25351,
62,
1996,
796,
3292,
62,
1996,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
3292,
62,
13345,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
3292,
62,
13345,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
7472,
869,
3689,
17674,
2033,
287,
938,
1987,
71,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
3292,
62,
13345,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
25351,
62,
13345,
628,
220,
220,
220,
2488,
25351,
62,
13345,
13,
2617,
353,
198,
220,
220,
220,
825,
3292,
62,
13345,
7,
944,
11,
3292,
62,
13345,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
3292,
62,
13345,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
628,
220,
220,
220,
220,
220,
220,
220,
7472,
869,
3689,
17674,
2033,
287,
938,
1987,
71,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
3292,
62,
13345,
25,
383,
3292,
62,
13345,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
493,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
25351,
62,
13345,
796,
3292,
62,
13345,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
6376,
62,
20888,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
38,
1039,
262,
6376,
62,
20888,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
12901,
2756,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
383,
6376,
62,
20888,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
81,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
9630,
62,
20888,
628,
220,
220,
220,
2488,
9630,
62,
20888,
13,
2617,
353,
198,
220,
220,
220,
825,
6376,
62,
20888,
7,
944,
11,
6376,
62,
20888,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
50,
1039,
262,
6376,
62,
20888,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
628,
220,
220,
220,
220,
220,
220,
220,
12901,
2756,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
6376,
62,
20888,
25,
383,
6376,
62,
20888,
286,
428,
18634,
9203,
3157,
51,
15799,
13,
220,
1303,
645,
20402,
25,
412,
33548,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
4906,
25,
965,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
9630,
62,
20888,
796,
6376,
62,
20888,
628,
220,
220,
220,
825,
284,
62,
11600,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
262,
2746,
6608,
355,
257,
8633,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1255,
796,
23884,
628,
220,
220,
220,
220,
220,
220,
220,
329,
708,
81,
11,
4808,
287,
2237,
13,
2676,
23814,
7,
944,
13,
9654,
15042,
62,
19199,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
651,
35226,
7,
944,
11,
708,
81,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
318,
39098,
7,
8367,
11,
1351,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
1351,
7,
8899,
7,
50033,
2124,
25,
2124,
13,
1462,
62,
11600,
3419,
611,
468,
35226,
7,
87,
11,
366,
1462,
62,
11600,
4943,
2073,
2124,
11,
1988,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
468,
35226,
7,
8367,
11,
366,
1462,
62,
11600,
1,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
1988,
13,
1462,
62,
11600,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
318,
39098,
7,
8367,
11,
8633,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
8633,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3975,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
37456,
2378,
25,
357,
9186,
58,
15,
4357,
2378,
58,
16,
4083,
1462,
62,
11600,
28955,
611,
468,
35226,
7,
9186,
58,
16,
4357,
366,
1462,
62,
11600,
4943,
2073,
2378,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
13,
23814,
22784,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1255,
58,
35226,
60,
796,
1988,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
1255,
628,
220,
220,
220,
825,
284,
62,
2536,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
262,
4731,
10552,
286,
262,
2746,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
279,
4798,
13,
79,
18982,
7,
944,
13,
1462,
62,
11600,
28955,
628,
220,
220,
220,
825,
11593,
260,
1050,
834,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
1890,
4600,
4798,
63,
290,
4600,
381,
22272,
63,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
2536,
3419,
628,
220,
220,
220,
825,
11593,
27363,
834,
7,
944,
11,
584,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
2081,
611,
1111,
5563,
389,
4961,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
7,
847,
11,
18634,
9203,
3157,
51,
15799,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
10352,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
11600,
3419,
6624,
584,
13,
1462,
62,
11600,
3419,
628,
220,
220,
220,
825,
11593,
710,
834,
7,
944,
11,
584,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
35561,
2081,
611,
1111,
5563,
389,
407,
4961,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
611,
407,
318,
39098,
7,
847,
11,
18634,
9203,
3157,
51,
15799,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
6407,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
1462,
62,
11600,
3419,
14512,
584,
13,
1462,
62,
11600,
3419,
198
] | 2.355507 | 2,270 |
from django.contrib import admin
class UserAdmin(admin.ModelAdmin):
"""User admin"""
exclude = ('renewed',)
list_display = ('username', 'email',
'isActive', 'created', 'modified')
list_filter = ('isActive',)
search_fields = ('firstName',
'lastName', 'username', 'email')
class SocialTokenAdmin(admin.ModelAdmin):
"""Social token admin"""
list_display = ('token',
'social', 'user', 'created')
search_fields = ('token',)
#admin.site.register(User, UserAdmin)
#admin.site.register(SocialToken, SocialTokenAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
628,
628,
198,
4871,
11787,
46787,
7,
28482,
13,
17633,
46787,
2599,
198,
220,
220,
220,
37227,
12982,
13169,
37811,
628,
220,
220,
220,
19607,
796,
19203,
918,
413,
276,
3256,
8,
198,
220,
220,
220,
1351,
62,
13812,
796,
19203,
29460,
3256,
705,
12888,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
271,
13739,
3256,
705,
25598,
3256,
705,
41771,
11537,
198,
220,
220,
220,
1351,
62,
24455,
796,
19203,
271,
13739,
3256,
8,
628,
220,
220,
220,
2989,
62,
25747,
796,
19203,
11085,
5376,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12957,
5376,
3256,
705,
29460,
3256,
705,
12888,
11537,
628,
198,
4871,
5483,
30642,
46787,
7,
28482,
13,
17633,
46787,
2599,
198,
220,
220,
220,
37227,
20636,
11241,
13169,
37811,
628,
220,
220,
220,
1351,
62,
13812,
796,
19203,
30001,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
14557,
3256,
705,
7220,
3256,
705,
25598,
11537,
628,
220,
220,
220,
2989,
62,
25747,
796,
19203,
30001,
3256,
8,
628,
198,
2,
28482,
13,
15654,
13,
30238,
7,
12982,
11,
11787,
46787,
8,
198,
2,
28482,
13,
15654,
13,
30238,
7,
20636,
30642,
11,
5483,
30642,
46787,
8,
198
] | 2.800971 | 206 |
from enum import Enum, auto
class J1939_PDU(Enum):
"""
J1939 PDU type
"""
PDU1 = auto()
PDU2 = auto()
class J1939_PGN:
"""
J1939 PGN class.
"""
_id = None
def __init__(self, msg_id: int = None, msg_pgn: int = None):
"""
Takes either a message ID or PGN
:param msg_id: CAN-bus message ID
:param msg_pgn: CAN-bus message J1939 PGN
"""
if msg_id is not None:
self._id = msg_id
elif msg_pgn is not None:
self._id = msg_pgn << 8
@property
def p(self) -> int:
"""
Priority
:return: J1939 priority value
"""
return (self._id >> 26) & 0x7
@property
def r(self) -> int:
"""
Reserved bit
:return: Reserved bit value
"""
return (self._id >> 25) & 0x1
@property
def dp(self) -> int:
"""
Data Page
:return: Data Page value
"""
return (self._id >> 24) & 0x1
@property
def pf(self) -> int:
"""
PDU format
:return: PDU format value
"""
return (self._id >> 16) & 0xFF
@property
def ps(self) -> int:
"""
PDU Specific
:return: PDU specific value
"""
return (self._id >> 8) & 0xFF
@property
def sa(self) -> int:
"""
Source Address
:return: Source Address value
"""
return self._id & 0xFF
@property
def pdu(self) -> J1939_PDU:
"""
PDU type
:return: PDU type as J1939_PDU
"""
if self.pf < 240:
return J1939_PDU.PDU1
else:
return J1939_PDU.PDU2
@property
def id(self) -> int:
"""
Message ID
:return: Message ID value
"""
return self._id
@property
def pgn(self):
"""
Message PGN
:return: Message PGN value
"""
if self.pdu is J1939_PDU.PDU1:
# Clear target address
return (self._id >> 8) & 0x3FF00
else:
return (self._id >> 8) & 0x3FFFF
| [
6738,
33829,
1330,
2039,
388,
11,
8295,
628,
198,
4871,
449,
1129,
2670,
62,
5760,
52,
7,
4834,
388,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
449,
1129,
2670,
14340,
52,
2099,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
14340,
52,
16,
796,
8295,
3419,
198,
220,
220,
220,
14340,
52,
17,
796,
8295,
3419,
628,
198,
4871,
449,
1129,
2670,
62,
6968,
45,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
449,
1129,
2670,
350,
16630,
1398,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4808,
312,
796,
6045,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
31456,
62,
312,
25,
493,
796,
6045,
11,
31456,
62,
79,
4593,
25,
493,
796,
6045,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
33687,
2035,
257,
3275,
4522,
393,
350,
16630,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
31456,
62,
312,
25,
15628,
12,
10885,
3275,
4522,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
17143,
31456,
62,
79,
4593,
25,
15628,
12,
10885,
3275,
449,
1129,
2670,
350,
16630,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
220,
220,
220,
220,
220,
220,
220,
611,
31456,
62,
312,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
312,
796,
31456,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
31456,
62,
79,
4593,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13557,
312,
796,
31456,
62,
79,
4593,
9959,
807,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
279,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
34416,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
449,
1129,
2670,
8475,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
2608,
8,
1222,
657,
87,
22,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
374,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
33876,
1643,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
33876,
1643,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
1679,
8,
1222,
657,
87,
16,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
288,
79,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
6060,
7873,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
6060,
7873,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
1987,
8,
1222,
657,
87,
16,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
279,
69,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14340,
52,
5794,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
14340,
52,
5794,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
1467,
8,
1222,
657,
87,
5777,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
26692,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14340,
52,
17377,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
14340,
52,
2176,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
807,
8,
1222,
657,
87,
5777,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
473,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
8090,
17917,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
8090,
17917,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
312,
1222,
657,
87,
5777,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
279,
646,
7,
944,
8,
4613,
449,
1129,
2670,
62,
5760,
52,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
14340,
52,
2099,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
14340,
52,
2099,
355,
449,
1129,
2670,
62,
5760,
52,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
79,
69,
1279,
14956,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
449,
1129,
2670,
62,
5760,
52,
13,
5760,
52,
16,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
449,
1129,
2670,
62,
5760,
52,
13,
5760,
52,
17,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
4686,
7,
944,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
16000,
4522,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
16000,
4522,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13557,
312,
628,
220,
220,
220,
2488,
26745,
198,
220,
220,
220,
825,
279,
4593,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
16000,
350,
16630,
198,
220,
220,
220,
220,
220,
220,
220,
1058,
7783,
25,
16000,
350,
16630,
1988,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
79,
646,
318,
449,
1129,
2670,
62,
5760,
52,
13,
5760,
52,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
11459,
2496,
2209,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
807,
8,
1222,
657,
87,
18,
5777,
405,
198,
220,
220,
220,
220,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
357,
944,
13557,
312,
9609,
807,
8,
1222,
657,
87,
18,
29312,
198
] | 1.885389 | 1,143 |
birthday_dictionary = {
"Albert Einstein" : "1/12/1912",
"Jeong Eun Kim" : "21/12/1983",
"Djangojeng-e" : "18/12/1986",
"Django": "01/01/2005"
}
name = input("Who's Birthday do you want to look up?")
if name in birthday_dictionary:
print(f'{name}s birthday is {birthday_dictionary[name]}')
else:
print("We dont' have {}'s birthday".format(name))
| [
198,
24280,
820,
62,
67,
14188,
796,
1391,
198,
220,
220,
220,
366,
42590,
24572,
1,
1058,
366,
16,
14,
1065,
14,
1129,
1065,
1600,
198,
220,
220,
220,
366,
40932,
506,
412,
403,
6502,
1,
1058,
366,
2481,
14,
1065,
14,
29279,
1600,
198,
220,
220,
220,
366,
35,
73,
648,
13210,
1516,
12,
68,
1,
1058,
366,
1507,
14,
1065,
14,
28054,
1600,
198,
220,
220,
220,
366,
35,
73,
14208,
1298,
366,
486,
14,
486,
14,
14315,
1,
198,
92,
628,
198,
3672,
796,
5128,
7203,
8241,
338,
33511,
466,
345,
765,
284,
804,
510,
1701,
8,
198,
198,
361,
1438,
287,
10955,
62,
67,
14188,
25,
220,
198,
220,
220,
220,
3601,
7,
69,
6,
90,
3672,
92,
82,
10955,
318,
1391,
24280,
820,
62,
67,
14188,
58,
3672,
48999,
11537,
220,
198,
17772,
25,
220,
198,
220,
220,
220,
3601,
7203,
1135,
17666,
6,
423,
23884,
6,
82,
10955,
1911,
18982,
7,
3672,
4008,
628,
198
] | 2.354037 | 161 |
import tkinter # for GUI
from PIL import Image, ImageTk # operation regarding image
import random
# toplevel widget which represents the main window of an application
root = tkinter.Tk()
root.geometry('400x400')
root.title('Data Flair Roll the Dice')
# Adding label into the frame. Here we skip a line
l0 = tkinter.Label(root, text="")
l0.pack()
# adding label with different font and formatting
l1 = tkinter.Label(root, text="Hello from Data Flair!", fg="light green",
bg="dark green",
font="Helvetica 16 bold italic")
l1.pack()
# images
dice = ['die1.png', 'die2.png', 'die3.png', 'die4.png', 'die5.png', 'die6.png']
# simulating the dice with random numbers between 0 to 6 and generating image
image1 = ImageTk.PhotoImage(Image.open(random.choice(dice)))
# construct a label widget for image
label1 = tkinter.Label(root, image=image1)
label1.image = image1
# packing a widget in the parent widget
# expand=True enables image to be centered no matter how we resize the window
label1.pack(expand=True)
# function activated by button
# adding button, and command will use rolling_dice function
button = tkinter.Button(root, text='Roll the Dice',
fg='blue', command=rolling_dice)
# pack a widget in the parent widget
button.pack(expand=True)
# call the mainloop of Tk
# keeps window open
root.mainloop()
| [
11748,
256,
74,
3849,
220,
1303,
329,
25757,
201,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
51,
74,
220,
1303,
4905,
5115,
2939,
201,
198,
11748,
4738,
201,
198,
201,
198,
2,
284,
1154,
626,
26295,
543,
6870,
262,
1388,
4324,
286,
281,
3586,
201,
198,
15763,
796,
256,
74,
3849,
13,
51,
74,
3419,
201,
198,
15763,
13,
469,
15748,
10786,
7029,
87,
7029,
11537,
201,
198,
15763,
13,
7839,
10786,
6601,
1610,
958,
8299,
262,
34381,
11537,
201,
198,
201,
198,
2,
18247,
6167,
656,
262,
5739,
13,
3423,
356,
14267,
257,
1627,
201,
198,
75,
15,
796,
256,
74,
3849,
13,
33986,
7,
15763,
11,
2420,
2625,
4943,
201,
198,
75,
15,
13,
8002,
3419,
201,
198,
201,
198,
2,
4375,
6167,
351,
1180,
10369,
290,
33313,
201,
198,
75,
16,
796,
256,
74,
3849,
13,
33986,
7,
15763,
11,
2420,
2625,
15496,
422,
6060,
1610,
958,
40754,
277,
70,
2625,
2971,
4077,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
275,
70,
2625,
21953,
4077,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10369,
2625,
39,
32667,
3970,
1467,
10758,
46127,
291,
4943,
201,
198,
75,
16,
13,
8002,
3419,
201,
198,
201,
198,
2,
4263,
201,
198,
67,
501,
796,
37250,
11979,
16,
13,
11134,
3256,
705,
11979,
17,
13,
11134,
3256,
705,
11979,
18,
13,
11134,
3256,
705,
11979,
19,
13,
11134,
3256,
705,
11979,
20,
13,
11134,
3256,
705,
11979,
21,
13,
11134,
20520,
201,
198,
2,
985,
8306,
262,
17963,
351,
4738,
3146,
1022,
657,
284,
718,
290,
15453,
2939,
201,
198,
9060,
16,
796,
7412,
51,
74,
13,
6191,
5159,
7,
5159,
13,
9654,
7,
25120,
13,
25541,
7,
67,
501,
22305,
201,
198,
201,
198,
2,
5678,
257,
6167,
26295,
329,
2939,
201,
198,
18242,
16,
796,
256,
74,
3849,
13,
33986,
7,
15763,
11,
2939,
28,
9060,
16,
8,
201,
198,
18242,
16,
13,
9060,
796,
2939,
16,
201,
198,
201,
198,
2,
24157,
257,
26295,
287,
262,
2560,
26295,
201,
198,
2,
4292,
28,
17821,
13536,
2939,
284,
307,
19254,
645,
2300,
703,
356,
47558,
262,
4324,
201,
198,
18242,
16,
13,
8002,
7,
11201,
392,
28,
17821,
8,
201,
198,
201,
198,
2,
2163,
13906,
416,
4936,
201,
198,
201,
198,
201,
198,
201,
198,
2,
4375,
4936,
11,
290,
3141,
481,
779,
10708,
62,
67,
501,
2163,
201,
198,
16539,
796,
256,
74,
3849,
13,
21864,
7,
15763,
11,
2420,
11639,
26869,
262,
34381,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
70,
11639,
17585,
3256,
3141,
28,
18886,
62,
67,
501,
8,
201,
198,
201,
198,
2,
2353,
257,
26295,
287,
262,
2560,
26295,
201,
198,
16539,
13,
8002,
7,
11201,
392,
28,
17821,
8,
201,
198,
201,
198,
2,
869,
262,
1388,
26268,
286,
309,
74,
201,
198,
2,
7622,
4324,
1280,
201,
198,
15763,
13,
12417,
26268,
3419,
201,
198
] | 2.724665 | 523 |
#! /usr/bin/env python2.7
'''
__init__ file for fetch_gitignore.
'''
__author__ = "Srinidhi Kaushik"
__license__ = "MIT"
__version__ = "0.0.1"
__email__ = "[email protected]"
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
198,
7061,
6,
198,
834,
15003,
834,
2393,
329,
21207,
62,
18300,
46430,
13,
198,
7061,
6,
198,
198,
834,
9800,
834,
796,
366,
50,
12769,
312,
5303,
11611,
1530,
1134,
1,
198,
198,
834,
43085,
834,
796,
366,
36393,
1,
198,
834,
9641,
834,
796,
366,
15,
13,
15,
13,
16,
1,
198,
834,
12888,
834,
796,
366,
12976,
88,
38385,
31,
18417,
13,
77,
382,
2145,
13,
12567,
13,
785,
1,
198
] | 2.264368 | 87 |
"""
06.
Escreva um método show() para escrever toda a lista. Exemplo: lista = ListaOrdenada();
lista.append(3); lista.append(2); lista.show() imprime: [2,3]
"""
#Implementação da Classe Noh
#Lista não ordenada:
if __name__ == '__main__':
minha_lista = ListaOrdenada() #exemplo de uso
print(minha_lista.isEmpty())
minha_lista.append(8)
minha_lista.append(2)
minha_lista.append(9)
print(minha_lista.isEmpty())
print("Size: ", minha_lista.size())
print(minha_lista.show())
| [
37811,
198,
3312,
13,
198,
47051,
260,
6862,
23781,
285,
25125,
24313,
905,
3419,
31215,
3671,
260,
332,
284,
6814,
257,
1351,
64,
13,
1475,
18856,
78,
25,
1351,
64,
796,
7343,
64,
35422,
268,
4763,
9783,
198,
4868,
64,
13,
33295,
7,
18,
1776,
1351,
64,
13,
33295,
7,
17,
1776,
1351,
64,
13,
12860,
3419,
848,
81,
524,
25,
685,
17,
11,
18,
60,
198,
198,
37811,
198,
2,
3546,
26908,
64,
16175,
28749,
12379,
1012,
21612,
399,
1219,
198,
2,
8053,
64,
299,
28749,
2760,
268,
4763,
25,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
949,
3099,
62,
4868,
64,
796,
7343,
64,
35422,
268,
4763,
3419,
1303,
1069,
18856,
78,
390,
514,
78,
198,
220,
3601,
7,
1084,
3099,
62,
4868,
64,
13,
271,
40613,
28955,
628,
220,
949,
3099,
62,
4868,
64,
13,
33295,
7,
23,
8,
198,
220,
949,
3099,
62,
4868,
64,
13,
33295,
7,
17,
8,
198,
220,
949,
3099,
62,
4868,
64,
13,
33295,
7,
24,
8,
198,
220,
3601,
7,
1084,
3099,
62,
4868,
64,
13,
271,
40613,
28955,
198,
220,
3601,
7203,
10699,
25,
33172,
949,
3099,
62,
4868,
64,
13,
7857,
28955,
198,
220,
3601,
7,
1084,
3099,
62,
4868,
64,
13,
12860,
28955,
628
] | 2.28972 | 214 |
# -*- coding: utf-8 -*-
# Author : Jin Kim
# e-mail : [email protected]
# Powered by Seculayer © 2020 Solution Development 2 Team, R&D Center.
import os
from hps.common.Constants import Constants
from hps.utils.Singleton import Singleton
from hps.utils.MPLogger import MPLogger
from hps.utils.CommonUtils import CommonUtils
# class : Common
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6434,
1058,
17297,
6502,
198,
2,
304,
12,
4529,
1058,
474,
676,
320,
31,
2363,
377,
2794,
13,
785,
198,
2,
45090,
416,
1882,
377,
2794,
10673,
12131,
28186,
7712,
362,
4816,
11,
371,
5,
35,
3337,
13,
220,
198,
198,
11748,
28686,
198,
198,
6738,
289,
862,
13,
11321,
13,
34184,
1187,
1330,
4757,
1187,
198,
6738,
289,
862,
13,
26791,
13,
29974,
10565,
1330,
5573,
10565,
198,
6738,
289,
862,
13,
26791,
13,
44,
6489,
519,
1362,
1330,
4904,
11187,
1362,
198,
6738,
289,
862,
13,
26791,
13,
17227,
18274,
4487,
1330,
8070,
18274,
4487,
198,
198,
2,
1398,
1058,
8070,
198
] | 2.92437 | 119 |
import functools
import hmac
from typing import Any
from typing import Callable
from typing import Optional
from flask import abort
from flask import current_app
from flask import request
from werkzeug.exceptions import ServiceUnavailable
def authorize_source() -> Callable:
"""Detect the source from the headers and authenticate by the config
secret."""
return decorator
def authorize_gitlab() -> Optional[str]:
"""
Check gitlab header token is correct and return the source name.
The token is raw because gitlab only allows for ssl endpoints.
"""
source = "gitlab"
if get_secret(source) == request.headers["X-Gitlab-Token"]:
return source
return None
def authorize_github() -> Optional[str]:
"""
Verify github signature matches our secret with the payload and return the
source name.
Github uses HMAC signature verification, encode the payload with the
secret
"""
source = "github"
secret = get_secret(source)
signature = request.headers["X-Hub-Signature"]
signature_prefix = "sha1="
if not signature.startswith(signature_prefix):
return None
hmac_ = hmac.new(secret.encode("UTF-8"), msg=request.data, digestmod="sha1")
calculated_sig = signature_prefix + hmac_.hexdigest()
if not hmac.compare_digest(signature, calculated_sig):
return None
return source
def get_secret(source: str) -> str:
"""Get the secret key from config by the source or raise an exception."""
secret = current_app.config.get(f"{source.upper()}_SECRET", None)
if secret is None:
raise ServiceUnavailable(f"Missing {source} secret")
return secret
__PARSERS__ = {
"X-Gitlab-Token": authorize_gitlab,
"X-Hub-Signature": authorize_github,
}
| [
11748,
1257,
310,
10141,
198,
11748,
289,
20285,
198,
6738,
19720,
1330,
4377,
198,
6738,
19720,
1330,
4889,
540,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
42903,
1330,
15614,
198,
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
42903,
1330,
2581,
198,
6738,
266,
9587,
2736,
1018,
13,
1069,
11755,
1330,
4809,
3118,
15182,
628,
198,
4299,
29145,
62,
10459,
3419,
4613,
4889,
540,
25,
198,
220,
220,
220,
37227,
47504,
262,
2723,
422,
262,
24697,
290,
8323,
5344,
416,
262,
4566,
198,
220,
220,
220,
3200,
526,
15931,
628,
220,
220,
220,
1441,
11705,
1352,
628,
198,
4299,
29145,
62,
18300,
23912,
3419,
4613,
32233,
58,
2536,
5974,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6822,
17606,
23912,
13639,
11241,
318,
3376,
290,
1441,
262,
2723,
1438,
13,
628,
220,
220,
220,
383,
11241,
318,
8246,
780,
17606,
23912,
691,
3578,
329,
264,
6649,
886,
13033,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2723,
796,
366,
18300,
23912,
1,
198,
220,
220,
220,
611,
651,
62,
21078,
7,
10459,
8,
6624,
2581,
13,
50145,
14692,
55,
12,
38,
270,
23912,
12,
30642,
1,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2723,
628,
220,
220,
220,
1441,
6045,
628,
198,
4299,
29145,
62,
12567,
3419,
4613,
32233,
58,
2536,
5974,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
49899,
33084,
9877,
7466,
674,
3200,
351,
262,
21437,
290,
1441,
262,
198,
220,
220,
220,
2723,
1438,
13,
628,
220,
220,
220,
38994,
3544,
25904,
2246,
9877,
19637,
11,
37773,
262,
21437,
351,
262,
198,
220,
220,
220,
3200,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
2723,
796,
366,
12567,
1,
198,
220,
220,
220,
3200,
796,
651,
62,
21078,
7,
10459,
8,
198,
220,
220,
220,
9877,
796,
2581,
13,
50145,
14692,
55,
12,
16066,
12,
11712,
1300,
8973,
628,
220,
220,
220,
9877,
62,
40290,
796,
366,
26270,
16,
2625,
198,
220,
220,
220,
611,
407,
9877,
13,
9688,
2032,
342,
7,
12683,
1300,
62,
40290,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
289,
20285,
62,
796,
289,
20285,
13,
3605,
7,
21078,
13,
268,
8189,
7203,
48504,
12,
23,
12340,
31456,
28,
25927,
13,
7890,
11,
16274,
4666,
2625,
26270,
16,
4943,
198,
220,
220,
220,
10488,
62,
82,
328,
796,
9877,
62,
40290,
1343,
289,
20285,
44807,
33095,
12894,
395,
3419,
198,
220,
220,
220,
611,
407,
289,
20285,
13,
5589,
533,
62,
12894,
395,
7,
12683,
1300,
11,
10488,
62,
82,
328,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
1441,
2723,
628,
198,
4299,
651,
62,
21078,
7,
10459,
25,
965,
8,
4613,
965,
25,
198,
220,
220,
220,
37227,
3855,
262,
3200,
1994,
422,
4566,
416,
262,
2723,
393,
5298,
281,
6631,
526,
15931,
198,
220,
220,
220,
3200,
796,
1459,
62,
1324,
13,
11250,
13,
1136,
7,
69,
1,
90,
10459,
13,
45828,
3419,
92,
62,
23683,
26087,
1600,
6045,
8,
628,
220,
220,
220,
611,
3200,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
4809,
3118,
15182,
7,
69,
1,
43730,
1391,
10459,
92,
3200,
4943,
628,
220,
220,
220,
1441,
3200,
628,
198,
834,
27082,
50,
4877,
834,
796,
1391,
198,
220,
220,
220,
366,
55,
12,
38,
270,
23912,
12,
30642,
1298,
29145,
62,
18300,
23912,
11,
198,
220,
220,
220,
366,
55,
12,
16066,
12,
11712,
1300,
1298,
29145,
62,
12567,
11,
198,
92,
198
] | 3.044293 | 587 |
import numpy as np
from enum import Enum
from pysvso.lib.maths.rotation import Euler, Quaternion, rotation_matrix, dRx, dRy, dRz
from scipy.optimize import fmin_bfgs
from scipy.optimize import fmin
from scipy.optimize import minimize
from scipy.optimize import approx_fprime
# when point cloud is parse
from sklearn.neighbors import NearestNeighbors
# see FLANN manual https://www.cs.ubc.ca/research/flann/uploads/FLANN/flann_manual-1.8.4.pdf
# remember to run 2to3 upon root of the source when you complete downloading the codes!
from pyflann import *
import numpy as np
# used to build computation graph with
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import tensorflow_graphics as tfg
rotation_matrix_3d = tfg.geometry.transformation.rotation_matrix_3d
# Lie Algebra ICP solver
# The algorithm was first implemented by Lei ([email protected]) in C++ in later of 2019 and reimplemented in python in 2020
# you should not use this algorithm without consent of Lei in any form and purposes.
# ALL RIGHTS RESERVED
# Points are very sparse, we don't have to do random sampling | [
11748,
299,
32152,
355,
45941,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
279,
893,
85,
568,
13,
8019,
13,
11018,
82,
13,
10599,
341,
1330,
412,
18173,
11,
2264,
9205,
295,
11,
13179,
62,
6759,
8609,
11,
288,
49,
87,
11,
288,
46987,
11,
288,
49,
89,
198,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
277,
1084,
62,
19881,
14542,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
277,
1084,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
17775,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
5561,
62,
69,
35505,
198,
2,
618,
966,
6279,
318,
21136,
198,
6738,
1341,
35720,
13,
710,
394,
32289,
1330,
3169,
12423,
46445,
32289,
198,
198,
2,
766,
9977,
22846,
10107,
3740,
1378,
2503,
13,
6359,
13,
549,
66,
13,
6888,
14,
34033,
14,
2704,
1236,
14,
39920,
14,
3697,
22846,
14,
2704,
1236,
62,
805,
723,
12,
16,
13,
23,
13,
19,
13,
12315,
198,
2,
3505,
284,
1057,
362,
1462,
18,
2402,
6808,
286,
262,
2723,
618,
345,
1844,
22023,
262,
12416,
0,
198,
6738,
12972,
2704,
1236,
1330,
1635,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
973,
284,
1382,
29964,
4823,
351,
198,
11748,
11192,
273,
11125,
13,
5589,
265,
13,
85,
16,
355,
48700,
198,
27110,
13,
40223,
62,
85,
17,
62,
46571,
3419,
198,
11748,
11192,
273,
11125,
62,
70,
11549,
355,
256,
40616,
198,
198,
10599,
341,
62,
6759,
8609,
62,
18,
67,
796,
256,
40616,
13,
469,
15748,
13,
7645,
1161,
13,
10599,
341,
62,
6759,
8609,
62,
18,
67,
628,
198,
2,
12060,
978,
29230,
314,
8697,
1540,
332,
628,
198,
198,
2,
383,
11862,
373,
717,
9177,
416,
48579,
357,
88,
32994,
13,
21768,
31,
14816,
13,
785,
8,
287,
327,
4880,
287,
1568,
286,
13130,
290,
21123,
1154,
12061,
287,
21015,
287,
12131,
198,
2,
345,
815,
407,
779,
428,
11862,
1231,
8281,
286,
48579,
287,
597,
1296,
290,
4959,
13,
198,
2,
11096,
371,
34874,
15731,
1137,
53,
1961,
198,
198,
2,
220,
11045,
389,
845,
29877,
11,
356,
836,
470,
423,
284,
466,
4738,
19232
] | 3.127841 | 352 |
import tensorflow as tf
import model
import data
# 訓練データ作成担当
g = data.Data()
# GPUをすべて使わないオプション
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
tf.keras.backend.set_session(sess)
# モデルを作成
model = model.make(tflite=False)
# 最適化を定義
optimizer = tf.keras.optimizers.Adam(lr=0.001)
model.compile(optimizer=optimizer,loss="categorical_crossentropy",
metrics=["categorical_accuracy"])
# コールバック
cb = Callback()
# 途中から学習する場合
initial_epoch = 0
if initial_epoch >= 1:
model.load_weights("weight.hdf5")
# 学習する
model.fit_generator(g.generator(),
validation_data=g.generator_test(),
validation_steps=g.test_steps(),
callbacks = [cb],
steps_per_epoch=data.TRAIN_SIZE/data.BATCH_SIZE,epochs=50,
initial_epoch=initial_epoch)
| [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
2746,
198,
11748,
1366,
198,
198,
2,
5525,
101,
241,
45784,
112,
21959,
6312,
23376,
43291,
22755,
238,
162,
233,
227,
37605,
241,
198,
70,
796,
1366,
13,
6601,
3419,
198,
2,
11362,
31758,
33623,
2515,
117,
28134,
45635,
1792,
237,
26945,
18566,
20513,
30965,
15661,
1209,
100,
6527,
198,
11250,
796,
48700,
13,
16934,
2964,
1462,
3419,
198,
11250,
13,
46999,
62,
25811,
13,
12154,
62,
27922,
796,
6407,
198,
82,
408,
796,
48700,
13,
36044,
7,
11250,
28,
11250,
8,
198,
27110,
13,
6122,
292,
13,
1891,
437,
13,
2617,
62,
29891,
7,
82,
408,
8,
198,
2,
14524,
95,
21959,
9202,
31758,
43291,
22755,
238,
198,
19849,
796,
2746,
13,
15883,
7,
83,
2704,
578,
28,
25101,
8,
198,
2,
42164,
222,
34402,
102,
44293,
244,
31758,
22522,
248,
163,
122,
102,
198,
40085,
7509,
796,
48700,
13,
6122,
292,
13,
40085,
11341,
13,
23159,
7,
14050,
28,
15,
13,
8298,
8,
198,
19849,
13,
5589,
576,
7,
40085,
7509,
28,
40085,
7509,
11,
22462,
2625,
66,
2397,
12409,
62,
19692,
298,
28338,
1600,
198,
220,
220,
220,
20731,
28,
14692,
66,
2397,
12409,
62,
4134,
23843,
8973,
8,
198,
2,
17433,
111,
43353,
29659,
35702,
198,
21101,
796,
4889,
1891,
3419,
198,
2,
16268,
222,
242,
40792,
27370,
36853,
27764,
99,
163,
123,
240,
33623,
25748,
161,
254,
112,
28938,
230,
198,
36733,
62,
538,
5374,
796,
657,
198,
361,
4238,
62,
538,
5374,
18189,
352,
25,
198,
220,
220,
220,
2746,
13,
2220,
62,
43775,
7203,
6551,
13,
71,
7568,
20,
4943,
198,
2,
10263,
255,
99,
163,
123,
240,
33623,
25748,
198,
19849,
13,
11147,
62,
8612,
1352,
7,
70,
13,
8612,
1352,
22784,
198,
220,
220,
220,
21201,
62,
7890,
28,
70,
13,
8612,
1352,
62,
9288,
22784,
198,
220,
220,
220,
21201,
62,
20214,
28,
70,
13,
9288,
62,
20214,
22784,
198,
220,
220,
220,
869,
10146,
796,
685,
21101,
4357,
198,
220,
220,
220,
4831,
62,
525,
62,
538,
5374,
28,
7890,
13,
51,
3861,
1268,
62,
33489,
14,
7890,
13,
33,
11417,
62,
33489,
11,
538,
5374,
82,
28,
1120,
11,
198,
220,
220,
220,
4238,
62,
538,
5374,
28,
36733,
62,
538,
5374,
8,
198
] | 2.104278 | 374 |
import uuid
import hashlib
import bcrypt
import json
from string import Template
from datetime import datetime
from fastapi import HTTPException
from fastapi.encoders import jsonable_encoder
from pydantic import IPvAnyAddress
from pymongo import MongoClient
from bson import json_util
from core.models import MongoModel
from account.models import JWTModel, UserModel
from core import DagMail, DagMailConfig
from account.jwt import JWT
from core.utils.string import random_string
from config.conf import (
MONGO_CS,
ACTIVATION_KEY_LENGTH,
EMAIL_TEMPLATE_ACTIVATION,
EMAIL_TEMPLATE_BASE,
MAIL_CONFIG,
)
| [
11748,
334,
27112,
198,
11748,
12234,
8019,
198,
11748,
275,
29609,
198,
11748,
33918,
198,
198,
6738,
4731,
1330,
37350,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3049,
15042,
1330,
14626,
16922,
198,
6738,
3049,
15042,
13,
12685,
375,
364,
1330,
33918,
540,
62,
12685,
12342,
198,
6738,
279,
5173,
5109,
1330,
25961,
7149,
20231,
198,
6738,
279,
4948,
25162,
1330,
42591,
11792,
198,
6738,
275,
1559,
1330,
33918,
62,
22602,
198,
198,
6738,
4755,
13,
27530,
1330,
42591,
17633,
198,
6738,
1848,
13,
27530,
1330,
449,
39386,
17633,
11,
11787,
17633,
198,
6738,
4755,
1330,
32167,
25804,
11,
32167,
25804,
16934,
198,
6738,
1848,
13,
73,
46569,
1330,
449,
39386,
198,
6738,
4755,
13,
26791,
13,
8841,
1330,
4738,
62,
8841,
198,
6738,
4566,
13,
10414,
1330,
357,
198,
220,
220,
220,
25000,
11230,
62,
7902,
11,
198,
220,
220,
220,
11741,
3824,
6234,
62,
20373,
62,
43,
49494,
11,
198,
220,
220,
220,
412,
5673,
4146,
62,
51,
3620,
6489,
6158,
62,
10659,
3824,
6234,
11,
198,
220,
220,
220,
412,
5673,
4146,
62,
51,
3620,
6489,
6158,
62,
33,
11159,
11,
198,
220,
220,
220,
8779,
4146,
62,
10943,
16254,
11,
198,
8,
628
] | 3.135678 | 199 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © Autogator Project Contributors
# Licensed under the terms of the MIT License
# (see autogator/__init__.py for details)
"""
Tool that converts all .ui and .qrc files in the autogator.resources folder to
python files in autogator.compiled.
Usage:
$ python3 ui2py.py
"""
import sys
import os
import subprocess
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir))
path = 'autogator'
res = os.path.join(path, 'resources')
dest = os.path.join(path, 'compiled')
for root, directories, filenames in os.walk(res):
for filename in filenames:
item = os.path.join(root, filename)
if item.endswith('.ui'):
name, _ = os.path.splitext(filename)
rename = name + '_ui' + '.py'
path2dest = os.path.join(dest, rename)
print(*['pyside2-uic', '--from-imports', item, '-o', path2dest])
subprocess.call(['pyside2-uic', '--from-imports', item, '-o', path2dest])
if item.endswith('.qrc'):
name, _ = os.path.splitext(filename)
rename = name + '_rc' + '.py'
path2dest = os.path.join(dest, rename)
args = ['pyside2-rcc', item, '-o', path2dest]
print(*args)
subprocess.call(args)
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
10673,
5231,
519,
1352,
4935,
25767,
669,
198,
2,
49962,
739,
262,
2846,
286,
262,
17168,
13789,
198,
2,
357,
3826,
1960,
519,
1352,
14,
834,
15003,
834,
13,
9078,
329,
3307,
8,
198,
198,
37811,
198,
25391,
326,
26161,
477,
764,
9019,
290,
764,
80,
6015,
3696,
287,
262,
1960,
519,
1352,
13,
37540,
9483,
284,
198,
29412,
3696,
287,
1960,
519,
1352,
13,
5589,
3902,
13,
198,
198,
28350,
25,
198,
3,
21015,
18,
334,
72,
17,
9078,
13,
9078,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
418,
13,
354,
15908,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
36911,
28686,
13,
26037,
343,
4008,
198,
198,
6978,
796,
705,
2306,
519,
1352,
6,
198,
411,
796,
28686,
13,
6978,
13,
22179,
7,
6978,
11,
705,
37540,
11537,
198,
16520,
796,
28686,
13,
6978,
13,
22179,
7,
6978,
11,
705,
5589,
3902,
11537,
198,
198,
1640,
6808,
11,
29196,
11,
1226,
268,
1047,
287,
28686,
13,
11152,
7,
411,
2599,
198,
220,
220,
220,
329,
29472,
287,
1226,
268,
1047,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2378,
796,
28686,
13,
6978,
13,
22179,
7,
15763,
11,
29472,
8,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2378,
13,
437,
2032,
342,
7,
4458,
9019,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
11,
4808,
796,
28686,
13,
6978,
13,
22018,
578,
742,
7,
34345,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36265,
796,
1438,
1343,
705,
62,
9019,
6,
1343,
45302,
9078,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
17,
16520,
796,
28686,
13,
6978,
13,
22179,
7,
16520,
11,
36265,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
46491,
17816,
79,
893,
485,
17,
12,
84,
291,
3256,
705,
438,
6738,
12,
320,
3742,
3256,
2378,
11,
705,
12,
78,
3256,
3108,
17,
16520,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
14681,
13,
13345,
7,
17816,
79,
893,
485,
17,
12,
84,
291,
3256,
705,
438,
6738,
12,
320,
3742,
3256,
2378,
11,
705,
12,
78,
3256,
3108,
17,
16520,
12962,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2378,
13,
437,
2032,
342,
7,
4458,
80,
6015,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
11,
4808,
796,
28686,
13,
6978,
13,
22018,
578,
742,
7,
34345,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36265,
796,
1438,
1343,
705,
62,
6015,
6,
1343,
45302,
9078,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
17,
16520,
796,
28686,
13,
6978,
13,
22179,
7,
16520,
11,
36265,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26498,
796,
37250,
79,
893,
485,
17,
12,
81,
535,
3256,
2378,
11,
705,
12,
78,
3256,
3108,
17,
16520,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
46491,
22046,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
850,
14681,
13,
13345,
7,
22046,
8,
198
] | 2.21562 | 589 |
from django.contrib.auth import get_user_model
from django.test import TestCase
from annotate import models
class TestPages(TestCase):
"""Test that the proper templates are used to render pages."""
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
24708,
378,
1330,
4981,
628,
198,
4871,
6208,
47798,
7,
14402,
20448,
2599,
198,
220,
220,
220,
37227,
14402,
326,
262,
1774,
24019,
389,
973,
284,
8543,
5468,
526,
15931,
198
] | 3.642857 | 56 |
# -*-coding:utf-8-*-
import numpy as np
from PIL import Image
from scipy import misc
| [
2,
532,
9,
12,
66,
7656,
25,
40477,
12,
23,
12,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
629,
541,
88,
1330,
12747,
628,
198
] | 2.558824 | 34 |
from datetime import datetime
import torch
import torchvision
def load_stored_resnet_model(categories, file_path):
'''Adapted from NVIDIA DLI Course Code: Getting Started with AI on Jetson Nano'''
print("Loading stored classification model...")
# If we're on the Jetson Nano use cuda, otherwise cpu:
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = torchvision.models.resnet18(pretrained=True)
model.fc = torch.nn.Linear(512, len(categories))
model = model.to(device)
# model.load_state_dict(torch.load(file_path))
model.load_state_dict(torch.load(file_path, map_location=torch.device('cpu')))
model.eval()
print("Model ready!")
return model
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
28034,
198,
11748,
28034,
10178,
198,
220,
220,
220,
220,
198,
4299,
3440,
62,
301,
1850,
62,
411,
3262,
62,
19849,
7,
66,
26129,
11,
2393,
62,
6978,
2599,
198,
220,
220,
220,
705,
7061,
48003,
276,
422,
15127,
23641,
40,
20537,
6127,
25,
18067,
31026,
351,
9552,
319,
14728,
261,
33504,
7061,
6,
198,
220,
220,
220,
3601,
7203,
19031,
8574,
17923,
2746,
9313,
8,
198,
220,
220,
220,
1303,
1002,
356,
821,
319,
262,
14728,
261,
33504,
779,
269,
15339,
11,
4306,
42804,
25,
198,
220,
220,
220,
3335,
796,
28034,
13,
25202,
7203,
66,
15339,
25,
15,
1,
611,
28034,
13,
66,
15339,
13,
271,
62,
15182,
3419,
2073,
366,
36166,
4943,
198,
220,
220,
220,
2746,
796,
28034,
10178,
13,
27530,
13,
411,
3262,
1507,
7,
5310,
13363,
28,
17821,
8,
198,
220,
220,
220,
2746,
13,
16072,
796,
28034,
13,
20471,
13,
14993,
451,
7,
25836,
11,
18896,
7,
66,
26129,
4008,
198,
220,
220,
220,
2746,
796,
2746,
13,
1462,
7,
25202,
8,
198,
220,
220,
220,
1303,
2746,
13,
2220,
62,
5219,
62,
11600,
7,
13165,
354,
13,
2220,
7,
7753,
62,
6978,
4008,
198,
220,
220,
220,
2746,
13,
2220,
62,
5219,
62,
11600,
7,
13165,
354,
13,
2220,
7,
7753,
62,
6978,
11,
3975,
62,
24886,
28,
13165,
354,
13,
25202,
10786,
36166,
6,
22305,
198,
220,
220,
220,
2746,
13,
18206,
3419,
198,
220,
220,
220,
3601,
7203,
17633,
3492,
2474,
8,
198,
220,
220,
220,
1441,
2746,
198,
220,
220,
220,
220
] | 2.796935 | 261 |
# Generated by Django 2.1.1 on 2018-10-03 10:48
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
16,
319,
2864,
12,
940,
12,
3070,
838,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import zipfile
# #压缩
# file=zipfile.ZipFile('text.zip','w')#text.zip创建压缩包文件名 w读
# file.write("class.py")#压缩的文件名
# file.close()
#解压缩
# file=zipfile.ZipFile('text.zip','r')#写
# file.extractall(path="../")#写到哪个路径下 创建到卓面 默认是在跟慕入下面
#暴力破解加密的压缩包
fileobj=open("pwd.txt","r")#新建一个txt文件
for item in fileobj.readlines():
print(item.strip())#strip()去空格
newpwd=item.strip()
try:
file=zipfile.ZipFile("class2.zip","r")#解压缩包
file.extractall(pwd=newpwd.encode("utf-8"))
except:
print("errot")
| [
11748,
19974,
7753,
201,
198,
2,
1303,
161,
23329,
163,
120,
102,
201,
198,
2,
2393,
28,
13344,
7753,
13,
41729,
8979,
10786,
5239,
13,
13344,
41707,
86,
11537,
2,
5239,
13,
13344,
26344,
249,
161,
119,
118,
161,
23329,
163,
120,
102,
44293,
227,
23877,
229,
20015,
114,
28938,
235,
266,
46237,
119,
201,
198,
2,
2393,
13,
13564,
7203,
4871,
13,
9078,
4943,
2,
161,
23329,
163,
120,
102,
21410,
23877,
229,
20015,
114,
28938,
235,
201,
198,
2,
2393,
13,
19836,
3419,
201,
198,
201,
198,
2,
164,
100,
96,
161,
23329,
163,
120,
102,
201,
198,
2,
2393,
28,
13344,
7753,
13,
41729,
8979,
10786,
5239,
13,
13344,
41707,
81,
11537,
2,
37863,
247,
201,
198,
2,
2393,
13,
2302,
974,
439,
7,
6978,
2625,
40720,
4943,
2,
37863,
247,
26344,
108,
161,
241,
103,
10310,
103,
164,
115,
107,
36181,
226,
10310,
233,
220,
10263,
230,
249,
161,
119,
118,
26344,
108,
39355,
241,
165,
251,
95,
16268,
119,
246,
164,
106,
97,
42468,
28839,
101,
164,
115,
253,
162,
227,
243,
17739,
98,
10310,
233,
165,
251,
95,
201,
198,
201,
198,
2,
162,
248,
112,
27950,
249,
163,
254,
112,
164,
100,
96,
27950,
254,
43380,
228,
21410,
161,
23329,
163,
120,
102,
44293,
227,
201,
198,
7753,
26801,
28,
9654,
7203,
79,
16993,
13,
14116,
2430,
81,
4943,
2,
23877,
108,
161,
119,
118,
31660,
10310,
103,
14116,
23877,
229,
20015,
114,
201,
198,
1640,
2378,
287,
2393,
26801,
13,
961,
6615,
33529,
201,
198,
220,
220,
220,
3601,
7,
9186,
13,
36311,
28955,
2,
36311,
3419,
43889,
119,
163,
102,
118,
43718,
120,
201,
198,
220,
220,
220,
649,
79,
16993,
28,
9186,
13,
36311,
3419,
201,
198,
220,
220,
220,
1949,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2393,
28,
13344,
7753,
13,
41729,
8979,
7203,
4871,
17,
13,
13344,
2430,
81,
4943,
2,
164,
100,
96,
161,
23329,
163,
120,
102,
44293,
227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
2393,
13,
2302,
974,
439,
7,
79,
16993,
28,
3605,
79,
16993,
13,
268,
8189,
7203,
40477,
12,
23,
48774,
201,
198,
220,
220,
220,
2845,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
263,
10599,
4943,
201,
198
] | 1.424802 | 379 |
# coding=utf-8
import numpy as np
import skimage
import skimage.morphology as morph
from . import Measurement
from ..util.cleanup import cell_aoi_and_clip
| [
2,
19617,
28,
40477,
12,
23,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1341,
9060,
198,
11748,
1341,
9060,
13,
24503,
1435,
355,
17488,
198,
198,
6738,
764,
1330,
24291,
434,
198,
6738,
11485,
22602,
13,
27773,
929,
1330,
2685,
62,
5488,
72,
62,
392,
62,
15036,
198
] | 3.14 | 50 |
from PyQt5 import QtCore, QtWidgets, QtGui
from Item import Item
from Tikzifyables.Arrowable import Arrowable
from Tikzifyables.DashPatternable import DashPatternable
from Tikzifyables.Colourable.LineColourable import LineColourable
from Tikzifyables.Decorationable import Decorationable
from Tikzifyables.CurveStrategyable import CurveStrategyable
import Constant as c
from GeometryMath import point_segment_dist_sqr
| [
6738,
9485,
48,
83,
20,
1330,
33734,
14055,
11,
33734,
54,
312,
11407,
11,
33734,
8205,
72,
198,
198,
6738,
9097,
1330,
9097,
198,
6738,
46338,
89,
1958,
2977,
13,
3163,
808,
540,
1330,
19408,
540,
198,
6738,
46338,
89,
1958,
2977,
13,
43041,
47546,
540,
1330,
16189,
47546,
540,
198,
6738,
46338,
89,
1958,
2977,
13,
5216,
454,
540,
13,
13949,
5216,
454,
540,
1330,
6910,
5216,
454,
540,
198,
6738,
46338,
89,
1958,
2977,
13,
10707,
6944,
540,
1330,
4280,
6944,
540,
198,
6738,
46338,
89,
1958,
2977,
13,
26628,
303,
13290,
4338,
540,
1330,
46300,
13290,
4338,
540,
198,
11748,
20217,
355,
269,
198,
6738,
2269,
15748,
37372,
1330,
966,
62,
325,
5154,
62,
17080,
62,
31166,
81,
628
] | 3.442623 | 122 |
"""
PROGRAM_NAME: virtnet_creator
FILE_NAME: conf.py
AUTHOR: Brendan Geoghegan
PROGRAM_DESCRIPTION: This program is a GUI application for users to build or load network topologies that
have a SDN controller at their center. The original code tied into a Xen loadout used to clone, startup, and
operate VMs, but this simplified version is only meant to visually generate network topologies and then generate
the requisite YAML files for a Faucet SDN controller.
FILE_DESCRIPTION: This file contains functions to read and write a custom config file for saving and loading
a specific network configuration. In theory this would allow users to quickly spin up the same network environment
over and over again. Right now the file type is saves as .virtnet, you can find this being called from main.py.
"""
class confIO:
'''Initiate a series of read functions going through the .virtnet file and creating instances of devices'''
'''Function to read controller information from .virtnet file and to instantiate new controller objects'''
'''Function to read switch information from .virtnet file and to instantiate new controller objects'''
'''Function to read host information from .virtnet file and to instantiate new controller objects'''
'''read in all the in/out of band connections, controller relations, and vlans to create links'''
'''Initiate a series of write functions going through the list of devices and pulling out info'''
'''Function to write controller information to a .virtnet file'''
'''Function to write switch information and any attached hosts information to a .virtnet file'''
'''Function to capture all the links (In/Out band) from each switch to write to .virtnet file'''
'''Function to capture the VLAN data from a controller and add to the end of the file''' | [
37811,
198,
4805,
7730,
24115,
62,
20608,
25,
4118,
3262,
62,
45382,
198,
25664,
62,
20608,
25,
1013,
13,
9078,
198,
32,
24318,
1581,
25,
26134,
2269,
519,
258,
1030,
198,
4805,
7730,
24115,
62,
30910,
40165,
25,
220,
220,
220,
770,
1430,
318,
257,
25757,
3586,
329,
2985,
284,
1382,
393,
3440,
3127,
1353,
5823,
326,
198,
14150,
257,
9834,
45,
10444,
379,
511,
3641,
13,
220,
383,
2656,
2438,
8165,
656,
257,
21173,
3440,
448,
973,
284,
17271,
11,
13693,
11,
290,
198,
3575,
378,
569,
10128,
11,
475,
428,
27009,
2196,
318,
691,
4001,
284,
22632,
7716,
3127,
1353,
5823,
290,
788,
7716,
198,
1169,
37088,
575,
2390,
43,
3696,
329,
257,
376,
14272,
316,
9834,
45,
10444,
13,
198,
25664,
62,
30910,
40165,
25,
770,
2393,
4909,
5499,
284,
1100,
290,
3551,
257,
2183,
4566,
2393,
329,
8914,
290,
11046,
198,
64,
2176,
3127,
8398,
13,
220,
554,
4583,
428,
561,
1249,
2985,
284,
2952,
7906,
510,
262,
976,
3127,
2858,
198,
2502,
290,
625,
757,
13,
220,
6498,
783,
262,
2393,
2099,
318,
16031,
355,
764,
48940,
3262,
11,
345,
460,
1064,
428,
852,
1444,
422,
1388,
13,
9078,
13,
198,
37811,
628,
198,
4871,
1013,
9399,
25,
628,
220,
220,
220,
705,
7061,
818,
8846,
378,
257,
2168,
286,
1100,
5499,
1016,
832,
262,
764,
48940,
3262,
2393,
290,
4441,
10245,
286,
4410,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
1100,
10444,
1321,
422,
764,
48940,
3262,
2393,
290,
284,
9113,
9386,
649,
10444,
5563,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
1100,
5078,
1321,
422,
764,
48940,
3262,
2393,
290,
284,
9113,
9386,
649,
10444,
5563,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
1100,
2583,
1321,
422,
764,
48940,
3262,
2393,
290,
284,
9113,
9386,
649,
10444,
5563,
7061,
6,
628,
220,
220,
220,
705,
7061,
961,
287,
477,
262,
287,
14,
448,
286,
4097,
8787,
11,
10444,
2316,
11,
290,
410,
75,
504,
284,
2251,
6117,
7061,
6,
628,
220,
220,
220,
705,
7061,
818,
8846,
378,
257,
2168,
286,
3551,
5499,
1016,
832,
262,
1351,
286,
4410,
290,
10427,
503,
7508,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
3551,
10444,
1321,
284,
257,
764,
48940,
3262,
2393,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
3551,
5078,
1321,
290,
597,
7223,
11453,
1321,
284,
257,
764,
48940,
3262,
2393,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
8006,
477,
262,
6117,
357,
818,
14,
7975,
4097,
8,
422,
1123,
5078,
284,
3551,
284,
764,
48940,
3262,
2393,
7061,
6,
628,
220,
220,
220,
705,
7061,
22203,
284,
8006,
262,
569,
25697,
1366,
422,
257,
10444,
290,
751,
284,
262,
886,
286,
262,
2393,
7061,
6
] | 3.991304 | 460 |
from django.contrib import admin
from .models import UserProfile
# Register your models here.
admin.site.register(UserProfile, UserProfileAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
11787,
37046,
198,
2,
17296,
534,
4981,
994,
13,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
12982,
37046,
11,
11787,
37046,
46787,
8,
198
] | 3.794872 | 39 |
import cv2
import threading
import tensorflow as tf
import numpy as np
import time
import capturer
from utils.circularBuffer import CircularBuffer
labels = ['Left Turn', 'No Turn', 'Right Turn']
model_path = "./turn_classification/turn_classification_model_final_v1.h5"
readings_buffer_size = 20
image_preprocessing_dimens = (100, 100)
detection_threshold = 0.5
| [
11748,
269,
85,
17,
198,
11748,
4704,
278,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
8006,
81,
198,
6738,
3384,
4487,
13,
21170,
934,
28632,
1330,
7672,
934,
28632,
198,
198,
23912,
1424,
796,
37250,
18819,
6756,
3256,
705,
2949,
6756,
3256,
705,
11028,
6756,
20520,
198,
19849,
62,
6978,
796,
366,
19571,
15344,
62,
4871,
2649,
14,
15344,
62,
4871,
2649,
62,
19849,
62,
20311,
62,
85,
16,
13,
71,
20,
1,
198,
961,
654,
62,
22252,
62,
7857,
796,
1160,
198,
9060,
62,
3866,
36948,
62,
67,
12117,
796,
357,
3064,
11,
1802,
8,
198,
15255,
3213,
62,
400,
10126,
796,
657,
13,
20,
628
] | 3.084746 | 118 |
# (c) Copyright 2017-2019 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from flask import abort
from flask import Blueprint
from flask import jsonify
from flask import request
from keystoneauth1 import exceptions as exc
from keystoneauth1 import session as ks_session
from keystoneclient.auth.identity import v3
from keystoneclient.v3 import client as ks_client
import logging
import os
from oslo_config import cfg
import pbr.version
import pwd
import threading
import time
from .util import ping
from . import config
from . import policy
bp = Blueprint('admin', __name__)
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
USER_AGENT = 'Installer UI'
@bp.route("/api/v2/version")
def version():
"""Returns the version of the service
.. :quickref: Admin; Returns the version of the service
**Example valid response**:
.. sourcecode:: http
HTTP/1.1 200 OK
0.0.1.dev16
"""
version_info = pbr.version.VersionInfo('ardana-service')
return version_info.version_string_with_vcs()
@bp.route("/api/v2/heartbeat")
def heartbeat():
"""Returns the epoch time
Simple API to verify that the service is up and responding. Returns
the number of seconds since 1970-01-01 00:00:00 GMT.
.. :quickref: Admin; Returns the epoch time
**Example valid response**:
.. sourcecode:: http
HTTP/1.1 200 OK
1502745650
"""
return jsonify(int(time.time()))
@bp.route("/api/v2/user")
@policy.enforce('lifecycle:get_user')
def user():
"""Returns the username the service is running under
.. :quickref: Admin; Returns the username the service is running under
**Example valid response**:
.. sourcecode:: http
HTTP/1.1 200 OK
{"username": "myusername"}
"""
user_dict = {'username': pwd.getpwuid(os.getuid()).pw_name}
return jsonify(user_dict)
@bp.route("/api/v2/restart", methods=['POST'])
@policy.enforce('lifecycle:restart')
def restart():
"""Requests the service to restart after a specified delay, in seconds
.. :quickref: Admin; Requests a service restart after a delay
**Example Request**:
.. sourcecode:: http
POST /api/v2/user HTTP/1.1
Content-Type: application/json
{
"delay": 60
}
"""
info = request.get_json() or {}
delay_secs = int(info.get('delay', 0))
t = threading.Timer(delay_secs, update_trigger_file)
t.start()
return jsonify('Success')
@bp.route("/api/v2/login", methods=['POST'])
def login():
"""Authenticates with keystone and returns a token
.. :quickref: Admin; Authenticates with keystone
**Example Request**:
.. sourcecode:: http
POST /api/v2/login HTTP/1.1
Content-Type: application/json
{
"username": "admin",
"password": "secret"
}
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/json
{
"token": "gAAAAABbEaruZDQGIH5KmKWHlDZIw7CLq",
"expires": "2018-06-01T21:22:06+00:00"
}
:status 200: successful authentication
:status 401: invalid credentials
:status 403: authentication not permitted, or user not authorized for any
projects
"""
if not config.requires_auth():
abort(403,
"authentication not permitted since service is in insecure mode")
info = request.get_json() or {}
username = info.get('username')
password = info.get('password')
user_domain_name = info.get('user_domain_name', 'Default')
token = _authenticate(CONF.keystone_authtoken.auth_url,
username,
password,
user_domain_name)
return jsonify(token)
def _authenticate(auth_url, username=None, password=None,
user_domain_name='Default'):
"""Authenticate with keystone
Creates an unscoped token using the given credentials (which validates
them), and then uses that token to get a project-scoped token.
"""
unscoped_auth = v3.Password(auth_url,
username=username,
password=password,
user_domain_name=user_domain_name,
unscoped=True)
session = ks_session.Session(user_agent=USER_AGENT,
verify=not CONF.keystone_authtoken.insecure)
try:
# Trigger keystone to verify the credentials
unscoped_auth_ref = unscoped_auth.get_access(session)
except exc.connection.ConnectFailure as e:
abort(503, str(e))
except exc.http.HttpError as e:
abort(e.http_status, e.message)
except exc.ClientException as e:
abort(401, str(e))
except Exception as e:
LOG.exception(e)
abort(500, "Unable to authenticate")
client = ks_client.Client(session=session,
auth=unscoped_auth,
user_agent=USER_AGENT)
auth_url = unscoped_auth.auth_url
projects = client.projects.list(user=unscoped_auth_ref.user_id)
# Filter out disabled projects
projects = [project for project in projects if project.enabled]
# Prioritize the admin project by putting it at the beginning of the list
for pos, project in enumerate(projects):
if project.name == 'admin':
projects.pop(pos)
projects.insert(0, project)
break
# Return the first project token that we have the admin role on, otherwise
# return the first project token we have any role on.
fallback_auth_ref = None
for project in projects:
auth = v3.Token(auth_url=auth_url,
token=unscoped_auth_ref.auth_token,
project_id=project.id,
reauthenticate=False)
try:
auth_ref = auth.get_access(session)
if 'admin' in auth_ref.role_names:
return {'token': auth_ref.auth_token,
'expires': auth_ref.expires.isoformat()}
elif not fallback_auth_ref:
fallback_auth_ref = auth_ref
except Exception as e:
pass
if fallback_auth_ref:
return {'token': fallback_auth_ref.auth_token,
'expires': fallback_auth_ref.expires.isoformat()}
# TODO(gary): Consider as a secondary fallback to return a domain-scoped
# token
abort(403, "Not authorized for any project")
@bp.route("/api/v2/is_secured")
def get_secured():
"""Returns whether authentication is required
Returns a json object indicating whether the service is configured to
enforce authentication
.. :quickref: Model; Returns whether authentication is required
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/json
{
"isSecured": false
}
:status 200: success
"""
return jsonify({'isSecured': config.requires_auth()})
@bp.route("/api/v2/connection_test", methods=['POST'])
| [
2,
357,
66,
8,
15069,
2177,
12,
23344,
311,
19108,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
6738,
42903,
1330,
15614,
198,
6738,
42903,
1330,
39932,
198,
6738,
42903,
1330,
33918,
1958,
198,
6738,
42903,
1330,
2581,
198,
6738,
1994,
6440,
18439,
16,
1330,
13269,
355,
2859,
198,
6738,
1994,
6440,
18439,
16,
1330,
6246,
355,
479,
82,
62,
29891,
198,
6738,
1994,
6440,
16366,
13,
18439,
13,
738,
414,
1330,
410,
18,
198,
6738,
1994,
6440,
16366,
13,
85,
18,
1330,
5456,
355,
479,
82,
62,
16366,
198,
11748,
18931,
198,
11748,
28686,
198,
6738,
28686,
5439,
62,
11250,
1330,
30218,
70,
198,
11748,
279,
1671,
13,
9641,
198,
11748,
279,
16993,
198,
11748,
4704,
278,
198,
11748,
640,
198,
198,
6738,
764,
22602,
1330,
29400,
198,
198,
6738,
764,
1330,
4566,
198,
6738,
764,
1330,
2450,
198,
198,
46583,
796,
39932,
10786,
28482,
3256,
11593,
3672,
834,
8,
198,
10943,
37,
796,
30218,
70,
13,
10943,
37,
198,
25294,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
29904,
62,
4760,
3525,
796,
705,
15798,
263,
12454,
6,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
9641,
4943,
198,
4299,
2196,
33529,
198,
220,
220,
220,
37227,
35561,
262,
2196,
286,
262,
2139,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
32053,
26,
16409,
262,
2196,
286,
262,
2139,
628,
220,
220,
220,
12429,
16281,
4938,
2882,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
14626,
14,
16,
13,
16,
939,
7477,
628,
220,
220,
220,
220,
220,
220,
657,
13,
15,
13,
16,
13,
7959,
1433,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
2196,
62,
10951,
796,
279,
1671,
13,
9641,
13,
14815,
12360,
10786,
446,
2271,
12,
15271,
11537,
198,
220,
220,
220,
1441,
2196,
62,
10951,
13,
9641,
62,
8841,
62,
4480,
62,
85,
6359,
3419,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
11499,
12945,
4943,
198,
4299,
36051,
33529,
198,
220,
220,
220,
37227,
35561,
262,
36835,
640,
628,
220,
220,
220,
17427,
7824,
284,
11767,
326,
262,
2139,
318,
510,
290,
14409,
13,
220,
16409,
198,
220,
220,
220,
262,
1271,
286,
4201,
1201,
8069,
12,
486,
12,
486,
3571,
25,
405,
25,
405,
16987,
13,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
32053,
26,
16409,
262,
36835,
640,
628,
220,
220,
220,
12429,
16281,
4938,
2882,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
14626,
14,
16,
13,
16,
939,
7477,
628,
220,
220,
220,
220,
220,
220,
6640,
1983,
2231,
17544,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
33918,
1958,
7,
600,
7,
2435,
13,
2435,
3419,
4008,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
7220,
4943,
198,
31,
30586,
13,
268,
3174,
10786,
36195,
47510,
25,
1136,
62,
7220,
11537,
198,
4299,
2836,
33529,
198,
220,
220,
220,
37227,
35561,
262,
20579,
262,
2139,
318,
2491,
739,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
32053,
26,
16409,
262,
20579,
262,
2139,
318,
2491,
739,
628,
220,
220,
220,
12429,
16281,
4938,
2882,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
14626,
14,
16,
13,
16,
939,
7477,
628,
220,
220,
220,
220,
220,
220,
19779,
29460,
1298,
366,
1820,
29460,
20662,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
2836,
62,
11600,
796,
1391,
6,
29460,
10354,
279,
16993,
13,
1136,
79,
86,
27112,
7,
418,
13,
1136,
27112,
3419,
737,
79,
86,
62,
3672,
92,
198,
220,
220,
220,
1441,
33918,
1958,
7,
7220,
62,
11600,
8,
628,
198,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
2118,
433,
1600,
5050,
28,
17816,
32782,
6,
12962,
198,
31,
30586,
13,
268,
3174,
10786,
36195,
47510,
25,
2118,
433,
11537,
198,
4299,
15765,
33529,
198,
220,
220,
220,
37227,
16844,
3558,
262,
2139,
284,
15765,
706,
257,
7368,
5711,
11,
287,
4201,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
32053,
26,
9394,
3558,
257,
2139,
15765,
706,
257,
5711,
628,
220,
220,
220,
12429,
16281,
19390,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
24582,
1220,
15042,
14,
85,
17,
14,
7220,
14626,
14,
16,
13,
16,
628,
220,
220,
220,
220,
220,
220,
14041,
12,
6030,
25,
3586,
14,
17752,
628,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40850,
1298,
3126,
198,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7508,
796,
2581,
13,
1136,
62,
17752,
3419,
393,
23884,
198,
220,
220,
220,
5711,
62,
2363,
82,
796,
493,
7,
10951,
13,
1136,
10786,
40850,
3256,
657,
4008,
628,
220,
220,
220,
256,
796,
4704,
278,
13,
48801,
7,
40850,
62,
2363,
82,
11,
4296,
62,
46284,
62,
7753,
8,
198,
220,
220,
220,
256,
13,
9688,
3419,
628,
220,
220,
220,
1441,
33918,
1958,
10786,
33244,
11537,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
38235,
1600,
5050,
28,
17816,
32782,
6,
12962,
198,
4299,
17594,
33529,
198,
220,
220,
220,
37227,
47649,
16856,
351,
1994,
6440,
290,
5860,
257,
11241,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
32053,
26,
31885,
16856,
351,
1994,
6440,
628,
220,
220,
220,
12429,
16281,
19390,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
24582,
1220,
15042,
14,
85,
17,
14,
38235,
14626,
14,
16,
13,
16,
198,
220,
220,
220,
220,
220,
220,
14041,
12,
6030,
25,
3586,
14,
17752,
628,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
29460,
1298,
366,
28482,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
28712,
1298,
366,
21078,
1,
198,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
12429,
16281,
18261,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
14626,
14,
16,
13,
16,
939,
7477,
198,
220,
220,
220,
220,
220,
220,
14041,
12,
6030,
25,
3586,
14,
17752,
628,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
30001,
1298,
366,
70,
17922,
6242,
65,
8419,
84,
57,
35,
48,
18878,
39,
20,
42,
76,
42,
12418,
75,
35,
48926,
86,
22,
5097,
80,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11201,
2387,
1298,
366,
7908,
12,
3312,
12,
486,
51,
2481,
25,
1828,
25,
3312,
10,
405,
25,
405,
1,
198,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
1058,
13376,
939,
25,
4388,
18239,
198,
220,
220,
220,
1058,
13376,
22219,
25,
12515,
18031,
198,
220,
220,
220,
1058,
13376,
38210,
25,
18239,
407,
10431,
11,
393,
2836,
407,
10435,
329,
597,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4493,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
611,
407,
4566,
13,
47911,
62,
18439,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
15614,
7,
31552,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
41299,
3299,
407,
10431,
1201,
2139,
318,
287,
31955,
4235,
4943,
628,
220,
220,
220,
7508,
796,
2581,
13,
1136,
62,
17752,
3419,
393,
23884,
198,
220,
220,
220,
20579,
796,
7508,
13,
1136,
10786,
29460,
11537,
198,
220,
220,
220,
9206,
796,
7508,
13,
1136,
10786,
28712,
11537,
198,
220,
220,
220,
2836,
62,
27830,
62,
3672,
796,
7508,
13,
1136,
10786,
7220,
62,
27830,
62,
3672,
3256,
705,
19463,
11537,
198,
220,
220,
220,
11241,
796,
4808,
41299,
5344,
7,
10943,
37,
13,
2539,
6440,
62,
18439,
30001,
13,
18439,
62,
6371,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20579,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9206,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27830,
62,
3672,
8,
198,
220,
220,
220,
1441,
33918,
1958,
7,
30001,
8,
628,
198,
4299,
4808,
41299,
5344,
7,
18439,
62,
6371,
11,
20579,
28,
14202,
11,
9206,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27830,
62,
3672,
11639,
19463,
6,
2599,
198,
220,
220,
220,
37227,
47649,
5344,
351,
1994,
6440,
628,
220,
220,
220,
7921,
274,
281,
28594,
19458,
11241,
1262,
262,
1813,
18031,
357,
4758,
4938,
689,
198,
220,
220,
220,
606,
828,
290,
788,
3544,
326,
11241,
284,
651,
257,
1628,
12,
1416,
19458,
11241,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
28594,
19458,
62,
18439,
796,
410,
18,
13,
35215,
7,
18439,
62,
6371,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20579,
28,
29460,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9206,
28,
28712,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
27830,
62,
3672,
28,
7220,
62,
27830,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28594,
19458,
28,
17821,
8,
628,
220,
220,
220,
6246,
796,
479,
82,
62,
29891,
13,
36044,
7,
7220,
62,
25781,
28,
29904,
62,
4760,
3525,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11767,
28,
1662,
7102,
37,
13,
2539,
6440,
62,
18439,
30001,
13,
259,
22390,
8,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
24593,
1994,
6440,
284,
11767,
262,
18031,
198,
220,
220,
220,
220,
220,
220,
220,
28594,
19458,
62,
18439,
62,
5420,
796,
28594,
19458,
62,
18439,
13,
1136,
62,
15526,
7,
29891,
8,
628,
220,
220,
220,
2845,
2859,
13,
38659,
13,
13313,
50015,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
15614,
7,
31938,
11,
965,
7,
68,
4008,
628,
220,
220,
220,
2845,
2859,
13,
4023,
13,
43481,
12331,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
15614,
7,
68,
13,
4023,
62,
13376,
11,
304,
13,
20500,
8,
628,
220,
220,
220,
2845,
2859,
13,
11792,
16922,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
15614,
7,
21844,
11,
965,
7,
68,
4008,
628,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
41605,
13,
1069,
4516,
7,
68,
8,
198,
220,
220,
220,
220,
220,
220,
220,
15614,
7,
4059,
11,
366,
3118,
540,
284,
8323,
5344,
4943,
628,
220,
220,
220,
5456,
796,
479,
82,
62,
16366,
13,
11792,
7,
29891,
28,
29891,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6284,
28,
403,
1416,
19458,
62,
18439,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
25781,
28,
29904,
62,
4760,
3525,
8,
628,
220,
220,
220,
6284,
62,
6371,
796,
28594,
19458,
62,
18439,
13,
18439,
62,
6371,
628,
220,
220,
220,
4493,
796,
5456,
13,
42068,
13,
4868,
7,
7220,
28,
403,
1416,
19458,
62,
18439,
62,
5420,
13,
7220,
62,
312,
8,
628,
220,
220,
220,
1303,
25853,
503,
10058,
4493,
198,
220,
220,
220,
4493,
796,
685,
16302,
329,
1628,
287,
4493,
611,
1628,
13,
25616,
60,
628,
220,
220,
220,
1303,
14481,
270,
1096,
262,
13169,
1628,
416,
5137,
340,
379,
262,
3726,
286,
262,
1351,
198,
220,
220,
220,
329,
1426,
11,
1628,
287,
27056,
378,
7,
42068,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1628,
13,
3672,
6624,
705,
28482,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4493,
13,
12924,
7,
1930,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4493,
13,
28463,
7,
15,
11,
1628,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628,
220,
220,
220,
1303,
8229,
262,
717,
1628,
11241,
326,
356,
423,
262,
13169,
2597,
319,
11,
4306,
198,
220,
220,
220,
1303,
1441,
262,
717,
1628,
11241,
356,
423,
597,
2597,
319,
13,
198,
220,
220,
220,
2121,
1891,
62,
18439,
62,
5420,
796,
6045,
198,
220,
220,
220,
329,
1628,
287,
4493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6284,
796,
410,
18,
13,
30642,
7,
18439,
62,
6371,
28,
18439,
62,
6371,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11241,
28,
403,
1416,
19458,
62,
18439,
62,
5420,
13,
18439,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1628,
62,
312,
28,
16302,
13,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
302,
41299,
5344,
28,
25101,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6284,
62,
5420,
796,
6284,
13,
1136,
62,
15526,
7,
29891,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
705,
28482,
6,
287,
6284,
62,
5420,
13,
18090,
62,
14933,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
1391,
6,
30001,
10354,
6284,
62,
5420,
13,
18439,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
11201,
2387,
10354,
6284,
62,
5420,
13,
11201,
2387,
13,
26786,
18982,
3419,
92,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
407,
2121,
1891,
62,
18439,
62,
5420,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2121,
1891,
62,
18439,
62,
5420,
796,
6284,
62,
5420,
628,
220,
220,
220,
220,
220,
220,
220,
2845,
35528,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
628,
220,
220,
220,
611,
2121,
1891,
62,
18439,
62,
5420,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
1391,
6,
30001,
10354,
2121,
1891,
62,
18439,
62,
5420,
13,
18439,
62,
30001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
11201,
2387,
10354,
2121,
1891,
62,
18439,
62,
5420,
13,
11201,
2387,
13,
26786,
18982,
3419,
92,
628,
220,
220,
220,
1303,
16926,
46,
7,
14849,
2599,
12642,
355,
257,
9233,
2121,
1891,
284,
1441,
257,
7386,
12,
1416,
19458,
198,
220,
220,
220,
1303,
11241,
628,
220,
220,
220,
15614,
7,
31552,
11,
366,
3673,
10435,
329,
597,
1628,
4943,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
271,
62,
2363,
1522,
4943,
198,
4299,
651,
62,
2363,
1522,
33529,
198,
220,
220,
220,
37227,
35561,
1771,
18239,
318,
2672,
628,
220,
220,
220,
16409,
257,
33918,
2134,
12739,
1771,
262,
2139,
318,
17839,
284,
198,
220,
220,
220,
4605,
18239,
628,
220,
220,
220,
11485,
1058,
24209,
5420,
25,
9104,
26,
16409,
1771,
18239,
318,
2672,
628,
220,
220,
220,
12429,
16281,
18261,
1174,
25,
628,
220,
220,
220,
11485,
2723,
8189,
3712,
2638,
628,
220,
220,
220,
220,
220,
220,
14626,
14,
16,
13,
16,
939,
7477,
198,
220,
220,
220,
220,
220,
220,
14041,
12,
6030,
25,
3586,
14,
17752,
628,
220,
220,
220,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
271,
6558,
1522,
1298,
3991,
198,
220,
220,
220,
220,
220,
220,
1782,
628,
220,
220,
220,
1058,
13376,
939,
25,
1943,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
33918,
1958,
15090,
6,
271,
6558,
1522,
10354,
4566,
13,
47911,
62,
18439,
3419,
30072,
628,
198,
31,
46583,
13,
38629,
7203,
14,
15042,
14,
85,
17,
14,
38659,
62,
9288,
1600,
5050,
28,
17816,
32782,
6,
12962,
198
] | 2.493325 | 3,071 |
#! usr/bin/env python3
"""
:
: Utility for generating ASCII art given an input image.
:
:
"""
from src.ascii import *
from src.luminosity import *
UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LOWER = "abcdefghijklmnopqrstuvwxyz"
DIGIT = "0123456789"
SYMBOL = "~!@#$%^&*()_+`-=[]{}|\\:;\"'<>?,./"
#CHARACTERS = UPPER + LOWER + DIGIT + SYMBOL
CHARACTERS = SYMBOL
ITER_WIDTH = 4
ITER_HEIGHT = 2
FONT_SIZE = 99
INVERT = True
def fn_GetNumValues(d_Dict: dict) -> int:
"""
:
: Gets the total number of unique values from the given mapping.
:
:
: Args:
: dict d_Luminosity :
:
: Returns:
: Number of unique values
:
:
"""
return len(list(set(d_Dict.values())))
def fn_MapRange(l_List: iter, i_Range: int) -> dict:
"""
:
: Evenly assigns a numerical value within a given range to each element of a list.
:
:
: Args:
: iter l_List : List of items that will be mapped as values in the output dictionary
: int i_Range : Maximum value for the range of numbers that will be mapped as keys in the output
:
: Returns:
: Dictionary containing the above mapping
:
:
"""
# Set up local containers
# ...
i_LenList = len(l_List) # type: int
i_M = 0 # type: int
f_Step = i_LenList / i_Range # type: float
f_N = 0 # type: float
d_Output = {} # type: dict
# Step through list and populate output dictionary evenly
# ...
while f_N < i_LenList:
try:
i_Index = int(round(f_N))
o_Item = l_List[i_Index]
d_Output[i_M] = o_Item
f_N += f_Step
i_M += 1
except IndexError:
break
return d_Output
def fn_CrossChain(d_Dict1: dict, d_Dict2: dict, b_Default: bool = False) -> dict:
"""
:
: Maps keys in the first dictionary to values in the second dictionary. (In other words, the first dictionary's
: keys will be mapped to the second dictionary's values, for each value in the first that's a key in the second).
:
: In case of hash misses in the second dictionary, supplying a "default" value may be enabled. If enabled, the
: default value will be taken as the "last" element of the second dictionary (that is, as though its entries
: were sorted in order of its keys).
:
:
: Args:
: dict d_Dict1 : Dictionary whose keys are to become keys in the output dictionary
: dict d_Dict2 : Dictionary whose values are to become values in the output dictionary
: bool b_Default : Whether to use a fallback value in place of "missing" values (default False)
:
: Returns:
: Dictionary containing keys from the first dictionary mapped to values from the second dictionary
:
:
"""
d_Output = {}
# Supply default value if needed
# ...
if b_Default:
v_Default = fn_SortByKey(d_Dict2)[-1]
else:
v_Default = None
# Remap keys(1) to values(2)
# ...
for k1, v1 in d_Dict1.items():
if v1 in d_Dict2:
d_Output[k1] = d_Dict2[v1]
elif b_Default:
d_Output[k1] = v_Default
return d_Output
def fn_ParallelChain(d_Dict1: dict, d_Dict2: dict, b_Default: bool = False) -> dict:
"""
:
: Maps values in the first dictionary to values in the second dictionary. (In other words, the first dictionary's
: values will be mapped to the second dictionary's values, for each key in the first that's also a key in the
: second).
:
: In case of hash misses in the second dictionary, supplying a "default" value may be enabled. If enabled, the
: default value will be taken as the "last" element of the second dictionary (that is, as though its entries were
: sorted in order of its keys).
:
:
: Args:
: dict d_Dict1 : Dictionary whose values are to become keys in the output dictionary
: dict d_Dict2 : Dictionary whose values are to become values in the output dictionary
: bool b_Default : Whether to use a fallback value in place of "missing" values (default False)
:
: Returns:
: Dictionary containing values from the first dictionary mapped to values from the second dictionary
:
:
"""
d_Output = {}
# Supply default value if needed
# ...
if b_Default:
v_Default = fn_SortByKey(d_Dict2)[-1]
else:
v_Default = None
# Remap values(1) to values(2)
# ...
for k1, v1 in d_Dict1.items():
if k1 in d_Dict2:
d_Output[v1] = d_Dict2[k1]
elif b_Default:
d_Output[v1] = v_Default
return d_Output
def fn_SortByKey(d_Dict: dict) -> list:
"""
:
: Returns a list of values in a dictionary in order of their keys.
:
:
: Args:
: dict d_Dict : An unsigned integer!
:
: Returns:
: List of values sorted by key
:
:
"""
return [y[1] for y in sorted([(k, v) for k, v in d_Dict.items()], key=lambda x: x[0])]
def fn_GenerateAscii(d_CoordToChar: dict) -> str:
"""
:
: Generates an ASCII image string given characters mapped to (relative) rendering coordinates.
:
:
: Args:
: dict d_CoordToChar : Mapping from 2-tuple coordinates to string characters
:
: Returns:
: ASCII image (or any other encoding really), separated by newlines
:
:
"""
d_Ascii = {} # type: dict
s_Output = '' # type: str
# Map images to x-y coordinates, splitting x- and y- into their own sub-dictionaries
# ...
for i2_Coord, s_Char in d_CoordToChar.items():
i_X, i_Y = i2_Coord
if i_X not in d_Ascii:
d_Ascii[i_X] = {}
if i_Y not in d_Ascii[i_X]:
d_Ascii[i_X][i_Y] = s_Char
# Sort the entries for each "row" of ASCII characters in the dictionary, then join them and concatenate the
# resulting string
# ...
for i_X, d_X in d_Ascii.items():
s_Output += ''.join(fn_SortByKey(d_X))
s_Output += '\n'
return s_Output
def fn_ProcessImage(
s_FontFilename: str,
s_ImageFilename: str,
s_Output: str = '',
s_CharacterSet: str = CHARACTERS,
b_Invert: bool = INVERT,
i_Size: int = FONT_SIZE,
i_IterWidth: int = ITER_WIDTH,
i_IterHeight: int = ITER_HEIGHT,
):
"""
:
: Loads an image and converts it to ASCII art, then prints it out.
:
:
"""
# Load font and sort glyphs in order of luminosity
# ...
o_FreetypeFace = fn_LoadFont(s_FontFilename, i_Size) # type: freetype.Face
s_Characters = fn_SortGlyphs(o_FreetypeFace, s_CharacterSet, b_Invert) # type: str
# Load image and profile it for luminosity
# ...
o_Image = fn_LoadImage(s_ImageFilename) # type: Image
d_CoordToImage = fn_Iterate2D(o_Image, i_IterWidth, i_IterHeight) # type: dict
d_CoordToLum = fn_MapLuminosity2D(d_CoordToImage) # type: dict
i_NumLuminosity = fn_GetNumValues(d_CoordToLum) # type: int
l_Luminosity = list(set(d_CoordToLum.values())) # type: list
# Relay a series of associative mappings, ending with characters mapped under relative coordinates
# ...
d_CharRange = fn_MapRange(s_Characters, i_NumLuminosity) # type: dict
d_LumRange = fn_MapRange(l_Luminosity, i_NumLuminosity) # type: dict
d_LumToChar = fn_ParallelChain(d_LumRange, d_CharRange) # type: dict
d_ImageToLum = fn_ParallelChain(d_CoordToImage, d_CoordToLum) # type: dict
d_ImageToChar = fn_CrossChain(d_ImageToLum, d_LumToChar, True) # type: dict
d_CoordToChar = fn_CrossChain(d_CoordToImage, d_ImageToChar) # type: dict
# Generate ASCII image using coordinates -> characters
# ...
s_Out = fn_GenerateAscii(d_CoordToChar)
# If output filename specified, save file there; otherwise, just print it out.
# ...
if s_Output:
with open(s_Output, 'w') as f:
f.write(s_Out)
print("Wrote to output file: {0}".format(s_Output))
else:
print()
print(s_Out)
if __name__ == "__main__":
fn_ProcessImage("../res/arial.ttf", "../res/nagatoro.png")
| [
2,
0,
514,
81,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
25,
198,
25,
220,
34030,
329,
15453,
37101,
1242,
1813,
281,
5128,
2939,
13,
198,
25,
198,
25,
198,
37811,
198,
6738,
12351,
13,
292,
979,
72,
220,
220,
220,
220,
220,
1330,
1635,
198,
6738,
12351,
13,
75,
7230,
16579,
1330,
1635,
628,
198,
198,
8577,
18973,
220,
220,
220,
220,
220,
220,
796,
366,
24694,
32988,
17511,
23852,
42,
31288,
45,
3185,
48,
49,
2257,
52,
30133,
34278,
57,
1,
198,
43,
36048,
220,
220,
220,
220,
220,
220,
796,
366,
39305,
4299,
456,
2926,
41582,
10295,
404,
80,
81,
301,
14795,
86,
5431,
89,
1,
198,
35,
3528,
2043,
220,
220,
220,
220,
220,
220,
796,
366,
486,
1954,
2231,
3134,
4531,
1,
198,
23060,
10744,
3535,
220,
220,
220,
220,
220,
796,
366,
93,
0,
31,
29953,
4,
61,
5,
9,
3419,
62,
10,
63,
12,
28,
21737,
90,
92,
91,
6852,
25,
26,
7879,
6,
27,
29,
21747,
19571,
1,
198,
2,
38019,
10659,
4877,
220,
796,
471,
10246,
1137,
1343,
406,
36048,
1343,
360,
3528,
2043,
1343,
19704,
10744,
3535,
198,
38019,
10659,
4877,
220,
796,
19704,
10744,
3535,
198,
2043,
1137,
62,
54,
2389,
4221,
220,
796,
604,
198,
2043,
1137,
62,
13909,
9947,
796,
362,
198,
37,
35830,
62,
33489,
220,
220,
796,
7388,
198,
1268,
15858,
220,
220,
220,
220,
220,
796,
6407,
628,
198,
198,
4299,
24714,
62,
3855,
33111,
40161,
7,
67,
62,
35,
713,
25,
8633,
8,
4613,
493,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
29620,
262,
2472,
1271,
286,
3748,
3815,
422,
262,
1813,
16855,
13,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
43,
7230,
16579,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
7913,
286,
3748,
3815,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
18896,
7,
4868,
7,
2617,
7,
67,
62,
35,
713,
13,
27160,
3419,
22305,
628,
198,
198,
4299,
24714,
62,
13912,
17257,
7,
75,
62,
8053,
25,
11629,
11,
1312,
62,
17257,
25,
493,
8,
4613,
8633,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
3412,
306,
46974,
257,
29052,
1988,
1626,
257,
1813,
2837,
284,
1123,
5002,
286,
257,
1351,
13,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
11629,
300,
62,
8053,
220,
1058,
7343,
286,
3709,
326,
481,
307,
27661,
355,
3815,
287,
262,
5072,
22155,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
493,
220,
1312,
62,
17257,
1058,
22246,
1988,
329,
262,
2837,
286,
3146,
326,
481,
307,
27661,
355,
8251,
287,
262,
5072,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
28261,
7268,
262,
2029,
16855,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
5345,
510,
1957,
16472,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
1312,
62,
30659,
8053,
796,
18896,
7,
75,
62,
8053,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
493,
198,
220,
220,
220,
1312,
62,
44,
220,
220,
220,
220,
220,
220,
796,
657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
493,
198,
220,
220,
220,
277,
62,
8600,
220,
220,
220,
796,
1312,
62,
30659,
8053,
1220,
1312,
62,
17257,
220,
1303,
2099,
25,
12178,
198,
220,
220,
220,
277,
62,
45,
220,
220,
220,
220,
220,
220,
796,
657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
12178,
198,
220,
220,
220,
288,
62,
26410,
220,
796,
23884,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
8633,
628,
220,
220,
220,
1303,
5012,
832,
1351,
290,
48040,
5072,
22155,
21894,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
981,
277,
62,
45,
1279,
1312,
62,
30659,
8053,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
15732,
796,
493,
7,
744,
7,
69,
62,
45,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
267,
62,
7449,
796,
300,
62,
8053,
58,
72,
62,
15732,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
26410,
58,
72,
62,
44,
60,
796,
267,
62,
7449,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
62,
45,
15853,
277,
62,
8600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
44,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
12901,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
628,
220,
220,
220,
1441,
288,
62,
26410,
628,
198,
198,
4299,
24714,
62,
21544,
35491,
7,
67,
62,
35,
713,
16,
25,
8633,
11,
288,
62,
35,
713,
17,
25,
8633,
11,
275,
62,
19463,
25,
20512,
796,
10352,
8,
4613,
8633,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
20347,
8251,
287,
262,
717,
22155,
284,
3815,
287,
262,
1218,
22155,
13,
357,
818,
584,
2456,
11,
262,
717,
22155,
338,
198,
220,
220,
220,
1058,
220,
8251,
481,
307,
27661,
284,
262,
1218,
22155,
338,
3815,
11,
329,
1123,
1988,
287,
262,
717,
326,
338,
257,
1994,
287,
262,
1218,
737,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
554,
1339,
286,
12234,
18297,
287,
262,
1218,
22155,
11,
28099,
257,
366,
12286,
1,
1988,
743,
307,
9343,
13,
1002,
9343,
11,
262,
198,
220,
220,
220,
1058,
220,
4277,
1988,
481,
307,
2077,
355,
262,
366,
12957,
1,
5002,
286,
262,
1218,
22155,
357,
5562,
318,
11,
355,
996,
663,
12784,
198,
220,
220,
220,
1058,
220,
547,
23243,
287,
1502,
286,
663,
8251,
737,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
35,
713,
16,
220,
220,
1058,
28261,
3025,
8251,
389,
284,
1716,
8251,
287,
262,
5072,
22155,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
35,
713,
17,
220,
220,
1058,
28261,
3025,
3815,
389,
284,
1716,
3815,
287,
262,
5072,
22155,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
20512,
275,
62,
19463,
1058,
10127,
284,
779,
257,
2121,
1891,
1988,
287,
1295,
286,
366,
45688,
1,
3815,
357,
12286,
10352,
8,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
28261,
7268,
8251,
422,
262,
717,
22155,
27661,
284,
3815,
422,
262,
1218,
22155,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
288,
62,
26410,
796,
23884,
628,
220,
220,
220,
1303,
22663,
4277,
1988,
611,
2622,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
611,
275,
62,
19463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
62,
19463,
796,
24714,
62,
42758,
3886,
9218,
7,
67,
62,
35,
713,
17,
38381,
12,
16,
60,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
62,
19463,
796,
6045,
628,
220,
220,
220,
1303,
3982,
499,
8251,
7,
16,
8,
284,
3815,
7,
17,
8,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
329,
479,
16,
11,
410,
16,
287,
288,
62,
35,
713,
16,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
611,
410,
16,
287,
288,
62,
35,
713,
17,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
26410,
58,
74,
16,
60,
796,
288,
62,
35,
713,
17,
58,
85,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
275,
62,
19463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
26410,
58,
74,
16,
60,
796,
410,
62,
19463,
628,
220,
220,
220,
1441,
288,
62,
26410,
628,
198,
198,
4299,
24714,
62,
10044,
29363,
35491,
7,
67,
62,
35,
713,
16,
25,
8633,
11,
288,
62,
35,
713,
17,
25,
8633,
11,
275,
62,
19463,
25,
20512,
796,
10352,
8,
4613,
8633,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
20347,
3815,
287,
262,
717,
22155,
284,
3815,
287,
262,
1218,
22155,
13,
357,
818,
584,
2456,
11,
262,
717,
22155,
338,
198,
220,
220,
220,
1058,
220,
3815,
481,
307,
27661,
284,
262,
1218,
22155,
338,
3815,
11,
329,
1123,
1994,
287,
262,
717,
326,
338,
635,
257,
1994,
287,
262,
198,
220,
220,
220,
1058,
220,
1218,
737,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
554,
1339,
286,
12234,
18297,
287,
262,
1218,
22155,
11,
28099,
257,
366,
12286,
1,
1988,
743,
307,
9343,
13,
1002,
9343,
11,
262,
198,
220,
220,
220,
1058,
220,
4277,
1988,
481,
307,
2077,
355,
262,
366,
12957,
1,
5002,
286,
262,
1218,
22155,
357,
5562,
318,
11,
355,
996,
663,
12784,
547,
198,
220,
220,
220,
1058,
220,
23243,
287,
1502,
286,
663,
8251,
737,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
35,
713,
16,
220,
220,
1058,
28261,
3025,
3815,
389,
284,
1716,
8251,
287,
262,
5072,
22155,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
35,
713,
17,
220,
220,
1058,
28261,
3025,
3815,
389,
284,
1716,
3815,
287,
262,
5072,
22155,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
20512,
275,
62,
19463,
1058,
10127,
284,
779,
257,
2121,
1891,
1988,
287,
1295,
286,
366,
45688,
1,
3815,
357,
12286,
10352,
8,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
28261,
7268,
3815,
422,
262,
717,
22155,
27661,
284,
3815,
422,
262,
1218,
22155,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
288,
62,
26410,
796,
23884,
628,
220,
220,
220,
1303,
22663,
4277,
1988,
611,
2622,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
611,
275,
62,
19463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
62,
19463,
796,
24714,
62,
42758,
3886,
9218,
7,
67,
62,
35,
713,
17,
38381,
12,
16,
60,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
410,
62,
19463,
796,
6045,
628,
220,
220,
220,
1303,
3982,
499,
3815,
7,
16,
8,
284,
3815,
7,
17,
8,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
329,
479,
16,
11,
410,
16,
287,
288,
62,
35,
713,
16,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
611,
479,
16,
287,
288,
62,
35,
713,
17,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
26410,
58,
85,
16,
60,
796,
288,
62,
35,
713,
17,
58,
74,
16,
60,
198,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
275,
62,
19463,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
26410,
58,
85,
16,
60,
796,
410,
62,
19463,
628,
220,
220,
220,
1441,
288,
62,
26410,
628,
198,
198,
4299,
24714,
62,
42758,
3886,
9218,
7,
67,
62,
35,
713,
25,
8633,
8,
4613,
1351,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
257,
1351,
286,
3815,
287,
257,
22155,
287,
1502,
286,
511,
8251,
13,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
35,
713,
1058,
1052,
22165,
18253,
0,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
7343,
286,
3815,
23243,
416,
1994,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
685,
88,
58,
16,
60,
329,
331,
287,
23243,
26933,
7,
74,
11,
410,
8,
329,
479,
11,
410,
287,
288,
62,
35,
713,
13,
23814,
3419,
4357,
1994,
28,
50033,
2124,
25,
2124,
58,
15,
12962,
60,
628,
198,
198,
4299,
24714,
62,
8645,
378,
1722,
979,
72,
7,
67,
62,
7222,
585,
2514,
12441,
25,
8633,
8,
4613,
965,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
2980,
689,
281,
37101,
2939,
4731,
1813,
3435,
27661,
284,
357,
43762,
8,
14837,
22715,
13,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
943,
14542,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
8633,
288,
62,
7222,
585,
2514,
12441,
1058,
337,
5912,
422,
362,
12,
83,
29291,
22715,
284,
4731,
3435,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
16409,
25,
198,
220,
220,
220,
1058,
220,
220,
220,
220,
220,
37101,
2939,
357,
273,
597,
584,
21004,
1107,
828,
11266,
416,
649,
6615,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
288,
62,
1722,
979,
72,
220,
796,
23884,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
264,
62,
26410,
796,
10148,
220,
1303,
2099,
25,
965,
628,
220,
220,
220,
1303,
9347,
4263,
284,
2124,
12,
88,
22715,
11,
26021,
2124,
12,
290,
331,
12,
656,
511,
898,
850,
12,
67,
2867,
3166,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
329,
1312,
17,
62,
7222,
585,
11,
264,
62,
12441,
287,
288,
62,
7222,
585,
2514,
12441,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
55,
11,
1312,
62,
56,
796,
1312,
17,
62,
7222,
585,
628,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
62,
55,
407,
287,
288,
62,
1722,
979,
72,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
1722,
979,
72,
58,
72,
62,
55,
60,
796,
23884,
628,
220,
220,
220,
220,
220,
220,
220,
611,
1312,
62,
56,
407,
287,
288,
62,
1722,
979,
72,
58,
72,
62,
55,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
62,
1722,
979,
72,
58,
72,
62,
55,
7131,
72,
62,
56,
60,
796,
264,
62,
12441,
628,
220,
220,
220,
1303,
33947,
262,
12784,
329,
1123,
366,
808,
1,
286,
37101,
3435,
287,
262,
22155,
11,
788,
4654,
606,
290,
1673,
36686,
378,
262,
198,
220,
220,
220,
1303,
7186,
4731,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
329,
1312,
62,
55,
11,
288,
62,
55,
287,
288,
62,
1722,
979,
72,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
26410,
15853,
705,
4458,
22179,
7,
22184,
62,
42758,
3886,
9218,
7,
67,
62,
55,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
26410,
15853,
705,
59,
77,
6,
628,
220,
220,
220,
1441,
264,
62,
26410,
628,
198,
198,
4299,
24714,
62,
18709,
5159,
7,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
23252,
35063,
25,
220,
965,
11,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
5159,
35063,
25,
965,
11,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
26410,
25,
220,
220,
220,
220,
220,
220,
220,
965,
220,
796,
705,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
264,
62,
27275,
7248,
25,
220,
965,
220,
796,
28521,
10659,
4877,
11,
198,
220,
220,
220,
220,
220,
220,
220,
275,
62,
818,
1851,
25,
220,
220,
220,
220,
220,
220,
220,
20512,
796,
3268,
15858,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
10699,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
493,
220,
796,
376,
35830,
62,
33489,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
29993,
30916,
25,
220,
220,
220,
220,
493,
220,
796,
314,
5781,
62,
54,
2389,
4221,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
29993,
23106,
25,
220,
220,
220,
493,
220,
796,
314,
5781,
62,
13909,
9947,
11,
198,
220,
220,
220,
220,
220,
220,
220,
15179,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
220,
8778,
82,
281,
2939,
290,
26161,
340,
284,
37101,
1242,
11,
788,
20842,
340,
503,
13,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
1058,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1303,
8778,
10369,
290,
3297,
25874,
82,
287,
1502,
286,
29763,
16579,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
267,
62,
37,
2871,
2981,
32388,
796,
24714,
62,
8912,
23252,
7,
82,
62,
23252,
35063,
11,
1312,
62,
10699,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
2030,
2963,
431,
13,
32388,
198,
220,
220,
220,
264,
62,
48393,
220,
220,
796,
24714,
62,
42758,
38,
306,
746,
82,
7,
78,
62,
37,
2871,
2981,
32388,
11,
264,
62,
27275,
7248,
11,
275,
62,
818,
1851,
8,
220,
1303,
2099,
25,
965,
628,
220,
220,
220,
1303,
8778,
2939,
290,
7034,
340,
329,
29763,
16579,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
267,
62,
5159,
220,
220,
220,
220,
220,
220,
220,
220,
796,
24714,
62,
8912,
5159,
7,
82,
62,
5159,
35063,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
7412,
198,
220,
220,
220,
288,
62,
7222,
585,
2514,
5159,
220,
796,
24714,
62,
29993,
378,
17,
35,
7,
78,
62,
5159,
11,
1312,
62,
29993,
30916,
11,
1312,
62,
29993,
23106,
8,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
7222,
585,
2514,
43,
388,
220,
220,
220,
796,
24714,
62,
13912,
43,
7230,
16579,
17,
35,
7,
67,
62,
7222,
585,
2514,
5159,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
1312,
62,
33111,
43,
7230,
16579,
796,
24714,
62,
3855,
33111,
40161,
7,
67,
62,
7222,
585,
2514,
43,
388,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
493,
198,
220,
220,
220,
300,
62,
43,
7230,
16579,
220,
220,
220,
796,
1351,
7,
2617,
7,
67,
62,
7222,
585,
2514,
43,
388,
13,
27160,
3419,
4008,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
1351,
628,
220,
220,
220,
1303,
4718,
323,
257,
2168,
286,
2570,
876,
285,
39242,
11,
7464,
351,
3435,
27661,
739,
3585,
22715,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
288,
62,
12441,
17257,
220,
220,
796,
24714,
62,
13912,
17257,
7,
82,
62,
48393,
11,
1312,
62,
33111,
43,
7230,
16579,
8,
220,
220,
220,
220,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
43,
388,
17257,
220,
220,
220,
796,
24714,
62,
13912,
17257,
7,
75,
62,
43,
7230,
16579,
11,
1312,
62,
33111,
43,
7230,
16579,
8,
220,
220,
220,
220,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
43,
388,
2514,
12441,
220,
220,
796,
24714,
62,
10044,
29363,
35491,
7,
67,
62,
43,
388,
17257,
11,
288,
62,
12441,
17257,
8,
220,
220,
220,
220,
220,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
5159,
2514,
43,
388,
220,
796,
24714,
62,
10044,
29363,
35491,
7,
67,
62,
7222,
585,
2514,
5159,
11,
288,
62,
7222,
585,
2514,
43,
388,
8,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
5159,
2514,
12441,
796,
24714,
62,
21544,
35491,
7,
67,
62,
5159,
2514,
43,
388,
11,
288,
62,
43,
388,
2514,
12441,
11,
6407,
8,
220,
1303,
2099,
25,
8633,
198,
220,
220,
220,
288,
62,
7222,
585,
2514,
12441,
796,
24714,
62,
21544,
35491,
7,
67,
62,
7222,
585,
2514,
5159,
11,
288,
62,
5159,
2514,
12441,
8,
220,
220,
220,
1303,
2099,
25,
8633,
628,
220,
220,
220,
1303,
2980,
378,
37101,
2939,
1262,
22715,
4613,
3435,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
264,
62,
7975,
796,
24714,
62,
8645,
378,
1722,
979,
72,
7,
67,
62,
7222,
585,
2514,
12441,
8,
628,
220,
220,
220,
1303,
1002,
5072,
29472,
7368,
11,
3613,
2393,
612,
26,
4306,
11,
655,
3601,
340,
503,
13,
198,
220,
220,
220,
1303,
2644,
198,
220,
220,
220,
611,
264,
62,
26410,
25,
198,
220,
220,
220,
220,
220,
220,
220,
351,
1280,
7,
82,
62,
26410,
11,
705,
86,
11537,
355,
277,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
13,
13564,
7,
82,
62,
7975,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
54,
2519,
284,
5072,
2393,
25,
1391,
15,
92,
1911,
18982,
7,
82,
62,
26410,
4008,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
82,
62,
7975,
8,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
24714,
62,
18709,
5159,
7203,
40720,
411,
14,
36098,
13,
926,
69,
1600,
366,
40720,
411,
14,
77,
363,
1352,
78,
13,
11134,
4943,
198
] | 2.25746 | 3,787 |
from import_export.admin import ImportExportModelAdmin, ExportMixin
from django.contrib import admin
from master_data.models import *
from centrelink.models import *
from calculator.models import *
from imports.models import *
from django.utils.safestring import mark_safe
from json2html import *
from django.contrib.auth.models import Group, User
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from import_export import resources
import nested_admin
admin.site.unregister(Group)
# Register the new Group ModelAdmin.
admin.site.register(Group, GroupAdmin)
admin.site.site_header = 'CRA Calculator'
admin.site.index_title = 'CRA Calculator'
admin.site.site_title = 'CRA Calculator'
admin.site.register(Transaction, TransactionAdmin)
@ admin.register(
FamilySituation,
MaintenanceType,
Relationship,
)
@ admin.register(RentAssessmentRate)
@ admin.register(CraRate)
@ admin.register(FtbRate)
@ admin.register(MaintenanceIncomeTestRate)
@ admin.register(
FamilySituationRate,
FtbAMaximumPayment,
MaintenanceTypeRate,
)
@ admin.register(Batch)
# from django_otp import OTP_HOTP
# admin.site.unregister(OTP_HOTP)
| [
6738,
1330,
62,
39344,
13,
28482,
1330,
17267,
43834,
17633,
46787,
11,
36472,
35608,
259,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
4958,
62,
7890,
13,
27530,
1330,
1635,
198,
6738,
1247,
2411,
676,
13,
27530,
1330,
1635,
198,
6738,
28260,
13,
27530,
1330,
1635,
198,
6738,
17944,
13,
27530,
1330,
1635,
198,
6738,
42625,
14208,
13,
26791,
13,
49585,
395,
1806,
1330,
1317,
62,
21230,
198,
6738,
33918,
17,
6494,
1330,
1635,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
4912,
11,
11787,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
28482,
13,
28029,
11407,
1330,
7066,
4400,
17563,
31217,
198,
6738,
1330,
62,
39344,
1330,
4133,
198,
11748,
28376,
62,
28482,
628,
628,
198,
28482,
13,
15654,
13,
403,
30238,
7,
13247,
8,
628,
198,
198,
2,
17296,
262,
649,
4912,
9104,
46787,
13,
198,
28482,
13,
15654,
13,
30238,
7,
13247,
11,
4912,
46787,
8,
198,
198,
28482,
13,
15654,
13,
15654,
62,
25677,
796,
705,
34,
3861,
43597,
6,
198,
28482,
13,
15654,
13,
9630,
62,
7839,
796,
705,
34,
3861,
43597,
6,
198,
28482,
13,
15654,
13,
15654,
62,
7839,
796,
705,
34,
3861,
43597,
6,
628,
628,
628,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
48720,
11,
45389,
46787,
8,
628,
628,
628,
198,
198,
31,
13169,
13,
30238,
7,
198,
220,
220,
220,
7884,
46655,
2288,
11,
198,
220,
220,
220,
34857,
6030,
11,
198,
220,
220,
220,
39771,
11,
198,
8,
628,
198,
31,
13169,
13,
30238,
7,
49,
298,
8021,
21687,
32184,
8,
628,
198,
31,
13169,
13,
30238,
7,
33800,
32184,
8,
628,
198,
31,
13169,
13,
30238,
7,
37,
83,
65,
32184,
8,
628,
198,
31,
13169,
13,
30238,
7,
13383,
8219,
818,
2958,
14402,
32184,
8,
628,
198,
31,
13169,
13,
30238,
7,
628,
220,
220,
220,
7884,
46655,
2288,
32184,
11,
198,
220,
220,
220,
45231,
65,
2390,
897,
2847,
19197,
434,
11,
198,
220,
220,
220,
34857,
6030,
32184,
11,
198,
8,
628,
198,
31,
13169,
13,
30238,
7,
33,
963,
8,
628,
198,
198,
2,
422,
42625,
14208,
62,
313,
79,
1330,
440,
7250,
62,
39,
2394,
47,
198,
2,
13169,
13,
15654,
13,
403,
30238,
7,
2394,
47,
62,
39,
2394,
47,
8,
198
] | 3.142487 | 386 |
import json
from baselayer.app.access import auth_or_token
from ...base import BaseHandler
| [
11748,
33918,
198,
6738,
1615,
417,
2794,
13,
1324,
13,
15526,
1330,
6284,
62,
273,
62,
30001,
198,
6738,
2644,
8692,
1330,
7308,
25060,
628
] | 3.68 | 25 |
# Copyright 2020 Ayoub ENNASSIRI
#
# 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 datetime as dt
import csv
import logging
from src.data.models import Tick
from src.runner import pipeline
class ParseTickDataFn(pipeline.DoFn):
"""
Parse the raw tick data events into a tick object
"""
| [
2,
15069,
12131,
317,
5832,
65,
412,
6144,
10705,
4663,
40,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
11748,
4818,
8079,
355,
288,
83,
198,
11748,
269,
21370,
198,
11748,
18931,
198,
198,
6738,
12351,
13,
7890,
13,
27530,
1330,
46093,
198,
6738,
12351,
13,
16737,
1330,
11523,
628,
198,
4871,
2547,
325,
51,
624,
6601,
37,
77,
7,
79,
541,
4470,
13,
5211,
37,
77,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2547,
325,
262,
8246,
4378,
1366,
2995,
656,
257,
4378,
2134,
198,
220,
220,
220,
37227,
198
] | 3.495652 | 230 |
#!/usr/bin/env python
import sys
from bowler import Query, Filename, Capture, LN
PATTERN = """
power < "ipdb" trailer < '.' 'set_trace' > trailer < '(' ')' > > |
power < "breakpoint" trailer < "(" ")" > >
"""
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
198,
6738,
9563,
1754,
1330,
43301,
11,
7066,
12453,
11,
31793,
11,
406,
45,
628,
198,
47,
1404,
31800,
796,
37227,
198,
220,
220,
220,
1176,
1279,
366,
541,
9945,
1,
12268,
1279,
705,
2637,
705,
2617,
62,
40546,
6,
1875,
12268,
1279,
705,
10786,
705,
33047,
1875,
1875,
930,
198,
220,
220,
220,
1176,
1279,
366,
9032,
4122,
1,
12268,
1279,
366,
7203,
366,
16725,
1875,
1875,
220,
198,
37811,
628,
198
] | 2.604651 | 86 |
import requests
import urllib
import json
if __name__ == "__main__":
y=Yummly()
y.setup('d579507d','736c339e12b7a287c72c2de82313657e')
ing=["fruit","milk"]
print y.getAll(ing,"course^course-Beverages")
y.getCourses()
#todo | [
11748,
7007,
198,
11748,
2956,
297,
571,
198,
11748,
33918,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
88,
28,
56,
13929,
306,
3419,
198,
197,
88,
13,
40406,
10786,
67,
3553,
31027,
22,
67,
41707,
49150,
66,
29626,
68,
1065,
65,
22,
64,
27800,
66,
4761,
66,
17,
2934,
23,
1954,
1485,
37680,
68,
11537,
198,
197,
278,
28,
14692,
34711,
2430,
25433,
74,
8973,
198,
197,
4798,
331,
13,
1136,
3237,
7,
278,
553,
17319,
61,
17319,
12,
33,
964,
1095,
4943,
198,
197,
88,
13,
1136,
34,
39975,
3419,
198,
197,
2,
83,
24313
] | 2.235294 | 102 |
from utilities.config import database
from utilities.common_methods import getDebugInfo
from utilities import log
from sqlalchemy import Column, ForeignKey
from sqlalchemy.types import Integer, Float, Date, String
from sqlalchemy.orm import relationship
from data_storing.assets.base import Base
table_name = database.name_table_moving_average
| [
198,
6738,
20081,
13,
11250,
1330,
6831,
198,
6738,
20081,
13,
11321,
62,
24396,
82,
1330,
651,
27509,
12360,
198,
6738,
20081,
1330,
2604,
198,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
19199,
1330,
34142,
11,
48436,
11,
7536,
11,
10903,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
6738,
1366,
62,
301,
3255,
13,
19668,
13,
8692,
1330,
7308,
198,
198,
11487,
62,
3672,
796,
6831,
13,
3672,
62,
11487,
62,
31462,
62,
23913,
628
] | 4 | 87 |
import nltk
| [
11748,
299,
2528,
74,
628
] | 2.6 | 5 |
import rospy
from std_msgs.msg import String
if __name__ == "__main__":
data_processing()
| [
11748,
686,
2777,
88,
198,
6738,
14367,
62,
907,
14542,
13,
19662,
1330,
10903,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1366,
62,
36948,
3419,
198
] | 2.675676 | 37 |
"""Plot input traces to visualise data"""
import os
import sys
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
sys.path.append(os.path.join(os.path.dirname(__file__), 'utils'))
from utils.data import ModelData
def plot_coal_fuel_costs():
"""Coal fuel costs"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.existing_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['COAL'])
# Initialise figures
fig, ax = plt.subplots()
# Generators in order of increasing fuel cost (based on cost in last year)
generator_order = data.existing_units.loc[mask, 'FUEL_COST'].T.iloc[-1].sort_values().index
# Plot fuel costs for existing units
data.existing_units.loc[mask, 'FUEL_COST'].T.loc[:, generator_order].plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=7, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Fuel cost (\$/GJ)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(0.5))
ax.yaxis.set_minor_locator(MultipleLocator(0.1))
# Adjust figure placement and size
fig.subplots_adjust(top=0.8, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.8)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', 'fuel_cost_coal.pdf'))
plt.show()
def plot_gas_fuel_costs():
"""Plot fuel costs for candidate gas generators"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.existing_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['GAS'])
# Initialise figures
fig, ax = plt.subplots()
# Generators in order of increasing fuel cost (based on cost in last year)
generator_order = data.existing_units.loc[mask, 'FUEL_COST'].T.iloc[-1].sort_values().index
# Plot fuel costs for existing units
data.existing_units.loc[mask, 'FUEL_COST'].T.loc[:, generator_order].plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=7, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Fuel cost (\$/GJ)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(0.5))
ax.yaxis.set_minor_locator(MultipleLocator(0.1))
# Adjust figure placement and size
fig.subplots_adjust(top=0.7, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.8)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', 'fuel_cost_gas.pdf'))
plt.show()
def plot_coal_build_costs():
"""Plot build costs for candidate coal generators"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.candidate_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['COAL'])
# Initialise figures
fig, ax = plt.subplots()
# Plot build costs for candidate units
data.candidate_units.loc[mask, 'BUILD_COST'].T.plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=5, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Build cost (\$/kW)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(1000))
ax.yaxis.set_minor_locator(MultipleLocator(200))
# Adjust figure placement and size
fig.subplots_adjust(top=0.85, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.6)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'build_costs_coal.pdf'))
plt.show()
def plot_gas_build_costs():
"""Plotting candidate gas generator build costs"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.candidate_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['GAS'])
# Initialise figures
fig, ax = plt.subplots()
# Plot build costs for candidate units
data.candidate_units.loc[mask, 'BUILD_COST'].T.plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=5, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Build cost (\$/kW)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(1000))
ax.yaxis.set_minor_locator(MultipleLocator(200))
# Adjust figure placement and size
fig.subplots_adjust(top=0.73, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.6)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'build_costs_gas.pdf'))
plt.show()
def plot_solar_build_costs():
"""Plot solar build costs"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.candidate_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['SOLAR'])
# Initialise figures
fig, ax = plt.subplots()
# Plot build costs for candidate units
data.candidate_units.loc[mask, 'BUILD_COST'].T.plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=5, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Build cost (\$/kW)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(1000))
ax.yaxis.set_minor_locator(MultipleLocator(200))
# Adjust figure placement and size
fig.subplots_adjust(top=0.75, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.6)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'build_costs_solar.pdf'))
plt.show()
def plot_wind_build_cost():
"""Plot build costs for candidate wind generators"""
# Class containing model data
data = ModelData()
# Get coal DUIDs
mask = data.candidate_units['PARAMETERS']['FUEL_TYPE_PRIMARY'].isin(['WIND'])
# Initialise figures
fig, ax = plt.subplots()
# Plot build costs for candidate units
data.candidate_units.loc[mask, 'BUILD_COST'].T.plot(ax=ax, cmap='tab20c', alpha=0.9)
# Add legend
ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, ncol=5, mode="expand", borderaxespad=0., prop={'size': 6})
# Add axes labels
ax.set_ylabel('Build cost (\$/kW)')
ax.set_xlabel('Year')
# Format axes ticks
ax.xaxis.set_major_locator(MultipleLocator(5))
ax.xaxis.set_minor_locator(MultipleLocator(1))
ax.yaxis.set_major_locator(MultipleLocator(100))
ax.yaxis.set_minor_locator(MultipleLocator(50))
# Adjust figure placement and size
fig.subplots_adjust(top=0.85, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291 * 0.6)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'build_costs_wind.pdf'))
plt.show()
def plot_demand_profiles(nem_zone='ADE'):
"""Plot demand profiles"""
# Class containing model data
data = ModelData()
df = pd.read_hdf(os.path.join(os.path.dirname(__file__), os.path.pardir, '2_input_traces', 'output', 'dataset.h5'))
df_d = df.loc[:, [('DEMAND', 'ADE')]]
# Data for 20202
df_d = df_d.sort_index()
df_d = df_d.loc[df_d.index.year == 2020, :]
# Day of year
df_d['day_of_year'] = df_d.index.dayofyear.values
# Hour in a given day
df_d['hour'] = df_d.index.hour.values
# Adjust last hour in each day - set as 24th hour
df_d['hour'] = df_d['hour'].replace(0, 24)
plt.clf()
fig, (ax1, ax2) = plt.subplots(nrows=2, sharex=True)
df_d.pivot(index='day_of_year', columns='hour', values=('DEMAND', nem_zone)).T.plot(ax=ax1, legend=False, alpha=0.4,
cmap='viridis')
df_d.pivot(index='day_of_year', columns='hour', values=('DEMAND', nem_zone)).T.plot(ax=ax2, legend=False, alpha=0.1,
cmap='viridis')
# Plot traces obtained from k-means clustering
data.input_traces.loc[2020, ('DEMAND', nem_zone)].T.plot(ax=ax2, color='r', legend=False, alpha=0.8)
ax1.set_ylabel('ADE Demand (MW)')
ax2.set_ylabel('ADE Demand (MW)')
ax2.set_xlabel('Hour')
# Format axes ticks
ax2.xaxis.set_major_locator(MultipleLocator(5))
ax2.xaxis.set_minor_locator(MultipleLocator(1))
ax1.yaxis.set_major_locator(MultipleLocator(500))
ax1.yaxis.set_minor_locator(MultipleLocator(100))
ax2.yaxis.set_major_locator(MultipleLocator(500))
ax2.yaxis.set_minor_locator(MultipleLocator(100))
# Adjust figure placement and size
fig.subplots_adjust(top=0.95, bottom=0.08, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'demand_profiles_{nem_zone}.pdf'))
plt.show()
def plot_wind_capacity_factors(wind_bubble='YPS'):
"""Plotting wind capacity factors for a given wind bubble"""
# Class containing model data
data = ModelData()
df = pd.read_hdf(os.path.join(os.path.dirname(__file__), os.path.pardir, '2_input_traces', 'output', 'dataset.h5'))
df_d = df.loc[:, [('WIND', wind_bubble)]]
# Data for 20202
df_d = df_d.sort_index()
df_d = df_d.loc[df_d.index.year == 2020, :]
# Day of year
df_d['day_of_year'] = df_d.index.dayofyear.values
# Hour in a given day
df_d['hour'] = df_d.index.hour.values
# Adjust last hour in each day - set as 24th hour
df_d['hour'] = df_d['hour'].replace(0, 24)
plt.clf()
fig, (ax1, ax2) = plt.subplots(nrows=2, sharex=True)
df_d.pivot(index='day_of_year', columns='hour', values=('WIND', wind_bubble)).T.plot(ax=ax1, legend=False,
alpha=0.4, cmap='viridis')
df_d.pivot(index='day_of_year', columns='hour', values=('WIND', wind_bubble)).T.plot(ax=ax2, legend=False,
alpha=0.1, cmap='viridis')
# Plot traces obtained from k-means clustering
data.input_traces.loc[2020, ('WIND', wind_bubble)].T.plot(ax=ax2, color='r', legend=False, alpha=0.8)
ax1.set_ylabel(f'{wind_bubble} capacity factor [-]')
ax2.set_ylabel(f'{wind_bubble} capacity factor [-]')
ax2.set_xlabel('Hour')
# Format axes ticks
ax2.xaxis.set_major_locator(MultipleLocator(5))
ax2.xaxis.set_minor_locator(MultipleLocator(1))
ax1.yaxis.set_major_locator(MultipleLocator(0.2))
ax1.yaxis.set_minor_locator(MultipleLocator(0.05))
ax2.yaxis.set_major_locator(MultipleLocator(0.2))
ax2.yaxis.set_minor_locator(MultipleLocator(0.05))
# Adjust figure placement and size
fig.subplots_adjust(top=0.95, bottom=0.08, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures', f'wind_profiles_{wind_bubble}.pdf'))
plt.show()
def plot_solar_capacity_factors(nem_zone='ADE', technology='DAT'):
"""Plot solar capacity factors"""
# Construct solar technology ID based on NEM zone and technology type
tech_id = f'{nem_zone}|{technology}'
# Class containing model data
data = ModelData()
df = pd.read_hdf(os.path.join(os.path.dirname(__file__), os.path.pardir, '2_input_traces', 'output', 'dataset.h5'))
df_d = df.loc[:, [('SOLAR', tech_id)]]
# Data for 2020
df_d = df_d.sort_index()
df_d = df_d.loc[df_d.index.year == 2020, :]
# Day of year
df_d['day_of_year'] = df_d.index.dayofyear.values
# Hour in a given day
df_d['hour'] = df_d.index.hour.values
# Adjust last hour in each day - set as 24th hour
df_d['hour'] = df_d['hour'].replace(0, 24)
plt.clf()
fig, (ax1, ax2) = plt.subplots(nrows=2, sharex=True)
df_d.pivot(index='day_of_year', columns='hour', values=('SOLAR', tech_id)).T.plot(ax=ax1, legend=False,
alpha=0.4, cmap='viridis')
df_d.pivot(index='day_of_year', columns='hour', values=('SOLAR', tech_id)).T.plot(ax=ax2, legend=False,
alpha=0.1, cmap='viridis')
# Plot traces obtained from k-means clustering
data.input_traces.loc[2020, ('SOLAR', tech_id)].T.plot(ax=ax2, color='r', legend=False, alpha=0.8)
ax1.set_ylabel(f'{tech_id} capacity factor [-]')
ax2.set_ylabel(f'{tech_id} capacity factor [-]')
ax2.set_xlabel('Hour')
# Format axes ticks
ax2.xaxis.set_major_locator(MultipleLocator(5))
ax2.xaxis.set_minor_locator(MultipleLocator(1))
ax1.yaxis.set_major_locator(MultipleLocator(0.2))
ax1.yaxis.set_minor_locator(MultipleLocator(0.05))
ax2.yaxis.set_major_locator(MultipleLocator(0.2))
ax2.yaxis.set_minor_locator(MultipleLocator(0.05))
# Adjust figure placement and size
fig.subplots_adjust(top=0.95, bottom=0.08, left=0.1, right=0.95)
fig.set_size_inches(6.69291, 6.69291)
# Save figure
fig.savefig(os.path.join(os.path.dirname(__file__), 'output', 'figures',
f"solar_profiles_{tech_id.replace('|', '-')}.pdf"))
plt.show()
if __name__ == '__main__':
# Create plots
plot_coal_build_costs()
plot_gas_build_costs()
plot_solar_build_costs()
plot_wind_build_cost()
plot_coal_fuel_costs()
plot_gas_fuel_costs()
plot_demand_profiles(nem_zone='ADE')
plot_wind_capacity_factors(wind_bubble='YPS')
plot_solar_capacity_factors(nem_zone='ADE', technology='DAT')
| [
37811,
43328,
5128,
20675,
284,
5874,
786,
1366,
37811,
201,
198,
201,
198,
11748,
28686,
201,
198,
11748,
25064,
201,
198,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
2603,
29487,
8019,
13,
83,
15799,
1330,
20401,
33711,
1352,
201,
198,
201,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
26791,
6,
4008,
201,
198,
201,
198,
6738,
3384,
4487,
13,
7890,
1330,
9104,
6601,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
25140,
62,
25802,
62,
15805,
82,
33529,
201,
198,
220,
220,
220,
37227,
7222,
282,
5252,
3484,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
25687,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
8220,
1847,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
2980,
2024,
287,
1502,
286,
3649,
5252,
1575,
357,
3106,
319,
1575,
287,
938,
614,
8,
201,
198,
220,
220,
220,
17301,
62,
2875,
796,
1366,
13,
25687,
62,
41667,
13,
17946,
58,
27932,
11,
705,
38989,
3698,
62,
8220,
2257,
6,
4083,
51,
13,
346,
420,
58,
12,
16,
4083,
30619,
62,
27160,
22446,
9630,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
5252,
3484,
329,
4683,
4991,
201,
198,
220,
220,
220,
1366,
13,
25687,
62,
41667,
13,
17946,
58,
27932,
11,
705,
38989,
3698,
62,
8220,
2257,
6,
4083,
51,
13,
17946,
58,
45299,
17301,
62,
2875,
4083,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
22,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
42663,
1575,
357,
59,
3,
14,
38,
41,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
16,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
23,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
23,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
705,
25802,
62,
15805,
62,
25140,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
22649,
62,
25802,
62,
15805,
82,
33529,
201,
198,
220,
220,
220,
37227,
43328,
5252,
3484,
329,
4540,
3623,
27298,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
25687,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
38,
1921,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
2980,
2024,
287,
1502,
286,
3649,
5252,
1575,
357,
3106,
319,
1575,
287,
938,
614,
8,
201,
198,
220,
220,
220,
17301,
62,
2875,
796,
1366,
13,
25687,
62,
41667,
13,
17946,
58,
27932,
11,
705,
38989,
3698,
62,
8220,
2257,
6,
4083,
51,
13,
346,
420,
58,
12,
16,
4083,
30619,
62,
27160,
22446,
9630,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
5252,
3484,
329,
4683,
4991,
201,
198,
220,
220,
220,
1366,
13,
25687,
62,
41667,
13,
17946,
58,
27932,
11,
705,
38989,
3698,
62,
8220,
2257,
6,
4083,
51,
13,
17946,
58,
45299,
17301,
62,
2875,
4083,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
22,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
42663,
1575,
357,
59,
3,
14,
38,
41,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
16,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
22,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
23,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
705,
25802,
62,
15805,
62,
22649,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
25140,
62,
11249,
62,
15805,
82,
33529,
201,
198,
220,
220,
220,
37227,
43328,
1382,
3484,
329,
4540,
5655,
27298,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
46188,
20540,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
8220,
1847,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
1382,
3484,
329,
4540,
4991,
201,
198,
220,
220,
220,
1366,
13,
46188,
20540,
62,
41667,
13,
17946,
58,
27932,
11,
705,
19499,
26761,
62,
8220,
2257,
6,
4083,
51,
13,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
20,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15580,
1575,
357,
59,
3,
14,
74,
54,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
12825,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
2167,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
5332,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
21,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
6,
11249,
62,
15805,
82,
62,
25140,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
22649,
62,
11249,
62,
15805,
82,
33529,
201,
198,
220,
220,
220,
37227,
43328,
889,
4540,
3623,
17301,
1382,
3484,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
46188,
20540,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
38,
1921,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
1382,
3484,
329,
4540,
4991,
201,
198,
220,
220,
220,
1366,
13,
46188,
20540,
62,
41667,
13,
17946,
58,
27932,
11,
705,
19499,
26761,
62,
8220,
2257,
6,
4083,
51,
13,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
20,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15580,
1575,
357,
59,
3,
14,
74,
54,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
12825,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
2167,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
4790,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
21,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
6,
11249,
62,
15805,
82,
62,
22649,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
82,
6192,
62,
11249,
62,
15805,
82,
33529,
201,
198,
220,
220,
220,
37227,
43328,
6591,
1382,
3484,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
46188,
20540,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
50,
3535,
1503,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
1382,
3484,
329,
4540,
4991,
201,
198,
220,
220,
220,
1366,
13,
46188,
20540,
62,
41667,
13,
17946,
58,
27932,
11,
705,
19499,
26761,
62,
8220,
2257,
6,
4083,
51,
13,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
20,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15580,
1575,
357,
59,
3,
14,
74,
54,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
12825,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
2167,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
2425,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
21,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
6,
11249,
62,
15805,
82,
62,
82,
6192,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
7972,
62,
11249,
62,
15805,
33529,
201,
198,
220,
220,
220,
37227,
43328,
1382,
3484,
329,
4540,
2344,
27298,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
3497,
5655,
360,
27586,
82,
201,
198,
220,
220,
220,
9335,
796,
1366,
13,
46188,
20540,
62,
41667,
17816,
27082,
2390,
2767,
4877,
6,
7131,
6,
38989,
3698,
62,
25216,
62,
4805,
3955,
13153,
6,
4083,
45763,
7,
17816,
28929,
6,
12962,
201,
198,
201,
198,
220,
220,
220,
1303,
20768,
786,
5538,
201,
198,
220,
220,
220,
2336,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
1382,
3484,
329,
4540,
4991,
201,
198,
220,
220,
220,
1366,
13,
46188,
20540,
62,
41667,
13,
17946,
58,
27932,
11,
705,
19499,
26761,
62,
8220,
2257,
6,
4083,
51,
13,
29487,
7,
897,
28,
897,
11,
269,
8899,
11639,
8658,
1238,
66,
3256,
17130,
28,
15,
13,
24,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
8177,
201,
198,
220,
220,
220,
7877,
13,
1455,
437,
7,
65,
3524,
62,
1462,
62,
3702,
273,
16193,
15,
1539,
352,
13,
2999,
11,
352,
1539,
764,
15377,
828,
1179,
28,
18,
11,
299,
4033,
28,
20,
11,
4235,
2625,
11201,
392,
1600,
4865,
897,
9774,
324,
28,
15,
1539,
2632,
34758,
6,
7857,
10354,
718,
30072,
201,
198,
201,
198,
220,
220,
220,
1303,
3060,
34197,
14722,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
2645,
9608,
10786,
15580,
1575,
357,
59,
3,
14,
74,
54,
8,
11537,
201,
198,
220,
220,
220,
7877,
13,
2617,
62,
87,
18242,
10786,
17688,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
3064,
4008,
201,
198,
220,
220,
220,
7877,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
1120,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
5332,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
1635,
657,
13,
21,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
6,
11249,
62,
15805,
82,
62,
7972,
13,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
28550,
62,
5577,
2915,
7,
77,
368,
62,
11340,
11639,
19266,
6,
2599,
201,
198,
220,
220,
220,
37227,
43328,
3512,
16545,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
47764,
796,
279,
67,
13,
961,
62,
71,
7568,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
28686,
13,
6978,
13,
26037,
343,
11,
705,
17,
62,
15414,
62,
2213,
2114,
3256,
705,
22915,
3256,
705,
19608,
292,
316,
13,
71,
20,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
13,
17946,
58,
45299,
685,
10786,
39429,
6981,
3256,
705,
19266,
11537,
11907,
201,
198,
201,
198,
220,
220,
220,
1303,
6060,
329,
12131,
17,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
30619,
62,
9630,
3419,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
17946,
58,
7568,
62,
67,
13,
9630,
13,
1941,
6624,
12131,
11,
1058,
60,
201,
198,
201,
198,
220,
220,
220,
1303,
3596,
286,
614,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
820,
62,
1659,
62,
1941,
20520,
796,
47764,
62,
67,
13,
9630,
13,
820,
1659,
1941,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
19123,
287,
257,
1813,
1110,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
13,
9630,
13,
9769,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
938,
1711,
287,
1123,
1110,
532,
900,
355,
1987,
400,
1711,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
17816,
9769,
6,
4083,
33491,
7,
15,
11,
1987,
8,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
565,
69,
3419,
201,
198,
220,
220,
220,
2336,
11,
357,
897,
16,
11,
7877,
17,
8,
796,
458,
83,
13,
7266,
489,
1747,
7,
77,
8516,
28,
17,
11,
2648,
87,
28,
17821,
8,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
39429,
6981,
3256,
36945,
62,
11340,
29720,
51,
13,
29487,
7,
897,
28,
897,
16,
11,
8177,
28,
25101,
11,
17130,
28,
15,
13,
19,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
39429,
6981,
3256,
36945,
62,
11340,
29720,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
8177,
28,
25101,
11,
17130,
28,
15,
13,
16,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
20675,
6492,
422,
479,
12,
1326,
504,
32966,
1586,
201,
198,
220,
220,
220,
1366,
13,
15414,
62,
2213,
2114,
13,
17946,
58,
42334,
11,
19203,
39429,
6981,
3256,
36945,
62,
11340,
25295,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
3124,
11639,
81,
3256,
8177,
28,
25101,
11,
17130,
28,
15,
13,
23,
8,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
2617,
62,
2645,
9608,
10786,
19266,
34479,
357,
14326,
8,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
2645,
9608,
10786,
19266,
34479,
357,
14326,
8,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
87,
18242,
10786,
43223,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
4059,
4008,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
3064,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
4059,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
3064,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
3865,
11,
4220,
28,
15,
13,
2919,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
1549,
368,
392,
62,
5577,
2915,
23330,
77,
368,
62,
11340,
27422,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
7972,
62,
42404,
62,
22584,
669,
7,
7972,
62,
46176,
903,
11639,
56,
3705,
6,
2599,
201,
198,
220,
220,
220,
37227,
43328,
889,
2344,
5339,
5087,
329,
257,
1813,
2344,
14310,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
47764,
796,
279,
67,
13,
961,
62,
71,
7568,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
28686,
13,
6978,
13,
26037,
343,
11,
705,
17,
62,
15414,
62,
2213,
2114,
3256,
705,
22915,
3256,
705,
19608,
292,
316,
13,
71,
20,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
13,
17946,
58,
45299,
685,
10786,
28929,
3256,
2344,
62,
46176,
903,
8,
11907,
201,
198,
201,
198,
220,
220,
220,
1303,
6060,
329,
12131,
17,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
30619,
62,
9630,
3419,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
17946,
58,
7568,
62,
67,
13,
9630,
13,
1941,
6624,
12131,
11,
1058,
60,
201,
198,
201,
198,
220,
220,
220,
1303,
3596,
286,
614,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
820,
62,
1659,
62,
1941,
20520,
796,
47764,
62,
67,
13,
9630,
13,
820,
1659,
1941,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
19123,
287,
257,
1813,
1110,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
13,
9630,
13,
9769,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
938,
1711,
287,
1123,
1110,
532,
900,
355,
1987,
400,
1711,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
17816,
9769,
6,
4083,
33491,
7,
15,
11,
1987,
8,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
565,
69,
3419,
201,
198,
220,
220,
220,
2336,
11,
357,
897,
16,
11,
7877,
17,
8,
796,
458,
83,
13,
7266,
489,
1747,
7,
77,
8516,
28,
17,
11,
2648,
87,
28,
17821,
8,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
28929,
3256,
2344,
62,
46176,
903,
29720,
51,
13,
29487,
7,
897,
28,
897,
16,
11,
8177,
28,
25101,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17130,
28,
15,
13,
19,
11,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
28929,
3256,
2344,
62,
46176,
903,
29720,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
8177,
28,
25101,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17130,
28,
15,
13,
16,
11,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
20675,
6492,
422,
479,
12,
1326,
504,
32966,
1586,
201,
198,
220,
220,
220,
1366,
13,
15414,
62,
2213,
2114,
13,
17946,
58,
42334,
11,
19203,
28929,
3256,
2344,
62,
46176,
903,
25295,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
3124,
11639,
81,
3256,
8177,
28,
25101,
11,
17130,
28,
15,
13,
23,
8,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
2617,
62,
2645,
9608,
7,
69,
6,
90,
7972,
62,
46176,
903,
92,
5339,
5766,
25915,
60,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
2645,
9608,
7,
69,
6,
90,
7972,
62,
46176,
903,
92,
220,
5339,
5766,
25915,
60,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
87,
18242,
10786,
43223,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
17,
4008,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
2713,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
17,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
2713,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
3865,
11,
4220,
28,
15,
13,
2919,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
277,
6,
7972,
62,
5577,
2915,
23330,
7972,
62,
46176,
903,
27422,
12315,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
4299,
7110,
62,
82,
6192,
62,
42404,
62,
22584,
669,
7,
77,
368,
62,
11340,
11639,
19266,
3256,
3037,
11639,
35,
1404,
6,
2599,
201,
198,
220,
220,
220,
37227,
43328,
6591,
5339,
5087,
37811,
201,
198,
201,
198,
220,
220,
220,
1303,
28407,
6591,
3037,
4522,
1912,
319,
399,
3620,
6516,
290,
3037,
2099,
201,
198,
220,
220,
220,
7261,
62,
312,
796,
277,
6,
90,
77,
368,
62,
11340,
92,
91,
90,
45503,
92,
6,
201,
198,
201,
198,
220,
220,
220,
1303,
5016,
7268,
2746,
1366,
201,
198,
220,
220,
220,
1366,
796,
9104,
6601,
3419,
201,
198,
201,
198,
220,
220,
220,
47764,
796,
279,
67,
13,
961,
62,
71,
7568,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
28686,
13,
6978,
13,
26037,
343,
11,
705,
17,
62,
15414,
62,
2213,
2114,
3256,
705,
22915,
3256,
705,
19608,
292,
316,
13,
71,
20,
6,
4008,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
13,
17946,
58,
45299,
685,
10786,
50,
3535,
1503,
3256,
7261,
62,
312,
8,
11907,
201,
198,
201,
198,
220,
220,
220,
1303,
6060,
329,
12131,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
30619,
62,
9630,
3419,
201,
198,
220,
220,
220,
47764,
62,
67,
796,
47764,
62,
67,
13,
17946,
58,
7568,
62,
67,
13,
9630,
13,
1941,
6624,
12131,
11,
1058,
60,
201,
198,
201,
198,
220,
220,
220,
1303,
3596,
286,
614,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
820,
62,
1659,
62,
1941,
20520,
796,
47764,
62,
67,
13,
9630,
13,
820,
1659,
1941,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
19123,
287,
257,
1813,
1110,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
13,
9630,
13,
9769,
13,
27160,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
938,
1711,
287,
1123,
1110,
532,
900,
355,
1987,
400,
1711,
201,
198,
220,
220,
220,
47764,
62,
67,
17816,
9769,
20520,
796,
47764,
62,
67,
17816,
9769,
6,
4083,
33491,
7,
15,
11,
1987,
8,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
565,
69,
3419,
201,
198,
220,
220,
220,
2336,
11,
357,
897,
16,
11,
7877,
17,
8,
796,
458,
83,
13,
7266,
489,
1747,
7,
77,
8516,
28,
17,
11,
2648,
87,
28,
17821,
8,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
50,
3535,
1503,
3256,
7261,
62,
312,
29720,
51,
13,
29487,
7,
897,
28,
897,
16,
11,
8177,
28,
25101,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17130,
28,
15,
13,
19,
11,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
47764,
62,
67,
13,
79,
45785,
7,
9630,
11639,
820,
62,
1659,
62,
1941,
3256,
15180,
11639,
9769,
3256,
3815,
28,
10786,
50,
3535,
1503,
3256,
7261,
62,
312,
29720,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
8177,
28,
25101,
11,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17130,
28,
15,
13,
16,
11,
269,
8899,
11639,
37040,
29207,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
28114,
20675,
6492,
422,
479,
12,
1326,
504,
32966,
1586,
201,
198,
220,
220,
220,
1366,
13,
15414,
62,
2213,
2114,
13,
17946,
58,
42334,
11,
19203,
50,
3535,
1503,
3256,
7261,
62,
312,
25295,
51,
13,
29487,
7,
897,
28,
897,
17,
11,
3124,
11639,
81,
3256,
8177,
28,
25101,
11,
17130,
28,
15,
13,
23,
8,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
2617,
62,
2645,
9608,
7,
69,
6,
90,
13670,
62,
312,
92,
5339,
5766,
25915,
60,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
2645,
9608,
7,
69,
6,
90,
13670,
62,
312,
92,
220,
5339,
5766,
25915,
60,
11537,
201,
198,
220,
220,
220,
7877,
17,
13,
2617,
62,
87,
18242,
10786,
43223,
11537,
201,
198,
201,
198,
220,
220,
220,
1303,
18980,
34197,
36066,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
20,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
87,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
16,
4008,
201,
198,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
17,
4008,
201,
198,
220,
220,
220,
7877,
16,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
2713,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
22478,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
17,
4008,
201,
198,
220,
220,
220,
7877,
17,
13,
88,
22704,
13,
2617,
62,
1084,
273,
62,
17946,
1352,
7,
31217,
33711,
1352,
7,
15,
13,
2713,
4008,
201,
198,
201,
198,
220,
220,
220,
1303,
20292,
3785,
13127,
290,
2546,
201,
198,
220,
220,
220,
2336,
13,
7266,
489,
1747,
62,
23032,
7,
4852,
28,
15,
13,
3865,
11,
4220,
28,
15,
13,
2919,
11,
1364,
28,
15,
13,
16,
11,
826,
28,
15,
13,
3865,
8,
201,
198,
220,
220,
220,
2336,
13,
2617,
62,
7857,
62,
45457,
7,
21,
13,
3388,
33551,
11,
718,
13,
3388,
33551,
8,
201,
198,
201,
198,
220,
220,
220,
1303,
12793,
3785,
201,
198,
220,
220,
220,
2336,
13,
21928,
5647,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
22915,
3256,
705,
5647,
942,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
277,
1,
82,
6192,
62,
5577,
2915,
23330,
13670,
62,
312,
13,
33491,
10786,
91,
3256,
705,
12,
11537,
27422,
12315,
48774,
201,
198,
201,
198,
220,
220,
220,
458,
83,
13,
12860,
3419,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1303,
13610,
21528,
201,
198,
220,
220,
220,
7110,
62,
25140,
62,
11249,
62,
15805,
82,
3419,
201,
198,
220,
220,
220,
7110,
62,
22649,
62,
11249,
62,
15805,
82,
3419,
201,
198,
220,
220,
220,
7110,
62,
82,
6192,
62,
11249,
62,
15805,
82,
3419,
201,
198,
220,
220,
220,
7110,
62,
7972,
62,
11249,
62,
15805,
3419,
201,
198,
220,
220,
220,
7110,
62,
25140,
62,
25802,
62,
15805,
82,
3419,
201,
198,
220,
220,
220,
7110,
62,
22649,
62,
25802,
62,
15805,
82,
3419,
201,
198,
220,
220,
220,
7110,
62,
28550,
62,
5577,
2915,
7,
77,
368,
62,
11340,
11639,
19266,
11537,
201,
198,
220,
220,
220,
7110,
62,
7972,
62,
42404,
62,
22584,
669,
7,
7972,
62,
46176,
903,
11639,
56,
3705,
11537,
201,
198,
220,
220,
220,
7110,
62,
82,
6192,
62,
42404,
62,
22584,
669,
7,
77,
368,
62,
11340,
11639,
19266,
3256,
3037,
11639,
35,
1404,
11537,
201,
198
] | 2.112475 | 7,086 |
from flask import Blueprint, render_template
from app import mongo_utils
from bson import json_util
import json
mod_whatis = Blueprint('whatis', __name__, url_prefix='/sta-je-glasomer')
@mod_whatis.route('/', methods=['GET'])
| [
6738,
42903,
1330,
39932,
11,
8543,
62,
28243,
198,
198,
6738,
598,
1330,
285,
25162,
62,
26791,
198,
6738,
275,
1559,
1330,
33918,
62,
22602,
198,
11748,
33918,
198,
4666,
62,
10919,
271,
796,
39932,
10786,
10919,
271,
3256,
11593,
3672,
834,
11,
19016,
62,
40290,
11639,
14,
38031,
12,
18015,
12,
14391,
12057,
11537,
198,
31,
4666,
62,
10919,
271,
13,
38629,
10786,
14,
3256,
5050,
28,
17816,
18851,
6,
12962,
198
] | 3.109589 | 73 |
from django.db import models, migrations
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
11,
15720,
602,
628
] | 3.818182 | 11 |
#!/usr/bin/python
#-*- coding: utf-8 -*-
"""Run Score Credit Habitat"""
from __future__ import print_function
import sys
import logging
from easydatalab.common.app import AppContext
from easydatalab.common.exceptions import ExecutionError
def main():
"""Main entry point for the script."""
cfgFile = 'easydatalab/tests/resources/config/config_for_unittests.cfg'
logCfgFile = 'easydatalab/resources/log_config.yml'
with AppContext(log_config_file=logCfgFile) as appContext:
appContext.logger.info("default logger for %s" % str( appContext) )
appContext.skip_steps( [ 'skipped step' ] )
with appContext.new_configuration(cfgFile) as appConfiguration:
appConfiguration.show()
with appContext.new_step ('something') as step:
if step.enabled():
print("does something")
with appContext.new_step ('skipped step') as step:
if step.enabled():
print("does skipped")
with appContext.new_step ('failed step') as step:
if step.enabled():
raise ExecutionError('step 3', 'failed to complete task')
with appContext.new_step ('something else') as step:
if step.enabled():
print("does something else")
if __name__ == '__main__':
sys.exit(main())
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
10987,
15178,
10504,
41950,
265,
37811,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
25064,
198,
11748,
18931,
198,
198,
6738,
2562,
67,
10254,
397,
13,
11321,
13,
1324,
1330,
2034,
21947,
198,
6738,
2562,
67,
10254,
397,
13,
11321,
13,
1069,
11755,
1330,
37497,
12331,
198,
198,
4299,
1388,
33529,
198,
220,
220,
220,
37227,
13383,
5726,
966,
329,
262,
4226,
526,
15931,
628,
220,
220,
220,
30218,
70,
8979,
796,
705,
38171,
67,
10254,
397,
14,
41989,
14,
37540,
14,
11250,
14,
11250,
62,
1640,
62,
403,
715,
3558,
13,
37581,
6,
198,
220,
220,
220,
2604,
34,
40616,
8979,
796,
705,
38171,
67,
10254,
397,
14,
37540,
14,
6404,
62,
11250,
13,
88,
4029,
6,
628,
220,
220,
220,
351,
2034,
21947,
7,
6404,
62,
11250,
62,
7753,
28,
6404,
34,
40616,
8979,
8,
355,
598,
21947,
25,
198,
220,
220,
220,
220,
220,
220,
220,
598,
21947,
13,
6404,
1362,
13,
10951,
7203,
12286,
49706,
329,
4064,
82,
1,
4064,
965,
7,
598,
21947,
8,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
598,
21947,
13,
48267,
62,
20214,
7,
685,
705,
8135,
3949,
2239,
6,
2361,
1267,
628,
220,
220,
220,
220,
220,
220,
220,
351,
598,
21947,
13,
3605,
62,
11250,
3924,
7,
37581,
8979,
8,
355,
598,
38149,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
598,
38149,
13,
12860,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
598,
21947,
13,
3605,
62,
9662,
19203,
18927,
11537,
355,
2239,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2239,
13,
25616,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
22437,
1223,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
598,
21947,
13,
3605,
62,
9662,
19203,
8135,
3949,
2239,
11537,
355,
2239,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2239,
13,
25616,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
22437,
26684,
4943,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
598,
21947,
13,
3605,
62,
9662,
19203,
47904,
2239,
11537,
355,
2239,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2239,
13,
25616,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
37497,
12331,
10786,
9662,
513,
3256,
705,
47904,
284,
1844,
4876,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
598,
21947,
13,
3605,
62,
9662,
19203,
18927,
2073,
11537,
355,
2239,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
2239,
13,
25616,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
22437,
1223,
2073,
4943,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
25064,
13,
37023,
7,
12417,
28955,
198
] | 2.388985 | 581 |
import socket
import zmq
from shared.daemon_ports import get_port
from shared.messaging.sock import create_sub_sock
# Send from replayd -> videod
if __name__ == "__main__":
"""
context = zmq.Context()
port = get_port("replayd")
socket = create_sub_sock(context, port)
"""
videosocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print("Connecting...")
connected = False
while not connected:
try:
videosocket.connect(("localhost", 4444))
connected = True
except ConnectionRefusedError as e:
pass
print("Connected...")
while True:
data = videosocket.recv(1024)
print(data)
| [
11748,
17802,
198,
11748,
1976,
76,
80,
198,
198,
6738,
4888,
13,
6814,
7966,
62,
3742,
1330,
651,
62,
634,
198,
6738,
4888,
13,
37348,
3039,
13,
82,
735,
1330,
2251,
62,
7266,
62,
82,
735,
198,
198,
2,
16290,
422,
24788,
67,
4613,
18784,
375,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
4732,
796,
1976,
76,
80,
13,
21947,
3419,
198,
220,
220,
220,
2493,
796,
651,
62,
634,
7203,
260,
1759,
67,
4943,
198,
220,
220,
220,
17802,
796,
2251,
62,
7266,
62,
82,
735,
7,
22866,
11,
2493,
8,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
5861,
5459,
796,
17802,
13,
44971,
7,
44971,
13,
8579,
62,
1268,
2767,
11,
17802,
13,
50,
11290,
62,
2257,
32235,
8,
628,
220,
220,
220,
3601,
7203,
13313,
278,
9313,
8,
198,
220,
220,
220,
5884,
796,
10352,
198,
220,
220,
220,
981,
407,
5884,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5861,
5459,
13,
8443,
7,
7203,
36750,
1600,
604,
30272,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5884,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
2845,
26923,
8134,
1484,
12331,
355,
304,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1208,
198,
220,
220,
220,
3601,
7203,
13313,
276,
9313,
8,
628,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1366,
796,
5861,
5459,
13,
8344,
85,
7,
35500,
8,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
7890,
8,
198
] | 2.428571 | 287 |
import os
import re
import setuptools
description = "Standard development tooling for Bocadillo"
with open("README.md", "r") as readme:
long_description = readme.read()
NAME = "bocadillo-cli"
PACKAGE = "bocadillo_cli"
GITHUB = "https://github.com/bocadilloproject/bocadillo-cli"
CHANGELOG = f"{GITHUB}/blob/master/CHANGELOG.md"
HERE = os.path.abspath(os.path.dirname(__file__))
setuptools.setup(
name=NAME,
version=find_version(PACKAGE, "version.py"),
author="Florimond Manca",
author_email="[email protected]",
description=description,
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(exclude=["bocadillo_cli.templates"]),
include_package_data=True, # see MANIFEST.in
entry_points={"console_scripts": ["bocadillo=bocadillo_cli.main:cli"]},
install_requires=["click>=7.0, <8.0", "jinja2>=2.10.1"],
python_requires=">=3.6",
url=GITHUB,
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Utilities",
"Topic :: Software Development :: Code Generators",
],
)
| [
11748,
28686,
198,
11748,
302,
198,
11748,
900,
37623,
10141,
198,
198,
11213,
796,
366,
23615,
2478,
2891,
278,
329,
347,
420,
324,
16111,
1,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
1100,
1326,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
1100,
1326,
13,
961,
3419,
198,
198,
20608,
796,
366,
65,
420,
324,
16111,
12,
44506,
1,
198,
47,
8120,
11879,
796,
366,
65,
420,
324,
16111,
62,
44506,
1,
198,
38,
10554,
10526,
796,
366,
5450,
1378,
12567,
13,
785,
14,
65,
420,
324,
359,
404,
305,
752,
14,
65,
420,
324,
16111,
12,
44506,
1,
198,
3398,
15567,
3698,
7730,
796,
277,
1,
90,
38,
10554,
10526,
92,
14,
2436,
672,
14,
9866,
14,
3398,
15567,
3698,
7730,
13,
9132,
1,
198,
39,
9338,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
628,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
220,
220,
220,
1438,
28,
20608,
11,
198,
220,
220,
220,
2196,
28,
19796,
62,
9641,
7,
47,
8120,
11879,
11,
366,
9641,
13,
9078,
12340,
198,
220,
220,
220,
1772,
2625,
26953,
320,
623,
337,
42124,
1600,
198,
220,
220,
220,
1772,
62,
12888,
2625,
2704,
273,
320,
623,
13,
805,
6888,
31,
14816,
13,
785,
1600,
198,
220,
220,
220,
6764,
28,
11213,
11,
198,
220,
220,
220,
890,
62,
11213,
28,
6511,
62,
11213,
11,
198,
220,
220,
220,
890,
62,
11213,
62,
11299,
62,
4906,
2625,
5239,
14,
4102,
2902,
1600,
198,
220,
220,
220,
10392,
28,
2617,
37623,
10141,
13,
19796,
62,
43789,
7,
1069,
9152,
28,
14692,
65,
420,
324,
16111,
62,
44506,
13,
11498,
17041,
8973,
828,
198,
220,
220,
220,
2291,
62,
26495,
62,
7890,
28,
17821,
11,
220,
1303,
766,
17254,
5064,
6465,
13,
259,
198,
220,
220,
220,
5726,
62,
13033,
28,
4895,
41947,
62,
46521,
1298,
14631,
65,
420,
324,
16111,
28,
65,
420,
324,
16111,
62,
44506,
13,
12417,
25,
44506,
8973,
5512,
198,
220,
220,
220,
2721,
62,
47911,
28,
14692,
12976,
29,
28,
22,
13,
15,
11,
1279,
23,
13,
15,
1600,
366,
18594,
6592,
17,
29,
28,
17,
13,
940,
13,
16,
33116,
198,
220,
220,
220,
21015,
62,
47911,
2625,
29,
28,
18,
13,
21,
1600,
198,
220,
220,
220,
19016,
28,
38,
10554,
10526,
11,
198,
220,
220,
220,
5964,
2625,
36393,
1600,
198,
220,
220,
220,
1398,
13350,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
366,
41206,
12678,
7904,
513,
532,
12995,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
31441,
7904,
24371,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
5317,
1631,
7591,
1240,
7904,
34152,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
34156,
7904,
7294,
40,
20010,
1079,
7904,
17168,
13789,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
35364,
15417,
7904,
3594,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
7294,
13362,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
7904,
5514,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
21,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
13,
22,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
33221,
7904,
41086,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
33221,
7904,
10442,
7712,
7904,
6127,
2980,
2024,
1600,
198,
220,
220,
220,
16589,
198,
8,
198
] | 2.515755 | 603 |
# TODO: imports
# REQUIRES: num_items >= 0, capacity >= 0,
# size of item_values >= num_items,
# size of item_weights >= num_items,
# item_values are all >= 0, item_weights are all >= 0
# EFFECTS: Computes the max value that can be obtained by picking
# from a set of num_items items without exceeding the given
# capacity. Choosing item i produces the value item_values[i]
# but uses weight item_weights[i] out of the available
# capacity.
# Must use dynamic programming!
# Build table K[][] in bottom up manner
# TODO: loop through items
# TODO: second loop through weights upto capacity
# TODO: if statement
# TODO: set item and weight to 0
# TODO: if item weights[item-1] is less than weight
K[cap][weight] = max(item_values[cap-1] +
K[cap-1][weight-item_weights[cap-1]], K[cap-1][weight])
# TODO: else
# TODO: set k[item][weight] to previously found answer
# TODO: return K at num_items and capacity
if __name__ == '__main__':
unittest.main(argv=['first-arg-is-ignored'], exit=False)
| [
2,
16926,
46,
25,
17944,
198,
198,
2,
4526,
10917,
4663,
1546,
25,
997,
62,
23814,
18189,
657,
11,
5339,
18189,
657,
11,
198,
2,
220,
220,
220,
220,
220,
197,
2546,
286,
2378,
62,
27160,
18189,
997,
62,
23814,
11,
198,
2,
220,
220,
220,
220,
220,
197,
2546,
286,
2378,
62,
43775,
18189,
997,
62,
23814,
11,
198,
2,
220,
220,
220,
220,
220,
197,
2378,
62,
27160,
389,
477,
18189,
657,
11,
2378,
62,
43775,
389,
477,
18189,
657,
198,
2,
33659,
2943,
4694,
25,
3082,
1769,
262,
3509,
1988,
326,
460,
307,
6492,
416,
10868,
198,
2,
197,
220,
197,
422,
257,
900,
286,
997,
62,
23814,
3709,
1231,
23353,
262,
1813,
198,
2,
197,
220,
197,
5339,
13,
10031,
2752,
2378,
1312,
11073,
262,
1988,
2378,
62,
27160,
58,
72,
60,
198,
2,
197,
220,
197,
475,
3544,
3463,
2378,
62,
43775,
58,
72,
60,
503,
286,
262,
1695,
198,
2,
197,
220,
197,
5339,
13,
198,
2,
197,
34320,
779,
8925,
8300,
0,
628,
198,
220,
220,
220,
1303,
10934,
3084,
509,
58,
7131,
60,
287,
4220,
510,
5642,
198,
220,
220,
220,
1303,
16926,
46,
25,
9052,
832,
3709,
198,
220,
220,
220,
1303,
16926,
46,
25,
1218,
9052,
832,
19590,
18529,
78,
5339,
198,
220,
220,
220,
1303,
16926,
46,
25,
611,
2643,
198,
220,
220,
220,
1303,
16926,
46,
25,
900,
2378,
290,
3463,
284,
657,
198,
220,
220,
220,
1303,
16926,
46,
25,
611,
2378,
19590,
58,
9186,
12,
16,
60,
318,
1342,
621,
3463,
198,
220,
220,
220,
509,
58,
11128,
7131,
6551,
60,
796,
3509,
7,
9186,
62,
27160,
58,
11128,
12,
16,
60,
1343,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
509,
58,
11128,
12,
16,
7131,
6551,
12,
9186,
62,
43775,
58,
11128,
12,
16,
60,
4357,
220,
509,
58,
11128,
12,
16,
7131,
6551,
12962,
198,
220,
220,
220,
1303,
16926,
46,
25,
2073,
198,
220,
220,
220,
1303,
16926,
46,
25,
900,
479,
58,
9186,
7131,
6551,
60,
284,
4271,
1043,
3280,
628,
220,
220,
220,
1303,
16926,
46,
25,
1441,
509,
379,
997,
62,
23814,
290,
5339,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
7,
853,
85,
28,
17816,
11085,
12,
853,
12,
271,
12,
570,
1850,
6,
4357,
8420,
28,
25101,
8,
198
] | 2.647343 | 414 |
# Import a whole load of stuff
from System.IO import *
from System.Drawing import *
from System.Runtime.Remoting import *
from System.Threading import *
from System.Windows.Forms import *
from System.Xml.Serialization import *
from System import *
from DAQ.Environment import *
from EDMConfig import *
| [
2,
17267,
257,
2187,
3440,
286,
3404,
198,
6738,
4482,
13,
9399,
1330,
1635,
198,
6738,
4482,
13,
25302,
278,
1330,
1635,
198,
6738,
4482,
13,
41006,
13,
8413,
10720,
1330,
1635,
198,
6738,
4482,
13,
16818,
278,
1330,
1635,
198,
6738,
4482,
13,
11209,
13,
8479,
82,
1330,
1635,
198,
6738,
4482,
13,
55,
4029,
13,
32634,
1634,
1330,
1635,
198,
6738,
4482,
1330,
1635,
198,
198,
6738,
17051,
48,
13,
31441,
1330,
1635,
198,
6738,
8392,
44,
16934,
1330,
1635,
628,
198
] | 3.630952 | 84 |
import tkinter
| [
11748,
256,
74,
3849,
628
] | 3.2 | 5 |
# Copyright 2017 Mycroft AI 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 re
import json
from abc import ABCMeta, abstractmethod
from requests import post, put, exceptions
from speech_recognition import Recognizer
from queue import Queue
from threading import Thread
from mycroft.api import STTApi, HTTPError
from mycroft.configuration import Configuration
from mycroft.util.log import LOG
from mycroft.util.plugins import load_plugin
class STT(metaclass=ABCMeta):
"""STT Base class, all STT backends derive from this one. """
@staticmethod
def init_language(config_core):
"""Helper method to get language code from Mycroft config."""
lang = config_core.get("lang", "en-US")
langs = lang.split("-")
if len(langs) == 2:
return langs[0].lower() + "-" + langs[1].upper()
return lang
@abstractmethod
def execute(self, audio, language=None):
"""Implementation of STT functionallity.
This method needs to be implemented by the derived class to implement
the specific STT engine connection.
The method gets passed audio and optionally a language code and is
expected to return a text string.
Args:
audio (AudioData): audio recorded by mycroft.
language (str): optional language code
Returns:
str: parsed text
"""
class IBMSTT(TokenSTT):
"""
IBM Speech to Text
Enables IBM Speech to Text access using API key. To use IBM as a
service provider, it must be configured locally in your config file. An
IBM Cloud account with Speech to Text enabled is required (limited free
tier may be available). STT config should match the following format:
"stt": {
"module": "ibm",
"ibm": {
"credential": {
"token": "YOUR_API_KEY"
},
"url": "URL_FROM_SERVICE"
}
}
"""
class YandexSTT(STT):
"""
Yandex SpeechKit STT
To use create service account with role 'editor' in your cloud folder,
create API key for account and add it to local mycroft.conf file.
The STT config will look like this:
"stt": {
"module": "yandex",
"yandex": {
"lang": "en-US",
"credential": {
"api_key": "YOUR_API_KEY"
}
}
}
"""
def requires_pairing(func):
"""Decorator kicking of pairing sequence if client is not allowed access.
Checks the http status of the response if an HTTP error is recieved. If
a 401 status is detected returns "pair my device" to trigger the pairing
skill.
"""
return wrapper
class MycroftSTT(STT):
"""Default mycroft STT."""
@requires_pairing
class MycroftDeepSpeechSTT(STT):
"""Mycroft Hosted DeepSpeech"""
@requires_pairing
class DeepSpeechServerSTT(STT):
"""
STT interface for the deepspeech-server:
https://github.com/MainRo/deepspeech-server
use this if you want to host DeepSpeech yourself
"""
class StreamThread(Thread, metaclass=ABCMeta):
"""ABC class to be used with StreamingSTT class implementations.
This class reads audio chunks from a queue and sends it to a parsing
STT engine.
Args:
queue (Queue): Input Queue
language (str): language code for the current language.
"""
def _get_data(self):
"""Generator reading audio data from queue."""
while True:
d = self.queue.get()
if d is None:
break
yield d
self.queue.task_done()
def run(self):
"""Thread entry point."""
return self.handle_audio_stream(self._get_data(), self.language)
@abstractmethod
def handle_audio_stream(self, audio, language):
"""Handling of audio stream.
Needs to be implemented by derived class to process audio data and
optionally update `self.text` with the current hypothesis.
Argumens:
audio (bytes): raw audio data.
language (str): language code for the current session.
"""
class StreamingSTT(STT, metaclass=ABCMeta):
"""ABC class for threaded streaming STT implemenations."""
def stream_start(self, language=None):
"""Indicate start of new audio stream.
This creates a new thread for handling the incomming audio stream as
it's collected by Mycroft.
Args:
language (str): optional language code for the new stream.
"""
self.stream_stop()
language = language or self.lang
self.queue = Queue()
self.stream = self.create_streaming_thread()
self.stream.start()
def stream_data(self, data):
"""Receiver of audio data.
Args:
data (bytes): raw audio data.
"""
self.queue.put(data)
def stream_stop(self):
"""Indicate that the audio stream has ended.
This will tear down the processing thread and collect the result
Returns:
str: parsed text
"""
if self.stream is not None:
self.queue.put(None)
self.stream.join()
text = self.stream.text
self.stream = None
self.queue = None
return text
return None
def execute(self, audio, language=None):
"""End the parsing thread and collect data."""
return self.stream_stop()
@abstractmethod
def create_streaming_thread(self):
"""Create thread for parsing audio chunks.
This method should be implemented by the derived class to return an
instance derived from StreamThread to handle the audio stream and
send it to the STT engine.
Returns:
StreamThread: Thread to handle audio data.
"""
class DeepSpeechStreamServerSTT(StreamingSTT):
"""
Streaming STT interface for the deepspeech-server:
https://github.com/JPEWdev/deep-dregs
use this if you want to host DeepSpeech yourself
STT config will look like this:
"stt": {
"module": "deepspeech_stream_server",
"deepspeech_stream_server": {
"stream_uri": "http://localhost:8080/stt?format=16K_PCM16"
...
"""
class GoogleCloudStreamingSTT(StreamingSTT):
"""
Streaming STT interface for Google Cloud Speech-To-Text
To use pip install google-cloud-speech and add the
Google API key to local mycroft.conf file. The STT config
will look like this:
"stt": {
"module": "google_cloud_streaming",
"google_cloud_streaming": {
"credential": {
"json": {
# Paste Google API JSON here
...
"""
def load_stt_plugin(module_name):
"""Wrapper function for loading stt plugin.
Args:
module_name (str): Mycroft stt module name from config
Returns:
class: STT plugin class
"""
return load_plugin('mycroft.plugin.stt', module_name)
| [
2,
15069,
2177,
2011,
36714,
9552,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
198,
11748,
302,
198,
11748,
33918,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
198,
6738,
7007,
1330,
1281,
11,
1234,
11,
13269,
198,
6738,
4046,
62,
26243,
653,
1330,
31517,
7509,
198,
6738,
16834,
1330,
4670,
518,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
6738,
616,
36714,
13,
15042,
1330,
3563,
5603,
14415,
11,
14626,
12331,
198,
6738,
616,
36714,
13,
11250,
3924,
1330,
28373,
198,
6738,
616,
36714,
13,
22602,
13,
6404,
1330,
41605,
198,
6738,
616,
36714,
13,
22602,
13,
37390,
1330,
3440,
62,
33803,
628,
198,
4871,
3563,
51,
7,
4164,
330,
31172,
28,
24694,
48526,
2599,
198,
220,
220,
220,
37227,
2257,
51,
7308,
1398,
11,
477,
3563,
51,
736,
2412,
27099,
422,
428,
530,
13,
37227,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
2315,
62,
16129,
7,
11250,
62,
7295,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
47429,
2446,
284,
651,
3303,
2438,
422,
2011,
36714,
4566,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
42392,
796,
4566,
62,
7295,
13,
1136,
7203,
17204,
1600,
366,
268,
12,
2937,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
300,
27725,
796,
42392,
13,
35312,
7203,
12,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
17204,
82,
8,
6624,
362,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
300,
27725,
58,
15,
4083,
21037,
3419,
1343,
366,
21215,
1343,
300,
27725,
58,
16,
4083,
45828,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
42392,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
12260,
7,
944,
11,
6597,
11,
3303,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3546,
32851,
286,
3563,
51,
2163,
439,
414,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
2446,
2476,
284,
307,
9177,
416,
262,
10944,
1398,
284,
3494,
198,
220,
220,
220,
220,
220,
220,
220,
262,
2176,
3563,
51,
3113,
4637,
13,
628,
220,
220,
220,
220,
220,
220,
220,
383,
2446,
3011,
3804,
6597,
290,
42976,
257,
3303,
2438,
290,
318,
198,
220,
220,
220,
220,
220,
220,
220,
2938,
284,
1441,
257,
2420,
4731,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6597,
357,
21206,
6601,
2599,
6597,
6264,
416,
616,
36714,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3303,
357,
2536,
2599,
11902,
3303,
2438,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
965,
25,
44267,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
628,
628,
628,
198,
198,
4871,
19764,
2257,
51,
7,
30642,
2257,
51,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
19764,
24709,
284,
8255,
198,
220,
220,
220,
220,
220,
220,
220,
2039,
2977,
19764,
24709,
284,
8255,
1895,
1262,
7824,
1994,
13,
1675,
779,
19764,
355,
257,
198,
220,
220,
220,
220,
220,
220,
220,
2139,
10131,
11,
340,
1276,
307,
17839,
15726,
287,
534,
4566,
2393,
13,
1052,
198,
220,
220,
220,
220,
220,
220,
220,
19764,
10130,
1848,
351,
24709,
284,
8255,
9343,
318,
2672,
357,
10698,
1479,
198,
220,
220,
220,
220,
220,
220,
220,
14249,
743,
307,
1695,
737,
3563,
51,
4566,
815,
2872,
262,
1708,
5794,
25,
628,
220,
220,
220,
220,
220,
220,
220,
366,
301,
83,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21412,
1298,
366,
571,
76,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
571,
76,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
66,
445,
1843,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
30001,
1298,
366,
56,
11698,
62,
17614,
62,
20373,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
8964,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6371,
1298,
366,
21886,
62,
10913,
2662,
62,
35009,
27389,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
37227,
628,
198,
4871,
575,
392,
1069,
2257,
51,
7,
2257,
51,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
575,
392,
1069,
24709,
20827,
3563,
51,
198,
220,
220,
220,
220,
220,
220,
220,
1675,
779,
2251,
2139,
1848,
351,
2597,
705,
35352,
6,
287,
534,
6279,
9483,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2251,
7824,
1994,
329,
1848,
290,
751,
340,
284,
1957,
616,
36714,
13,
10414,
2393,
13,
198,
220,
220,
220,
220,
220,
220,
220,
383,
3563,
51,
4566,
481,
804,
588,
428,
25,
628,
220,
220,
220,
220,
220,
220,
220,
366,
301,
83,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21412,
1298,
366,
88,
392,
1069,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
88,
392,
1069,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17204,
1298,
366,
268,
12,
2937,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
66,
445,
1843,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15042,
62,
2539,
1298,
366,
56,
11698,
62,
17614,
62,
20373,
1,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
220,
220,
220,
220,
1782,
198,
220,
220,
220,
37227,
628,
198,
4299,
4433,
62,
24874,
278,
7,
20786,
2599,
198,
220,
220,
220,
37227,
10707,
273,
1352,
17997,
286,
27356,
8379,
611,
5456,
318,
407,
3142,
1895,
13,
628,
220,
220,
220,
47719,
262,
2638,
3722,
286,
262,
2882,
611,
281,
14626,
4049,
318,
664,
39591,
13,
1002,
198,
220,
220,
220,
257,
22219,
3722,
318,
12326,
5860,
366,
24874,
616,
3335,
1,
284,
7616,
262,
27356,
198,
220,
220,
220,
5032,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
29908,
628,
198,
4871,
2011,
36714,
2257,
51,
7,
2257,
51,
2599,
198,
220,
220,
220,
37227,
19463,
616,
36714,
3563,
51,
526,
15931,
628,
220,
220,
220,
2488,
47911,
62,
24874,
278,
628,
198,
4871,
2011,
36714,
29744,
5248,
3055,
2257,
51,
7,
2257,
51,
2599,
198,
220,
220,
220,
37227,
3666,
36714,
14504,
276,
10766,
5248,
3055,
37811,
628,
220,
220,
220,
2488,
47911,
62,
24874,
278,
628,
198,
4871,
10766,
5248,
3055,
10697,
2257,
51,
7,
2257,
51,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
3563,
51,
7071,
329,
262,
2769,
45862,
12,
15388,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3740,
1378,
12567,
13,
785,
14,
13383,
15450,
14,
22089,
45862,
12,
15388,
198,
220,
220,
220,
220,
220,
220,
220,
779,
428,
611,
345,
765,
284,
2583,
10766,
5248,
3055,
3511,
198,
220,
220,
220,
37227,
628,
198,
4871,
13860,
16818,
7,
16818,
11,
1138,
330,
31172,
28,
24694,
48526,
2599,
198,
220,
220,
220,
37227,
24694,
1398,
284,
307,
973,
351,
43124,
2257,
51,
1398,
25504,
13,
628,
220,
220,
220,
770,
1398,
9743,
6597,
22716,
422,
257,
16834,
290,
12800,
340,
284,
257,
32096,
198,
220,
220,
220,
3563,
51,
3113,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
16834,
357,
34991,
2599,
23412,
4670,
518,
198,
220,
220,
220,
220,
220,
220,
220,
3303,
357,
2536,
2599,
3303,
2438,
329,
262,
1459,
3303,
13,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
4808,
1136,
62,
7890,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
8645,
1352,
3555,
6597,
1366,
422,
16834,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
288,
796,
2116,
13,
36560,
13,
1136,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
288,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7800,
288,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36560,
13,
35943,
62,
28060,
3419,
628,
220,
220,
220,
825,
1057,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
16818,
5726,
966,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
28144,
62,
24051,
62,
5532,
7,
944,
13557,
1136,
62,
7890,
22784,
2116,
13,
16129,
8,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
5412,
62,
24051,
62,
5532,
7,
944,
11,
6597,
11,
3303,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12885,
1359,
286,
6597,
4269,
13,
628,
220,
220,
220,
220,
220,
220,
220,
36557,
284,
307,
9177,
416,
10944,
1398,
284,
1429,
6597,
1366,
290,
198,
220,
220,
220,
220,
220,
220,
220,
42976,
4296,
4600,
944,
13,
5239,
63,
351,
262,
1459,
14078,
13,
628,
220,
220,
220,
220,
220,
220,
220,
20559,
388,
641,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6597,
357,
33661,
2599,
8246,
6597,
1366,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3303,
357,
2536,
2599,
3303,
2438,
329,
262,
1459,
6246,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
198,
4871,
43124,
2257,
51,
7,
2257,
51,
11,
1138,
330,
31172,
28,
24694,
48526,
2599,
198,
220,
220,
220,
37227,
24694,
1398,
329,
40945,
11305,
3563,
51,
848,
293,
3653,
602,
526,
15931,
628,
220,
220,
220,
825,
4269,
62,
9688,
7,
944,
11,
3303,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5497,
5344,
923,
286,
649,
6597,
4269,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
8075,
257,
649,
4704,
329,
9041,
262,
753,
2002,
278,
6597,
4269,
355,
198,
220,
220,
220,
220,
220,
220,
220,
340,
338,
7723,
416,
2011,
36714,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3303,
357,
2536,
2599,
11902,
3303,
2438,
329,
262,
649,
4269,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5532,
62,
11338,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
3303,
796,
3303,
393,
2116,
13,
17204,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36560,
796,
4670,
518,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5532,
796,
2116,
13,
17953,
62,
5532,
278,
62,
16663,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5532,
13,
9688,
3419,
628,
220,
220,
220,
825,
4269,
62,
7890,
7,
944,
11,
1366,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3041,
39729,
286,
6597,
1366,
13,
628,
220,
220,
220,
220,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1366,
357,
33661,
2599,
8246,
6597,
1366,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36560,
13,
1996,
7,
7890,
8,
628,
220,
220,
220,
825,
4269,
62,
11338,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
5497,
5344,
326,
262,
6597,
4269,
468,
4444,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
481,
11626,
866,
262,
7587,
4704,
290,
2824,
262,
1255,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
965,
25,
44267,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
611,
2116,
13,
5532,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36560,
13,
1996,
7,
14202,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5532,
13,
22179,
3419,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
796,
2116,
13,
5532,
13,
5239,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
5532,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
36560,
796,
6045,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
6045,
628,
220,
220,
220,
825,
12260,
7,
944,
11,
6597,
11,
3303,
28,
14202,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
12915,
262,
32096,
4704,
290,
2824,
1366,
526,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
1441,
2116,
13,
5532,
62,
11338,
3419,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220,
220,
220,
825,
2251,
62,
5532,
278,
62,
16663,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
16447,
4704,
329,
32096,
6597,
22716,
13,
628,
220,
220,
220,
220,
220,
220,
220,
770,
2446,
815,
307,
9177,
416,
262,
10944,
1398,
284,
1441,
281,
198,
220,
220,
220,
220,
220,
220,
220,
4554,
10944,
422,
13860,
16818,
284,
5412,
262,
6597,
4269,
290,
198,
220,
220,
220,
220,
220,
220,
220,
3758,
340,
284,
262,
3563,
51,
3113,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13860,
16818,
25,
14122,
284,
5412,
6597,
1366,
13,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
628,
198,
198,
4871,
10766,
5248,
3055,
12124,
10697,
2257,
51,
7,
12124,
278,
2257,
51,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
43124,
3563,
51,
7071,
329,
262,
2769,
45862,
12,
15388,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3740,
1378,
12567,
13,
785,
14,
12889,
6217,
7959,
14,
22089,
12,
67,
2301,
82,
198,
220,
220,
220,
220,
220,
220,
220,
779,
428,
611,
345,
765,
284,
2583,
10766,
5248,
3055,
3511,
198,
220,
220,
220,
220,
220,
220,
220,
3563,
51,
4566,
481,
804,
588,
428,
25,
628,
220,
220,
220,
220,
220,
220,
220,
366,
301,
83,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21412,
1298,
366,
22089,
45862,
62,
5532,
62,
15388,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
22089,
45862,
62,
5532,
62,
15388,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
5532,
62,
9900,
1298,
366,
4023,
1378,
36750,
25,
1795,
1795,
14,
301,
83,
30,
18982,
28,
1433,
42,
62,
5662,
44,
1433,
1,
198,
220,
220,
220,
220,
220,
220,
220,
2644,
198,
220,
220,
220,
37227,
628,
198,
198,
4871,
3012,
18839,
12124,
278,
2257,
51,
7,
12124,
278,
2257,
51,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
43124,
3563,
51,
7071,
329,
3012,
10130,
24709,
12,
2514,
12,
8206,
198,
220,
220,
220,
220,
220,
220,
220,
1675,
779,
7347,
2721,
23645,
12,
17721,
12,
45862,
290,
751,
262,
198,
220,
220,
220,
220,
220,
220,
220,
3012,
7824,
1994,
284,
1957,
616,
36714,
13,
10414,
2393,
13,
383,
3563,
51,
4566,
198,
220,
220,
220,
220,
220,
220,
220,
481,
804,
588,
428,
25,
628,
220,
220,
220,
220,
220,
220,
220,
366,
301,
83,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
21412,
1298,
366,
13297,
62,
17721,
62,
5532,
278,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
13297,
62,
17721,
62,
5532,
278,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
66,
445,
1843,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17752,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
23517,
3012,
7824,
19449,
994,
198,
220,
220,
220,
220,
220,
220,
220,
2644,
628,
220,
220,
220,
37227,
628,
628,
628,
198,
4299,
3440,
62,
301,
83,
62,
33803,
7,
21412,
62,
3672,
2599,
198,
220,
220,
220,
37227,
36918,
2848,
2163,
329,
11046,
336,
83,
13877,
13,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
8265,
62,
3672,
357,
2536,
2599,
2011,
36714,
336,
83,
8265,
1438,
422,
4566,
198,
220,
220,
220,
16409,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1398,
25,
3563,
51,
13877,
1398,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
3440,
62,
33803,
10786,
1820,
36714,
13,
33803,
13,
301,
83,
3256,
8265,
62,
3672,
8,
628
] | 2.497264 | 3,107 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class TransformationTryoutResponse(Model):
"""A response representing the status of a transformation config tryout
requset.
:param status: The status of the transformation config tryout.
:type status: str
:param error_message: Any error messages that happened while transforming,
if any.
:type error_message: str
:param results: A list of records that the transformation config outputed.
:type results: list[str]
:param console_output: The console output of the transformation config, if
any. Can be useful for debugging.
:type console_output: list[str]
"""
_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'error_message': {'key': 'errorMessage', 'type': 'str'},
'results': {'key': 'results', 'type': '[str]'},
'console_output': {'key': 'consoleOutput', 'type': '[str]'},
}
| [
2,
15069,
357,
66,
8,
5413,
10501,
13,
201,
198,
2,
49962,
739,
262,
17168,
5964,
13,
201,
198,
201,
198,
2,
19617,
28,
40477,
12,
23,
201,
198,
2,
16529,
35937,
201,
198,
2,
6127,
7560,
416,
5413,
357,
49,
8,
11160,
19452,
6127,
35986,
13,
201,
198,
2,
19179,
743,
2728,
11491,
4069,
290,
481,
307,
2626,
611,
262,
2438,
318,
201,
198,
2,
16935,
515,
13,
201,
198,
2,
16529,
35937,
201,
198,
201,
198,
6738,
13845,
2118,
13,
46911,
1634,
1330,
9104,
201,
198,
201,
198,
201,
198,
4871,
49127,
23433,
448,
31077,
7,
17633,
2599,
201,
198,
220,
220,
220,
37227,
32,
2882,
10200,
262,
3722,
286,
257,
13389,
4566,
1949,
448,
201,
198,
220,
220,
220,
43089,
385,
316,
13,
201,
198,
201,
198,
220,
220,
220,
1058,
17143,
3722,
25,
383,
3722,
286,
262,
13389,
4566,
1949,
448,
13,
201,
198,
220,
220,
220,
1058,
4906,
3722,
25,
965,
201,
198,
220,
220,
220,
1058,
17143,
4049,
62,
20500,
25,
4377,
4049,
6218,
326,
3022,
981,
25449,
11,
201,
198,
220,
220,
220,
220,
611,
597,
13,
201,
198,
220,
220,
220,
1058,
4906,
4049,
62,
20500,
25,
965,
201,
198,
220,
220,
220,
1058,
17143,
2482,
25,
317,
1351,
286,
4406,
326,
262,
13389,
4566,
5072,
276,
13,
201,
198,
220,
220,
220,
1058,
4906,
2482,
25,
1351,
58,
2536,
60,
201,
198,
220,
220,
220,
1058,
17143,
8624,
62,
22915,
25,
383,
8624,
5072,
286,
262,
13389,
4566,
11,
611,
201,
198,
220,
220,
220,
220,
597,
13,
1680,
307,
4465,
329,
28769,
13,
201,
198,
220,
220,
220,
1058,
4906,
8624,
62,
22915,
25,
1351,
58,
2536,
60,
201,
198,
220,
220,
220,
37227,
201,
198,
201,
198,
220,
220,
220,
4808,
42348,
62,
8899,
796,
1391,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
13376,
10354,
1391,
6,
2539,
10354,
705,
13376,
3256,
705,
4906,
10354,
705,
2536,
6,
5512,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
18224,
62,
20500,
10354,
1391,
6,
2539,
10354,
705,
18224,
12837,
3256,
705,
4906,
10354,
705,
2536,
6,
5512,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
43420,
10354,
1391,
6,
2539,
10354,
705,
43420,
3256,
705,
4906,
10354,
44438,
2536,
49946,
5512,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
41947,
62,
22915,
10354,
1391,
6,
2539,
10354,
705,
41947,
26410,
3256,
705,
4906,
10354,
44438,
2536,
49946,
5512,
201,
198,
220,
220,
220,
1782,
201,
198
] | 3.253012 | 415 |
from __future__ import unicode_literals
from dynamic_rest.serializers import (
DynamicModelSerializer,
DynamicRelationField
)
from ..models import TodoProject
from .ShortUserSerializer import ShortUserSerializer
from .ShortTodoStatusSerializer import ShortTodoStatusSerializer
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
8925,
62,
2118,
13,
46911,
11341,
1330,
357,
198,
220,
220,
220,
26977,
17633,
32634,
7509,
11,
198,
220,
220,
220,
26977,
6892,
341,
15878,
198,
8,
198,
198,
6738,
11485,
27530,
1330,
309,
24313,
16775,
198,
6738,
764,
16438,
12982,
32634,
7509,
1330,
10073,
12982,
32634,
7509,
198,
6738,
764,
16438,
51,
24313,
19580,
32634,
7509,
1330,
10073,
51,
24313,
19580,
32634,
7509,
628
] | 3.692308 | 78 |
from typing import Union
import cv2
import numpy as np
import torch
from matplotlib import pyplot as plt, patches
| [
6738,
19720,
1330,
4479,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
11,
16082,
628
] | 3.515152 | 33 |
"""Module for scraping"""
from bs4 import BeautifulSoup
import dateparser
import datetime
class Scraper:
"""Scraper class"""
def get_urls(self):
"""Scrapes posts on a page"""
all_urls = []
# infinite scroll
urls = self.soup.find_all("a", class_="SQnoC3ObvgnGjWt90zD9Z _2INHSNB8V5eaWp4P0rY_mE")
for url in urls:
all_urls.append(url['href'])
return all_urls
| [
37811,
26796,
329,
46743,
37811,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
3128,
48610,
198,
11748,
4818,
8079,
628,
198,
4871,
1446,
38545,
25,
198,
220,
220,
220,
37227,
3351,
38545,
1398,
37811,
628,
220,
220,
220,
825,
651,
62,
6371,
82,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
3351,
2416,
274,
6851,
319,
257,
2443,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
477,
62,
6371,
82,
796,
17635,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
15541,
10743,
198,
220,
220,
220,
220,
220,
220,
220,
2956,
7278,
796,
2116,
13,
82,
10486,
13,
19796,
62,
439,
7203,
64,
1600,
1398,
62,
2625,
50,
48,
3919,
34,
18,
5944,
85,
4593,
38,
73,
54,
83,
3829,
89,
35,
24,
57,
4808,
17,
1268,
7998,
32819,
23,
53,
20,
18213,
54,
79,
19,
47,
15,
81,
56,
62,
76,
36,
4943,
198,
220,
220,
220,
220,
220,
220,
220,
329,
19016,
287,
2956,
7278,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
477,
62,
6371,
82,
13,
33295,
7,
6371,
17816,
33257,
6,
12962,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
477,
62,
6371,
82,
198
] | 2.087805 | 205 |
import unittest
import os
from easycrypto.key import Key
| [
11748,
555,
715,
395,
198,
11748,
28686,
198,
198,
6738,
2562,
29609,
78,
13,
2539,
1330,
7383,
198
] | 3.222222 | 18 |
#!/usr/bin/env python
import os
import argparse
import datetime
from readinglistlib import ReadingListReader
# Configure CLI
fields = ['title', 'url', 'preview', 'date', 'added', 'viewed', 'uuid', 'synckey', 'syncserverid']
ap = argparse.ArgumentParser(description='This script outputs the contents of your Safari Reading List, a queue of temporary bookmarks representing articles you intend to read. By default, it prints the title and url of unread articles in chronological order, beginning with the oldest bookmark. Default output is compliant with CSV conventions.')
ap.add_argument('--separator', action='store', default=',', metavar='SEP', help='Separates field values. Specify \'tab\' to use an actual tab character. Defaults to \',\'.')
ap.add_argument('--quote', action='store', default='"', help='Specify \'\' to suppress quoting. Defaults to \'"\'.')
ap.add_argument('--forcequotes', action='store_true', default=False, help="Quote all field values. By default, only quote empty fields or values containing SEP, QUOTE, or newlines.")
ap.add_argument('--fields', action='store', nargs='+', default=['title', 'url'], choices=fields, metavar='FIELD', help='Controls format of output record. Acceptable fields are title, url, preview, date, added, viewed, uuid, synckey, and syncserverid. Defaults to title and url. (Date is date article was originally bookmarked. If defined, added is date bookmark was synced via iCloud. If defined, viewed is date article was read.)')
ap.add_argument('--header', action='store_true', default=False, help='Output a header record containing field labels.')
ap.add_argument('--timestamp', action='store', default='%a %b %d %H:%M:%S %Y', metavar='FORMAT', help='Controls format of date, added, and viewed fields. Understands strftime directives. Defaults to \'%%a %%b %%d %%H:%%M:%%S %%Y\' (eg, \'' + datetime.datetime.now().strftime('%a %b %d %H:%M:%S %Y') + '\').')
ap.add_argument('--bookmarks', action='store_true', default=False, help='Output items in Netscape bookmarks file format. Overrides preceding tabular output options.')
ap.add_argument('--show', action='store', default='unread', choices=['unread', 'read', 'all'], metavar='FILTER', help='Control which items to output. Acceptable FILTER values are unread, read, or all. Defaults to unread.')
ap.add_argument('--sortfield', action='store', default='date', choices=fields, metavar='FIELD', help="Controls how output is sorted. Defaults to date.")
ap.add_argument('--sortorder', action='store', default='ascending', choices=['ascending', 'descending'], metavar='ORDER', help='May be ascending or descending. Defaults to ascending.')
ap.add_argument('--output', action='store', type=argparse.FileType('w'), default='-', help='Output file path. Defaults to stdout.')
ap.add_argument('--input', action='store', default=os.path.expanduser('~/Library/Safari/Bookmarks.plist'), help='Input file path. Assumed to be a Safari bookmarks file formatted as a binary property list. Defaults to ~/Library/Safari/Bookmarks.plist')
args = ap.parse_args()
# Reinterpretation of fiddly options
if 'tab' == args.separator:
args.separator = '\t'
# Input
if not os.path.exists(args.input):
raise SystemExit, "The input file does not exist: %s" % args.input
rlr = ReadingListReader(args.input)
bookmarks = rlr.read(
show = None if 'all' == args.show else args.show,
sortfield = args.sortfield,
ascending = True if 'ascending' == args.sortorder else False,
dateformat = args.timestamp)
if args.bookmarks:
# Netscape Bookmarks File formatted output
# eg http://msdn.microsoft.com/en-us/library/ie/aa753582(v=vs.85).aspx
print >> args.output, '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<HTML>\n<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">\n<Title>Bookmarks</Title>\n<H1>Bookmarks</H1>\n<DT><H3 FOLDED>Reading List Bookmarks</H3>\n<DL>'
for bookmark in bookmarks:
print >> args.output, ' <DT><A HREF="%s">%s</A>' % (bookmark['url'].encode('utf-8'), bookmark['title'].encode('utf-8'))
print >> args.output, '</DL>\n</HTML>'
else:
# CSV or custom tabular formatted output
# Accepts a value. Tests if it should be quoted and, if so, returns quoted
# value with any quote characters escaped via duplication.
# Quoting rules derived from:
# https://tools.ietf.org/html/rfc4180
# http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
# Accepts a list of values. Prints record with separators and, if required, quotes.
# Header record
if True == args.header:
output_record(args.fields)
for bookmark in bookmarks:
field_values = []
for field in args.fields:
field_value = bookmark[field]
field_values.append(field_value.encode('utf-8'))
output_record(field_values)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
4818,
8079,
198,
198,
6738,
3555,
4868,
8019,
1330,
11725,
8053,
33634,
198,
198,
2,
17056,
495,
43749,
198,
25747,
796,
37250,
7839,
3256,
705,
6371,
3256,
705,
3866,
1177,
3256,
705,
4475,
3256,
705,
29373,
3256,
705,
1177,
276,
3256,
705,
12303,
312,
3256,
705,
27261,
2539,
3256,
705,
27261,
15388,
312,
20520,
198,
499,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
1212,
4226,
23862,
262,
10154,
286,
534,
23298,
11725,
7343,
11,
257,
16834,
286,
8584,
1492,
14306,
10200,
6685,
345,
14765,
284,
1100,
13,
2750,
4277,
11,
340,
20842,
262,
3670,
290,
19016,
286,
555,
961,
6685,
287,
45946,
1502,
11,
3726,
351,
262,
13325,
44007,
13,
15161,
5072,
318,
31332,
351,
44189,
21396,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
25512,
1352,
3256,
2223,
11639,
8095,
3256,
4277,
28,
3256,
3256,
1138,
615,
283,
11639,
5188,
47,
3256,
1037,
11639,
19117,
283,
689,
2214,
3815,
13,
18291,
1958,
34373,
8658,
43054,
284,
779,
281,
4036,
7400,
2095,
13,
2896,
13185,
284,
3467,
3256,
43054,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
22708,
3256,
2223,
11639,
8095,
3256,
4277,
11639,
1,
3256,
1037,
11639,
22882,
1958,
34373,
43054,
284,
18175,
28411,
13,
2896,
13185,
284,
3467,
29653,
43054,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
3174,
421,
6421,
3256,
2223,
11639,
8095,
62,
7942,
3256,
4277,
28,
25101,
11,
1037,
2625,
25178,
477,
2214,
3815,
13,
2750,
4277,
11,
691,
9577,
6565,
7032,
393,
3815,
7268,
7946,
47,
11,
19604,
23051,
11,
393,
649,
6615,
19570,
198,
499,
13,
2860,
62,
49140,
10786,
438,
25747,
3256,
2223,
11639,
8095,
3256,
299,
22046,
11639,
10,
3256,
4277,
28,
17816,
7839,
3256,
705,
6371,
6,
4357,
7747,
28,
25747,
11,
1138,
615,
283,
11639,
44603,
3256,
1037,
11639,
15988,
82,
5794,
286,
5072,
1700,
13,
21699,
540,
7032,
389,
3670,
11,
19016,
11,
12714,
11,
3128,
11,
2087,
11,
9569,
11,
334,
27112,
11,
17510,
2539,
11,
290,
17510,
15388,
312,
13,
2896,
13185,
284,
3670,
290,
19016,
13,
357,
10430,
318,
3128,
2708,
373,
6198,
1492,
23505,
13,
1002,
5447,
11,
2087,
318,
3128,
220,
44007,
373,
6171,
771,
2884,
42076,
13,
1002,
5447,
11,
9569,
318,
3128,
2708,
373,
1100,
2014,
11537,
198,
499,
13,
2860,
62,
49140,
10786,
438,
25677,
3256,
2223,
11639,
8095,
62,
7942,
3256,
4277,
28,
25101,
11,
1037,
11639,
26410,
257,
13639,
1700,
7268,
2214,
14722,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
16514,
27823,
3256,
2223,
11639,
8095,
3256,
4277,
11639,
4,
64,
4064,
65,
4064,
67,
4064,
39,
25,
4,
44,
25,
4,
50,
4064,
56,
3256,
1138,
615,
283,
11639,
21389,
1404,
3256,
1037,
11639,
15988,
82,
5794,
286,
3128,
11,
2087,
11,
290,
9569,
7032,
13,
45010,
82,
965,
31387,
34819,
13,
2896,
13185,
284,
34373,
16626,
64,
43313,
65,
43313,
67,
43313,
39,
25,
16626,
44,
25,
16626,
50,
43313,
56,
43054,
357,
1533,
11,
3467,
7061,
1343,
4818,
8079,
13,
19608,
8079,
13,
2197,
22446,
2536,
31387,
10786,
4,
64,
4064,
65,
4064,
67,
4064,
39,
25,
4,
44,
25,
4,
50,
4064,
56,
11537,
1343,
705,
59,
27691,
11537,
198,
499,
13,
2860,
62,
49140,
10786,
438,
2070,
14306,
3256,
2223,
11639,
8095,
62,
7942,
3256,
4277,
28,
25101,
11,
1037,
11639,
26410,
3709,
287,
27811,
36435,
1492,
14306,
2393,
5794,
13,
3827,
81,
1460,
18148,
7400,
934,
5072,
3689,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
12860,
3256,
2223,
11639,
8095,
3256,
4277,
11639,
403,
961,
3256,
7747,
28,
17816,
403,
961,
3256,
705,
961,
3256,
705,
439,
6,
4357,
1138,
615,
283,
11639,
46700,
5781,
3256,
1037,
11639,
15988,
543,
3709,
284,
5072,
13,
21699,
540,
34020,
5781,
3815,
389,
555,
961,
11,
1100,
11,
393,
477,
13,
2896,
13185,
284,
555,
961,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
30619,
3245,
3256,
2223,
11639,
8095,
3256,
4277,
11639,
4475,
3256,
7747,
28,
25747,
11,
1138,
615,
283,
11639,
44603,
3256,
1037,
2625,
15988,
82,
703,
5072,
318,
23243,
13,
2896,
13185,
284,
3128,
19570,
198,
499,
13,
2860,
62,
49140,
10786,
438,
30619,
2875,
3256,
2223,
11639,
8095,
3256,
4277,
11639,
3372,
1571,
3256,
7747,
28,
17816,
3372,
1571,
3256,
705,
20147,
1571,
6,
4357,
1138,
615,
283,
11639,
12532,
1137,
3256,
1037,
11639,
6747,
307,
41988,
393,
31491,
13,
2896,
13185,
284,
41988,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
22915,
3256,
2223,
11639,
8095,
3256,
2099,
28,
853,
29572,
13,
8979,
6030,
10786,
86,
33809,
4277,
11639,
12,
3256,
1037,
11639,
26410,
2393,
3108,
13,
2896,
13185,
284,
14367,
448,
2637,
8,
198,
499,
13,
2860,
62,
49140,
10786,
438,
15414,
3256,
2223,
11639,
8095,
3256,
4277,
28,
418,
13,
6978,
13,
11201,
392,
7220,
10786,
93,
14,
23377,
14,
50,
1878,
2743,
14,
10482,
14306,
13,
489,
396,
33809,
1037,
11639,
20560,
2393,
3108,
13,
2195,
18940,
284,
307,
257,
23298,
1492,
14306,
2393,
39559,
355,
257,
13934,
3119,
1351,
13,
2896,
13185,
284,
47795,
23377,
14,
50,
1878,
2743,
14,
10482,
14306,
13,
489,
396,
11537,
198,
22046,
796,
2471,
13,
29572,
62,
22046,
3419,
198,
198,
2,
797,
27381,
341,
286,
277,
1638,
306,
3689,
198,
361,
705,
8658,
6,
6624,
26498,
13,
25512,
1352,
25,
198,
197,
22046,
13,
25512,
1352,
796,
705,
59,
83,
6,
198,
198,
2,
23412,
198,
361,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
22046,
13,
15414,
2599,
198,
197,
40225,
4482,
30337,
11,
366,
464,
5128,
2393,
857,
407,
2152,
25,
4064,
82,
1,
4064,
26498,
13,
15414,
198,
81,
14050,
796,
11725,
8053,
33634,
7,
22046,
13,
15414,
8,
198,
198,
2070,
14306,
796,
374,
14050,
13,
961,
7,
198,
197,
197,
12860,
796,
6045,
611,
705,
439,
6,
6624,
26498,
13,
12860,
2073,
26498,
13,
12860,
11,
198,
197,
197,
30619,
3245,
796,
26498,
13,
30619,
3245,
11,
198,
197,
197,
3372,
1571,
796,
6407,
611,
705,
3372,
1571,
6,
6624,
26498,
13,
30619,
2875,
2073,
10352,
11,
198,
197,
197,
4475,
18982,
796,
26498,
13,
16514,
27823,
8,
198,
198,
361,
26498,
13,
2070,
14306,
25,
628,
197,
2,
27811,
36435,
4897,
14306,
9220,
39559,
5072,
198,
197,
2,
29206,
2638,
1378,
907,
32656,
13,
40485,
13,
785,
14,
268,
12,
385,
14,
32016,
14,
494,
14,
7252,
2425,
2327,
6469,
7,
85,
28,
14259,
13,
5332,
737,
31740,
198,
197,
198,
197,
4798,
9609,
26498,
13,
22915,
11,
705,
27,
0,
18227,
4177,
56,
11401,
30502,
6173,
45721,
12,
10482,
4102,
12,
7753,
12,
16,
29,
59,
77,
27,
28656,
29,
59,
77,
27,
44,
20892,
14626,
12,
36,
10917,
3824,
2625,
37815,
3525,
12,
25216,
1,
22904,
3525,
2625,
5239,
14,
6494,
26,
34534,
316,
28,
48504,
12,
23,
5320,
59,
77,
27,
19160,
29,
10482,
14306,
3556,
19160,
29,
59,
77,
27,
39,
16,
29,
10482,
14306,
3556,
39,
16,
29,
59,
77,
27,
24544,
6927,
39,
18,
376,
15173,
1961,
29,
36120,
7343,
4897,
14306,
3556,
39,
18,
29,
59,
77,
27,
19260,
29,
6,
198,
197,
1640,
44007,
287,
1492,
14306,
25,
198,
197,
197,
4798,
9609,
26498,
13,
22915,
11,
705,
197,
27,
24544,
6927,
32,
367,
31688,
2625,
4,
82,
5320,
4,
82,
3556,
32,
29,
6,
4064,
357,
2070,
4102,
17816,
6371,
6,
4083,
268,
8189,
10786,
40477,
12,
23,
33809,
44007,
17816,
7839,
6,
4083,
268,
8189,
10786,
40477,
12,
23,
6,
4008,
198,
197,
4798,
9609,
26498,
13,
22915,
11,
705,
3556,
19260,
29,
59,
77,
3556,
28656,
29,
6,
198,
198,
17772,
25,
198,
197,
198,
197,
2,
44189,
393,
2183,
7400,
934,
39559,
5072,
198,
197,
198,
197,
2,
21699,
82,
257,
1988,
13,
30307,
611,
340,
815,
307,
10947,
290,
11,
611,
523,
11,
5860,
10947,
198,
197,
2,
1988,
351,
597,
9577,
3435,
13537,
2884,
50124,
13,
198,
197,
2,
2264,
10720,
3173,
10944,
422,
25,
198,
197,
2,
3740,
1378,
31391,
13,
1155,
69,
13,
2398,
14,
6494,
14,
81,
16072,
19,
15259,
198,
197,
2,
2638,
1378,
2503,
13,
20123,
452,
88,
301,
13,
785,
14,
23579,
14,
8001,
2983,
14,
7902,
53,
14,
7902,
53,
486,
13,
19211,
198,
197,
198,
197,
2,
21699,
82,
257,
1351,
286,
3815,
13,
12578,
82,
1700,
351,
2880,
2024,
290,
11,
611,
2672,
11,
13386,
13,
198,
197,
198,
197,
2,
48900,
1700,
198,
197,
361,
6407,
6624,
26498,
13,
25677,
25,
198,
197,
197,
22915,
62,
22105,
7,
22046,
13,
25747,
8,
198,
197,
198,
197,
1640,
44007,
287,
1492,
14306,
25,
198,
197,
197,
3245,
62,
27160,
796,
17635,
198,
197,
197,
198,
197,
197,
1640,
2214,
287,
26498,
13,
25747,
25,
198,
197,
197,
197,
3245,
62,
8367,
796,
44007,
58,
3245,
60,
197,
197,
197,
198,
197,
197,
197,
3245,
62,
27160,
13,
33295,
7,
3245,
62,
8367,
13,
268,
8189,
10786,
40477,
12,
23,
6,
4008,
198,
197,
197,
198,
197,
197,
22915,
62,
22105,
7,
3245,
62,
27160,
8,
198,
197,
198
] | 3.113307 | 1,518 |
########
# autora: [email protected]
# repositório: https://github.com/danielle8farias
# Descrição: Usuário informa nome e sobrenome.
# O programa retorna quantas letras o nome completo possui (excluindo espaços)
# e quantas letras o primeiro nome possui.
########
nome_completo = input('Digite seu nome completo: ')
#count(' ') conta os espaços em branco
#len() retorna o tamanho da string
# retirando espaço entre os nomes
tamanho_completo = len(nome_completo) - nome_completo.count(' ')
print(f'Seu nome completo possui: {tamanho_completo} letras.')
#find() retorna a posição de um caractere
# nesse caso queremos encontrar o primeiro espaço
num = nome_completo.find(' ')
print(f'Seu primeiro nome possui: {num} letras.\n')
| [
7804,
198,
2,
1960,
5799,
25,
288,
6321,
293,
23,
69,
2743,
292,
31,
14816,
13,
785,
220,
198,
2,
1128,
7434,
10205,
27250,
25,
3740,
1378,
12567,
13,
785,
14,
67,
6321,
293,
23,
69,
2743,
292,
198,
2,
39373,
380,
16175,
28749,
25,
471,
2385,
6557,
27250,
4175,
64,
299,
462,
304,
27355,
918,
462,
13,
220,
198,
2,
440,
1430,
64,
1005,
1211,
64,
5554,
292,
1309,
8847,
267,
299,
462,
1224,
1462,
1184,
9019,
357,
1069,
565,
84,
521,
78,
1658,
8957,
16175,
418,
8,
220,
198,
2,
304,
5554,
292,
1309,
8847,
267,
6994,
7058,
299,
462,
1184,
9019,
13,
220,
198,
7804,
198,
198,
77,
462,
62,
785,
1154,
1462,
796,
5128,
10786,
19511,
578,
384,
84,
299,
462,
1224,
1462,
25,
705,
8,
198,
198,
2,
9127,
10786,
705,
8,
542,
64,
28686,
1658,
8957,
16175,
418,
795,
865,
47699,
198,
2,
11925,
3419,
1005,
1211,
64,
267,
256,
10546,
8873,
12379,
4731,
198,
2,
220,
220,
1005,
343,
25440,
1658,
8957,
16175,
78,
920,
260,
28686,
299,
2586,
198,
83,
10546,
8873,
62,
785,
1154,
1462,
796,
18896,
7,
77,
462,
62,
785,
1154,
1462,
8,
532,
299,
462,
62,
785,
1154,
1462,
13,
9127,
10786,
705,
8,
198,
4798,
7,
69,
6,
4653,
84,
299,
462,
1224,
1462,
1184,
9019,
25,
1391,
83,
10546,
8873,
62,
785,
1154,
1462,
92,
1309,
8847,
2637,
8,
198,
2,
19796,
3419,
1005,
1211,
64,
257,
1426,
72,
16175,
28749,
390,
23781,
1097,
529,
567,
198,
2,
220,
220,
299,
35270,
6124,
78,
627,
567,
16785,
2207,
756,
20040,
267,
6994,
7058,
1658,
8957,
16175,
78,
198,
22510,
796,
299,
462,
62,
785,
1154,
1462,
13,
19796,
10786,
705,
8,
198,
4798,
7,
69,
6,
4653,
84,
6994,
7058,
299,
462,
1184,
9019,
25,
1391,
22510,
92,
1309,
8847,
13,
59,
77,
11537,
198
] | 2.411003 | 309 |
print ("tech rachit are here")
| [
4798,
5855,
13670,
374,
620,
270,
389,
994,
4943,
198
] | 3.1 | 10 |
from django.conf.urls import url
from . import views
app_name = 'feedback'
urlpatterns = [
url(r'^article/(?P<slug>[-\w]+)/comment$',
views.comment,
name='comment'),
url(r'^reviewcomment/(?P<comment_id>[0-9]+)/$',
views.reviewcomment,
name='review-comment'),
url(r'^article/(?P<slug>[-\w]+)/like$',
views.like,
name='like'),
]
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
764,
1330,
5009,
628,
198,
1324,
62,
3672,
796,
705,
12363,
1891,
6,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
20205,
29006,
30,
47,
27,
6649,
1018,
36937,
12,
59,
86,
48688,
20679,
23893,
3,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
5009,
13,
23893,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
11639,
23893,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
19023,
23893,
29006,
30,
47,
27,
23893,
62,
312,
36937,
15,
12,
24,
48688,
20679,
3,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
5009,
13,
19023,
23893,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
11639,
19023,
12,
23893,
33809,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
20205,
29006,
30,
47,
27,
6649,
1018,
36937,
12,
59,
86,
48688,
20679,
2339,
3,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
5009,
13,
2339,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
11639,
2339,
33809,
198,
60,
198
] | 2.096774 | 186 |
import logging, sys
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.mail import send_mail
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse, Http404
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from webapp.tools.misc_tools import create_movie_property, person_is_relevant, genre_is_relevant, generate_header_dict, set_msg, check_and_get_session_info, get_type_dict
from webapp.models import Profiles, People, Genres, Movies, Properties, Associations
property_logger = logging.getLogger('log.property')
associate_logger = logging.getLogger('log.associate')
# Display people list
# Person tools including view, delete, edit, suggestion, and movie association tools (add, remove)
# Display genre list
# Genre tools including view, delete, edit, suggestion, and movie association tools (add, remove)
| [
11748,
18931,
11,
25064,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
9515,
13921,
3673,
3109,
396,
11,
3254,
24765,
12331,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
1330,
3758,
62,
4529,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
11,
33523,
9876,
11,
7873,
3673,
2025,
46541,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
11,
367,
29281,
26429,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
62,
1462,
62,
26209,
11,
18941,
198,
6738,
42625,
14208,
13,
28243,
1330,
19390,
21947,
198,
6738,
3992,
1324,
13,
31391,
13,
44374,
62,
31391,
1330,
2251,
62,
41364,
62,
26745,
11,
1048,
62,
271,
62,
49659,
11,
12121,
62,
271,
62,
49659,
11,
7716,
62,
25677,
62,
11600,
11,
900,
62,
19662,
11,
2198,
62,
392,
62,
1136,
62,
29891,
62,
10951,
11,
651,
62,
4906,
62,
11600,
198,
6738,
3992,
1324,
13,
27530,
1330,
4415,
2915,
11,
4380,
11,
5215,
411,
11,
27151,
11,
24946,
11,
3928,
602,
198,
198,
26745,
62,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
6404,
13,
26745,
11537,
198,
562,
47615,
62,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
6404,
13,
562,
47615,
11537,
198,
198,
2,
16531,
661,
1351,
198,
198,
2,
7755,
4899,
1390,
1570,
11,
12233,
11,
4370,
11,
13052,
11,
290,
3807,
8112,
4899,
357,
2860,
11,
4781,
8,
198,
198,
2,
16531,
12121,
1351,
198,
198,
2,
5215,
260,
4899,
1390,
1570,
11,
12233,
11,
4370,
11,
13052,
11,
290,
3807,
8112,
4899,
357,
2860,
11,
4781,
8,
628
] | 3.643382 | 272 |
from waflib import Task
from waflib.TaskGen import feature, before_method, taskgen_method, extension
from waflib.Tools import c_preproc
try:
import cPickle as pickle
except ImportError:
import pickle
template_kernel = """
_MOTOR_PLUGIN_EXPORT void _%(kernel)s(const u32 index, const u32 total,
const minitl::array< minitl::weak<const Motor::KernelScheduler::IMemoryBuffer> >& /*argv*/)
{
motor_forceuse(index);
motor_forceuse(total);
}
_MOTOR_REGISTER_METHOD_NAMED(MOTOR_KERNEL_ID, _%(kernel)s, _%(kernel)s);
"""
template_cpp = """
%(pch)s
#include <motor/config/config.hh>
#include <motor/kernel/simd.hh>
#include <motor/kernel/input/input.hh>
#include <motor/plugin/dynobjectlist.hh>
#include <motor/minitl/array.hh>
#include <motor/plugin.compute.cuda/memorybuffer.hh>
#include <motor/scheduler/kernel/parameters/parameters.hh>
using namespace Kernel;
_MOTOR_REGISTER_PLUGIN(MOTOR_KERNEL_ID, MOTOR_KERNEL_NAME);
%(kernels)s
"""
class nvcc(Task.Task):
"nvcc"
run_str = '${NVCC_CXX} ${NVCC_CXXFLAGS} --fatbin ${NVCC_FRAMEWORKPATH_ST:FRAMEWORKPATH} ${NVCC_CPPPATH_ST:INCPATHS} -DMOTOR_COMPUTE=1 ${NVCC_DEFINES_ST:DEFINES} -D_NVCC=1 ${NVCC_CXX_SRC_F}${SRC[0].abspath()} ${NVCC_CXX_TGT_F} ${TGT}'
ext_out = ['.fatbin']
color = 'GREEN'
class cudac(Task.Task):
"Generates a CUDA binder to call the C++ kernel"
color = 'CYAN'
@feature('motor:cuda:kernel_create')
@before_method('process_source')
@feature('motor:preprocess')
| [
6738,
266,
1878,
8019,
1330,
15941,
198,
6738,
266,
1878,
8019,
13,
25714,
13746,
1330,
3895,
11,
878,
62,
24396,
11,
4876,
5235,
62,
24396,
11,
7552,
198,
6738,
266,
1878,
8019,
13,
33637,
1330,
269,
62,
3866,
36942,
198,
28311,
25,
198,
220,
220,
220,
1330,
269,
31686,
293,
355,
2298,
293,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1330,
2298,
293,
198,
198,
28243,
62,
33885,
796,
37227,
198,
62,
44,
2394,
1581,
62,
6489,
7340,
1268,
62,
6369,
15490,
7951,
4808,
4,
7,
33885,
8,
82,
7,
9979,
334,
2624,
6376,
11,
1500,
334,
2624,
2472,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1500,
949,
270,
75,
3712,
18747,
27,
949,
270,
75,
3712,
38695,
27,
9979,
12533,
3712,
42,
7948,
50,
1740,
18173,
3712,
3955,
368,
652,
28632,
29,
1875,
5,
11900,
853,
85,
16208,
8,
198,
90,
198,
220,
220,
220,
5584,
62,
3174,
1904,
7,
9630,
1776,
198,
220,
220,
220,
5584,
62,
3174,
1904,
7,
23350,
1776,
198,
92,
198,
62,
44,
2394,
1581,
62,
31553,
41517,
62,
49273,
62,
45,
2390,
1961,
7,
44,
2394,
1581,
62,
42,
28778,
3698,
62,
2389,
11,
4808,
4,
7,
33885,
8,
82,
11,
4808,
4,
7,
33885,
8,
82,
1776,
198,
37811,
198,
198,
28243,
62,
20322,
796,
37227,
198,
4,
7,
79,
354,
8,
82,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
11250,
14,
11250,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
33885,
14,
14323,
67,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
33885,
14,
15414,
14,
15414,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
33803,
14,
67,
2047,
15252,
4868,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
1084,
270,
75,
14,
18747,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
33803,
13,
5589,
1133,
13,
66,
15339,
14,
31673,
22252,
13,
12337,
29,
198,
2,
17256,
220,
220,
220,
1279,
76,
20965,
14,
1416,
704,
18173,
14,
33885,
14,
17143,
7307,
14,
17143,
7307,
13,
12337,
29,
198,
198,
3500,
25745,
32169,
26,
198,
198,
62,
44,
2394,
1581,
62,
31553,
41517,
62,
6489,
7340,
1268,
7,
44,
2394,
1581,
62,
42,
28778,
3698,
62,
2389,
11,
42982,
1581,
62,
42,
28778,
3698,
62,
20608,
1776,
198,
198,
4,
7,
74,
44930,
8,
82,
198,
198,
37811,
628,
198,
4871,
299,
85,
535,
7,
25714,
13,
25714,
2599,
198,
220,
220,
220,
366,
48005,
535,
1,
198,
220,
220,
220,
1057,
62,
2536,
796,
705,
38892,
27159,
4093,
62,
34,
8051,
92,
25597,
27159,
4093,
62,
34,
8051,
38948,
50,
92,
1377,
17359,
8800,
25597,
27159,
4093,
62,
10913,
2390,
6217,
14670,
34219,
62,
2257,
25,
10913,
2390,
6217,
14670,
34219,
92,
25597,
27159,
4093,
62,
8697,
10246,
12599,
62,
2257,
25,
1268,
8697,
1404,
7998,
92,
532,
23127,
2394,
1581,
62,
9858,
30076,
36,
28,
16,
25597,
27159,
4093,
62,
7206,
20032,
1546,
62,
2257,
25,
7206,
20032,
1546,
92,
532,
35,
62,
27159,
4093,
28,
16,
25597,
27159,
4093,
62,
34,
8051,
62,
50,
7397,
62,
37,
92,
38892,
50,
7397,
58,
15,
4083,
397,
2777,
776,
3419,
92,
25597,
27159,
4093,
62,
34,
8051,
62,
51,
19555,
62,
37,
92,
25597,
51,
19555,
92,
6,
198,
220,
220,
220,
1070,
62,
448,
796,
685,
4458,
17359,
8800,
20520,
628,
220,
220,
220,
3124,
796,
705,
43016,
6,
628,
198,
4871,
269,
463,
330,
7,
25714,
13,
25714,
2599,
198,
220,
220,
220,
366,
8645,
689,
257,
29369,
5631,
275,
5540,
284,
869,
262,
327,
4880,
9720,
1,
198,
220,
220,
220,
3124,
796,
705,
34,
56,
1565,
6,
628,
198,
31,
30053,
10786,
76,
20965,
25,
66,
15339,
25,
33885,
62,
17953,
11537,
198,
31,
19052,
62,
24396,
10786,
14681,
62,
10459,
11537,
628,
198,
31,
30053,
10786,
76,
20965,
25,
3866,
14681,
11537,
628
] | 2.235725 | 683 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# DFS and convert binary (Accepted), O(n) time and space
# Recursion (Top Voted), O(n) time and space
| [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
28,
15,
11,
1364,
28,
14202,
11,
826,
28,
14202,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100,
796,
1188,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
9464,
796,
1364,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
3506,
796,
826,
198,
220,
220,
220,
1303,
360,
10652,
290,
10385,
13934,
357,
38855,
276,
828,
440,
7,
77,
8,
640,
290,
2272,
628,
220,
220,
220,
1303,
3311,
24197,
357,
9126,
569,
5191,
828,
440,
7,
77,
8,
640,
290,
2272,
198
] | 2.424 | 125 |
import sys
from os import path
ZENMAKE_DIR = path.dirname(path.abspath(__file__))
ZENMAKE_DIR = path.normpath(path.join(ZENMAKE_DIR, path.pardir, 'src', 'zenmake'))
if ZENMAKE_DIR not in sys.path:
sys.path.insert(1, ZENMAKE_DIR)
# for test 'testLoadPyModule()'
something = 'qaz' | [
198,
11748,
25064,
198,
6738,
28686,
1330,
3108,
198,
198,
57,
1677,
5673,
7336,
62,
34720,
796,
3108,
13,
15908,
3672,
7,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
198,
57,
1677,
5673,
7336,
62,
34720,
796,
3108,
13,
27237,
6978,
7,
6978,
13,
22179,
7,
57,
1677,
5673,
7336,
62,
34720,
11,
3108,
13,
26037,
343,
11,
705,
10677,
3256,
705,
4801,
15883,
6,
4008,
198,
198,
361,
1168,
1677,
5673,
7336,
62,
34720,
407,
287,
25064,
13,
6978,
25,
198,
220,
220,
220,
25064,
13,
6978,
13,
28463,
7,
16,
11,
1168,
1677,
5673,
7336,
62,
34720,
8,
198,
198,
2,
329,
1332,
705,
9288,
8912,
20519,
26796,
3419,
6,
198,
18927,
796,
705,
80,
1031,
6
] | 2.344262 | 122 |
# Author: Barrett Baumgartner
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import requests
import logging
THINGSPEAK_URL = 'https://api.thingspeak.com/'
| [
2,
6434,
25,
220,
26971,
8999,
388,
41651,
1008,
198,
2,
220,
198,
2,
220,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
284,
1730,
198,
2,
287,
262,
10442,
1231,
17504,
11,
1390,
1231,
17385,
262,
2489,
198,
2,
284,
779,
11,
4866,
11,
13096,
11,
20121,
11,
7715,
11,
14983,
11,
850,
43085,
11,
290,
14,
273,
3677,
198,
2,
9088,
286,
262,
10442,
11,
290,
284,
8749,
6506,
284,
4150,
262,
10442,
318,
198,
2,
30760,
284,
466,
523,
11,
2426,
284,
262,
1708,
3403,
25,
198,
2,
198,
2,
383,
2029,
6634,
4003,
290,
428,
7170,
4003,
2236,
307,
3017,
287,
198,
2,
477,
9088,
393,
8904,
16690,
286,
262,
10442,
13,
198,
2,
198,
2,
3336,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1600,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
7788,
32761,
6375,
198,
2,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
11,
198,
2,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
5357,
44521,
1268,
10913,
2751,
12529,
13,
3268,
8005,
49261,
50163,
3336,
198,
2,
37195,
20673,
6375,
27975,
38162,
9947,
367,
15173,
4877,
9348,
43031,
19146,
7473,
15529,
47666,
3955,
11,
29506,
25552,
6375,
25401,
198,
2,
43031,
25382,
11,
7655,
2767,
16879,
3268,
3537,
40282,
3963,
27342,
10659,
11,
309,
9863,
6375,
25401,
54,
24352,
11,
5923,
1797,
2751,
16034,
11,
198,
2,
16289,
3963,
6375,
3268,
7102,
45,
24565,
13315,
3336,
47466,
6375,
3336,
23210,
6375,
25401,
5550,
1847,
20754,
3268,
198,
2,
3336,
47466,
13,
198,
198,
11748,
7007,
198,
11748,
18931,
198,
198,
39356,
4303,
36,
10206,
62,
21886,
197,
197,
28,
705,
5450,
1378,
15042,
13,
27971,
36729,
13,
785,
14,
6,
198
] | 3.72381 | 315 |
from .BaseEngine import BaseEngine
from .Bing import Bing
from .Baidu import Baidu
| [
6738,
764,
14881,
13798,
1330,
7308,
13798,
198,
6738,
764,
33,
278,
1330,
21631,
198,
6738,
764,
33,
1698,
84,
1330,
347,
1698,
84,
198
] | 3.32 | 25 |
from .aggr_events import devices_event_aggr_data
__all__ = ['REPORTS_TYPE_FUNC']
REPORTS_TYPE_FUNC = {
'devicesEventAggr': devices_event_aggr_data
}
| [
6738,
764,
363,
2164,
62,
31534,
1330,
4410,
62,
15596,
62,
363,
2164,
62,
7890,
628,
198,
834,
439,
834,
796,
37250,
35316,
33002,
62,
25216,
62,
42296,
34,
20520,
628,
198,
35316,
33002,
62,
25216,
62,
42296,
34,
796,
1391,
198,
220,
220,
220,
705,
42034,
9237,
46384,
81,
10354,
4410,
62,
15596,
62,
363,
2164,
62,
7890,
198,
92,
198
] | 2.532258 | 62 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-18 23:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
319,
1584,
12,
2931,
12,
1507,
2242,
25,
2075,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.791045 | 67 |
#!flask/bin/python
from fantasticsearch import fantasticsearch
fantasticsearch.run(debug=True, port=5001)
| [
2,
0,
2704,
2093,
14,
8800,
14,
29412,
198,
6738,
9623,
12947,
1330,
9623,
12947,
198,
198,
69,
415,
3477,
12947,
13,
5143,
7,
24442,
28,
17821,
11,
2493,
28,
4059,
16,
8,
628
] | 3.176471 | 34 |
p = float(input("Enter the principle amount : "))
r = float(input("Enter the rate : "))
t = int(input("Enter the time: "))
a = p * (pow((1 + r / 100), t))
ci = a-p
print("compound interest is : ", ci)
| [
79,
796,
12178,
7,
15414,
7203,
17469,
262,
7989,
2033,
1058,
366,
4008,
198,
81,
796,
12178,
7,
15414,
7203,
17469,
262,
2494,
1058,
366,
4008,
198,
83,
796,
493,
7,
15414,
7203,
17469,
262,
640,
25,
366,
4008,
198,
64,
796,
279,
1635,
357,
79,
322,
19510,
16,
1343,
374,
1220,
1802,
828,
256,
4008,
198,
979,
796,
257,
12,
79,
198,
4798,
7203,
5589,
633,
1393,
318,
1058,
33172,
269,
72,
8,
198
] | 2.68 | 75 |
from selenium.webdriver.common.by import By
from ...constant import timeout
from ...model.type.xpath import XPath
from ..wait.for_element import wait_for_element
| [
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
198,
6738,
2644,
9979,
415,
1330,
26827,
198,
6738,
2644,
19849,
13,
4906,
13,
87,
6978,
1330,
11961,
776,
198,
6738,
11485,
17077,
13,
1640,
62,
30854,
1330,
4043,
62,
1640,
62,
30854,
628
] | 3.416667 | 48 |
import pyworld as pyworld
import pysptk as sptk
import pyreaper as reaper | [
11748,
12972,
6894,
355,
12972,
6894,
198,
11748,
279,
893,
457,
74,
355,
264,
457,
74,
198,
11748,
12972,
260,
2136,
355,
302,
2136
] | 3.041667 | 24 |
import pymongo
# ------------------------- Connect to MongoDB Server ------------------------ #
# connect to MongoDB server:
client = pymongo.MongoClient("mongodb://localhost:27017")
# ----------------------- Switch context to a database ----------------------- #
# get "python_course" database:
db = client.python_course
# ------------------- Show all Collections in the database: ------------------ #
# get all collections in the database:
collections = db.list_collection_names()
# print(collections)
# ---------------------------------- Create ---------------------------------- #
# insert a new document into "todos" collection:
res = db.todos.insert_one({"title": "Learn MongoDB", "done": False})
# get the id of the inserted document:
# print(res.inserted_id)
# insert multiple documents into "todos" collection:
res = db.todos.insert_many([
{"title": "Learn Python", "done": True},
{"title": "Learn Flask", "done": False},
{"title": "Learn Flask-MongoDB", "done": False}
])
# print(res.inserted_ids)
# insert multiple documents with different shape into "todos" collection:
res = db.todos.insert_many([
{"title": "Learn Python", "done": True},
{"title": "Learn Flask", "description":"Learn Flask to develop quick and easy web applications with the ability to scale up."},
{"title": "Learn MongoDB", "due": "2021-12-31"}
])
# print(list(db.todos.find())[-3:-1])
# ----------------------------------- Read ----------------------------------- #
# find first document in "todos" collection:
print(db.todos.find_one())
# find all documents in "todos" collection:
for todo in db.todos.find():
print(todo) | [
11748,
279,
4948,
25162,
198,
198,
2,
220,
22369,
12,
8113,
284,
42591,
11012,
9652,
220,
22369,
1303,
198,
2,
2018,
284,
42591,
11012,
4382,
25,
198,
16366,
796,
279,
4948,
25162,
13,
44,
25162,
11792,
7203,
31059,
375,
65,
1378,
36750,
25,
1983,
29326,
4943,
198,
198,
2,
41436,
6329,
14645,
4732,
284,
257,
6831,
41436,
6329,
1303,
198,
2,
651,
366,
29412,
62,
17319,
1,
6831,
25,
198,
9945,
796,
5456,
13,
29412,
62,
17319,
198,
198,
2,
34400,
6329,
5438,
477,
50004,
287,
262,
6831,
25,
34400,
438,
1303,
198,
2,
651,
477,
17268,
287,
262,
6831,
25,
198,
4033,
26448,
796,
20613,
13,
4868,
62,
43681,
62,
14933,
3419,
198,
2,
3601,
7,
4033,
26448,
8,
198,
198,
2,
20368,
438,
13610,
20368,
438,
1303,
198,
2,
7550,
257,
649,
3188,
656,
366,
83,
375,
418,
1,
4947,
25,
198,
411,
796,
20613,
13,
83,
375,
418,
13,
28463,
62,
505,
7,
4895,
7839,
1298,
366,
20238,
42591,
11012,
1600,
366,
28060,
1298,
10352,
30072,
198,
2,
651,
262,
4686,
286,
262,
18846,
3188,
25,
198,
2,
3601,
7,
411,
13,
28463,
276,
62,
312,
8,
198,
198,
2,
7550,
3294,
4963,
656,
366,
83,
375,
418,
1,
4947,
25,
198,
411,
796,
20613,
13,
83,
375,
418,
13,
28463,
62,
21834,
26933,
198,
197,
4895,
7839,
1298,
366,
20238,
11361,
1600,
366,
28060,
1298,
6407,
5512,
198,
197,
4895,
7839,
1298,
366,
20238,
46947,
1600,
366,
28060,
1298,
10352,
5512,
198,
197,
4895,
7839,
1298,
366,
20238,
46947,
12,
44,
25162,
11012,
1600,
366,
28060,
1298,
10352,
92,
198,
12962,
198,
2,
3601,
7,
411,
13,
28463,
276,
62,
2340,
8,
198,
198,
2,
7550,
3294,
4963,
351,
1180,
5485,
656,
366,
83,
375,
418,
1,
4947,
25,
198,
411,
796,
20613,
13,
83,
375,
418,
13,
28463,
62,
21834,
26933,
198,
197,
4895,
7839,
1298,
366,
20238,
11361,
1600,
366,
28060,
1298,
6407,
5512,
198,
197,
4895,
7839,
1298,
366,
20238,
46947,
1600,
366,
11213,
2404,
20238,
46947,
284,
1205,
2068,
290,
2562,
3992,
5479,
351,
262,
2694,
284,
5046,
510,
526,
5512,
198,
197,
4895,
7839,
1298,
366,
20238,
42591,
11012,
1600,
366,
23301,
1298,
366,
1238,
2481,
12,
1065,
12,
3132,
20662,
198,
12962,
198,
2,
3601,
7,
4868,
7,
9945,
13,
83,
375,
418,
13,
19796,
28955,
58,
12,
18,
21912,
16,
12962,
628,
198,
2,
20368,
6329,
4149,
20368,
6329,
1303,
198,
2,
1064,
717,
3188,
287,
366,
83,
375,
418,
1,
4947,
25,
198,
4798,
7,
9945,
13,
83,
375,
418,
13,
19796,
62,
505,
28955,
198,
198,
2,
1064,
477,
4963,
287,
366,
83,
375,
418,
1,
4947,
25,
198,
1640,
284,
4598,
287,
20613,
13,
83,
375,
418,
13,
19796,
33529,
198,
197,
4798,
7,
83,
24313,
8
] | 3.518438 | 461 |
from unittest import TestCase
from ..parliamentarians import SenatorClient
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
11485,
1845,
5130,
13517,
1330,
8962,
11792,
628
] | 4.470588 | 17 |
import os
import pytest
import testinfra.utils.ansible_runner
from ansible.template import Templar
from ansible.parsing.dataloader import DataLoader
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@pytest.mark.chain("firo")
@pytest.mark.chain("firo")
@pytest.mark.chain("firo")
| [
11748,
28686,
198,
11748,
12972,
9288,
198,
11748,
1332,
10745,
430,
13,
26791,
13,
504,
856,
62,
16737,
198,
198,
6738,
9093,
856,
13,
28243,
1330,
41741,
198,
6738,
9093,
856,
13,
79,
945,
278,
13,
67,
10254,
1170,
263,
1330,
6060,
17401,
198,
198,
9288,
10745,
430,
62,
4774,
82,
796,
1332,
10745,
430,
13,
26791,
13,
504,
856,
62,
16737,
13,
2025,
82,
856,
49493,
7,
198,
220,
220,
220,
28686,
13,
268,
2268,
17816,
11770,
2538,
34,
24212,
62,
1268,
53,
3525,
15513,
62,
25664,
20520,
737,
1136,
62,
4774,
82,
10786,
439,
11537,
198,
198,
31,
9078,
9288,
13,
4102,
13,
7983,
7203,
69,
7058,
4943,
198,
198,
31,
9078,
9288,
13,
4102,
13,
7983,
7203,
69,
7058,
4943,
198,
198,
31,
9078,
9288,
13,
4102,
13,
7983,
7203,
69,
7058,
4943,
198
] | 2.620438 | 137 |
import torch
import torch.nn as nn
class SPM(nn.Module):
""" Structure Perception Module """
def forward(self,x):
"""
inputs :
x : input feature maps(B X C X H X W)
returns :
out : attention value + input feature
attention: B X C X C
"""
m_batchsize, C, height, width = x.size()
proj_query = x.view(m_batchsize, C, -1)
proj_key = x.view(m_batchsize, C, -1).permute(0, 2, 1)
energy = torch.bmm(proj_query, proj_key)
energy_new = torch.max(energy, -1, keepdim=True)[0].expand_as(energy)-energy
attention = self.softmax(energy_new)
proj_value = x.view(m_batchsize, C, -1)
out = torch.bmm(attention, proj_value)
out = out.view(m_batchsize, C, height, width)
out = out + x
return out
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
4871,
311,
5868,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
32522,
35802,
19937,
37227,
628,
220,
220,
220,
825,
2651,
7,
944,
11,
87,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17311,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2124,
1058,
5128,
3895,
8739,
7,
33,
1395,
327,
1395,
367,
1395,
370,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5860,
1058,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
503,
1058,
3241,
1988,
1343,
5128,
3895,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3241,
25,
347,
1395,
327,
1395,
327,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
285,
62,
43501,
7857,
11,
327,
11,
6001,
11,
9647,
796,
2124,
13,
7857,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
386,
73,
62,
22766,
796,
2124,
13,
1177,
7,
76,
62,
43501,
7857,
11,
327,
11,
532,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
386,
73,
62,
2539,
796,
2124,
13,
1177,
7,
76,
62,
43501,
7857,
11,
327,
11,
532,
16,
737,
16321,
1133,
7,
15,
11,
362,
11,
352,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2568,
796,
28034,
13,
65,
3020,
7,
1676,
73,
62,
22766,
11,
386,
73,
62,
2539,
8,
198,
220,
220,
220,
220,
220,
220,
220,
2568,
62,
3605,
796,
28034,
13,
9806,
7,
22554,
11,
532,
16,
11,
1394,
27740,
28,
17821,
38381,
15,
4083,
11201,
392,
62,
292,
7,
22554,
13219,
22554,
198,
220,
220,
220,
220,
220,
220,
220,
3241,
796,
2116,
13,
4215,
9806,
7,
22554,
62,
3605,
8,
198,
220,
220,
220,
220,
220,
220,
220,
386,
73,
62,
8367,
796,
2124,
13,
1177,
7,
76,
62,
43501,
7857,
11,
327,
11,
532,
16,
8,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
28034,
13,
65,
3020,
7,
1078,
1463,
11,
386,
73,
62,
8367,
8,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
503,
13,
1177,
7,
76,
62,
43501,
7857,
11,
327,
11,
6001,
11,
9647,
8,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
503,
1343,
2124,
628,
220,
220,
220,
220,
220,
220,
220,
1441,
503,
198
] | 2.028103 | 427 |
#!/usr/bin/env python
import sys
sys.path.append("..")
import logging
FORMAT_CONS = '%(asctime)s %(name)-12s %(levelname)8s\t%(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT_CONS)
import puka
client = puka.Client("amqp://localhost/")
promise = client.connect()
client.wait(promise)
for i in range(1000):
promise = client.queue_declare(queue='a%04i' % i)
client.wait(promise)
for i in range(1000):
promise = client.queue_delete(queue='a%04i' % i)
client.wait(promise)
promise = client.close()
client.wait(promise)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
492,
4943,
198,
198,
11748,
18931,
198,
21389,
1404,
62,
10943,
50,
796,
705,
4,
7,
292,
310,
524,
8,
82,
4064,
7,
3672,
13219,
1065,
82,
4064,
7,
5715,
3672,
8,
23,
82,
59,
83,
4,
7,
20500,
8,
82,
6,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
11,
5794,
28,
21389,
1404,
62,
10943,
50,
8,
628,
198,
198,
11748,
279,
14852,
198,
198,
16366,
796,
279,
14852,
13,
11792,
7203,
321,
80,
79,
1378,
36750,
14,
4943,
198,
198,
16963,
786,
796,
5456,
13,
8443,
3419,
198,
16366,
13,
17077,
7,
16963,
786,
8,
198,
198,
1640,
1312,
287,
2837,
7,
12825,
2599,
198,
220,
220,
220,
6991,
796,
5456,
13,
36560,
62,
32446,
533,
7,
36560,
11639,
64,
4,
3023,
72,
6,
4064,
1312,
8,
198,
220,
220,
220,
5456,
13,
17077,
7,
16963,
786,
8,
198,
198,
1640,
1312,
287,
2837,
7,
12825,
2599,
198,
220,
220,
220,
6991,
796,
5456,
13,
36560,
62,
33678,
7,
36560,
11639,
64,
4,
3023,
72,
6,
4064,
1312,
8,
198,
220,
220,
220,
5456,
13,
17077,
7,
16963,
786,
8,
198,
198,
16963,
786,
796,
5456,
13,
19836,
3419,
198,
16366,
13,
17077,
7,
16963,
786,
8,
198
] | 2.48 | 225 |
''' Simulate ARIMA(p, 0, q) model '''
import argparse
import numpy as np
from scipy import stats
def simulate_eps(sigma, size, dist='normal', df=None):
''' Simulate innovation '''
n_samples, length_sample = size
if dist.startswith('n'):
eps = np.random.standard_normal(size) * sigma
elif dist.startswith('t'):
eps = np.random.standard_t(df, size) / np.sqrt(df / (df - 2)) * sigma
elif dist.startswith('exp'):
eps = np.random.exponential(sigma, size) - sigma
else:
raise ValueError(f'Unrecognised distribution "{dist}"')
return eps
def simulate_arima_given_innov(ar, ma, eps):
''' Simulate ARIMA '''
n_samples, length_sample = eps.shape
order_p = len(ar)
order_q = len(ma)
assert order_p >= order_q
samples = np.zeros_like(eps)
samples_pre_innov = np.zeros_like(eps)
for i in range(order_p, length_sample):
samples[:, i] = (samples[:, (i - order_p):i].dot(ar[::-1]) + eps[:, i]
+ eps[:, (i - order_q):i].dot(ma[::-1]))
samples_pre_innov[:, order_p:] = samples[:, order_p:] - eps[:, order_p:]
return np.concatenate([samples[:, None, :], samples_pre_innov[:, None, :],
eps[:, None, :]], axis=1)
def simulate_arima(ar, ma, sigma, size, dist='normal', df=None):
''' Simulate ARIMA '''
eps = simulate_eps(sigma, size, dist, df)
ts = simulate_arima_given_innov(ar, ma, eps)
return ts
def simulate_sv(beta, sigma, intercept, size):
''' Simulate log-variance with AR1 '''
n_samples, length_sample = size
# Generate first the variational part with zero intercept
# Finally add intercept to the entire array
logvar = np.zeros(size)
eps = np.random.standard_normal(size) * sigma
logvar[:, 0] = 3 * eps[:, 0]
for i in range(1, length_sample):
logvar[:, i] = beta * logvar[:, i - 1] + eps[:, i]
var = np.exp(intercept + logvar)
sv = np.random.normal(0, np.sqrt(var / 255), size)
return sv, np.sqrt(var)
def simulate_rs(p0, p00, p10, mu, sigma, size):
''' Simulate regime-switching model '''
n_samples, length_sample = size
eps = [np.random.normal(m, s / np.sqrt(255), size)
for m, s in zip(mu, sigma)]
eps = np.stack(eps, axis=2)
# Simulate regimes
prob0 = np.zeros(size)
regime = np.zeros(size)
prob0[:, 0] = p0
regime[:, 0] = 1 - np.random.binomial(1, p0, n_samples)
for i in range(1, length_sample):
prob0[:, i] = np.where(regime[:, i - 1] == 0, p00, p10)
regime[:, i] = 1 - np.random.binomial(1, prob0[:, i], n_samples)
ts = np.where(regime == 0, eps[:, :, 0], eps[:, :, 1])
return ts, prob0, regime
if __name__ == '__main__':
ar = [0.0868, 0.3667]
ma = [-0.1150, -0.4068]
sigma = .0112
simulation = simulate_arima(5000, 1000, ar, ma, sigma)
simulation_test = simulate_arima(500, 1000, ar, ma, sigma)
np.savez_compressed('simulation', data=simulation)
np.savez_compressed('simulation_test', data=simulation_test)
| [
7061,
6,
3184,
5039,
5923,
3955,
32,
7,
79,
11,
657,
11,
10662,
8,
2746,
705,
7061,
198,
198,
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
9756,
198,
198,
4299,
29308,
62,
25386,
7,
82,
13495,
11,
2546,
11,
1233,
11639,
11265,
3256,
47764,
28,
14202,
2599,
198,
220,
220,
220,
705,
7061,
3184,
5039,
11044,
705,
7061,
198,
220,
220,
220,
299,
62,
82,
12629,
11,
4129,
62,
39873,
796,
2546,
628,
220,
220,
220,
611,
1233,
13,
9688,
2032,
342,
10786,
77,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
304,
862,
796,
45941,
13,
25120,
13,
20307,
62,
11265,
7,
7857,
8,
1635,
264,
13495,
198,
220,
220,
220,
1288,
361,
1233,
13,
9688,
2032,
342,
10786,
83,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
304,
862,
796,
45941,
13,
25120,
13,
20307,
62,
83,
7,
7568,
11,
2546,
8,
1220,
45941,
13,
31166,
17034,
7,
7568,
1220,
357,
7568,
532,
362,
4008,
1635,
264,
13495,
198,
220,
220,
220,
1288,
361,
1233,
13,
9688,
2032,
342,
10786,
11201,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
304,
862,
796,
45941,
13,
25120,
13,
11201,
35470,
7,
82,
13495,
11,
2546,
8,
532,
264,
13495,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
7,
69,
6,
3118,
26243,
1417,
6082,
45144,
17080,
36786,
11537,
628,
220,
220,
220,
1441,
304,
862,
198,
198,
4299,
29308,
62,
283,
8083,
62,
35569,
62,
3732,
709,
7,
283,
11,
17266,
11,
304,
862,
2599,
198,
220,
220,
220,
705,
7061,
3184,
5039,
5923,
3955,
32,
705,
7061,
198,
220,
220,
220,
299,
62,
82,
12629,
11,
4129,
62,
39873,
796,
304,
862,
13,
43358,
220,
628,
220,
220,
220,
1502,
62,
79,
796,
18896,
7,
283,
8,
198,
220,
220,
220,
1502,
62,
80,
796,
18896,
7,
2611,
8,
198,
220,
220,
220,
6818,
1502,
62,
79,
18189,
1502,
62,
80,
628,
220,
220,
220,
8405,
796,
45941,
13,
9107,
418,
62,
2339,
7,
25386,
8,
198,
220,
220,
220,
8405,
62,
3866,
62,
3732,
709,
796,
45941,
13,
9107,
418,
62,
2339,
7,
25386,
8,
628,
220,
220,
220,
329,
1312,
287,
2837,
7,
2875,
62,
79,
11,
4129,
62,
39873,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
8405,
58,
45299,
1312,
60,
796,
357,
82,
12629,
58,
45299,
357,
72,
532,
1502,
62,
79,
2599,
72,
4083,
26518,
7,
283,
58,
3712,
12,
16,
12962,
1343,
304,
862,
58,
45299,
1312,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1343,
304,
862,
58,
45299,
357,
72,
532,
1502,
62,
80,
2599,
72,
4083,
26518,
7,
2611,
58,
3712,
12,
16,
60,
4008,
198,
220,
220,
220,
8405,
62,
3866,
62,
3732,
709,
58,
45299,
1502,
62,
79,
47715,
796,
8405,
58,
45299,
1502,
62,
79,
47715,
532,
304,
862,
58,
45299,
1502,
62,
79,
47715,
628,
220,
220,
220,
1441,
45941,
13,
1102,
9246,
268,
378,
26933,
82,
12629,
58,
45299,
6045,
11,
1058,
4357,
8405,
62,
3866,
62,
3732,
709,
58,
45299,
6045,
11,
1058,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
862,
58,
45299,
6045,
11,
1058,
60,
4357,
16488,
28,
16,
8,
198,
198,
4299,
29308,
62,
283,
8083,
7,
283,
11,
17266,
11,
264,
13495,
11,
2546,
11,
1233,
11639,
11265,
3256,
47764,
28,
14202,
2599,
198,
220,
220,
220,
705,
7061,
3184,
5039,
5923,
3955,
32,
705,
7061,
198,
220,
220,
220,
304,
862,
796,
29308,
62,
25386,
7,
82,
13495,
11,
2546,
11,
1233,
11,
47764,
8,
198,
220,
220,
220,
40379,
796,
29308,
62,
283,
8083,
62,
35569,
62,
3732,
709,
7,
283,
11,
17266,
11,
304,
862,
8,
198,
220,
220,
220,
1441,
40379,
198,
198,
4299,
29308,
62,
21370,
7,
31361,
11,
264,
13495,
11,
15788,
11,
2546,
2599,
198,
220,
220,
220,
705,
7061,
3184,
5039,
2604,
12,
25641,
590,
351,
5923,
16,
705,
7061,
198,
220,
220,
220,
299,
62,
82,
12629,
11,
4129,
62,
39873,
796,
2546,
628,
220,
220,
220,
1303,
2980,
378,
717,
262,
5553,
864,
636,
351,
6632,
15788,
198,
220,
220,
220,
1303,
9461,
751,
15788,
284,
262,
2104,
7177,
198,
220,
220,
220,
2604,
7785,
796,
45941,
13,
9107,
418,
7,
7857,
8,
198,
220,
220,
220,
304,
862,
796,
45941,
13,
25120,
13,
20307,
62,
11265,
7,
7857,
8,
1635,
264,
13495,
198,
220,
220,
220,
220,
198,
220,
220,
220,
2604,
7785,
58,
45299,
657,
60,
796,
513,
1635,
304,
862,
58,
45299,
657,
60,
220,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
16,
11,
4129,
62,
39873,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2604,
7785,
58,
45299,
1312,
60,
796,
12159,
1635,
2604,
7785,
58,
45299,
1312,
532,
352,
60,
1343,
304,
862,
58,
45299,
1312,
60,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1401,
796,
45941,
13,
11201,
7,
3849,
984,
1343,
2604,
7785,
8,
198,
220,
220,
220,
38487,
796,
45941,
13,
25120,
13,
11265,
7,
15,
11,
45941,
13,
31166,
17034,
7,
7785,
1220,
14280,
828,
2546,
8,
198,
220,
220,
220,
1441,
38487,
11,
45941,
13,
31166,
17034,
7,
7785,
8,
198,
198,
4299,
29308,
62,
3808,
7,
79,
15,
11,
279,
405,
11,
279,
940,
11,
38779,
11,
264,
13495,
11,
2546,
2599,
198,
220,
220,
220,
705,
7061,
3184,
5039,
7142,
12,
2032,
19811,
2746,
705,
7061,
198,
220,
220,
220,
299,
62,
82,
12629,
11,
4129,
62,
39873,
796,
2546,
628,
220,
220,
220,
304,
862,
796,
685,
37659,
13,
25120,
13,
11265,
7,
76,
11,
264,
1220,
45941,
13,
31166,
17034,
7,
13381,
828,
2546,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
285,
11,
264,
287,
19974,
7,
30300,
11,
264,
13495,
15437,
198,
220,
220,
220,
304,
862,
796,
45941,
13,
25558,
7,
25386,
11,
16488,
28,
17,
8,
628,
220,
220,
220,
1303,
3184,
5039,
25879,
198,
220,
220,
220,
1861,
15,
796,
45941,
13,
9107,
418,
7,
7857,
8,
198,
220,
220,
220,
7142,
796,
45941,
13,
9107,
418,
7,
7857,
8,
198,
220,
220,
220,
1861,
15,
58,
45299,
657,
60,
796,
279,
15,
198,
220,
220,
220,
7142,
58,
45299,
657,
60,
796,
352,
532,
45941,
13,
25120,
13,
8800,
49070,
7,
16,
11,
279,
15,
11,
299,
62,
82,
12629,
8,
198,
220,
220,
220,
329,
1312,
287,
2837,
7,
16,
11,
4129,
62,
39873,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1861,
15,
58,
45299,
1312,
60,
796,
45941,
13,
3003,
7,
2301,
524,
58,
45299,
1312,
532,
352,
60,
6624,
657,
11,
279,
405,
11,
279,
940,
8,
198,
220,
220,
220,
220,
220,
220,
220,
7142,
58,
45299,
1312,
60,
796,
352,
532,
45941,
13,
25120,
13,
8800,
49070,
7,
16,
11,
1861,
15,
58,
45299,
1312,
4357,
299,
62,
82,
12629,
8,
628,
220,
220,
220,
40379,
796,
45941,
13,
3003,
7,
2301,
524,
6624,
657,
11,
304,
862,
58,
45299,
1058,
11,
657,
4357,
304,
862,
58,
45299,
1058,
11,
352,
12962,
198,
220,
220,
220,
1441,
40379,
11,
1861,
15,
11,
7142,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
610,
796,
685,
15,
13,
2919,
3104,
11,
657,
13,
2623,
3134,
60,
198,
220,
220,
220,
17266,
796,
25915,
15,
13,
1157,
1120,
11,
532,
15,
13,
1821,
3104,
60,
198,
220,
220,
220,
264,
13495,
796,
764,
486,
1065,
628,
220,
220,
220,
18640,
796,
29308,
62,
283,
8083,
7,
27641,
11,
8576,
11,
610,
11,
17266,
11,
264,
13495,
8,
198,
220,
220,
220,
18640,
62,
9288,
796,
29308,
62,
283,
8083,
7,
4059,
11,
8576,
11,
610,
11,
17266,
11,
264,
13495,
8,
628,
220,
220,
220,
45941,
13,
21928,
89,
62,
5589,
2790,
10786,
14323,
1741,
3256,
1366,
28,
14323,
1741,
8,
198,
220,
220,
220,
45941,
13,
21928,
89,
62,
5589,
2790,
10786,
14323,
1741,
62,
9288,
3256,
1366,
28,
14323,
1741,
62,
9288,
8,
198
] | 2.216197 | 1,383 |
# Lint as python3
# Copyright 2020 DeepMind Technologies Limited. 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.
# ============================================================================
"""Code to convert between unity types and python types."""
import copy
import itertools
from typing import Any, Dict, Sequence, Tuple
from dm_alchemy.protos import alchemy_pb2
from dm_alchemy.protos import hypercube_pb2
from dm_alchemy.types import graphs
from dm_alchemy.types import stones_and_potions
from dm_alchemy.types import utils
import frozendict
import numpy as np
from dm_alchemy.protos import color_info_pb2
from dm_alchemy.protos import unity_types_pb2
PotionMap = stones_and_potions.PotionMap
StoneMap = stones_and_potions.StoneMap
AlignedStone = stones_and_potions.AlignedStone
PerceivedStone = stones_and_potions.PerceivedStone
PerceivedPotion = stones_and_potions.PerceivedPotion
LatentStone = stones_and_potions.LatentStone
LatentPotion = stones_and_potions.LatentPotion
MapsAndGraph = Tuple[PotionMap, StoneMap, graphs.Graph]
COLOR_TYPE = alchemy_pb2.PerceptualMappingApplicator.Type.COLOR
SIZE_TYPE = alchemy_pb2.PerceptualMappingApplicator.Type.SIZE
ROUNDNESS_TYPE = alchemy_pb2.PerceptualMappingApplicator.Type.ROUNDNESS
# Colours are defined in AlchemyColors.asset
_STONE_COLOURS = frozendict.frozendict({
'purple': unity_types_pb2.Color(
r=0.52156866, g=0.22745098, b=0.6313726, a=1.0),
'blurple': unity_types_pb2.Color(
r=0.2608, g=0.2667, b=0.5941, a=1.0),
'blue': unity_types_pb2.Color(
r=0.0, g=0.30588236, b=0.5568628, a=1.0)
})
_POTION_COLOURS = frozendict.frozendict({
'green': unity_types_pb2.Color(
r=0.24394463, g=0.6911765, b=0.35806578, a=1.0),
'red': unity_types_pb2.Color(
r=0.9647059, g=0.015686275, b=0.06666667, a=1.0),
'yellow': unity_types_pb2.Color(
r=0.9411765, g=0.84705883, b=0.078431375, a=1.0),
'orange': unity_types_pb2.Color(
r=0.9764706, g=0.4, b=0.10980392, a=1.0),
'turquoise': unity_types_pb2.Color(
r=0.21176471, g=0.72156864, b=0.7411765, a=1.0),
'pink': unity_types_pb2.Color(
r=0.9843137, g=0.43529412, b=0.43529412, a=1.0)
})
# This is the order of perceived axes in unity.
PERCEIVED_AXIS = (COLOR_TYPE, SIZE_TYPE, ROUNDNESS_TYPE)
AXIS_NUMBER = frozendict.frozendict({
a: i for i, a in enumerate(PERCEIVED_AXIS)})
SIZE_NAME_AT_COORD = frozendict.frozendict(
{-1: 'small', 0: 'medium', 1: 'large'})
_STONE_SIZES = frozendict.frozendict(
{'small': 1.0, 'medium': 1.4, 'large': 1.8})
SIZE_AT_COORD = frozendict.frozendict(
{coord: _STONE_SIZES[name] for coord, name in SIZE_NAME_AT_COORD.items()})
_COORD_AT_SIZE = frozendict.frozendict({v: k for k, v in SIZE_AT_COORD.items()})
ROUNDNESS_NAME_AT_COORD = frozendict.frozendict(
{-1: 'pointy', 0: 'somewhat pointy', 1: 'round'})
_STONE_ROUNDNESSES = frozendict.frozendict(
{'pointy': 0.0, 'somewhat pointy': 0.5, 'round': 1.0})
ROUNDNESS_AT_COORD = frozendict.frozendict(
{coord: _STONE_ROUNDNESSES[name]
for coord, name in ROUNDNESS_NAME_AT_COORD.items()})
_COORD_AT_ROUNDNESS = frozendict.frozendict({
v: k for k, v in ROUNDNESS_AT_COORD.items()})
# The colour proto is not hashable so convert to a type which is.
COLOUR_NAME_AT_COORD = frozendict.frozendict(
{-1: 'purple', 0: 'blurple', 1: 'blue'})
COLOUR_AT_COORD = frozendict.frozendict({
coord: _STONE_COLOURS[name]
for coord, name in COLOUR_NAME_AT_COORD.items()})
_COORD_AT_COLOUR = frozendict.frozendict(
{colour_proto_to_hashable(v): k for k, v in COLOUR_AT_COORD.items()})
POTION_COLOUR_AT_PERCEIVED_POTION = frozendict.frozendict({
PerceivedPotion(0, 1): 'green',
PerceivedPotion(0, -1): 'red',
PerceivedPotion(1, 1): 'yellow',
PerceivedPotion(1, -1): 'orange',
PerceivedPotion(2, 1): 'turquoise',
PerceivedPotion(2, -1): 'pink',
})
_PERCEIVED_POTION_AT_POTION_COLOUR = frozendict.frozendict({
colour_proto_to_hashable(_POTION_COLOURS[v]): k
for k, v in POTION_COLOUR_AT_PERCEIVED_POTION.items()})
def to_stone_unity_properties(
perceived_stone: PerceivedStone, latent_stone: LatentStone
) -> alchemy_pb2.StoneProperties:
"""Convert a perceived and latent stone to StoneProperties."""
return alchemy_pb2.StoneProperties(
reward=15 if perceived_stone.reward > 2 else perceived_stone.reward,
latent=latent_stone_to_unity(latent_stone),
**perceptual_features(perceived_stone))
def unity_to_perceived_stone(
stone_properties: alchemy_pb2.StoneProperties
) -> PerceivedStone:
"""Convert StoneProperties to a perceived stone."""
size = _COORD_AT_SIZE[round(stone_properties.size, 1)]
roundness = _COORD_AT_ROUNDNESS[round(stone_properties.roundness, 1)]
colour = _COORD_AT_COLOUR[colour_proto_to_hashable(stone_properties.color)]
# Use numpy object type to store python ints rather than numpy ints.
perceived_coords = np.array([0, 0, 0], dtype=np.float)
perceived_coords[AXIS_NUMBER[SIZE_TYPE]] = size
perceived_coords[AXIS_NUMBER[ROUNDNESS_TYPE]] = roundness
perceived_coords[AXIS_NUMBER[COLOR_TYPE]] = colour
latent_stone = _unity_to_latent_stone(stone_properties.latent)
return PerceivedStone(latent_stone.reward(), perceived_coords)
def _from_stone_unity_properties(
stone_properties: alchemy_pb2.StoneProperties,
rotation: np.ndarray
) -> Tuple[PerceivedStone, AlignedStone, LatentStone]:
"""Convert StoneProperties to a perceived and latent stone."""
latent_stone = _unity_to_latent_stone(stone_properties.latent)
perceived_stone = unity_to_perceived_stone(stone_properties)
aligned_stone = stones_and_potions.align(perceived_stone, rotation)
return perceived_stone, aligned_stone, latent_stone
def to_potion_unity_properties(
perceived_potion: PerceivedPotion, latent_potion: LatentPotion,
graph: graphs.Graph
) -> alchemy_pb2.PotionProperties:
"""Convert a perceived and latent potion and graph to PotionProperties."""
colour_name = POTION_COLOUR_AT_PERCEIVED_POTION[perceived_potion]
colour = get_colour_info((colour_name, _POTION_COLOURS[colour_name]))
reactions = set()
for startnode, endnodes in graph.edge_list.edges.items():
expected_end_coords = copy.deepcopy(startnode.coords)
expected_end_coords[latent_potion.latent_dim] = (
startnode.coords[latent_potion.latent_dim] + 2 *
latent_potion.latent_dir)
expected_end_node = graph.node_list.get_node_by_coords(
expected_end_coords)
if not expected_end_node:
continue
if expected_end_node in endnodes:
reactions.add((startnode.idx, expected_end_node.idx))
reactions = [alchemy_pb2.PotionReaction(from_stone_index=from_stone,
to_stone_index=to_stone)
for from_stone, to_stone in reactions]
sorted_reactions = sorted(
reactions, key=lambda reaction: reaction.from_stone_index)
return alchemy_pb2.PotionProperties(
label=latent_potion_to_unity(latent_potion), reward=0, color=colour,
glow_color=colour, reactions=sorted_reactions)
def _potions_from_potion_unity_properties(
potion: alchemy_pb2.PotionProperties
) -> Tuple[PerceivedPotion, LatentPotion]:
"""Convert the unity representation to a perceived and latent potion."""
return (unity_to_perceived_potion(potion),
_unity_to_latent_potion(potion.label))
def graphs_from_potion_unity_properties(
potions: Sequence[alchemy_pb2.PotionProperties]) -> graphs.Graph:
"""Convert a sequence of PotionProperties to a Graph."""
node_list = graphs.all_nodes_in_graph()
edge_list = graphs.EdgeList()
for i, potion in enumerate(potions):
_, latent = _potions_from_potion_unity_properties(potion)
utils_potion = stones_and_potions.Potion(
i, latent.latent_dim, latent.latent_dir)
for reaction in potion.reactions:
edge_list.add_edge(
node_list.get_node_by_idx(reaction.from_stone_index),
node_list.get_node_by_idx(reaction.to_stone_index),
utils_potion)
return graphs.Graph(node_list, edge_list)
def to_unity_chemistry(
chemistry: utils.Chemistry
) -> Tuple[alchemy_pb2.Chemistry, alchemy_pb2.RotationMapping]:
"""Convert from python types to unity Chemistry object."""
# Latent stones and potions are always in the same places.
latent_stones = stones_and_potions.possible_latent_stones()
latent_potions = stones_and_potions.possible_latent_potions()
# Apply the dimension swapping map between latent stones in unity and latent
# stones in python (see from_unity_chemistry for more explanation).
python_to_unity = PythonToUnityDimMap(chemistry)
python_latent_stones = [python_to_unity.apply_to_stone(latent_stone)
for latent_stone in latent_stones]
python_latent_potions = [python_to_unity.apply_to_potion(latent_potion)
for latent_potion in latent_potions]
# Apply the stone map to them to get perceptual stones.
aligned_stones = [chemistry.stone_map.apply_inverse(stone)
for stone in python_latent_stones]
perceived_stones = [
stones_and_potions.unalign(stone, chemistry.rotation)
for stone in aligned_stones]
unity_stones = [to_stone_unity_properties(perceived, latent)
for perceived, latent in zip(perceived_stones, latent_stones)]
# Apply the potion map to them to get perceptual potions.
perceived_potions = [chemistry.potion_map.apply_inverse(potion)
for potion in python_latent_potions]
unity_potions = [
to_potion_unity_properties(perceived, latent, python_to_unity.graph)
for perceived, latent in zip(perceived_potions, latent_potions)]
unity_chemistry = alchemy_pb2.Chemistry(
stones=unity_stones, potions=unity_potions)
rotation_mapping = rotation_to_unity(python_to_unity.rotation)
return unity_chemistry, rotation_mapping
def rotation_from_unity(
rotation_mapping: alchemy_pb2.RotationMapping
) -> np.ndarray:
"""Get the transformation to undo rotation from unity."""
# Rotate back
angles = [-int(rotation_mapping.rotation_angles.x),
-int(rotation_mapping.rotation_angles.y),
-int(rotation_mapping.rotation_angles.z)]
return stones_and_potions.rotation_from_angles(angles)
def rotation_to_unity(rotation: np.ndarray) -> alchemy_pb2.RotationMapping:
"""Convert the transformation to undo rotation to unity."""
angles = stones_and_potions.rotation_to_angles(rotation)
return alchemy_pb2.RotationMapping(rotation_angles=unity_types_pb2.Vector3(
**{axis: -round(a) for axis, a in zip('xyz', angles)}))
def potion_map_from_potions(
latent_potions: Sequence[LatentPotion],
perceived_potions: Sequence[PerceivedPotion]
) -> PotionMap:
"""Calculate potion map relating latent and perceived potions."""
dimension_map = [-1, -1, -1]
direction_map = [0, 0, 0]
for perceived_potion, latent_potion in zip(perceived_potions, latent_potions):
dimension_map[perceived_potion.perceived_dim] = latent_potion.latent_dim
if latent_potion.latent_dir == perceived_potion.perceived_dir:
direction_map[latent_potion.latent_dim] = 1
else:
direction_map[latent_potion.latent_dim] = -1
return PotionMap(dim_map=dimension_map, dir_map=direction_map)
def find_dim_map_and_stone_map(
chemistry: utils.Chemistry
) -> Tuple[np.ndarray, StoneMap, np.ndarray]:
"""Find a dimension map and stone map which map latent stones to perceived."""
latent_stones = stones_and_potions.possible_latent_stones()
aligned_stones = [chemistry.stone_map.apply_inverse(stone)
for stone in latent_stones]
perceived_stones = [stones_and_potions.unalign(stone, chemistry.rotation)
for stone in aligned_stones]
for dim_map in [np.eye(3, dtype=np.int)[p, :] for p in itertools.permutations(
[0, 1, 2])]:
for stone_map in stones_and_potions.possible_stone_maps():
sm = np.diag(stone_map.latent_pos_dir.astype(np.int))
# Since we do rotation before reflection in this case we must allow
# rotation forwards and backwards to get all cases.
# Because of the scaling this is not just the inverse matrix.
inverse_rotation = stones_and_potions.rotation_from_angles(
[-a for a in stones_and_potions.rotation_to_angles(
chemistry.rotation)])
for rotation in [chemistry.rotation, inverse_rotation]:
all_match = True
for ls, ps in zip(latent_stones, perceived_stones):
new_ls = np.matmul(dim_map, ls.latent_coords.astype(np.int))
ps_prime = np.matmul(sm, np.matmul(np.linalg.inv(rotation), new_ls))
if not all(abs(a - b) < 0.0001 for a, b in zip(
ps_prime, ps.perceived_coords.astype(np.int))):
all_match = False
break
if all_match:
return np.linalg.inv(dim_map), stone_map, rotation
assert False, (
'No dimension map and stone map takes latent stones to the passed '
'perceived stones with the passed rotation.')
def _apply_dim_map_to_graph(
dim_map: np.ndarray, graph: graphs.Graph
) -> graphs.Graph:
"""Swap latent dimensions in graph."""
edge_list = graphs.EdgeList()
for start_node, end_nodes in graph.edge_list.edges.items():
start_coords = np.matmul(dim_map, np.array(start_node.coords)).tolist()
new_start_node = graph.node_list.get_node_by_coords(start_coords)
for end_node, edge in end_nodes.items():
end_coords = np.matmul(dim_map, np.array(end_node.coords)).tolist()
new_end_node = graph.node_list.get_node_by_coords(end_coords)
new_potion = stones_and_potions.Potion(
edge[1].idx, np.where(dim_map[edge[1].dimension, :])[0][0],
edge[1].direction)
edge_list.add_edge(new_start_node, new_end_node, new_potion)
return graphs.Graph(graph.node_list, edge_list)
class PythonToUnityDimMap:
"""Convert from python method of mapping to unity method."""
def from_unity_chemistry(
chemistry: alchemy_pb2.Chemistry,
rotation_mapping: alchemy_pb2.RotationMapping
) -> utils.Chemistry:
"""Convert from unity Chemistry object to corresponding python types.
Args:
chemistry: A chemistry object received from the alchemy unity environment.
rotation_mapping: A rotation mapping object received from the alchemy unity
environment.
Returns:
A PotionMap describing the transformation from potion perceptual space to
latent space.
A StoneMap describing the transformation from stone aligned perceptual space
to latent space.
A Graph describing the available edges in latent space.
A np.ndarray describing the rotation from stone aligned perceptual space to
stone perceptual space.
"""
# In unity the latent stones are (possibly) rotated and then "perceptual
# mapping applicators" are applied to say how this is represented on screen,
# e.g. -1 in the first latent dimension is purple and +1 is blue.
# By only considering 7 possible rotations (0 rotation and 45 degrees
# clockise or anticlockwise about each axis) and just considering in what
# direction perceptual attributes change, when this is combined with the
# mapping of potion pairs to latent space dimensions and assigning a direction
# to that potion pair, we get all mappings which are 45 degrees offset on one
# axis (note that latent variables have the same effect on the reward so
# swapping latent space dimensions has no effect). We get duplicates because
# after rotating, one dimension of the max reward stone will have value 0 so
# reflecting about this does not change the value. However, the configuration
# is such that the task distribution is as it would be if we avoided
# duplicates.
# An alternative way to generate all these mappings without the duplicates
# would be to take the stones latent coordinates and first apply a mapping
# which changes the positive direction and then rotate these positions by 45
# degrees clockwise (excluding anticlockwise rotations).
# It is easier to run algorithms like the ideal observer assuming the second
# breakdown of the mapping because the rotation does not effect the best
# action to take so we can take the perceived coordinates and undo the
# rotation using any plausible rotation (even if it is not the correct one)
# and then maintain a belief state over the remaining aspects of the
# chemistry and update the belief state if we find the rotation was wrong.
# We can switch between these equivalent breakdowns by possibly rotating in
# the opposite direction.
# From unity we get
# perceived_stone = sm * r * latent_stone
# where r rotates plus or minus 45 degrees and sm changes directions, we want
# perceived_stone = r_prime * sm * latent_stone
# where r_prime is rotating clockwise about the axis that r rotates around.
rotation = rotation_from_unity(rotation_mapping)
abs_rotation = stones_and_potions.rotation_from_angles(
[-abs(a) for a in stones_and_potions.rotation_to_angles(rotation)])
python_stones = [_from_stone_unity_properties(stone, abs_rotation)
for stone in chemistry.stones]
python_potions = [_potions_from_potion_unity_properties(potion)
for potion in chemistry.potions]
graph = graphs_from_potion_unity_properties(chemistry.potions)
# So sm_prime is diagonal with elements in {-1, 1} and dim_map is such that
# the sum of each row and each column is 1 with non zero elements 1.
# Let a := sm_prime * dim_map
# a := [a11 a12 a13]
# [a21 a22 a23]
# [a31 a32 a33]
# a * [1, 1, 1] = [a11 + a12 + a13, a21 + a22 + a23, a31 + a32 + a33]
sum_of_each_row = _get_aligned_coords_matching_latent(
python_stones, [1, 1, 1])
stone_map = StoneMap(pos_dir=sum_of_each_row)
sm_prime = np.diag(sum_of_each_row)
# a * [1, 1, 1] - a * [-1, 1, 1] = 2 * [a11, a21, a31]
first_column = ((sum_of_each_row - _get_aligned_coords_matching_latent(
python_stones, [-1, 1, 1]))/2).astype(np.int)
second_column = ((sum_of_each_row - _get_aligned_coords_matching_latent(
python_stones, [1, -1, 1]))/2).astype(np.int)
third_column = ((sum_of_each_row - _get_aligned_coords_matching_latent(
python_stones, [1, 1, -1]))/2).astype(np.int)
a = np.hstack((first_column.reshape((3, 1)), second_column.reshape((3, 1)),
third_column.reshape((3, 1))))
dim_map = np.rint(np.matmul(np.linalg.inv(sm_prime), a)).astype(np.int)
latent_stones = [latent_stone for _, _, latent_stone in python_stones]
aligned_stones = [aligned_stone for _, aligned_stone, _ in python_stones]
latent_stones = [_apply_dim_map_to_stone(dim_map, latent_stone)
for latent_stone in latent_stones]
latent_potions = [latent_potion for _, latent_potion in python_potions]
latent_potions = [_apply_dim_map_to_potion(dim_map, latent_potion)
for latent_potion in latent_potions]
perceived_potions = [perceived_potion
for perceived_potion, _ in python_potions]
graph = _apply_dim_map_to_graph(dim_map, graph)
for aligned_stone, latent_stone in zip(aligned_stones, latent_stones):
assert stone_map.apply(aligned_stone) == latent_stone, (
'Applying the stone map to the aligned stone did not give the '
'expected latent stone.\n{aligned_stone}\n{latent_stone}\n'
'{stone_map}\n{chemistry}'.format(
aligned_stone=aligned_stone, latent_stone=latent_stone,
stone_map=stone_map, chemistry=chemistry))
potion_map = potion_map_from_potions(latent_potions, perceived_potions)
for perceived_potion, latent_potion in zip(perceived_potions, latent_potions):
assert potion_map.apply(perceived_potion) == latent_potion, (
'Applying the potion map to the perceived potion did not give the '
'expected latent potion.{perceived_potion}\n{latent_potion}\n'
'{potion_map}\n{chemistry}'.format(
perceived_potion=perceived_potion, latent_potion=latent_potion,
potion_map=potion_map, chemistry=chemistry))
return utils.Chemistry(potion_map, stone_map, graph, abs_rotation)
| [
2,
406,
600,
355,
21015,
18,
198,
2,
15069,
12131,
10766,
28478,
21852,
15302,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
220,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
2,
38093,
2559,
18604,
198,
37811,
10669,
284,
10385,
1022,
14111,
3858,
290,
21015,
3858,
526,
15931,
198,
198,
11748,
4866,
198,
11748,
340,
861,
10141,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
45835,
11,
309,
29291,
198,
198,
6738,
288,
76,
62,
282,
26599,
13,
11235,
418,
1330,
435,
26599,
62,
40842,
17,
198,
6738,
288,
76,
62,
282,
26599,
13,
11235,
418,
1330,
8718,
40296,
62,
40842,
17,
198,
6738,
288,
76,
62,
282,
26599,
13,
19199,
1330,
28770,
198,
6738,
288,
76,
62,
282,
26599,
13,
19199,
1330,
14966,
62,
392,
62,
13059,
507,
198,
6738,
288,
76,
62,
282,
26599,
13,
19199,
1330,
3384,
4487,
198,
11748,
8400,
89,
437,
713,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
288,
76,
62,
282,
26599,
13,
11235,
418,
1330,
3124,
62,
10951,
62,
40842,
17,
198,
6738,
288,
76,
62,
282,
26599,
13,
11235,
418,
1330,
14111,
62,
19199,
62,
40842,
17,
198,
198,
47,
9650,
13912,
796,
14966,
62,
392,
62,
13059,
507,
13,
47,
9650,
13912,
198,
34346,
13912,
796,
14966,
62,
392,
62,
13059,
507,
13,
34346,
13912,
198,
2348,
3916,
34346,
796,
14966,
62,
392,
62,
13059,
507,
13,
2348,
3916,
34346,
198,
5990,
6471,
34346,
796,
14966,
62,
392,
62,
13059,
507,
13,
5990,
6471,
34346,
198,
5990,
6471,
47,
9650,
796,
14966,
62,
392,
62,
13059,
507,
13,
5990,
6471,
47,
9650,
198,
24220,
298,
34346,
796,
14966,
62,
392,
62,
13059,
507,
13,
24220,
298,
34346,
198,
24220,
298,
47,
9650,
796,
14966,
62,
392,
62,
13059,
507,
13,
24220,
298,
47,
9650,
198,
198,
47010,
1870,
37065,
796,
309,
29291,
58,
47,
9650,
13912,
11,
8026,
13912,
11,
28770,
13,
37065,
60,
198,
198,
46786,
62,
25216,
796,
435,
26599,
62,
40842,
17,
13,
5990,
984,
723,
44,
5912,
33583,
1352,
13,
6030,
13,
46786,
198,
33489,
62,
25216,
796,
435,
26599,
62,
40842,
17,
13,
5990,
984,
723,
44,
5912,
33583,
1352,
13,
6030,
13,
33489,
198,
49,
15919,
31097,
62,
25216,
796,
435,
26599,
62,
40842,
17,
13,
5990,
984,
723,
44,
5912,
33583,
1352,
13,
6030,
13,
49,
15919,
31097,
198,
198,
2,
1623,
4662,
389,
5447,
287,
43987,
5216,
669,
13,
562,
316,
198,
62,
2257,
11651,
62,
25154,
2606,
6998,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
705,
14225,
1154,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
4309,
1314,
3104,
2791,
11,
308,
28,
15,
13,
1828,
4524,
1120,
4089,
11,
275,
28,
15,
13,
5066,
19708,
2075,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
2436,
333,
1154,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
21719,
23,
11,
308,
28,
15,
13,
2075,
3134,
11,
275,
28,
15,
13,
3270,
3901,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
17585,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
15,
11,
308,
28,
15,
13,
1270,
39118,
24940,
11,
275,
28,
15,
13,
2816,
33808,
2078,
11,
257,
28,
16,
13,
15,
8,
198,
30072,
198,
198,
62,
47,
2394,
2849,
62,
25154,
2606,
6998,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
705,
14809,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
1731,
2670,
2598,
5066,
11,
308,
28,
15,
13,
3388,
17657,
2996,
11,
275,
28,
15,
13,
2327,
1795,
2996,
3695,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
445,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
24,
2414,
2154,
3270,
11,
308,
28,
15,
13,
25150,
33808,
23195,
11,
275,
28,
15,
13,
15,
19060,
28933,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
36022,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
5824,
17657,
2996,
11,
308,
28,
15,
13,
5705,
2154,
3365,
5999,
11,
275,
28,
15,
13,
2998,
23,
3559,
1485,
2425,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
43745,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
5607,
2414,
35402,
11,
308,
28,
15,
13,
19,
11,
275,
28,
15,
13,
14454,
1795,
32321,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
36590,
421,
25678,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
17,
17657,
2414,
4869,
11,
308,
28,
15,
13,
4761,
1314,
3104,
2414,
11,
275,
28,
15,
13,
4524,
17657,
2996,
11,
257,
28,
16,
13,
15,
828,
198,
220,
220,
220,
705,
79,
676,
10354,
14111,
62,
19199,
62,
40842,
17,
13,
10258,
7,
198,
220,
220,
220,
220,
220,
220,
220,
374,
28,
15,
13,
4089,
3559,
19708,
11,
308,
28,
15,
13,
40064,
27696,
1065,
11,
275,
28,
15,
13,
40064,
27696,
1065,
11,
257,
28,
16,
13,
15,
8,
198,
30072,
198,
198,
2,
770,
318,
262,
1502,
286,
11067,
34197,
287,
14111,
13,
198,
18973,
5222,
3824,
1961,
62,
25922,
1797,
796,
357,
46786,
62,
25216,
11,
311,
35400,
62,
25216,
11,
371,
15919,
31097,
62,
25216,
8,
198,
25922,
1797,
62,
41359,
13246,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
257,
25,
1312,
329,
1312,
11,
257,
287,
27056,
378,
7,
18973,
5222,
3824,
1961,
62,
25922,
1797,
8,
30072,
198,
198,
33489,
62,
20608,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
12,
16,
25,
705,
17470,
3256,
657,
25,
705,
24132,
3256,
352,
25,
705,
11664,
6,
30072,
198,
62,
2257,
11651,
62,
11584,
57,
1546,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
6,
17470,
10354,
352,
13,
15,
11,
705,
24132,
10354,
352,
13,
19,
11,
705,
11664,
10354,
352,
13,
23,
30072,
198,
33489,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
37652,
25,
4808,
2257,
11651,
62,
11584,
57,
1546,
58,
3672,
60,
329,
6349,
11,
1438,
287,
311,
35400,
62,
20608,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
198,
62,
8220,
12532,
62,
1404,
62,
33489,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
85,
25,
479,
329,
479,
11,
410,
287,
311,
35400,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
628,
198,
49,
15919,
31097,
62,
20608,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
12,
16,
25,
705,
4122,
88,
3256,
657,
25,
705,
82,
28030,
5183,
966,
88,
3256,
352,
25,
705,
744,
6,
30072,
198,
62,
2257,
11651,
62,
49,
15919,
31097,
1546,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
6,
4122,
88,
10354,
657,
13,
15,
11,
705,
82,
28030,
5183,
966,
88,
10354,
657,
13,
20,
11,
705,
744,
10354,
352,
13,
15,
30072,
198,
49,
15919,
31097,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
37652,
25,
4808,
2257,
11651,
62,
49,
15919,
31097,
1546,
58,
3672,
60,
198,
220,
220,
220,
220,
329,
6349,
11,
1438,
287,
371,
15919,
31097,
62,
20608,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
198,
62,
8220,
12532,
62,
1404,
62,
49,
15919,
31097,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
410,
25,
479,
329,
479,
11,
410,
287,
371,
15919,
31097,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
628,
198,
2,
383,
9568,
44876,
318,
407,
12234,
540,
523,
10385,
284,
257,
2099,
543,
318,
13,
198,
198,
25154,
11698,
62,
20608,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
12,
16,
25,
705,
14225,
1154,
3256,
657,
25,
705,
2436,
333,
1154,
3256,
352,
25,
705,
17585,
6,
30072,
198,
25154,
11698,
62,
1404,
62,
8220,
12532,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
6349,
25,
4808,
2257,
11651,
62,
25154,
2606,
6998,
58,
3672,
60,
198,
220,
220,
220,
329,
6349,
11,
1438,
287,
20444,
11698,
62,
20608,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
198,
62,
8220,
12532,
62,
1404,
62,
25154,
11698,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
7,
198,
220,
220,
220,
1391,
49903,
62,
1676,
1462,
62,
1462,
62,
17831,
540,
7,
85,
2599,
479,
329,
479,
11,
410,
287,
20444,
11698,
62,
1404,
62,
8220,
12532,
13,
23814,
3419,
30072,
198,
198,
47,
2394,
2849,
62,
25154,
11698,
62,
1404,
62,
18973,
5222,
3824,
1961,
62,
47,
2394,
2849,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
15,
11,
352,
2599,
705,
14809,
3256,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
15,
11,
532,
16,
2599,
705,
445,
3256,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
16,
11,
352,
2599,
705,
36022,
3256,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
16,
11,
532,
16,
2599,
705,
43745,
3256,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
17,
11,
352,
2599,
705,
36590,
421,
25678,
3256,
198,
220,
220,
220,
2448,
6471,
47,
9650,
7,
17,
11,
532,
16,
2599,
705,
79,
676,
3256,
198,
30072,
198,
62,
18973,
5222,
3824,
1961,
62,
47,
2394,
2849,
62,
1404,
62,
47,
2394,
2849,
62,
25154,
11698,
796,
8400,
89,
437,
713,
13,
69,
305,
89,
437,
713,
15090,
198,
220,
220,
220,
9568,
62,
1676,
1462,
62,
1462,
62,
17831,
540,
28264,
47,
2394,
2849,
62,
25154,
2606,
6998,
58,
85,
60,
2599,
479,
198,
220,
220,
220,
329,
479,
11,
410,
287,
350,
2394,
2849,
62,
25154,
11698,
62,
1404,
62,
18973,
5222,
3824,
1961,
62,
47,
2394,
2849,
13,
23814,
3419,
30072,
628,
628,
628,
198,
4299,
284,
62,
6440,
62,
9531,
62,
48310,
7,
198,
220,
220,
220,
11067,
62,
6440,
25,
2448,
6471,
34346,
11,
41270,
62,
6440,
25,
5476,
298,
34346,
198,
8,
4613,
435,
26599,
62,
40842,
17,
13,
34346,
2964,
18200,
25,
198,
220,
37227,
3103,
1851,
257,
11067,
290,
41270,
7815,
284,
8026,
2964,
18200,
526,
15931,
628,
220,
1441,
435,
26599,
62,
40842,
17,
13,
34346,
2964,
18200,
7,
198,
220,
220,
220,
220,
220,
6721,
28,
1314,
611,
11067,
62,
6440,
13,
260,
904,
1875,
362,
2073,
11067,
62,
6440,
13,
260,
904,
11,
198,
220,
220,
220,
220,
220,
41270,
28,
15460,
298,
62,
6440,
62,
1462,
62,
9531,
7,
15460,
298,
62,
6440,
828,
198,
220,
220,
220,
220,
220,
12429,
525,
984,
723,
62,
40890,
7,
525,
6471,
62,
6440,
4008,
628,
198,
4299,
14111,
62,
1462,
62,
525,
6471,
62,
6440,
7,
198,
220,
220,
220,
7815,
62,
48310,
25,
435,
26599,
62,
40842,
17,
13,
34346,
2964,
18200,
198,
8,
4613,
2448,
6471,
34346,
25,
198,
220,
37227,
3103,
1851,
8026,
2964,
18200,
284,
257,
11067,
7815,
526,
15931,
198,
220,
2546,
796,
4808,
8220,
12532,
62,
1404,
62,
33489,
58,
744,
7,
6440,
62,
48310,
13,
7857,
11,
352,
15437,
198,
220,
2835,
1108,
796,
4808,
8220,
12532,
62,
1404,
62,
49,
15919,
31097,
58,
744,
7,
6440,
62,
48310,
13,
744,
1108,
11,
352,
15437,
198,
220,
9568,
796,
4808,
8220,
12532,
62,
1404,
62,
25154,
11698,
58,
49903,
62,
1676,
1462,
62,
1462,
62,
17831,
540,
7,
6440,
62,
48310,
13,
8043,
15437,
198,
220,
1303,
5765,
299,
32152,
2134,
2099,
284,
3650,
21015,
493,
82,
2138,
621,
299,
32152,
493,
82,
13,
198,
220,
11067,
62,
1073,
3669,
796,
45941,
13,
18747,
26933,
15,
11,
657,
11,
657,
4357,
288,
4906,
28,
37659,
13,
22468,
8,
198,
220,
11067,
62,
1073,
3669,
58,
25922,
1797,
62,
41359,
13246,
58,
33489,
62,
25216,
11907,
796,
2546,
198,
220,
11067,
62,
1073,
3669,
58,
25922,
1797,
62,
41359,
13246,
58,
49,
15919,
31097,
62,
25216,
11907,
796,
2835,
1108,
198,
220,
11067,
62,
1073,
3669,
58,
25922,
1797,
62,
41359,
13246,
58,
46786,
62,
25216,
11907,
796,
9568,
198,
220,
41270,
62,
6440,
796,
4808,
9531,
62,
1462,
62,
15460,
298,
62,
6440,
7,
6440,
62,
48310,
13,
15460,
298,
8,
198,
220,
1441,
2448,
6471,
34346,
7,
15460,
298,
62,
6440,
13,
260,
904,
22784,
11067,
62,
1073,
3669,
8,
628,
198,
4299,
4808,
6738,
62,
6440,
62,
9531,
62,
48310,
7,
198,
220,
220,
220,
7815,
62,
48310,
25,
435,
26599,
62,
40842,
17,
13,
34346,
2964,
18200,
11,
198,
220,
220,
220,
13179,
25,
45941,
13,
358,
18747,
198,
8,
4613,
309,
29291,
58,
5990,
6471,
34346,
11,
978,
3916,
34346,
11,
5476,
298,
34346,
5974,
198,
220,
37227,
3103,
1851,
8026,
2964,
18200,
284,
257,
11067,
290,
41270,
7815,
526,
15931,
198,
220,
41270,
62,
6440,
796,
4808,
9531,
62,
1462,
62,
15460,
298,
62,
6440,
7,
6440,
62,
48310,
13,
15460,
298,
8,
198,
220,
11067,
62,
6440,
796,
14111,
62,
1462,
62,
525,
6471,
62,
6440,
7,
6440,
62,
48310,
8,
198,
220,
19874,
62,
6440,
796,
14966,
62,
392,
62,
13059,
507,
13,
31494,
7,
525,
6471,
62,
6440,
11,
13179,
8,
198,
220,
1441,
11067,
62,
6440,
11,
19874,
62,
6440,
11,
41270,
62,
6440,
628,
628,
198,
4299,
284,
62,
49324,
62,
9531,
62,
48310,
7,
198,
220,
220,
220,
11067,
62,
49324,
25,
2448,
6471,
47,
9650,
11,
41270,
62,
49324,
25,
5476,
298,
47,
9650,
11,
198,
220,
220,
220,
4823,
25,
28770,
13,
37065,
198,
8,
4613,
435,
26599,
62,
40842,
17,
13,
47,
9650,
2964,
18200,
25,
198,
220,
37227,
3103,
1851,
257,
11067,
290,
41270,
26572,
290,
4823,
284,
34018,
2964,
18200,
526,
15931,
198,
220,
9568,
62,
3672,
796,
350,
2394,
2849,
62,
25154,
11698,
62,
1404,
62,
18973,
5222,
3824,
1961,
62,
47,
2394,
2849,
58,
525,
6471,
62,
49324,
60,
198,
220,
9568,
796,
651,
62,
49903,
62,
10951,
19510,
49903,
62,
3672,
11,
4808,
47,
2394,
2849,
62,
25154,
2606,
6998,
58,
49903,
62,
3672,
60,
4008,
198,
220,
12737,
796,
900,
3419,
198,
220,
329,
923,
17440,
11,
886,
77,
4147,
287,
4823,
13,
14907,
62,
4868,
13,
276,
3212,
13,
23814,
33529,
198,
220,
220,
220,
2938,
62,
437,
62,
1073,
3669,
796,
4866,
13,
22089,
30073,
7,
9688,
17440,
13,
1073,
3669,
8,
198,
220,
220,
220,
2938,
62,
437,
62,
1073,
3669,
58,
15460,
298,
62,
49324,
13,
15460,
298,
62,
27740,
60,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
923,
17440,
13,
1073,
3669,
58,
15460,
298,
62,
49324,
13,
15460,
298,
62,
27740,
60,
1343,
362,
1635,
198,
220,
220,
220,
220,
220,
220,
220,
41270,
62,
49324,
13,
15460,
298,
62,
15908,
8,
198,
220,
220,
220,
2938,
62,
437,
62,
17440,
796,
4823,
13,
17440,
62,
4868,
13,
1136,
62,
17440,
62,
1525,
62,
1073,
3669,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2938,
62,
437,
62,
1073,
3669,
8,
198,
220,
220,
220,
611,
407,
2938,
62,
437,
62,
17440,
25,
198,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
611,
2938,
62,
437,
62,
17440,
287,
886,
77,
4147,
25,
198,
220,
220,
220,
220,
220,
12737,
13,
2860,
19510,
9688,
17440,
13,
312,
87,
11,
2938,
62,
437,
62,
17440,
13,
312,
87,
4008,
198,
220,
12737,
796,
685,
282,
26599,
62,
40842,
17,
13,
47,
9650,
3041,
2673,
7,
6738,
62,
6440,
62,
9630,
28,
6738,
62,
6440,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
62,
6440,
62,
9630,
28,
1462,
62,
6440,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
422,
62,
6440,
11,
284,
62,
6440,
287,
12737,
60,
628,
220,
23243,
62,
260,
4658,
796,
23243,
7,
198,
220,
220,
220,
220,
220,
12737,
11,
1994,
28,
50033,
6317,
25,
6317,
13,
6738,
62,
6440,
62,
9630,
8,
198,
220,
1441,
435,
26599,
62,
40842,
17,
13,
47,
9650,
2964,
18200,
7,
198,
220,
220,
220,
220,
220,
6167,
28,
15460,
298,
62,
49324,
62,
1462,
62,
9531,
7,
15460,
298,
62,
49324,
828,
6721,
28,
15,
11,
3124,
28,
49903,
11,
198,
220,
220,
220,
220,
220,
19634,
62,
8043,
28,
49903,
11,
12737,
28,
82,
9741,
62,
260,
4658,
8,
628,
198,
198,
4299,
4808,
13059,
507,
62,
6738,
62,
49324,
62,
9531,
62,
48310,
7,
198,
220,
220,
220,
26572,
25,
435,
26599,
62,
40842,
17,
13,
47,
9650,
2964,
18200,
198,
8,
4613,
309,
29291,
58,
5990,
6471,
47,
9650,
11,
5476,
298,
47,
9650,
5974,
198,
220,
37227,
3103,
1851,
262,
14111,
10552,
284,
257,
11067,
290,
41270,
26572,
526,
15931,
198,
220,
1441,
357,
9531,
62,
1462,
62,
525,
6471,
62,
49324,
7,
49324,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4808,
9531,
62,
1462,
62,
15460,
298,
62,
49324,
7,
49324,
13,
18242,
4008,
628,
198,
4299,
28770,
62,
6738,
62,
49324,
62,
9531,
62,
48310,
7,
198,
220,
220,
220,
28074,
25,
45835,
58,
282,
26599,
62,
40842,
17,
13,
47,
9650,
2964,
18200,
12962,
4613,
28770,
13,
37065,
25,
198,
220,
37227,
3103,
1851,
257,
8379,
286,
34018,
2964,
18200,
284,
257,
29681,
526,
15931,
198,
220,
10139,
62,
4868,
796,
28770,
13,
439,
62,
77,
4147,
62,
259,
62,
34960,
3419,
198,
220,
5743,
62,
4868,
796,
28770,
13,
37021,
8053,
3419,
198,
220,
329,
1312,
11,
26572,
287,
27056,
378,
7,
13059,
507,
2599,
198,
220,
220,
220,
4808,
11,
41270,
796,
4808,
13059,
507,
62,
6738,
62,
49324,
62,
9531,
62,
48310,
7,
49324,
8,
198,
220,
220,
220,
3384,
4487,
62,
49324,
796,
14966,
62,
392,
62,
13059,
507,
13,
47,
9650,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1312,
11,
41270,
13,
15460,
298,
62,
27740,
11,
41270,
13,
15460,
298,
62,
15908,
8,
198,
220,
220,
220,
329,
6317,
287,
26572,
13,
260,
4658,
25,
198,
220,
220,
220,
220,
220,
5743,
62,
4868,
13,
2860,
62,
14907,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
4868,
13,
1136,
62,
17440,
62,
1525,
62,
312,
87,
7,
260,
2673,
13,
6738,
62,
6440,
62,
9630,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10139,
62,
4868,
13,
1136,
62,
17440,
62,
1525,
62,
312,
87,
7,
260,
2673,
13,
1462,
62,
6440,
62,
9630,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3384,
4487,
62,
49324,
8,
198,
220,
1441,
28770,
13,
37065,
7,
17440,
62,
4868,
11,
5743,
62,
4868,
8,
628,
198,
4299,
284,
62,
9531,
62,
15245,
4592,
7,
198,
220,
220,
220,
16585,
25,
3384,
4487,
13,
41829,
4592,
198,
8,
4613,
309,
29291,
58,
282,
26599,
62,
40842,
17,
13,
41829,
4592,
11,
435,
26599,
62,
40842,
17,
13,
49,
14221,
44,
5912,
5974,
198,
220,
37227,
3103,
1851,
422,
21015,
3858,
284,
14111,
27867,
2134,
526,
15931,
198,
220,
1303,
5476,
298,
14966,
290,
28074,
389,
1464,
287,
262,
976,
4113,
13,
198,
220,
41270,
62,
28750,
796,
14966,
62,
392,
62,
13059,
507,
13,
79,
4733,
62,
15460,
298,
62,
28750,
3419,
198,
220,
41270,
62,
13059,
507,
796,
14966,
62,
392,
62,
13059,
507,
13,
79,
4733,
62,
15460,
298,
62,
13059,
507,
3419,
628,
220,
1303,
27967,
262,
15793,
38869,
3975,
1022,
41270,
14966,
287,
14111,
290,
41270,
198,
220,
1303,
14966,
287,
21015,
357,
3826,
422,
62,
9531,
62,
15245,
4592,
329,
517,
7468,
737,
198,
220,
21015,
62,
1462,
62,
9531,
796,
11361,
2514,
35955,
29271,
13912,
7,
15245,
4592,
8,
198,
220,
21015,
62,
15460,
298,
62,
28750,
796,
685,
29412,
62,
1462,
62,
9531,
13,
39014,
62,
1462,
62,
6440,
7,
15460,
298,
62,
6440,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
41270,
62,
6440,
287,
41270,
62,
28750,
60,
198,
220,
21015,
62,
15460,
298,
62,
13059,
507,
796,
685,
29412,
62,
1462,
62,
9531,
13,
39014,
62,
1462,
62,
49324,
7,
15460,
298,
62,
49324,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
41270,
62,
49324,
287,
41270,
62,
13059,
507,
60,
628,
220,
1303,
27967,
262,
7815,
3975,
284,
606,
284,
651,
49615,
14966,
13,
198,
220,
19874,
62,
28750,
796,
685,
15245,
4592,
13,
6440,
62,
8899,
13,
39014,
62,
259,
4399,
7,
6440,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
7815,
287,
21015,
62,
15460,
298,
62,
28750,
60,
198,
220,
11067,
62,
28750,
796,
685,
198,
220,
220,
220,
220,
220,
14966,
62,
392,
62,
13059,
507,
13,
18835,
570,
7,
6440,
11,
16585,
13,
10599,
341,
8,
198,
220,
220,
220,
220,
220,
329,
7815,
287,
19874,
62,
28750,
60,
198,
220,
14111,
62,
28750,
796,
685,
1462,
62,
6440,
62,
9531,
62,
48310,
7,
525,
6471,
11,
41270,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
11067,
11,
41270,
287,
19974,
7,
525,
6471,
62,
28750,
11,
41270,
62,
28750,
15437,
628,
220,
1303,
27967,
262,
26572,
3975,
284,
606,
284,
651,
49615,
28074,
13,
198,
220,
11067,
62,
13059,
507,
796,
685,
15245,
4592,
13,
49324,
62,
8899,
13,
39014,
62,
259,
4399,
7,
49324,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
26572,
287,
21015,
62,
15460,
298,
62,
13059,
507,
60,
628,
220,
14111,
62,
13059,
507,
796,
685,
198,
220,
220,
220,
220,
220,
284,
62,
49324,
62,
9531,
62,
48310,
7,
525,
6471,
11,
41270,
11,
21015,
62,
1462,
62,
9531,
13,
34960,
8,
198,
220,
220,
220,
220,
220,
329,
11067,
11,
41270,
287,
19974,
7,
525,
6471,
62,
13059,
507,
11,
41270,
62,
13059,
507,
15437,
628,
220,
14111,
62,
15245,
4592,
796,
435,
26599,
62,
40842,
17,
13,
41829,
4592,
7,
198,
220,
220,
220,
220,
220,
14966,
28,
9531,
62,
28750,
11,
28074,
28,
9531,
62,
13059,
507,
8,
198,
220,
13179,
62,
76,
5912,
796,
13179,
62,
1462,
62,
9531,
7,
29412,
62,
1462,
62,
9531,
13,
10599,
341,
8,
628,
220,
1441,
14111,
62,
15245,
4592,
11,
13179,
62,
76,
5912,
628,
198,
4299,
13179,
62,
6738,
62,
9531,
7,
198,
220,
220,
220,
13179,
62,
76,
5912,
25,
435,
26599,
62,
40842,
17,
13,
49,
14221,
44,
5912,
198,
8,
4613,
45941,
13,
358,
18747,
25,
198,
220,
37227,
3855,
262,
13389,
284,
23981,
13179,
422,
14111,
526,
15931,
198,
220,
1303,
18481,
378,
736,
198,
220,
18333,
796,
25915,
600,
7,
10599,
341,
62,
76,
5912,
13,
10599,
341,
62,
27787,
13,
87,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
600,
7,
10599,
341,
62,
76,
5912,
13,
10599,
341,
62,
27787,
13,
88,
828,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
600,
7,
10599,
341,
62,
76,
5912,
13,
10599,
341,
62,
27787,
13,
89,
15437,
198,
220,
1441,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
6738,
62,
27787,
7,
27787,
8,
628,
198,
4299,
13179,
62,
1462,
62,
9531,
7,
10599,
341,
25,
45941,
13,
358,
18747,
8,
4613,
435,
26599,
62,
40842,
17,
13,
49,
14221,
44,
5912,
25,
198,
220,
37227,
3103,
1851,
262,
13389,
284,
23981,
13179,
284,
14111,
526,
15931,
198,
220,
18333,
796,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
1462,
62,
27787,
7,
10599,
341,
8,
198,
220,
1441,
435,
26599,
62,
40842,
17,
13,
49,
14221,
44,
5912,
7,
10599,
341,
62,
27787,
28,
9531,
62,
19199,
62,
40842,
17,
13,
38469,
18,
7,
198,
220,
220,
220,
220,
220,
12429,
90,
22704,
25,
532,
744,
7,
64,
8,
329,
16488,
11,
257,
287,
19974,
10786,
5431,
89,
3256,
18333,
38165,
4008,
628,
198,
4299,
26572,
62,
8899,
62,
6738,
62,
13059,
507,
7,
198,
220,
220,
220,
41270,
62,
13059,
507,
25,
45835,
58,
24220,
298,
47,
9650,
4357,
198,
220,
220,
220,
11067,
62,
13059,
507,
25,
45835,
58,
5990,
6471,
47,
9650,
60,
198,
8,
4613,
34018,
13912,
25,
198,
220,
37227,
9771,
3129,
378,
26572,
3975,
11270,
41270,
290,
11067,
28074,
526,
15931,
198,
220,
15793,
62,
8899,
796,
25915,
16,
11,
532,
16,
11,
532,
16,
60,
198,
220,
4571,
62,
8899,
796,
685,
15,
11,
657,
11,
657,
60,
198,
220,
329,
11067,
62,
49324,
11,
41270,
62,
49324,
287,
19974,
7,
525,
6471,
62,
13059,
507,
11,
41270,
62,
13059,
507,
2599,
198,
220,
220,
220,
15793,
62,
8899,
58,
525,
6471,
62,
49324,
13,
525,
6471,
62,
27740,
60,
796,
41270,
62,
49324,
13,
15460,
298,
62,
27740,
198,
220,
220,
220,
611,
41270,
62,
49324,
13,
15460,
298,
62,
15908,
6624,
11067,
62,
49324,
13,
525,
6471,
62,
15908,
25,
198,
220,
220,
220,
220,
220,
4571,
62,
8899,
58,
15460,
298,
62,
49324,
13,
15460,
298,
62,
27740,
60,
796,
352,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
4571,
62,
8899,
58,
15460,
298,
62,
49324,
13,
15460,
298,
62,
27740,
60,
796,
532,
16,
198,
220,
1441,
34018,
13912,
7,
27740,
62,
8899,
28,
46156,
62,
8899,
11,
26672,
62,
8899,
28,
37295,
62,
8899,
8,
628,
198,
198,
4299,
1064,
62,
27740,
62,
8899,
62,
392,
62,
6440,
62,
8899,
7,
198,
220,
220,
220,
16585,
25,
3384,
4487,
13,
41829,
4592,
198,
8,
4613,
309,
29291,
58,
37659,
13,
358,
18747,
11,
8026,
13912,
11,
45941,
13,
358,
18747,
5974,
198,
220,
37227,
16742,
257,
15793,
3975,
290,
7815,
3975,
543,
3975,
41270,
14966,
284,
11067,
526,
15931,
628,
220,
41270,
62,
28750,
796,
14966,
62,
392,
62,
13059,
507,
13,
79,
4733,
62,
15460,
298,
62,
28750,
3419,
198,
220,
19874,
62,
28750,
796,
685,
15245,
4592,
13,
6440,
62,
8899,
13,
39014,
62,
259,
4399,
7,
6440,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
7815,
287,
41270,
62,
28750,
60,
198,
220,
11067,
62,
28750,
796,
685,
28750,
62,
392,
62,
13059,
507,
13,
18835,
570,
7,
6440,
11,
16585,
13,
10599,
341,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
7815,
287,
19874,
62,
28750,
60,
628,
220,
329,
5391,
62,
8899,
287,
685,
37659,
13,
25379,
7,
18,
11,
288,
4906,
28,
37659,
13,
600,
38381,
79,
11,
1058,
60,
329,
279,
287,
340,
861,
10141,
13,
16321,
32855,
7,
198,
220,
220,
220,
220,
220,
685,
15,
11,
352,
11,
362,
12962,
5974,
198,
220,
220,
220,
329,
7815,
62,
8899,
287,
14966,
62,
392,
62,
13059,
507,
13,
79,
4733,
62,
6440,
62,
31803,
33529,
198,
220,
220,
220,
220,
220,
895,
796,
45941,
13,
10989,
363,
7,
6440,
62,
8899,
13,
15460,
298,
62,
1930,
62,
15908,
13,
459,
2981,
7,
37659,
13,
600,
4008,
198,
220,
220,
220,
220,
220,
1303,
4619,
356,
466,
13179,
878,
14580,
287,
428,
1339,
356,
1276,
1249,
198,
220,
220,
220,
220,
220,
1303,
13179,
22052,
290,
16196,
284,
651,
477,
2663,
13,
198,
220,
220,
220,
220,
220,
1303,
4362,
286,
262,
20796,
428,
318,
407,
655,
262,
34062,
17593,
13,
198,
220,
220,
220,
220,
220,
34062,
62,
10599,
341,
796,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
6738,
62,
27787,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25915,
64,
329,
257,
287,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
1462,
62,
27787,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16585,
13,
10599,
341,
8,
12962,
198,
220,
220,
220,
220,
220,
329,
13179,
287,
685,
15245,
4592,
13,
10599,
341,
11,
34062,
62,
10599,
341,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
477,
62,
15699,
796,
6407,
198,
220,
220,
220,
220,
220,
220,
220,
329,
43979,
11,
26692,
287,
19974,
7,
15460,
298,
62,
28750,
11,
11067,
62,
28750,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
649,
62,
7278,
796,
45941,
13,
6759,
76,
377,
7,
27740,
62,
8899,
11,
43979,
13,
15460,
298,
62,
1073,
3669,
13,
459,
2981,
7,
37659,
13,
600,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26692,
62,
35505,
796,
45941,
13,
6759,
76,
377,
7,
5796,
11,
45941,
13,
6759,
76,
377,
7,
37659,
13,
75,
1292,
70,
13,
16340,
7,
10599,
341,
828,
649,
62,
7278,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
407,
477,
7,
8937,
7,
64,
532,
275,
8,
1279,
657,
13,
18005,
329,
257,
11,
275,
287,
19974,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26692,
62,
35505,
11,
26692,
13,
525,
6471,
62,
1073,
3669,
13,
459,
2981,
7,
37659,
13,
600,
4008,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
477,
62,
15699,
796,
10352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
220,
220,
220,
220,
611,
477,
62,
15699,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1441,
45941,
13,
75,
1292,
70,
13,
16340,
7,
27740,
62,
8899,
828,
7815,
62,
8899,
11,
13179,
198,
220,
6818,
10352,
11,
357,
198,
220,
220,
220,
220,
220,
705,
2949,
15793,
3975,
290,
7815,
3975,
2753,
41270,
14966,
284,
262,
3804,
705,
198,
220,
220,
220,
220,
220,
705,
525,
6471,
14966,
351,
262,
3804,
13179,
2637,
8,
628,
628,
198,
4299,
4808,
39014,
62,
27740,
62,
8899,
62,
1462,
62,
34960,
7,
198,
220,
220,
220,
5391,
62,
8899,
25,
45941,
13,
358,
18747,
11,
4823,
25,
28770,
13,
37065,
198,
8,
4613,
28770,
13,
37065,
25,
198,
220,
37227,
10462,
499,
41270,
15225,
287,
4823,
526,
15931,
198,
220,
5743,
62,
4868,
796,
28770,
13,
37021,
8053,
3419,
198,
220,
329,
923,
62,
17440,
11,
886,
62,
77,
4147,
287,
4823,
13,
14907,
62,
4868,
13,
276,
3212,
13,
23814,
33529,
198,
220,
220,
220,
923,
62,
1073,
3669,
796,
45941,
13,
6759,
76,
377,
7,
27740,
62,
8899,
11,
45941,
13,
18747,
7,
9688,
62,
17440,
13,
1073,
3669,
29720,
83,
349,
396,
3419,
198,
220,
220,
220,
649,
62,
9688,
62,
17440,
796,
4823,
13,
17440,
62,
4868,
13,
1136,
62,
17440,
62,
1525,
62,
1073,
3669,
7,
9688,
62,
1073,
3669,
8,
198,
220,
220,
220,
329,
886,
62,
17440,
11,
5743,
287,
886,
62,
77,
4147,
13,
23814,
33529,
198,
220,
220,
220,
220,
220,
886,
62,
1073,
3669,
796,
45941,
13,
6759,
76,
377,
7,
27740,
62,
8899,
11,
45941,
13,
18747,
7,
437,
62,
17440,
13,
1073,
3669,
29720,
83,
349,
396,
3419,
198,
220,
220,
220,
220,
220,
649,
62,
437,
62,
17440,
796,
4823,
13,
17440,
62,
4868,
13,
1136,
62,
17440,
62,
1525,
62,
1073,
3669,
7,
437,
62,
1073,
3669,
8,
198,
220,
220,
220,
220,
220,
649,
62,
49324,
796,
14966,
62,
392,
62,
13059,
507,
13,
47,
9650,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5743,
58,
16,
4083,
312,
87,
11,
45941,
13,
3003,
7,
27740,
62,
8899,
58,
14907,
58,
16,
4083,
46156,
11,
1058,
12962,
58,
15,
7131,
15,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5743,
58,
16,
4083,
37295,
8,
198,
220,
220,
220,
220,
220,
5743,
62,
4868,
13,
2860,
62,
14907,
7,
3605,
62,
9688,
62,
17440,
11,
649,
62,
437,
62,
17440,
11,
649,
62,
49324,
8,
198,
220,
1441,
28770,
13,
37065,
7,
34960,
13,
17440,
62,
4868,
11,
5743,
62,
4868,
8,
628,
198,
4871,
11361,
2514,
35955,
29271,
13912,
25,
198,
220,
37227,
3103,
1851,
422,
21015,
2446,
286,
16855,
284,
14111,
2446,
526,
15931,
628,
198,
4299,
422,
62,
9531,
62,
15245,
4592,
7,
198,
220,
220,
220,
16585,
25,
435,
26599,
62,
40842,
17,
13,
41829,
4592,
11,
198,
220,
220,
220,
13179,
62,
76,
5912,
25,
435,
26599,
62,
40842,
17,
13,
49,
14221,
44,
5912,
198,
8,
4613,
3384,
4487,
13,
41829,
4592,
25,
198,
220,
37227,
3103,
1851,
422,
14111,
27867,
2134,
284,
11188,
21015,
3858,
13,
628,
220,
943,
14542,
25,
198,
220,
220,
220,
16585,
25,
317,
16585,
2134,
2722,
422,
262,
435,
26599,
14111,
2858,
13,
198,
220,
220,
220,
13179,
62,
76,
5912,
25,
317,
13179,
16855,
2134,
2722,
422,
262,
435,
26599,
14111,
198,
220,
220,
220,
220,
220,
2858,
13,
628,
220,
16409,
25,
198,
220,
220,
220,
317,
34018,
13912,
12059,
262,
13389,
422,
26572,
49615,
2272,
284,
198,
220,
220,
220,
220,
220,
41270,
2272,
13,
198,
220,
220,
220,
317,
8026,
13912,
12059,
262,
13389,
422,
7815,
19874,
49615,
2272,
198,
220,
220,
220,
220,
220,
284,
41270,
2272,
13,
198,
220,
220,
220,
317,
29681,
12059,
262,
1695,
13015,
287,
41270,
2272,
13,
198,
220,
220,
220,
317,
45941,
13,
358,
18747,
12059,
262,
13179,
422,
7815,
19874,
49615,
2272,
284,
198,
220,
220,
220,
220,
220,
7815,
49615,
2272,
13,
198,
220,
37227,
628,
220,
1303,
554,
14111,
262,
41270,
14966,
389,
357,
39363,
8,
38375,
290,
788,
366,
525,
984,
723,
198,
220,
1303,
16855,
2161,
2024,
1,
389,
5625,
284,
910,
703,
428,
318,
7997,
319,
3159,
11,
198,
220,
1303,
304,
13,
70,
13,
532,
16,
287,
262,
717,
41270,
15793,
318,
14032,
290,
1343,
16,
318,
4171,
13,
198,
220,
1303,
2750,
691,
6402,
767,
1744,
5724,
602,
357,
15,
13179,
290,
4153,
7370,
198,
220,
1303,
8801,
786,
393,
47792,
5354,
3083,
546,
1123,
16488,
8,
290,
655,
6402,
287,
644,
198,
220,
1303,
4571,
49615,
12608,
1487,
11,
618,
428,
318,
5929,
351,
262,
198,
220,
1303,
16855,
286,
26572,
14729,
284,
41270,
2272,
15225,
290,
38875,
257,
4571,
198,
220,
1303,
284,
326,
26572,
5166,
11,
356,
651,
477,
285,
39242,
543,
389,
4153,
7370,
11677,
319,
530,
198,
220,
1303,
16488,
357,
11295,
326,
41270,
9633,
423,
262,
976,
1245,
319,
262,
6721,
523,
198,
220,
1303,
38869,
41270,
2272,
15225,
468,
645,
1245,
737,
775,
651,
14184,
16856,
780,
198,
220,
1303,
706,
24012,
11,
530,
15793,
286,
262,
3509,
6721,
7815,
481,
423,
1988,
657,
523,
198,
220,
1303,
20252,
546,
428,
857,
407,
1487,
262,
1988,
13,
2102,
11,
262,
8398,
198,
220,
1303,
318,
884,
326,
262,
4876,
6082,
318,
355,
340,
561,
307,
611,
356,
13941,
198,
220,
1303,
14184,
16856,
13,
198,
220,
1303,
1052,
5559,
835,
284,
7716,
477,
777,
285,
39242,
1231,
262,
14184,
16856,
198,
220,
1303,
561,
307,
284,
1011,
262,
14966,
41270,
22715,
290,
717,
4174,
257,
16855,
198,
220,
1303,
543,
2458,
262,
3967,
4571,
290,
788,
23064,
777,
6116,
416,
4153,
198,
220,
1303,
7370,
8801,
3083,
357,
42218,
47792,
5354,
3083,
5724,
602,
737,
198,
220,
1303,
632,
318,
4577,
284,
1057,
16113,
588,
262,
7306,
22890,
13148,
262,
1218,
198,
220,
1303,
14608,
286,
262,
16855,
780,
262,
13179,
857,
407,
1245,
262,
1266,
198,
220,
1303,
2223,
284,
1011,
523,
356,
460,
1011,
262,
11067,
22715,
290,
23981,
262,
198,
220,
1303,
13179,
1262,
597,
19756,
13179,
357,
10197,
611,
340,
318,
407,
262,
3376,
530,
8,
198,
220,
1303,
290,
788,
5529,
257,
4901,
1181,
625,
262,
5637,
7612,
286,
262,
198,
220,
1303,
16585,
290,
4296,
262,
4901,
1181,
611,
356,
1064,
262,
13179,
373,
2642,
13,
198,
220,
1303,
775,
460,
5078,
1022,
777,
7548,
14608,
82,
416,
5457,
24012,
287,
198,
220,
1303,
262,
6697,
4571,
13,
628,
220,
1303,
3574,
14111,
356,
651,
198,
220,
1303,
11067,
62,
6440,
796,
895,
1635,
374,
1635,
41270,
62,
6440,
198,
220,
1303,
810,
374,
5724,
689,
5556,
393,
20208,
4153,
7370,
290,
895,
2458,
11678,
11,
356,
765,
198,
220,
1303,
11067,
62,
6440,
796,
374,
62,
35505,
1635,
895,
1635,
41270,
62,
6440,
198,
220,
1303,
810,
374,
62,
35505,
318,
24012,
8801,
3083,
546,
262,
16488,
326,
374,
5724,
689,
1088,
13,
198,
220,
13179,
796,
13179,
62,
6738,
62,
9531,
7,
10599,
341,
62,
76,
5912,
8,
198,
220,
2352,
62,
10599,
341,
796,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
6738,
62,
27787,
7,
198,
220,
220,
220,
220,
220,
25915,
8937,
7,
64,
8,
329,
257,
287,
14966,
62,
392,
62,
13059,
507,
13,
10599,
341,
62,
1462,
62,
27787,
7,
10599,
341,
8,
12962,
198,
220,
21015,
62,
28750,
796,
685,
62,
6738,
62,
6440,
62,
9531,
62,
48310,
7,
6440,
11,
2352,
62,
10599,
341,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
7815,
287,
16585,
13,
28750,
60,
198,
220,
21015,
62,
13059,
507,
796,
685,
62,
13059,
507,
62,
6738,
62,
49324,
62,
9531,
62,
48310,
7,
49324,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
26572,
287,
16585,
13,
13059,
507,
60,
198,
220,
4823,
796,
28770,
62,
6738,
62,
49324,
62,
9531,
62,
48310,
7,
15245,
4592,
13,
13059,
507,
8,
628,
220,
1303,
1406,
895,
62,
35505,
318,
40039,
351,
4847,
287,
1391,
12,
16,
11,
352,
92,
290,
5391,
62,
8899,
318,
884,
326,
198,
220,
1303,
262,
2160,
286,
1123,
5752,
290,
1123,
5721,
318,
352,
351,
1729,
6632,
4847,
352,
13,
198,
220,
1303,
3914,
257,
19039,
895,
62,
35505,
1635,
5391,
62,
8899,
198,
220,
1303,
257,
19039,
685,
64,
1157,
257,
1065,
257,
1485,
60,
198,
220,
1303,
220,
220,
220,
220,
220,
685,
64,
2481,
257,
1828,
257,
1954,
60,
198,
220,
1303,
220,
220,
220,
220,
220,
685,
64,
3132,
257,
2624,
257,
2091,
60,
198,
220,
1303,
257,
1635,
685,
16,
11,
352,
11,
352,
60,
796,
685,
64,
1157,
1343,
257,
1065,
1343,
257,
1485,
11,
257,
2481,
1343,
257,
1828,
1343,
257,
1954,
11,
257,
3132,
1343,
257,
2624,
1343,
257,
2091,
60,
198,
220,
2160,
62,
1659,
62,
27379,
62,
808,
796,
4808,
1136,
62,
41634,
62,
1073,
3669,
62,
15699,
278,
62,
15460,
298,
7,
198,
220,
220,
220,
220,
220,
21015,
62,
28750,
11,
685,
16,
11,
352,
11,
352,
12962,
198,
220,
7815,
62,
8899,
796,
8026,
13912,
7,
1930,
62,
15908,
28,
16345,
62,
1659,
62,
27379,
62,
808,
8,
198,
220,
895,
62,
35505,
796,
45941,
13,
10989,
363,
7,
16345,
62,
1659,
62,
27379,
62,
808,
8,
198,
220,
1303,
257,
1635,
685,
16,
11,
352,
11,
352,
60,
532,
257,
1635,
25915,
16,
11,
352,
11,
352,
60,
796,
362,
1635,
685,
64,
1157,
11,
257,
2481,
11,
257,
3132,
60,
198,
220,
717,
62,
28665,
796,
14808,
16345,
62,
1659,
62,
27379,
62,
808,
532,
4808,
1136,
62,
41634,
62,
1073,
3669,
62,
15699,
278,
62,
15460,
298,
7,
198,
220,
220,
220,
220,
220,
21015,
62,
28750,
11,
25915,
16,
11,
352,
11,
352,
60,
4008,
14,
17,
737,
459,
2981,
7,
37659,
13,
600,
8,
198,
220,
1218,
62,
28665,
796,
14808,
16345,
62,
1659,
62,
27379,
62,
808,
532,
4808,
1136,
62,
41634,
62,
1073,
3669,
62,
15699,
278,
62,
15460,
298,
7,
198,
220,
220,
220,
220,
220,
21015,
62,
28750,
11,
685,
16,
11,
532,
16,
11,
352,
60,
4008,
14,
17,
737,
459,
2981,
7,
37659,
13,
600,
8,
198,
220,
2368,
62,
28665,
796,
14808,
16345,
62,
1659,
62,
27379,
62,
808,
532,
4808,
1136,
62,
41634,
62,
1073,
3669,
62,
15699,
278,
62,
15460,
298,
7,
198,
220,
220,
220,
220,
220,
21015,
62,
28750,
11,
685,
16,
11,
352,
11,
532,
16,
60,
4008,
14,
17,
737,
459,
2981,
7,
37659,
13,
600,
8,
198,
220,
257,
796,
45941,
13,
71,
25558,
19510,
11085,
62,
28665,
13,
3447,
1758,
19510,
18,
11,
352,
36911,
1218,
62,
28665,
13,
3447,
1758,
19510,
18,
11,
352,
36911,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2368,
62,
28665,
13,
3447,
1758,
19510,
18,
11,
352,
35514,
198,
220,
5391,
62,
8899,
796,
45941,
13,
22272,
7,
37659,
13,
6759,
76,
377,
7,
37659,
13,
75,
1292,
70,
13,
16340,
7,
5796,
62,
35505,
828,
257,
29720,
459,
2981,
7,
37659,
13,
600,
8,
628,
220,
41270,
62,
28750,
796,
685,
15460,
298,
62,
6440,
329,
4808,
11,
4808,
11,
41270,
62,
6440,
287,
21015,
62,
28750,
60,
198,
220,
19874,
62,
28750,
796,
685,
41634,
62,
6440,
329,
4808,
11,
19874,
62,
6440,
11,
4808,
287,
21015,
62,
28750,
60,
198,
220,
41270,
62,
28750,
796,
685,
62,
39014,
62,
27740,
62,
8899,
62,
1462,
62,
6440,
7,
27740,
62,
8899,
11,
41270,
62,
6440,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
41270,
62,
6440,
287,
41270,
62,
28750,
60,
198,
220,
41270,
62,
13059,
507,
796,
685,
15460,
298,
62,
49324,
329,
4808,
11,
41270,
62,
49324,
287,
21015,
62,
13059,
507,
60,
198,
220,
41270,
62,
13059,
507,
796,
685,
62,
39014,
62,
27740,
62,
8899,
62,
1462,
62,
49324,
7,
27740,
62,
8899,
11,
41270,
62,
49324,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
41270,
62,
49324,
287,
41270,
62,
13059,
507,
60,
198,
220,
11067,
62,
13059,
507,
796,
685,
525,
6471,
62,
49324,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
11067,
62,
49324,
11,
4808,
287,
21015,
62,
13059,
507,
60,
198,
220,
4823,
796,
4808,
39014,
62,
27740,
62,
8899,
62,
1462,
62,
34960,
7,
27740,
62,
8899,
11,
4823,
8,
628,
220,
329,
19874,
62,
6440,
11,
41270,
62,
6440,
287,
19974,
7,
41634,
62,
28750,
11,
41270,
62,
28750,
2599,
198,
220,
220,
220,
6818,
7815,
62,
8899,
13,
39014,
7,
41634,
62,
6440,
8,
6624,
41270,
62,
6440,
11,
357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
4677,
3157,
262,
7815,
3975,
284,
262,
19874,
7815,
750,
407,
1577,
262,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
41270,
7815,
13,
59,
77,
90,
41634,
62,
6440,
32239,
77,
90,
15460,
298,
62,
6440,
32239,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
705,
90,
6440,
62,
8899,
32239,
77,
90,
15245,
4592,
92,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19874,
62,
6440,
28,
41634,
62,
6440,
11,
41270,
62,
6440,
28,
15460,
298,
62,
6440,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7815,
62,
8899,
28,
6440,
62,
8899,
11,
16585,
28,
15245,
4592,
4008,
628,
220,
26572,
62,
8899,
796,
26572,
62,
8899,
62,
6738,
62,
13059,
507,
7,
15460,
298,
62,
13059,
507,
11,
11067,
62,
13059,
507,
8,
198,
220,
329,
11067,
62,
49324,
11,
41270,
62,
49324,
287,
19974,
7,
525,
6471,
62,
13059,
507,
11,
41270,
62,
13059,
507,
2599,
198,
220,
220,
220,
6818,
26572,
62,
8899,
13,
39014,
7,
525,
6471,
62,
49324,
8,
6624,
41270,
62,
49324,
11,
357,
198,
220,
220,
220,
220,
220,
220,
220,
705,
4677,
3157,
262,
26572,
3975,
284,
262,
11067,
26572,
750,
407,
1577,
262,
705,
198,
220,
220,
220,
220,
220,
220,
220,
705,
40319,
41270,
26572,
13,
90,
525,
6471,
62,
49324,
32239,
77,
90,
15460,
298,
62,
49324,
32239,
77,
6,
198,
220,
220,
220,
220,
220,
220,
220,
705,
90,
49324,
62,
8899,
32239,
77,
90,
15245,
4592,
92,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11067,
62,
49324,
28,
525,
6471,
62,
49324,
11,
41270,
62,
49324,
28,
15460,
298,
62,
49324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26572,
62,
8899,
28,
49324,
62,
8899,
11,
16585,
28,
15245,
4592,
4008,
628,
220,
1441,
3384,
4487,
13,
41829,
4592,
7,
49324,
62,
8899,
11,
7815,
62,
8899,
11,
4823,
11,
2352,
62,
10599,
341,
8,
198
] | 2.665297 | 7,789 |
# Copyright 2014-2017 The ODL contributors
#
# This file is part of ODL.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
"""Backend for ASTRA using CPU."""
from __future__ import print_function, division, absolute_import
import numpy as np
try:
import astra
except ImportError:
pass
from odl.discr import DiscreteLp, DiscreteLpElement
from odl.tomo.backends.astra_setup import (
astra_projection_geometry, astra_volume_geometry, astra_data,
astra_projector, astra_algorithm)
from odl.tomo.geometry import Geometry
from odl.util import writable_array
__all__ = ('astra_cpu_forward_projector', 'astra_cpu_back_projector')
# TODO: use context manager when creating data structures
# TODO: is magnification scaling at the right place?
def astra_cpu_forward_projector(vol_data, geometry, proj_space, out=None):
"""Run an ASTRA forward projection on the given data using the CPU.
Parameters
----------
vol_data : `DiscreteLpElement`
Volume data to which the forward projector is applied
geometry : `Geometry`
Geometry defining the tomographic setup
proj_space : `DiscreteLp`
Space to which the calling operator maps
out : ``proj_space`` element, optional
Element of the projection space to which the result is written. If
``None``, an element in ``proj_space`` is created.
Returns
-------
out : ``proj_space`` element
Projection data resulting from the application of the projector.
If ``out`` was provided, the returned object is a reference to it.
"""
if not isinstance(vol_data, DiscreteLpElement):
raise TypeError('volume data {!r} is not a `DiscreteLpElement` '
'instance.'.format(vol_data))
if vol_data.space.impl != 'numpy':
raise TypeError("`vol_data.space.impl` must be 'numpy', got {!r}"
"".format(vol_data.space.impl))
if not isinstance(geometry, Geometry):
raise TypeError('geometry {!r} is not a Geometry instance'
''.format(geometry))
if not isinstance(proj_space, DiscreteLp):
raise TypeError('`proj_space` {!r} is not a DiscreteLp '
'instance.'.format(proj_space))
if proj_space.impl != 'numpy':
raise TypeError("`proj_space.impl` must be 'numpy', got {!r}"
"".format(proj_space.impl))
if vol_data.ndim != geometry.ndim:
raise ValueError('dimensions {} of volume data and {} of geometry '
'do not match'
''.format(vol_data.ndim, geometry.ndim))
if out is None:
out = proj_space.element()
else:
if out not in proj_space:
raise TypeError('`out` {} is neither None nor a '
'DiscreteLpElement instance'.format(out))
ndim = vol_data.ndim
# Create astra geometries
vol_geom = astra_volume_geometry(vol_data.space)
proj_geom = astra_projection_geometry(geometry)
# Create projector
if not all(s == vol_data.space.interp_byaxis[0]
for s in vol_data.space.interp_byaxis):
raise ValueError('volume interpolation must be the same in each '
'dimension, got {}'.format(vol_data.space.interp))
vol_interp = vol_data.space.interp
proj_id = astra_projector(vol_interp, vol_geom, proj_geom, ndim,
impl='cpu')
# Create ASTRA data structures
vol_data_arr = np.asarray(vol_data)
vol_id = astra_data(vol_geom, datatype='volume', data=vol_data_arr,
allow_copy=True)
with writable_array(out, dtype='float32', order='C') as out_arr:
sino_id = astra_data(proj_geom, datatype='projection', data=out_arr,
ndim=proj_space.ndim)
# Create algorithm
algo_id = astra_algorithm('forward', ndim, vol_id, sino_id, proj_id,
impl='cpu')
# Run algorithm
astra.algorithm.run(algo_id)
# Delete ASTRA objects
astra.algorithm.delete(algo_id)
astra.data2d.delete((vol_id, sino_id))
astra.projector.delete(proj_id)
return out
def astra_cpu_back_projector(proj_data, geometry, reco_space, out=None):
"""Run an ASTRA back-projection on the given data using the CPU.
Parameters
----------
proj_data : `DiscreteLpElement`
Projection data to which the back-projector is applied
geometry : `Geometry`
Geometry defining the tomographic setup
reco_space : `DiscreteLp`
Space to which the calling operator maps
out : ``reco_space`` element, optional
Element of the reconstruction space to which the result is written.
If ``None``, an element in ``reco_space`` is created.
Returns
-------
out : ``reco_space`` element
Reconstruction data resulting from the application of the backward
projector. If ``out`` was provided, the returned object is a
reference to it.
"""
if not isinstance(proj_data, DiscreteLpElement):
raise TypeError('projection data {!r} is not a DiscreteLpElement '
'instance'.format(proj_data))
if proj_data.space.impl != 'numpy':
raise TypeError('`proj_data` must be a `numpy.ndarray` based, '
"container got `impl` {!r}"
"".format(proj_data.space.impl))
if not isinstance(geometry, Geometry):
raise TypeError('geometry {!r} is not a Geometry instance'
''.format(geometry))
if not isinstance(reco_space, DiscreteLp):
raise TypeError('reconstruction space {!r} is not a DiscreteLp '
'instance'.format(reco_space))
if reco_space.impl != 'numpy':
raise TypeError("`reco_space.impl` must be 'numpy', got {!r}"
"".format(reco_space.impl))
if reco_space.ndim != geometry.ndim:
raise ValueError('dimensions {} of reconstruction space and {} of '
'geometry do not match'.format(
reco_space.ndim, geometry.ndim))
if out is None:
out = reco_space.element()
else:
if out not in reco_space:
raise TypeError('`out` {} is neither None nor a '
'DiscreteLpElement instance'.format(out))
ndim = proj_data.ndim
# Create astra geometries
vol_geom = astra_volume_geometry(reco_space)
proj_geom = astra_projection_geometry(geometry)
# Create ASTRA data structure
sino_id = astra_data(proj_geom, datatype='projection', data=proj_data,
allow_copy=True)
# Create projector
# TODO: implement with different schemes for angles and detector
if not all(s == proj_data.space.interp_byaxis[0]
for s in proj_data.space.interp_byaxis):
raise ValueError('data interpolation must be the same in each '
'dimension, got {}'
''.format(proj_data.space.interp_byaxis))
proj_interp = proj_data.space.interp
proj_id = astra_projector(proj_interp, vol_geom, proj_geom, ndim,
impl='cpu')
# Convert out to correct dtype and order if needed.
with writable_array(out, dtype='float32', order='C') as out_arr:
vol_id = astra_data(vol_geom, datatype='volume', data=out_arr,
ndim=reco_space.ndim)
# Create algorithm
algo_id = astra_algorithm('backward', ndim, vol_id, sino_id, proj_id,
impl='cpu')
# Run algorithm
astra.algorithm.run(algo_id)
# Weight the adjoint by appropriate weights
scaling_factor = float(proj_data.space.weighting.const)
scaling_factor /= float(reco_space.weighting.const)
out *= scaling_factor
# Delete ASTRA objects
astra.algorithm.delete(algo_id)
astra.data2d.delete((vol_id, sino_id))
astra.projector.delete(proj_id)
return out
if __name__ == '__main__':
from odl.util.testutils import run_doctests
run_doctests()
| [
2,
15069,
1946,
12,
5539,
383,
440,
19260,
20420,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
440,
19260,
13,
198,
2,
198,
2,
770,
8090,
6127,
5178,
318,
2426,
284,
262,
2846,
286,
262,
29258,
5094,
13789,
11,
198,
2,
410,
13,
362,
13,
15,
13,
1002,
257,
4866,
286,
262,
4904,
43,
373,
407,
9387,
351,
428,
2393,
11,
921,
460,
198,
2,
7330,
530,
379,
3740,
1378,
5908,
16496,
13,
2398,
14,
44,
6489,
14,
17,
13,
15,
11757,
198,
198,
37811,
7282,
437,
329,
29273,
3861,
1262,
9135,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
11,
4112,
62,
11748,
198,
11748,
299,
32152,
355,
45941,
198,
28311,
25,
198,
220,
220,
220,
1330,
6468,
430,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1208,
198,
198,
6738,
16298,
75,
13,
15410,
81,
1330,
8444,
8374,
43,
79,
11,
8444,
8374,
43,
79,
20180,
198,
6738,
16298,
75,
13,
83,
17902,
13,
1891,
2412,
13,
459,
430,
62,
40406,
1330,
357,
198,
220,
220,
220,
6468,
430,
62,
16302,
295,
62,
469,
15748,
11,
6468,
430,
62,
29048,
62,
469,
15748,
11,
6468,
430,
62,
7890,
11,
198,
220,
220,
220,
6468,
430,
62,
16302,
273,
11,
6468,
430,
62,
282,
42289,
8,
198,
6738,
16298,
75,
13,
83,
17902,
13,
469,
15748,
1330,
2269,
15748,
198,
6738,
16298,
75,
13,
22602,
1330,
1991,
540,
62,
18747,
628,
198,
834,
439,
834,
796,
19203,
459,
430,
62,
36166,
62,
11813,
62,
16302,
273,
3256,
705,
459,
430,
62,
36166,
62,
1891,
62,
16302,
273,
11537,
628,
198,
2,
16926,
46,
25,
779,
4732,
4706,
618,
4441,
1366,
8573,
198,
2,
16926,
46,
25,
318,
44120,
20796,
379,
262,
826,
1295,
30,
198,
198,
4299,
6468,
430,
62,
36166,
62,
11813,
62,
16302,
273,
7,
10396,
62,
7890,
11,
22939,
11,
386,
73,
62,
13200,
11,
503,
28,
14202,
2599,
198,
220,
220,
220,
37227,
10987,
281,
29273,
3861,
2651,
20128,
319,
262,
1813,
1366,
1262,
262,
9135,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
2322,
62,
7890,
1058,
4600,
15642,
8374,
43,
79,
20180,
63,
198,
220,
220,
220,
220,
220,
220,
220,
14701,
1366,
284,
543,
262,
2651,
43396,
318,
5625,
198,
220,
220,
220,
22939,
1058,
4600,
10082,
15748,
63,
198,
220,
220,
220,
220,
220,
220,
220,
2269,
15748,
16215,
262,
16667,
6826,
9058,
198,
220,
220,
220,
386,
73,
62,
13200,
1058,
4600,
15642,
8374,
43,
79,
63,
198,
220,
220,
220,
220,
220,
220,
220,
4687,
284,
543,
262,
4585,
10088,
8739,
198,
220,
220,
220,
503,
1058,
7559,
1676,
73,
62,
13200,
15506,
5002,
11,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
11703,
286,
262,
20128,
2272,
284,
543,
262,
1255,
318,
3194,
13,
1002,
198,
220,
220,
220,
220,
220,
220,
220,
7559,
14202,
15506,
11,
281,
5002,
287,
7559,
1676,
73,
62,
13200,
15506,
318,
2727,
13,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
503,
1058,
7559,
1676,
73,
62,
13200,
15506,
5002,
198,
220,
220,
220,
220,
220,
220,
220,
4935,
295,
1366,
7186,
422,
262,
3586,
286,
262,
43396,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
7559,
448,
15506,
373,
2810,
11,
262,
4504,
2134,
318,
257,
4941,
284,
340,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
10396,
62,
7890,
11,
8444,
8374,
43,
79,
20180,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
29048,
1366,
1391,
0,
81,
92,
318,
407,
257,
4600,
15642,
8374,
43,
79,
20180,
63,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
39098,
2637,
13,
18982,
7,
10396,
62,
7890,
4008,
198,
220,
220,
220,
611,
2322,
62,
7890,
13,
13200,
13,
23928,
14512,
705,
77,
32152,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
7203,
63,
10396,
62,
7890,
13,
13200,
13,
23928,
63,
1276,
307,
705,
77,
32152,
3256,
1392,
1391,
0,
81,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1911,
18982,
7,
10396,
62,
7890,
13,
13200,
13,
23928,
4008,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
469,
15748,
11,
2269,
15748,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
469,
15748,
220,
1391,
0,
81,
92,
318,
407,
257,
2269,
15748,
4554,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4458,
18982,
7,
469,
15748,
4008,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
1676,
73,
62,
13200,
11,
8444,
8374,
43,
79,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
63,
1676,
73,
62,
13200,
63,
1391,
0,
81,
92,
318,
407,
257,
8444,
8374,
43,
79,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
39098,
2637,
13,
18982,
7,
1676,
73,
62,
13200,
4008,
198,
220,
220,
220,
611,
386,
73,
62,
13200,
13,
23928,
14512,
705,
77,
32152,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
7203,
63,
1676,
73,
62,
13200,
13,
23928,
63,
1276,
307,
705,
77,
32152,
3256,
1392,
1391,
0,
81,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1911,
18982,
7,
1676,
73,
62,
13200,
13,
23928,
4008,
198,
220,
220,
220,
611,
2322,
62,
7890,
13,
358,
320,
14512,
22939,
13,
358,
320,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
27740,
5736,
23884,
286,
6115,
1366,
290,
23884,
286,
22939,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4598,
407,
2872,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4458,
18982,
7,
10396,
62,
7890,
13,
358,
320,
11,
22939,
13,
358,
320,
4008,
198,
220,
220,
220,
611,
503,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
386,
73,
62,
13200,
13,
30854,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
503,
407,
287,
386,
73,
62,
13200,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
63,
448,
63,
23884,
318,
6159,
6045,
4249,
257,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
15642,
8374,
43,
79,
20180,
4554,
4458,
18982,
7,
448,
4008,
628,
220,
220,
220,
299,
27740,
796,
2322,
62,
7890,
13,
358,
320,
628,
220,
220,
220,
1303,
13610,
6468,
430,
4903,
908,
1678,
198,
220,
220,
220,
2322,
62,
469,
296,
796,
6468,
430,
62,
29048,
62,
469,
15748,
7,
10396,
62,
7890,
13,
13200,
8,
198,
220,
220,
220,
386,
73,
62,
469,
296,
796,
6468,
430,
62,
16302,
295,
62,
469,
15748,
7,
469,
15748,
8,
628,
220,
220,
220,
1303,
13610,
43396,
198,
220,
220,
220,
611,
407,
477,
7,
82,
6624,
2322,
62,
7890,
13,
13200,
13,
3849,
79,
62,
1525,
22704,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
287,
2322,
62,
7890,
13,
13200,
13,
3849,
79,
62,
1525,
22704,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
29048,
39555,
341,
1276,
307,
262,
976,
287,
1123,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
46156,
11,
1392,
23884,
4458,
18982,
7,
10396,
62,
7890,
13,
13200,
13,
3849,
79,
4008,
198,
220,
220,
220,
2322,
62,
3849,
79,
796,
2322,
62,
7890,
13,
13200,
13,
3849,
79,
198,
220,
220,
220,
386,
73,
62,
312,
796,
6468,
430,
62,
16302,
273,
7,
10396,
62,
3849,
79,
11,
2322,
62,
469,
296,
11,
386,
73,
62,
469,
296,
11,
299,
27740,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4114,
11639,
36166,
11537,
628,
220,
220,
220,
1303,
13610,
29273,
3861,
1366,
8573,
198,
220,
220,
220,
2322,
62,
7890,
62,
3258,
796,
45941,
13,
292,
18747,
7,
10396,
62,
7890,
8,
198,
220,
220,
220,
2322,
62,
312,
796,
6468,
430,
62,
7890,
7,
10396,
62,
469,
296,
11,
4818,
265,
2981,
11639,
29048,
3256,
1366,
28,
10396,
62,
7890,
62,
3258,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1249,
62,
30073,
28,
17821,
8,
628,
220,
220,
220,
351,
1991,
540,
62,
18747,
7,
448,
11,
288,
4906,
11639,
22468,
2624,
3256,
1502,
11639,
34,
11537,
355,
503,
62,
3258,
25,
198,
220,
220,
220,
220,
220,
220,
220,
264,
2879,
62,
312,
796,
6468,
430,
62,
7890,
7,
1676,
73,
62,
469,
296,
11,
4818,
265,
2981,
11639,
16302,
295,
3256,
1366,
28,
448,
62,
3258,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
27740,
28,
1676,
73,
62,
13200,
13,
358,
320,
8,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
11862,
198,
220,
220,
220,
220,
220,
220,
220,
435,
2188,
62,
312,
796,
6468,
430,
62,
282,
42289,
10786,
11813,
3256,
299,
27740,
11,
2322,
62,
312,
11,
264,
2879,
62,
312,
11,
386,
73,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4114,
11639,
36166,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
11862,
198,
220,
220,
220,
220,
220,
220,
220,
6468,
430,
13,
282,
42289,
13,
5143,
7,
282,
2188,
62,
312,
8,
628,
220,
220,
220,
1303,
23520,
29273,
3861,
5563,
198,
220,
220,
220,
6468,
430,
13,
282,
42289,
13,
33678,
7,
282,
2188,
62,
312,
8,
198,
220,
220,
220,
6468,
430,
13,
7890,
17,
67,
13,
33678,
19510,
10396,
62,
312,
11,
264,
2879,
62,
312,
4008,
198,
220,
220,
220,
6468,
430,
13,
16302,
273,
13,
33678,
7,
1676,
73,
62,
312,
8,
628,
220,
220,
220,
1441,
503,
628,
198,
4299,
6468,
430,
62,
36166,
62,
1891,
62,
16302,
273,
7,
1676,
73,
62,
7890,
11,
22939,
11,
664,
78,
62,
13200,
11,
503,
28,
14202,
2599,
198,
220,
220,
220,
37227,
10987,
281,
29273,
3861,
736,
12,
16302,
295,
319,
262,
1813,
1366,
1262,
262,
9135,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
386,
73,
62,
7890,
1058,
4600,
15642,
8374,
43,
79,
20180,
63,
198,
220,
220,
220,
220,
220,
220,
220,
4935,
295,
1366,
284,
543,
262,
736,
12,
16302,
273,
318,
5625,
198,
220,
220,
220,
22939,
1058,
4600,
10082,
15748,
63,
198,
220,
220,
220,
220,
220,
220,
220,
2269,
15748,
16215,
262,
16667,
6826,
9058,
198,
220,
220,
220,
664,
78,
62,
13200,
1058,
4600,
15642,
8374,
43,
79,
63,
198,
220,
220,
220,
220,
220,
220,
220,
4687,
284,
543,
262,
4585,
10088,
8739,
198,
220,
220,
220,
503,
1058,
7559,
260,
1073,
62,
13200,
15506,
5002,
11,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
11703,
286,
262,
25056,
2272,
284,
543,
262,
1255,
318,
3194,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1002,
7559,
14202,
15506,
11,
281,
5002,
287,
7559,
260,
1073,
62,
13200,
15506,
318,
2727,
13,
628,
220,
220,
220,
16409,
198,
220,
220,
220,
35656,
198,
220,
220,
220,
503,
1058,
7559,
260,
1073,
62,
13200,
15506,
5002,
198,
220,
220,
220,
220,
220,
220,
220,
45060,
1366,
7186,
422,
262,
3586,
286,
262,
19528,
198,
220,
220,
220,
220,
220,
220,
220,
43396,
13,
1002,
7559,
448,
15506,
373,
2810,
11,
262,
4504,
2134,
318,
257,
198,
220,
220,
220,
220,
220,
220,
220,
4941,
284,
340,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
1676,
73,
62,
7890,
11,
8444,
8374,
43,
79,
20180,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
16302,
295,
1366,
1391,
0,
81,
92,
318,
407,
257,
8444,
8374,
43,
79,
20180,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
39098,
4458,
18982,
7,
1676,
73,
62,
7890,
4008,
198,
220,
220,
220,
611,
386,
73,
62,
7890,
13,
13200,
13,
23928,
14512,
705,
77,
32152,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
63,
1676,
73,
62,
7890,
63,
1276,
307,
257,
4600,
77,
32152,
13,
358,
18747,
63,
1912,
11,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
34924,
1392,
4600,
23928,
63,
1391,
0,
81,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1911,
18982,
7,
1676,
73,
62,
7890,
13,
13200,
13,
23928,
4008,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
469,
15748,
11,
2269,
15748,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
469,
15748,
220,
1391,
0,
81,
92,
318,
407,
257,
2269,
15748,
4554,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4458,
18982,
7,
469,
15748,
4008,
198,
220,
220,
220,
611,
407,
318,
39098,
7,
260,
1073,
62,
13200,
11,
8444,
8374,
43,
79,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
260,
9979,
2762,
2272,
1391,
0,
81,
92,
318,
407,
257,
8444,
8374,
43,
79,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
39098,
4458,
18982,
7,
260,
1073,
62,
13200,
4008,
198,
220,
220,
220,
611,
664,
78,
62,
13200,
13,
23928,
14512,
705,
77,
32152,
10354,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
7203,
63,
260,
1073,
62,
13200,
13,
23928,
63,
1276,
307,
705,
77,
32152,
3256,
1392,
1391,
0,
81,
36786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
1911,
18982,
7,
260,
1073,
62,
13200,
13,
23928,
4008,
198,
220,
220,
220,
611,
664,
78,
62,
13200,
13,
358,
320,
14512,
22939,
13,
358,
320,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
27740,
5736,
23884,
286,
25056,
2272,
290,
23884,
286,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
469,
15748,
466,
407,
2872,
4458,
18982,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
664,
78,
62,
13200,
13,
358,
320,
11,
22939,
13,
358,
320,
4008,
198,
220,
220,
220,
611,
503,
318,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
503,
796,
664,
78,
62,
13200,
13,
30854,
3419,
198,
220,
220,
220,
2073,
25,
198,
220,
220,
220,
220,
220,
220,
220,
611,
503,
407,
287,
664,
78,
62,
13200,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5298,
5994,
12331,
10786,
63,
448,
63,
23884,
318,
6159,
6045,
4249,
257,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
15642,
8374,
43,
79,
20180,
4554,
4458,
18982,
7,
448,
4008,
628,
220,
220,
220,
299,
27740,
796,
386,
73,
62,
7890,
13,
358,
320,
628,
220,
220,
220,
1303,
13610,
6468,
430,
4903,
908,
1678,
198,
220,
220,
220,
2322,
62,
469,
296,
796,
6468,
430,
62,
29048,
62,
469,
15748,
7,
260,
1073,
62,
13200,
8,
198,
220,
220,
220,
386,
73,
62,
469,
296,
796,
6468,
430,
62,
16302,
295,
62,
469,
15748,
7,
469,
15748,
8,
628,
220,
220,
220,
1303,
13610,
29273,
3861,
1366,
4645,
198,
220,
220,
220,
264,
2879,
62,
312,
796,
6468,
430,
62,
7890,
7,
1676,
73,
62,
469,
296,
11,
4818,
265,
2981,
11639,
16302,
295,
3256,
1366,
28,
1676,
73,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1249,
62,
30073,
28,
17821,
8,
628,
220,
220,
220,
1303,
13610,
43396,
198,
220,
220,
220,
1303,
16926,
46,
25,
3494,
351,
1180,
16546,
329,
18333,
290,
31029,
198,
220,
220,
220,
611,
407,
477,
7,
82,
6624,
386,
73,
62,
7890,
13,
13200,
13,
3849,
79,
62,
1525,
22704,
58,
15,
60,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
264,
287,
386,
73,
62,
7890,
13,
13200,
13,
3849,
79,
62,
1525,
22704,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
5298,
11052,
12331,
10786,
7890,
39555,
341,
1276,
307,
262,
976,
287,
1123,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
46156,
11,
1392,
23884,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
4458,
18982,
7,
1676,
73,
62,
7890,
13,
13200,
13,
3849,
79,
62,
1525,
22704,
4008,
198,
220,
220,
220,
386,
73,
62,
3849,
79,
796,
386,
73,
62,
7890,
13,
13200,
13,
3849,
79,
198,
220,
220,
220,
386,
73,
62,
312,
796,
6468,
430,
62,
16302,
273,
7,
1676,
73,
62,
3849,
79,
11,
2322,
62,
469,
296,
11,
386,
73,
62,
469,
296,
11,
299,
27740,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4114,
11639,
36166,
11537,
628,
220,
220,
220,
1303,
38240,
503,
284,
3376,
288,
4906,
290,
1502,
611,
2622,
13,
198,
220,
220,
220,
351,
1991,
540,
62,
18747,
7,
448,
11,
288,
4906,
11639,
22468,
2624,
3256,
1502,
11639,
34,
11537,
355,
503,
62,
3258,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2322,
62,
312,
796,
6468,
430,
62,
7890,
7,
10396,
62,
469,
296,
11,
4818,
265,
2981,
11639,
29048,
3256,
1366,
28,
448,
62,
3258,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
299,
27740,
28,
260,
1073,
62,
13200,
13,
358,
320,
8,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
13610,
11862,
198,
220,
220,
220,
220,
220,
220,
220,
435,
2188,
62,
312,
796,
6468,
430,
62,
282,
42289,
10786,
1891,
904,
3256,
299,
27740,
11,
2322,
62,
312,
11,
264,
2879,
62,
312,
11,
386,
73,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4114,
11639,
36166,
11537,
628,
220,
220,
220,
220,
220,
220,
220,
1303,
5660,
11862,
198,
220,
220,
220,
220,
220,
220,
220,
6468,
430,
13,
282,
42289,
13,
5143,
7,
282,
2188,
62,
312,
8,
628,
220,
220,
220,
1303,
14331,
262,
9224,
1563,
416,
5035,
19590,
198,
220,
220,
220,
20796,
62,
31412,
796,
12178,
7,
1676,
73,
62,
7890,
13,
13200,
13,
6551,
278,
13,
9979,
8,
198,
220,
220,
220,
20796,
62,
31412,
1220,
28,
12178,
7,
260,
1073,
62,
13200,
13,
6551,
278,
13,
9979,
8,
628,
220,
220,
220,
503,
1635,
28,
20796,
62,
31412,
628,
220,
220,
220,
1303,
23520,
29273,
3861,
5563,
198,
220,
220,
220,
6468,
430,
13,
282,
42289,
13,
33678,
7,
282,
2188,
62,
312,
8,
198,
220,
220,
220,
6468,
430,
13,
7890,
17,
67,
13,
33678,
19510,
10396,
62,
312,
11,
264,
2879,
62,
312,
4008,
198,
220,
220,
220,
6468,
430,
13,
16302,
273,
13,
33678,
7,
1676,
73,
62,
312,
8,
628,
220,
220,
220,
1441,
503,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
422,
16298,
75,
13,
22602,
13,
9288,
26791,
1330,
1057,
62,
4598,
310,
3558,
198,
220,
220,
220,
1057,
62,
4598,
310,
3558,
3419,
198
] | 2.284185 | 3,642 |
from typing import Any, Dict, Optional
from pypika.terms import Function, ValueWrapper
from pypika.utils import format_alias_sql
| [
6738,
19720,
1330,
4377,
11,
360,
713,
11,
32233,
198,
198,
6738,
279,
4464,
9232,
13,
38707,
1330,
15553,
11,
11052,
36918,
2848,
198,
6738,
279,
4464,
9232,
13,
26791,
1330,
5794,
62,
26011,
62,
25410,
628,
628
] | 3.5 | 38 |
"""
Utilities for the :mod:`qsiprep_analyses` package.
"""
| [
37811,
198,
18274,
2410,
329,
262,
1058,
4666,
25,
63,
48382,
541,
7856,
62,
272,
43710,
63,
5301,
13,
198,
37811,
198
] | 2.681818 | 22 |
# Generated by Django 3.0.3 on 2020-04-22 21:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
18,
319,
12131,
12,
3023,
12,
1828,
2310,
25,
1954,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 3.019231 | 52 |
#!/usr/bin/env python3
import nets
import db
import contracts
from web3 import Web3
import prices
import logging
import logging.handlers
import jsonpickle
# Iterate through all transactions for account and run refresh actions
# Update the gas transaction fee amount and value assuming tx is on Harmony
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
31720,
198,
11748,
20613,
198,
11748,
8592,
198,
6738,
3992,
18,
1330,
5313,
18,
198,
11748,
4536,
198,
11748,
18931,
198,
11748,
18931,
13,
4993,
8116,
198,
11748,
33918,
27729,
293,
198,
198,
2,
40806,
378,
832,
477,
8945,
329,
1848,
290,
1057,
14976,
4028,
198,
198,
2,
10133,
262,
3623,
8611,
6838,
2033,
290,
1988,
13148,
27765,
318,
319,
35088,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
12417,
3419,
198
] | 3.831461 | 89 |
#pylint: disable-all
"""
Script for patch SubCandidateNet/CNNGenotypeModel.forward
"""
from contextlib import contextmanager
import six
import numpy as np
import torch
from torch import nn
from nics_fix_pt.quant import quantitize
from aw_nas.weights_manager.super_net import SubCandidateNet
from aw_nas.final.cnn_model import CNNGenotypeModel
BITWIDTH = 8
FIX_METHOD = 1 # auto_fix
# ---- patch ----
## Here do not patch forward, as activation is not quantized in calls to `forward`,
## it's not meaningful to quantize the weights during the calls to `forward` too
## It must be patched, or ``backward through a graph second time'' error will occur.
## Let's reset all the module attributes to the original parameters in `_parameters`.
SubCandidateNet.old_forward = SubCandidateNet.forward
CNNGenotypeModel.old_forward = CNNGenotypeModel.forward
SubCandidateNet.forward = fix_forward
CNNGenotypeModel.forward = fix_forward
# only patch `forward_one_step_callback`, not forward
SubCandidateNet.old_forward_one_step_callback = SubCandidateNet.forward_one_step_callback
CNNGenotypeModel.old_forward_one_step_callback = CNNGenotypeModel.forward_one_step_callback
SubCandidateNet.forward_one_step_callback = fix_forward_one_step_callback
CNNGenotypeModel.forward_one_step_callback = fix_forward_one_step_callback
# ---- end patch ----
@contextmanager
"""
Note there are a lot randomness in the search process. so all the number are just a ref.
| | quantize | 30 eva | time quantize weight / | #quantize | ratio |
| | patch method | step time | time feature inject 1e-4 | calls | |
|---+--------------------------------------------------+-----------+--------------------------+-----------+-------|
| 1 | old | ~65 | 31.01/12.82 | ~68088 | 2.4 |
| 2 | new patch forward&fonestepcallback | ~75 | 28.68/13.05 | ~63954 | 2.2 |
| 3 | new patch fonestepcallback | ~60 | 14.19/12.90 | ~31997 | 1.1 |
| x | new patch forward(set original)&fonestepcallback | ~60 | - | ~31997 | - |
from 1->2, the quantization call reduction comes from avoiding quantizing unused params in one forward pass (`check_visited=True`)
and avoiding duplicated quantization calls when there are double connection in the rollout.
"""
| [
2,
79,
2645,
600,
25,
15560,
12,
439,
198,
37811,
198,
7391,
329,
8529,
3834,
41572,
20540,
7934,
14,
18474,
13746,
8690,
17633,
13,
11813,
198,
37811,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
11748,
2237,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
198,
6738,
299,
873,
62,
13049,
62,
457,
13,
40972,
1330,
5554,
270,
1096,
198,
6738,
3253,
62,
24716,
13,
43775,
62,
37153,
13,
16668,
62,
3262,
1330,
3834,
41572,
20540,
7934,
198,
6738,
3253,
62,
24716,
13,
20311,
13,
66,
20471,
62,
19849,
1330,
8100,
13746,
8690,
17633,
198,
198,
26094,
54,
2389,
4221,
796,
807,
198,
47084,
62,
49273,
796,
352,
1303,
8295,
62,
13049,
198,
198,
2,
13498,
8529,
13498,
198,
2235,
3423,
466,
407,
8529,
2651,
11,
355,
14916,
318,
407,
5554,
1143,
287,
3848,
284,
4600,
11813,
47671,
198,
2235,
340,
338,
407,
11570,
284,
5554,
1096,
262,
19590,
1141,
262,
3848,
284,
4600,
11813,
63,
1165,
198,
2235,
632,
1276,
307,
39378,
11,
393,
7559,
1891,
904,
832,
257,
4823,
1218,
640,
7061,
4049,
481,
3051,
13,
198,
2235,
3914,
338,
13259,
477,
262,
8265,
12608,
284,
262,
2656,
10007,
287,
4600,
62,
17143,
7307,
44646,
198,
7004,
41572,
20540,
7934,
13,
727,
62,
11813,
796,
3834,
41572,
20540,
7934,
13,
11813,
198,
18474,
13746,
8690,
17633,
13,
727,
62,
11813,
796,
8100,
13746,
8690,
17633,
13,
11813,
198,
7004,
41572,
20540,
7934,
13,
11813,
796,
4259,
62,
11813,
198,
18474,
13746,
8690,
17633,
13,
11813,
796,
4259,
62,
11813,
198,
198,
2,
691,
8529,
4600,
11813,
62,
505,
62,
9662,
62,
47423,
47671,
407,
2651,
198,
7004,
41572,
20540,
7934,
13,
727,
62,
11813,
62,
505,
62,
9662,
62,
47423,
796,
3834,
41572,
20540,
7934,
13,
11813,
62,
505,
62,
9662,
62,
47423,
198,
18474,
13746,
8690,
17633,
13,
727,
62,
11813,
62,
505,
62,
9662,
62,
47423,
796,
8100,
13746,
8690,
17633,
13,
11813,
62,
505,
62,
9662,
62,
47423,
198,
7004,
41572,
20540,
7934,
13,
11813,
62,
505,
62,
9662,
62,
47423,
796,
4259,
62,
11813,
62,
505,
62,
9662,
62,
47423,
198,
18474,
13746,
8690,
17633,
13,
11813,
62,
505,
62,
9662,
62,
47423,
796,
4259,
62,
11813,
62,
505,
62,
9662,
62,
47423,
198,
2,
13498,
886,
8529,
13498,
198,
198,
31,
22866,
37153,
198,
198,
37811,
198,
6425,
612,
389,
257,
1256,
4738,
1108,
287,
262,
2989,
1429,
13,
523,
477,
262,
1271,
389,
655,
257,
1006,
13,
198,
91,
220,
220,
930,
5554,
1096,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
1542,
819,
64,
220,
220,
220,
930,
640,
5554,
1096,
3463,
1220,
220,
220,
930,
1303,
40972,
1096,
930,
8064,
930,
198,
91,
220,
220,
930,
8529,
2446,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
2239,
640,
930,
640,
3895,
8677,
352,
68,
12,
19,
930,
3848,
220,
220,
220,
220,
930,
220,
220,
220,
220,
220,
220,
930,
198,
91,
6329,
10,
47232,
44785,
32284,
10,
22369,
44785,
32284,
10,
26866,
91,
198,
91,
352,
930,
1468,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
2996,
220,
220,
220,
220,
220,
220,
930,
3261,
13,
486,
14,
1065,
13,
6469,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
37397,
3459,
220,
220,
220,
930,
220,
220,
362,
13,
19,
930,
198,
91,
362,
930,
649,
8529,
2651,
5,
69,
19129,
538,
47423,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
2425,
220,
220,
220,
220,
220,
220,
930,
2579,
13,
3104,
14,
1485,
13,
2713,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
21,
2670,
4051,
220,
220,
220,
930,
220,
220,
362,
13,
17,
930,
198,
91,
513,
930,
649,
8529,
277,
19129,
538,
47423,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
1899,
220,
220,
220,
220,
220,
220,
930,
1478,
13,
1129,
14,
1065,
13,
3829,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
18,
21498,
220,
220,
220,
930,
220,
220,
352,
13,
16,
930,
198,
91,
2124,
930,
649,
8529,
2651,
7,
2617,
2656,
8,
5,
69,
19129,
538,
47423,
930,
5299,
1899,
220,
220,
220,
220,
220,
220,
930,
532,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
5299,
18,
21498,
220,
220,
220,
930,
220,
220,
220,
220,
532,
930,
198,
198,
6738,
352,
3784,
17,
11,
262,
5554,
1634,
869,
7741,
2058,
422,
14928,
5554,
2890,
21958,
42287,
287,
530,
2651,
1208,
357,
63,
9122,
62,
4703,
863,
28,
17821,
63,
8,
198,
392,
14928,
14184,
3474,
5554,
1634,
3848,
618,
612,
389,
4274,
4637,
287,
262,
38180,
13,
198,
37811,
198
] | 2.693391 | 923 |
import torchvision
import torch.nn as nn
| [
11748,
28034,
10178,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
220,
220,
220,
220,
628,
220,
220,
220,
220,
220,
220,
220,
220
] | 2.2 | 25 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: sym/messages/authz.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from sym.models import schema_pb2 as sym_dot_models_dot_schema__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='sym/messages/authz.proto',
package='sym.messages',
syntax='proto3',
serialized_options=b'Z%github.com/symopsio/types/go/messages',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x18sym/messages/authz.proto\x12\x0csym.messages\x1a\x17sym/models/schema.proto\"G\n\x05\x41uthz\x12\"\n\x06schema\x18\x01 \x01(\x0b\x32\x12.sym.models.Schema\x12\x0c\n\x04user\x18\x02 \x01(\t\x12\x0c\n\x04role\x18\x03 \x01(\t\"1\n\rAuthzResponse\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\tB\'Z%github.com/symopsio/types/go/messagesb\x06proto3'
,
dependencies=[sym_dot_models_dot_schema__pb2.DESCRIPTOR,])
_AUTHZ = _descriptor.Descriptor(
name='Authz',
full_name='sym.messages.Authz',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='schema', full_name='sym.messages.Authz.schema', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='user', full_name='sym.messages.Authz.user', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='role', full_name='sym.messages.Authz.role', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=67,
serialized_end=138,
)
_AUTHZRESPONSE = _descriptor.Descriptor(
name='AuthzResponse',
full_name='sym.messages.AuthzResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='ok', full_name='sym.messages.AuthzResponse.ok', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='errorMessage', full_name='sym.messages.AuthzResponse.errorMessage', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=140,
serialized_end=189,
)
_AUTHZ.fields_by_name['schema'].message_type = sym_dot_models_dot_schema__pb2._SCHEMA
DESCRIPTOR.message_types_by_name['Authz'] = _AUTHZ
DESCRIPTOR.message_types_by_name['AuthzResponse'] = _AUTHZRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Authz = _reflection.GeneratedProtocolMessageType('Authz', (_message.Message,), {
'DESCRIPTOR' : _AUTHZ,
'__module__' : 'sym.messages.authz_pb2'
# @@protoc_insertion_point(class_scope:sym.messages.Authz)
})
_sym_db.RegisterMessage(Authz)
AuthzResponse = _reflection.GeneratedProtocolMessageType('AuthzResponse', (_message.Message,), {
'DESCRIPTOR' : _AUTHZRESPONSE,
'__module__' : 'sym.messages.authz_pb2'
# @@protoc_insertion_point(class_scope:sym.messages.AuthzResponse)
})
_sym_db.RegisterMessage(AuthzResponse)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
5659,
14,
37348,
1095,
14,
18439,
89,
13,
1676,
1462,
198,
37811,
8645,
515,
8435,
11876,
2438,
526,
15931,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
43087,
355,
4808,
20147,
1968,
273,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
3275,
355,
4808,
20500,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
14580,
355,
4808,
5420,
1564,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
6194,
62,
48806,
355,
4808,
1837,
23650,
62,
48806,
198,
2,
25248,
11235,
420,
62,
28463,
295,
62,
4122,
7,
320,
3742,
8,
198,
198,
62,
37047,
62,
9945,
796,
4808,
1837,
23650,
62,
48806,
13,
19463,
3419,
628,
198,
6738,
5659,
13,
27530,
1330,
32815,
62,
40842,
17,
355,
5659,
62,
26518,
62,
27530,
62,
26518,
62,
15952,
2611,
834,
40842,
17,
628,
198,
30910,
36584,
32961,
796,
4808,
20147,
1968,
273,
13,
8979,
24564,
1968,
273,
7,
198,
220,
1438,
11639,
37047,
14,
37348,
1095,
14,
18439,
89,
13,
1676,
1462,
3256,
198,
220,
5301,
11639,
37047,
13,
37348,
1095,
3256,
198,
220,
15582,
11639,
1676,
1462,
18,
3256,
198,
220,
11389,
1143,
62,
25811,
28,
65,
6,
57,
4,
12567,
13,
785,
14,
37047,
2840,
952,
14,
19199,
14,
2188,
14,
37348,
1095,
3256,
198,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
11,
198,
220,
11389,
1143,
62,
40842,
28,
65,
6,
59,
77,
59,
87,
1507,
37047,
14,
37348,
1095,
14,
18439,
89,
13,
1676,
1462,
59,
87,
1065,
59,
87,
15,
66,
37047,
13,
37348,
1095,
59,
87,
16,
64,
59,
87,
1558,
37047,
14,
27530,
14,
15952,
2611,
13,
1676,
1462,
7879,
38,
59,
77,
59,
87,
2713,
59,
87,
3901,
1071,
89,
59,
87,
1065,
7879,
59,
77,
59,
87,
3312,
15952,
2611,
59,
87,
1507,
59,
87,
486,
3467,
87,
486,
38016,
87,
15,
65,
59,
87,
2624,
59,
87,
1065,
13,
37047,
13,
27530,
13,
27054,
2611,
59,
87,
1065,
59,
87,
15,
66,
59,
77,
59,
87,
3023,
7220,
59,
87,
1507,
59,
87,
2999,
3467,
87,
486,
38016,
83,
59,
87,
1065,
59,
87,
15,
66,
59,
77,
59,
87,
3023,
18090,
59,
87,
1507,
59,
87,
3070,
3467,
87,
486,
38016,
83,
7879,
16,
59,
77,
59,
81,
30515,
89,
31077,
59,
87,
1065,
59,
77,
59,
77,
59,
87,
2999,
482,
59,
87,
1507,
59,
87,
486,
3467,
87,
486,
38016,
87,
2919,
59,
87,
1065,
59,
87,
1415,
59,
77,
59,
87,
15,
66,
59,
87,
2996,
81,
1472,
12837,
59,
87,
1507,
59,
87,
2999,
3467,
87,
486,
38016,
83,
33,
43054,
57,
4,
12567,
13,
785,
14,
37047,
2840,
952,
14,
19199,
14,
2188,
14,
37348,
1095,
65,
59,
87,
3312,
1676,
1462,
18,
6,
198,
220,
837,
198,
220,
20086,
41888,
37047,
62,
26518,
62,
27530,
62,
26518,
62,
15952,
2611,
834,
40842,
17,
13,
30910,
36584,
32961,
11,
12962,
628,
628,
198,
62,
32,
24318,
57,
796,
4808,
20147,
1968,
273,
13,
24564,
1968,
273,
7,
198,
220,
1438,
11639,
30515,
89,
3256,
198,
220,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
3256,
198,
220,
29472,
28,
14202,
11,
198,
220,
2393,
28,
30910,
36584,
32961,
11,
198,
220,
7268,
62,
4906,
28,
14202,
11,
198,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
11,
198,
220,
7032,
41888,
198,
220,
220,
220,
4808,
20147,
1968,
273,
13,
15878,
24564,
1968,
273,
7,
198,
220,
220,
220,
220,
220,
1438,
11639,
15952,
2611,
3256,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
13,
15952,
2611,
3256,
6376,
28,
15,
11,
198,
220,
220,
220,
220,
220,
1271,
28,
16,
11,
2099,
28,
1157,
11,
269,
381,
62,
4906,
28,
940,
11,
6167,
28,
16,
11,
198,
220,
220,
220,
220,
220,
468,
62,
12286,
62,
8367,
28,
25101,
11,
4277,
62,
8367,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
3275,
62,
4906,
28,
14202,
11,
33829,
62,
4906,
28,
14202,
11,
7268,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
318,
62,
2302,
3004,
28,
25101,
11,
7552,
62,
29982,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
2393,
28,
30910,
36584,
32961,
11,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
828,
198,
220,
220,
220,
4808,
20147,
1968,
273,
13,
15878,
24564,
1968,
273,
7,
198,
220,
220,
220,
220,
220,
1438,
11639,
7220,
3256,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
13,
7220,
3256,
6376,
28,
16,
11,
198,
220,
220,
220,
220,
220,
1271,
28,
17,
11,
2099,
28,
24,
11,
269,
381,
62,
4906,
28,
24,
11,
6167,
28,
16,
11,
198,
220,
220,
220,
220,
220,
468,
62,
12286,
62,
8367,
28,
25101,
11,
4277,
62,
8367,
28,
65,
1,
1911,
12501,
1098,
10786,
40477,
12,
23,
33809,
198,
220,
220,
220,
220,
220,
3275,
62,
4906,
28,
14202,
11,
33829,
62,
4906,
28,
14202,
11,
7268,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
318,
62,
2302,
3004,
28,
25101,
11,
7552,
62,
29982,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
2393,
28,
30910,
36584,
32961,
11,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
828,
198,
220,
220,
220,
4808,
20147,
1968,
273,
13,
15878,
24564,
1968,
273,
7,
198,
220,
220,
220,
220,
220,
1438,
11639,
18090,
3256,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
13,
18090,
3256,
6376,
28,
17,
11,
198,
220,
220,
220,
220,
220,
1271,
28,
18,
11,
2099,
28,
24,
11,
269,
381,
62,
4906,
28,
24,
11,
6167,
28,
16,
11,
198,
220,
220,
220,
220,
220,
468,
62,
12286,
62,
8367,
28,
25101,
11,
4277,
62,
8367,
28,
65,
1,
1911,
12501,
1098,
10786,
40477,
12,
23,
33809,
198,
220,
220,
220,
220,
220,
3275,
62,
4906,
28,
14202,
11,
33829,
62,
4906,
28,
14202,
11,
7268,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
318,
62,
2302,
3004,
28,
25101,
11,
7552,
62,
29982,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
2393,
28,
30910,
36584,
32961,
11,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
828,
198,
220,
16589,
198,
220,
18366,
41888,
198,
220,
16589,
198,
220,
28376,
62,
19199,
41888,
4357,
198,
220,
33829,
62,
19199,
41888,
198,
220,
16589,
198,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
198,
220,
318,
62,
2302,
437,
540,
28,
25101,
11,
198,
220,
15582,
11639,
1676,
1462,
18,
3256,
198,
220,
7552,
62,
81,
6231,
41888,
4357,
198,
220,
530,
1659,
82,
41888,
198,
220,
16589,
198,
220,
11389,
1143,
62,
9688,
28,
3134,
11,
198,
220,
11389,
1143,
62,
437,
28,
20107,
11,
198,
8,
628,
198,
62,
32,
24318,
57,
19535,
47,
1340,
5188,
796,
4808,
20147,
1968,
273,
13,
24564,
1968,
273,
7,
198,
220,
1438,
11639,
30515,
89,
31077,
3256,
198,
220,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
31077,
3256,
198,
220,
29472,
28,
14202,
11,
198,
220,
2393,
28,
30910,
36584,
32961,
11,
198,
220,
7268,
62,
4906,
28,
14202,
11,
198,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
11,
198,
220,
7032,
41888,
198,
220,
220,
220,
4808,
20147,
1968,
273,
13,
15878,
24564,
1968,
273,
7,
198,
220,
220,
220,
220,
220,
1438,
11639,
482,
3256,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
31077,
13,
482,
3256,
6376,
28,
15,
11,
198,
220,
220,
220,
220,
220,
1271,
28,
16,
11,
2099,
28,
23,
11,
269,
381,
62,
4906,
28,
22,
11,
6167,
28,
16,
11,
198,
220,
220,
220,
220,
220,
468,
62,
12286,
62,
8367,
28,
25101,
11,
4277,
62,
8367,
28,
25101,
11,
198,
220,
220,
220,
220,
220,
3275,
62,
4906,
28,
14202,
11,
33829,
62,
4906,
28,
14202,
11,
7268,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
318,
62,
2302,
3004,
28,
25101,
11,
7552,
62,
29982,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
2393,
28,
30910,
36584,
32961,
11,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
828,
198,
220,
220,
220,
4808,
20147,
1968,
273,
13,
15878,
24564,
1968,
273,
7,
198,
220,
220,
220,
220,
220,
1438,
11639,
18224,
12837,
3256,
1336,
62,
3672,
11639,
37047,
13,
37348,
1095,
13,
30515,
89,
31077,
13,
18224,
12837,
3256,
6376,
28,
16,
11,
198,
220,
220,
220,
220,
220,
1271,
28,
17,
11,
2099,
28,
24,
11,
269,
381,
62,
4906,
28,
24,
11,
6167,
28,
16,
11,
198,
220,
220,
220,
220,
220,
468,
62,
12286,
62,
8367,
28,
25101,
11,
4277,
62,
8367,
28,
65,
1,
1911,
12501,
1098,
10786,
40477,
12,
23,
33809,
198,
220,
220,
220,
220,
220,
3275,
62,
4906,
28,
14202,
11,
33829,
62,
4906,
28,
14202,
11,
7268,
62,
4906,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
318,
62,
2302,
3004,
28,
25101,
11,
7552,
62,
29982,
28,
14202,
11,
198,
220,
220,
220,
220,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
2393,
28,
30910,
36584,
32961,
11,
220,
2251,
62,
2539,
28,
62,
20147,
1968,
273,
13557,
32538,
62,
17953,
62,
2539,
828,
198,
220,
16589,
198,
220,
18366,
41888,
198,
220,
16589,
198,
220,
28376,
62,
19199,
41888,
4357,
198,
220,
33829,
62,
19199,
41888,
198,
220,
16589,
198,
220,
11389,
1143,
62,
25811,
28,
14202,
11,
198,
220,
318,
62,
2302,
437,
540,
28,
25101,
11,
198,
220,
15582,
11639,
1676,
1462,
18,
3256,
198,
220,
7552,
62,
81,
6231,
41888,
4357,
198,
220,
530,
1659,
82,
41888,
198,
220,
16589,
198,
220,
11389,
1143,
62,
9688,
28,
15187,
11,
198,
220,
11389,
1143,
62,
437,
28,
23362,
11,
198,
8,
198,
198,
62,
32,
24318,
57,
13,
25747,
62,
1525,
62,
3672,
17816,
15952,
2611,
6,
4083,
20500,
62,
4906,
796,
5659,
62,
26518,
62,
27530,
62,
26518,
62,
15952,
2611,
834,
40842,
17,
13557,
50,
3398,
27630,
198,
30910,
36584,
32961,
13,
20500,
62,
19199,
62,
1525,
62,
3672,
17816,
30515,
89,
20520,
796,
4808,
32,
24318,
57,
198,
30910,
36584,
32961,
13,
20500,
62,
19199,
62,
1525,
62,
3672,
17816,
30515,
89,
31077,
20520,
796,
4808,
32,
24318,
57,
19535,
47,
1340,
5188,
198,
62,
37047,
62,
9945,
13,
38804,
8979,
24564,
1968,
273,
7,
30910,
36584,
32961,
8,
198,
198,
30515,
89,
796,
4808,
5420,
1564,
13,
8645,
515,
19703,
4668,
12837,
6030,
10786,
30515,
89,
3256,
44104,
20500,
13,
12837,
11,
828,
1391,
198,
220,
705,
30910,
36584,
32961,
6,
1058,
4808,
32,
24318,
57,
11,
198,
220,
705,
834,
21412,
834,
6,
1058,
705,
37047,
13,
37348,
1095,
13,
18439,
89,
62,
40842,
17,
6,
198,
220,
1303,
25248,
11235,
420,
62,
28463,
295,
62,
4122,
7,
4871,
62,
29982,
25,
37047,
13,
37348,
1095,
13,
30515,
89,
8,
198,
220,
32092,
198,
62,
37047,
62,
9945,
13,
38804,
12837,
7,
30515,
89,
8,
198,
198,
30515,
89,
31077,
796,
4808,
5420,
1564,
13,
8645,
515,
19703,
4668,
12837,
6030,
10786,
30515,
89,
31077,
3256,
44104,
20500,
13,
12837,
11,
828,
1391,
198,
220,
705,
30910,
36584,
32961,
6,
1058,
4808,
32,
24318,
57,
19535,
47,
1340,
5188,
11,
198,
220,
705,
834,
21412,
834,
6,
1058,
705,
37047,
13,
37348,
1095,
13,
18439,
89,
62,
40842,
17,
6,
198,
220,
1303,
25248,
11235,
420,
62,
28463,
295,
62,
4122,
7,
4871,
62,
29982,
25,
37047,
13,
37348,
1095,
13,
30515,
89,
31077,
8,
198,
220,
32092,
198,
62,
37047,
62,
9945,
13,
38804,
12837,
7,
30515,
89,
31077,
8,
628,
198,
30910,
36584,
32961,
13557,
25811,
796,
6045,
198,
2,
25248,
11235,
420,
62,
28463,
295,
62,
4122,
7,
21412,
62,
29982,
8,
198
] | 2.454279 | 2,045 |
import os
import os.path as path
import itertools
import pandas as pd
import glob
import config
import random
FANNET_IMG_DIR='/mnt/Data/GoogleFontsSTEFANN/fannet'
COLORNET_IMG_DIR='/mnt/Data/GoogleFontsSTEFANN/colornet'
if __name__=='__main__':
process_fannet(path.join(FANNET_IMG_DIR,'train'),
'./Data/STEFANN/fannet_train.csv')
process_fannet(path.join(FANNET_IMG_DIR,'valid'),
'./Data/STEFANN/fannet_val.csv')
process_colornet(path.join(COLORNET_IMG_DIR,'train'),
'./Data/STEFANN/colornet_train.csv')
process_colornet(path.join(COLORNET_IMG_DIR,'valid'),
'./Data/STEFANN/colornet_val.csv')
| [
11748,
28686,
198,
11748,
28686,
13,
6978,
355,
3108,
198,
11748,
340,
861,
10141,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
15095,
198,
11748,
4566,
198,
11748,
4738,
628,
198,
198,
37,
1565,
12884,
62,
3955,
38,
62,
34720,
11639,
14,
76,
429,
14,
6601,
14,
11708,
23252,
82,
2257,
25425,
22846,
14,
69,
1236,
316,
6,
198,
46786,
12884,
62,
3955,
38,
62,
34720,
11639,
14,
76,
429,
14,
6601,
14,
11708,
23252,
82,
2257,
25425,
22846,
14,
4033,
1211,
316,
6,
628,
628,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
220,
220,
220,
1429,
62,
69,
1236,
316,
7,
6978,
13,
22179,
7,
37,
1565,
12884,
62,
3955,
38,
62,
34720,
4032,
27432,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
19571,
6601,
14,
2257,
25425,
22846,
14,
69,
1236,
316,
62,
27432,
13,
40664,
11537,
198,
220,
220,
220,
1429,
62,
69,
1236,
316,
7,
6978,
13,
22179,
7,
37,
1565,
12884,
62,
3955,
38,
62,
34720,
4032,
12102,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
19571,
6601,
14,
2257,
25425,
22846,
14,
69,
1236,
316,
62,
2100,
13,
40664,
11537,
198,
220,
220,
220,
1429,
62,
4033,
1211,
316,
7,
6978,
13,
22179,
7,
46786,
12884,
62,
3955,
38,
62,
34720,
4032,
27432,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
19571,
6601,
14,
2257,
25425,
22846,
14,
4033,
1211,
316,
62,
27432,
13,
40664,
11537,
198,
220,
220,
220,
1429,
62,
4033,
1211,
316,
7,
6978,
13,
22179,
7,
46786,
12884,
62,
3955,
38,
62,
34720,
4032,
12102,
33809,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
19571,
6601,
14,
2257,
25425,
22846,
14,
4033,
1211,
316,
62,
2100,
13,
40664,
11537,
628
] | 2.040936 | 342 |
'''
@ project: LibrarySeats
@ file: test
@ user: 罗申申
@ email: [email protected]
@ tool: PyCharm
@ time: 2021/5/24 14:27
'''
import re
import function
import execjs
import browser_tools
def verify_code_get(jsname,cookie,time):
'''代码不麻烦,主要是分析js花了些时间'''
url = "https://static.wechat.laixuanzuo.com/template/theme2/cache/layout/" + jsname + ".js"
pattern_js_bg = 'void 0\=\=\=.\&\&\(.\=""\);'
pattern_js_end = '.\.ajax_get'
pattern_js = pattern_js_bg + '.*' + pattern_js_end
pattern_js_res = '\+"\&".*\+"\&yzm\="'
exjs = network(url,cookie,time)
funjs = re.search(pattern_js, exjs).group(0)
funjs = funjs[19:-10]
resjs = re.search(pattern_js_res, exjs).group(0)
resultcommond = resjs[5:-14]
exjs8 = exjs
docjs = execjs.compile(exjs8 + funjs)
return docjs.eval(resultcommond)
| [
7061,
6,
198,
31,
1628,
25,
10074,
4653,
1381,
198,
31,
2393,
25,
1332,
198,
31,
2836,
25,
13328,
121,
245,
18796,
111,
18796,
111,
198,
31,
3053,
25,
300,
84,
418,
5135,
831,
31,
65,
6413,
64,
13,
15532,
13,
31522,
198,
31,
2891,
25,
9485,
1925,
1670,
198,
31,
640,
25,
33448,
14,
20,
14,
1731,
1478,
25,
1983,
198,
7061,
6,
198,
11748,
302,
198,
11748,
2163,
198,
11748,
2452,
8457,
198,
11748,
6444,
62,
31391,
628,
198,
4299,
11767,
62,
8189,
62,
1136,
7,
8457,
3672,
11,
44453,
11,
2435,
2599,
198,
220,
220,
220,
705,
7061,
47987,
163,
254,
223,
38834,
165,
118,
119,
163,
225,
99,
171,
120,
234,
10310,
119,
17358,
223,
42468,
26344,
228,
162,
252,
238,
8457,
164,
46788,
12859,
228,
12859,
249,
33768,
114,
29785,
112,
7061,
6,
198,
220,
220,
220,
19016,
796,
366,
5450,
1378,
12708,
13,
732,
17006,
13,
5031,
844,
7258,
89,
20895,
13,
785,
14,
28243,
14,
43810,
17,
14,
23870,
14,
39786,
30487,
1343,
44804,
3672,
1343,
27071,
8457,
1,
628,
220,
220,
220,
3912,
62,
8457,
62,
35904,
796,
705,
19382,
657,
59,
28,
59,
28,
59,
28,
13,
59,
5,
59,
5,
59,
7,
13,
59,
33151,
59,
1776,
6,
198,
220,
220,
220,
3912,
62,
8457,
62,
437,
796,
45302,
17405,
1228,
897,
62,
1136,
6,
198,
220,
220,
220,
3912,
62,
8457,
796,
3912,
62,
8457,
62,
35904,
1343,
705,
15885,
6,
1343,
3912,
62,
8457,
62,
437,
628,
220,
220,
220,
3912,
62,
8457,
62,
411,
796,
705,
59,
10,
1,
59,
5,
1911,
9,
59,
10,
1,
59,
5,
45579,
76,
59,
2625,
6,
628,
220,
220,
220,
409,
8457,
796,
3127,
7,
6371,
11,
44453,
11,
2435,
8,
628,
220,
220,
220,
1257,
8457,
796,
302,
13,
12947,
7,
33279,
62,
8457,
11,
409,
8457,
737,
8094,
7,
15,
8,
198,
220,
220,
220,
1257,
8457,
796,
1257,
8457,
58,
1129,
21912,
940,
60,
628,
220,
220,
220,
581,
8457,
796,
302,
13,
12947,
7,
33279,
62,
8457,
62,
411,
11,
409,
8457,
737,
8094,
7,
15,
8,
198,
220,
220,
220,
1255,
785,
6327,
796,
581,
8457,
58,
20,
21912,
1415,
60,
628,
220,
220,
220,
409,
8457,
23,
796,
409,
8457,
628,
220,
220,
220,
2205,
8457,
796,
2452,
8457,
13,
5589,
576,
7,
1069,
8457,
23,
1343,
1257,
8457,
8,
628,
220,
220,
220,
1441,
2205,
8457,
13,
18206,
7,
20274,
785,
6327,
8,
198
] | 2.051095 | 411 |
import pytest
from en16931.invoice_line import InvoiceLine
| [
11748,
12972,
9288,
198,
198,
6738,
551,
22172,
3132,
13,
16340,
2942,
62,
1370,
1330,
10001,
2942,
13949,
628
] | 3.210526 | 19 |
#!/usr/bin/env python3
from multiprocessing import Pool, TimeoutError
from glob import glob
import gzip
import pysam
from Bio import SeqIO
from collections import Counter, defaultdict
import scipy.stats as stats
import operator
import pandas as pd
import argparse
import cProfile
import sys
def chunk_ref(args, chroms):
'''
Split ref into chunks for threading
'''
#make server mode where just takes one chrom and scatters with WDL
chunks = []
size = 100000 #just for testing, put back to 1mb
total_len = 0
for record in SeqIO.parse(args.ref, 'fasta'):
if record.id in chroms:
for i in range(0, len(record.seq), size):
if len(record.seq) > i + size:
end = i + size
else:#end of chrom
end = len(record.seq)
chunks.append((record.id, i, i+size))
return chunks
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
11,
3862,
448,
12331,
198,
6738,
15095,
1330,
15095,
198,
11748,
308,
13344,
198,
11748,
279,
893,
321,
198,
6738,
16024,
1330,
1001,
80,
9399,
198,
6738,
17268,
1330,
15034,
11,
4277,
11600,
198,
11748,
629,
541,
88,
13,
34242,
355,
9756,
198,
11748,
10088,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
1822,
29572,
198,
11748,
269,
37046,
198,
11748,
25064,
628,
198,
198,
4299,
16058,
62,
5420,
7,
22046,
11,
15358,
82,
2599,
628,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
27758,
1006,
656,
22716,
329,
4704,
278,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
1303,
15883,
4382,
4235,
810,
655,
2753,
530,
15358,
290,
629,
34387,
351,
370,
19260,
628,
220,
220,
220,
22716,
796,
17635,
198,
220,
220,
220,
2546,
796,
1802,
830,
1303,
3137,
329,
4856,
11,
1234,
736,
284,
352,
2022,
198,
220,
220,
220,
2472,
62,
11925,
796,
657,
198,
220,
220,
220,
329,
1700,
287,
1001,
80,
9399,
13,
29572,
7,
22046,
13,
5420,
11,
705,
7217,
64,
6,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
611,
1700,
13,
312,
287,
15358,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
15,
11,
18896,
7,
22105,
13,
41068,
828,
2546,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
22105,
13,
41068,
8,
1875,
1312,
1343,
2546,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
796,
1312,
1343,
2546,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2073,
43922,
437,
286,
15358,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
886,
796,
18896,
7,
22105,
13,
41068,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22716,
13,
33295,
19510,
22105,
13,
312,
11,
1312,
11,
1312,
10,
7857,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
1441,
22716,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.357843 | 408 |
# coding=utf-8
"""
백준 16928번 : 뱀과 사다리 게임
"""
import sys
from collections import deque
input = sys.stdin.readline
N, M = map(int, input().split())
graph = [*range(101)]
visited = [-1] * 101
for _ in range(N + M):
x, y = map(int, input().split())
graph[x] = y
bfs(graph, 1, visited)
print(visited[-1])
| [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
167,
108,
109,
168,
97,
222,
27191,
2078,
167,
110,
230,
1058,
31619,
109,
222,
166,
111,
120,
23821,
8955,
46695,
97,
167,
99,
105,
220,
166,
110,
234,
168,
252,
226,
198,
37811,
198,
11748,
25064,
198,
6738,
17268,
1330,
390,
4188,
198,
15414,
796,
25064,
13,
19282,
259,
13,
961,
1370,
628,
198,
45,
11,
337,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
198,
34960,
796,
30138,
9521,
7,
8784,
15437,
198,
4703,
863,
796,
25915,
16,
60,
1635,
8949,
198,
198,
1640,
4808,
287,
2837,
7,
45,
1343,
337,
2599,
198,
220,
220,
220,
2124,
11,
331,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
220,
220,
220,
4823,
58,
87,
60,
796,
331,
198,
198,
65,
9501,
7,
34960,
11,
352,
11,
8672,
8,
198,
4798,
7,
4703,
863,
58,
12,
16,
12962,
628
] | 2.065789 | 152 |
import glob
import os
import sys
import csv
csv.field_size_limit(1000000000)
# -*- coding: utf-8 -*-
import codecs
files = []
cvfv = codecs.open("./birth_cvfv.xml","w",'utf-8')
fmc = codecs.open("./birth_fmc.xml","w",'utf-8')
fuc = codecs.open("./birth_fuc.xml","w",'utf-8')
_2gram = codecs.open("./birth_2gram.xml","w",'utf-8')
_3gram = codecs.open("./birth_3gram.xml","w",'utf-8')
_4gram = codecs.open("./birth_4gram.xml","w",'utf-8')
_5gram = codecs.open("./birth_5gram.xml","w",'utf-8')
_6gram = codecs.open("./birth_6gram.xml","w",'utf-8')
smc = codecs.open("./birth_smc.xml","w",'utf-8')
uc = codecs.open("./birth_uc.xml","w",'utf-8')
wsp = codecs.open("./birth_wsp.xml","w",'utf-8')
files = [cvfv, fmc, fuc, _2gram, _3gram, _4gram, _5gram, _6gram, smc, uc, wsp]
for j in files:
init(j)
tmp = glob.glob("./*.csv")
count = 0
for i in tmp:
reader = open(i).read().split('\n')
if '\0' not in open(i).read():
if reader is not None:
for row in reader:
row = row.split(',',3)
if len(row) >= 4:
row[0] = row[0].replace('\n',"").replace('<','<').replace(">",'>').replace("&",'&').replace("\"",'"').replace("\'",''')
row[1] = row[1].replace('\n',"").replace('<','<').replace(">",'>').replace("&",'&').replace("\"",'"').replace("\'",''')
row[2] = row[2].replace('\n',"").replace('<','<').replace(">",'>').replace("&",'&').replace("\"",'"').replace("\'",''')
row[3] = row[3].replace('\n',"").replace('<','<').replace(">",'>').replace("&",'&').replace("\"",'"').replace("\'",''')
if "cvfv" in row[2]:
writer(cvfv, row)
elif "fmc" in row[2]:
writer(fmc, row)
elif "fuc" in row[2]:
writer(fuc, row)
elif "2-gram" in str(i):
writer(_2gram, row)
elif "3-gram" in str(i):
writer(_3gram, row)
elif "4-gram" in str(i):
writer(_4gram, row)
elif "5-gram" in str(i):
writer(_5gram, row)
elif "6-gram" in str(i):
writer(_6gram, row)
elif "smc" in row[2]:
writer(smc, row)
elif "uc" in row[2]:
writer(uc, row)
elif "wsp" in row[2]:
writer(wsp, row)
for j in files:
finish_writer(j)
| [
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
269,
21370,
198,
198,
40664,
13,
3245,
62,
7857,
62,
32374,
7,
16,
10535,
830,
8,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
40481,
82,
198,
16624,
796,
17635,
198,
33967,
69,
85,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
33967,
69,
85,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
69,
23209,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
69,
23209,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
69,
1229,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
69,
1229,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
62,
17,
4546,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
17,
4546,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
62,
18,
4546,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
18,
4546,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
62,
19,
4546,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
19,
4546,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
62,
20,
4546,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
20,
4546,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
62,
21,
4546,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
21,
4546,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
5796,
66,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
5796,
66,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
1229,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
1229,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
86,
2777,
796,
40481,
82,
13,
9654,
7,
1911,
14,
24280,
62,
86,
2777,
13,
19875,
2430,
86,
1600,
6,
40477,
12,
23,
11537,
198,
198,
16624,
796,
685,
33967,
69,
85,
11,
277,
23209,
11,
277,
1229,
11,
4808,
17,
4546,
11,
4808,
18,
4546,
11,
4808,
19,
4546,
11,
4808,
20,
4546,
11,
4808,
21,
4546,
11,
895,
66,
11,
334,
66,
11,
266,
2777,
60,
628,
198,
1640,
474,
287,
3696,
25,
198,
220,
220,
220,
2315,
7,
73,
8,
628,
198,
22065,
796,
15095,
13,
4743,
672,
7,
1911,
15211,
13,
40664,
4943,
198,
9127,
796,
657,
198,
1640,
1312,
287,
45218,
25,
198,
220,
220,
220,
9173,
796,
1280,
7,
72,
737,
961,
22446,
35312,
10786,
59,
77,
11537,
198,
220,
220,
220,
611,
705,
59,
15,
6,
407,
287,
1280,
7,
72,
737,
961,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
611,
9173,
318,
407,
6045,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
329,
5752,
287,
9173,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
796,
5752,
13,
35312,
7,
3256,
3256,
18,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
18896,
7,
808,
8,
18189,
604,
25,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
58,
15,
60,
796,
5752,
58,
15,
4083,
33491,
10786,
59,
77,
40264,
11074,
33491,
10786,
27,
41707,
5,
2528,
26,
27691,
33491,
7,
5320,
1600,
6,
5,
13655,
26,
27691,
33491,
7203,
5,
1600,
6,
5,
696,
26,
27691,
33491,
7203,
7879,
1600,
6,
5,
421,
313,
26,
27691,
33491,
7203,
43054,
1600,
6,
5,
499,
418,
26,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
58,
16,
60,
796,
5752,
58,
16,
4083,
33491,
10786,
59,
77,
40264,
11074,
33491,
10786,
27,
41707,
5,
2528,
26,
27691,
33491,
7,
5320,
1600,
6,
5,
13655,
26,
27691,
33491,
7203,
5,
1600,
6,
5,
696,
26,
27691,
33491,
7203,
7879,
1600,
6,
5,
421,
313,
26,
27691,
33491,
7203,
43054,
1600,
6,
5,
499,
418,
26,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
58,
17,
60,
796,
5752,
58,
17,
4083,
33491,
10786,
59,
77,
40264,
11074,
33491,
10786,
27,
41707,
5,
2528,
26,
27691,
33491,
7,
5320,
1600,
6,
5,
13655,
26,
27691,
33491,
7203,
5,
1600,
6,
5,
696,
26,
27691,
33491,
7203,
7879,
1600,
6,
5,
421,
313,
26,
27691,
33491,
7203,
43054,
1600,
6,
5,
499,
418,
26,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
58,
18,
60,
796,
5752,
58,
18,
4083,
33491,
10786,
59,
77,
40264,
11074,
33491,
10786,
27,
41707,
5,
2528,
26,
27691,
33491,
7,
5320,
1600,
6,
5,
13655,
26,
27691,
33491,
7203,
5,
1600,
6,
5,
696,
26,
27691,
33491,
7203,
7879,
1600,
6,
5,
421,
313,
26,
27691,
33491,
7203,
43054,
1600,
6,
5,
499,
418,
26,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
366,
33967,
69,
85,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
33967,
69,
85,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
69,
23209,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
69,
23209,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
69,
1229,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
69,
1229,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
17,
12,
4546,
1,
287,
965,
7,
72,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28264,
17,
4546,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
18,
12,
4546,
1,
287,
965,
7,
72,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28264,
18,
4546,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
19,
12,
4546,
1,
287,
965,
7,
72,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28264,
19,
4546,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
20,
12,
4546,
1,
287,
965,
7,
72,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28264,
20,
4546,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
21,
12,
4546,
1,
287,
965,
7,
72,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
28264,
21,
4546,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
5796,
66,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
5796,
66,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
1229,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
1229,
11,
5752,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1288,
361,
366,
86,
2777,
1,
287,
5752,
58,
17,
5974,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6260,
7,
86,
2777,
11,
5752,
8,
198,
198,
1640,
474,
287,
3696,
25,
198,
220,
220,
220,
5461,
62,
16002,
7,
73,
8,
198
] | 1.726512 | 1,554 |
import setuptools
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="robotarm", # Replace with your username
version="0.0.4",
author="<Aaron Ahmid Balogun>",
author_email="<[email protected]>",
description="<Template Setup.py package>",
long_description=long_description,
long_description_content_type="text/markdown",
url="<https://github.com/AmidBidee/RobotArm>",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=['gunicorn', 'flask', 'pyyaml', 'python-decouple', 'requests', 'psutil', 'tabulate'],
package_dir={"": "robotarm"},
packages=find_packages(
where='.',
include=['robotarm*'], # ["*"] by default
exclude=['robotarm.tests'], # empty by default
),
python_requires=">=3.6",
py_modules=['arm', 'robotarm', 'controllers', 'handlers', 'armservice'],
entry_points={
'console_scripts': [
'arm=Robot-Arm.robotarm.arm:main',
],
},
)
| [
11748,
900,
37623,
10141,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
40406,
7,
628,
220,
220,
220,
1438,
2625,
305,
13645,
1670,
1600,
1303,
40177,
351,
534,
20579,
628,
220,
220,
220,
2196,
2625,
15,
13,
15,
13,
19,
1600,
628,
220,
220,
220,
1772,
2625,
27,
34451,
7900,
13602,
8528,
39918,
29,
1600,
628,
220,
220,
220,
1772,
62,
12888,
2625,
27,
321,
312,
65,
485,
68,
31,
14816,
13,
785,
29,
1600,
628,
220,
220,
220,
6764,
2625,
27,
30800,
31122,
13,
9078,
5301,
29,
1600,
628,
220,
220,
220,
890,
62,
11213,
28,
6511,
62,
11213,
11,
628,
220,
220,
220,
890,
62,
11213,
62,
11299,
62,
4906,
2625,
5239,
14,
4102,
2902,
1600,
628,
220,
220,
220,
19016,
2625,
27,
5450,
1378,
12567,
13,
785,
14,
43541,
33,
485,
68,
14,
14350,
313,
26560,
29,
1600,
628,
220,
220,
220,
1398,
13350,
41888,
628,
220,
220,
220,
220,
220,
220,
220,
366,
15167,
2229,
15417,
7904,
11361,
7904,
513,
1600,
628,
220,
220,
220,
220,
220,
220,
220,
366,
34156,
7904,
7294,
40,
20010,
1079,
7904,
17168,
13789,
1600,
628,
220,
220,
220,
220,
220,
220,
220,
366,
18843,
803,
4482,
7904,
7294,
13362,
1600,
628,
220,
220,
220,
16589,
628,
220,
220,
220,
2721,
62,
47911,
28,
17816,
7145,
291,
1211,
3256,
705,
2704,
2093,
3256,
705,
9078,
88,
43695,
3256,
705,
29412,
12,
12501,
43846,
3256,
705,
8897,
3558,
3256,
705,
862,
22602,
3256,
705,
8658,
5039,
6,
4357,
198,
220,
220,
220,
5301,
62,
15908,
28,
4895,
1298,
366,
305,
13645,
1670,
25719,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
7,
198,
220,
220,
220,
220,
220,
220,
220,
810,
11639,
2637,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2291,
28,
17816,
305,
13645,
1670,
9,
6,
4357,
220,
1303,
14631,
9,
8973,
416,
4277,
198,
220,
220,
220,
220,
220,
220,
220,
19607,
28,
17816,
305,
13645,
1670,
13,
41989,
6,
4357,
220,
1303,
6565,
416,
4277,
198,
220,
220,
220,
10612,
628,
220,
220,
220,
21015,
62,
47911,
2625,
29,
28,
18,
13,
21,
1600,
628,
220,
220,
220,
12972,
62,
18170,
28,
17816,
1670,
3256,
705,
305,
13645,
1670,
3256,
705,
3642,
36667,
3256,
705,
4993,
8116,
3256,
705,
8357,
712,
501,
6,
4357,
628,
220,
220,
220,
5726,
62,
13033,
34758,
198,
220,
220,
220,
705,
41947,
62,
46521,
10354,
685,
198,
220,
220,
220,
220,
220,
220,
220,
705,
1670,
28,
14350,
313,
12,
26560,
13,
305,
13645,
1670,
13,
1670,
25,
12417,
3256,
198,
220,
220,
220,
16589,
198,
5512,
198,
198,
8,
628
] | 2.505353 | 467 |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import time
import uuid
import backoff
from google.api_core.exceptions import NotFound
from google.cloud import pubsub_v1
import mock
import pytest
import publisher
UUID = uuid.uuid4().hex
PROJECT_ID = os.environ["GOOGLE_CLOUD_PROJECT"]
TOPIC_ID = "publisher-test-topic-" + UUID
SUBSCRIPTION_ID = "publisher-test-subscription-" + UUID
# Allow 60s for tests to finish.
MAX_TIME = 60
@pytest.fixture(scope="module")
@pytest.fixture(scope="module")
@pytest.fixture(scope="module")
@pytest.fixture(scope="module")
| [
2,
15069,
1584,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,
198,
2,
220,
220,
220,
220,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
198,
2,
198,
2,
17486,
2672,
416,
9723,
1099,
393,
4987,
284,
287,
3597,
11,
3788,
198,
2,
9387,
739,
262,
13789,
318,
9387,
319,
281,
366,
1921,
3180,
1,
29809,
1797,
11,
198,
2,
42881,
34764,
11015,
6375,
7102,
49828,
11053,
3963,
15529,
509,
12115,
11,
2035,
4911,
393,
17142,
13,
198,
2,
4091,
262,
13789,
329,
262,
2176,
3303,
15030,
21627,
290,
198,
2,
11247,
739,
262,
13789,
13,
198,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
334,
27112,
198,
198,
11748,
736,
2364,
198,
6738,
23645,
13,
15042,
62,
7295,
13,
1069,
11755,
1330,
1892,
21077,
198,
6738,
23645,
13,
17721,
1330,
2240,
7266,
62,
85,
16,
198,
11748,
15290,
198,
11748,
12972,
9288,
198,
198,
11748,
9991,
198,
198,
52,
27586,
796,
334,
27112,
13,
12303,
312,
19,
22446,
33095,
198,
31190,
23680,
62,
2389,
796,
28686,
13,
268,
2268,
14692,
38,
6684,
38,
2538,
62,
5097,
2606,
35,
62,
31190,
23680,
8973,
198,
35222,
2149,
62,
2389,
796,
366,
12984,
8191,
12,
9288,
12,
26652,
21215,
1343,
471,
27586,
198,
12564,
4462,
40165,
62,
2389,
796,
366,
12984,
8191,
12,
9288,
12,
7266,
33584,
21215,
1343,
471,
27586,
198,
2,
22507,
3126,
82,
329,
5254,
284,
5461,
13,
198,
22921,
62,
34694,
796,
3126,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
628,
628,
628,
628,
628,
628
] | 3.26 | 350 |
from django.db import models
from django.contrib.auth.models import User
from cloudinary.models import CloudinaryField
# CloudinaryImage("turtles.jpg").image(width=70, height=53, crop="scale")
"""
Models
"""
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
6279,
3219,
13,
27530,
1330,
10130,
3219,
15878,
198,
198,
2,
10130,
3219,
5159,
7203,
83,
25195,
13,
9479,
11074,
9060,
7,
10394,
28,
2154,
11,
6001,
28,
4310,
11,
13833,
2625,
9888,
4943,
198,
37811,
198,
5841,
1424,
220,
198,
37811,
628,
628
] | 3.227273 | 66 |
# -*- coding: utf-8 -*-
'''
Created on 2014-07-16
@summary: Trellis TEA use pure python
@author: fiefdx
'''
from distutils.core import setup
setup(name='pytea',
version='1.0.2',
author = 'fiefdx',
author_email = '[email protected]',
package_dir={'pytea': 'src'},
packages=['pytea'],
) | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
41972,
319,
1946,
12,
2998,
12,
1433,
198,
31,
49736,
25,
4700,
297,
271,
13368,
32,
779,
5899,
21015,
198,
31,
9800,
25,
277,
2086,
34350,
198,
7061,
6,
198,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
9078,
660,
64,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
16,
13,
15,
13,
17,
3256,
198,
220,
220,
220,
220,
220,
1772,
796,
705,
69,
2086,
34350,
3256,
198,
220,
220,
220,
220,
220,
1772,
62,
12888,
796,
705,
69,
2086,
34350,
31,
14816,
13,
785,
3256,
198,
220,
220,
220,
220,
220,
5301,
62,
15908,
34758,
6,
9078,
660,
64,
10354,
705,
10677,
6,
5512,
198,
220,
220,
220,
220,
220,
10392,
28,
17816,
9078,
660,
64,
6,
4357,
198,
220,
220,
220,
220,
220,
1267
] | 2.125828 | 151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.