content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import xmltodict from path import Path if __name__ == '__main__': # Fix pb in tlocal path cwd = Path.getcwd() if (cwd/'data').isdir(): data = cwd/'data' elif (cwd/'test'/'data').isdir(): data = cwd/'test'/'data' else: print('Data directory not found') xmls = data.glob('*.xml') fn = data....
[ 11748, 33918, 198, 11748, 2124, 76, 2528, 375, 713, 198, 6738, 3108, 1330, 10644, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 197, 197, 198, 197, 2, 13268, 279, 65, 287, 256, 12001, 3108, 198, 197, 66, 1...
2.235897
195
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """Module of the micro-benchmark base class.""" import os import subprocess import shutil import statistics from abc import abstractmethod from superbench.common.utils import logger from superbench.benchmarks import BenchmarkType, ReturnCode fr...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 37811, 26796, 286, 262, 4580, 12, 26968, 4102, 2779, 1398, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 4423, 346, ...
2.227229
3,129
import os from db import Controller db_path = os.path.join( __file__, "..", "RenderManager.db" ) Controller.init(db_path) # Create Job job = Controller.create_job( r"J:\UCG\Episodes\Scenes\EP100\SH002.00A\UCG_EP100_SH002.00A_CMP.nk", "WRITE_IMG", r"J:\UCG\UCG_Nuke10.bat", "renderN...
[ 11748, 28686, 198, 6738, 20613, 1330, 22741, 198, 198, 9945, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 11593, 7753, 834, 11, 366, 492, 1600, 366, 45819, 13511, 13, 9945, 1, 1267, 198, 22130, 13, 15003, 7, 9945, 62, 6978, 8, 198,...
2.245562
338
# coding: utf-8 # This file is part of libdesktop # The MIT License (MIT) # # Copyright (c) 2016 Bharadwaj Raju # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 770, 2393, 318, 636, 286, 9195, 41375, 198, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 33653, 324, 86, 1228, 13308, 84, 198, 2, 198, 2, 2448,...
2.414372
5,302
import pytest from trader.combat import Combat, CombatEventCode, CombatAction from trader.profiles import Vessel from trader.profiles import VesselUpgrade @pytest.fixture
[ 11748, 12972, 9288, 201, 198, 6738, 31791, 13, 39969, 1330, 14487, 11, 14487, 9237, 10669, 11, 14487, 12502, 201, 198, 6738, 31791, 13, 5577, 2915, 1330, 44734, 201, 198, 6738, 31791, 13, 5577, 2915, 1330, 44734, 44948, 201, 198, 201, 1...
3.186441
59
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board # for the bno055 import busio # import bitbangio import adafruit_bno055 # fr the LCD import lcd_rgb # Use these lines for I2C bno_SDA = board.GP18 bno_SCL = board.GP19 i2c = busi...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 10846, 4763, 329, 1215, 1878, 4872, 20171, 201, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 201, 198, 201, 198, 11748, 640, 201, 198, 11748, 3096, 201, 198, 201, 198, 2, ...
1.975248
404
import os
[ 11748, 28686 ]
4.5
2
import math a = int(input()) print(a**2 + (a/2) * 2)
[ 11748, 10688, 198, 198, 64, 796, 493, 7, 15414, 28955, 198, 198, 4798, 7, 64, 1174, 17, 1343, 357, 64, 14, 17, 8, 1635, 362, 8 ]
2.076923
26
from config import INFLUENCER_SET_SCALE def _influencer_set(G, sampler=None, l=5.0, **sampler_args): """ Returns a set of influencers which is an approximate maximum cut with loss term on number of nodes Parameters ---------- G : NetworkX graph sampler A binary quadratic model s...
[ 6738, 4566, 1330, 3268, 3697, 52, 24181, 1137, 62, 28480, 62, 6173, 21358, 628, 198, 198, 4299, 4808, 10745, 2290, 12137, 62, 2617, 7, 38, 11, 6072, 20053, 28, 14202, 11, 300, 28, 20, 13, 15, 11, 12429, 37687, 20053, 62, 22046, 2599...
2.794245
695
import sys,os sys.path.append(os.path.dirname(__file__))
[ 11748, 25064, 11, 418, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198 ]
2.478261
23
#Задание 3. Вариант 32 #Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток. #Ширлин Вячеслав Викторович #29.04.2016 import random print ("Компьютер загадывает рандомно название одного из шести раздновидностей тигров ( Ам...
[ 2, 140, 245, 16142, 43666, 16142, 22177, 18849, 16843, 513, 13, 12466, 240, 16142, 21169, 18849, 16142, 22177, 20375, 3933, 198, 2, 140, 254, 16142, 140, 115, 21169, 16142, 140, 109, 15166, 20375, 16142, 140, 117, 20375, 16843, 220, 21727...
1.110009
1,109
from django.urls import path, include from . import views urlpatterns = [path("", views.test), path("all", views.allusers), path("token", views.decodeToken), path("login", views.log_in), path("logout", views.log_out), path("register", views.re...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 6978, 7203, 1600, 5009, 13, 9288, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.921844
499
#!python ################################################# #===============================================# # | Ascii Art :) | # # # | | # # # --------------------------------------------- # # ---- Keysboard for Linux by Dunkmania101 ---- # # ---------...
[ 2, 0, 29412, 198, 29113, 14468, 2, 198, 2, 10052, 25609, 18604, 2, 198, 2, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 979, 72, 3683, 14373, 220, 220, 220, 220, ...
3.100599
835
from openapi_spec_validator import validate_spec import json VALID_TRANSACTION = dict() VALID_TRANSACTION["amount"] = "100" VALID_TRANSACTION["transactionType"] = "credit" VALID_TRANSACTION_DEBIT = dict() VALID_TRANSACTION_DEBIT["amount"] = "100" VALID_TRANSACTION_DEBIT["transactionType"] = "debit" EXAMPLE_USER_ID =...
[ 6738, 1280, 15042, 62, 16684, 62, 12102, 1352, 1330, 26571, 62, 16684, 198, 11748, 33918, 198, 198, 23428, 2389, 62, 5446, 15037, 44710, 796, 8633, 3419, 198, 23428, 2389, 62, 5446, 15037, 44710, 14692, 17287, 8973, 796, 366, 3064, 1, 1...
3.38
450
import argparse import numpy as np import torch import torch.nn.functional as F from torch_geometric.nn import GCNConv from datasets import get_planetoid_dataset from train_eval import run parser = argparse.ArgumentParser() parser.add_argument('--dataset', type=str, required=True) parser.add_argument('--split', type=s...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 62, 469, 16996, 13, 20471, 1330, 20145, 45, 3103, 85, 198, 6738, 40522, 1330, 651, 62, 47427...
2.571429
1,008
# Generated by Django 3.0.5 on 2020-04-14 07:31 import os from django.db import migrations from django.db import transaction from django.contrib.gis.geos import MultiPolygon from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.gdal import DataSource RUTA_MUNICIPIOS_SHP = os.path.join( os.path...
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3023, 12, 1415, 8753, 25, 3132, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 42...
2.448087
183
from typing import Dict from typing import Tuple from typing import Union from .metrics import Metric class TaskResult: """Contains the results of a result, which can be arbitrary metrics. At least one of these metrics must be references as a summary metric. Args: summary_metrics: Associates :py...
[ 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 19720, 1330, 4479, 198, 198, 6738, 764, 4164, 10466, 1330, 3395, 1173, 628, 198, 4871, 15941, 23004, 25, 198, 220, 220, 220, 37227, 4264, 1299, 262, 2482, 286, ...
2.13089
573
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628 ]
2.4
10
import os import tesserocr TESSDATA_PREFIX = os.environ['TESSDATA_PREFIX'] if 'TESSDATA_PREFIX' in os.environ else tesserocr.get_languages()[0]
[ 11748, 28686, 198, 11748, 256, 408, 263, 1696, 198, 51, 7597, 26947, 62, 47, 31688, 10426, 796, 28686, 13, 268, 2268, 17816, 51, 7597, 26947, 62, 47, 31688, 10426, 20520, 611, 705, 51, 7597, 26947, 62, 47, 31688, 10426, 6, 287, 28686,...
2.4
60
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981 ]
4
7
import traceback from idaapi import * from idautils import * from idc import * from elftools import * import utils from hashlib import md5 class InfoCollector: """Collect infomation from IDA Pro"""
[ 11748, 12854, 1891, 198, 6738, 220, 3755, 15042, 1330, 1635, 198, 6738, 4686, 2306, 4487, 1330, 1635, 198, 6738, 4686, 66, 1330, 1635, 198, 6738, 1288, 701, 10141, 1330, 1635, 198, 11748, 3384, 4487, 198, 6738, 12234, 8019, 1330, 45243, ...
3.222222
63
from collections import defaultdict from itertools import chain from ..doc import Chain from .process import Process from nel import logging log = logging.getLogger() class MentionClusterer(Process): """ Perform in-document coreference clustering over mentions """ @classmethod class SpanOverlap(MentionClust...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 6738, 11485, 15390, 1330, 21853, 198, 6738, 764, 14681, 1330, 10854, 198, 198, 6738, 299, 417, 1330, 18931, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, ...
3.657895
114
from Databases import DatabaseContext
[ 6738, 16092, 18826, 1330, 24047, 21947 ]
6.166667
6
from aiida.plugins import DataFactory, WorkflowFactory from aiida import orm from aiida.engine import submit from aiida_common_workflows.common import ElectronicType, RelaxType, SpinType from aiida_common_workflows.plugins import get_entry_point_name_from_class from aiida_common_workflows.plugins import load_workflow_...
[ 6738, 257, 72, 3755, 13, 37390, 1330, 6060, 22810, 11, 5521, 11125, 22810, 198, 6738, 257, 72, 3755, 1330, 393, 76, 198, 6738, 257, 72, 3755, 13, 18392, 1330, 9199, 198, 198, 6738, 257, 72, 3755, 62, 11321, 62, 1818, 44041, 13, 1132...
2.249026
2,309
import boto.dynamodb2 from boto.dynamodb2.fields import HashKey, RangeKey, AllIndex from boto.dynamodb2.table import Table from boto.dynamodb2.types import NUMBER connection= boto.dynamodb2.connect_to_region('eu-west-1') parking = Table.create('parking', schema=[HashKey('parkid'),])
[ 11748, 275, 2069, 13, 67, 4989, 375, 65, 17, 198, 6738, 275, 2069, 13, 67, 4989, 375, 65, 17, 13, 25747, 1330, 21059, 9218, 11, 13667, 9218, 11, 1439, 15732, 198, 6738, 275, 2069, 13, 67, 4989, 375, 65, 17, 13, 11487, 1330, 8655, ...
2.730769
104
import random import string from itsdangerous import \ (TimedJSONWebSignatureSerializer as Serializer, BadSignature, SignatureExpired) from passlib.apps import custom_app_context as pwd_context from sqlalchemy import Column, Integer, String, DateTime from sqlalchemy import create_engine from sqlalchemy.ext.de...
[ 11748, 4738, 198, 11748, 4731, 198, 198, 6738, 663, 38537, 516, 1330, 3467, 198, 220, 220, 220, 357, 14967, 276, 40386, 13908, 11712, 1300, 32634, 7509, 355, 23283, 7509, 11, 198, 220, 220, 220, 220, 7772, 11712, 1300, 11, 34894, 3109, ...
2.899038
208
""" Multiple Particle Systems by Daniel Shiffman. Click the mouse to generate a burst of particles at mouse location. Each burst is one instance of a particle system with Particles and CrazyParticles (a subclass of Particle). Note use of Inheritance and Polymorphism here. """ from crazy_particle import CrazyParticle...
[ 37811, 198, 31217, 2142, 1548, 11998, 198, 1525, 7806, 911, 733, 805, 13, 198, 198, 8164, 262, 10211, 284, 7716, 257, 11173, 286, 13166, 198, 265, 10211, 4067, 13, 198, 198, 10871, 11173, 318, 530, 4554, 286, 257, 18758, 1080, 198, 44...
4
103
import os import tempfile from typing import Optional from google.cloud import storage, exceptions from google.cloud.storage import Client, Bucket def media_key(library, id, file_kind) -> str: """ `library`: {`"global"`, `"user"`} `id`: hyphenated UUID string `file_kind`: `{"original.png", "resized....
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 23645, 13, 17721, 1330, 6143, 11, 13269, 198, 6738, 23645, 13, 17721, 13, 35350, 1330, 20985, 11, 48353, 628, 198, 198, 4299, 2056, 62, 2539, 7, 32016...
2.668394
386
from pathlib import Path from urllib.parse import urlparse import site from pynvim import Nvim from paramiko import SFTPClient from defx.action import ActionAttr from defx.kind.file import Kind as Base from defx.base.kind import action from defx.clipboard import ClipboardAction from defx.context import Context from d...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 11748, 2524, 198, 198, 6738, 279, 2047, 31124, 1330, 399, 31124, 198, 6738, 5772, 12125, 1330, 14362, 7250, 11792, 198, 198, 6738, 825, 87, 13...
3.18239
159
from node import Node class _Queue(object): """ Queue is a classic data structure built upon Node. It follows the FIFO rule, such that the first element in shall be the first one out. Like a queue in line. """ def enqueue(self, value): """ takes any value as an argument and adds t...
[ 6738, 10139, 1330, 19081, 628, 198, 4871, 4808, 34991, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4670, 518, 318, 257, 6833, 1366, 4645, 3170, 2402, 19081, 13, 632, 5679, 262, 376, 5064, 46, 3896, 11, 884, 326, 1...
2.399687
638
# -*- coding: utf-8 -*- import argparse from ..command import Command, Arg class Exec(Command): """Run python script inside the cli context. The script content is executed using `exec` python builtin. All script arguments can be accessed from the args variable inside the script:: cont...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 198, 6738, 11485, 21812, 1330, 9455, 11, 20559, 628, 198, 4871, 8393, 7, 21575, 2599, 198, 220, 220, 220, 37227, 10987, 21015, 4226, 2641, ...
2.866906
278
import fileinput import math if __name__ == "__main__": # execute only if run as a script main()
[ 11748, 2393, 15414, 198, 11748, 10688, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 12260, 691, 611, 1057, 355, 257, 4226, 198, 220, 220, 220, 1388, 3419, 628 ]
2.894737
38
#!/usr/bin/python3 from base64 import b64encode import os from pathlib import Path import pytest import requests import time from brownie.project.scripts import run if os.getenv("GITHUB_TOKEN"): auth = b64encode(os.getenv("GITHUB_TOKEN").encode()).decode() headers = {"Authorization": "Basic {}".format(auth...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 12972, 9288, 198, 11748, 7007, 198, 11748, 640, 628, 198, 6738, 7586, ...
2.59058
276
# -*- coding: utf-8 -*- """ Created on Fri May 21 12:44:59 2021 @author: Satish Narasimhan """ import metadata as m import sentimentalyse as s import hashlyse as h if __name__ == '__main__': # The twitter handle of the user whose tweets are to be extracted #twitter_handle = "SubhadipNandy16" #...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 1737, 2310, 1105, 25, 2598, 25, 3270, 33448, 198, 198, 31, 9800, 25, 7031, 680, 13596, 292, 320, 7637, 198, 37811, 198, 11748, 20150, 355,...
2.449568
347
from dataclasses import dataclass from bindings.gmd.dq_absolute_external_positional_accuracy_type import ( DqAbsoluteExternalPositionalAccuracyType, ) __NAMESPACE__ = "http://www.isotc211.org/2005/gmd" @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 34111, 13, 70, 9132, 13, 49506, 62, 48546, 62, 22615, 62, 1930, 1859, 62, 4134, 23843, 62, 4906, 1330, 357, 198, 220, 220, 220, 360, 80, 24849, 3552, 41506, 21604, 1859, 17320...
2.75
80
import unittest from structures.tracked_set import TrackedSet # Creates new instance for each test # def test_symmetric_update(self) -> None: # self.assertEqual(self.tr_set.__len__(), 5) # self.assertEqual(len(self.tr_set.modified), 5) # self.assertEqual(self.tr_set.modified[-1], 5) ...
[ 11748, 555, 715, 395, 198, 198, 6738, 8573, 13, 2213, 6021, 62, 2617, 1330, 833, 6021, 7248, 628, 220, 220, 220, 1303, 7921, 274, 649, 4554, 329, 1123, 1332, 628, 220, 220, 220, 1303, 825, 1332, 62, 1837, 3020, 19482, 62, 19119, 7, ...
2.161512
291
import os import zipfile import random import json import numpy as np from PIL import Image ''' 参数配置 ''' train_parameters = { "class_dim": -1, #分类数 "src_path":"work/maskDetect.zip", #原始数据集路径 "target_path":"data/", #要解压的路径 "train_list_path": "data/train.txt", ...
[ 11748, 28686, 198, 11748, 19974, 7753, 198, 11748, 4738, 220, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 7061, 6, 198, 20998, 224, 46763, 108, 165, 227, 235, 163, 121, 106, 198, ...
1.486687
2,967
from math import pi, sqrt import itertools from typing import List from raytracer.tuple import ( tuple, point, vector, magnitude, normalize, dot, cross, Color, ) from raytracer.util import equal from raytracer.matrices import Matrix, I from raytracer.transformations import ( transla...
[ 6738, 10688, 1330, 31028, 11, 19862, 17034, 198, 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 26842, 2213, 11736, 13, 83, 29291, 1330, 357, 198, 220, 220, 220, 46545, 11, 198, 220, 220, 220, 966, 11, 198, 220,...
2.818182
187
from django.contrib import admin # Register your models here. from django.contrib import admin from .models import Document, Answer admin.site.register(Document) admin.site.register(Answer)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 201, 198, 2, 17296, 534, 4981, 994, 13, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 201, 198, 6738, 764, 27530, 1330, 16854, 11, 23998, 201, 198, 201, ...
3.278689
61
from datetime import datetime from pony.converting import str2datetime from pony.orm import Database, PrimaryKey, Required, Optional, db_session db = Database(provider="sqlite", filename="./db.sqlite", create_db=True) db.generate_mapping(create_tables=True)
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 26902, 13, 1102, 48820, 1330, 965, 17, 19608, 8079, 198, 6738, 26902, 13, 579, 1330, 24047, 11, 21087, 9218, 11, 20906, 11, 32233, 11, 20613, 62, 29891, 198, 198, 9945, 796, 24047, 7, 152...
3.234568
81
import sublime import sublime_plugin # This implements a selectionless_scroll_lines command that is a drop in # replacement for the scroll_lines command that is in the Sublime core; it # does the same thing but scrolls the view without changing the location of # the cursors as the built-in command does. # # The follow...
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 198, 2, 770, 23986, 257, 6356, 1203, 62, 48728, 62, 6615, 3141, 326, 318, 257, 4268, 287, 198, 2, 9014, 329, 262, 10743, 62, 6615, 3141, 326, 318, 287, 262, 3834, 27299, 4755, 26, 340...
3.618257
241
from core.redis import rds from core.parser import ScanParser
[ 6738, 4755, 13, 445, 271, 220, 1330, 374, 9310, 198, 6738, 4755, 13, 48610, 1330, 20937, 46677, 198 ]
3.5
18
import requests print("""" ▄▀ ▄▀▄ █▄░█ ▄▀▀ █░█ █░░ ▀█▀ ▄▀▄ ▀ █▀▄ █░ █░█ █░▀█ ░▀▄ █░█ █░▄ ░█░ █▀█ █ █░█ ░▀ ░▀░ ▀░░▀ ▀▀░ ░▀░ ▀▀▀ ░▀░ ▀░▀ ▀ █▀░ """) consulta()
[ 11748, 7007, 198, 4798, 7203, 37811, 198, 45786, 44033, 11019, 226, 44033, 45786, 23287, 45786, 22110, 8115, 11019, 226, 44033, 44033, 23287, 22110, 8115, 23287, 27534, 11019, 222, 8115, 44033, 11019, 226, 44033, 45786, 220, 220, 220, 220, ...
1.320611
131
# # MIT License # # Copyright (c) 2022 Nekozouneko Team Lab # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
[ 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 33160, 37167, 8590, 280, 710, 7204, 4816, 3498, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 42...
3.849711
346
import enum @enum.unique
[ 11748, 33829, 198, 198, 31, 44709, 13, 34642, 198 ]
2.888889
9
from bitwise import * def split(l, c=0): """Split the given list in two.""" return (l[: int(len(l)/2)], l[int(len(l)/2) : None if c == 0 else c]) if __name__ == "__main__": main()
[ 6738, 1643, 3083, 1330, 1635, 198, 198, 4299, 6626, 7, 75, 11, 269, 28, 15, 2599, 198, 220, 220, 220, 37227, 41205, 262, 1813, 1351, 287, 734, 526, 15931, 198, 220, 220, 220, 1441, 357, 75, 58, 25, 493, 7, 11925, 7, 75, 20679, 1...
2.309524
84
#!/usr/bin/env python """Functional testing framework for command line applications""" import difflib import itertools import os import re import subprocess import sys import shutil import time import tempfile __all__ = ['main', 'test'] def findtests(paths): """Yield tests in paths in sorted order""" for p i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 22203, 282, 4856, 9355, 329, 3141, 1627, 5479, 37811, 198, 198, 11748, 814, 8019, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 117...
2.059163
7,623
from sklearn import svm import numpy as np import pandas as pd from sklearn import metrics ###reading data # missValue=['?'] Autism=pd.read_csv('Autism-Adult.csv') # print(Autism.isnull().sum()) # print(Autism['age numeric'][62]) nanind=[] for ind in range( len(Autism['age numeric'])): if (Autism['age numeric'][ind]...
[ 6738, 1341, 35720, 1330, 264, 14761, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 20731, 198, 198, 21017, 25782, 1366, 198, 2, 2051, 11395, 28, 17816, 8348, 60, 198, 16541, 1042...
2.509859
2,485
import logging import sys import os
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 28686 ]
4.375
8
""" Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. Example 1: Input: head = [1,4,3,2,5,2], x = 3 Output: [1,2,2,4,3,5] Example 2: ...
[ 37811, 198, 15056, 262, 1182, 286, 257, 6692, 1351, 290, 257, 1988, 2124, 11, 18398, 340, 884, 326, 477, 13760, 1342, 621, 2124, 1282, 878, 13760, 3744, 621, 393, 4961, 284, 2124, 13, 198, 198, 1639, 815, 12201, 262, 2656, 3585, 1502,...
2.948864
176
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance # with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file accom...
[ 2, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 743, 407, 779, 428, 2393, 2845, 28...
2.777478
1,483
''' Created on Apr 4, 2014 @author: Simon ''' from algorithms.AbstractAlgorithm import AbstractAlgorithm from sklearn import linear_model import numpy as np class SciPyLinReg(AbstractAlgorithm): ''' classdocs ''' ORDINARY = 'ordinary' RIDGE = 'ridge' LASSO = 'lasso' def __init__(se...
[ 7061, 6, 198, 41972, 319, 2758, 604, 11, 1946, 198, 198, 31, 9800, 25, 11288, 198, 7061, 6, 198, 6738, 16113, 13, 23839, 2348, 42289, 1330, 27741, 2348, 42289, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 198, 11748, 299, 32152, 35...
2.212034
349
#!/usr/bin/python2 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); y...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 198, 198, 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428...
2.864372
1,482
""" Unit and regression test for the least_rmsd_fit module of the molsysmt package on molsysmt MolSys molecular systems. """ # Import package, test suite, and other packages as needed import molsysmt as msm import numpy as np # Distance between atoms in space and time
[ 37811, 198, 26453, 290, 20683, 1332, 329, 262, 1551, 62, 81, 907, 67, 62, 11147, 8265, 286, 262, 285, 10220, 893, 16762, 5301, 319, 285, 10220, 893, 16762, 17958, 44387, 18955, 198, 10057, 82, 13, 198, 37811, 198, 198, 2, 17267, 5301,...
3.532468
77
# Given a spgroup number, return # the crystal family letter, the centering, and if the corresponding # pointgroup has inversion (True) or not. # Generated from the output of spg_mapping.get_spgroup_data_realtime # using spglib v.1.9.4. spgroup_data = { 1: ('a', u'P', False), 2: ('a', u'P', True), 3: ('m',...
[ 2, 11259, 257, 599, 8094, 1271, 11, 1441, 198, 2, 262, 15121, 1641, 3850, 11, 262, 1247, 1586, 11, 290, 611, 262, 11188, 198, 2, 966, 8094, 468, 287, 9641, 357, 17821, 8, 393, 407, 13, 198, 2, 2980, 515, 422, 262, 5072, 286, 599...
1.75588
5,612
#Variables shipping_cost_per_kg = 1.20 customer_basket_cost = 34 customer_basket_weight = 44 #problema: si el consumidor gasta 100 euros o más, el envío es gratis. # si el envío es inferior a 100, el gasto de envío son 1.20 euros/kg if 100 <= customer_basket_cost: shipping_cost_per_kg = 0 print ("Coste del enví...
[ 2, 23907, 2977, 198, 1477, 4501, 62, 15805, 62, 525, 62, 10025, 796, 352, 13, 1238, 198, 23144, 263, 62, 65, 11715, 62, 15805, 796, 4974, 198, 23144, 263, 62, 65, 11715, 62, 6551, 796, 5846, 198, 2, 1676, 903, 2611, 25, 33721, 128...
2.57764
483
from flask import Flask, request, abort, send_from_directory from flask_cors import CORS import time import json import random import threading import http.client from collections import defaultdict app = Flask(__name__) CORS(app) # Storage # Log contains tuples of (simulated event time, name, success) log = [] #...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 4704, 278, 198, 11748, 2638, 13, 163...
2.734742
426
from service_objects.services import Service from currencies.models import Currency, Transaction, Wallet from django import forms from .models import Team # class CreateWallet(Service): # def process(self): # self.wallet = Wallet.objects.create(name="Player wallet") # return self.wallet
[ 6738, 2139, 62, 48205, 13, 30416, 1330, 4809, 198, 198, 6738, 19247, 13, 27530, 1330, 20113, 11, 45389, 11, 37249, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 764, 27530, 1330, 4816, 198, 198, 2, 1398, 13610, 47152, 7, 16177, ...
3.305263
95
from logging import log import os from time import sleep import logging from datetime import datetime as dt import sys import shutil import glob import argparse from timeit import default_timer as timer import paramiko try: from server_credentials import connection_data except Exception as e: server_conf = {}...
[ 6738, 18931, 1330, 2604, 198, 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 15095, 198, 11748, 1822, 29572, 198, ...
2.547101
552
# -*- coding: utf-8 -*- # Memoria virtual from memory import * from semantics import * from math import * # Función de la memoria virtual encargada de resolver los cuádruplos generados # Verifica si la memoria virtual corresponde al sector global
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 4942, 7661, 7166, 198, 6738, 4088, 1330, 1635, 198, 6738, 33815, 1330, 1635, 198, 6738, 10688, 1330, 1635, 198, 198, 2, 11138, 979, 18840, 390, 8591, 1066, 7661, 7166...
3.306667
75
''' URL: https://leetcode.com/problems/all-paths-from-source-to-target/ Time complexity: O(E) Space complexity: O(V) '''
[ 7061, 6, 198, 21886, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 439, 12, 6978, 82, 12, 6738, 12, 10459, 12, 1462, 12, 16793, 14, 198, 7575, 13357, 25, 440, 7, 36, 8, 198, 14106, 13357, 25, 440, 7, 53, 8, 198...
2.469388
49
markets = [ "NEO/USDT", "XTZ/USDT", "LTC/USDT", "EOS/USDT", "ETC/USDT", "DASH/USDT", "ZIL/USDT" ] exchanges=['bittrex', 'bitflyer', 'liquid', 'gateio', 'zb', 'bitfinex'] # observers if any # ["Logger", "DetailedLogger", "TraderBot", "TraderBotSim", "HistoryDumper", "Emailer", "SpecializedTra...
[ 34162, 796, 685, 198, 220, 220, 220, 366, 45, 4720, 14, 2937, 24544, 1600, 198, 220, 220, 220, 366, 25010, 57, 14, 2937, 24544, 1600, 198, 220, 220, 220, 366, 43, 4825, 14, 2937, 24544, 1600, 198, 220, 220, 220, 366, 36, 2640, 14,...
2.229323
1,064
from pathlib import Path import argparse from pylexibank.providers.tob import TOB HTML = '<div class="results_record">' \ '<div><span></span><span>1</span></div>' \ '<div><span></span><span>concept</span></div>' \ '<div>' \ '<span>A</span>' \ '<span class="Glottolog: abcd1234">Name<...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 1822, 29572, 198, 198, 6738, 279, 2349, 87, 571, 962, 13, 15234, 4157, 13, 83, 672, 1330, 5390, 33, 198, 198, 28656, 796, 705, 27, 7146, 1398, 2625, 43420, 62, 22105, 5320, 6, 3467, 198, 22...
1.982063
223
from . import rbbox_geo_cuda def rbbox_iou(rb1, rb2, vec=False, iof=False): """Compute the IoU of oriented bboxes.""" if vec: return rbbox_geo_cuda.vec_iou_iof(rb1, rb2, iof) else: return rbbox_geo_cuda.mat_iou_iof(rb1, rb2, iof)
[ 6738, 764, 1330, 374, 65, 3524, 62, 469, 78, 62, 66, 15339, 628, 198, 4299, 374, 65, 3524, 62, 72, 280, 7, 26145, 16, 11, 374, 65, 17, 11, 43030, 28, 25101, 11, 33245, 69, 28, 25101, 2599, 198, 220, 220, 220, 37227, 7293, 1133, ...
1.830986
142
# -*- coding: utf-8 -*- from ironmud.gui import Gui import curses
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 6953, 41650, 13, 48317, 1330, 1962, 72, 198, 11748, 43878 ]
2.6
25
import numpy as np lines = open("input.txt", "r").readlines() lines = [line[:-1] for line in lines] lines = [line.split(" -> ") for line in lines] lines = [list(([int(num) for num in coordinate.split(",")]) for coordinate in line) for line in lines] # find biggest values biggestX = 0 biggestY = 0 for line in lines: ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6615, 796, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 11074, 961, 6615, 3419, 198, 6615, 796, 685, 1370, 58, 21912, 16, 60, 329, 1627, 287, 3951, 60, 198, 6615, 796, 685, 1370, 13, 35312, 7...
2.184909
1,206
import warnings import numpy import torch from backobs.integration import extend from backpack import backpack from deepobs.pytorch.runners.runner import PTRunner class BackpackRunner(PTRunner): """Runner that supports BackPACK.""" def __init__(self, optimizer_class, hyperparameter_names, extensions_fn): ...
[ 11748, 14601, 198, 198, 11748, 299, 32152, 198, 11748, 28034, 198, 198, 6738, 736, 8158, 13, 18908, 1358, 1330, 9117, 198, 6738, 22526, 1330, 22526, 198, 6738, 2769, 8158, 13, 9078, 13165, 354, 13, 36740, 13, 16737, 1330, 350, 5446, 403...
2.821918
219
expected_output = { "interfaces": { "GigabitEthernet1/0/9": { "interface": "GigabitEthernet1/0/9", "statistics": { "txtotal": 3, "rxreq": 0, "txstart": 3, "rxversion": 0, "txlogoff": 0, "r...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 3849, 32186, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 38, 328, 29968, 36, 490, 3262, 16, 14, 15, 14, 24, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 2...
1.478134
343
""" .. Support for generating land-protection scenarios described in an XML file. .. codeauthor:: Rich Plevin <rich@plevin.com> .. Copyright (c) 2016 Richard Plevin See the https://opensource.org/licenses/MIT for license details. """ from ..subcommand import SubcommandABC, clean_help from ..constants import Unmana...
[ 37811, 198, 492, 7929, 329, 15453, 1956, 12, 42846, 13858, 3417, 287, 281, 23735, 2393, 13, 198, 198, 492, 2438, 9800, 3712, 3998, 350, 2768, 259, 1279, 7527, 31, 1154, 7114, 13, 785, 29, 198, 198, 492, 15069, 357, 66, 8, 1584, 6219...
3.555556
108
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ CADC ==== Module to query the Canadian Astronomy Data Centre (CADC). """ import logging import warnings import requests from numpy import ma from six.moves.urllib.parse import urlencode from six.moves.urllib_error import HTTPError from ..utils.clas...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 34, 2885, 34, 198, 1421, 628, 198, 26796, 284, 12405, 262, 5398, 25398, 9145, 6060, 9072, 357, 34, 2885, 34, 737, ...
2.24553
13,591
import astropy.units as u from galcheat.filter import Filter from galcheat.helpers import get_survey from galcheat.survey import Survey def mag2counts(magnitude, survey, filter, exposure_time=None): """Convert source magnitude to electron counts for a given survey filter To perform the computation, we use t...
[ 11748, 6468, 28338, 13, 41667, 355, 334, 198, 198, 6738, 9426, 46799, 13, 24455, 1330, 25853, 198, 6738, 9426, 46799, 13, 16794, 364, 1330, 651, 62, 11793, 3304, 198, 6738, 9426, 46799, 13, 11793, 3304, 1330, 13084, 628, 198, 4299, 2153...
2.975252
1,091
import json class inline_keyboard_button(): """ The button for a keyboard inside a message. Manual: https://core.telegram.org/bots/api#inlinekeyboardmarkup """ class reply_keyboard_button(): """ The button for a keyboard under user input. Manual: https://core.telegram.org/bots/api#keyboardbutton "...
[ 11748, 33918, 201, 198, 201, 198, 201, 198, 4871, 26098, 62, 2539, 3526, 62, 16539, 33529, 201, 198, 220, 220, 220, 37227, 383, 4936, 329, 257, 10586, 2641, 257, 3275, 13, 17969, 25, 3740, 1378, 7295, 13, 660, 30536, 13, 2398, 14, 4...
2.988764
267
from onelogin.api.client import OneLoginClient
[ 6738, 319, 417, 519, 259, 13, 15042, 13, 16366, 1330, 1881, 47790, 11792, 628 ]
3.428571
14
import web3 facetCutAction = {"Add": 0, "Replace": 1, "Remove": 2} zeroAddress = "0x0000000000000000000000000000000000000000"
[ 11748, 3992, 18, 198, 198, 69, 23253, 26254, 12502, 796, 19779, 4550, 1298, 657, 11, 366, 3041, 5372, 1298, 352, 11, 366, 27914, 1298, 362, 92, 198, 198, 22570, 20231, 796, 366, 15, 87, 25645, 25645, 8269, 1, 628, 198 ]
3.25
40
import os import sys import math import numpy as np from transformations import euler_matrix build_dir = os.path.dirname(os.path.abspath(__file__)) + '/../build' sys.path.append(build_dir) # should contain pylc_lib compiled .so file import pylc_lib def compute_camera_instrics_matrix(fov_deg, w, h): """ Arg...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 38226, 1330, 304, 18173, 62, 6759, 8609, 198, 198, 11249, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, ...
2.088685
1,308
# Copyright 2022 DeepMind Technologies Limited # # 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 agre...
[ 2, 15069, 33160, 10766, 28478, 21852, 15302, 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, ...
2.713351
764
# -*- coding: utf-8 -*- """ Created on Fri Apr 17 01:26:47 2020 @author: Kamaljeet """ import torch from torch.utils.data import Dataset import os import random import numpy as np from skimage import io from skimage.transform import resize from skimage.color import rgb2gray import cv2 from os.path import join as opj
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2758, 1596, 5534, 25, 2075, 25, 2857, 12131, 198, 198, 31, 9800, 25, 12670, 282, 18015, 316, 198, 37811, 198, 198, 11748, 28034, 198, 6738...
3.067308
104
from flask_restful import Resource
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 628 ]
4.5
8
from bflib.characters import abilityscores from bflib.characters.classes import Fighter from bflib.skills import listing from bflib.skills.base import Skill @listing.register @listing.register @listing.register
[ 6738, 275, 2704, 571, 13, 10641, 19858, 1330, 2694, 1416, 2850, 198, 6738, 275, 2704, 571, 13, 10641, 19858, 13, 37724, 1330, 15411, 198, 6738, 275, 2704, 571, 13, 8135, 2171, 1330, 13487, 198, 6738, 275, 2704, 571, 13, 8135, 2171, 13...
3.238806
67
import random from collections import defaultdict from typing import Dict from dominion_game_engine import cards import inspect from dominion_game_engine.cards import * card_attributes = [k for k, v in BaseCard.__dict__.items() if not k.startswith('__') and not callable(v) and k != 'Name'] def c...
[ 11748, 4738, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 43866, 62, 6057, 62, 18392, 1330, 4116, 198, 11748, 10104, 198, 6738, 43866, 62, 6057, 62, 18392, 13, 27761, 1330, 1635, 198, 198, 9517,...
2.849188
431
from support import ISolver, SqlDbDataStore, AzureStorageDataStore, DummySolver import sys import os attempts=1 found=False cur_path = os.getcwd() while not found: if os.path.exists(os.path.join(cur_path, 'src')): sys.path.append(os.path.join(cur_path, 'src')) found = True cur_path = os.path....
[ 6738, 1104, 1330, 3180, 14375, 11, 311, 13976, 43832, 6601, 22658, 11, 22134, 31425, 6601, 22658, 11, 360, 13513, 50, 14375, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 1078, 1791, 82, 28, 16, 198, 9275, 28, 25101, 198, 22019, ...
3.206266
383
from datetime import datetime from sqlalchemy import * from sqlalchemy.orm import relationship from db import db @db.event.listens_for(Release, 'before_insert') @db.event.listens_for(Release, 'before_update')
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 44161, 282, 26599, 1330, 1635, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 198, 6738, 20613, 1330, 20613, 628, 198, 198, 31, 9945, 13, 15596, 13, 4868, 641, 62, 1640, 7, ...
3.144928
69
# Copyright AlertAvert.com (c) 2013. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ 2, 15069, 23276, 32, 1851, 13, 785, 357, 66, 8, 2211, 13, 1439, 2489, 10395, 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, 2...
3.540541
222
from checkout_sdk.payments.responses import Payment
[ 6738, 28006, 62, 21282, 74, 13, 15577, 902, 13, 16733, 274, 1330, 28784, 628 ]
3.785714
14
""" Copyright 2020 Mohamed Amgd 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...
[ 37811, 198, 15269, 12131, 27469, 1703, 21287, 628, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1378...
3.13245
302
from models.flownet2 import FlowNetSD from models.flownet2.submodules import * 'Parameter count = 162,518,834'
[ 6738, 4981, 13, 2704, 593, 316, 17, 1330, 27782, 7934, 10305, 201, 198, 6738, 4981, 13, 2704, 593, 316, 17, 13, 7266, 18170, 1330, 1635, 201, 198, 201, 198, 6, 36301, 954, 796, 25090, 11, 44085, 11, 23, 2682, 6, 201, 198, 201, 198...
2.681818
44
import os import glob import tqdm import torch import argparse from scipy.io.wavfile import write import numpy as np from VocGAN.model.generator import ModifiedGenerator from VocGAN.utils.hparams import HParam, load_hparam_str from VocGAN.denoiser import Denoiser MAX_WAV_VALUE = 32768.0
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 256, 80, 36020, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 6738, 629, 541, 88, 13, 952, 13, 45137, 7753, 1330, 3551, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 47208, 45028, 13, 198...
3.11828
93
"""after delpoy Migration Revision ID: 89b3ccb3d387 Revises: 6ff26a14e4f2 Create Date: 2017-11-01 23:23:47.475243 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '89b3ccb3d387' down_revision = '6ff26a14e4f2' branch_labels = None depends_on = None
[ 37811, 8499, 1619, 79, 726, 36991, 198, 198, 18009, 1166, 4522, 25, 9919, 65, 18, 535, 65, 18, 67, 32220, 198, 18009, 2696, 25, 718, 487, 2075, 64, 1415, 68, 19, 69, 17, 198, 16447, 7536, 25, 2177, 12, 1157, 12, 486, 2242, 25, 1...
2.425197
127
# manage.py from flask_script import Manager from app import app, db manager = Manager(app) @manager.command if __name__ == "__main__": manager.run()
[ 2, 6687, 13, 9078, 198, 198, 6738, 42903, 62, 12048, 1330, 9142, 198, 198, 6738, 598, 1330, 598, 11, 20613, 198, 198, 37153, 796, 9142, 7, 1324, 8, 198, 198, 31, 37153, 13, 21812, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 1...
2.925926
54
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 8 14:59:03 2019 @author: cyril """ import random import numpy as np from Xlib import display, X from PIL import Image #PIL import pyautogui
[ 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, 19480, 1526, 220, 807, 1478, 25, 3270, 25, 3070, 13130, 198, 198, 31, 9800, 25, 269, 2417...
2.60241
83
import datetime from contextlib import closing from framework import Config from helpers.feedbacksender import FeedbackSender from helpers.invitesender import InviteSender from models.db.test import DbTest from models.db.testsession import DbTestSession from models.service.test import Test from models.service.testsessi...
[ 11748, 4818, 8079, 198, 6738, 4732, 8019, 1330, 9605, 198, 6738, 9355, 1330, 17056, 198, 6738, 49385, 13, 12363, 10146, 2194, 1330, 37774, 50, 2194, 198, 6738, 49385, 13, 16340, 2737, 2194, 1330, 10001, 578, 50, 2194, 198, 6738, 4981, 1...
4.182927
82
import json, sys from commands.base import * from commands.utils import prompt_for, valid_input_for, is_sudo, generate_random_key INITIAL_REQUIREMENTS = ["curl", "git"]
[ 11748, 33918, 11, 25064, 198, 6738, 9729, 13, 8692, 1330, 1635, 198, 6738, 9729, 13, 26791, 1330, 6152, 62, 1640, 11, 4938, 62, 15414, 62, 1640, 11, 318, 62, 24032, 11, 7716, 62, 25120, 62, 2539, 628, 198, 1268, 2043, 12576, 62, 220...
3.125
56
import numpy as np from PIL import Image import os import caffe import cv2 caffe.set_mode_gpu() # load net net = caffe.Net('deploy.prototxt', './snapshot/train_iter_25000.caffemodel', caffe.TEST) for line in open('../data/card/ImageSets/Segmentation/val.txt'): path = os.path.join('../data/card/JPEGImages/', line...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 198, 11748, 21121, 198, 198, 11748, 269, 85, 17, 198, 198, 66, 21223, 13, 2617, 62, 14171, 62, 46999, 3419, 198, 2, 3440, 2010, 198, 3262, 796, 21121,...
2.216502
1,418
# Author Lingge Li from XJTU(446049454@qq.com) # erf_net functions import tensorflow as tf import numpy as np import sys import math ######### Initializers ########### def msra_initializer(): """ [ref] K. He et.al 2015: arxiv:1502.01852 """ return _initializer def orthogonal_initializer(scale = 1.1)...
[ 2, 6434, 25116, 469, 7455, 422, 1395, 41, 51, 52, 7, 2598, 1899, 2920, 34229, 31, 38227, 13, 785, 8, 198, 2, 1931, 69, 62, 3262, 5499, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
3.092683
205
import DSGRN import numpy as np from ramp_systems.ramp_function import *
[ 11748, 17400, 10761, 45, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10454, 62, 10057, 82, 13, 81, 696, 62, 8818, 1330, 1635 ]
3.130435
23
class Formater: """ Flatten the chunked data. Usable for both training and test data, which is chunked. """ @staticmethod """ Flatten the data. Usable for both training and test data. """ @staticmethod
[ 198, 4871, 5178, 729, 25, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 1610, 41769, 262, 16058, 276, 1366, 13, 198, 220, 220, 220, 4021, 540, 329, 1111, 3047, 290, 1332, 1366, 11, 543, 318, 16058, 276, 13, 198, 220, 220, 220, 37...
2.703297
91
from python_sandbox.utils.say_hello import add import unittest
[ 6738, 21015, 62, 38142, 3524, 13, 26791, 13, 16706, 62, 31373, 1330, 751, 198, 11748, 555, 715, 395, 628 ]
3.368421
19
"""Qt5 demo GUI cobbled together from StackOverflow answers.""" import sys import cv2 from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot, Qt from PyQt5.QtWidgets import QMainWindow, QWidget, QApplication, QLabel from PyQt5.QtGui import QPixmap, QImage, QKeyEvent if __name__ == '__main__': app = QApplication(...
[ 37811, 48, 83, 20, 13605, 25757, 22843, 9342, 1978, 422, 23881, 5886, 11125, 7429, 526, 15931, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 16818, 11, 12972, 39568, 11712...
2.569444
144
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'process_dialog_view.ui', # licensing of 'process_dialog_view.ui' applies. # # Created: Sat Apr 13 16:23:30 2019 # by: pyside2-uic running on PySide2 5.12.1 # # WARNING! All changes made in this file will be lost! from PySide2 import Q...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 14681, 62, 38969, 519, 62, 1177, 13, 9019, 3256, 198, 2, 15665, 286, 705, 14681, 62, 38969, 519, 62, 1177, 1...
3
179
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 28 14:14:13 2019 @author: abauville """ import sys import os sys.path.insert(0, '../../src/UserInput') sys.path.insert(0, '../../PostProcessing/Paper_Decollement/CriticalTaper') import OutputDef as Output import matplotlib.pyplot as plt import nump...
[ 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, 26223, 1526, 2579, 1478, 25, 1415, 25, 1485, 13130, 198, 198, 31, 9800, 25, 450, 559, 424...
2.736842
133