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 |
|---|---|---|---|---|---|
de3a4053b5b0d4d2d5c2dcd317e64cf9b4faeb75 | from urllib.parse import quote
from top_model import db
from top_model.ext.flask import FlaskTopModel
from top_model.filesystem import ProductPhotoCIP
from top_model.webstore import Product, Labo
from unrest import UnRest
class Hydra(FlaskTopModel):
def __init__(self, *args, **kwargs):
super().__init__(*... | [
1097,
22296,
51,
2228,
1220,
15379,
222,
222,
1097,
2687,
100,
1184,
1220,
3100,
222,
1097,
2687,
100,
1184,
51,
426,
51,
28216,
1220,
24033,
3169,
1262,
222,
1097,
2687,
100,
1184,
51,
18280,
1220,
7697,
12101,
25969,
222,
1097,
2687,
... | [
"from",
"Ġurllib",
".",
"parse",
"Ġimport",
"Ġquote",
"Ċ",
"Ċ",
"from",
"Ġtop",
"_",
"model",
"Ġimport",
"Ġdb",
"Ċ",
"from",
"Ġtop",
"_",
"model",
".",
"ext",
".",
"flask",
"Ġimport",
"ĠFlask",
"Top",
"Model",
"Ċ",
"from",
"Ġtop",
"_",
"model",
".",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
... | [
1,
5,
12,
13,
18,
25,
31,
1,
1,
5,
9,
10,
15,
22,
25,
1,
5,
9,
10,
15,
16,
19,
20,
25,
32,
38,
41,
46,
1,
5,
9,
10,
15,
16,
26,
33,
41,
46,
49,
1,
5,
9,
10,
15,
16,
19,
24,
31,
39,
40,
44,
45,
1,
5,
8,
12,
... |
5b91b7025b0e574d45f95a0585128018d83c17ea | something1
x = session.query(x).filter(y).count()
something2
y = (
session.query(
models.User,
models.X,
)
.filter(
models.User.time > start_time,
models.User.id == user_id,
)
.count()
)
def something3():
x = (
session.query(
models.Review,
... | [
20265,
54,
222,
125,
299,
3541,
51,
1234,
45,
125,
566,
2049,
45,
126,
566,
1016,
365,
222,
20265,
55,
222,
126,
299,
327,
303,
3541,
51,
1234,
45,
310,
4590,
51,
1259,
49,
310,
4590,
51,
93,
49,
303,
848,
303,
657,
2049,
45,
... | [
"something",
"1",
"Ċ",
"x",
"Ġ=",
"Ġsession",
".",
"query",
"(",
"x",
").",
"filter",
"(",
"y",
").",
"count",
"()",
"Ċ",
"something",
"2",
"Ċ",
"y",
"Ġ=",
"Ġ(",
"ĊĠĠĠ",
"Ġsession",
".",
"query",
"(",
"ĊĠĠĠĠĠĠĠ",
"Ġmodels",
".",
"User",
",",
"ĊĠĠĠĠ... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11... | [
1,
10,
11,
1,
2,
4,
12,
13,
18,
19,
20,
22,
28,
29,
30,
32,
37,
39,
1,
10,
11,
1,
2,
4,
6,
4,
12,
13,
18,
19,
8,
15,
16,
20,
21,
8,
15,
16,
17,
18,
4,
6,
4,
6,
12,
13,
8,
15,
16,
20,
21,
25,
27,
33,
34,
38,... |
fe12f6d3408ab115c5c440c5b45a9014cfee6539 | from django.urls import path, include
from . import views
urlpatterns = [
path("", views.home, name="home"),
path("category/", include("api.category.urls")),
path("product/", include("api.product.urls")),
path("user/", include("api.user.urls")),
path("order/", include("api.order.urls")),
path("... | [
1097,
8532,
51,
11420,
1220,
1536,
49,
2323,
222,
1097,
657,
1220,
11887,
222,
222,
983,
15735,
299,
447,
303,
1536,
13963,
11887,
51,
2849,
49,
655,
366,
2849,
2132,
303,
1536,
459,
3168,
10974,
2323,
459,
1256,
51,
3168,
51,
11420,
... | [
"from",
"Ġdjango",
".",
"urls",
"Ġimport",
"Ġpath",
",",
"Ġinclude",
"Ċ",
"from",
"Ġ.",
"Ġimport",
"Ġviews",
"Ċ",
"Ċ",
"url",
"patterns",
"Ġ=",
"Ġ[",
"ĊĠĠĠ",
"Ġpath",
"(\"\",",
"Ġviews",
".",
"home",
",",
"Ġname",
"=\"",
"home",
"\"),",
"ĊĠĠĠ",
"Ġpath",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
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,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
12,
13,
17,
24,
29,
30,
38,
1,
5,
7,
14,
20,
1,
1,
4,
12,
14,
16,
4,
9,
13,
19,
20,
24,
25,
30,
32,
36,
39,
4,
9,
11,
19,
22,
30,
32,
35,
36,
44,
45,
49,
53,
4,
9,
11,
18,
21,
29,
31,
34,
35,
42,
43,
... |
bb7910af5334641fd2db7146112afaff7a2e42b9 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import uuid
import cgi
import squareconnect
from squareconnect.rest import ApiException
from squareconnect.apis.transactions_api import TransactionsApi
from squareconnect.apis.locations_api import LocationsApi
from squareconnect.apis.customers... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
10633,
63,
6471,
50,
61,
222,
1097,
1176,
9689,
523,
1220,
1489,
100,
1144,
222,
485,
11168,
222,
485,
300,
5140,
222,
222,
485,
14708,
3532,
222,
1097,
14708,
3532,
51,
4756,
1220,
245... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ċ",
"from",
"Ġ__",
"future",
"__",
"Ġimport",
"Ġprint",
"_",
"function",
"Ċ",
"import",
"Ġuuid",
"Ċ",
"import",
"Ġc",
"gi",
"Ċ",
"Ċ",
"import",
"Ġsquare",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
6,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
9,
10,
14,
15,
16,
1,
5,
8,
14,
16,
23,
29,
30,
38,
1,
7,
12,
1,
7,
9,
11,
1,
1,
7,
14,
21,
1,
5,
12,
19,
20,
24,
31,
44,
1,
5,
12,
19,
20,
24,
25,
37,
38,
41,
48,
61,
64... |
ea1d62c4a8c406dde9bb138ee045be5e682fdbfe | class Wspak:
"""Iterator zwracający wartości w odwróconym porządku"""
def __init__(self, data):
self.data = data
self.index = -2
self.i = len(data) - 1
def __iter__(self):
return self
def __next__(self):
if self.index >= self.i:
raise StopIteration
... | [
842,
643,
438,
793,
63,
303,
1547,
5740,
1308,
7024,
348,
39420,
2499,
18535,
471,
16187,
360,
13585,
7024,
2122,
487,
2225,
7673,
23369,
4532,
122,
3012,
465,
684,
1176,
1683,
3232,
803,
49,
727,
731,
310,
649,
51,
624,
299,
727,
3... | [
"class",
"ĠW",
"sp",
"ak",
":",
"ĊĠĠĠ",
"Ġ\"\"\"",
"Iterator",
"Ġz",
"wr",
"ac",
"ajÄħ",
"cy",
"Ġwar",
"to",
"ÅĽci",
"Ġw",
"Ġod",
"wr",
"ó",
"con",
"ym",
"Ġpor",
"zÄħ",
"dk",
"u",
"\"\"\"",
"ĊĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġdat... | [
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,
4,
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,
9,
9... | [
1,
6,
8,
10,
12,
13,
4,
8,
16,
18,
20,
22,
25,
27,
31,
33,
36,
38,
41,
43,
44,
47,
49,
53,
55,
57,
58,
61,
4,
8,
11,
15,
18,
22,
23,
28,
30,
8,
13,
14,
18,
20,
25,
8,
13,
14,
19,
21,
23,
24,
8,
13,
14,
15,
17... |
ec64ddd01034debadb6674e71125f673f5de8367 | from redis3barScore import StudyThreeBarsScore
from redisUtil import RedisTimeFrame
def test_score1() -> None:
package = {
"close": 13.92,
"high": 14.57,
"low": 12.45,
"open": 13.4584,
"symbol": "FANG",
"timestamp": 1627493640000000000,
"trade_count": 602,
... | [
1097,
13246,
56,
1652,
7066,
1220,
37121,
17828,
33539,
7066,
222,
1097,
13246,
1747,
1220,
15906,
1061,
2163,
499,
222,
610,
913,
100,
5142,
54,
365,
984,
1686,
63,
303,
2670,
299,
320,
310,
332,
2698,
582,
244,
54,
56,
51,
62,
55,... | [
"from",
"Ġredis",
"3",
"bar",
"Score",
"Ġimport",
"ĠStudy",
"Three",
"Bars",
"Score",
"Ċ",
"from",
"Ġredis",
"Util",
"Ġimport",
"ĠRedis",
"Time",
"Frame",
"ĊĊ",
"Ċ",
"def",
"Ġtest",
"_",
"score",
"1",
"()",
"Ġ->",
"ĠNone",
":",
"ĊĠĠĠ",
"Ġpackage",
"Ġ=",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
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,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
5,
11,
12,
15,
20,
27,
33,
38,
42,
47,
1,
5,
11,
15,
22,
28,
32,
37,
1,
1,
4,
9,
10,
15,
16,
18,
21,
26,
27,
4,
12,
14,
16,
8,
10,
15,
17,
18,
19,
20,
21,
22,
23,
24,
8,
10,
14,
16,
17,
18,
19,
20,
21,
22,... |
235bb1b9d4c41c12d7667a6bac48737464c685c7 | from colorama import init, Fore, Style
import tempConv
# ============================================================================#
# TEMP CONVERSION PROGRAM: #
# ============================================================================#
# ----------------------... | [
1097,
1989,
4497,
1220,
3238,
49,
16829,
49,
11643,
222,
485,
1798,
10924,
222,
222,
40,
43242,
40,
222,
40,
7704,
24857,
2214,
4539,
4174,
15684,
63,
11357,
607,
222,
40,
43242,
40,
222,
222,
40,
32095,
499,
222,
610,
5279,
45,
125... | [
"from",
"Ġcolor",
"ama",
"Ġimport",
"Ġinit",
",",
"ĠFore",
",",
"ĠStyle",
"Ċ",
"import",
"Ġtemp",
"Conv",
"Ċ",
"Ċ",
"#",
"Ġ============================================================================",
"#",
"Ċ",
"#",
"ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ",
"ĠTEMP",
"ĠCON",
"VERSION",... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
7,
8,
8,
8,
10,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
... | [
1,
5,
11,
14,
21,
26,
27,
32,
33,
39,
1,
7,
12,
16,
1,
1,
2,
79,
80,
1,
2,
24,
29,
33,
40,
44,
48,
49,
77,
79,
1,
2,
79,
80,
1,
1,
2,
80,
1,
1,
4,
9,
10,
11,
13,
4,
8,
9,
13,
15,
20,
23,
32,
36,
45,
48,
5... |
d9f586bbb72021ee0b37ff8660e26b50d7e6a2d3 | from django.http import HttpResponse
from django.shortcuts import render
def index(request):
return render(request, "ALR1.html")
def search(request):
return render(request, "ALR2.html")
def home(request):
return render(request, "ALR3.html")
def pdf(request):
pdfId = request.GET["id"]
# pdf_d... | [
1097,
8532,
51,
544,
1220,
17857,
222,
1097,
8532,
51,
36264,
1220,
2922,
499,
222,
610,
1671,
45,
1375,
731,
303,
461,
2922,
45,
1375,
49,
332,
744,
87,
54,
51,
935,
678,
499,
222,
610,
3252,
45,
1375,
731,
303,
461,
2922,
45,
... | [
"from",
"Ġdjango",
".",
"http",
"Ġimport",
"ĠHttpResponse",
"Ċ",
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
"ĊĊ",
"Ċ",
"def",
"Ġindex",
"(",
"request",
"):",
"ĊĠĠĠ",
"Ġreturn",
"Ġrender",
"(",
"request",
",",
"Ġ\"",
"AL",
"R",
"1",
".",
"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
12,
13,
13,
13,
13,
13,... | [
1,
5,
12,
13,
17,
24,
37,
1,
5,
12,
13,
22,
29,
36,
1,
1,
4,
10,
11,
18,
20,
4,
11,
18,
19,
26,
27,
29,
31,
32,
33,
34,
38,
40,
1,
1,
4,
11,
12,
19,
21,
4,
11,
18,
19,
26,
27,
29,
31,
32,
33,
34,
38,
40,
1,
... |
3d737d0ee9c3af1f8ebe4c6998ad30fa34f42856 | from django.shortcuts import render
from ..login.models import *
def user(request):
context = {"users": User.objects.all(), "user_level": User.objects.get(id=request.session["user_id"])}
return render(request, "dashboard/user.html", context)
def admin(request):
context = {"users": User.objects.all(), "u... | [
1097,
8532,
51,
36264,
1220,
2922,
222,
1097,
4390,
3632,
51,
3404,
1220,
338,
499,
222,
610,
1275,
45,
1375,
731,
303,
1637,
299,
3479,
3724,
582,
2694,
51,
5754,
51,
483,
1046,
332,
514,
100,
2675,
582,
2694,
51,
5754,
51,
390,
... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
"Ċ",
"from",
"Ġ..",
"login",
".",
"models",
"Ġimport",
"Ġ*",
"ĊĊ",
"Ċ",
"def",
"Ġuser",
"(",
"request",
"):",
"ĊĠĠĠ",
"Ġcontext",
"Ġ=",
"Ġ{\"",
"users",
"\":",
"ĠUser",
".",
"objects",
".",
"all"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
4,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
5,
12,
13,
22,
29,
36,
1,
5,
8,
13,
14,
20,
27,
29,
1,
1,
4,
9,
10,
17,
19,
4,
12,
14,
17,
22,
24,
29,
30,
37,
38,
41,
44,
46,
50,
51,
56,
58,
63,
64,
71,
72,
75,
76,
78,
79,
86,
87,
94,
96,
100,
101,
103,
... |
937d01eaa82cbfe07b20fae9320c554a0960d7b1 | import sys
sys.stdin = open("input.txt", "rt")
BLOCK_0 = 1
BLOCK_1 = 2
BLOCK_2 = 3
N = int(input())
X, Y = 10, 10
# x: 행 , y: 열A
GRN = 0
BLU = 1
maps = [[0] * Y for _ in range(X)]
dx = [1, 0]
dy = [0, 1]
def outMaps(x, y):
global X, Y
if 0 <= x < X and 0 <= y < Y:
return False
else:
retur... | [
485,
5263,
222,
222,
3750,
51,
21660,
299,
2177,
459,
1151,
51,
2787,
411,
332,
2069,
678,
222,
10326,
100,
53,
299,
244,
54,
222,
10326,
100,
54,
299,
244,
55,
222,
10326,
100,
55,
299,
244,
56,
222,
83,
299,
648,
45,
1151,
117... | [
"import",
"Ġsys",
"Ċ",
"Ċ",
"sys",
".",
"stdin",
"Ġ=",
"Ġopen",
"(\"",
"input",
".",
"txt",
"\",",
"Ġ\"",
"rt",
"\")",
"Ċ",
"BLOCK",
"_",
"0",
"Ġ=",
"Ġ",
"1",
"Ċ",
"BLOCK",
"_",
"1",
"Ġ=",
"Ġ",
"2",
"Ċ",
"BLOCK",
"_",
"2",
"Ġ=",
"Ġ",
"3",
"... | [
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,
5,
5,
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,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9... | [
1,
7,
11,
1,
1,
4,
5,
10,
12,
17,
19,
24,
25,
28,
30,
32,
34,
36,
1,
6,
7,
8,
10,
11,
12,
1,
6,
7,
8,
10,
11,
12,
1,
6,
7,
8,
10,
11,
12,
1,
2,
4,
8,
9,
14,
17,
1,
2,
3,
5,
7,
8,
9,
10,
11,
12,
13,
14,
... |
ebe546794131eddea396bd6b82fbb41aeead4661 | # -*- coding: utf-8 -*-
"""
This is a simple sample for seuif.py
License: this code is in the public domain
Author: Cheng Maohua
Email: cmh@seu.edu.cn
Last modified: 2016.4.20
"""
from seuif97 import *
import matplotlib.pyplot as plt
import numpy as np
p1, t1 = 16, 535
p2, t2 = 3.56, 315
h1 = pt2h(p1, t1)
s... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
2287,
458,
331,
4313,
4002,
456,
20945,
344,
51,
997,
222,
222,
3801,
63,
477,
1361,
458,
347,
341,
581,
5900,
222,
222,
4372,
63,
280,
1902,
838,
507,
3370,
109,
3546,
222,... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"This",
"Ġis",
"Ġa",
"Ġsimple",
"Ġsample",
"Ġfor",
"Ġseu",
"if",
".",
"py",
"Ċ",
"Ċ",
"License",
":",
"Ġthis",
"Ġcode",
"Ġis",
"Ġin",
"Ġthe",
"Ġpublic",
"Ġdomain",
"Ċ",
"Ċ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
10,
10,
10,
10,
10... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
5,
8,
10,
17,
24,
28,
32,
34,
35,
37,
1,
1,
8,
9,
14,
19,
22,
25,
29,
36,
43,
1,
1,
7,
8,
10,
13,
16,
18,
20,
21,
23,
1,
6,
7,
10,
13,
14,
15,
17,
18,
19,
22,
23,
... |
906265182a9776fec5bad41bfc9ee68b36873d1e | # 예외처리 문법을 활용하여 정수가 아닌 숫자를 입력했을때 에러문구가나오도록 작성.(에러문구:정수가아닙니다)
try:
x = int(input("정수를 입력하세요: "))
print(x)
except:
print("정수가 아닙니다.")
| [
40,
26363,
48987,
12540,
33843,
20744,
25036,
5197,
48408,
7993,
23575,
15390,
11159,
7153,
18610,
2825,
258,
37330,
142,
10764,
5561,
36903,
40269,
5197,
203,
16495,
37585,
19156,
19004,
24040,
7153,
16388,
27164,
37924,
46435,
10702,
5032,
... | [
"#",
"ĠìĺĪ",
"ìϏ",
"ì²",
"ĺ리",
"Ġ문",
"ë²ķ",
"ìĿĦ",
"ĠíĻľ",
"ìļ©",
"íķĺìŬ",
"Ġìłķ",
"ìĪĺ",
"ê°Ģ",
"ĠìķĦ",
"ëĭ",
"Į",
"ĠìĪ",
"«",
"ìŀIJ",
"를",
"Ġìŀħëł¥",
"íĸĪ",
"ìĿĦ",
"ë",
"ķĮ",
"ĠìĹIJ",
"룬",
"문",
"구",
"ê°Ģ",
"ëĤĺ",
"ìĺ¤",
"ëıĦë¡Ŀ",
"Ġìŀ... | [
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,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4... | [
1,
2,
4,
5,
5,
7,
9,
10,
11,
13,
14,
16,
18,
19,
20,
22,
22,
23,
24,
25,
26,
27,
30,
31,
32,
32,
33,
35,
36,
37,
38,
39,
40,
41,
43,
46,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
57,
58,
60,
61,
1,
1,
4,
5,
4,
... |
aa4d872c6a529d8acf18f1c3b477bc1816ac2887 | adict = {"name": "bob", "age": 23}
print("bob" in adict)
print("name" in adict)
for key in adict:
print("%s:%s" % (key, adict[key]))
print("%(name)s:%(age)s" % adict)
| [
358,
3607,
299,
3479,
444,
582,
332,
23259,
411,
332,
400,
582,
244,
55,
56,
130,
222,
1243,
459,
23259,
39,
347,
331,
2734,
46,
222,
1243,
459,
444,
39,
347,
331,
2734,
46,
222,
999,
1221,
347,
331,
2734,
63,
303,
1489,
4923,
1... | [
"ad",
"ict",
"Ġ=",
"Ġ{\"",
"name",
"\":",
"Ġ\"",
"bob",
"\",",
"Ġ\"",
"age",
"\":",
"Ġ",
"2",
"3",
"}",
"Ċ",
"print",
"(\"",
"bob",
"\"",
"Ġin",
"Ġa",
"dict",
")",
"Ċ",
"print",
"(\"",
"name",
"\"",
"Ġin",
"Ġa",
"dict",
")",
"Ċ",
"for",
"Ġkey",... | [
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,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6... | [
1,
3,
6,
8,
11,
15,
17,
19,
22,
24,
26,
29,
31,
32,
33,
34,
35,
1,
6,
8,
11,
12,
15,
17,
21,
22,
1,
6,
8,
12,
13,
16,
18,
22,
23,
1,
4,
8,
11,
13,
17,
18,
4,
10,
13,
14,
16,
17,
18,
20,
22,
25,
26,
28,
32,
... |
ebc050544da69837cc2b8977f347380b94474bab | import os
import numpy as np
from keras.models import Sequential, Model
from keras.layers import Dense, Dropout, Flatten, concatenate
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D, Activation
from keras.layers.normalization import BatchNormalization
from keras.optimizers import SGD
from keras.... | [
485,
2355,
499,
222,
485,
6610,
641,
2115,
222,
1097,
21144,
51,
3404,
1220,
37704,
49,
3707,
222,
1097,
21144,
51,
8367,
1220,
31558,
49,
14204,
560,
49,
23030,
2495,
49,
48644,
222,
1097,
21144,
51,
8367,
1220,
22288,
55,
73,
49,
... | [
"import",
"Ġos",
"ĊĊ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġkeras",
".",
"models",
"Ġimport",
"ĠSequential",
",",
"ĠModel",
"Ċ",
"from",
"Ġkeras",
".",
"layers",
"Ġimport",
"ĠDense",
",",
"ĠDrop",
"out",
",",
"ĠFlat",
"ten",
",",
"Ġconca... | [
1,
1,
1,
3,
4,
4,
4,
4,
4,
5,
5,
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,
7,
7,
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... | [
1,
7,
10,
1,
1,
7,
13,
16,
19,
1,
5,
11,
12,
18,
25,
36,
37,
43,
1,
5,
11,
12,
18,
25,
31,
32,
37,
40,
41,
46,
49,
50,
62,
1,
5,
11,
12,
18,
25,
30,
31,
32,
33,
37,
44,
45,
46,
47,
54,
61,
68,
69,
70,
71,
82,... |
ed2f3bbc7eb0a4d8f5ccdb7a12e00cbddab04dd0 | _method_adaptors = dict()
def register_dist_adaptor(method_name):
def decorator(func):
_method_adaptors[method_name] = func
def wrapper(*args, **kwargs):
func(*args, **kwargs)
return wrapper
return decorator
def get_nearest_method(method_name, parser):
"""
all ... | [
100,
1978,
100,
19638,
1758,
299,
5473,
365,
499,
222,
610,
3923,
100,
2481,
100,
19638,
290,
45,
1978,
100,
444,
731,
303,
684,
26643,
45,
1316,
731,
310,
634,
1978,
100,
19638,
1758,
96,
1978,
100,
444,
98,
299,
3439,
603,
684,
... | [
"_",
"method",
"_",
"adapt",
"ors",
"Ġ=",
"Ġdict",
"()",
"ĊĊ",
"Ċ",
"def",
"Ġregister",
"_",
"dist",
"_",
"adapt",
"or",
"(",
"method",
"_",
"name",
"):",
"ĊĠĠĠ",
"Ġdef",
"Ġdecorator",
"(",
"func",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġ_",
"method",
"_",
"adapt",
"ors... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
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,
6,
6,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
11,
11,
11,
13,... | [
1,
2,
8,
9,
14,
17,
19,
24,
26,
1,
1,
4,
13,
14,
18,
19,
24,
26,
27,
33,
34,
38,
40,
4,
8,
18,
19,
23,
25,
8,
10,
16,
17,
22,
25,
26,
32,
33,
37,
38,
40,
45,
8,
12,
20,
22,
26,
27,
30,
36,
38,
12,
17,
19,
23,... |
837534ebc953dae966154921709398ab2b2e0b33 | # © MNELAB developers
#
# License: BSD (3-clause)
from .dependencies import have
from .syntax import PythonHighlighter
from .utils import count_locations, image_path, interface_style, natural_sort
| [
40,
14416,
507,
13375,
1336,
15470,
222,
40,
222,
40,
1196,
63,
11898,
327,
56,
50,
15161,
46,
222,
222,
1097,
657,
10954,
1220,
1178,
222,
1097,
657,
8147,
1220,
5006,
13352,
284,
222,
1097,
657,
2324,
1220,
2409,
100,
13498,
49,
1... | [
"#",
"Ġ©",
"ĠM",
"NEL",
"AB",
"Ġdevelopers",
"Ċ",
"#",
"Ċ",
"#",
"ĠLicense",
":",
"ĠBSD",
"Ġ(",
"3",
"-",
"clause",
")",
"Ċ",
"Ċ",
"from",
"Ġ.",
"dependencies",
"Ġimport",
"Ġhave",
"Ċ",
"from",
"Ġ.",
"syntax",
"Ġimport",
"ĠPython",
"Highlight",
"er",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
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,
7,
7,
7,
7,
7
] | [
1,
2,
4,
6,
9,
11,
22,
1,
2,
1,
2,
10,
11,
15,
17,
18,
19,
25,
26,
1,
1,
5,
7,
19,
26,
31,
1,
5,
7,
13,
20,
27,
36,
38,
1,
5,
7,
12,
19,
25,
26,
35,
36,
42,
43,
47,
48,
58,
59,
64,
65,
73,
74,
78
] |
ce26ad27b7729164e27c845e2803a670b506bad8 | # -*- coding: utf-8 -*-
import scrapy
class QuoteesxtractorSpider(scrapy.Spider):
name = "quoteEsxtractor"
allowed_domains = ["quotes.toscrape.com"]
start_urls = ["http://quotes.toscrape.com/"]
def parse(self, response):
for quote in response.css(".quote"):
# print(quote.getall())... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
485,
33057,
126,
499,
222,
842,
43524,
326,
125,
48147,
45084,
45,
37903,
126,
51,
45084,
731,
303,
655,
299,
332,
7360,
17583,
125,
48147,
39,
303,
6671,
100,
20840,
299,
3059,
25041,
5... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"import",
"Ġscrap",
"y",
"ĊĊ",
"Ċ",
"class",
"ĠQuote",
"es",
"x",
"tractor",
"Spider",
"(",
"scrap",
"y",
".",
"Spider",
"):",
"ĊĠĠĠ",
"Ġname",
"Ġ=",
"Ġ\"",
"quote",
"Es",
"x",
"tractor",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
4,
5,
5,
5,
5,
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,
7,
7,
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,
7,
13,
14,
1,
1,
6,
12,
14,
15,
22,
28,
29,
34,
35,
36,
42,
44,
4,
9,
11,
13,
18,
20,
21,
28,
29,
4,
12,
13,
20,
22,
25,
31,
32,
34,
40,
41,
44,
46,
4,
10,
11,
15,
17,
20,
... |
09788cf04ab5190a33b43e3756f4dbd7d78977a5 | # Copyright 2019-2020 the ProGraML authors.
#
# Contact Chris Cummins <chrisc.101@gmail.com>.
#
# 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... | [
40,
2657,
244,
55,
53,
54,
62,
50,
55,
53,
55,
53,
341,
1330,
76,
1709,
1696,
14656,
51,
222,
40,
222,
40,
12140,
39636,
409,
397,
40288,
350,
9924,
13219,
51,
54,
53,
54,
69,
7265,
51,
527,
4513,
222,
40,
222,
40,
4773,
1549,... | [
"#",
"ĠCopyright",
"Ġ",
"2",
"0",
"1",
"9",
"-",
"2",
"0",
"2",
"0",
"Ġthe",
"ĠPro",
"G",
"ra",
"ML",
"Ġauthors",
".",
"Ċ",
"#",
"Ċ",
"#",
"ĠContact",
"ĠChris",
"ĠC",
"um",
"mins",
"Ġ<",
"chr",
"isc",
".",
"1",
"0",
"1",
"@",
"gmail",
".",
... | [
1,
1,
1,
1,
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,
3,
3,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6... | [
1,
2,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
26,
30,
31,
33,
35,
43,
44,
1,
2,
1,
2,
10,
16,
18,
20,
24,
26,
29,
32,
33,
34,
35,
36,
37,
42,
43,
46,
48,
1,
2,
1,
2,
11,
17,
21,
28,
36,
37,
45,
46,
47,
48... |
be1bfa3e366d715d32613284924cf79abde06d41 | # -*- coding: utf-8 -*-
"""
-----------------------------------------
IDEA Name : PyCharm
Project Name : HelloWorld
-----------------------------------------
File Name : task_worker
Description :
Author : Edwin
Date : 2018/1/4 23:38
-----------------------------------------
Chang... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
1125,
8298,
353,
47468,
3286,
283,
518,
244,
4374,
2674,
114,
353,
5426,
3286,
518,
244,
12009,
6719,
222,
1125,
8298,
353,
2050,
3286,
283,
518,
244,
2918,
100,
9893,
353,
56... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"--------------------------------",
"---------",
"ĊĠ",
"ĠIDEA",
"ĠName",
"ĠĠĠ",
"Ġ:",
"Ġ",
"ĠPy",
"Char",
"m",
"ĊĠ",
"ĠProject",
"ĠName",
"Ġ:",
"Ġ",
"ĠHello",
"World",
"Ċ",
"-------... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
33,
42,
2,
7,
12,
15,
17,
18,
21,
25,
26,
2,
10,
15,
17,
18,
24,
29,
1,
33,
42,
2,
7,
12,
15,
17,
18,
23,
24,
30,
2,
14,
15,
17,
2,
9,
15,
17,
18,
21,
24,
2,
7,
15,... |
63d9a0fa0d0747762e65f6f1e85e53090035454c | from mongoengine import Document, StringField, BooleanField, ListField, Q
import exceptions
class Category(Document):
id = StringField(primary_key=True)
name = StringField()
is_base_expenses = BooleanField(default=False)
aliases = ListField(StringField())
@classmethod
def get_category_by_tex... | [
1097,
21430,
3502,
1220,
6222,
49,
910,
1195,
49,
5080,
1195,
49,
1701,
1195,
49,
1931,
222,
222,
485,
14739,
499,
222,
842,
9954,
45,
3112,
731,
303,
828,
299,
910,
1195,
45,
4472,
100,
697,
66,
1844,
46,
303,
655,
299,
910,
1195... | [
"from",
"Ġmongo",
"engine",
"Ġimport",
"ĠDocument",
",",
"ĠString",
"Field",
",",
"ĠBoolean",
"Field",
",",
"ĠList",
"Field",
",",
"ĠQ",
"Ċ",
"Ċ",
"import",
"Ġexceptions",
"ĊĊ",
"Ċ",
"class",
"ĠCategory",
"(",
"Document",
"):",
"ĊĠĠĠ",
"Ġid",
"Ġ=",
"ĠStrin... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
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,
9,
9,
9,
10,
10,
... | [
1,
5,
11,
17,
24,
33,
34,
41,
46,
47,
55,
60,
61,
66,
71,
72,
74,
1,
1,
7,
18,
1,
1,
6,
15,
16,
24,
26,
4,
7,
9,
16,
21,
22,
29,
30,
33,
34,
38,
39,
4,
9,
11,
18,
23,
25,
4,
7,
8,
12,
13,
16,
21,
23,
31,
36... |
7163be250ae3a22931de037cb6896c2e6d5f00a8 | """
Encontrar el valor mas alto el mas rapido, el mas lento
para eso son los algoritmos de optimizacion
Para eso debemos pensar en una funcion que queramos maximizar o minimizar
Se aplican mas que todo para empresas como despegar, en donde se pueden generar buenas empresas
Empresas a la optimizacion
###################... | [
3012,
222,
795,
14956,
301,
1871,
13567,
19492,
763,
471,
1871,
19492,
25642,
7026,
49,
1871,
19492,
475,
32634,
222,
9725,
2834,
116,
13002,
7019,
763,
46956,
8526,
428,
6630,
35692,
222,
14702,
2834,
116,
23496,
27885,
317,
1249,
301,
... | [
"\"\"\"",
"Ċ",
"En",
"contr",
"ar",
"Ġel",
"Ġvalor",
"Ġmas",
"Ġal",
"to",
"Ġel",
"Ġmas",
"Ġrap",
"ido",
",",
"Ġel",
"Ġmas",
"Ġl",
"ento",
"Ċ",
"para",
"Ġes",
"o",
"Ġson",
"Ġlos",
"Ġal",
"gorit",
"mos",
"Ġde",
"Ġoptim",
"izacion",
"Ċ",
"Para",
"Ġes",
... | [
1,
1,
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,
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... | [
1,
4,
1,
3,
8,
10,
13,
19,
23,
26,
28,
31,
35,
39,
42,
43,
46,
50,
52,
56,
1,
5,
8,
9,
13,
17,
20,
25,
28,
31,
37,
44,
1,
5,
8,
9,
13,
17,
19,
22,
24,
27,
31,
39,
43,
48,
52,
58,
62,
64,
70,
74,
1,
3,
9,
11... |
b5275fc068526063fd8baf13210052971b05503f | from matasano import *
ec = EC_M(233970423115425145524320034830162017933, 534, 1, 4, order=233970423115425145498902418297807005944)
assert ec.scale(4, ec.order) == 0
aPriv = randint(1, ec.order - 1)
aPub = ec.scale(4, aPriv)
print("Factoring...")
twist_ord = 2 * ec.prime + 2 - ec.order
factors = []
x = twist_ord
for... | [
1097,
2525,
321,
7234,
1220,
338,
222,
222,
754,
299,
13493,
100,
82,
45,
55,
56,
56,
62,
60,
53,
57,
55,
56,
54,
54,
58,
57,
55,
58,
54,
57,
58,
58,
55,
57,
56,
55,
53,
53,
56,
57,
61,
56,
53,
54,
59,
55,
53,
54,
60,
... | [
"from",
"Ġmat",
"as",
"ano",
"Ġimport",
"Ġ*",
"Ċ",
"Ċ",
"ec",
"Ġ=",
"ĠEC",
"_",
"M",
"(",
"2",
"3",
"3",
"9",
"7",
"0",
"4",
"2",
"3",
"1",
"1",
"5",
"4",
"2",
"5",
"1",
"4",
"5",
"5",
"2",
"4",
"3",
"2",
"0",
"0",
"3",
"4",
"8",
"3... | [
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,
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,
3,
3,
3,
3,
3,
3,
3... | [
1,
5,
9,
11,
14,
21,
23,
1,
1,
3,
5,
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,
49,
50,
5... |
dee1ab3adb7f627680410c774be44ae196f63f6c | #!/usr/bin/env python3
import base64
from apiclient import errors
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
import mimetypes
def Get_Attachments(service, userId, msg_id, store_dir):
"""Get and stor... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
56,
222,
222,
485,
1712,
59,
57,
222,
1097,
1863,
314,
844,
1220,
3896,
222,
485,
2355,
222,
1097,
4111,
51,
14633,
51,
17947,
1220,
23357,
8335,
2530,
521,
222,
1097,
4111,
51,
14633,
51,
897,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"3",
"Ċ",
"Ċ",
"import",
"Ġbase",
"6",
"4",
"Ċ",
"from",
"Ġap",
"ic",
"lient",
"Ġimport",
"Ġerrors",
"Ċ",
"import",
"Ġos",
"Ċ",
"from",
"Ġemail",
".",
"mime",
".",
"multipart",
"Ġimport",
"ĠMI",
"MEM",... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
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,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
23,
1,
1,
7,
12,
13,
14,
1,
5,
8,
10,
15,
22,
29,
1,
7,
10,
1,
5,
11,
12,
16,
17,
26,
33,
36,
39,
44,
47,
1,
5,
11,
12,
16,
17,
21,
28,
33,
37,
1,
5,
11,
12,
16,
17,
21,
28,
33,
... |
c4b9fdba9e9eeccc52999dab9232302f159c882a | # Created by MechAviv
# [Maestra Fiametta] | [9390220]
# Commerci Republic : San Commerci
if sm.hasItem(4310100, 1):
sm.setSpeakerID(9390220)
sm.sendSayOkay("You can't start your voyage until you finish the tutorial quest!")
else:
sm.setSpeakerID(9390220)
sm.sendNext(
"What? You threw away the... | [
40,
6956,
829,
3130,
399,
4713,
407,
222,
40,
447,
18313,
464,
1709,
525,
110,
37413,
1371,
98,
244,
542,
244,
447,
62,
56,
62,
53,
55,
55,
53,
98,
222,
40,
2780,
2322,
1891,
47583,
518,
21108,
2780,
2322,
1891,
222,
344,
3459,
... | [
"#",
"ĠCreated",
"Ġby",
"ĠMe",
"ch",
"Av",
"iv",
"Ċ",
"#",
"Ġ[",
"Ma",
"est",
"ra",
"ĠF",
"i",
"amet",
"ta",
"]",
"Ġ",
"Ġ|",
"Ġ",
"Ġ[",
"9",
"3",
"9",
"0",
"2",
"2",
"0",
"]",
"Ċ",
"#",
"ĠCom",
"mer",
"ci",
"ĠRepublic",
"Ġ:",
"ĠSan",
"ĠCom"... | [
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,
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,
5,
5,
5,
5... | [
1,
2,
10,
13,
16,
18,
20,
22,
1,
2,
4,
6,
9,
11,
13,
14,
18,
20,
21,
22,
24,
25,
27,
28,
29,
30,
31,
32,
33,
34,
35,
1,
2,
6,
9,
11,
20,
22,
26,
30,
33,
35,
1,
3,
6,
7,
10,
14,
15,
16,
17,
18,
19,
20,
21,
2... |
5a103a4f72b9cd3ea3911aeefeeb2194c8ad7df0 | # coding: utf-8
import mmh3
from bitarray import bitarray
BIT_SIZE = 1 << 30
class BloomFilter:
def __init__(self):
# Initialize bloom filter, set size and all bits to 0
bit_array = bitarray(BIT_SIZE)
bit_array.setall(0)
self.bit_array = bit_array
def add(self, val):
... | [
40,
10633,
63,
6471,
50,
61,
222,
485,
12213,
109,
56,
222,
1097,
3510,
977,
1220,
3510,
977,
222,
222,
5676,
100,
3382,
299,
244,
54,
1281,
244,
56,
53,
499,
222,
842,
570,
18452,
2365,
63,
303,
684,
1176,
1683,
3232,
803,
731,
... | [
"#",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ċ",
"import",
"Ġmm",
"h",
"3",
"Ċ",
"from",
"Ġbit",
"array",
"Ġimport",
"Ġbit",
"array",
"Ċ",
"Ċ",
"BIT",
"_",
"SIZE",
"Ġ=",
"Ġ",
"1",
"Ġ<<",
"Ġ",
"3",
"0",
"ĊĊ",
"Ċ",
"class",
"ĠB",
"loom",
"Filter",
":"... | [
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,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
1... | [
1,
2,
9,
10,
14,
15,
16,
1,
7,
10,
11,
12,
1,
5,
9,
14,
21,
25,
30,
1,
1,
4,
5,
9,
11,
12,
13,
16,
17,
18,
19,
1,
1,
6,
8,
12,
18,
19,
4,
8,
11,
15,
18,
22,
24,
8,
10,
21,
23,
27,
34,
35,
39,
44,
48,
52,
... |
59d04ebd9a45c6a179a2da1f88f728ba2af91c05 | from django.contrib import admin
from pharma_models.personas.models import Persona
admin.site.register(Persona)
| [
1097,
8532,
51,
12060,
1220,
5611,
222,
222,
1097,
2697,
26218,
100,
3404,
51,
6427,
321,
51,
3404,
1220,
11057,
102,
499,
222,
2317,
51,
2870,
51,
3334,
45,
6016,
102,
46,
222
] | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"Ċ",
"from",
"Ġph",
"arma",
"_",
"models",
".",
"person",
"as",
".",
"models",
"Ġimport",
"ĠPerson",
"a",
"ĊĊ",
"Ċ",
"admin",
".",
"site",
".",
"register",
"(",
"Person",
"a",
")",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6
] | [
1,
5,
12,
13,
20,
27,
33,
1,
1,
5,
8,
12,
13,
19,
20,
26,
28,
29,
35,
42,
49,
50,
1,
1,
6,
7,
11,
12,
20,
21,
27,
28,
29
] |
ed5653455062cb3468c232cf0fa3f1d18793626a | from python_logging.Demo_CustomLogger import CustomLogger
CustomLogger.init_log()
# CustomLogger.info()
log_str = "%s/%s/%s\n" % ("demo1", "demo2", "demo3")
CustomLogger.info("[main]", log_str)
| [
1097,
4406,
100,
7506,
51,
11576,
100,
3414,
3716,
1220,
6041,
3716,
222,
222,
3414,
3716,
51,
1683,
100,
769,
365,
222,
40,
6041,
3716,
51,
1357,
365,
222,
769,
100,
484,
299,
5471,
120,
9731,
120,
9731,
120,
97,
115,
39,
925,
29... | [
"from",
"Ġpython",
"_",
"logging",
".",
"Demo",
"_",
"Custom",
"Logger",
"Ġimport",
"ĠCustom",
"Logger",
"Ċ",
"Ċ",
"Custom",
"Logger",
".",
"init",
"_",
"log",
"()",
"Ċ",
"#",
"ĠCustom",
"Logger",
".",
"info",
"()",
"Ċ",
"log",
"_",
"str",
"Ġ=",
"Ġ\"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
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,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
5,
12,
13,
20,
21,
25,
26,
32,
38,
45,
52,
58,
1,
1,
7,
13,
14,
18,
19,
22,
24,
1,
2,
9,
15,
16,
20,
22,
1,
4,
5,
8,
10,
13,
14,
16,
17,
19,
20,
21,
22,
23,
25,
28,
32,
33,
35,
37,
41,
42,
44,
46,
50,
51,
... |
a9f3d5f11a9f2781571029b54d54b41d9f1f83b3 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
from app.models import *
# Register your models here.
class ProfileInline(admin.StackedInline):
model = UserProfile
can_delete = False
verbose_name_plural = "prof... | [
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
8532,
51,
12060,
51,
2408,
51,
2317,
1220,
2694,
4208,
641,
3787,
1259,
4208,
222,
1097,
8532,
51,
12060,
51,
2408,
51,
3404,
1220,
2694,
222,
222,
1097,
1142,
51,
3404,
1220,
338,
222,
... | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
".",
"auth",
".",
"admin",
"Ġimport",
"ĠUser",
"Admin",
"Ġas",
"ĠBase",
"User",
"Admin",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
".",
"auth",
".",
"models",
"... | [
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,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
1... | [
1,
5,
12,
13,
20,
27,
33,
1,
5,
12,
13,
20,
21,
25,
26,
31,
38,
43,
48,
51,
56,
60,
65,
1,
5,
12,
13,
20,
21,
25,
26,
32,
39,
44,
1,
1,
5,
9,
10,
16,
23,
25,
1,
1,
2,
11,
16,
23,
28,
29,
1,
1,
6,
14,
20,
21... |
a9b2a4d4924dcdd6e146ea346e71bf42c0259846 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Greger Update Agent (GUA) module for the Greger Client Module
"""
__author__ = "Eric Sandbling"
__license__ = "MIT"
__status__ = "Development"
# System modules
import os, sys
import shutil
import logging
import subprocess
from threading import Event
from threading im... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
3012,
222,
76,
287,
892,
4013,
14222,
327,
76,
10312,
46,
2313,
456,
341,
590,
287,
892,
5680,
7716,
222,
3012,
222,
222,
523,
2133,
523... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"\"\"\"",
"Ċ",
"G",
"re",
"ger",
"ĠUpdate",
"ĠAgent",
"Ġ(",
"G",
"UA",
")",
"Ġmodule",
"Ġfor",
"Ġthe",
"ĠG",
"re",
"ger",
"ĠCli... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
4,
1,
2,
4,
7,
14,
20,
22,
23,
25,
26,
33,
37,
41,
43,
45,
48,
55,
62,
1,
4,
1,
1,
3,
9,
11,
13,
15,
16,
19,
24,
29,
30,
1,
3,
10,
12,
14... |
9bd659bb3bf812e48710f625bb65a848d3a8d074 | # THIS BUILD WORKS, BUT IS VERY SLOW. CURRENTLY YIELDS A DECENT SCORE, NOT GREAT
alphabet = "abcdefghijklmnopqrstuvwxyz"
def author():
return ""
def student_id():
return ""
def fill_words(pattern, words, scoring_f, minlen, maxlen):
foundWords = find_words(pattern, words, scoring_f, minlen, maxlen)
... | [
40,
8968,
23268,
19474,
88,
49,
7744,
2771,
694,
12166,
377,
5889,
51,
21819,
7715,
1432,
78,
25888,
418,
24302,
1456,
377,
11833,
49,
2387,
590,
632,
741,
222,
222,
33219,
299,
332,
39198,
42623,
48486,
41418,
11482,
39,
499,
222,
61... | [
"#",
"ĠTHIS",
"ĠBUILD",
"ĠWORK",
"S",
",",
"ĠBUT",
"ĠIS",
"ĠV",
"ERY",
"ĠS",
"LOW",
".",
"ĠCURRENT",
"LY",
"ĠY",
"I",
"ELDS",
"ĠA",
"ĠDEC",
"ENT",
"ĠS",
"CORE",
",",
"ĠNOT",
"ĠG",
"RE",
"AT",
"Ċ",
"Ċ",
"alphabet",
"Ġ=",
"Ġ\"",
"abcdefgh",
"ijkl",
... | [
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,
3,
3,
3,
5,
6,
6,
6,
6,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
11,
11,
11,
13,
14,
14,
... | [
1,
2,
7,
13,
18,
19,
20,
24,
27,
29,
32,
34,
37,
38,
46,
48,
50,
51,
55,
57,
61,
64,
66,
70,
71,
75,
77,
79,
81,
1,
1,
9,
11,
13,
21,
25,
33,
36,
39,
40,
1,
1,
4,
11,
14,
4,
11,
14,
1,
1,
4,
12,
13,
15,
18,
... |
3212bb7df990ad7d075b8ca49a99e1072eab2a90 | from typing import Type
from sqlalchemy.exc import IntegrityError
from src.main.interface import RouteInterface as Route
from src.presenters.helpers import HttpRequest, HttpResponse
from src.presenters.errors import HttpErrors
def flask_adapter(request: any, api_route: Type[Route]) -> any:
"""Adapter pattern for ... | [
1097,
12018,
1220,
2782,
222,
1097,
30936,
51,
14819,
1220,
14292,
562,
943,
222,
1097,
1581,
51,
1850,
51,
3352,
1220,
7144,
3058,
641,
7144,
222,
1097,
1581,
51,
2735,
502,
51,
8789,
1220,
26279,
49,
17857,
222,
1097,
1581,
51,
2735... | [
"from",
"Ġtyping",
"Ġimport",
"ĠType",
"Ċ",
"from",
"Ġsqlalchemy",
".",
"exc",
"Ġimport",
"ĠIntegr",
"ity",
"Error",
"Ċ",
"from",
"Ġsrc",
".",
"main",
".",
"interface",
"Ġimport",
"ĠRoute",
"Interface",
"Ġas",
"ĠRoute",
"Ċ",
"from",
"Ġsrc",
".",
"present",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
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,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
12,
19,
24,
1,
5,
16,
17,
20,
27,
34,
37,
42,
1,
5,
9,
10,
14,
15,
24,
31,
37,
46,
49,
55,
1,
5,
9,
10,
17,
20,
21,
28,
35,
47,
48,
61,
1,
5,
9,
10,
17,
20,
21,
27,
34,
39,
45,
1,
1,
4,
10,
11,
18,
19... |
3a65565af4c55fa5479e323a737c48f7f2fdb8ce | """
python open() 函数用于打开一个文件,创建一个 file 对象,相关的方法才可以调用它进行读写。
更多文件操作可参考:Python 文件I/O。
函数语法
open(name[, mode[, buffering]])
参数说明:
name : 一个包含了你要访问的文件名称的字符串值。
mode : mode 决定了打开文件的模式:只读,写入,追加等。所有可取值见如下的完全列表。这个参数是非强制的,默认文件访问模式为只读(r)。
buffering : 如果 buffering 的值被设为 0,就不会有寄存。如果 buffering 的值取 1,访问文件时会寄存行。如果将 buffering 的值设为大于 1 的... | [
3012,
222,
2980,
2177,
365,
48460,
15144,
24978,
4597,
6162,
1140,
44880,
822,
42230,
1140,
19797,
30798,
19608,
5674,
12541,
10478,
9966,
13033,
9996,
1469,
222,
30825,
6162,
10734,
3449,
24571,
3111,
8378,
24554,
78,
52,
84,
1469,
222,
... | [
"\"\"\"",
"Ċ",
"python",
"Ġopen",
"()",
"Ġåĩ½æķ°",
"ç͍äºİ",
"æīĵå¼Ģ",
"ä¸Ģ个",
"æĸĩä»¶",
"ï¼Į",
"åĪĽå»ºä¸Ģ个",
"Ġfile",
"Ġ对象",
"ï¼Į",
"缸åħ³",
"çļĦæĸ¹æ³ķ",
"æīį",
"åı¯ä»¥",
"è°ĥç͍",
"å®ĥ",
"è¿Ľè¡Į",
"读",
"åĨĻ",
"ãĢĤ",
"Ċ",
"æĽ´å¤ļ",
"æĸĩä»¶",
"æĵįä½... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
4,
1,
7,
12,
14,
17,
19,
21,
23,
25,
26,
30,
35,
38,
39,
41,
44,
45,
47,
49,
50,
52,
53,
54,
55,
1,
3,
5,
7,
8,
10,
11,
17,
20,
21,
22,
23,
24,
1,
3,
5,
1,
5,
6,
10,
12,
17,
19,
26,
29,
32,
1,
3,
5,
6,
... |
c0348fc5f51e6f7a191fea6d0e3cb84c60b03e22 | """
Условие
Дано два числа a и b. Выведите гипотенузу треугольника с заданными катетами.
"""
import math
a = int(input())
b = int(input())
print(math.sqrt(a * a + b * b))
| [
3012,
222,
26564,
37907,
4295,
37419,
222,
18446,
4905,
1059,
42732,
1147,
11048,
10995,
21118,
331,
4672,
342,
51,
16787,
21480,
8242,
19257,
14627,
31218,
7948,
3533,
2574,
5624,
2574,
43062,
1101,
2574,
8983,
10735,
13230,
10149,
3620,
3... | [
"\"\"\"",
"Ċ",
"У",
"Ñģл",
"ов",
"ие",
"Ċ",
"ÐĶ",
"ан",
"о",
"Ġдв",
"а",
"ĠÑĩ",
"иÑģ",
"ла",
"Ġa",
"Ġи",
"Ġb",
".",
"ĠÐĴ",
"Ñĭв",
"ед",
"иÑĤе",
"Ġг",
"ип",
"оÑĤ",
"ен",
"Ñĥ",
"з",
"Ñĥ",
"ĠÑĤÑĢ",
"е",
"Ñĥ",
"г",
"олÑĮ... | [
1,
1,
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
5,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9... | [
1,
4,
1,
2,
4,
6,
8,
1,
2,
4,
5,
8,
9,
11,
13,
15,
17,
19,
21,
22,
24,
26,
28,
31,
33,
35,
37,
39,
40,
41,
42,
45,
46,
47,
48,
51,
53,
55,
57,
61,
63,
65,
67,
69,
71,
73,
76,
77,
1,
4,
1,
1,
7,
12,
1,
1,
... |
8ac84aa29e9e4f3b85f1b3c27819feb5f41e8d8e | import os
import factorStatFileCreator
dirName = "NoPerms/"
dirName2 = "AllPerms/"
freqAgentDic = dict()
lenAgentDic = dict()
contAgentDic = dict()
def freqModAvgFunc(dirName):
fullList = factorStatFileCreator.directoryFreq(dirName)
UA = dirName.split("/")[1]
avgList = []
sum = 0
i = 0
while... | [
485,
2355,
222,
485,
10384,
5952,
991,
11147,
222,
222,
1537,
577,
299,
332,
2042,
1852,
893,
5694,
222,
1537,
577,
55,
299,
332,
1947,
1852,
893,
5694,
222,
222,
11111,
6150,
31653,
299,
5473,
365,
222,
1688,
6150,
31653,
299,
5473,
... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġfactor",
"Stat",
"File",
"Creator",
"Ċ",
"Ċ",
"dir",
"Name",
"Ġ=",
"Ġ\"",
"No",
"Per",
"ms",
"/\"",
"Ċ",
"dir",
"Name",
"2",
"Ġ=",
"Ġ\"",
"All",
"Per",
"ms",
"/\"",
"Ċ",
"Ċ",
"freq",
"Agent",
"Dic",
"Ġ=",
"Ġdict",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
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,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
1... | [
1,
7,
10,
1,
7,
14,
18,
22,
29,
1,
1,
4,
8,
10,
12,
14,
17,
19,
21,
1,
4,
8,
9,
11,
13,
16,
19,
21,
23,
1,
1,
5,
10,
13,
15,
20,
22,
1,
4,
9,
12,
14,
19,
21,
1,
5,
10,
13,
15,
20,
22,
1,
1,
4,
9,
12,
15,
... |
f733885eed5d1cbf6e49db0997655ad627c9d795 | from django import template
register = template.Library()
@register.filter(name="range")
def filter_range(start, end=None):
if end is None:
return range(start)
else:
return range(start, end)
| [
1097,
8532,
1220,
3098,
222,
222,
3334,
299,
3098,
51,
5887,
365,
499,
222,
69,
3334,
51,
2049,
45,
444,
366,
3623,
678,
222,
610,
2785,
100,
3623,
45,
1384,
49,
962,
66,
2545,
731,
303,
434,
962,
458,
1686,
63,
310,
461,
2189,
... | [
"from",
"Ġdjango",
"Ġimport",
"Ġtemplate",
"Ċ",
"Ċ",
"register",
"Ġ=",
"Ġtemplate",
".",
"Library",
"()",
"ĊĊ",
"Ċ",
"@",
"register",
".",
"filter",
"(",
"name",
"=\"",
"range",
"\")",
"Ċ",
"def",
"Ġfilter",
"_",
"range",
"(",
"start",
",",
"Ġend",
"="... | [
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
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,
9,
9,
9,
9,
9,
9,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11
] | [
1,
5,
12,
19,
28,
1,
1,
9,
11,
20,
21,
28,
30,
1,
1,
2,
10,
11,
17,
18,
22,
24,
29,
31,
1,
4,
11,
12,
17,
18,
23,
24,
28,
29,
33,
35,
4,
7,
11,
14,
19,
20,
8,
15,
21,
22,
27,
28,
4,
9,
10,
8,
15,
21,
22,
27... |
1a0d4e77f09b4ce752631ae36a83ff57f96b89b1 | from rlbot.agents.base_agent import BaseAgent, GameTickPacket, SimpleControllerState
# from rlbot.utils.structures.game_data_struct import GameTickPacket
from Decisions.challengeGame import ChallengeGame
from Decisions.info import MyInfo, Car
from Decisions.strat import Strategy
from Drawing.Drawing import DrawingTool... | [
1097,
27800,
2213,
51,
22707,
51,
1460,
100,
4881,
1220,
3787,
6150,
49,
6067,
10397,
6839,
49,
7169,
1934,
1095,
222,
222,
40,
664,
27800,
2213,
51,
2324,
51,
25125,
51,
3642,
100,
624,
100,
1185,
1220,
6067,
10397,
6839,
222,
1097,
... | [
"from",
"Ġrl",
"bot",
".",
"agents",
".",
"base",
"_",
"agent",
"Ġimport",
"ĠBase",
"Agent",
",",
"ĠGame",
"Tick",
"Packet",
",",
"ĠSimple",
"Controller",
"State",
"Ċ",
"Ċ",
"#",
"Ġfrom",
"Ġrl",
"bot",
".",
"utils",
".",
"structures",
".",
"game",
"_",... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6... | [
1,
5,
8,
11,
12,
18,
19,
23,
24,
29,
36,
41,
46,
47,
52,
56,
62,
63,
70,
80,
85,
1,
1,
2,
7,
10,
13,
14,
19,
20,
30,
31,
35,
36,
40,
41,
47,
54,
59,
63,
69,
1,
5,
9,
15,
16,
25,
29,
36,
46,
50,
1,
5,
9,
15,
... |
4a0eca90de3ce7fb0ab6decb0ec6aadb32c1a9fa | # Given two binary trees, write a function to check if they are equal or not.
#
# Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
#
# Return 0 / 1 ( 0 for false, 1 for true ) for this problem
#
# Example :
#
# Input :
#
# 1 1
# / \ / \
# 2 3 ... | [
40,
15328,
3161,
5314,
23531,
49,
2886,
331,
686,
391,
1524,
434,
2974,
904,
5058,
575,
666,
51,
222,
40,
222,
40,
16529,
5314,
23531,
904,
11901,
5058,
434,
2974,
904,
1689,
324,
1266,
21090,
480,
341,
5193,
1178,
341,
2454,
804,
5... | [
"#",
"ĠGiven",
"Ġtwo",
"Ġbinary",
"Ġtrees",
",",
"Ġwrite",
"Ġa",
"Ġfunction",
"Ġto",
"Ġcheck",
"Ġif",
"Ġthey",
"Ġare",
"Ġequal",
"Ġor",
"Ġnot",
".",
"Ċ",
"#",
"Ċ",
"#",
"ĠTwo",
"Ġbinary",
"Ġtrees",
"Ġare",
"Ġconsidered",
"Ġequal",
"Ġif",
"Ġthey",
"Ġare",
... | [
1,
1,
1,
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,
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... | [
1,
2,
8,
12,
19,
25,
26,
32,
34,
43,
46,
52,
55,
60,
64,
70,
73,
77,
78,
1,
2,
1,
2,
6,
13,
19,
23,
34,
40,
43,
48,
52,
59,
61,
65,
75,
79,
83,
89,
94,
98,
103,
109,
110,
1,
2,
1,
2,
9,
10,
11,
13,
14,
15,
17... |
0c1de2c1eb5a4de7aeb14ad6b27aa61e07bc4c51 | from django.urls import path
from .views import (
TreeCreateView,
TreeListView,
TreeUpdateView,
)
app_name = "trees"
urlpatterns = [
path("list/", TreeListView.as_view(), name="list"),
path("create/", TreeCreateView.as_view(), name="create"),
path("<int:pk>/update/", TreeCreateView.as_view(),... | [
1097,
8532,
51,
11420,
1220,
1536,
222,
1097,
657,
4361,
1220,
327,
303,
9393,
1940,
1089,
49,
303,
9393,
13458,
49,
303,
9393,
2346,
1089,
49,
222,
46,
499,
222,
745,
100,
444,
299,
332,
21615,
39,
222,
222,
983,
15735,
299,
447,
... | [
"from",
"Ġdjango",
".",
"urls",
"Ġimport",
"Ġpath",
"Ċ",
"from",
"Ġ.",
"views",
"Ġimport",
"Ġ(",
"ĊĠĠĠ",
"ĠTree",
"Create",
"View",
",",
"ĊĠĠĠ",
"ĠTree",
"ListView",
",",
"ĊĠĠĠ",
"ĠTree",
"Update",
"View",
",",
"Ċ",
")",
"ĊĊ",
"Ċ",
"app",
"_",
"name",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
... | [
1,
5,
12,
13,
17,
24,
29,
1,
5,
7,
12,
19,
21,
4,
9,
15,
19,
20,
4,
9,
17,
18,
4,
9,
15,
19,
20,
1,
2,
1,
1,
4,
5,
9,
11,
13,
18,
19,
1,
1,
4,
12,
14,
16,
4,
9,
11,
15,
18,
23,
31,
32,
34,
35,
39,
42,
47,... |
42d03aabef7d75c813f30bb6d8a835d76fd1fc83 | start = 0
last = 100
middle = 50
counter = 1
print(" Guess a number between 0 and 100")
condition = int(
input("Is your guess " + str(middle) + "? (0 means it's too low, 1 means it's your guess and 2 means it's too high) ")
)
while condition != 1:
counter += 1
if condition == 0:
last = middle
... | [
1384,
299,
244,
53,
222,
2153,
299,
244,
54,
53,
53,
222,
10519,
299,
244,
58,
53,
222,
4696,
299,
244,
54,
222,
222,
1243,
459,
8098,
522,
331,
1470,
3761,
244,
53,
480,
244,
54,
53,
53,
678,
222,
4759,
299,
648,
45,
303,
153... | [
"start",
"Ġ=",
"Ġ",
"0",
"Ċ",
"last",
"Ġ=",
"Ġ",
"1",
"0",
"0",
"Ċ",
"middle",
"Ġ=",
"Ġ",
"5",
"0",
"Ċ",
"counter",
"Ġ=",
"Ġ",
"1",
"Ċ",
"Ċ",
"print",
"(\"",
"ĠGu",
"ess",
"Ġa",
"Ġnumber",
"Ġbetween",
"Ġ",
"0",
"Ġand",
"Ġ",
"1",
"0",
"0",
"... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
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,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
6,
8,
9,
10,
1,
5,
7,
8,
9,
10,
11,
1,
7,
9,
10,
11,
12,
1,
8,
10,
11,
12,
1,
1,
6,
8,
11,
14,
16,
23,
31,
32,
33,
37,
38,
39,
40,
41,
43,
1,
10,
12,
16,
17,
4,
10,
12,
14,
19,
25,
27,
29,
33,
34,
40,
... |
97d4387c7bfd141b5a7019b221adb550105d4351 | import datetime
import logging
import os
from functools import lru_cache
from authlib.jose import JsonWebKey, jwt
from flask import g, request, jsonify
from lorem_ipsum.model import User, AppContext
import lorem_ipsum
from lorem_ipsum.model import Permission, BlacklistToken
LOGGER = logging.getLogger("lorem-ipsum")
... | [
485,
7181,
222,
485,
5751,
222,
485,
2355,
222,
1097,
35383,
1220,
475,
2965,
100,
2630,
222,
1097,
3813,
1379,
51,
111,
2500,
1220,
5890,
2609,
971,
49,
19831,
222,
222,
1097,
18958,
1220,
504,
49,
1343,
49,
35206,
222,
1097,
39560,
... | [
"import",
"Ġdatetime",
"Ċ",
"import",
"Ġlogging",
"Ċ",
"import",
"Ġos",
"Ċ",
"from",
"Ġfunctools",
"Ġimport",
"Ġl",
"ru",
"_",
"cache",
"Ċ",
"from",
"Ġauth",
"lib",
".",
"j",
"ose",
"Ġimport",
"ĠJson",
"Web",
"Key",
",",
"Ġjwt",
"Ċ",
"Ċ",
"from",
"Ġfla... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,... | [
1,
7,
16,
1,
7,
15,
1,
7,
10,
1,
5,
15,
22,
24,
26,
27,
32,
1,
5,
10,
13,
14,
15,
18,
25,
30,
33,
36,
37,
41,
1,
1,
5,
11,
18,
20,
21,
29,
30,
38,
1,
5,
11,
12,
14,
17,
18,
23,
30,
35,
36,
40,
47,
1,
7,
13,... |
be1ef0aa3868985bf198781ee827bd447588df15 | """
This module provides functions to make WCSAxes work in SunPy.
"""
import matplotlib.pyplot as plt
from packaging.version import Version
import astropy.units as u
from astropy import __version__ as astropy_version
from astropy.visualization import wcsaxes
from sunpy.coordinates import HeliographicCarrington, Heli... | [
3012,
222,
2287,
2313,
7388,
4465,
391,
1949,
30433,
3569,
125,
326,
1409,
347,
21437,
5019,
51,
222,
3012,
222,
222,
485,
13168,
51,
18553,
641,
6020,
222,
1097,
36413,
51,
1687,
1220,
3050,
222,
222,
485,
10042,
10461,
51,
9760,
641... | [
"\"\"\"",
"Ċ",
"This",
"Ġmodule",
"Ġprovides",
"Ġfunctions",
"Ġto",
"Ġmake",
"ĠWC",
"SA",
"x",
"es",
"Ġwork",
"Ġin",
"ĠSun",
"Py",
".",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"from",
"Ġpackaging",
".",
"versi... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
4,
1,
5,
12,
21,
31,
34,
39,
42,
44,
45,
47,
52,
55,
59,
61,
62,
1,
4,
1,
1,
7,
18,
19,
25,
28,
32,
1,
5,
15,
16,
23,
30,
38,
1,
1,
7,
11,
15,
16,
21,
24,
26,
1,
5,
9,
13,
20,
23,
30,
32,
35,
39,
43,
44,... |
af9b83b6e213359f5e193918b6c09c22220e5457 | # crfで英文に固有表現認識(タグ付け)をする
# usr/bin/python3
# coding:utf-8
from itertools import chain
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.preprocessing import LabelBinarizer
import sklearn
import pycrfsuite
from sklearn import cross_validation
import sys
import os
import math
import random... | [
40,
300,
4939,
4552,
23996,
3820,
3885,
32062,
3052,
4461,
24382,
23555,
15800,
270,
5200,
11067,
10842,
16146,
17104,
5114,
3366,
6236,
222,
222,
40,
33923,
52,
1793,
52,
2980,
56,
222,
40,
10633,
63,
3330,
50,
61,
222,
1097,
31660,
... | [
"#",
"Ġc",
"rf",
"ãģ§",
"èĭ±",
"æĸĩ",
"ãģ«",
"åĽº",
"æľī",
"表",
"çı¾",
"èªį",
"èŃ",
"ĺ",
"ï¼Ī",
"ãĤ¿",
"ãĤ°",
"ä»ĺ",
"ãģij",
"ï¼ī",
"ãĤĴ",
"ãģĻãĤĭ",
"Ċ",
"Ċ",
"#",
"Ġusr",
"/",
"bin",
"/",
"python",
"3",
"Ċ",
"#",
"Ġcoding",
":",
"utf",
"-",
... | [
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,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7... | [
1,
2,
4,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
15,
16,
17,
18,
19,
20,
21,
22,
23,
25,
1,
1,
2,
6,
7,
10,
11,
17,
18,
1,
2,
9,
10,
13,
14,
15,
1,
5,
15,
22,
28,
1,
5,
13,
14,
21,
28,
43,
44,
50,
51,
61,
62,
... |
2536b22c2d154e87bdecb72cc967d8c56ddb73fb | import os
from pathlib import Path
import Algorithmia
API_KEY = os.environ.get("ALGO_API_KEY")
DATA_DIR_BASE = os.environ.get("DATA_DIR")
ORIGINAL_DATA_DIR = DATA_DIR_BASE + "original/"
TRANSFERD_DATA_DIR = DATA_DIR_BASE + "transferd/"
def upload(client, fnames):
for im in fnames:
im = Path(im)
... | [
485,
2355,
222,
1097,
30293,
1220,
5404,
222,
222,
485,
24608,
923,
499,
222,
2571,
100,
3319,
299,
2355,
51,
12849,
51,
390,
459,
744,
7001,
100,
2571,
100,
3319,
678,
222,
4629,
100,
3217,
100,
6185,
299,
2355,
51,
12849,
51,
390,... | [
"import",
"Ġos",
"Ċ",
"from",
"Ġpathlib",
"Ġimport",
"ĠPath",
"Ċ",
"Ċ",
"import",
"ĠAlgorithm",
"ia",
"ĊĊ",
"Ċ",
"API",
"_",
"KEY",
"Ġ=",
"Ġos",
".",
"environ",
".",
"get",
"(\"",
"AL",
"GO",
"_",
"API",
"_",
"KEY",
"\")",
"Ċ",
"DATA",
"_",
"DIR",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
6,
7,
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,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
10,
1,
5,
13,
20,
25,
1,
1,
7,
17,
19,
1,
1,
4,
5,
8,
10,
13,
14,
21,
22,
25,
27,
29,
31,
32,
35,
36,
39,
41,
1,
5,
6,
9,
10,
14,
16,
19,
20,
27,
28,
31,
33,
37,
38,
41,
43,
1,
7,
9,
10,
14,
15,
18,
... |
8a631adc8d919fb1dded27177818c4cb30148e94 | # 효율적인 해킹
# https://www.acmicpc.net/problem/1325
from collections import deque
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
graph = [[] for _ in range(n + 1)]
for _ in range(m):
a, b = map(int, input().split())
graph[b].append(a) # B를 해킹하면 A도 해킹할 수 있다
def bfs(start):
visited... | [
40,
3915,
31191,
7947,
139,
36704,
21756,
205,
248,
155,
222,
40,
1698,
574,
1516,
51,
348,
11594,
1982,
51,
1317,
52,
14239,
52,
54,
56,
55,
58,
222,
222,
1097,
13722,
1220,
41848,
222,
485,
5263,
222,
222,
1151,
299,
5263,
51,
2... | [
"#",
"Ġí",
"ļ¨",
"ìľ",
"¨",
"ìłģìĿ¸",
"Ġíķ´",
"í",
"Ĥ",
"¹",
"Ċ",
"#",
"Ġhttps",
"://",
"www",
".",
"ac",
"mic",
"pc",
".",
"net",
"/",
"problem",
"/",
"1",
"3",
"2",
"5",
"Ċ",
"Ċ",
"from",
"Ġcollections",
"Ġimport",
"Ġdeque",
"Ċ",
"import",
"Ġ... | [
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,
3,
4,
4,
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,
10,
11,
... | [
1,
2,
3,
4,
4,
5,
7,
9,
9,
9,
10,
1,
2,
8,
11,
14,
15,
17,
20,
22,
23,
26,
27,
34,
35,
36,
37,
38,
39,
1,
1,
5,
17,
24,
30,
1,
7,
11,
1,
1,
6,
8,
12,
13,
18,
19,
27,
1,
1,
2,
3,
5,
7,
11,
12,
15,
16,
22... |
833923c1928862e13c24904f5614927a683b168f | import os
class Config(object):
"""Base Config Object"""
DEBUG = False
SECRET_KEY = os.environ.get("SECRET_KEY") or "Som3$ec5etK*y"
UPLOAD_FOLDER = "./uploads"
dbconfig = {
"host": os.environ.get("MYSQL_HOST") or "localhost",
"user": os.environ.get("MYSQL_USER") or "root",
"password": o... | [
485,
2355,
499,
222,
842,
3395,
45,
1491,
731,
303,
1547,
1778,
3395,
2210,
3012,
465,
9404,
299,
3208,
303,
5508,
16099,
100,
3319,
299,
2355,
51,
12849,
51,
390,
459,
17231,
100,
3319,
678,
575,
332,
88,
437,
56,
41,
754,
58,
38... | [
"import",
"Ġos",
"ĊĊ",
"Ċ",
"class",
"ĠConfig",
"(",
"object",
"):",
"ĊĠĠĠ",
"Ġ\"\"\"",
"Base",
"ĠConfig",
"ĠObject",
"\"\"\"",
"ĊĊĠĠĠ",
"ĠDEBUG",
"Ġ=",
"ĠFalse",
"ĊĠĠĠ",
"ĠSE",
"CRET",
"_",
"KEY",
"Ġ=",
"Ġos",
".",
"environ",
".",
"get",
"(\"",
"SECRET"... | [
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
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,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12... | [
1,
7,
10,
1,
1,
6,
13,
14,
20,
22,
4,
8,
12,
19,
26,
29,
4,
10,
12,
18,
4,
7,
11,
12,
15,
17,
20,
21,
28,
29,
32,
34,
40,
41,
44,
46,
49,
51,
52,
54,
55,
56,
58,
59,
61,
62,
63,
64,
65,
4,
7,
11,
12,
18,
20,
... |
1748c8dfcc3974b577d7bfacb5cabe4404b696bc | import math
import numpy as np
from statistics import median
from src.filter.median import quickselect_median
def bilateral_median_filter(
flow,
log_occlusen,
auxiliary_field,
image,
weigth_auxiliary,
weigth_filter,
sigma_distance=7,
sigma_color=7 / 200,
filter_size=5,
):
"""
... | [
485,
7820,
222,
485,
6610,
641,
2115,
222,
1097,
14598,
1220,
26822,
222,
1097,
1581,
51,
2049,
51,
24380,
1220,
8289,
1632,
100,
24380,
499,
222,
610,
23440,
20696,
100,
24380,
100,
2049,
45,
303,
7307,
49,
303,
1264,
100,
561,
9032,... | [
"import",
"Ġmath",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġstatistics",
"Ġimport",
"Ġmedian",
"Ċ",
"from",
"Ġsrc",
".",
"filter",
".",
"median",
"Ġimport",
"Ġquick",
"select",
"_",
"median",
"ĊĊ",
"Ċ",
"def",
"Ġbil",
"ateral",
"_",
"median",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
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,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
1... | [
1,
7,
12,
1,
7,
13,
16,
19,
1,
5,
16,
23,
30,
1,
5,
9,
10,
16,
17,
23,
30,
36,
42,
43,
49,
1,
1,
4,
8,
14,
15,
21,
22,
28,
29,
4,
9,
10,
4,
8,
9,
11,
15,
17,
18,
4,
14,
15,
20,
21,
4,
10,
11,
4,
7,
9,
11,... |
55f76ae1ffe0fb2d2ca2c7a20aab45ffb00cf178 | # collectd-vcenter - vcenter.py
#
# Author : Loic Lambiel @ exoscale
# Contributor : Josh VanderLinden
# Description : This is a collectd python module to gather stats from Vmware
# vcenter
import logging
import ssl
import time
from pysphere import VIServer
try:
import collectd
COLLECTD_ENABLE... | [
40,
7922,
105,
50,
123,
2413,
449,
373,
2413,
51,
997,
222,
40,
222,
40,
6265,
518,
4064,
314,
517,
2763,
691,
496,
557,
519,
2778,
222,
40,
42692,
518,
990,
13827,
694,
19184,
81,
36933,
222,
40,
5602,
518,
1369,
458,
331,
7922,
... | [
"#",
"Ġcollect",
"d",
"-",
"v",
"center",
"Ġ-",
"Ġv",
"center",
".",
"py",
"Ċ",
"#",
"Ċ",
"#",
"ĠAuthor",
"Ġ:",
"ĠLo",
"ic",
"ĠL",
"amb",
"iel",
"Ġ@",
"Ġex",
"os",
"cale",
"Ċ",
"#",
"ĠContributor",
"Ġ:",
"ĠJ",
"osh",
"ĠV",
"ander",
"L",
"inden",
... | [
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,
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,
6,
6,
7,
8,
8,
8,
9... | [
1,
2,
10,
11,
12,
13,
19,
21,
23,
29,
30,
32,
1,
2,
1,
2,
9,
11,
14,
16,
18,
21,
24,
26,
29,
31,
35,
1,
2,
14,
16,
18,
21,
23,
28,
29,
34,
1,
2,
14,
16,
21,
24,
26,
34,
35,
42,
49,
52,
59,
65,
70,
73,
77,
1,
... |
a571abd88184c8d8bb05245e9c3ce2e4dabb4c09 | import sys
from collections import deque
t = int(sys.stdin.readline().rstrip())
for _ in range(t):
n, m = map(int, sys.stdin.readline().split())
q = deque(map(int, sys.stdin.readline().split()))
count = 0
while q:
highest = max(q)
doc = q.popleft()
m -= 1
if doc != high... | [
485,
5263,
222,
1097,
13722,
1220,
41848,
222,
222,
121,
299,
648,
45,
3750,
51,
21660,
51,
25658,
941,
38882,
1177,
222,
999,
634,
347,
2189,
45,
121,
731,
303,
329,
49,
364,
299,
2010,
45,
429,
49,
5263,
51,
21660,
51,
25658,
94... | [
"import",
"Ġsys",
"Ċ",
"from",
"Ġcollections",
"Ġimport",
"Ġdeque",
"Ċ",
"Ċ",
"t",
"Ġ=",
"Ġint",
"(",
"sys",
".",
"stdin",
".",
"readline",
"().",
"rstrip",
"())",
"Ċ",
"for",
"Ġ_",
"Ġin",
"Ġrange",
"(",
"t",
"):",
"ĊĠĠĠ",
"Ġn",
",",
"Ġm",
"Ġ=",
"Ġ... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
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,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
7,
11,
1,
5,
17,
24,
30,
1,
1,
2,
4,
8,
9,
12,
13,
18,
19,
27,
30,
36,
39,
1,
4,
6,
9,
15,
16,
17,
19,
4,
6,
7,
9,
11,
15,
16,
19,
20,
24,
25,
30,
31,
39,
42,
47,
50,
4,
6,
8,
14,
15,
18,
19,
22,
23,
2... |
2257494dec9fccc4e8bd4acf0aff31a73c252a61 | h = 160
xorg = 0
yoff = 400
xcount = 0
xvel = 2
def setup():
size(800, 800)
colorMode(HSB, 360, 1, 1, 1)
background(140, 0.49, 0.75)
frameRate(30)
noStroke()
def draw():
global h, xorg, yoff, xcount, xvel
if frameCount % 10 == 0:
fill(140, 0.49, 0.75, 0.2)
square(0, 0, wi... | [
109,
299,
244,
54,
59,
53,
222,
125,
1107,
299,
244,
53,
222,
126,
1739,
299,
244,
57,
53,
53,
222,
125,
1016,
299,
244,
53,
222,
125,
1223,
299,
244,
55,
499,
222,
610,
4721,
2284,
303,
1354,
45,
61,
53,
53,
49,
244,
61,
53... | [
"h",
"Ġ=",
"Ġ",
"1",
"6",
"0",
"Ċ",
"x",
"org",
"Ġ=",
"Ġ",
"0",
"Ċ",
"y",
"off",
"Ġ=",
"Ġ",
"4",
"0",
"0",
"Ċ",
"x",
"count",
"Ġ=",
"Ġ",
"0",
"Ċ",
"x",
"vel",
"Ġ=",
"Ġ",
"2",
"ĊĊ",
"Ċ",
"def",
"Ġsetup",
"():",
"ĊĠĠĠ",
"Ġsize",
"(",
"8",... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
2,
4,
5,
6,
7,
8,
1,
2,
5,
7,
8,
9,
1,
2,
5,
7,
8,
9,
10,
11,
1,
2,
7,
9,
10,
11,
1,
2,
5,
7,
8,
9,
1,
1,
4,
10,
13,
4,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
4,
10,
14,
15,
16,
18,
19,
20,
21,... |
6f99b4e4204e85c78f9c02a5cd53cd76f52c022c | import ujson as json
import platform
import socket
import os
from pathlib import Path
def test_json(text):
jobj = json.loads(text)
l = len(jobj["coordinates"])
x = 0
y = 0
z = 0
for coord in jobj["coordinates"]:
x += coord["x"]
y += coord["y"]
z += coord["z"]
prin... | [
485,
1064,
1279,
641,
2379,
222,
485,
5637,
222,
485,
6241,
222,
485,
2355,
222,
1097,
30293,
1220,
5404,
499,
222,
610,
913,
100,
1279,
45,
897,
731,
303,
614,
2085,
299,
2379,
51,
13428,
45,
897,
46,
303,
475,
299,
2095,
45,
111... | [
"import",
"Ġu",
"json",
"Ġas",
"Ġjson",
"Ċ",
"import",
"Ġplatform",
"Ċ",
"import",
"Ġsocket",
"Ċ",
"import",
"Ġos",
"Ċ",
"from",
"Ġpathlib",
"Ġimport",
"ĠPath",
"ĊĊ",
"Ċ",
"def",
"Ġtest",
"_",
"json",
"(",
"text",
"):",
"ĊĠĠĠ",
"Ġj",
"obj",
"Ġ=",
"Ġjso... | [
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
7,
8,
8,
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,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
1... | [
1,
7,
9,
13,
16,
21,
1,
7,
16,
1,
7,
14,
1,
7,
10,
1,
5,
13,
20,
25,
1,
1,
4,
9,
10,
14,
15,
19,
21,
4,
6,
9,
11,
16,
17,
22,
23,
27,
28,
4,
6,
8,
12,
13,
14,
17,
19,
30,
33,
4,
6,
8,
9,
10,
4,
6,
8,
9,... |
94be205e516c1f1248b6028419c04c927236596e | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmagic.registry import MODELS
def test_colorization_net():
model_cfg = dict(type="ColorizationNet", input_nc=4, output_nc=2, norm_type="batch")
# build model
model = MODELS.build(model_cfg)
# test attributes
assert model.__class_... | [
40,
2657,
327,
104,
46,
3944,
82,
1696,
380,
51,
3381,
4760,
5225,
51,
222,
485,
5665,
222,
222,
1097,
12213,
7494,
51,
8205,
1220,
24863,
4912,
499,
222,
610,
913,
100,
1507,
1668,
100,
1317,
2284,
303,
1573,
100,
4703,
299,
5473,
... | [
"#",
"ĠCopyright",
"Ġ(",
"c",
")",
"ĠOpen",
"M",
"ML",
"ab",
".",
"ĠAll",
"Ġrights",
"Ġreserved",
".",
"Ċ",
"import",
"Ġtorch",
"Ċ",
"Ċ",
"from",
"Ġmm",
"agic",
".",
"registry",
"Ġimport",
"ĠMODE",
"LS",
"ĊĊ",
"Ċ",
"def",
"Ġtest",
"_",
"color",
"izat... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
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,
8,
8,
8... | [
1,
2,
12,
14,
15,
16,
21,
22,
24,
26,
27,
31,
38,
47,
48,
1,
7,
13,
1,
1,
5,
8,
12,
13,
21,
28,
33,
35,
1,
1,
4,
9,
10,
15,
22,
23,
26,
29,
4,
10,
11,
14,
16,
21,
22,
26,
28,
33,
40,
43,
45,
51,
52,
54,
55,
... |
cb3c1adb9d91aecee5b21774d61dfe9400a330fa | from point import Point
from velocity import Velocity
import arcade
import config
PADDLE_WIDTH = 15
PADDLE_HEIGHT = 30
class Paddle:
def __init__(self):
self.center = Point(390, 50)
self.velocity = Velocity(0, 5)
def draw(self):
self.drawing = arcade.draw_rectangle_filled(
... | [
1097,
2282,
1220,
6460,
222,
1097,
15689,
1220,
18479,
7189,
222,
485,
2119,
9017,
222,
485,
1377,
222,
222,
85,
5375,
833,
100,
10582,
299,
244,
54,
58,
222,
85,
5375,
833,
100,
15000,
299,
244,
56,
53,
499,
222,
842,
466,
16228,
... | [
"from",
"Ġpoint",
"Ġimport",
"ĠPoint",
"Ċ",
"from",
"Ġvelocity",
"Ġimport",
"ĠVe",
"locity",
"Ċ",
"import",
"Ġar",
"cade",
"Ċ",
"import",
"Ġconfig",
"Ċ",
"Ċ",
"P",
"ADD",
"LE",
"_",
"WIDTH",
"Ġ=",
"Ġ",
"1",
"5",
"Ċ",
"P",
"ADD",
"LE",
"_",
"HEIGHT",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12... | [
1,
5,
11,
18,
24,
1,
5,
14,
21,
24,
30,
1,
7,
10,
14,
1,
7,
14,
1,
1,
2,
5,
7,
8,
13,
15,
16,
17,
18,
1,
2,
5,
7,
8,
14,
16,
17,
18,
19,
1,
1,
6,
8,
13,
14,
4,
8,
11,
15,
18,
22,
24,
8,
13,
14,
20,
22,
... |
44224985dbfa6234eff406149ce25e1d00b512e9 | class Anagram(object):
def __init__(self, word):
self.word = word
self.canonical = self._canonicalize(word)
def _canonicalize(self, word):
return sorted(word.lower())
def _is_anagram(self, word):
return word != self.word and self._canonicalize(word) == self.canonical
d... | [
842,
2262,
8353,
45,
1491,
731,
303,
684,
1176,
1683,
3232,
803,
49,
3619,
731,
310,
649,
51,
1131,
299,
3619,
310,
649,
51,
21928,
299,
649,
1132,
21928,
537,
45,
1131,
46,
465,
684,
634,
21928,
537,
45,
803,
49,
3619,
731,
310,
... | [
"class",
"ĠAn",
"agram",
"(",
"object",
"):",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġword",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"word",
"Ġ=",
"Ġword",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"canonical",
"Ġ=",
"Ġself",
"._",
"canonical",
"ize",
"(",
"word",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
6,
9,
14,
15,
21,
23,
4,
8,
11,
15,
18,
22,
23,
28,
30,
8,
13,
14,
18,
20,
25,
8,
13,
14,
23,
25,
30,
32,
41,
44,
45,
49,
50,
4,
8,
10,
19,
22,
23,
27,
28,
33,
35,
8,
15,
22,
23,
27,
28,
33,
36,
4,
8,
10,
... |
c2839046592469dfae7526f72be947126960ba19 | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
from projects.models import Project
from django.db import connection
from .utils import namedtuplefetchall
from django.http import JsonResponse
fr... | [
1097,
8532,
51,
36264,
1220,
2922,
222,
1097,
8532,
51,
12060,
51,
2408,
51,
28466,
1220,
6212,
100,
3662,
222,
1097,
8532,
51,
4361,
51,
28466,
51,
14230,
1220,
23033,
100,
346,
30785,
222,
222,
40,
2673,
1390,
11887,
2464,
51,
222,
... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
".",
"auth",
".",
"decorators",
"Ġimport",
"Ġlogin",
"_",
"required",
"Ċ",
"from",
"Ġdjango",
".",
"views",
".",
"decorators",
".",
"csrf",
"Ġimport",
"Ġcsrf",... | [
1,
1,
1,
1,
1,
1,
1,
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,
4,
5,
5,
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,
8,
8... | [
1,
5,
12,
13,
22,
29,
36,
1,
5,
12,
13,
20,
21,
25,
26,
36,
43,
49,
50,
58,
1,
5,
12,
13,
18,
19,
29,
30,
34,
41,
46,
47,
49,
53,
1,
1,
2,
9,
14,
20,
25,
26,
1,
5,
14,
15,
21,
28,
36,
1,
5,
12,
13,
15,
22,
... |
1431a0049c05a99e0b68052f56bf8e2e3c48e1aa | from flask import request
from flask_restful import abort
from sqlalchemy.exc import SQLAlchemyError
from gm.main.models.model import (
db,
Metric,
QuantModelMetricSchema,
MlModelMetricSchema,
Frequency,
QuantModelMetric,
MlModelMetric,
ThresholdType,
)
from gm.main.resources import suc... | [
1097,
18958,
1220,
1343,
222,
1097,
18958,
100,
4756,
2812,
1220,
13309,
222,
1097,
30936,
51,
14819,
1220,
4447,
43108,
943,
222,
222,
1097,
34900,
51,
1850,
51,
3404,
51,
1184,
1220,
327,
303,
3100,
49,
303,
20773,
49,
303,
24509,
1... | [
"from",
"Ġflask",
"Ġimport",
"Ġrequest",
"Ċ",
"from",
"Ġflask",
"_",
"rest",
"ful",
"Ġimport",
"Ġabort",
"Ċ",
"from",
"Ġsqlalchemy",
".",
"exc",
"Ġimport",
"ĠSQL",
"Alchemy",
"Error",
"Ċ",
"Ċ",
"from",
"Ġgm",
".",
"main",
".",
"models",
".",
"model",
"Ġi... | [
1,
1,
1,
1,
1,
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,
5,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
11,
11,
11,
11,
11,
12,... | [
1,
5,
11,
18,
26,
1,
5,
11,
12,
16,
19,
26,
32,
1,
5,
16,
17,
20,
27,
31,
38,
43,
1,
1,
5,
8,
9,
13,
14,
20,
21,
26,
33,
35,
4,
7,
8,
4,
11,
12,
4,
10,
15,
21,
27,
28,
4,
6,
7,
12,
18,
24,
25,
4,
14,
15,
... |
4a136a6284add3bcbd7f9546e18e79151cea685f | import nevergrad as ng
import numpy as np
import torch
from pix2latent.utils.image import binarize
class _BaseNevergradOptimizer:
"""
Base template for NeverGrad optimization. Should be used jointly with
BaseOptimizer.
For full list of available optimizers
> https://github.com/facebookresearch/... | [
485,
7162,
4985,
641,
7398,
222,
222,
485,
6610,
641,
2115,
222,
485,
5665,
222,
222,
1097,
26509,
55,
49025,
51,
2324,
51,
915,
1220,
7412,
301,
537,
499,
222,
842,
634,
1778,
27812,
4985,
29402,
63,
303,
1547,
303,
3787,
3098,
456... | [
"import",
"Ġnever",
"grad",
"Ġas",
"Ġng",
"Ċ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġtorch",
"Ċ",
"Ċ",
"from",
"Ġpix",
"2",
"latent",
".",
"utils",
".",
"image",
"Ġimport",
"Ġbin",
"ar",
"ize",
"ĊĊ",
"Ċ",
"class",
"Ġ_",
"Base",
"Nev... | [
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
14,
... | [
1,
7,
13,
17,
20,
23,
1,
1,
7,
13,
16,
19,
1,
7,
13,
1,
1,
5,
9,
10,
16,
17,
22,
23,
28,
35,
39,
41,
44,
1,
1,
6,
8,
12,
17,
21,
30,
31,
4,
8,
4,
9,
18,
22,
28,
32,
45,
46,
53,
56,
61,
67,
69,
74,
4,
9,
1... |
1bf79319613ca1454f3a9ed21068bd899616395c | # -*- coding: utf-8 -*-
s = "123"
try:
print(int(s) + 1)
print(int(s) / 1)
except ValueError as ve:
print("ValueError occurs!!!", ve)
except ZeroDivisionError as e:
print("ValueError occurs!!!", e)
except:
print("Error occurs!!!")
else:
print("elseeeeeeeeeeeeeee")
finally:
print("ABCDE... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
120,
299,
332,
54,
55,
56,
39,
222,
222,
1287,
63,
303,
1489,
45,
429,
45,
120,
46,
494,
244,
54,
46,
303,
1489,
45,
429,
45,
120,
46,
536,
244,
54,
46,
222,
222,
7364,
10128,
64... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"s",
"Ġ=",
"Ġ\"",
"1",
"2",
"3",
"\"",
"Ċ",
"Ċ",
"try",
":",
"ĊĠĠĠ",
"Ġprint",
"(",
"int",
"(",
"s",
")",
"Ġ+",
"Ġ",
"1",
")",
"ĊĠĠĠ",
"Ġprint",
"(",
"int",
"(",
"s",
")",
"Ġ/",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
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,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
11,
11,
11,... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
4,
6,
7,
8,
9,
10,
1,
1,
4,
5,
4,
10,
11,
14,
15,
16,
17,
19,
20,
21,
22,
4,
10,
11,
14,
15,
16,
17,
19,
20,
21,
22,
1,
1,
7,
18,
21,
24,
25,
4,
10,
12,
22,
29,
31,
... |
40bc8122d98d407341a56251f9abfab019e0acd8 | from collections import Counter
from enum import auto, Enum
class Category(Enum):
ONES = 1
TWOS = 2
THREES = 3
FOURS = 4
FIVES = 5
SIXES = 6
YACHT = auto()
FULL_HOUSE = auto()
FOUR_OF_A_KIND = auto()
LITTLE_STRAIGHT = auto()
BIG_STRAIGHT = auto()
CHOICE = auto()
def s... | [
1097,
13722,
1220,
18737,
222,
1097,
3858,
1220,
2283,
49,
7827,
499,
222,
842,
9954,
45,
2773,
731,
303,
5716,
959,
299,
244,
54,
303,
413,
92,
2653,
299,
244,
55,
303,
5607,
632,
959,
299,
244,
56,
303,
21425,
1282,
88,
299,
244... | [
"from",
"Ġcollections",
"Ġimport",
"ĠCounter",
"Ċ",
"from",
"Ġenum",
"Ġimport",
"Ġauto",
",",
"ĠEnum",
"ĊĊ",
"Ċ",
"class",
"ĠCategory",
"(",
"Enum",
"):",
"ĊĠĠĠ",
"ĠON",
"ES",
"Ġ=",
"Ġ",
"1",
"ĊĠĠĠ",
"ĠT",
"W",
"OS",
"Ġ=",
"Ġ",
"2",
"ĊĠĠĠ",
"ĠTH",
"R... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
12... | [
1,
5,
17,
24,
32,
1,
5,
10,
17,
22,
23,
28,
1,
1,
6,
15,
16,
20,
22,
4,
7,
9,
11,
12,
13,
4,
6,
7,
9,
11,
12,
13,
4,
7,
9,
11,
13,
14,
15,
4,
7,
9,
10,
12,
13,
14,
4,
6,
8,
10,
12,
13,
14,
4,
6,
8,
10,
... |
3e07a2a2d0a810c016720fa41d71d0771cbccfef | from tqdm import tqdm
import os
import pandas as pd
import pickle
import numpy as np
def inv_list(l, start=0):
d = {}
for i in range(len(l)):
d[l[i]] = i + start
return d
raw_data_path = "/home/reddy/sindhu/datasets/physionet_2012/"
def read_dataset(d):
ts = []
pbar = tqdm(os.listdir(r... | [
1097,
24826,
1220,
24826,
222,
485,
2355,
222,
485,
13247,
641,
6451,
222,
485,
19892,
222,
485,
6610,
641,
2115,
499,
222,
610,
4712,
100,
687,
45,
113,
49,
1496,
66,
53,
731,
303,
362,
299,
2172,
303,
456,
613,
347,
2189,
45,
16... | [
"from",
"Ġtqdm",
"Ġimport",
"Ġtqdm",
"Ċ",
"import",
"Ġos",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġpickle",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"ĊĊ",
"Ċ",
"def",
"Ġinv",
"_",
"list",
"(",
"l",
",",
"Ġstart",
"=",
"0",
"):",
"ĊĠĠĠ"... | [
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
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,
5,
10,
17,
22,
1,
7,
10,
1,
7,
14,
17,
20,
1,
7,
14,
1,
7,
13,
16,
19,
1,
1,
4,
8,
9,
13,
14,
15,
16,
22,
23,
24,
26,
4,
6,
8,
11,
4,
8,
10,
13,
19,
20,
23,
24,
25,
28,
8,
10,
11,
12,
13,
14,
16,
18,
2... |
3668e8009dca4ea261bdfbd325331c338fdac5a9 | import torch
import re
import sys
import os
import shutil
import filecmp
import numpy as np
from collections import defaultdict
from shutil import copyfile
sys.path.append("../")
class BoardParser:
def __init__(self):
self.file = open("../board_output", "rb")
self.data = None
def update(sel... | [
485,
5665,
222,
485,
334,
222,
485,
5263,
222,
485,
2355,
222,
485,
23074,
222,
485,
822,
4932,
222,
485,
6610,
641,
2115,
222,
1097,
13722,
1220,
31701,
222,
1097,
23074,
1220,
1948,
781,
222,
222,
3750,
51,
1005,
51,
1713,
15471,
... | [
"import",
"Ġtorch",
"Ċ",
"import",
"Ġre",
"Ċ",
"import",
"Ġsys",
"Ċ",
"import",
"Ġos",
"Ċ",
"import",
"Ġshutil",
"Ċ",
"import",
"Ġfile",
"cmp",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġcollections",
"Ġimport",
"Ġdefaultdict",
"Ċ",
"from",
"Ġsh... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
6,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
11,
11,
11,
13,
14,
14,
14,
14,
14,
15,
15,
15,
15,
15,
15,
15,
16,
16,... | [
1,
7,
13,
1,
7,
10,
1,
7,
11,
1,
7,
10,
1,
7,
14,
1,
7,
12,
15,
1,
7,
13,
16,
19,
1,
5,
17,
24,
36,
1,
5,
12,
19,
24,
28,
1,
1,
4,
5,
9,
10,
16,
21,
23,
1,
1,
6,
12,
18,
19,
4,
8,
11,
15,
18,
22,
24,
8,... |
32b3e65add5fb44320898b682e8f94f1460a32e7 | def create_meme(word):
return f"this is your meme NEW VERSION {word}"
| [
610,
1506,
100,
48656,
45,
1131,
731,
303,
461,
315,
39,
597,
458,
1390,
616,
308,
20809,
20411,
320,
1131,
3864,
222
] | [
"def",
"Ġcreate",
"_",
"meme",
"(",
"word",
"):",
"ĊĠĠĠ",
"Ġreturn",
"Ġf",
"\"",
"this",
"Ġis",
"Ġyour",
"Ġme",
"me",
"ĠNEW",
"ĠVERSION",
"Ġ{",
"word",
"}\"",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
] | [
1,
4,
11,
12,
16,
17,
21,
23,
4,
11,
13,
14,
18,
21,
26,
29,
31,
35,
43,
45,
49,
51
] |
6af5faaaa9d894dd2b882cfe1bb8b8225780743c | """
# VariableScope.py
#
# Written by leezhm on 13th March, 2012.
#
# Copyright (C) leezhm(c)126.com. All Right Reserved.
#
# For Chapter 6 Dragon Realm
#
# <<Invent Your Own Computer Games with Python>>
"""
print("Why not ?")
print(True and not False)
# A global variable named "spam"
spam = 1208
# This ... | [
3012,
222,
40,
280,
9904,
5518,
51,
997,
222,
40,
222,
40,
280,
48449,
829,
1018,
106,
7322,
114,
563,
244,
54,
56,
368,
29215,
49,
244,
55,
53,
54,
55,
51,
222,
40,
222,
40,
280,
2657,
327,
72,
46,
1018,
106,
7322,
114,
45,
... | [
"\"\"\"",
"Ċ",
"#",
"ĠĠ",
"ĠVariable",
"Scope",
".",
"py",
"Ċ",
"#",
"Ċ",
"#",
"ĠĠ",
"ĠWritten",
"Ġby",
"Ġle",
"e",
"zh",
"m",
"Ġon",
"Ġ",
"1",
"3",
"th",
"ĠMarch",
",",
"Ġ",
"2",
"0",
"1",
"2",
".",
"Ċ",
"#",
"Ċ",
"#",
"ĠĠ",
"ĠCopyright",
... | [
1,
1,
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,
4,
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,
6,
7,
7,
8,
8,
8... | [
1,
4,
1,
2,
4,
13,
18,
19,
21,
1,
2,
1,
2,
4,
12,
15,
18,
19,
21,
22,
25,
26,
27,
28,
30,
36,
37,
38,
39,
40,
41,
42,
43,
1,
2,
1,
2,
4,
14,
16,
17,
18,
21,
22,
24,
25,
26,
27,
28,
29,
30,
31,
32,
35,
36,
4... |
98bd4eb25a76fb9184f9abfcb920a6fbe46b9394 | import json
subjects = []
with open("sub.json", "r") as subject_file:
subjects = json.load(subject_file)
print(json.dumps(subjects, separators=(",", ":")))
| [
485,
2379,
222,
222,
28964,
299,
1627,
222,
222,
1814,
2177,
459,
1133,
51,
1279,
411,
332,
119,
678,
641,
5405,
100,
781,
63,
303,
34762,
299,
2379,
51,
963,
45,
6264,
100,
781,
46,
222,
222,
1243,
45,
1279,
51,
16961,
45,
28964,... | [
"import",
"Ġjson",
"Ċ",
"Ċ",
"subjects",
"Ġ=",
"Ġ[]",
"Ċ",
"Ċ",
"with",
"Ġopen",
"(\"",
"sub",
".",
"json",
"\",",
"Ġ\"",
"r",
"\")",
"Ġas",
"Ġsubject",
"_",
"file",
":",
"ĊĠĠĠ",
"Ġsubjects",
"Ġ=",
"Ġjson",
".",
"load",
"(",
"subject",
"_",
"file",
... | [
1,
1,
1,
2,
3,
3,
3,
3,
4,
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,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8
] | [
1,
7,
12,
1,
1,
9,
11,
14,
1,
1,
5,
10,
12,
15,
16,
20,
22,
24,
25,
27,
30,
38,
39,
43,
44,
4,
13,
15,
20,
21,
25,
26,
33,
34,
38,
39,
1,
1,
6,
7,
11,
12,
17,
18,
26,
27,
33,
38,
40,
42,
44,
48,
51
] |
168a12e6653a0526f29c163913def50147481154 | """This program displays a customizable list of items by priority value,
with priority 1 being the highest. Allows the user to add, edit,
mark complete, show completed (hidden), and remove items. Stores the list of
items in a .txt file located where this program's main.py file is. All
changes are automatically saved to... | [
3012,
2287,
3477,
20191,
331,
3137,
6776,
1168,
451,
3966,
829,
9961,
804,
49,
222,
1814,
9961,
244,
54,
4019,
341,
18541,
51,
30056,
341,
1275,
391,
1035,
49,
4588,
49,
222,
1846,
6179,
49,
2539,
9442,
327,
3887,
490,
480,
3365,
39... | [
"\"\"\"",
"This",
"Ġprogram",
"Ġdisplays",
"Ġa",
"Ġcustom",
"izable",
"Ġlist",
"Ġof",
"Ġitems",
"Ġby",
"Ġpriority",
"Ġvalue",
",",
"Ċ",
"with",
"Ġpriority",
"Ġ",
"1",
"Ġbeing",
"Ġthe",
"Ġhighest",
".",
"ĠAllows",
"Ġthe",
"Ġuser",
"Ġto",
"Ġadd",
",",
"Ġedit",... | [
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,
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... | [
1,
4,
8,
16,
25,
27,
34,
40,
45,
48,
54,
57,
66,
72,
73,
1,
5,
14,
15,
16,
22,
26,
34,
35,
42,
46,
51,
54,
58,
59,
64,
65,
1,
5,
14,
15,
20,
30,
32,
38,
40,
44,
51,
57,
58,
65,
69,
74,
77,
1,
6,
9,
11,
13,
16... |
b7ccb41c43a0db6f1bf9e6ba5cef1b9b1417e297 | "Unit tests for reverse URL lookup"
from django.core.urlresolvers import reverse_helper, NoReverseMatch
import re, unittest
test_data = (
("^places/(\d+)/$", "places/3/", [3], {}),
("^places/(\d+)/$", "places/3/", ["3"], {}),
("^places/(\d+)/$", NoReverseMatch, ["a"], {}),
("^places/(\d+)/$", NoRevers... | [
39,
3024,
3326,
456,
10170,
3846,
11478,
39,
222,
222,
1097,
8532,
51,
1284,
51,
983,
46710,
1220,
10170,
100,
4328,
49,
3155,
17687,
3683,
222,
485,
334,
49,
15790,
222,
222,
881,
100,
624,
299,
327,
303,
2903,
99,
15838,
52,
5026,... | [
"\"",
"Unit",
"Ġtests",
"Ġfor",
"Ġreverse",
"ĠURL",
"Ġlookup",
"\"",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"core",
".",
"url",
"resolvers",
"Ġimport",
"Ġreverse",
"_",
"helper",
",",
"ĠNo",
"Reverse",
"Match",
"Ċ",
"import",
"Ġre",
",",
"Ġunittest",
"Ċ",
"Ċ"... | [
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,
4,
4,
4,
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,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
6,
12,
16,
24,
28,
35,
36,
1,
1,
5,
12,
13,
17,
18,
21,
30,
37,
45,
46,
52,
53,
56,
63,
68,
1,
7,
10,
11,
20,
1,
1,
5,
6,
10,
12,
14,
4,
7,
8,
14,
15,
17,
18,
21,
24,
26,
32,
33,
34,
37,
39,
40,
42,
4... |
778cf8064fa45e3e25a66f2165dcf6885c72fb8a | # This script allows you to copy all files with a certain extention to a new folder without integrating the sub folders
# Created by Maurice de Kleijn Vrije Universiteit Amsterdam Spatial Information laboratory for the datamanagement of the the archaological project Barin Hoyuk
# 22062016 Python 2.7
import shutil
impo... | [
40,
1369,
3273,
6990,
863,
391,
1948,
1187,
2293,
642,
331,
9464,
1467,
5098,
391,
331,
556,
4865,
2895,
5859,
1761,
341,
1381,
18634,
222,
40,
6956,
829,
507,
9815,
584,
428,
1242,
293,
25371,
694,
363,
2718,
46417,
676,
302,
21462,
... | [
"#",
"ĠThis",
"Ġscript",
"Ġallows",
"Ġyou",
"Ġto",
"Ġcopy",
"Ġall",
"Ġfiles",
"Ġwith",
"Ġa",
"Ġcertain",
"Ġext",
"ention",
"Ġto",
"Ġa",
"Ġnew",
"Ġfolder",
"Ġwithout",
"Ġintegr",
"ating",
"Ġthe",
"Ġsub",
"Ġfolders",
"Ċ",
"#",
"ĠCreated",
"Ġby",
"ĠM",
"aur",
... | [
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,
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,
2,
2,
2,
2,
2,
2,
2,
2... | [
1,
2,
7,
14,
21,
25,
28,
33,
37,
43,
48,
50,
58,
62,
68,
71,
73,
77,
84,
92,
99,
104,
108,
112,
120,
1,
2,
10,
13,
15,
18,
21,
24,
26,
28,
31,
33,
35,
37,
45,
48,
50,
53,
57,
60,
68,
80,
86,
91,
95,
99,
104,
114,... |
5eb4c71869b077dac0d61072c99d801030395fc2 | from pwn import *
p = process("./weeb_hunting")
elf = ELF("/lib/x86_64-linux-gnu/libc-2.23.so")
pwnlib.gdb.attach(p)
r = p.recv()
while "You found a" not in r:
r = p.recvuntil(">")
p.send("AAAA\n")
p.send("AAAA\n")
r = p.recv()
while "You found a" not in r:
r = p.recvuntil(">")
p.send("AAAA\n")
p.se... | [
1097,
317,
3068,
1220,
338,
222,
222,
117,
299,
2183,
12031,
1399,
891,
100,
109,
45502,
678,
222,
222,
4173,
299,
10544,
75,
4229,
1379,
52,
125,
61,
59,
100,
59,
57,
50,
4793,
50,
10627,
52,
19336,
50,
55,
51,
55,
56,
51,
780,... | [
"from",
"Ġp",
"wn",
"Ġimport",
"Ġ*",
"Ċ",
"Ċ",
"p",
"Ġ=",
"Ġprocess",
"(\"./",
"we",
"eb",
"_",
"h",
"unting",
"\")",
"Ċ",
"Ċ",
"elf",
"Ġ=",
"ĠEL",
"F",
"(\"/",
"lib",
"/",
"x",
"8",
"6",
"_",
"6",
"4",
"-",
"linux",
"-",
"gnu",
"/",
"libc",
... | [
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
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,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9... | [
1,
5,
7,
9,
16,
18,
1,
1,
2,
4,
12,
16,
18,
20,
21,
22,
28,
30,
1,
1,
4,
6,
9,
10,
13,
16,
17,
18,
19,
20,
21,
22,
23,
24,
29,
30,
33,
34,
38,
39,
40,
41,
42,
43,
44,
46,
48,
1,
1,
2,
4,
7,
8,
11,
12,
18,
... |
383d3b35fbfb7921111b28c3160173ce1c200387 | from copy import deepcopy
from datetime import date, timedelta
from hashlib import sha256
import starkbank
from starkbank import BoletoPayment
from .boleto import generateExampleBoletosJson
example_payment = BoletoPayment(
line="34191.09008 61713.957308 71444.640008 2 83430000984732",
scheduled="2020-02-29",
... | [
1097,
1948,
1220,
29281,
222,
1097,
7181,
1220,
2361,
49,
30864,
222,
1097,
42575,
1220,
9635,
55,
58,
59,
222,
485,
395,
1111,
8922,
222,
1097,
395,
1111,
8922,
1220,
570,
2652,
471,
8643,
222,
1097,
657,
730,
37009,
1220,
4468,
5306... | [
"from",
"Ġcopy",
"Ġimport",
"Ġdeepcopy",
"Ċ",
"from",
"Ġdatetime",
"Ġimport",
"Ġdate",
",",
"Ġtimedelta",
"Ċ",
"from",
"Ġhashlib",
"Ġimport",
"Ġsha",
"2",
"5",
"6",
"Ċ",
"import",
"Ġst",
"ark",
"bank",
"Ċ",
"from",
"Ġst",
"ark",
"bank",
"Ġimport",
"ĠB",
... | [
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,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
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... | [
1,
5,
10,
17,
26,
1,
5,
14,
21,
26,
27,
37,
1,
5,
13,
20,
24,
25,
26,
27,
1,
7,
10,
13,
17,
1,
5,
8,
11,
15,
22,
24,
27,
29,
36,
1,
5,
7,
9,
13,
20,
29,
36,
37,
40,
43,
47,
1,
1,
8,
9,
16,
18,
20,
23,
25,
... |
e2c69191d81724cac44bebba3111a773e408b7c8 | # Print table using while loop
tablenumber = int(input("Enter a number: "))
upperlimit = int(input("Enter a upper limit: "))
lowerlimit = int(input("Enter a lower limit: "))
i = upperlimit
while i <= lowerlimit:
print(i, "*", tablenumber, "=", i * tablenumber)
i = i + 1
print("================================... | [
40,
9232,
1877,
1493,
2236,
5276,
499,
222,
3019,
1688,
879,
299,
648,
45,
1151,
459,
6559,
331,
1470,
63,
29583,
222,
7647,
3262,
299,
648,
45,
1151,
459,
6559,
331,
8373,
2741,
63,
29583,
222,
5773,
3262,
299,
648,
45,
1151,
459,
... | [
"#",
"ĠPrint",
"Ġtable",
"Ġusing",
"Ġwhile",
"Ġloop",
"ĊĊ",
"Ċ",
"tab",
"len",
"umber",
"Ġ=",
"Ġint",
"(",
"input",
"(\"",
"Enter",
"Ġa",
"Ġnumber",
":",
"Ġ\"))",
"Ċ",
"upper",
"limit",
"Ġ=",
"Ġint",
"(",
"input",
"(\"",
"Enter",
"Ġa",
"Ġupper",
"Ġlimi... | [
1,
1,
1,
1,
1,
1,
1,
3,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9... | [
1,
2,
8,
14,
20,
26,
31,
1,
1,
4,
7,
12,
14,
18,
19,
24,
26,
31,
33,
40,
41,
45,
1,
6,
11,
13,
17,
18,
23,
25,
30,
32,
38,
44,
45,
49,
1,
6,
11,
13,
17,
18,
23,
25,
30,
32,
38,
44,
45,
49,
1,
2,
4,
10,
15,
... |
a513dfd84b5d9267b7e96fedc88e5b6dabeea19e | """Tests for `yatsm.utils`"""
import numpy as np
import pytest
from yatsm import utils
@pytest.mark.parametrize("nrow,njob", [(793, 13), (700, 1), (700, 700)])
def test_distribute_jobs_interlaced(nrow, njob):
assigned = []
for i in range(njob):
assigned.extend(utils.distribute_jobs(i, njob, nrow, in... | [
3012,
4485,
456,
548,
126,
288,
1752,
51,
2324,
101,
3012,
222,
222,
485,
6610,
641,
2115,
222,
485,
13090,
222,
222,
1097,
553,
288,
1752,
1220,
8767,
499,
222,
69,
12418,
51,
1846,
51,
28880,
459,
115,
661,
49,
115,
3267,
411,
1... | [
"\"\"\"",
"Tests",
"Ġfor",
"Ġ`",
"y",
"at",
"sm",
".",
"utils",
"`",
"\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġpytest",
"Ċ",
"Ċ",
"from",
"Ġy",
"at",
"sm",
"Ġimport",
"Ġutils",
"ĊĊ",
"Ċ",
"@",
"pytest",
".",
"mark",
"."... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
5,
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,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
4,
9,
13,
15,
16,
18,
20,
21,
26,
27,
30,
1,
1,
7,
13,
16,
19,
1,
7,
14,
1,
1,
5,
7,
9,
11,
18,
24,
1,
1,
2,
8,
9,
13,
14,
25,
27,
28,
31,
32,
33,
36,
38,
41,
42,
43,
44,
45,
46,
47,
48,
50,
52,
53,
54,
... |
6a5a6bdb0740d51426aa8b36dd3cc317103412b1 | from rest_framework.views import APIView
from django.shortcuts import get_object_or_404
from rest_framework.response import Response
from django.contrib.auth import logout
from rest_framework import status
from rest_framework.authtoken.models import Token
from .serilizer import UserSerializer
class RegistrationView(A... | [
1097,
6125,
100,
2863,
51,
4361,
1220,
2347,
1089,
222,
1097,
8532,
51,
36264,
1220,
640,
100,
1491,
100,
290,
100,
57,
53,
57,
222,
1097,
6125,
100,
2863,
51,
2003,
1220,
5178,
222,
1097,
8532,
51,
12060,
51,
2408,
1220,
20629,
222... | [
"from",
"Ġrest",
"_",
"framework",
".",
"views",
"Ġimport",
"ĠAPI",
"View",
"Ċ",
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġget",
"_",
"object",
"_",
"or",
"_",
"4",
"0",
"4",
"Ċ",
"from",
"Ġrest",
"_",
"framework",
".",
"response",
"Ġimport",
"... | [
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,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
5,
10,
11,
20,
21,
26,
33,
37,
41,
1,
5,
12,
13,
22,
29,
33,
34,
40,
41,
43,
44,
45,
46,
47,
1,
5,
10,
11,
20,
21,
29,
36,
45,
1,
5,
12,
13,
20,
21,
25,
32,
39,
1,
5,
10,
11,
20,
27,
34,
1,
5,
10,
11,
20,
... |
04aacf9461ade2e229076ffdf85aca913037edad | import json
from jsonargparse import ArgumentParser, ActionConfigFile
import yaml
from typing import List, Dict
import glob
import os
import pathlib
import pdb
import subprocess
import copy
from io import StringIO
from collections import defaultdict
import torch
from spacy.tokenizer import Tokenizer
from spacy.lang.en... | [
485,
2379,
222,
1097,
2379,
645,
2228,
1220,
7115,
2837,
49,
5255,
29883,
222,
485,
14478,
222,
1097,
12018,
1220,
1701,
49,
14609,
222,
485,
12542,
222,
485,
2355,
222,
485,
30293,
222,
485,
36198,
222,
485,
16606,
222,
485,
1948,
22... | [
"import",
"Ġjson",
"Ċ",
"from",
"Ġjson",
"arg",
"parse",
"Ġimport",
"ĠArgument",
"Parser",
",",
"ĠAction",
"ConfigFile",
"Ċ",
"import",
"Ġyaml",
"Ċ",
"from",
"Ġtyping",
"Ġimport",
"ĠList",
",",
"ĠDict",
"Ċ",
"import",
"Ġglob",
"Ċ",
"import",
"Ġos",
"Ċ",
"i... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
9,
9,
9,
10,
10,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
13,
14,
14,
14,
15,
15,
15,
1... | [
1,
7,
12,
1,
5,
10,
13,
18,
25,
34,
40,
41,
48,
58,
1,
7,
12,
1,
5,
12,
19,
24,
25,
30,
1,
7,
12,
1,
7,
10,
1,
7,
15,
1,
7,
11,
1,
7,
18,
1,
7,
12,
1,
5,
8,
15,
24,
1,
5,
17,
24,
36,
1,
1,
7,
13,
1,
5,
... |
104c49941a79948749b27217a0c728f19435f77a | import random
x = int(raw_input("Please supply a number: "))
y = int(raw_input("Please supply a second number: "))
z = random.randint(x, y)
print(z)
| [
485,
4051,
222,
222,
125,
299,
648,
45,
1312,
100,
1151,
459,
6578,
19456,
331,
1470,
63,
29583,
222,
126,
299,
648,
45,
1312,
100,
1151,
459,
6578,
19456,
331,
3118,
1470,
63,
29583,
222,
222,
127,
299,
4051,
51,
21732,
45,
125,
... | [
"import",
"Ġrandom",
"Ċ",
"Ċ",
"x",
"Ġ=",
"Ġint",
"(",
"raw",
"_",
"input",
"(\"",
"Please",
"Ġsupply",
"Ġa",
"Ġnumber",
":",
"Ġ\"))",
"Ċ",
"y",
"Ġ=",
"Ġint",
"(",
"raw",
"_",
"input",
"(\"",
"Please",
"Ġsupply",
"Ġa",
"Ġsecond",
"Ġnumber",
":",
"Ġ\"... | [
1,
1,
1,
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,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7
] | [
1,
7,
14,
1,
1,
2,
4,
8,
9,
12,
13,
18,
20,
26,
33,
35,
42,
43,
47,
1,
2,
4,
8,
9,
12,
13,
18,
20,
26,
33,
35,
42,
49,
50,
54,
1,
1,
2,
4,
11,
12,
19,
20,
21,
22,
24,
25,
1,
6,
7,
8,
9
] |
3605f46da25eb98767ca8d7248beaa07572d3171 | processed_lines = []
for line in open("9.in"):
if line:
processing_pattern = False
new_line = ""
for idx, char in enumerate(line):
pattern_found = False
if (
line[idx] == "("
and line[idx + 1].isnumeric()
and line[idx ... | [
15299,
100,
4466,
299,
1627,
222,
222,
999,
1646,
347,
2177,
459,
62,
51,
285,
10320,
303,
434,
1646,
63,
310,
8220,
100,
5622,
299,
3208,
310,
556,
100,
948,
299,
3347,
310,
456,
5444,
49,
1370,
347,
10869,
45,
948,
731,
343,
527... | [
"processed",
"_",
"lines",
"Ġ=",
"Ġ[]",
"Ċ",
"Ċ",
"for",
"Ġline",
"Ġin",
"Ġopen",
"(\"",
"9",
".",
"in",
"\"):",
"ĊĠĠĠ",
"Ġif",
"Ġline",
":",
"ĊĠĠĠĠĠĠĠ",
"Ġprocessing",
"_",
"pattern",
"Ġ=",
"ĠFalse",
"ĊĠĠĠĠĠĠĠ",
"Ġnew",
"_",
"line",
"Ġ=",
"Ġ\"\"",
"ĊĠ... | [
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
12,
12,
... | [
1,
10,
11,
16,
18,
21,
1,
1,
4,
9,
12,
17,
19,
20,
21,
23,
26,
4,
7,
12,
13,
8,
19,
20,
27,
29,
35,
8,
12,
13,
17,
19,
22,
8,
12,
16,
17,
22,
25,
35,
36,
40,
42,
12,
20,
21,
26,
28,
34,
12,
15,
17,
16,
21,
22... |
e7db3390d30f86e19eee930c48e5f848f41cc579 | # take any non-negative and non-zero integer number and name it c0;if it's even, evaluate a new c0 as c0 ÷ 2;
# otherwise, if it's odd, evaluate a new c0 as 3 × c0 + 1;
# if c0 ≠ 1, skip to point 2.
# The hypothesis says that regardless of the initial value of c0,it will always go to 1.
# Write a program which reads on... | [
40,
4843,
1364,
3000,
50,
15327,
480,
3000,
50,
6187,
5009,
1470,
480,
655,
580,
300,
53,
64,
344,
580,
1200,
4462,
49,
13552,
331,
556,
300,
53,
641,
300,
53,
35208,
244,
55,
64,
222,
40,
5897,
49,
434,
580,
1200,
17869,
49,
13... | [
"#",
"Ġtake",
"Ġany",
"Ġnon",
"-",
"negative",
"Ġand",
"Ġnon",
"-",
"zero",
"Ġinteger",
"Ġnumber",
"Ġand",
"Ġname",
"Ġit",
"Ġc",
"0",
";",
"if",
"Ġit",
"'s",
"Ġeven",
",",
"Ġevaluate",
"Ġa",
"Ġnew",
"Ġc",
"0",
"Ġas",
"Ġc",
"0",
"Ġ÷",
"Ġ",
"2",
";"... | [
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,
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... | [
1,
2,
7,
11,
15,
16,
24,
28,
32,
33,
37,
45,
52,
56,
61,
64,
66,
67,
68,
70,
73,
75,
80,
81,
90,
92,
96,
98,
99,
102,
104,
105,
107,
108,
109,
110,
1,
2,
12,
13,
16,
19,
21,
25,
26,
35,
37,
41,
43,
44,
47,
48,
49... |
c455de70a79f70f5f0e21391511f5035f1b4feb9 | "Base class for tests."
import argparse
import http.client
import json
import os
import re
import sys
import unittest
import jsonschema
import requests
SCHEMA_LINK_RX = re.compile(r'<([^>])+>; rel="([^"]+)')
JSON_MIMETYPE = "application/json"
DEFAULT_SETTINGS = {
"ROOT_URL": "http://127.0.0.1:5002/api",
"U... | [
39,
1778,
462,
456,
3326,
3128,
222,
222,
485,
16693,
222,
485,
1930,
51,
1598,
222,
485,
2379,
222,
485,
2355,
222,
485,
334,
222,
485,
5263,
222,
485,
15790,
222,
222,
485,
2379,
3982,
222,
485,
5188,
222,
222,
20732,
100,
11247,
... | [
"\"",
"Base",
"Ġclass",
"Ġfor",
"Ġtests",
".\"",
"Ċ",
"Ċ",
"import",
"Ġargparse",
"Ċ",
"import",
"Ġhttp",
".",
"client",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġos",
"Ċ",
"import",
"Ġre",
"Ċ",
"import",
"Ġsys",
"Ċ",
"import",
"Ġunittest",
"Ċ",
"Ċ",
"i... | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
9,
9,
9,
10,
11,
11,
11,
11,
12,
12,
12,
13,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
14,
... | [
1,
2,
6,
12,
16,
22,
24,
1,
1,
7,
16,
1,
7,
12,
13,
19,
1,
7,
12,
1,
7,
10,
1,
7,
10,
1,
7,
11,
1,
7,
16,
1,
1,
7,
12,
18,
1,
7,
16,
1,
1,
7,
8,
12,
13,
15,
17,
20,
21,
28,
29,
30,
32,
35,
36,
39,
41,
4... |
630480e9458491a26ea9060bd36541a0d5805a11 | import urllib.request
import json
def kind():
data = {}
with open("dataset.json", "r") as read_file:
data = json.load(read_file)
return data["kind"]
def items():
data = {}
with open("dataset.json", "r") as read_file:
data = json.load(read_file)
return data["items"]
# Can ad... | [
485,
22296,
51,
1375,
222,
485,
2379,
499,
222,
610,
6207,
2284,
303,
727,
299,
2172,
303,
642,
2177,
459,
5709,
51,
1279,
411,
332,
119,
678,
641,
1511,
100,
781,
63,
310,
727,
299,
2379,
51,
963,
45,
870,
100,
781,
46,
303,
46... | [
"import",
"Ġurllib",
".",
"request",
"Ċ",
"import",
"Ġjson",
"ĊĊ",
"Ċ",
"def",
"Ġkind",
"():",
"ĊĠĠĠ",
"Ġdata",
"Ġ=",
"Ġ{}",
"ĊĠĠĠ",
"Ġwith",
"Ġopen",
"(\"",
"dataset",
".",
"json",
"\",",
"Ġ\"",
"r",
"\")",
"Ġas",
"Ġread",
"_",
"file",
":",
"ĊĠĠĠĠĠĠĠ"... | [
1,
1,
1,
1,
1,
2,
2,
2,
4,
5,
5,
5,
5,
6,
6,
6,
6,
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,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12,
13,
13,
13,
13,
14,
14,
... | [
1,
7,
14,
15,
22,
1,
7,
12,
1,
1,
4,
9,
12,
4,
9,
11,
14,
4,
9,
14,
16,
23,
24,
28,
30,
32,
33,
35,
38,
43,
44,
48,
49,
8,
13,
15,
20,
21,
25,
26,
30,
31,
35,
36,
4,
11,
16,
18,
22,
24,
1,
1,
4,
10,
13,
4,
... |
016b64a2eb4af3034d54272c878fb917506d330c | from import_export.admin import ImportExportMixin
from django.contrib import admin
from import_export import resources, widgets, fields
from .models import Addgroup, Addsystemname, Zhuanzhebushi, Yewuzerenbumen, czyylx, Zhuanze, Data
from import_export import fields, resources
from import_export.widgets import ForeignK... | [
1097,
1220,
100,
1376,
51,
2317,
1220,
9274,
6171,
13983,
222,
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
1220,
100,
1376,
1220,
6091,
49,
21871,
49,
3844,
222,
1097,
657,
3404,
1220,
2242,
1382,
49,
2242,
2964,
444,
49,
2538,
8290... | [
"from",
"Ġimport",
"_",
"export",
".",
"admin",
"Ġimport",
"ĠImport",
"Export",
"Mixin",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġimport",
"_",
"export",
"Ġimport",
"Ġresources",
",",
"Ġwidgets",
",",
"Ġfields",
"Ċ",
"from"... | [
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,
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,
4,
4,
4,
4,
4... | [
1,
5,
12,
13,
19,
20,
25,
32,
39,
45,
50,
1,
5,
12,
13,
20,
27,
33,
1,
5,
12,
13,
19,
26,
36,
37,
45,
46,
53,
1,
5,
7,
13,
20,
24,
29,
30,
34,
40,
44,
45,
47,
49,
52,
54,
55,
58,
59,
60,
62,
64,
65,
68,
70,
7... |
cddb16a305f74eb1a3f2854208f8508c4a7a8953 | import datetime
from flask import request
from flask_babel import _
from markupsafe import escape
from app import app
from app.data_access.audit_log_controller import create_audit_log_confirmation_entry
from app.data_access.user_controller import user_exists, create_user
from app.data_access.user_controller_errors im... | [
485,
7181,
222,
222,
1097,
18958,
1220,
1343,
222,
1097,
18958,
100,
11692,
1220,
634,
222,
1097,
21859,
4779,
1220,
15821,
222,
222,
1097,
1142,
1220,
1142,
222,
1097,
1142,
51,
624,
100,
3575,
51,
16662,
100,
769,
100,
4641,
1220,
1... | [
"import",
"Ġdatetime",
"Ċ",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"Ġrequest",
"Ċ",
"from",
"Ġflask",
"_",
"babel",
"Ġimport",
"Ġ_",
"Ċ",
"from",
"Ġmarkup",
"safe",
"Ġimport",
"Ġescape",
"Ċ",
"Ċ",
"from",
"Ġapp",
"Ġimport",
"Ġapp",
"Ċ",
"from",
"Ġapp",
".",
"... | [
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
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,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
16,
1,
1,
5,
11,
18,
26,
1,
5,
11,
12,
17,
24,
26,
1,
5,
12,
16,
23,
30,
1,
1,
5,
9,
16,
20,
1,
5,
9,
10,
14,
15,
21,
22,
27,
28,
31,
32,
42,
49,
56,
57,
62,
63,
66,
67,
79,
80,
85,
1,
5,
9,
10,
14,
... |
219b22b6ad685fc316b1df02cc924a1cfec89f5b | from lmfit import Parameters
import numpy as np
from cls.cls import *
from reading.ellipseOutput import readEllipseOutput
def readInputModel(txt, equivalentAxisFit, Settings):
psfwing_02pxscale_datatab = None
psfwing_logscale_datatab = None
componentslist = []
params = Parameters()
data = open... | [
1097,
30820,
4803,
1220,
8377,
222,
485,
6610,
641,
2115,
222,
222,
1097,
9036,
51,
6943,
1220,
338,
222,
222,
1097,
9198,
51,
43919,
2319,
1220,
1511,
45397,
2319,
499,
222,
610,
1511,
1630,
1262,
45,
2787,
49,
13765,
6370,
14088,
49... | [
"from",
"Ġlm",
"fit",
"Ġimport",
"ĠParameters",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"Ċ",
"from",
"Ġcls",
".",
"cls",
"Ġimport",
"Ġ*",
"Ċ",
"Ċ",
"from",
"Ġreading",
".",
"ellipse",
"Output",
"Ġimport",
"Ġread",
"Ellipse",
"Output",
"ĊĊ",
"Ċ",
"def... | [
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
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,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
1... | [
1,
5,
8,
11,
18,
29,
1,
7,
13,
16,
19,
1,
1,
5,
9,
10,
13,
20,
22,
1,
1,
5,
13,
14,
21,
27,
34,
39,
46,
52,
1,
1,
4,
9,
14,
19,
20,
23,
24,
35,
39,
42,
43,
52,
54,
4,
6,
8,
12,
13,
14,
15,
17,
22,
23,
26,
... |
4cf2829282cb0a1673e741f78f17ce27a2817ff2 | """Module for generating and plotting networks."""
from trafpy.generator.src import tools
import copy
import networkx as nx
import matplotlib.pyplot as plt
import json
def gen_arbitrary_network(num_eps, ep_label=None, ep_capacity=12500, num_channels=1, racks_dict=None, topology_type=None):
"""Generates an arbitr... | [
3012,
2478,
456,
17381,
480,
35929,
17765,
7128,
222,
222,
1097,
573,
1566,
997,
51,
7147,
51,
1634,
1220,
8699,
222,
485,
1948,
222,
485,
4017,
125,
641,
13766,
222,
485,
13168,
51,
18553,
641,
6020,
222,
485,
2379,
499,
222,
610,
... | [
"\"\"\"",
"Module",
"Ġfor",
"Ġgenerating",
"Ġand",
"Ġplotting",
"Ġnetworks",
".\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġtr",
"af",
"py",
".",
"generator",
".",
"src",
"Ġimport",
"Ġtools",
"Ċ",
"import",
"Ġcopy",
"Ċ",
"import",
"Ġnetwork",
"x",
"Ġas",
"Ġnx",
"Ċ",
"impo... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,... | [
1,
4,
10,
14,
25,
29,
38,
47,
51,
1,
1,
5,
8,
10,
12,
13,
22,
23,
26,
33,
39,
1,
7,
12,
1,
7,
15,
16,
19,
22,
1,
7,
18,
19,
25,
28,
32,
1,
7,
12,
1,
1,
4,
8,
9,
11,
18,
19,
26,
27,
30,
31,
34,
35,
38,
39,
... |
da66b254afb3a8fcd3783a38d8624caa917e58c3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
ACHAEA_ENDPOINT = "https://api.achaea.com"
def _requires_auth(func):
def wrapper(self, *args, **kwargs):
if self.auth is not True:
raise APIError()
return func(self, *args, **kwargs)
return wrapper
class API:
au... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
485,
5188,
222,
222,
10029,
7726,
70,
100,
26426,
299,
332,
662,
574,
1256,
51,
886,
31151,
51,
527,
39,
499,
222,
610,
634,
13980,
100,... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"import",
"Ġrequests",
"Ċ",
"Ċ",
"ACH",
"AE",
"A",
"_",
"ENDPOINT",
"Ġ=",
"Ġ\"",
"https",
"://",
"api",
".",
"ach",
"aea",
".",... | [
1,
1,
1,
1,
1,
1,
1,
1,
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,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
7,
16,
1,
1,
4,
6,
7,
8,
16,
18,
20,
25,
28,
31,
32,
35,
38,
39,
42,
43,
1,
1,
4,
6,
14,
15,
19,
20,
24,
26,
4,
8,
16,
17,
21,
22,
24,
28... |
83c7bb2e109f8affd9e2a12e8c5370b0f5a34048 | def fibonacci(quantidade):
resultado = [1, 2]
# while True:
# substituir o while pelo for, em um range do 2° valor da lista, correr até
# o valor definido na função "Quantidade"
for _ in range(2, quantidade):
# desta forma ele irá realizar a função do 2° da lista até atingir
... | [
610,
28319,
34789,
45,
9791,
9877,
731,
303,
33818,
299,
447,
54,
49,
244,
55,
98,
303,
607,
280,
2236,
2969,
63,
303,
607,
280,
44021,
25490,
356,
2236,
29872,
456,
49,
2667,
4225,
2189,
764,
244,
55,
24079,
13567,
5301,
16332,
49,... | [
"def",
"Ġfib",
"onacci",
"(",
"quant",
"idade",
"):",
"ĊĠĠĠ",
"Ġresultado",
"Ġ=",
"Ġ[",
"1",
",",
"Ġ",
"2",
"]",
"ĊĠĠĠ",
"Ġ#",
"ĠĠ",
"Ġwhile",
"ĠTrue",
":",
"ĊĠĠĠ",
"Ġ#",
"ĠĠ",
"Ġsubstit",
"uir",
"Ġo",
"Ġwhile",
"Ġpelo",
"Ġfor",
",",
"Ġem",
"Ġum",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
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,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6... | [
1,
4,
8,
14,
15,
20,
25,
27,
4,
14,
16,
18,
19,
20,
21,
22,
23,
4,
6,
8,
14,
19,
20,
4,
6,
8,
16,
19,
21,
27,
32,
36,
37,
40,
43,
49,
52,
53,
54,
55,
61,
64,
70,
71,
75,
78,
81,
82,
4,
6,
8,
10,
16,
22,
25,
... |
0082f75332321dba498f06d4c4a99c9248829b59 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 22 13:19:51 2020
@author: Warren
Script to check sdf file format for Fragalysis upload
"""
from rdkit import Chem
import validators
import numpy as np
import os
from viewer.models import Protein, CompoundSet
import datetime
# Set .sdf format versio... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
56,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
6880,
563,
19731,
12742,
244,
55,
55,
244,
54,
56,
63,
54,
62,
63,
58,
54,
244,
55,
53,
55,
53,
222,
69,
2133,
63,
34625,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"3",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Created",
"Ġon",
"ĠWed",
"ĠApr",
"Ġ",
"2",
"2",
"Ġ",
"1",
"3",
":",
"1",
"9",
":",
"5",
"1",
"Ġ",
"2",
"0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
9... | [
1,
4,
7,
8,
11,
12,
15,
22,
23,
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,
2,
8,
9,
13,
16,
1,
7,
10,
16,
20,
25,
32,
36,... |
48bc5d4b191fa631650b60240560dbece6396312 | from random import randint
cantidad = int(input("Numero de preguntas: "))
contador_bien = 0
contador_mal = 0
while cantidad <= 0:
print("El numero de preguntas debe ser al menos 1")
cantidad = int(input("Numero de preguntas: "))
for i in range(cantidad):
numero = randint(2, 10)
numero2 = randint(2, 1... | [
1097,
4051,
1220,
10510,
429,
222,
222,
32663,
299,
648,
45,
1151,
459,
36328,
428,
21815,
593,
321,
63,
29583,
222,
685,
6725,
100,
6539,
291,
299,
244,
53,
222,
685,
6725,
100,
7994,
299,
244,
53,
222,
222,
5544,
40255,
2527,
244,... | [
"from",
"Ġrandom",
"Ġimport",
"Ġrand",
"int",
"Ċ",
"Ċ",
"cantidad",
"Ġ=",
"Ġint",
"(",
"input",
"(\"",
"Numero",
"Ġde",
"Ġpreg",
"unt",
"as",
":",
"Ġ\"))",
"Ċ",
"cont",
"ador",
"_",
"bi",
"en",
"Ġ=",
"Ġ",
"0",
"Ċ",
"cont",
"ador",
"_",
"mal",
"Ġ=",... | [
1,
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,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9... | [
1,
5,
12,
19,
24,
27,
1,
1,
9,
11,
15,
16,
21,
23,
29,
32,
37,
40,
42,
43,
47,
1,
5,
9,
10,
12,
14,
16,
17,
18,
1,
5,
9,
10,
13,
15,
16,
17,
1,
1,
6,
15,
18,
19,
20,
21,
4,
10,
12,
14,
21,
24,
29,
32,
34,
3... |
18435f43e2f52e3d2e9ff6411f8dd0510d2da54d | a = eval(input("enter a list: "))
n = len(a)
if n % 2 == 0:
for i in range(0, n // 2):
a[i], a[n // 2 + i] = a[n // 2 + i], a[i]
print("after swap:", a)
else:
for i in range(0, n // 2):
a[i], a[n // 2 + i + 1] = a[n // 2 + i + 1], a[i]
print("after swap:", a)
| [
102,
299,
10018,
45,
1151,
459,
1422,
331,
1168,
63,
29583,
222,
115,
299,
2095,
45,
102,
46,
222,
344,
329,
925,
244,
55,
630,
244,
53,
63,
303,
456,
613,
347,
2189,
45,
53,
49,
329,
453,
244,
55,
731,
310,
331,
96,
110,
636,... | [
"a",
"Ġ=",
"Ġeval",
"(",
"input",
"(\"",
"enter",
"Ġa",
"Ġlist",
":",
"Ġ\"))",
"Ċ",
"n",
"Ġ=",
"Ġlen",
"(",
"a",
")",
"Ċ",
"if",
"Ġn",
"Ġ%",
"Ġ",
"2",
"Ġ==",
"Ġ",
"0",
":",
"ĊĠĠĠ",
"Ġfor",
"Ġi",
"Ġin",
"Ġrange",
"(",
"0",
",",
"Ġn",
"Ġ//",
... | [
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,
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... | [
1,
2,
4,
9,
10,
15,
17,
22,
24,
29,
30,
34,
1,
2,
4,
8,
9,
10,
11,
1,
3,
5,
7,
8,
9,
12,
13,
14,
15,
4,
8,
10,
13,
19,
20,
21,
22,
24,
27,
28,
29,
31,
8,
10,
11,
12,
14,
16,
17,
18,
21,
22,
23,
25,
27,
28,
... |
b1ab28a99fdcce66f0a1e4e25821073673f531cf | """
module rational number
"""
def _gcd(num_a, num_b):
"""
gratest common divisor
"""
if num_a == 0 or num_b == 0:
raise ArithmeticError("gcd of zero")
var_p = num_a
var_q = num_b
if var_p < var_q:
var_p = num_b
var_q = num_a
var_r = var_p % var_q
while var_... | [
3012,
222,
1663,
559,
5168,
1470,
222,
3012,
499,
222,
610,
634,
45985,
45,
1538,
100,
102,
49,
1952,
100,
103,
731,
303,
1547,
303,
2935,
5104,
4959,
33443,
303,
1547,
303,
434,
1952,
100,
102,
630,
244,
53,
575,
1952,
100,
103,
... | [
"\"\"\"",
"Ċ",
"module",
"Ġr",
"ational",
"Ġnumber",
"Ċ",
"\"\"\"",
"ĊĊ",
"Ċ",
"def",
"Ġ_",
"gcd",
"(",
"num",
"_",
"a",
",",
"Ġnum",
"_",
"b",
"):",
"ĊĠĠĠ",
"Ġ\"\"\"",
"ĊĠĠĠ",
"Ġgr",
"atest",
"Ġcommon",
"Ġdivisor",
"ĊĠĠĠ",
"Ġ\"\"\"",
"ĊĠĠĠ",
"Ġif",
... | [
1,
1,
2,
2,
2,
2,
2,
3,
3,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
8,
8,
8,
8,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
... | [
1,
4,
1,
7,
9,
16,
23,
1,
4,
1,
1,
4,
6,
9,
10,
13,
14,
15,
16,
20,
21,
22,
24,
4,
8,
4,
7,
12,
19,
27,
4,
8,
4,
7,
11,
12,
13,
16,
17,
18,
21,
25,
26,
27,
30,
31,
32,
33,
8,
14,
25,
30,
32,
35,
38,
43,
4... |
5e0cba6952cdc677c640a0df325426ffc89189cd | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..printer import Printer
class TestSunlumoProjectPrinter(TestCase):
def test_printer(self):
sl_prj = Printer("./sunlumo_mapserver/test_data/test_sunlumo.qgs")
tmpFile = "/tmp/printtmp"
sl_prj.printToPdf(
{
... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
1097,
8532,
51,
881,
1220,
19189,
222,
222,
1097,
4390,
21176,
1220,
45892,
499,
222,
842,
2128,
21599,
42172,
116,
3214,
14379,
45,
7246,
731,
303,
684,
913,
100,
21176,
45,
803,
7... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"test",
"Ġimport",
"ĠTestCase",
"Ċ",
"Ċ",
"from",
"Ġ..",
"printer",
"Ġimport",
"ĠPrinter",
"ĊĊ",
"Ċ",
"class",
"ĠTest",
"Sun",
"lum",
"o",
"Project",
"Printer",
"(... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
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,
... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
5,
12,
13,
17,
24,
33,
1,
1,
5,
8,
15,
22,
30,
1,
1,
6,
11,
14,
17,
18,
25,
32,
33,
41,
43,
4,
8,
13,
14,
21,
22,
26,
28,
8,
11,
12,
15,
17,
25,
29,
32,
35,
36,
37,
40... |
49df9db508637ce5914aa6591178a03c609b6bc7 | import numpy as np
import math
import random
from numpy.linalg import inv
from scipy.optimize import minimize
from Util import to_vector
class TS_RLR:
def __init__(self, alpha):
self.d = 6
self.k = 6
self.alpha = alpha
self.batch_size = 1000
self.training_size = 1000
... | [
485,
6610,
641,
2115,
222,
485,
7820,
222,
485,
4051,
222,
1097,
6610,
51,
21254,
1220,
4712,
222,
1097,
18945,
51,
22990,
1220,
32949,
222,
222,
1097,
7292,
1220,
391,
100,
2423,
499,
222,
842,
18376,
100,
2802,
87,
63,
303,
684,
1... | [
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġmath",
"Ċ",
"import",
"Ġrandom",
"Ċ",
"from",
"Ġnumpy",
".",
"linalg",
"Ġimport",
"Ġinv",
"Ċ",
"from",
"Ġscipy",
".",
"optimize",
"Ġimport",
"Ġminimize",
"Ċ",
"Ċ",
"from",
"ĠUtil",
"Ġimport",
"Ġto",
"_",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
9,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
13,
13... | [
1,
7,
13,
16,
19,
1,
7,
12,
1,
7,
14,
1,
5,
11,
12,
18,
25,
29,
1,
5,
11,
12,
20,
27,
36,
1,
1,
5,
10,
17,
20,
21,
27,
1,
1,
6,
9,
10,
12,
13,
14,
4,
8,
11,
15,
18,
22,
23,
29,
31,
8,
13,
14,
15,
17,
18,
... |
e08159a51b611ce6d0ca354a4fe6759d00af2cb7 | import matplotlib.pyplot as plt
file_list = [
"Quantification_comet_fdr.csv",
"Quantification_crux_fdr.csv",
"Quantification_msfg_fdr.csv",
"Quantification_msfg_percolator.csv",
]
file_titles = ["Comet", "Crux", "MSGFPlus", "MSGFPlus + Percolator"]
protein_list = []
peptides_list = []
for file_name i... | [
485,
13168,
51,
18553,
641,
6020,
222,
222,
781,
100,
687,
299,
447,
303,
332,
17143,
1884,
100,
352,
2580,
100,
3016,
119,
51,
4849,
411,
303,
332,
17143,
1884,
100,
2465,
1677,
100,
3016,
119,
51,
4849,
411,
303,
332,
17143,
1884,... | [
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"Ċ",
"file",
"_",
"list",
"Ġ=",
"Ġ[",
"ĊĠĠĠ",
"Ġ\"",
"Quant",
"ification",
"_",
"co",
"met",
"_",
"fd",
"r",
".",
"csv",
"\",",
"ĊĠĠĠ",
"Ġ\"",
"Quant",
"ification",
"_",
"cr",
"ux",
"_",
"... | [
1,
1,
1,
1,
1,
1,
1,
2,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
7,
18,
19,
25,
28,
32,
1,
1,
5,
6,
10,
12,
14,
4,
6,
11,
20,
21,
23,
26,
27,
29,
30,
31,
34,
36,
4,
6,
11,
20,
21,
23,
25,
26,
28,
29,
30,
33,
35,
4,
6,
11,
20,
21,
23,
25,
26,
28,
29,
30,
33,
35,
4,
6,
... |
887a39f1eeb81e6472938c2451e57866d3ac4a45 | import math
from historia.utils import unique_id, position_in_range
from historia.pops.models.inventory import Inventory
from historia.economy.enums.resource import Good, NaturalResource
from historia.economy.enums.order_type import OrderType
from historia.economy.models.price_range import PriceRange
from historia.econ... | [
485,
7820,
222,
1097,
439,
11005,
923,
51,
2324,
1220,
5823,
100,
333,
49,
2764,
100,
285,
100,
3623,
222,
1097,
439,
11005,
923,
51,
3254,
120,
51,
3404,
51,
12944,
1220,
28474,
222,
1097,
439,
11005,
923,
51,
47936,
126,
51,
20767... | [
"import",
"Ġmath",
"Ċ",
"from",
"Ġh",
"istor",
"ia",
".",
"utils",
"Ġimport",
"Ġunique",
"_",
"id",
",",
"Ġposition",
"_",
"in",
"_",
"range",
"Ċ",
"from",
"Ġh",
"istor",
"ia",
".",
"pop",
"s",
".",
"models",
".",
"inventory",
"Ġimport",
"ĠInventory",
... | [
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,
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,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
7,
12,
1,
5,
7,
12,
14,
15,
20,
27,
34,
35,
37,
38,
47,
48,
50,
51,
56,
1,
5,
7,
12,
14,
15,
18,
19,
20,
26,
27,
36,
43,
53,
1,
5,
7,
12,
14,
15,
21,
22,
23,
28,
29,
37,
44,
49,
50,
58,
66,
1,
5,
7,
12,
... |
3b3f423cfb08413a4135646ea4d3d6dcb5d0cc10 | # Based on https://dev.to/jemaloqiu/design-pattern-in-python-2-observer-j4
class AbstractObservable:
"""
Abstract Observable
"""
def __init__(self):
self.__observers = []
def add_observer(self, observer):
self.__observers.append(observer)
def remove_observer(self, observer):... | [
40,
24325,
563,
1698,
574,
1920,
51,
471,
52,
49150,
9553,
16384,
122,
52,
7192,
50,
5622,
50,
285,
50,
2980,
50,
55,
50,
21250,
50,
111,
57,
499,
222,
842,
7406,
11598,
63,
303,
1547,
303,
7406,
10525,
303,
1547,
465,
684,
1176,
... | [
"#",
"ĠBased",
"Ġon",
"Ġhttps",
"://",
"dev",
".",
"to",
"/",
"jem",
"alo",
"qi",
"u",
"/",
"design",
"-",
"pattern",
"-",
"in",
"-",
"python",
"-",
"2",
"-",
"observer",
"-",
"j",
"4",
"ĊĊ",
"Ċ",
"class",
"ĠAbstract",
"Observable",
":",
"ĊĠĠĠ",
... | [
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,
3,
4,
4,
4,
4,
4,
5,
5,
6,
6,
6,
7,
7,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
12,
12,
12,
12,
12,
... | [
1,
2,
8,
11,
17,
20,
23,
24,
26,
27,
30,
33,
35,
36,
37,
43,
44,
51,
52,
54,
55,
61,
62,
63,
64,
72,
73,
74,
75,
1,
1,
6,
15,
25,
26,
4,
8,
4,
13,
24,
4,
8,
4,
8,
11,
15,
18,
22,
24,
8,
13,
16,
18,
25,
27,
... |
9d3439a2be1f22c8ec59923b88ac22877a4f13e8 | n, x = input().split()
n = int(n)
x = int(x)
m = [int(i) for i in input().split()]
m.sort(reverse=True)
i = 0
res = 0
while x > 0:
res += max(0, m[i])
m[i] -= 1
x -= 1
if m[i % n] < m[(i + 1) % n]:
i = (i + 1) % n
print(res)
| [
115,
49,
837,
299,
1533,
941,
3045,
365,
222,
115,
299,
648,
45,
115,
46,
222,
125,
299,
648,
45,
125,
46,
222,
114,
299,
447,
429,
45,
110,
46,
456,
613,
347,
1533,
941,
3045,
7688,
222,
114,
51,
3349,
45,
9845,
66,
1844,
46,... | [
"n",
",",
"Ġx",
"Ġ=",
"Ġinput",
"().",
"split",
"()",
"Ċ",
"n",
"Ġ=",
"Ġint",
"(",
"n",
")",
"Ċ",
"x",
"Ġ=",
"Ġint",
"(",
"x",
")",
"Ċ",
"m",
"Ġ=",
"Ġ[",
"int",
"(",
"i",
")",
"Ġfor",
"Ġi",
"Ġin",
"Ġinput",
"().",
"split",
"()]",
"Ċ",
"m",
... | [
1,
1,
1,
1,
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,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
9,
10,
10,
10,
10,... | [
1,
2,
3,
5,
7,
13,
16,
21,
23,
1,
2,
4,
8,
9,
10,
11,
1,
2,
4,
8,
9,
10,
11,
1,
2,
4,
6,
9,
10,
11,
12,
16,
18,
21,
27,
30,
35,
38,
1,
2,
3,
7,
8,
15,
16,
20,
21,
1,
1,
2,
4,
5,
6,
1,
4,
6,
7,
8,
1,
... |
6b2fc94d9a53b8f669cab5e1fb625dd01e20ba98 | """Splits the google speech commands into train, validation and test sets."""
import os
import shutil
import argparse
def move_files(src_folder, to_folder, list_file):
with open(list_file) as f:
for line in f.readlines():
line = line.rstrip()
dirname = os.path.dirname(line)
... | [
3012,
16371,
1526,
341,
9293,
24962,
6364,
2012,
5877,
49,
6929,
480,
913,
6930,
7128,
222,
222,
485,
2355,
222,
485,
23074,
222,
485,
16693,
499,
222,
610,
5187,
100,
2558,
45,
1634,
100,
6204,
49,
391,
100,
6204,
49,
1168,
100,
78... | [
"\"\"\"",
"Spl",
"its",
"Ġthe",
"Ġgoogle",
"Ġspeech",
"Ġcommands",
"Ġinto",
"Ġtrain",
",",
"Ġvalidation",
"Ġand",
"Ġtest",
"Ġsets",
".\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġos",
"Ċ",
"import",
"Ġshutil",
"Ċ",
"import",
"Ġargparse",
"ĊĊ",
"Ċ",
"def",
"Ġmove",
"_",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
... | [
1,
4,
7,
10,
14,
21,
28,
37,
42,
48,
49,
60,
64,
69,
74,
78,
1,
1,
7,
10,
1,
7,
14,
1,
7,
16,
1,
1,
4,
9,
10,
15,
16,
19,
20,
26,
27,
30,
31,
37,
38,
43,
44,
48,
50,
4,
9,
14,
15,
19,
20,
24,
25,
28,
30,
31... |
3e1540a06c478d471f6e6a190cadc44d5c4c2467 | import time as t
class Record:
def __init__(self, value=10, name="name"):
self.id = name
self.value = value
def __get__(self, instance, owner):
with open("record.txt", "a") as f:
msg = "读取变量%s " % self.id
tmp = t.localtime()[:6]
form = ["年", "月", "... | [
485,
1153,
641,
292,
499,
222,
842,
9807,
63,
303,
684,
1176,
1683,
3232,
803,
49,
804,
66,
54,
53,
49,
655,
366,
444,
10320,
310,
649,
51,
333,
299,
655,
310,
649,
51,
872,
299,
804,
465,
684,
1176,
390,
3232,
803,
49,
1998,
... | [
"import",
"Ġtime",
"Ġas",
"Ġt",
"ĊĊ",
"Ċ",
"class",
"ĠRecord",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġvalue",
"=",
"1",
"0",
",",
"Ġname",
"=\"",
"name",
"\"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"id",
"Ġ=",
"Ġname",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"... | [
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
7,
12,
15,
17,
1,
1,
6,
13,
14,
4,
8,
11,
15,
18,
22,
23,
29,
30,
31,
32,
33,
38,
40,
44,
47,
8,
13,
14,
16,
18,
23,
8,
13,
14,
19,
21,
27,
4,
8,
11,
14,
17,
21,
22,
31,
32,
38,
40,
8,
13,
18,
20,
26,
27,
... |
ba216642935d19b85e379b66fb514854ebcdedd9 | #!/usr/bin/env python3
import subprocess
import sys
import pickle
if len(sys.argv) != 3:
print("Usage: std_dev_eval.py <std_dir> <ans>")
quit()
std_dir = sys.argv[1]
std_ans = sys.argv[2]
subprocess.call("rm -f {}/result".format(std_dir), shell=True)
op_f = open("{}/jobs".format(std_dir), "w")
command = "u... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
56,
222,
485,
16606,
222,
485,
5263,
222,
485,
19892,
222,
222,
344,
2095,
45,
3750,
51,
6129,
46,
882,
244,
56,
63,
303,
1489,
459,
6786,
63,
1248,
100,
1920,
100,
6635,
51,
997,
350,
1550,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"3",
"Ċ",
"import",
"Ġsubprocess",
"Ċ",
"import",
"Ġsys",
"Ċ",
"import",
"Ġpickle",
"Ċ",
"Ċ",
"if",
"Ġlen",
"(",
"sys",
".",
"argv",
")",
"Ġ!=",
"Ġ",
"3",
":",
"ĊĠĠĠ",
"Ġprint",
"(\"",
"Usage",
":",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
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,
7,
7,
7,
7,
8,
8,
8,
9,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
4,
7,
8,
11,
12,
15,
22,
23,
1,
7,
18,
1,
7,
11,
1,
7,
14,
1,
1,
3,
7,
8,
11,
12,
16,
17,
20,
21,
22,
23,
4,
10,
12,
17,
18,
22,
23,
26,
27,
31,
32,
34,
36,
39,
40,
43,
44,
46,
49,
52,
4,
9,
11,
1,
1,
... |
cd104eec21be8a59e8fb3bd8ab061dd357fc126a | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: xurongzhong#126.com 技术支持qq群:6089740
# CreateDate: 2018-3-27
# pillow_rotate.py
import glob
import os
from PIL import Image
def rotate(files, dst, value=90):
for file_ in files:
img = Image.open(file_)
img = img.rotate(value)
name = "{... | [
8758,
3392,
52,
1793,
52,
2980,
56,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
6265,
63,
283,
837,
324,
805,
7322,
805,
40,
54,
55,
59,
51,
527,
29885,
246,
18955,
12915,
10903,
20415,
3111,
59,
53,
61,
62,
60,
57,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"python",
"3",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠAuthor",
":",
"ĠĠĠ",
"Ġx",
"ur",
"ong",
"zh",
"ong",
"#",
"1",
"2",
"6",
".",
"com",
"ĠæĬ",
"Ģ",
"æľ¯",
"æĶ¯æĮģ",
"qq",
"群... | [
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,
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,
5,
5... | [
1,
4,
7,
8,
11,
12,
18,
19,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
9,
10,
13,
15,
17,
20,
22,
25,
26,
27,
28,
29,
30,
33,
34,
35,
36,
38,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
1,
2,
9,
13,
14,
15,
16,
17,
... |
b1c06e9c5516a378c0bbce2ce9e17afaeae01928 | import re
# Class with static regex compilations
class RegexCompiles:
# regex for finding product-id in an EMAG link
re_compile_product_id = re.compile("Product-Id=[0-9]*")
# regex for finding the first number
re_compile_id = re.compile("[0-9]+")
# Verifies if a word exists in a text
def find_whole_... | [
485,
334,
499,
222,
40,
1727,
642,
924,
9679,
25376,
1014,
222,
842,
18035,
1000,
6924,
63,
303,
607,
9679,
456,
17368,
4072,
50,
333,
347,
619,
535,
7536,
2572,
303,
334,
100,
7028,
100,
2463,
100,
333,
299,
334,
51,
7028,
459,
3... | [
"import",
"Ġre",
"ĊĊ",
"Ċ",
"#",
"ĠClass",
"Ġwith",
"Ġstatic",
"Ġregex",
"Ġcompil",
"ations",
"Ċ",
"class",
"ĠRegex",
"Comp",
"iles",
":",
"ĊĠĠĠ",
"Ġ#",
"Ġregex",
"Ġfor",
"Ġfinding",
"Ġproduct",
"-",
"id",
"Ġin",
"Ġan",
"ĠE",
"MAG",
"Ġlink",
"ĊĠĠĠ",
"Ġre... | [
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,
6,
6,
6,
6,
6,
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,
8,
8,
8,
8,
8,
8,
9,
9,
9... | [
1,
7,
10,
1,
1,
2,
8,
13,
20,
26,
33,
39,
1,
6,
12,
16,
20,
21,
4,
6,
12,
16,
24,
32,
33,
35,
38,
41,
43,
46,
51,
4,
7,
8,
15,
16,
23,
24,
26,
28,
31,
32,
39,
41,
48,
49,
51,
53,
54,
55,
56,
58,
60,
4,
6,
1... |
4a88ce640b6680df925288b44232cf43d585c11c | from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
from datasets import concatenate_datasets
from datasets.arrow_dataset import Dataset
from transfer_classifier.dataset_preprocessor.classification_dataset_preprocessor import (
ClassificationDatasetPreprocessor,
)
from transf... | [
1097,
12018,
1220,
6213,
49,
14609,
49,
1701,
49,
5663,
49,
11724,
49,
16546,
222,
222,
485,
6610,
641,
2115,
222,
485,
5665,
222,
1097,
15695,
1220,
48644,
100,
15461,
222,
1097,
15695,
51,
6477,
100,
5709,
1220,
19265,
222,
1097,
88... | [
"from",
"Ġtyping",
"Ġimport",
"ĠAny",
",",
"ĠDict",
",",
"ĠList",
",",
"ĠOptional",
",",
"ĠTuple",
",",
"ĠUnion",
"Ċ",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġtorch",
"Ċ",
"from",
"Ġdatasets",
"Ġimport",
"Ġconcatenate",
"_",
"datasets",
"Ċ"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
4,
4,
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,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
9... | [
1,
5,
12,
19,
23,
24,
29,
30,
35,
36,
45,
46,
52,
53,
59,
1,
1,
7,
13,
16,
19,
1,
7,
13,
1,
5,
14,
21,
33,
34,
42,
1,
5,
14,
15,
20,
21,
28,
35,
43,
1,
5,
14,
15,
25,
26,
33,
34,
46,
47,
61,
62,
69,
70,
82,
... |
58d069f6700149793c3446bdd4677f08eaf301ee | """A utility for outputting graphs as pickle files.
To test, run ``openbiolink generate --no-download --no-input --output-format pickle --qual hq``.
"""
import os
import pickle
from typing import Mapping
from openbiolink.edge import Edge
from openbiolink.graph_creation.graph_writer.base import GraphWriter
__all__ =... | [
3012,
70,
15479,
456,
1716,
1073,
26710,
641,
19892,
2293,
51,
222,
222,
724,
913,
49,
1441,
4122,
1693,
6539,
381,
783,
4468,
790,
1365,
50,
5000,
790,
1365,
50,
1151,
790,
2051,
50,
1664,
19892,
790,
958,
439,
118,
16696,
222,
301... | [
"\"\"\"",
"A",
"Ġutility",
"Ġfor",
"Ġoutput",
"ting",
"Ġgraphs",
"Ġas",
"Ġpickle",
"Ġfiles",
".",
"Ċ",
"Ċ",
"To",
"Ġtest",
",",
"Ġrun",
"Ġ``",
"open",
"bi",
"ol",
"ink",
"Ġgenerate",
"Ġ--",
"no",
"-",
"download",
"Ġ--",
"no",
"-",
"input",
"Ġ--",
"outp... | [
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,
3,
3,
3,
3,
3,
3,
4,
4,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
8,
8,
9,
10,
10,
10,
10,
10,
1... | [
1,
4,
5,
13,
17,
24,
28,
35,
38,
45,
51,
52,
1,
1,
3,
8,
9,
13,
16,
20,
22,
24,
27,
36,
39,
41,
42,
50,
53,
55,
56,
61,
64,
70,
71,
77,
84,
87,
91,
93,
94,
97,
1,
4,
1,
1,
7,
10,
1,
7,
14,
1,
5,
12,
19,
27,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.