content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import os import sys if sys.version_info[0] == 2: _ENCODE = sys.getfilesystemencoding() logfile_open = open else: path_join = os.path.join str_join = str.join
[ 11748, 28686, 198, 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 6624, 362, 25, 198, 220, 4808, 24181, 16820, 796, 25064, 13, 1136, 16624, 6781, 12685, 7656, 3419, 628, 220, 2604, 7753, 62, 9654, 796, 1280, 198,...
2.590909
66
#!/usr/bin/env python """ VAPI test """ import unittest import os import signal from framework import VppTestCase, running_extended_tests, \ VppTestRunner, Worker if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 569, 17614, 1332, 37227, 198, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 6737, 198, 6738, 9355, 1330, 569, 381, 14402, 20448, 11, 2491, 62, 2302, 1631, 62, 41989, ...
2.847059
85
import json import re import scrapy from locations.hourstudy import inputoutput DAYS = { 'mo': 'Mo', 'tu': 'Tu', 'we': 'We', 'fr': 'Fr', 'th': 'Th', 'sa': 'Sa', 'su': 'Su', }
[ 11748, 33918, 198, 11748, 302, 198, 11748, 15881, 88, 198, 6738, 7064, 13, 9769, 44517, 1330, 5128, 22915, 198, 26442, 50, 796, 1391, 198, 220, 220, 220, 705, 5908, 10354, 705, 16632, 3256, 198, 220, 220, 220, 705, 28047, 10354, 705, ...
2.112245
98
from importlib import import_module import re from copy import deepcopy from collections import OrderedDict from astropy.utils.data_info import MixinInfo from .column import Column from .table import Table, QTable, has_info_class from astropy.units.quantity import QuantityInfo __construct_mixin_classes = ('astropy.t...
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 302, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 6468, 28338, 13, 26791, 13, 7890, 62, 10951, 1330, 15561, 259, 12360, 198, 6738,...
2.541372
3,251
''' Created on Jun 18, 2013 @author: Yubin Bai All rights reserved. ''' import time from multiprocessing.pool import Pool parallelSolve = False infinity = 1 << 30 if __name__ == '__main__': solver = Solver() if parallelSolve: solver.parallel() else: solver.sequential()
[ 7061, 6, 198, 41972, 319, 7653, 1248, 11, 2211, 198, 198, 31, 9800, 25, 575, 549, 259, 40750, 198, 198, 3237, 2489, 10395, 13, 198, 7061, 6, 198, 198, 11748, 640, 198, 6738, 18540, 305, 919, 278, 13, 7742, 1330, 19850, 198, 1845, ...
2.491803
122
from typing import Dict, Optional, List, Any import torch import torch.nn.functional as F from allennlp.data import Vocabulary from allennlp.models.model import Model from allennlp.modules import FeedForward, TextFieldEmbedder, Seq2SeqEncoder from allennlp.nn import InitializerApplicator, RegularizerApplicator from al...
[ 6738, 19720, 1330, 360, 713, 11, 32233, 11, 7343, 11, 4377, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 477, 1697, 34431, 13, 7890, 1330, 47208, 22528, 198, 6738, 477, 1697, 34431, 13, 27530, ...
3.609756
123
# # -*- coding: utf-8 -*- """Development related tasks to be run with 'invoke'""" import os import pathlib import shutil import invoke TASK_ROOT = pathlib.Path(__file__).resolve().parent TASK_ROOT_STR = str(TASK_ROOT) # shared function def rmrf(items, verbose=True): """Silently remove a list of directories or ...
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 41206, 3519, 8861, 284, 307, 1057, 351, 705, 37669, 6, 37811, 198, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 198, 11748, 2634...
2.561798
801
import stl_path # dynamic load of python module def register(): return MyNDRPlugin()
[ 11748, 336, 75, 62, 6978, 628, 198, 2, 8925, 3440, 286, 21015, 8265, 198, 4299, 7881, 33529, 198, 220, 220, 220, 1441, 2011, 45, 7707, 37233, 3419 ]
3.333333
27
"""Support for Epson Workforce Printer.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_HOST, CONF_MONITORED_CONDITIONS from homeassistant.exceptions import PlatformNotReady import homeassistant....
[ 37811, 15514, 329, 412, 8430, 5521, 3174, 1736, 3849, 526, 15931, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 18931, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 82, 228...
2.598214
560
import asyncio import logging import random import typing as t from datetime import datetime, timezone from operator import attrgetter import discord import discord.abc from discord.ext import commands from bot import constants from bot.bot import Bot from bot.exts.help_channels import _caches, _channel, _cooldown, _...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 19720, 355, 256, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 198, 6738, 10088, 1330, 708, 81, 1136, 353, 198, 198, 11748, 36446, 198, 11748, 36446, 13, 393...
3.529412
170
import os import math import random import time from code.menu.menu import Menu from code.tools.eventqueue import EventQueue from code.tools.xml import XMLParser from code.utils.common import coalesce, intersect, offset_rect, log, log2, xml_encode, xml_decode, translate_rgb_to_string from code.constants.common i...
[ 11748, 28686, 198, 198, 11748, 10688, 198, 11748, 4738, 198, 198, 11748, 640, 198, 198, 6738, 2438, 13, 26272, 13, 26272, 1330, 21860, 198, 198, 6738, 2438, 13, 31391, 13, 15596, 36560, 1330, 8558, 34991, 198, 198, 6738, 2438, 13, 31391...
2.685259
251
# -*- coding: utf-8 ; test-case-name: bridgedb.test.test_runner -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2007-2015, The Tor Project, Inc. # (c) 200...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 2162, 1332, 12, 7442, 12, 3672, 25, 38265, 2004, 65, 13, 9288, 13, 9288, 62, 16737, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 10290, 11012, 11, 257, 4022, 7696, 6082, 108...
2.710799
1,352
#!/usr/bin/env python3 # # Create disk image # import re, sys, traceback from .tasks import task_fetch_partitions, task_refresh_partitions, task_mount, task_remove_persistent_rules, task_remove_logs, task_fsck, task_shrink_partition, task_expand_partition, task_unmount from .partclone_tasks import task_create_disk_im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 13610, 11898, 2939, 198, 2, 198, 198, 11748, 302, 11, 25064, 11, 12854, 1891, 198, 198, 6738, 764, 83, 6791, 1330, 4876, 62, 69, 7569, 62, 3911, 1756, 11, 4876, 62, ...
2.488839
896
import argparse import logging import apache_beam as beam from apache_beam.io import WriteToBigQuery from apache_beam.io import ReadFromText, WriteToText from apache_beam.options.pipeline_options import PipelineOptions def run(argv=None): """Main entry point. It defines and runs the pipeline.""" parser = ...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 6738, 2471, 4891, 62, 40045, 13, 952, 1330, 19430, 2514, 12804, 20746, 198, 6738, 2471, 4891, 62, 40045, 13, 952, 1330, 4149, 4863, 8206, 11...
2.318471
785
from flask import request from flask_jwt import jwt_required from flask_restful import Resource from main.server import app, cache, db from main.server.models import Message, MessageSchema messages_schema = MessageSchema(many=True) message_schema = MessageSchema()
[ 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 73, 46569, 1330, 474, 46569, 62, 35827, 198, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 198, 6738, 1388, 13, 15388, 1330, 598, 11, 12940, 11, 20613, 198, 6738, 1388, 13, 15388, 13...
3.5
78
#!/usr/bin/env python3 import rospy from wecook.msg import ActionMsg, TaskMsg, SceneMsg, ObjectMsg, ContainingMsg, AgentMsg if __name__ == '__main__': try: talker() except rospy.ROSInterruptException: pass
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 686, 2777, 88, 198, 6738, 356, 27916, 13, 19662, 1330, 7561, 50108, 11, 15941, 50108, 11, 28315, 50108, 11, 9515, 50108, 11, 2345, 1397, 50108, 11, 15906, 50108, 628, 1...
2.463158
95
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2017, Battelle Memorial Institute. # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 22935, 90, 198, 2, 43907, 25, 900, 277, 12685, 28, 40477, 12, 23, 10117, 28, 29412, 1509, 28, 19, 40379, 28, 19, 39747, 28, 19, 2123, 25, 198, 2, 198, 2, 15069, 2177, 1...
3.778626
655
"""Ni-Superalloy dataset. Scientific Machine Learning Benchmark A benchmark of regression models in chem- and materials informatics. 2019, Brendan Folie, Citrine Informatics. See class NiSuperalloyDataset for details. """ import os import json import zipfile from typing import List, Optional, Tuple, Union import nu...
[ 37811, 34153, 12, 12442, 439, 726, 27039, 13, 198, 198, 23010, 811, 10850, 18252, 25187, 4102, 198, 32, 18335, 286, 20683, 4981, 287, 4607, 12, 290, 5696, 4175, 23372, 13, 198, 23344, 11, 26134, 30938, 494, 11, 15792, 7640, 554, 18982, ...
2.45533
1,623
import metricbeat import os import pytest import sys import unittest
[ 11748, 18663, 12945, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 11748, 555, 715, 395, 628 ]
3.684211
19
# Copyright The PyTorch Lightning team. # # 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, 383, 9485, 15884, 354, 12469, 1074, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
3.75
216
from django.contrib import admin from books.models import Genre, Author, Book, TBR # Register your models here. admin.site.register(Genre) admin.site.register(Author) admin.site.register(Book) admin.site.register(TBR)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 3835, 13, 27530, 1330, 5215, 260, 11, 6434, 11, 4897, 11, 309, 11473, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 28482, 13, 15654, 13, 30238, 7, 13746, 260, 8, 198, ...
3.128571
70
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from packaging import version from datadog_checks.base.utils.common import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.dirname(os.path.dirname(HERE)) ...
[ 2, 357, 34, 8, 16092, 324, 519, 11, 3457, 13, 2864, 12, 25579, 198, 2, 1439, 2489, 10395, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 357, 3826, 38559, 24290, 8, 198, 198, 11748, 28686, 198, 198, 6738, 1684...
2.007732
1,164
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 15069, 12131, 383, 23881, 32173, 46665, 13, 198, 2, 15069, 13130, 18111, 27862, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
2.553767
2,920
# Look at the charactercreator_character table # GET_CHARACTERS = """ # SELECT * # FROM charactercreator_character; # """ # How many total Characters are there? (302) TOTAL_CHARACTERS = """ SELECT COUNT(*) as number_of_characters FROM charactercreator_character; """ # How many of each specific subclass? # TOTAL_SUBC...
[ 198, 2, 6803, 379, 262, 2095, 45382, 62, 22769, 3084, 198, 2, 17151, 62, 38019, 10659, 4877, 796, 37227, 198, 2, 33493, 1635, 198, 2, 16034, 2095, 45382, 62, 22769, 26, 198, 2, 37227, 198, 198, 2, 1374, 867, 2472, 26813, 389, 612, ...
3.104101
951
#! /usr/bin/env python # import warnings import numpy as np UNIT_SQUARE = np.asarray([[0,0],[0,1],[1,1],[1,0]])-0.5 from propobject import BaseObject from shapely import geometry import pandas import geopandas # ======================= # # # # Functions # # ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 198, 11748, 14601, 198, 11748, 299, 32152, 355, 45941, 198, 4944, 2043, 62, 50, 10917, 12203, 796, 45941, 13, 292, 18747, 26933, 58, 15, 11, 15, 38430, 15, 11, 16, 38430, ...
2.109514
4,593
""" Binary serialization NPY format ========== A simple format for saving numpy arrays to disk with the full information about them. The ``.npy`` format is the standard binary file format in NumPy for persisting a *single* arbitrary NumPy array on disk. The format stores all of the shape and dtype information necess...
[ 37811, 198, 33, 3219, 11389, 1634, 198, 198, 22182, 56, 5794, 198, 2559, 855, 198, 198, 32, 2829, 5794, 329, 8914, 299, 32152, 26515, 284, 11898, 351, 262, 1336, 198, 17018, 546, 606, 13, 198, 198, 464, 7559, 13, 77, 9078, 15506, 57...
2.654268
11,668
""" Enumerator Test """ from typing import Any
[ 37811, 198, 4834, 6975, 1352, 6208, 198, 37811, 198, 6738, 19720, 1330, 4377 ]
3.538462
13
#!/usr/bin/env python from zoneinfo import ZoneInfo import flask from dateutil.parser import parse from flask_assets import Bundle, Environment from logzero import logger, setup_logger from webassets.filter import get_filter from config import cfg from apis import calendar as gcal setup_logger(name=__name__) app =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 6516, 10951, 1330, 13035, 12360, 198, 198, 11748, 42903, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 42903, 62, 19668, 1330, 25282, 11, 9344, 198, 6738, 2604, 22570, ...
2.42069
580
#!/usr/bin/env python import astropy.io.fits as fits import numpy as np import os import matplotlib.pyplot as plt import argparse if __name__ == "__main__": descr = 'GFA focus sequence plots/analysis' parser = argparse.ArgumentParser(description=descr) parser.add_argument('first_expid', type=int, nargs=1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 6468, 28338, 13, 952, 13, 21013, 355, 11414, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, ...
2.429735
491
from typing import List from ddq.taxonomy.reference import Reference from ddq.topics.topic import Topic
[ 6738, 19720, 1330, 7343, 198, 6738, 49427, 80, 13, 19290, 30565, 13, 35790, 1330, 20984, 198, 6738, 49427, 80, 13, 4852, 873, 13, 26652, 1330, 47373, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.228571
35
# Copyright (c) Facebook, Inc. and its affiliates. import base64 import logging import os import sys from tensorboardX import SummaryWriter from pythia.utils.distributed_utils import is_main_process from pythia.utils.general import (ckpt_name_from_core_args, foldername_from_config_ov...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 11748, 2779, 2414, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 198, 198, 6738, 279, 5272, 544, ...
2.731343
134
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.228358
1,340
import sys import os import sphinx_rtd_theme source_path = os.path.normpath( os.path.join( os.path.abspath( os.path.split(__file__)[0]))) try: from conf_base import * except ImportError: sys.path.append(source_path) from conf_base import * html_theme = 'sphinx_rtd_theme' html_the...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 599, 20079, 87, 62, 81, 8671, 62, 43810, 628, 198, 10459, 62, 6978, 796, 28686, 13, 6978, 13, 27237, 6978, 7, 198, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, ...
2.335689
283
""" This module contains routines for reading and working with adv data. It contains: +-----------------------------------+-----------------------------------------+ | Name | Description | +===================================+====================================...
[ 37811, 198, 1212, 8265, 4909, 31878, 329, 3555, 290, 1762, 351, 1354, 198, 7890, 13, 632, 4909, 25, 198, 198, 10, 3880, 6329, 10, 3880, 982, 19529, 198, 91, 6530, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.439739
921
# Generated by Django 3.1.2 on 2020-10-11 10:53 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1157, 838, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# # 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"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
4.174242
264
__author__ = "Dave Wapstra <dwapstra@cisco.com>" from unicon.plugins.confd import ConfdServiceList, ConfdConnection, ConfdConnectionProvider from .statemachine import CspStateMachine from .settings import CspSettings from . import service_implementation as csp_svc
[ 834, 9800, 834, 796, 366, 27984, 370, 499, 12044, 1279, 67, 86, 499, 12044, 31, 66, 4861, 13, 785, 24618, 628, 198, 6738, 555, 4749, 13, 37390, 13, 10414, 67, 1330, 7326, 67, 16177, 8053, 11, 7326, 67, 32048, 11, 7326, 67, 32048, ...
3.405063
79
# -*- coding: utf-8 -*- from setuptools import setup import search_google as package setup( name=package.__name__, version=package.__version__, description=package.__description__, long_description=readme(), author=package.__author__, author_email=package.__email__, license=package.__license__, url...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 11748, 2989, 62, 13297, 355, 5301, 198, 220, 220, 198, 40406, 7, 198, 220, 1438, 28, 26495, 13, 834, 3672, 834, 11,...
2.969231
195
import setuptools import os try: import pypandoc description = pypandoc.convert('README.md', 'rst') if os.path.exists('README.md') else '' except ImportError: description = '' setuptools.setup( name = 'macpack', packages = setuptools.find_packages(), version = '1.0.3', description = 'Makes a macOS binar...
[ 11748, 900, 37623, 10141, 198, 11748, 28686, 198, 198, 28311, 25, 198, 220, 1330, 279, 4464, 392, 420, 198, 220, 6764, 796, 279, 4464, 392, 420, 13, 1102, 1851, 10786, 15675, 11682, 13, 9132, 3256, 705, 81, 301, 11537, 611, 28686, 13,...
2.884746
295
import vtk # Read the file (to test that it was written correctly) reader = vtk.vtkXMLImageDataReader() reader.SetFileName("../data/wind_image.vti") reader.Update() print(reader.GetOutput()) # Convert the image to a polydata imageDataGeometryFilter = vtk.vtkImageDataGeometryFilter() imageDataGeometryFilter.SetInputCon...
[ 11748, 410, 30488, 198, 198, 2, 4149, 262, 2393, 357, 1462, 1332, 326, 340, 373, 3194, 9380, 8, 198, 46862, 796, 410, 30488, 13, 85, 30488, 55, 5805, 5159, 6601, 33634, 3419, 198, 46862, 13, 7248, 8979, 5376, 7203, 40720, 7890, 14, ...
3.046667
450
""" # ----------------------------------------------------------------------------- # @brief: # Tingwu: reset the reward function so that it's more similar to the one # defined in GYM # ----------------------------------------------------------------------------- """ import numpy as np from mbbl.config i...
[ 37811, 198, 2, 16529, 32501, 198, 2, 220, 220, 2488, 65, 3796, 25, 198, 2, 220, 220, 220, 220, 220, 220, 309, 278, 43812, 25, 13259, 262, 6721, 2163, 523, 326, 340, 338, 517, 2092, 284, 262, 530, 198, 2, 220, 220, 220, 220, 220,...
2.325116
649
from .bar import * from .create_session import * from .image import * from .line import * from .mesh import * from .pie import * from .text import * from .VisdomFigure import * from .VisdomScene import *
[ 6738, 764, 5657, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 6738, 764, 17953, 62, 29891, 1330, 1635, 198, 6738, 764, 9060, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 6738, 764, 1370, ...
2.125984
127
# Ping Pong Pi web UI running on flask. # Uses zmq to speak to daemon controlling screen. from flask import Flask, render_template, appcontext_tearing_down, request from multiprocessing import Process, Queue from multiprocessing.connection import Client import atexit import time import zmq app = Flask(__name__) MOD...
[ 2, 34263, 350, 506, 13993, 3992, 12454, 2491, 319, 42903, 13, 198, 2, 36965, 1976, 76, 80, 284, 2740, 284, 33386, 12755, 3159, 13, 198, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 598, 22866, 62, 83, 6648, 62, 2902, 11, ...
3.123377
154
# -*- encoding: utf-8 -*- # Copyright (c) 2019 European Organization for Nuclear Research (CERN) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 13130, 3427, 12275, 329, 19229, 4992, 357, 34, 28778, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366,...
3.727969
261
from sudoku import Sudoku if __name__ == '__main__': main()
[ 6738, 424, 67, 11601, 1330, 14818, 11601, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 12417, 3419, 198 ]
2.583333
24
import numpy as np import pandas as pd from autogbt.sampler import MajorityUnderSampler
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1960, 519, 18347, 13, 37687, 20053, 1330, 22171, 9203, 16305, 20053, 628, 628, 198 ]
3.285714
28
import numpy as np import sys from timeit import default_timer as timer sys.path.append("../../") from core import wnn from encoding import thermometer from encoding import util #Load Diabetes data base_path = "../../dataset/diabetes/" #2/3 Test bits_encoding = 20 train_data, train_label, test_data, test_label, data...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 40720, 4943, 220, 198, 6738, 4755, 1330, 266, 20471, 198, 6738, 21004, 1330, 21969, ...
2.242204
962
from pygamehelper import * from pygame import * from pygame.locals import * from vec2d import * from random import uniform import numpy as np s = Starter() s.mainLoop(40)
[ 6738, 12972, 6057, 2978, 525, 1330, 1635, 198, 6738, 12972, 6057, 1330, 1635, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 6738, 43030, 17, 67, 1330, 1635, 198, 6738, 4738, 1330, 8187, 198, 198, 11748, 299, 32152, 355, 45941...
2.828125
64
import glob import os import sys import utils from recorder import StreamRec OUTDIR = "" if __name__ == '__main__': main()
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 3384, 4487, 198, 6738, 38156, 1330, 13860, 6690, 198, 198, 12425, 34720, 796, 13538, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, ...
2.934783
46
# Copyright (c) 2017 Huawei Technologies Co., Ltd. # 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 # # ...
[ 2, 15069, 357, 66, 8, 2177, 43208, 21852, 1766, 1539, 12052, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, ...
2.207171
1,004
#!/usr/bin/python # -*- coding: utf-8 -*- # routers are dictionaries of URL routing parameters. # # For each request, the effective router is: # the built-in default base router (shown below), # updated by the BASE router in routes.py routers, # updated by the app-specific router in routes.py routers (if an...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 41144, 389, 48589, 3166, 286, 10289, 28166, 10007, 13, 198, 2, 198, 2, 220, 1114, 1123, 2581, 11, 262, 4050, ...
2.860969
3,323
#%% from uarray.core import * #%% s = Scalar(Int(10)) #%% #%% register(Call(Always(w("a")), w("idx")), lambda a, idx: a) #%% a_ten = Always(s) #%% s = Sequence(Int(10), a_ten)
[ 2, 16626, 198, 6738, 334, 18747, 13, 7295, 1330, 1635, 198, 198, 2, 16626, 198, 82, 796, 34529, 283, 7, 5317, 7, 940, 4008, 198, 198, 2, 16626, 628, 198, 2, 16626, 198, 30238, 7, 14134, 7, 30374, 7, 86, 7203, 64, 4943, 828, 266,...
2.067416
89
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
3.47619
63
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 27-Aug-2017 # @Email: valle.mrv@gmail.com # @Filename: admin_extras.py # @Last modified by: valle # @Last modified time: 02-Feb-2018 # @License: Apache license vesion 2.0 from django import template from django.db.models import Q try: from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 13838, 25, 25995, 19391, 1279, 2100, 293, 29, 198, 2, 2488, 10430, 25, 220, 220, 2681, 12, 12512, 12, 5539, 198, 2, 2488, 15333, 25, 220, 1188, 293, 13...
2.810526
190
#!/usr/bin/env python # Aesara tutorial # Solution to Exercise in section 'Using the GPU' # 1. Raw results import numpy as np import aesara import aesara.tensor as tt aesara.config.floatX = "float32" rng = np.random N = 400 feats = 784 D = ( rng.randn(N, feats).astype(aesara.config.floatX), rng.randint...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 317, 274, 3301, 11808, 198, 2, 28186, 284, 32900, 287, 2665, 705, 12814, 262, 11362, 6, 628, 198, 2, 352, 13, 16089, 2482, 628, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748...
1.812566
9,470
def translate_bbox(bbox, y_offset=0, x_offset=0): """Translate bounding boxes. This method is mainly used together with image transforms, such as padding and cropping, which translates the left top point of the image from coordinate :math:`(0, 0)` to coordinate :math:`(y, x) = (y_{offset}, x_{offse...
[ 4299, 15772, 62, 65, 3524, 7, 65, 3524, 11, 331, 62, 28968, 28, 15, 11, 2124, 62, 28968, 28, 15, 2599, 198, 220, 220, 220, 37227, 8291, 17660, 5421, 278, 10559, 13, 628, 220, 220, 220, 770, 2446, 318, 8384, 973, 1978, 351, 2939, ...
2.723684
456
import os from configparser import ConfigParser from helper.helper_web import get_browser
[ 11748, 28686, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 31904, 13, 2978, 525, 62, 12384, 1330, 651, 62, 40259, 628, 220, 220, 220, 220 ]
3.653846
26
from pathlib import Path from tkinter import Frame, Label from recipe_organizer.events.event import Event, EventType from recipe_organizer.events.event_observer import EventObserver from recipe_organizer.events.event_publisher import EventPublisher from recipe_organizer.gui.interfaces.widget_container import WidgetCon...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 74, 3849, 1330, 25184, 11, 36052, 198, 198, 6738, 8364, 62, 9971, 7509, 13, 31534, 13, 15596, 1330, 8558, 11, 8558, 6030, 198, 6738, 8364, 62, 9971, 7509, 13, 31534, 13, 15596, 62, 672, ...
3.855932
118
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
3.47619
63
k=0 while k!=1: print(k) k+=1
[ 74, 28, 15, 201, 198, 4514, 479, 0, 28, 16, 25, 201, 198, 220, 220, 220, 3601, 7, 74, 8, 201, 198, 220, 220, 220, 479, 47932, 16, 201, 198 ]
1.4
30
# ________ # / # \ / # \ / # \/ import random import textwrap import emd_mean import AdvEMDpy import emd_basis import emd_utils import numpy as np import pandas as pd import cvxpy as cvx import seaborn as sns import matplotlib.pyplot as plt from scipy.integrate import odeint from ...
[ 198, 2, 220, 220, 220, 220, 220, 2602, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 198, 2, 220, 220, 220, 220, 220, 3467, 220, 220, 220, 1220, 198, 2, 220, 220, 220, 220, 220, 220, 3467, 220, 1220, 198...
2.036219
36,335
import argparse import logging import torch import torch.nn.functional as F import numpy as np from torch import nn from torch.autograd import Variable from transformers import GPT2Config from transformers import GPT2LMHeadModel, GPT2Tokenizer, BertTokenizer from DataLoader import * from Model import BERTGen from utils...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6...
2.368312
3,383
# Copyright 2019 Atalaya Tech, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 1629, 282, 11729, 9634, 11, 3457, 13, 198, 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, ...
3.391414
396
""" Revision ID: 0158_remove_rate_limit_default Revises: 0157_add_rate_limit_to_service Create Date: 2018-01-09 14:33:08.313893 """ import sqlalchemy as sa from alembic import op revision = "0158_remove_rate_limit_default" down_revision = "0157_add_rate_limit_to_service"
[ 37811, 198, 198, 18009, 1166, 4522, 25, 5534, 3365, 62, 28956, 62, 4873, 62, 32374, 62, 12286, 198, 18009, 2696, 25, 5534, 3553, 62, 2860, 62, 4873, 62, 32374, 62, 1462, 62, 15271, 198, 16447, 7536, 25, 2864, 12, 486, 12, 2931, 1478...
2.613208
106
import os import errno from datetime import datetime print("Generating A New Post\n") post_name = input('Input Post Name: ') date_time = datetime.now() date_time_dir = date_time.strftime("%Y-%m-%d") date_time_post = date_time.strftime("%Y-%m-%d %H:%M:%S") p_name = post_name.replace(" ","-") p_name = p_name.replace(...
[ 11748, 28686, 198, 11748, 11454, 3919, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 4798, 7203, 8645, 803, 317, 968, 2947, 59, 77, 4943, 198, 198, 7353, 62, 3672, 796, 5128, 10786, 20560, 2947, 6530, 25, 705, 8, 198, 198, 4475, ...
2.04685
619
#!/usr/bin/env python # encoding: utf-8 -*- """ This module contains unit tests of the rmgpy.reaction module. """ import numpy import unittest from external.wip import work_in_progress from rmgpy.species import Species, TransitionState from rmgpy.reaction import Reaction from rmgpy.statmech.translation import Transl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 8265, 4909, 4326, 5254, 286, 262, 374, 11296, 9078, 13, 260, 2673, 8265, 13, 198, 37811, 198, 198, 11748, 29...
3.53405
279
from django.conf.urls import url, include from core.routers import OptionalTrailingSlashRouter from blog import views as blogViews from snippets import views as snippetsViews from projects import views as projectsViews from tags import views as tagsViews from contents import views as contentsViews from contact import ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 4755, 13, 472, 1010, 1330, 32233, 15721, 4386, 11122, 1077, 49, 39605, 198, 198, 6738, 4130, 1330, 5009, 355, 4130, 7680, 82, 198, 6738, 45114, 1330, 5009, ...
3.288889
270
""" closed-loop MILP solved to determine optimal ordering defined by ADG """ import sys import yaml import time import matplotlib.colors as mcolors import matplotlib import matplotlib.pyplot as plt import random import logging import time import networkx as nx import csv import statistics as stat import os import ...
[ 37811, 198, 220, 220, 220, 4838, 12, 26268, 31515, 47, 16019, 284, 5004, 16586, 16216, 5447, 416, 5984, 38, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 11748, 640, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, ...
2.332424
4,031
import pytest from unittest.mock import patch import rfidsecuritysvc.model.guest as model from rfidsecuritysvc.model.color import Color from rfidsecuritysvc.model.guest import Guest from rfidsecuritysvc.model.sound import Sound from rfidsecuritysvc.exception import SoundNotFoundError def test__model_no_c...
[ 11748, 12972, 9288, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 374, 69, 312, 12961, 21370, 66, 13, 19849, 13, 5162, 395, 355, 2746, 198, 6738, 374, 69, 312, 12961, 21370, 66, 13, 19849, 13, 8043, 1330, 5315,...
2.651917
339
# encoding: utf-8 import os import roms def console_roms_directory(configuration, console): """ If the user has specified a custom ROMs directory in consoles.txt then return that. Otherwise, append the shortname of the console to the default ROMs directory given by config.txt. """ if console.custom_ro...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 198, 11748, 374, 3150, 198, 198, 4299, 8624, 62, 398, 82, 62, 34945, 7, 11250, 3924, 11, 8624, 2599, 198, 220, 37227, 198, 220, 1002, 262, 2836, 468, 7368, 257, 2183, 21...
3.432515
326
#! -*- coding:utf-8 -*- # CLUE # c3 # import json import numpy as np from snippets import * from bert4keras.backend import keras from bert4keras.snippets import sequence_padding, DataGenerator from bert4keras.snippets import open from bert4keras.snippets import truncate_sequences from tqdm import tqdm # num_classes...
[ 2, 0, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 7852, 8924, 198, 2, 269, 18, 198, 2, 220, 198, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 45114, 1330, 1635, 198, 6738, 275, 861, 19, 6122, ...
2.020337
1,721
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from benchmarks import smoothness,thread_times import page_sets from telemetry import benchmark # pylint: disable=protected-access def CustomizeBrowserOptio...
[ 2, 15069, 2864, 383, 18255, 1505, 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, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 6738, 3174...
3.737931
145
import itertools as it from toolz.compatibility import range, map, iteritems def transitive_get(key, d): """ Transitive dict.get >>> from logpy.util import transitive_get >>> d = {1: 2, 2: 3, 3: 4} >>> d.get(1) 2 >>> transitive_get(1, d) 4 """ while hashable(key) and key in d: ...
[ 11748, 340, 861, 10141, 355, 340, 198, 6738, 2891, 89, 13, 5589, 25901, 1330, 2837, 11, 3975, 11, 11629, 23814, 198, 198, 4299, 1007, 1800, 62, 1136, 7, 2539, 11, 288, 2599, 198, 220, 220, 220, 37227, 3602, 1800, 8633, 13, 1136, 628...
2.209799
796
import rinobot_plugin as bot import numpy as np if __name__ == "__main__": main()
[ 11748, 374, 259, 672, 313, 62, 33803, 355, 10214, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.558824
34
from gluon.contrib.memcache.memcache import Client import time """ examle of usage: cache.memcache=MemcacheClient(request,[127.0.0.1:11211],debug=true) """ import cPickle as pickle import thread locker = thread.allocate_lock()
[ 6738, 1278, 84, 261, 13, 3642, 822, 13, 11883, 23870, 13, 11883, 23870, 1330, 20985, 198, 11748, 640, 198, 198, 37811, 198, 1069, 321, 293, 286, 8748, 25, 198, 198, 23870, 13, 11883, 23870, 28, 13579, 23870, 11792, 7, 25927, 17414, 16...
2.608696
92
__book_url__ = "dummy" __book_version__ = "dummy" associate_ref_with(Reference)
[ 628, 198, 198, 834, 2070, 62, 6371, 834, 796, 366, 67, 13513, 1, 198, 834, 2070, 62, 9641, 834, 796, 366, 67, 13513, 1, 198, 562, 47615, 62, 5420, 62, 4480, 7, 26687, 8, 198 ]
2.4
35
#!/usr/bin/env python # encoding: utf-8 import numbers import os import re import sys from itertools import chain import numpy as np import scipy.sparse as sp import six import pickle from .model import get_convo_nn2 from .stop_words import THAI_STOP_WORDS from .utils import CHAR_TYPES_MAP, CHARS_MAP, create_feature_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 3146, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 11748, 299, 32152, 355, 45941...
2.609756
861
# Copyright 2021 Yan Yan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
[ 2, 15069, 33448, 10642, 10642, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 73...
2.827652
528
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs Android's lint tool.""" import optparse import os import sys from xml.dom import minidom from util import build_utils ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 4...
2.487562
201
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.384127
315
from torch import nn # def get_fe_discriminator(num_classes, ndf=64): # 256-128-64-32-16 # return nn.Sequential( # nn.Conv2d(num_classes, ndf * 4, kernel_size=4, stride=2, padding=1), # nn.LeakyReLU(negative_slope=0.2, inplace=True), # nn.Conv2d(ndf * 4, ndf * 2, kernel_size=4, stride=2, ...
[ 6738, 28034, 1330, 299, 77, 628, 198, 198, 2, 825, 651, 62, 5036, 62, 15410, 3036, 20900, 7, 22510, 62, 37724, 11, 299, 7568, 28, 2414, 2599, 1303, 17759, 12, 12762, 12, 2414, 12, 2624, 12, 1433, 198, 2, 220, 220, 220, 220, 1441, ...
1.856955
762
# -*- coding: utf-8 -*- # # Copyright Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """Module checking Spyder runtime dependencies""" import os # Local imports from spyder.utils import programs DEPENDENCIES = [] def add(modn...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 220, 23688, 1082, 4935, 25767, 669, 201, 198, 2, 49962, 739, 262, 2846, 286, 262, 17168, 13789, 201, 198, 2, 357, 3826, 13997, 1082, 14, ...
2.400966
828
import os from setuptools import find_packages, setup # Load version number __version__ = None src_dir = os.path.abspath(os.path.dirname(__file__)) version_file = os.path.join(src_dir, 'chemprop', '_version.py') with open(version_file, encoding='utf-8') as fd: exec(fd.read()) # Load README with ope...
[ 11748, 28686, 201, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 201, 198, 201, 198, 2, 8778, 2196, 1271, 201, 198, 834, 9641, 834, 796, 6045, 201, 198, 201, 198, 10677, 62, 15908, 796, 28686, 13, 6978, 13, 397, 277...
2.106505
1,399
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
[ 2, 15069, 7358, 12, 42334, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.821596
213
""" Main module. Implement the central Checker class. Also, it models the Bindings and Scopes. """ import __future__ import doctest import os import sys PY2 = sys.version_info < (3, 0) PY32 = sys.version_info < (3, 3) # Python 2.5 to 3.2 PY33 = sys.version_info < (3, 4) # Python 2.5 to 3.3 PY34 = ...
[ 37811, 201, 198, 13383, 8265, 13, 201, 198, 201, 198, 3546, 26908, 262, 4318, 6822, 263, 1398, 13, 201, 198, 7583, 11, 340, 4981, 262, 41211, 654, 290, 1446, 13920, 13, 201, 198, 37811, 201, 198, 11748, 11593, 37443, 834, 201, 198, ...
2.090156
5,435
# Project Name: Auto Screenshot # Description: Take screenshot of screen when any change take place. # Author: Mani (Infinyte7) # Date: 26-10-2020 # License: MIT from pyscreenshot import grab from PIL import ImageChops import os import time import subprocess, sys from datetime import datetime import tkinter as tk fr...
[ 2, 4935, 6530, 25, 11160, 1446, 26892, 198, 2, 12489, 25, 7214, 22032, 286, 3159, 618, 597, 1487, 1011, 1295, 13, 198, 2, 6434, 25, 1869, 72, 357, 18943, 3541, 660, 22, 8, 198, 2, 7536, 25, 2608, 12, 940, 12, 42334, 198, 2, 1378...
3.086667
150
# -*- coding: utf-8 -*- # 2019 # # # # * # Apache License 2.0Apache 2.0 Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0 # # # * # # Apache 2.0 Apache 2.0 # public@ricequant.com from datetime import datetime import logbook from logbook import Logger, St...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 13130, 220, 198, 2, 198, 2, 220, 198, 2, 198, 2, 220, 220, 220, 220, 1635, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24843, 13789, 362, 1...
2.21308
474
# -*- coding: utf-8 -*- ''' Oracle DataBase connection module :mainteiner: Vladimir Bormotov <bormotov@gmail.com> :maturity: new :depends: cx_Oracle :platform: all :configuration: module provide connections for multiple Oracle DB instances. **OS Environment** .. code-block:: text ORACLE_HOME: pa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 48625, 6060, 14881, 4637, 8265, 198, 198, 25, 12417, 660, 7274, 25, 14840, 347, 579, 313, 709, 1279, 65, 579, 313, 709, 31, 14816, 13, 785, 29, 198, 19...
2.269231
1,794
import base64 import operator import struct import time import pytest import six import consul import consul.std Check = consul.Check
[ 11748, 2779, 2414, 198, 11748, 10088, 198, 11748, 2878, 198, 11748, 640, 198, 198, 11748, 12972, 9288, 198, 11748, 2237, 198, 198, 11748, 762, 377, 198, 11748, 762, 377, 13, 19282, 628, 198, 9787, 796, 762, 377, 13, 9787, 628, 198 ]
3.414634
41
import math tot = 1 dia = 0 for side_length in range(3,100001,2): hi = side_length**2 for i in range(4): if is_prime(hi-i*side_length+i): dia = dia+1 tot = tot+4 if dia/tot < 0.1: print(side_length) break
[ 11748, 10688, 201, 198, 201, 198, 83, 313, 796, 352, 201, 198, 67, 544, 796, 657, 201, 198, 1640, 1735, 62, 13664, 287, 2837, 7, 18, 11, 49388, 16, 11, 17, 2599, 201, 198, 197, 5303, 796, 1735, 62, 13664, 1174, 17, 201, 198, 197...
1.886179
123
task = ''' . () , . . : ( ) ( ). : V H, . : (V/6.5 + 0.5), (2 * H + 0.3). . . : , @property. ''' if __name__ == '__main__': print(task) objects = [ 231, 22, Coat(32), 'test', True, ...
[ 35943, 796, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 764, 198, 220, 7499, 220, 220, 220, 837, 220, 220, 220, 198, 764, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 628, 220, 220, 220, 220, 1058, 220, 357, 1267, 22...
1.681818
308
import urllib2 import json import time from core.helpers.decorator import Cached from core.helpers.config import config from core.helpers.logger import log, LogLevel
[ 11748, 2956, 297, 571, 17, 198, 11748, 33918, 198, 11748, 640, 198, 198, 6738, 4755, 13, 16794, 364, 13, 12501, 273, 1352, 1330, 327, 2317, 198, 6738, 4755, 13, 16794, 364, 13, 11250, 1330, 4566, 198, 6738, 4755, 13, 16794, 364, 13, ...
3.333333
51
from math import log10, sqrt import cv2 import numpy as np def PSNR(original, compressed): ''' Calculates the Peak signal to noise ratio between a ground truth image and predicted image. see https://www.geeksforgeeks.org/python-peak-signal-to-noise-ratio-psnr/ for reference Parameters --...
[ 6738, 10688, 1330, 2604, 940, 11, 19862, 17034, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 6599, 24723, 7, 14986, 11, 25388, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 27131, 689, 262, ...
2.285319
722
"""Test insight model is working the way it should.""" import pytest from django.core.exceptions import ValidationError from django.db import DataError from .factories import InsightFactory pytestmark = pytest.mark.django_db
[ 37811, 14402, 11281, 2746, 318, 1762, 262, 835, 340, 815, 526, 15931, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 6060, 12331, 198, 198, ...
3.530303
66
import os import subprocess test_suites_that_cant_run_in_parallel = [ "test-apis-dbgapTest", # not thread-safe "test-google-googleDataAccessTest", # not thread-safe "test-google-googleServiceAccountRemovalTest", # not thread-safe "test-guppy-guppyTest", ...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 198, 9288, 62, 2385, 2737, 62, 5562, 62, 66, 415, 62, 5143, 62, 259, 62, 1845, 29363, 796, 685, 198, 220, 220, 220, 366, 9288, 12, 499, 271, 12, 9945, 43554, 14402, 1600, 220, 220, 220, 2...
2.110092
1,526
from lib.utils.plugin import import_plugin from .base_executor import parse_exception from .executors.hive import HiveQueryExecutor from .executors.presto import PrestoQueryExecutor from .executors.sqlalchemy import ( MysqlQueryExecutor, DruidQueryExecutor, SqliteQueryExecutor, SnowflakeQueryExecutor, ...
[ 6738, 9195, 13, 26791, 13, 33803, 1330, 1330, 62, 33803, 198, 6738, 764, 8692, 62, 18558, 38409, 1330, 21136, 62, 1069, 4516, 198, 198, 6738, 764, 18558, 315, 669, 13, 71, 425, 1330, 33235, 20746, 23002, 38409, 198, 6738, 764, 18558, ...
2.713755
269
import itertools import random import re from contextlib import suppress from disnake import Embed, NotFound from disnake.ext.commands import Cog, Context, command from disnake.utils import escape_markdown from bot.bot import Bot from bot.constants import Colours, NEGATIVE_REPLIES, RedirectOutput from bot.log import ...
[ 11748, 340, 861, 10141, 198, 11748, 4738, 198, 11748, 302, 198, 6738, 4732, 8019, 1330, 18175, 198, 198, 6738, 595, 77, 539, 1330, 13302, 276, 11, 1892, 21077, 198, 6738, 595, 77, 539, 13, 2302, 13, 9503, 1746, 1330, 327, 519, 11, 3...
2.598706
309
from functools import wraps from flask import abort from flask_login import current_user from .models import Permission <<<<<<< HEAD ======= >>>>>>> 17-app-1
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 42903, 1330, 15614, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 764, 27530, 1330, 2448, 3411, 198, 198, 16791, 16791, 16791, 27, 39837, 198, 198, 1421, 18604, 198, 16471, ...
3.404255
47
# !/usr/bin/env python3 # -*- coding:utf-8 -*- # @Datetime : 2019/11/14 2:26 # @Author : Fangyang # @Software : PyCharm import sys from PyQt5.QtWidgets import QApplication import pyqtgraph as pg import numpy as np app = QApplication(sys.argv) x = np.arange(1000) y = np.random.normal(size=(3, 1000)) plotWidget = pg...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 27354, 8079, 1058, 13130, 14, 1157, 14, 1415, 362, 25, 2075, 198, 2, 2488, 13838, 220, 220, 1058, ...
2.420792
202
from .array import Array, wrap from .ast_utils import (get_symbols, get_assigned, get_unknown_names_and_calls, has_return, has_node) from .config import get_config, set_config, use_config, Config from .cython_generator import ( CythonGenerator, get_func_definition ) from .ext_module import E...
[ 6738, 764, 18747, 1330, 15690, 11, 14441, 198, 6738, 764, 459, 62, 26791, 1330, 357, 1136, 62, 1837, 2022, 10220, 11, 651, 62, 562, 3916, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.929078
282