blob_id stringlengths 40 40 | formatted stringlengths 15 1.74M | input_ids listlengths 7 1.19M | tokens listlengths 7 1.19M | rows listlengths 7 1.19M | cols listlengths 7 1.19M |
|---|---|---|---|---|---|
830e7e84eebd6a4adb411cc95c9e9c8ff7bdac30 | def isSubsetSum(set, n, sum):
subset = [[False for i in range(sum + 1)] for i in range(n + 1)]
for i in range(n + 1):
subset[i][0] = True
for i in range(1, sum + 1):
subset[0][i] = False
for i in range(1, n + 1):
for j in range(1, sum + 1):
if j < set[i - 1]:
... | [
610,
458,
31596,
4950,
45,
489,
49,
329,
49,
3668,
731,
303,
17384,
299,
3834,
2737,
456,
613,
347,
2189,
45,
1055,
494,
244,
54,
2201,
456,
613,
347,
2189,
45,
115,
494,
244,
54,
2201,
303,
456,
613,
347,
2189,
45,
115,
494,
24... | [
"def",
"Ġis",
"Subset",
"Sum",
"(",
"set",
",",
"Ġn",
",",
"Ġsum",
"):",
"ĊĠĠĠ",
"Ġsubset",
"Ġ=",
"Ġ[[",
"False",
"Ġfor",
"Ġi",
"Ġin",
"Ġrange",
"(",
"sum",
"Ġ+",
"Ġ",
"1",
")]",
"Ġfor",
"Ġi",
"Ġin",
"Ġrange",
"(",
"n",
"Ġ+",
"Ġ",
"1",
")]",
"Ċ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5... | [
1,
4,
7,
13,
16,
17,
20,
21,
23,
24,
28,
30,
4,
11,
13,
16,
21,
25,
27,
30,
36,
37,
40,
42,
43,
44,
46,
50,
52,
55,
61,
62,
63,
65,
66,
67,
69,
4,
8,
10,
13,
19,
20,
21,
23,
24,
25,
27,
8,
15,
16,
17,
19,
20,
... |
00a0668d5fcb8358b4bd7736c48e4867afc0f5b6 | """
Copyright 2019 Enzo Busseti, Walaa Moursi, and Stephen Boyd
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 ... | [
3012,
222,
10585,
244,
55,
53,
54,
62,
2445,
15085,
12529,
489,
110,
49,
643,
298,
2336,
507,
534,
3450,
49,
480,
6678,
19059,
11547,
11055,
222,
222,
23838,
1549,
341,
3954,
1196,
49,
3050,
244,
55,
51,
53,
327,
1402,
332,
3801,
... | [
"\"\"\"",
"Ċ",
"Copyright",
"Ġ",
"2",
"0",
"1",
"9",
"ĠEn",
"zo",
"ĠBus",
"set",
"i",
",",
"ĠW",
"al",
"aa",
"ĠM",
"our",
"si",
",",
"Ġand",
"ĠSte",
"phen",
"ĠBo",
"yd",
"Ċ",
"Ċ",
"Licensed",
"Ġunder",
"Ġthe",
"ĠApache",
"ĠLicense",
",",
"ĠVersion"... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6... | [
1,
4,
1,
10,
11,
12,
13,
14,
15,
18,
20,
24,
27,
28,
29,
31,
33,
35,
37,
40,
42,
43,
47,
51,
55,
58,
60,
1,
1,
9,
15,
19,
26,
34,
35,
43,
44,
45,
46,
47,
49,
52,
54,
61,
64,
1,
4,
8,
12,
16,
21,
26,
33,
36,
4... |
f5c277da2b22debe26327464ae736892360059b4 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
month = ["Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May"]
df = pd.DataFrame(
[
[53, 0, 5, 3, 3],
[51, 0, 1, 3, 2],
[70, 4, 7, 5, 1],
[66, 4, 1, 4, 2],
[64, 4, 4, 3, 2],
... | [
485,
6610,
641,
2115,
222,
485,
13168,
51,
18553,
641,
6020,
222,
485,
13247,
641,
6451,
222,
222,
5926,
299,
3059,
31824,
411,
332,
17512,
411,
332,
22781,
411,
332,
23083,
411,
332,
16203,
411,
332,
22149,
411,
332,
13796,
411,
332,... | [
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"Ċ",
"month",
"Ġ=",
"Ġ[\"",
"Jun",
"\",",
"Ġ\"",
"Jul",
"\",",
"Ġ\"",
"Aug",
"\",",
"Ġ\"",
"Sep",
"\",",
"Ġ\"",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6... | [
1,
7,
13,
16,
19,
1,
7,
18,
19,
25,
28,
32,
1,
7,
14,
17,
20,
1,
1,
6,
8,
11,
14,
16,
18,
21,
23,
25,
28,
30,
32,
35,
37,
39,
42,
44,
46,
49,
51,
53,
56,
58,
60,
63,
65,
67,
70,
72,
74,
77,
79,
81,
84,
86,
88... |
5c2a6802e89314c25f0264bbe2bc7ed2689a255a | a = input("Please enter the elements with spaces between them:").split()
n = len(a)
for i in range(n):
a[i] = int(a[i])
for i in range(n - 1):
for j in range(n - i - 1):
if a[j] > a[j + 1]:
a[j], a[j + 1] = a[j + 1], a[j]
print("Sortes array :", a)
| [
102,
299,
1533,
459,
6578,
6621,
341,
4725,
642,
13950,
3761,
3049,
63,
1912,
3045,
365,
222,
115,
299,
2095,
45,
102,
46,
222,
999,
613,
347,
2189,
45,
115,
731,
303,
331,
96,
110,
98,
299,
648,
45,
102,
96,
110,
1156,
222,
999... | [
"a",
"Ġ=",
"Ġinput",
"(\"",
"Please",
"Ġenter",
"Ġthe",
"Ġelements",
"Ġwith",
"Ġspaces",
"Ġbetween",
"Ġthem",
":",
"\").",
"split",
"()",
"Ċ",
"n",
"Ġ=",
"Ġlen",
"(",
"a",
")",
"Ċ",
"for",
"Ġi",
"Ġin",
"Ġrange",
"(",
"n",
"):",
"ĊĠĠĠ",
"Ġa",
"[",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
2,
4,
10,
12,
18,
24,
28,
37,
42,
49,
57,
62,
63,
66,
71,
73,
1,
2,
4,
8,
9,
10,
11,
1,
4,
6,
9,
15,
16,
17,
19,
4,
6,
7,
8,
9,
11,
15,
16,
17,
18,
19,
21,
1,
4,
6,
9,
15,
16,
17,
19,
20,
21,
23,
4,
8,... |
20f0480ee7e0782b23ec8ade150cdd8d8ad718bb | from math import pow
from math import tan
import plotly.figure_factory as ff
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
def euler():
h = 0.1
x = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5]
y_eval = [0.0]
delta_y = [0.0]
y_real = [0.0]
eps = [0.0]
for i in range(1, l... | [
1097,
7820,
1220,
13157,
222,
1097,
7820,
1220,
28111,
222,
222,
485,
7036,
651,
51,
7770,
100,
5802,
641,
12554,
222,
1097,
7036,
651,
51,
23687,
1220,
5844,
100,
3570,
651,
773,
49,
3238,
100,
22799,
100,
2832,
49,
7036,
49,
613,
... | [
"from",
"Ġmath",
"Ġimport",
"Ġpow",
"Ċ",
"from",
"Ġmath",
"Ġimport",
"Ġtan",
"Ċ",
"Ċ",
"import",
"Ġplot",
"ly",
".",
"figure",
"_",
"factory",
"Ġas",
"Ġff",
"Ċ",
"from",
"Ġplot",
"ly",
".",
"offline",
"Ġimport",
"Ġdownload",
"_",
"plot",
"ly",
"js",
",... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
5,
10,
17,
21,
1,
5,
10,
17,
21,
1,
1,
7,
12,
14,
15,
21,
22,
29,
32,
35,
1,
5,
10,
12,
13,
20,
27,
36,
37,
41,
43,
45,
46,
51,
52,
60,
61,
65,
66,
71,
72,
74,
78,
1,
1,
4,
6,
10,
13,
4,
6,
8,
9,
10,
11,... |
f145274c8caa1e725d12003874eb54a580a6e35e | dic = {"city": "Moscow", "temperature": 20}
# print(dic["city"])
# dic["temperature"] -= 5
# print(dic)
print(dic.get("country", "Russia"))
dic["date"] = "27.05.2019"
print(dic)
| [
2957,
299,
3479,
5733,
582,
332,
82,
519,
30202,
411,
332,
17569,
582,
244,
55,
53,
130,
222,
40,
1489,
45,
2957,
1388,
5733,
6957,
222,
40,
27477,
1388,
17569,
1465,
5928,
244,
58,
222,
40,
1489,
45,
2957,
46,
222,
1243,
45,
2957... | [
"dic",
"Ġ=",
"Ġ{\"",
"city",
"\":",
"Ġ\"",
"M",
"os",
"cow",
"\",",
"Ġ\"",
"temperature",
"\":",
"Ġ",
"2",
"0",
"}",
"Ċ",
"#",
"Ġprint",
"(",
"dic",
"[\"",
"city",
"\"])",
"Ċ",
"#",
"Ġdic",
"[\"",
"temperature",
"\"]",
"Ġ-=",
"Ġ",
"5",
"Ċ",
"#",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
4,
6,
9,
13,
15,
17,
18,
20,
23,
25,
27,
38,
40,
41,
42,
43,
44,
1,
2,
8,
9,
12,
14,
18,
21,
1,
2,
6,
8,
19,
21,
24,
25,
26,
1,
2,
8,
9,
12,
13,
1,
6,
7,
10,
11,
14,
16,
23,
25,
27,
28,
31,
33,
36,
1,
... |
038b8206f77b325bf43fc753f6cee8b4278f4bc9 | import logging
import numpy as np
from deprecated import deprecated
from pycqed.measurement.randomized_benchmarking.clifford_group import clifford_lookuptable
from pycqed.measurement.randomized_benchmarking.clifford_decompositions import gate_decomposition
from pycqed.measurement.randomized_benchmarking.two_qubit_clif... | [
485,
5751,
222,
485,
6610,
641,
2115,
222,
1097,
12692,
1220,
12692,
222,
222,
1097,
3643,
20972,
337,
51,
25929,
51,
3917,
1209,
100,
17456,
318,
51,
592,
2961,
675,
100,
1382,
1220,
1553,
2961,
675,
100,
6436,
9694,
463,
222,
1097,
... | [
"import",
"Ġlogging",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġdeprecated",
"Ġimport",
"Ġdeprecated",
"Ċ",
"Ċ",
"from",
"Ġpy",
"cq",
"ed",
".",
"measurement",
".",
"random",
"ized",
"_",
"benchmark",
"ing",
".",
"cl",
"iff",
"ord",
"_",
"gro... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
7,
15,
1,
7,
13,
16,
19,
1,
5,
16,
23,
34,
1,
1,
5,
8,
10,
12,
13,
24,
25,
31,
35,
36,
45,
48,
49,
51,
54,
57,
58,
63,
70,
73,
76,
79,
80,
84,
87,
91,
1,
5,
8,
10,
12,
13,
24,
25,
31,
35,
36,
45,
48,
49,
... |
3421c3b839721694945bdbb4f17183bceaed5296 | import unittest
import ConvertListToDict as cldf
class MyDictTestCase(unittest.TestCase):
def test_Dict(self):
# Testcase1 (len(keys) == len(values))
actualDict1 = cldf.ConvertListsToDict([1, 2, 3], ["a", "b", "c"])
expectedDict1 = {1: "a", 2: "b", 3: "c"}
self.assertEqual(actualDi... | [
485,
15790,
222,
485,
8145,
739,
724,
7205,
641,
300,
1400,
107,
499,
222,
842,
4318,
7205,
7246,
45,
18959,
51,
7246,
731,
303,
684,
913,
100,
7205,
45,
803,
731,
310,
607,
2128,
1749,
54,
327,
1688,
45,
3519,
46,
630,
2095,
45,
... | [
"import",
"Ġunittest",
"Ċ",
"import",
"ĠConvert",
"List",
"To",
"Dict",
"Ġas",
"Ġc",
"ld",
"f",
"ĊĊ",
"Ċ",
"class",
"ĠMy",
"Dict",
"TestCase",
"(",
"unittest",
".",
"TestCase",
"):",
"ĊĠĠĠ",
"Ġdef",
"Ġtest",
"_",
"Dict",
"(",
"self",
"):",
"ĊĠĠĠĠĠĠĠ",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
7,
16,
1,
7,
15,
19,
21,
25,
28,
30,
32,
33,
1,
1,
6,
9,
13,
21,
22,
30,
31,
39,
41,
4,
8,
13,
14,
18,
19,
23,
25,
8,
10,
15,
19,
20,
22,
25,
26,
30,
31,
34,
38,
39,
45,
47,
8,
15,
19,
20,
22,
24,
26,
27,
... |
1ea61ab4003de80ffe9fb3e284b6686d4bf20b15 | # Generated by Django 3.2.3 on 2021-08-26 09:18
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Restaurant",
... | [
40,
13046,
829,
18288,
244,
56,
51,
55,
51,
56,
563,
244,
55,
53,
55,
54,
50,
53,
61,
50,
55,
59,
244,
53,
62,
63,
54,
61,
222,
222,
485,
8532,
51,
1284,
51,
24878,
222,
1097,
8532,
51,
1219,
1220,
12520,
49,
4590,
222,
485,... | [
"#",
"ĠGenerated",
"Ġby",
"ĠDjango",
"Ġ",
"3",
".",
"2",
".",
"3",
"Ġon",
"Ġ",
"2",
"0",
"2",
"1",
"-",
"0",
"8",
"-",
"2",
"6",
"Ġ",
"0",
"9",
":",
"1",
"8",
"Ċ",
"Ċ",
"import",
"Ġdjango",
".",
"core",
".",
"validators",
"Ċ",
"from",
"Ġdja... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
12,
15,
22,
23,
24,
25,
26,
27,
28,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
1,
1,
7,
14,
15,
19,
20,
30,
1,
5,
12,
13,
15,
22,
33,
34,
41,
1,
7,
14,
15,
17,
18,
24,
25,
3... |
6db7189d26c63ca9f9667045b780ec11994bac28 | import sys
from pypregel import Pypregel
from pypregel.vertex import Vertex, Edge
from pypregel.reader import Reader
from pypregel.writer import Writer
from pypregel.combiner import Combiner
class PageRankVertex(Vertex):
def compute(self):
if self.superstep() >= 1:
s = 0
while sel... | [
485,
5263,
222,
222,
1097,
3643,
1023,
17705,
1220,
4374,
1023,
17705,
222,
1097,
3643,
1023,
17705,
51,
9317,
1220,
15657,
49,
11284,
222,
1097,
3643,
1023,
17705,
51,
6321,
1220,
19289,
222,
1097,
3643,
1023,
17705,
51,
7595,
1220,
26... | [
"import",
"Ġsys",
"Ċ",
"Ċ",
"from",
"Ġpy",
"pre",
"gel",
"Ġimport",
"ĠPy",
"pre",
"gel",
"Ċ",
"from",
"Ġpy",
"pre",
"gel",
".",
"vertex",
"Ġimport",
"ĠVertex",
",",
"ĠEdge",
"Ċ",
"from",
"Ġpy",
"pre",
"gel",
".",
"reader",
"Ġimport",
"ĠReader",
"Ċ",
... | [
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
7,
11,
1,
1,
5,
8,
11,
14,
21,
24,
27,
30,
1,
5,
8,
11,
14,
15,
21,
28,
35,
36,
41,
1,
5,
8,
11,
14,
15,
21,
28,
35,
1,
5,
8,
11,
14,
15,
21,
28,
35,
1,
5,
8,
11,
14,
15,
21,
23,
30,
37,
39,
1,
1,
6,
1... |
78dc2193c05ddb4cd4c80b1c0322890eca7fcf19 | import signal
import time
import sdnotify
n = sdnotify.SystemdNotifier()
if __name__ == "__main__":
n.notify("READY=1")
time.sleep(2)
| [
485,
7086,
222,
485,
1153,
222,
222,
485,
16726,
9357,
222,
222,
115,
299,
16726,
9357,
51,
1615,
105,
25984,
365,
222,
222,
344,
1176,
444,
523,
630,
9609,
1850,
18021,
303,
329,
51,
9357,
459,
21252,
66,
54,
678,
303,
1153,
51,
... | [
"import",
"Ġsignal",
"Ċ",
"import",
"Ġtime",
"Ċ",
"Ċ",
"import",
"Ġsd",
"notify",
"Ċ",
"Ċ",
"n",
"Ġ=",
"Ġsd",
"notify",
".",
"System",
"d",
"Notifier",
"()",
"Ċ",
"Ċ",
"if",
"Ġ__",
"name",
"__",
"Ġ==",
"Ġ\"__",
"main",
"__\":",
"ĊĠĠĠ",
"Ġn",
".",
"... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10
] | [
1,
7,
14,
1,
7,
12,
1,
1,
7,
10,
16,
1,
1,
2,
4,
7,
13,
14,
20,
21,
29,
31,
1,
1,
3,
6,
10,
12,
15,
19,
23,
27,
4,
6,
7,
13,
15,
20,
21,
22,
24,
4,
9,
10,
15,
16,
17,
18
] |
2fadc5c90d1bae14c57fc3bf02582e12aa8abdf6 | import array
from PIL import Image
from generic.editable import XEditable as Editable
class PLTT(Editable):
"""Palette information"""
FORMAT_16BIT = 3
FORMAT_256BIT = 4
def define(self, clr):
self.clr = clr
self.string("magic", length=4, default="PLTT") # not reversed
self... | [
485,
1437,
222,
222,
1097,
35991,
1220,
4393,
222,
222,
1097,
10151,
51,
21439,
1220,
1618,
21596,
641,
10605,
463,
499,
222,
842,
14861,
6992,
45,
21596,
731,
303,
1547,
18481,
2490,
3012,
465,
31424,
100,
54,
59,
5676,
299,
244,
56,... | [
"import",
"Ġarray",
"Ċ",
"Ċ",
"from",
"ĠPIL",
"Ġimport",
"ĠImage",
"Ċ",
"Ċ",
"from",
"Ġgeneric",
".",
"editable",
"Ġimport",
"ĠX",
"Editable",
"Ġas",
"ĠEdit",
"able",
"ĊĊ",
"Ċ",
"class",
"ĠPL",
"TT",
"(",
"Editable",
"):",
"ĊĠĠĠ",
"Ġ\"\"\"",
"Palette",
"... | [
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
14,
14,
14,
14,
14,
14... | [
1,
7,
13,
1,
1,
5,
9,
16,
22,
1,
1,
5,
13,
14,
22,
29,
31,
39,
42,
47,
51,
1,
1,
6,
9,
11,
12,
20,
22,
4,
8,
15,
27,
30,
4,
11,
12,
13,
14,
17,
19,
20,
21,
4,
11,
12,
13,
14,
15,
18,
20,
21,
22,
4,
8,
15,
... |
360063940bb82defefc4195a5e17c9778b47e9e5 | from requests import post
import json
import argparse
import base64
from ReadFromWindow import new_image_string
from ParsOnText import ParsOnText
# Функция возвращает IAM-токен для аккаунта на Яндексе.
def get_iam_token(iam_url, oauth_token):
response = post(iam_url, json={"yandexPassportOauthToken": oauth_token}... | [
1097,
5188,
1220,
2381,
222,
485,
2379,
222,
485,
16693,
222,
485,
1712,
59,
57,
222,
1097,
4858,
1811,
1684,
1220,
556,
100,
915,
100,
819,
222,
1097,
2736,
120,
1501,
1049,
1220,
2736,
120,
1501,
1049,
499,
222,
40,
968,
135,
3023... | [
"from",
"Ġrequests",
"Ġimport",
"Ġpost",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġargparse",
"Ċ",
"import",
"Ġbase",
"6",
"4",
"Ċ",
"from",
"ĠRead",
"From",
"Window",
"Ġimport",
"Ġnew",
"_",
"image",
"_",
"string",
"Ċ",
"from",
"ĠPar",
"s",
"On",
"Text",... | [
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
5,
14,
21,
26,
1,
7,
12,
1,
7,
16,
1,
7,
12,
13,
14,
1,
5,
10,
14,
20,
27,
31,
32,
37,
38,
44,
1,
5,
9,
10,
12,
16,
23,
27,
28,
30,
34,
1,
1,
2,
3,
4,
7,
10,
14,
18,
21,
25,
26,
27,
29,
31,
35,
37,
38,
... |
75716aaaca63f8ca6d32c885021c1dc0f9a12dac | # -*- coding: utf-8 -*-
# Third party imports
import numpy as np
# Local application imports
from mosqito.sound_level_meter import noct_spectrum
from mosqito.sq_metrics.loudness.loudness_zwst._main_loudness import _main_loudness
from mosqito.sq_metrics.loudness.loudness_zwst._calc_slopes import _calc_slopes
from mosq... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
40,
38270,
15280,
14463,
222,
485,
6610,
641,
2115,
222,
222,
40,
7099,
3039,
14463,
222,
1097,
364,
519,
118,
4736,
51,
10067,
100,
2675,
100,
12354,
1220,
1307,
307,
100,
30697,
2... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"#",
"ĠThird",
"Ġparty",
"Ġimports",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"Ċ",
"#",
"ĠLocal",
"Ġapplication",
"Ġimports",
"Ċ",
"from",
"Ġm",
"os",
"q",
"ito",
".",
"sound",
"_",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
2,
8,
14,
22,
1,
7,
13,
16,
19,
1,
1,
2,
8,
20,
28,
1,
5,
7,
9,
10,
13,
14,
19,
20,
25,
26,
31,
38,
41,
43,
44,
52,
1,
5,
7,
9,
10,
13,
14,
16,
17,
24,
25,
29,
33,
3... |
0e9d0927e8d69b0c0fad98479d47f2409c95a751 | n = int(input())
a = sorted([int(input()) for _ in range(n)])
x = a[: n // 2]
y = a[(n + 1) // 2 :]
ans = 0
for i in range(len(x)):
ans += abs(x[i] - y[i])
for i in range(1, len(y)):
ans += abs(x[i - 1] - y[i])
if n % 2 == 1:
ans += max(
abs(a[n // 2] - x[-1]),
abs(a[n // 2] - y[0]),
)... | [
115,
299,
648,
45,
1151,
1177,
222,
102,
299,
8635,
2034,
429,
45,
1151,
1177,
456,
634,
347,
2189,
45,
115,
14935,
222,
222,
125,
299,
331,
2934,
329,
453,
244,
55,
98,
222,
126,
299,
331,
9448,
115,
494,
244,
54,
46,
453,
244,... | [
"n",
"Ġ=",
"Ġint",
"(",
"input",
"())",
"Ċ",
"a",
"Ġ=",
"Ġsorted",
"([",
"int",
"(",
"input",
"())",
"Ġfor",
"Ġ_",
"Ġin",
"Ġrange",
"(",
"n",
")])",
"Ċ",
"Ċ",
"x",
"Ġ=",
"Ġa",
"[:",
"Ġn",
"Ġ//",
"Ġ",
"2",
"]",
"Ċ",
"y",
"Ġ=",
"Ġa",
"[(",
"n... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
4,
8,
9,
14,
17,
1,
2,
4,
11,
13,
16,
17,
22,
25,
29,
31,
34,
40,
41,
42,
45,
1,
1,
2,
4,
6,
8,
10,
13,
14,
15,
16,
1,
2,
4,
6,
8,
9,
11,
12,
13,
14,
17,
18,
19,
22,
1,
1,
4,
6,
7,
8,
1,
4,
6,
9,
... |
e3dece36ba3e5b3df763e7119c485f6ed2155098 | # Core Packages
import difflib
import tkinter as tk
from tkinter import *
from tkinter import ttk
from tkinter.scrolledtext import *
import tkinter.filedialog
import PyPDF2
from tkinter import filedialog
import torch
import json
from transformers import T5Tokenizer, T5ForConditionalGeneration, T5Config
# NLP Pkgs
from... | [
40,
7357,
34306,
222,
485,
5861,
1379,
222,
485,
19488,
1164,
641,
19488,
222,
1097,
19488,
1164,
1220,
338,
222,
1097,
19488,
1164,
1220,
292,
4708,
222,
1097,
19488,
1164,
51,
564,
23202,
897,
1220,
338,
222,
485,
19488,
1164,
51,
7... | [
"#",
"ĠCore",
"ĠPackages",
"Ċ",
"import",
"Ġdiff",
"lib",
"Ċ",
"import",
"Ġtk",
"inter",
"Ġas",
"Ġtk",
"Ċ",
"from",
"Ġtk",
"inter",
"Ġimport",
"Ġ*",
"Ċ",
"from",
"Ġtk",
"inter",
"Ġimport",
"Ġt",
"tk",
"Ċ",
"from",
"Ġtk",
"inter",
".",
"sc",
"rolled",
... | [
1,
1,
1,
1,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
11,
11,
11,
... | [
1,
2,
7,
16,
1,
7,
12,
15,
1,
7,
10,
15,
18,
21,
1,
5,
8,
13,
20,
22,
1,
5,
8,
13,
20,
22,
24,
1,
5,
8,
13,
14,
16,
22,
26,
33,
35,
1,
7,
10,
15,
16,
20,
26,
1,
7,
10,
13,
14,
1,
5,
8,
13,
20,
25,
31,
1,
... |
64366e8532ffe05db7e7b7313e1d573c78a4e030 | import packaging.requirements
import pydantic
import pytest
from prefect.software.pip import PipRequirement, current_environment_requirements
class TestPipRequirement:
def is_packaging_subclass(self):
r = PipRequirement("prefect")
assert isinstance(r, packaging.requirements.Requirement)
def ... | [
485,
36413,
51,
15956,
222,
485,
3643,
105,
7283,
222,
485,
13090,
222,
222,
1097,
15706,
431,
51,
12300,
51,
9144,
1220,
48334,
18059,
49,
1565,
100,
9247,
100,
15956,
499,
222,
842,
2128,
41896,
18059,
63,
303,
684,
458,
100,
36557,... | [
"import",
"Ġpackaging",
".",
"requirements",
"Ċ",
"import",
"Ġpy",
"d",
"antic",
"Ċ",
"import",
"Ġpytest",
"Ċ",
"Ċ",
"from",
"Ġpref",
"ect",
".",
"software",
".",
"pip",
"Ġimport",
"ĠPip",
"Requirement",
",",
"Ġcurrent",
"_",
"environment",
"_",
"requirement... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
... | [
1,
7,
17,
18,
30,
1,
7,
10,
11,
16,
1,
7,
14,
1,
1,
5,
10,
13,
14,
22,
23,
26,
33,
37,
48,
49,
57,
58,
69,
70,
82,
1,
1,
6,
11,
14,
25,
26,
4,
8,
11,
12,
21,
22,
30,
31,
35,
37,
8,
10,
12,
16,
27,
29,
33,
3... |
8c318d7152bfdf2bc472258eb87dfa499b743193 | # coding:utf-8
def application(env, handle_headers):
status = "200"
response_headers = [("Server", "")]
return ""
| [
40,
10633,
63,
3330,
50,
61,
499,
222,
610,
3039,
45,
2141,
49,
2902,
100,
5090,
731,
303,
2302,
299,
332,
55,
53,
53,
39,
303,
1808,
100,
5090,
299,
447,
459,
2077,
411,
332,
3843,
303,
461,
3347,
222
] | [
"#",
"Ġcoding",
":",
"utf",
"-",
"8",
"ĊĊ",
"Ċ",
"def",
"Ġapplication",
"(",
"env",
",",
"Ġhandle",
"_",
"headers",
"):",
"ĊĠĠĠ",
"Ġstatus",
"Ġ=",
"Ġ\"",
"2",
"0",
"0",
"\"",
"ĊĠĠĠ",
"Ġresponse",
"_",
"headers",
"Ġ=",
"Ġ[",
"(\"",
"Server",
"\",",
... | [
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7
] | [
1,
2,
9,
10,
13,
14,
15,
1,
1,
4,
16,
17,
20,
21,
28,
29,
36,
38,
4,
11,
13,
15,
16,
17,
18,
19,
4,
13,
14,
21,
23,
25,
27,
33,
35,
37,
40,
4,
11,
14
] |
af35075eaca9bba3d6bdb73353eaf944869cdede | # Software Name: MOON
# Version: 5.4
# SPDX-FileCopyrightText: Copyright (c) 2018-2020 Orange and its contributors
# SPDX-License-Identifier: Apache-2.0
# This software is distributed under the 'Apache License 2.0',
# the text of which is available at 'http://www.apache.org/licenses/LICENSE-2.0.txt'
# or see the "LI... | [
40,
3870,
3286,
63,
7707,
586,
222,
222,
40,
3050,
63,
244,
58,
51,
57,
222,
222,
40,
18769,
50,
991,
10585,
1049,
63,
2657,
327,
104,
46,
244,
55,
53,
54,
61,
50,
55,
53,
55,
53,
565,
3623,
480,
2840,
13356,
222,
40,
18769,
... | [
"#",
"ĠSoftware",
"ĠName",
":",
"ĠMO",
"ON",
"Ċ",
"Ċ",
"#",
"ĠVersion",
":",
"Ġ",
"5",
".",
"4",
"Ċ",
"Ċ",
"#",
"ĠSPDX",
"-",
"File",
"Copyright",
"Text",
":",
"ĠCopyright",
"Ġ(",
"c",
")",
"Ġ",
"2",
"0",
"1",
"8",
"-",
"2",
"0",
"2",
"0",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8... | [
1,
2,
11,
16,
17,
20,
22,
1,
1,
2,
10,
11,
12,
13,
14,
15,
1,
1,
2,
7,
8,
12,
21,
25,
26,
36,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
52,
57,
61,
65,
78,
1,
2,
7,
8,
15,
16,
26,
27,
34,
35,
36,
... |
026e06e777d64f8724ec5e89a7829b3a42a25d6b | from flask import Flask, request, redirect, url_for, render_template
from flask_modus import Modus
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "postgres://localhost/flask_one_to_many"
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"... | [
1097,
18958,
1220,
24033,
49,
1343,
49,
5675,
49,
2001,
100,
999,
49,
2922,
100,
2402,
222,
1097,
18958,
100,
1820,
371,
1220,
5516,
371,
222,
1097,
18958,
100,
41228,
1220,
4447,
43108,
222,
1097,
18958,
100,
20101,
1220,
41615,
222,
... | [
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
",",
"Ġrequest",
",",
"Ġredirect",
",",
"Ġurl",
"_",
"for",
",",
"Ġrender",
"_",
"template",
"Ċ",
"from",
"Ġflask",
"_",
"mod",
"us",
"Ġimport",
"ĠMod",
"us",
"Ċ",
"from",
"Ġflask",
"_",
"sqlalchemy",
"Ġimport",
"ĠS... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
5,
11,
18,
24,
25,
33,
34,
43,
44,
48,
49,
52,
53,
60,
61,
69,
1,
5,
11,
12,
15,
17,
24,
28,
30,
1,
5,
11,
12,
22,
29,
33,
40,
1,
5,
11,
12,
19,
26,
34,
1,
1,
4,
6,
12,
15,
19,
22,
1,
4,
5,
11,
13,
16,
1... |
848934680253ff2950db7723b1fe82b2ae799900 | # -*- coding: utf-8 -*-
"""
Noting is perfect, errors and timeouts may happen, and when such failures happen, the
consumer has to decide what to do with that. By default, the consumer would reject the
envelope (RabbitMQ message) when a failure happens. However, errors and timeouts
issues, unless there is a software bug... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
1355,
318,
458,
17246,
49,
3896,
480,
41650,
1648,
7305,
49,
480,
1429,
3774,
19562,
7305,
49,
341,
222,
14163,
1421,
391,
19777,
2794,
391,
764,
642,
708,
51,
4529,
1263,
49,... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Not",
"ing",
"Ġis",
"Ġperfect",
",",
"Ġerrors",
"Ġand",
"Ġtimeouts",
"Ġmay",
"Ġhappen",
",",
"Ġand",
"Ġwhen",
"Ġsuch",
"Ġfailures",
"Ġhappen",
",",
"Ġthe",
"Ċ",
"consumer",
"Ġhas... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
4,
7,
10,
18,
19,
26,
30,
39,
43,
50,
51,
55,
60,
65,
74,
81,
82,
86,
1,
9,
13,
16,
23,
28,
31,
34,
39,
44,
45,
48,
56,
57,
61,
70,
76,
83,
87,
1,
9,
11,
17,
19,
27,
... |
892eb8d1802b01c035993232cc80c710211ab102 | # processes are described by generator functions
# during the lifetime of a process, the process function(generator function)
# creates events and yields them
# when a process yields an event, it gets suspended
# Simpy resumes the process when the event is triggered
# multiple processes waiting on the same event is re... | [
40,
13209,
904,
10309,
829,
9790,
4465,
222,
40,
5945,
341,
26668,
451,
331,
2183,
49,
341,
2183,
686,
45,
7147,
686,
46,
222,
40,
9602,
5233,
480,
41177,
3049,
222,
222,
40,
1429,
331,
2183,
41177,
619,
1708,
49,
580,
8572,
10561,
... | [
"#",
"Ġprocesses",
"Ġare",
"Ġdescribed",
"Ġby",
"Ġgenerator",
"Ġfunctions",
"Ċ",
"#",
"Ġduring",
"Ġthe",
"Ġlifetime",
"Ġof",
"Ġa",
"Ġprocess",
",",
"Ġthe",
"Ġprocess",
"Ġfunction",
"(",
"generator",
"Ġfunction",
")",
"Ċ",
"#",
"Ġcreates",
"Ġevents",
"Ġand",
"Ġ... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7... | [
1,
2,
12,
16,
26,
29,
39,
49,
1,
2,
9,
13,
22,
25,
27,
35,
36,
40,
48,
57,
58,
67,
76,
77,
1,
2,
10,
17,
21,
28,
33,
1,
1,
2,
7,
9,
17,
24,
27,
33,
34,
37,
42,
46,
52,
1,
2,
7,
8,
15,
16,
20,
28,
33,
37,
43... |
1f69cf5f6d15048e6ead37b5da836c9e2f783f74 | # The actual code begins here
# This file is intended to load everything downloaded from loaddata.py, preventing user getting banned from IMDB
# The code is written to see what are some key words of the reviews from critics and normal viewers
# And to see what are some of the differences
# The second task is to asses t... | [
40,
906,
4668,
1361,
30695,
2464,
222,
40,
1369,
822,
458,
14217,
391,
2480,
9010,
17261,
664,
2480,
624,
51,
997,
49,
9457,
318,
1275,
7882,
342,
12357,
664,
22107,
2015,
222,
40,
906,
1361,
458,
6658,
391,
2337,
2794,
904,
1649,
1... | [
"#",
"ĠThe",
"Ġactual",
"Ġcode",
"Ġbegins",
"Ġhere",
"Ċ",
"#",
"ĠThis",
"Ġfile",
"Ġis",
"Ġintended",
"Ġto",
"Ġload",
"Ġeverything",
"Ġdownloaded",
"Ġfrom",
"Ġload",
"data",
".",
"py",
",",
"Ġprevent",
"ing",
"Ġuser",
"Ġgetting",
"Ġb",
"anned",
"Ġfrom",
"ĠIM"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4... | [
1,
2,
6,
13,
18,
25,
30,
1,
2,
7,
12,
15,
24,
27,
32,
43,
54,
59,
64,
68,
69,
71,
72,
80,
83,
88,
96,
98,
103,
108,
111,
113,
1,
2,
6,
11,
14,
22,
25,
29,
34,
38,
43,
47,
53,
56,
60,
68,
73,
78,
81,
85,
92,
97,... |
e31267871453d87aee409f1c751c36908f7f151a | """
Package with a facade to the several expansion strategies.
"""
from acres.resolution import resolver
__all__ = ["resolver"]
| [
3012,
222,
4057,
642,
331,
9663,
1546,
391,
341,
10241,
27199,
35763,
51,
222,
3012,
222,
222,
1097,
1449,
595,
51,
15604,
1220,
17175,
222,
222,
523,
483,
523,
299,
3059,
15668,
1465,
222
] | [
"\"\"\"",
"Ċ",
"Package",
"Ġwith",
"Ġa",
"Ġfac",
"ade",
"Ġto",
"Ġthe",
"Ġseveral",
"Ġexpansion",
"Ġstrategies",
".",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġac",
"res",
".",
"resolution",
"Ġimport",
"Ġresolver",
"Ċ",
"Ċ",
"__",
"all",
"__",
"Ġ=",
"Ġ[\"",
"res... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7
] | [
1,
4,
1,
8,
13,
15,
19,
22,
25,
29,
37,
47,
58,
59,
1,
4,
1,
1,
5,
8,
11,
12,
22,
29,
38,
1,
1,
3,
6,
8,
10,
13,
21,
23
] |
be58862b66708c9de8cf7642c9de52ec744b079e | # $Header: //depot/cs/s/ajax_support.wsgi#10 $
from werkzeug.wrappers import Response
from p.DRequest import DRequest
from db.Support import SupportSession
from db.Exceptions import DbError, SupportSessionExpired
import db.Db as Db
import db.Support
import cgi
import simplejson as json
def application(environ, start... | [
40,
417,
2661,
63,
453,
9086,
385,
52,
1766,
52,
120,
52,
6837,
100,
3608,
51,
46601,
40,
54,
53,
417,
222,
1097,
10385,
112,
39541,
51,
34760,
1220,
5178,
222,
1097,
317,
51,
73,
1123,
1220,
493,
1123,
222,
1097,
3100,
51,
4417,
... | [
"#",
"Ġ$",
"Header",
":",
"Ġ//",
"dep",
"ot",
"/",
"cs",
"/",
"s",
"/",
"ajax",
"_",
"support",
".",
"wsgi",
"#",
"1",
"0",
"Ġ$",
"Ċ",
"from",
"Ġwer",
"k",
"zeug",
".",
"wrappers",
"Ġimport",
"ĠResponse",
"Ċ",
"from",
"Ġp",
".",
"D",
"Request",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6... | [
1,
2,
4,
10,
11,
14,
17,
19,
20,
22,
23,
24,
25,
29,
30,
37,
38,
42,
43,
44,
45,
47,
1,
5,
9,
10,
14,
15,
23,
30,
39,
1,
5,
7,
8,
9,
16,
23,
25,
32,
1,
5,
8,
9,
16,
23,
31,
38,
1,
5,
8,
9,
19,
26,
29,
34,
... |
328a03acab2a0550bea0795d22110a152db6c503 | # %%
import os
print(os.getcwd())
# %%
from TransformerModel.Model import Model
from dataset.DatasetLoader import DatasetLoader
import pytorch_lightning as pl
from pytorch_lightning.callbacks import EarlyStopping
import argparse
from argparse import ArgumentParser, ArgumentTypeError
# %%
def run_training(arguments_... | [
40,
12947,
222,
485,
2355,
222,
222,
1243,
45,
519,
51,
33550,
1177,
222,
40,
12947,
222,
1097,
35010,
1262,
51,
1262,
1220,
3707,
222,
1097,
5984,
51,
9440,
4903,
1220,
19265,
4903,
222,
485,
38165,
100,
35976,
641,
1302,
222,
1097,
... | [
"#",
"Ġ%%",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"print",
"(",
"os",
".",
"getcwd",
"())",
"Ċ",
"#",
"Ġ%%",
"Ċ",
"from",
"ĠTransformer",
"Model",
".",
"Model",
"Ġimport",
"ĠModel",
"Ċ",
"from",
"Ġdataset",
".",
"Dataset",
"Loader",
"Ġimport",
"ĠDataset",
"L... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
1... | [
1,
2,
5,
1,
7,
10,
1,
1,
6,
7,
9,
10,
16,
19,
1,
2,
5,
1,
5,
17,
22,
23,
28,
35,
41,
1,
5,
13,
14,
21,
27,
34,
42,
48,
1,
7,
15,
16,
25,
28,
31,
1,
5,
13,
14,
23,
24,
33,
40,
46,
54,
1,
7,
16,
1,
5,
14,
... |
c712875273f988a3aa6dab61f79e99a077823060 | #! /usr/bin/python
#
# convert the swig -debug-lsymbols output text file format into
# a simple list of lua module names and classes
#
# Dan Wilcox <danomatika@gmail.com> 2017
#
import sys
import re
if len(sys.argv) < 2:
print("USAGE: lua_syntax.py MODULENAME INFILE")
exit(0)
module = sys.argv[1]
infile = sys... | [
38359,
536,
3392,
52,
1793,
52,
2980,
222,
40,
222,
40,
4511,
341,
2552,
384,
449,
2824,
50,
3259,
8661,
1716,
1367,
822,
2224,
2012,
222,
40,
331,
4313,
1168,
451,
11823,
2313,
4492,
480,
6052,
222,
40,
222,
40,
22552,
42751,
352,
... | [
"#!",
"Ġ/",
"usr",
"/",
"bin",
"/",
"python",
"Ċ",
"#",
"Ċ",
"#",
"Ġconvert",
"Ġthe",
"Ġsw",
"ig",
"Ġ-",
"debug",
"-",
"ls",
"ymbols",
"Ġoutput",
"Ġtext",
"Ġfile",
"Ġformat",
"Ġinto",
"Ċ",
"#",
"Ġa",
"Ġsimple",
"Ġlist",
"Ġof",
"Ġlua",
"Ġmodule",
"Ġna... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
8... | [
1,
3,
5,
8,
9,
12,
13,
19,
1,
2,
1,
2,
10,
14,
17,
19,
21,
26,
27,
29,
35,
42,
47,
52,
59,
64,
1,
2,
4,
11,
16,
19,
23,
30,
36,
40,
48,
1,
2,
1,
2,
6,
10,
12,
13,
15,
18,
20,
22,
25,
26,
31,
32,
35,
36,
37,... |
3d3b9956a98f11a170d66280abe7f193cef9ccfb | # %%
# -*- coding: utf-8 -*-
import numpy as np
import plotly
from plotly.subplots import make_subplots
import plotly.graph_objects as go
import pandas as pd
import os
output_directory = r"C:/Users/jgamm/Desktop/rssi_measurement/2020-06-10/figures"
antennas = ["original_whip"]
folder = r"C:/Users/jgamm/Desktop/rssi_m... | [
40,
12947,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
485,
6610,
641,
2115,
222,
485,
7036,
651,
222,
1097,
7036,
651,
51,
26310,
1220,
1949,
100,
26310,
222,
485,
7036,
651,
51,
2275,
100,
5754,
641,
2006,
222,
485,
... | [
"#",
"Ġ%%",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġplot",
"ly",
"Ċ",
"from",
"Ġplot",
"ly",
".",
"subplots",
"Ġimport",
"Ġmake",
"_",
"subplots",
"Ċ",
"import",
"Ġplot"... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
2,
5,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
7,
13,
16,
19,
1,
7,
12,
14,
1,
5,
10,
12,
13,
21,
28,
33,
34,
42,
1,
7,
12,
14,
15,
20,
21,
28,
31,
34,
1,
7,
14,
17,
20,
1,
7,
10,
1,
1,
7,
8,
17,
19,
21,... |
4cb601d7fc4023e145c6d510d27507214ddbd2d3 | from django.shortcuts import render, redirect
from .models import *
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from datetime import date
# Create your views here.
def home(request):
if request.method == "GET":
daily_users = User.objects.filter(d... | [
1097,
8532,
51,
36264,
1220,
2922,
49,
5675,
222,
1097,
657,
3404,
1220,
338,
222,
1097,
8532,
51,
12060,
51,
2408,
1220,
21280,
49,
6212,
49,
20629,
222,
1097,
8532,
51,
12060,
51,
2408,
51,
3404,
1220,
2694,
222,
1097,
7181,
1220,
... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
",",
"Ġredirect",
"Ċ",
"from",
"Ġ.",
"models",
"Ġimport",
"Ġ*",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
".",
"auth",
"Ġimport",
"Ġauthenticate",
",",
"Ġlogin",
",",
"Ġlogout",
"Ċ",
"from",
"Ġdjango",... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10... | [
1,
5,
12,
13,
22,
29,
36,
37,
46,
1,
5,
7,
13,
20,
22,
1,
5,
12,
13,
20,
21,
25,
32,
45,
46,
52,
53,
60,
1,
5,
12,
13,
20,
21,
25,
26,
32,
39,
44,
1,
5,
14,
21,
26,
1,
2,
9,
14,
20,
25,
26,
1,
1,
4,
9,
10,
... |
0ed99037d7ff708b7931fbc3553b1aeb19a20f53 | """
* @file IntQueue.py
* @author (original JAVA) William Fiset, william.alexandre.fiset@gmail.com
* liujingkun, liujkon@gmail.com
* (conversion to Python) Armin Zare Zadeh, ali.a.zarezadeh@gmail.com
* @date 23 Jun 2020
* @version 0.1
* @brief This file contains an implementation of an integer onl... | [
3012,
222,
47,
496,
781,
280,
2871,
4098,
51,
997,
222,
47,
496,
2133,
327,
7351,
34379,
46,
643,
36405,
525,
110,
489,
49,
360,
36405,
51,
23836,
44476,
51,
5517,
489,
69,
7265,
51,
527,
222,
47,
282,
1045,
9646,
318,
112,
330,
... | [
"\"\"\"",
"Ċ",
"*",
"Ġ@",
"file",
"ĠĠ",
"ĠInt",
"Queue",
".",
"py",
"Ċ",
"*",
"Ġ@",
"author",
"Ġ(",
"original",
"ĠJAVA",
")",
"ĠW",
"illiam",
"ĠF",
"i",
"set",
",",
"Ġw",
"illiam",
".",
"alex",
"andre",
".",
"fi",
"set",
"@",
"gmail",
".",
"com",... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
4,
1,
2,
4,
8,
10,
14,
19,
20,
22,
1,
2,
4,
10,
12,
20,
25,
26,
28,
34,
36,
37,
40,
41,
43,
49,
50,
54,
59,
60,
62,
65,
66,
71,
72,
75,
1,
2,
10,
13,
15,
18,
19,
21,
22,
25,
27,
30,
31,
36,
37,
40,
1,
2,
... |
acff8618754658104ac36214901d346447a0134f | import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
import paho.mqtt.client as mqtt
# Fetch the service account key JSON file contents
cred = credentials.Certificate("iot_mikro.json")
# Initialize the app with a service account, granting admin privileges
firebase_admin.initialize... | [
485,
20573,
100,
2317,
222,
1097,
20573,
100,
2317,
1220,
10690,
222,
1097,
20573,
100,
2317,
1220,
3100,
222,
485,
317,
14390,
51,
20236,
51,
1598,
641,
33300,
222,
222,
40,
15562,
341,
2733,
3513,
1221,
3411,
822,
7321,
222,
16302,
... | [
"import",
"Ġfirebase",
"_",
"admin",
"Ċ",
"from",
"Ġfirebase",
"_",
"admin",
"Ġimport",
"Ġcredentials",
"Ċ",
"from",
"Ġfirebase",
"_",
"admin",
"Ġimport",
"Ġdb",
"Ċ",
"import",
"Ġp",
"aho",
".",
"mqtt",
".",
"client",
"Ġas",
"Ġmqtt",
"Ċ",
"Ċ",
"#",
"ĠFet... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
7,
16,
17,
22,
1,
5,
14,
15,
20,
27,
39,
1,
5,
14,
15,
20,
27,
30,
1,
7,
9,
12,
13,
17,
18,
24,
27,
32,
1,
1,
2,
8,
12,
20,
28,
32,
37,
42,
51,
1,
5,
7,
19,
20,
31,
33,
36,
37,
40,
42,
43,
47,
49,
1,
2,
... |
077b6d3d7417bbc26e9f23af6f437ff05e3d5771 | __author__ = "那位先生Beer"
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import xlrd
import numpy as np
print("输入鲈鱼的先验概率例如:70,对应70%")
a = input("输入鲈鱼的先验概率(鲑鱼对应的1减去剩余的):")
font_set = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=15)
# 根据生成的数据画出图像(横坐标为长度,纵坐标为亮度)
data = xlrd.... | [
523,
2133,
523,
299,
332,
12222,
7838,
11535,
6220,
1483,
284,
39,
222,
485,
13168,
51,
18553,
641,
6020,
222,
1097,
13168,
51,
2204,
100,
4031,
1220,
8929,
3303,
222,
485,
32317,
5344,
222,
485,
6610,
641,
2115,
222,
222,
1243,
459,
... | [
"__",
"author",
"__",
"Ġ=",
"Ġ\"",
"éĤ£",
"ä½į",
"åħĪ",
"çĶŁ",
"Be",
"er",
"\"",
"Ċ",
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"from",
"Ġmatplotlib",
".",
"font",
"_",
"manager",
"Ġimport",
"ĠFont",
"Properties",
"Ċ",
"import",
"Ġxl",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8... | [
1,
3,
9,
11,
13,
15,
16,
17,
18,
19,
21,
23,
24,
1,
7,
18,
19,
25,
28,
32,
1,
5,
16,
17,
21,
22,
29,
36,
41,
51,
1,
7,
10,
12,
1,
7,
13,
16,
19,
1,
1,
6,
8,
10,
10,
11,
12,
13,
14,
15,
16,
17,
19,
20,
21,
2... |
0ea67ac97ec8e7f287a2430c67f8f7d841d8b646 | # -*- coding: utf-8 -*-
# Copyright 2017 Objectif Libre
#
# 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 ... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
2657,
244,
55,
53,
54,
60,
2210,
344,
17467,
287,
222,
40,
222,
40,
283,
4773,
1549,
341,
3954,
1196,
49,
3050,
244,
55,
51,
53,
327,
1402,
332,
3801,
742,
863,
1648,
222,
40,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠCopyright",
"Ġ",
"2",
"0",
"1",
"7",
"ĠObject",
"if",
"ĠLib",
"re",
"Ċ",
"#",
"Ċ",
"#",
"ĠĠĠ",
"ĠLicensed",
"Ġunder",
"Ġthe",
"ĠApache",
"ĠLicense",
",",
"ĠVersion",
"Ġ",
"2",
".",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
12,
13,
14,
15,
16,
17,
24,
26,
30,
32,
1,
2,
1,
2,
5,
14,
20,
24,
31,
39,
40,
48,
49,
50,
51,
52,
54,
57,
59,
66,
69,
73,
77,
1,
2,
5,
9,
13,
18,
23,
30,
33,
44,
49,
... |
883b4de18dddede97f850e3a184a0e1072bda99e | # #1
# def bi_search(l, r, arr, x):
# # Code Here
# if(l == r):
# return arr[r] == x
# mid = (l + r)//2 + 1
# if(arr[mid] > x):
# return bi_search(l,mid-1,arr,x)
# else:
# return bi_search(mid,r,arr,x)
# inp = input('Enter Input : ').split('/')
# arr, k = list(map(int, inp[... | [
40,
607,
54,
222,
40,
684,
10825,
100,
1925,
45,
113,
49,
559,
49,
5941,
49,
837,
731,
222,
40,
281,
607,
4420,
9597,
222,
40,
281,
434,
45,
113,
630,
559,
731,
222,
40,
282,
461,
5941,
96,
119,
98,
630,
837,
222,
222,
40,
2... | [
"#",
"Ġ#",
"1",
"Ċ",
"#",
"Ġdef",
"Ġbi",
"_",
"search",
"(",
"l",
",",
"Ġr",
",",
"Ġarr",
",",
"Ġx",
"):",
"Ċ",
"#",
"ĠĠĠĠ",
"Ġ#",
"ĠCode",
"ĠHere",
"Ċ",
"#",
"ĠĠĠĠ",
"Ġif",
"(",
"l",
"Ġ==",
"Ġr",
"):",
"Ċ",
"#",
"ĠĠĠĠĠĠĠĠ",
"Ġreturn",
"Ġarr"... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8... | [
1,
2,
4,
5,
1,
2,
6,
9,
10,
16,
17,
18,
19,
21,
22,
26,
27,
29,
31,
1,
2,
6,
8,
13,
18,
1,
2,
6,
9,
10,
11,
14,
16,
18,
1,
2,
10,
17,
21,
22,
23,
24,
27,
29,
1,
1,
2,
6,
10,
12,
14,
15,
17,
19,
22,
23,
25... |
95b75395cafc6ba9f75ecf48157421e37ced2518 | import math
# type defining of the variable and playing with variables.
a = 5.0
print(id(a))
a = 10
print("hello.....")
print(type(a))
print(id(a))
# locating addresses...
b = [5, 6, 7]
print(id(b))
b.append(10)
print(id(b))
# Strings...
name = input("Enter Your Name:: ") # iNPUTTING AS NAME
print(name)
print(len(... | [
485,
7820,
222,
222,
40,
847,
20774,
451,
341,
2702,
480,
19791,
642,
4918,
51,
222,
102,
299,
244,
58,
51,
53,
222,
1243,
45,
333,
45,
102,
509,
222,
102,
299,
244,
54,
53,
222,
1243,
459,
7670,
21404,
678,
222,
1243,
45,
700,
... | [
"import",
"Ġmath",
"Ċ",
"Ċ",
"#",
"Ġtype",
"Ġdefining",
"Ġof",
"Ġthe",
"Ġvariable",
"Ġand",
"Ġplaying",
"Ġwith",
"Ġvariables",
".",
"Ċ",
"a",
"Ġ=",
"Ġ",
"5",
".",
"0",
"Ċ",
"print",
"(",
"id",
"(",
"a",
"))",
"Ċ",
"a",
"Ġ=",
"Ġ",
"1",
"0",
"Ċ",
... | [
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
... | [
1,
7,
12,
1,
1,
2,
7,
16,
19,
23,
32,
36,
44,
49,
59,
60,
1,
2,
4,
5,
6,
7,
8,
1,
6,
7,
9,
10,
11,
13,
1,
2,
4,
5,
6,
7,
1,
6,
8,
13,
18,
20,
1,
6,
7,
11,
12,
13,
15,
1,
6,
7,
9,
10,
11,
13,
1,
1,
2,
... |
21bdf315c98a4cf69482cc7db41bc30d44781596 | """added personal collection
Revision ID: 43eabda1d630
Revises: 9cad4dfb5125
Create Date: 2018-03-28 13:55:03.557872
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "43eabda1d630"
down_revision = "9cad4dfb5125"
branch_labels = None
depends_on = None
def upgr... | [
3012,
11051,
12285,
4512,
222,
222,
14021,
2502,
63,
244,
57,
56,
40051,
1830,
54,
105,
59,
56,
53,
222,
14911,
9427,
63,
244,
62,
19376,
57,
38894,
58,
54,
55,
58,
222,
1940,
2833,
63,
244,
55,
53,
54,
61,
50,
53,
56,
50,
55,... | [
"\"\"\"",
"added",
"Ġpersonal",
"Ġcollection",
"Ċ",
"Ċ",
"Revision",
"ĠID",
":",
"Ġ",
"4",
"3",
"eab",
"da",
"1",
"d",
"6",
"3",
"0",
"Ċ",
"Rev",
"ises",
":",
"Ġ",
"9",
"cad",
"4",
"dfb",
"5",
"1",
"2",
"5",
"Ċ",
"Create",
"ĠDate",
":",
"Ġ",
... | [
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
4,
9,
18,
29,
1,
1,
9,
12,
13,
14,
15,
16,
19,
21,
22,
23,
24,
25,
26,
1,
4,
8,
9,
10,
11,
14,
15,
18,
19,
20,
21,
22,
1,
7,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
... |
7503a0c8f83ff0ce370ed7bce733b09d9a2c69c4 | # -*- coding: utf-8 -*-
from selenium.webdriver.common.keys import Keys
from titan.components import Base
class Input(Base):
def clear(self):
element = self.driver.find_element_by_xpath(self.params["xpath"])
if self.params.get("clear", None):
element.clear()
return True
... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
1097,
35822,
51,
35345,
51,
2297,
51,
3519,
1220,
20247,
222,
1097,
292,
21116,
51,
3545,
1220,
3787,
499,
222,
842,
4257,
45,
1778,
731,
303,
684,
4250,
45,
803,
731,
310,
2016,
299,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"from",
"Ġselenium",
".",
"webdriver",
".",
"common",
".",
"keys",
"Ġimport",
"ĠKeys",
"Ċ",
"from",
"Ġt",
"itan",
".",
"components",
"Ġimport",
"ĠBase",
"ĊĊ",
"Ċ",
"class",
"ĠInput",
"(",
"Bas... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
5,
14,
15,
24,
25,
31,
32,
36,
43,
48,
1,
5,
7,
11,
12,
22,
29,
34,
1,
1,
6,
12,
13,
17,
19,
4,
8,
14,
15,
19,
21,
8,
16,
18,
23,
24,
30,
31,
35,
36,
43,
44,
46,
47,
52,
... |
b7738c27e11e9566d90157717633312031cdffd6 | import sqlite3
class announcement:
def __init__(eps_df, revenue_df):
conn = sqlite3.connect("earnings.db", timeout=120)
cur = conn.cursor()
symbol_href = self.driver.find_element_by_class_name("lfkTWp")
symbol = symbol_href.text
eps_history_df = pd.read_sql('select * from... | [
485,
17743,
56,
499,
222,
842,
16847,
31033,
63,
303,
684,
1176,
1683,
3232,
17724,
100,
1519,
49,
334,
14748,
100,
1519,
731,
310,
4580,
299,
17743,
56,
51,
3532,
459,
1954,
31265,
51,
1219,
411,
5882,
66,
54,
55,
53,
46,
310,
27... | [
"import",
"Ġsqlite",
"3",
"ĊĊ",
"Ċ",
"class",
"Ġanno",
"uncement",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"eps",
"_",
"df",
",",
"Ġre",
"venue",
"_",
"df",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġconn",
"Ġ=",
"Ġsqlite",
"3",
".",
"connect",
"(\"",
"ear",
"nings",
".... | [
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
14,
15,
1,
1,
6,
11,
19,
20,
4,
8,
11,
15,
18,
21,
22,
24,
25,
28,
33,
34,
36,
38,
8,
13,
15,
22,
23,
24,
31,
33,
36,
41,
42,
44,
46,
54,
55,
56,
57,
58,
59,
8,
12,
14,
19,
20,
26,
28,
8,
15,
16,
20,
22... |
8ccec24e1a7060269ffbb376ba0c480da9eabe0a | import tensorflow as tf
import settings
import numpy as np
slim = tf.contrib.slim
class Model:
def __init__(self, training=True):
self.classes = settings.classes_name
self.num_classes = len(settings.classes_name)
self.image_size = settings.image_size
self.cell_size = settings.cell... | [
485,
15196,
641,
5369,
222,
485,
4086,
222,
485,
6610,
641,
2115,
222,
222,
25507,
299,
5369,
51,
12060,
51,
25507,
499,
222,
842,
3707,
63,
303,
684,
1176,
1683,
3232,
803,
49,
7924,
66,
1844,
731,
310,
649,
51,
4844,
299,
4086,
... | [
"import",
"Ġtensorflow",
"Ġas",
"Ġtf",
"Ċ",
"import",
"Ġsettings",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"Ċ",
"slim",
"Ġ=",
"Ġtf",
".",
"contrib",
".",
"slim",
"ĊĊ",
"Ċ",
"class",
"ĠModel",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
7,
18,
21,
24,
1,
7,
16,
1,
7,
13,
16,
19,
1,
1,
5,
7,
10,
11,
18,
19,
23,
1,
1,
6,
12,
13,
4,
8,
11,
15,
18,
22,
23,
32,
33,
37,
39,
8,
13,
14,
21,
23,
32,
33,
40,
41,
45,
8,
13,
14,
17,
18,
25,
27,
31,... |
2b7d9ded82fa980eeae06beb2d84d89612d53df1 | import SimpleITK as sitk
import numpy as np
from sklearn.ensemble import RandomForestClassifier
# # Estimation function # #
# --------------------------- #
# Linear registration function
# --------------------------- #
# --- Input --- #
# im_ref : The common image [numpy.ndarray]
# im_mov : The group image [numpy.n... | [
485,
7169,
799,
80,
641,
7435,
112,
222,
485,
6610,
641,
2115,
222,
1097,
14415,
51,
24982,
1220,
9607,
28276,
16077,
499,
222,
40,
607,
14272,
3432,
686,
607,
607,
222,
40,
8591,
7987,
607,
222,
40,
14138,
14531,
686,
222,
40,
8591... | [
"import",
"ĠSimple",
"IT",
"K",
"Ġas",
"Ġsit",
"k",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġsklearn",
".",
"ensemble",
"Ġimport",
"ĠRandom",
"Forest",
"Classifier",
"ĊĊ",
"Ċ",
"#",
"Ġ#",
"ĠEst",
"imation",
"Ġfunction",
"Ġ#",
"Ġ#",
"Ċ",
"#",... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12... | [
1,
7,
14,
16,
17,
20,
24,
25,
1,
7,
13,
16,
19,
1,
5,
13,
14,
22,
29,
36,
42,
52,
1,
1,
2,
4,
8,
15,
24,
26,
28,
1,
2,
19,
30,
32,
1,
2,
9,
22,
31,
1,
2,
19,
30,
32,
1,
1,
2,
6,
12,
16,
18,
1,
2,
5,
6,
... |
1406b2ab78b52823a8f455c8e2719f6bd84bd168 | # -*- coding: utf-8 -*-
"""MicroPython rotary encoder library."""
from machine import Pin
ENC_STATES = (0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0)
class Encoder(object):
def __init__(self, pin_x="P4", pin_y="P5", pin_mode=Pin.PULL_UP, scale=1, min=0, max=100, reverse=False):
self.pin_x = pin_x... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
13119,
8378,
5045,
692,
15633,
4277,
7128,
222,
222,
1097,
6676,
1220,
19603,
499,
222,
8771,
100,
4266,
959,
299,
327,
53,
49,
449,
54,
49,
244,
54,
49,
244,
53,
49,
244,
54,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Micro",
"Python",
"Ġrot",
"ary",
"Ġencoder",
"Ġlibrary",
".\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġmachine",
"Ġimport",
"ĠPin",
"ĊĊ",
"Ċ",
"ENC",
"_",
"STAT",
"ES",
"Ġ=",
"Ġ(",
"0",
",",
"Ġ-... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
9,
15,
19,
22,
30,
38,
42,
1,
1,
5,
13,
20,
24,
1,
1,
4,
5,
9,
11,
13,
15,
16,
17,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
38,
39,
40,
... |
1bab6b039462bb5762aa588d5ba7c3e74362d0a7 | class Solution:
def minRemoveToMakeValid(self, s: str) -> str:
bracketsToRemove = set()
stack = []
for i, c in enumerate(s):
if c not in "()":
continue
if c == "(":
stack.append(i)
elif not stack:
bracketsTo... | [
842,
12219,
63,
303,
684,
1865,
4926,
724,
6685,
2320,
45,
803,
49,
328,
63,
615,
46,
984,
615,
63,
310,
30653,
33260,
299,
758,
365,
310,
4154,
299,
1627,
603,
456,
613,
49,
300,
347,
10869,
45,
120,
731,
343,
434,
300,
666,
34... | [
"class",
"ĠSolution",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġmin",
"Remove",
"To",
"Make",
"Valid",
"(",
"self",
",",
"Ġs",
":",
"Ġstr",
")",
"Ġ->",
"Ġstr",
":",
"ĊĠĠĠĠĠĠĠ",
"Ġbrackets",
"ToRemove",
"Ġ=",
"Ġset",
"()",
"ĊĠĠĠĠĠĠĠ",
"Ġstack",
"Ġ=",
"Ġ[]",
"ĊĊĠĠĠĠĠĠĠ",
"Ġf... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
6,
15,
16,
4,
8,
12,
18,
20,
24,
29,
30,
34,
35,
37,
38,
42,
43,
46,
50,
51,
8,
17,
25,
27,
31,
33,
8,
14,
16,
19,
8,
12,
14,
15,
17,
20,
30,
31,
32,
34,
12,
15,
17,
21,
24,
26,
28,
30,
16,
25,
12,
15,
17,
... |
75ddcdd4e80b962198ff9de1d996837927c3ac1a | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, with_statement
"""
cosi299a- Cinderella
alexluu@brandeis.edu
"""
def truecase_is(string):
"""-> lower/title/upper/other"""
if string.islower():
return "l"
if string.istitle():
return "t"
if string.... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
499,
222,
1097,
1176,
9689,
523,
1220,
1489,
100,
1144,
49,
642,
100,
9854,
499,
222,
3012,
222,
352,
3450,
55,
62,
62,
102,
50,
409,
15125,
16776... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"ĊĊ",
"Ċ",
"from",
"Ġ__",
"future",
"__",
"Ġimport",
"Ġprint",
"_",
"function",
",",
"Ġwith",
"_",
"statement",
"ĊĊ",
"Ċ",
"\"\"\"",
"Ċ",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
13,
14,
14,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
5,
8,
14,
16,
23,
29,
30,
38,
39,
44,
45,
54,
1,
1,
4,
1,
3,
5,
6,
7,
8,
9,
10,
12,
17,
21,
1,
5,
7,
8,
9,
11,
15,
17,
18,
21,
1,
4,
1,... |
cdcb2710291e9897b874f63840193470ed58be49 | # -*- coding: utf-8 -*-
import json
import re
import scrapy
from scrapy import Request
class PageInfoAjaxSpider(scrapy.Spider):
name = "page_info_ajax"
allowed_domains = ["bilibili.com"]
# start_urls = ['http://bilibili.com/']
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x6... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
485,
2379,
222,
485,
334,
222,
222,
485,
33057,
126,
222,
1097,
33057,
126,
1220,
4463,
499,
222,
842,
6021,
1139,
19620,
45084,
45,
37903,
126,
51,
45084,
731,
303,
655,
299,
332,
1655,... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġre",
"Ċ",
"Ċ",
"import",
"Ġscrap",
"y",
"Ċ",
"from",
"Ġscrap",
"y",
"Ġimport",
"ĠRequest",
"ĊĊ",
"Ċ",
"class",
"ĠPage",
"Info",
"Ajax",
"Spider",
"(",
"sc... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
1... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
7,
12,
1,
7,
10,
1,
1,
7,
13,
14,
1,
5,
11,
12,
19,
27,
1,
1,
6,
11,
15,
19,
25,
26,
31,
32,
33,
39,
41,
4,
9,
11,
13,
17,
18,
22,
23,
27,
28,
4,
12,
13,
20,
22,
25,
26,
... |
f4bfef2ee78b87184cc72666fade949f8f931fc3 | #### про enumerate
##s = input()
##for index, letter in enumerate(s):
## print(index,':',letter)
#### то же что и
##for i in range(len(s)):
## print (i,':', s[i])
#### номер начала каждого слова
##st = input()
##for index, symbol in enumerate(st):
## if symbol == ' ' and index != len(st)-1 or index == 0 or in... | [
784,
21650,
10869,
222,
452,
120,
299,
1533,
365,
222,
452,
999,
1671,
49,
11706,
347,
10869,
45,
120,
731,
222,
452,
283,
1489,
45,
1076,
49,
972,
389,
11421,
46,
222,
784,
38650,
48689,
21543,
4672,
222,
452,
999,
613,
347,
2189,
... | [
"####",
"ĠпÑĢо",
"Ġenumerate",
"Ċ",
"##",
"s",
"Ġ=",
"Ġinput",
"()",
"Ċ",
"##",
"for",
"Ġindex",
",",
"Ġletter",
"Ġin",
"Ġenumerate",
"(",
"s",
"):",
"Ċ",
"##",
"ĠĠĠ",
"Ġprint",
"(",
"index",
",",
"':",
"',",
"letter",
")",
"Ċ",
"####",
"ĠÑĤо",
... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9... | [
1,
5,
9,
19,
1,
3,
4,
6,
12,
14,
1,
3,
6,
12,
13,
20,
23,
33,
34,
35,
37,
1,
3,
6,
12,
13,
18,
19,
21,
23,
29,
30,
1,
5,
8,
11,
15,
17,
1,
3,
6,
8,
11,
17,
18,
21,
22,
23,
26,
1,
3,
6,
12,
14,
15,
16,
18,... |
0686dec7f3dc23f01ffff41f611a1bb597bb5352 | from .base import Base
class Files(Base):
endpoint = "/files"
def upload_file(self, channel_id, files):
return self.client.post(self.endpoint, data={"channel_id": channel_id}, files=files)
def get_file(self, file_id):
return self.client.get(
self.endpoint + "/" + file_id,
... | [
1097,
657,
1460,
1220,
3787,
499,
222,
842,
11105,
45,
1778,
731,
303,
7008,
299,
2450,
2558,
39,
465,
684,
7629,
100,
781,
45,
803,
49,
3842,
100,
333,
49,
2293,
731,
310,
461,
649,
51,
1598,
51,
1545,
45,
803,
51,
8001,
49,
72... | [
"from",
"Ġ.",
"base",
"Ġimport",
"ĠBase",
"ĊĊ",
"Ċ",
"class",
"ĠFiles",
"(",
"Base",
"):",
"ĊĠĠĠ",
"Ġendpoint",
"Ġ=",
"Ġ\"/",
"files",
"\"",
"ĊĊĠĠĠ",
"Ġdef",
"Ġupload",
"_",
"file",
"(",
"self",
",",
"Ġchannel",
"_",
"id",
",",
"Ġfiles",
"):",
"ĊĠĠĠĠĠĠ... | [
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
10,
10,
10,... | [
1,
5,
7,
11,
18,
23,
1,
1,
6,
12,
13,
17,
19,
4,
13,
15,
18,
23,
24,
4,
8,
15,
16,
20,
21,
25,
26,
34,
35,
37,
38,
44,
46,
8,
15,
20,
21,
27,
28,
32,
33,
37,
38,
46,
47,
52,
55,
62,
63,
65,
67,
75,
76,
78,
80... |
c3d9ad49b62c56dfbd9674cb1ac5c206e6401a27 | # Copyright (c) 2017, Matt Layman
import bisect
import configparser
import os
import smartypants
from werkzeug.contrib.atom import AtomFeed, FeedEntry
from handroll import logger
from handroll.exceptions import AbortError
from handroll.extensions.base import Extension
from handroll.i18n import _
class BlogPost(obj... | [
40,
2657,
327,
104,
46,
244,
55,
53,
54,
60,
49,
507,
3150,
7965,
1607,
222,
222,
485,
342,
46911,
222,
485,
1377,
3936,
222,
485,
2355,
222,
222,
485,
18548,
3001,
2392,
222,
1097,
10385,
112,
39541,
51,
12060,
51,
4170,
1220,
11... | [
"#",
"ĠCopyright",
"Ġ(",
"c",
")",
"Ġ",
"2",
"0",
"1",
"7",
",",
"ĠM",
"att",
"ĠLay",
"man",
"Ċ",
"Ċ",
"import",
"Ġb",
"isect",
"Ċ",
"import",
"Ġconfig",
"parser",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"import",
"Ġsmart",
"yp",
"ants",
"Ċ",
"from",
"Ġw... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
... | [
1,
2,
12,
14,
15,
16,
17,
18,
19,
20,
21,
22,
24,
27,
31,
34,
1,
1,
7,
9,
14,
1,
7,
14,
20,
1,
7,
10,
1,
1,
7,
13,
15,
19,
1,
5,
9,
10,
14,
15,
22,
23,
27,
34,
39,
43,
44,
49,
54,
1,
1,
5,
10,
14,
21,
28,
... |
7fa7a632078ce4f0052e3cadf11d5efd47a1fad5 | import bpy
class TILA_Config_LogElement(bpy.types.PropertyGroup):
name: bpy.props.StringProperty(default="")
icon: bpy.props.StringProperty(default="BLANK1")
class TILA_Config_LogList(bpy.types.UIList):
bl_idname = "TILA_UL_Config_log_list"
def draw_item(self, context, layout, data, item, icon, act... | [
485,
342,
997,
499,
222,
842,
413,
1484,
70,
100,
1081,
100,
1353,
1325,
45,
103,
997,
51,
2529,
51,
41923,
731,
303,
655,
63,
342,
997,
51,
2976,
51,
671,
1667,
45,
1555,
38983,
303,
4282,
63,
342,
997,
51,
2976,
51,
671,
1667,... | [
"import",
"Ġb",
"py",
"ĊĊ",
"Ċ",
"class",
"ĠT",
"IL",
"A",
"_",
"Config",
"_",
"Log",
"Element",
"(",
"b",
"py",
".",
"types",
".",
"PropertyGroup",
"):",
"ĊĠĠĠ",
"Ġname",
":",
"Ġb",
"py",
".",
"props",
".",
"String",
"Property",
"(",
"default",
"=... | [
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
9,
11,
1,
1,
6,
8,
10,
11,
12,
18,
19,
22,
29,
30,
31,
33,
34,
39,
40,
53,
55,
4,
9,
10,
12,
14,
15,
20,
21,
27,
35,
36,
43,
47,
4,
9,
10,
12,
14,
15,
20,
21,
27,
35,
36,
43,
45,
50,
51,
53,
1,
1,
6,
... |
77e4bbe625251254cdadaeeb23dddf51e729e747 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext_lazy as _
from django import forms
from programs.models import *
from programs.forms import CustomUserCreationForm, CustomUserChangeForm
import pdb
class ProgramAdmin(admin.ModelAdmin):
l... | [
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
8532,
51,
12060,
51,
2408,
51,
2317,
1220,
2694,
4208,
222,
1097,
8532,
51,
2324,
51,
7521,
1220,
1064,
33137,
100,
10630,
641,
634,
222,
1097,
8532,
1220,
10556,
222,
1097,
18359,
51,
340... | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
".",
"auth",
".",
"admin",
"Ġimport",
"ĠUser",
"Admin",
"Ċ",
"from",
"Ġdjango",
".",
"utils",
".",
"translation",
"Ġimport",
"Ġu",
"gettext",
"_",
"lazy",
"Ġas"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
9... | [
1,
5,
12,
13,
20,
27,
33,
1,
5,
12,
13,
20,
21,
25,
26,
31,
38,
43,
48,
1,
5,
12,
13,
18,
19,
30,
37,
39,
46,
47,
51,
54,
56,
1,
5,
12,
19,
25,
1,
5,
14,
15,
21,
28,
30,
1,
5,
14,
15,
20,
27,
34,
38,
46,
50,
... |
58ca520a2f43cef26a95de446f9c7a82819b0b66 | import urllib.request
class GetData:
key = "fDs8VW%2BvtwQA8Q9LhBW%2BT2ETVBWWJaITjKfpzDsNJO8ugDsvdboInI16ZD295Txxtxwhc4G3PwMAvxd%2FWvz2gQ%3D%3D&pageNo=1&numOfRows=999"
url = "http://apis.data.go.kr/B552657/ErmctInfoInqireService/getEgytBassInfoInqire?serviceKey=" + key
def main(self):
data = urlli... | [
485,
22296,
51,
1375,
499,
222,
842,
1408,
768,
63,
303,
1221,
299,
332,
107,
21187,
61,
35431,
42,
55,
36943,
4176,
19522,
61,
86,
62,
81,
109,
24972,
42,
55,
9195,
55,
1235,
14660,
18872,
28113,
799,
111,
80,
4448,
127,
21187,
8... | [
"import",
"Ġurllib",
".",
"request",
"ĊĊ",
"Ċ",
"class",
"ĠGet",
"Data",
":",
"ĊĠĠĠ",
"Ġkey",
"Ġ=",
"Ġ\"",
"f",
"Ds",
"8",
"VW",
"%",
"2",
"Bv",
"tw",
"QA",
"8",
"Q",
"9",
"L",
"h",
"BW",
"%",
"2",
"BT",
"2",
"ET",
"VB",
"WW",
"Ja",
"IT",
"... | [
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
7,
14,
15,
22,
1,
1,
6,
10,
14,
15,
4,
8,
10,
12,
13,
15,
16,
18,
19,
20,
22,
24,
26,
27,
28,
29,
30,
31,
33,
34,
35,
37,
38,
40,
42,
44,
46,
48,
49,
50,
52,
53,
55,
56,
58,
59,
61,
62,
64,
67,
69,
70,
71,
... |
9535973f9714926269490b8550a67c74d04d8f0a | """Autogenerated by xml_generate script, do not edit!"""
from OpenGL import platform as _p, arrays
from OpenGL.constant import Constant as _C
# End users want this...
from OpenGL.raw.GLES2 import _errors
# Code generation uses this
from OpenGL.raw.GLES2 import _types as _cs
_EXTENSION_NAME = "GLES2_NV_viewport_arra... | [
3012,
7590,
21711,
829,
5604,
100,
5555,
3273,
49,
764,
666,
4588,
38,
3012,
222,
222,
1097,
26194,
1220,
5637,
641,
634,
117,
49,
12146,
222,
1097,
26194,
51,
8696,
1220,
15027,
641,
634,
72,
222,
222,
40,
4733,
4272,
2660,
477,
11... | [
"\"\"\"",
"Aut",
"ogenerated",
"Ġby",
"Ġxml",
"_",
"generate",
"Ġscript",
",",
"Ġdo",
"Ġnot",
"Ġedit",
"!",
"\"\"\"",
"Ċ",
"Ċ",
"from",
"ĠOpenGL",
"Ġimport",
"Ġplatform",
"Ġas",
"Ġ_",
"p",
",",
"Ġarrays",
"Ċ",
"from",
"ĠOpenGL",
".",
"constant",
"Ġimport",... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
10,
... | [
1,
4,
7,
17,
20,
24,
25,
33,
40,
41,
44,
48,
53,
54,
57,
1,
1,
5,
12,
19,
28,
31,
33,
34,
35,
42,
1,
5,
12,
13,
21,
28,
37,
40,
42,
43,
1,
1,
2,
6,
12,
17,
22,
25,
1,
5,
12,
13,
16,
17,
21,
22,
29,
31,
37,
... |
77d7fb49ed4c3e78b148cd446e9a5c6a0e6fac8b | # GUIcal.py
from tkinter import *
from tkinter import ttk
import math
GUI = Tk()
GUI.title("My Cal Program")
GUI.geometry("500x500")
def calc():
height = v_height.get()
base = v_base.get() # ดึงค่ามาจากv_base
print(f"height is {height}")
print(f"Basal length is {base}")
length = math.isqrt((heig... | [
40,
13029,
1299,
51,
997,
222,
1097,
19488,
1164,
1220,
338,
222,
1097,
19488,
1164,
1220,
292,
4708,
222,
485,
7820,
222,
222,
10586,
299,
41822,
365,
222,
10586,
51,
1333,
459,
3781,
6441,
9937,
678,
222,
10586,
51,
10132,
459,
58,
... | [
"#",
"ĠGUI",
"cal",
".",
"py",
"Ċ",
"from",
"Ġtk",
"inter",
"Ġimport",
"Ġ*",
"Ċ",
"from",
"Ġtk",
"inter",
"Ġimport",
"Ġt",
"tk",
"Ċ",
"import",
"Ġmath",
"Ċ",
"Ċ",
"GUI",
"Ġ=",
"ĠTk",
"()",
"Ċ",
"GUI",
".",
"title",
"(\"",
"My",
"ĠCal",
"ĠProgram",
... | [
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
... | [
1,
2,
6,
9,
10,
12,
1,
5,
8,
13,
20,
22,
1,
5,
8,
13,
20,
22,
24,
1,
7,
12,
1,
1,
4,
6,
9,
11,
1,
4,
5,
10,
12,
14,
18,
26,
28,
1,
4,
5,
13,
15,
16,
17,
18,
19,
20,
21,
22,
24,
1,
1,
4,
9,
12,
4,
11,
13... |
63069f03d17862b8ea6aa74d0acd1370bbea0dcb | import os
import xml.etree.ElementTree as Et
import copy
from .common import CommonRouteExchangeService
class DataRoutes(CommonRouteExchangeService):
"""Класс для работы с данными аршрутов"""
def get_route_from_file(self, path_route):
"""Считывание маршрута из файла
:param path_route: Путь д... | [
485,
2355,
222,
485,
5604,
51,
48659,
51,
1325,
3371,
641,
42811,
222,
485,
1948,
222,
222,
1097,
657,
2297,
1220,
8762,
3587,
11900,
1201,
499,
222,
842,
2426,
14649,
45,
5248,
3587,
11900,
1201,
731,
303,
1547,
15240,
37162,
12771,
... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġxml",
".",
"etree",
".",
"Element",
"Tree",
"Ġas",
"ĠEt",
"Ċ",
"import",
"Ġcopy",
"Ċ",
"Ċ",
"from",
"Ġ.",
"common",
"Ġimport",
"ĠCommon",
"Route",
"Exchange",
"Service",
"ĊĊ",
"Ċ",
"class",
"ĠData",
"Routes",
"(",
"Commo... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
7,
10,
1,
7,
11,
12,
17,
18,
25,
29,
32,
35,
1,
7,
12,
1,
1,
5,
7,
13,
20,
27,
32,
40,
47,
1,
1,
6,
11,
17,
18,
24,
29,
37,
44,
46,
4,
8,
9,
13,
17,
23,
24,
26,
30,
32,
34,
36,
37,
38,
40,
41,
43,
46,
4,... |
41eef711c79fb084c9780b6d2638d863266e569d | import random
responses = [
"Seems so",
"Never",
"Untrue",
"Always no matter what",
"You decide your fate",
"Not sure",
"Yep",
"Nope",
"Maybe",
"Nein",
"Qui",
"Ask the person next to you",
"That question is not for me",
]
def answer():
question = input("Ask me ... | [
485,
4051,
222,
222,
18248,
299,
447,
303,
332,
921,
4907,
1278,
411,
303,
332,
27812,
411,
303,
332,
1079,
1527,
411,
303,
332,
23084,
1307,
15254,
2794,
411,
303,
332,
4296,
19777,
1390,
315,
351,
411,
303,
332,
1355,
3673,
411,
3... | [
"import",
"Ġrandom",
"Ċ",
"Ċ",
"responses",
"Ġ=",
"Ġ[",
"ĊĠĠĠ",
"Ġ\"",
"Se",
"ems",
"Ġso",
"\",",
"ĊĠĠĠ",
"Ġ\"",
"Never",
"\",",
"ĊĠĠĠ",
"Ġ\"",
"Un",
"true",
"\",",
"ĊĠĠĠ",
"Ġ\"",
"Always",
"Ġno",
"Ġmatter",
"Ġwhat",
"\",",
"ĊĠĠĠ",
"Ġ\"",
"You",
"Ġdeci... | [
1,
1,
1,
2,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
13,
13,
13,
... | [
1,
7,
14,
1,
1,
10,
12,
14,
4,
6,
8,
11,
14,
16,
4,
6,
11,
13,
4,
6,
8,
12,
14,
4,
6,
12,
15,
22,
27,
29,
4,
6,
9,
16,
21,
23,
26,
28,
4,
6,
9,
14,
16,
4,
6,
7,
9,
11,
4,
6,
8,
10,
12,
4,
6,
11,
13,
4,
... |
f4bc5663ab2b2a6dbb41a2fc3d7ca67100b455a4 | # Compute grid scores using the new dataset format
import matplotlib
import os
# allow code to work on machines without a display or in a screen session
display = os.environ.get("DISPLAY")
if display is None or "localhost" in display:
matplotlib.use("agg")
import argparse
import numpy as np
import torch
import t... | [
40,
12923,
5145,
16081,
1493,
341,
556,
5984,
2224,
222,
222,
485,
13168,
222,
485,
2355,
222,
222,
40,
2625,
1361,
391,
1409,
563,
19913,
2895,
331,
2540,
575,
347,
331,
4820,
3541,
222,
2784,
299,
2355,
51,
12849,
51,
390,
459,
20... | [
"#",
"ĠCompute",
"Ġgrid",
"Ġscores",
"Ġusing",
"Ġthe",
"Ġnew",
"Ġdataset",
"Ġformat",
"Ċ",
"Ċ",
"import",
"Ġmatplotlib",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"#",
"Ġallow",
"Ġcode",
"Ġto",
"Ġwork",
"Ġon",
"Ġmachines",
"Ġwithout",
"Ġa",
"Ġdisplay",
"Ġor",
"Ġin",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9... | [
1,
2,
10,
15,
22,
28,
32,
36,
44,
51,
1,
1,
7,
18,
1,
7,
10,
1,
1,
2,
8,
13,
16,
21,
24,
33,
41,
43,
51,
54,
57,
59,
66,
74,
1,
8,
10,
13,
14,
21,
22,
25,
27,
34,
36,
1,
3,
11,
14,
19,
22,
24,
33,
34,
37,
4... |
8c6f890631e9696a7907975b5d0bb71d03b380da | import cv2
import numpy as np
img = cv2.imread("Scan1.jpg")
img_height, img_width, dim = img.shape
cv2.imshow("image1", img[0 : int(img_height / 2), 0 : int(img_width / 2)])
cv2.imshow("image2", img[int(img_height / 2) : img_height, 0 : int(img_width / 2)])
cv2.imshow("image3", img[0 : int(img_height / 2), int(img_w... | [
485,
6781,
55,
222,
485,
6610,
641,
2115,
222,
222,
1296,
299,
6781,
55,
51,
41190,
459,
8818,
54,
51,
3090,
678,
222,
222,
1296,
100,
2296,
49,
4838,
100,
1660,
49,
4446,
299,
4838,
51,
3299,
222,
222,
4167,
55,
51,
24184,
459,
... | [
"import",
"Ġcv",
"2",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"Ċ",
"img",
"Ġ=",
"Ġcv",
"2",
".",
"imread",
"(\"",
"Scan",
"1",
".",
"jpg",
"\")",
"Ċ",
"Ċ",
"img",
"_",
"height",
",",
"Ġimg",
"_",
"width",
",",
"Ġdim",
"Ġ=",
"Ġimg",
".",
"sh... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
7,
10,
11,
1,
7,
13,
16,
19,
1,
1,
4,
6,
9,
10,
11,
17,
19,
23,
24,
25,
28,
30,
1,
1,
4,
5,
11,
12,
16,
17,
22,
23,
27,
29,
33,
34,
39,
1,
1,
3,
4,
5,
11,
13,
18,
19,
21,
25,
26,
27,
29,
33,
34,
37,
38,
... |
c43b899234ffff09225153dcaf097591c7176430 | from django.contrib import admin
# Register your models here.
from .models import Participant
class ParticipantAdmin(admin.ModelAdmin):
fieldsets = [
("Personal information", {"fields": ["email", "name", "institution", "assistant"]}),
("Asistance", {"fields": ["assistant", "participant_hash"]}),
... | [
1097,
8532,
51,
12060,
1220,
5611,
222,
222,
40,
7017,
1390,
4590,
2464,
51,
222,
1097,
657,
3404,
1220,
6695,
10631,
499,
222,
842,
6695,
10631,
4208,
45,
2317,
51,
1262,
4208,
731,
303,
1620,
2047,
299,
447,
310,
2903,
15645,
2490,
... | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"Ċ",
"#",
"ĠRegister",
"Ġyour",
"Ġmodels",
"Ġhere",
".",
"Ċ",
"from",
"Ġ.",
"models",
"Ġimport",
"ĠPart",
"icipant",
"ĊĊ",
"Ċ",
"class",
"ĠPart",
"icipant",
"Admin",
"(",
"admin",
".",
"Model",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
... | [
1,
5,
12,
13,
20,
27,
33,
1,
1,
2,
11,
16,
23,
28,
29,
1,
5,
7,
13,
20,
25,
32,
1,
1,
6,
11,
18,
23,
24,
29,
30,
35,
40,
42,
4,
10,
14,
16,
18,
8,
11,
19,
31,
33,
36,
42,
44,
47,
52,
54,
56,
60,
62,
64,
75,
... |
95422348c8db9753830cc0a7c8785c05b44886b1 | from datetime import datetime as dt
YEAR = dt.today().year
BINARY_LOCATION = {"binary_location": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"}
CHROME_DRIVER_PATH = r"C:\Users\pavithra\Downloads\chromedriver_win32\chromedriver.exe"
EXTRACTED_DIR = (
r"C:\Users\pavithra\Documents\fintuple-automation... | [
1097,
7181,
1220,
7181,
641,
8837,
222,
222,
23181,
299,
8837,
51,
16029,
941,
4614,
222,
17892,
100,
17022,
299,
3479,
7038,
100,
2665,
582,
332,
72,
6573,
5756,
11105,
327,
125,
61,
59,
4201,
7740,
52,
18115,
52,
2743,
52,
11232,
... | [
"from",
"Ġdatetime",
"Ġimport",
"Ġdatetime",
"Ġas",
"Ġdt",
"Ċ",
"Ċ",
"YEAR",
"Ġ=",
"Ġdt",
".",
"today",
"().",
"year",
"Ċ",
"BINARY",
"_",
"LOCATION",
"Ġ=",
"Ġ{\"",
"binary",
"_",
"location",
"\":",
"Ġ\"",
"C",
":/",
"Program",
"ĠFiles",
"Ġ(",
"x",
"8"... | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
5,
14,
21,
30,
33,
36,
1,
1,
5,
7,
10,
11,
16,
19,
23,
1,
7,
8,
16,
18,
21,
27,
28,
36,
38,
40,
41,
43,
50,
56,
58,
59,
60,
61,
63,
69,
70,
76,
77,
88,
89,
95,
96,
99,
101,
1,
3,
7,
8,
14,
15,
19,
21,
23,
... |
96cb2754db2740767dfb145078ed17969e85123d | from .parapred import main
main()
| [
1097,
657,
587,
386,
1116,
1220,
2594,
222,
222,
1850,
365,
222
] | [
"from",
"Ġ.",
"par",
"ap",
"red",
"Ġimport",
"Ġmain",
"Ċ",
"Ċ",
"main",
"()",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3
] | [
1,
5,
7,
10,
12,
15,
22,
27,
1,
1,
5,
7
] |
77f94ecd205ae9f240f25d959a6d5cd9cf844d86 | """
The Snail v 2
"Buy the dips! ... then wait"
STRATEGY
1. Selects coins that are X% (percent_below) below their X day (LIMIT) maximum
2. ** NEW ** Finds movement (MOVEMENT) range over X Days
- if MOVEMENT* > TAKE_PROFIT coins pass to 3
3. Check coins are not already owned
4. Uses MACD to check if coins are current... | [
3012,
222,
1338,
377,
8085,
373,
244,
55,
222,
39,
16353,
341,
362,
9524,
38,
2437,
1636,
4483,
39,
222,
222,
2393,
1775,
15063,
222,
54,
51,
6629,
120,
36867,
708,
904,
1618,
42,
327,
11701,
100,
24124,
46,
4834,
3641,
1618,
5830,
... | [
"\"\"\"",
"Ċ",
"The",
"ĠS",
"nail",
"Ġv",
"Ġ",
"2",
"Ċ",
"\"",
"Buy",
"Ġthe",
"Ġd",
"ips",
"!",
"Ġ...",
"Ġthen",
"Ġwait",
"\"",
"Ċ",
"Ċ",
"STR",
"ATE",
"GY",
"Ċ",
"1",
".",
"ĠSelect",
"s",
"Ġcoins",
"Ġthat",
"Ġare",
"ĠX",
"%",
"Ġ(",
"percent",
... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
4,
1,
4,
6,
10,
12,
13,
14,
1,
2,
5,
9,
11,
14,
15,
19,
24,
29,
30,
1,
1,
4,
7,
9,
1,
2,
3,
10,
11,
17,
22,
26,
28,
29,
31,
38,
39,
44,
45,
51,
57,
59,
63,
65,
70,
71,
79,
1,
2,
3,
6,
10,
13,
19,
28,
3... |
ea07cb640e76ced8be92b55ee14e1d3058e073c9 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .variational_legacy import *
| [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
1097,
657,
10014,
5168,
100,
18232,
1220,
338,
222
] | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"from",
"Ġ.",
"vari",
"ational",
"_",
"legacy",
"Ġimport",
"Ġ*",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4
] | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
5,
7,
11,
18,
19,
25,
32,
34
] |
351b2c2a18473e6ac541a96165c69c836ea101de | #
# @lc app=leetcode.cn id=2006 lang=python3
#
# [2006] 差的绝对值为 K 的数对数目
#
# @lc code=start
class Solution:
def countKDifference(self, nums: List[int], k: int) -> int:
def abs(x, y):
if x - y >= 0:
return x - y
else:
return y - x
ret = 0
... | [
40,
222,
40,
496,
9091,
1142,
66,
19403,
51,
4999,
828,
66,
55,
53,
53,
59,
7285,
66,
2980,
56,
222,
40,
222,
40,
447,
55,
53,
53,
59,
98,
244,
23810,
1096,
30846,
4317,
41464,
1242,
10403,
2378,
4317,
2378,
6325,
222,
40,
222,
... | [
"#",
"Ċ",
"#",
"Ġ@",
"lc",
"Ġapp",
"=",
"leetcode",
".",
"cn",
"Ġid",
"=",
"2",
"0",
"0",
"6",
"Ġlang",
"=",
"python",
"3",
"Ċ",
"#",
"Ċ",
"#",
"Ġ[",
"2",
"0",
"0",
"6",
"]",
"Ġ",
"å·®",
"çļĦ",
"ç»Ŀ",
"对",
"åĢ¼ä¸º",
"ĠK",
"ĠçļĦ",
"æķ°",
... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9... | [
1,
2,
1,
2,
4,
6,
10,
11,
19,
20,
22,
25,
26,
27,
28,
29,
30,
35,
36,
42,
43,
1,
2,
1,
2,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
16,
18,
20,
21,
22,
23,
24,
1,
2,
1,
1,
2,
4,
6,
11,
12,
17,
1,
6,
15,
16,
... |
0fbf8efd39f583581c46fcd3f84c65a7787145cd | import tensorflow as tf
def build_shared_network(x, add_summaries=False):
conv1 = tf.layers.conv2d(x, 16, 8, 4, activation=tf.nn.relu, name="conv1")
conv2 = tf.layers.conv2d(conv1, 32, 4, 2, activation=tf.nn.relu, name="conv2")
fc1 = tf.layers.dense(tf.layers.flatten(conv2), 256, name="fc1")
if add_... | [
485,
15196,
641,
5369,
499,
222,
610,
1984,
100,
4206,
100,
4599,
45,
125,
49,
1035,
100,
1055,
33381,
66,
2737,
731,
303,
11605,
54,
299,
5369,
51,
8367,
51,
6105,
55,
105,
45,
125,
49,
244,
54,
59,
49,
244,
61,
49,
244,
57,
... | [
"import",
"Ġtensorflow",
"Ġas",
"Ġtf",
"ĊĊ",
"Ċ",
"def",
"Ġbuild",
"_",
"shared",
"_",
"network",
"(",
"x",
",",
"Ġadd",
"_",
"sum",
"maries",
"=",
"False",
"):",
"ĊĠĠĠ",
"Ġconv",
"1",
"Ġ=",
"Ġtf",
".",
"layers",
".",
"conv",
"2",
"d",
"(",
"x",
... | [
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6... | [
1,
7,
18,
21,
24,
1,
1,
4,
10,
11,
17,
18,
25,
26,
27,
28,
32,
33,
36,
42,
43,
48,
50,
4,
9,
10,
12,
15,
16,
22,
23,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
53,
54,
56,
57,
59,
60,
64,
... |
4d63a5f09164b78faa731af6dce41969edc2c4f5 | import datastructure
import wordUri
class Question:
def __init__(self, nlp, otter, nounArray, verbArray):
self.nlp = nlp
self.nounArray = nounArray
self.verbArray = verbArray
self.file = otter
def findFirst(self, sentence):
sentenceDoc = self.nlp(sentence)
for ... | [
485,
727,
6014,
222,
485,
3619,
5729,
499,
222,
842,
15201,
63,
303,
684,
1176,
1683,
3232,
803,
49,
329,
1935,
49,
29260,
410,
49,
1307,
330,
1280,
49,
23636,
1280,
731,
310,
649,
51,
26275,
299,
329,
1935,
310,
649,
51,
1365,
33... | [
"import",
"Ġdata",
"structure",
"Ċ",
"import",
"Ġword",
"Uri",
"ĊĊ",
"Ċ",
"class",
"ĠQuestion",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġn",
"lp",
",",
"Ġot",
"ter",
",",
"Ġno",
"un",
"Array",
",",
"Ġverb",
"Array",
"):",
"ĊĠĠĠĠĠĠĠ",
... | [
1,
1,
1,
1,
2,
2,
2,
2,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10... | [
1,
7,
12,
21,
1,
7,
12,
15,
1,
1,
6,
15,
16,
4,
8,
11,
15,
18,
22,
23,
25,
27,
28,
31,
34,
35,
38,
40,
45,
46,
51,
56,
58,
8,
13,
14,
17,
19,
21,
23,
8,
13,
14,
16,
18,
23,
25,
28,
30,
35,
8,
13,
14,
18,
23,
... |
6e01e36170f3f08f2030dbd4dd91019936fb9f5c | # Copyright (c) 2020 Open Collector, Inc.
#
# 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... | [
40,
2657,
327,
104,
46,
244,
55,
53,
55,
53,
3944,
47406,
49,
6367,
51,
222,
40,
222,
40,
11125,
458,
13528,
11495,
49,
3760,
451,
10117,
49,
391,
1364,
4944,
13938,
331,
1948,
222,
40,
451,
477,
2951,
480,
5764,
4349,
2293,
327,
... | [
"#",
"ĠCopyright",
"Ġ(",
"c",
")",
"Ġ",
"2",
"0",
"2",
"0",
"ĠOpen",
"ĠCollector",
",",
"ĠInc",
".",
"Ċ",
"#",
"Ċ",
"#",
"ĠPermission",
"Ġis",
"Ġhereby",
"Ġgranted",
",",
"Ġfree",
"Ġof",
"Ġcharge",
",",
"Ġto",
"Ġany",
"Ġperson",
"Ġobtaining",
"Ġa",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6... | [
1,
2,
12,
14,
15,
16,
17,
18,
19,
20,
21,
26,
36,
37,
41,
42,
1,
2,
1,
2,
13,
16,
23,
31,
32,
37,
40,
47,
48,
51,
55,
62,
72,
74,
79,
1,
2,
5,
10,
19,
23,
34,
48,
54,
56,
59,
61,
69,
72,
75,
1,
2,
7,
10,
14,
... |
87504fb88cbbf810ad8bab08bc59284d2cf37cce | class Solution(object):
def findDisappearedNumbers(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
ns = [0] * len(nums)
for i in range(0, len(nums), 1):
ns[nums[i] - 1] = 1
ret = []
for j in range(0, len(ns), 1):
i... | [
842,
12219,
45,
1491,
731,
303,
684,
2309,
1744,
26160,
1961,
14847,
45,
803,
49,
12988,
731,
310,
1547,
310,
518,
700,
12988,
63,
1701,
96,
429,
98,
310,
518,
18388,
63,
1701,
96,
429,
98,
310,
1547,
310,
8765,
299,
447,
53,
98,
... | [
"class",
"ĠSolution",
"(",
"object",
"):",
"ĊĠĠĠ",
"Ġdef",
"Ġfind",
"Dis",
"appe",
"ared",
"Numbers",
"(",
"self",
",",
"Ġnums",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġ\"\"\"",
"ĊĠĠĠĠĠĠĠ",
"Ġ:",
"type",
"Ġnums",
":",
"ĠList",
"[",
"int",
"]",
"ĊĠĠĠĠĠĠĠ",
"Ġ:",
"rtype",
":"... | [
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
6,
15,
16,
22,
24,
4,
8,
13,
16,
20,
24,
31,
32,
36,
37,
42,
44,
8,
12,
8,
10,
14,
19,
20,
25,
26,
29,
30,
8,
10,
15,
16,
21,
22,
25,
26,
8,
12,
8,
11,
13,
15,
16,
17,
19,
23,
24,
28,
29,
8,
12,
14,
17,
23... |
a7add26a919a41e52ae41c6b4c4079eadaa8aa1d | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-16 12:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("main", "0036_auto_20180516_1818"),
]
operations = [
migrations.AddField(
... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
13046,
829,
18288,
244,
54,
51,
54,
54,
563,
244,
55,
53,
54,
61,
50,
53,
58,
50,
54,
59,
244,
54,
55,
63,
55,
57,
222,
1097,
1176,
9689,
523,
1220,
15393,
100,
30828,
222,
2... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠGenerated",
"Ġby",
"ĠDjango",
"Ġ",
"1",
".",
"1",
"1",
"Ġon",
"Ġ",
"2",
"0",
"1",
"8",
"-",
"0",
"5",
"-",
"1",
"6",
"Ġ",
"1",
"2",
":",
"2",
"4",
"Ċ",
"from",
"Ġ__",
"fut... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
12,
15,
22,
23,
24,
25,
26,
27,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
1,
5,
8,
14,
16,
23,
31,
32,
40,
1,
1,
5,
12,
13,
15,
22,
33,
34,... |
a52743fc911beb7e51644073131b25c177d4ad29 | import brainlit.algorithms.generate_fragments
from brainlit.algorithms.generate_fragments import *
| [
485,
32094,
2543,
51,
15097,
51,
5555,
100,
34275,
222,
222,
1097,
32094,
2543,
51,
15097,
51,
5555,
100,
34275,
1220,
338,
222
] | [
"import",
"Ġbrain",
"lit",
".",
"algorithms",
".",
"generate",
"_",
"fragments",
"Ċ",
"Ċ",
"from",
"Ġbrain",
"lit",
".",
"algorithms",
".",
"generate",
"_",
"fragments",
"Ġimport",
"Ġ*",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3
] | [
1,
7,
13,
16,
17,
27,
28,
36,
37,
46,
1,
1,
5,
11,
14,
15,
25,
26,
34,
35,
44,
51,
53
] |
44a9bb4d74d2e694f252d8726647bca13baa4df5 | import tornado.ioloop
import tornado.web
import json
import utils
class BaseHandler(tornado.web.RequestHandler):
def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
class CondaHandler(BaseHandler):... | [
485,
292,
38209,
51,
735,
5856,
222,
485,
292,
38209,
51,
1857,
222,
485,
2379,
222,
485,
8767,
499,
222,
842,
3787,
1985,
45,
121,
38209,
51,
1857,
51,
29911,
731,
303,
684,
758,
100,
1555,
100,
5090,
45,
803,
731,
310,
649,
51,
... | [
"import",
"Ġt",
"ornado",
".",
"io",
"loop",
"Ċ",
"import",
"Ġt",
"ornado",
".",
"web",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġutils",
"ĊĊ",
"Ċ",
"class",
"ĠBase",
"Handler",
"(",
"t",
"ornado",
".",
"web",
".",
"RequestHandler",
"):",
"ĊĠĠĠ",
"Ġdef"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,... | [
1,
7,
9,
15,
16,
18,
22,
1,
7,
9,
15,
16,
19,
1,
7,
12,
1,
7,
13,
1,
1,
6,
11,
18,
19,
20,
26,
27,
30,
31,
45,
47,
4,
8,
12,
13,
20,
21,
28,
29,
33,
35,
8,
13,
14,
17,
18,
24,
26,
32,
33,
40,
41,
46,
47,
53... |
ba8cb18544e4ded8b229bfb9cc4b28599119414f | """MPI-supported kernels for computing diffusion flux in 2D."""
from sopht.numeric.eulerian_grid_ops.stencil_ops_2d import (
gen_diffusion_flux_pyst_kernel_2d,
gen_set_fixed_val_pyst_kernel_2d,
)
from sopht_mpi.utils.mpi_utils import check_valid_ghost_size_and_kernel_support
from mpi4py import MPI
def gen_di... | [
3012,
15901,
50,
7101,
39542,
456,
18795,
5861,
6655,
20041,
347,
244,
55,
73,
7128,
222,
222,
1097,
328,
539,
403,
51,
10157,
51,
39457,
2560,
100,
3393,
100,
4178,
51,
31760,
100,
4178,
100,
55,
105,
1220,
327,
303,
4515,
100,
492... | [
"\"\"\"",
"MPI",
"-",
"supported",
"Ġkernels",
"Ġfor",
"Ġcomputing",
"Ġdiff",
"usion",
"Ġflux",
"Ġin",
"Ġ",
"2",
"D",
".\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġs",
"op",
"ht",
".",
"numeric",
".",
"euler",
"ian",
"_",
"grid",
"_",
"ops",
".",
"stencil",
"_",
"o... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
4,
7,
8,
17,
25,
29,
39,
44,
49,
54,
57,
58,
59,
60,
64,
1,
1,
5,
7,
9,
11,
12,
19,
20,
25,
28,
29,
33,
34,
37,
38,
45,
46,
49,
50,
51,
52,
59,
61,
4,
8,
9,
13,
18,
19,
23,
24,
25,
28,
29,
35,
36,
37,
38,
... |
7754974e79202b2df4ab9a7f69948483042a67cc | #! /usr/bin/env python
import smtpsend
S = smtpsend.Smtpsent(SUBJECT="Test")
S.sendemail("""
this is a test!
""")
| [
38359,
536,
3392,
52,
1793,
52,
2141,
4406,
222,
222,
485,
37830,
2729,
222,
222,
88,
299,
37830,
2729,
51,
6369,
510,
5948,
45,
41416,
366,
1024,
678,
222,
88,
51,
15500,
305,
2215,
27355,
222,
597,
458,
331,
913,
38,
222,
41223,
... | [
"#!",
"Ġ/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"Ċ",
"import",
"Ġsmtp",
"send",
"Ċ",
"Ċ",
"S",
"Ġ=",
"Ġsmtp",
"send",
".",
"Sm",
"tp",
"sent",
"(",
"SUBJECT",
"=\"",
"Test",
"\")",
"Ċ",
"S",
".",
"sen",
"de",
"mail",
"(\"\"\"",
"Ċ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8
] | [
1,
3,
5,
8,
9,
12,
13,
16,
23,
1,
1,
7,
12,
16,
1,
1,
2,
4,
9,
13,
14,
16,
18,
22,
23,
30,
32,
36,
38,
1,
2,
3,
6,
8,
12,
16,
1,
5,
8,
10,
15,
16,
1,
5
] |
987d6c769a4f593405e889ed2b0e3f9955900406 | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title="API")
from django.contrib.auth import views as auth_views
urlpatterns = [
path("django-admin/", admin.site.urls)... | [
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
8532,
51,
11420,
1220,
1536,
49,
2323,
222,
1097,
8532,
51,
2982,
1220,
4086,
222,
222,
1097,
6125,
100,
2863,
100,
13166,
51,
4361,
1220,
640,
100,
13166,
100,
1090,
222,
222,
3982,
100,
... | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġdjango",
".",
"urls",
"Ġimport",
"Ġpath",
",",
"Ġinclude",
"Ċ",
"from",
"Ġdjango",
".",
"conf",
"Ġimport",
"Ġsettings",
"Ċ",
"Ċ",
"from",
"Ġrest",
"_",
"framework",
"_",
"swagger",
".",... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
5,
12,
13,
20,
27,
33,
1,
5,
12,
13,
17,
24,
29,
30,
38,
1,
5,
12,
13,
17,
24,
33,
1,
1,
5,
10,
11,
20,
21,
28,
29,
34,
41,
45,
46,
53,
54,
58,
1,
1,
7,
8,
12,
14,
18,
19,
26,
27,
31,
32,
37,
39,
42,
44,
... |
b808daf8d1fbe3cc585db57e1049a502d3ca46f5 | import pandas as pd
from pandas.io.json import json_normalize
import numpy as np
import warnings
import re
warnings.filterwarnings("ignore")
data_path = "/Users/trietnguyen/Documents/Thesis/Thesis-2020/References/Crawler/summaryDataJson.json"
weights = ["mg", "ml", "%"]
def formatName(name):
arr = re.split(" |... | [
485,
13247,
641,
6451,
222,
1097,
13247,
51,
735,
51,
1279,
1220,
2379,
100,
13038,
222,
485,
6610,
641,
2115,
222,
485,
11740,
222,
485,
334,
222,
222,
20340,
51,
2049,
20340,
459,
3634,
678,
222,
222,
624,
100,
1005,
299,
2450,
37... | [
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"from",
"Ġpandas",
".",
"io",
".",
"json",
"Ġimport",
"Ġjson",
"_",
"normalize",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġwarnings",
"Ċ",
"import",
"Ġre",
"Ċ",
"Ċ",
"warnings",
".",
"filter",
"warnin... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
14,
17,
20,
1,
5,
12,
13,
15,
16,
20,
27,
32,
33,
42,
1,
7,
13,
16,
19,
1,
7,
16,
1,
7,
10,
1,
1,
9,
10,
16,
24,
26,
32,
34,
1,
1,
5,
6,
10,
12,
15,
20,
21,
24,
26,
28,
30,
32,
33,
42,
43,
46,
49,
50,... |
a649139a600cb506056a20e00089a07ec9244394 | # -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "lice... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
40,
2657,
244,
55,
53,
54,
58,
12046,
960,
36801,
51,
3381,
12902,
11921,
51,
222,
40,
222,
40,
4773,
1549,
341,
3954,
1196,
49,
3050,
244,
55,
51,
53,
327,
1402,
332,
3801,
191... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"#",
"ĠCopyright",
"Ġ",
"2",
"0",
"1",
"5",
"ĠDon",
"ne",
"ĠMartin",
".",
"ĠAll",
"ĠRights",
"ĠReserved",
".",
"Ċ",
"#",
"Ċ",
"#",
"ĠLicensed",
"Ġunder",
"Ġthe",
"ĠApache",
"ĠLicense",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
2,
12,
13,
14,
15,
16,
17,
21,
23,
30,
31,
35,
42,
51,
52,
1,
2,
1,
2,
11,
17,
21,
28,
36,
37,
45,
46,
47,
48,
49,
51,
54,
56,
63,
66,
70,
1,
2,
6,
10,
14,
19,
24,
31,
... |
b039ed74e62f3a74e8506d4e14a3422499046c06 | """
Module for generic standard analysis plots.
"""
import numpy as np
import matplotlib.pyplot as plt
import cartopy as cart
import xarray as xr
import ecco_v4_py as ecco
def global_and_stereo_map(
lat, lon, fld, plot_type="pcolormesh", cmap="YlOrRd", title=None, cmin=None, cmax=None, dpi=100, show_colorbar=Tru... | [
3012,
222,
2478,
456,
10151,
6244,
9276,
25791,
51,
222,
3012,
222,
222,
485,
6610,
641,
2115,
222,
485,
13168,
51,
18553,
641,
6020,
222,
485,
6378,
471,
997,
641,
11430,
222,
485,
837,
977,
641,
40974,
222,
485,
11050,
352,
100,
1... | [
"\"\"\"",
"Ċ",
"Module",
"Ġfor",
"Ġgeneric",
"Ġstandard",
"Ġanalysis",
"Ġplots",
".",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"import",
"Ġcar",
"to",
"py",
"Ġas",
"Ġcart",
... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
... | [
1,
4,
1,
7,
11,
19,
28,
37,
43,
44,
1,
4,
1,
1,
7,
13,
16,
19,
1,
7,
18,
19,
25,
28,
32,
1,
7,
11,
13,
15,
18,
23,
1,
7,
9,
14,
17,
20,
1,
7,
10,
12,
13,
14,
15,
16,
18,
21,
24,
26,
1,
1,
4,
11,
12,
15,
1... |
bf6d1ddf66bc0d54320c0491e344925a5f507df7 | import os
import sys
sys.path.insert(0, "/path/to/mm-api/python")
sys.path.insert(0, "/path/to/mm-api/distrib/python_osx")
print(sys.path)
import mmapi
from mmRemote import *
import mm
# assumption: we are running
examples_dir = "/dir/of/models/"
part_filename1 = os.path.join(examples_dir, "model1.stl")
part_filena... | [
485,
2355,
222,
485,
5263,
222,
222,
3750,
51,
1005,
51,
3233,
45,
53,
49,
2450,
1005,
52,
471,
52,
2861,
50,
1256,
52,
2980,
678,
222,
3750,
51,
1005,
51,
3233,
45,
53,
49,
2450,
1005,
52,
471,
52,
2861,
50,
1256,
52,
2481,
7... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġsys",
"Ċ",
"Ċ",
"sys",
".",
"path",
".",
"insert",
"(",
"0",
",",
"Ġ\"/",
"path",
"/",
"to",
"/",
"mm",
"-",
"api",
"/",
"python",
"\")",
"Ċ",
"sys",
".",
"path",
".",
"insert",
"(",
"0",
",",
"Ġ\"/",
"path",
... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9... | [
1,
7,
10,
1,
7,
11,
1,
1,
4,
5,
9,
10,
16,
17,
18,
19,
22,
26,
27,
29,
30,
32,
33,
36,
37,
43,
45,
1,
4,
5,
9,
10,
16,
17,
18,
19,
22,
26,
27,
29,
30,
32,
33,
36,
37,
41,
44,
45,
51,
52,
55,
57,
1,
6,
7,
10... |
28854823b1edc7df6cf025175811c1858efd2c42 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-19 15:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="OpenHumansMe... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
13046,
829,
18288,
244,
54,
51,
54,
53,
51,
57,
563,
244,
55,
53,
54,
59,
50,
54,
55,
50,
54,
62,
244,
54,
58,
63,
55,
58,
222,
1097,
1176,
9689,
523,
1220,
15393,
100,
30828... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠGenerated",
"Ġby",
"ĠDjango",
"Ġ",
"1",
".",
"1",
"0",
".",
"4",
"Ġon",
"Ġ",
"2",
"0",
"1",
"6",
"-",
"1",
"2",
"-",
"1",
"9",
"Ġ",
"1",
"5",
":",
"2",
"5",
"Ċ",
"from",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
12,
15,
22,
23,
24,
25,
26,
27,
28,
29,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
1,
5,
8,
14,
16,
23,
31,
32,
40,
1,
1,
5,
12,
13,
15,
22,... |
e3665141397d52877242463d548c059272d13536 | #!/usr/bin/env python3
import io
import json
import fire
from collections import OrderedDict
def main(input, output):
vocab = OrderedDict({"</s>": 0, "<unk>": 1})
for line in io.open(input, "r", encoding="utf-8"):
word, count = line.strip().split()
vocab[word] = len(vocab)
with io.open(ou... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
56,
222,
222,
485,
3377,
222,
485,
2379,
222,
485,
8388,
222,
1097,
13722,
1220,
34279,
499,
222,
610,
2594,
45,
1151,
49,
1716,
731,
303,
21380,
299,
34279,
1389,
14287,
120,
67,
582,
244,
53,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"3",
"Ċ",
"Ċ",
"import",
"Ġio",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġfire",
"Ċ",
"from",
"Ġcollections",
"Ġimport",
"ĠOrderedDict",
"ĊĊ",
"Ċ",
"def",
"Ġmain",
"(",
"input",
",",
"Ġoutput",
"):",
"ĊĠĠ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
23,
1,
1,
7,
10,
1,
7,
12,
1,
7,
12,
1,
5,
17,
24,
36,
1,
1,
4,
9,
10,
15,
16,
23,
25,
4,
10,
12,
24,
26,
29,
30,
31,
33,
34,
35,
36,
39,
42,
43,
45,
46,
47,
49,
4,
8,
13,
16,
... |
25ff54a969651d365de33f2420c662518dd63738 | import json
import random
from time import sleep
url = "data/data.json"
def loop(run_state):
error = 1
simulations = 1
while run:
error_margin = str((error / simulations) * 100) + "%"
prediction = get_prediction()
print("Prediction: %s" % prediction)
print("Error Margin: ... | [
485,
2379,
222,
485,
4051,
222,
1097,
1153,
1220,
9375,
222,
222,
983,
299,
332,
624,
52,
624,
51,
1279,
39,
499,
222,
610,
5276,
45,
1967,
100,
1311,
731,
303,
1067,
299,
244,
54,
303,
43436,
299,
244,
54,
465,
2236,
1441,
63,
... | [
"import",
"Ġjson",
"Ċ",
"import",
"Ġrandom",
"Ċ",
"from",
"Ġtime",
"Ġimport",
"Ġsleep",
"Ċ",
"Ċ",
"url",
"Ġ=",
"Ġ\"",
"data",
"/",
"data",
".",
"json",
"\"",
"ĊĊ",
"Ċ",
"def",
"Ġloop",
"(",
"run",
"_",
"state",
"):",
"ĊĠĠĠ",
"Ġerror",
"Ġ=",
"Ġ",
"1... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
12,
12,
12,
12,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
... | [
1,
7,
12,
1,
7,
14,
1,
5,
10,
17,
23,
1,
1,
4,
6,
8,
12,
13,
17,
18,
22,
23,
1,
1,
4,
9,
10,
13,
14,
19,
21,
4,
10,
12,
13,
14,
4,
16,
18,
19,
20,
4,
10,
14,
15,
8,
14,
15,
21,
23,
27,
29,
34,
36,
48,
49,
... |
f2cdee7e5eebaeeb784cb901c3ac6301e90ac7b9 | from django.shortcuts import render, get_object_or_404, redirect
# from emailupdate.forms import emailupdate_form
from forms import EmailForm
from django.utils import timezone
def index(request):
if request.method == "POST":
form = EmailForm(request.POST)
if form.is_valid():
post = fo... | [
1097,
8532,
51,
36264,
1220,
2922,
49,
640,
100,
1491,
100,
290,
100,
57,
53,
57,
49,
5675,
222,
222,
40,
664,
4111,
1896,
51,
8543,
1220,
4111,
1896,
100,
618,
222,
1097,
10556,
1220,
10028,
1260,
222,
1097,
8532,
51,
2324,
1220,
... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
",",
"Ġget",
"_",
"object",
"_",
"or",
"_",
"4",
"0",
"4",
",",
"Ġredirect",
"Ċ",
"Ċ",
"#",
"Ġfrom",
"Ġemail",
"update",
".",
"forms",
"Ġimport",
"Ġemail",
"update",
"_",
"form",
"Ċ",
"from",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
... | [
1,
5,
12,
13,
22,
29,
36,
37,
41,
42,
48,
49,
51,
52,
53,
54,
55,
56,
65,
1,
1,
2,
7,
13,
19,
20,
25,
32,
38,
44,
45,
49,
1,
5,
11,
18,
24,
28,
1,
5,
12,
13,
18,
25,
34,
1,
1,
4,
10,
11,
18,
20,
4,
7,
15,
1... |
18dae039f6455f944cbaa97bcb9c36ed29ac9a21 | incremental_factors_file = "../2019_2020_IncrementalFactorsList.csv"
tax_pickle_for_apns = "kmes_taxes.p"
tax_history_pickle = "../cusd_1percent_tax_history.p"
distribution_pickle_out = "kmes_distribution.p"
cabrillo_key = 50200
def read_incremental_factors():
import csv
inc_file = open(incremental_factors_f... | [
37280,
100,
36000,
100,
781,
299,
6919,
55,
53,
54,
62,
100,
55,
53,
55,
53,
100,
44522,
45456,
739,
51,
4849,
39,
222,
9164,
100,
24274,
100,
999,
100,
386,
2591,
299,
332,
112,
8037,
100,
9164,
326,
51,
117,
39,
222,
9164,
100... | [
"incremental",
"_",
"factors",
"_",
"file",
"Ġ=",
"Ġ\"../",
"2",
"0",
"1",
"9",
"_",
"2",
"0",
"2",
"0",
"_",
"Incremental",
"Factors",
"List",
".",
"csv",
"\"",
"Ċ",
"tax",
"_",
"pickle",
"_",
"for",
"_",
"ap",
"ns",
"Ġ=",
"Ġ\"",
"k",
"mes",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4... | [
1,
12,
13,
20,
21,
25,
27,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
53,
60,
64,
65,
68,
69,
1,
4,
5,
11,
12,
15,
16,
18,
20,
22,
24,
25,
28,
29,
32,
34,
35,
36,
37,
1,
4,
5,
12,
13,
19,
21,
26,
29,
30,
31,
... |
860f77b031c815df40a16669dae8d32af4afa5bf | from flask import Flask, jsonify, request, render_template
from werkzeug import secure_filename
import os
from utils import allowed_file, convert_html_to_pdf, convert_doc_to_pdf
app = Flask(__name__)
@app.route("/", methods=["GET"])
def index():
"""Renders Index.html"""
try:
return render_template("... | [
1097,
18958,
1220,
24033,
49,
35206,
49,
1343,
49,
2922,
100,
2402,
222,
1097,
10385,
112,
39541,
1220,
14699,
100,
3633,
222,
485,
2355,
222,
222,
1097,
8767,
1220,
6671,
100,
781,
49,
4511,
100,
935,
100,
471,
100,
4710,
49,
4511,
... | [
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
",",
"Ġjsonify",
",",
"Ġrequest",
",",
"Ġrender",
"_",
"template",
"Ċ",
"from",
"Ġwer",
"k",
"zeug",
"Ġimport",
"Ġsecure",
"_",
"filename",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"from",
"Ġutils",
"Ġimport",
"Ġallowed",
"_",... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10... | [
1,
5,
11,
18,
24,
25,
33,
34,
42,
43,
50,
51,
59,
1,
5,
9,
10,
14,
21,
28,
29,
37,
1,
7,
10,
1,
1,
5,
11,
18,
26,
27,
31,
32,
40,
41,
45,
46,
48,
49,
52,
53,
61,
62,
65,
66,
68,
69,
72,
1,
1,
4,
6,
12,
15,
... |
f080191fec4e56adc4013da74c840817e88caf56 | import os
import base64
from urllib.parse import urlencode
import json
from flask import Blueprint, request, redirect, jsonify, make_response
import requests
spotify = Blueprint("spotify", __name__)
# Client Keys
SPOTIFY_CLIENT_ID = os.environ.get("SPOTIFY_CLIENT_ID")
SPOTIFY_CLIENT_SECRET = os.environ.get("SPOTIFY... | [
485,
2355,
222,
485,
1712,
59,
57,
222,
1097,
22296,
51,
2228,
1220,
2001,
4458,
222,
485,
2379,
222,
222,
1097,
18958,
1220,
34660,
49,
1343,
49,
5675,
49,
35206,
49,
1949,
100,
2003,
222,
485,
5188,
222,
222,
10652,
299,
34660,
45... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġbase",
"6",
"4",
"Ċ",
"from",
"Ġurllib",
".",
"parse",
"Ġimport",
"Ġurl",
"encode",
"Ċ",
"import",
"Ġjson",
"Ċ",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"ĠBlueprint",
",",
"Ġrequest",
",",
"Ġredirect",
",",
"Ġjsonify",
",",
"Ġ... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
... | [
1,
7,
10,
1,
7,
12,
13,
14,
1,
5,
12,
13,
18,
25,
29,
35,
1,
7,
12,
1,
1,
5,
11,
18,
28,
29,
37,
38,
47,
48,
56,
57,
62,
63,
71,
1,
7,
16,
1,
1,
8,
10,
20,
22,
29,
31,
34,
38,
41,
1,
1,
2,
3,
10,
15,
1,
3... |
d4d19411f0c48ffb99bd17e8387f1741144e43b4 | from celery import shared_task
import tweepy
from datetime import datetime, timedelta
from .models import Tweet
from django.db import IntegrityError
CONSUMER_KEY = "Vp7FVQLSwESvE9oTQruw0TnhW"
CONSUMER_SECRET = "miy6EsGklNYxAaVn37vTjAVGwP0c67IOyuY71AAyL1p2Ba4VPN"
ACCESS_TOKEN = "1952022900-5WAHk6l5d3GllFtqDPaucSpnraIo... | [
1097,
25374,
852,
1220,
7187,
100,
2810,
222,
485,
292,
16817,
126,
222,
1097,
7181,
1220,
7181,
49,
30864,
222,
222,
1097,
657,
3404,
1220,
413,
9224,
222,
1097,
8532,
51,
1219,
1220,
14292,
562,
943,
222,
222,
1742,
14408,
546,
100,... | [
"from",
"Ġcel",
"ery",
"Ġimport",
"Ġshared",
"_",
"task",
"Ċ",
"import",
"Ġt",
"weep",
"y",
"Ċ",
"from",
"Ġdatetime",
"Ġimport",
"Ġdatetime",
",",
"Ġtimedelta",
"Ċ",
"Ċ",
"from",
"Ġ.",
"models",
"Ġimport",
"ĠT",
"weet",
"Ċ",
"from",
"Ġdjango",
".",
"db",... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
9,
12,
19,
26,
27,
31,
1,
7,
9,
13,
14,
1,
5,
14,
21,
30,
31,
41,
1,
1,
5,
7,
13,
20,
22,
26,
1,
5,
12,
13,
15,
22,
29,
32,
37,
1,
1,
4,
7,
9,
10,
13,
15,
17,
19,
20,
22,
24,
26,
28,
29,
30,
31,
32,
... |
879482e4df9c3d7f32d9b2a883201ae043e1189f | import os
import json
from nltk.corpus import wordnet as wn
from itertools import combinations # 計算排列組合
# 需要被計算的分類
myTypes = ["animal", "vehicle", "food", "fashion", "dog", "cat", "car", "motorcycle"]
# 計算完網紅權重存放的位置
scorePath = "..\\data\\score"
# getUsersData.py儲存網紅貼文資料的json檔案,拿來計算分數
usersDataFile = "..\\data\\us... | [
485,
2355,
222,
485,
2379,
222,
1097,
48071,
51,
23217,
1220,
3619,
1317,
641,
360,
115,
222,
1097,
31660,
1220,
28409,
244,
607,
244,
29900,
9550,
15016,
6723,
35752,
6363,
499,
222,
40,
39861,
9297,
29900,
9550,
1096,
4519,
38069,
222... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġjson",
"Ċ",
"from",
"Ġnltk",
".",
"corpus",
"Ġimport",
"Ġword",
"net",
"Ġas",
"Ġw",
"n",
"Ċ",
"from",
"Ġitertools",
"Ġimport",
"Ġcombinations",
"Ġ",
"Ġ#",
"Ġ",
"è¨Ī",
"ç®Ĺ",
"æİĴ",
"åĪĹ",
"çµĦ",
"åIJĪ",
"ĊĊ",
"Ċ",
"#",
... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
7,
10,
1,
7,
12,
1,
5,
10,
11,
17,
24,
29,
32,
35,
37,
38,
1,
5,
15,
22,
35,
36,
38,
39,
40,
41,
42,
43,
44,
45,
1,
1,
2,
5,
6,
7,
8,
9,
10,
11,
1,
3,
8,
10,
13,
19,
21,
23,
30,
32,
34,
38,
40,
42,
43,
... |
93d0d73d56b04bba505265958fccff229f5eaf49 | # -*- coding: utf-8 -*-
import os
from flask import Flask, request, render_template, url_for
from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class
import sys
sys.path.insert(1, "script")
from backend import model
import io
from PIL import Image
import base64
import numpy as np
app = Fla... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
485,
2355,
222,
1097,
18958,
1220,
24033,
49,
1343,
49,
2922,
100,
2402,
49,
2001,
100,
999,
222,
1097,
18958,
100,
11264,
1220,
16212,
903,
49,
8496,
100,
11264,
49,
457,
9373,
49,
7843... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"import",
"Ġos",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
",",
"Ġrequest",
",",
"Ġrender",
"_",
"template",
",",
"Ġurl",
"_",
"for",
"Ċ",
"from",
"Ġflask",
"_",
"uploads",
"Ġimport",
"ĠUplo... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
7,
10,
1,
5,
11,
18,
24,
25,
33,
34,
41,
42,
50,
51,
55,
56,
59,
1,
5,
11,
12,
19,
26,
33,
36,
37,
47,
48,
55,
56,
58,
63,
64,
70,
71,
78,
79,
84,
1,
7,
11,
1,
1,
4,
5,
9... |
ce4ecff2012cfda4a458912713b0330a218fa186 | from states.state import State
class MoveDigState(State):
# init attributes of state
def __init__(self):
super().__init__("MoveDig", "ScanDig")
self.transitionReady = False
self.digSiteDistance = 0
# implementation for each state: overridden
def run(self, moveInstructions):
... | [
1097,
10134,
51,
1311,
1220,
5036,
499,
222,
842,
11531,
9742,
1095,
45,
1095,
731,
303,
607,
3238,
5437,
451,
1621,
303,
684,
1176,
1683,
3232,
803,
731,
310,
2615,
17124,
1683,
46661,
5785,
9742,
411,
332,
8818,
9742,
678,
310,
649,... | [
"from",
"Ġstates",
".",
"state",
"Ġimport",
"ĠState",
"ĊĊ",
"Ċ",
"class",
"ĠMove",
"Dig",
"State",
"(",
"State",
"):",
"ĊĠĠĠ",
"Ġ#",
"Ġinit",
"Ġattributes",
"Ġof",
"Ġstate",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġsuper",
"().__",... | [
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
11,
11,
11,
11,
11,
1... | [
1,
5,
12,
13,
18,
25,
31,
1,
1,
6,
11,
14,
19,
20,
25,
27,
4,
6,
11,
22,
25,
31,
4,
8,
11,
15,
18,
22,
24,
8,
14,
19,
23,
27,
31,
34,
36,
38,
42,
45,
47,
8,
13,
14,
24,
29,
31,
37,
8,
13,
14,
17,
21,
29,
31,
... |
612535d95e655f2e2d2c58f41b2aa99afa7fbcbc | # from the top
# clean up dependencies
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "<h1>Congratulations, it's a web app!</h1>"
if __name__ == "__main__":
app.run(host="127.0.0.1", port=8080, debug=True)
| [
40,
664,
341,
2687,
222,
40,
5084,
992,
6450,
222,
222,
1097,
18958,
1220,
24033,
222,
222,
745,
299,
24033,
4077,
444,
8238,
499,
222,
69,
745,
51,
4363,
32153,
222,
610,
1671,
2284,
303,
461,
3791,
109,
54,
67,
628,
44796,
17536,
... | [
"#",
"Ġfrom",
"Ġthe",
"Ġtop",
"Ċ",
"#",
"Ġclean",
"Ġup",
"Ġdependencies",
"Ċ",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
"Ċ",
"Ċ",
"app",
"Ġ=",
"ĠFlask",
"(__",
"name",
"__)",
"ĊĊ",
"Ċ",
"@",
"app",
".",
"route",
"(\"/\")",
"Ċ",
"def",
"Ġindex",
"(... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
13,
14,
14,
14,
... | [
1,
2,
7,
11,
15,
1,
2,
8,
11,
24,
1,
1,
5,
11,
18,
24,
1,
1,
4,
6,
12,
15,
19,
22,
1,
1,
2,
5,
6,
11,
16,
1,
4,
10,
13,
4,
11,
14,
15,
16,
17,
20,
24,
32,
33,
36,
38,
40,
44,
48,
51,
52,
53,
55,
1,
1,
3,
... |
33b8baf2ca819315eaa5f16c7986390acb4d6efd | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, unicode_literals
import urllib
def normalize_mac_address(address):
return address.lower().replace("-", ":")
def urlencode(s):
return urllib.quote(s.encode("utf-8"), "")
def urlencode_plus(s):
return urllib.quote_plus(s.encode("... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
1097,
1176,
9689,
523,
1220,
7984,
100,
485,
49,
20707,
49,
15393,
100,
30828,
222,
222,
485,
22296,
499,
222,
610,
13445,
100,
4246,
100,
2485,
45,
2485,
731,
303,
461,
2983,
51,
5773,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"from",
"Ġ__",
"future",
"__",
"Ġimport",
"Ġabsolute",
"_",
"import",
",",
"Ġdivision",
",",
"Ġunicode",
"_",
"literals",
"Ċ",
"Ċ",
"import",
"Ġurllib",
"ĊĊ",
"Ċ",
"def",
"Ġnormalize",
"_",
"m... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
5,
8,
14,
16,
23,
32,
33,
39,
40,
49,
50,
58,
59,
67,
1,
1,
7,
14,
1,
1,
4,
14,
15,
18,
19,
26,
27,
34,
36,
4,
11,
19,
20,
25,
28,
35,
38,
40,
43,
45,
1,
1,
4,
8,
14,
15,... |
bf8ffe603b7c1e90deed6a69500ea5b7671e7270 | # from suiron.core.SuironIO import SuironIO
# import cv2
# import os
# import time
# import json
# import numpy as np
# suironio = SuironIO(serial_location='/dev/ttyUSB0', baudrate=57600, port=5050)
# if __name__ == "__main__":
# while True:
# # suironio.record_inputs()
# print('turn90')
# suiro... | [
40,
664,
7345,
28265,
51,
1284,
51,
21512,
28265,
2354,
1220,
377,
25490,
286,
2354,
222,
40,
1220,
6781,
55,
222,
40,
1220,
2355,
222,
40,
1220,
1153,
222,
40,
1220,
2379,
222,
40,
1220,
6610,
641,
2115,
222,
222,
40,
7345,
28265,
... | [
"#",
"Ġfrom",
"Ġsu",
"iron",
".",
"core",
".",
"Su",
"iron",
"IO",
"Ġimport",
"ĠS",
"uir",
"on",
"IO",
"Ċ",
"#",
"Ġimport",
"Ġcv",
"2",
"Ċ",
"#",
"Ġimport",
"Ġos",
"Ċ",
"#",
"Ġimport",
"Ġtime",
"Ċ",
"#",
"Ġimport",
"Ġjson",
"Ċ",
"#",
"Ġimport",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
7,
10,
14,
15,
19,
20,
22,
26,
28,
35,
37,
40,
42,
44,
1,
2,
9,
12,
13,
1,
2,
9,
12,
1,
2,
9,
14,
1,
2,
9,
14,
1,
2,
9,
15,
18,
21,
1,
1,
2,
5,
9,
11,
13,
15,
18,
20,
22,
23,
29,
30,
38,
41,
44,
45,... |
71ebc6e9218085e887eda7843b5489837ed45c97 | import re
class Zout:
def __init__(self, aline):
self.Str = aline
self.Var = ""
self.StN = ""
self.ZN = ""
self.ZName = ""
self.Motion = ""
self.Ztype = ""
self.tozout(aline)
def tozout(self, aline):
"""transform station statement to Cyl... | [
485,
334,
499,
222,
842,
2538,
560,
63,
303,
684,
1176,
1683,
3232,
803,
49,
763,
501,
731,
310,
649,
51,
2026,
299,
763,
501,
310,
649,
51,
1901,
299,
3347,
310,
649,
51,
520,
83,
299,
3347,
310,
649,
51,
27230,
299,
3347,
310,... | [
"import",
"Ġre",
"ĊĊ",
"Ċ",
"class",
"ĠZ",
"out",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġal",
"ine",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"Str",
"Ġ=",
"Ġal",
"ine",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"Var",
"Ġ=",
"Ġ\"\"",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".... | [
1,
1,
1,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
12,
12,
1... | [
1,
7,
10,
1,
1,
6,
8,
11,
12,
4,
8,
11,
15,
18,
22,
23,
26,
29,
31,
8,
13,
14,
17,
19,
22,
25,
8,
13,
14,
17,
19,
22,
8,
13,
14,
16,
17,
19,
22,
8,
13,
14,
16,
18,
21,
8,
13,
14,
15,
19,
21,
24,
8,
13,
14,
... |
58f7810e2731721562e3459f92684589dc66862c | a = [3, 4, 2, 3, 5, 8, 23, 32, 35, 34, 4, 6, 9]
print("")
print("Lesson #2")
print("Program start:")
for i in a:
if i < 9:
print(i)
print("End")
| [
102,
299,
447,
56,
49,
244,
57,
49,
244,
55,
49,
244,
56,
49,
244,
58,
49,
244,
61,
49,
244,
55,
56,
49,
244,
56,
55,
49,
244,
56,
58,
49,
244,
56,
57,
49,
244,
57,
49,
244,
59,
49,
244,
62,
98,
222,
222,
1243,
18001,
... | [
"a",
"Ġ=",
"Ġ[",
"3",
",",
"Ġ",
"4",
",",
"Ġ",
"2",
",",
"Ġ",
"3",
",",
"Ġ",
"5",
",",
"Ġ",
"8",
",",
"Ġ",
"2",
"3",
",",
"Ġ",
"3",
"2",
",",
"Ġ",
"3",
"5",
",",
"Ġ",
"3",
"4",
",",
"Ġ",
"4",
",",
"Ġ",
"6",
",",
"Ġ",
"9",
"]",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6... | [
1,
2,
4,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
1,
1,
6,
10,
1,
6,
8,
14,
16,
... |
aaa0ac5e31e2c10b5baba6077e952fff1a92ef82 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 22 18:05:44 2018
@author: Administrator
"""
from sklearn.model_selection import cross_val_score, train_test_split
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import StratifiedKFold
from sklearn.m... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
6880,
563,
19731,
15229,
244,
55,
55,
244,
54,
61,
63,
53,
58,
63,
57,
57,
244,
55,
53,
54,
61,
222,
222,
69,
2133,
63,
34255,
222,
3012,
222,
222,
1097,
14415,
51,
1184... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Created",
"Ġon",
"ĠWed",
"ĠAug",
"Ġ",
"2",
"2",
"Ġ",
"1",
"8",
":",
"0",
"5",
":",
"4",
"4",
"Ġ",
"2",
"0",
"1",
"8",
"Ċ",
"Ċ",
"@",
"author",
":",
"ĠAdministrator",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
8,
11,
15,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
1,
1,
2,
8,
9,
23,
1,
4,
1,
1,
5,
13,
14,
19,
20,
29,
36,
42,
43,
46,
47,
52,
53,... |
ad3c5ed3d6a9aa83e69f53d3fec845e8e2b1c9c6 | import pandas as pd
import numpy as np
import sys
def avg(x):
return [sum(x[i]) / row for i in range(col)]
def sd(x):
return [np.std(x[i]) for i in range(col)]
def cov(x, md_x):
cov_xy = [[0 for r in range(col)] for c in range(col)]
for i in range(col):
for j in range(col):
for... | [
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
485,
5263,
499,
222,
610,
14694,
45,
125,
731,
303,
461,
447,
1055,
45,
125,
96,
110,
1156,
536,
2720,
456,
613,
347,
2189,
45,
770,
2201,
499,
222,
610,
16726,
45,
125,
731,
... | [
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġsys",
"ĊĊ",
"Ċ",
"def",
"Ġavg",
"(",
"x",
"):",
"ĊĠĠĠ",
"Ġreturn",
"Ġ[",
"sum",
"(",
"x",
"[",
"i",
"])",
"Ġ/",
"Ġrow",
"Ġfor",
"Ġi",
"Ġin",
"Ġrange",
"(",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
1... | [
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
7,
11,
1,
1,
4,
8,
9,
10,
12,
4,
11,
13,
16,
17,
18,
19,
20,
22,
24,
28,
32,
34,
37,
43,
44,
47,
49,
1,
1,
4,
7,
8,
9,
11,
4,
11,
13,
15,
16,
19,
20,
21,
22,
23,
25,
... |
d267c8cbe51fb1bacc9404a1385f1daa4a0db7f2 | import pandas as pd
import numpy as np
import math
from sklearn.datasets import load_digits, load_iris, load_boston, load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.metrics import pairwise_distances
class KMeans:
def __init__(self, k=5, max_iters=100, random_seed=42):
... | [
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
485,
7820,
222,
1097,
14415,
51,
15461,
1220,
2480,
100,
18099,
49,
2480,
100,
29573,
49,
2480,
100,
103,
21277,
49,
2480,
100,
4032,
652,
100,
104,
10006,
222,
1097,
14415,
51,
... | [
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġmath",
"Ċ",
"from",
"Ġsklearn",
".",
"datasets",
"Ġimport",
"Ġload",
"_",
"digits",
",",
"Ġload",
"_",
"iris",
",",
"Ġload",
"_",
"b",
"oston",
",",
"Ġload",
"_"... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9... | [
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
7,
12,
1,
5,
13,
14,
22,
29,
34,
35,
41,
42,
47,
48,
52,
53,
58,
59,
60,
65,
66,
71,
72,
75,
78,
79,
80,
85,
1,
5,
13,
14,
19,
20,
29,
36,
42,
43,
47,
48,
53,
1,
5,
13,
... |
9189c1dd21b0858df3138bcf4fc7568b378e6271 | import os
import unittest
from mock import Mock
from tfsnippet.utils import *
class HumanizeDurationTestCase(unittest.TestCase):
cases = [
(0.0, "0 sec"),
(1e-8, "1e-08 sec"),
(0.1, "0.1 sec"),
(1.0, "1 sec"),
(1, "1 sec"),
(1.1, "1.1 secs"),
(59, "59 secs... | [
485,
2355,
222,
485,
15790,
222,
222,
1097,
4408,
1220,
7509,
222,
222,
1097,
292,
2569,
115,
10322,
51,
2324,
1220,
338,
499,
222,
842,
26968,
537,
6203,
7246,
45,
18959,
51,
7246,
731,
303,
6819,
299,
447,
310,
327,
53,
51,
53,
... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġunittest",
"Ċ",
"Ċ",
"from",
"Ġmock",
"Ġimport",
"ĠMock",
"Ċ",
"Ċ",
"from",
"Ġt",
"fs",
"n",
"ippet",
".",
"utils",
"Ġimport",
"Ġ*",
"ĊĊ",
"Ċ",
"class",
"ĠHuman",
"ize",
"Duration",
"TestCase",
"(",
"unittest",
".",
"T... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,... | [
1,
7,
10,
1,
7,
16,
1,
1,
5,
10,
17,
22,
1,
1,
5,
7,
9,
10,
15,
16,
21,
28,
30,
1,
1,
6,
12,
15,
23,
31,
32,
40,
41,
49,
51,
4,
10,
12,
14,
8,
10,
11,
12,
13,
14,
16,
17,
21,
24,
8,
10,
11,
12,
13,
14,
15,
... |
feed412278d9e711e49ef209ece0876c1de4a873 | # -*- coding: UTF-8 -*-
# File name: ukWorkingDays
# Created by JKChang
# 29/07/2020, 11:20
# Tag:
# Description:
from datetime import date, timedelta, datetime
from workalendar.europe import UnitedKingdom
cal = UnitedKingdom()
print(cal.holidays(2020))
def workingDate(start, end):
cal = UnitedKingdom()
res... | [
40,
8571,
10633,
63,
9360,
50,
61,
8571,
222,
40,
2050,
655,
63,
13847,
17817,
11964,
222,
40,
6956,
829,
990,
80,
846,
761,
222,
40,
244,
55,
62,
52,
53,
60,
52,
55,
53,
55,
53,
49,
244,
54,
54,
63,
55,
53,
222,
40,
9147,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"ĠUTF",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠFile",
"Ġname",
":",
"Ġuk",
"Working",
"Days",
"Ċ",
"#",
"ĠCreated",
"Ġby",
"ĠJ",
"K",
"Ch",
"ang",
"Ċ",
"#",
"Ġ",
"2",
"9",
"/",
"0",
"7",
"/",
"2",
"0",
"2",
"0",
",",
"Ġ"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
7,
12,
13,
16,
23,
27,
1,
2,
10,
13,
15,
16,
18,
21,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
1,
2,
6,
7,
1,
2,
14,
15,
1,
1,
5,
14,
... |
ccee0e3c47fd3809e0670be24aaa6fd0a9bad3bc | # -*- coding: utf-8 -*-
class Library(object):
def __init__(self, backend):
self._backend = backend
@property
def cache(self):
return self._backend.cache
def cache_key(self, key):
return self._backend.cache_key(key)
def get_url(self, track):
raise NotImplementedE... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
499,
222,
842,
13395,
45,
1491,
731,
303,
684,
1176,
1683,
3232,
803,
49,
9187,
731,
310,
649,
1132,
7887,
299,
9187,
465,
496,
2449,
303,
684,
3337,
45,
803,
731,
310,
461,
649,
1132,
7887... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"ĊĊ",
"Ċ",
"class",
"ĠLibrary",
"(",
"object",
"):",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġbackend",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"._",
"backend",
"Ġ=",
"Ġbackend",
"ĊĊĠĠĠ",
"Ġ@",
"pro... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
13,
13,
13... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
6,
14,
15,
21,
23,
4,
8,
11,
15,
18,
22,
23,
31,
33,
8,
13,
15,
22,
24,
32,
4,
6,
14,
4,
8,
14,
15,
19,
21,
8,
15,
20,
22,
29,
30,
35,
4,
8,
14,
15,
18,
19,
23,
24,
28... |
f799fdfde537bbe8f6c49a5e1a15cf6f910a0d45 | #!/usr/bin/python3
"""Unittest for max_integer([..])"""
import unittest
max_integer = __import__("6-max_integer").max_integer
class TestMaxInteger(unittest.TestCase):
"""Interactive tests"""
def test_max(self):
"""Tests max_integer"""
self.assertEqual(max_integer([1, 2, 3]), 3)
self... | [
8758,
3392,
52,
1793,
52,
2980,
56,
222,
3012,
3024,
881,
456,
1788,
100,
5831,
2034,
516,
1156,
3012,
222,
222,
485,
15790,
222,
222,
1472,
100,
5831,
299,
1176,
485,
46661,
59,
50,
1472,
100,
5831,
1912,
1472,
100,
5831,
499,
222,... | [
"#!/",
"usr",
"/",
"bin",
"/",
"python",
"3",
"Ċ",
"\"\"\"",
"Unit",
"test",
"Ġfor",
"Ġmax",
"_",
"integer",
"([",
"..",
"])",
"\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġunittest",
"Ċ",
"Ċ",
"max",
"_",
"integer",
"Ġ=",
"Ġ__",
"import",
"__(\"",
"6",
"-",
"ma... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
12,
12,
12,
12,... | [
1,
4,
7,
8,
11,
12,
18,
19,
1,
4,
8,
12,
16,
20,
21,
28,
30,
32,
34,
37,
1,
1,
7,
16,
1,
1,
4,
5,
12,
14,
17,
23,
27,
28,
29,
32,
33,
40,
43,
46,
47,
54,
1,
1,
6,
11,
14,
21,
22,
30,
31,
39,
41,
4,
8,
19,
... |
edd70f55e76418911d304d6eb41a6d2a93005a58 | from api import url, key, opposite
import requests
import json
import time
import os
from miner import mine
from cpu import *
class Player:
def __init__(self):
data = self._get_status()
time.sleep(data["cooldown"])
self.name = data["name"]
self.cooldown = data["cooldown"]
s... | [
1097,
4142,
1220,
2001,
49,
1221,
49,
30560,
222,
485,
5188,
222,
485,
2379,
222,
485,
1153,
222,
485,
2355,
222,
1097,
43006,
1220,
29089,
222,
1097,
10901,
1220,
338,
499,
222,
842,
9306,
63,
303,
684,
1176,
1683,
3232,
803,
731,
... | [
"from",
"Ġapi",
"Ġimport",
"Ġurl",
",",
"Ġkey",
",",
"Ġopposite",
"Ċ",
"import",
"Ġrequests",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġtime",
"Ċ",
"import",
"Ġos",
"Ċ",
"from",
"Ġminer",
"Ġimport",
"Ġmine",
"Ċ",
"from",
"Ġcpu",
"Ġimport",
"Ġ*",
"ĊĊ",
"Ċ"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
13,
13,
13,
13,
13,
13,
... | [
1,
5,
9,
16,
20,
21,
25,
26,
35,
1,
7,
16,
1,
7,
12,
1,
7,
12,
1,
7,
10,
1,
5,
11,
18,
23,
1,
5,
9,
16,
18,
1,
1,
6,
13,
14,
4,
8,
11,
15,
18,
22,
24,
8,
13,
15,
20,
22,
25,
26,
32,
34,
8,
13,
14,
19,
20,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.