content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from core.datatype import Datatype
[ 6738, 4755, 13, 19608, 265, 2981, 1330, 16092, 265, 2981, 628, 628 ]
3.166667
12
import spacy import pytest INIT_LOOKUPS_CONFIG = { "@misc": "spacy.LookupsDataLoader.v1", "lang": "${nlp.lang}", "tables": ["lexeme_norm"], } @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope=...
[ 11748, 599, 1590, 198, 11748, 12972, 9288, 628, 198, 1268, 2043, 62, 43, 15308, 52, 3705, 62, 10943, 16254, 796, 1391, 198, 220, 220, 220, 44212, 44374, 1298, 366, 2777, 1590, 13, 8567, 4739, 6601, 17401, 13, 85, 16, 1600, 198, 220, ...
2.586592
358
#coding:utf8 from django.db import models from django.contrib.auth.models import User from pytz import timezone from django.conf import settings TIME_ZONE = settings.TIME_ZONE if settings.TIME_ZONE else 'Asia/Shanghai' # Create your models here.
[ 2, 66, 7656, 25, 40477, 23, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 12972, 22877, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 10414, 1330, ...
3.179487
78
# -*- coding: utf-8 -*- """Prepare tests files.""" # pylint: disable=no-member import mdtraj import simtk.openmm as mm from openmmtools import mcmc, states, testsystems from openmmtools.multistate import MultiStateReporter, ParallelTemperingSampler from simtk import unit def energy_function(test, topology=None, syste...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 37534, 533, 5254, 3696, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 19522, 198, 11748, 45243, 9535, 73, 198, 11748, 985, 30488, 13, 9654, 3020, ...
2.446852
969
if __name__ == "__main__": from pathlib import Path from drivebuildclient.AIExchangeService import AIExchangeService from drivebuildclient.aiExchangeMessages_pb2 import VehicleID service = AIExchangeService("localhost", 8383) # Send tests submission_result = service.run_tests("test", "test", Pa...
[ 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 422, 3108, 8019, 1330, 10644, 198, 220, 220, 220, 422, 3708, 11249, 16366, 13, 20185, 3109, 3803, 16177, 1330, 9552, 3109, 3803, 16177, 198, 220, 220, 220, 4...
2.751055
237
__all__ = [ 'Boolean', 'List', 'Or', ]
[ 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 46120, 13087, 3256, 198, 220, 220, 220, 705, 8053, 3256, 198, 220, 220, 220, 705, 5574, 3256, 198, 60, 628, 628 ]
1.71875
32
from functools import wraps from django.db import transaction from accounts.models import User from core.models import TelegramChat def infuse_user(): """ Adds user instance to args if possible. Also creates """ return decorator
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 5504, 13, 27530, 1330, 11787, 198, 6738, 4755, 13, 27530, 1330, 50203, 30820, 628, 198, 4299, 1167, 1904, 62, 7220, 33529, 198, 220...
3.386667
75
from multiprocessing.shared_memory import SharedMemory from .telemetry_version import v1_10 _mem = None _telemetry_sdk_version = None
[ 6738, 18540, 305, 919, 278, 13, 28710, 62, 31673, 1330, 39403, 30871, 198, 6738, 764, 46813, 41935, 62, 9641, 1330, 410, 16, 62, 940, 198, 198, 62, 11883, 796, 6045, 198, 62, 46813, 41935, 62, 21282, 74, 62, 9641, 796, 6045, 198 ]
3.214286
42
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines Authors. # # 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 ap...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 383, 28304, 1425, 774, 6455, 20655, 46665, 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...
3.217066
668
from __future__ import print_function from numpy import sqrt # all constants in cgs # gravitational constant G = 6.674e-8 # [ cm^3 g^-1 s^-1 ] # avogadro constant NA = 6.0221418e23 # [ ] # boltzmann constant KB = 1.3806504e-16 # [ erg K^-1 ] # planck constant H = 6.62606896e-27 # [ erg ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 299, 32152, 1330, 19862, 17034, 198, 198, 2, 477, 38491, 287, 269, 14542, 198, 198, 2, 29973, 6937, 198, 38, 796, 718, 13, 45385, 68, 12, 23, 220, 220, 220, 220, 220, ...
2.118993
437
"""Get enviroment from the bot.""" import yaml try: with open('config.yml') as file: env = yaml.load(file, Loader=yaml.FullLoader) except FileNotFoundError: raise EnvironmentError("Cannot find 'config.yml' in root, have you created one?")
[ 37811, 3855, 17365, 343, 296, 298, 422, 262, 10214, 526, 15931, 198, 198, 11748, 331, 43695, 198, 198, 28311, 25, 198, 220, 220, 220, 351, 1280, 10786, 11250, 13, 88, 4029, 11537, 355, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 22...
2.6875
96
""" Copyright (C) 2021 Patrick Maloney """ import unittest from python_meteorologist import forecast as fc if __name__ == '__main__': unittest.main()
[ 37811, 198, 15269, 357, 34, 8, 33448, 9925, 4434, 1419, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 6738, 21015, 62, 4164, 13492, 7451, 1330, 11092, 355, 277, 66, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.925926
54
""" Pipeline for text processing implementation """ class EmptyDirectoryError(Exception): """ No data to process """ class InconsistentDatasetError(Exception): """ Corrupt data: - numeration is expected to start from 1 and to be continuous - a number of text files must be equal t...
[ 37811, 198, 47, 541, 4470, 329, 2420, 7587, 7822, 198, 37811, 628, 198, 4871, 33523, 43055, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1400, 1366, 284, 1429, 198, 220, 220, 220, 37227, 628, 198, 4871, 3457, ...
2.451761
653
# Rudimentary script to collect domains in the Alexa top 500 # This script can be run as often as needed to refresh the list of domains # CrowdStrike 2015 # josh.liburdi@crowdstrike.com import requests import bs4 # File containing Alexa top 500 domains # This file name and path is referenced in the Bro script and can...
[ 2, 17421, 39051, 4226, 284, 2824, 18209, 287, 262, 34630, 1353, 5323, 198, 2, 770, 4226, 460, 307, 1057, 355, 1690, 355, 2622, 284, 14976, 262, 1351, 286, 18209, 198, 2, 29452, 31584, 1853, 198, 2, 474, 3768, 13, 8019, 2799, 72, 31,...
3.061069
262
from collections import namedtuple Genotype = namedtuple('Genotype', 'recurrent concat') PRIMITIVES = [ 'none', 'relu', 'sigmoid', 'identity' ] STEPS = 8 CONCAT = 8 ENAS = Genotype( recurrent = [ ('tanh', 0), ('tanh', 1), ('relu', 1), ('tanh', 3), ('tanh', ...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 13746, 8690, 796, 3706, 83, 29291, 10786, 13746, 8690, 3256, 705, 8344, 6657, 1673, 265, 11537, 198, 198, 4805, 3955, 2043, 42472, 796, 685, 198, 220, 220, 220, 705, 23108, 3256, 198, 220, ...
1.94213
432
"""Model classes.""" from __future__ import annotations from dataclasses import dataclass import datetime from decimal import Decimal from enum import Enum from typing import Dict, List from .util import round_decimal @dataclass class HmrcTransactionData: """Hmrc transaction figures.""" quantity: Decimal ...
[ 37811, 17633, 6097, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 33829, 1330, 2039, 388, 198, 6738,...
2.32162
2,049
# -*- coding: utf-8 -*- """ Customizable tool bar """ from __future__ import unicode_literals from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15022, 13821, 2891, 2318, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034...
2.888889
45
from .Command import Command from .Completers import citekeyCompleter from argcomplete.completers import FilesCompleter
[ 6738, 764, 21575, 1330, 9455, 198, 6738, 764, 5377, 1154, 1010, 1330, 21729, 2539, 5377, 1154, 353, 198, 6738, 1822, 20751, 13, 785, 1154, 1010, 1330, 13283, 5377, 1154, 353, 198 ]
3.870968
31
"""Extend api keys with sample_store columns. Revision ID: cad2875fd8cb Revises: 385f842b2526 Create Date: 2017-02-22 11:52:47.837989 """ import logging from alembic import op import sqlalchemy as sa log = logging.getLogger('alembic.migration') revision = 'cad2875fd8cb' down_revision = '385f842b2526'
[ 37811, 11627, 437, 40391, 8251, 351, 6291, 62, 8095, 15180, 13, 198, 198, 18009, 1166, 4522, 25, 20603, 2078, 2425, 16344, 23, 21101, 198, 18009, 2696, 25, 44826, 69, 23, 3682, 65, 1495, 2075, 198, 16447, 7536, 25, 2177, 12, 2999, 12,...
2.575
120
# Generated by Django 3.1.3 on 2020-12-04 11:44 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1065, 12, 3023, 1367, 25, 2598, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 201, 198, 201, 198 ]
2.485714
35
from django.conf.urls import include, url from django.contrib import admin from glitter.blockadmin import blocks urlpatterns = [ # Django admin url(r'^admin/', include(admin.site.urls)), # Glitter block admin url(r'^blockadmin/', include(blocks.site.urls)), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 31133, 13, 9967, 28482, 1330, 7021, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303...
2.81
100
import json import matplotlib.pyplot as plt import matplotlib.patches as patches reverse_result = json.load(open('reverse.json')) #gmaps.reverse_geocode((40.6413111,-73.77813909999999)) plt.figure() plt.xlim(-130,-65) plt.ylim(20,50) currentAxis = plt.gca() for result in reverse_result: viewport = result["geometry...
[ 11748, 33918, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 8071, 2052, 355, 16082, 198, 198, 50188, 62, 20274, 796, 33918, 13, 2220, 7, 9654, 10786, 50188, 13, 17752, 6, 4008, 1303, ...
2.537849
251
import logging import math from time import time import gensim import numpy as np import sklearn.mixture as gmm from scipy.optimize import curve_fit from scipy.signal import periodogram from scipy.stats import norm WINDOW = 7 # Length of the window to use when computing the moving average. def _moving_average(vect...
[ 11748, 18931, 198, 11748, 10688, 198, 6738, 640, 1330, 640, 198, 198, 11748, 308, 641, 320, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 76, 9602, 355, 308, 3020, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 121...
2.805396
7,153
import pytest from yandeley.exception import MendeleyApiException from test import get_client_credentials_session, cassette from test.resources.catalog import assert_core_view, assert_all_view
[ 11748, 12972, 9288, 198, 6738, 331, 40004, 1636, 13, 1069, 4516, 1330, 20442, 68, 1636, 32, 14415, 16922, 198, 6738, 1332, 1330, 651, 62, 16366, 62, 66, 445, 14817, 62, 29891, 11, 42812, 198, 6738, 1332, 13, 37540, 13, 9246, 11794, 13...
3.517857
56
from cached_property import cached_property from github.Organization import Organization as PyGithubOrganization from nudgebot.thirdparty.github.base import PyGithubObjectWrapper, GithubScope
[ 6738, 39986, 62, 26745, 1330, 39986, 62, 26745, 198, 198, 6738, 33084, 13, 26121, 1634, 1330, 12275, 355, 9485, 38, 10060, 26121, 1634, 198, 198, 6738, 299, 12587, 13645, 13, 17089, 10608, 13, 12567, 13, 8692, 1330, 9485, 38, 10060, 102...
4.148936
47
# Generated by Django 3.2.7 on 2021-10-15 12:35 import uuid import django.db.models.deletion from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 940, 12, 1314, 1105, 25, 2327, 198, 198, 11748, 334, 27112, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 10414, ...
2.982456
57
import requests from bitbucket_pipes_toolkit import get_logger logger = get_logger() def getToken(client_id: str, client_secret: str, username: str, password: str) -> str: """ :param client_id: Client ID of Auth Azure App :param client_secret: Client Secret of Auth Azuere App :param username: Usernam...
[ 11748, 7007, 198, 6738, 1643, 27041, 316, 62, 79, 18636, 62, 25981, 15813, 1330, 651, 62, 6404, 1362, 198, 198, 6404, 1362, 796, 651, 62, 6404, 1362, 3419, 628, 198, 4299, 651, 30642, 7, 16366, 62, 312, 25, 965, 11, 5456, 62, 21078,...
2.75827
393
import warnings warnings.warn(('`tf_keras_vis.utils.losses` module is deprecated. ' 'Please use `tf_keras_vis.utils.scores` instead.'), DeprecationWarning) from .scores import BinaryScore as BinaryLoss # noqa: F401 E402 from .scores import CategoricalScore as CategoricalLoss # noqa: F401 E402 from .s...
[ 11748, 14601, 198, 198, 40539, 654, 13, 40539, 7, 10786, 63, 27110, 62, 6122, 292, 62, 4703, 13, 26791, 13, 22462, 274, 63, 8265, 318, 39224, 13, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705,...
2.788462
156
from flask import Flask from flask.testing import FlaskClient from app.auth.views import current_user from app.models import User, db from tests.conftest import login, logout
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 13, 33407, 1330, 46947, 11792, 198, 198, 6738, 598, 13, 18439, 13, 33571, 1330, 1459, 62, 7220, 198, 6738, 598, 13, 27530, 1330, 11787, 11, 20613, 198, 6738, 5254, 13, 1102, 701, 395, 1330, ...
3.75
48
'''Methods for foodweb's flow normalization.''' import numpy as np import networkx as nx __all__ = [ 'diet_normalization', 'log_normalization', 'donor_control_normalization', 'predator_control_normalization', 'mixed_control_normalization', 'tst_normalization' ] def diet_normalization(foodweb...
[ 7061, 6, 46202, 329, 2057, 12384, 338, 5202, 3487, 1634, 2637, 7061, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 87, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 67, 1155, 62, 11265, 1634, 3256...
2.40028
2,141
""" Unit tests for file.line """ import logging import os import shutil import pytest import salt.config import salt.loader import salt.modules.cmdmod as cmdmod import salt.modules.config as configmod import salt.modules.file as filemod import salt.utils.data import salt.utils.files import salt.utils.platform import ...
[ 37811, 198, 26453, 5254, 329, 2393, 13, 1370, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 11250, 198, 11748, 8268, 13, 29356, 198, 11748, 8268, 13, 18...
2.174267
15,109
# Copyright (C) 2017 Beijing Didi Infinity Technology and Development 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/LI...
[ 2, 15069, 357, 34, 8, 2177, 11618, 7731, 72, 22385, 8987, 290, 7712, 1766, 1539, 43, 8671, 13, 198, 2, 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.496101
1,667
#!/usr/bin/env python import os import vtk # # If the current directory is writable, then test the witers # try: channel = open("test.tmp", "w") channel.close() os.remove("test.tmp") s = vtk.vtkRTAnalyticSource() s.SetWholeExtent(5, 10, 5, 10, 5, 10) s.Update() d = s.GetOutput() w ...
[ 1303, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 410, 30488, 198, 198, 2, 198, 2, 1002, 262, 1459, 8619, 318, 1991, 540, 11, 788, 1332, 262, 20868, 364, 198, 2, 198, 28311, 25, 198, 220, 220, 220, ...
2.110163
1,289
import tropo_mods.auto_sns as auto_sns from troposphere import Template t = Template() my_instance = auto_sns.AutoSNS( t, topic_name="my_new_topic", email="test@me.com" ) my_instance.print_to_yaml() # should also produce: ARN as output (?) # should also produce: Subscription to E-Mail
[ 11748, 14673, 78, 62, 24122, 13, 23736, 62, 82, 5907, 355, 8295, 62, 82, 5907, 198, 6738, 14673, 22829, 1330, 37350, 198, 198, 83, 796, 37350, 3419, 198, 1820, 62, 39098, 796, 8295, 62, 82, 5907, 13, 27722, 50, 8035, 7, 198, 220, ...
2.764151
106
import pandas as pd import numpy as np from tensorflow.keras import layers, Input, Model if __name__ == '__main__': mod = build_multiscale_cnn((129, 21, 2)) """ REN ET AL. 2018 FOR FEATURE EXTRACTION e.g. FREQUENCY IMAGE Generation based non FFT ZHU ET AL. 2019 for multisclae CNN applied to PRONOSTIA DING ET AL...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 11685, 11, 23412, 11, 9104, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220...
3.070922
141
import hashlib from peewee import * db = SqliteDatabase('useragents.db') # 初始化数据库 db.connect() # 连接数据库 db.create_tables([UAS]) # 初始化创建不存在的库 def UserAgent(searchwords, methods='and'): """ { "key":[ "words1", "words2" ] } """ count ...
[ 11748, 12234, 8019, 198, 198, 6738, 613, 413, 1453, 1330, 1635, 198, 198, 9945, 796, 311, 13976, 578, 38105, 10786, 7220, 49638, 13, 9945, 11537, 1303, 10263, 230, 251, 34650, 233, 44293, 244, 46763, 108, 162, 235, 106, 41753, 241, 628,...
1.953008
532
import json import logging import paho.mqtt.client as mqtt from abstract import AbstractSensor from config import CONFIG
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 198, 198, 6738, 12531, 1330, 27741, 47864, 198, 6738, 4566, 1330, 25626, 198 ]
3.8125
32
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } INSTALLED_APPS = [ 'picklefield', ] SECRET_KEY = 'local' SILENCED_SYSTEM_CHECKS = ['1_7.W001']
[ 35, 1404, 6242, 1921, 1546, 796, 1391, 198, 220, 220, 220, 705, 12286, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 26808, 8881, 10354, 705, 28241, 14208, 13, 9945, 13, 1891, 2412, 13, 25410, 578, 18, 3256, 198, 220, 22...
1.9
100
from __future__ import unicode_literals from django.contrib import admin from django.contrib import admin from jiraniapp.models import * admin.site.register(Location) admin.site.register(tags) admin.site.register(Image, ImageAdmin) admin.site.register(Profile, ProfileAdmin) admin.site.register(Project, ProjectAdmin)...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 474, 343, 5411, 381, 13, 27530, 1330, 1635, 628, 198, 198, ...
3.390244
123
""" Em uma competição de salto em distância cada atleta tem direito a cinco saltos. O resultado do atleta será determinado pela média dos cinco saltos. Você deve fazer um programa que receba o nome e as cinco distâncias alcançadas pelo atleta em seus saltos e depois informe o nome, os saltos e a média dos saltos. O pro...
[ 37811, 198, 10161, 334, 2611, 2307, 72, 16175, 28749, 390, 3664, 1462, 795, 1233, 22940, 10782, 544, 269, 4763, 379, 1616, 64, 2169, 19958, 10094, 257, 269, 259, 1073, 8268, 418, 13, 440, 1255, 4533, 466, 379, 1616, 64, 1055, 6557, 19...
2.151475
746
from django.shortcuts import render from django.http import JsonResponse import serial # Create your views here. # def acende_led(request): # global init # if request.method == 'POST': # try: # ledCommand = request.POST.get('ledCommand') # if ledCommand != 'H' or...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 201, 198, 11748, 11389, 201, 198, 201, 198, 2, 13610, 534, 5009, 994, 13, 201, 198, 201, 198, 201, 198, 201, 198, 2, 8...
1.833017
527
# -*- coding: utf-8 -*- import platform, serial, serial.tools.list_ports, time from ctypes import c_ushort #debug hack import json import glob import time __author__ = 'Kazuyuki TAKASE' __author__ = 'Yugo KAJIWARA' __copyright__ = 'PLEN Project Company Ltd., and all authors.' __license__ = 'The MIT License'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 3859, 11, 11389, 11, 11389, 13, 31391, 13, 4868, 62, 3742, 11, 640, 198, 6738, 269, 19199, 1330, 269, 62, 1530, 419, 198, 198, 2, 24442, 8156, 198, 11748, ...
2.705882
119
import httpretty import sure from dummyauth.spider import AuthorizationCodeValidator from unittest import TestCase
[ 11748, 2638, 16100, 198, 11748, 1654, 198, 6738, 31548, 18439, 13, 2777, 1304, 1330, 35263, 10669, 47139, 1352, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198 ]
4.259259
27
from typing import Any, Union, Optional import edgedb import aiohttp import discord from discord.ext import commands from .hookable import AsyncHookable
[ 6738, 19720, 1330, 4377, 11, 4479, 11, 32233, 198, 198, 11748, 45871, 65, 198, 11748, 257, 952, 4023, 198, 11748, 36446, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 764, 25480, 540, 1330, 1081, 13361, 39, 566, 540, 62...
3.738095
42
import json from pathlib import Path import pandas as pd import tqdm from nltk import sent_tokenize from dataset.preprocessing.preprocessing import preprocess_data from dataset.util import extract_data_from_dict from dataset.util import join_abstract_text #from preprocessing.preprocessing import preprocess_data #from...
[ 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 256, 80, 36020, 198, 6738, 299, 2528, 74, 1330, 1908, 62, 30001, 1096, 198, 198, 6738, 27039, 13, 3866, 36948, 13, 3866, 36948, 1...
3.506944
144
#!/usr/bin/python # ## @file # # Generate HTML for Dave web update & upload it to # a webserver using the the DAV protocol and the # tinydav library, available here: # # http://code.google.com/p/tinydav/ # # This is not used. # # Hazen 08/11 # import time import tinydav
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2235, 2488, 7753, 198, 2, 198, 2, 2980, 378, 11532, 329, 9935, 3992, 4296, 1222, 9516, 340, 284, 198, 2, 257, 2639, 18497, 1262, 262, 262, 42274, 8435, 290, 262, 198, 2, 7009, 67,...
2.785714
98
import pygame pygame.mixer.init() pygame.mixer.music.load('ex021.mp3') pygame.mixer.music.play() #pygame.event.wait() input('Agora sim')
[ 11748, 12972, 6057, 198, 9078, 6057, 13, 19816, 263, 13, 15003, 3419, 198, 9078, 6057, 13, 19816, 263, 13, 28965, 13, 2220, 10786, 1069, 46821, 13, 3149, 18, 11537, 198, 9078, 6057, 13, 19816, 263, 13, 28965, 13, 1759, 3419, 198, 2, ...
2.403509
57
import logging import pathlib import cv2 import numpy as np import six.moves.urllib as urllib import tensorflow as tf from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util from internal.detectors import ...
[ 11748, 18931, 198, 11748, 3108, 8019, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2237, 13, 76, 5241, 13, 333, 297, 571, 355, 2956, 297, 571, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 2134...
2.555006
809
import unittest from pony.orm.core import * from pony.orm.core import Attribute from testutils import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 26902, 13, 579, 13, 7295, 1330, 1635, 198, 6738, 26902, 13, 579, 13, 7295, 1330, 3460, 4163, 198, 6738, 1332, 26791, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198,...
2.923077
52
"""The implementation of manipulating HTL and js expression files. Mainly following interfaces are defined: - empty_expression : Empty the current js expression data. - append_js_expression : Append js expression. - get_current_expression : Get current expression string. - get_current_event_handler_scope_expre...
[ 37811, 464, 7822, 286, 29349, 7154, 43, 290, 44804, 5408, 3696, 13, 201, 198, 201, 198, 13383, 306, 1708, 20314, 389, 5447, 25, 201, 198, 201, 198, 12, 6565, 62, 38011, 1058, 33523, 262, 1459, 44804, 5408, 1366, 13, 201, 198, 12, 24...
2.355808
6,155
from os import environ from dotenv import load_dotenv from pathlib import Path env_path = Path('../.env') load_dotenv(dotenv_path=env_path) MONGODB_CONNECTION_STRING = environ.get('MONGODB_CONNECTION_STRING') JWT_SECRET_KEY = environ.get('JWT_SECRET_KEY')
[ 6738, 28686, 1330, 551, 2268, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 24330, 62, 6978, 796, 10644, 10786, 492, 11757, 24330, 11537, 198, 2220, 62, 26518, 24330, 7, 26518, 24330,...
2.57
100
import csv from typing import Dict from pantomime.types import CSV from nomenklatura.util import is_qid from opensanctions.core import Context
[ 11748, 269, 21370, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 279, 11456, 524, 13, 19199, 1330, 44189, 198, 6738, 299, 3674, 41582, 2541, 64, 13, 22602, 1330, 318, 62, 80, 312, 198, 198, 6738, 9808, 272, 2733, 13, 7295, 1330, 30532,...
3.318182
44
#!/usr/bin/env python # coding=utf-8 """ translate.py - Phenny Translation Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://inamidst.com/phenny/ """ import re, urllib import web def tr(phenny, context): """Translates a phrase, with an optional language hint.""...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 7645, 17660, 13, 9078, 532, 34828, 3281, 33322, 19937, 198, 15269, 3648, 11, 11465, 347, 13, 18918, 11, 287, 321, 312, 301, 13, 785, 198...
2.449756
1,025
# =============================================================================== # Copyright 2018 dgketchum # # 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...
[ 2, 38093, 25609, 855, 198, 2, 15069, 2864, 288, 70, 7126, 354, 388, 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,...
2.703614
830
import pytest from ida_lib.core.pipeline_geometric_ops import TranslatePipeline, RandomShearPipeline from ida_lib.image_augmentation.data_loader import AugmentDataLoader # cp-020 @pytest.mark.parametrize( ["batchsize"], [[1], [2], [3], [5], [10]] ) # cp-021 @pytest.mark.parametrize( ["resize"], [[(10, 10)]...
[ 11748, 12972, 9288, 198, 198, 6738, 220, 3755, 62, 8019, 13, 7295, 13, 79, 541, 4470, 62, 469, 16996, 62, 2840, 1330, 3602, 17660, 47, 541, 4470, 11, 14534, 3347, 283, 47, 541, 4470, 198, 6738, 220, 3755, 62, 8019, 13, 9060, 62, 5...
2.381579
152
import pickle import numpy as np import torch from torch.autograd import Variable def get_probability(class_id, set_size): """ Calculates the probability of a word occuring in some corpus the classes of which follow a log-uniform (Zipfian) base distribution""" class_prob = (np.log(class_id + 2) - np.log...
[ 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 628, 198, 4299, 651, 62, 1676, 65, 1799, 7, 4871, 62, 312, 11, 900, 62, 7857, 2599, 198, 220, 220, 220...
2.762329
1,460
#!/usr/bin/python import sys T = int(raw_input().strip()) for t in range(T): N = int(raw_input().strip()) print_fast35(N) #if len(sys.argv) > 1: # for n in map(int, sys.argv[1:]): # print_3or5_sum(n)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 198, 51, 796, 493, 7, 1831, 62, 15414, 22446, 36311, 28955, 198, 1640, 256, 287, 2837, 7, 51, 2599, 198, 220, 220, 220, 399, 796, 493, 7, 1831, 62, 15414, 22446, 3...
2.018182
110
from rest_framework.generics import CreateAPIView from rest_framework.permissions import AllowAny from .serializers import ContactUsSerializer
[ 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 13610, 2969, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 198, 6738, 764, 46911, 11341, 1330, 14039, 5842, 32634, 7509, 628 ]
4.142857
35
import unittest from spats_shape_seq.parse import fasta_parse from spats_shape_seq.target import Targets from spats_shape_seq.util import reverse_complement TARGET_SRP = "ATCGGGGGCTCTGTTGGTTCTCCCGCAACGCTACTCTGTTTACCAGGTCAGGTCCGGAAGGAAGCAGCCAAGGCAGATGACGCGTGTGCCGGGATGTAGCTGGCAGGGCCCCCACCCGTCCTTGGTGCCCGAGTCAG" TARGET_...
[ 198, 11748, 555, 715, 395, 198, 198, 6738, 599, 1381, 62, 43358, 62, 41068, 13, 29572, 1330, 3049, 64, 62, 29572, 198, 6738, 599, 1381, 62, 43358, 62, 41068, 13, 16793, 1330, 31089, 1039, 198, 6738, 599, 1381, 62, 43358, 62, 41068, ...
2.286585
164
import logz import sys import matplotlib.pyplot as plt HEIGHT_FACTOR = 5000 def main(log_filename: str): """main.""" with logz.open(log_filename) as l: rc = l["rc"] height = l["height"] height_raw = l["height_raw"] # imu = l["imu"] motion = l["camera_motion"] ...
[ 11748, 2604, 89, 198, 11748, 25064, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 13909, 9947, 62, 37, 10659, 1581, 796, 23336, 198, 4299, 1388, 7, 6404, 62, 34345, 25, 965, 2599, 198, 220, 220, 220, 37227, ...
1.824275
1,104
import unittest import inspect import files_sdk from tests.base import TestBase from files_sdk.models import AutomationRun from files_sdk import automation_run if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 10104, 198, 11748, 3696, 62, 21282, 74, 198, 6738, 5254, 13, 8692, 1330, 6208, 14881, 198, 6738, 3696, 62, 21282, 74, 13, 27530, 1330, 17406, 341, 10987, 198, 6738, 3696, 62, 21282, 74, 1330, 22771, 6...
3.184615
65
import datetime from client_sim.models import * dodebug = False
[ 11748, 4818, 8079, 198, 6738, 5456, 62, 14323, 13, 27530, 1330, 1635, 198, 67, 1098, 25456, 796, 10352, 628, 198 ]
3.3
20
"""An interface to produce Pandas DataFrames from Fluent XY output files.""" from parse import parse import numpy as np import pandas as pd from typing import List __version__ = "0.1.0" def parse_data(lines: List) -> pd.DataFrame: """Parse an XY-formatted datafile from Fluent and return a DataFrame.""" axi...
[ 37811, 2025, 7071, 284, 4439, 16492, 292, 6060, 35439, 422, 34070, 298, 41420, 5072, 3696, 526, 15931, 198, 198, 6738, 21136, 1330, 21136, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 19720, ...
2.236919
688
from Magics import *
[ 6738, 2944, 873, 1330, 1635, 198 ]
3.5
6
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib.admin.sites import AdminSite from shopit.admin.flag import FlagAdmin from shopit.models.flag import Flag from ..utils import ShopitTestCase
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 49315, 1330, 32053, 29123, 1...
3.223684
76
#!/usr/bin/env python """ list all the wordid - word mapping Sample usage: $ python utils/chk_word_table.py URL_TABLE_ENTRY(28B) - docid(4B) - loc of url(8B) - url fileid(2B) - url offset(4B) - url length(2B) - loc of doc(16B) - wet fileid(2B) - offset in the file(4B) - length of the file including ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 4868, 477, 262, 1573, 312, 532, 1573, 16855, 198, 198, 36674, 8748, 25, 198, 3, 21015, 3384, 4487, 14, 354, 74, 62, 4775, 62, 11487, 13, 9078, 628, 198, 10289, 62, ...
2.315372
631
# Imports: import pandas as pd import numpy as np import pickle # sklearn: import sklearn from sklearn import linear_model from sklearn.utils import shuffle # Matplotlib: import matplotlib.pyplot as pyplot from matplotlib import style # File paths: DATA_PATH = '../Dataset/student-mat.csv' SAVE_PATH = '../SavedModels/s...
[ 2, 1846, 3742, 25, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 2, 1341, 35720, 25, 198, 11748, 1341, 35720, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 198, 6738, 1341, 357...
2.50287
871
import logging import pathlib from contextlib import nullcontext from mailbox import Maildir from tempfile import TemporaryDirectory import click from aiosmtpd.controller import Controller from .config import Configuration from .smtp_handlers import MailboxHandler from .web_server import WebServer logger = logging.g...
[ 11748, 18931, 198, 11748, 3108, 8019, 198, 6738, 4732, 8019, 1330, 9242, 22866, 198, 6738, 37282, 1330, 6669, 688, 343, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 198, 11748, 3904, 198, 6738, 257, 4267, 16762, 30094, 13, 36500, 1330...
2.683778
487
# %% import cantera as ct # %% gas = ct.Solution('h2_Burke_n2.cti') r = ct.IdealGasConstPressureReactor(gas) # %% dt = 1e-5 t = 0. # %% r.T t += dt sim = ct.ReactorNet([r]) sim.advance(t) r.T # %% gas.TPX = 300, 101325, {'H':1.} r.syncState() r.T # %% sim.reinitialize() # %% t += dt sim.advance(t) r.T # %%
[ 2, 43313, 198, 11748, 460, 49600, 355, 269, 83, 198, 2, 43313, 198, 198, 22649, 796, 269, 83, 13, 46344, 10786, 71, 17, 62, 22991, 365, 62, 77, 17, 13, 310, 72, 11537, 198, 198, 81, 796, 269, 83, 13, 7390, 2287, 39699, 34184, 13...
1.852071
169
''' /*************************************************************** * Name: Pandas Data Analysis * Author: Reed James * Created: 22 Sept 2021 * Course: CIS 289 - Python * Version: Python 3.8.2 * OS: Windows 10 * Copyright: This is my own original work based on * specifications issued by our instructor * ...
[ 7061, 6, 198, 14, 17174, 8412, 46068, 8162, 198, 9, 6530, 25, 16492, 292, 6060, 14691, 198, 9, 6434, 25, 16105, 3700, 198, 9, 15622, 25, 2534, 2362, 33448, 198, 9, 20537, 25, 36159, 38902, 532, 11361, 198, 9, 10628, 25, 11361, 513, ...
3.394089
203
""" Extends Effect. Contains Scroll, which is one the 3 effects employed by the event. Copyright 2020 Lucas Alessandro do Carmo Lemos 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...
[ 37811, 201, 198, 11627, 2412, 7896, 13, 49850, 17428, 11, 543, 318, 530, 262, 513, 3048, 9322, 416, 262, 1785, 13, 201, 198, 201, 198, 15269, 12131, 15257, 47319, 28092, 466, 17998, 78, 20607, 418, 201, 198, 201, 198, 5990, 3411, 318,...
2.307728
6,548
""" DOCSTRING """ import numpy import tensorflow def xavier_init(fan_in, fan_out, constant = 1): """ DOCSTRING """ low = -constant * numpy.sqrt(6.0 / (fan_in + fan_out)) high = constant * numpy.sqrt(6.0 / (fan_in + fan_out)) return tensorflow.random_uniform( (fan_in, fan_out), minval=lo...
[ 37811, 198, 38715, 18601, 2751, 198, 37811, 198, 11748, 299, 32152, 198, 11748, 11192, 273, 11125, 198, 198, 4299, 2124, 19492, 62, 15003, 7, 24408, 62, 259, 11, 4336, 62, 448, 11, 6937, 796, 352, 2599, 198, 220, 220, 220, 37227, 198,...
2.248447
161
from django.test import TestCase from rest_framework.test import APIClient from . import util from .. import serializers
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2149, 75, 1153, 198, 198, 6738, 764, 1330, 7736, 198, 6738, 11485, 1330, 11389, 11341, 628 ]
3.727273
33
'''Utilities used in core scitable code.''' from extended_array import ExtendedArray from CommonUtil.prune_nulls import pruneNulls import collections import math import numpy as np import warnings THRESHOLD = 0.000001 # Threshold for value comparisons ################### Classes ############################ # Used ...
[ 7061, 6, 18274, 2410, 973, 287, 4755, 629, 4674, 2438, 2637, 7061, 198, 198, 6738, 7083, 62, 18747, 1330, 24204, 19182, 198, 6738, 8070, 18274, 346, 13, 1050, 1726, 62, 8423, 82, 1330, 778, 1726, 35067, 82, 198, 11748, 17268, 198, 117...
2.654133
3,883
from enum import IntEnum
[ 6738, 33829, 1330, 2558, 4834, 388, 628 ]
3.714286
7
import types as py_types from rbc.targetinfo import TargetInfo from rbc.typesystem import Type from numba.core import funcdesc, typing
[ 11748, 3858, 355, 12972, 62, 19199, 198, 6738, 374, 15630, 13, 16793, 10951, 1330, 12744, 12360, 198, 6738, 374, 15630, 13, 19199, 6781, 1330, 5994, 198, 6738, 997, 7012, 13, 7295, 1330, 1257, 10210, 3798, 11, 19720, 628, 628, 198 ]
3.475
40
from django.conf import settings from django.core.mail import send_mail
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 3758, 62, 4529, 628 ]
3.65
20
{% extends "note.py" %} {% block imports %} {{ super() }} from {{ menu_levels[2:] }} constant_def import scale_names scale_items = [(k,k,'') for k in scale_names ] {% endblock %} {%- block classMembers %} {{ super() }} scaleList : EnumProperty(name="Scale", items = scale_items, default = ':major', update=prope...
[ 90, 4, 14582, 366, 11295, 13, 9078, 1, 4064, 92, 628, 198, 198, 90, 4, 2512, 17944, 4064, 92, 198, 27007, 2208, 3419, 34949, 198, 6738, 22935, 6859, 62, 46170, 58, 17, 47715, 34949, 6937, 62, 4299, 1330, 5046, 62, 14933, 198, 9888, ...
2.480447
358
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 13:22 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 17, 319, 1584, 12, 3070, 12, 3070, 1511, 25, 1828, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.719298
57
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.5625
16
""" Contains the tree widgdet """ from __future__ import print_function import ast, logging import os.path from astviewer.iconfactory import IconFactory from astviewer.misc import class_name, check_class from astviewer.qtpy import QtCore, QtGui, QtWidgets from astviewer.toggle_column_mixin import ToggleColumnTreeWidg...
[ 37811, 49850, 262, 5509, 9214, 70, 15255, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 6468, 11, 18931, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 6468, 1177, 263, 13, 4749, 69, 9548, 1330, 26544, ...
2.207341
6,212
# -*- coding: utf-8 -*- """ jinja.parser ~~~~~~~~~~~~ Implements the template parser. The Jinja template parser is not a real parser but a combination of the python compiler package and some postprocessing. The tokens yielded by the lexer are used to separate template data and expressions. The...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 474, 259, 6592, 13, 48610, 198, 220, 220, 220, 220, 15116, 8728, 628, 220, 220, 220, 1846, 1154, 902, 262, 11055, 30751, 13, 628, 220, 220, ...
2.037115
19,938
from itertools import chain from ._compat import add_metaclass, fix_timedelta_repr from ._utils import PartialOrderingMixin from .types import Range from .types import * from .types import DiscreteRange, OffsetableRangeMixin # Imports needed for doctests in date range sets from datetime import * __all__ = [ "in...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 198, 6738, 47540, 5589, 265, 1330, 751, 62, 4164, 330, 31172, 11, 4259, 62, 16514, 276, 12514, 62, 260, 1050, 198, 6738, 47540, 26791, 1330, 43689, 18743, 278, 35608, 259, 198, 6738, 764, 19199, ...
2.297649
8,379
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'page2.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
[ 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, 7700, 17, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, 13, 1314...
3.018182
110
""" pypgapack/examples/example07.py -- maxbit with end-of-generation hill climb """ from pypgapack import PGA import sys class MyPGA(PGA) : """ Derive our own class from PGA. """ def maxbit(self, p, pop) : """ Maximum when all alleles are 1's, and that maximum is n. """ ...
[ 37811, 198, 79, 4464, 43554, 441, 14, 1069, 12629, 14, 20688, 2998, 13, 9078, 220, 1377, 220, 3509, 2545, 351, 886, 12, 1659, 12, 20158, 12788, 12080, 198, 37811, 198, 6738, 279, 4464, 43554, 441, 1330, 350, 9273, 198, 11748, 25064, 1...
2.12202
713
""" " The Topology class responed for " - creating a network topology which specified in a JSON format file " - adding and removing nodes and edges from a network " - showing a current network topology """ import networkx as nx from networkx.readwrite import json_graph import json import matplotlib.pyplot as plt ...
[ 37811, 198, 1, 383, 5849, 1435, 1398, 1217, 12004, 329, 220, 198, 1, 220, 532, 4441, 257, 3127, 1353, 1435, 543, 7368, 287, 257, 19449, 5794, 2393, 198, 1, 220, 532, 4375, 290, 10829, 13760, 290, 13015, 422, 257, 3127, 198, 1, 220, ...
3.284314
102
from __future__ import print_function import os import argparse import socket import torch from programs.label_config import max_param, stop_id def get_parser(): """ a parser for training the program executor """ parser = argparse.ArgumentParser(description="arguments for training program executor")...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 17802, 198, 11748, 28034, 198, 198, 6738, 4056, 13, 18242, 62, 11250, 1330, 3509, 62, 17143, 11, 2245, 62, 312, 628, 198, 4299, ...
2.969849
1,194
from django.contrib import admin from .models import Link, LinkCategory from dpb.admin import PageDownAdmin admin.site.register(Link, LinkAdmin) admin.site.register(LinkCategory)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 7502, 11, 7502, 27313, 198, 198, 6738, 288, 40842, 13, 28482, 1330, 7873, 8048, 46787, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 11280, 11, 7502, 46787, ...
3.45283
53
################################################################################### # THE KALMAN MACHINE LIBRARY # # Code supported by Marc Lambert # ####################################################################...
[ 29113, 29113, 14468, 21017, 198, 2, 3336, 509, 1847, 10725, 337, 16219, 8881, 45651, 49, 13153, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.475294
425
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' NAME: sysupdate.py DESCRIPTION: Update OS using apt CREATED: Tue Mar 17 22:17:50 2015 VERSION: 2 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [] PACKAGES: [] SCRIPTS: [] ''' # Standard library imports ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 20608, 25, 198, 17597, 19119, 13, 9078, 198, 198, 30910, 40165, 25, 198, 10260, 7294, 1262, 15409, ...
2.374372
796
import numpy as np import glob import os from query import load_queries import copy import random import math import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['legend.loc'] = 'best' from timeit import default_timer as timer # notice that this is a modified version of NDCG with relative normalizati...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 11748, 28686, 198, 6738, 12405, 1330, 3440, 62, 421, 10640, 198, 11748, 4866, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 2948...
3.593496
123
from django.db import models from django.conf import settings from django.db import models # Create your models here. from django.contrib.auth import get_user_model User = get_user_model()
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1...
3.368421
57
# Generated by Django 3.0.8 on 2020-08-27 14:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2919, 12, 1983, 1478, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
__author__ = 'tmy' import os from datetime import datetime from multiprocessing import Process from .ProcessManager.ProcessManager import ProcessManager, OccupiedError from .NTripleLineParser.src.NTripleLineParser import NTripleLineParser from .SparqlInterface.src import ClientFactory from .Materializer.Materializer i...
[ 834, 9800, 834, 796, 705, 83, 1820, 6, 198, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 764, 18709, 13511, 13, 18709, 13511, 1330, 10854, 13511, 11, 15227, 798, ...
3.712
125
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-13 22:18:36 import json import time from pymongo import MongoClient from pyspider.database.base.resultdb import ResultDB as BaseResultDB from .mong...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 900, 2123, 1509, 28, 19, 40379, 28, 19, 39747, 28, 19, 31246, 28, 403, 844, 277, 12685, 28, 40477, 23...
2.532374
139
from pylps.core import * from pylps.lps_data_structures import LPSTuple initialise(max_time=5) create_actions('show(_)', 'show_tuple(_, _)') create_events('handle_list(_)') create_variables('X', 'Y', 'XS') reactive_rule(True).then( handle_list([ ('a', 1), ('b', 2), ('c', 3), ('d',...
[ 6738, 279, 2645, 862, 13, 7295, 1330, 1635, 198, 6738, 279, 2645, 862, 13, 75, 862, 62, 7890, 62, 7249, 942, 1330, 18470, 2257, 29291, 198, 198, 36733, 786, 7, 9806, 62, 2435, 28, 20, 8, 198, 198, 17953, 62, 4658, 10786, 12860, 28...
1.974576
472
#!/usr/bin/env python3 # Thinking process # The animation of spanning with colors black/white/gray # Like the ones in princeton lecture really helped me from heapq import heappush, heappop sol = Solution() grid = [[0,2],[1,3]] grid = [[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]] grid =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 30707, 1429, 198, 2, 383, 11034, 286, 32557, 351, 7577, 2042, 14, 11186, 14, 44605, 198, 2, 4525, 262, 3392, 287, 5144, 18483, 19143, 1107, 4193, 502, 198, 198, 6738, 245...
2.229167
192
from datetime import datetime from io import BytesIO from urllib.parse import urljoin import numpy as np import traitlets from ipyleaflet import WMSLayer from matplotlib import cm from matplotlib.colors import Normalize from notebook import notebookapp from notebook.base.handlers import IPythonHandler from notebook.ut...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1291, 2578, 912, 198, 6738, 20966, 2349, 1878, ...
2.837772
826
# Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. # # Example: # # # Input: # # 1 # \ # 3 # / # 2 # # Output: # 1 # # Explanation: # The minimum absolute difference is 1, which is the difference between 2 and 1 (or ...
[ 2, 11259, 257, 13934, 2989, 5509, 351, 1729, 12, 31591, 3815, 11, 1064, 262, 5288, 4112, 3580, 1022, 3815, 286, 597, 734, 13760, 13, 201, 198, 2, 198, 2, 17934, 25, 201, 198, 2, 198, 2, 198, 2, 23412, 25, 201, 198, 2, 198, 2, ...
2.488987
227
from MessageAnalyzer import MessageAnalyzer
[ 6738, 16000, 37702, 9107, 1330, 16000, 37702, 9107, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.117647
17