content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- ## @package npr_sfs.datasets.ext_data # # npr_sfs.datasets.ext_data utility package. # @author tody # @date 2015/10/06 import os _ext_data_roots = ["C:/Users/tody/OneDrive/Projects/npr_sfs/datasets"]
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2235, 2488, 26495, 299, 1050, 62, 82, 9501, 13, 19608, 292, 1039, 13, 2302, 62, 7890, 198, 2, 198, 2, 220, 299, 1050, 62, 82, 9501, 13, 19608, 292, 1039, 13, ...
2.040984
122
#!/usr/bin/env python3 # coding: utf-8 """ @file: cluster.py @description: @author: Ping Qiu @email: qiuping1@genomics.cn @last modified by: Ping Qiu change log: 2021/07/23 create file. """ import numpy as np import leidenalg as la from ..core.tool_base import ToolBase from ..log_manager import logger from stere...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 31, 7753, 25, 13946, 13, 9078, 198, 31, 11213, 25, 220, 198, 31, 9800, 25, 34263, 1195, 16115, 198, 31, 12888, 25, 10662, 72, ...
2.243741
2,117
"""scrapli.transport.socket""" import logging import socket from typing import Optional from scrapli.exceptions import ScrapliTimeout LOG = logging.getLogger("transport")
[ 37811, 1416, 430, 489, 72, 13, 7645, 634, 13, 44971, 37811, 198, 11748, 18931, 198, 11748, 17802, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 19320, 489, 72, 13, 1069, 11755, 1330, 1446, 430, 489, 72, 48031, 198, 198, 25294, 796, 1...
3.411765
51
import numpy as np from pymoo.model.termination import Termination from pymoo.util.termination.tolerance import ToleranceBasedTermination
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 279, 4948, 2238, 13, 19849, 13, 41382, 1330, 15527, 341, 198, 6738, 279, 4948, 2238, 13, 22602, 13, 41382, 13, 83, 37668, 1330, 309, 37668, 15001, 15156, 17928, 628, 198 ]
3.710526
38
""" Author: David Walshe Date: 10 April 2021 """ import logging import os from typing import Dict, Union from functools import wraps import attr from attr.validators import instance_of import yaml from sla_cli.src.common.config.validators import is_between, greater_than logger = logging.getLogger(__name__...
[ 37811, 198, 13838, 25, 220, 220, 220, 220, 3271, 370, 874, 258, 198, 10430, 25, 220, 220, 220, 220, 220, 220, 838, 3035, 33448, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 11, 4479, 198, ...
2.767176
262
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
[ 2, 220, 15069, 3648, 12, 4626, 26182, 27862, 198, 2, 220, 15069, 1584, 12, 220, 220, 220, 220, 16071, 25161, 5693, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 2...
3.531401
207
from .content import * from .creation import * from .registration import * from .user import * from .others import * from .forum import * from .delete import * from .practice import *
[ 6738, 764, 11299, 1330, 1635, 198, 6738, 764, 38793, 1330, 1635, 198, 6738, 764, 2301, 33397, 1330, 1635, 198, 6738, 764, 7220, 1330, 1635, 198, 6738, 764, 847, 82, 1330, 1635, 198, 6738, 764, 27302, 1330, 1635, 198, 6738, 764, 33678, ...
3.734694
49
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver # Create your models here. # the user model is under dashboard
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381,...
3.580645
62
''' P39 (*) A list of prime numbers. Given a range of integers by its lower and upper limit, construct a list of all prime numbers in that range.''' #CREATE A FUNCTION TO GENERATE PRIME NUMBERS n1=int(input('Give lower limit number = ')) n2 = int(input('Give upper limit number = ')) res = prime(n1,n2) print(f'Prim...
[ 7061, 6, 198, 47, 2670, 20789, 8, 317, 1351, 286, 6994, 3146, 13, 198, 15056, 257, 2837, 286, 37014, 416, 663, 2793, 290, 6727, 4179, 11, 5678, 257, 1351, 286, 477, 6994, 3146, 287, 326, 2837, 2637, 7061, 198, 198, 2, 43387, 6158, ...
2.926829
123
import pytest from mpi4py import MPI import jax import jax.numpy as jnp comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() @pytest.mark.skipif(size < 2 or rank > 1, reason="Runs only on rank 0 and 1") @pytest.mark.skipif(size < 2 or rank > 1, reason="Runs only on rank 0 and 1") @pytest.mark.sk...
[ 11748, 12972, 9288, 198, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 198, 11748, 474, 897, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 198, 9503, 796, 4904, 40, 13, 9858, 44, 62, 45359, 11163, 198, 43027, 79...
2.62982
389
from util import getMostRecentPickle from nn = getMostRecentPickle('nn') print nn.activate([4])
[ 6738, 7736, 1330, 651, 6943, 26446, 31686, 293, 198, 6738, 198, 198, 20471, 796, 651, 6943, 26446, 31686, 293, 10786, 20471, 11537, 198, 4798, 299, 77, 13, 39022, 26933, 19, 12962 ]
3.096774
31
# -*- coding: utf-8 -*- import pytest from ..test import get_test_stripe_client @pytest.fixture @pytest.fixture def mock_stripe(stripe, request): """Set up a mock stripe client""" old_base = stripe.api_base stripe.api_base = 'http://localhost:12111' request.addfinalizer(resource_a_teardown) r...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12972, 9288, 198, 198, 6738, 11485, 9288, 1330, 651, 62, 9288, 62, 33565, 431, 62, 16366, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, ...
2.622047
127
# -*- coding: utf-8 -*- # ================================================================================ # ACUMOS # ================================================================================ # Copyright © 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved. # ==============================...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 38093, 25609, 18604, 201, 198, 2, 7125, 5883, 2640, 201, 198, 2, 38093, 25609, 18604, 201, 198, 2, 15069, 10673, 2177, 5161, 5, 51, 42443, 14161, 1222, 9634, 8...
3.521158
449
import lxml.etree as ET #get xml tree tree = ET.parse("../ov_met_01.xml") #declare xml root root = tree.getroot() #assign variable for list of said elements said_tags = root.xpath("//said") #find all tokens tagged with 'speech' or 'vision' # get_whole_speech() # get_speech_or_vision_words('speech') get_speech_or_v...
[ 11748, 300, 19875, 13, 316, 631, 355, 12152, 198, 198, 2, 1136, 35555, 5509, 198, 21048, 796, 12152, 13, 29572, 7203, 40720, 709, 62, 4164, 62, 486, 13, 19875, 4943, 198, 198, 2, 32446, 533, 35555, 6808, 198, 15763, 796, 5509, 13, 1...
2.803279
122
#!/usr/bin/env python3 import rospy from geometry_msgs.msg import Twist """ Uses the parameters in `../params/patrol_parameters.yaml`. The turtlebot will patrol back and forth in a straight line. Run this script/node after `roslaunch simple_applications turtlebot3_empty_world_patrol.launch` which also automatica...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 220, 220, 220, 220, 220, 220, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 44088, 198, 198, 37811, 198, 5842, 274, 262, 10007, 287, 4600, 40720, 37266, ...
3.310811
148
from django.conf import settings from django.urls import re_path, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ re_path(r'^$', index, name='index'), re_path(r'^admin/', admin.site.urls), re_path(r'^summernote/', in...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13...
2.727273
154
from DZ_less13.players_examp.hero import Hero
[ 198, 6738, 360, 57, 62, 1203, 1485, 13, 32399, 62, 1069, 696, 13, 11718, 1330, 8757, 628 ]
2.823529
17
""" This script demonstrates how to load the pretrained numpy weights (we use icnet_cityscapes_trainval_90k_bnnomerge.npy specifically) from https://github.com/hellochick/ICNet-tensorflow and use them to perform inference with ICNet on cityscapes images. """ import argparse import os import cv2 import numpy as np imp...
[ 37811, 198, 1212, 4226, 15687, 703, 284, 3440, 262, 2181, 13363, 299, 32152, 19590, 198, 7, 732, 779, 14158, 3262, 62, 19205, 1416, 7916, 62, 27432, 2100, 62, 3829, 74, 62, 9374, 77, 12057, 469, 13, 77, 9078, 5734, 8, 422, 198, 5450...
2.449653
1,152
from json import dumps, loads from socketserver import BaseRequestHandler import time from server.player import PlayerManager from server.source import settings from server.utils import *
[ 6738, 33918, 1330, 45514, 11, 15989, 198, 6738, 37037, 18497, 1330, 7308, 18453, 25060, 198, 11748, 640, 198, 198, 6738, 4382, 13, 7829, 1330, 7853, 13511, 198, 6738, 4382, 13, 10459, 1330, 6460, 198, 6738, 4382, 13, 26791, 1330, 1635, ...
4.634146
41
from .base import BaseAttack from .fgsm import FGSMAttack
[ 6738, 764, 8692, 1330, 7308, 27732, 198, 6738, 764, 40616, 5796, 1330, 376, 14313, 5673, 926, 441 ]
3.352941
17
from mod.headerx import * form_class = uic.loadUiType("mr.ui")[0] if __name__ == '__main__': app = QApplication(sys.argv) myWindow = MyWindowClass() myWindow.show() app.exec_()
[ 6738, 953, 13, 25677, 87, 1330, 1635, 201, 198, 201, 198, 687, 62, 4871, 796, 334, 291, 13, 2220, 52, 72, 6030, 7203, 43395, 13, 9019, 4943, 58, 15, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 361, 11593, 367...
2.09901
101
"""Test match.py.""" import textwrap import unittest from pytype import convert_structural from pytype.pytd import pytd from pytype.pytd.parse import builtins from pytype.pytd.parse import parser from pytype.tests import test_inference import unittest if __name__ == "__main__": test_inference.main()
[ 37811, 14402, 2872, 13, 9078, 526, 15931, 198, 198, 11748, 2420, 37150, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 4906, 1330, 10385, 62, 7249, 1523, 198, 6738, 12972, 4906, 13, 9078, 8671, 1330, 12972, 8671, 198, 6738, 12972, 49...
3.132653
98
from nose2.tests._common import FunctionalTestCase
[ 6738, 9686, 17, 13, 41989, 13557, 11321, 1330, 44224, 14402, 20448, 628 ]
4.333333
12
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt import cv2 from skimage import data def fast_glcm_mean(img, vmin=0, vmax=255, nbit=8, ks=5): ''' calc glcm mean ''' h,w = img.shape glcm = fast_glcm(img, vmin, vmax, nbit, ks) mean = np.zeros((h,w), dtype=np.float32) for...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 269, 85, 17, 198, 6738, 1341, 9060, 1330, 1366, 628, 628, 198, 4299, 3049, 62, 4743, ...
1.872022
1,469
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event from flexget.config_schema import one_or_more from flexget.plugin import PluginWarning from flexg...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 7297, 11, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, 1635, 220, 1303, 645, 20402, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 11, 2266, 18156, 12, 18780, 259,...
2.453067
1,353
from .find_closest_centroids import find_closest_centroids from .compute_centroids import compute_centroids from .run_kmeans import run_kmeans from .kmeans_init_centroids import kmeans_init_centroids from .feature_normalize import feature_normalize from .plot_progress_kmeans import plot_progress_kmeans from .pca import...
[ 6738, 764, 19796, 62, 565, 418, 395, 62, 1087, 305, 2340, 1330, 1064, 62, 565, 418, 395, 62, 1087, 305, 2340, 198, 6738, 764, 5589, 1133, 62, 1087, 305, 2340, 1330, 24061, 62, 1087, 305, 2340, 198, 6738, 764, 5143, 62, 74, 1326, 5...
3.119718
142
userinput = input("Would you like to create,read, or write a file? (c , r , w) if userinput == 'c': # I'll put this code in a try statement incase the user already has a file with this name try: ...
[ 198, 7220, 15414, 796, 5128, 7203, 17353, 345, 588, 284, 2251, 11, 961, 11, 393, 3551, 257, 2393, 30, 357, 66, 837, 374, 837, 266, 8, 198, 198, 361, 2836, 15414, 6624, 705, 66, 10354, 198, 220, 1303, 314, 1183, 1234, 428, 2438, 28...
1.743316
187
import numpy as np k = 2; n = np.array([[5,3,8,10,2,1,5,1,0,2]]); def sma(x,y): """ Retorna un arreglo con valor de la media movil simple del arreglo x con ventana y """ size = x.shape; p = np.arange(y-1,size[1],1); m = np.arange(0,y,1); arrayfinal = np.zeros((1,size[1]-y+1)) for...
[ 11748, 299, 32152, 355, 45941, 198, 198, 74, 796, 362, 26, 198, 198, 77, 796, 45941, 13, 18747, 26933, 58, 20, 11, 18, 11, 23, 11, 940, 11, 17, 11, 16, 11, 20, 11, 16, 11, 15, 11, 17, 11907, 1776, 198, 198, 4299, 895, 64, 7,...
1.681063
301
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'CaliperImport_Vst.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import Qt...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 34, 7344, 525, 20939, 62, 53, 301, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, ...
3.070866
127
from django.contrib import admin from .models.category import Category from .models.playlist import Playlist from .models.video import Video admin.site.register(Playlist) admin.site.register(Video) admin.site.register(Category)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 13, 22872, 1330, 21743, 198, 6738, 764, 27530, 13, 1759, 4868, 1330, 3811, 4868, 198, 6738, 764, 27530, 13, 15588, 1330, 7623, 198, 198, 28482, 13, 15654, 13, ...
3.538462
65
## Functions supporting the Project notebook import warnings import pandas as pd import numpy as np import scipy as sp import seaborn as sns import matplotlib.pyplot as plt import random as rnd import gspread import sklearn.preprocessing from oauth2client.service_account import ServiceAccountCredentials from sklearn.l...
[ 2235, 40480, 6493, 262, 4935, 20922, 198, 198, 11748, 14601, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29...
2.236684
8,467
#!/usr/bin/env python3 import random import statistics import SortMedian h = 1000 b = 10 k = 2 * h + 1 n = k * b main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4738, 198, 11748, 7869, 198, 11748, 33947, 9921, 666, 198, 198, 71, 796, 8576, 198, 65, 796, 838, 198, 74, 796, 362, 1635, 289, 1343, 352, 198, 77, 796, 479, 1635, ...
2.510204
49
from discord_slash import SlashCommand
[ 6738, 36446, 62, 6649, 1077, 1330, 26616, 21575, 198 ]
4.333333
9
# xlattice_py/xlattice/sig_verifier.py """ Given a PublicKey, instances of this class can verify digital signatures. """ from abc import ABCMeta, abstractmethod class SigVerifier(metaclass=ABCMeta): """ Given a PublicKey, instances of this class can verify digital signatures. """ @property ...
[ 2, 2124, 75, 1078, 501, 62, 9078, 14, 87, 75, 1078, 501, 14, 82, 328, 62, 332, 7483, 13, 9078, 198, 198, 37811, 198, 15056, 257, 5094, 9218, 11, 10245, 286, 428, 1398, 460, 11767, 4875, 198, 12683, 6691, 13, 198, 37811, 198, 198, ...
2.742597
439
# Generated by the windmill services transformer from windmill.authoring import WindmillTestClient
[ 2, 2980, 515, 416, 262, 2344, 17805, 2594, 47385, 198, 6738, 2344, 17805, 13, 9800, 278, 1330, 3086, 17805, 14402, 11792, 198 ]
4.5
22
#desafio12: algoritmo que leia o preço de um produto e mostre seu novo preço, com 5% de desconto # po=float(input('Qual o preço deste produto? R$')) pn = po-(po*(5/100)) print('O preço deste mesmo produto com 5% de desconto é de R${:.2f}'.format(pn))
[ 2, 8906, 1878, 952, 1065, 25, 435, 7053, 270, 5908, 8358, 443, 544, 267, 662, 16175, 78, 390, 23781, 40426, 9390, 304, 749, 260, 384, 84, 645, 13038, 662, 16175, 78, 11, 401, 642, 4, 390, 1715, 5957, 198, 2, 198, 7501, 28, 22468, ...
2.358491
106
__version__ = '3.1.0'
[ 834, 9641, 834, 796, 705, 18, 13, 16, 13, 15, 6, 628 ]
1.916667
12
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from typing import Optional, List from cdm.enums import CdmObjectType, CdmOperationType, CdmAttributeContextType from cdm.objectmodel import CdmCorpusContext, CdmA...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 6738...
3.917763
304
from ..objects.admin import ObjectGroupAdmin # noqa: F401 from .institution import InstitutionAdmin # noqa: F401 from .project import ProjectAdmin # noqa: F401 from .run import RunAdmin # noqa: F401
[ 6738, 11485, 48205, 13, 28482, 1330, 9515, 13247, 46787, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 8625, 2738, 1330, 29426, 46787, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 16302, 1330, 4935, 46787, 220, 1303, ...
3.383333
60
from MoutainCarDemo import * from visual import * # imports the visual system to see the graphics from visual.graph import * import psyco psyco.full() if __name__ == '__main__': GMountainCarDemo(500)
[ 6738, 337, 448, 391, 9914, 11522, 78, 1330, 1635, 201, 198, 6738, 5874, 1330, 1635, 1303, 17944, 262, 5874, 1080, 284, 766, 262, 9382, 201, 198, 6738, 5874, 13, 34960, 1330, 1635, 201, 198, 11748, 17331, 1073, 201, 198, 13764, 1073, 1...
2.147541
122
try: from hashlib import blake2s except: from pyblake2 import blake2s blake = lambda x: blake2s(x).digest() from typing import List from starks.numbertype import FieldElement from starks.numbertype import Poly def permute4(values: List) -> List: """Permutes the list by selecting elements a quarter down TO...
[ 28311, 25, 198, 220, 422, 12234, 8019, 1330, 698, 539, 17, 82, 198, 16341, 25, 198, 220, 422, 12972, 2436, 539, 17, 1330, 698, 539, 17, 82, 198, 2436, 539, 796, 37456, 2124, 25, 698, 539, 17, 82, 7, 87, 737, 12894, 395, 3419, 19...
2.649133
1,730
import datetime from functools import partial from typing import Dict, Tuple from django import forms from haystack.forms import ModelSearchForm from haystack.query import SearchQuerySet from Bio.Alphabet import IUPAC from public_interface.models import Genes, Vouchers, Sequences DateInput = partial(forms.DateInput...
[ 11748, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 27678, 25558, 13, 23914, 1330, 9104, 18243, 8479, 198, 6738, 27678, 25558,...
3.140541
185
# Generated by Django 3.2 on 2021-04-21 07:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 3023, 12, 2481, 8753, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
# Generated by Django 3.2 on 2021-05-05 01:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 2713, 12, 2713, 5534, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
from django.urls import path from . import views urlpatterns = [ path('home/', views.home, name='home'), path('predict/', views.predict, name='predict'), path('form/', views.form_view, name='form'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 11195, 14, 3256, 5009, 13, 11195, 11, 1438, 11639, 11195, 33809, 198, 220, 220, 220, 3108,...
2.708861
79
from login import get_csrf from get_lists import get_page, get_lists_table, get_lists_urls, \ get_active_countries_dict, get_handles # Global Variables # lists_url = "https://codeforces.com/lists" new_list_url = "https://codeforces.com/lists/new" edit_list_url = "https://codeforces.com/data/lists...
[ 6738, 17594, 1330, 651, 62, 6359, 41871, 198, 6738, 651, 62, 20713, 1330, 651, 62, 7700, 11, 651, 62, 20713, 62, 11487, 11, 651, 62, 20713, 62, 6371, 82, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.414815
135
import numpy as np from numpy.polynomial import Polynomial as P class CyclicBitBlockCoder(): ''' Description: This class is an implementation of a cyclic block coder. It is initialized passing its generator polynomial (g) and the size of the codeword (N). Constraints: - len(g) < N; - g(D)...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 35428, 26601, 498, 1330, 12280, 26601, 498, 355, 350, 198, 4871, 28007, 291, 13128, 12235, 34, 12342, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 12489, 25, 770, ...
2.3439
1,041
ext = ('zero', 'um', 'dois', 'três', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove', 'dez', 'onze', 'doze', 'treze','catorze', 'quinze', 'dezesseis', 'dezessete', 'dezoito', 'dezenove', 'vinte') while True: n = int(input('Digite um número entre 0 e 20: ')) while n not in range(0, ...
[ 2302, 796, 19203, 22570, 3256, 705, 388, 3256, 705, 4598, 271, 3256, 705, 2213, 25792, 82, 3256, 705, 421, 47756, 3256, 198, 220, 220, 220, 220, 220, 220, 705, 17879, 1073, 3256, 705, 325, 271, 3256, 705, 2617, 68, 3256, 705, 78, 10...
1.990196
306
import logging import random import string import time import pytest from helpers.cluster import ClickHouseCluster logging.getLogger().setLevel(logging.INFO) logging.getLogger().addHandler(logging.StreamHandler()) @pytest.fixture(scope="module") FILES_OVERHEAD = 1 FILES_OVERHEAD_PER_COLUMN = 2 # Data and mark fi...
[ 11748, 18931, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 640, 198, 198, 11748, 12972, 9288, 198, 6738, 49385, 13, 565, 5819, 1330, 6914, 18102, 2601, 5819, 198, 198, 6404, 2667, 13, 1136, 11187, 1362, 22446, 2617, 4971, 7, 6404, 26...
2.412162
296
input = """ c num blocks = 1 c num vars = 180 c minblockids[0] = 1 c maxblockids[0] = 180 p cnf 180 715 -122 80 -60 0 -96 -119 153 0 -22 -126 1 0 180 -123 -48 0 82 -38 -51 0 -116 -16 -174 0 108 103 -92 0 -77 63 -117 0 -118 -131 -52 0 139 38 57 0 107 99 -156 0 9 -45 -131 0 18 179 -15 0 -98 -106 44 0 -49 -140 -6 0 -122 -...
[ 15414, 796, 37227, 198, 66, 997, 7021, 796, 352, 198, 66, 997, 410, 945, 796, 11546, 198, 66, 949, 9967, 2340, 58, 15, 60, 796, 352, 198, 66, 3509, 9967, 2340, 58, 15, 60, 796, 11546, 198, 79, 269, 77, 69, 11546, 767, 1314, 198,...
2.111967
4,671
#!/usr/bin/env python # __init__.py ### IMPORTS ### import os import sys import os.path import time import json from datetime import datetime from flask import Flask, g, render_template, request from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import create_engine from sqlalchemy.orm impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 11593, 15003, 834, 13, 9078, 201, 198, 201, 198, 21017, 30023, 33002, 44386, 201, 198, 11748, 28686, 201, 198, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 13, 697...
2.651563
1,920
# -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Unit tests for XYZ reader.""" import os import unittest import numpy as np import cclib __filedir__ = os.path.dirn...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 11, 262, 269, 565, 571, 2478, 1074, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 269, 565, 571, 357, 4023, 1378, 535, 8019, 13, ...
2.56383
188
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : yag8009 # @FileName : main # @Time : 2020/6/8 from scrapy import cmdline # cmdline.execute("scrapy crawl qccspider -o qccspider.csv".split()) # cmdline.execute("cd scrapy_dxt_qcc".split()) cmdline.execute("scrapy crawl qccspider".split())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 13838, 220, 1058, 331, 363, 7410, 24, 198, 2, 2488, 8979, 5376, 220, 1058, 1388, 198, 2, 2488, 7575, ...
2.443548
124
import os import random import pandas as pd import numpy as np from prediction import finalRecomendation,recomThorp cards = [ '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A', '2', '3', '4', '5', '6', '7', '8', '...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17724, 1330, 2457, 6690, 296, 437, 341, 11, 260, 785, 817, 16300, 628, 198, 27761, 796, 685, 198, 220, 220, 220, 220,...
2.109091
330
# -*- coding: utf-8 -*- """ Microsoft-Windows-AppSruProv GUID : 0cc157b3-cf07-4fc2-91ee-31ac92e05fe1 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15905, 12, 11209, 12, 4677, 50, 622, 15946, 198, 38, 27586, 1058, 657, 535, 18458, 65, 18, 12, 12993, 2998, 12, 19, 16072, 17, 12, 6420, 1453, 12, 3132, ...
2.354167
192
import textwrap from textwrap_example import sample_text dedented_text = textwrap.dedent(sample_text) print('Dedented:') print(dedented_text) whitespace_sample_text = ''' Line one. Line two. Line three. ''' dedented_whitespace_sample_text = textwrap.dedent(whitespace_sample_text) print('Before Dedent:') print(w...
[ 11748, 2420, 37150, 198, 6738, 2420, 37150, 62, 20688, 1330, 6291, 62, 5239, 198, 198, 9395, 4714, 62, 5239, 796, 2420, 37150, 13, 9395, 298, 7, 39873, 62, 5239, 8, 198, 4798, 10786, 35, 276, 4714, 25, 11537, 198, 4798, 7, 9395, 471...
2.825
160
from microsoft.gestures.endpoint.gesture_service_endpoint import GestureServiceEndpoint from microsoft.gestures.protocol.gestures_protocol import GesturesProtocol from microsoft.gestures.logging import get_logger
[ 6738, 4580, 4215, 13, 3495, 942, 13, 437, 4122, 13, 3495, 495, 62, 15271, 62, 437, 4122, 1330, 44641, 495, 16177, 12915, 4122, 198, 6738, 4580, 4215, 13, 3495, 942, 13, 11235, 4668, 13, 3495, 942, 62, 11235, 4668, 1330, 44641, 942, ...
3.566667
60
from django import template register = template.Library() @register.simple_tag(takes_context=True)
[ 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, 13, 36439, 62, 12985, 7, 83, 1124, 62, 22866, 28, 17821, 8 ]
3.448276
29
import os from logging import getLogger from fastapi import FastAPI, Response, status from vectorizer import Vectorizer, VectorInput from meta import Meta app = FastAPI() vec : Vectorizer meta_config : Meta logger = getLogger('uvicorn') @app.on_event("startup") @app.get("/.well-known/live", response_class=Respons...
[ 11748, 28686, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 18261, 11, 3722, 198, 6738, 15879, 7509, 1330, 20650, 7509, 11, 20650, 20560, 198, 6738, 13634, 1330, 30277, 628, 198, 1324, 796, 1254...
3.05036
139
import matplotlib.pyplot as plt train_acc = [0.7802, 0.8695, 0.8837, 0.8922, 0.9011, 0.9074, 0.9149, 0.9209, 0.9252, 0.9309] train_loss = [0.4578, 0.3221, 0.2869, 0.2618, 0.2422, 0.2269, 0.2122, 0.1991, 0.1890, 0.1778] val_acc = [0.8461, 0.8406, 0.8687, 0.8689, 0.8683, 0.8733, 0.8766, 0.8780, 0.8764, 0.8766] val_loss ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 27432, 62, 4134, 796, 685, 15, 13, 22, 30863, 11, 657, 13, 23, 37381, 11, 657, 13, 3459, 2718, 11, 657, 13, 4531, 1828, 11, 657, 13, 24, 28555, 11, 657, 13, 24, ...
1.916667
384
from __future__ import print_function import sys import os import json # check parameters if len(sys.argv) != 2: usage() sys.exit(1) # read version from VERSION.json irods_top_level = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))) with open(os.path.join(irods_...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 628, 198, 2, 2198, 10007, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 8748, 3419, 198, 2...
2.447439
371
# Author: Olivier Grisel <olivier.grisel@ensta.org> # Lars Buitinck # Chyi-Kwei Yau <chyikwei.yau@gmail.com> # License: BSD 3 clause from __future__ import print_function from time import time from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.decomposition impor...
[ 2, 6434, 25, 45674, 1902, 36811, 1279, 349, 452, 959, 13, 2164, 36811, 31, 268, 38031, 13, 2398, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 31239, 347, 5013, 259, 694, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 609...
2.92913
1,919
# -*- coding: utf-8 -*- """ Python 3 API wrapper for Garmin Connect to get your statistics. Copy most code from https://github.com/cyberjunky/python-garminconnect """ import argparse import logging import os import time import re import sys import traceback import asyncio import httpx import aiofiles from config impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37906, 513, 7824, 29908, 329, 50212, 8113, 284, 651, 534, 7869, 13, 198, 29881, 749, 2438, 422, 3740, 1378, 12567, 13, 785, 14, 948, 527, 73, 28898, 14, 29...
2.570213
1,175
''' Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Note: Your returned answers (both inde...
[ 7061, 6, 198, 15056, 281, 7177, 286, 37014, 326, 318, 1541, 23243, 287, 41988, 1502, 11, 1064, 734, 3146, 884, 326, 484, 751, 510, 284, 257, 2176, 2496, 1271, 13, 198, 198, 464, 2163, 734, 13065, 815, 1441, 36525, 286, 262, 734, 314...
3.654545
165
from django.contrib import admin from .models import Image,Profile,Comments,Post # Register your models here. admin.site.register(Image), admin.site.register(Profile), admin.site.register(Comments), admin.site.register(Post),
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 7412, 11, 37046, 11, 23903, 11, 6307, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 5159, 828, 198, 28482, 13, 15654, 13, 30...
3.454545
66
import os SLACK_CHANNEL = os.environ['SLACK_CHANNEL'] SLACK_TOKEN = os.environ['SLACK_TOKEN']
[ 11748, 28686, 198, 198, 8634, 8120, 62, 3398, 22846, 3698, 796, 28686, 13, 268, 2268, 17816, 8634, 8120, 62, 3398, 22846, 3698, 20520, 198, 8634, 8120, 62, 10468, 43959, 796, 28686, 13, 268, 2268, 17816, 8634, 8120, 62, 10468, 43959, 20...
2.261905
42
# 049 - TABUADA from time import sleep num = int(input('Digite um número.... ')) print(f'Vamos efetuar a tabuada do número {num}') sleep(1) for i in range(0, 11): print(f'{num} x {i} = {num * i}')
[ 2, 657, 2920, 532, 309, 6242, 52, 26853, 198, 198, 6738, 640, 1330, 3993, 198, 198, 22510, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 1106, 705, 4008, 198, 4798, 7, 69, 6, 53, 321, 418, 304, 34045, 84, 283,...
2.136842
95
# coding=utf-8 from unittest import TestCase from encoding_snipping import main, WordContainer
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 21004, 62, 16184, 4501, 1330, 1388, 11, 9678, 29869, 628 ]
3.5
28
from rest_framework.response import Response from rest_framework.views import APIView from users.models import User from datetime import date, timedelta from rest_framework.permissions import IsAdminUser from goods.models import GoodsVisitCount # 日增用户的获取 #获取下单用户
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 2985, 13, 27530, 1330, 11787, 198, 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 6738, 1334, 62, 30604, 13, ...
2.902174
92
# Copyright (c) 2012-2016 Seafile Ltd. from django.core.management.base import BaseCommand from django.utils.translation import ugettext as _ from django.utils import translation from seaserv import ccnet_api, seafile_api from seahub.base.accounts import User from seahub.profile.models import Profile from seahub.uti...
[ 2, 15069, 357, 66, 8, 2321, 12, 5304, 49967, 576, 12052, 13, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 355, 4808, 198, 6738, ...
3.119048
126
from a10sdk.common.A10BaseClass import A10BaseClass class EthernetCfg(A10BaseClass): """This class does not support CRUD Operations please use parent. :param flap_ethernet_end: {"type": "number", "description": "Ethernet Port", "format": "interface"} :param flap_ethernet_start: {"type": "number", "d...
[ 6738, 257, 940, 21282, 74, 13, 11321, 13, 32, 940, 14881, 9487, 1330, 317, 940, 14881, 9487, 628, 198, 4871, 31903, 34, 40616, 7, 32, 940, 14881, 9487, 2599, 198, 220, 220, 220, 220, 198, 220, 220, 220, 37227, 1212, 1398, 857, 407, ...
3.155931
6,163
number = int(input()) for i in range(1, 10): for j in range(1, 10): for k in range(1, 10): for l in range(1, 10): if number % i == 0 and number% j == 0 and number % k == 0 and number% l == 0: print (f"{i}{j}{k}{l}", end=" ")
[ 17618, 796, 493, 7, 15414, 28955, 198, 1640, 1312, 287, 2837, 7, 16, 11, 838, 2599, 198, 220, 220, 220, 329, 474, 287, 2837, 7, 16, 11, 838, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 287, 2837, 7, 16, 11, 838, 25...
1.938776
147
from IPython.core.display import HTML from IPython.display import Image from collections import Counter import pandas as pd import json from plotly.offline import init_notebook_mode, iplot import matplotlib.pyplot as plt import plotly.graph_objs as go from wordcloud import tools import seaborn as sns from PIL import ...
[ 198, 6738, 6101, 7535, 13, 7295, 13, 13812, 1330, 11532, 198, 6738, 6101, 7535, 13, 13812, 1330, 7412, 198, 6738, 17268, 1330, 15034, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 33918, 198, 198, 6738, 7110, 306, 13, 2364, 1370, ...
2.777523
1,308
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-31 18:44 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 3070, 12, 3132, 1248, 25, 2598, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
# Work out the first ten digits of the sum of the following one-hundred # 50-digit numbers. columns = 50 rows = 100 number = [[0 for i in xrange(columns)] for i in xrange(rows+1)] with open("number.txt") as number_file: for i in xrange(rows): line = (number_file.readline()).strip("\n") for j in xr...
[ 2, 5521, 503, 262, 717, 3478, 19561, 286, 262, 2160, 286, 262, 1708, 530, 12, 71, 3229, 198, 2, 2026, 12, 27003, 3146, 13, 198, 198, 28665, 82, 796, 2026, 198, 8516, 796, 1802, 198, 17618, 796, 16410, 15, 329, 1312, 287, 2124, 952...
2.246711
304
import MySQLdb import time con = MySQLdb.connect( # O nome da tabela é 'mensagens_contatos' host="", user="", password="", port = 0000, db="" ) print(con) # Parametros do cursor estão definidos para retornar um dict c = con.cursor(MySQLdb.cursors.DictCursor) # Função que devolve dados determinados de uma t...
[ 11748, 33476, 9945, 198, 11748, 640, 198, 198, 1102, 796, 33476, 9945, 13, 8443, 7, 1303, 440, 299, 462, 12379, 7400, 10304, 38251, 705, 45535, 363, 641, 62, 3642, 35492, 6, 198, 197, 4774, 2625, 1600, 198, 197, 7220, 2625, 1600, 198,...
2.654596
359
import pandas as pd import re data = pd.read_csv('data/CRDC2013_14.csv', encoding='Latin-1') data_cols = data.columns.tolist() expulsion_cols = [] for col in data_cols : if re.match('SCH_DISCWODIS_EXPWOE_.+_M', col) is not None : expulsion_cols.append(col) expulsion_M = data['TOT_DISCWODIS_EXPZT_M'].su...
[ 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 198, 7890, 796, 279, 67, 13, 961, 62, 40664, 10786, 7890, 14, 9419, 9697, 6390, 62, 1415, 13, 40664, 3256, 21004, 11639, 49022, 12, 16, 11537, 198, 198, 7890, 62, 4033, 82,...
2.285714
175
# -*- coding: utf-8 -*- # Usage: scrapy crawl beyond -a url="https://teambeyond.net/forum/tournaments/164-astronauts-2000-rocket-league-3v3-1217-700pm-est/standings/" import scrapy import validators from ..items import Player import logging TEAMS_SELECTOR = '#ipsTabs_elTourneyTabs_standings_panel > div > div > tabl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 29566, 25, 15881, 88, 27318, 3675, 532, 64, 19016, 2625, 5450, 1378, 15097, 1350, 3243, 13, 3262, 14, 27302, 14, 83, 16950, 14, 23237, 12, 459, 1313, 17712, 12...
2.328744
581
# Copyright (c) 2015, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condit...
[ 2, 15069, 357, 66, 8, 1853, 11, 8180, 10501, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 3...
3.251843
814
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Recurrent network example. Trains a bidirectional vanilla RNN to output the sum of two numbers in a sequence of random numbers sampled uniformly from [0, 1] based on a separate marker sequence. ''' from __future__ import print_function import numpy as np import thea...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 6690, 6657, 3127, 1672, 13, 220, 833, 1299, 257, 8406, 4154, 282, 16858, 371, 6144, 284, 5072, 262, 198...
2.445599
1,443
from django.urls import path, include from . import views urlpatterns = [ path('', views.home, name = 'home'), path('todoApp/', views.home, name = 'home'), path('addTodo/', views.addTodo, name = 'addTodo'), path('deleteTodo/<int:todo_id>/', views.deleteTodo, name = 'deleteTodo'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 11195, 11, 1438, 796, 705, 11195, 33809, 198, 220, 220, 220, 3...
2.555556
117
# A script to gather summary statistics of StarCraft 2 data # Alison Cameron # July 2020 import csv import time from collections import Counter import matplotlib.pyplot as plt from itertools import groupby import sys sys.path.append("../") # to enable importing from plot_util.py from plot_util import make_boxplot de...
[ 2, 317, 4226, 284, 6431, 10638, 7869, 286, 38460, 362, 1366, 198, 2, 33629, 10821, 198, 2, 2901, 12131, 198, 198, 11748, 269, 21370, 198, 11748, 640, 198, 6738, 17268, 1330, 15034, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, ...
2.179024
7,418
""" """ import support import time foo = Foo() start = time.time() try: foo.bar except AttributeError: pass end = time.time() if end-start > 1: raise support.testError("Throwing AttributeError too slow")
[ 37811, 198, 198, 37811, 198, 198, 11748, 1104, 628, 198, 11748, 640, 198, 198, 21943, 796, 36080, 3419, 198, 9688, 796, 640, 13, 2435, 3419, 198, 28311, 25, 198, 220, 220, 220, 22944, 13, 5657, 198, 16341, 3460, 4163, 12331, 25, 198, ...
2.753086
81
# # @lc app=leetcode.cn id=133 lang=python3 # # [133] 克隆图 # # https://leetcode-cn.com/problems/clone-graph/description/ # # algorithms # Medium (65.32%) # Likes: 295 # Dislikes: 0 # Total Accepted: 51.5K # Total Submissions: 78.8K # Testcase Example: '[[2,4],[1,3],[2,4],[1,3]]\n[[]]\n[]' # # 给你无向 连通 图中一个节点的引用,请你...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 13, 31522, 4686, 28, 16945, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 16945, 60, 10263, 26534, 49694, 228, 32368, 122, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 12, 31522, 13, ...
1.23193
2,850
#!/usr/bin/env python import os import sys from glob import glob if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 15095, 1330, 15095, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.74359
39
import numpy as np # Create an array cupcakes = np.array([2, 0.75, 3, 1, 0.5]) # Generate an array from parsed data recipes = np.genfromtxt('recipes.csv', delimiter=',') print recipes # Extract second column information for each rows. eggs = recipes[:, 2] print eggs print eggs == 1 # Extract second row from datas...
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 13610, 281, 7177, 198, 25244, 37263, 796, 45941, 13, 18747, 26933, 17, 11, 657, 13, 2425, 11, 513, 11, 352, 11, 657, 13, 20, 12962, 198, 198, 2, 2980, 378, 281, 7177, 422, 44267, 1366, 1...
3.232044
181
import re, fnmatch from util.BracketTree import * from util.BracketTree.BracketTree import parseBracketTree _REObjectCache = {} ##----------------------------------------------------------------## class TagMatch(object): """docstring for TagMatch""" ##--------------------------------------------------------...
[ 11748, 302, 11, 24714, 15699, 198, 6738, 7736, 13, 9414, 8317, 27660, 1330, 1635, 198, 6738, 7736, 13, 9414, 8317, 27660, 13, 9414, 8317, 27660, 1330, 21136, 9414, 8317, 27660, 198, 198, 62, 2200, 10267, 30562, 796, 23884, 198, 198, 223...
3.387006
354
#!/usr/bin/env python import argparse import rospy import baxter_interface from baxter_interface import CHECK_VERSION from baxter_examples.recorder import JointRecorder def main(): """ Record and write joint states to a text file when OK button is pressed """ arg_fmt = argparse.RawDescriptionHelpFormatter ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 686, 2777, 88, 198, 11748, 275, 40864, 62, 39994, 198, 198, 6738, 275, 40864, 62, 39994, 1330, 5870, 25171, 62, 43717, 198, 6738, 275, 40864, 62, 1...
2.652174
529
from datetime import datetime from cvreviewer import db, login_manager from flask_login import UserMixin @login_manager.user_loader
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 269, 85, 19023, 263, 1330, 20613, 11, 17594, 62, 37153, 198, 6738, 42903, 62, 38235, 1330, 11787, 35608, 259, 628, 198, 31, 38235, 62, 37153, 13, 7220, 62, 29356, 628, 628 ]
3.512821
39
#!/bin/python3 # A Very Big Sum # https://www.hackerrank.com/challenges/a-very-big-sum/problem import os import sys if __name__ == '__main__': f = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) ar = list(map(int, input().rstrip().split())) result = aVeryBigSum(n, ar) f.write(str(result)...
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 317, 9576, 4403, 5060, 198, 2, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 64, 12, 548, 12, 14261, 12, 16345, 14, 45573, 198, 198, 11748, 28686, 198, 11748, 25064, ...
2.308725
149
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
# coding=utf-8 import pickle from keras.preprocessing import sequence from keras.models import load_model import numpy as np CHAR2ID_PATH = '/Users/xieenning/Documents/Codes/text_classification/TextClassification-models/char2id.pickle' INDEX2WORD_PATH = '/Users/xieenning/Documents/Codes/text_classification/TextClassif...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 2298, 293, 198, 6738, 41927, 292, 13, 3866, 36948, 1330, 8379, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 11748, 299, 32152, 355, 45941, 198, 198, 38019, 17, 2389, 62, 34219,...
1.609412
425
import click from parsec.cli import pass_context, json_loads from parsec.decorators import custom_exception, dict_output, _arg_split @click.command('search_jobs') @click.argument("job_info", type=str) @pass_context @custom_exception @dict_output def cli(ctx, job_info): """Return jobs for the current user based p...
[ 11748, 3904, 198, 6738, 1582, 2363, 13, 44506, 1330, 1208, 62, 22866, 11, 33918, 62, 46030, 198, 6738, 1582, 2363, 13, 12501, 273, 2024, 1330, 2183, 62, 1069, 4516, 11, 8633, 62, 22915, 11, 4808, 853, 62, 35312, 198, 198, 31, 12976, ...
2.868966
145
from django.http import HttpResponseRedirect, HttpResponse from django.template import loader from django.shortcuts import get_object_or_404, render, redirect from django.http import Http404 from django.urls import reverse from django.views import generic from django.utils import timezone from django.core import seria...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 11...
3.722222
108
from idcovid19.models.model1 import Model1 from idcovid19.models.model2 import Model2
[ 6738, 4686, 66, 709, 312, 1129, 13, 27530, 13, 19849, 16, 1330, 9104, 16, 198, 6738, 4686, 66, 709, 312, 1129, 13, 27530, 13, 19849, 17, 1330, 9104, 17, 198 ]
2.866667
30
import numpy as np from pickle import dumps as pdumps, loads as ploads import os import json from py3dtiles import TileReader from py3dtiles.points.utils import name_to_filename, node_from_name, SubdivisionType, aabb_size_to_subdivision_type from py3dtiles.points.points_grid import Grid from py3dtiles.points.distance ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2298, 293, 1330, 45514, 355, 279, 67, 8142, 11, 15989, 355, 458, 1170, 82, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 12972, 18, 28664, 2915, 1330, 47870, 33634, 198, 6738, 12972, 18,...
2.672269
238
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2018/12/3 20:28 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com ----------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 628, 220, 220, 220, 2488, 220, 220, 6434, 220, 1058, 220, 220, 220, 220, 220, 220, 279, 1516, ...
1.252968
1,095
import os import subprocess from abc import abstractmethod from denite.source.base import Base # pylint: disable=locally-disabled, import-error import denite.util # pylint: disable=locally-disabled, import-error
[ 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 2853, 578, 13, 10459, 13, 8692, 1330, 7308, 220, 1303, 279, 2645, 600, 25, 15560, 28, 17946, 453, 12, 47730, 11, 1330, 12, 18224, 198, 11748, 285...
3.467742
62
from flask import Flask, request, jsonify, g, make_response, session, render_template, url_for, redirect from flask_compress import Compress from util.saferproxy import SaferProxyFix from util.session_to_dic import session_to_dict from blueprints.analytics import analytics, include, exclude from json import dumps a...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 308, 11, 787, 62, 26209, 11, 6246, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 18941, 198, 6738, 42903, 62, 5589, 601, 1330, 3082, 601, 198, 198, 6738, 7736, 13, 82, 34659, ...
2.806691
269
""" Caml opcodes. See also: http://cadmium.x9c.fr/distrib/caml-instructions.pdf """ opcodes = ( (0, 'ACC0'), (1, 'ACC1'), (2, 'ACC2'), (3, 'ACC3'), (4, 'ACC4'), (5, 'ACC5'), (6, 'ACC6'), (7, 'ACC7'), (8, 'ACC', ('n',)), (9, 'PUSH'), (10, 'PUSHACC0'), (11, 'PUSHACC1'), ...
[ 37811, 7298, 75, 1034, 40148, 13, 198, 198, 6214, 635, 25, 2638, 1378, 66, 324, 76, 1505, 13, 87, 24, 66, 13, 8310, 14, 17080, 822, 14, 20991, 75, 12, 259, 7249, 507, 13, 12315, 198, 198, 37811, 198, 198, 404, 40148, 796, 357, 1...
1.799109
2,245