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 |
|---|---|---|---|---|---|
e14bea6376c8649bf9c9c5759d530af773664cd4 | #!/usr/bin/env python3
import pandas as pd
import csv
def get_apriori_input(input_file, output_file, sample_col="Sample", gene_id_col="Gene_ID"):
df = pd.read_csv(input_file, sep="\t")
sample_names = df[sample_col].unique()
with open(output_file, "w") as out:
csv_writer = csv.writer(out, delimiter... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
56,
222,
485,
13247,
641,
6451,
222,
485,
11490,
499,
222,
610,
640,
100,
386,
363,
15860,
100,
1151,
45,
1151,
100,
781,
49,
1716,
100,
781,
49,
4002,
100,
770,
366,
5209,
411,
17849,
100,
33... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"3",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġcsv",
"ĊĊ",
"Ċ",
"def",
"Ġget",
"_",
"ap",
"ri",
"ori",
"_",
"input",
"(",
"input",
"_",
"file",
",",
"Ġoutput",
"_",
"file",
",",
"Ġsa... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
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,
7,
7,
7,
7... | [
1,
4,
7,
8,
11,
12,
15,
22,
23,
1,
7,
14,
17,
20,
1,
7,
11,
1,
1,
4,
8,
9,
11,
13,
16,
17,
22,
23,
28,
29,
33,
34,
41,
42,
46,
47,
54,
55,
58,
60,
66,
68,
73,
74,
76,
77,
80,
82,
86,
87,
89,
92,
4,
7,
9,
12... |
462d73195680118d19a3d4e8a855e65aaeecb3c6 | import time
class DISTRICT:
def __init__(
self,
cdcode,
county,
district,
street,
city,
zipcode,
state,
mailstreet,
mailcity,
mailzip,
mailstate,
phone,
extphone,
faxnumber,
email,
... | [
485,
1153,
499,
222,
842,
9446,
22965,
63,
303,
684,
1176,
1683,
3232,
310,
649,
49,
310,
9121,
707,
49,
310,
2409,
126,
49,
310,
37614,
49,
310,
26494,
49,
310,
11353,
49,
310,
8617,
707,
49,
310,
1621,
49,
310,
10863,
16978,
49,... | [
"import",
"Ġtime",
"ĊĊ",
"Ċ",
"class",
"ĠDI",
"STRICT",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
",",
"ĊĠĠĠĠĠĠĠ",
"Ġcd",
"code",
",",
"ĊĠĠĠĠĠĠĠ",
"Ġcount",
"y",
",",
"ĊĠĠĠĠĠĠĠ",
"Ġdistrict",
",",
"ĊĠĠĠĠĠĠĠ",
"Ġstreet",
",",
"ĊĠĠĠĠĠĠĠ... | [
1,
1,
1,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9,
10,
10,
10,
11,
11,
11,
12,
12,
12,
12,
13,
13,
13,
14,
14,
14,
14,
15,
15,
15,
15,
16,
16,
16,
16,
17,
17,
17,
17,
18... | [
1,
7,
12,
1,
1,
6,
9,
15,
16,
4,
8,
11,
15,
18,
8,
13,
14,
8,
11,
15,
16,
8,
14,
15,
16,
8,
17,
18,
8,
15,
16,
8,
13,
14,
8,
12,
16,
17,
8,
14,
15,
8,
13,
19,
20,
8,
13,
17,
18,
8,
13,
16,
17,
8,
13,
18,
... |
e884825325ceb401142cab0618d9d4e70e475cf5 | #!/usr/bin/env python
import sys, re
window = 2
for line in sys.stdin:
line = line.strip()
twits = line.split()
i = 0
while i < len(twits):
j = 0
while j < len(twits):
if i != j:
print("%s%s\t%d" % (twits[i] + " ", twits[j], 1))
j += 1
i... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
222,
485,
5263,
49,
334,
222,
222,
3537,
299,
244,
55,
222,
222,
999,
1646,
347,
5263,
51,
21660,
63,
303,
1646,
299,
1646,
51,
7237,
365,
303,
8224,
1526,
299,
1646,
51,
3045,
365,
303,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"Ċ",
"import",
"Ġsys",
",",
"Ġre",
"Ċ",
"Ċ",
"window",
"Ġ=",
"Ġ",
"2",
"Ċ",
"Ċ",
"for",
"Ġline",
"Ġin",
"Ġsys",
".",
"stdin",
":",
"ĊĠĠĠ",
"Ġline",
"Ġ=",
"Ġline",
".",
"strip",
"()",
"ĊĠĠĠ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
1,
7,
11,
12,
15,
1,
1,
7,
9,
10,
11,
1,
1,
4,
9,
12,
16,
17,
22,
23,
4,
9,
11,
16,
17,
22,
24,
4,
7,
10,
12,
17,
18,
23,
25,
4,
6,
8,
9,
10,
4,
10,
12,
14,
18,
19,
21,
24,
... |
9d6b5baa8462b2996e4518dd39b5bb1efde1fd9d | # -*- coding: utf-8 -*-
# Enter your code here. Read input from STDIN. Print output to STDOUT
n = input()
vals = list(map(int, input().split()))
def median(values):
n = len(values)
values = sorted(values)
if n % 2 == 1:
return values[(n + 1) // 2 - 1]
else:
return int(sum(values[int((... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
11426,
1390,
1361,
2464,
51,
4858,
1533,
664,
10978,
540,
51,
9232,
1716,
391,
3860,
24951,
222,
222,
115,
299,
1533,
365,
222,
9437,
299,
1168,
45,
1130,
45,
429,
49,
1533,
941,
3... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠEnter",
"Ġyour",
"Ġcode",
"Ġhere",
".",
"ĠRead",
"Ġinput",
"Ġfrom",
"ĠSTD",
"IN",
".",
"ĠPrint",
"Ġoutput",
"Ġto",
"ĠST",
"DOUT",
"Ċ",
"Ċ",
"n",
"Ġ=",
"Ġinput",
"()",
"Ċ",
"vals",
"... | [
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,
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,
... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
8,
13,
18,
23,
24,
29,
35,
40,
44,
46,
47,
53,
60,
63,
66,
70,
1,
1,
2,
4,
10,
12,
1,
5,
7,
12,
13,
16,
17,
20,
21,
27,
30,
35,
39,
1,
1,
4,
11,
12,
18,
20,
4,
6,
8,
... |
624b34d160ea6db4f5249544f1614a20f506ca9e | import PySimpleGUI as sg
class TelaLisatrClientes:
def __init__(self):
self.__window = None
def init_components(self, lista_clientes):
layout = [[sg.Text("Dados do cliente")], [sg.Listbox(values=lista_clientes, size=(60, 10))], [sg.Submit()]]
self.__window = sg.Window("Lista de clien... | [
485,
4374,
5302,
10586,
641,
22481,
499,
222,
842,
413,
18042,
81,
316,
288,
119,
1503,
326,
63,
303,
684,
1176,
1683,
3232,
803,
731,
310,
649,
3688,
3537,
299,
1686,
465,
684,
3238,
100,
3545,
45,
803,
49,
16332,
100,
1598,
326,
... | [
"import",
"ĠPy",
"Simple",
"GUI",
"Ġas",
"Ġsg",
"ĊĊ",
"Ċ",
"class",
"ĠT",
"ela",
"L",
"is",
"at",
"r",
"Client",
"es",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".__",
"window",
"Ġ=",
"ĠNone",
"ĊĊĠĠĠ",
"Ġdef",
"Ġin... | [
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
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,
9,
9,
9,
9... | [
1,
7,
10,
16,
19,
22,
25,
1,
1,
6,
8,
11,
12,
14,
16,
17,
23,
25,
26,
4,
8,
11,
15,
18,
22,
24,
8,
13,
16,
22,
24,
29,
4,
8,
13,
14,
24,
25,
29,
30,
36,
37,
43,
45,
47,
8,
15,
17,
20,
22,
23,
27,
29,
34,
37,
... |
d9156c20e046f608563bc6779575e14cc60f4c25 | from django.core.urlresolvers import reverse
from keptar import settings
import os, os.path
import Image
try:
from collections import OrderedDict
except ImportError:
from keptar.odict import OrderedDict
class AccessDenied(Exception):
pass
class FileNotFound(Exception):
pass
class NotDirectory(Exc... | [
1097,
8532,
51,
1284,
51,
983,
46710,
1220,
10170,
222,
1097,
21318,
301,
1220,
4086,
222,
485,
2355,
49,
2355,
51,
1005,
222,
485,
4393,
222,
222,
1287,
63,
303,
664,
13722,
1220,
34279,
222,
7364,
29994,
63,
303,
664,
21318,
301,
... | [
"from",
"Ġdjango",
".",
"core",
".",
"url",
"resolvers",
"Ġimport",
"Ġreverse",
"Ċ",
"from",
"Ġkept",
"ar",
"Ġimport",
"Ġsettings",
"Ċ",
"import",
"Ġos",
",",
"Ġos",
".",
"path",
"Ċ",
"import",
"ĠImage",
"Ċ",
"Ċ",
"try",
":",
"ĊĠĠĠ",
"Ġfrom",
"Ġcollectio... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12,
12,
12,
12,
13,
13,
15,
16,
16,
... | [
1,
5,
12,
13,
17,
18,
21,
30,
37,
45,
1,
5,
10,
12,
19,
28,
1,
7,
10,
11,
14,
15,
19,
1,
7,
13,
1,
1,
4,
5,
4,
9,
21,
28,
40,
1,
7,
19,
20,
4,
9,
14,
16,
17,
19,
22,
29,
41,
1,
1,
6,
13,
19,
20,
29,
31,
4... |
5193de15052f81460a23d993cfa039fa90c9de5e | """
Copyright (C) 2014, Jill Huchital
"""
# test comment
from flask import Flask
from flask import render_template
from flask import jsonify
from flask import request
from playlists import get_all_playlists, create_playlists, get_all_categories, add_new_category, add_new_topic, get_all_topics
from db import connect_... | [
3012,
222,
10585,
327,
72,
46,
244,
55,
53,
54,
57,
49,
990,
747,
696,
2032,
4729,
222,
3012,
222,
222,
40,
913,
5101,
222,
222,
1097,
18958,
1220,
24033,
222,
1097,
18958,
1220,
2922,
100,
2402,
222,
1097,
18958,
1220,
35206,
222,
... | [
"\"\"\"",
"Ċ",
"Copyright",
"Ġ(",
"C",
")",
"Ġ",
"2",
"0",
"1",
"4",
",",
"ĠJ",
"ill",
"ĠH",
"uch",
"ital",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"#",
"Ġtest",
"Ġcomment",
"Ċ",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"Ġrend... | [
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,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
... | [
1,
4,
1,
10,
12,
13,
14,
15,
16,
17,
18,
19,
20,
22,
25,
27,
30,
34,
1,
4,
1,
1,
2,
7,
15,
1,
1,
5,
11,
18,
24,
1,
5,
11,
18,
25,
26,
34,
1,
5,
11,
18,
26,
1,
5,
11,
18,
26,
1,
1,
5,
10,
15,
22,
26,
27,
3... |
acbe9a9501c6a8532249496f327c2470c1d2f8e0 | import math
import backtrader as bt
from datetime import datetime
from bots.TelegramBot import TelegramBot
import logging
class Volume(bt.Strategy):
params = (("avg_volume_period", 10), ("ticker", "hpg"), ("ratio", 1.25))
def __init__(self):
self.mysignal = (
self.data.volume / bt.ind.Ave... | [
485,
7820,
222,
485,
1769,
378,
839,
641,
18389,
222,
1097,
7181,
1220,
7181,
222,
1097,
48572,
51,
44882,
9037,
1220,
44572,
9037,
222,
485,
5751,
499,
222,
842,
18724,
45,
8057,
51,
8095,
731,
303,
2822,
299,
33268,
10218,
100,
7259... | [
"import",
"Ġmath",
"Ċ",
"import",
"Ġback",
"tr",
"ader",
"Ġas",
"Ġbt",
"Ċ",
"from",
"Ġdatetime",
"Ġimport",
"Ġdatetime",
"Ċ",
"from",
"Ġbots",
".",
"Telegram",
"Bot",
"Ġimport",
"ĠTelegram",
"Bot",
"Ċ",
"import",
"Ġlogging",
"ĊĊ",
"Ċ",
"class",
"ĠVolume",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
12,
1,
7,
12,
14,
18,
21,
24,
1,
5,
14,
21,
30,
1,
5,
10,
11,
19,
22,
29,
38,
41,
1,
7,
15,
1,
1,
6,
13,
14,
16,
17,
25,
27,
4,
11,
13,
17,
20,
21,
27,
28,
34,
36,
37,
38,
39,
41,
44,
50,
52,
54,
55,
... |
e37f4422c1063df50453f7abf72a0a9a31156d8b | from locations.storefinders.stockinstore import StockInStoreSpider
class ScooterHutAUSpider(StockInStoreSpider):
name = "scooter_hut_au"
item_attributes = {"brand": "Scooter Hut", "brand_wikidata": "Q117747623"}
api_site_id = "10112"
api_widget_id = "119"
api_widget_type = "product"
api_origin... | [
1097,
14357,
51,
15522,
631,
37327,
51,
9773,
285,
2173,
1220,
22460,
402,
2796,
45084,
499,
222,
842,
377,
352,
27456,
77,
322,
70,
2062,
117,
1411,
45,
14050,
402,
2796,
45084,
731,
303,
655,
299,
332,
38152,
27456,
100,
49149,
100,... | [
"from",
"Ġlocations",
".",
"sto",
"ref",
"inders",
".",
"stock",
"in",
"store",
"Ġimport",
"ĠStock",
"In",
"Store",
"Spider",
"ĊĊ",
"Ċ",
"class",
"ĠS",
"co",
"oter",
"H",
"ut",
"A",
"US",
"p",
"ider",
"(",
"Stock",
"In",
"Store",
"Spider",
"):",
"ĊĠĠ... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
5,
15,
16,
19,
22,
28,
29,
34,
36,
41,
48,
54,
56,
61,
67,
1,
1,
6,
8,
10,
14,
15,
17,
18,
20,
21,
25,
26,
31,
33,
38,
44,
46,
4,
9,
11,
13,
16,
20,
21,
24,
25,
27,
28,
4,
9,
10,
20,
22,
25,
30,
32,
34,
35... |
502e0f0c6376617dc094fcdd47bea9773d011864 | def filter_lines(in_filename, in_filename2, out_filename):
"""Read records from in_filename and write records to out_filename if
the beginning of the line (taken up to the first comma at or after
position 11) is found in keys (which must be a set of byte strings).
"""
proper_convert = 0
missing... | [
610,
2785,
100,
4466,
45,
285,
100,
3633,
49,
347,
100,
3633,
55,
49,
986,
100,
3633,
731,
303,
1547,
2248,
9233,
664,
347,
100,
3633,
480,
2886,
9233,
391,
986,
100,
3633,
434,
303,
341,
13681,
451,
341,
1646,
327,
36930,
992,
39... | [
"def",
"Ġfilter",
"_",
"lines",
"(",
"in",
"_",
"filename",
",",
"Ġin",
"_",
"filename",
"2",
",",
"Ġout",
"_",
"filename",
"):",
"ĊĠĠĠ",
"Ġ\"\"\"",
"Read",
"Ġrecords",
"Ġfrom",
"Ġin",
"_",
"filename",
"Ġand",
"Ġwrite",
"Ġrecords",
"Ġto",
"Ġout",
"_",
... | [
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,
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... | [
1,
4,
11,
12,
17,
18,
20,
21,
29,
30,
33,
34,
42,
43,
44,
48,
49,
57,
59,
4,
8,
12,
20,
25,
28,
29,
37,
41,
47,
55,
58,
62,
63,
71,
74,
4,
8,
18,
21,
25,
30,
32,
37,
40,
43,
47,
53,
59,
62,
65,
71,
4,
13,
14,
... |
a17abd3947a946daf2c453c120f2e79d2ba60778 | # 赛场统分
# 【问题】在编程竞赛中,有10个评委为参赛的选手打分,分数为0 ~ 100分。
# 选手最后得分为:去掉一个最高分和一个最低分后其余8个分数的平均值。请编写一个程序实现。
sc_lst = []
i = 1
while len(sc_lst) < 10:
try:
sc = int(input("请第%d位评委打分:" % i))
if sc > 0 and sc < 101:
sc_lst.append(sc)
i += 1
else:
print("超出范围,输入无效")
ex... | [
40,
244,
39049,
17989,
8960,
4519,
222,
40,
41971,
12065,
21132,
2924,
43348,
5253,
276,
39049,
3011,
1140,
3052,
54,
53,
2678,
21138,
35469,
3397,
6481,
39049,
1096,
8063,
11341,
12394,
4519,
1140,
4519,
2378,
3397,
53,
3182,
244,
54,
... | [
"#",
"Ġ",
"èµĽ",
"åľº",
"绣",
"åĪĨ",
"Ċ",
"#",
"ĠãĢIJ",
"éĹ®é¢ĺ",
"ãĢij",
"åľ¨",
"ç¼ĸç¨ĭ",
"ç«",
"ŀ",
"èµĽ",
"ä¸Ń",
"ï¼Į",
"æľī",
"1",
"0",
"个",
"è¯Ħ",
"å§Ķ",
"为",
"åıĤ",
"èµĽ",
"çļĦ",
"éĢī",
"æīĭ",
"æīĵ",
"åĪĨ",
"ï¼Į",
"åĪĨ",
"æķ°",
"为",
... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3... | [
1,
2,
3,
4,
5,
6,
7,
1,
2,
4,
6,
7,
8,
10,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
35,
36,
37,
38,
39,
40,
41,
1,
2,
3,
4,
5,
7,
8,
9,
10,
11,
12,
1... |
04670041dab49f8c2d4a0415030356e7ea92925f | from tempfile import mkdtemp
from shutil import rmtree
from os.path import join
import os
MAX_UNCOMPRESSED_SIZE = 100e6 # 100MB
# Extracts a zipfile into a directory safely
class ModelExtractor(object):
def __init__(self, modelzip):
self.modelzip = modelzip
def __enter__(self):
if not self.... | [
1097,
29651,
1220,
8670,
105,
1452,
222,
1097,
23074,
1220,
559,
41736,
222,
1097,
2355,
51,
1005,
1220,
7163,
222,
485,
2355,
222,
222,
3470,
100,
1430,
38495,
100,
3382,
299,
244,
54,
53,
53,
106,
59,
244,
607,
244,
54,
53,
53,
... | [
"from",
"Ġtempfile",
"Ġimport",
"Ġmk",
"d",
"temp",
"Ċ",
"from",
"Ġshutil",
"Ġimport",
"Ġr",
"mtree",
"Ċ",
"from",
"Ġos",
".",
"path",
"Ġimport",
"Ġjoin",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"MAX",
"_",
"UN",
"COMPRESSED",
"_",
"SIZE",
"Ġ=",
"Ġ",
"1",
"0... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
5,
14,
21,
24,
25,
29,
1,
5,
12,
19,
21,
26,
1,
5,
8,
9,
13,
20,
25,
1,
7,
10,
1,
1,
4,
5,
7,
17,
18,
22,
24,
25,
26,
27,
28,
29,
30,
31,
33,
34,
35,
36,
37,
39,
1,
1,
2,
10,
11,
13,
17,
21,
26,
28,
38,
... |
cf3b66a635c6549553af738f263b035217e75a7a | count = 0
def merge(a, b):
global count
c = []
h = j = 0
while j < len(a) and h < len(b):
if a[j] <= b[h]:
c.append(a[j])
j += 1
else:
count += len(a[j:])
c.append(b[h])
h += 1
if j == len(a):
for i in b[h:]:
... | [
1016,
299,
244,
53,
499,
222,
610,
4009,
45,
102,
49,
342,
731,
303,
3671,
2409,
303,
300,
299,
1627,
303,
439,
299,
614,
299,
244,
53,
303,
2236,
614,
350,
2095,
45,
102,
46,
480,
439,
350,
2095,
45,
103,
731,
310,
434,
331,
... | [
"count",
"Ġ=",
"Ġ",
"0",
"ĊĊ",
"Ċ",
"def",
"Ġmerge",
"(",
"a",
",",
"Ġb",
"):",
"ĊĠĠĠ",
"Ġglobal",
"Ġcount",
"ĊĠĠĠ",
"Ġc",
"Ġ=",
"Ġ[]",
"ĊĠĠĠ",
"Ġh",
"Ġ=",
"Ġj",
"Ġ=",
"Ġ",
"0",
"ĊĠĠĠ",
"Ġwhile",
"Ġj",
"Ġ<",
"Ġlen",
"(",
"a",
")",
"Ġand",
"Ġh",... | [
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
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,
10,
10,
... | [
1,
6,
8,
9,
10,
1,
1,
4,
10,
11,
12,
13,
15,
17,
4,
11,
17,
4,
6,
8,
11,
4,
6,
8,
10,
12,
13,
14,
4,
10,
12,
14,
18,
19,
20,
21,
25,
27,
29,
33,
34,
35,
37,
8,
11,
13,
14,
15,
16,
19,
21,
22,
23,
25,
12,
14... |
d2298ad1e4737b983ba6d1f2fff59750137510b5 | import json
import os
import uuid
from django.core.files.uploadedfile import SimpleUploadedFile
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from nautobot.dcim.models import Site
from nautobot.extras.choices import JobResultStatusChoices
from nautobot.extras.jobs import ... | [
485,
2379,
222,
485,
2355,
222,
485,
11168,
222,
222,
1097,
8532,
51,
1284,
51,
2558,
51,
30933,
781,
1220,
7169,
32908,
991,
222,
1097,
8532,
51,
2982,
1220,
4086,
222,
1097,
8532,
51,
12060,
51,
1304,
2529,
51,
3404,
1220,
38672,
... | [
"import",
"Ġjson",
"Ċ",
"import",
"Ġos",
"Ċ",
"import",
"Ġuuid",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"core",
".",
"files",
".",
"uploaded",
"file",
"Ġimport",
"ĠSimple",
"Uploaded",
"File",
"Ċ",
"from",
"Ġdjango",
".",
"conf",
"Ġimport",
"Ġsettings",
"Ċ",
... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
... | [
1,
7,
12,
1,
7,
10,
1,
7,
12,
1,
1,
5,
12,
13,
17,
18,
23,
24,
32,
36,
43,
50,
58,
62,
1,
5,
12,
13,
17,
24,
33,
1,
5,
12,
13,
20,
21,
28,
33,
34,
40,
47,
59,
1,
1,
5,
7,
10,
14,
15,
17,
19,
20,
26,
33,
38,... |
48f2cc5b6d53c7317ad882947cabbc367cda0fb7 | import random
import numpy as np
import pandas as pd
def linear_combination_plus_error(X, num_dependent_cols=5, parameter_mean=0, parameter_std=1, error_mean=0, error_std=1):
"""
Generate a column that is a random linear combination of
X1, X2 and X3 plus some random error
"""
length = X.shape[0]
... | [
485,
4051,
222,
485,
6610,
641,
2115,
222,
485,
13247,
641,
6451,
499,
222,
610,
10183,
100,
20939,
387,
100,
5447,
100,
750,
45,
93,
49,
1952,
100,
9702,
100,
8326,
66,
58,
49,
3416,
100,
6193,
66,
53,
49,
3416,
100,
1550,
66,
... | [
"import",
"Ġrandom",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"ĊĊ",
"Ċ",
"def",
"Ġlinear",
"_",
"combin",
"ation",
"_",
"plus",
"_",
"error",
"(",
"X",
",",
"Ġnum",
"_",
"dependent",
"_",
"cols",
"=",
"5",
",",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
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,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
8,
8... | [
1,
7,
14,
1,
7,
13,
16,
19,
1,
7,
14,
17,
20,
1,
1,
4,
11,
12,
18,
23,
24,
28,
29,
34,
35,
36,
37,
41,
42,
51,
52,
56,
57,
58,
59,
69,
70,
74,
75,
76,
77,
87,
88,
91,
92,
93,
94,
100,
101,
105,
106,
107,
108,
1... |
6ae529a5e5658ba409ec3e7284d8b2911c60dd00 | import os
from linkedin_scraper import get_jobs
chrome_driver_path = os.path.join(os.path.abspath(os.getcwd()), "chromedriver")
df = get_jobs("Data Scientist", 40, False, chrome_driver_path)
df.to_csv("linkedin_jobs.csv", index=False)
| [
485,
2355,
222,
1097,
12258,
285,
100,
564,
26877,
1220,
640,
100,
10372,
222,
222,
11232,
100,
5381,
100,
1005,
299,
2355,
51,
1005,
51,
2548,
45,
519,
51,
1005,
51,
21424,
45,
519,
51,
33550,
6198,
332,
36403,
1987,
2384,
678,
222... | [
"import",
"Ġos",
"Ċ",
"from",
"Ġlinked",
"in",
"_",
"sc",
"raper",
"Ġimport",
"Ġget",
"_",
"jobs",
"Ċ",
"Ċ",
"chrome",
"_",
"driver",
"_",
"path",
"Ġ=",
"Ġos",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"abspath",
"(",
"os",
".",
"get... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
7,
10,
1,
5,
12,
14,
15,
17,
22,
29,
33,
34,
38,
1,
1,
7,
8,
14,
15,
19,
21,
24,
25,
29,
30,
34,
35,
37,
38,
42,
43,
50,
51,
53,
54,
60,
64,
66,
70,
73,
78,
80,
1,
1,
3,
5,
9,
10,
14,
16,
20,
23,
27,
30,
... |
d268f8d563aac28852457f6f130b2fb4ea6269a2 | import nltk
from nltk import bigrams
from lm import *
# Oppgave 1:
# opretter LM klasse til aa perpleksitere news og adventure
m = LM()
# Henter news og adventure for videre bruk
news = nltk.corpus.brown.sents(categories="news")
adventure = nltk.corpus.brown.sents(categories="adventure")
# initial parametre
perpNews... | [
485,
48071,
222,
1097,
48071,
1220,
342,
6343,
1480,
222,
1097,
30820,
1220,
338,
222,
222,
40,
565,
612,
108,
808,
244,
54,
63,
222,
40,
356,
6660,
410,
517,
82,
41853,
296,
18886,
27167,
1313,
11996,
5532,
33134,
14169,
17419,
1564,... | [
"import",
"Ġnltk",
"Ċ",
"from",
"Ġnltk",
"Ġimport",
"Ġb",
"igr",
"ams",
"Ċ",
"from",
"Ġlm",
"Ġimport",
"Ġ*",
"Ċ",
"Ċ",
"#",
"ĠO",
"pp",
"g",
"ave",
"Ġ",
"1",
":",
"Ċ",
"#",
"Ġo",
"pret",
"ter",
"ĠL",
"M",
"Ġklas",
"se",
"Ġtil",
"Ġaa",
"Ġper",
"... | [
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
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,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
12,
1,
5,
10,
17,
19,
22,
25,
1,
5,
8,
15,
17,
1,
1,
2,
4,
6,
7,
10,
11,
12,
13,
1,
2,
4,
8,
11,
13,
14,
19,
21,
25,
28,
32,
35,
37,
42,
47,
50,
53,
60,
1,
2,
4,
6,
7,
9,
1,
1,
2,
4,
9,
14,
17,
20... |
2f489a87e40bea979000dd429cc4cb0150ff4c3b | from flask import escape
import pandas as pd
import json
import requests
with open("result.csv", newline="") as f:
df = pd.read_csv(f)
def get_level_diff(word, only_common=False):
if only_common:
word_df = df[(df["word"] == word) & (df["common"] == 1)]
else:
word_df = df[df["word"] == wor... | [
1097,
18958,
1220,
15821,
222,
485,
13247,
641,
6451,
222,
485,
2379,
222,
485,
5188,
222,
222,
1814,
2177,
459,
1285,
51,
4849,
411,
25592,
38983,
641,
315,
63,
303,
5247,
299,
6451,
51,
870,
100,
4849,
45,
107,
46,
499,
222,
610,
... | [
"from",
"Ġflask",
"Ġimport",
"Ġescape",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġrequests",
"Ċ",
"Ċ",
"with",
"Ġopen",
"(\"",
"result",
".",
"csv",
"\",",
"Ġnewline",
"=\"\")",
"Ġas",
"Ġf",
":",
"ĊĠĠĠ",
"Ġdf",
"Ġ="... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
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,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
... | [
1,
5,
11,
18,
25,
1,
7,
14,
17,
20,
1,
7,
12,
1,
7,
16,
1,
1,
5,
10,
12,
18,
19,
22,
24,
32,
36,
39,
41,
42,
4,
7,
9,
12,
13,
17,
18,
21,
22,
23,
24,
1,
1,
4,
8,
9,
14,
15,
19,
20,
24,
25,
30,
31,
37,
38,
... |
09d31df9c76975377b44470e1f2ba4a5c4b7bbde | import sys
import logging
import copy
import socket
from . import game_map
class GameUnix:
"""
:ivar map: Current map representation
:ivar initial_map: The initial version of the map before game starts
"""
def _send_string(self, s):
"""
Send data to the game. Call :function:`done... | [
485,
5263,
222,
485,
5751,
222,
485,
1948,
222,
485,
6241,
222,
222,
1097,
657,
1220,
4204,
100,
1130,
499,
222,
842,
6067,
19536,
63,
303,
1547,
303,
518,
31690,
2010,
63,
7517,
2010,
10323,
303,
518,
31690,
2838,
100,
1130,
63,
90... | [
"import",
"Ġsys",
"Ċ",
"import",
"Ġlogging",
"Ċ",
"import",
"Ġcopy",
"Ċ",
"import",
"Ġsocket",
"Ċ",
"Ċ",
"from",
"Ġ.",
"Ġimport",
"Ġgame",
"_",
"map",
"ĊĊ",
"Ċ",
"class",
"ĠGame",
"Unix",
":",
"ĊĠĠĠ",
"Ġ\"\"\"",
"ĊĠĠĠ",
"Ġ:",
"ivar",
"Ġmap",
":",
"ĠCur... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
13,
13,
15,
15,
15,
... | [
1,
7,
11,
1,
7,
15,
1,
7,
12,
1,
7,
14,
1,
1,
5,
7,
14,
19,
20,
23,
1,
1,
6,
11,
15,
16,
4,
8,
4,
6,
10,
14,
15,
23,
27,
42,
4,
6,
10,
18,
19,
22,
23,
27,
35,
43,
46,
50,
54,
61,
66,
73,
4,
8,
4,
8,
10,
... |
891588327046e26acb9a691fa8bb9a99420712d6 | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title="Pastebin API")
urlpatterns = [
url(r"^admin/", admin.site.urls),
url(r"^doc_u/", schema_view),
url(
r"^",
include(
... | [
1097,
8532,
51,
2982,
51,
11420,
1220,
2001,
49,
2323,
222,
1097,
8532,
51,
12060,
1220,
5611,
222,
222,
1097,
6125,
100,
2863,
100,
13166,
51,
4361,
1220,
640,
100,
13166,
100,
1090,
222,
222,
3982,
100,
1090,
299,
640,
100,
13166,
... | [
"from",
"Ġdjango",
".",
"conf",
".",
"urls",
"Ġimport",
"Ġurl",
",",
"Ġinclude",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"Ċ",
"from",
"Ġrest",
"_",
"framework",
"_",
"swagger",
".",
"views",
"Ġimport",
"Ġget",
"_",
"swagger",
"_... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
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,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9... | [
1,
5,
12,
13,
17,
18,
22,
29,
33,
34,
42,
1,
5,
12,
13,
20,
27,
33,
1,
1,
5,
10,
11,
20,
21,
28,
29,
34,
41,
45,
46,
53,
54,
58,
1,
1,
7,
8,
12,
14,
18,
19,
26,
27,
31,
32,
37,
39,
43,
45,
47,
51,
53,
1,
1,
... |
a6f3c51d4115a6e0d6f01aa75bf5e6e367840d43 | from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union, overload
from pccm.stubs import EnumClassValue, EnumValue
from cumm.tensorview import Tensor
class ConvMainUnitTest:
@staticmethod
def implicit_gemm(
input: Tensor,
weight: Tensor,
output: Tensor,
... | [
1097,
12018,
1220,
6213,
49,
27052,
49,
14609,
49,
1701,
49,
5663,
49,
1776,
49,
11724,
49,
2782,
49,
16546,
49,
26104,
222,
222,
1097,
317,
1172,
114,
51,
34572,
1220,
7827,
1359,
899,
49,
7827,
899,
222,
222,
1097,
35477,
114,
51,... | [
"from",
"Ġtyping",
"Ġimport",
"ĠAny",
",",
"ĠCallable",
",",
"ĠDict",
",",
"ĠList",
",",
"ĠOptional",
",",
"ĠSet",
",",
"ĠTuple",
",",
"ĠType",
",",
"ĠUnion",
",",
"Ġoverload",
"Ċ",
"Ċ",
"from",
"Ġp",
"cc",
"m",
".",
"stubs",
"Ġimport",
"ĠEnum",
"Class... | [
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,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
9,
9,
9,
10,
10,
10,
10,
10... | [
1,
5,
12,
19,
23,
24,
33,
34,
39,
40,
45,
46,
55,
56,
60,
61,
67,
68,
73,
74,
80,
81,
90,
1,
1,
5,
7,
9,
10,
11,
16,
23,
28,
33,
38,
39,
44,
49,
1,
1,
5,
9,
10,
11,
17,
21,
28,
35,
1,
1,
6,
11,
15,
23,
24,
... |
0dd361239d85ed485594ac0f5e7e2168f0684544 | import pytest
import gadget
@pytest.mark.parametrize(
"invalid_line",
[
"beginningGDG::",
"beginning::end",
"nothing",
],
)
def test_parse_invalid_line(invalid_line):
assert gadget.parse_log_line(invalid_line) is None
| [
485,
13090,
222,
485,
504,
47106,
499,
222,
69,
12418,
51,
1846,
51,
28880,
45,
303,
332,
5798,
100,
948,
411,
303,
447,
310,
332,
41485,
13328,
76,
422,
411,
310,
332,
41485,
422,
435,
411,
310,
332,
24720,
411,
303,
2520,
222,
4... | [
"import",
"Ġpytest",
"Ċ",
"import",
"Ġg",
"adget",
"ĊĊ",
"Ċ",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"ĊĠĠĠ",
"Ġ\"",
"invalid",
"_",
"line",
"\",",
"ĊĠĠĠ",
"Ġ[",
"ĊĠĠĠĠĠĠĠ",
"Ġ\"",
"beginning",
"GD",
"G",
"::",
"\",",
"ĊĠĠĠĠĠĠĠ",
"Ġ\"",
"b... | [
1,
1,
1,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
11,
11,
12,
12,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
... | [
1,
7,
14,
1,
7,
9,
14,
1,
1,
2,
8,
9,
13,
14,
25,
26,
4,
6,
13,
14,
18,
20,
4,
6,
8,
10,
19,
21,
22,
24,
26,
8,
10,
19,
21,
24,
26,
8,
10,
17,
19,
4,
7,
1,
2,
1,
4,
9,
10,
15,
16,
23,
24,
28,
29,
36,
37,
... |
7de19a85a6a05bd2972b11571d5f05219c6beb1a | import os
import shutil
# root_path = '../from_1691'
root_path = "C:/Users/koyou/Desktop/test"
# 실수할 수도 있으므로 dry_run 을 설정해서 로그만 찍을 것인지
# 실제 작동도 진행할 것인지 결정한다.
# dry_run = True
dry_run = False
def move_directory(input_directory_path, output_directory_path):
print("moving %s to %s" % (input_directory_path, output_... | [
485,
2355,
222,
485,
23074,
222,
222,
40,
3070,
100,
1005,
299,
4977,
1097,
100,
54,
59,
62,
54,
44,
222,
2405,
100,
1005,
299,
332,
72,
6573,
3715,
52,
7982,
9626,
52,
13050,
52,
881,
39,
222,
222,
40,
21551,
11159,
12407,
9371,
... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġshutil",
"Ċ",
"Ċ",
"#",
"Ġroot",
"_",
"path",
"Ġ=",
"Ġ'../",
"from",
"_",
"1",
"6",
"9",
"1",
"'",
"Ċ",
"root",
"_",
"path",
"Ġ=",
"Ġ\"",
"C",
":/",
"Users",
"/",
"ko",
"you",
"/",
"Desktop",
"/",
"test",
"\"",... | [
1,
1,
1,
2,
2,
2,
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,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
7,
10,
1,
7,
14,
1,
1,
2,
7,
8,
12,
14,
19,
23,
24,
25,
26,
27,
28,
29,
1,
5,
6,
10,
12,
14,
15,
17,
22,
23,
25,
28,
29,
36,
37,
41,
42,
1,
1,
2,
4,
5,
6,
8,
9,
11,
12,
12,
14,
18,
19,
22,
23,
24,
27,
... |
c85d7e799a652e82bfaf58e1e8bfa9c4606a8ecb | import ast
import datetime
from pathlib import Path
from typing import Any, Dict
import yaml
from .lemmatizer import LemmatizerPymorphy2, Preprocessor
def get_config(path_to_config: str) -> Dict[str, Any]:
"""Get config.
Args:
path_to_config (str): Path to config.
Returns:
Dict[str, An... | [
485,
10042,
222,
485,
7181,
222,
1097,
30293,
1220,
5404,
222,
1097,
12018,
1220,
6213,
49,
14609,
222,
222,
485,
14478,
222,
222,
1097,
657,
2078,
1322,
2292,
1220,
517,
423,
1322,
2292,
85,
2225,
9239,
126,
55,
49,
7497,
10093,
499,... | [
"import",
"Ġast",
"Ċ",
"import",
"Ġdatetime",
"Ċ",
"from",
"Ġpathlib",
"Ġimport",
"ĠPath",
"Ċ",
"from",
"Ġtyping",
"Ġimport",
"ĠAny",
",",
"ĠDict",
"Ċ",
"Ċ",
"import",
"Ġyaml",
"Ċ",
"Ċ",
"from",
"Ġ.",
"lem",
"mat",
"izer",
"Ġimport",
"ĠL",
"em",
"mat",
... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
7,
11,
1,
7,
16,
1,
5,
13,
20,
25,
1,
5,
12,
19,
23,
24,
29,
1,
1,
7,
12,
1,
1,
5,
7,
10,
13,
17,
24,
26,
28,
31,
35,
36,
38,
42,
43,
44,
45,
49,
58,
1,
1,
4,
8,
9,
15,
16,
20,
21,
23,
24,
30,
31,
35,
... |
4d9575c178b672815bb561116689b9b0721cb5ba | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 25 15:14:15 2020
@author: luisa
"""
horast = int(input("Horas Trabajadas: " + "\n\t\t"))
tarifa = int(input("Tarifa por hora: " + "\n\t\t"))
descu = int(input("Descuentos: " + "\n\t\t"))
resp0 = horast - descu
resp1 = (resp0 * tarifa) / 2
resp2 = (horast * tarifa) + resp... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
6880,
563,
17024,
22715,
244,
55,
58,
244,
54,
58,
63,
54,
57,
63,
54,
58,
244,
55,
53,
55,
53,
222,
222,
69,
2133,
63,
21353,
13664,
222,
3012,
222,
222,
19242,
652,
29... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Created",
"Ġon",
"ĠThu",
"ĠJun",
"Ġ",
"2",
"5",
"Ġ",
"1",
"5",
":",
"1",
"4",
":",
"1",
"5",
"Ġ",
"2",
"0",
"2",
"0",
"Ċ",
"Ċ",
"@",
"author",
":",
"Ġlu",
"isa",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
8,
11,
15,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
1,
1,
2,
8,
9,
12,
15,
1,
4,
1,
1,
4,
7,
9,
13,
14,
19,
21,
24,
26,
29,
31,
33,
... |
8479c70fed36dc6f1e6094c832fb22d8c2e53e3a | import os
import time
from datetime import datetime, timedelta
from git import Repo
class CommitAnalyzer:
"""
Takes path of the repo
"""
def __init__(self, repo_path):
self.repo_path = repo_path
self.repo = Repo(self.repo_path)
assert not self.repo.bare
def get_conflict_c... | [
485,
2355,
222,
485,
1153,
222,
1097,
7181,
1220,
7181,
49,
30864,
222,
1097,
5569,
1220,
28734,
499,
222,
842,
15451,
17430,
63,
303,
1547,
303,
37389,
1536,
451,
341,
5885,
303,
1547,
465,
684,
1176,
1683,
3232,
803,
49,
5885,
100,
... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġtime",
"Ċ",
"from",
"Ġdatetime",
"Ġimport",
"Ġdatetime",
",",
"Ġtimedelta",
"Ċ",
"from",
"Ġgit",
"Ġimport",
"ĠRepo",
"ĊĊ",
"Ċ",
"class",
"ĠCommit",
"Analyzer",
":",
"ĊĠĠĠ",
"Ġ\"\"\"",
"ĊĠĠĠ",
"ĠTakes",
"Ġpath",
"Ġof",
"Ġthe"... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
14,
14,
14,
... | [
1,
7,
10,
1,
7,
12,
1,
5,
14,
21,
30,
31,
41,
1,
5,
9,
16,
21,
1,
1,
6,
13,
21,
22,
4,
8,
4,
10,
15,
18,
22,
27,
4,
8,
4,
8,
11,
15,
18,
22,
23,
28,
29,
33,
35,
8,
13,
14,
18,
19,
23,
25,
30,
31,
35,
8,
1... |
a41d00c86d0bdab1bced77c275e56c3569af4f4e | from django.apps import AppConfig
from django.conf import settings
import importlib
import importlib.util
class RestAdminAppConfig(AppConfig):
name = "libraries.django_rest_admin"
verbose_name = "Rest Admin"
loaded = False
def ready(self):
autodiscover()
def autodiscover():
"""
Auto... | [
1097,
8532,
51,
7520,
1220,
2013,
1081,
222,
1097,
8532,
51,
2982,
1220,
4086,
222,
485,
46233,
222,
485,
46233,
51,
1058,
499,
222,
842,
13720,
4208,
42728,
45,
42728,
731,
303,
655,
299,
332,
20406,
51,
11025,
100,
4756,
100,
2317,
... | [
"from",
"Ġdjango",
".",
"apps",
"Ġimport",
"ĠApp",
"Config",
"Ċ",
"from",
"Ġdjango",
".",
"conf",
"Ġimport",
"Ġsettings",
"Ċ",
"import",
"Ġimportlib",
"Ċ",
"import",
"Ġimportlib",
".",
"util",
"ĊĊ",
"Ċ",
"class",
"ĠRest",
"Admin",
"AppConfig",
"(",
"AppConfi... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
12,
12,
12,
12,
12,... | [
1,
5,
12,
13,
17,
24,
28,
34,
1,
5,
12,
13,
17,
24,
33,
1,
7,
17,
1,
7,
17,
18,
22,
1,
1,
6,
11,
16,
25,
26,
35,
37,
4,
9,
11,
13,
22,
23,
29,
30,
34,
35,
40,
41,
4,
12,
13,
17,
19,
21,
25,
31,
32,
4,
11,
1... |
e0435b0b34fc011e7330ab8882865131f7f78882 | import pytest
import responses
from auctioneer import constants, controllers, entities
from common.http import UnExpectedResult
def test_keywordbid_rule_init(kwb_rule, account):
assert kwb_rule.get_max_bid_display() == kwb_rule.max_bid * 1_000_000
assert kwb_rule.get_bid_increase_percentage_display() == kwb_... | [
485,
13090,
222,
485,
14829,
222,
222,
1097,
45991,
30683,
1220,
12405,
49,
20132,
49,
11762,
222,
1097,
4959,
51,
544,
1220,
1703,
7705,
1413,
499,
222,
610,
913,
100,
7323,
12131,
100,
5286,
100,
1683,
45,
4149,
103,
100,
5286,
49,
... | [
"import",
"Ġpytest",
"Ċ",
"import",
"Ġresponses",
"Ċ",
"Ċ",
"from",
"Ġauction",
"eer",
"Ġimport",
"Ġconstants",
",",
"Ġcontrollers",
",",
"Ġentities",
"Ċ",
"from",
"Ġcommon",
".",
"http",
"Ġimport",
"ĠUn",
"Expected",
"Result",
"ĊĊ",
"Ċ",
"def",
"Ġtest",
"_"... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
14,
1,
7,
17,
1,
1,
5,
13,
16,
23,
33,
34,
46,
47,
56,
1,
5,
12,
13,
17,
24,
27,
35,
41,
1,
1,
4,
9,
10,
17,
20,
21,
25,
26,
30,
31,
33,
34,
35,
39,
40,
48,
50,
4,
11,
14,
15,
16,
20,
21,
24,
25,
28,
... |
66904cbe3e57d9cc1ee385cd8a4c1ba3767626bd | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# sphinx_gallery_thumbnail_number = 3
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import NullFormatter # useful for `logit` scale
import matplotlib.ticker as ticker
import matplotlib as mpl
mpl.style.use("classic")
# Data for plotting
ch... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
328,
27375,
100,
13233,
100,
12316,
100,
2188,
299,
244,
56,
222,
222,
485,
13168,
51,
18553,
641,
6020,
222,
485,
6610,
641,
2115,
222,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"Ġs",
"phinx",
"_",
"gallery",
"_",
"thumbnail",
"_",
"number",
"Ġ=",
"Ġ",
"3",
"Ċ",
"Ċ",
"import",
"Ġmatplotlib",
".",
"pyplot",... | [
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,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
4,
9,
10,
17,
18,
27,
28,
34,
36,
37,
38,
1,
1,
7,
18,
19,
25,
28,
32,
1,
7,
13,
16,
19,
1,
5,
16,
17,
23,
30,
35,
44,
45,
47,
54,
58,
60,
... |
a01ca49c3fa8ea76de2880c1b04bf15ccd341edd | # coding=UTF-8
"""
View for managing accounts
"""
from django.contrib import messages
from django.http import Http404, HttpResponse
from django.shortcuts import redirect
from django import forms
from athena.core import render_to_response
from athena.users.models import User
from athena.users import must_be_admin
def... | [
40,
10633,
66,
6266,
50,
61,
222,
3012,
222,
1089,
456,
26906,
13081,
222,
3012,
222,
222,
1097,
8532,
51,
12060,
1220,
5231,
222,
1097,
8532,
51,
544,
1220,
4699,
57,
53,
57,
49,
17857,
222,
1097,
8532,
51,
36264,
1220,
5675,
222,
... | [
"#",
"Ġcoding",
"=",
"UTF",
"-",
"8",
"Ċ",
"\"\"\"",
"Ċ",
"View",
"Ġfor",
"Ġmanaging",
"Ġaccounts",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġmessages",
"Ċ",
"from",
"Ġdjango",
".",
"http",
"Ġimport",
"ĠHttp",
"4",
"0",
"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
... | [
1,
2,
9,
10,
13,
14,
15,
1,
4,
1,
5,
9,
18,
27,
1,
4,
1,
1,
5,
12,
13,
20,
27,
36,
1,
5,
12,
13,
17,
24,
29,
30,
31,
32,
33,
46,
1,
5,
12,
13,
22,
29,
38,
1,
5,
12,
19,
25,
1,
5,
9,
12,
13,
17,
24,
31,
32... |
9adff5da4e26088def9f0e32aa712a1f2b0336ba | class Step:
def __init__(self, action):
self.action = action
def __str__(self) -> str:
return f"Step: {{action: {self.action.__str__()}}}"
def __repr__(self) -> str:
return f"Step: {{action: {self.action.__str__()}}}"
| [
842,
11564,
63,
303,
684,
1176,
1683,
3232,
803,
49,
2146,
731,
310,
649,
51,
1160,
299,
2146,
465,
684,
1176,
484,
3232,
803,
46,
984,
615,
63,
310,
461,
315,
39,
3549,
63,
3351,
1160,
63,
320,
803,
51,
1160,
3688,
484,
16443,
... | [
"class",
"ĠStep",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġaction",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
".",
"action",
"Ġ=",
"Ġaction",
"ĊĊĠĠĠ",
"Ġdef",
"Ġ__",
"str",
"__(",
"self",
")",
"Ġ->",
"Ġstr",
":",
"ĊĠĠĠĠĠĠĠ",
"Ġreturn",
"Ġf",
"\"",
"S... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9... | [
1,
6,
11,
12,
4,
8,
11,
15,
18,
22,
23,
30,
32,
8,
13,
14,
20,
22,
29,
4,
8,
11,
14,
17,
21,
22,
25,
29,
30,
8,
15,
17,
18,
22,
23,
26,
32,
33,
35,
39,
40,
46,
49,
52,
56,
58,
60,
4,
8,
11,
15,
18,
22,
23,
26... |
668a8005f2f66190d588fb9289293d73a608f767 | # -*- coding: utf-8-*-
import random
import re
from datetime import datetime, time
from phue import Bridge
import os
import glob
WORDS = []
def handle(text, mic, profile):
messages1 = ["Naturally Sir ", "Of course Sir ", "I'll get right at it"]
final = random.choice(messages1)
mic.say(final)
command ... | [
40,
8571,
10633,
63,
6471,
50,
61,
50,
7473,
222,
485,
4051,
222,
485,
334,
222,
1097,
7181,
1220,
7181,
49,
1153,
222,
1097,
2697,
359,
1220,
32689,
222,
485,
2355,
222,
485,
12542,
222,
222,
37617,
299,
1627,
499,
222,
610,
2902,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"-",
"*-",
"Ċ",
"import",
"Ġrandom",
"Ċ",
"import",
"Ġre",
"Ċ",
"from",
"Ġdatetime",
"Ġimport",
"Ġdatetime",
",",
"Ġtime",
"Ċ",
"from",
"Ġph",
"ue",
"Ġimport",
"ĠBridge",
"Ċ",
"import",
"Ġos",
"Ċ",
"import... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
6,
6,
6,
7,
7,
7,
8,
9,
9,
9,
9,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12,
12,
13,
13,
13,
13,
13,
13,
13,
13,
13... | [
1,
2,
6,
13,
14,
18,
19,
20,
21,
23,
1,
7,
14,
1,
7,
10,
1,
5,
14,
21,
30,
31,
36,
1,
5,
8,
10,
17,
24,
1,
7,
10,
1,
7,
12,
1,
1,
6,
8,
11,
1,
1,
4,
11,
12,
16,
17,
21,
22,
30,
32,
4,
13,
14,
16,
19,
20,
... |
2257f73a290dfd428a874e963c26e51f1c1f1efa | # -*- coding: utf-8 -*-
"""The app module, containing the app factory function."""
from flask import Flask, render_template
from flask_cors import CORS
from flask_misaka import Misaka
from flask_mailman import Mail
from flask_talisman import Talisman
from werkzeug.middleware.proxy_fix import ProxyFix
from micawber.pro... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
1338,
1142,
2313,
49,
6663,
341,
1142,
7769,
686,
7128,
222,
222,
1097,
18958,
1220,
24033,
49,
2922,
100,
2402,
222,
1097,
18958,
100,
26283,
1220,
45552,
222,
1097,
18958,
100,
145... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"The",
"Ġapp",
"Ġmodule",
",",
"Ġcontaining",
"Ġthe",
"Ġapp",
"Ġfactory",
"Ġfunction",
".\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
",",
"Ġrender",
"_",
"template",
"Ċ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
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,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
7,
11,
18,
19,
30,
34,
38,
46,
55,
59,
1,
1,
5,
11,
18,
24,
25,
32,
33,
41,
1,
5,
11,
12,
16,
23,
28,
1,
5,
11,
12,
15,
18,
25,
29,
32,
1,
5,
11,
12,
16,
19,
26,
31,
1... |
d39e3a552a7c558d3f5b410e0b228fb7409d732a | # -*- coding:utf-8 -*-
"""
Author:xufei
Date:2021/1/21
"""
| [
40,
8571,
10633,
63,
3330,
50,
61,
8571,
222,
3012,
222,
4372,
63,
31593,
1247,
110,
222,
1563,
63,
55,
53,
55,
54,
52,
54,
52,
55,
54,
222,
3012,
222
] | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"utf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Author",
":",
"xu",
"fe",
"i",
"Ċ",
"Date",
":",
"2",
"0",
"2",
"1",
"/",
"1",
"/",
"2",
"1",
"Ċ",
"\"\"\"",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5
] | [
1,
2,
6,
13,
14,
17,
18,
19,
23,
1,
4,
1,
7,
8,
10,
12,
13,
1,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
1,
4
] |
c18c407476375fb1647fefaedb5d7ea0e0aabe3a | import pandas as pd
import numpy as np
import csv
# import nltk
# nltk.download('punkt')
from nltk.tokenize import sent_tokenize
csv_file = open("/home/debajit15/train+dev.csv")
pd.set_option("display.max_colwidth", None)
df = pd.read_csv(csv_file, sep=",")
df = df[pd.notnull(df["Aspects"])]
# print(df['Opinion_Words... | [
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
485,
11490,
222,
222,
40,
1220,
48071,
222,
40,
48071,
51,
5000,
482,
117,
32293,
704,
222,
1097,
48071,
51,
30436,
1220,
4643,
100,
30436,
222,
222,
4849,
100,
781,
299,
2177,
... | [
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġcsv",
"Ċ",
"Ċ",
"#",
"Ġimport",
"Ġnltk",
"Ċ",
"#",
"Ġnltk",
".",
"download",
"('",
"p",
"unkt",
"')",
"Ċ",
"from",
"Ġnltk",
".",
"tokenize",
"Ġimport",
"Ġsent",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10... | [
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
7,
11,
1,
1,
2,
9,
14,
1,
2,
7,
8,
16,
18,
19,
23,
25,
1,
5,
10,
11,
19,
26,
31,
32,
40,
1,
1,
4,
5,
9,
11,
16,
19,
23,
24,
27,
29,
31,
32,
33,
34,
39,
40,
43,
44,
4... |
74b0ccb5193380ce596313d1ac3f898ff1fdd2f3 | from .mail_utils import send_mail
from .request_utils import get_host_url
| [
1097,
657,
2215,
100,
2324,
1220,
3256,
100,
2215,
222,
1097,
657,
1375,
100,
2324,
1220,
640,
100,
2067,
100,
983,
222
] | [
"from",
"Ġ.",
"mail",
"_",
"utils",
"Ġimport",
"Ġsend",
"_",
"mail",
"Ċ",
"from",
"Ġ.",
"request",
"_",
"utils",
"Ġimport",
"Ġget",
"_",
"host",
"_",
"url",
"Ċ"
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
] | [
1,
5,
7,
11,
12,
17,
24,
29,
30,
34,
1,
5,
7,
14,
15,
20,
27,
31,
32,
36,
37,
40
] |
4e1f7fddb6bd3413dd6a8ca21520d309af75c811 | import sys
import os
sys.path.insert(0, "main")
import main
workspace = os.path.abspath(sys.argv[1])
main.hammer(workspace)
| [
485,
5263,
222,
485,
2355,
222,
222,
3750,
51,
1005,
51,
3233,
45,
53,
49,
332,
1850,
678,
222,
485,
2594,
222,
222,
10912,
299,
2355,
51,
1005,
51,
21424,
45,
3750,
51,
6129,
96,
54,
1156,
222,
1850,
51,
43625,
45,
10912,
46,
2... | [
"import",
"Ġsys",
"Ċ",
"import",
"Ġos",
"Ċ",
"Ċ",
"sys",
".",
"path",
".",
"insert",
"(",
"0",
",",
"Ġ\"",
"main",
"\")",
"Ċ",
"import",
"Ġmain",
"Ċ",
"Ċ",
"workspace",
"Ġ=",
"Ġos",
".",
"path",
".",
"abspath",
"(",
"sys",
".",
"argv",
"[",
"1",
... | [
1,
1,
1,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8
] | [
1,
7,
11,
1,
7,
10,
1,
1,
4,
5,
9,
10,
16,
17,
18,
19,
21,
25,
27,
1,
7,
12,
1,
1,
10,
12,
15,
16,
20,
21,
28,
29,
32,
33,
37,
38,
39,
41,
1,
5,
6,
12,
13,
22,
23
] |
db1e3a109af2db2c8794a7c9c7dfb0c2ccee5800 | #!/usr/bin/python3
"""0. How many subs"""
def number_of_subscribers(subreddit):
"""return the number of subscribers from an Reddit API"""
import requests
resInf = requests.get(
"https://www.reddit.com/r/{}/about.json".format(subreddit),
headers={"User-Agent": "My-User-Agent"},
al... | [
8758,
3392,
52,
1793,
52,
2980,
56,
222,
3012,
53,
51,
4998,
5110,
29302,
3012,
499,
222,
610,
1470,
100,
1048,
100,
45946,
45,
1133,
23832,
731,
303,
1547,
620,
341,
1470,
451,
40637,
664,
619,
4777,
30795,
2347,
3012,
465,
1220,
5... | [
"#!/",
"usr",
"/",
"bin",
"/",
"python",
"3",
"Ċ",
"\"\"\"",
"0",
".",
"ĠHow",
"Ġmany",
"Ġsubs",
"\"\"\"",
"ĊĊ",
"Ċ",
"def",
"Ġnumber",
"_",
"of",
"_",
"subscribers",
"(",
"sub",
"reddit",
"):",
"ĊĠĠĠ",
"Ġ\"\"\"",
"return",
"Ġthe",
"Ġnumber",
"Ġof",
... | [
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,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
8,
8,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
4,
7,
8,
11,
12,
18,
19,
1,
4,
5,
6,
10,
15,
20,
23,
1,
1,
4,
11,
12,
14,
15,
26,
27,
30,
36,
38,
4,
8,
14,
18,
25,
28,
40,
45,
48,
52,
55,
59,
62,
4,
11,
20,
4,
8,
11,
13,
22,
23,
26,
27,
8,
10,
15,
18,... |
d20e41dd7054ff133be264bebf13e4e218710ae5 | from django.shortcuts import resolve_url as r
from django.test import TestCase
class coreGetHome(TestCase):
def setUp(self):
self.resp = self.client.get(r("core:core_home"))
def test_template_home(self):
self.assertTemplateUsed(self.resp, "index.html")
def test_200_template_home(self):
... | [
1097,
8532,
51,
36264,
1220,
5895,
100,
983,
641,
559,
222,
1097,
8532,
51,
881,
1220,
19189,
499,
222,
842,
5305,
953,
4637,
45,
7246,
731,
303,
684,
14544,
45,
803,
731,
310,
649,
51,
5254,
299,
649,
51,
1598,
51,
390,
45,
119,
... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġresolve",
"_",
"url",
"Ġas",
"Ġr",
"Ċ",
"from",
"Ġdjango",
".",
"test",
"Ġimport",
"ĠTestCase",
"ĊĊ",
"Ċ",
"class",
"Ġcore",
"Get",
"Home",
"(",
"TestCase",
"):",
"ĊĠĠĠ",
"Ġdef",
"ĠsetUp",
"(",
"self",
")... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
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,
7,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
... | [
1,
5,
12,
13,
22,
29,
37,
38,
41,
44,
46,
1,
5,
12,
13,
17,
24,
33,
1,
1,
6,
11,
14,
18,
19,
27,
29,
4,
8,
14,
15,
19,
21,
8,
13,
14,
18,
20,
25,
26,
32,
33,
36,
37,
38,
40,
44,
45,
49,
50,
54,
57,
4,
8,
13,
... |
ff7a865822a4f8b343ab4cb490c24d6d530b14e1 | #!/usr/bin/env python
kube_description = """
Compute Server
"""
kube_instruction = """
Not instructions yet
"""
#
# Standard geni-lib/portal libraries
#
import geni.portal as portal
import geni.rspec.pg as PG
import geni.rspec.emulab as elab
import geni.rspec.igext as IG
import geni.urn as URN
#
# PhantomNet extens... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
222,
12473,
100,
2328,
299,
1547,
222,
12391,
4242,
222,
3012,
222,
12473,
100,
18358,
299,
1547,
222,
1355,
9410,
6320,
222,
3012,
222,
222,
40,
222,
40,
9312,
4515,
110,
50,
1379,
52,
108... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"Ċ",
"kube",
"_",
"description",
"Ġ=",
"Ġ\"\"\"",
"Ċ",
"Compute",
"ĠServer",
"Ċ",
"\"\"\"",
"Ċ",
"kube",
"_",
"instruction",
"Ġ=",
"Ġ\"\"\"",
"Ċ",
"Not",
"Ġinstructions",
"Ġyet",
"Ċ",
"\"\"\"",
"Ċ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
5,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
8,
8,
9,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
13,
13,
13,
13,
13,
13,
13,
13,
14,
14,
14,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
1,
5,
6,
17,
19,
23,
1,
8,
15,
1,
4,
1,
5,
6,
17,
19,
23,
1,
4,
17,
21,
1,
4,
1,
1,
2,
1,
2,
11,
15,
16,
17,
20,
21,
27,
37,
1,
2,
1,
7,
11,
12,
13,
19,
22,
29,
1,
7,
11,
... |
a93884757069393b4d96de5ec9c7d815d58a2ea5 | # coding: utf-8
import logging
import uuid
import json
import xmltodict
import bottle
from bottle import HTTPError
from bottle.ext import sqlalchemy
from database import Base, engine
from database import JdWaybillSendResp, JdWaybillApplyResp
jd = bottle.Bottle(catchall=False)
plugin = sqlalchemy.Plugin(
engine, ... | [
40,
10633,
63,
6471,
50,
61,
222,
485,
5751,
222,
485,
11168,
222,
485,
2379,
222,
485,
5604,
10197,
3607,
222,
485,
42147,
222,
1097,
42147,
1220,
4818,
943,
222,
1097,
42147,
51,
426,
1220,
30936,
222,
1097,
3520,
1220,
3787,
49,
... | [
"#",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ċ",
"import",
"Ġlogging",
"Ċ",
"import",
"Ġuuid",
"Ċ",
"import",
"Ġjson",
"Ċ",
"import",
"Ġxml",
"tod",
"ict",
"Ċ",
"import",
"Ġbottle",
"Ċ",
"from",
"Ġbottle",
"Ġimport",
"ĠHTTP",
"Error",
"Ċ",
"from",
"Ġbottle",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
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,
10,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
2,
9,
10,
14,
15,
16,
1,
7,
15,
1,
7,
12,
1,
7,
12,
1,
7,
11,
14,
17,
1,
7,
14,
1,
5,
12,
19,
24,
29,
1,
5,
12,
13,
16,
23,
34,
1,
5,
14,
21,
26,
27,
34,
1,
5,
14,
21,
23,
24,
27,
31,
35,
39,
40,
42,
4... |
0cc1aaa182fcf002ff2ae6cbcd6cbb84a08a3bc1 | # Basic script which send some request via rest api to the test-management-tool.
# Be sure you setup host and api_token variable
import http.client
host = "localhost:8000"
api_token = "fuukp8LhdxxwoVdtJu5K8LQtpTods8ddLMq66wSUFXGsqJKpmJAa1YyqkHN3"
# Connection
conn = http.client.HTTPConnection(host)
# Create a heade... | [
40,
9280,
3273,
1532,
3256,
1649,
1343,
4745,
6125,
4142,
391,
341,
913,
50,
9343,
50,
3749,
51,
222,
40,
4284,
3673,
863,
4721,
3421,
480,
4142,
100,
1977,
2702,
222,
222,
485,
1930,
51,
1598,
222,
222,
2067,
299,
332,
5112,
63,
... | [
"#",
"ĠBasic",
"Ġscript",
"Ġwhich",
"Ġsend",
"Ġsome",
"Ġrequest",
"Ġvia",
"Ġrest",
"Ġapi",
"Ġto",
"Ġthe",
"Ġtest",
"-",
"management",
"-",
"tool",
".",
"Ċ",
"#",
"ĠBe",
"Ġsure",
"Ġyou",
"Ġsetup",
"Ġhost",
"Ġand",
"Ġapi",
"_",
"token",
"Ġvariable",
"Ċ",
"... | [
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,
3,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
2,
8,
15,
21,
26,
31,
39,
43,
48,
52,
55,
59,
64,
65,
75,
76,
80,
81,
1,
2,
5,
10,
14,
20,
25,
29,
33,
34,
39,
48,
1,
1,
7,
12,
13,
19,
1,
1,
5,
7,
9,
18,
19,
20,
21,
22,
23,
24,
1,
4,
5,
10,
12,
14,
16,... |
5bd8cee2595215fda6ab523a646cf918e3d84a50 | from django.urls import path, include
from . import views
from user.views import (
DetailsChangeView,
HomeView,
PasswordChangeView,
SignUpView,
LoginView,
SettingsView,
LogoutView,
CreatePostView,
CommentPostView,
PasswordChangeView,
)
urlpatterns = [
path("", HomeView.as_vi... | [
1097,
8532,
51,
11420,
1220,
1536,
49,
2323,
222,
1097,
657,
1220,
11887,
222,
1097,
1275,
51,
4361,
1220,
327,
303,
13562,
1810,
1089,
49,
303,
9531,
1089,
49,
303,
12576,
1810,
1089,
49,
303,
7443,
1405,
1089,
49,
303,
10660,
1089,
... | [
"from",
"Ġdjango",
".",
"urls",
"Ġimport",
"Ġpath",
",",
"Ġinclude",
"Ċ",
"from",
"Ġ.",
"Ġimport",
"Ġviews",
"Ċ",
"from",
"Ġuser",
".",
"views",
"Ġimport",
"Ġ(",
"ĊĠĠĠ",
"ĠDetails",
"Change",
"View",
",",
"ĊĠĠĠ",
"ĠHome",
"View",
",",
"ĊĠĠĠ",
"ĠPassword",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9,
9,
10,
10,
10,
10,
11,
11,
11,
11,
11,
12,
12,
12,
12,
... | [
1,
5,
12,
13,
17,
24,
29,
30,
38,
1,
5,
7,
14,
20,
1,
5,
10,
11,
16,
23,
25,
4,
12,
18,
22,
23,
4,
9,
13,
14,
4,
13,
19,
23,
24,
4,
9,
11,
15,
16,
4,
10,
14,
15,
4,
13,
17,
18,
4,
11,
15,
16,
4,
11,
15,
19,... |
18dce1ce683b15201dbb5436cbd4288a0df99c28 | from const import (
BORN_KEY,
PRESIDENT_KEY,
CAPITAL_KEY,
PRIME_KEY,
MINISTER_KEY,
POPULATION_KEY,
GOVERNMENT_KEY,
AREA_KEY,
WHO_KEY,
IS_KEY,
THE_KEY,
OF_KEY,
WHAT_KEY,
WHEN_KEY,
WAS_KEY,
)
from geq_queries import (
capital_of_country_query,
area_of_c... | [
1097,
679,
1220,
327,
303,
570,
776,
83,
100,
3319,
49,
303,
466,
4616,
11062,
100,
3319,
49,
303,
38657,
100,
3319,
49,
303,
2789,
9074,
100,
3319,
49,
303,
14369,
15792,
100,
3319,
49,
303,
26284,
809,
2909,
100,
3319,
49,
303,
... | [
"from",
"Ġconst",
"Ġimport",
"Ġ(",
"ĊĠĠĠ",
"ĠB",
"OR",
"N",
"_",
"KEY",
",",
"ĊĠĠĠ",
"ĠP",
"RES",
"IDENT",
"_",
"KEY",
",",
"ĊĠĠĠ",
"ĠCAPITAL",
"_",
"KEY",
",",
"ĊĠĠĠ",
"ĠPR",
"IME",
"_",
"KEY",
",",
"ĊĠĠĠ",
"ĠMIN",
"ISTER",
"_",
"KEY",
",",
"ĊĠĠ... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
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,
8,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
5,
11,
18,
20,
4,
6,
8,
9,
10,
13,
14,
4,
6,
9,
14,
15,
18,
19,
4,
12,
13,
16,
17,
4,
7,
10,
11,
14,
15,
4,
8,
13,
14,
17,
18,
4,
8,
10,
15,
16,
19,
20,
4,
6,
10,
11,
15,
16,
19,
20,
4,
8,
9,
10,
13,
1... |
1968923cd923e68dc5ff2148802f18e40a5e6c33 | """
Created on Nov 16, 2013
@author: mo
"""
import unittest
from Board import TicTacToe_Board
from ComputerPlayer import ComputerPlayer
from utils import debug_print as d_pr
from main import StartNewGame
class Test(unittest.TestCase):
def setUp(self):
self.the_board = TicTacToe_Board()
def tearDow... | [
3012,
222,
6880,
563,
16549,
244,
54,
59,
49,
244,
55,
53,
54,
56,
222,
222,
69,
2133,
63,
7583,
222,
3012,
222,
222,
485,
15790,
222,
1097,
18652,
1220,
413,
314,
89,
348,
724,
106,
100,
8447,
222,
1097,
17855,
3516,
1220,
17855,... | [
"\"\"\"",
"Ċ",
"Created",
"Ġon",
"ĠNov",
"Ġ",
"1",
"6",
",",
"Ġ",
"2",
"0",
"1",
"3",
"Ċ",
"Ċ",
"@",
"author",
":",
"Ġmo",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"import",
"Ġunittest",
"Ċ",
"from",
"ĠBoard",
"Ġimport",
"ĠT",
"ic",
"T",
"ac",
"To",
"e",
"_",
... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
5,
5,
6,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
12,
12,
12... | [
1,
4,
1,
8,
11,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
1,
1,
2,
8,
9,
12,
1,
4,
1,
1,
7,
16,
1,
5,
11,
18,
20,
22,
23,
25,
27,
28,
29,
34,
1,
5,
14,
20,
27,
36,
42,
1,
5,
11,
18,
24,
25,
30,
33,
35,
36,
... |
8e629ee53f11e29aa026763508d13b06f6ced5ba | # -*- coding:utf-8 -*-
__author__ = "yangxin_ryan"
"""
Solutions:
题目要求非递归的中序遍历,
中序遍历的意思其实就是先遍历左孩子、然后是根结点、最后是右孩子。我们按照这个逻辑,应该先循环到root的最左孩子,
然后依次出栈,然后将结果放入结果集合result,然后是根的val,然后右孩子。
"""
class BinaryTreeInorderTraversal(object):
def inorderTraversal(self, root: TreeNode) -> List[int]:
result = list()
... | [
40,
244,
8571,
10633,
63,
3330,
50,
61,
8571,
222,
523,
2133,
523,
299,
332,
21244,
38153,
100,
1012,
297,
39,
222,
3012,
222,
44430,
63,
222,
8334,
6325,
24889,
12550,
21595,
26856,
1096,
3011,
7551,
32766,
1140,
222,
3011,
7551,
327... | [
"#",
"Ġ",
"Ġ-*-",
"Ġcoding",
":",
"utf",
"-",
"8",
"Ġ-*-",
"Ċ",
"__",
"author",
"__",
"Ġ=",
"Ġ\"",
"yang",
"xin",
"_",
"ry",
"an",
"\"",
"Ċ",
"\"\"\"",
"Ċ",
"Solutions",
":",
"Ċ",
"é¢ĺ",
"缮",
"è¦ģæ±Ĥ",
"éĿŀ",
"éĢĴ",
"å½Ĵ",
"çļĦ",
"ä¸Ń",
"åºı",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
2,
3,
7,
14,
15,
18,
19,
20,
24,
1,
3,
9,
11,
13,
15,
19,
22,
23,
25,
27,
28,
1,
4,
1,
10,
11,
1,
2,
3,
5,
6,
7,
8,
9,
10,
11,
13,
14,
1,
2,
3,
5,
6,
7,
8,
10,
12,
13,
15,
16,
17,
18,
19,
21,
22,
23,
... |
bc837d95ef22bd376f8b095e7aeb1f7d15c0e22e | """Write a program that asks the user to enter a word and then
capitalizes every other letter of that word. So if the user enters "rhinoceros",
the program should print "rHiNoCeRoS"""
word = str(input("please enter the word\n"))
count = 0
for char in word:
if count == 0:
print(char.upper(), end="")
... | [
3012,
2553,
331,
3477,
708,
44340,
341,
1275,
391,
6621,
331,
3619,
480,
1636,
222,
21219,
5072,
3659,
1623,
11706,
451,
708,
3619,
51,
2790,
434,
341,
1275,
1680,
502,
332,
17078,
285,
561,
14731,
411,
222,
1402,
3477,
1414,
1489,
33... | [
"\"\"\"",
"Write",
"Ġa",
"Ġprogram",
"Ġthat",
"Ġasks",
"Ġthe",
"Ġuser",
"Ġto",
"Ġenter",
"Ġa",
"Ġword",
"Ġand",
"Ġthen",
"Ċ",
"capital",
"izes",
"Ġevery",
"Ġother",
"Ġletter",
"Ġof",
"Ġthat",
"Ġword",
".",
"ĠSo",
"Ġif",
"Ġthe",
"Ġuser",
"Ġent",
"ers",
"Ġ\"... | [
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,
3,
3,
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... | [
1,
4,
9,
11,
19,
24,
29,
33,
38,
41,
47,
49,
54,
58,
63,
1,
8,
12,
18,
24,
31,
34,
39,
44,
45,
48,
51,
55,
60,
64,
67,
69,
71,
73,
75,
79,
81,
1,
4,
12,
19,
25,
27,
28,
30,
32,
34,
36,
37,
40,
1,
1,
5,
7,
11,... |
da34eb25ec08c8311fa839a0cdcd164eff036a5d | import bnn
# get
#!wget http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
#!wget http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
# unzip
#!gzip -d t10k-images-idx3-ubyte.gz
#!gzip -d t10k-labels-idx1-ubyte.gz
# read labels
print("Reading labels")
labels = []
with open("/home/xilinx/jupyter_noteboo... | [
485,
342,
4042,
222,
222,
40,
640,
222,
38359,
22866,
1930,
574,
126,
1039,
51,
11287,
330,
51,
527,
52,
346,
1219,
52,
36296,
52,
121,
54,
53,
112,
50,
2266,
50,
2910,
56,
50,
37974,
51,
6756,
222,
38359,
22866,
1930,
574,
126,
... | [
"import",
"Ġb",
"nn",
"Ċ",
"Ċ",
"#",
"Ġget",
"Ċ",
"#!",
"wget",
"Ġhttp",
"://",
"y",
"ann",
".",
"lec",
"un",
".",
"com",
"/",
"ex",
"db",
"/",
"mnist",
"/",
"t",
"1",
"0",
"k",
"-",
"images",
"-",
"idx",
"3",
"-",
"ubyte",
".",
"gz",
"Ċ",
... | [
1,
1,
1,
1,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
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... | [
1,
7,
9,
11,
1,
1,
2,
6,
1,
3,
7,
12,
15,
16,
19,
20,
23,
25,
26,
29,
30,
32,
34,
35,
40,
41,
42,
43,
44,
45,
46,
52,
53,
56,
57,
58,
63,
64,
66,
1,
3,
7,
12,
15,
16,
19,
20,
23,
25,
26,
29,
30,
32,
34,
35,
... |
04b5df5cfd052390f057c6f13b2e21d27bac6449 | """
This example shows how to communicate with a SH05 (shutter) connected to a KSC101 (KCube Solenoid).
"""
# this "if" statement is used so that Sphinx does not execute this script when the docs are being built
if __name__ == "__main__":
import os
import time
from msl.equipment import EquipmentRecord, Co... | [
3012,
222,
2287,
2301,
9873,
2650,
391,
25378,
642,
331,
5324,
53,
58,
327,
635,
4681,
46,
9485,
391,
331,
1242,
2134,
54,
53,
54,
327,
80,
17435,
18764,
291,
599,
566,
222,
3012,
222,
222,
40,
477,
332,
344,
39,
7627,
458,
1674,
... | [
"\"\"\"",
"Ċ",
"This",
"Ġexample",
"Ġshows",
"Ġhow",
"Ġto",
"Ġcommunicate",
"Ġwith",
"Ġa",
"ĠSH",
"0",
"5",
"Ġ(",
"sh",
"utter",
")",
"Ġconnected",
"Ġto",
"Ġa",
"ĠK",
"SC",
"1",
"0",
"1",
"Ġ(",
"K",
"Cube",
"ĠSol",
"en",
"oid",
").",
"Ċ",
"\"\"\"",
... | [
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,
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,
6,
6,
6,
6... | [
1,
4,
1,
5,
13,
19,
23,
26,
38,
43,
45,
48,
49,
50,
52,
54,
59,
60,
70,
73,
75,
77,
79,
80,
81,
82,
84,
85,
89,
93,
95,
98,
100,
1,
4,
1,
1,
2,
7,
9,
11,
12,
22,
25,
30,
33,
38,
40,
45,
50,
54,
62,
67,
74,
79... |
11f29508d52e856f4751a5dc8911a1f1c9832374 | def test(d_iter):
from cqlengine import columns
from cqlengine.models import Model
from cqlengine.query import ModelQuerySet
from cqlengine import connection
from cqlengine.management import sync_table
from urllib2 import urlopen, Request
from pyspark.sql import SQLContext
import json
... | [
610,
913,
45,
105,
100,
1751,
731,
303,
664,
300,
1383,
3502,
1220,
6165,
303,
664,
300,
1383,
3502,
51,
3404,
1220,
3707,
303,
664,
300,
1383,
3502,
51,
1234,
1220,
3707,
1643,
903,
303,
664,
300,
1383,
3502,
1220,
3401,
303,
664,
... | [
"def",
"Ġtest",
"(",
"d",
"_",
"iter",
"):",
"ĊĠĠĠ",
"Ġfrom",
"Ġc",
"ql",
"engine",
"Ġimport",
"Ġcolumns",
"ĊĠĠĠ",
"Ġfrom",
"Ġc",
"ql",
"engine",
".",
"models",
"Ġimport",
"ĠModel",
"ĊĠĠĠ",
"Ġfrom",
"Ġc",
"ql",
"engine",
".",
"query",
"Ġimport",
"ĠModel"... | [
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,
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,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8... | [
1,
4,
9,
10,
11,
12,
16,
18,
4,
9,
11,
13,
19,
26,
34,
4,
9,
11,
13,
19,
20,
26,
33,
39,
4,
9,
11,
13,
19,
20,
25,
32,
38,
43,
46,
4,
9,
11,
13,
19,
26,
37,
4,
9,
11,
13,
19,
20,
30,
37,
42,
43,
48,
4,
9,
1... |
71cdddfdd7c1327a8a77808dbdd0ff98d827231f | from flask.ext.restful import Resource, abort
from flask_login import current_user, login_required
from peewee import DoesNotExist
from redash.authentication.org_resolving import current_org
from redash.tasks import record_event
class BaseResource(Resource):
decorators = [login_required]
def __init__(self, ... | [
1097,
18958,
51,
426,
51,
4756,
2812,
1220,
6297,
49,
13309,
222,
1097,
18958,
100,
3632,
1220,
1565,
100,
514,
49,
6212,
100,
3662,
222,
1097,
3358,
412,
1310,
1220,
12901,
23705,
222,
222,
1097,
3363,
936,
51,
11754,
51,
1107,
100,
... | [
"from",
"Ġflask",
".",
"ext",
".",
"rest",
"ful",
"Ġimport",
"ĠResource",
",",
"Ġabort",
"Ċ",
"from",
"Ġflask",
"_",
"login",
"Ġimport",
"Ġcurrent",
"_",
"user",
",",
"Ġlogin",
"_",
"required",
"Ċ",
"from",
"Ġpe",
"ew",
"ee",
"Ġimport",
"ĠDoes",
"NotExis... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
4,
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,
8,
9,
9,
9,
9... | [
1,
5,
11,
12,
15,
16,
20,
23,
30,
39,
40,
46,
1,
5,
11,
12,
17,
24,
32,
33,
37,
38,
44,
45,
53,
1,
5,
8,
10,
12,
19,
24,
32,
1,
1,
5,
9,
12,
13,
27,
28,
31,
32,
35,
41,
48,
56,
57,
60,
1,
5,
9,
12,
13,
18,
... |
0b3f16ee9b287c6c77acde674abec9deb4053c83 | import tensorflow as tf
import keras
import numpy as np
def house_model(y_new):
xs = np.array([0, 1, 2, 4, 6, 8, 10], dtype=float) # Your Code Here#
ys = np.array([0.50, 0.100, 1.50, 2.50, 3.50, 4.50, 5.50], dtype=float) # Your Code Here#
model = tf.keras.Sequential([keras.layers.Dense(units=1, input_sh... | [
485,
15196,
641,
5369,
222,
485,
21144,
222,
485,
6610,
641,
2115,
499,
222,
610,
17113,
100,
1184,
45,
126,
100,
909,
731,
303,
9897,
299,
2115,
51,
977,
2034,
53,
49,
244,
54,
49,
244,
55,
49,
244,
57,
49,
244,
59,
49,
244,
... | [
"import",
"Ġtensorflow",
"Ġas",
"Ġtf",
"Ċ",
"import",
"Ġkeras",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"ĊĊ",
"Ċ",
"def",
"Ġhouse",
"_",
"model",
"(",
"y",
"_",
"new",
"):",
"ĊĠĠĠ",
"Ġxs",
"Ġ=",
"Ġnp",
".",
"array",
"([",
"0",
",",
"Ġ",
"1",
",",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
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,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8... | [
1,
7,
18,
21,
24,
1,
7,
13,
1,
7,
13,
16,
19,
1,
1,
4,
10,
11,
16,
17,
18,
19,
22,
24,
4,
7,
9,
12,
13,
18,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
42,
48,
49,
54,
... |
1754bce54a47cb78dce3b545d3dce835a4e0e69f | #!/usr/bin/env python
# coding: utf-8
import logging
import config
def get_common_logger(name="common", logfile=None):
"""
args: name (str): logger name
logfile (str): log file, use stream handler (stdout) as default.
return:
logger obj
"""
my_logger = logging.getLogger(name)
... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
40,
10633,
63,
6471,
50,
61,
222,
222,
485,
5751,
222,
222,
485,
1377,
499,
222,
610,
640,
100,
2297,
100,
4089,
45,
444,
366,
2297,
411,
47119,
66,
2545,
731,
303,
1547,
303,
2194,
63,
... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"#",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ċ",
"Ċ",
"import",
"Ġlogging",
"Ċ",
"Ċ",
"import",
"Ġconfig",
"ĊĊ",
"Ċ",
"def",
"Ġget",
"_",
"common",
"_",
"logger",
"(",
"name",
"=\"",
"common",
"\",",... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
5,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
12,
12,
12,
12... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
2,
9,
10,
14,
15,
16,
1,
1,
7,
15,
1,
1,
7,
14,
1,
1,
4,
8,
9,
15,
16,
22,
23,
27,
29,
35,
37,
45,
46,
50,
52,
4,
8,
4,
9,
10,
15,
17,
20,
22,
29,
34,
8,
16,
18,
21,
23,
27,... |
6affc182f5d3353d46f6e9a21344bc85bf894165 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
# pylint: disable=dangerous-default-value,wrong-import-position,unused-import, import-outside-toplevel
def create_app(settings_override={}):
app = Flask(__name__)
app.config.from_object("zezin.settings.Configuration")
app.c... | [
1097,
18958,
1220,
24033,
222,
1097,
18958,
100,
41228,
1220,
4447,
43108,
222,
222,
1219,
299,
4447,
43108,
365,
499,
222,
40,
27692,
63,
7383,
66,
105,
28290,
50,
1555,
50,
872,
49,
19696,
50,
485,
50,
2719,
49,
12086,
50,
485,
49... | [
"from",
"Ġflask",
"Ġimport",
"ĠFlask",
"Ċ",
"from",
"Ġflask",
"_",
"sqlalchemy",
"Ġimport",
"ĠSQL",
"Alchemy",
"Ċ",
"Ċ",
"db",
"Ġ=",
"ĠSQL",
"Alchemy",
"()",
"ĊĊ",
"Ċ",
"#",
"Ġpylint",
":",
"Ġdisable",
"=",
"d",
"angerous",
"-",
"default",
"-",
"value",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9... | [
1,
5,
11,
18,
24,
1,
5,
11,
12,
22,
29,
33,
40,
1,
1,
3,
5,
9,
16,
18,
1,
1,
2,
9,
10,
18,
19,
20,
28,
29,
36,
37,
42,
43,
48,
49,
55,
56,
64,
65,
71,
72,
78,
79,
86,
87,
94,
95,
103,
1,
4,
11,
12,
15,
16,
... |
9abf2b9b90d18332ede94cf1af778e0dda54330b | # Stubs for docutils.parsers.rst.directives.tables (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import csv
from docutils.statemachine import StringList
from docutils.nodes import Node, system_message, table, title
from docutils.parsers.rst import Directive
from typing impo... | [
40,
32482,
120,
456,
44135,
51,
25865,
51,
9630,
51,
33393,
51,
11288,
327,
8378,
244,
56,
51,
59,
46,
222,
40,
222,
40,
12125,
63,
1369,
22530,
20641,
11674,
1616,
6936,
4741,
829,
11674,
2536,
51,
222,
222,
485,
11490,
222,
1097,
... | [
"#",
"ĠStub",
"s",
"Ġfor",
"Ġdocutils",
".",
"parsers",
".",
"rst",
".",
"directives",
".",
"tables",
"Ġ(",
"Python",
"Ġ",
"3",
".",
"6",
")",
"Ċ",
"#",
"Ċ",
"#",
"ĠNOTE",
":",
"ĠThis",
"Ġdynamically",
"Ġtyped",
"Ġstub",
"Ġwas",
"Ġautomatically",
"Ġgen... | [
1,
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,
4,
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... | [
1,
2,
7,
8,
12,
21,
22,
29,
30,
33,
34,
44,
45,
51,
53,
59,
60,
61,
62,
63,
64,
1,
2,
1,
2,
7,
8,
13,
25,
31,
36,
40,
54,
64,
67,
72,
75,
76,
1,
1,
7,
11,
1,
5,
14,
15,
20,
27,
34,
41,
45,
1,
5,
14,
15,
20,... |
94e8f0532da76c803b23fe2217b07dc8cf285710 | # -*- coding: utf-8 -*-
"""
Created on Mon May 27 17:38:50 2019
@author: User
"""
import numpy as np
import pandas as pd
dataset = pd.read_csv("University_data.csv")
print(dataset.info())
features = dataset.iloc[:, :-1].values
labels = dataset.iloc[:, -1:].values
from sklearn.preprocessing import LabelEncoder
label... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
6880,
563,
5913,
10712,
244,
55,
60,
244,
54,
60,
63,
56,
61,
63,
58,
53,
244,
55,
53,
54,
62,
222,
222,
69,
2133,
63,
2694,
222,
3012,
222,
222,
485,
6610,
641,
2115,
... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"Created",
"Ġon",
"ĠMon",
"ĠMay",
"Ġ",
"2",
"7",
"Ġ",
"1",
"7",
":",
"3",
"8",
":",
"5",
"0",
"Ġ",
"2",
"0",
"1",
"9",
"Ċ",
"Ċ",
"@",
"author",
":",
"ĠUser",
"Ċ",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
6,
6,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
8,
11,
15,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
1,
1,
2,
8,
9,
14,
1,
4,
1,
1,
7,
13,
16,
19,
1,
7,
14,
17,
20,
1,
1,
8,
10,
13... |
f5d353694a719472320f4d6fa28bc9d2cc5a69b0 | # -*- coding: utf-8 -*-
"""
This is the very first A.I. in this series.
The vision is to devlop 'protocol droid' to talk to, to help with tasks, and with whom to play games.
The droid will be able to translate langages and connect ppl.
"""
import speech_recognition as sr
import pyttsx3
import pywhatkit
import dateti... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
3012,
222,
2287,
458,
341,
5055,
1950,
418,
51,
78,
51,
347,
477,
9523,
51,
222,
1338,
32899,
458,
391,
5693,
23817,
349,
5732,
362,
1647,
44,
391,
12467,
391,
49,
391,
3071,
642,
8285... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"\"\"\"",
"Ċ",
"This",
"Ġis",
"Ġthe",
"Ġvery",
"Ġfirst",
"ĠA",
".",
"I",
".",
"Ġin",
"Ġthis",
"Ġseries",
".",
"Ċ",
"The",
"Ġvision",
"Ġis",
"Ġto",
"Ġdev",
"lop",
"Ġ'",
"protocol",
"Ġd",
"r... | [
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,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
4,
1,
5,
8,
12,
17,
23,
25,
26,
27,
28,
31,
36,
43,
44,
1,
4,
11,
14,
17,
21,
24,
26,
34,
36,
40,
41,
44,
49,
52,
53,
56,
61,
66,
72,
73,
77,
82,
87,
90,
95,
101,
102,
1,
4... |
27a12a0f5ea6120036b66ee1cdd903da868a037f | # coding=utf-8
import base64
from sandcrawler.scraper import ScraperBase, SimpleScraperBase
class Hdmovie14Ag(SimpleScraperBase):
BASE_URL = "http://www1.solarmovie.net"
OTHER_URLS = ["http://solarmovie.net", "http://hdmovie14.ag"]
SCRAPER_TYPES = [
ScraperBase.SCRAPER_TYPE_OSP,
]
LANGUAGE... | [
40,
10633,
66,
3330,
50,
61,
222,
485,
1712,
59,
57,
222,
1097,
328,
382,
33407,
51,
564,
26877,
1220,
6918,
26877,
1778,
49,
7169,
2391,
26877,
1778,
499,
222,
842,
696,
105,
12953,
54,
57,
3310,
45,
5302,
2391,
26877,
1778,
731,
... | [
"#",
"Ġcoding",
"=",
"utf",
"-",
"8",
"Ċ",
"import",
"Ġbase",
"6",
"4",
"Ċ",
"from",
"Ġs",
"and",
"crawler",
".",
"sc",
"raper",
"Ġimport",
"ĠSc",
"raper",
"Base",
",",
"ĠSimple",
"Sc",
"raper",
"Base",
"ĊĊ",
"Ċ",
"class",
"ĠH",
"d",
"movie",
"1",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
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,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8... | [
1,
2,
9,
10,
13,
14,
15,
1,
7,
12,
13,
14,
1,
5,
7,
10,
17,
18,
20,
25,
32,
35,
40,
44,
45,
52,
54,
59,
63,
1,
1,
6,
8,
9,
14,
15,
16,
18,
19,
25,
27,
32,
36,
38,
4,
9,
10,
13,
15,
17,
21,
24,
27,
28,
29,
3... |
aba2a0a262c14f286c278f21ba42871410c174f0 | from django.shortcuts import render
from django.shortcuts import redirect
# Create your views here.
from .forms import AddBookForm, UpdateBookForm, BookCreateModelForm, SearchForm, RegistrationForm, SignInForm
from book.models import Books
from django.contrib.auth import authenticate, login, logout
def book_add(req... | [
1097,
8532,
51,
36264,
1220,
2922,
222,
1097,
8532,
51,
36264,
1220,
5675,
499,
222,
40,
2673,
1390,
11887,
2464,
51,
222,
1097,
657,
8543,
1220,
2242,
6597,
1260,
49,
4013,
6597,
1260,
49,
13357,
44635,
1260,
49,
7438,
1260,
49,
2751... | [
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġrender",
"Ċ",
"from",
"Ġdjango",
".",
"shortcuts",
"Ġimport",
"Ġredirect",
"ĊĊ",
"Ċ",
"#",
"ĠCreate",
"Ġyour",
"Ġviews",
"Ġhere",
".",
"Ċ",
"from",
"Ġ.",
"forms",
"Ġimport",
"ĠAdd",
"Book",
"Form",
",",
"ĠU... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
12,
13,
22,
29,
36,
1,
5,
12,
13,
22,
29,
38,
1,
1,
2,
9,
14,
20,
25,
26,
1,
5,
7,
12,
19,
23,
27,
31,
32,
39,
43,
47,
48,
53,
64,
68,
69,
76,
80,
81,
94,
98,
99,
104,
106,
110,
1,
5,
10,
11,
17,
24,
30... |
d5903698eb8ed6be531b0cc522d4feff6b79da4e | import argparse
import pandas as pd
import random
import time
class Deck:
def __init__(self, num_cols, front, back):
self.flashcards = []
self.num_cols = num_cols
self.front = front
self.back = back
class Flashcard:
def __init__(self, deck, front, back, column, row):
... | [
485,
16693,
222,
485,
13247,
641,
6451,
222,
485,
4051,
222,
485,
1153,
499,
222,
842,
49012,
63,
303,
684,
1176,
1683,
3232,
803,
49,
1952,
100,
8326,
49,
8442,
49,
1769,
731,
310,
649,
51,
9243,
12266,
299,
1627,
310,
649,
51,
1... | [
"import",
"Ġargparse",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġrandom",
"Ċ",
"import",
"Ġtime",
"ĊĊ",
"Ċ",
"class",
"ĠDeck",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġnum",
"_",
"cols",
",",
"Ġfront",
",",
"Ġback",
"):"... | [
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
6,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
12,
12,
12,... | [
1,
7,
16,
1,
7,
14,
17,
20,
1,
7,
14,
1,
7,
12,
1,
1,
6,
11,
12,
4,
8,
11,
15,
18,
22,
23,
27,
28,
32,
33,
39,
40,
45,
47,
8,
13,
14,
19,
24,
26,
29,
8,
13,
14,
17,
18,
22,
24,
28,
29,
33,
8,
13,
14,
19,
21... |
48291ab3deb1ca1ba672d3e642d55635a7270171 | import serial
from settings import *
class CommunicationController:
def __init__(self):
global board
board = serial.Serial(ROBOT_SERIAL, BAUDRATE, serial.EIGHTBITS, timeout=0)
self.count = 0
print("Communication controller")
def sendCommand(self, right, back, left):
se... | [
485,
4569,
222,
1097,
4086,
1220,
338,
499,
222,
842,
29133,
1934,
63,
303,
684,
1176,
1683,
3232,
803,
731,
310,
3671,
7782,
310,
7782,
299,
4569,
51,
2960,
45,
44374,
100,
16423,
49,
570,
10076,
3577,
1775,
49,
4569,
51,
74,
4022,... | [
"import",
"Ġserial",
"Ċ",
"from",
"Ġsettings",
"Ġimport",
"Ġ*",
"ĊĊ",
"Ċ",
"class",
"ĠCommunication",
"Controller",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġglobal",
"Ġboard",
"ĊĠĠĠĠĠĠĠ",
"Ġboard",
"Ġ=",
"Ġserial",
".",
"Serial",
... | [
1,
1,
1,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
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,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
1... | [
1,
7,
14,
1,
5,
14,
21,
23,
1,
1,
6,
20,
30,
31,
4,
8,
11,
15,
18,
22,
24,
8,
15,
21,
8,
14,
16,
23,
24,
30,
31,
36,
37,
43,
44,
46,
48,
50,
53,
54,
61,
62,
63,
67,
71,
72,
80,
81,
82,
83,
8,
13,
14,
19,
21,
... |
d7b0ff6549d854d21ad1d2d0f5a9e7f75f4ac1d5 | from django.test import TestCase
from recruitmentapp.apps.core.models import Competence
class CompetenceTest(TestCase):
def setUp(self):
self.competence = Competence.objects.create(name="mining")
self.competence.set_current_language("sv")
self.competence.name = "gruvarbete"
self.c... | [
1097,
8532,
51,
881,
1220,
19189,
222,
222,
1097,
334,
30522,
488,
745,
51,
7520,
51,
1284,
51,
3404,
1220,
2270,
383,
961,
499,
222,
842,
2270,
383,
961,
1024,
45,
7246,
731,
303,
684,
14544,
45,
803,
731,
310,
649,
51,
33888,
96... | [
"from",
"Ġdjango",
".",
"test",
"Ġimport",
"ĠTestCase",
"Ċ",
"Ċ",
"from",
"Ġre",
"cruit",
"ment",
"app",
".",
"apps",
".",
"core",
".",
"models",
"Ġimport",
"ĠComp",
"et",
"ence",
"ĊĊ",
"Ċ",
"class",
"ĠComp",
"et",
"ence",
"Test",
"(",
"TestCase",
"):"... | [
1,
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9... | [
1,
5,
12,
13,
17,
24,
33,
1,
1,
5,
8,
13,
17,
20,
21,
25,
26,
30,
31,
37,
44,
49,
51,
55,
1,
1,
6,
11,
13,
17,
21,
22,
30,
32,
4,
8,
14,
15,
19,
21,
8,
13,
14,
20,
24,
26,
31,
33,
37,
38,
45,
46,
52,
53,
57,
... |
8457cdde8f8ad069505c7729b8217e5d272be41e | from apps.mastermind.core.domain.domain import Color, Game
from apps.mastermind.infrastructure.mongo_persistence.uow import MongoUnitOfWork
from composite_root.container import provide
class GameMother:
async def a_game(
self,
num_slots: int,
num_colors: int,
max_guesses: int,
... | [
1097,
11568,
51,
2611,
24004,
51,
1284,
51,
4136,
51,
4136,
1220,
5459,
49,
6067,
222,
1097,
11568,
51,
2611,
24004,
51,
25921,
51,
17008,
100,
10782,
51,
122,
460,
1220,
14907,
3024,
29292,
222,
1097,
23352,
100,
2405,
51,
2646,
1220... | [
"from",
"Ġapps",
".",
"master",
"mind",
".",
"core",
".",
"domain",
".",
"domain",
"Ġimport",
"ĠColor",
",",
"ĠGame",
"Ċ",
"from",
"Ġapps",
".",
"master",
"mind",
".",
"infrastructure",
".",
"mongo",
"_",
"persistence",
".",
"u",
"ow",
"Ġimport",
"ĠMongo... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
9,
9,
9... | [
1,
5,
10,
11,
17,
21,
22,
26,
27,
33,
34,
40,
47,
53,
54,
59,
1,
5,
10,
11,
17,
21,
22,
36,
37,
42,
43,
54,
55,
56,
58,
65,
71,
75,
81,
1,
5,
15,
16,
20,
21,
30,
37,
45,
1,
1,
6,
11,
12,
17,
18,
4,
10,
14,
16... |
690e7cc9047b3a445bf330524df52e2b359f1f13 | AuthorPath = "data/Author.csv"
PaperPath = "buff/Paper.TitleCut.csv"
PaperAuthorPath = "data/PaperAuthor.csv"
AffilListPath = "buff/AffilList2.csv"
StopwordPath = "InternalData/en.lst"
| [
4372,
1233,
299,
332,
624,
52,
4372,
51,
4849,
39,
222,
22267,
1233,
299,
332,
12811,
52,
22267,
51,
3188,
18025,
51,
4849,
39,
222,
22267,
4372,
1233,
299,
332,
624,
52,
22267,
4372,
51,
4849,
39,
222,
14342,
354,
739,
1233,
299,
... | [
"Author",
"Path",
"Ġ=",
"Ġ\"",
"data",
"/",
"Author",
".",
"csv",
"\"",
"Ċ",
"Paper",
"Path",
"Ġ=",
"Ġ\"",
"buff",
"/",
"Paper",
".",
"Title",
"Cut",
".",
"csv",
"\"",
"Ċ",
"Paper",
"Author",
"Path",
"Ġ=",
"Ġ\"",
"data",
"/",
"Paper",
"Author",
"."... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
7,
11,
13,
15,
19,
20,
26,
27,
30,
31,
1,
6,
10,
12,
14,
18,
19,
24,
25,
30,
33,
34,
37,
38,
1,
6,
12,
16,
18,
20,
24,
25,
30,
36,
37,
40,
41,
1,
4,
6,
10,
14,
16,
18,
22,
23,
26,
28,
32,
33,
34,
37,
38,
1... |
7a9515b1f8cc196eb7551137a1418d5a387e7fd3 | import pandas as pd
import numpy as np
import difflib as dl
import sys
def get_close(x):
if len(x) == 0:
return ""
return x[0]
list_file = sys.argv[1]
rating_file = sys.argv[2]
output_file = sys.argv[3]
movie_list = open(list_file).read().splitlines()
movie_data = pd.DataFrame({"movie": movie_list}... | [
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
485,
5861,
1379,
641,
20944,
222,
485,
5263,
499,
222,
610,
640,
100,
2698,
45,
125,
731,
303,
434,
2095,
45,
125,
46,
630,
244,
53,
63,
310,
461,
3347,
303,
461,
837,
96,
5... | [
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġdiff",
"lib",
"Ġas",
"Ġdl",
"Ċ",
"import",
"Ġsys",
"ĊĊ",
"Ċ",
"def",
"Ġget",
"_",
"close",
"(",
"x",
"):",
"ĊĠĠĠ",
"Ġif",
"Ġlen",
"(",
"x",
")",
"Ġ==",
"Ġ",
... | [
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
10,
10,
10,
10,
10,
10,
12,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
14,... | [
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
7,
12,
15,
18,
21,
1,
7,
11,
1,
1,
4,
8,
9,
14,
15,
16,
18,
4,
7,
11,
12,
13,
14,
17,
18,
19,
20,
8,
15,
18,
4,
11,
13,
14,
15,
16,
1,
1,
5,
6,
10,
12,
16,
17,
21,
2... |
19aad7d45416e311530aa2ce3e854cf1f65d18f5 | import multiprocessing
import time
def foo():
time.sleep(0.1)
p = multiprocessing.Process(target=foo)
p.start()
print("process running: ", p, p.is_alive())
p.terminate()
print("process running: ", p, p.is_alive())
p.join()
print("process running: ", p, p.is_alive())
print("process exit code:", p.exitcode)
| [
485,
43085,
222,
485,
1153,
499,
222,
610,
9229,
2284,
303,
1153,
51,
7860,
45,
53,
51,
54,
46,
499,
222,
117,
299,
43085,
51,
2877,
45,
2000,
66,
4003,
46,
222,
117,
51,
1384,
365,
222,
1243,
459,
2441,
3991,
63,
3021,
317,
49,... | [
"import",
"Ġmultiprocessing",
"Ċ",
"import",
"Ġtime",
"ĊĊ",
"Ċ",
"def",
"Ġfoo",
"():",
"ĊĠĠĠ",
"Ġtime",
".",
"sleep",
"(",
"0",
".",
"1",
")",
"ĊĊ",
"Ċ",
"p",
"Ġ=",
"Ġmultiprocessing",
".",
"Process",
"(",
"target",
"=",
"foo",
")",
"Ċ",
"p",
".",
... | [
1,
1,
1,
2,
2,
2,
4,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
12,
12,
12,
12,
12,
13,
... | [
1,
7,
23,
1,
7,
12,
1,
1,
4,
8,
11,
4,
9,
10,
15,
16,
17,
18,
19,
20,
1,
1,
2,
4,
20,
21,
28,
29,
35,
36,
39,
40,
1,
2,
3,
8,
10,
1,
6,
8,
15,
23,
24,
27,
29,
30,
32,
33,
35,
36,
41,
44,
1,
2,
3,
12,
14,
... |
623bd858923d5f9cc109af586fdda01cd3d5fff3 | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import InputRequired, Length, EqualTo, ValidationError
from passlib.hash import pbkdf2_sha256
from models import User
def invalid_credentials(form, field):
"""Username and password checker"""
u... | [
1097,
18958,
100,
124,
4274,
1220,
24033,
1260,
222,
1097,
35648,
8543,
1220,
910,
1195,
49,
12576,
1195,
49,
22878,
1195,
222,
1097,
35648,
8543,
51,
24878,
1220,
4257,
5425,
49,
16827,
49,
15677,
724,
49,
40026,
222,
1097,
3119,
1379,... | [
"from",
"Ġflask",
"_",
"w",
"tf",
"Ġimport",
"ĠFlask",
"Form",
"Ċ",
"from",
"Ġwt",
"forms",
"Ġimport",
"ĠString",
"Field",
",",
"ĠPassword",
"Field",
",",
"ĠSubmit",
"Field",
"Ċ",
"from",
"Ġwt",
"forms",
".",
"validators",
"Ġimport",
"ĠInput",
"Required",
... | [
1,
1,
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,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
7,
8,
8,
8,
8... | [
1,
5,
11,
12,
13,
15,
22,
28,
32,
1,
5,
8,
13,
20,
27,
32,
33,
42,
47,
48,
55,
60,
1,
5,
8,
13,
14,
24,
31,
37,
45,
46,
53,
54,
60,
62,
63,
79,
1,
5,
10,
13,
14,
18,
25,
28,
29,
31,
32,
33,
36,
37,
38,
39,
1,... |
9abc5f18e2eb07afe6bc31d6bd27298350707d1d | """
爱丽丝和鲍勃有不同大小的糖果棒:A[i] 是爱丽丝拥有的第 i 根糖果棒的大小,B[j] 是鲍勃拥有的第 j 根糖果棒的大小。
因为他们是朋友,所以他们想交换一根糖果棒,这样交换后,他们都有相同的糖果总量。(一个人拥有的糖果总量是他们拥有的糖果棒大小的总和。)
返回一个整数数组 ans,其中 ans[0] 是爱丽丝必须交换的糖果棒的大小,ans[1] 是 Bob 必须交换的糖果棒的大小。
如果有多个答案,你可以返回其中任何一个。保证答案存在。
"""
def fairCandySwap(A, B):
sumA, sumB = sum(A), sum(B)
setA, setB = set(A), s... | [
3012,
222,
33130,
816,
159,
816,
275,
4496,
39671,
259,
11185,
249,
3052,
16866,
21900,
1096,
7550,
268,
5428,
13426,
264,
3111,
70,
96,
110,
98,
24489,
33130,
816,
159,
816,
275,
42509,
45532,
8980,
613,
244,
12588,
7550,
268,
5428,
... | [
"\"\"\"",
"Ċ",
"çα",
"ä¸",
"½",
"ä¸",
"Ŀ",
"åĴĮ",
"é²",
"į",
"åĭ",
"ĥ",
"æľī",
"ä¸įåIJĮ",
"大å°ı",
"çļĦ",
"ç³",
"ĸ",
"æŀľ",
"æ£",
"Ĵ",
"ï¼ļ",
"A",
"[",
"i",
"]",
"Ġæĺ¯",
"çα",
"ä¸",
"½",
"ä¸",
"Ŀ",
"æĭ¥",
"æľīçļĦ",
"第",
"Ġi",
"Ġ",
"æł¹",
... | [
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,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2... | [
1,
4,
1,
2,
2,
3,
3,
4,
5,
5,
6,
6,
7,
8,
10,
12,
13,
13,
14,
15,
15,
16,
17,
18,
19,
20,
21,
23,
24,
24,
25,
25,
26,
27,
29,
30,
32,
33,
34,
34,
35,
36,
36,
37,
38,
40,
41,
42,
43,
44,
45,
47,
47,
48,
48,
... |
6f698196e9391d73bd99cda0a098a5bf7a3832ff | from turtle import *
while True:
n = input("Right or left? ")
if n == "right":
right(60)
forward(100)
elif n == "left":
left(60)
forward(100)
| [
1097,
20775,
5552,
1220,
338,
222,
222,
5544,
2969,
63,
303,
329,
299,
1533,
459,
4058,
575,
2859,
68,
7816,
465,
434,
329,
630,
332,
1009,
582,
310,
2109,
45,
59,
53,
46,
310,
7425,
45,
54,
53,
53,
46,
303,
4378,
329,
630,
332,... | [
"from",
"Ġtur",
"tle",
"Ġimport",
"Ġ*",
"Ċ",
"Ċ",
"while",
"ĠTrue",
":",
"ĊĠĠĠ",
"Ġn",
"Ġ=",
"Ġinput",
"(\"",
"Right",
"Ġor",
"Ġleft",
"?",
"Ġ\")",
"ĊĊĠĠĠ",
"Ġif",
"Ġn",
"Ġ==",
"Ġ\"",
"right",
"\":",
"ĊĠĠĠĠĠĠĠ",
"Ġright",
"(",
"6",
"0",
")",
"ĊĠĠĠĠĠĠ... | [
1,
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11
] | [
1,
5,
9,
12,
19,
21,
1,
1,
6,
11,
12,
4,
6,
8,
14,
16,
21,
24,
29,
30,
33,
4,
7,
9,
12,
14,
19,
21,
8,
14,
15,
16,
17,
18,
8,
16,
17,
18,
19,
20,
21,
4,
9,
11,
14,
16,
20,
22,
8,
13,
14,
15,
16,
17,
8,
16,
... |
b4d412e8b45722a855a16dd64b7bce9b303d0ffe | from collections import defaultdict
class Graph:
def __init__(self):
self._graph = defaultdict(list)
self._odd_vertices = []
def add_vertex(self, v):
if not v in self._graph:
self._graph[v] = list()
def add_edge(self, v1, v2):
self._graph[v1].append(v2)
... | [
1097,
13722,
1220,
31701,
499,
222,
842,
6478,
63,
303,
684,
1176,
1683,
3232,
803,
731,
310,
649,
1132,
2275,
299,
31701,
45,
687,
46,
310,
649,
1132,
12176,
100,
12328,
299,
1627,
465,
684,
1035,
100,
9317,
45,
803,
49,
373,
731,
... | [
"from",
"Ġcollections",
"Ġimport",
"Ġdefaultdict",
"ĊĊ",
"Ċ",
"class",
"ĠGraph",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"._",
"graph",
"Ġ=",
"Ġdefaultdict",
"(",
"list",
")",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"._",
"odd",
"_",
"ve... | [
1,
1,
1,
1,
1,
3,
4,
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,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
... | [
1,
5,
17,
24,
36,
1,
1,
6,
12,
13,
4,
8,
11,
15,
18,
22,
24,
8,
13,
15,
20,
22,
34,
35,
39,
40,
8,
13,
15,
18,
19,
27,
29,
32,
4,
8,
12,
13,
19,
20,
24,
25,
27,
29,
8,
11,
15,
17,
20,
25,
27,
32,
33,
12,
17,
... |
bab78e8a88f9a26cc13fe0c301f82880cee2b680 | from django.contrib import admin
from .models import Predictions
@admin.register(Predictions)
class PredictionsAdmin(admin.ModelAdmin):
pass
| [
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
657,
3404,
1220,
14509,
17483,
499,
222,
69,
2317,
51,
3334,
45,
7964,
17483,
46,
222,
842,
14509,
17483,
4208,
45,
2317,
51,
1262,
4208,
731,
303,
3119,
222
] | [
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġ.",
"models",
"Ġimport",
"ĠPred",
"ictions",
"ĊĊ",
"Ċ",
"@",
"admin",
".",
"register",
"(",
"Pred",
"ictions",
")",
"Ċ",
"class",
"ĠPred",
"ictions",
"Admin",
"(",
"admin",
".",
"Mode... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7
] | [
1,
5,
12,
13,
20,
27,
33,
1,
5,
7,
13,
20,
25,
32,
1,
1,
2,
7,
8,
16,
17,
21,
28,
29,
1,
6,
11,
18,
23,
24,
29,
30,
35,
40,
42,
4,
9
] |
fd450b5454b65ed69b411028788c587f9674760c | #!/usr/bin/env python
"""
Script that generates the photon efficiency curves and stores them in a root
file.
For the moment only the pT curves for the different eta bins are created
"""
import re
import json
import ROOT as r
r.PyConfig.IgnoreCommandLineOptions = True
import numpy as np
import sympy as sp
from util... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
3012,
222,
3223,
708,
18073,
341,
2697,
20047,
30797,
32400,
480,
15369,
3049,
347,
331,
3070,
222,
781,
51,
222,
222,
1580,
341,
8245,
1773,
341,
317,
89,
32400,
456,
341,
3473,
30992,
22941... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"\"\"\"",
"Ċ",
"Script",
"Ġthat",
"Ġgenerates",
"Ġthe",
"Ġph",
"oton",
"Ġefficiency",
"Ġcurves",
"Ġand",
"Ġstores",
"Ġthem",
"Ġin",
"Ġa",
"Ġroot",
"Ċ",
"file",
".",
"Ċ",
"Ċ",
"For",
"Ġthe",
"Ġmoment",... | [
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,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
9,
9,
9,
10,
10,
10,
11,
11,
11,
11,
11,
12,
13,
1... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
4,
1,
7,
12,
22,
26,
29,
33,
44,
51,
55,
62,
67,
70,
72,
77,
1,
5,
6,
1,
1,
4,
8,
15,
20,
24,
26,
27,
34,
38,
42,
52,
56,
61,
65,
73,
1,
4,
1,
1,
7,
10,
1,
7,
12,
1,
7,
12,
... |
176ffac7ad47f5c43a24acc664631f8353ec5100 | import matplotlib.pyplot as plt
import numpy as np
steps = 10
num_tests = 100
res = []
with open("txt.txt", "r") as f:
data = f.readlines()
line = 0
for i in range(10, 110, 10):
agg = 0
for j in range(num_tests):
agg += int(data[line])
line += 1
res.append(... | [
485,
13168,
51,
18553,
641,
6020,
222,
485,
6610,
641,
2115,
222,
222,
7495,
299,
244,
54,
53,
222,
1538,
100,
4895,
299,
244,
54,
53,
53,
222,
222,
595,
299,
1627,
222,
222,
1814,
2177,
459,
2787,
51,
2787,
411,
332,
119,
678,
... | [
"import",
"Ġmatplotlib",
".",
"pyplot",
"Ġas",
"Ġplt",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"Ċ",
"steps",
"Ġ=",
"Ġ",
"1",
"0",
"Ċ",
"num",
"_",
"tests",
"Ġ=",
"Ġ",
"1",
"0",
"0",
"Ċ",
"Ċ",
"res",
"Ġ=",
"Ġ[]",
"Ċ",
"Ċ",
"with",
"Ġopen",
"... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
12,
... | [
1,
7,
18,
19,
25,
28,
32,
1,
7,
13,
16,
19,
1,
1,
6,
8,
9,
10,
11,
1,
4,
5,
10,
12,
13,
14,
15,
16,
1,
1,
4,
6,
9,
1,
1,
5,
10,
12,
15,
16,
19,
21,
23,
24,
26,
29,
31,
32,
4,
9,
11,
13,
14,
23,
25,
4,
9,
... |
b3d26d01d45c073192d06c8e94c06f7eae267b14 | old_file = open("new.csv", "r")
new_file = open("new1,csv", "w")
for line in old_file.readlines():
cleaned_line = line.replace(",", ".")
new_file.write(cleaned_line)
old_file.close
new_file.close
| [
1477,
100,
781,
299,
2177,
459,
909,
51,
4849,
411,
332,
119,
678,
222,
909,
100,
781,
299,
2177,
459,
909,
54,
49,
4849,
411,
332,
124,
678,
222,
999,
1646,
347,
3627,
100,
781,
51,
33515,
2284,
303,
28219,
100,
948,
299,
1646,
... | [
"old",
"_",
"file",
"Ġ=",
"Ġopen",
"(\"",
"new",
".",
"csv",
"\",",
"Ġ\"",
"r",
"\")",
"Ċ",
"new",
"_",
"file",
"Ġ=",
"Ġopen",
"(\"",
"new",
"1",
",",
"csv",
"\",",
"Ġ\"",
"w",
"\")",
"Ċ",
"for",
"Ġline",
"Ġin",
"Ġold",
"_",
"file",
".",
"readl... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6... | [
1,
4,
5,
9,
11,
16,
18,
21,
22,
25,
27,
29,
30,
32,
1,
4,
5,
9,
11,
16,
18,
21,
22,
23,
26,
28,
30,
31,
33,
1,
4,
9,
12,
16,
17,
21,
22,
31,
34,
4,
12,
13,
17,
19,
24,
25,
32,
37,
40,
42,
4,
8,
9,
13,
14,
1... |
aa13278a4686e9bab7948c2f212f87f9bd6eee00 | import socket
END = bytearray()
END.append(255)
print(END[0])
def recvall(sock): # Odbiór danych
BUFF_SIZE = 4096 # 4 KiB
data = b""
while True: # odbieramy dane, pakiety 4KiB
part = sock.recv(BUFF_SIZE)
data += part
if len(part) < BUFF_SIZE:
# 0 lub koniec danych
... | [
485,
6241,
222,
222,
3298,
299,
3447,
977,
365,
222,
3298,
51,
1713,
45,
55,
58,
58,
46,
222,
1243,
45,
3298,
96,
53,
1156,
499,
222,
610,
20519,
483,
45,
9192,
731,
244,
607,
565,
1219,
110,
2122,
119,
30782,
303,
9038,
1158,
1... | [
"import",
"Ġsocket",
"Ċ",
"Ċ",
"END",
"Ġ=",
"Ġbyte",
"array",
"()",
"Ċ",
"END",
".",
"append",
"(",
"2",
"5",
"5",
")",
"Ċ",
"print",
"(",
"END",
"[",
"0",
"])",
"ĊĊ",
"Ċ",
"def",
"Ġrecv",
"all",
"(",
"sock",
"):",
"Ġ",
"Ġ#",
"ĠO",
"db",
"i",... | [
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
7,
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,
9,
9,
10,
10,
10,
10,... | [
1,
7,
14,
1,
1,
4,
6,
11,
16,
18,
1,
4,
5,
11,
12,
13,
14,
15,
16,
1,
6,
7,
10,
11,
12,
14,
1,
1,
4,
9,
12,
13,
17,
19,
20,
22,
24,
26,
27,
28,
29,
36,
4,
7,
9,
10,
14,
16,
17,
18,
19,
20,
21,
22,
24,
25,
... |
736fee6f9a46b8568b2dd217b81d54d689306630 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import datetime
import time
from sys import exit
from matplotlib import colors, pyplot as plt
from functools import reduce
import matplotlib.cm as cm
import seaborn as sns
from astropy.io import ascii, fits
from astropy.wcs import wcs
fro... | [
8758,
3392,
52,
1793,
52,
2980,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
222,
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
485,
7181,
222,
485,
1153,
222,
1097,
5263,
1220,
4338,
222,
1097,
13168,
1220,
9660,
49,... | [
"#!/",
"usr",
"/",
"bin",
"/",
"python",
"Ċ",
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"import",
"Ġdatetime",
"Ċ",
"import",
"Ġtime",
"Ċ",
"from",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,
10,
11,
11,
11,
11,
11,
11,
11,
12,
... | [
1,
4,
7,
8,
11,
12,
18,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
7,
16,
1,
7,
12,
1,
5,
9,
16,
21,
1,
5,
16,
23,
30,
31,
34,
38,
41,
45,
1,
5,
15,
22,
29,
1,
7,
18,
19,
... |
dbe3aa107de8e62822803d1740773a4b22f41edf | import sys, os
sys.path.append(os.pardir)
import numpy as np
from dataset.mnist import load_mnist
from two_layer_net import TwoLayerNet
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)
train_loss_list = []
# hiper param
iters_num = 1000
train_size = x_train.shape[0]
batch_size =... | [
485,
5263,
49,
2355,
222,
222,
3750,
51,
1005,
51,
1713,
45,
519,
51,
587,
1537,
46,
222,
485,
6610,
641,
2115,
222,
1097,
5984,
51,
36296,
1220,
2480,
100,
36296,
222,
1097,
3161,
100,
1842,
100,
1317,
1220,
16529,
4789,
3598,
222,... | [
"import",
"Ġsys",
",",
"Ġos",
"Ċ",
"Ċ",
"sys",
".",
"path",
".",
"append",
"(",
"os",
".",
"par",
"dir",
")",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
"Ġnp",
"Ċ",
"from",
"Ġdataset",
".",
"mnist",
"Ġimport",
"Ġload",
"_",
"mnist",
"Ċ",
"from",
"Ġtwo",
"_",
... | [
1,
1,
1,
1,
1,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
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,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
7,
11,
12,
15,
1,
1,
4,
5,
9,
10,
16,
17,
19,
20,
23,
26,
27,
1,
7,
13,
16,
19,
1,
5,
13,
14,
19,
26,
31,
32,
37,
1,
5,
9,
10,
15,
16,
19,
26,
30,
35,
38,
1,
1,
2,
3,
4,
9,
10,
12,
13,
18,
20,
22,
23,
... |
3f9be81c86852a758440c6a144b8caba736b3868 | # Generated by Django 3.1.7 on 2021-02-20 02:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("usuarios", "0001_initial"),
("plataforma", "0005_auto_20210219_2343"),
]
operations = [
migrations.A... | [
40,
13046,
829,
18288,
244,
56,
51,
54,
51,
60,
563,
244,
55,
53,
55,
54,
50,
53,
55,
50,
55,
53,
244,
53,
55,
63,
58,
55,
222,
222,
1097,
8532,
51,
1219,
1220,
12520,
49,
4590,
222,
485,
8532,
51,
1219,
51,
3404,
51,
30530,... | [
"#",
"ĠGenerated",
"Ġby",
"ĠDjango",
"Ġ",
"3",
".",
"1",
".",
"7",
"Ġon",
"Ġ",
"2",
"0",
"2",
"1",
"-",
"0",
"2",
"-",
"2",
"0",
"Ġ",
"0",
"2",
":",
"5",
"2",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"db",
"Ġimport",
"Ġmigrations",
",",
"Ġmodels",
... | [
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,
4,
4,
4,
4,
4,
4,
4,
4,
4,
6,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
9,
9,
9... | [
1,
2,
12,
15,
22,
23,
24,
25,
26,
27,
28,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
1,
1,
5,
12,
13,
15,
22,
33,
34,
41,
1,
7,
14,
15,
17,
18,
24,
25,
33,
1,
1,
6,
16,
17,
27,
28... |
e06b740f27e41b9f120c962fd76a38a29d54af3c | from more_itertools import ilen
from my.body import weight, shower, food, water
def test_body() -> None:
for func in (weight, shower, food, water):
assert ilen(func()) >= 1
| [
1097,
1851,
100,
1751,
4303,
1220,
6245,
291,
222,
222,
1097,
1690,
51,
1561,
1220,
7576,
49,
807,
2139,
49,
17909,
49,
13461,
499,
222,
610,
913,
100,
1561,
365,
984,
1686,
63,
303,
456,
3439,
347,
327,
3327,
49,
807,
2139,
49,
1... | [
"from",
"Ġmore",
"_",
"iter",
"tools",
"Ġimport",
"Ġil",
"en",
"Ċ",
"Ċ",
"from",
"Ġmy",
".",
"body",
"Ġimport",
"Ġweight",
",",
"Ġsh",
"ower",
",",
"Ġfood",
",",
"Ġwater",
"ĊĊ",
"Ċ",
"def",
"Ġtest",
"_",
"body",
"()",
"Ġ->",
"ĠNone",
":",
"ĊĠĠĠ",
"... | [
1,
1,
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,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8
] | [
1,
5,
10,
11,
15,
20,
27,
30,
32,
1,
1,
5,
8,
9,
13,
20,
27,
28,
31,
35,
36,
41,
42,
48,
1,
1,
4,
9,
10,
14,
16,
19,
24,
25,
4,
8,
13,
16,
18,
24,
25,
28,
32,
33,
38,
39,
45,
47,
8,
15,
18,
20,
21,
25,
28,
... |
c7c412fe4e2d53af1b4f2a55bd3453496767890d | from time import sleep
import pytest
import allure
from app.debug_api import DebugAPI
from app.check_api import HandlersAPI
from locators.movies_details_locators import MoviesDetailsPageLocators
from locators.movies_locators import MoviesPageLocators
from locators.shedule_locators import ShedulePageLocators
from scree... | [
1097,
1153,
1220,
9375,
222,
485,
13090,
222,
485,
1187,
532,
222,
222,
1097,
1142,
51,
2824,
100,
1256,
1220,
8093,
2571,
222,
1097,
1142,
51,
1571,
100,
1256,
1220,
17414,
6669,
2571,
222,
1097,
2600,
4079,
51,
22393,
100,
3972,
100... | [
"from",
"Ġtime",
"Ġimport",
"Ġsleep",
"Ċ",
"import",
"Ġpytest",
"Ċ",
"import",
"Ġall",
"ure",
"Ċ",
"Ċ",
"from",
"Ġapp",
".",
"debug",
"_",
"api",
"Ġimport",
"ĠDebug",
"API",
"Ċ",
"from",
"Ġapp",
".",
"check",
"_",
"api",
"Ġimport",
"ĠHand",
"lers",
"AP... | [
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
10,
17,
23,
1,
7,
14,
1,
7,
11,
14,
1,
1,
5,
9,
10,
15,
16,
19,
26,
32,
35,
1,
5,
9,
10,
15,
16,
19,
26,
31,
35,
38,
1,
5,
9,
14,
15,
21,
22,
29,
30,
33,
38,
45,
49,
52,
59,
63,
66,
71,
1,
5,
9,
14,
... |
327371d373819273a2f77f63e0cedee6950dbc46 | #!/usr/bin/env python
"""
##############################################################################
Software Package Risk Analysis Development Environment Specific Work Book View
##############################################################################
"""
# -*- coding: utf-8 -*-
#
# rtk.software.__gui... | [
8758,
3392,
52,
1793,
52,
2141,
4406,
222,
3012,
222,
19989,
14308,
222,
9903,
9718,
578,
8265,
17497,
15606,
10584,
25093,
6352,
13357,
4340,
222,
19989,
14308,
222,
3012,
222,
222,
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
2... | [
"#!/",
"usr",
"/",
"bin",
"/",
"env",
"Ġpython",
"Ċ",
"\"\"\"",
"Ċ",
"########################################################################",
"######",
"Ċ",
"Software",
"ĠPackage",
"ĠR",
"isk",
"ĠAnalysis",
"ĠDevelopment",
"ĠEnvironment",
"ĠSpecific",
"ĠWork",
"ĠBook",... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
... | [
1,
4,
7,
8,
11,
12,
15,
22,
1,
4,
1,
73,
79,
1,
9,
17,
19,
22,
31,
43,
55,
64,
69,
74,
79,
1,
73,
79,
1,
4,
1,
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
1,
2,
8,
10,
12,
13,
21,
24,
27,
28,
31,
32,
43,
54,
5... |
136215a3ba99f74160373181c458db9bec4bb6b7 | # PortableKanban 4.3.6578.38136 - Encrypted Password Retrieval
# Python3 -m pip install des
# or
# pip install des
import json
import base64
from des import * # python3 -m pip install des, pip install des
import sys
def decode(hash):
hash = base64.b64decode(hash.encode("utf-8"))
key = DesKey(b"7ly6UznJ")
... | [
40,
8449,
463,
80,
297,
10365,
244,
57,
51,
56,
51,
59,
58,
60,
61,
51,
56,
61,
54,
56,
59,
449,
2445,
10516,
12576,
24513,
718,
222,
40,
5006,
56,
449,
114,
10815,
2462,
3993,
222,
40,
575,
222,
40,
10815,
2462,
3993,
222,
22... | [
"#",
"ĠPort",
"able",
"K",
"an",
"ban",
"Ġ",
"4",
".",
"3",
".",
"6",
"5",
"7",
"8",
".",
"3",
"8",
"1",
"3",
"6",
"Ġ-",
"ĠEn",
"crypted",
"ĠPassword",
"ĠRetrie",
"val",
"Ċ",
"#",
"ĠPython",
"3",
"Ġ-",
"m",
"Ġpip",
"Ġinstall",
"Ġdes",
"Ċ",
"#... | [
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,
3,
3,
3,
4,
4,
4,
4,
4,
5,
6,
6,
6,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
2,
7,
11,
12,
14,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
34,
37,
44,
53,
60,
63,
1,
2,
9,
10,
12,
13,
17,
25,
29,
1,
2,
5,
1,
2,
6,
14,
18,
1,
1,
7,
12,
1,
7,
12,
13,
14,
1,
5,
... |
cc46485a3b5c68e4f77a2f9a033fd2ee2859b52b | from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
from sklearn.datasets import load_iris
from sklearn.model_selection import cross_val_score
iris_dataset = load_iris()
X = iris_dataset["data"]
y = iris_dataset["target"]
X_train, ... | [
1097,
14415,
51,
3266,
1220,
37236,
3371,
16077,
222,
1097,
14415,
51,
1184,
100,
8402,
1220,
5877,
100,
881,
100,
3045,
222,
485,
13247,
641,
6451,
222,
485,
6610,
641,
2115,
222,
1097,
14415,
51,
15461,
1220,
2480,
100,
29573,
222,
... | [
"from",
"Ġsklearn",
".",
"tree",
"Ġimport",
"ĠDecision",
"Tree",
"Classifier",
"Ċ",
"from",
"Ġsklearn",
".",
"model",
"_",
"selection",
"Ġimport",
"Ġtrain",
"_",
"test",
"_",
"split",
"Ċ",
"import",
"Ġpandas",
"Ġas",
"Ġpd",
"Ċ",
"import",
"Ġnumpy",
"Ġas",
... | [
1,
1,
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,
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,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8... | [
1,
5,
13,
14,
18,
25,
34,
38,
48,
1,
5,
13,
14,
19,
20,
29,
36,
42,
43,
47,
48,
53,
1,
7,
14,
17,
20,
1,
7,
13,
16,
19,
1,
5,
13,
14,
22,
29,
34,
35,
39,
1,
5,
13,
14,
19,
20,
29,
36,
42,
43,
46,
47,
52,
1,
... |
ce98c13555c474de0a9cb12e99a97b2316312b00 | yuki = list(map(int, input().split()))
S = input()
enemy = [S.count("G"), S.count("C"), S.count("P")]
ans = 0
for i in range(3):
ans += min(yuki[i], enemy[(i + 1) % 3]) * 3
yuki[i], enemy[(i + 1) % 3] = max(0, yuki[i] - enemy[(i + 1) % 3]), max(0, enemy[(i + 1) % 3] - yuki[i])
for i in range(3):
ans += min... | [
126,
32428,
299,
1168,
45,
1130,
45,
429,
49,
1533,
941,
3045,
5183,
222,
88,
299,
1533,
365,
222,
27339,
299,
447,
88,
51,
1016,
459,
76,
2132,
377,
51,
1016,
459,
72,
2132,
377,
51,
1016,
459,
85,
3843,
222,
711,
299,
244,
53,... | [
"y",
"uki",
"Ġ=",
"Ġlist",
"(",
"map",
"(",
"int",
",",
"Ġinput",
"().",
"split",
"()))",
"Ċ",
"S",
"Ġ=",
"Ġinput",
"()",
"Ċ",
"enemy",
"Ġ=",
"Ġ[",
"S",
".",
"count",
"(\"",
"G",
"\"),",
"ĠS",
".",
"count",
"(\"",
"C",
"\"),",
"ĠS",
".",
"count... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6... | [
1,
2,
5,
7,
12,
13,
16,
17,
20,
21,
27,
30,
35,
39,
1,
2,
4,
10,
12,
1,
6,
8,
10,
11,
12,
17,
19,
20,
23,
25,
26,
31,
33,
34,
37,
39,
40,
45,
47,
48,
51,
1,
4,
6,
7,
8,
1,
4,
6,
9,
15,
16,
17,
19,
4,
8,
1... |
3f3ed0165120dc135a4ce1f282dbdf9dad57adf8 | # coding: UTF-8 -*-
import os.path
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
EMOTICONS = {
"O:)": "angel",
"o:)": "angel",
"O:-)": "angel",
"o:-)": "angel",
"o:-3": "angel",
"o:3": "angel",
"O;^)": "angel",
">:[": "annoyed/disappointed",
":-(": "annoyed/disappointed... | [
40,
10633,
63,
9360,
50,
61,
8571,
222,
485,
2355,
51,
1005,
222,
222,
12161,
100,
7799,
299,
2355,
51,
1005,
51,
7792,
45,
519,
51,
1005,
51,
21424,
4077,
781,
28130,
222,
222,
4565,
1212,
18566,
88,
299,
320,
303,
332,
84,
29580... | [
"#",
"Ġcoding",
":",
"ĠUTF",
"-",
"8",
"Ġ-*-",
"Ċ",
"import",
"Ġos",
".",
"path",
"Ċ",
"Ċ",
"PROJECT",
"_",
"ROOT",
"Ġ=",
"Ġos",
".",
"path",
".",
"dirname",
"(",
"os",
".",
"path",
".",
"abspath",
"(__",
"file",
"__))",
"Ċ",
"Ċ",
"EM",
"OT",
"... | [
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9... | [
1,
2,
9,
10,
14,
15,
16,
20,
1,
7,
10,
11,
15,
1,
1,
8,
9,
13,
15,
18,
19,
23,
24,
31,
32,
34,
35,
39,
40,
47,
50,
54,
58,
1,
1,
3,
5,
9,
10,
12,
14,
4,
6,
7,
9,
11,
13,
17,
18,
20,
4,
6,
7,
9,
11,
13,
17... |
3cc894570189fe545f5db3150d0b69c16dc211dc | class player:
def __init__(self, name: str, symbol: str):
self._name = name
self._symbol = symbol
def decide_next_move(self):
"""
Checks all possible combinations to decide best next move
:return: board position
"""
pass
def get_next_move(self):
... | [
842,
4376,
63,
303,
684,
1176,
1683,
3232,
803,
49,
655,
63,
615,
49,
6988,
63,
615,
731,
310,
649,
1132,
444,
299,
655,
310,
649,
1132,
7029,
299,
6988,
465,
684,
19777,
100,
1995,
100,
1518,
45,
803,
731,
310,
1547,
310,
17269,
... | [
"class",
"Ġplayer",
":",
"ĊĠĠĠ",
"Ġdef",
"Ġ__",
"init",
"__(",
"self",
",",
"Ġname",
":",
"Ġstr",
",",
"Ġsymbol",
":",
"Ġstr",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"._",
"name",
"Ġ=",
"Ġname",
"ĊĠĠĠĠĠĠĠ",
"Ġself",
"._",
"symbol",
"Ġ=",
"Ġsymbol",
"ĊĊĠĠĠ",
"Ġdef",
... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
10,
10,
11,
11,... | [
1,
6,
13,
14,
4,
8,
11,
15,
18,
22,
23,
28,
29,
33,
34,
41,
42,
46,
48,
8,
13,
15,
19,
21,
26,
8,
13,
15,
21,
23,
30,
4,
8,
15,
16,
20,
21,
25,
26,
30,
32,
8,
12,
8,
15,
19,
28,
41,
44,
51,
56,
61,
66,
8,
10,... |
3f8b8b8cfbe712f09734d0fb7302073187d65a73 | """
def Sort(a):
i=1
while i<len(a):
j=i
while j>0 and a[j-1] > a[j]:
temp = a[j-1]
a[j-1] = a[j]
a[j] = temp
j-=1
i+=1
return a
"""
def Sort(a):
i = 1
n = len(a)
while i < len(a):
j = i
print(i - 1, "\t", ... | [
3012,
222,
610,
11899,
45,
102,
731,
303,
613,
66,
54,
303,
2236,
613,
65,
1688,
45,
102,
731,
310,
614,
66,
110,
310,
2236,
614,
67,
53,
480,
331,
96,
111,
50,
54,
98,
868,
331,
96,
111,
2805,
343,
1798,
299,
331,
96,
111,
... | [
"\"\"\"",
"Ċ",
"def",
"ĠSort",
"(",
"a",
"):",
"ĊĠĠĠ",
"Ġi",
"=",
"1",
"ĊĠĠĠ",
"Ġwhile",
"Ġi",
"<",
"len",
"(",
"a",
"):",
"ĊĠĠĠĠĠĠĠ",
"Ġj",
"=",
"i",
"ĊĠĠĠĠĠĠĠ",
"Ġwhile",
"Ġj",
">",
"0",
"Ġand",
"Ġa",
"[",
"j",
"-",
"1",
"]",
"Ġ>",
"Ġa",
"[... | [
1,
1,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
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,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9... | [
1,
4,
1,
4,
9,
10,
11,
13,
4,
6,
7,
8,
4,
10,
12,
13,
16,
17,
18,
20,
8,
10,
11,
12,
8,
14,
16,
17,
18,
22,
24,
25,
26,
27,
28,
29,
31,
33,
34,
35,
37,
12,
17,
19,
21,
22,
23,
24,
25,
26,
12,
14,
15,
16,
17,
... |
e95de58828c63dc8ae24efff314665a308f6ce0c | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-13 02:06
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
("stores", "0001_initial"),
... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
40,
13046,
829,
18288,
244,
54,
51,
54,
54,
51,
60,
563,
244,
55,
53,
54,
60,
50,
54,
55,
50,
54,
56,
244,
53,
55,
63,
53,
59,
222,
1097,
1176,
9689,
523,
1220,
15393,
100,
30828... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"#",
"ĠGenerated",
"Ġby",
"ĠDjango",
"Ġ",
"1",
".",
"1",
"1",
".",
"7",
"Ġon",
"Ġ",
"2",
"0",
"1",
"7",
"-",
"1",
"2",
"-",
"1",
"3",
"Ġ",
"0",
"2",
":",
"0",
"6",
"Ċ",
"from",
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
6,
6,
6... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
2,
12,
15,
22,
23,
24,
25,
26,
27,
28,
29,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
1,
5,
8,
14,
16,
23,
31,
32,
40,
1,
1,
5,
12,
13,
15,
22,... |
15edb1c051ccbc6f927c0a859288511f94a3d853 | from types import MappingProxyType
from typing import Any, Dict, Mapping, Type, TypeVar, Union
import yaml
from typing_extensions import Protocol
from mashumaro.serializer.base import DataClassDictMixin
DEFAULT_DICT_PARAMS = {
"use_bytes": False,
"use_enum": False,
"use_datetime": False,
}
EncodedData = ... | [
1097,
3756,
1220,
23518,
5401,
638,
222,
1097,
12018,
1220,
6213,
49,
14609,
49,
23518,
49,
2782,
49,
2782,
1901,
49,
16546,
222,
222,
485,
14478,
222,
1097,
12018,
100,
9088,
1220,
15653,
222,
222,
1097,
364,
936,
397,
25577,
51,
152... | [
"from",
"Ġtypes",
"Ġimport",
"ĠMapping",
"Proxy",
"Type",
"Ċ",
"from",
"Ġtyping",
"Ġimport",
"ĠAny",
",",
"ĠDict",
",",
"ĠMapping",
",",
"ĠType",
",",
"ĠType",
"Var",
",",
"ĠUnion",
"Ċ",
"Ċ",
"import",
"Ġyaml",
"Ċ",
"from",
"Ġtyping",
"_",
"extensions",
... | [
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
10,
10,
10,
10,... | [
1,
5,
11,
18,
26,
31,
35,
1,
5,
12,
19,
23,
24,
29,
30,
38,
39,
44,
45,
50,
53,
54,
60,
1,
1,
7,
12,
1,
5,
12,
13,
23,
30,
39,
1,
1,
5,
7,
10,
12,
15,
16,
26,
27,
31,
38,
43,
48,
52,
57,
1,
1,
8,
9,
13,
14,... |
274185896ab5c11256d69699df69fc2c0dde4f2d | """extract package names from the Meteor guide and write them to packages-guide
Uses the content folder of https://github.com/meteor/guide"""
from collections import defaultdict
import os
import sys
import markdown
from bs4 import BeautifulSoup
def get_links_from_markdown(path, name):
try:
with open(pat... | [
3012,
8320,
2670,
4492,
664,
341,
37791,
8645,
480,
2886,
3049,
391,
7622,
50,
6754,
222,
25607,
341,
1813,
4865,
451,
1698,
574,
951,
51,
527,
52,
32915,
52,
6754,
3012,
222,
222,
1097,
13722,
1220,
31701,
222,
485,
2355,
222,
485,
... | [
"\"\"\"",
"extract",
"Ġpackage",
"Ġnames",
"Ġfrom",
"Ġthe",
"ĠMeteor",
"Ġguide",
"Ġand",
"Ġwrite",
"Ġthem",
"Ġto",
"Ġpackages",
"-",
"guide",
"Ċ",
"Uses",
"Ġthe",
"Ġcontent",
"Ġfolder",
"Ġof",
"Ġhttps",
"://",
"github",
".",
"com",
"/",
"meteor",
"/",
"guide... | [
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,
3,
4,
4,
4,
4,
4,
5,
5,
5,
6,
6,
6,
7,
8,
8,
8,
9,
9,
9,
9,
9,
9,
11,
12,
12,
12,
12,
12,
12,
12,
... | [
1,
4,
11,
19,
25,
30,
34,
41,
47,
51,
57,
62,
65,
74,
75,
80,
1,
5,
9,
17,
24,
27,
33,
36,
42,
43,
46,
47,
53,
54,
59,
62,
1,
1,
5,
17,
24,
36,
1,
7,
10,
1,
7,
11,
1,
1,
7,
16,
1,
5,
8,
9,
16,
30,
1,
1,
4... |
21e86e4719cda5c40f780aca6e56eb13c8c9b8e5 | # encoding: utf-8
"""🤠 PDS Roundup: A step takes you further towards a complete roundup"""
from enum import Enum
from .util import commit, invoke
import logging, github3, tempfile, zipfile, os
_logger = logging.getLogger(__name__)
class Step(object):
"""An abstract step; executing steps comprises a roundup"""... | [
40,
7348,
63,
6471,
50,
61,
222,
222,
3012,
3822,
135,
278,
466,
4150,
23037,
436,
63,
418,
3138,
8756,
863,
9710,
22095,
331,
6179,
7880,
436,
3012,
222,
222,
1097,
3858,
1220,
7827,
222,
1097,
657,
1058,
1220,
4591,
49,
11324,
222... | [
"#",
"Ġencoding",
":",
"Ġutf",
"-",
"8",
"Ċ",
"Ċ",
"\"\"\"",
"ðŁ",
"¤",
"ł",
"ĠP",
"DS",
"ĠRound",
"up",
":",
"ĠA",
"Ġstep",
"Ġtakes",
"Ġyou",
"Ġfurther",
"Ġtowards",
"Ġa",
"Ġcomplete",
"Ġround",
"up",
"\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġenum",
"Ġimport",
... | [
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,
4,
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,
8,
9,
9,
9,
9,
9,
9,
9... | [
1,
2,
11,
12,
16,
17,
18,
1,
1,
4,
4,
4,
5,
7,
9,
15,
17,
18,
20,
25,
31,
35,
43,
51,
53,
62,
68,
70,
73,
1,
1,
5,
10,
17,
22,
1,
5,
7,
11,
18,
25,
26,
33,
1,
7,
15,
16,
23,
24,
25,
34,
35,
39,
43,
44,
47,
... |
333914f99face050376e4713ca118f2347e50018 | """
URL Configuration to test mounting created urls from registries
"""
from django.contrib import admin
from django.urls import include, path
from staticpages.loader import StaticpagesLoader
staticpages_loader = StaticpagesLoader()
urlpatterns = [
path("admin/", admin.site.urls),
# Add base pages urls us... | [
3012,
222,
2427,
8149,
391,
913,
10871,
318,
3290,
19996,
664,
9421,
3089,
222,
3012,
222,
222,
1097,
8532,
51,
12060,
1220,
5611,
222,
1097,
8532,
51,
11420,
1220,
2323,
49,
1536,
222,
222,
1097,
924,
5660,
51,
4579,
1220,
14352,
566... | [
"\"\"\"",
"Ċ",
"URL",
"ĠConfiguration",
"Ġto",
"Ġtest",
"Ġmount",
"ing",
"Ġcreated",
"Ġurls",
"Ġfrom",
"Ġregist",
"ries",
"Ċ",
"\"\"\"",
"Ċ",
"Ċ",
"from",
"Ġdjango",
".",
"contrib",
"Ġimport",
"Ġadmin",
"Ċ",
"from",
"Ġdjango",
".",
"urls",
"Ġimport",
"Ġinclu... | [
1,
1,
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,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
11,
11,
11,
11,
11,
11,
11,
11,
11,
11,
13,
14,
14,
14,
14,
... | [
1,
4,
1,
4,
18,
21,
26,
32,
35,
43,
48,
53,
60,
64,
1,
4,
1,
1,
5,
12,
13,
20,
27,
33,
1,
5,
12,
13,
17,
24,
32,
33,
38,
1,
1,
5,
12,
17,
18,
24,
31,
38,
43,
49,
1,
1,
7,
12,
13,
19,
21,
28,
33,
39,
41,
1,
... |
88b3dd7414a68de65bafb317fbd4da2b1bc933fc | import json
def corec_set(parameter, value):
params_fn = "corec_parameters.json"
with open(params_fn) as f:
params = json.load(f)
params[parameter] = value
with open(params_fn, "w") as f:
json.dump(params, f, indent=4)
def corec_get(parameter):
params_fn = "corec_parameters.js... | [
485,
2379,
499,
222,
610,
5305,
104,
100,
489,
45,
5616,
49,
804,
731,
303,
2822,
100,
3379,
299,
332,
1284,
104,
100,
5173,
51,
1279,
39,
465,
642,
2177,
45,
2155,
100,
3379,
46,
641,
315,
63,
310,
2822,
299,
2379,
51,
963,
45,... | [
"import",
"Ġjson",
"ĊĊ",
"Ċ",
"def",
"Ġcore",
"c",
"_",
"set",
"(",
"parameter",
",",
"Ġvalue",
"):",
"ĊĠĠĠ",
"Ġparams",
"_",
"fn",
"Ġ=",
"Ġ\"",
"core",
"c",
"_",
"parameters",
".",
"json",
"\"",
"ĊĊĠĠĠ",
"Ġwith",
"Ġopen",
"(",
"params",
"_",
"fn",
... | [
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
10,
10,
10,
10,
10,
10,
10,
12,
12,
12,
12,
12,
12,
... | [
1,
7,
12,
1,
1,
4,
9,
10,
11,
14,
15,
24,
25,
31,
33,
4,
11,
12,
14,
16,
18,
22,
23,
24,
34,
35,
39,
40,
4,
9,
14,
15,
21,
22,
24,
25,
28,
30,
31,
8,
15,
17,
22,
23,
27,
28,
29,
30,
4,
11,
12,
21,
22,
24,
30,... |
095374aa7613f163fedbd7d253219478108d4f42 | # Celery配置文件
# 指定消息队列为Redis
broker_url = "redis://120.78.168.67/10"
CELERY_RESULT_BACKEND = "redis://120.78.168.67/0"
CELERY_TIMEZONE = "Asia/Shanghai"
| [
40,
409,
361,
852,
38462,
222,
222,
40,
40053,
15043,
29855,
3397,
14492,
222,
17478,
100,
983,
299,
332,
9557,
574,
54,
55,
53,
51,
60,
61,
51,
54,
59,
61,
51,
59,
60,
52,
54,
53,
39,
222,
48469,
94,
100,
6394,
100,
36152,
29... | [
"#",
"ĠC",
"el",
"ery",
"éħįç½®æĸĩä»¶",
"Ċ",
"Ċ",
"#",
"ĠæĮĩå®ļ",
"æ¶Īæģ¯",
"éĺŁåĪĹ",
"为",
"Redis",
"Ċ",
"broker",
"_",
"url",
"Ġ=",
"Ġ\"",
"redis",
"://",
"1",
"2",
"0",
".",
"7",
"8",
".",
"1",
"6",
"8",
".",
"6",
"7",
"/",
"1",
"0",
"\""... | [
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,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5... | [
1,
2,
4,
6,
9,
13,
1,
1,
2,
5,
7,
9,
10,
15,
1,
7,
8,
11,
13,
15,
20,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
1,
6,
7,
8,
14,
15,
22,
24,
26,
31,
34,
35,
36,
37,
38,
39,
40,
... |
2c1de638ac25a9f27b1af94fa075b7c1b9df6884 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'PhoneUser.last_contacted'
db.add_column(
"smslink_phoneuser",
"last_c... | [
40,
8571,
10633,
63,
6471,
50,
61,
8571,
222,
485,
7181,
222,
1097,
38180,
51,
1219,
1220,
3100,
222,
1097,
38180,
51,
123,
55,
1220,
9051,
12071,
222,
1097,
8532,
51,
1219,
1220,
4590,
499,
222,
842,
18572,
45,
3710,
12071,
731,
30... | [
"#",
"Ġ-*-",
"Ġcoding",
":",
"Ġutf",
"-",
"8",
"Ġ-*-",
"Ċ",
"import",
"Ġdatetime",
"Ċ",
"from",
"Ġsouth",
".",
"db",
"Ġimport",
"Ġdb",
"Ċ",
"from",
"Ġsouth",
".",
"v",
"2",
"Ġimport",
"ĠSchema",
"Migration",
"Ċ",
"from",
"Ġdjango",
".",
"db",
"Ġimport"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
7,
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,
1... | [
1,
2,
6,
13,
14,
18,
19,
20,
24,
1,
7,
16,
1,
5,
11,
12,
14,
21,
24,
1,
5,
11,
12,
13,
14,
21,
28,
37,
1,
5,
12,
13,
15,
22,
29,
1,
1,
6,
16,
17,
23,
32,
34,
4,
8,
17,
18,
22,
23,
27,
29,
8,
10,
17,
23,
25,... |
364ac79e0f885c67f2fff57dfe3ddde63f0c269e | import os
import unittest
import json
from flask_sqlalchemy import SQLAlchemy
from flaskr import create_app
from models import setup_db, Question
DB_HOST = os.getenv("DB_HOST", "127.0.0.1:5432")
DB_USER = os.getenv("DB_USER", "postgres")
DB_PASSWORD = os.getenv("DB_PASSWORD", "postgres")
DB_NAME = os.getenv("DB_NAME"... | [
485,
2355,
222,
485,
15790,
222,
485,
2379,
222,
1097,
18958,
100,
41228,
1220,
4447,
43108,
222,
222,
1097,
18958,
119,
1220,
1506,
100,
745,
222,
1097,
4590,
1220,
4721,
100,
1219,
49,
15201,
222,
222,
2015,
100,
8483,
299,
2355,
51... | [
"import",
"Ġos",
"Ċ",
"import",
"Ġunittest",
"Ċ",
"import",
"Ġjson",
"Ċ",
"from",
"Ġflask",
"_",
"sqlalchemy",
"Ġimport",
"ĠSQL",
"Alchemy",
"Ċ",
"Ċ",
"from",
"Ġflask",
"r",
"Ġimport",
"Ġcreate",
"_",
"app",
"Ċ",
"from",
"Ġmodels",
"Ġimport",
"Ġsetup",
"_"... | [
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9... | [
1,
7,
10,
1,
7,
16,
1,
7,
12,
1,
5,
11,
12,
22,
29,
33,
40,
1,
1,
5,
11,
12,
19,
26,
27,
30,
1,
5,
12,
19,
25,
26,
28,
29,
38,
1,
1,
3,
4,
8,
10,
13,
14,
20,
22,
24,
25,
29,
31,
33,
34,
35,
36,
37,
38,
39,
... |
34c81b9318d978305748d413c869a86ee6709e2c | # import visual_servoing_utils_main as utils
from autolab_core import rigid_transformations as rt
from yumipy import YuMiState
class YumiConstants:
T_gripper_gripperV = rt.RigidTransform(rotation=[[-1, 0, 0], [0, 1, 0], [0, 0, -1]], from_frame="gripper", to_frame="obj")
T_rightH_yumi_1 = rt.RigidTransform(
... | [
40,
1220,
8253,
100,
38275,
318,
100,
2324,
100,
1850,
641,
8767,
222,
1097,
7140,
381,
380,
100,
1284,
1220,
36004,
100,
3824,
1014,
641,
12204,
222,
1097,
33877,
13780,
1220,
1432,
122,
14933,
1095,
499,
222,
842,
1432,
26212,
5238,
... | [
"#",
"Ġimport",
"Ġvisual",
"_",
"servo",
"ing",
"_",
"utils",
"_",
"main",
"Ġas",
"Ġutils",
"Ċ",
"from",
"Ġaut",
"ol",
"ab",
"_",
"core",
"Ġimport",
"Ġrigid",
"_",
"transform",
"ations",
"Ġas",
"Ġrt",
"Ċ",
"from",
"Ġyum",
"ipy",
"Ġimport",
"ĠY",
"u",
... | [
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,
3,
3,
3,
3,
3,
3,
3,
3,
3,
5,
6,
6,
6,
6,
6,
6,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7... | [
1,
2,
9,
16,
17,
22,
25,
26,
31,
32,
36,
39,
45,
1,
5,
9,
11,
13,
14,
18,
25,
31,
32,
41,
47,
50,
53,
1,
5,
9,
12,
19,
21,
22,
24,
29,
1,
1,
6,
8,
11,
20,
21,
4,
6,
7,
8,
14,
15,
16,
22,
23,
25,
28,
29,
34,... |
04099c46c029af37a08b3861809da13b3cc3153b | """
OBJECTIVE: Given a list, sort it from low to high using the QUICK SORT algorithm
Quicksort first divides a large array into two smaller sub-arrays: the low elements and the high elements.
Quicksort can then recursively sort the sub-arrays.
The steps are:
1. Pick an element, called a pivot, from the array.
2. Par... | [
3012,
222,
8469,
5765,
63,
15328,
331,
1168,
49,
3873,
580,
664,
7487,
391,
3883,
1493,
341,
21816,
12305,
48782,
8274,
222,
222,
14318,
3349,
1950,
4469,
13014,
331,
7650,
1437,
2012,
3161,
14788,
1381,
50,
23694,
63,
341,
7487,
4725,
... | [
"\"\"\"",
"Ċ",
"OBJECT",
"IVE",
":",
"ĠGiven",
"Ġa",
"Ġlist",
",",
"Ġsort",
"Ġit",
"Ġfrom",
"Ġlow",
"Ġto",
"Ġhigh",
"Ġusing",
"Ġthe",
"ĠQU",
"ICK",
"ĠSORT",
"Ġalgorithm",
"Ċ",
"Ċ",
"Quick",
"sort",
"Ġfirst",
"Ġdiv",
"ides",
"Ġa",
"Ġlarge",
"Ġarray",
"Ġin... | [
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
7,
7,
7,
7... | [
1,
4,
1,
7,
10,
11,
17,
19,
24,
25,
30,
33,
38,
42,
45,
50,
56,
60,
63,
66,
71,
81,
1,
1,
6,
10,
16,
20,
24,
26,
32,
38,
43,
47,
55,
59,
60,
66,
67,
71,
75,
84,
88,
92,
97,
106,
107,
1,
6,
10,
14,
19,
31,
36,
... |
9a6d6637cd4ecf2f6e9c8eb8e702be06e83beea4 | from app import create_app
__author__ = "七月"
app = create_app()
if __name__ == "__main__":
app.run(debug=app.config["DEBUG"])
| [
1097,
1142,
1220,
1506,
100,
745,
499,
222,
523,
2133,
523,
299,
332,
35359,
10175,
39,
222,
222,
745,
299,
1506,
100,
745,
365,
222,
222,
344,
1176,
444,
523,
630,
9609,
1850,
18021,
303,
1142,
51,
1967,
45,
2824,
66,
745,
51,
11... | [
"from",
"Ġapp",
"Ġimport",
"Ġcreate",
"_",
"app",
"ĊĊ",
"Ċ",
"__",
"author",
"__",
"Ġ=",
"Ġ\"",
"ä¸ĥ",
"æľĪ",
"\"",
"Ċ",
"Ċ",
"app",
"Ġ=",
"Ġcreate",
"_",
"app",
"()",
"Ċ",
"Ċ",
"if",
"Ġ__",
"name",
"__",
"Ġ==",
"Ġ\"__",
"main",
"__\":",
"ĊĠĠĠ",
... | [
1,
1,
1,
1,
1,
1,
1,
3,
4,
4,
4,
4,
4,
4,
4,
4,
4,
5,
6,
6,
6,
6,
6,
6,
6,
7,
8,
8,
8,
8,
8,
8,
8,
8,
8,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9,
9
] | [
1,
5,
9,
16,
23,
24,
27,
1,
1,
3,
9,
11,
13,
15,
16,
17,
18,
1,
1,
4,
6,
13,
14,
17,
19,
1,
1,
3,
6,
10,
12,
15,
19,
23,
27,
4,
8,
9,
12,
13,
18,
19,
22,
23,
29,
31,
36,
39
] |
f405a3e9ccabbba6719f632eb9c51809b8deb319 | import boto3
from botocore.exceptions import ClientError
import logging
import subprocess
import string
import random
import time
import os
import sys
import time
import json
from ProgressPercentage import *
import logging
def upload_file(file_name, object_name=None):
RESULT_BUCKET_NAME = "worm4047bucket2"
s3... | [
485,
36600,
56,
222,
1097,
36600,
1284,
51,
11453,
1220,
5680,
943,
222,
485,
5751,
222,
485,
16606,
222,
485,
821,
222,
485,
4051,
222,
485,
1153,
222,
485,
2355,
222,
485,
5263,
222,
485,
1153,
222,
485,
2379,
222,
1097,
15592,
18... | [
"import",
"Ġboto",
"3",
"Ċ",
"from",
"Ġboto",
"core",
".",
"exceptions",
"Ġimport",
"ĠClient",
"Error",
"Ċ",
"import",
"Ġlogging",
"Ċ",
"import",
"Ġsubprocess",
"Ċ",
"import",
"Ġstring",
"Ċ",
"import",
"Ġrandom",
"Ċ",
"import",
"Ġtime",
"Ċ",
"import",
"Ġos",... | [
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
6,
6,
6,
7,
7,
7,
8,
8,
8,
9,
9,
9,
10,
10,
10,
11,
11,
11,
12,
12,
12,
12,
12,
12,
13,
13,
13,
15,
16,
16,
16,
16,
16,
16,
16,
16,
16... | [
1,
7,
12,
13,
1,
5,
10,
14,
15,
25,
32,
39,
44,
1,
7,
15,
1,
7,
18,
1,
7,
14,
1,
7,
14,
1,
7,
12,
1,
7,
10,
1,
7,
11,
1,
7,
12,
1,
7,
12,
1,
5,
14,
24,
31,
33,
1,
7,
15,
1,
1,
4,
11,
12,
16,
17,
21,
22,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.