content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import unittest from Aggregation import Aggregation if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 19015, 43068, 1330, 19015, 43068, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.970588
34
# coding: utf-8 from PIL import Image, ImageDraw import numpy as np lena = Image.open("lena.bmp") mask1 = np.array([[0 , 1 , 0], [1 ,-4 , 1], [0 , 1 , 0]]) mask2 = (1/3) * np.array([[1, 1, 1], [1,-8, 1], [1, 1, 1]]) minimum_...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 11748, 299, 32152, 355, 45941, 628, 220, 220, 220, 220, 198, 75, 8107, 796, 7412, 13, 9654, 7203, 75, 8107, 13, 65, 3149, 4943, 198,...
1.543789
2,238
from Engine.network import Net
[ 6738, 7117, 13, 27349, 1330, 3433, 628, 628 ]
4.25
8
""" State.py ======== Perform actions of the rocket and manage state. `hooks` is a dictionary mapping a hook string to a list of functions to thread when the hook occurs. """ import datetime from os import system from threading import Thread
[ 37811, 198, 9012, 13, 9078, 198, 2559, 198, 5990, 687, 4028, 286, 262, 10701, 290, 6687, 1181, 13, 198, 198, 63, 25480, 82, 63, 318, 257, 22155, 16855, 257, 8011, 4731, 284, 257, 220, 198, 4868, 286, 5499, 284, 4704, 618, 262, 8011,...
3.828125
64
import sys if __name__ == '__main__': if len(sys.argv) < 5: print("Error: too few arguments") print("Usage: python3 %s <input-filename> <output-filename> <sample-size> <threshold>" % (sys.argv[0])) sys.exit() input_filename = sys.argv[1] output_filename = sys.argv[2] sample_siz...
[ 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 1279, 642, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 12331, 25, 1165, 1178, ...
2.223856
612
import sys import os sys.path.append(os.path.abspath('../')) from unittest import TestCase from komand_recorded_future.connection.connection import Connection from komand_recorded_future.actions.lookup_vulnerability import LookupVulnerability import json import logging
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 6, 4008, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 479, 296, 392, 62, 47398, 62, 37443, 13, 386...
3.578947
76
""" demo06_vc.py 验证曲线 """ import numpy as np import sklearn.preprocessing as sp import sklearn.ensemble as se import sklearn.model_selection as ms import matplotlib.pyplot as mp # 读取文件 data = np.loadtxt('../ml_data/car.txt', delimiter=',', dtype='U20', converters={0:f, 1:f, 2:f, 3:f, 4:f, 5:f, 6:f}) # 整理训练集的输入与输...
[ 37811, 198, 9536, 78, 3312, 62, 28435, 13, 9078, 220, 220, 16268, 103, 234, 46237, 223, 162, 249, 110, 163, 118, 123, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 3866, 36948, 355, 599, 198, 11748, 1341...
1.754156
1,143
import functools import numpy as np import settings from imagenetmod.interface import imagenet from cifar10 import cifar10_input
[ 11748, 1257, 310, 10141, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 11748, 6460, 201, 198, 201, 198, 6738, 3590, 268, 316, 4666, 13, 39994, 1330, 3590, 268, 316, 201, 198, 6738, 269, 361, 283, 940, 1330, 269, 361, ...
2.8
50
from flask import Flask from flask_apscheduler import APScheduler from trivia.config import configs scheduler: APScheduler = None
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 499, 1416, 704, 18173, 1330, 3486, 50, 1740, 18173, 198, 198, 6738, 44782, 13, 11250, 1330, 4566, 82, 198, 198, 1416, 704, 18173, 25, 3486, 50, 1740, 18173, 796, 6045, 628 ]
3.410256
39
t = int(input("Input: ")) for i in range(t) : ans = '' for j in range(i+1) : ans += str(cal(i,j)) + " " ###print(f"({i},{j} )",end=" ") print(ans)
[ 83, 796, 493, 7, 15414, 7203, 20560, 25, 366, 4008, 201, 198, 1640, 1312, 287, 2837, 7, 83, 8, 1058, 201, 198, 220, 9093, 796, 10148, 201, 198, 220, 329, 474, 287, 2837, 7, 72, 10, 16, 8, 1058, 201, 198, 220, 220, 220, 9093, 1...
1.930233
86
""" Functions common to both neural networks """ import math import numpy as np import data_util import test_util import feed_forward_nn import elman_rnn from nn_globals import NetHyperparams from nn_globals import OUTPUT_DIM, NUM_VARS def stochastic_gradient_descent(network_setup, train_data, model, \ verbose=2,...
[ 37811, 198, 24629, 2733, 2219, 284, 1111, 17019, 7686, 198, 37811, 198, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1366, 62, 22602, 198, 11748, 1332, 62, 22602, 198, 11748, 3745, 62, 11813, 62, 20471, 198, 11748, ...
2.297835
1,155
""" Author: OMKAR PATHAK Created On: 17th August 2017 """ from collections import Counter import inspect def is_anagram(word, _list): """ANAGRAM An anagram is direct word switch or word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the o...
[ 37811, 198, 13838, 25, 32468, 42, 1503, 28748, 7801, 42, 198, 41972, 1550, 25, 1596, 400, 2932, 2177, 198, 37811, 198, 6738, 17268, 1330, 15034, 198, 11748, 10104, 628, 198, 4299, 318, 62, 272, 6713, 7, 4775, 11, 4808, 4868, 2599, 198...
2.784257
343
#!/usr/bin/env python3 import argparse import re import subprocess import sys from pathlib import Path from typing import List from list_test_packages import create_test_packages_list from test_packages_support import get_platform_list_path, get_platform_packages_dir_path def process_command_line(argv: List[str]) ->...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 1351, 62, 9288, 62, ...
2.739336
633
import numpy as np import contextlib from collections import deque from spirl.utils.general_utils import listdict2dictlist, AttrDict, ParamDict, obj2np from spirl.modules.variational_inference import MultivariateGaussian from spirl.rl.utils.reward_fcns import sparse_threshold class Sampler: """Collects rollouts ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4732, 8019, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 6738, 599, 1901, 13, 26791, 13, 24622, 62, 26791, 1330, 1351, 11600, 17, 11600, 4868, 11, 3460, 81, 35, 713, 11, 25139, 35, 713, 11, ...
1.918405
4,939
import time from datetime import datetime, timedelta import random import re import logging from config import SLACK_TOKEN import pandas as pd import slack from airflow import DAG from airflow.operators.python_operator import PythonOperator from pymongo import MongoClient from sqlalchemy import create_engi...
[ 11748, 640, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 201, 198, 11748, 4738, 201, 198, 11748, 302, 201, 198, 11748, 18931, 201, 198, 6738, 4566, 1330, 12419, 8120, 62, 10468, 43959, 201, 198, 201, 198, 11748, 19798...
2.491868
2,275
#looping over the generated range of numbers total = 0 for i in range(1, 101): total = total + i print(total)
[ 2, 5439, 15816, 625, 262, 7560, 2837, 286, 3146, 198, 23350, 796, 657, 198, 1640, 1312, 287, 2837, 7, 16, 11, 8949, 2599, 198, 220, 220, 220, 2472, 796, 2472, 1343, 1312, 198, 198, 4798, 7, 23350, 8 ]
3
38
# [Super SloMo] ##High Quality Estimation of Multiple Intermediate Frames for Video Interpolation from comet_ml import Experiment, ExistingExperiment import argparse import torch import torchvision import torchvision.transforms as transforms import torch.optim as optim import torch.nn as nn import torch.nn.functional a...
[ 2, 685, 12442, 3454, 78, 16632, 60, 198, 2235, 11922, 14156, 10062, 18991, 286, 20401, 42540, 36291, 329, 7623, 4225, 16104, 341, 198, 6738, 31733, 62, 4029, 1330, 29544, 11, 1475, 9665, 20468, 3681, 198, 11748, 1822, 29572, 198, 11748, ...
2.202523
7,372
# -*- coding:utf-8 -*- # @author xupingmao # @since 2022/04/10 15:06:25 # @modified 2022/04/10 15:10:04 # @filename case2.py input_text = """ def foo(bar): return bar * 5 """ output = [ "nl", "nl", "def", "def", "name", "foo", "(", "(", "name", "bar", ")", ")", ":", ":", "nl", "nl"...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 9800, 2124, 929, 278, 2611, 78, 198, 2, 2488, 20777, 33160, 14, 3023, 14, 940, 1315, 25, 3312, 25, 1495, 198, 2, 2488, 41771, 33160, 14, 3023, 14, 940, 1315, 2...
1.922747
233
import matplotlib as mpl mpl.use("Agg") from .utils import CollisionDataset, AutoencoderDataset, train, test, plot_curves from . import nn_classes as nn
[ 11748, 2603, 29487, 8019, 355, 285, 489, 198, 76, 489, 13, 1904, 7203, 46384, 4943, 198, 198, 6738, 764, 26791, 1330, 7778, 1166, 27354, 292, 316, 11, 5231, 6571, 66, 12342, 27354, 292, 316, 11, 4512, 11, 1332, 11, 7110, 62, 22019, ...
2.833333
54
import uuid import hashlib from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from .models import Survey, Question, Answers from .forms import SurveyForm from .results import Results # Create your views here.
[ 11748, 334, 27112, 198, 11748, 12234, 8019, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 31077, 198, 6738, 764, 27530, 1330, 13084, 11,...
3.893939
66
import torch from torchvision import datasets from torch.utils.data import DataLoader, RandomSampler import torchvision.transforms as transforms from tqdm import tqdm from .dataset import data_loaders, axi_loader
[ 11748, 28034, 198, 6738, 28034, 10178, 1330, 40522, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 14534, 16305, 20053, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020,...
3.523077
65
import MySQLdb from urllib import parse class PySQL: """ For making Mariadb / Mysql db queries """ FILTER_COMMANDS = { "$eq":" = %s ", "$in":" IN (%s) ", "$nin":" NOT IN (%s) ", "$neq":" != %s ", "$lt":" < %s ", "$lte":" <= %s ", "$gt":" ...
[ 11748, 33476, 9945, 198, 6738, 2956, 297, 571, 1330, 21136, 628, 198, 4871, 9485, 17861, 25, 198, 220, 220, 220, 37227, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1114, 1642, 29423, 324, 65, 1220, 337, 893, 13976, 20613, 20743,...
2.090039
3,554
import yaml import sys def meta_report(meta_data_loc="Experiment_Data.yml"): """ Reads meta data from file called "Experiment_Data.yml" and adds a report Parameters ---------- meta_data_loc : str the path to file that contains experiment meta data Returns ------- con...
[ 11748, 331, 43695, 201, 198, 11748, 25064, 201, 198, 201, 198, 4299, 13634, 62, 13116, 7, 28961, 62, 7890, 62, 17946, 2625, 20468, 3681, 62, 6601, 13, 88, 4029, 1, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 4149,...
2.351075
977
# # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Copyright (C) 2018-2020 UAVCAN Development Team <uavcan.org> # This software is distributed under the terms of the MIT License. # """Language-specific support in nunavut. This package contains modules that provide specific support for gene...
[ 2, 198, 2, 15069, 33448, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 15069, 357, 34, 8, 2864, 12, 42334, 220, 471, 10116, 44565, 7712, 4816, 220, 1279, 84, 615, 5171, 13, 2398, 29, 198, 2, 77...
2.523831
10,973
#!/usr/bin/env python3 import os import argparse import time import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader import numpy from ROOT import TFile, TH1D, TH2D, TCanvas from ROOT import gROOT, gPad, gStyle import ROOT from etnet.dataset import EtrackDataset from e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, ...
2.733696
184
import tensorflow as tf from tensorflow.keras.layers import Layer, InputSpec from tensorflow.keras import initializers, regularizers import tensorflow.keras.backend as K
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 34398, 11, 23412, 22882, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 4238, 11341, 11, 3218, 11341, 198, 11748, 11192, 273, 111...
3.4
50
# -*- coding: utf-8 -*- # import enum import json from typing import Any, Callable, Dict, List, Optional, Union from pydantic import Json from .abc import Model ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 11748, 33829, 198, 11748, 33918, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 4479, 198, 198, 6738, 279, 5173, 5109, 133...
2.232416
327
import json
[ 198, 11748, 33918, 628, 198, 220, 220, 220, 220, 198 ]
2
10
from math import sqrt import string ############################################################################################ # Important: Read over the information in the "Appendix: Utility Functions" in the Project # # Project Specification in order to better understand how to use the functions below. # ####...
[ 6738, 10688, 1330, 19862, 17034, 198, 11748, 4731, 198, 198, 29113, 29113, 14468, 7804, 4242, 198, 2, 28511, 25, 4149, 625, 262, 1321, 287, 262, 366, 4677, 19573, 25, 34030, 40480, 1, 287, 262, 4935, 1303, 198, 2, 4935, 18291, 2649, 2...
3.11786
1,103
import os from lambda_handler import handle # Use an event structure that follows GuardDuty Schema 2.0 to simulate a ticketing system integration. EVENT_FIXTURE = { "detail-type": "GuardDuty Finding", "source": "aws.guardduty", "detail": { "schemaVersion": "2.0", "accountId": "874153891031...
[ 11748, 28686, 198, 6738, 37456, 62, 30281, 1330, 5412, 628, 198, 2, 5765, 281, 1785, 4645, 326, 5679, 4932, 35, 3935, 10011, 2611, 362, 13, 15, 284, 29308, 257, 7846, 278, 1080, 11812, 13, 198, 20114, 3525, 62, 47084, 51, 11335, 796, ...
2.137736
530
from setuptools import setup setup(name='pyfooty', version='0.0', description='Parse the fbref website with python', url='https://github.com/rmatsum836/pyfooty', author='Ray Matsumoto', author_email='raymatsum@gmail.com', license='MIT', packages=['pyfooty'], ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 9078, 5898, 88, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 15, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 6764, 11639, 10044, 325, 262,...
2.193548
155
"""This module wraps the fortran backend.""" import numpy as np import compflow_fort_from_Ma as fort_from_Ma import compflow_fort_der_from_Ma as fort_der_from_Ma import compflow_fort_to_Ma as fort_to_Ma def _restore_shape(func, args): """Call a function and restore output to same shape as first argument.""" s...
[ 37811, 1212, 8265, 27521, 262, 329, 2213, 272, 30203, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 552, 11125, 62, 3319, 62, 6738, 62, 21467, 355, 6285, 62, 6738, 62, 21467, 198, 11748, 552, 11125, 62, 3319, 62, 10...
2.173956
9,100
import asyncio import datetime import os from .. import ALIVE_NAME from ..cmdhelp import CmdHelp from ..utils import admin_cmd, edit_or_reply, sudo_cmd from . import * DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "eviral User" eviral = borg.uid eviral_IMG = os.environ.get( "PING_PIC", "https://te.legra.ph/fil...
[ 11748, 30351, 952, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 11485, 1330, 8355, 9306, 62, 20608, 198, 6738, 11485, 28758, 16794, 1330, 327, 9132, 22087, 198, 6738, 11485, 26791, 1330, 13169, 62, 28758, 11, 4370, 62, 273, ...
2.616071
336
import glob import json from copy import deepcopy import numpy as np from astropy.table import Table from astropy.time import Time from cos_monitoring import dark from cos_monitoring.dark import solar import pdb solar.get_solar_data("./") data = Table.read('solar_flux.txt', format='ascii') all_info = [] for item...
[ 11748, 15095, 198, 11748, 33918, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6468, 28338, 13, 11487, 1330, 8655, 198, 6738, 6468, 28338, 13, 2435, 1330, 3862, 198, 198, 6738, 8615, 62, 41143, ...
2.314149
417
from matplotlib import rc import matplotlib.pyplot as plt import os import seaborn as sns from particle.plotting import ( plot_averaged_convergence_from_clusters, plot_averaged_avg_vel, plot_avg_vel, ) sns.set(style="white", context="talk") search_parameters = { # "particle_count": 480, # "G": "S...
[ 6738, 2603, 29487, 8019, 1330, 48321, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 198, 6738, 18758, 13, 29487, 889, 1330, 357, 198, 220, 220, 220, 71...
2.168616
1,026
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import typing import pandas as pd from . import internals def build_hierarchy( data: pd.DataFrame, get_parent=os.path.dirname, root: str = "", max_iter: int = 100, col_name: typing.Optional[str] = None, ) -> pd.DataFrame: "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 19720, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764...
2.102201
3,953
from Alarm_dialog_ui import Alarm_Ui_Dialog from PyQt5 import QtCore, QtWidgets, QtGui import threading import sys if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) form = AlarmDialog("Slave3", "CPU overloading", "CPU usage > 95%", "50%", "2017/11/25 12:00") form.setWindowTitle('Ala...
[ 6738, 978, 1670, 62, 38969, 519, 62, 9019, 1330, 978, 1670, 62, 52, 72, 62, 44204, 201, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 54, 312, 11407, 11, 33734, 8205, 72, 201, 198, 11748, 4704, 278, 201, 198, 11748, ...
2.358974
156
# Copyright 2016 OpenStack 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 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 1584, 4946, 25896, 5693, 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, 13789, 13, 198, 2, 921,...
3.333333
258
from django.db import models from ckeditor.fields import RichTextField # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 269, 9091, 2072, 13, 25747, 1330, 3998, 8206, 15878, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.769231
26
import logging import sys import traceback import re import os import socket import jinja2 import json from shutil import rmtree from time import sleep from datetime import datetime from string import Formatter from lib.jobstatus import ReverseMap, JobStatus from mailer import Mailer from models import DataFile def...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 474, 259, 6592, 17, 198, 11748, 33918, 198, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 640, 1330, ...
2.343539
2,221
import discord from discord.ext import commands from discord.gateway import DiscordWebSocket import requests, os import json import subprocess import io import random import dotenv import aiomysql
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 10494, 1014, 1330, 39462, 13908, 39105, 198, 11748, 7007, 11, 28686, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 33245, 198, 11748, 4738, 198, 11748, 1...
4.061224
49
# -*- coding: UTF-8 -*- # Copyright 2012-2017 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """Defines the babel field classes (:class:`BabelCharField` and :class:`BabelTextField`) and the :class:`LanguageField` class. **Babel fields** are fields which "generate" in the Django model a series of normal ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 15069, 2321, 12, 5539, 25463, 2611, 1222, 17634, 12052, 198, 2, 13789, 25, 347, 10305, 357, 3826, 2393, 27975, 45761, 329, 3307, 8, 198, 198, 37811, 7469, 1127, 262, 928...
2.668731
969
#!/usr/bin/env python3 # Advent of Code 2016 - Day 2, Part Two import sys from turtle import Vec2D keypad = [[None, None, '1', None, None], [None, '2', '3', '4', None], [ '5', '6', '7', '8', '9'], [None, 'A', 'B', 'C', None], [None, None, 'D', None, None]] moves = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 33732, 286, 6127, 1584, 532, 3596, 362, 11, 2142, 4930, 198, 198, 11748, 25064, 198, 6738, 28699, 1330, 38692, 17, 35, 198, 198, 2539, 15636, 796, 16410, 14202, 11, 6045, 11, ...
1.759582
287
source_suffix = ".txt" master_doc = "index" extensions = ["sphinxcontrib.multilatex"]
[ 10459, 62, 37333, 844, 796, 27071, 14116, 1, 201, 198, 9866, 62, 15390, 796, 366, 9630, 1, 201, 198, 201, 198, 2302, 5736, 796, 14631, 82, 746, 28413, 3642, 822, 13, 16680, 346, 378, 87, 8973, 201, 198 ]
2.394737
38
#!/usr/bin/env python import csv, json, operator, os, sys import xml.etree.ElementTree as ET composerJsonPath = 'composer.json' languageXmlPath = 'language.xml' if not os.path.exists(composerJsonPath): # File does not exists print "File " + composerJsonPath + " not found" sys.exit(1) if not os.path.exists(lan...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 11, 33918, 11, 10088, 11, 28686, 11, 25064, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 785, 1930, 263, 41, 1559, 15235, 796, 705, ...
2.333333
978
"""This module contains a representation of an action in the game Dvonn.""" from mopy.action import Action from enum import Enum
[ 37811, 1212, 8265, 4909, 257, 10552, 286, 281, 2223, 287, 262, 983, 360, 26982, 77, 526, 15931, 201, 198, 201, 198, 6738, 285, 11081, 13, 2673, 1330, 7561, 201, 198, 6738, 33829, 1330, 2039, 388, 201, 198, 201, 198 ]
3.487179
39
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # #TOFILL if __name__ == '__main__': param = [ (23,16,16,), (56,95,6,), (30,63,1,), (51,89,46,), (21,99...
[ 2, 15069, 357, 66, 8, 13130, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 4...
2.114094
298
from operator import mul from functools import reduce print(reduce(mul, reduce(overlap, [prime_factors(x) for x in range(1, 21)])))
[ 6738, 10088, 1330, 35971, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 4798, 7, 445, 7234, 7, 76, 377, 11, 4646, 7, 2502, 37796, 11, 685, 35505, 62, 22584, 669, 7, 87, 8, 329, 2124, 287, 2837, 7, 16, 11, 2310, 15437, 22305, ...
2.955556
45
#!/usr/bin/env python # ./mkimage.sh --tag m1 m1.py from __future__ import absolute_import, division, print_function import os import shutil import subprocess import sys files=[ '/usr/bin/bash', '/usr/bin/ls', ] os.chdir(sys.argv[1]) os.umask(0o22) for d in ( 'etc', 'tmp', 'var/tmp', 'usr/bin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 24457, 28015, 9060, 13, 1477, 1377, 12985, 285, 16, 285, 16, 13, 9078, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 28686, 1...
1.975477
367
import pandas as pd df_wine = pd.read_csv('../data/wine.data', header=None) df_wine.columns = [ 'Class label', 'Alcohol', 'Malic acid', 'Ash', 'Alcalinity of ash', 'Magnesium', 'TOtal phenols', 'Flavanoids', 'Nonflavanoid phenols', 'Proanthocyanins', 'Color intensity', 'Hue', 'OD280/OD315 of diluted win...
[ 11748, 19798, 292, 355, 279, 67, 198, 7568, 62, 39002, 796, 279, 67, 13, 961, 62, 40664, 10786, 40720, 7890, 14, 39002, 13, 7890, 3256, 13639, 28, 14202, 8, 198, 7568, 62, 39002, 13, 28665, 82, 796, 685, 198, 220, 220, 220, 705, 9...
2.324132
1,123
from django.shortcuts import render # Create your views here. from rest_framework.generics import CreateAPIView from scraping.serializers import EmployeeSerializer
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 13610, 2969, 3824, 769, 198, 198, 6738, 46743, 13, 46911, 11341, 1330, 36824, 32634, 7509, 628 ]
4.073171
41
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 18 11:15:09 2019 @author: panyongyi """ #!/usr/bin/env python3 # Suggestion: Do not import the ev3dev.ev3 module in this file import json import paho.mqtt.client as mqtt import uuid import time from planet import Planet, Direction class Communi...
[ 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, 2892, 1526, 1248, 1367, 25, 1314, 25, 2931, 13130, 198, 198, 31, 9800, 25, 279, 1092, 506...
2.42446
1,251
# Generated by Django 3.2.7 on 2021-09-09 18:23 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 2931, 12, 2931, 1248, 25, 1954, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core import caffe2.python.hypothesis_test_util as hu from hypothesis import given, settings import caffe2.python.serialized_test.serialized_test...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 21121, 17, 13...
3.454545
132
import copy import json import os from pathlib import Path import pystache from PyQt5 import QtCore, QtGui, QtWidgets from gear_builder_gui.config_dialog import config_dialog from gear_builder_gui.input_dialog import input_dialog class Manifest: """ A class to manage the manifest of a gear TODO: Includ...
[ 11748, 4866, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 301, 4891, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 198, 6738, ...
2.039502
8,025
"""Code adapted from Boost, which is: (C) Copyright John Maddock 2006. Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) """ from numba import njit, vectorize import numpy as np from . imp...
[ 37811, 10669, 16573, 422, 19835, 11, 543, 318, 25, 198, 198, 7, 34, 8, 15069, 1757, 21457, 735, 4793, 13, 198, 11041, 11, 17613, 290, 6082, 389, 2426, 284, 262, 198, 45686, 10442, 13789, 11, 10628, 352, 13, 15, 13, 357, 6214, 19249,...
1.958347
3,025
# -*- coding: utf-8 -*- """A simulation and visualization demonstration. This module runs a simple demonstration of the capabilities of the adsa simulations and analysis. """ import logging from pathlib import Path import csv from .solver import simulate_droplet_shape from .analysis import calculate_volume from .visu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 32, 18640, 290, 32704, 13646, 13, 198, 198, 1212, 8265, 4539, 257, 2829, 13646, 286, 262, 9889, 286, 262, 9011, 64, 198, 14323, 5768, 290, 3781, 13, 198, 37811, ...
3.764151
106
from condor_scheduler import * from basic_scheduler import * from helper import * #scheduler = CondorScheduler() scheduler = BasicScheduler() app_flags = {} trials = ['', '_1', '_2'] trials = [''] #thds = [4, 8] #, 16, 20, 24, 28, 32] thds = [8, 16, 32] thds = [4, 8, 16, 20, 24, 28, 32] thds = [16] thds = [4, 8, 1...
[ 6738, 1779, 273, 62, 1416, 704, 18173, 1330, 1635, 198, 6738, 4096, 62, 1416, 704, 18173, 1330, 1635, 198, 6738, 31904, 1330, 1635, 198, 198, 2, 1416, 704, 18173, 796, 9724, 273, 50, 1740, 18173, 3419, 198, 1416, 704, 18173, 796, 1439...
2.252483
6,242
from construct import * from construct.lib import * opaque_with_param = Struct( 'one' / LazyBound(lambda: params_def), ) _schema = opaque_with_param
[ 6738, 5678, 1330, 1635, 198, 6738, 5678, 13, 8019, 1330, 1635, 198, 198, 404, 18251, 62, 4480, 62, 17143, 796, 32112, 7, 198, 197, 6, 505, 6, 1220, 406, 12582, 49646, 7, 50033, 25, 42287, 62, 4299, 828, 198, 8, 198, 198, 62, 15952...
2.923077
52
from sympy.external import import_module matchpy = import_module("matchpy") from sympy.utilities.decorator import doctest_depends_on if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint from sympy.integrals.rubi.utility_function import (Int, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ,...
[ 6738, 10558, 88, 13, 22615, 1330, 1330, 62, 21412, 198, 15699, 9078, 796, 1330, 62, 21412, 7203, 15699, 9078, 4943, 198, 6738, 10558, 88, 13, 315, 2410, 13, 12501, 273, 1352, 1330, 10412, 395, 62, 10378, 2412, 62, 261, 198, 198, 361, ...
2.782345
2,798
from tkinter import * root = Tk() text1 = Text(width=20,height=1) label1 = Label(width=20) but1 = Button(width=5, height=5, bg='#ff0000') but2 = Button(width=5, height=5, bg='#ff7d00') but3 = Button(width=5, height=5, bg='#ffff00') but4 = Button(width=5, height=5, bg='#00ff00') but5 = Button(width=5, height...
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 201, 198, 15763, 796, 309, 74, 3419, 201, 198, 201, 198, 5239, 16, 796, 8255, 7, 10394, 28, 1238, 11, 17015, 28, 16, 8, 201, 198, 18242, 16, 796, 36052, 7, 10394, 28, 1238, 8, 201, 198,...
2.149533
428
""" Copyright Digisim, Computer Architecture team of South China University of Technology, 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 ...
[ 37811, 198, 15269, 7367, 271, 320, 11, 13851, 29778, 1074, 286, 2520, 2807, 2059, 286, 8987, 11, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, ...
3.388235
340
# -*- coding: utf-8 -*- """ Created on Fri May 1 10:16:25 2020 @author: winhl modify 2022-1-6 """ import pandas as pd import json work_dir = "D:/__E__/支部/积分" #n0 = "2021s1p9" n0 = "2021.01-12.xuexi.cn" #2022-1-6 with open(f"{work_dir}/{n0}.json", "r", encoding="utf-8") as f: fr = f.read() ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 1737, 220, 352, 838, 25, 1433, 25, 1495, 12131, 201, 198, 201, 198, 31, 9800, 25, 1592, 18519, 201, 198, 4666, 1958, 33160, 12...
1.930131
458
import torch.nn as nn import torch.nn.functional as F from layers import GraphConvolution
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 11685, 1330, 29681, 3103, 85, 2122, 628 ]
3.64
25
from __future__ import annotations from argparse import ArgumentError import functools from dataclasses import dataclass from typing import Any, Callable, List, Optional, Type, Union from .types import Union as FsUnion, FSharpRef, Record from .util import equal_arrays_with Constructor = Callable[..., Any] EnumCase ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 1822, 29572, 1330, 45751, 12331, 198, 198, 11748, 1257, 310, 10141, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 7343, 11, 32233, ...
3.041975
405
import numpy as np import cykdtree as kdtree from cgal4py import PY_MAJOR_VERSION def tree(method, pts, left_edge, right_edge, periodic, *args, **kwargs): r"""Get tree for a given domain decomposition schema. Args: method (str): Domain decomposition method. Supported options are: 'kdtree':...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3075, 74, 67, 21048, 355, 479, 67, 21048, 198, 6738, 269, 13528, 19, 9078, 1330, 350, 56, 62, 5673, 41, 1581, 62, 43717, 198, 198, 4299, 5509, 7, 24396, 11, 43344, 11, 1364, 62, 14907, 11, ...
1.936892
4,627
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-10 17:53 from __future__ import unicode_literals import django.db.models.deletion 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, 16, 319, 1584, 12, 1157, 12, 940, 1596, 25, 4310, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.73913
69
import pytest from pytest import mark from pytest_lazyfixture import lazy_fixture
[ 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 1317, 198, 6738, 12972, 9288, 62, 75, 12582, 69, 9602, 1330, 16931, 62, 69, 9602, 628 ]
3.458333
24
#!/usr/bin/env python ###################################################### # GUI to vizualize ROMS input/output files # Sep 2021 # rsoutelino@gmail.com ###################################################### import os import wx import datetime as dt from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as F...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 14468, 4242, 2235, 198, 2, 25757, 284, 48569, 723, 1096, 21224, 50, 5128, 14, 22915, 3696, 198, 2, 8621, 33448, 198, 2, 44608, 448, 417, 2879, 31, 14816, 13, 785, 198, 29113, ...
2.842916
974
# Sum of pairwise Hamming Distance # https://www.interviewbit.com/problems/sum-of-pairwise-hamming-distance/ # # Hamming distance between two non-negative integers is defined as the number of positions at # which the corresponding bits are different. # # For example, # # HammingDistance(2, 7) = 2, as only the first and...
[ 2, 5060, 286, 5166, 3083, 4345, 2229, 34600, 198, 2, 3740, 1378, 2503, 13, 3849, 1177, 2545, 13, 785, 14, 1676, 22143, 14, 16345, 12, 1659, 12, 24874, 3083, 12, 2763, 2229, 12, 30246, 14, 198, 2, 198, 2, 4345, 2229, 5253, 1022, 73...
2.498911
459
#!/usr/bin/env python # coding: utf-8 # In[16]: #importing required packages import pandas as pd from sklearn import preprocessing from sklearn.model_selection import train_test_split from sklearn.naive_bayes import GaussianNB from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 1433, 5974, 628, 198, 2, 11748, 278, 2672, 10392, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 662, 369...
3.029979
467
#!/usr/bin/env python import math var1 = "Hello" var2 = "Worldpress" print "var1 = ", var1 print "var2 = ", var2 print "var1[0] = ", var1[0] print "var2[1:5] = ", var2[1:5] if ('H' in var1): print "H is in var1 ", var1 else: print "H is not in var1 ", var1 if ('H' not in var2): print "H is not in var2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 10688, 198, 198, 7785, 16, 796, 366, 15496, 1, 198, 7785, 17, 796, 366, 10603, 8439, 1, 198, 198, 4798, 366, 7785, 16, 796, 33172, 1401, 16, 198, 4798, 366, 7785, 17, 7...
2.168224
214
import random
[ 11748, 4738, 198 ]
4.666667
3
import markdown2, re, random from django.shortcuts import render from django.urls import reverse from django.http import HttpResponseRedirect from . import util
[ 11748, 1317, 2902, 17, 11, 302, 11, 4738, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 198, ...
3.6
45
import logging import multiprocessing import ctypes from gunpowder.ext import tensorflow as tf from gunpowder.freezable import Freezable logger = logging.getLogger(__name__) class LocalServer(Freezable): '''Wrapper around ``tf.train.Server`` to create a local server on-demand. This class is necessary because...
[ 11748, 18931, 198, 11748, 18540, 305, 919, 278, 198, 11748, 269, 19199, 198, 6738, 2485, 45855, 13, 2302, 1330, 11192, 273, 11125, 355, 48700, 198, 6738, 2485, 45855, 13, 5787, 89, 540, 1330, 3232, 89, 540, 198, 198, 6404, 1362, 796, ...
2.646512
645
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import itertools import os from dataclasses import dataclass from typing import Dict, List from pants.backend.go.module import ResolvedGoModule, ResolveGoModuleRequest from pants.backend.g...
[ 2, 15069, 33448, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, ...
3.162162
481
import os import cursos print(os.getcwd())
[ 11748, 28686, 198, 11748, 13882, 418, 198, 198, 4798, 7, 418, 13, 1136, 66, 16993, 28955, 198 ]
2.588235
17
# Generated by Django 3.1.3 on 2021-04-20 14:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 33448, 12, 3023, 12, 1238, 1478, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Unit tests for finite_diff library """ import unittest import random from math import pi import numpy as np import finitediff class TestFiniteDiff(unittest.TestCase): """Unit test class for the finitediff library""" order = 4 # Order of the derivatives ...
[ 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, 26453, 5254, 329, 27454, 62, 26069, 5888, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 11748, 4738,...
2.13533
3,473
########################### # # #143 Investigating the Torricelli point of a triangle - Project Euler # https://projecteuler.net/problem=143 # # Code by Kevin Marciniak # ###########################
[ 14468, 7804, 21017, 198, 2, 198, 2, 1303, 21139, 16203, 803, 262, 4022, 20970, 15516, 966, 286, 257, 22950, 532, 4935, 412, 18173, 198, 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 21139, 198, 2, 198, 2, 6127, 416, 7939...
3.754717
53
__version__ = '0.1.4' default_app_config = 'connected_accounts.apps.ConnectedAccountsConfig'
[ 834, 9641, 834, 796, 705, 15, 13, 16, 13, 19, 6, 198, 198, 12286, 62, 1324, 62, 11250, 796, 705, 15236, 62, 23317, 82, 13, 18211, 13, 13313, 276, 30116, 82, 16934, 6, 198 ]
2.764706
34
import socket from abc import abstractmethod from threading import Thread from typing import Optional from nehushtan.socket.SocketHandleThreadManager import SocketHandlerThreadManager class NehushtanUDPSocketServer: """ Since 0.4.16 """ def should_terminate(self) -> bool: """ If retu...
[ 11748, 17802, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 497, 71, 1530, 38006, 13, 44971, 13, 39105, 37508, 16818, 13511, 1330, 47068, 25060, 16818, 13511, 628...
2.923567
157
# Specify and solve an LP using a Pandas DataFrame import pandas as pd if __name__ != "__main__": from . import LpModel from . import Result else: from LpModel import LpModel from Result import Result if __name__ == "__main__": df = OptModel.read_csv("lpmodel.txt") #print(df.fillna("")) lpmodel =...
[ 2, 18291, 1958, 290, 8494, 281, 18470, 1262, 257, 16492, 292, 6060, 19778, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 361, 11593, 3672, 834, 14512, 366, 834, 12417, 834, 1298, 198, 220, 220, 422, 764, 1330, 406, 79, 17633, 198, ...
2.223464
358
import argparse import module1 as mod1 import pytest from hypothesis import given from hypothesis.strategies import integers @given(integers()) @given(integers(), integers())
[ 11748, 1822, 29572, 198, 11748, 8265, 16, 355, 953, 16, 198, 11748, 12972, 9288, 198, 6738, 14078, 1330, 1813, 198, 6738, 14078, 13, 2536, 2397, 444, 1330, 37014, 628, 628, 628, 628, 198, 31, 35569, 7, 18908, 364, 28955, 628, 198, 31,...
3.686275
51
""" The script exports the answer table to a CSV file. Config ------ CFG_NAME : The config name can be Develpment, Staging, Testing Output ------ The total answer numbers after export, and the CSV file. (aswer_YYYY_MM_DD_HH_mm_ss.csv) """ CFG_NAME = "config.config.DevelopmentConfig" import sys import os sys.path.a...
[ 37811, 198, 464, 4226, 15319, 262, 3280, 3084, 284, 257, 44189, 2393, 13, 220, 198, 198, 16934, 198, 23031, 198, 22495, 38, 62, 20608, 1058, 383, 4566, 1438, 460, 307, 1024, 626, 79, 434, 11, 520, 3039, 11, 23983, 198, 198, 26410, 1...
2.633371
881
import abc from blacksmith.typing import ServiceName, Url, Version class AsyncAbstractServiceDiscovery(abc.ABC): """Define the Service Discovery interface.""" @abc.abstractmethod async def get_endpoint(self, service: ServiceName, version: Version) -> Url: """Get the endpoint of a service."""
[ 11748, 450, 66, 198, 198, 6738, 2042, 21453, 13, 774, 13886, 1330, 4809, 5376, 11, 8799, 75, 11, 10628, 628, 198, 4871, 1081, 13361, 23839, 16177, 35, 40821, 7, 39305, 13, 24694, 2599, 198, 220, 220, 220, 37227, 7469, 500, 262, 4809, ...
3.17
100
#%% import numpy as np import pandas as pd import altair as alt import anthro.io # Load the produciton data. data = pd.read_csv('../processed/Geyer2017_plastic_production.csv') data['year'] = pd.to_datetime(data['year'], format='%Y') chart = alt.Chart(data).encode( x=alt.X(field='year', type='temporal...
[ 2, 16626, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 11748, 5988, 958, 355, 5988, 220, 198, 11748, 281, 26110, 13, 952, 198, 198, 2, 8778, 262, 990, 66, 37752, 1366, 13, 220, 198, 7890, ...
2.1766
453
#!/usr/bin/python # -*- coding: utf-8 -*- from fnmatch import fnmatch from typing import Union, List, Dict, Set from threading import Timer import circular
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 24714, 15699, 1330, 24714, 15699, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 360, 713, 11, 5345, 198, 6738, 4704, 278, ...
3.058824
51
from __future__ import absolute_import from eduid_userdb.proofing import OidcProofingUserDB, LetterProofingUserDB, LookupMobileProofingUserDB from eduid_userdb.proofing import EmailProofingUserDB, PhoneProofingUserDB, OrcidProofingUserDB from eduid_userdb.proofing import EidasProofingUserDB from eduid_userdb.personal_...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 1225, 27112, 62, 7220, 9945, 13, 13288, 278, 1330, 440, 312, 66, 44683, 278, 12982, 11012, 11, 18121, 44683, 278, 12982, 11012, 11, 6803, 929, 17066, 44683, 278, 12982, 110...
2.9375
2,224
from kivy.uix.widget import Widget from kivy.clock import Clock from runnable import run_on_ui_thread from kivy.event import EventDispatcher from jnius import autoclass from webviewclient ...
[ 6738, 479, 452, 88, 13, 84, 844, 13, 42655, 1330, 370, 17484, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.906494
385
from unittest.mock import patch, Mock from vaas.cluster.models import LogicalCluster, VarnishServer, VclTemplateBlock, VclTemplate, Dc from vaas.manager.tests.test_views import BaseApiViewPermissionsTest
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 44123, 198, 6738, 46935, 292, 13, 565, 5819, 13, 27530, 1330, 5972, 605, 2601, 5819, 11, 569, 1501, 680, 10697, 11, 569, 565, 30800, 12235, 11, 569, 565, 30800, 11, 360, 66, 198, 1...
3.21875
64
""" android.py Android views. """ import logging from datetime import datetime from flask import Blueprint, abort, request, jsonify from werkzeug.exceptions import BadRequest from app.decorators import crossdomain, ignore_exception from app.models.adventure import Adventure from app.models.point import Point SFLOAT...
[ 37811, 198, 19411, 13, 9078, 198, 198, 25934, 5009, 13, 198, 198, 37811, 198, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42903, 1330, 39932, 11, 15614, 11, 2581, 11, 33918, 1958, 198, 6738, 266, 9587, 2736, ...
2.244873
829
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376 ]
3.473684
19
#! /usr/bin/env python #----------------------------------------------------------------------- # COPYRIGHT_BEGIN # Copyright (C) 2016, FixFlyer, LLC. # All rights reserved. # COPYRIGHT_END #-----------------------------------------------------------------------
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 10097, 26866, 198, 2, 27975, 38162, 9947, 62, 33, 43312, 198, 2, 15069, 357, 34, 8, 1584, 11, 13268, 33771, 263, 11, 11419, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 27975, ...
4.962264
53
from django import forms from .models import SignUp from base.views import GenericModalCreateView
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 764, 27530, 1330, 5865, 4933, 198, 198, 6738, 2779, 13, 33571, 1330, 42044, 5841, 282, 16447, 7680, 628, 198 ]
3.777778
27
from copy import deepcopy import numpy as np import scipy.stats as ss from turbo import Turbo1 from turbo.utils import from_unit_cube, latin_hypercube, to_unit_cube from bayesmark.abstract_optimizer import AbstractOptimizer from bayesmark.experiment import experiment_main from bayesmark.space import JointSpace i...
[ 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 37786, 198, 6738, 29292, 1330, 22278, 16, 198, 6738, 29292, 13, 26791, 1330, 422, 62, 20850, 62, 40296, 11, 3042, 259, 6...
3.237288
118
# Copyright (c) 2020 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # htt...
[ 2, 15069, 357, 66, 8, 12131, 33086, 371, 1921, 357, 4023, 1378, 2503, 13, 271, 1050, 292, 13, 622, 8, 198, 2, 16975, 1236, 1134, 709, 5136, 329, 4482, 30297, 286, 262, 3394, 8581, 286, 13473, 198, 2, 198, 2, 49962, 739, 262, 24843...
2.206098
1,771
import vanilla if __name__ == "__main__": from vanilla.test.testTools import executeVanillaTest executeVanillaTest(Test)
[ 11748, 16858, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 422, 16858, 13, 9288, 13, 9288, 33637, 1330, 12260, 25298, 5049, 14402, 198, 220, 220, 220, 12260, 25298, 5049, 14402, 7, 14402, ...
3.069767
43
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-30 20:21 from __future__ import unicode_literals from django.db import migrations
[ 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, 1270, 1160, 25, 2481, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
from collections import OrderedDict import json from graphenebase.types import ( Uint8, Int16, Uint16, Uint32, Uint64, Varint32, Int64, String, Bytes, Void, Array, PointInTime, Signature, Bool, Set, Fixed_array, Optional, Static_variant, Map, Id, VoteId ) from .objects import GrapheneObject, isArgsT...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 33918, 198, 6738, 42463, 8692, 13, 19199, 1330, 357, 198, 220, 220, 220, 471, 600, 23, 11, 2558, 1433, 11, 471, 600, 1433, 11, 471, 600, 2624, 11, 471, 600, 2414, 11, 198, 220, ...
2.720395
304