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
550f5ad4fef77d5795db0393ae0701f679143e72
#!/usr/bin/env python # @HEADER # ************************************************************************ # # TriBITS: Tribal Build, Integrate, and Test System # Copyright 2013 Sandia Corporation # # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Govern...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 222, 222, 40, 496, 10862, 222, 40, 17854, 14525, 222, 40, 222, 40, 1485, 20892, 16766, 63, 413, 7990, 298, 5256, 49, 14292, 351, 49, 480, 2128, 1189, 222, 40, 4714, 2657, 244, 55, 53, 54, 56, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "Ċ", "Ċ", "#", "Ġ@", "HEADER", "Ċ", "#", "Ġ*****************************************************************", "*******", "Ċ", "#", "Ċ", "#", "ĠĠĠĠĠĠĠĠĠĠĠ", "ĠTri", "BITS", ":", "ĠT", "rib", "al", "ĠBuild", ",",...
[ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9...
[ 1, 4, 7, 8, 11, 12, 15, 22, 1, 1, 2, 4, 10, 1, 2, 68, 75, 1, 2, 1, 2, 13, 17, 21, 22, 24, 27, 29, 35, 36, 43, 46, 47, 51, 56, 63, 1, 2, 21, 31, 32, 33, 34, 35, 36, 41, 43, 55, 1, 2, 1, 2, 8, 12, 18, 21, 3...
4fa9d16f979acf3edce05a209e1c6636e50fc315
from jox_api import label_image, Mysql, Utils from jox_config import api_base_url import json class Menu: def __init__(self): self.mysqlClass = Mysql.MySQL() self.timeClass = Utils.Time() def get_menu(self, type, openid): try: if type == "mine": self.sql = ...
[ 1097, 614, 1290, 100, 1256, 1220, 2300, 100, 915, 49, 507, 5547, 49, 13245, 222, 1097, 614, 1290, 100, 1180, 1220, 4142, 100, 1460, 100, 983, 222, 485, 2379, 499, 222, 842, 9999, 63, 303, 684, 1176, 1683, 3232, 803, 731, 310, 649, ...
[ "from", "Ġj", "ox", "_", "api", "Ġimport", "Ġlabel", "_", "image", ",", "ĠM", "ysql", ",", "ĠUtils", "Ċ", "from", "Ġj", "ox", "_", "config", "Ġimport", "Ġapi", "_", "base", "_", "url", "Ċ", "import", "Ġjson", "ĊĊ", "Ċ", "class", "ĠMenu", ":", "ĊĠĠĠ...
[ 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, 3, 3, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1...
[ 1, 5, 7, 9, 10, 13, 20, 26, 27, 32, 33, 35, 39, 40, 46, 1, 5, 7, 9, 10, 16, 23, 27, 28, 32, 33, 36, 1, 7, 12, 1, 1, 6, 11, 12, 4, 8, 11, 15, 18, 22, 24, 8, 13, 14, 19, 24, 26, 28, 32, 33, 38, 40, 8, 13, 14,...
e5e012e40a71dee9f4dbd9913590aef125b758df
from classes.Board import Board class Visualiser: coordinate_map = ("a", "b", "c", "d", "e", "f", "g", "h") __dimensions = 8 def __init__(self): self.map = [] self.__build_map() def __build_map(self): """ Creates the array of the battlefield. Should never be used for ...
[ 1097, 6052, 51, 8447, 1220, 18652, 499, 222, 842, 8879, 12080, 63, 303, 12676, 100, 1130, 299, 2903, 102, 411, 332, 103, 411, 332, 104, 411, 332, 105, 411, 332, 106, 411, 332, 107, 411, 332, 108, 411, 332, 109, 678, 303, 1176, 189...
[ "from", "Ġclasses", ".", "Board", "Ġimport", "ĠBoard", "ĊĊ", "Ċ", "class", "ĠVisual", "iser", ":", "ĊĠĠĠ", "Ġcoordinate", "_", "map", "Ġ=", "Ġ(\"", "a", "\",", "Ġ\"", "b", "\",", "Ġ\"", "c", "\",", "Ġ\"", "d", "\",", "Ġ\"", "e", "\",", "Ġ\"", "f", ...
[ 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, ...
[ 1, 5, 13, 14, 19, 26, 32, 1, 1, 6, 13, 17, 18, 4, 15, 16, 19, 21, 24, 25, 27, 29, 30, 32, 34, 35, 37, 39, 40, 42, 44, 45, 47, 49, 50, 52, 54, 55, 57, 59, 60, 62, 4, 7, 17, 19, 20, 21, 4, 8, 11, 15, 18, 22, 24...
27e9e63338d422b5fca6f7a67fa3d255602a3358
from abstract_class_V import V import torch import torch.nn as nn class V_test_abstract(V): def __init__(self): super(V_test_abstract, self).__init__() def V_setup(self, y, X, nu): self.explicit_gradient = False self.need_higherorderderiv = True self.dim = X.shape[1] s...
[ 1097, 5560, 100, 842, 100, 91, 1220, 694, 222, 485, 5665, 222, 485, 5665, 51, 4042, 641, 8507, 499, 222, 842, 694, 100, 881, 100, 9431, 45, 91, 731, 303, 684, 1176, 1683, 3232, 803, 731, 310, 2615, 45, 91, 100, 881, 100, 9431, 4...
[ "from", "Ġabstract", "_", "class", "_", "V", "Ġimport", "ĠV", "Ċ", "import", "Ġtorch", "Ċ", "import", "Ġtorch", ".", "nn", "Ġas", "Ġnn", "ĊĊ", "Ċ", "class", "ĠV", "_", "test", "_", "abstract", "(", "V", "):", "ĊĠĠĠ", "Ġdef", "Ġ__", "init", "__(", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, ...
[ 1, 5, 14, 15, 20, 21, 22, 29, 31, 1, 7, 13, 1, 7, 13, 14, 16, 19, 22, 1, 1, 6, 8, 9, 13, 14, 22, 23, 24, 26, 4, 8, 11, 15, 18, 22, 24, 8, 14, 15, 16, 17, 21, 22, 30, 31, 36, 40, 44, 48, 4, 8, 10, 11, 16, 17...
d0a3f332e04627eb275168972bd92cd1ea9b9447
from board.ttt import TTT from mctsai.mcts import MCTS import unittest # skip = [0, 1] skip = [0] class TestTTT(unittest.TestCase): def test_mcts(self): if 0 in skip: print("Skipping ai self-play") return ttt = TTT() for i in range(1000): mcts = MCTS(t...
[ 1097, 7782, 51, 2269, 121, 1220, 413, 6992, 222, 1097, 364, 307, 34757, 51, 114, 26168, 1220, 507, 952, 88, 222, 485, 15790, 222, 222, 40, 7130, 299, 447, 53, 49, 244, 54, 98, 222, 222, 5969, 299, 447, 53, 98, 499, 222, 842, 212...
[ "from", "Ġboard", ".", "tt", "t", "Ġimport", "ĠT", "TT", "Ċ", "from", "Ġm", "ct", "sai", ".", "m", "cts", "Ġimport", "ĠM", "CT", "S", "Ċ", "import", "Ġunittest", "Ċ", "Ċ", "#", "Ġskip", "Ġ=", "Ġ[", "0", ",", "Ġ", "1", "]", "Ċ", "Ċ", "skip", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, ...
[ 1, 5, 11, 12, 14, 15, 22, 24, 26, 1, 5, 7, 9, 12, 13, 14, 17, 24, 26, 28, 29, 1, 7, 16, 1, 1, 2, 7, 9, 11, 12, 13, 14, 15, 16, 1, 1, 5, 7, 9, 10, 11, 1, 1, 6, 11, 14, 15, 23, 24, 32, 34, 4, 8, 13, 14, 15,...
f85a703b47d981397ed6048e941030a3fbee7b6d
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2018-04-27 08:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("talk", "0023_auto_20180207_1121"), ] operations = [ migrations.AddField( ...
[ 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 40, 13046, 829, 18288, 244, 54, 51, 62, 51, 61, 563, 244, 55, 53, 54, 61, 50, 53, 57, 50, 55, 60, 244, 53, 61, 63, 53, 58, 222, 1097, 1176, 9689, 523, 1220, 15393, 100, 30828, 22...
[ "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "#", "ĠGenerated", "Ġby", "ĠDjango", "Ġ", "1", ".", "9", ".", "8", "Ġon", "Ġ", "2", "0", "1", "8", "-", "0", "4", "-", "2", "7", "Ġ", "0", "8", ":", "0", "5", "Ċ", "from", "Ġ__",...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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...
[ 1, 2, 6, 13, 14, 18, 19, 20, 24, 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, 5, 8, 14, 16, 23, 31, 32, 40, 1, 1, 5, 12, 13, 15, 22, 33,...
f8d815bcdc74452b66a1b3b33bf0fbe976e728c8
# This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. import tensorflow as tf from tensorflow.keras import datasets, layers, models import matplotlib.pyplot as plt import numpy ...
[ 40, 1369, 458, 331, 4002, 5006, 3273, 51, 222, 222, 40, 22497, 26105, 48, 75, 54, 53, 391, 5755, 580, 575, 7112, 580, 642, 1390, 1361, 51, 222, 40, 22497, 6938, 26105, 391, 3252, 38629, 456, 6052, 49, 2293, 49, 4572, 11309, 49, 69...
[ "#", "ĠThis", "Ġis", "Ġa", "Ġsample", "ĠPython", "Ġscript", ".", "Ċ", "Ċ", "#", "ĠPress", "ĠShift", "+", "F", "1", "0", "Ġto", "Ġexecute", "Ġit", "Ġor", "Ġreplace", "Ġit", "Ġwith", "Ġyour", "Ġcode", ".", "Ċ", "#", "ĠPress", "ĠDouble", "ĠShift", "Ġto", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 7, 7, 7, 7, 7, 7, 7, 7, 7...
[ 1, 2, 7, 10, 12, 19, 26, 33, 34, 1, 1, 2, 8, 14, 15, 16, 17, 18, 21, 29, 32, 35, 43, 46, 51, 56, 61, 62, 1, 2, 8, 15, 21, 24, 31, 42, 46, 54, 55, 61, 62, 67, 75, 76, 84, 85, 89, 98, 99, 1, 1, 7, 18, 21, 24, ...
ef85f94282bfd7c9491c4e28bab61aaab5c792a5
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'src/ui_LibraryTab.ui' # # Created: Tue Jun 9 21:46:41 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Tab(object): def setupUi(s...
[ 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 222, 40, 3735, 4753, 4741, 664, 9198, 7900, 822, 349, 1634, 52, 1726, 100, 5887, 4011, 51, 1726, 44, 222, 40, 222, 40, 6956, 63, 18555, 22715, 280, 62, 244, 55, 54, 63, 57, 59, 63, ...
[ "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "#", "ĠForm", "Ġimplementation", "Ġgenerated", "Ġfrom", "Ġreading", "Ġui", "Ġfile", "Ġ'", "src", "/", "ui", "_", "Library", "Tab", ".", "ui", "'", "Ċ", "#", "Ċ", "#", "ĠCreated", ":", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6...
[ 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 1, 2, 7, 22, 32, 37, 45, 48, 53, 55, 58, 59, 61, 62, 69, 72, 73, 75, 76, 1, 2, 1, 2, 10, 11, 15, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1, 2, ...
8c8bbbc682889c8d79c893f27def76ad70e8bf8d
DATABASE_NAME = "user_db"
[ 20536, 100, 2491, 299, 332, 514, 100, 1219, 39, 222 ]
[ "DATABASE", "_", "NAME", "Ġ=", "Ġ\"", "user", "_", "db", "\"", "Ċ" ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 9, 10, 14, 16, 18, 22, 23, 25, 26 ]
9d904225afd4f4d0cf338ae16f031f8ab41639ad
# -*- coding=utf-8 -*- from mako.template import Template from xblock.fragment import Fragment from .lookup import TemplateLookup # xblock_ifmo.lookup from .utils import deep_update class FragmentMakoChain(Fragment): """ Класс, позволяющий последовательно оборачивать экземпляры Fragment друг в друга. ...
[ 40, 8571, 10633, 66, 3330, 50, 61, 8571, 222, 222, 1097, 364, 17560, 51, 2402, 1220, 10839, 222, 1097, 837, 1540, 51, 9883, 1220, 18666, 222, 222, 1097, 657, 10124, 1220, 10839, 10138, 244, 607, 837, 1540, 100, 344, 794, 51, 10124, ...
[ "#", "Ġ-*-", "Ġcoding", "=", "utf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "from", "Ġm", "ako", ".", "template", "Ġimport", "ĠTemplate", "Ċ", "from", "Ġx", "block", ".", "fragment", "Ġimport", "ĠFragment", "Ċ", "Ċ", "from", "Ġ.", "lookup", "Ġimport", "ĠTemplate", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11...
[ 1, 2, 6, 13, 14, 17, 18, 19, 23, 1, 1, 5, 7, 10, 11, 19, 26, 35, 1, 5, 7, 12, 13, 21, 28, 37, 1, 1, 5, 7, 13, 20, 29, 35, 36, 38, 40, 45, 46, 48, 50, 51, 57, 1, 5, 7, 12, 19, 24, 25, 31, 1, 1, 6, 15, 16, ...
8cc0393082448bb8f61068b5c96e89ef3aee77ed
# coding: utf-8 import logging from threading import Thread from ldap import SCOPE_BASE from seafevents.ldap_syncer.ldap_conn import LdapConn from seafevents.ldap_syncer.utils import bytes2str, add_group_uuid_pair from seaserv import get_group_dn_pairs logger = logging.getLogger(__name__) def migrate_dn_pairs(set...
[ 40, 10633, 63, 6471, 50, 61, 222, 485, 5751, 222, 1097, 26311, 1220, 7806, 222, 222, 1097, 33912, 1220, 45268, 1321, 100, 6185, 222, 1097, 427, 7284, 26982, 51, 19406, 100, 5220, 284, 51, 19406, 100, 3795, 1220, 517, 36944, 5163, 222,...
[ "#", "Ġcoding", ":", "Ġutf", "-", "8", "Ċ", "import", "Ġlogging", "Ċ", "from", "Ġthreading", "Ġimport", "ĠThread", "Ċ", "Ċ", "from", "Ġldap", "Ġimport", "ĠSCO", "PE", "_", "BASE", "Ċ", "from", "Ġse", "afe", "vents", ".", "ldap", "_", "sync", "er", "....
[ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7...
[ 1, 2, 9, 10, 14, 15, 16, 1, 7, 15, 1, 5, 15, 22, 29, 1, 1, 5, 10, 17, 21, 23, 24, 28, 1, 5, 8, 11, 16, 17, 21, 22, 26, 28, 29, 33, 34, 38, 45, 47, 50, 54, 1, 5, 8, 11, 16, 17, 21, 22, 26, 28, 29, 34, 41, 47...
eb853e430b996a81dc2ef20c320979a3e04d956a
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import hashlib import re from datetime import datetime import gevent import requests import scrapy from gevent.pool import Pool from lxml import etree from scrapy.http import HtmlResponse from sqlalchemy import create_engine, func from sqlalchemy.orm import sessionmaker ...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 56, 222, 40, 8571, 10633, 63, 9360, 50, 61, 8571, 222, 485, 42575, 222, 485, 334, 222, 1097, 7181, 1220, 7181, 222, 222, 485, 3244, 672, 222, 485, 5188, 222, 485, 33057, 126, 222, 1097, 3244, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "3", "Ċ", "#", "Ġ-*-", "Ġcoding", ":", "ĠUTF", "-", "8", "Ġ-*-", "Ċ", "import", "Ġhashlib", "Ċ", "import", "Ġre", "Ċ", "from", "Ġdatetime", "Ġimport", "Ġdatetime", "Ċ", "Ċ", "import", "Ġge", "vent", "Ċ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12,...
[ 1, 4, 7, 8, 11, 12, 15, 22, 23, 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 7, 15, 1, 7, 10, 1, 5, 14, 21, 30, 1, 1, 7, 10, 14, 1, 7, 16, 1, 7, 13, 14, 1, 5, 8, 12, 13, 17, 24, 29, 1, 5, 7, 10, 17, 20, 23, 1, 5...
bc4684d255a46427f708d8ce8bda2e12fb8c8ffe
# -*- coding: utf-8 -*- from route4me import Route4Me API_KEY = "11111111111111111111111111111111" def main(): r4m = Route4Me(API_KEY) route = r4m.route response = route.get_routes(limit=1, offset=0) if isinstance(response, dict) and "errors" in response.keys(): print(". ".join(response["err...
[ 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 222, 1097, 5553, 57, 308, 1220, 7144, 57, 1451, 222, 222, 2571, 100, 3319, 299, 332, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,...
[ "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "from", "Ġroute", "4", "me", "Ġimport", "ĠRoute", "4", "Me", "Ċ", "Ċ", "API", "_", "KEY", "Ġ=", "Ġ\"", "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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8...
[ 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 1, 5, 11, 12, 14, 21, 27, 28, 30, 1, 1, 4, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,...
d015a1b27a3a9e7f5e6614da752137064000b905
#!/usr/bin/env python3 """Transfer learning with xception""" import tensorflow.keras as K from GPyOpt.methods import BayesianOptimization import pickle import os import numpy as np class my_model: """A model bassed on xception""" def make_model(self, param): """makes the model""" self.lr = p...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 56, 222, 3012, 8580, 9789, 642, 837, 826, 3012, 222, 222, 485, 15196, 51, 16350, 641, 1242, 222, 1097, 590, 5019, 5501, 51, 9152, 1220, 27192, 18314, 37685, 222, 485, 19892, 222, 485, 2355, 222, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "3", "Ċ", "\"\"\"", "Transfer", "Ġlearning", "Ġwith", "Ġx", "ception", "\"\"\"", "Ċ", "Ċ", "import", "Ġtensorflow", ".", "keras", "Ġas", "ĠK", "Ċ", "from", "ĠG", "Py", "Opt", ".", "methods", "Ġimport", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12,...
[ 1, 4, 7, 8, 11, 12, 15, 22, 23, 1, 4, 12, 21, 26, 28, 35, 38, 1, 1, 7, 18, 19, 24, 27, 29, 1, 5, 7, 9, 12, 13, 20, 27, 31, 36, 48, 1, 7, 14, 1, 7, 10, 1, 7, 13, 16, 19, 1, 1, 6, 9, 10, 15, 16, 4, 8, 9, ...
ef6f55bf27982f53441215da6822cfcdc80706a5
# -*- coding: utf-8 -*- __author__ = "Yun" __project__ = "DjangoBookTest2" # from django.template import Template, Context # from django.template.loader import get_template # from django.http import HttpResponse from django.shortcuts import render_to_response import datetime def current_datetime(request): # now ...
[ 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 523, 2133, 523, 299, 332, 94, 330, 39, 222, 523, 2268, 523, 299, 332, 36075, 6597, 1024, 55, 39, 222, 222, 40, 664, 8532, 51, 2402, 1220, 10839, 49, 7063, 222, 40, 664, 8532, 51, 240...
[ "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "__", "author", "__", "Ġ=", "Ġ\"", "Y", "un", "\"", "Ċ", "__", "project", "__", "Ġ=", "Ġ\"", "Django", "Book", "Test", "2", "\"", "Ċ", "Ċ", "#", "Ġfrom", "Ġdjango", ".", "template", "Ġim...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8...
[ 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 3, 9, 11, 13, 15, 16, 18, 19, 1, 3, 10, 12, 14, 16, 22, 26, 30, 31, 32, 1, 1, 2, 7, 14, 15, 23, 30, 39, 40, 48, 1, 2, 7, 14, 15, 23, 24, 30, 37, 41, 42, 50, 1, 2, 7, 14, ...
e616d14827beaa08ab08219421cbf7990cf163fd
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.InsureAdmitDTO import InsureAdmitDTO class AlipayInsSceneEcommerceInsureCheckModel(object): def __init__(self): self._insure_admit_dto_list = None self._partne...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 222, 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 485, 2379, 222, 222, 1097, 763, 31754, 51, 32223, 51, 1256, 51, 8696, 51, 3196, 5238, 1220, 338, 222, 1097, 763, 31754, 51, 32223, 51, 1256, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "Ċ", "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "import", "Ġjson", "Ċ", "Ċ", "from", "Ġal", "ipay", ".", "aop", ".", "api", ".", "constant", ".", "Param", "Constants", "Ġimport", "Ġ*...
[ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 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...
[ 1, 4, 7, 8, 11, 12, 15, 22, 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 7, 12, 1, 1, 5, 8, 12, 13, 16, 17, 20, 21, 29, 30, 35, 44, 51, 53, 1, 5, 8, 12, 13, 16, 17, 20, 21, 27, 28, 30, 34, 36, 39, 42, 49, 52, 56, 58...
c4ca4b5c77c3c912b44a4853be30298ec845c4fd
# str owog = "Delger" # len()- urt # lower()- jijigruuleh # upper()- tomruulah # capitalize()- ehnii useg tomruulah # replace()- temdegt solih print(owog.find("e")) print(owog.count("e")) print(owog[2:10]) a = 21 b = 21 if a > b: print("a too ih") elif a == b: print("tentsuu") else: print("b too ih") ...
[ 40, 615, 222, 460, 835, 299, 332, 3752, 892, 39, 222, 40, 244, 2095, 17681, 13387, 121, 222, 40, 244, 7245, 17681, 614, 5807, 384, 2965, 779, 109, 222, 40, 244, 8373, 17681, 20152, 2965, 357, 2389, 222, 40, 244, 18972, 537, 17681, ...
[ "#", "Ġstr", "Ċ", "ow", "og", "Ġ=", "Ġ\"", "Del", "ger", "\"", "Ċ", "#", "Ġ", "Ġlen", "()-", "Ġur", "t", "Ċ", "#", "Ġ", "Ġlower", "()-", "Ġj", "ij", "ig", "ru", "ule", "h", "Ċ", "#", "Ġ", "Ġupper", "()-", "Ġtom", "ru", "ul", "ah", "Ċ", "#",...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8...
[ 1, 2, 6, 1, 3, 5, 7, 9, 12, 15, 16, 1, 2, 3, 7, 10, 13, 14, 1, 2, 3, 9, 12, 14, 16, 18, 20, 23, 24, 1, 2, 3, 9, 12, 16, 18, 20, 22, 1, 2, 3, 11, 14, 17, 19, 21, 23, 27, 28, 32, 34, 36, 38, 1, 2, 3, 11, ...
050e2207ac7331444d39305869c4b25bcbc53907
import pandas as pd from sklearn.preprocessing import MinMaxScaler # loading data from CSV training_data_df = pd.read_csv("sales_data_training.csv") test_data_df = pd.read_csv("sales_data_test.csv") # scaler scaler = MinMaxScaler(feature_range=(0, 1)) # scale both inputs and outputs scaled_training = scaler.fit_tran...
[ 485, 13247, 641, 6451, 222, 1097, 14415, 51, 34334, 1220, 7535, 2725, 36863, 222, 222, 40, 7752, 727, 664, 15663, 222, 10950, 100, 624, 100, 1519, 299, 6451, 51, 870, 100, 4849, 459, 13632, 100, 624, 100, 10950, 51, 4849, 678, 222, ...
[ "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "from", "Ġsklearn", ".", "preprocessing", "Ġimport", "ĠMin", "Max", "Scaler", "Ċ", "Ċ", "#", "Ġloading", "Ġdata", "Ġfrom", "ĠCSV", "Ċ", "training", "_", "data", "_", "df", "Ġ=", "Ġpd", ".", "read", "_", "csv", "(...
[ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 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, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7...
[ 1, 7, 14, 17, 20, 1, 5, 13, 14, 27, 34, 38, 41, 47, 1, 1, 2, 10, 15, 20, 24, 1, 9, 10, 14, 15, 17, 19, 22, 23, 27, 28, 31, 33, 38, 39, 43, 44, 52, 53, 56, 58, 1, 5, 6, 10, 11, 13, 15, 18, 19, 23, 24, 27, 29, ...
21b295e28a7e4443ea116df1b22ff5074dca955a
n = int(input("nhap gia tri")) for i in range(1, n + 1): print(i)
[ 115, 299, 648, 45, 1151, 459, 10351, 386, 504, 923, 3957, 2152, 222, 999, 613, 347, 2189, 45, 54, 49, 329, 494, 244, 54, 731, 303, 1489, 45, 110, 46, 222 ]
[ "n", "Ġ=", "Ġint", "(", "input", "(\"", "nh", "ap", "Ġg", "ia", "Ġtri", "\"))", "Ċ", "for", "Ġi", "Ġin", "Ġrange", "(", "1", ",", "Ġn", "Ġ+", "Ġ", "1", "):", "ĊĠĠĠ", "Ġprint", "(", "i", ")", "Ċ" ]
[ 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, 3, 3, 3, 3, 3 ]
[ 1, 2, 4, 8, 9, 14, 16, 18, 20, 22, 24, 28, 31, 1, 4, 6, 9, 15, 16, 17, 18, 20, 22, 23, 24, 26, 4, 10, 11, 12, 13 ]
93737e4c409d0efb1ae2263cb60d4b03d9aad0d8
import os import shutil import argparse ap = argparse.ArgumentParser() ap.add_argument("-D", "--dir", required=False, help="Directory to sort") args = vars(ap.parse_args()) if args["dir"] == None: DIR = os.getcwd() elif os.path.exists(args["dir"]): DIR = args["dir"] for file in os.listdir(DIR): if not os...
[ 485, 2355, 222, 485, 23074, 222, 485, 16693, 222, 222, 386, 299, 16693, 51, 26631, 365, 222, 222, 386, 51, 688, 100, 2686, 10364, 73, 411, 7931, 1537, 411, 2147, 66, 2737, 49, 3071, 366, 4562, 391, 3873, 678, 222, 222, 1150, 299, ...
[ "import", "Ġos", "Ċ", "import", "Ġshutil", "Ċ", "import", "Ġargparse", "Ċ", "Ċ", "ap", "Ġ=", "Ġargparse", ".", "ArgumentParser", "()", "Ċ", "Ċ", "ap", ".", "add", "_", "argument", "(\"-", "D", "\",", "Ġ\"--", "dir", "\",", "Ġrequired", "=", "False", ",...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 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, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11...
[ 1, 7, 10, 1, 7, 14, 1, 7, 16, 1, 1, 3, 5, 14, 15, 29, 31, 1, 1, 3, 4, 7, 8, 16, 19, 20, 22, 26, 29, 31, 40, 41, 46, 47, 52, 54, 63, 66, 71, 73, 1, 1, 5, 7, 12, 13, 15, 16, 21, 22, 26, 29, 1, 3, 8, 10, 13,...
b5611c668a40e1735c92d6d00867885023ad713f
target = [] with open("IntegerArray.txt", "r") as f: target = f.readlines() for x in range(len(target)): target[x] = int(target[x]) def f(A): if len(A) == 1: return 0 else: rightStart = len(A) // 2 leftArray = A[0:rightStart] righArray = A[rightStart:] B, b = co...
[ 2000, 299, 1627, 222, 1814, 2177, 459, 3078, 1280, 51, 2787, 411, 332, 119, 678, 641, 315, 63, 303, 1780, 299, 315, 51, 33515, 365, 222, 999, 837, 347, 2189, 45, 1688, 45, 2000, 8485, 303, 1780, 96, 125, 98, 299, 648, 45, 2000, ...
[ "target", "Ġ=", "Ġ[]", "Ċ", "with", "Ġopen", "(\"", "Integer", "Array", ".", "txt", "\",", "Ġ\"", "r", "\")", "Ġas", "Ġf", ":", "ĊĠĠĠ", "Ġtarget", "Ġ=", "Ġf", ".", "readlines", "()", "Ċ", "for", "Ġx", "Ġin", "Ġrange", "(", "len", "(", "target", "))...
[ 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9...
[ 1, 7, 9, 12, 1, 5, 10, 12, 19, 24, 25, 28, 30, 32, 33, 35, 38, 40, 41, 4, 11, 13, 15, 16, 25, 27, 1, 4, 6, 9, 15, 16, 19, 20, 26, 29, 4, 11, 12, 13, 14, 16, 20, 21, 27, 28, 29, 31, 1, 1, 4, 6, 7, 8, 10, 4, ...
68b967ecf18d576758cf05e889919944cfc34dcd
""" generalised behaviour for actors and vacancies """ from mesa import Agent from random import shuffle import numpy as np class Entity(Agent): """ superclass for vacancy and actor agents not intended to be used on its own, but to inherit its methods to multiple other agents """ def __init__(se...
[ 3012, 222, 8323, 8628, 13981, 456, 40765, 480, 29170, 49014, 222, 3012, 222, 222, 1097, 616, 2473, 1220, 14222, 222, 1097, 4051, 1220, 20932, 222, 485, 6610, 641, 2115, 499, 222, 842, 7276, 45, 6150, 731, 303, 1547, 303, 37435, 456, 2...
[ "\"\"\"", "Ċ", "general", "ised", "Ġbehaviour", "Ġfor", "Ġactors", "Ġand", "Ġvac", "ancies", "Ċ", "\"\"\"", "Ċ", "Ċ", "from", "Ġme", "sa", "Ġimport", "ĠAgent", "Ċ", "from", "Ġrandom", "Ġimport", "Ġshuffle", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "ĊĊ", "Ċ",...
[ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, ...
[ 1, 4, 1, 8, 12, 22, 26, 33, 37, 41, 47, 1, 4, 1, 1, 5, 8, 10, 17, 23, 1, 5, 12, 19, 27, 1, 7, 13, 16, 19, 1, 1, 6, 13, 14, 19, 21, 4, 8, 4, 15, 19, 23, 27, 31, 37, 44, 4, 8, 17, 20, 23, 28, 31, 35, 39, 40...
46babde9c26a944c9d29121b6bbf89a32f242a81
import simple_draw as sd import random # sd.resolution = (1400, 900) # Prepare data for the sun function def sun_prepare(xpoint, ypoint, radius, color, angle): delta_list = [] radius_list = [] for delta in range(0, 360, angle): delta_list.append(delta) radius_list.append(random.randint(r...
[ 485, 4313, 100, 3903, 641, 16726, 222, 485, 4051, 499, 222, 40, 16726, 51, 15604, 299, 327, 54, 57, 53, 53, 49, 244, 62, 53, 53, 46, 499, 222, 40, 20950, 727, 456, 341, 15315, 686, 222, 610, 15315, 100, 9272, 45, 125, 1513, 49, ...
[ "import", "Ġsimple", "_", "draw", "Ġas", "Ġsd", "Ċ", "import", "Ġrandom", "ĊĊ", "Ċ", "#", "Ġsd", ".", "resolution", "Ġ=", "Ġ(", "1", "4", "0", "0", ",", "Ġ", "9", "0", "0", ")", "ĊĊ", "Ċ", "#", "ĠPrepare", "Ġdata", "Ġfor", "Ġthe", "Ġsun", "Ġfunct...
[ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, ...
[ 1, 7, 14, 15, 19, 22, 25, 1, 7, 14, 1, 1, 2, 5, 6, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 1, 2, 10, 15, 19, 23, 27, 36, 1, 4, 8, 9, 16, 17, 18, 23, 24, 26, 31, 32, 39, 40, 46, 47, 53, 55, 4,...
e736991f364ba9ff709348e4b1f612b1e9673281
from flask import * app = Flask(__name__) from app import views from app import admin_views from app import usr_reg from app import cookie from app import db_connect
[ 1097, 18958, 1220, 338, 222, 222, 745, 299, 24033, 4077, 444, 8238, 222, 222, 1097, 1142, 1220, 11887, 222, 1097, 1142, 1220, 5611, 100, 4361, 222, 1097, 1142, 1220, 33923, 100, 1604, 222, 1097, 1142, 1220, 11077, 222, 1097, 1142, 1220,...
[ "from", "Ġflask", "Ġimport", "Ġ*", "Ċ", "Ċ", "app", "Ġ=", "ĠFlask", "(__", "name", "__)", "Ċ", "Ċ", "from", "Ġapp", "Ġimport", "Ġviews", "Ċ", "from", "Ġapp", "Ġimport", "Ġadmin", "_", "views", "Ċ", "from", "Ġapp", "Ġimport", "Ġusr", "_", "reg", "Ċ", ...
[ 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9 ]
[ 1, 5, 11, 18, 20, 1, 1, 4, 6, 12, 15, 19, 22, 1, 1, 5, 9, 16, 22, 1, 5, 9, 16, 22, 23, 28, 1, 5, 9, 16, 20, 21, 24, 1, 5, 9, 16, 23, 1, 5, 9, 16, 19, 20, 27 ]
18d3f58048b7e5d792eb2494ecc62bb158ac7407
from flask import Flask from flask import render_template from flask import make_response import json from lib import powerswitch app = Flask(__name__) @app.route("/") def hello_world(): return render_template("index.html") @app.route("/on/") def on(): state = powerswitch.on() return json.dumps(state...
[ 1097, 18958, 1220, 24033, 222, 1097, 18958, 1220, 2922, 100, 2402, 222, 1097, 18958, 1220, 1949, 100, 2003, 222, 222, 485, 2379, 222, 222, 1097, 5053, 1220, 13157, 502, 36707, 222, 222, 745, 299, 24033, 4077, 444, 8238, 499, 222, 69, ...
[ "from", "Ġflask", "Ġimport", "ĠFlask", "Ċ", "from", "Ġflask", "Ġimport", "Ġrender", "_", "template", "Ċ", "from", "Ġflask", "Ġimport", "Ġmake", "_", "response", "Ċ", "Ċ", "import", "Ġjson", "Ċ", "Ċ", "from", "Ġlib", "Ġimport", "Ġpow", "ers", "witch", "Ċ", ...
[ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 1...
[ 1, 5, 11, 18, 24, 1, 5, 11, 18, 25, 26, 34, 1, 5, 11, 18, 23, 24, 32, 1, 1, 7, 12, 1, 1, 5, 9, 16, 20, 23, 28, 1, 1, 4, 6, 12, 15, 19, 22, 1, 1, 2, 5, 6, 11, 16, 1, 4, 10, 11, 16, 19, 4, 11, 18, 19, 27, ...
869284fa531a93c1b9812ed90a560d0bb2f87e97
# fonction pour voir quel est le plus grand entre l'energie limite et l'enerve potentiel def ep(m, h, el, g=9.8): E = m * h * g if E < el: print("le plus grand est : el") else: print("le plus grand est : E") ep(3, 4, 5) # fontion fibonaci 0 1 1 2 3 5 8 13 def fibonaci(n): for i in r...
[ 40, 27587, 9220, 9180, 495, 48707, 3263, 1018, 10972, 33251, 17939, 475, 44, 35893, 1093, 31367, 676, 2990, 475, 44, 766, 606, 8523, 323, 691, 222, 610, 11265, 45, 114, 49, 439, 49, 1871, 49, 504, 66, 62, 51, 61, 731, 303, 535, 29...
[ "#", "Ġfonction", "Ġpour", "Ġvo", "ir", "Ġquel", "Ġest", "Ġle", "Ġplus", "Ġgrand", "Ġentre", "Ġl", "'", "energ", "ie", "Ġlim", "ite", "Ġet", "Ġl", "'", "ener", "ve", "Ġpot", "ent", "iel", "Ċ", "def", "Ġep", "(", "m", ",", "Ġh", ",", "Ġel", ",", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5...
[ 1, 2, 11, 16, 19, 21, 26, 30, 33, 38, 44, 50, 52, 53, 58, 60, 64, 67, 70, 72, 73, 77, 79, 83, 86, 89, 1, 4, 7, 8, 9, 10, 12, 13, 16, 17, 19, 20, 21, 22, 23, 25, 4, 6, 8, 10, 12, 14, 16, 18, 4, 7, 9, 11, 14, ...
d126efa91b964a3a374d546bb860b39ae26dfa22
"""A tiny example binary for the native Python rules of Bazel.""" import unittest from bazel_tutorial.examples.py.lib import GetNumber from bazel_tutorial.examples.py.fibonacci.fib import Fib class TestGetNumber(unittest.TestCase): def test_ok(self): self.assertEqual(GetNumber(), 42) def test_fib(se...
[ 3012, 70, 19119, 2301, 5314, 456, 341, 7565, 5006, 7032, 451, 570, 18062, 7128, 222, 222, 485, 15790, 222, 1097, 342, 18062, 100, 10001, 51, 7944, 51, 997, 51, 1379, 1220, 1408, 1936, 222, 1097, 342, 18062, 100, 10001, 51, 7944, 51, ...
[ "\"\"\"", "A", "Ġtiny", "Ġexample", "Ġbinary", "Ġfor", "Ġthe", "Ġnative", "ĠPython", "Ġrules", "Ġof", "ĠB", "azel", ".\"\"\"", "Ċ", "Ċ", "import", "Ġunittest", "Ċ", "from", "Ġb", "azel", "_", "tutorial", ".", "examples", ".", "py", ".", "lib", "Ġimport", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9...
[ 1, 4, 5, 10, 18, 25, 29, 33, 40, 47, 53, 56, 58, 62, 66, 1, 1, 7, 16, 1, 5, 7, 11, 12, 20, 21, 29, 30, 32, 33, 36, 43, 47, 53, 1, 5, 7, 11, 12, 20, 21, 29, 30, 32, 33, 36, 42, 43, 46, 53, 55, 57, 1, 1, 6, 1...
e582787a912f479830ed99575b2c6adb8088b4e5
from flask import Flask, request from flask import jsonify from preprocessing import QueryProcessor from flask_cors import CORS app = Flask(__name__) CORS(app) qp = QueryProcessor() @app.route("/search_general", methods=["POST"]) def query(): message = None searchQuery = request.json["searchQuery"] resul...
[ 1097, 18958, 1220, 24033, 49, 1343, 222, 1097, 18958, 1220, 35206, 222, 1097, 40955, 1220, 6662, 6872, 222, 1097, 18958, 100, 26283, 1220, 45552, 222, 222, 745, 299, 24033, 4077, 444, 8238, 222, 72, 6542, 45, 745, 46, 222, 12147, 299, ...
[ "from", "Ġflask", "Ġimport", "ĠFlask", ",", "Ġrequest", "Ċ", "from", "Ġflask", "Ġimport", "Ġjsonify", "Ċ", "from", "Ġpreprocessing", "Ġimport", "ĠQuery", "Processor", "Ċ", "from", "Ġflask", "_", "cors", "Ġimport", "ĠCORS", "Ċ", "Ċ", "app", "Ġ=", "ĠFlask", "(...
[ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1...
[ 1, 5, 11, 18, 24, 25, 33, 1, 5, 11, 18, 26, 1, 5, 19, 26, 32, 41, 1, 5, 11, 12, 16, 23, 28, 1, 1, 4, 6, 12, 15, 19, 22, 1, 2, 5, 6, 9, 10, 1, 3, 5, 11, 20, 22, 1, 1, 2, 5, 6, 11, 14, 20, 21, 28, 30, 38, ...
f8bf7e2d8f06bbd00f04047153833c07bf483fd3
from django.apps import AppConfig class PyrpgConfig(AppConfig): name = "PyRPG"
[ 1097, 8532, 51, 7520, 1220, 2013, 1081, 499, 222, 842, 4374, 119, 2340, 1081, 45, 42728, 731, 303, 655, 299, 332, 5019, 5743, 76, 39, 222 ]
[ "from", "Ġdjango", ".", "apps", "Ġimport", "ĠApp", "Config", "ĊĊ", "Ċ", "class", "ĠPy", "r", "pg", "Config", "(", "AppConfig", "):", "ĊĠĠĠ", "Ġname", "Ġ=", "Ġ\"", "Py", "RP", "G", "\"", "Ċ" ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ 1, 5, 12, 13, 17, 24, 28, 34, 1, 1, 6, 9, 10, 12, 18, 19, 28, 30, 4, 9, 11, 13, 15, 17, 18, 19 ]
48677d73f6489ce789884a9dff5d50c23f47d8b3
__author__ = "simon.hughes" from sklearn.feature_extraction import DictVectorizer from WindowFeatures import compute_middle_index from collections import Counter class WindowFeatureExtractor(object): """ A simple wrapper class that takes a number of window based feature extractor functions and applies th...
[ 523, 2133, 523, 299, 332, 4535, 286, 51, 109, 905, 4301, 39, 222, 222, 1097, 14415, 51, 3317, 100, 47183, 1220, 14609, 2880, 2292, 222, 1097, 12016, 9566, 1220, 7665, 100, 10519, 100, 1076, 222, 1097, 13722, 1220, 18737, 499, 222, 842...
[ "__", "author", "__", "Ġ=", "Ġ\"", "sim", "on", ".", "h", "ug", "hes", "\"", "Ċ", "Ċ", "from", "Ġsklearn", ".", "feature", "_", "extraction", "Ġimport", "ĠDict", "Vector", "izer", "Ċ", "from", "ĠWindow", "Features", "Ġimport", "Ġcompute", "_", "middle", ...
[ 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1...
[ 1, 3, 9, 11, 13, 15, 18, 20, 21, 22, 24, 27, 28, 1, 1, 5, 13, 14, 21, 22, 32, 39, 44, 50, 54, 1, 5, 12, 20, 27, 35, 36, 42, 43, 48, 1, 5, 17, 24, 32, 1, 1, 6, 13, 20, 29, 30, 36, 38, 4, 8, 4, 6, 13, 21, 27,...
47c1ad4bd1ceffa38eef467ea8eb59dbd2fc2ebb
from packet import Packet from packetConstructor import PacketConstructor import threading import time class PacketSender: """ Packet represents a simulated UDP packet. """ # The next seq num for sent packets seq_num = 0 # The next seq num for acks that we're waiting for next_seq_num = 0 ...
[ 1097, 6892, 1220, 18706, 222, 1097, 6892, 7935, 1220, 18706, 7935, 222, 485, 26311, 222, 485, 1153, 499, 222, 842, 18706, 10455, 63, 303, 1547, 303, 18706, 10684, 331, 38548, 24616, 6892, 51, 303, 1547, 465, 607, 906, 2371, 8717, 1952, ...
[ "from", "Ġpacket", "Ġimport", "ĠPacket", "Ċ", "from", "Ġpacket", "Constructor", "Ġimport", "ĠPacket", "Constructor", "Ċ", "import", "Ġthreading", "Ċ", "import", "Ġtime", "ĊĊ", "Ċ", "class", "ĠPacket", "Sender", ":", "ĊĠĠĠ", "Ġ\"\"\"", "ĊĠĠĠ", "ĠPacket", "Ġrepres...
[ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 6, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14...
[ 1, 5, 12, 19, 26, 1, 5, 12, 23, 30, 37, 48, 1, 7, 17, 1, 7, 12, 1, 1, 6, 13, 19, 20, 4, 8, 4, 11, 22, 24, 34, 38, 45, 46, 4, 8, 4, 6, 10, 15, 19, 23, 27, 32, 40, 4, 8, 9, 12, 14, 15, 16, 4, 6, 10, 15, 19,...
24cdbbadc8ff1c7ad5d42eeb518cb6c2b34724a2
from openfermion import QubitOperator, FermionOperator from openfermion.transforms import jordan_wigner from src.utils import QasmUtils, MatrixUtils from src.ansatz_elements import AnsatzElement, DoubleExchange import itertools import numpy class EfficientDoubleExchange(AnsatzElement): def __init__(self, qubit_...
[ 1097, 2177, 1036, 114, 304, 1220, 1931, 28279, 7151, 49, 525, 2830, 304, 7151, 222, 1097, 2177, 1036, 114, 304, 51, 24650, 1220, 614, 46580, 100, 124, 646, 284, 222, 222, 1097, 1581, 51, 2324, 1220, 1931, 7741, 2769, 49, 9351, 2769, ...
[ "from", "Ġopen", "fer", "m", "ion", "Ġimport", "ĠQ", "ubit", "Operator", ",", "ĠF", "erm", "ion", "Operator", "Ċ", "from", "Ġopen", "fer", "m", "ion", ".", "transforms", "Ġimport", "Ġj", "ordan", "_", "w", "ign", "er", "Ċ", "Ċ", "from", "Ġsrc", ".", ...
[ 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, 3, 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, 6, 7, 7, 7, 8...
[ 1, 5, 10, 13, 14, 17, 24, 26, 30, 38, 39, 41, 44, 47, 55, 1, 5, 10, 13, 14, 17, 18, 28, 35, 37, 42, 43, 44, 47, 49, 1, 1, 5, 9, 10, 15, 22, 24, 27, 32, 33, 40, 45, 1, 5, 9, 10, 13, 16, 17, 25, 32, 35, 38, 39,...
2843845848747c723d670cd3a5fcb7127153ac7e
from flask import Flask from sim.toggle import ToggleSensor from sim.sensor import Sensor app = Flask(__name__) sensors = [ ToggleSensor(id="s-01", description="lampadina"), ToggleSensor(id="s-02", description="lampadina"), ToggleSensor(id="s-03", description="allarme atomico"), ToggleSensor(id="s-04...
[ 1097, 18958, 1220, 24033, 222, 222, 1097, 3805, 51, 4652, 1220, 25153, 11813, 222, 1097, 3805, 51, 12625, 1220, 21982, 222, 222, 745, 299, 24033, 4077, 444, 8238, 222, 222, 37843, 299, 447, 303, 25153, 11813, 45, 333, 366, 120, 50, 53...
[ "from", "Ġflask", "Ġimport", "ĠFlask", "Ċ", "Ċ", "from", "Ġsim", ".", "toggle", "Ġimport", "ĠToggle", "Sensor", "Ċ", "from", "Ġsim", ".", "sensor", "Ġimport", "ĠSensor", "Ċ", "Ċ", "app", "Ġ=", "ĠFlask", "(__", "name", "__)", "Ċ", "Ċ", "sensors", "Ġ=", ...
[ 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 7, 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, 10, 10, 10, 10, 10, 10, 1...
[ 1, 5, 11, 18, 24, 1, 1, 5, 9, 10, 16, 23, 30, 36, 1, 5, 9, 10, 16, 23, 30, 1, 1, 4, 6, 12, 15, 19, 22, 1, 1, 8, 10, 12, 4, 11, 17, 18, 20, 22, 23, 24, 25, 26, 28, 40, 42, 46, 48, 51, 54, 4, 11, 17, 18, 20, ...
f5bd41f4aaff616a332d80ec44c364ffc91c58f0
# %load q03_skewness_log/build.py from scipy.stats import skew import pandas as pd import numpy as np data = pd.read_csv("data/train.csv") # Write code here: def skewness_log(df): df["SalePrice_New"] = np.log(df["SalePrice"]) df["GrLivArea_New"] = np.log(df["GrLivArea"]) skewed_slPri = skew(df["SalePrice...
[ 40, 925, 963, 2706, 53, 56, 100, 40059, 4342, 100, 769, 52, 1848, 51, 997, 222, 1097, 18945, 51, 5170, 1220, 37873, 222, 485, 13247, 641, 6451, 222, 485, 6610, 641, 2115, 222, 222, 624, 299, 6451, 51, 870, 100, 4849, 459, 624, 52,...
[ "#", "Ġ%", "load", "Ġq", "0", "3", "_", "skew", "ness", "_", "log", "/", "build", ".", "py", "Ċ", "from", "Ġscipy", ".", "stats", "Ġimport", "Ġskew", "Ċ", "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "Ċ", "data", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, ...
[ 1, 2, 4, 8, 10, 11, 12, 13, 17, 21, 22, 25, 26, 31, 32, 34, 1, 5, 11, 12, 17, 24, 29, 1, 7, 14, 17, 20, 1, 7, 13, 16, 19, 1, 1, 5, 7, 10, 11, 15, 16, 19, 21, 25, 26, 31, 32, 35, 37, 1, 1, 2, 8, 13, 18, 19, ...
d65f858c3ad06226b83d2627f6d38e03eae5b36c
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Phase transition module""" import utils import datetime import itertools import numpy as np import recovery as rec import sampling as smp import graphs_signals as gs import pathos.multiprocessing as mp from tqdm import tqdm ## MAIN FUNCTIONS ## def grid_evaluati...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 56, 222, 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 222, 3012, 12238, 9112, 2313, 3012, 222, 222, 485, 8767, 222, 485, 7181, 222, 485, 31660, 222, 222, 485, 6610, 641, 2115, 222, 485, 25423, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "3", "Ċ", "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "\"\"\"", "Phase", "Ġtransition", "Ġmodule", "\"\"\"", "Ċ", "Ċ", "import", "Ġutils", "Ċ", "import", "Ġdatetime", "Ċ", "import", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, ...
[ 1, 4, 7, 8, 11, 12, 15, 22, 23, 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 1, 4, 9, 20, 27, 30, 1, 1, 7, 13, 1, 7, 16, 1, 7, 17, 1, 1, 7, 13, 16, 19, 1, 7, 16, 19, 23, 1, 7, 16, 19, 21, 23, 1, 7, 14, 15, 22, 2...
f97a892e6e0aa258ad917c4a73a66e89b0dc3253
# coding: utf-8 # In[1]: import sys sys.path.extend(["detection", "train"]) # from detection folder from MtcnnDetector import MtcnnDetector from detector import Detector from fcn_detector import FcnDetector # from train folder from model_factory import P_Net, R_Net, O_Net import config as config from preprocess.uti...
[ 40, 10633, 63, 6471, 50, 61, 222, 222, 40, 719, 96, 54, 2805, 222, 485, 5263, 222, 222, 3750, 51, 1005, 51, 8258, 14274, 18649, 411, 332, 3441, 6957, 222, 222, 40, 664, 13926, 4865, 222, 1097, 507, 5492, 4042, 14334, 1220, 507, 54...
[ "#", "Ġcoding", ":", "Ġutf", "-", "8", "Ċ", "Ċ", "#", "ĠIn", "[", "1", "]:", "Ċ", "import", "Ġsys", "Ċ", "Ċ", "sys", ".", "path", ".", "extend", "([\"", "detection", "\",", "Ġ\"", "train", "\"])", "Ċ", "Ċ", "#", "Ġfrom", "Ġdetection", "Ġfolder", ...
[ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 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,...
[ 1, 2, 9, 10, 14, 15, 16, 1, 1, 2, 5, 6, 7, 9, 1, 7, 11, 1, 1, 4, 5, 9, 10, 16, 19, 28, 30, 32, 37, 40, 1, 1, 2, 7, 17, 24, 1, 5, 7, 9, 11, 19, 26, 28, 30, 32, 40, 1, 5, 14, 21, 30, 1, 5, 7, 9, 10, 18, ...
df40b0628d6a180a98cd385145ee7c65ecb78256
import os import tensorflow as tf import torch from tqdm import tqdm from glob import glob import numpy as np from collections.abc import Iterable from utils.hparams import HParam # from utils.audio import Audio # import librosa # python encoder_inference.py --in_dir training_libri_mel/train/ --gpu_str 5 # python tfre...
[ 485, 2355, 222, 485, 15196, 641, 5369, 222, 485, 5665, 222, 1097, 24826, 1220, 24826, 222, 1097, 12542, 1220, 12542, 222, 485, 6610, 641, 2115, 222, 1097, 13722, 51, 8198, 1220, 19208, 222, 1097, 8767, 51, 109, 2155, 1220, 696, 3196, ...
[ "import", "Ġos", "Ċ", "import", "Ġtensorflow", "Ġas", "Ġtf", "Ċ", "import", "Ġtorch", "Ċ", "from", "Ġtqdm", "Ġimport", "Ġtqdm", "Ċ", "from", "Ġglob", "Ġimport", "Ġglob", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "from", "Ġcollections", ".", "abc", "Ġimpo...
[ 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, ...
[ 1, 7, 10, 1, 7, 18, 21, 24, 1, 7, 13, 1, 5, 10, 17, 22, 1, 5, 10, 17, 22, 1, 7, 13, 16, 19, 1, 5, 17, 18, 21, 28, 37, 1, 5, 11, 12, 13, 19, 26, 28, 33, 1, 2, 7, 13, 14, 19, 26, 32, 1, 2, 9, 13, 15, 17, 1,...
ed7b29a4d7f3a48884434373418c3528f2f397ac
#!/usr/bin/python3 import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # or any {'0', '1', '2' os.environ["KERAS_BACKEND"] = "tensorflow" import numpy as np import sys from util import load_model from keras.preprocessing.text import hashing_trick from keras.preprocessing.sequence import pad_sequences from southpar...
[ 8758, 3392, 52, 1793, 52, 2980, 56, 222, 222, 485, 2355, 222, 222, 519, 51, 12849, 1388, 5771, 100, 10509, 100, 4697, 100, 3612, 100, 10736, 1465, 299, 332, 56, 39, 244, 607, 575, 1364, 5095, 53, 389, 349, 54, 389, 349, 55, 44, ...
[ "#!/", "usr", "/", "bin", "/", "python", "3", "Ċ", "Ċ", "import", "Ġos", "Ċ", "Ċ", "os", ".", "environ", "[\"", "TF", "_", "CPP", "_", "MIN", "_", "LOG", "_", "LEVEL", "\"]", "Ġ=", "Ġ\"", "3", "\"", "Ġ", "Ġ#", "Ġor", "Ġany", "Ġ{'", "0", "',",...
[ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8...
[ 1, 4, 7, 8, 11, 12, 18, 19, 1, 1, 7, 10, 1, 1, 3, 4, 11, 13, 15, 16, 19, 20, 23, 24, 27, 28, 33, 35, 37, 39, 40, 41, 42, 44, 47, 51, 54, 55, 57, 59, 60, 62, 64, 65, 66, 1, 3, 4, 11, 13, 16, 18, 19, 26, 28, ...
b6d8a918659f733919fe3bb4be9037e36ad32386
import queue import sys import logging from superai.common import InitLog logger = logging.getLogger(__name__) # 2维到1维 def hwToidx(x: int, y: int, weight: int): return y * weight + x # 1维到2维 def idxTohw(idx, weight: int): return [idx % weight, idx // weight] # 10x10 cell idx 到 [x,y] def idxToXY(idx, cel...
[ 485, 5535, 222, 485, 5263, 222, 485, 5751, 222, 222, 1097, 2615, 3063, 51, 2297, 1220, 10161, 1353, 222, 222, 4089, 299, 5751, 51, 10588, 4077, 444, 8238, 499, 222, 40, 244, 55, 18880, 4329, 54, 18880, 222, 610, 15431, 89, 599, 125,...
[ "import", "Ġqueue", "Ċ", "import", "Ġsys", "Ċ", "import", "Ġlogging", "Ċ", "Ċ", "from", "Ġsuper", "ai", ".", "common", "Ġimport", "ĠInit", "Log", "Ċ", "Ċ", "logger", "Ġ=", "Ġlogging", ".", "getLogger", "(__", "name", "__)", "ĊĊ", "Ċ", "#", "Ġ", "2", ...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, ...
[ 1, 7, 13, 1, 7, 11, 1, 7, 15, 1, 1, 5, 11, 13, 14, 20, 27, 32, 35, 1, 1, 7, 9, 17, 18, 27, 30, 34, 37, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 4, 7, 8, 11, 12, 13, 14, 15, 19, 20, 22, 23, 27, 28, 35, 36, 40, 42, ...
7930bb813bd546747c7c65b661900939f5ba93f1
user_input = input() # abv>1>1>2>2asdasd exploded_str = user_input for n in range(len(user_input)): explosion_strength = 0 if user_input[n] == ">": explosion_strength += int(user_input[n + 1]) if user_input[n + explosion_strength] != ">": exploded_str = user_input[:n] + user_input[...
[ 514, 100, 1151, 299, 1533, 365, 244, 607, 1419, 123, 67, 54, 67, 54, 67, 55, 67, 55, 321, 14063, 105, 222, 15501, 1001, 100, 484, 299, 1275, 100, 1151, 222, 222, 999, 329, 347, 2189, 45, 1688, 45, 514, 100, 1151, 8485, 303, 1068...
[ "user", "_", "input", "Ġ=", "Ġinput", "()", "Ġ", "Ġ#", "Ġab", "v", ">", "1", ">", "1", ">", "2", ">", "2", "as", "das", "d", "Ċ", "explo", "ded", "_", "str", "Ġ=", "Ġuser", "_", "input", "Ċ", "Ċ", "for", "Ġn", "Ġin", "Ġrange", "(", "len", "...
[ 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7...
[ 1, 5, 6, 11, 13, 19, 21, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 41, 42, 1, 6, 9, 10, 13, 15, 20, 21, 26, 1, 1, 4, 6, 9, 15, 16, 19, 20, 24, 25, 30, 33, 4, 10, 14, 15, 23, 25, 26, 27, 4, 7, 12, ...
c6cf085330f47ffb139c5acc91d91e9758f5396a
from page_objects import PageObject, PageElement class MainPage(PageObject): level_menu_opened = False level_menu_created = False css_input = PageElement(css="input.input-strobe") level_text_span = PageElement(css="span.level-text") instruction_h2 = PageElement(css="h2.order") enter_button = P...
[ 1097, 1957, 100, 5754, 1220, 6021, 976, 49, 6021, 1325, 499, 222, 842, 6697, 1983, 45, 1983, 976, 731, 303, 3215, 100, 3055, 100, 27781, 299, 3208, 303, 3215, 100, 3055, 100, 4536, 299, 3208, 303, 9714, 100, 1151, 299, 6021, 1325, 4...
[ "from", "Ġpage", "_", "objects", "Ġimport", "ĠPage", "Object", ",", "ĠPage", "Element", "ĊĊ", "Ċ", "class", "ĠMain", "Page", "(", "Page", "Object", "):", "ĊĠĠĠ", "Ġlevel", "_", "menu", "_", "opened", "Ġ=", "ĠFalse", "ĊĠĠĠ", "Ġlevel", "_", "menu", "_", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 5, 10, 11, 18, 25, 30, 36, 37, 42, 49, 1, 1, 6, 11, 15, 16, 20, 26, 28, 4, 10, 11, 15, 16, 22, 24, 30, 4, 10, 11, 15, 16, 23, 25, 31, 4, 8, 9, 14, 16, 21, 28, 29, 32, 34, 39, 40, 45, 46, 50, 52, 54, 4, 10,...
c2ddf31bce4a5f3ae2b0d5455bbc9942f92bff40
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" from keras.models import load_model from utils import resize_to_fit, clear_chunks, stack_windows from imutils import paths import numpy as np import imutils import cv2 as cv2 import pickle from tqdm import tqdm c1_correct = 0 c2_correct = 0 c3_correct = 0 c4_correct...
[ 485, 2355, 222, 222, 519, 51, 12849, 1388, 5771, 100, 10509, 100, 4697, 100, 3612, 100, 10736, 1465, 299, 332, 56, 39, 222, 222, 1097, 21144, 51, 3404, 1220, 2480, 100, 1184, 222, 1097, 8767, 1220, 15189, 100, 471, 100, 4803, 49, 42...
[ "import", "Ġos", "Ċ", "Ċ", "os", ".", "environ", "[\"", "TF", "_", "CPP", "_", "MIN", "_", "LOG", "_", "LEVEL", "\"]", "Ġ=", "Ġ\"", "3", "\"", "Ċ", "Ċ", "from", "Ġkeras", ".", "models", "Ġimport", "Ġload", "_", "model", "Ċ", "from", "Ġutils", "Ġi...
[ 1, 1, 1, 2, 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, 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, 8, 8, 8, 8, 8, 9, 9, 9...
[ 1, 7, 10, 1, 1, 3, 4, 11, 13, 15, 16, 19, 20, 23, 24, 27, 28, 33, 35, 37, 39, 40, 41, 1, 1, 5, 11, 12, 18, 25, 30, 31, 36, 1, 5, 11, 18, 25, 26, 28, 29, 32, 33, 39, 40, 46, 47, 53, 54, 61, 1, 5, 8, 13, 20, ...
75e6554ea3c327c87a2a65710a7f1d55e9933bb0
# Author: BeiYu # Github: https://github.com/beiyuouo # Date : 2021/2/21 21:57 # Description: __author__ = "BeiYu" from utils.init_env import set_seed from utils.options import * import os import logging import torch from torch import nn from torch import optim from torch.optim.lr_scheduler import MultiStepLR from ...
[ 40, 6265, 63, 4284, 110, 40415, 222, 40, 16102, 63, 1698, 574, 951, 51, 527, 52, 883, 16120, 122, 663, 116, 222, 40, 2833, 244, 518, 244, 55, 53, 55, 54, 52, 55, 52, 55, 54, 244, 55, 54, 63, 58, 60, 222, 40, 5602, 63, 222, ...
[ "#", "ĠAuthor", ":", "ĠBe", "i", "Yu", "Ċ", "#", "ĠGithub", ":", "Ġhttps", "://", "github", ".", "com", "/", "be", "iy", "u", "ou", "o", "Ċ", "#", "ĠDate", "Ġ", "Ġ:", "Ġ", "2", "0", "2", "1", "/", "2", "/", "2", "1", "Ġ", "2", "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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8...
[ 1, 2, 9, 10, 13, 14, 16, 1, 2, 9, 10, 16, 19, 25, 26, 29, 30, 32, 34, 35, 37, 38, 1, 2, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1, 2, 14, 15, 1, 1, 3, 9, 11, 13, 15, 17, 18...
58f3b8c5470c765c81f27d39d9c28751a8c2b719
"""Ex026 Faça um programa que leia uma frase pelo teclado e mostre: Quantas vezes aparece a letra "A". Em que posição ela aparece a primeira vez. Em que posição ela aparece pela última vez.""" frase = str(input("Digite uma frase: ")).strip().lower() n_a = frase.count("a") f_a = frase.find("a") + 1 l_a = frase.rfind("a...
[ 3012, 589, 53, 55, 59, 40522, 18400, 4225, 38691, 2518, 1018, 923, 9432, 4953, 479, 29872, 2713, 592, 2619, 503, 4665, 287, 63, 222, 17143, 321, 5309, 20569, 1863, 605, 388, 331, 1018, 2704, 332, 70, 2316, 222, 12306, 2518, 3423, 2755...
[ "\"\"\"", "Ex", "0", "2", "6", "ĠFa", "ça", "Ġum", "Ġprograma", "Ġque", "Ġle", "ia", "Ġuma", "Ġfr", "ase", "Ġpelo", "Ġte", "cl", "ado", "Ġe", "Ġmost", "re", ":", "Ċ", "Quant", "as", "Ġve", "zes", "Ġap", "are", "ce", "Ġa", "Ġle", "tra", "Ġ\"", "A...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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...
[ 1, 4, 6, 7, 8, 9, 12, 14, 17, 26, 30, 33, 35, 39, 42, 45, 50, 53, 55, 58, 60, 65, 67, 68, 1, 6, 8, 11, 14, 17, 20, 22, 24, 27, 30, 32, 33, 35, 1, 3, 7, 11, 15, 18, 19, 22, 25, 27, 29, 35, 38, 42, 43, 1, 3, ...
d83f2d9bb25a46bc7344b420ce65bf729165e6b9
from django.apps import AppConfig class FosAppConfig(AppConfig): name = "fos_app"
[ 1097, 8532, 51, 7520, 1220, 2013, 1081, 499, 222, 842, 525, 519, 42728, 45, 42728, 731, 303, 655, 299, 332, 45704, 100, 745, 39, 222 ]
[ "from", "Ġdjango", ".", "apps", "Ġimport", "ĠApp", "Config", "ĊĊ", "Ċ", "class", "ĠF", "os", "AppConfig", "(", "AppConfig", "):", "ĊĠĠĠ", "Ġname", "Ġ=", "Ġ\"", "fos", "_", "app", "\"", "Ċ" ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ 1, 5, 12, 13, 17, 24, 28, 34, 1, 1, 6, 8, 10, 19, 20, 29, 31, 4, 9, 11, 13, 16, 17, 20, 21 ]
d2b05c5653ca6c6b7219f6c0393e81c9425b5977
""" HLS: Check if Twin Granule Exists """ from typing import Dict import os import re import boto3 from botocore.errorfactory import ClientError from datetime import date s3 = boto3.client("s3") bucket = os.getenv("SENTINEL_INPUT_BUCKET", None) print(bucket) if bucket is None: raise Exception("No Input Bucket set...
[ 3012, 222, 77, 4912, 63, 3471, 434, 413, 4481, 8102, 297, 779, 1300, 3064, 222, 3012, 222, 222, 1097, 12018, 1220, 14609, 222, 485, 2355, 222, 485, 334, 222, 485, 36600, 56, 222, 1097, 36600, 1284, 51, 750, 5802, 1220, 5680, 943, 22...
[ "\"\"\"", "Ċ", "H", "LS", ":", "ĠCheck", "Ġif", "ĠT", "win", "ĠGr", "an", "ule", "ĠEx", "ists", "Ċ", "\"\"\"", "Ċ", "Ċ", "from", "Ġtyping", "Ġimport", "ĠDict", "Ċ", "import", "Ġos", "Ċ", "import", "Ġre", "Ċ", "import", "Ġboto", "3", "Ċ", "from", "Ġ...
[ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 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, 2, 4, 5, 11, 14, 16, 19, 22, 24, 27, 30, 34, 1, 4, 1, 1, 5, 12, 19, 24, 1, 7, 10, 1, 7, 10, 1, 7, 12, 13, 1, 5, 10, 14, 15, 20, 27, 34, 41, 46, 1, 5, 14, 21, 26, 1, 1, 2, 3, 5, 10, 11, 12, 18, ...
c73a199d1c1c1867f3d53ceebf614bc9b65c0d5e
from django.contrib import admin from ticket.models import Ticket, UserTicket, AuxiliaryTicket @admin.register(Ticket) class TicketAdmin(admin.ModelAdmin): pass @admin.register(AuxiliaryTicket) class AuxiliaryTicketAdmin(admin.ModelAdmin): pass @admin.register(UserTicket) class UserTicketAdmin(admin.Mode...
[ 1097, 8532, 51, 12060, 1220, 5611, 222, 222, 1097, 14724, 51, 3404, 1220, 32371, 49, 2694, 15761, 49, 418, 1677, 24103, 15761, 499, 222, 69, 2317, 51, 3334, 45, 15761, 46, 222, 842, 32371, 4208, 45, 2317, 51, 1262, 4208, 731, 303, 3...
[ "from", "Ġdjango", ".", "contrib", "Ġimport", "Ġadmin", "Ċ", "Ċ", "from", "Ġticket", ".", "models", "Ġimport", "ĠTicket", ",", "ĠUser", "Ticket", ",", "ĠA", "ux", "iliary", "Ticket", "ĊĊ", "Ċ", "@", "admin", ".", "register", "(", "Ticket", ")", "Ċ", "c...
[ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, ...
[ 1, 5, 12, 13, 20, 27, 33, 1, 1, 5, 12, 13, 19, 26, 33, 34, 39, 45, 46, 48, 50, 56, 62, 1, 1, 2, 7, 8, 16, 17, 23, 24, 1, 6, 13, 18, 19, 24, 25, 30, 35, 37, 4, 9, 1, 1, 2, 7, 8, 16, 17, 20, 26, 32, 33, 1, ...
e564e0d05c3c0e60f356422722803df510d9dd0b
import numpy as np import pandas as pd from sklearn.metrics import confusion_matrix from sklearn.metrics import classification_report from sklearn.metrics import precision_score, recall_score, f1_score from scipy.optimize import fsolve import numba from numba import njit, jit # @jit(parallel=True) def conventional_te...
[ 485, 6610, 641, 2115, 222, 485, 13247, 641, 6451, 222, 1097, 14415, 51, 8113, 1220, 26204, 100, 4948, 222, 1097, 14415, 51, 8113, 1220, 18005, 100, 3755, 222, 1097, 14415, 51, 8113, 1220, 12612, 100, 5142, 49, 28448, 100, 5142, 49, 31...
[ "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "from", "Ġsklearn", ".", "metrics", "Ġimport", "Ġconfusion", "_", "matrix", "Ċ", "from", "Ġsklearn", ".", "metrics", "Ġimport", "Ġclassification", "_", "report", "Ċ", "from", "Ġsk...
[ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8...
[ 1, 7, 13, 16, 19, 1, 7, 14, 17, 20, 1, 5, 13, 14, 21, 28, 38, 39, 45, 1, 5, 13, 14, 21, 28, 43, 44, 50, 1, 5, 13, 14, 21, 28, 38, 39, 44, 45, 52, 53, 58, 59, 61, 62, 63, 68, 1, 5, 11, 12, 20, 27, 29, 34, 1, ...
9bc13c608c079cbf23ed04f29edd1fd836214cde
from rest_framework import viewsets, mixins from .models import Comment, Post from .serializer import CommentSerializer, PostSerializer, AllCommentSerializer class PostViewSet(viewsets.ModelViewSet): serializer_class = PostSerializer queryset = Post.objects.all() class CommentViewSet(viewsets.GenericViewSet...
[ 1097, 6125, 100, 2863, 1220, 2221, 2047, 49, 38712, 222, 1097, 657, 3404, 1220, 14523, 49, 6408, 222, 1097, 657, 15237, 1220, 14523, 7271, 49, 6408, 7271, 49, 3381, 6327, 7271, 499, 222, 842, 6408, 47344, 45, 1090, 2047, 51, 1262, 473...
[ "from", "Ġrest", "_", "framework", "Ġimport", "Ġview", "sets", ",", "Ġmixins", "Ċ", "from", "Ġ.", "models", "Ġimport", "ĠComment", ",", "ĠPost", "Ċ", "from", "Ġ.", "serializer", "Ġimport", "ĠComment", "Serializer", ",", "ĠPost", "Serializer", ",", "ĠAll", "C...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 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, 10, 11, 11, ...
[ 1, 5, 10, 11, 20, 27, 32, 36, 37, 44, 1, 5, 7, 13, 20, 28, 29, 34, 1, 5, 7, 17, 24, 32, 42, 43, 48, 58, 59, 63, 70, 80, 1, 1, 6, 11, 18, 19, 23, 27, 28, 33, 40, 42, 4, 15, 16, 21, 23, 28, 38, 4, 13, 15, 20, ...
b11e2837d3ba9c14770b8039186a2175adc41ea1
from .server import CanvasServer try: from .jupyter import JupyterCanvas, create_jupyter_canvas HAS_JUPYTER = True except: HAS_JUPYTER = False JupyterCanvas = None # type: ignore def http_server(file: str = None, host: str = "localhost", port: int = 5050) -> CanvasServer: """Creates a new HTTP ...
[ 1097, 657, 1805, 1220, 21457, 2077, 222, 222, 1287, 63, 303, 664, 657, 24378, 1220, 28720, 8521, 49, 1506, 100, 24378, 100, 8046, 465, 35854, 100, 79, 2430, 94, 2933, 299, 2969, 222, 7364, 63, 303, 35854, 100, 79, 2430, 94, 2933, 29...
[ "from", "Ġ.", "server", "Ġimport", "ĠCanvas", "Server", "Ċ", "Ċ", "try", ":", "ĊĠĠĠ", "Ġfrom", "Ġ.", "jupyter", "Ġimport", "ĠJupyter", "Canvas", ",", "Ġcreate", "_", "jupyter", "_", "canvas", "ĊĊĠĠĠ", "ĠHAS", "_", "J", "UP", "Y", "TER", "Ġ=", "ĠTrue", ...
[ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 12, 12, 12, 12, 12, 12, ...
[ 1, 5, 7, 13, 20, 27, 33, 1, 1, 4, 5, 4, 9, 11, 18, 25, 33, 39, 40, 47, 48, 55, 56, 62, 4, 8, 9, 10, 12, 13, 16, 18, 23, 1, 7, 8, 4, 8, 9, 10, 12, 13, 16, 18, 24, 4, 12, 18, 20, 25, 26, 28, 33, 34, 41, 1, ...
2da7892722afde5a6f87e3bd6d5763c895ac96c9
import json import os import ipdb from tqdm import tqdm import argparse from os import listdir from os.path import isfile, join import pickle import joblib from collections import Counter from shutil import copyfile import networkx as nx import spacy import nltk import numpy as np nltk.download("stopwords") nltk_stopw...
[ 485, 2379, 222, 485, 2355, 222, 485, 4762, 1219, 222, 1097, 24826, 1220, 24826, 222, 485, 16693, 222, 1097, 2355, 1220, 1168, 1537, 222, 1097, 2355, 51, 1005, 1220, 458, 781, 49, 7163, 222, 485, 19892, 222, 485, 4012, 1379, 222, 1097,...
[ "import", "Ġjson", "Ċ", "import", "Ġos", "Ċ", "import", "Ġip", "db", "Ċ", "from", "Ġtqdm", "Ġimport", "Ġtqdm", "Ċ", "import", "Ġargparse", "Ċ", "from", "Ġos", "Ġimport", "Ġlist", "dir", "Ċ", "from", "Ġos", ".", "path", "Ġimport", "Ġis", "file", ",", "Ġ...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13,...
[ 1, 7, 12, 1, 7, 10, 1, 7, 10, 12, 1, 5, 10, 17, 22, 1, 7, 16, 1, 5, 8, 15, 20, 23, 1, 5, 8, 9, 13, 20, 23, 27, 28, 33, 1, 7, 14, 1, 7, 11, 14, 1, 5, 17, 24, 32, 1, 5, 12, 19, 24, 28, 1, 7, 15, 16, 19, 2...
e38ae7f91deed1be00e60b7516210ea1feefe23e
import sys import os from configparser import ConfigParser import logging from mod_argparse import setup_cli from checkers.IndexFile import DocumentIndex, ProgressNoteIndex from checkers import source_files from utilities import write_to_file, strip # , write_to_db_isok # import pandas as pd logger = logging.getLogge...
[ 485, 5263, 222, 485, 2355, 222, 1097, 1377, 3936, 1220, 3395, 2837, 222, 485, 5751, 222, 1097, 2065, 100, 645, 2228, 1220, 4721, 100, 4556, 222, 1097, 1524, 502, 51, 1301, 991, 1220, 6222, 1301, 49, 15592, 5232, 1301, 222, 1097, 1524,...
[ "import", "Ġsys", "Ċ", "import", "Ġos", "Ċ", "from", "Ġconfig", "parser", "Ġimport", "ĠConfig", "Parser", "Ċ", "import", "Ġlogging", "Ċ", "from", "Ġmod", "_", "arg", "parse", "Ġimport", "Ġsetup", "_", "cli", "Ċ", "from", "Ġcheck", "ers", ".", "Index", "F...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 7, 11, 1, 7, 10, 1, 5, 12, 18, 25, 32, 38, 1, 7, 15, 1, 5, 9, 10, 13, 18, 25, 31, 32, 35, 1, 5, 11, 14, 15, 20, 24, 31, 40, 45, 46, 55, 59, 64, 1, 5, 11, 14, 21, 28, 29, 34, 1, 5, 15, 22, 28, 29, 31, 32,...
069338b188f3cf16357b2502cbb3130b69918bd9
from .cli import cli if __name__ == "__main__": exit(cli.main(prog_name="htmap"))
[ 1097, 657, 4556, 1220, 9204, 222, 222, 344, 1176, 444, 523, 630, 9609, 1850, 18021, 303, 4338, 45, 4556, 51, 1850, 45, 15436, 100, 444, 366, 403, 1130, 2152, 222 ]
[ "from", "Ġ.", "cli", "Ġimport", "Ġcli", "Ċ", "Ċ", "if", "Ġ__", "name", "__", "Ġ==", "Ġ\"__", "main", "__\":", "ĊĠĠĠ", "Ġexit", "(", "cli", ".", "main", "(", "prog", "_", "name", "=\"", "ht", "map", "\"))", "Ċ" ]
[ 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, 4, 4, 4, 4, 4 ]
[ 1, 5, 7, 10, 17, 21, 1, 1, 3, 6, 10, 12, 15, 19, 23, 27, 4, 9, 10, 13, 14, 18, 19, 23, 24, 28, 30, 32, 35, 38 ]
8c539dbbb762717393b9a71ddca8eb3872890854
import re import os import pandas as pd instruments_file = os.path.abspath("instruments.csv") input_names_file = os.path.abspath("names.txt") output_names_file = os.path.abspath("names.csv") inst_name_file = os.path.abspath("name_instrument.csv") reg_ex = "; |, |\\*|\n" name_header = ["first_name", "last_name"] def ...
[ 485, 334, 222, 485, 2355, 222, 485, 13247, 641, 6451, 222, 222, 17967, 120, 100, 781, 299, 2355, 51, 1005, 51, 21424, 459, 17967, 120, 51, 4849, 678, 222, 1151, 100, 4288, 100, 781, 299, 2355, 51, 1005, 51, 21424, 459, 4288, 51, 2...
[ "import", "Ġre", "Ċ", "import", "Ġos", "Ċ", "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "Ċ", "instrument", "s", "_", "file", "Ġ=", "Ġos", ".", "path", ".", "abspath", "(\"", "instrument", "s", ".", "csv", "\")", "Ċ", "input", "_", "names", "_", "file", ...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8...
[ 1, 7, 10, 1, 7, 10, 1, 7, 14, 17, 20, 1, 1, 11, 12, 13, 17, 19, 22, 23, 27, 28, 35, 37, 47, 48, 49, 52, 54, 1, 6, 7, 12, 13, 17, 19, 22, 23, 27, 28, 35, 37, 42, 43, 46, 48, 1, 7, 8, 13, 14, 18, 20, 23, 24, ...
0db0daf9bea254cffaec1280cd13b2d70368cd94
import numpy.random as rnd import numpy as np B = 100000 N1 = 50 N2 = 50 p1mle = 0.3 p2mle = 0.4 taumle = p2mle - p1mle estimate = [] for i in range(B): p1 = 0.0 for j in range(N1): if rnd.uniform(0, 1) < p1mle: p1 += 1 p1 /= N1 p2 = 0.0 for j in range(N2): if rnd.u...
[ 485, 6610, 51, 3917, 641, 30712, 222, 485, 6610, 641, 2115, 222, 222, 71, 299, 244, 54, 53, 53, 53, 53, 53, 222, 83, 54, 299, 244, 58, 53, 222, 83, 55, 299, 244, 58, 53, 222, 222, 117, 54, 114, 293, 299, 244, 53, 51, 56, 2...
[ "import", "Ġnumpy", ".", "random", "Ġas", "Ġrnd", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "Ċ", "B", "Ġ=", "Ġ", "1", "0", "0", "0", "0", "0", "Ċ", "N", "1", "Ġ=", "Ġ", "5", "0", "Ċ", "N", "2", "Ġ=", "Ġ", "5", "0", "Ċ", "Ċ", "p", "1", ...
[ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10...
[ 1, 7, 13, 14, 20, 23, 27, 1, 7, 13, 16, 19, 1, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 5, 6, 7, 8, 1, 2, 3, 5, 6, 7, 8, 1, 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 1, 3, ...
a90b7e44cc54d4f96a13e5e6e2d15b632d3c4983
import random import string import steembase import struct import steem from time import sleep from time import time from steem.transactionbuilder import TransactionBuilder from steembase import operations from steembase.transactions import SignedTransaction from resultthread import MyThread from charm.toolbox.pairingg...
[ 485, 4051, 222, 485, 821, 222, 485, 14683, 423, 1460, 222, 485, 1689, 222, 485, 14683, 423, 222, 1097, 1153, 1220, 9375, 222, 1097, 1153, 1220, 1153, 222, 1097, 14683, 423, 51, 6561, 4179, 1220, 11726, 1812, 222, 1097, 14683, 423, 146...
[ "import", "Ġrandom", "Ċ", "import", "Ġstring", "Ċ", "import", "Ġste", "em", "base", "Ċ", "import", "Ġstruct", "Ċ", "import", "Ġste", "em", "Ċ", "from", "Ġtime", "Ġimport", "Ġsleep", "Ċ", "from", "Ġtime", "Ġimport", "Ġtime", "Ċ", "from", "Ġste", "em", "."...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 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, 1...
[ 1, 7, 14, 1, 7, 14, 1, 7, 11, 13, 17, 1, 7, 14, 1, 7, 11, 13, 1, 5, 10, 17, 23, 1, 5, 10, 17, 22, 1, 5, 9, 11, 12, 23, 30, 37, 49, 56, 1, 5, 9, 11, 15, 22, 33, 1, 5, 9, 11, 15, 16, 28, 35, 42, 53, 1, 5, ...
ee80169afd4741854eff8619822a857bbf757575
""" Created on 27 Mar 2015 @author: Jon """ import matplotlib.pyplot as plt from numerical_functions import Timer import numerical_functions.numba_funcs.indexing as indexing import numpy as np import unittest class Test(unittest.TestCase): def test_take(self): x = np.linspace(0, 100) idx = np.ra...
[ 3012, 222, 6880, 563, 244, 55, 60, 8369, 244, 55, 53, 54, 58, 222, 222, 69, 2133, 63, 34818, 222, 3012, 222, 222, 485, 13168, 51, 18553, 641, 6020, 222, 1097, 26702, 100, 8259, 1220, 16327, 222, 485, 26702, 100, 8259, 51, 1538, 26...
[ "\"\"\"", "Ċ", "Created", "Ġon", "Ġ", "2", "7", "ĠMar", "Ġ", "2", "0", "1", "5", "Ċ", "Ċ", "@", "author", ":", "ĠJon", "Ċ", "\"\"\"", "Ċ", "Ċ", "import", "Ġmatplotlib", ".", "pyplot", "Ġas", "Ġplt", "Ċ", "from", "Ġnumerical", "_", "functions", "Ġim...
[ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 13, 14, 1...
[ 1, 4, 1, 8, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 1, 1, 2, 8, 9, 13, 1, 4, 1, 1, 7, 18, 19, 25, 28, 32, 1, 5, 15, 16, 25, 32, 38, 1, 7, 17, 18, 27, 28, 31, 33, 34, 39, 40, 48, 51, 60, 1, 7, 13, 16, 19, ...
ce6dba2f682b091249f3bbf362bead4b95fee1f4
""" .. currentmodule:: jotting .. automodule:: jotting.book :members: .. automodule:: jotting.to :members: .. automodule:: jotting.read :members: .. automodule:: jotting.style :members: """ from .book import book from . import style, to, read, dist
[ 3012, 222, 516, 1565, 1663, 422, 614, 385, 1073, 222, 222, 516, 36883, 422, 614, 385, 1073, 51, 2629, 303, 518, 7918, 63, 222, 222, 516, 36883, 422, 614, 385, 1073, 51, 471, 303, 518, 7918, 63, 222, 222, 516, 36883, 422, 614, 385,...
[ "\"\"\"", "Ċ", "..", "Ġcurrent", "module", "::", "Ġj", "ot", "ting", "Ċ", "Ċ", "..", "Ġautomodule", "::", "Ġj", "ot", "ting", ".", "book", "ĊĠĠĠ", "Ġ:", "members", ":", "Ċ", "Ċ", "..", "Ġautomodule", "::", "Ġj", "ot", "ting", ".", "to", "ĊĠĠĠ", "Ġ:...
[ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 13, 13, 13, 13, 13, 13, 1...
[ 1, 4, 1, 3, 11, 17, 19, 21, 23, 27, 1, 1, 3, 14, 16, 18, 20, 24, 25, 29, 4, 6, 13, 14, 1, 1, 3, 14, 16, 18, 20, 24, 25, 27, 4, 6, 13, 14, 1, 1, 3, 14, 16, 18, 20, 24, 25, 29, 4, 6, 13, 14, 1, 1, 3, 14, 16...
bf8bbeb408cb75af314ef9f3907456036e731c0b
def solution(S): # write your code in Python 3.6 # Definitions log_sep = "," num_sep = "-" time_sep = ":" # Initialization from collections import defaultdict # defaultdict initialize missing key to default value -> 0 bill = defaultdict(int) total = defaultdict(int) calls = ...
[ 610, 5319, 45, 88, 731, 303, 607, 2886, 1390, 1361, 347, 5006, 244, 56, 51, 59, 303, 607, 33613, 303, 1264, 100, 12706, 299, 17708, 303, 1952, 100, 12706, 299, 20897, 303, 1153, 100, 12706, 299, 17903, 303, 607, 33208, 303, 664, 137...
[ "def", "Ġsolution", "(", "S", "):", "ĊĠĠĠ", "Ġ#", "Ġwrite", "Ġyour", "Ġcode", "Ġin", "ĠPython", "Ġ", "3", ".", "6", "ĊĠĠĠ", "Ġ#", "ĠDefinitions", "ĊĠĠĠ", "Ġlog", "_", "sep", "Ġ=", "Ġ\",\"", "ĊĠĠĠ", "Ġnum", "_", "sep", "Ġ=", "Ġ\"-\"", "ĊĠĠĠ", "Ġtime", ...
[ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11...
[ 1, 4, 13, 14, 15, 17, 4, 6, 12, 17, 22, 25, 32, 33, 34, 35, 36, 4, 6, 18, 4, 8, 9, 12, 14, 18, 4, 8, 9, 12, 14, 18, 4, 9, 10, 13, 15, 19, 4, 6, 21, 4, 9, 21, 28, 40, 4, 6, 18, 29, 37, 41, 44, 52, 58, 61, ...
35ae9c86594b50bbe4a67d2cc6b20efc6f6fdc64
# 配置我们文件所在目录的搜寻环境 import os, sys # 第一步先拿到当前文件的路径 file_path = os.path.abspath(__file__) # 第二步 根据这个路径去拿到这个文件所在目录的路径 dir_path = os.path.dirname(file_path) # 第三步:讲这个目录的路径添加到我们的搜寻环境当中 sys.path.append(dir_path) # 第四步,动态设置我们的setting文件 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gulishop.settings") # 第五步,让设置好的环境初始化生效 imp...
[ 40, 34638, 8528, 6162, 44351, 15533, 1096, 15824, 274, 3022, 157, 20588, 222, 485, 2355, 49, 5263, 222, 222, 40, 244, 26590, 12110, 11535, 43298, 4329, 12380, 42321, 15902, 222, 781, 100, 1005, 299, 2355, 51, 1005, 51, 21424, 4077, 781,...
[ "#", "Ġéħįç½®", "æĪij们", "æĸĩä»¶", "æīĢåľ¨", "缮å½ķ", "çļĦ", "æIJ", "ľ", "å¯", "»", "çݯå¢ĥ", "Ċ", "import", "Ġos", ",", "Ġsys", "Ċ", "Ċ", "#", "Ġ", "第ä¸Ģ", "æŃ¥", "åħĪ", "æĭ¿", "åΰ", "å½ĵåīį", "æĸĩä»¶çļĦ", "è·¯å¾Ħ", "Ċ", "file", "_", "path", "Ġ=...
[ 1, 1, 1, 1, 1, 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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7...
[ 1, 2, 5, 7, 9, 11, 13, 14, 14, 15, 15, 16, 18, 1, 7, 10, 11, 15, 1, 1, 2, 3, 5, 6, 7, 8, 9, 11, 14, 16, 1, 5, 6, 10, 12, 15, 16, 20, 21, 28, 31, 35, 38, 1, 2, 3, 5, 6, 9, 11, 13, 14, 15, 16, 18, 20, 22, ...
d34159536e860719094a36cfc30ffb5fcae72a9a
# API End Points by Mitul import urllib.error, urllib.request, urllib.parse import json target = "http://py4e-data.dr-chuck.net/json?" local = input("Enter location: ") url = target + urllib.parse.urlencode({"address": local, "key": 42}) print("Retriving", url) data = urllib.request.urlopen(url).read() print("Retrive...
[ 40, 2347, 4733, 31575, 829, 34361, 357, 222, 485, 22296, 51, 750, 49, 22296, 51, 1375, 49, 22296, 51, 2228, 222, 485, 2379, 222, 222, 2000, 299, 332, 544, 574, 997, 57, 106, 50, 624, 51, 3529, 50, 399, 7206, 51, 1317, 52, 1279, ...
[ "#", "ĠAPI", "ĠEnd", "ĠPoints", "Ġby", "ĠMit", "ul", "Ċ", "import", "Ġurllib", ".", "error", ",", "Ġurllib", ".", "request", ",", "Ġurllib", ".", "parse", "Ċ", "import", "Ġjson", "Ċ", "Ċ", "target", "Ġ=", "Ġ\"", "http", "://", "py", "4", "e", "-", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7...
[ 1, 2, 6, 10, 17, 20, 24, 26, 1, 7, 14, 15, 20, 21, 28, 29, 36, 37, 44, 45, 50, 1, 7, 12, 1, 1, 7, 9, 11, 15, 18, 20, 21, 22, 23, 27, 28, 30, 31, 33, 36, 37, 40, 41, 45, 47, 1, 6, 8, 14, 16, 21, 30, 31, 34, ...
c382b298cce8d7045d6ce8a84f90b3800dba7717
# Generated by Django 3.0.7 on 2020-06-15 15:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("products", "0003_auto_20200615_1225"), ] operations = [ migrations.AlterField( model_name="product", name="harmonizac...
[ 40, 13046, 829, 18288, 244, 56, 51, 53, 51, 60, 563, 244, 55, 53, 55, 53, 50, 53, 59, 50, 54, 58, 244, 54, 58, 63, 55, 59, 222, 222, 1097, 8532, 51, 1219, 1220, 12520, 49, 4590, 499, 222, 842, 18572, 45, 19772, 51, 12071, 73...
[ "#", "ĠGenerated", "Ġby", "ĠDjango", "Ġ", "3", ".", "0", ".", "7", "Ġon", "Ġ", "2", "0", "2", "0", "-", "0", "6", "-", "1", "5", "Ġ", "1", "5", ":", "2", "6", "Ċ", "Ċ", "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, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 2, 12, 15, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1, 1, 5, 12, 13, 15, 22, 33, 34, 41, 1, 1, 6, 16, 17, 27, 28, 37, 39, 4, 17, 19, 21, 8, 11, 19...
3372d98ff91d90558a87293d4032820b1662d60b
from django.conf.urls import patterns, url from riskDashboard2 import views urlpatterns = patterns( "", # url(r'getdata', views.vulnData, name='getdata'), url(r"appmanagement", views.appmanagement, name="appmanagement"), url(r"^.*", views.index, name="index"), )
[ 1097, 8532, 51, 2982, 51, 11420, 1220, 15137, 49, 2001, 222, 222, 1097, 19916, 13044, 55, 1220, 11887, 222, 222, 983, 15735, 299, 15137, 45, 303, 4343, 303, 607, 2001, 45, 119, 44, 390, 624, 389, 11887, 51, 30528, 115, 768, 49, 655,...
[ "from", "Ġdjango", ".", "conf", ".", "urls", "Ġimport", "Ġpatterns", ",", "Ġurl", "Ċ", "Ċ", "from", "Ġrisk", "Dashboard", "2", "Ġimport", "Ġviews", "Ċ", "Ċ", "url", "patterns", "Ġ=", "Ġpatterns", "(", "ĊĠĠĠ", "Ġ\"\",", "ĊĠĠĠ", "Ġ#", "Ġurl", "(", "r", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 5, 12, 13, 17, 18, 22, 29, 38, 39, 43, 1, 1, 5, 10, 19, 20, 27, 33, 1, 1, 4, 12, 14, 23, 24, 4, 8, 4, 6, 10, 11, 12, 13, 16, 20, 22, 28, 29, 32, 33, 37, 38, 43, 45, 48, 52, 55, 4, 8, 9, 10, 11, 14, 24, 2...
0465e33d65c2ce47ebffeec38db6908826bf4934
people = 20 cats = 30 dogs = 15 if people < cats: print("Too many cats") elif people > cats: print("Not many cats") else: print("we cannnot decide")
[ 16677, 299, 244, 55, 53, 222, 24578, 299, 244, 56, 53, 222, 14717, 120, 299, 244, 54, 58, 222, 222, 344, 7049, 350, 33243, 63, 303, 1489, 459, 20564, 5110, 33243, 678, 222, 12168, 7049, 868, 33243, 63, 303, 1489, 459, 1355, 5110, ...
[ "people", "Ġ=", "Ġ", "2", "0", "Ċ", "cats", "Ġ=", "Ġ", "3", "0", "Ċ", "dog", "s", "Ġ=", "Ġ", "1", "5", "Ċ", "Ċ", "if", "Ġpeople", "Ġ<", "Ġcats", ":", "ĊĠĠĠ", "Ġprint", "(\"", "Too", "Ġmany", "Ġcats", "\")", "Ċ", "elif", "Ġpeople", "Ġ>", "Ġcats"...
[ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 ]
[ 1, 7, 9, 10, 11, 12, 1, 5, 7, 8, 9, 10, 1, 4, 5, 7, 8, 9, 10, 1, 1, 3, 10, 12, 17, 18, 4, 10, 12, 15, 20, 25, 27, 1, 5, 12, 14, 19, 20, 4, 10, 12, 15, 20, 25, 27, 1, 5, 6, 4, 10, 12, 14, 18, 19, 22, 29, ...
5ddfeb49c16a7452c99126f1a837f3c0bed0ec10
import requests from urllib.parse import urlparse from bs4 import BeautifulSoup import re import datetime import random pages = set() # Retrieve a list of all Internal links foound on a page. def getInternalLinks(bs, includeUrl): includeUrl = f"{urlparse(includeUrl).scheme}://{urlparse(includeUrl).netloc}" i...
[ 485, 5188, 222, 1097, 22296, 51, 2228, 1220, 2001, 2228, 222, 1097, 14270, 57, 1220, 39693, 222, 485, 334, 222, 485, 7181, 222, 485, 4051, 222, 222, 5660, 299, 758, 365, 499, 222, 40, 19814, 331, 1168, 451, 1187, 11540, 7343, 9229, ...
[ "import", "Ġrequests", "Ċ", "from", "Ġurllib", ".", "parse", "Ġimport", "Ġurl", "parse", "Ċ", "from", "Ġbs", "4", "Ġimport", "ĠBeautifulSoup", "Ċ", "import", "Ġre", "Ċ", "import", "Ġdatetime", "Ċ", "import", "Ġrandom", "Ċ", "Ċ", "pages", "Ġ=", "Ġset", "()"...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 8, 8, 8, 8, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, ...
[ 1, 7, 16, 1, 5, 12, 13, 18, 25, 29, 34, 1, 5, 8, 9, 16, 30, 1, 7, 10, 1, 7, 16, 1, 7, 14, 1, 1, 6, 8, 12, 14, 1, 1, 2, 11, 13, 18, 21, 25, 34, 40, 44, 47, 50, 52, 57, 58, 1, 4, 8, 16, 21, 22, 24, 25, 33, ...
1e1f918ba24f5a5f13b9b01289ebfda65bae572d
def warshall_floyd(N): INF = 10**20 path = [[INF for _ in range(N + 1)] for _ in range(N + 1)] graph = get_graph() for i in range(N + 1): path[i][i] = 0 for g in graph: x = g[0] y = g[1] l = g[2] path[x][y] = path[y][x] = l for start in range(N + 1): ...
[ 610, 18535, 8958, 100, 107, 3934, 105, 45, 83, 731, 303, 47199, 299, 244, 54, 53, 345, 55, 53, 303, 1536, 299, 3834, 10189, 456, 634, 347, 2189, 45, 83, 494, 244, 54, 2201, 456, 634, 347, 2189, 45, 83, 494, 244, 54, 2201, 303, ...
[ "def", "Ġwar", "shall", "_", "f", "loy", "d", "(", "N", "):", "ĊĠĠĠ", "ĠINF", "Ġ=", "Ġ", "1", "0", "**", "2", "0", "ĊĠĠĠ", "Ġpath", "Ġ=", "Ġ[[", "INF", "Ġfor", "Ġ_", "Ġin", "Ġrange", "(", "N", "Ġ+", "Ġ", "1", ")]", "Ġfor", "Ġ_", "Ġin", "Ġrang...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6...
[ 1, 4, 8, 13, 14, 15, 18, 19, 20, 21, 23, 4, 8, 10, 11, 12, 13, 15, 16, 17, 4, 9, 11, 14, 17, 21, 23, 26, 32, 33, 34, 36, 37, 38, 40, 44, 46, 49, 55, 56, 57, 59, 60, 61, 63, 4, 10, 12, 16, 17, 22, 24, 4, 8, 10...
04538cc5c9c68582cc9aa2959faae2d7547ab2ee
try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import data_helpers def write_to_file(file, line): file.write(line + "\n") def cat_map(): catmap = {} id = 1 f = open("cat") cat = set([s.strip() for s in list(f.readlines())]) for i in ca...
[ 1287, 63, 303, 1220, 5604, 51, 48659, 51, 104, 1325, 3371, 641, 20520, 222, 7364, 29994, 63, 303, 1220, 5604, 51, 48659, 51, 1325, 3371, 641, 20520, 222, 485, 727, 100, 8789, 499, 222, 610, 2886, 100, 471, 100, 781, 45, 781, 49, 1...
[ "try", ":", "ĊĠĠĠ", "Ġimport", "Ġxml", ".", "etree", ".", "c", "Element", "Tree", "Ġas", "ĠET", "Ċ", "except", "ĠImportError", ":", "ĊĠĠĠ", "Ġimport", "Ġxml", ".", "etree", ".", "Element", "Tree", "Ġas", "ĠET", "Ċ", "import", "Ġdata", "_", "helpers", "...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 12, 12, 12, 12, 12, ...
[ 1, 4, 5, 4, 11, 15, 16, 21, 22, 23, 30, 34, 37, 40, 1, 7, 19, 20, 4, 11, 15, 16, 21, 22, 29, 33, 36, 39, 1, 7, 12, 13, 20, 1, 1, 4, 10, 11, 13, 14, 18, 19, 23, 24, 29, 31, 4, 9, 10, 15, 16, 20, 22, 25, 26, ...
631323e79f4fb32611d7094af92cff8f923fa996
#!/bin/python3 def word_ladder(start_word, end_word, dictionary_file="words5.dict"): """ Returns a list satisfying the following properties: 1. the first element is `start_word` 2. the last element is `end_word` 3. elements at index i and i+1 are `_adjacent` 4. all elements are entries in the...
[ 8758, 1793, 52, 2980, 56, 499, 222, 610, 3619, 100, 20233, 512, 45, 1384, 100, 1131, 49, 962, 100, 1131, 49, 9575, 100, 781, 366, 4094, 58, 51, 2734, 10320, 303, 1547, 303, 3777, 331, 1168, 14712, 20478, 341, 2434, 4324, 63, 8060, ...
[ "#!/", "bin", "/", "python", "3", "ĊĊ", "Ċ", "def", "Ġword", "_", "lad", "der", "(", "start", "_", "word", ",", "Ġend", "_", "word", ",", "Ġdictionary", "_", "file", "=\"", "words", "5", ".", "dict", "\"):", "ĊĠĠĠ", "Ġ\"\"\"", "ĊĠĠĠ", "ĠReturns", "...
[ 1, 1, 1, 1, 1, 1, 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, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9...
[ 1, 4, 7, 8, 14, 15, 1, 1, 4, 9, 10, 13, 16, 17, 22, 23, 27, 28, 32, 33, 37, 38, 49, 50, 54, 56, 61, 62, 63, 67, 70, 4, 8, 4, 12, 14, 19, 26, 30, 34, 44, 55, 56, 5, 6, 7, 11, 17, 25, 28, 30, 35, 36, 40, 41, ...
0a528fb7fe4a318af8bd3111e8d67f6af6bd7416
from typing import Tuple class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lcaDeepestLeaves(self, root: TreeNode) -> TreeNode: _, lca = self.get_lca(root, 0) return lca def get_lca(self, node: TreeNode, dep...
[ 1097, 12018, 1220, 11724, 499, 222, 842, 21390, 63, 303, 684, 1176, 1683, 3232, 803, 49, 837, 731, 310, 649, 51, 718, 299, 837, 310, 649, 51, 1892, 299, 1686, 310, 649, 51, 1009, 299, 1686, 499, 222, 842, 12219, 63, 303, 684, 475,...
[ "from", "Ġtyping", "Ġimport", "ĠTuple", "ĊĊ", "Ċ", "class", "ĠTreeNode", ":", "ĊĠĠĠ", "Ġdef", "Ġ__", "init", "__(", "self", ",", "Ġx", "):", "ĊĠĠĠĠĠĠĠ", "Ġself", ".", "val", "Ġ=", "Ġx", "ĊĠĠĠĠĠĠĠ", "Ġself", ".", "left", "Ġ=", "ĠNone", "ĊĠĠĠĠĠĠĠ", "Ġself"...
[ 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, ...
[ 1, 5, 12, 19, 25, 1, 1, 6, 15, 16, 4, 8, 11, 15, 18, 22, 23, 25, 27, 8, 13, 14, 17, 19, 21, 8, 13, 14, 18, 20, 25, 8, 13, 14, 19, 21, 26, 1, 1, 6, 15, 16, 4, 8, 10, 12, 15, 17, 19, 21, 25, 26, 30, 31, 36, 3...
371762a6e3f8b8ed14742a70a709da224ae6712b
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random """ 检查图数据和结构或者链表数据结构中是否存在环 https://www.youtube.com/watch?v=YKE4Vd1ysPI """ def get_all_edge(graph): result = [] for k, v in graph.items(): for i in v: if sorted((k, i)) not in result: result.append(sorted((k, ...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 56, 222, 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 222, 485, 4051, 222, 222, 3012, 222, 26093, 7071, 4857, 4496, 20409, 16269, 37032, 4857, 20409, 3011, 9271, 13326, 13925, 222, 222, 662, 574,...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "3", "Ċ", "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "import", "Ġrandom", "Ċ", "Ċ", "\"\"\"", "Ċ", "æ£ĢæŁ¥", "åĽ¾", "æķ°æį®", "åĴĮ", "ç»ĵæŀĦ", "æĪĸèĢħ", "éĵ¾è¡¨", "æķ°æį®", "ç»ĵæŀ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 7, 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, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 11, ...
[ 1, 4, 7, 8, 11, 12, 15, 22, 23, 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 1, 7, 14, 1, 1, 4, 1, 3, 4, 6, 7, 9, 11, 13, 15, 17, 18, 20, 22, 23, 1, 1, 6, 9, 12, 13, 20, 21, 24, 25, 30, 31, 32, 33, 34, 36, 37, 39,...
7f7ebc6d3d69fbb19071c63a9ab235ad01f1d414
import sys sys.path.append("..") import helpers helpers.mask_busy_gpus(wait=False) import nltk import numpy as np nltk.download("brown") nltk.download("universal_tagset") data = nltk.corpus.brown.tagged_sents(tagset="universal") all_tags = ["#EOS#", "#UNK#", "ADV", "NOUN", "ADP", "PRON", "DET", ".", "PRT", "VERB"...
[ 485, 5263, 222, 222, 3750, 51, 1005, 51, 1713, 459, 516, 678, 222, 485, 18567, 222, 222, 8789, 51, 3988, 100, 20197, 100, 6833, 371, 45, 1702, 66, 2737, 46, 499, 222, 485, 48071, 222, 222, 485, 6610, 641, 2115, 222, 222, 115, 3280...
[ "import", "Ġsys", "Ċ", "Ċ", "sys", ".", "path", ".", "append", "(\"", "..", "\")", "Ċ", "import", "Ġhelpers", "Ċ", "Ċ", "helpers", ".", "mask", "_", "busy", "_", "gp", "us", "(", "wait", "=", "False", ")", "ĊĊ", "Ċ", "import", "Ġnltk", "Ċ", "Ċ", ...
[ 1, 1, 1, 2, 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, 8, 9, 9, 9, 10, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,...
[ 1, 7, 11, 1, 1, 4, 5, 9, 10, 16, 18, 20, 22, 1, 7, 15, 1, 1, 8, 9, 13, 14, 18, 19, 21, 23, 24, 28, 29, 34, 35, 1, 1, 7, 12, 1, 1, 7, 13, 16, 19, 1, 1, 2, 5, 6, 14, 16, 21, 23, 1, 2, 5, 6, 14, 16, 25, 26...
8698aedc5c8671f46c73898a7188440254b79bbf
from abc import abstractmethod class Environment: @abstractmethod def __init__(self, agent): pass @abstractmethod def execute_step(self, n=1): pass @abstractmethod def execute_all(self): pass @abstractmethod def set_delay(self, delay): pass
[ 1097, 20701, 1220, 5560, 1978, 499, 222, 842, 10584, 63, 303, 496, 37664, 303, 684, 1176, 1683, 3232, 803, 49, 7725, 731, 310, 3119, 465, 496, 37664, 303, 684, 5755, 100, 3023, 45, 803, 49, 329, 66, 54, 731, 310, 3119, 465, 496, 3...
[ "from", "Ġabc", "Ġimport", "Ġabstract", "method", "ĊĊ", "Ċ", "class", "ĠEnvironment", ":", "ĊĠĠĠ", "Ġ@", "abstractmethod", "ĊĠĠĠ", "Ġdef", "Ġ__", "init", "__(", "self", ",", "Ġagent", "):", "ĊĠĠĠĠĠĠĠ", "Ġpass", "ĊĊĠĠĠ", "Ġ@", "abstractmethod", "ĊĠĠĠ", "Ġdef", ...
[ 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 17, 17, 17...
[ 1, 5, 9, 16, 25, 31, 1, 1, 6, 18, 19, 4, 6, 20, 4, 8, 11, 15, 18, 22, 23, 29, 31, 8, 13, 4, 6, 20, 4, 8, 16, 17, 21, 22, 26, 27, 29, 30, 31, 33, 8, 13, 4, 6, 20, 4, 8, 16, 17, 20, 21, 25, 27, 8, 13, 4, 6,...
1be510e6715d21e814c48fe05496704e9a65d554
from end import Client c = Client()
[ 1097, 962, 1220, 5680, 222, 222, 104, 299, 5680, 365, 222 ]
[ "from", "Ġend", "Ġimport", "ĠClient", "Ċ", "Ċ", "c", "Ġ=", "ĠClient", "()", "Ċ" ]
[ 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3 ]
[ 1, 5, 9, 16, 23, 1, 1, 2, 4, 11, 13 ]
6b727cdfc684db4ba919cd5390fe45de43a806fe
import glob import xarray as xr from model_diagnostics import * data_root = "../data/synthetic/standard/" var_list = ["hs", "dp", "spr", "fp", "dir", "t0m1"] eke = 0.01 ########################## output = [] diagnostic_functions = [basic_stats] for var in var_list: grid_files = glob.glob(data_root + "gridded/*%s*...
[ 485, 12542, 222, 485, 837, 977, 641, 40974, 222, 222, 1097, 1573, 100, 28248, 1220, 338, 222, 222, 624, 100, 2405, 299, 6919, 624, 52, 15301, 18252, 52, 9165, 5694, 222, 887, 100, 687, 299, 3059, 3931, 411, 332, 5994, 411, 332, 2503...
[ "import", "Ġglob", "Ċ", "import", "Ġx", "array", "Ġas", "Ġxr", "Ċ", "Ċ", "from", "Ġmodel", "_", "diagnostics", "Ġimport", "Ġ*", "Ċ", "Ċ", "data", "_", "root", "Ġ=", "Ġ\"../", "data", "/", "synt", "hetic", "/", "standard", "/\"", "Ċ", "var", "_", "lis...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8...
[ 1, 7, 12, 1, 7, 9, 14, 17, 20, 1, 1, 5, 11, 12, 23, 30, 32, 1, 1, 5, 6, 10, 12, 17, 21, 22, 26, 31, 32, 40, 42, 1, 4, 5, 9, 11, 14, 16, 18, 20, 22, 24, 26, 29, 31, 33, 35, 37, 39, 42, 44, 46, 47, 48, 49, 50...
c66f4ee5719f764c8c713c23815302c00b6fb9af
import os from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerError from werkzeug.security import check_password_hash, generate_pa...
[ 485, 2355, 222, 222, 1097, 9122, 58, 53, 1220, 4447, 222, 1097, 18958, 1220, 24033, 49, 14017, 49, 5675, 49, 2922, 100, 2402, 49, 1343, 49, 3541, 222, 1097, 18958, 100, 2867, 1220, 6555, 222, 1097, 29651, 1220, 8670, 105, 1452, 222, ...
[ "import", "Ġos", "Ċ", "Ċ", "from", "Ġcs", "5", "0", "Ġimport", "ĠSQL", "Ċ", "from", "Ġflask", "Ġimport", "ĠFlask", ",", "Ġflash", ",", "Ġredirect", ",", "Ġrender", "_", "template", ",", "Ġrequest", ",", "Ġsession", "Ċ", "from", "Ġflask", "_", "session", ...
[ 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, 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, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8...
[ 1, 7, 10, 1, 1, 5, 8, 9, 10, 17, 21, 1, 5, 11, 18, 24, 25, 31, 32, 41, 42, 49, 50, 58, 59, 67, 68, 76, 1, 5, 11, 12, 19, 26, 34, 1, 5, 14, 21, 24, 25, 29, 1, 5, 9, 10, 14, 15, 25, 32, 40, 41, 51, 52, 57, 66...
097a87f7f1346e5db1599e59680232912348aef7
# -*- coding:utf-8 -*- from odoo import api, models, fields, _ class hrsalaryRule(models.Model): _inherit = "hr.salary.rule" is_tax_fdfp = fields.Boolean("Est un impôt FDFP")
[ 40, 8571, 10633, 63, 3330, 50, 61, 8571, 222, 222, 1097, 13585, 623, 1220, 4142, 49, 4590, 49, 3844, 49, 634, 499, 222, 842, 439, 3685, 298, 692, 3855, 45, 3404, 51, 1262, 731, 303, 634, 6826, 299, 332, 3943, 51, 26196, 51, 5286, ...
[ "#", "Ġ-*-", "Ġcoding", ":", "utf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "from", "Ġod", "oo", "Ġimport", "Ġapi", ",", "Ġmodels", ",", "Ġfields", ",", "Ġ_", "ĊĊ", "Ċ", "class", "Ġh", "rs", "al", "ary", "Rule", "(", "models", ".", "Model", "):", "ĊĠĠĠ", "Ġ_...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9...
[ 1, 2, 6, 13, 14, 17, 18, 19, 23, 1, 1, 5, 8, 10, 17, 21, 22, 29, 30, 37, 38, 40, 1, 1, 6, 8, 10, 12, 15, 19, 20, 26, 27, 32, 34, 4, 6, 13, 15, 17, 19, 20, 26, 27, 31, 32, 4, 7, 8, 11, 12, 15, 16, 18, 25, 26...
a126b1775ffe1ba1aebc288ce17fac8ada0b0756
import cv2 import numpy as np import pandas as pd import tkinter as tk import random from tkinter import * from tkinter import ttk from tkinter import messagebox from tkinter import Scale, Tk from tkinter.ttk import Notebook refPt = [] PtBGR = [] r = [] g = [] b = [] refPt = [] Serial = [] PtBGR = [] r1 = [] r2 = [] r...
[ 485, 6781, 55, 222, 485, 6610, 641, 2115, 222, 485, 13247, 641, 6451, 222, 485, 19488, 1164, 641, 19488, 222, 485, 4051, 222, 1097, 19488, 1164, 1220, 338, 222, 1097, 19488, 1164, 1220, 292, 4708, 222, 1097, 19488, 1164, 1220, 1492, 1...
[ "import", "Ġcv", "2", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "import", "Ġtk", "inter", "Ġas", "Ġtk", "Ċ", "import", "Ġrandom", "Ċ", "from", "Ġtk", "inter", "Ġimport", "Ġ*", "Ċ", "from", "Ġtk", "inter", "Ġimp...
[ 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 1...
[ 1, 7, 10, 11, 1, 7, 13, 16, 19, 1, 7, 14, 17, 20, 1, 7, 10, 15, 18, 21, 1, 7, 14, 1, 5, 8, 13, 20, 22, 1, 5, 8, 13, 20, 22, 24, 1, 5, 8, 13, 20, 28, 31, 1, 5, 8, 13, 20, 26, 27, 30, 1, 5, 8, 13, 14, 16, ...
dca36de5556b120b8b93eac0ad7b971ad735d907
import numpy as np def GradientDescent(f, gradf, x0, epsilon, num_iter, line_search, disp=False, callback=None, **kwargs): x = x0.copy() iteration = 0 opt_arg = {"f": f, "grad_f": gradf} for key in kwargs: opt_arg[key] = kwargs[key] while True: gradient = -gradf(x) alpha = ...
[ 485, 6610, 641, 2115, 499, 222, 610, 32527, 1466, 2488, 45, 107, 49, 8184, 107, 49, 837, 53, 49, 23578, 49, 1952, 100, 1751, 49, 1646, 100, 1925, 49, 24580, 66, 2737, 49, 3325, 66, 2545, 49, 1137, 5350, 731, 303, 837, 299, 837, ...
[ "import", "Ġnumpy", "Ġas", "Ġnp", "ĊĊ", "Ċ", "def", "ĠGradient", "Des", "cent", "(", "f", ",", "Ġgrad", "f", ",", "Ġx", "0", ",", "Ġepsilon", ",", "Ġnum", "_", "iter", ",", "Ġline", "_", "search", ",", "Ġdisp", "=", "False", ",", "Ġcallback", "=", ...
[ 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7...
[ 1, 7, 13, 16, 19, 1, 1, 4, 13, 16, 20, 21, 22, 23, 28, 29, 30, 32, 33, 34, 42, 43, 47, 48, 52, 53, 58, 59, 65, 66, 71, 72, 77, 78, 87, 88, 92, 93, 96, 102, 104, 4, 6, 8, 10, 11, 12, 16, 18, 4, 14, 16, 17, 18, ...
4711adcc7c95993ec13b9d06fa674aa064f79bfd
import torch import torch.nn as nn import torch.nn.functional as F class Net(torch.nn.Module): def __init__(self, layer_sizes=[256, 128, 2], dropout_prob=None, device=None): super(Net, self).__init__() self.device = device if dropout_prob is not None and dropout_prob > 0.5: pr...
[ 485, 5665, 222, 485, 5665, 51, 4042, 641, 8507, 222, 485, 5665, 51, 4042, 51, 18678, 641, 525, 499, 222, 842, 10866, 45, 7808, 51, 4042, 51, 2478, 731, 303, 684, 1176, 1683, 3232, 803, 49, 5458, 100, 15383, 6094, 55, 58, 59, 49, ...
[ "import", "Ġtorch", "Ċ", "import", "Ġtorch", ".", "nn", "Ġas", "Ġnn", "Ċ", "import", "Ġtorch", ".", "nn", ".", "functional", "Ġas", "ĠF", "ĊĊ", "Ċ", "class", "ĠNet", "(", "torch", ".", "nn", ".", "Module", "):", "ĊĠĠĠ", "Ġdef", "Ġ__", "init", "__(", ...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8...
[ 1, 7, 13, 1, 7, 13, 14, 16, 19, 22, 1, 7, 13, 14, 16, 17, 27, 30, 32, 1, 1, 6, 10, 11, 16, 17, 19, 20, 26, 28, 4, 8, 11, 15, 18, 22, 23, 29, 30, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 58, 59,...
3479276d4769518aa60dcd4e1bb41a8a1a7d6517
import os from multiprocessing import Pool import glob import click import logging import pandas as pd from src.resampling.resampling import Resampler # Default paths path_in = "data/hecktor_nii/" path_out = "data/resampled/" path_bb = "data/bbox.csv" @click.command() @click.argument("input_folder", type=click.Pat...
[ 485, 2355, 222, 1097, 43085, 1220, 23143, 222, 485, 12542, 222, 222, 485, 5035, 222, 485, 5751, 222, 485, 13247, 641, 6451, 222, 222, 1097, 1581, 51, 595, 10620, 51, 595, 10620, 1220, 1955, 8503, 222, 222, 40, 4119, 7854, 222, 1005, ...
[ "import", "Ġos", "Ċ", "from", "Ġmultiprocessing", "Ġimport", "ĠPool", "Ċ", "import", "Ġglob", "Ċ", "Ċ", "import", "Ġclick", "Ċ", "import", "Ġlogging", "Ċ", "import", "Ġpandas", "Ġas", "Ġpd", "Ċ", "Ċ", "from", "Ġsrc", ".", "res", "ampling", ".", "res", "a...
[ 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, ...
[ 1, 7, 10, 1, 5, 21, 28, 33, 1, 7, 12, 1, 1, 7, 13, 1, 7, 15, 1, 7, 14, 17, 20, 1, 1, 5, 9, 10, 13, 20, 21, 24, 31, 38, 42, 48, 1, 1, 2, 10, 16, 1, 5, 6, 8, 10, 12, 16, 17, 21, 24, 25, 28, 30, 1, 5, 6, 9...
d5beff74e3746c77cbaf6b8233b822ed1a86701e
# Generated by Django 2.2.2 on 2021-01-23 04:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("task", "0022_taskrecycle_create_date"), ] operations = [ migrations.RemoveField( model_name="ansibleextravars", name="playboo...
[ 40, 13046, 829, 18288, 244, 55, 51, 55, 51, 55, 563, 244, 55, 53, 55, 54, 50, 53, 54, 50, 55, 56, 244, 53, 57, 63, 54, 54, 222, 222, 1097, 8532, 51, 1219, 1220, 12520, 499, 222, 842, 18572, 45, 19772, 51, 12071, 731, 303, 64...
[ "#", "ĠGenerated", "Ġby", "ĠDjango", "Ġ", "2", ".", "2", ".", "2", "Ġon", "Ġ", "2", "0", "2", "1", "-", "0", "1", "-", "2", "3", "Ġ", "0", "4", ":", "1", "1", "Ċ", "Ċ", "from", "Ġdjango", ".", "db", "Ġimport", "Ġmigrations", "ĊĊ", "Ċ", "cla...
[ 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, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 2, 12, 15, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1, 1, 5, 12, 13, 15, 22, 33, 1, 1, 6, 16, 17, 27, 28, 37, 39, 4, 17, 19, 21, 8, 11, 15, 17, 19...
77763f501c6776969d2594f987e5d7ab7d4377fb
import time from PyQt5.QtCore import ( QThread, ) from common import attach_common from database_downloader import DatabaseDownload from ai_list_memorize import MemorizeList from ai_list_morpheme import MorphemeList from ai_list_ngram import NgramList from ai_list_none import NoneList from ai_bot_memorize import Me...
[ 485, 1153, 222, 1097, 48886, 58, 51, 30583, 1220, 327, 303, 1931, 3032, 49, 222, 46, 222, 1097, 4959, 1220, 12390, 100, 2297, 222, 1097, 3520, 100, 47310, 1220, 6728, 7511, 222, 1097, 16968, 100, 687, 100, 1853, 290, 537, 1220, 6388, ...
[ "import", "Ġtime", "Ċ", "from", "ĠPyQt", "5", ".", "QtCore", "Ġimport", "Ġ(", "ĊĠĠĠ", "ĠQ", "Thread", ",", "Ċ", ")", "Ċ", "from", "Ġcommon", "Ġimport", "Ġattach", "_", "common", "Ċ", "from", "Ġdatabase", "_", "downloader", "Ġimport", "ĠDatabase", "Download...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9...
[ 1, 7, 12, 1, 5, 10, 11, 12, 18, 25, 27, 4, 6, 12, 13, 1, 2, 1, 5, 12, 19, 26, 27, 33, 1, 5, 14, 15, 25, 32, 41, 49, 1, 5, 8, 9, 13, 14, 17, 19, 22, 29, 33, 35, 38, 42, 1, 5, 8, 9, 13, 14, 15, 18, 22, 29, ...
d6a760774b45454c959c2932d7b28deee7f81872
# SPDX-License-Identifier: Apache-2.0 # Licensed to the Ed-Fi Alliance under one or more agreements. # The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. # See the LICENSE and NOTICES files in the project root for more information. import json from typing import Dict from pandas import...
[ 40, 18769, 50, 3801, 50, 5551, 63, 3954, 50, 55, 51, 53, 222, 40, 4773, 391, 341, 4910, 50, 13199, 2770, 4352, 1549, 1611, 575, 1851, 15153, 51, 222, 40, 906, 4910, 50, 13199, 2770, 4352, 12815, 477, 822, 391, 863, 1549, 341, 3954...
[ "#", "ĠSPDX", "-", "License", "-", "Identifier", ":", "ĠApache", "-", "2", ".", "0", "Ċ", "#", "ĠLicensed", "Ġto", "Ġthe", "ĠEd", "-", "Fi", "ĠAl", "liance", "Ġunder", "Ġone", "Ġor", "Ġmore", "Ġagreements", ".", "Ċ", "#", "ĠThe", "ĠEd", "-", "Fi", ...
[ 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, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4...
[ 1, 2, 7, 8, 15, 16, 26, 27, 34, 35, 36, 37, 38, 1, 2, 11, 14, 18, 21, 22, 24, 27, 33, 39, 43, 46, 51, 62, 63, 1, 2, 6, 9, 10, 12, 15, 21, 30, 35, 40, 43, 47, 53, 57, 64, 72, 73, 81, 82, 83, 84, 85, 86, 1, 2, ...
bd3b1263d7d657fe2edd3c7198f63821a3d1d1e5
import random from . import WaiterInterface class RandomIPv4Waiter(WaiterInterface): """ HostPortWaiter which generates random ipv4 adresses """ def __init__(self, options): self.ports = options["ports"] self.limit_generate = options.get("limit_generate", -1) def generator(self)...
[ 485, 4051, 222, 222, 1097, 657, 1220, 11985, 284, 3058, 499, 222, 842, 9607, 21693, 57, 6494, 284, 45, 6494, 284, 3058, 731, 303, 1547, 303, 11219, 3451, 6494, 284, 1532, 18073, 4051, 24651, 57, 1564, 6079, 303, 1547, 465, 684, 1176, ...
[ "import", "Ġrandom", "Ċ", "Ċ", "from", "Ġ.", "Ġimport", "ĠWait", "er", "Interface", "ĊĊ", "Ċ", "class", "ĠRandom", "IPv", "4", "Wait", "er", "(", "Wait", "er", "Interface", "):", "ĊĠĠĠ", "Ġ\"\"\"", "ĊĠĠĠ", "ĠHost", "Port", "Wait", "er", "Ġwhich", "Ġgener...
[ 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13...
[ 1, 7, 14, 1, 1, 5, 7, 14, 19, 21, 30, 1, 1, 6, 13, 16, 17, 21, 23, 24, 28, 30, 39, 41, 4, 8, 4, 9, 13, 17, 19, 25, 35, 42, 46, 47, 50, 56, 4, 8, 4, 8, 11, 15, 18, 22, 23, 31, 33, 8, 13, 14, 19, 21, 29, 31, ...
d2c31d9c3cc66b43966cfd852582539d4e4bea17
from selenium import webdriver import time import datetime import os import openpyxl as vb from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.action_chains import ActionChains def deconnexion(Chrome): """登陆""" """初始化""" global web, actions web = webdriver.Chrome(C...
[ 1097, 35822, 1220, 48594, 222, 485, 1153, 222, 485, 7181, 222, 485, 2355, 222, 485, 2177, 7547, 113, 641, 22354, 222, 1097, 35822, 51, 35345, 51, 3608, 51, 1702, 1220, 43262, 6494, 222, 1097, 35822, 51, 35345, 51, 2297, 51, 1160, 100,...
[ "from", "Ġselenium", "Ġimport", "Ġwebdriver", "Ċ", "import", "Ġtime", "Ċ", "import", "Ġdatetime", "Ċ", "import", "Ġos", "Ċ", "import", "Ġopen", "pyx", "l", "Ġas", "Ġvb", "Ċ", "from", "Ġselenium", ".", "webdriver", ".", "support", ".", "wait", "Ġimport", "Ġ...
[ 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, ...
[ 1, 5, 14, 21, 31, 1, 7, 12, 1, 7, 16, 1, 7, 10, 1, 7, 12, 15, 16, 19, 22, 1, 5, 14, 15, 24, 25, 32, 33, 37, 44, 54, 58, 1, 5, 14, 15, 24, 25, 31, 32, 38, 39, 45, 52, 59, 61, 65, 1, 1, 4, 7, 16, 17, 23, 25, ...
213ab22a269abc8180524462a8966e5d929ef7d1
import os import json import codecs import markdown from flask import current_app def get_json_file(filename, lang="en"): """ Get the contents of a JSON file. """ filepath = os.path.join(current_app.config["APP_PATH"], "data", filename) with open(filepath, "r") as f: return json.loads(...
[ 485, 2355, 222, 485, 2379, 222, 485, 45919, 222, 222, 485, 16322, 222, 222, 1097, 18958, 1220, 1565, 100, 745, 499, 222, 610, 640, 100, 1279, 100, 781, 45, 3633, 49, 7285, 366, 291, 10320, 303, 1547, 303, 1408, 341, 7321, 451, 331, ...
[ "import", "Ġos", "Ċ", "import", "Ġjson", "Ċ", "import", "Ġcodecs", "Ċ", "Ċ", "import", "Ġmarkdown", "Ċ", "Ċ", "from", "Ġflask", "Ġimport", "Ġcurrent", "_", "app", "ĊĊ", "Ċ", "def", "Ġget", "_", "json", "_", "file", "(", "filename", ",", "Ġlang", "=\"",...
[ 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15...
[ 1, 7, 10, 1, 7, 12, 1, 7, 14, 1, 1, 7, 16, 1, 1, 5, 11, 18, 26, 27, 30, 1, 1, 4, 8, 9, 13, 14, 18, 19, 27, 28, 33, 35, 37, 40, 4, 8, 4, 8, 12, 21, 24, 26, 31, 36, 37, 4, 8, 4, 13, 15, 18, 19, 23, 24, 28, ...
398263b65fd98003f27020e46ae38e913dc5dd45
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Brice Chou" import os import lib import sys import time import getopt import training try: import cv2 import h5py except Exception as e: error_info = "Please install h5py/cv2 tools first. Error: {}.\n".format(e) print("\033[0;31m%s\033[0m" ...
[ 8758, 3392, 52, 1793, 52, 2141, 4406, 56, 222, 40, 8571, 10633, 63, 6471, 50, 61, 8571, 222, 222, 523, 2133, 523, 299, 332, 4364, 584, 1902, 663, 39, 222, 222, 485, 2355, 222, 485, 5053, 222, 485, 5263, 222, 485, 1153, 222, 485, ...
[ "#!/", "usr", "/", "bin", "/", "env", "Ġpython", "3", "Ċ", "#", "Ġ-*-", "Ġcoding", ":", "Ġutf", "-", "8", "Ġ-*-", "Ċ", "Ċ", "__", "author", "__", "Ġ=", "Ġ\"", "Br", "ice", "ĠCh", "ou", "\"", "Ċ", "Ċ", "import", "Ġos", "Ċ", "import", "Ġlib", "Ċ"...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, ...
[ 1, 4, 7, 8, 11, 12, 15, 22, 23, 1, 2, 6, 13, 14, 18, 19, 20, 24, 1, 1, 3, 9, 11, 13, 15, 17, 20, 23, 25, 26, 1, 1, 7, 10, 1, 7, 11, 1, 7, 11, 1, 7, 12, 1, 7, 11, 14, 1, 7, 16, 1, 1, 4, 5, 4, 11, 14, 15,...
86ca94820c05b3f63f4a733b6d1fa7eb9dea6a5d
# generated from catkin/cmake/template/order_packages.context.py.in source_root_dir = "/home/songsong/image_transport_ws/src" whitelisted_packages = "".split(";") if "" != "" else [] blacklisted_packages = "".split(";") if "" != "" else [] underlay_workspaces = ( "/home/songsong/image_transport_ws/devel;/home/songs...
[ 40, 4741, 664, 10558, 10503, 52, 14130, 52, 2402, 52, 1191, 100, 5051, 51, 1834, 51, 997, 51, 285, 222, 1876, 100, 2405, 100, 1537, 299, 2450, 2849, 52, 34899, 805, 52, 915, 100, 9618, 100, 3624, 52, 1634, 39, 222, 1373, 38114, 10...
[ "#", "Ġgenerated", "Ġfrom", "Ġcat", "kin", "/", "cmake", "/", "template", "/", "order", "_", "packages", ".", "context", ".", "py", ".", "in", "Ċ", "source", "_", "root", "_", "dir", "Ġ=", "Ġ\"/", "home", "/", "songs", "ong", "/", "image", "_", "tr...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4...
[ 1, 2, 12, 17, 21, 24, 25, 30, 31, 39, 40, 45, 46, 54, 55, 62, 63, 65, 66, 68, 1, 7, 8, 12, 13, 16, 18, 21, 25, 26, 31, 34, 35, 40, 41, 50, 51, 53, 54, 57, 58, 1, 3, 12, 13, 21, 23, 27, 32, 35, 37, 40, 43, 46, ...
1f27b697985c7417e6d8d978703175a415c6c57d
import math r = float(input()) p = int(input()) obim = 2 * r * math.pi ukupanPut = p * obim # centimetre pretvaramo u metre ukupanPut = ukupanPut * 0.01 print("%.2f" % ukupanPut)
[ 485, 7820, 222, 222, 119, 299, 1916, 45, 1151, 1177, 222, 117, 299, 648, 45, 1151, 1177, 222, 926, 468, 299, 244, 55, 338, 559, 338, 7820, 51, 1314, 222, 3434, 436, 297, 9278, 299, 317, 338, 1541, 468, 222, 40, 9380, 531, 5325, ...
[ "import", "Ġmath", "Ċ", "Ċ", "r", "Ġ=", "Ġfloat", "(", "input", "())", "Ċ", "p", "Ġ=", "Ġint", "(", "input", "())", "Ċ", "ob", "im", "Ġ=", "Ġ", "2", "Ġ*", "Ġr", "Ġ*", "Ġmath", ".", "pi", "Ċ", "uk", "up", "an", "Put", "Ġ=", "Ġp", "Ġ*", "Ġob", ...
[ 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 7, 12, 1, 1, 2, 4, 10, 11, 16, 19, 1, 2, 4, 8, 9, 14, 17, 1, 3, 5, 7, 8, 9, 11, 13, 15, 20, 21, 23, 1, 3, 5, 7, 10, 12, 14, 16, 19, 21, 1, 2, 7, 10, 13, 18, 21, 24, 26, 30, 32, 1, 3, 5, 7, 10, 12, 15...
71a9c9b8f47dcfbecc154c44d5a72ddbd852145a
def randomizer(n, garrafa_vidro, lata_metal, copo_plastico, bola_papel, maça_organico): lixos = [garrafa_vidro, lata_metal, copo_plastico, bola_papel, maça_organico] return lixos[n]
[ 610, 4051, 2292, 45, 115, 49, 504, 865, 24082, 100, 3866, 309, 49, 475, 420, 100, 23188, 49, 6175, 116, 100, 576, 652, 5701, 49, 342, 14042, 100, 37491, 361, 49, 13016, 18400, 100, 11696, 5701, 731, 303, 1045, 125, 519, 299, 447, ...
[ "def", "Ġrandom", "izer", "(", "n", ",", "Ġg", "arr", "afa", "_", "vid", "ro", ",", "Ġl", "ata", "_", "metal", ",", "Ġcop", "o", "_", "pl", "ast", "ico", ",", "Ġb", "ola", "_", "pap", "el", ",", "Ġma", "ça", "_", "organ", "ico", "):", "ĊĠĠĠ"...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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, 11, 15, 16, 17, 18, 20, 23, 26, 27, 30, 32, 33, 35, 38, 39, 44, 45, 49, 50, 51, 53, 56, 59, 60, 62, 65, 66, 69, 71, 72, 75, 77, 78, 83, 86, 88, 4, 7, 8, 10, 12, 14, 15, 18, 21, 22, 25, 27, 28, 30, 33, 34,...
02e711dfc122007c74949cd9f86e2aeb9d334871
import numpy as np class Adaline: def __init__(self, eta=0.0001, n_iter=2000): self.eta = eta self.n_iter = n_iter self.error = [] def fit(self, X, Y): X = np.hstack((np.ones((X.shape[0], 1)), X)) self.w = np.random.uniform(-1, 1, (X.shape[1], 1)) for n in rang...
[ 485, 6610, 641, 2115, 499, 222, 842, 3604, 298, 501, 63, 303, 684, 1176, 1683, 3232, 803, 49, 30992, 66, 53, 51, 53, 53, 53, 54, 49, 329, 100, 1751, 66, 55, 53, 53, 53, 731, 310, 649, 51, 2303, 299, 30992, 310, 649, 51, 115, ...
[ "import", "Ġnumpy", "Ġas", "Ġnp", "ĊĊ", "Ċ", "class", "ĠAd", "al", "ine", ":", "ĊĠĠĠ", "Ġdef", "Ġ__", "init", "__(", "self", ",", "Ġeta", "=", "0", ".", "0", "0", "0", "1", ",", "Ġn", "_", "iter", "=", "2", "0", "0", "0", "):", "ĊĠĠĠĠĠĠĠ", "Ġ...
[ 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10,...
[ 1, 7, 13, 16, 19, 1, 1, 6, 9, 11, 14, 15, 4, 8, 11, 15, 18, 22, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 42, 43, 44, 45, 46, 47, 49, 8, 13, 14, 17, 19, 23, 8, 13, 14, 15, 16, 20, 22, 24, 25, 29, 8, 13,...
6bf1d410a33e3b2535e39e4f8c5c7f8278b3de67
from PIL import Image from src import urbandictionary_api from src.card.cardDrawer import CardDrawer from src.card.cardModel import CardModel from src.repository import Repository from src.urbandictionary_api import get_random_word def save_card(word, image_path, filepath="data/cards/", filename=None): """Функци...
[ 1097, 35991, 1220, 4393, 222, 222, 1097, 1581, 1220, 13387, 11115, 26654, 100, 1256, 222, 1097, 1581, 51, 2310, 51, 2310, 16860, 1220, 10434, 16860, 222, 1097, 1581, 51, 2310, 51, 2310, 1262, 1220, 10434, 1262, 222, 1097, 1581, 51, 6335...
[ "from", "ĠPIL", "Ġimport", "ĠImage", "Ċ", "Ċ", "from", "Ġsrc", "Ġimport", "Ġur", "band", "ictionary", "_", "api", "Ċ", "from", "Ġsrc", ".", "card", ".", "card", "Drawer", "Ġimport", "ĠCard", "Drawer", "Ċ", "from", "Ġsrc", ".", "card", ".", "card", "Mod...
[ 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 10, 10, ...
[ 1, 5, 9, 16, 22, 1, 1, 5, 9, 16, 19, 23, 32, 33, 36, 1, 5, 9, 10, 14, 15, 19, 25, 32, 37, 43, 1, 5, 9, 10, 14, 15, 19, 24, 31, 36, 41, 1, 5, 9, 10, 20, 27, 38, 1, 5, 9, 10, 12, 16, 25, 26, 29, 36, 40, 41, ...
a096e811e50e25e47a9b76b1f813c51f4307bbfe
import django_filters from .models import Drinks, Brand class DrinkFilter(django_filters.FilterSet): BRAND_CHOICES = tuple((brand.name, brand.name) for brand in Brand.objects.all()) name = django_filters.CharFilter(lookup_expr="icontains") price_lt = django_filters.NumberFilter(field_name="price", lookup_...
[ 485, 8532, 100, 9252, 222, 1097, 657, 3404, 1220, 493, 14448, 120, 49, 32521, 499, 222, 842, 493, 14448, 2365, 45, 11025, 100, 9252, 51, 2365, 903, 731, 303, 570, 44876, 100, 15904, 11988, 299, 8871, 1181, 10507, 51, 444, 49, 20365, ...
[ "import", "Ġdjango", "_", "filters", "Ċ", "from", "Ġ.", "models", "Ġimport", "ĠD", "rink", "s", ",", "ĠBrand", "ĊĊ", "Ċ", "class", "ĠD", "rink", "Filter", "(", "django", "_", "filters", ".", "Filter", "Set", "):", "ĊĠĠĠ", "ĠB", "RAND", "_", "CHO", "I...
[ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 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...
[ 1, 7, 14, 15, 22, 1, 5, 7, 13, 20, 22, 26, 27, 28, 34, 1, 1, 6, 8, 12, 18, 19, 25, 26, 33, 34, 40, 43, 45, 4, 6, 10, 11, 14, 18, 20, 26, 28, 33, 34, 38, 39, 45, 46, 50, 51, 55, 61, 64, 70, 71, 78, 79, 82, 85,...
3ea42e7ad5301314a39bf522280c084342cd18c5
from flask import render_template, request, Response from flask.views import MethodView, View from flask.views import View from repo import ClassifierRepo from services import PredictDigitService from settings import CLASSIFIER_STORAGE class IndexView(View): def dispatch_request(self): return render_tem...
[ 1097, 18958, 1220, 2922, 100, 2402, 49, 1343, 49, 5178, 222, 1097, 18958, 51, 4361, 1220, 5409, 1089, 49, 4340, 222, 222, 1097, 18958, 51, 4361, 1220, 4340, 222, 222, 1097, 5885, 1220, 1727, 1914, 9339, 222, 1097, 6694, 1220, 44462, 2...
[ "from", "Ġflask", "Ġimport", "Ġrender", "_", "template", ",", "Ġrequest", ",", "ĠResponse", "Ċ", "from", "Ġflask", ".", "views", "Ġimport", "ĠMethod", "View", ",", "ĠView", "Ċ", "Ċ", "from", "Ġflask", ".", "views", "Ġimport", "ĠView", "Ċ", "Ċ", "from", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 11, 11, 11, 11, 11, 11, 11, ...
[ 1, 5, 11, 18, 25, 26, 34, 35, 43, 44, 53, 1, 5, 11, 12, 17, 24, 31, 35, 36, 41, 1, 1, 5, 11, 12, 17, 24, 29, 1, 1, 5, 10, 17, 23, 28, 32, 1, 5, 14, 21, 29, 34, 41, 1, 5, 14, 21, 24, 26, 28, 32, 33, 40, 1, 1...
0c97569c77fb3598d83eba607960328bb2134dd2
from __future__ import print_function, division import os from os.path import exists, join, basename, dirname from os import makedirs import numpy as np import datetime import time import argparse import torch import torch.nn as nn import torch.optim as optim from lib.dataloader import DataLoader from lib.im_pair_dat...
[ 1097, 1176, 9689, 523, 1220, 1489, 100, 1144, 49, 20707, 222, 485, 2355, 222, 1097, 2355, 51, 1005, 1220, 5394, 49, 7163, 49, 29142, 49, 24786, 222, 1097, 2355, 1220, 364, 19934, 19937, 222, 485, 6610, 641, 2115, 222, 485, 7181, 222, ...
[ "from", "Ġ__", "future", "__", "Ġimport", "Ġprint", "_", "function", ",", "Ġdivision", "Ċ", "import", "Ġos", "Ċ", "from", "Ġos", ".", "path", "Ġimport", "Ġexists", ",", "Ġjoin", ",", "Ġbasename", ",", "Ġdirname", "Ċ", "from", "Ġos", "Ġimport", "Ġm", "ake...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, ...
[ 1, 5, 8, 14, 16, 23, 29, 30, 38, 39, 48, 1, 7, 10, 1, 5, 8, 9, 13, 20, 27, 28, 33, 34, 43, 44, 52, 1, 5, 8, 15, 17, 21, 24, 1, 7, 13, 16, 19, 1, 7, 16, 1, 7, 12, 1, 7, 16, 1, 1, 7, 13, 1, 7, 13, 14, 16, ...
a65dfca1773c1e4101ebfb953e0f617a2c345695
def merge(self, intervals): intervals.sort() arr = [] for i in intervals: if len(arr) == 0 or arr[-1][1] < i[0]: arr.append(i) else: arr[-1][1] = max(arr[-1][1], i[1]) return arr
[ 610, 4009, 45, 803, 49, 26438, 731, 303, 26438, 51, 3349, 365, 465, 5941, 299, 1627, 465, 456, 613, 347, 26438, 63, 310, 434, 2095, 45, 865, 46, 630, 244, 53, 575, 5941, 6510, 54, 1697, 54, 98, 350, 613, 96, 53, 2805, 343, 5941,...
[ "def", "Ġmerge", "(", "self", ",", "Ġintervals", "):", "ĊĠĠĠ", "Ġintervals", ".", "sort", "()", "ĊĊĠĠĠ", "Ġarr", "Ġ=", "Ġ[]", "ĊĊĠĠĠ", "Ġfor", "Ġi", "Ġin", "Ġintervals", ":", "ĊĠĠĠĠĠĠĠ", "Ġif", "Ġlen", "(", "arr", ")", "Ġ==", "Ġ", "0", "Ġor", "Ġarr", ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 4, 4, 4, 4, 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, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, ...
[ 1, 4, 10, 11, 15, 16, 26, 28, 4, 14, 15, 19, 21, 4, 8, 10, 13, 4, 8, 10, 13, 23, 24, 8, 11, 15, 16, 19, 20, 23, 24, 25, 28, 32, 34, 35, 37, 38, 39, 41, 43, 44, 45, 47, 12, 16, 17, 23, 24, 25, 26, 8, 13, 14, 1...
49005500b299ca276f663fe8431bb955e5585bbd
import Net import mnist_parser import numpy as np # To use this model it is required to download the MNIST database # The donwloaded base is then needet parse to numpy using mnist_parser.parse_to_npy method # The files genetared using mnist_parser.parse_to_npy are then loaded using np.load in_values = np.load("MNIST/m...
[ 485, 10866, 222, 485, 18793, 446, 100, 3936, 222, 485, 6610, 641, 2115, 222, 222, 40, 2634, 813, 477, 1573, 580, 458, 2147, 391, 5844, 341, 507, 46131, 3520, 222, 40, 906, 2818, 124, 5907, 1712, 458, 1636, 1188, 106, 2145, 3203, 391...
[ "import", "ĠNet", "Ċ", "import", "Ġmn", "ist", "_", "parser", "Ċ", "import", "Ġnumpy", "Ġas", "Ġnp", "Ċ", "Ċ", "#", "ĠTo", "Ġuse", "Ġthis", "Ġmodel", "Ġit", "Ġis", "Ġrequired", "Ġto", "Ġdownload", "Ġthe", "ĠM", "NIST", "Ġdatabase", "Ċ", "#", "ĠThe", "Ġ...
[ 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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...
[ 1, 7, 11, 1, 7, 10, 13, 14, 20, 1, 7, 13, 16, 19, 1, 1, 2, 5, 9, 14, 20, 23, 26, 35, 38, 47, 51, 53, 57, 66, 1, 2, 6, 10, 11, 17, 22, 25, 30, 33, 34, 37, 43, 46, 52, 58, 61, 64, 65, 71, 72, 77, 78, 80, 81, ...
219929d52b5f1a0690590e83b41d2b4f0b2b3a51
list = [3, 1, 2, 5, 4, 7, 6] def sort(list): for i in range(len(list) - 1): if list[i] > list[i + 1]: a = list[i] list[i] = list[i + 1] list[i + 1] = a print(list) sort(list)
[ 687, 299, 447, 56, 49, 244, 54, 49, 244, 55, 49, 244, 58, 49, 244, 57, 49, 244, 60, 49, 244, 59, 98, 499, 222, 610, 3873, 45, 687, 731, 303, 456, 613, 347, 2189, 45, 1688, 45, 687, 46, 449, 244, 54, 731, 310, 434, 1168, 96...
[ "list", "Ġ=", "Ġ[", "3", ",", "Ġ", "1", ",", "Ġ", "2", ",", "Ġ", "5", ",", "Ġ", "4", ",", "Ġ", "7", ",", "Ġ", "6", "]", "ĊĊ", "Ċ", "def", "Ġsort", "(", "list", "):", "ĊĠĠĠ", "Ġfor", "Ġi", "Ġin", "Ġrange", "(", "len", "(", "list", ")", "...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7...
[ 1, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 1, 4, 9, 10, 14, 16, 4, 8, 10, 13, 19, 20, 23, 24, 28, 29, 31, 32, 33, 35, 8, 11, 16, 17, 18, 19, 21, 26, 27, 28,...
e884ce5878de75afe93085e2310b4b8d5953963a
""" Created on 13 Dec 2016 @author: hpcosta """ # https://www.hackerrank.com/challenges/backreferences-to-failed-groups regex = r"^\d{2}(-?)\d{2}\1\d{2}\1\d{2}$" # Do not delete 'r'. import re print(str(bool(re.search(regex, raw_input()))).lower()) # Task # # You have a test string S. # Your task is to write a r...
[ 3012, 222, 6880, 563, 244, 54, 56, 9190, 244, 55, 53, 54, 59, 222, 222, 69, 2133, 63, 21936, 8064, 102, 222, 3012, 222, 40, 1698, 574, 1516, 51, 15267, 549, 1387, 51, 527, 52, 44370, 52, 994, 6377, 50, 471, 50, 7824, 50, 6353, ...
[ "\"\"\"", "Ċ", "Created", "Ġon", "Ġ", "1", "3", "ĠDec", "Ġ", "2", "0", "1", "6", "Ċ", "Ċ", "@", "author", ":", "Ġhp", "cost", "a", "Ċ", "\"\"\"", "Ċ", "#", "Ġhttps", "://", "www", ".", "hack", "err", "ank", ".", "com", "/", "challenges", "/", ...
[ 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8...
[ 1, 4, 1, 8, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 1, 1, 2, 8, 9, 12, 16, 17, 1, 4, 1, 2, 8, 11, 14, 15, 19, 22, 25, 26, 29, 30, 40, 41, 45, 55, 56, 58, 59, 65, 66, 72, 1, 1, 6, 8, 10, 11, 13, 14, 15, 16, ...
302accfd5001a27c7bbe6081856d43dbec704168
import asyncio import logging import random from aiogram.dispatcher import FSMContext from aiogram.types import ContentTypes, Message, CallbackQuery from aiogram.utils.exceptions import BotBlocked import keyboards from data.config import ADMINS, ADMIN_CHAT_ID from keyboards.inline.activate_menu import active_menu_cal...
[ 485, 24595, 222, 485, 5751, 222, 485, 4051, 222, 222, 1097, 38578, 1786, 51, 19040, 1220, 525, 5632, 1237, 222, 1097, 38578, 1786, 51, 2529, 1220, 6261, 2439, 49, 4587, 49, 14706, 1643, 222, 1097, 38578, 1786, 51, 2324, 51, 11453, 122...
[ "import", "Ġasyncio", "Ċ", "import", "Ġlogging", "Ċ", "import", "Ġrandom", "Ċ", "Ċ", "from", "Ġaio", "gram", ".", "dispatcher", "Ġimport", "ĠF", "SM", "Context", "Ċ", "from", "Ġaio", "gram", ".", "types", "Ġimport", "ĠContent", "Types", ",", "ĠMessage", ",...
[ 1, 1, 1, 2, 2, 2, 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, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, ...
[ 1, 7, 15, 1, 7, 15, 1, 7, 14, 1, 1, 5, 9, 13, 14, 24, 31, 33, 35, 42, 1, 5, 9, 13, 14, 19, 26, 34, 39, 40, 48, 49, 58, 63, 1, 5, 9, 13, 14, 19, 20, 30, 37, 41, 48, 1, 1, 7, 16, 17, 1, 5, 10, 11, 17, 24, 3...