content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""A TaskRecord backend using mongodb Authors: * Min RK """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of t...
[ 37811, 32, 15941, 23739, 30203, 1262, 285, 506, 375, 65, 198, 198, 30515, 669, 25, 198, 198, 9, 1855, 371, 42, 198, 37811, 198, 2, 10097, 32501, 198, 2, 220, 15069, 357, 34, 8, 3050, 12, 9804, 220, 383, 6101, 7535, 7712, 4816, 198...
2.703588
1,282
# -*- coding: utf-8 -*- # from __future__ import division import sympy from .helpers import untangle2 class WilliamsShunnJameson(object): """ D.M. Williams, L. Shunn, A. Jameson, Symmetric quadrature rules for simplexes based on sphere close packed lattice arrangements, Journal of Computational ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 10558, 88, 198, 198, 6738, 764, 16794, 364, 1330, 1418, 9248, 17, 628, 198, 4871, 6484, 2484, 20935, 14731,...
3.024272
412
""" Unittests for asa plugin Uses the mock_device.py script to test the plugin. """ __author__ = "Dave Wapstra <dwapstra@cisco.com>" import os import yaml import unittest import unicon from unicon import Connection from unicon.core.errors import SubCommandFailure from unicon.mock.mock_device import mockdata_path...
[ 37811, 198, 3118, 715, 3558, 329, 355, 64, 13877, 198, 198, 5842, 274, 262, 15290, 62, 25202, 13, 9078, 4226, 284, 1332, 262, 13877, 13, 198, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 27984, 370, 499, 12044, 1279, 67, 86, 499,...
2.725275
182
import json from grafana_backup.dashboardApi import create_folder
[ 11748, 33918, 198, 6738, 7933, 69, 2271, 62, 1891, 929, 13, 42460, 3526, 32, 14415, 1330, 2251, 62, 43551, 628 ]
3.35
20
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # Meta-info Author: Nelson Brochado Created: 27/02/2016 Updated: 19/09/2017 # Description Towers of Hanoi is a mathematical game. It consists of 3 rods, and a number of disks of different sizes, which can slide onto any rod. The game starts with the disks in a ne...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 2, 30277, 12, 10951, 198, 198, 13838, 25, 12996, 2806, 354, 4533, 198, 198, 41972, 25, 2681, 14,...
2.922385
889
# from .trie import Trie # from .trie import merge from .trie_advanced import Trie from .trie_advanced import merge
[ 2, 422, 764, 83, 5034, 1330, 309, 5034, 198, 2, 422, 764, 83, 5034, 1330, 20121, 198, 6738, 764, 83, 5034, 62, 32225, 2903, 1330, 309, 5034, 198, 6738, 764, 83, 5034, 62, 32225, 2903, 1330, 20121 ]
3.108108
37
from pyspark import SparkConf, SparkContext from google.cloud import storage import json from datetime import datetime SAVE_DIR = 'categories' GCP_BUCKET = 'gs://big_data_econ' sc = SparkContext.getOrCreate() # Read in all json files into an RDD # Use 'wholeTextFiles' to prevent fragmenting of json objects months = s...
[ 6738, 279, 893, 20928, 1330, 17732, 18546, 11, 17732, 21947, 198, 6738, 23645, 13, 17721, 1330, 6143, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 4090, 6089, 62, 34720, 796, 705, 66, 26129, 6, 198, 38, 8697, ...
2.927746
346
import unittest from .. import *
[ 11748, 555, 715, 395, 198, 6738, 11485, 1330, 1635, 628 ]
3.4
10
from django.urls import path from . import views app_name = 'posts' urlpatterns = [ path('', views.post_list, name='post-list'), path('<int:pk>/like/', views.post_like, name='post-like'), path('create/', views.post_create, name='post-create'), path('<int:post_pk>/comments/create/', views.comment_creat...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 24875, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 7353, 62, 4868, 11, 1438, ...
2.656489
131
from django.contrib import admin from .models import Product, UserProduct, Recipe, RecipeIngredient, UserShoppingList admin.site.register(Recipe, RecipeAdmin) admin.site.register(UserProduct, UserProductAdmin) admin.site.register(Product, ProductAdmin) admin.site.register(RecipeIngredient, RecipeIngredientAdmin...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 8721, 11, 11787, 15667, 11, 26694, 11, 26694, 27682, 445, 1153, 11, 11787, 2484, 33307, 8053, 628, 628, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 3...
3.513761
109
import requests from elitedata.fixtures.fixture_fixer import fix_all __author__ = 'Jingyu_Yao' # eddb.io data locations commodities = "http://eddb.io/archive/v3/commodities.json" systems = "http://eddb.io/archive/v3/systems.json" stations_lite = "http://eddb.io/archive/v3/stations_lite.json" fixture_directory = "el...
[ 11748, 7007, 198, 198, 6738, 1288, 863, 1045, 13, 69, 25506, 13, 69, 9602, 62, 13049, 263, 1330, 4259, 62, 439, 198, 198, 834, 9800, 834, 796, 705, 41, 278, 24767, 62, 56, 5488, 6, 198, 198, 2, 1225, 9945, 13, 952, 1366, 7064, 1...
2.550336
149
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jul 16 15:41:33 2019 @author: nooteboom """ import numpy as np import matplotlib.pylab as plt from netCDF4 import Dataset import matplotlib import cartopy.crs as ccrs import seaborn as sns from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 5979, 1467, 1315, 25, 3901, 25, 2091, 13130, 198, 198, 31, 9800, 25, 645, 1258, 21...
2.082483
7,444
# Copyright 2021 Spencer Phillip Young # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 220, 15069, 33448, 15971, 29470, 6960, 198, 2, 198, 2, 220, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 28...
3.556962
237
import autode as ade import numpy as np from autode.methods import ORCA from autode.mol_graphs import make_graph from autode.pes.pes_2d import PES2d ade.Config.n_cores = 24 n_points = 10 if __name__ == '__main__': reac = ade.Reactant('sn2_init.xyz', charge=-1) make_graph(reac) prod = ade.Product('sn2_fin...
[ 11748, 1960, 1098, 355, 512, 68, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1960, 1098, 13, 24396, 82, 1330, 6375, 8141, 198, 6738, 1960, 1098, 13, 43132, 62, 34960, 82, 1330, 787, 62, 34960, 198, 6738, 1960, 1098, 13, 12272, 13, ...
1.850277
541
from __future__ import unicode_literals from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.decorators import method_decorator from django.utils.functional import cached_property from django.utils.translat...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, ...
3.036603
683
import logging from typing import List from pythoncommons.file_utils import FileUtils from pythoncommons.zip_utils import ZipFileUtils from yarndevtools.common.shared_command_utils import CommandType from yarndevtools.constants import ( LATEST_DATA_ZIP_LINK_NAME, ) LOG = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 6738, 21015, 9503, 684, 13, 7753, 62, 26791, 1330, 9220, 18274, 4487, 198, 6738, 21015, 9503, 684, 13, 13344, 62, 26791, 1330, 38636, 8979, 18274, 4487, 198, 198, 6738, 331, 283, 358, 199...
3.08
100
from flask import jsonify, request from markote.api.api_blueprint import api_blueprint from markote.oauth import oauth @api_blueprint.route('/notebooks/<notebook_id>/sections', methods=['POST']) @api_blueprint.route('/sections/<section_id>/pages', methods=['GET'])
[ 6738, 42903, 1330, 33918, 1958, 11, 2581, 198, 6738, 1317, 1258, 13, 15042, 13, 15042, 62, 17585, 4798, 1330, 40391, 62, 17585, 4798, 198, 6738, 1317, 1258, 13, 12162, 1071, 1330, 267, 18439, 628, 198, 31, 15042, 62, 17585, 4798, 13, ...
2.988889
90
import unicode_tex
[ 11748, 28000, 1098, 62, 16886, 198 ]
3.166667
6
# Copyright SYS113 2019. MIT license , see README.md file. # import libraries from re import search from traceback import format_exc from tzlocal import get_localzone from datetime import datetime from platform import system, release, machine from getpass import getuser from os.path import isfile from inspect import ...
[ 2, 15069, 311, 16309, 16616, 13130, 13, 17168, 5964, 837, 766, 20832, 11682, 13, 9132, 2393, 13, 198, 198, 2, 1330, 12782, 220, 198, 6738, 302, 1330, 2989, 198, 6738, 12854, 1891, 1330, 5794, 62, 41194, 198, 6738, 256, 89, 12001, 1330...
4.254545
165
import sys import getopt import numpy as np from kid_readout.utils import acquire if __name__ == '__main__': # Defaults f_initial = np.load('/data/readout/resonances/current.npy') shift_ppm = 0 suffix = "temperature" # Add option? attenuation_list = [41, 38, 35, 32, 29, 26, 23] try: ...
[ 11748, 25064, 198, 11748, 651, 8738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5141, 62, 961, 448, 13, 26791, 1330, 12831, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1303, 2896, 13185, ...
2.105528
398
# Definition for singly-linked list.
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.5
18
# ========================== # general python modules # ========================== import feedparser import os import numpy as np from functools import wraps from threading import Thread import sys # ========================== # python-temegam-bot modules # ========================== from telegram.ext import Updater,...
[ 2, 36658, 2559, 28, 198, 2, 220, 2276, 21015, 13103, 198, 2, 36658, 2559, 28, 198, 11748, 3745, 48610, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 4704, 278, 1330, 14122, ...
4.854945
455
import gym import numpy as np from actor_critic_traces import ActorCriticEligibilityTraces from continuous_actor_critic_tile_coding import ContinuousActorCriticTileCoding NUM_TILINGS = 8 if __name__ == "__main__": do_demo()
[ 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 8674, 62, 22213, 291, 62, 2213, 2114, 1330, 27274, 18559, 291, 36, 4604, 2247, 2898, 2114, 198, 6738, 12948, 62, 11218, 62, 22213, 291, 62, 40927, 62, 66, 7656, 1330, 4...
2.936709
79
import numpy as np from keras import backend as K from sklearn.preprocessing import MinMaxScaler import tensorflow as tf import csv from sklearn.neighbors import KDTree import matplotlib.pyplot as plt from model.config import * from tensorflow.python.ops import * import seaborn as sns import pandas as pd # ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 269, 21370, 198, 6738, 1341, 3572...
2.409836
183
# coding: utf-8 ''' Created on 14 февр. 2018 г. @author: keen ''' import pandas import numpy from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import LabelEncoder import math from scipy import sparse from sklearn.preprocessing import normalize from sklearn.impute import SimpleImputer import ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 7061, 6, 198, 41972, 319, 1478, 220, 141, 226, 16843, 38857, 21169, 13, 2864, 12466, 111, 13, 198, 198, 31, 9800, 25, 13795, 198, 7061, 6, 198, 198, 11748, 19798, 292, 198, 11748, 299, 321...
2.322222
450
import torch import numpy as np import torch.nn as nn
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198 ]
3.111111
18
# Generated by Django 2.0.7 on 2018-07-14 12:01 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 22, 319, 2864, 12, 2998, 12, 1415, 1105, 25, 486, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 6...
2.818182
44
from flask import Flask from flask_sqlalchemy import SQLAlchemy, Model from config import config # base class shared by all models. Needed to instantiate SQLAlchemy object. # globally accessible database connection db = SQLAlchemy(model_class=BaseModel) from models import User, Role, Project, ProjectType, Location...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 11, 9104, 198, 198, 6738, 4566, 1330, 4566, 198, 198, 2, 2779, 1398, 4888, 416, 477, 4981, 13, 10664, 276, 284, 9113, 9386, 16363, 2348, 26599,...
4.025
80
from add_nums_with_return import add_nums total = add_nums(1, 2, 3, 4, 5) print(total)
[ 6738, 751, 62, 77, 5700, 62, 4480, 62, 7783, 1330, 751, 62, 77, 5700, 198, 198, 23350, 796, 751, 62, 77, 5700, 7, 16, 11, 362, 11, 513, 11, 604, 11, 642, 8, 198, 4798, 7, 23350, 8 ]
2.289474
38
import torch if __name__ == '__main__': print(get_all_gpu_names())
[ 11748, 28034, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 4798, 7, 1136, 62, 439, 62, 46999, 62, 14933, 28955 ]
2.615385
26
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose from gammapy.modeling import Parameter, Parameters @pytest.mark.parametrize( "method,value,factor,scale", [ # Check method="scale10" in detail ("scal...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 6738, ...
2.221289
357
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import tempfile import http import infra.network import infra.path import infra.proc import infra.net import infra.e2e_args import suite.test_requirements as reqs APP_SCRIPT = """ return { ["POST text"] = [[ expo...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 24843, 362, 13, 15, 13789, 13, 198, 11748, 20218, 7753, 198, 11748, 2638, 198, 11748, 1167, 430, 13, 27349, 198, 11748, 1167, 430, 13, 6978, 198,...
2.652687
763
import os import sys sys.path.insert(0, os.path.abspath('../')) from sympy import oo from indeterminatebeam.indeterminatebeam import ( Support, Beam, PointTorque, PointLoad, PointLoadV, PointLoadH, DistributedLoad, DistributedLoadV, DistributedLoadH, TrapezoidalLoad, Tr...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 6, 4008, 198, 198, 6738, 10558, 88, 1330, 267, 78, 198, 6738, 773, 13221, 378, 40045, 13, 521, 13221, 37...
2.861111
252
#!/usr/bin/env python from typing import Optional from fastapi import FastAPI, HTTPException import uvicorn import sys from os import path import nest_asyncio nest_asyncio.apply() SRC_PATH = './src' sys.path.insert(0, SRC_PATH) app = FastAPI() from hugging_classifier import HuggingClassifier, model_param_bert_pt, NE...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 19720, 1330, 32233, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 14626, 16922, 198, 11748, 334, 25531, 1211, 198, 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 11748, 16343, 62...
2.670068
294
#!/usr/bin/env python #import freenect import rospy from cv_bridge import CvBridge, CvBridgeError import numpy as np import cv2 import time from matplotlib import pyplot as plt import copy from sensor_msgs.msg import Image from sensor_msgs.msg import CameraInfo # calibrate kinect to world # https://github.com/amill...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 198, 2, 11748, 277, 1361, 478, 198, 11748, 686, 2777, 88, 198, 6738, 269, 85, 62, 9458, 1330, 327, 85, 37385, 11, 327, 85, 37385, 12331, 198, 11748, 299, 32152, 355, 45941, 198,...
2.53304
227
# -*- coding: utf-8 -*- # Copyright (c) 2014-2016 Tigera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1946, 12, 5304, 17030, 64, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1...
3.233766
385
import re from .base import first_element, BaseResponseMixin, BaseElementWrapper from lxml import etree class ProductError(ValueError, BaseElementWrapper): """ Error wrapper for any error returned back for any call to the Products api. """ namespaces = { 'a': 'http://mws.amazonservices.com/sc...
[ 11748, 302, 198, 6738, 764, 8692, 1330, 717, 62, 30854, 11, 7308, 31077, 35608, 259, 11, 7308, 20180, 36918, 2848, 198, 6738, 300, 19875, 1330, 2123, 631, 628, 198, 198, 4871, 8721, 12331, 7, 11395, 12331, 11, 7308, 20180, 36918, 2848, ...
2.668317
202
import numpy as np rgb1 = np.array(np.arange(8 * 8 * 3).reshape((8, 8, 3)), dtype='uint8') toGray(rgb1) rgb2 = np.array( [[[ 0, 0, 2], [ 2, 3, 5], [ 6, 7, 9], [ 9, 10, 12], [ 11, 12, 14], [ 14, 15, 17], [ 17, 18, 20], [ 20, 21, 23]], [[ 23, 24, 26], [ 26, 27, 29], [ ...
[ 11748, 299, 32152, 355, 45941, 628, 198, 81, 22296, 16, 796, 45941, 13, 18747, 7, 37659, 13, 283, 858, 7, 23, 1635, 807, 1635, 513, 737, 3447, 1758, 19510, 23, 11, 807, 11, 513, 36911, 288, 4906, 11639, 28611, 23, 11537, 198, 1462, ...
1.87876
1,097
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding: utf-8 # Copyright 2014 Orange # # 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 # # Un...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 2, 15069, 1946, 11942, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357,...
3.627119
177
from asciimatics.widgets import Frame, ListBox, Layout, Divider, Text, \ Button, TextBox, Widget from asciimatics.scene import Scene from asciimatics.screen import Screen from asciimatics.exceptions import ResizeScreenError, NextScene, StopApplication import data import sys import sqlite3 last_scene = None while T...
[ 6738, 355, 979, 320, 23372, 13, 28029, 11407, 1330, 25184, 11, 7343, 14253, 11, 47639, 11, 4777, 1304, 11, 8255, 11, 3467, 198, 220, 220, 220, 20969, 11, 8255, 14253, 11, 370, 17484, 198, 6738, 355, 979, 320, 23372, 13, 29734, 1330, ...
2.894118
170
from datetime import datetime, timedelta from test.adr_event_generator import AdrEvent, AdrEventStatus, generate_payload from unittest import mock import pytest from freezegun import freeze_time from oadr2 import controller, event from oadr2.poll import OpenADR2 from oadr2.schemas import NS_A TEST_DB_ADDR = "%s/test...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 1332, 13, 41909, 62, 15596, 62, 8612, 1352, 1330, 1215, 81, 9237, 11, 1215, 81, 9237, 19580, 11, 7716, 62, 15577, 2220, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, ...
2.675777
14,672
# Uses python3 import sys if __name__ == '__main__': input = sys.stdin.read(); n, m = map(int, input.split()) print(get_fibonacci_huge_naive(n, m))
[ 2, 36965, 21015, 18, 198, 11748, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5128, 796, 25064, 13, 19282, 259, 13, 961, 9783, 198, 220, 220, 220, 299, 11, 285, 796, 3975, 7, 600, ...
2.3
70
import cv2 import os import random from deeplab.utils.picture_utils import * # png_file_path = r'E:\leftImg8bit_demoVideo\leftImg8bit\demoVideo\stuttgart_01\stuttgart_01_000000_000001_leftImg8bit.png' output_video_path = '/media/xzq/DA18EBFA09C1B27D/exp/train_on_train_set/video/stuttgart_01.mp4' files = os.listdir('...
[ 11748, 269, 85, 17, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 390, 68, 489, 397, 13, 26791, 13, 34053, 62, 26791, 1330, 1635, 628, 198, 198, 2, 279, 782, 62, 7753, 62, 6978, 796, 374, 6, 36, 7479, 9464, 3546, 70, 23, 2545, ...
1.749656
727
# urls.py from django.conf.urls import url from apps.todo.views import TaskCreate from apps.todo.views import TaskList from apps.todo.views import TaskRetrieve from apps.todo.views import TaskUpdate from apps.todo.views import TaskDestroy from apps.todo.views import TaskIndex urlpatterns = [ url(r'new-task/$', Ta...
[ 2, 2956, 7278, 13, 9078, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 6725, 13, 83, 24313, 13, 33571, 1330, 15941, 16447, 198, 6738, 6725, 13, 83, 24313, 13, 33571, 1330, 15941, 8053, 198, 6738, 6725, 13, ...
2.510791
278
# MissingInteger - Find the smallest positive integer that does not occur in a given sequence. # Given an array A of N integers, returns the smallest positive integer (greater than 0) # that does not occur in A. # For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. # A = [1, 2...
[ 2, 25639, 46541, 532, 9938, 262, 18197, 3967, 18253, 326, 857, 407, 3051, 287, 257, 1813, 8379, 13, 220, 198, 2, 11259, 281, 7177, 317, 286, 399, 37014, 11, 5860, 262, 18197, 3967, 18253, 357, 18223, 263, 621, 657, 8, 220, 198, 2, ...
2.710843
249
import click @click.group('create') @command_group.command()
[ 11748, 3904, 628, 198, 31, 12976, 13, 8094, 10786, 17953, 11537, 628, 198, 31, 21812, 62, 8094, 13, 21812, 3419, 198 ]
3.095238
21
from datetime import datetime from pathlib import Path from tempfile import TemporaryDirectory from fetchmesh.bgp import Collector, RISCollector, RouteViewsCollector
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 198, 6738, 21207, 76, 5069, 13, 65, 31197, 1330, 17573, 11, 45698, 31337, 273, 11, 18956, 7680, 82, 31337, 273, 628...
3.976744
43
from .basefile import BaseAnVILFile from .basefolder import BaseAnVILFolder from .google import GoogleAnVILFile import gs_chunked_io as gscio
[ 6738, 764, 8692, 7753, 1330, 7308, 2025, 53, 4146, 8979, 198, 6738, 764, 8692, 43551, 1330, 7308, 2025, 53, 4146, 41092, 198, 6738, 764, 13297, 1330, 3012, 2025, 53, 4146, 8979, 198, 198, 11748, 308, 82, 62, 354, 2954, 276, 62, 952, ...
3.041667
48
# (C) Copyright 2021 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernmenta...
[ 2, 357, 34, 8, 15069, 33448, 13182, 14326, 37, 13, 198, 2, 198, 2, 770, 3788, 318, 11971, 739, 262, 2846, 286, 262, 24843, 10483, 594, 10628, 362, 13, 15, 198, 2, 543, 460, 307, 6492, 379, 2638, 1378, 2503, 13, 43073, 13, 2398, ...
3.69697
132
from django.contrib.contenttypes.models import ContentType from django.db import models from django.db import connection from pierre.site_search.settings import SORT_MAPPINGS # Adapted from http://www.djangosnippets.org/snippets/1328/ class IndexField (models.Field): """ Field type used by Postgres for full-t...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 1330, 4637, 198, 198, 6738, 17748, 260, 13, 15654, 62, 12947, 13, 33692...
2.994012
167
import rethinkdb from django.conf import settings from django.contrib.sessions.backends.base import SessionBase,CreateError from django.utils import timezone import time ##push defaults SESSION_RETHINK_HOST = getattr(settings, 'SESSION_RETHINK_HOST', 'localhost') SESSION_RETHINK_PORT = getattr(settings, 'SESSION_RET...
[ 11748, 36437, 9945, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 6202, 13, 1891, 2412, 13, 8692, 1330, 23575, 14881, 11, 16447, 12331, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 113...
2.772947
207
import pathlib from roo.files.rprofile import RProfile import textwrap from roo.files.rprofile import _find_rprofile_marker_zone
[ 11748, 3108, 8019, 198, 198, 6738, 686, 78, 13, 16624, 13, 81, 13317, 1330, 371, 37046, 198, 11748, 2420, 37150, 198, 198, 6738, 686, 78, 13, 16624, 13, 81, 13317, 1330, 4808, 19796, 62, 81, 13317, 62, 4102, 263, 62, 11340, 628, 628...
3.044444
45
# Generated by Django 2.0.2 on 2018-02-10 10:22 import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 2864, 12, 2999, 12, 940, 838, 25, 1828, 198, 198, 11748, 42625, 14208, 13, 7295, 13, 12102, 2024, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, ...
2.951613
62
from casbin import persist from casbin import model from .file_adapter import FileAdapter import os
[ 6738, 6124, 8800, 1330, 21160, 198, 6738, 6124, 8800, 1330, 2746, 198, 6738, 764, 7753, 62, 324, 3429, 1330, 9220, 47307, 198, 11748, 28686 ]
4.125
24
""" Copyright (c) 2018 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
[ 37811, 198, 15269, 357, 66, 8, 2864, 8180, 10501, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
3.172775
382
from utils.mixins import CustomModelForm from .models import Card from utils.models import Configuration from django import forms from utils.custom_form_widgets import MonthYearWidget
[ 6738, 3384, 4487, 13, 19816, 1040, 1330, 8562, 17633, 8479, 198, 6738, 764, 27530, 1330, 5172, 198, 6738, 3384, 4487, 13, 27530, 1330, 28373, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 3384, 4487, 13, 23144, 62, 687, 62, 28029, 114...
4
46
###################################################################### ###################################################################### # Copyright Tsung-Hsien Wen, Cambridge Dialogue Systems Group, 2017 # ###################################################################### ####################################...
[ 29113, 29113, 4242, 2235, 198, 29113, 29113, 4242, 2235, 198, 2, 220, 15069, 309, 9854, 12, 39, 82, 2013, 31164, 11, 14457, 34709, 11998, 4912, 11, 2177, 1303, 198, 29113, 29113, 4242, 2235, 198, 29113, 29113, 4242, 2235, 198, 11748, 10...
5.597826
92
import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from torchvision.datasets import CIFAR10 import torchvision.transforms as transforms import torchvision.utils as vutils import os from tqdm import tqdm from discriminator import Discriminator from generator import Generator from ...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 327, 5064, 1503, 940, 198, 11748, 28034, 1017...
2.173241
2,459
#!/usr/bin/env python3 # MIT License # # Copyright (C) 2019-2020, Entynetproject. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 34, 8, 13130, 12, 42334, 11, 7232, 2047, 316, 16302, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, ...
3.727763
371
import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import uic app = QtWidgets.QApplication(sys.argv) window = MainWindow() window.show() app.exec_()
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 6738, 9485, 48, 83, 20, 1330, 334, 291, 628, 198, 198, 1324, 796, 33734, 54, 312, 11407, 13, 48, 23416, 7, 17597, ...
2.578125
64
""" Support for file variables. """ import sys import copy import os import shutil from six import iteritems #Public Symbols __all__ = ['FileRef'] _file_meta = { 'binary': bool, } class FileRef(object): """ A reference to a file on disk. As well as containing metadata information, it supports :meth:...
[ 37811, 198, 15514, 329, 2393, 9633, 13, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 4866, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 2237, 1330, 11629, 23814, 198, 198, 2, 15202, 41327, 10220, 198, 834, 439, 834, 796, 3725...
2.287456
1,148
##@package producer #@author Sebastien MATHIEU import os,shutil, csv from .agent.stateAgent import StateAgent from .fsu import FSU from .fsp import FSP from .brp import BRP from . import options,tools from .spbid import SPBid, SPObligationBid ## Producer agent.
[ 2235, 31, 26495, 9920, 201, 198, 2, 31, 9800, 22787, 2013, 337, 12599, 10008, 52, 201, 198, 201, 198, 11748, 28686, 11, 1477, 22602, 11, 269, 21370, 201, 198, 201, 198, 6738, 764, 25781, 13, 5219, 36772, 1330, 1812, 36772, 201, 198, ...
2.708738
103
# Generated by Django 2.2.3 on 2019-07-16 18:58 from django.db import migrations, models import rooms.models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 13130, 12, 2998, 12, 1433, 1248, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 9519, 13, 27530, 628 ]
3
37
# Generated by Django 3.1.5 on 2021-01-22 13:52 from django.db import migrations, models import safe_transaction_service.contracts.models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 486, 12, 1828, 1511, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 198, 11748, 3338, 62, 7645, 2673, 62, 15271, 13, 28484, 82, 13,...
3.065217
46
import re from decimal import Decimal import math import pandas as pd import numpy as np from scipy.optimize import curve_fit from scipy.interpolate import UnivariateSpline from scipy.special import lambertw from lmfit import Model, Parameters from uncertainties import ufloat def logWithZeros(x): ''' return lo...
[ 11748, 302, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 10688, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 198, 6738, 629, 541, 88, 13...
2.235294
646
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
[ 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, ...
3.307958
289
from assertpy import assert_that from src.utils.strings.streams import indent_lines, truncate_lines
[ 6738, 6818, 9078, 1330, 6818, 62, 5562, 198, 198, 6738, 12351, 13, 26791, 13, 37336, 13, 5532, 82, 1330, 33793, 62, 6615, 11, 40122, 378, 62, 6615, 628, 198 ]
3.551724
29
import copy import matplotlib.pyplot as plt import numpy import numpy as np import pandas as pd from tqdm import tqdm from .utils import _find_cols, _update_feature_name from .utils import ohe_to_ord as alibi_ohe_to_ord from .utils import ord_to_ohe as alibi_ord_to_ohe np.random.seed(555)
[ 11748, 4866, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 19...
2.596639
119
//Problem - https://www.codechef.com/MAY21B/problems/MODEQ for _ in range(int(input())): n,m = list(map(int,input().split())) count = 0 mod = [1]*(n+1) for i in range(2,n+1): x = m % i count += mod[x] for j in range(x,n+1,i): mod[j] += 1 print(count)
[ 1003, 40781, 532, 3740, 1378, 2503, 13, 19815, 721, 258, 69, 13, 785, 14, 44, 4792, 2481, 33, 14, 1676, 22143, 14, 49058, 48, 198, 198, 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 197, 77, 11, 76, 796, 1351, 7, 88...
2.081967
122
#!/usr/bin/python # coding:utf-8 import pymysql from managehtml import * from md5 import * import os sqlservername='localhost' sqluser='simpledrive' sqlpasswd='simpledrive' sqldatabase='simpledrive'
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 19617, 25, 40477, 12, 23, 201, 198, 201, 198, 11748, 279, 4948, 893, 13976, 201, 198, 6738, 6687, 6494, 1330, 1635, 201, 198, 6738, 45243, 20, 1330, 1635, 201, 198, 11748, 28686, 20...
2.52381
84
import matrices_new_extended as mne import numpy as np import sympy as sp from equality_check import Point x, y, z = sp.symbols("x y z") Point.base_point = np.array([x, y, z, 1])
[ 11748, 2603, 45977, 62, 3605, 62, 2302, 1631, 355, 285, 710, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10558, 88, 355, 599, 198, 6738, 10537, 62, 9122, 1330, 6252, 198, 198, 87, 11, 331, 11, 1976, 796, 599, 13, 1837, 2022, 102...
2.661765
68
""" Wrap plotting functionality """ from bokeh.embed import components from bokeh.plotting import figure from bokeh.resources import INLINE from bokeh.util.string import encode_utf8 from bokeh.charts import Bar
[ 37811, 198, 220, 220, 220, 41028, 29353, 11244, 198, 37811, 198, 198, 6738, 1489, 365, 71, 13, 20521, 1330, 6805, 198, 6738, 1489, 365, 71, 13, 29487, 889, 1330, 3785, 198, 6738, 1489, 365, 71, 13, 37540, 1330, 3268, 24027, 198, 6738,...
3.323077
65
import datetime from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from core.models import MatierePremiere, Biocarburant, Pays, Entity, ProductionSite, Depot from certificates.models import ISCCCertificate, DBSCertificate from api.v3.common.urls import urlpa...
[ 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 4755, 13, 2...
3.272727
121
from database_connector import connect, postgresql_to_dataframe import pandas as pd from pandas.api.types import CategoricalDtype import datetime import textdistance import difflib import hashlib import pickle from dil_preprocess import get_url_data, basic_pruning from dil_predict import init, predict_trees, reduce_le...
[ 6738, 6831, 62, 8443, 273, 1330, 2018, 11, 1281, 34239, 13976, 62, 1462, 62, 7890, 14535, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 15042, 13, 19199, 1330, 327, 2397, 12409, 35, 4906, 198, 11748, 4818, 8079, 198...
2.33203
13,047
#!/usr/bin/python3 """ definition file for 2 dc motors on an adafruit DC and stepper motor HAT, 'left' and 'right'. The motors can have rotary encoders and can use a speed mapping table to provide something approaching a linear response. The configuration is defined by a list of motors. Each entry in the list define...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 220, 198, 46758, 2393, 329, 362, 30736, 24699, 319, 281, 512, 1878, 4872, 6257, 290, 2876, 2848, 5584, 367, 1404, 11, 705, 9464, 6, 290, 705, 3506, 4458, 198, 198, 464, 24699, 46...
2.959835
971
import socket import struct import textwrap TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t - ' DATA_TAB_2 = '\t\t - ' DATA_TAB_3 = '\t\t\t - ' DATA_TAB_4 = '\t\t\t\t - ' # unpack ethernet frame # Translate MAC address # unpack IPv4 packe...
[ 11748, 17802, 201, 198, 11748, 2878, 201, 198, 11748, 2420, 37150, 201, 198, 201, 198, 5603, 33, 62, 16, 796, 705, 59, 83, 532, 705, 201, 198, 5603, 33, 62, 17, 796, 705, 59, 83, 59, 83, 532, 705, 201, 198, 5603, 33, 62, 18, 7...
1.996644
298
#!/usr/bin/python from os.path import join,exists,dirname import numpy as np import pickle from sklearn.datasets import load_svmlight_file, dump_svmlight_file from sklearn.metrics import f1_score from uda_common import zero_pivot_columns, zero_nonpivot_columns, read_pivots, evaluate_and_print_scores, align_test_X_train...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 1069, 1023, 11, 15908, 3672, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 82...
3.548747
359
#!/usr/bin/env python # coding=utf-8 import inkex # --------------------------------- # UTILITIES # Common standards UPPERCASE_PREFIXES = { chr(15): 0x2828, # uppercase prefix: https://codepoints.net/U+000F } LOUIS_BRAILLE_NUMBERS_PREFIX = 0x283c # Louis Braille's numbers prefix LOUIS_BRAILLE_NUMBERS = { ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 287, 365, 87, 198, 198, 2, 20368, 12, 198, 198, 2, 19255, 4146, 30383, 198, 198, 2, 8070, 5423, 198, 198, 8577, 18973, 34, 11159, 62, ...
1.759798
6,124
"""Neuron simulation functions and NetworkBuilder class.""" # Authors: Mainak Jas <mjas@mgh.harvard.edu> # Sam Neymotin <samnemo@gmail.com> # Blake Caldwell <blake_caldwell@brown.edu> from copy import deepcopy import numpy as np from neuron import h # This is due to: https://github.com/neuronsimul...
[ 37811, 8199, 44372, 18640, 5499, 290, 7311, 32875, 1398, 526, 15931, 198, 198, 2, 46665, 25, 8774, 461, 21961, 1279, 76, 28121, 31, 76, 456, 13, 9869, 10187, 13, 15532, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3409, ...
2.041335
9,919
import requests url = 'https://notify-api.line.me/api/notify'#LINE NotifyのAPIのURL token = '2RNdAKwlaj69HK0KlEdMX1y575gDWNKrPpggFcLnh82' #自分のアクセストークン ms = "新たなソフトを開くと負担が過剰にかかってしまいます。"#送信する通知内容 while True: now=dt.('cpu_temps') dt = getCpuTempFromFile(data_file) #CPU温度取得 print(cpu_temps) if print(cpu_tem...
[ 11748, 7007, 198, 198, 6371, 796, 705, 5450, 1378, 1662, 1958, 12, 15042, 13, 1370, 13, 1326, 14, 15042, 14, 1662, 1958, 6, 2, 24027, 1892, 1958, 5641, 17614, 5641, 21886, 198, 30001, 796, 705, 17, 42336, 67, 10206, 40989, 1228, 3388,...
1.578073
301
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ from flask import Flask, render_template, request # Initialize the Flask application app = Flask(__name__) # Default route, print user's IP @app.route('/') if __name__ == '__main__': app.run()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 55, 84, 44, 278, 171, 120, 230, 87, 12595, 21, 1731, 31, 38227, 13, 785, 8, 198, 31, 11213, 25, 220, 198, 37811, 198, 198, 6738, 42903, 1...
2.572727
110
# -*- coding: utf-8 -*- """ Created on Wed Aug 5 22:01:45 2020 @author: PRAFULL """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2447, 220, 642, 2534, 25, 486, 25, 2231, 12131, 198, 198, 31, 9800, 25, 350, 3861, 37, 9994, 198, 37811, 628 ]
2.175
40
#!/usr/bin/env python # Part 5: Measure Twice, Test Once # Jason Meil Attempt 2 DS3 Unit 3 Sprint 1 060219 import unittest from acme_JM import Product from acme_report import generate_products, ADJECTIVES, NOUNS class AcmeProductTests(unittest.TestCase): """Making sure Acme products are the tops!""" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 2142, 642, 25, 24291, 41217, 11, 6208, 4874, 201, 198, 2, 8982, 2185, 346, 25770, 362, 17400, 18, 11801, 513, 23178, 352, 657, 1899, 28896, 201, 198, 201, 198, 1174...
2.357562
853
#!/usr/bin/env python3 import argparse import subprocess from os.path import isfile import os import sys import time import signal from datetime import datetime stopping=False if __name__=="__main__": ret = main(sys.argv) sys.exit(ret)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 6737, 198, 6738, 4818...
2.850575
87
from datetime import datetime from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app from backend import db, ma # TODO: Implement Schema for each of our tables # Marshmallow is used for serialization/deserialization of Python data types for API calls
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 663, 38537, 516, 1330, 5045, 276, 40386, 13908, 11712, 1300, 32634, 7509, 355, 23283, 7509, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 30203, 1330, 20613, 11, 17266, 628, 198, 198, ...
3.949367
79
from __future__ import print_function from colorama import Fore import os import sys from plugin import plugin @plugin('file organise') class File_Organise(): """ Type file_organise and follow instructions It organises selected folder based on extension """
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3124, 1689, 1330, 4558, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 13877, 1330, 13877, 628, 198, 31, 33803, 10786, 7753, 42386, 11537, 198, 4871, 9220, 62, 26121, 786, 33529,...
3.68
75
import grelok_subroutines as gs # TODO: FSM seems like the best approach for this RPG # TODO: Use JSON format for storing text and FSM gs.routine_010() key = gs.routine_100() gs_100_mapped = gs.routine_100_map(key) if isinstance(gs_100_mapped, str): print(gs_100_mapped) else: if gs_100_mapped == 17: ...
[ 11748, 308, 2411, 482, 62, 7266, 81, 448, 1127, 355, 308, 82, 198, 198, 2, 16926, 46, 25, 376, 12310, 2331, 588, 262, 1266, 3164, 329, 428, 12909, 198, 2, 16926, 46, 25, 5765, 19449, 5794, 329, 23069, 2420, 290, 376, 12310, 198, 1...
2.324324
148
from typing import List from pddl.domain_duration import DomainDuration from pddl.domain_formula import DomainFormula from pddl.domain_assignment import DomainAssignment from pddl.domain_inequality import DomainInequality from pddl.probabilistic_effect import ProbabilisticEffect from pddl.domain_effect import Effect, T...
[ 6738, 19720, 1330, 7343, 198, 6738, 279, 1860, 75, 13, 27830, 62, 32257, 1330, 20021, 26054, 198, 6738, 279, 1860, 75, 13, 27830, 62, 687, 4712, 1330, 20021, 8479, 4712, 198, 6738, 279, 1860, 75, 13, 27830, 62, 562, 16747, 1330, 20021...
3.361111
144
""" An AppProvider Service Provider """ from config import application, middleware, storage from masonite.autoload import Autoload from masonite.commands import (AuthCommand, CommandCommand, ControllerCommand, InfoCommand, InstallCommand, JobCommand, KeyCo...
[ 37811, 1052, 2034, 29495, 4809, 32549, 37227, 198, 198, 6738, 4566, 1330, 3586, 11, 3504, 1574, 11, 6143, 198, 198, 6738, 285, 888, 578, 13, 2306, 349, 1170, 1330, 5231, 349, 1170, 198, 6738, 285, 888, 578, 13, 9503, 1746, 1330, 357, ...
2.450935
428
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. and Epidemico Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 15069, 10897, 1574, 3457, 13, 290, 38437, 3713, 3457, 13, 198, 2, ...
2.482827
1,514
import matplotlib.pyplot as plt import numpy as np import tikzplotlib read_dataset_Set_sd = np.genfromtxt('results/set_epochs_200_recording_dis_sd/SET__fashion_mnist_for_200_epochs_20210603-164315_num_sd_None_sd_lap__sd_dis_.csv',delimiter='') perc_change_sd = np.diff(read_dataset_Set_sd) / read_dataset_Set_sd[:-1] *...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 256, 1134, 89, 29487, 8019, 628, 198, 961, 62, 19608, 292, 316, 62, 7248, 62, 21282, 796, 45941, 13, 5235, 6738, 14116, 10786, 43...
2.230047
213
''' Set caseleds led strip through 'f' (frame) command. A hifive1 running hifive1-argb-fxl must be connected through USB. ''' import math import serial from pyutil.delayedkeyboardinterrupt import DelayedKeyboardInterrupt UART='/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if01-port0' baudrate = 115200
[ 7061, 6, 198, 7248, 6124, 417, 5379, 2957, 10283, 832, 705, 69, 6, 357, 14535, 8, 3141, 13, 198, 32, 289, 361, 425, 16, 2491, 289, 361, 425, 16, 12, 853, 65, 12, 21373, 75, 1276, 307, 5884, 832, 8450, 13, 198, 7061, 6, 198, 11...
2.752294
109
import komand from .schema import SchedReportInput, SchedReportOutput # Custom imports below
[ 11748, 479, 296, 392, 198, 6738, 764, 15952, 2611, 1330, 27774, 19100, 20560, 11, 27774, 19100, 26410, 198, 198, 2, 8562, 17944, 2174, 628 ]
3.958333
24
''' 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 示例: 输入:(2 -> 4 -> 3) + (5 -> 6 -> 4) 输出:7 -> 0 -> 8 原因:342 + 465 = 807 ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x #...
[ 7061, 6, 198, 163, 119, 247, 49035, 118, 10310, 97, 10310, 103, 1849, 165, 251, 252, 163, 102, 118, 13328, 248, 226, 165, 241, 122, 26193, 101, 18796, 101, 30266, 98, 26193, 101, 163, 97, 118, 10310, 97, 10310, 103, 165, 251, 252, ...
0.901299
385
# 2 tea shops sell tea at the price of 15 and 30 rupees per cup. Input the number of cups a person buys from the first shop, then input the number of cups a person buys from the second shop and tell the customer the total bill. price_first_shop = 15 price_second_shop = 30 items_first_shop = int(input("How many tea cup...
[ 2, 362, 8887, 12437, 3677, 8887, 379, 262, 2756, 286, 1315, 290, 1542, 7422, 42623, 583, 6508, 13, 23412, 262, 1271, 286, 14180, 257, 1048, 24779, 422, 262, 717, 6128, 11, 788, 5128, 262, 1271, 286, 14180, 257, 1048, 24779, 422, 262, ...
3.341176
255
import multiprocessing as mp import os import shutil import sys import time import numpy as np # from tool_packages.magphase import libutils as lu # from tool_packages.magphase import magphase as mp from util import file_util, log_util, system_cmd_util log = log_util.get_logger("extract vocoder features") fs_nFFT_d...
[ 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 422, 2891, 62, 43789, 13, 19726, 40715, 1330, 9195, 26791, 355,...
2.104977
7,354
from ukpocopy import postcodes from ukpocopy import validators from ukpocopy import exceptions
[ 6738, 334, 74, 79, 420, 11081, 1330, 1281, 40148, 198, 6738, 334, 74, 79, 420, 11081, 1330, 4938, 2024, 198, 6738, 334, 74, 79, 420, 11081, 1330, 13269, 198 ]
3.275862
29
# # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ 198, 198, 2, 198, 2, 15069, 13130, 1395, 346, 28413, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262,...
3.478673
211
""" Having a registry of all available classes is convenient for retrieving an instance based on a configuration at run-time. """ import logging from collections import OrderedDict from plato.config import Config if hasattr(Config().trainer, 'use_mindspore'): from plato.datasources.mindspore import ( mni...
[ 37811, 198, 14698, 257, 20478, 286, 477, 1695, 6097, 318, 11282, 329, 50122, 281, 4554, 198, 3106, 319, 257, 8398, 379, 1057, 12, 2435, 13, 198, 37811, 198, 198, 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 67...
2.192005
1,651
''' This project is derived from the course work and is an extension of the course work. Due to the source of the dataset itself, the dataset needs to be pre-processed before it can be called. Author: Bruce Hou, Email: ecstayalive@163.com ''' import scipy.io as scio import matplotlib.pyplot as plt import numpy as np ...
[ 7061, 6, 198, 1212, 1628, 318, 10944, 422, 262, 1781, 670, 198, 392, 318, 281, 7552, 286, 262, 1781, 670, 13, 14444, 198, 1462, 262, 2723, 286, 262, 27039, 2346, 11, 262, 198, 19608, 292, 316, 2476, 284, 307, 662, 12, 14681, 276, ...
1.701607
2,614