content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from decimal import Decimal from django import forms from django.template.loader import render_to_string from django.template.defaultfilters import slugify class BaseWidget(forms.TextInput): """ Base widget. Do not use this directly. """ template = None instance = None class SliderWidget(BaseWidg...
[ 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 8543, 62, 1462, 62, 8841, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, ...
2.722838
902
import numpy as np import pandas as pd from sklearn.tree import DecisionTreeClassifier from sklearn.model_selection import cross_val_score import matplotlib.pyplot as plt import dataset_processing as data_proc if __name__ == "__main__": abalone(verbose=False, show_plots=False) online_shopping(verbose=Fal...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 21048, 1330, 26423, 27660, 9487, 7483, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 3272, 62, 2100, 62, 26675, 198, 11748, 2603, 294...
3.026549
113
# # PySNMP MIB module MY-PROCESS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MY-PROCESS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:06:38 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 17615, 12, 4805, 4503, 7597, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615,...
2.564212
2,811
#!/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ forcefield_utils.py Utilities relating to OpenMM ForceField replacement using SMIRKS-b...
[ 2, 48443, 8800, 14, 24330, 21015, 198, 198, 2, 23926, 4770, 25609, 28, 198, 2, 33893, 37760, 18601, 2751, 198, 2, 23926, 4770, 25609, 28, 198, 198, 37811, 198, 3174, 3245, 62, 26791, 13, 9078, 198, 198, 18274, 2410, 11270, 284, 4946, ...
2.79239
6,859
# coding: utf-8 import bisect import codecs import collections import datetime import locale import logging import math import os import re import tempfile import time import traceback import unicodedata import urllib.parse from codecs import BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE import char...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 47457, 478, 198, 11748, 40481, 82, 198, 11748, 17268, 198, 11748, 4818, 8079, 198, 11748, 36693, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2021...
2.668096
1,633
import numpy as np from scipy import ndimage import cv2 from ..world.world import World from .binary_renderer import BinaryRenderer from .grid import Grid from .robot_renderer import RobotRenderer
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 198, 11748, 269, 85, 17, 198, 6738, 11485, 6894, 13, 6894, 1330, 2159, 198, 6738, 764, 39491, 62, 10920, 11882, 1330, 45755, 49, 437, 11882, 198, 6738, 764, ...
3.355932
59
if __name__ == "__main__": main()
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.166667
18
"""This module provides basic server endpoints.""" from http import HTTPStatus from flask import Blueprint, request from app.utils.misc import make_response internal_blueprint = Blueprint('traffic-stuck-internal', __name__) @internal_blueprint.route("/health", methods=['GET']) def get_health(): """Return hea...
[ 37811, 1212, 8265, 3769, 4096, 4382, 886, 13033, 526, 15931, 198, 198, 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 42903, 1330, 39932, 11, 2581, 198, 198, 6738, 598, 13, 26791, 13, 44374, 1330, 787, 62, 26209, 628, 198, 32538, 62, ...
3.007916
379
import os import typing as t import getpass from pathlib import Path import yaml from starwhale.consts import ( UserRoleType, SW_CLI_CONFIG, DEFAULT_PROJECT, DEFAULT_INSTANCE, SW_LOCAL_STORAGE, ENV_SW_CLI_CONFIG, STANDALONE_INSTANCE, LOCAL_CONFIG_VERSION, ) from starwhale.utils.error i...
[ 11748, 28686, 198, 11748, 19720, 355, 256, 198, 11748, 651, 6603, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 331, 43695, 198, 198, 6738, 3491, 1929, 1000, 13, 1102, 6448, 1330, 357, 198, 220, 220, 220, 11787, 47445, 6030, 11, ...
2.579909
219
import math n, i = 600851475143, 2 while n > 1: if n % i == 0: print(i) n /= i else: i += 1
[ 11748, 10688, 198, 198, 77, 11, 1312, 796, 10053, 5332, 1415, 2425, 21139, 11, 362, 198, 198, 4514, 299, 1875, 352, 25, 198, 220, 220, 220, 611, 299, 4064, 1312, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 72, ...
1.68
75
#!/usr/bin/env python """ Advent of Code 2020: Day 15 """ import os import re import signal import sys from types import FrameType from typing import List, Mapping from pathlib import Path DEBUG = False def spoken_number(starting_numbers: List[int], turns: int) -> int: """ Compute spoken number after a giv...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 2782, 1151, 286, 6127, 12131, 25, 3596, 1315, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 6737, 198, 11748, 25064, 198, 6738, 3858, 1330, 25184, 6030, 19...
2.549535
1,827
from django.contrib import admin import users.admin from modules.smartq import models @admin.register(models.Question) @admin.register(models.GeneratedQuestion) @admin.register(models.StaffGeneratedQuestion)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 11748, 2985, 13, 28482, 198, 6738, 13103, 13, 27004, 80, 1330, 4981, 628, 198, 31, 28482, 13, 30238, 7, 27530, 13, 24361, 8, 628, 198, 31, 28482, 13, 30238, 7, 27530, 13, 864...
3.55
60
from django.shortcuts import render from django.shortcuts import render from django.contrib.auth.decorators import login_required from yangram.conversations.models import * from django.http import JsonResponse from . import constants, sqls, serializers from rest_framework import status from django.shortcuts import get_...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 331, 648, 859, 13, 1102...
3.326531
196
import os from time import sleep import json #use hastags and mentions from cyber war news articles as filters on twitter if __name__ == "__main__": hashtags = getMentionsAndHashtags() for hashtag in hashtags: outfile = "../../../outputfiles/twitter/"+str(hashtag).replace("#","").replace("@","")+".j...
[ 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 11748, 33918, 628, 198, 2, 1904, 19338, 3775, 290, 15802, 422, 10075, 1175, 1705, 6685, 355, 16628, 319, 17044, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, ...
2.726316
190
#!/usr/bin/env python3 # You can create the script manually or clone the script and use it script via a symlink: # For example `ln -s /Users/brian/rando-scripts/jira.py /usr/local/bin/jira` # Make sure you create an environment variable named JIRA_URL for your terminal, such as .zshenv. Set the env variable equal to h...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 921, 460, 2251, 262, 4226, 14500, 393, 17271, 262, 4226, 290, 779, 340, 4226, 2884, 257, 827, 4029, 676, 25, 198, 2, 1114, 1672, 4600, 18755, 532, 82, 1220, 14490, 14, ...
2.706422
218
# treetech.py # boj 16235 from sys import stdin # input = stdin.readline dx = (-1, -1, -1, 0, 0, 1, 1, 1) dy = (-1, 0, 1, -1, 1, -1, 0, 1) n, m, k = map(int, input().split()) mp = [[5] * n for _ in range(n)] fert = [list(map(int, input().split())) for _ in range(n)] tree = list() for _ in range(m): _x, _y, _z =...
[ 2, 2054, 316, 3055, 13, 9078, 198, 2, 1489, 73, 1467, 22370, 198, 198, 6738, 25064, 1330, 14367, 259, 198, 2, 5128, 796, 14367, 259, 13, 961, 1370, 198, 198, 34350, 796, 13841, 16, 11, 532, 16, 11, 532, 16, 11, 657, 11, 657, 11,...
1.845541
628
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
MOJANG_AUTH = "https://authserver.mojang.com/authenticate" JSON_POST_HEADERS = { "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/91.0.4472.164 Safari/537.36 " } HTTP_HEADERS = { "Upgrade-...
[ 11770, 41, 15567, 62, 32, 24318, 796, 366, 5450, 1378, 18439, 15388, 13, 5908, 73, 648, 13, 785, 14, 41299, 5344, 1, 201, 198, 201, 198, 40386, 62, 32782, 62, 37682, 4877, 796, 1391, 201, 198, 220, 220, 220, 366, 19746, 12, 6030, ...
1.449807
1,036
from django.core.management.base import BaseCommand, CommandError from django.db.models.loading import get_model from django_usda.models import Food, FoodGroup, FoodLanguaLFactor, LanguaLFactor, NutrientData, Nutrient, Source, Derivation, Weight, Footnote, DataLink, DataSource, DeletedFood, DeletedNutrient, DeletedFoot...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25138, 1330, 651, 62, 19849, 198, 6738, 42625, 14208, 62, 385, 6814, 13, 27530, 1330, 7318, 11, 7...
2.647196
428
# Copyright 2018 University of Groningen # # 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 i...
[ 2, 15069, 2864, 2059, 286, 40214, 36795, 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, 92...
2.650526
950
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from os import path from .io.meas_info import Info from . import pick_types from .utils import logger, verbos...
[ 2, 46665, 25, 21000, 260, 20159, 3319, 1279, 1000, 87, 49078, 13, 4546, 3319, 31, 46813, 785, 12, 1845, 396, 3055, 13, 8310, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4705, 72, 4345, 282, 391, 268, 1279, 907, 71, ...
2.341283
1,761
#!/usr/bin/env python # -------------------------------------------------------------------------------- # --- PARAMS # -------------------------------------------------------------------------------- Types=['integer','double precision','real','logical'] Dims =[1,0] # --------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 2, 16529, 1783, 198, 2, 11420, 220, 29463, 40834, 198, 2, 16529, 1783, 198, 31431, 28, 17816, 41433, 41707, 23352, 15440, 41707, 5305, 41707, 6404, 605, 20520, 198, 35, 12078, 796, ...
2.175439
627
import grequests import requests
[ 11748, 308, 8897, 3558, 198, 11748, 7007 ]
4.571429
7
"""Register the YunTemp to blacs. This is boilerplate and should be only minimally changed. """ from labscript_devices import register_classes register_classes( "DummyDevice", BLACS_tab="user_devices.dummy_device.blacs_tabs.DummyDeviceTab", runviewer_parser=None, )
[ 37811, 38804, 262, 20757, 30782, 284, 698, 16436, 13, 198, 198, 1212, 318, 36741, 6816, 290, 815, 307, 691, 10356, 453, 3421, 13, 198, 37811, 198, 198, 6738, 2248, 12048, 62, 42034, 1330, 7881, 62, 37724, 198, 198, 30238, 62, 37724, 7...
2.927083
96
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * from astropy.tests.pytest_plugins import pytest_addoption as astropy_pytest...
[ 2, 428, 4909, 17944, 20652, 326, 17425, 12972, 13, 9288, 329, 6468, 28338, 5254, 13, 198, 2, 416, 33332, 606, 994, 287, 369, 701, 395, 13, 9078, 484, 389, 7073, 540, 416, 12972, 13, 9288, 198, 2, 645, 2300, 703, 340, 318, 24399, 1...
3.541096
146
# Copyright 2018-present Kensho Technologies, LLC. from collections import namedtuple from six.moves.urllib.parse import quote_plus from .. import test_backend DEFAULT_ROOT_PASSWORD = "root" # nosec SQL_BACKENDS = { test_backend.POSTGRES, test_backend.MYSQL, test_backend.MARIADB, test_backend.MSSQ...
[ 2, 15069, 2864, 12, 25579, 29018, 8873, 21852, 11, 11419, 13, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 1330, 9577, 62, 9541, 198, 198, 6738, 11485, 1330, 1332, 62, 18...
2.326382
959
import os import json import statistics import pandas as pd import numpy as np class CSVDataSet(DataSet): """ A dataset living locally in a .csv file """ def getResource(self, index): """Get a specific data point from the data set. Parameters ---------- index : int or...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 7869, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 4871, 44189, 6601, 7248, 7, 6601, 7248, 2599, 198, 220, 220, 220, 37227, 317, 27039, 2877, ...
2.206926
1,184
import webapp2 class MainHandler(webapp2.RequestHandler): """Main Handler for the blog""" def get(self): """Redirects to the blog page""" self.redirect("/blog")
[ 11748, 3992, 1324, 17, 628, 198, 4871, 8774, 25060, 7, 12384, 1324, 17, 13, 18453, 25060, 2599, 198, 220, 220, 220, 37227, 13383, 32412, 329, 262, 4130, 37811, 628, 220, 220, 220, 825, 651, 7, 944, 2599, 198, 220, 220, 220, 220, 220...
2.647887
71
import os import time import numpy as np from numba import jit, types from numba.typed import Dict from blockbased_synapseaware.hole_filling.connected_components.cc3d import connected_components from blockbased_synapseaware.utilities.dataIO import PickleData, PickleNumbaData, WriteH5File from blockbased_synap...
[ 198, 11748, 28686, 198, 11748, 640, 628, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 6738, 997, 7012, 1330, 474, 270, 11, 3858, 198, 6738, 997, 7012, 13, 774, 9124, 1330, 360, 713, 628, 198, 198, 6738, 2512, 3106, 62, 28...
3.046875
128
#!/usr/bin/env python ''' @author Luke Campbel <LCampbell@ASAScience.com> @file @date 03/27/12 15:30 @description DESCRIPTION ''' from pyon.util.arg_check import validate_is_instance, validate_in, validate_equal, validate_true class ArgCheckService(object): ''' Example Service illustrating how to use the var...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 31, 9800, 11336, 5425, 6667, 1279, 5639, 696, 7923, 31, 1921, 1921, 4234, 13, 785, 29, 198, 31, 7753, 220, 198, 31, 4475, 7643, 14, 1983, 14, 1065, 1315, 25, 1270, 19...
2.380623
578
import dpkt from dpkt.tcp import * from tcp_util import *
[ 11748, 288, 79, 21841, 198, 198, 6738, 288, 79, 21841, 13, 83, 13155, 1330, 1635, 198, 6738, 48265, 62, 22602, 1330, 1635, 628 ]
2.608696
23
''' Written by Kenny William Nyallau ©2020 This is a python implementation of Rover challenge '''
[ 7061, 6, 198, 25354, 416, 22102, 3977, 17735, 439, 559, 10673, 42334, 198, 1212, 318, 257, 21015, 7822, 286, 36718, 4427, 198, 7061, 6, 628, 198 ]
3.846154
26
import pickle experts_file_path = "../experts/sampled_experts.obs" with open(experts_file_path, "rb") as f: expert_trajectories = pickle.load(f) # (num_experts) print(len(expert_trajectories)) # (trajectory_length) print(len(expert_trajectories[0]["trajectory"])) # (num_observations, 1) print(expert_trajectori...
[ 11748, 2298, 293, 198, 198, 23100, 912, 62, 7753, 62, 6978, 796, 366, 40720, 23100, 912, 14, 37687, 10137, 62, 23100, 912, 13, 8158, 1, 198, 198, 4480, 1280, 7, 23100, 912, 62, 7753, 62, 6978, 11, 366, 26145, 4943, 355, 277, 25, 1...
2.492481
266
""" Lots of code gripes. """ import os import shlex import subprocess import sys from typing import List from navio_tasks import settings as settings from navio_tasks.cli_commands import check_command_exists, config_pythonpath from navio_tasks.output import say_and_exit from navio_tasks.pure_reports.cli_pygount import...
[ 37811, 198, 43643, 286, 2438, 11762, 274, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 6812, 952, 62, 83, 6791, 1330, 6460, 355, 6460,...
2.125343
2,186
#!/usr/bin/python3 # -*- coding:utf-8 -*- """ mysql> desc userinfors; +----------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+----------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_incre...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 28744, 13976, 29, 1715, 2836, 10745, 669, 26, 198, 10, 35937, 10, 35937, 10, 23031, 10, 650, 19529, 982, 1...
2.185874
269
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files
[ 6738, 220, 844, 27349, 62, 2118, 9078, 13, 8692, 1330, 7308, 198, 6738, 220, 844, 27349, 62, 2118, 9078, 13, 16624, 1330, 13283, 628 ]
3.375
24
import os import random import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.autograd as autograd from torch.autograd import Variable from models.plain_lstm import PlainLSTM from utils import Utils from data_loader import DataLoader import argpar...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 2...
3.010638
282
""" Scrapes OIT's Web Feeds to add courses and sections to database. Procedure: - Get list of departments (3-letter department codes) - Run this: http://etcweb.princeton.edu/webfeeds/courseofferings/?term=current&subject=COS - Parse it for courses, sections, and lecture times (as recurring events) """ from lxml impo...
[ 37811, 198, 3351, 2416, 274, 440, 2043, 338, 5313, 18272, 82, 284, 751, 10902, 290, 9004, 284, 6831, 13, 198, 198, 2964, 771, 495, 25, 198, 198, 12, 3497, 1351, 286, 13346, 357, 18, 12, 9291, 5011, 12416, 8, 198, 12, 5660, 428, 25...
3.284553
123
from pyramid.view import view_config from kotti.interfaces import IFile @view_config( name="view", context=IFile, permission="view", renderer="kotti:templates/view/file.pt", ) @view_config(name="inline-view", context=IFile, permission="view") @view_config(name="attachment-view", context=IFile, pe...
[ 6738, 27944, 13, 1177, 1330, 1570, 62, 11250, 198, 198, 6738, 479, 26380, 13, 3849, 32186, 1330, 314, 8979, 628, 198, 31, 1177, 62, 11250, 7, 198, 220, 220, 220, 1438, 2625, 1177, 1600, 198, 220, 220, 220, 4732, 28, 5064, 576, 11, ...
2.798913
184
#!/usr/bin/python2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A simple recursive-descent parser for the table file format. The grammar implemented here is roughly (taking some liberties ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 198, 2, 15069, 357, 66, 8, 2321, 383, 12547, 20985, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 1...
2.686022
465
import cv2 import numpy as np import logging from argparse import ArgumentParser from src.classifier import Classifier from src.reader import ImageReader from src.solver import SudokuSolver if __name__ == "__main__": parser = ArgumentParser() parser.add_argument("image", help="Input image") parser.add_arg...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 18931, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 12351, 13, 4871, 7483, 1330, 5016, 7483, 198, 6738, 12351, 13, 46862, 1330, 7412, 33634, 198, 6738, 12351, ...
2.634454
476
from django.test import TestCase from django.test import Client # Create your tests here. from django.conf import settings from django.test import TestCase from .models import * """ Data is not testing or returning 0 due to authentication. Turn off authentication to get proper result we can use more test case as CR...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 2, 13610, 534, 5254, 994, 13, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 19...
4.147059
102
# pylint: disable=no-member,invalid-name,redefined-outer-name """ArviZ plotting backends.""" import re import numpy as np from pandas import DataFrame from ...rcparams import rcParams __all__ = [ "to_cds", "output_notebook", "output_file", "ColumnDataSource", "create_layout", "show_layout", ]...
[ 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 19522, 11, 259, 12102, 12, 3672, 11, 445, 18156, 12, 39605, 12, 3672, 198, 37811, 3163, 8903, 57, 29353, 736, 2412, 526, 15931, 198, 11748, 302, 198, 198, 11748, 299, 32152, 355, 45941, 19...
2.245035
3,424
#!/usr/bin/env python import sys from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop import vnaas PORT = 8080 if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 6738, 33718, 13, 18504, 12397, 1330, 25290, 38, 2149, 756, 10613, 198, 6738, 33718, 13, 5450, 18497, 1330, 38288, 18497, 198, 6738, 33718, 13, 1669, 11224, 1330, 314, ...
2.972222
72
first_name = input() last_name = input() age = int(input()) town = input() concatanate_variables(first_name, last_name, age, town)
[ 11085, 62, 3672, 796, 5128, 3419, 198, 12957, 62, 3672, 796, 5128, 3419, 198, 496, 796, 493, 7, 15414, 28955, 198, 12735, 796, 5128, 3419, 628, 198, 198, 1102, 9246, 272, 378, 62, 25641, 2977, 7, 11085, 62, 3672, 11, 938, 62, 3672, ...
2.734694
49
import random import time
[ 11748, 4738, 198, 11748, 640, 628, 628, 198 ]
3.75
8
"""Test the OUTCAR io interface""" # pylint: disable=unused-import,redefined-outer-name,unused-argument,unused-wildcard-import,wildcard-import import pytest from aiida_vasp.utils.fixtures import * from aiida_vasp.utils.fixtures.testdata import data_path from aiida_vasp.io.outcar import OutcarParser def test_parse_o...
[ 37811, 14402, 262, 16289, 20034, 33245, 7071, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 11, 445, 18156, 12, 39605, 12, 3672, 11, 403, 1484, 12, 49140, 11, 403, 1484, 12, 21992, 9517, 12, 11748, 11, 21992, 9...
2.740053
377
# -------------------------------------------------------- # Swin Transformer # Copyright (c) 2021 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ze Liu # -------------------------------------------------------- import torch import torch.nn as nn from timm.models.layers import DropPa...
[ 2, 20368, 22369, 198, 2, 2451, 259, 3602, 16354, 198, 2, 15069, 357, 66, 8, 33448, 5413, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 9033, 18258, 198, 2, 20368, 22369, 198, 198,...
2.708302
1,337
from typing import Union, Iterable, Mapping, Any import peewee from backend.library.decorators.cache import unified
[ 6738, 19720, 1330, 4479, 11, 40806, 540, 11, 337, 5912, 11, 4377, 198, 11748, 613, 413, 1453, 198, 198, 6738, 30203, 13, 32016, 13, 12501, 273, 2024, 13, 23870, 1330, 22706, 628 ]
3.6875
32
import time import random import requests from lxml import etree headers = { "UserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" } if __name__ == "__main__": crawl_main()
[ 11748, 640, 201, 198, 11748, 4738, 201, 198, 11748, 7007, 201, 198, 6738, 300, 19875, 1330, 2123, 631, 201, 198, 201, 198, 201, 198, 50145, 796, 1391, 201, 198, 220, 220, 220, 366, 12982, 36772, 1298, 366, 44, 8590, 5049, 14, 20, 13...
2.246032
126
#!/usr/bin/env python """End to end tests for lib.flows.general.grep.""" from grr.endtoend_tests import base from grr.lib import aff4 from grr.lib.rdfvalues import client as rdf_client class TestSearchFiles(base.AutomatedTest): """Test SearchFileContent.""" platforms = ["Linux"] flow = "SearchFileContent" t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 12915, 284, 886, 5254, 329, 9195, 13, 44041, 13, 24622, 13, 70, 7856, 526, 15931, 628, 198, 6738, 1036, 81, 13, 437, 1462, 437, 62, 41989, 1330, 2779, 198, 6738, 1036, 81, 13,...
2.684887
311
from django.contrib import admin # from django.contrib.auth.admin import UserAdmin as BaseUserAdmin # from django.contrib.auth.models import User # Register your models here. from .models import LessonPeriods,DailyAttendance admin.site.register(LessonPeriods) admin.site.register(DailyAttendance)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 2, 422, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 355, 7308, 12982, 46787, 198, 2, 422, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, ...
3.311111
90
import logging from odoo import http from odoo.exceptions import except_orm, UserError, Warning from odoo.http import request, serialize_exception as _serialize_exception, content_disposition from odoo import api, fields, models, tools, _ import datetime from urllib.parse import urlencode, quote as quote import urllib....
[ 11748, 18931, 198, 6738, 16298, 2238, 1330, 2638, 198, 6738, 16298, 2238, 13, 1069, 11755, 1330, 2845, 62, 579, 11, 11787, 12331, 11, 15932, 198, 6738, 16298, 2238, 13, 4023, 1330, 2581, 11, 11389, 1096, 62, 1069, 4516, 355, 4808, 46911...
2.362776
634
import opensees as ops ops.wipe() ops.uniaxialMaterial("Elastic", 1, 1000.); ops.testUniaxialMaterial(1); for strain in [0.01, 0.02, 0.03, 0.04, 0.05]: ops.setStrain(strain); print("strain: ", str(ops.getStrain()), " stress: ", str(ops.getStress()), " tangent: ", str(ops.getTangent())); ops.uniaxialMaterial...
[ 11748, 1034, 1072, 274, 355, 39628, 198, 198, 2840, 13, 86, 3757, 3419, 198, 198, 2840, 13, 39934, 87, 498, 17518, 7203, 9527, 3477, 1600, 352, 11, 8576, 13, 1776, 198, 2840, 13, 9288, 3118, 544, 87, 498, 17518, 7, 16, 1776, 198, ...
2.339768
259
"""pieces of thing for inspiration """ import itertools from dataclasses import dataclass from itertools import takewhile as itertools_takewhile from atypes import Slab from creek import Creek from creek.util import to_iterator from i2 import MultiObj, FuncFanout, ContextFanout, Pipe from typing import Callable, Iter...
[ 37811, 34154, 286, 1517, 329, 12141, 198, 198, 37811, 198, 11748, 340, 861, 10141, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 340, 861, 10141, 1330, 1011, 4514, 355, 340, 861, 10141, 62, 20657, 4514, 198, 198, 6738,...
2.495726
1,287
# Generated by Django 3.1.4 on 2021-01-16 09:02 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 486, 12, 1433, 7769, 25, 2999, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
import datetime from snippets.utils.datetime import utcnow from vars.models import SiteConfig CACHE_TIMEOUT = datetime.timedelta(0, 30) site_config = SiteConfigs()
[ 11748, 4818, 8079, 198, 198, 6738, 45114, 13, 26791, 13, 19608, 8079, 1330, 3384, 66, 2197, 198, 6738, 410, 945, 13, 27530, 1330, 14413, 16934, 628, 198, 34, 2246, 13909, 62, 34694, 12425, 796, 4818, 8079, 13, 16514, 276, 12514, 7, 15...
2.982456
57
import seaborn as sns import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1 import make_axes_locatable from data_transformer import transform_neural_to_normal from analysis_functions import calculate_angle_from_history, calculate_winni...
[ 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 431...
2.335193
1,972
import os import datetime from dateutil.tz import tzlocal import h5py as h5 import numpy as np from warp import getselfe, getphi, getb, geta class FieldDiagnostic(object): """ Common functionality for field diagnostic classes Parameters: solver: A solver object containing fields to b...
[ 11748, 28686, 198, 198, 11748, 4818, 8079, 198, 6738, 3128, 22602, 13, 22877, 1330, 256, 89, 12001, 198, 11748, 289, 20, 9078, 355, 289, 20, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 25825, 1330, 651, 944, 68, 11, 651, 34846, 11,...
2.059129
964
#!/usr/bin/env python # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 13130, 383, 24936, 13, 2398, 5693, 327, 13, 40, 13, 34, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
3.54918
244
import os import json import h5py import random import numpy as np from config_parser.config import PATHS, DEBUG from data_loader.base import CacheLoader from data_loader.image import image2array H5_PATH = PATHS["h5_path"] JSON_PATH = PATHS["json_path"] SHOEPRINT_DIR = PATHS["shoeprint_dir"] SAMPLE_DIR = PATHS["sampl...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 289, 20, 9078, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4566, 62, 48610, 13, 11250, 1330, 28748, 7998, 11, 16959, 198, 6738, 1366, 62, 29356, 13, 8692, 1330, 3408...
1.858961
4,637
from __future__ import annotations from . import debug from typing import Coroutine, Tuple, Type, Callable, TypeVar, Optional, List, Any, Dict from types import FunctionType import abc APP_VERSION = 3004000 TDF_MAGIC = b"TDF$" _T = TypeVar("_T") _TCLS = TypeVar("_TCLS", bound=type) _RT = TypeVar("_RT") _F = TypeVa...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 764, 1330, 14257, 198, 198, 6738, 19720, 1330, 2744, 28399, 11, 309, 29291, 11, 5994, 11, 4889, 540, 11, 5994, 19852, 11, 32233, 11, 7343, 11, 4377, 11, 360, 713, 198, 6738, 3858, ...
3.05
340
""" Cram tests """ import logging import os import six from tasks.util.workunit import get_refspec_after_overrides from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.orchestra import run from teuthology.config import config as teuth_config log = logging.getLogger(__na...
[ 37811, 198, 34, 859, 5254, 198, 37811, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 2237, 198, 198, 6738, 8861, 13, 22602, 13, 1818, 20850, 1330, 651, 62, 5420, 16684, 62, 8499, 62, 2502, 81, 1460, 198, 198, 6738, 573, 1071,...
1.93264
2,598
# This code calculates the number of unique words in each review: # from pathos.multiprocessing import ProcessingPool as Pool import multiprocessing from multiprocessing.pool import Pool from tqdm import tqdm import time # import timing import re # import the library for regular expressions from nltk.tokenize import ...
[ 2, 770, 2438, 43707, 262, 1271, 286, 3748, 2456, 287, 1123, 2423, 25, 198, 198, 2, 422, 3108, 418, 13, 16680, 541, 305, 919, 278, 1330, 28403, 27201, 355, 19850, 198, 11748, 18540, 305, 919, 278, 198, 6738, 18540, 305, 919, 278, 13,...
2.596178
1,622
from flask import render_template from flask import request from flaskexample import app from sqlalchemy import create_engine import pandas as pd import psycopg2 import yaml from a_Model import ModelIt from flaskexample.support_functions import formatted_query ymlfile = open("../configs.yml", 'r') cfg = yaml.load(ymlf...
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 1330, 2581, 198, 6738, 781, 292, 365, 87, 1403, 1330, 598, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 17331, 22163, 70, ...
2.623729
295
from bempy import context_blocks context_blocks('cssreset', locals())
[ 6738, 307, 3149, 88, 1330, 4732, 62, 27372, 198, 198, 22866, 62, 27372, 10786, 25471, 42503, 3256, 17205, 28955, 198 ]
3.55
20
#coding:utf-8 # # id: functional.tabloid.dbp_2146_distinct_not_in # title: Common SQL. Check correctness of the results # decription: # tracker_id: # min_versions: ['2.5'] # versions: 2.5 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 2.5 ...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10345, 13, 8658, 75, 1868, 13, 9945, 79, 62, 17, 20964, 62, 17080, 4612, 62, 1662, 62, 259, 198, 2, 3670, 25, 220, 2...
1.695876
1,358
from HubSale import HubSale from pprint import pprint client_id = "" client_secret = "" hubsale = HubSale(client_id, client_secret) code, message = hubsale.connect() if code: print("Success!!!") else: print('Oops,', message)
[ 6738, 14699, 50, 1000, 1330, 14699, 50, 1000, 198, 6738, 279, 4798, 220, 1330, 279, 4798, 198, 198, 16366, 62, 312, 220, 220, 220, 220, 796, 13538, 198, 16366, 62, 21078, 796, 13538, 198, 198, 40140, 21378, 220, 220, 220, 220, 220, ...
2.608696
92
"""""" Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. For examp...
[ 15931, 15931, 15931, 198, 12814, 3891, 13, 14116, 357, 3506, 3904, 290, 705, 16928, 7502, 14, 21745, 1081, 986, 33809, 257, 6337, 42, 2420, 2393, 7268, 625, 1936, 12, 400, 29910, 717, 3891, 11, 198, 27471, 416, 29407, 340, 656, 24830, ...
3.041876
597
from sklearn.compose import ColumnTransformer from sklearn.utils.validation import check_array, check_is_fitted from scipy import sparse from collections import namedtuple import numpy as np import pandas as pd class TSColumnTransformer(ColumnTransformer): """Time Series compatible ColumnTransformer. Allow u...
[ 6738, 1341, 35720, 13, 785, 3455, 1330, 29201, 8291, 16354, 198, 6738, 1341, 35720, 13, 26791, 13, 12102, 341, 1330, 2198, 62, 18747, 11, 2198, 62, 271, 62, 38631, 198, 6738, 629, 541, 88, 1330, 29877, 198, 6738, 17268, 1330, 3706, 83...
2.177494
2,586
""" Structural subsystem -------------------- """ import numpy as np from .subsystem import Subsystem class SubsystemStructural(Subsystem): """ Abstract base class for all structural subsystems. """ @property def conductance_point_average(self): """ Average point conductance of a...
[ 37811, 198, 44909, 1523, 39335, 198, 19351, 198, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 7266, 10057, 1330, 3834, 10057, 628, 198, 4871, 3834, 10057, 44909, 1523, 7, 7004, 10057, 2599, 198, 220, 220, 220, 37227, ...
2.202663
676
# Generated by Django 3.0.4 on 2020-04-20 22:13 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 19, 319, 12131, 12, 3023, 12, 1238, 2534, 25, 1485, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import warnings from setuptools import setup, Extension from Cython.Distutils import build_ext dist_dir = os.path.dirname(os.path.abspath(__file__)) os.system("gunzip -kf %s/irtrans/models/* 2> /dev/null" %dist_d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 14601, 198, ...
2.380558
1,327
import os import time import json import random import logging.config import networkx as nx from pathlib import Path import matplotlib.pyplot as plt from yafs.core import Sim from yafs.application import create_applications_from_json from yafs.topology import Topology from yafs.placement import JSONPlacement from ya...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 18931, 13, 11250, 198, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83,...
3.427419
124
# Created on Jan 12 2015 import statistics import math import os __author__ = "Jinglei Ren" __copyright__ = "Copyright (c) 2015 Jinglei Ren" __email__ = "jinglei@ren.systems" RESULTS_FILE = 'ycsb-redis.results'
[ 2, 15622, 319, 2365, 1105, 1853, 198, 198, 11748, 7869, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 834, 9800, 834, 796, 366, 41, 17697, 72, 7152, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 357, 66, 8, 1853, 449, 17697, 72,...
2.805195
77
from oracle_conn import run_select as oc_select, run_insert as oc_insert, run_sql as oc_sql, new_conn as oc_conn from mysql_connection import run_select as sql_select,run_sql,new_conn as sql_conn from datetime import datetime import re #Get country code from senior based on country name #Get city code from senior ba...
[ 6738, 393, 6008, 62, 37043, 1330, 1057, 62, 19738, 355, 267, 66, 62, 19738, 11, 1057, 62, 28463, 355, 267, 66, 62, 28463, 11, 1057, 62, 25410, 355, 267, 66, 62, 25410, 11, 649, 62, 37043, 355, 267, 66, 62, 37043, 198, 6738, 48761,...
2.686875
1,600
import json import os import sys from django.conf.global_settings import * # noqa from django.core.exceptions import ImproperlyConfigured from unipath import Path import dbservice as project_module """Base settings shared by all environments""" # ====================================================================...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 20541, 62, 33692, 1330, 1635, 220, 1303, 645, 20402, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, ...
2.319401
3,876
import unittest import numpy as np import pandas as pd import numpy.testing as np_testing import pandas.testing as pd_testing import os import import_ipynb from sklearn.model_selection import train_test_split from keras.models import Sequential from keras.layers import Dense, Activation from tensorflow import random fr...
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 13, 33407, 355, 45941, 62, 33407, 198, 11748, 19798, 292, 13, 33407, 355, 279, 67, 62, 33407, 198, 11748, 28686, 1...
3.331288
163
# This file is just Python, with a touch of Django which means # you can inherit and tweak settings to your hearts content. from sentry.conf.server import * import os.path CONF_ROOT = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE': 'sentry.db.postgres', 'NAME': '{{ sentry_db_name }...
[ 2, 770, 2393, 318, 655, 11361, 11, 351, 257, 3638, 286, 37770, 543, 1724, 198, 2, 345, 460, 16955, 290, 25393, 6460, 284, 534, 11954, 2695, 13, 198, 6738, 1908, 563, 13, 10414, 13, 15388, 1330, 1635, 198, 198, 11748, 28686, 13, 6978...
2.925191
1,310
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import sys from text_stoppers import * from text_validators import * from random import choice class MarkovGenerator(object): """A Markov chain text generator""" def open_and_read_file(self, filename): """Take file(s) as tuples; return text ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 40481, 82, 198, 11748, 25064, 198, 6738, 2420, 62, 301, 37186, 1330, 1635, 198, 6738, 2420, 62, 12102, 2024, 133...
2.242159
1,371
from typing import Any, Callable, Dict import datetime import os from blossom_wrapper import BlossomAPI from praw import Reddit # Load configuration regardless of if bugsnag is setup correctly try: import bugsnag except ImportError: # If loading from setup.py or bugsnag isn't installed, we # don't want to...
[ 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 698, 25548, 62, 48553, 1330, 35544, 17614, 198, 6738, 279, 1831, 1330, 10750, 198, 198, 2, 8778, 8398, 7692, 286, 611, 11...
2.936269
863
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='pipsy', version="0.1.2", description='Shows updates for installed packages', long_description='Shows available updates and security notices for installed packages', author='Donovan Schönknecht', author_email='don@...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 79, 541, 1837, 3256, 198, 220, 220, 220, 2196, 2625...
2.409178
523
import librosa import numpy as np from vad.acoustics.transforms.transform import Transform from vad.data_models.audio_data import AudioData
[ 11748, 9195, 4951, 64, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 410, 324, 13, 330, 23968, 873, 13, 7645, 23914, 13, 35636, 1330, 26981, 198, 6738, 410, 324, 13, 7890, 62, 27530, 13, 24051, 62, 7890, 1330, 13491, 6601, 628 ]
3.380952
42
import traceback import os import numpy as np from sklearn.preprocessing import MinMaxScaler from sklearn.linear_model import SGDRegressor from machine_learner.utils import repository DIR_PATH = os.path.join('machine_learner', 'trained_models', 'pllaregression')
[ 11748, 12854, 1891, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 26147, 7707, 1533, 44292, 198, 6738, 4...
3.333333
81
"""submission table Revision ID: 143f81c3bba3 Revises: Create Date: 2019-02-25 21:25:17.891423 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '143f81c3bba3' down_revision = None branch_labels = None depends_on = None ...
[ 37811, 7266, 3411, 3084, 198, 198, 18009, 1166, 4522, 25, 24356, 69, 6659, 66, 18, 65, 7012, 18, 198, 18009, 2696, 25, 220, 198, 16447, 7536, 25, 13130, 12, 2999, 12, 1495, 2310, 25, 1495, 25, 1558, 13, 4531, 1415, 1954, 198, 198, ...
2.661157
121
from pymongo import MongoClient import os USERNAME = os.environ.get('USERNAME') PASSWORD = os.environ.get('PASSWORD') CLUSTER_INFO = os.environ.get('CLUSTER_INFO') DB_NAME = os.environ.get('DB_NAME') COLLECTION_NAME = os.environ.get('COLLECTION_NAME') cluster = MongoClient(f'mongodb+srv://{USERNAME}:{PASSWORD}{CLUSTER...
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 28686, 198, 198, 29904, 20608, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 29904, 20608, 11537, 198, 47924, 54, 12532, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 47924, 54, 12532, ...
2.851598
876
from datetime import datetime from django.test import TestCase from django.utils.dateparse import parse_datetime from restclients.exceptions import DataFailureException from restclients.models.bridge import BridgeUser, BridgeCustomField,\ BridgeUserRole from restclients.test import fdao_pws_override
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 26791, 13, 4475, 29572, 1330, 21136, 62, 19608, 8079, 198, 6738, 1334, 565, 2334, 13, 1069, 11755, 1330, 6060, 50015, ...
3.642857
84
"""Version of str(timedelta) which is not English specific.""" def duration_string(duration): days = duration.days seconds = duration.seconds microseconds = duration.microseconds minutes = seconds // 60 seconds = seconds % 60 hours = minutes // 60 minutes = minutes % 60 string = '{:...
[ 37811, 14815, 286, 965, 7, 16514, 276, 12514, 8, 543, 318, 407, 3594, 2176, 526, 15931, 201, 201, 201, 4299, 9478, 62, 8841, 7, 32257, 2599, 201, 220, 220, 220, 1528, 796, 9478, 13, 12545, 201, 220, 220, 220, 4201, 796, 9478, 13, ...
2.731579
190
""" The dependency-decomposition based unique measure partial information decomposition. """ from ...multivariate import coinformation from ..pid import BaseUniquePID from ...profiles import DependencyDecomposition __all__ = ( 'PID_dep', 'PID_RA', ) class PID_dep(BaseUniquePID): """ The dependency ...
[ 37811, 198, 464, 20203, 12, 12501, 296, 9150, 1912, 3748, 3953, 13027, 1321, 26969, 9150, 13, 198, 37811, 198, 198, 6738, 2644, 16680, 42524, 1330, 10752, 1161, 198, 6738, 11485, 35317, 1330, 7308, 40257, 47, 2389, 198, 6738, 2644, 5577, ...
2.284366
3,921
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools setuptools setuptools.setup( name='capalyzer', version='2.16.0', description="Parsing functionality for the metasub CAP", author="David C. Danko", author_email='dcdanko@gmail.com', url='https://github.com/dcdanko/capalyzer', p...
[ 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, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220,...
2.163311
447
import toml import os import datetime import itertools #load config.toml cwd = os.getcwd() path = os.path.join(cwd,'terrain-corrector','terrain','settings','config.toml') config = toml.load(path) #add config to locals locals().update(config) #...and a few more expressive variations BOUNDS = [*EAST_BOUNDS, *NORTH_BOUND...
[ 11748, 284, 4029, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 198, 2, 2220, 4566, 13, 39532, 75, 198, 66, 16993, 796, 28686, 13, 1136, 66, 16993, 3419, 198, 6978, 796, 28686, 13, 6978, 13, 22179, 7, ...
2.565217
460
# automatically generated by the FlatBuffers compiler, do not modify # namespace: CozmoAnim import flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 198, 198, 2, 25745, 25, 1766, 89, 5908, 35320, 198, 198, 11748, 6228, 36873, 364, 198 ]
3.896552
29
#:copyright: Copyright 2009-2010 by the Vesper team, see AUTHORS. #:license: Dual licenced under the GPL or Apache2 licences, see LICENSE. """ vesper.app ========== This module defines the framework used by Vesper to bootstrap a running server from a given configuration. """ import os, os.path, sys, tr...
[ 2, 25, 22163, 4766, 25, 15069, 3717, 12, 10333, 416, 262, 36448, 525, 1074, 11, 766, 37195, 20673, 13, 198, 2, 25, 43085, 25, 20446, 3476, 5864, 739, 262, 38644, 393, 24843, 17, 45475, 11, 766, 38559, 24290, 13, 198, 37811, 198, 220...
2.58256
4,094
from step_02_data_analyzer import data, target from step_05_classify_data import t from sklearn.decomposition import PCA from pylab import plot, show, figure, subplot pca = PCA(n_components=2) pcad = pca.fit_transform(data) figure() subplot(211) plot(pcad[target=='setosa',0],pcad[target=='setosa',1],'bo') plot(pcad...
[ 6738, 2239, 62, 2999, 62, 7890, 62, 38200, 9107, 1330, 1366, 11, 2496, 198, 6738, 2239, 62, 2713, 62, 4871, 1958, 62, 7890, 1330, 256, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 6738, 279, 2645, 397, 1330, 71...
2.318612
317
# -*- Mode: Python; tab-width: 4 -*- # Copyright (c) 2005-2010 Slide, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyrig...
[ 2, 532, 9, 12, 10363, 25, 11361, 26, 7400, 12, 10394, 25, 604, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 5075, 12, 10333, 37651, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, ...
2.495408
5,226
import random as r if __name__ == "__main__": main()
[ 11748, 4738, 355, 374, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 12417, 3419 ]
2.7
20
# -*- coding:utf-8 -*- import json import time import random import hashlib import urllib import urllib2 if __name__ == '__main__': html = send_request() dict_obj = json.loads(html) # 翻译的内容 print(dict_obj["translateResult"][0][0]["tgt"])
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 12234, 8019, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.294643
112
from Desktop.chess-nn.minimax_lookup import * from Desktop.chess-nn.evl_conv_3 import model_fn with tf.device('/gpu:0'): evl_conv_temp = tf.estimator.Estimator( model_fn = model_fn, model_dir = './DNN/evl_conv_5') player_side = input("Please choose your side(b/w): ") difficulty = input("Choose Diff...
[ 6738, 27850, 13, 2395, 824, 12, 20471, 13, 1084, 320, 897, 62, 5460, 929, 1330, 1635, 198, 6738, 27850, 13, 2395, 824, 12, 20471, 13, 1990, 75, 62, 42946, 62, 18, 1330, 2746, 62, 22184, 628, 628, 198, 198, 4480, 48700, 13, 25202, ...
2.581818
220
import libnum import hashlib import random n=8269 g=11 password = "Hello" x = int(hashlib.sha256(password.encode()).hexdigest()[:8], 16) % n print('\n======Phase 4: Peggy recieves c and calculate r=v-cx, sends r to Victor==================') c = input("c= ") v = input("v= ") r = (int(v) - int(c) * x) % (n-1) print(...
[ 11748, 9195, 22510, 198, 11748, 12234, 8019, 198, 11748, 4738, 198, 77, 28, 23, 26276, 198, 70, 28, 1157, 198, 198, 28712, 796, 366, 15496, 1, 198, 87, 796, 493, 7, 17831, 8019, 13, 26270, 11645, 7, 28712, 13, 268, 8189, 3419, 737, ...
2.356643
143
import sys from unittest.mock import MagicMock import pytest import pytorch_lightning as pl import torch from transformers import AutoTokenizer from lightning_transformers.core.nlp import HFBackboneConfig from lightning_transformers.task.nlp.masked_language_modeling import ( MaskedLanguageModelingDataModule, ...
[ 11748, 25064, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 11748, 12972, 9288, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 28034, 198, 6738, 6121, 364, 1330, 11160, 30642, 7509, 198, 19...
3.447853
163