content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from work_materials.globals import moscow_tz import datetime
[ 6738, 670, 62, 33665, 82, 13, 4743, 672, 874, 1330, 10867, 8232, 62, 22877, 198, 11748, 4818, 8079, 628 ]
3.263158
19
""" Module implements Constraint class and DPQuery class. Constraint is a querybase query with sign and answer to that query. DPQuery is a querybase query with noisy answer and information about DP mechanism used to get that answer (budget, variance, mechanism name) Also StackedConstraint and StackedDPQuery classes ar...
[ 37811, 198, 26796, 23986, 1482, 2536, 2913, 1398, 290, 27704, 20746, 1398, 13, 198, 3103, 2536, 2913, 318, 257, 12405, 8692, 12405, 351, 1051, 290, 3280, 284, 326, 12405, 13, 198, 6322, 20746, 318, 257, 12405, 8692, 12405, 351, 31210, 3...
2.573428
7,218
# encoding: UTF-8 __author__ = 'CHENXY' from string import join from xspeed_struct import structDict #---------------------------------------------------------------------- def createWrap(cbName): """在Python封装段代码中进行处理""" # 生成.h文件中的on部分 if 'OnRspError' in cbName: on_line = 'v...
[ 2, 21004, 25, 41002, 12, 23, 201, 198, 201, 198, 834, 9800, 834, 796, 705, 3398, 1677, 34278, 6, 201, 198, 201, 198, 6738, 4731, 1330, 4654, 201, 198, 6738, 2124, 12287, 62, 7249, 1330, 2878, 35, 713, 201, 198, 201, 198, 201, 198,...
2.058873
1,189
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # The code is based on deep-high-resolution-net.pytorch. # (https://github.com/leoxiaobin/deep-high-resolution-net.pytorch) # Modified by Zigang Geng (zigang@mail.ustc.edu.cn). # ...
[ 2, 16529, 26171, 198, 2, 15069, 357, 66, 8, 5413, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 2, 383, 2438, 318, 1912, 319, 2769, 12, 8929, 12, 29268, 12, 3262, 13, 9078, 13165, 354, 13, 198, 2, 357, 5450, 1378, 12567, 13, 7...
2.629296
1,222
import random import numpy as np import pandas as pd import seaborn as sns from pyod.models.knn import KNN as knn from pyod.models.abod import ABOD from pyod.models.cblof import CBLOF from pyod.models.feature_bagging import FeatureBagging from pyod.models.hbos import HBOS from pyod.models.mcd import MCD from pyod.mode...
[ 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 12972, 375, 13, 27530, 13, 15418, 77, 1330, 509, 6144, 355, 638, 77, 198, 6738, 12972, ...
2.418159
1,564
""" Code generation and import tests. """ import sys from hamcrest import ( assert_that, calling, equal_to, has_properties, instance_of, is_, raises, ) from jsonschema import ValidationError from jsonschematypes.registry import Registry from jsonschematypes.tests.fixtures import NAME, NAME...
[ 37811, 198, 10669, 5270, 290, 1330, 5254, 13, 198, 37811, 198, 11748, 25064, 198, 198, 6738, 8891, 66, 2118, 1330, 357, 198, 220, 220, 220, 6818, 62, 5562, 11, 198, 220, 220, 220, 4585, 11, 198, 220, 220, 220, 4961, 62, 1462, 11, ...
2.243342
2,741
# Copyright 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 # # Authors: # - Jaroslav Guenther, ...
[ 2, 15069, 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, 34156, 15341, 198, 2, 921, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13...
2.67551
490
import Qt.QtWidgets as QtWidgets import nomenclate.settings as settings MODULE_LOGGER_LEVEL_OVERRIDE = settings.INFO
[ 11748, 33734, 13, 48, 83, 54, 312, 11407, 355, 33734, 54, 312, 11407, 198, 11748, 299, 3674, 565, 378, 13, 33692, 355, 6460, 198, 198, 33365, 24212, 62, 25294, 30373, 62, 2538, 18697, 62, 41983, 49, 14114, 796, 6460, 13, 10778, 628 ]
2.833333
42
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 1584, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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, ...
2.666931
5,041
from src.scripts.executors.base import BaseExecutor from src.scripts.test_data.select_5 import populate
[ 6738, 12351, 13, 46521, 13, 18558, 315, 669, 13, 8692, 1330, 7308, 23002, 38409, 198, 6738, 12351, 13, 46521, 13, 9288, 62, 7890, 13, 19738, 62, 20, 1330, 48040, 628 ]
3.5
30
from setuptools import setup from distutils.core import setup, Extension from numpy.distutils import misc_util setup( name='pyfhog', version='0.1.0', description='Python wrapper for the fhog implementation of Piotr Dollars Matlab toolbox', url='https://github.com/JBamberger/pyfhog', author='Jannik ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 11, 27995, 198, 6738, 299, 32152, 13, 17080, 26791, 1330, 12747, 62, 22602, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 9078, 69, 31897, 3256, ...
2.657143
385
from apmserver import AccessTest import requests
[ 6738, 2471, 907, 18497, 1330, 8798, 14402, 198, 198, 11748, 7007, 628 ]
4.25
12
import pandas as pd
[ 11748, 19798, 292, 355, 279, 67, 198 ]
2.857143
7
""" Reverting HALF NUMBER""" inp = int(input()) sol = Solution() is_palindrome = sol.is_palindrome(inp) if is_palindrome: print("true", end="") else: print("false", end="") # lazy solution :: # my solution with python3 # s = str(x) # rs = "".join(list(reversed(s))) # if rs != s: # return False # return...
[ 37811, 797, 48820, 42968, 37, 36871, 13246, 37811, 628, 198, 198, 259, 79, 796, 493, 7, 15414, 28955, 198, 34453, 796, 28186, 3419, 198, 271, 62, 18596, 521, 5998, 796, 1540, 13, 271, 62, 18596, 521, 5998, 7, 259, 79, 8, 198, 361, ...
2.469697
132
from numpy import * import numpy as np from NumpyRegressions import * def get_risk_adjusted_portfolio_returns(returns,factors,constant=True,robust_type='HC0'): 'This function adjusts the portfolio returns by risk factors' dims = list(returns.shape) adjusted_returns = full(dims, nan) if len(dims)==4: ...
[ 6738, 299, 32152, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 399, 32152, 8081, 601, 507, 1330, 1635, 198, 4299, 651, 62, 19121, 62, 29117, 62, 634, 13652, 62, 7783, 82, 7, 7783, 82, 11, 22584, 669, 11, 9979, 415, 28,...
1.786571
2,919
import pandas as pd import numpy as np from util import timeclass,get_logger from speed_up import sparse_dot import networkx as nx VERBOSITY_LEVEL = 'INFO' LOGGER = get_logger(VERBOSITY_LEVEL, __file__) # @timeclass('Feat') # def graph_embedding2(self,table): # x = torch.tensor(table.df['node_in...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7736, 1330, 640, 4871, 11, 1136, 62, 6404, 1362, 198, 6738, 2866, 62, 929, 1330, 29877, 62, 26518, 198, 11748, 3127, 87, 355, 299, 87, 198, 198, 5959, 3...
1.948238
908
import pytest import datetime import os import sys from gcp import GCSBucket now = datetime.datetime.now() # this hook function needs to run before pytest-html pytest_configure, # which creates the HTMLReport @pytest.hookimpl(tryfirst=True)
[ 11748, 12972, 9288, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 308, 13155, 1330, 402, 7902, 33, 38811, 628, 198, 2197, 796, 4818, 8079, 13, 19608, 8079, 13, 2197, 3419, 628, 198, 198, 2, 428, 8011, 2...
3.192308
78
from django.db import models from .validators import validate_upload_file_extension
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 764, 12102, 2024, 1330, 26571, 62, 25850, 62, 7753, 62, 2302, 3004, 628 ]
3.863636
22
# Copyright: 2005 Brian Harring <ferringb@gmail.com> # License: GPL2/BSD # "More than one statement on a single line" # pylint: disable-msg=C0321 """ atom exceptions """ __all__ = ("MalformedAtom", "InvalidVersion", "InvalidCPV", "ParseError") from pkgcore.package import errors class InvalidCPV(errors.InvalidPa...
[ 2, 15069, 25, 5075, 8403, 2113, 1806, 1279, 2232, 1806, 65, 31, 14816, 13, 785, 29, 198, 2, 13789, 25, 38644, 17, 14, 21800, 198, 198, 2, 366, 5167, 621, 530, 2643, 319, 257, 2060, 1627, 1, 198, 2, 279, 2645, 600, 25, 15560, 12,...
2.993789
161
import time import os import argparse from multiprocessing import Process import sys from ray.rllib.env.policy_client import PolicyClient SERVER_ADDRESS = os.environ.get('VC_LEARNER_HOSTS', "127.0.0.1") # "127.0.0.1" SERVER_PORT = 9999 parser = argparse.ArgumentParser() parser.add_argument("--inference-...
[ 11748, 640, 201, 198, 11748, 28686, 201, 198, 11748, 1822, 29572, 201, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 201, 198, 11748, 25064, 201, 198, 201, 198, 6738, 26842, 13, 81, 297, 571, 13, 24330, 13, 30586, 62, 16366, 1330, 782...
2.509934
453
#!python def merge(items1, items2): """Merge given lists of items, each assumed to already be in sorted order, and return a new list containing all items in sorted order. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" merge_list = ...
[ 2, 0, 29412, 628, 198, 4299, 20121, 7, 23814, 16, 11, 3709, 17, 2599, 198, 220, 220, 220, 37227, 13102, 469, 1813, 8341, 286, 3709, 11, 1123, 9672, 284, 1541, 307, 287, 23243, 1502, 11, 198, 220, 220, 220, 290, 1441, 257, 649, 135...
2.949755
1,632
from django import forms
[ 6738, 42625, 14208, 1330, 5107 ]
4.8
5
from aleph.index.entities import index_entity # noqa from aleph.index.documents import index_document # noqa
[ 6738, 31341, 746, 13, 9630, 13, 298, 871, 1330, 6376, 62, 26858, 220, 1303, 645, 20402, 198, 6738, 31341, 746, 13, 9630, 13, 15390, 2886, 1330, 6376, 62, 22897, 220, 1303, 645, 20402, 198 ]
3.264706
34
''' Additional Customizations 100xp If you have another look at the script, under # Additional Customizations, you'll see that there are two plt.text() functions now. They add the words "India" and "China" in the plot. Instructions Add plt.grid(True) after the plt.text() calls so that gridlines are drawn on the plot. ...
[ 7061, 6, 198, 17699, 8562, 4582, 198, 3064, 42372, 198, 1532, 345, 423, 1194, 804, 379, 262, 4226, 11, 739, 1303, 15891, 8562, 4582, 11, 198, 5832, 1183, 766, 326, 612, 389, 734, 458, 83, 13, 5239, 3419, 5499, 783, 13, 1119, 751, ...
2.780919
283
from django.contrib import admin from .models import Todos, ForTestOnly admin.site.register(Todos) admin.site.register(ForTestOnly)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 309, 375, 418, 11, 1114, 14402, 10049, 198, 198, 28482, 13, 15654, 13, 30238, 7, 51, 375, 418, 8, 198, 28482, 13, 15654, 13, 30238, 7, 1890, 14402, 10...
2.977778
45
import time import json import datetime import os import tensorflow.compat.v1 as tf import math import glob import numpy as np import itertools import setproctitle import argparse from pathlib import Path tf.enable_eager_execution() from waymo_open_dataset.utils import range_image_utils from waymo_open_dataset.utils i...
[ 11748, 640, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 11748, 10688, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 340, 8...
2.028607
2,377
# -*- coding: utf-8 -*- """ simplewiki.database ~~~~~~~~~~~~~~~~~~~ The database. :copyright: 2007 Pallets :license: BSD-3-Clause """ from datetime import datetime from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import ForeignKey from sqlalchemy import Integer from s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 2829, 15466, 13, 48806, 198, 220, 220, 220, 220, 27156, 4907, 93, 628, 220, 220, 220, 383, 6831, 13, 628, 220, 220, 220, 1058, 22163, 4766, ...
3.081325
996
import numpy as np import Dataset3 as Ds ActualTarget = 3 model_output_0 = predict_with_network(Ds.input_data, Ds.weights) error_0 = (model_output_0 - ActualTarget) model_output_1 = predict_with_network(Ds.input_data, Ds.NewWeights) error_1 = (model_output_1 - ActualTarget) print("Model0 output:%d and Model1 outp...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 16092, 292, 316, 18, 355, 360, 82, 628, 628, 198, 6398, 723, 21745, 796, 513, 198, 19849, 62, 22915, 62, 15, 796, 4331, 62, 4480, 62, 27349, 7, 30832, 13, 15414, 62, 7890, 11, 360, 82, 13...
2.631902
163
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import dash import dash_bootstrap_components as dbc from jupyter_dash import JupyterDash # from app import app from .apps import local_explanation
[ 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 198, 11748, 14470, 198, 11748, 14470, 62, 1876...
3.45
80
#!/usr/bin/env python # -*- coding: utf-8 -*- from sqlalchemy.engine import Engine from sqlalchemy.event import listens_for from sqlalchemy.orm import sessionmaker from schema import Base, City, Sex, User, friendship from dom import FacebookCity, FacebookUser Session = sessionmaker() """ # Enforce foreign keys in s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 44161, 282, 26599, 13, 18392, 1330, 7117, 198, 6738, 44161, 282, 26599, 13, 15596, 1330, 35019, 62, 1640, 19...
3.1
180
''' 哦,不!你不小心把一个长篇文章中的空格、标点都删掉了,并且大写也弄成了小写。像句子"I reset the computer. It still didn’t boot!"已经变成了"iresetthecomputeritstilldidntboot"。在处理标点符号和大小写之前,你得先把它断成词语。当然了,你有一本厚厚的词典dictionary,不过,有些词没在词典里。假设文章用sentence表示,设计一个算法,把文章断开,要求未识别的字符最少,返回未识别的字符数。 注意:本题相对原题稍作改动,只需返回未识别的字符数 示例: 输入: dictionary = ["looked","just","like","her","...
[ 7061, 6, 198, 161, 241, 99, 171, 120, 234, 38834, 171, 120, 223, 19526, 254, 38834, 22887, 237, 33232, 225, 162, 232, 232, 31660, 10310, 103, 165, 243, 123, 163, 107, 229, 23877, 229, 44165, 254, 40792, 21410, 163, 102, 118, 43718, ...
1.194888
626
import datetime as dt import lxml.html import re from .utils import get_short_codes from urlparse import urlparse from billy.scrape.bills import BillScraper, Bill from billy.scrape.votes import Vote HI_URL_BASE = "http://capitol.hawaii.gov" SHORT_CODES = "%s/committees/committees.aspx?chamber=all" % (HI_URL_BASE)
[ 11748, 4818, 8079, 355, 288, 83, 198, 11748, 300, 19875, 13, 6494, 198, 11748, 302, 198, 198, 6738, 764, 26791, 1330, 651, 62, 19509, 62, 40148, 198, 6738, 19016, 29572, 1330, 19016, 29572, 198, 198, 6738, 2855, 88, 13, 1416, 13484, 1...
2.765217
115
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException import logging logging.basicConfig() logging.getLogger("MoneroRPC").setLevel(logging.DEBUG) log = logging.getLogger("wallet-rpc-lib") rpc = AuthServiceProxy("http://test:test@127.0.0.1:38083/json_rpc") # rpc = AuthServiceProxy('http://127.0.0.1:38083/...
[ 6738, 937, 263, 273, 14751, 13, 18439, 36436, 1330, 26828, 16177, 44148, 11, 19449, 49, 5662, 16922, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 198, 6404, 2667, 13, 1136, 11187, 1362, 7203, 9069, 3529, 49, 5662, 11...
2.033248
391
# Generated by Django 3.1.2 on 2020-10-18 14:14 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1507, 1478, 25, 1415, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'c:\Users\marce\Documents\GitHub\fdbpm-python\interface.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 ...
[ 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, 66, 7479, 14490, 59, 3876, 344, 59, 38354, 59, 38, 270, 16066, 59, 69, 9945, 4426, 12, 29412, 59, 39994, 13,...
2.985507
138
""" pyFF statistics module """ import time import logging __author__ = 'leifj' # Initialize the repository if not hasattr(logging, 'statistics'): logging.statistics = {} # Initialize my namespace stats = logging.statistics.setdefault('pyFF Statistics', {}) # Initialize my namespaces scalars and collections sta...
[ 37811, 198, 198, 9078, 5777, 7869, 8265, 198, 198, 37811, 198, 198, 11748, 640, 198, 11748, 18931, 198, 198, 834, 9800, 834, 796, 705, 293, 361, 73, 6, 198, 198, 2, 20768, 1096, 262, 16099, 198, 361, 407, 468, 35226, 7, 6404, 2667, ...
3.027273
220
"""ThreatConnect API Case Management Module.""" # flake8: noqa
[ 37811, 817, 630, 13313, 7824, 8913, 8549, 19937, 526, 15931, 198, 2, 781, 539, 23, 25, 645, 20402, 198 ]
3.315789
19
# -*- coding: utf-8 -*- """ Copyright (C) 2021 Stefano Gottardo (script.appcast) Functions for starting the script service SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ import threading import xbmc import resources.lib.servers.dial_server as dial_server import resources.l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 15069, 357, 34, 8, 33448, 22350, 5733, 39451, 13109, 357, 12048, 13, 1324, 2701, 8, 198, 220, 220, 220, 40480, 329, 3599, 262, 4226, 2139, 6...
3.006803
147
from django.db import models from django.utils.timezone import localdate # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 1179, 1940, 378, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.571429
28
# Generated by Django 3.1.2 on 2020-10-04 14:01 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 3023, 1478, 25, 486, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import math import torch import torch.nn as nn from torch.nn import init import torch.nn.functional as F import numpy as np import const class GELU(nn.Module): """ different from 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) """ if __name__ == "__main__":...
[ 11748, 10688, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 2315, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1500, 628...
2.447504
581
from openni import openni2, nite2 from openni import _openni2 as c_api_openni2 from openni import _nite2 as c_api_nite2 import commandrobot as cr MIN_MOVE_VALIDATION=50
[ 6738, 1280, 8461, 1330, 1280, 8461, 17, 11, 299, 578, 17, 198, 6738, 1280, 8461, 1330, 4808, 404, 1697, 72, 17, 355, 269, 62, 15042, 62, 404, 1697, 72, 17, 198, 6738, 1280, 8461, 1330, 4808, 77, 578, 17, 355, 269, 62, 15042, 62, ...
2.485714
70
# -*- coding: utf-8 -*- import random from src import actor from src import config ''' This modules manages a simulation instance. It creates the actors, handle the main loop and send messages to the calling application. '''
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4738, 198, 198, 6738, 12351, 1330, 8674, 198, 6738, 12351, 1330, 4566, 198, 198, 7061, 6, 198, 1212, 13103, 15314, 257, 18640, 4554, 13, 632, 8075, 262, 1054...
3.693548
62
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 13, 198, 2, 19179, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611, 262, 2438, 318, 198, 2, 16935, 515, 13, ...
3.392765
387
import pytest from thenewboston.third_party.factory.utils import build_json from ..factories.bank import BankFactory @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 788, 413, 65, 5744, 13, 17089, 62, 10608, 13, 69, 9548, 13, 26791, 1330, 1382, 62, 17752, 198, 198, 6738, 11485, 22584, 1749, 13, 17796, 1330, 5018, 22810, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, ...
3.08
50
from panoramic.cli.husky.service.utils.taxon_slug_expression import TaxonExpressionStr HUSKY_QUERY_DATA_SOURCE_COLUMN_NAME = '__data_source' """ Column on final Single Husky query with respective data source. """
[ 6738, 3425, 273, 18127, 13, 44506, 13, 7537, 2584, 13, 15271, 13, 26791, 13, 19290, 261, 62, 6649, 1018, 62, 38011, 1330, 9241, 261, 16870, 2234, 13290, 628, 198, 198, 39, 2937, 31159, 62, 10917, 19664, 62, 26947, 62, 47690, 62, 25154...
3.042254
71
import gym env = gym.make('CartPole-v0') print env.action_space print env.observation_space print env.observation_space.high print env.observation_space.low
[ 11748, 11550, 198, 24330, 796, 11550, 13, 15883, 10786, 43476, 47, 2305, 12, 85, 15, 11537, 198, 4798, 17365, 13, 2673, 62, 13200, 198, 4798, 17365, 13, 672, 3168, 341, 62, 13200, 198, 198, 4798, 17365, 13, 672, 3168, 341, 62, 13200, ...
2.821429
56
#!/usr/bin/env python3 """This module provides the SlurmDebManager.""" import logging import shlex import subprocess from pathlib import Path from slurm_ops_manager.slurm_ops_base import SlurmOpsManagerBase logger = logging.getLogger() class SlurmDebManager(SlurmOpsManagerBase): """Slurm debian operations mana...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 1212, 8265, 3769, 262, 3454, 333, 76, 16587, 13511, 526, 15931, 198, 11748, 18931, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 6738, 3108, 8019, 1330, 10644, 198, 198,...
2.183059
2,125
from data import extract_feature from model import ClfModel from config import CLF_CONFIG, categories, PROJECT_ROOT import os import torch import numpy as np from torch import autograd model = ClfModel(**CLF_CONFIG).cuda() model.load_state_dict(torch.load('../weights/model.pkl')) model.eval() text = [ open(os.path....
[ 6738, 1366, 1330, 7925, 62, 30053, 198, 6738, 2746, 1330, 1012, 69, 17633, 198, 6738, 4566, 1330, 7852, 37, 62, 10943, 16254, 11, 9376, 11, 21965, 23680, 62, 13252, 2394, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355...
2.57384
237
#!/usr/bin/python # -*- coding: utf-8 -*- import math import random import time import traceback import requests from bs4 import BeautifulSoup # 这里覆盖你的百度文库商店ID SHOP_ID = "f3b219e8b8f67c1cfad6b85c" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/8...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330,...
1.9
370
import os, shutil _FOLDER = "/Users/kerem/Downloads" for current_item in os.listdir(_FOLDER): current_path = os.path.join(_FOLDER, current_item) try: if os.path.isfile(current_path): os.unlink(current_path) elif os.path.isdir(current_path): shutil.rmtree(current_path) ...
[ 11748, 28686, 11, 4423, 346, 198, 198, 62, 37, 3535, 14418, 796, 12813, 14490, 14, 365, 2787, 14, 10002, 82, 1, 198, 198, 1640, 1459, 62, 9186, 287, 28686, 13, 4868, 15908, 28264, 37, 3535, 14418, 2599, 198, 220, 220, 220, 1459, 62,...
2.116959
171
motifs2Find = ("A", "T", "G", "C", "Cg", "cG", "[tc]Tt", "aA[ag]") findTitles = ("A", "T", "G", "C", "Cg", "cG", "yTt", "aAr") motifs2Count = ("a", "t", "g", "c", "cg", "[tc]tt", "aa[ag]") countTitles = ("a", "t", "g", "c", "cg", "ytt", "aar",) countTitles = tuple([x+"_counts" for x in countTitles])
[ 27926, 361, 82, 17, 16742, 796, 5855, 32, 1600, 366, 51, 1600, 366, 38, 1600, 366, 34, 1600, 366, 34, 70, 1600, 366, 66, 38, 1600, 12878, 23047, 60, 51, 83, 1600, 366, 64, 32, 58, 363, 60, 4943, 198, 19796, 51, 30540, 796, 5855,...
1.893082
159
from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments from sklearn.metrics import accuracy_score, precision_recall_fscore_support from datasets import load_from_disk import random import logging import sys import argparse import os sys.stdout = Unbuffered(sys.stdout) if __name__ == ...
[ 6738, 6121, 364, 1330, 11160, 17633, 1890, 44015, 594, 9487, 2649, 11, 31924, 11, 13614, 28100, 2886, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 11, 15440, 62, 8344, 439, 62, 69, 26675, 62, 11284, 198, 6738, 40522, ...
2.471652
1,217
import math intInput = int(input("Enter prime search limit: ")) a = [True] * intInput ieCounter = 0 for x in range(2, int(math.sqrt(intInput))): if a[x] is True: for j in range(x**2, intInput-1, x): ieCounter = ieCounter + 1 a[j] = False print("Primes found: ") fo...
[ 11748, 10688, 201, 198, 201, 198, 201, 198, 600, 20560, 796, 493, 7, 15414, 7203, 17469, 6994, 2989, 4179, 25, 366, 4008, 201, 198, 64, 796, 685, 17821, 60, 1635, 493, 20560, 201, 198, 201, 198, 494, 31694, 796, 657, 201, 198, 201, ...
2
194
###################################################### # # BioSignalML Management in Python # # Copyright (c) 2010-2013 David Brooks # # 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 # # ...
[ 29113, 14468, 4242, 2235, 198, 2, 198, 2, 220, 16024, 11712, 282, 5805, 8549, 287, 11361, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 3050, 12, 6390, 220, 3271, 17704, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362...
2.889986
709
#!/usr/bin/env python3 import os import time import json import subprocess import logging from influxdb import InfluxDBClient HOST = os.getenv("INFLUXDB_HOST") PORT = os.getenv("INFLUXDB_PORT") DATABASE = os.getenv("INFLUXDB_DATABASE") SPEEDTEST_SERVER = os.getenv("SPEEDTEST_SERVER") TEST_INTERVAL = int(os.getenv("TES...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 6738, 25065, 9945, 1330, 4806, 22564, 11012, 11792, 198, 198, 39, 10892, 796, 28686, ...
2.312883
326
''' --- Day 9: Sensor Boost --- You've just said goodbye to the rebooted rover and left Mars when you receive a faint distress signal coming from the asteroid belt. It must be the Ceres monitoring station! In order to lock on to the signal, you'll need to boost your sensors. The Elves send up the latest BOOST program ...
[ 7061, 6, 198, 6329, 3596, 860, 25, 35367, 19835, 11420, 198, 1639, 1053, 655, 531, 24829, 284, 262, 20149, 276, 35761, 290, 1364, 8706, 618, 345, 3328, 257, 18107, 17087, 6737, 2406, 422, 262, 27460, 10999, 13, 632, 1276, 307, 262, 37...
4.218947
950
from flask_login import UserMixin from datetime import datetime from mealme_pg import db, login_manager @login_manager.user_loader
[ 6738, 42903, 62, 38235, 1330, 11787, 35608, 259, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 9799, 1326, 62, 6024, 1330, 20613, 11, 17594, 62, 37153, 198, 198, 31, 38235, 62, 37153, 13, 7220, 62, 29356 ]
3.540541
37
import os import re import glob import socket import os.path from EventWriter import EventWriter
[ 11748, 28686, 198, 11748, 302, 198, 11748, 15095, 198, 11748, 17802, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 8558, 34379, 1330, 8558, 34379, 628, 628, 628, 628, 198 ]
3.655172
29
from math import sqrt users3 = {"David": {"Imagine Dragons": 3, "Daft Punk": 5, "Lorde": 4, "Fall Out Boy": 1}, "Matt": {"Imagine Dragons": 3, "Daft Punk": 4, "Lorde": 4, "Fall Out Boy": 1}, "Ben": {"Kacey Musgraves": 4, "Imagine Dragons": 3, ...
[ 6738, 10688, 1330, 19862, 17034, 628, 198, 18417, 18, 796, 19779, 11006, 1298, 19779, 25153, 19075, 1298, 513, 11, 366, 35, 14940, 32592, 1298, 642, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.944118
340
#!/usr/bin/env python # coding: utf-8 # # Create a binary tree # ![tree image](images/tree_01.png "Tree") # ## Task 01: build a node # # * on a piece of paper, draw a tree. # * Define a node, what are the three things you'd expect in a node? # * Define class called `Node`, and define a constructor that takes no arg...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 13610, 257, 13934, 5509, 198, 198, 2, 5145, 58, 21048, 2939, 16151, 17566, 14, 21048, 62, 486, 13, 11134, 366, 27660, 4943, 198, ...
2.939788
1,229
from abc import ABC, abstractmethod import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from prive.utils.data import encode_data, get_num_features class SetClassifier(ABC): """ Abstract base class for set classifiers """ @abstra...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 9487, 7483, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 1...
2.8175
400
import anndata as ad import pandas as pd def _select_first(df: pd.DataFrame, col_pattern: str) -> pd.Series: """\ Selects first non-empty value from columns matching ``col_pattern`` Parameters ---------- df Pandas data frame col_pattern Pattern to match columns Returns ...
[ 11748, 281, 358, 1045, 355, 512, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 4808, 19738, 62, 11085, 7, 7568, 25, 279, 67, 13, 6601, 19778, 11, 951, 62, 33279, 25, 965, 8, 4613, 279, 67, 13, 27996, 25, 198, 220, 220, 2...
2.430727
729
track = dict( author_username='residentmario', course_name='Pandas', course_url='https://www.kaggle.com/learn/pandas' ) lessons = [] notebooks = [] SLUGS = """creating-reading-and-writing-reference creating-reading-and-writing-workbook indexing-selecting-assigning-reference indexing-selecting-assigning su...
[ 11659, 796, 8633, 7, 198, 220, 220, 220, 1772, 62, 29460, 11639, 8154, 3876, 952, 3256, 198, 220, 220, 220, 1781, 62, 3672, 11639, 47206, 292, 3256, 198, 220, 220, 220, 1781, 62, 6371, 11639, 5450, 1378, 2503, 13, 74, 9460, 293, 13,...
2.530017
583
from os import X_OK import torch import torchvision from net.cvt_offical import get_cvt13_pretrained, BiseCvt_same_params,Base_cvt_cifar,BiseCvt_same_flops from utils import train_transform, test_transform,initialize,smooth_crossentropy from config import device from ptflops import get_model_complexity_info import t...
[ 6738, 28686, 1330, 1395, 62, 11380, 198, 11748, 28034, 220, 198, 11748, 28034, 10178, 220, 198, 198, 6738, 2010, 13, 33967, 83, 62, 2364, 605, 1330, 651, 62, 33967, 83, 1485, 62, 5310, 13363, 11, 347, 786, 34, 36540, 62, 31642, 62, ...
2.246154
845
import numpy as np from torch.utils.data import DataLoader from lib.datasets.frustum_dataset import FrustumDataset from lib.datasets.patch_dataset import PatchDataset # Init datasets and dataloaders
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 9195, 13, 19608, 292, 1039, 13, 8310, 436, 388, 62, 19608, 292, 316, 1330, 1305, 436, 388, 27354, 292, 316, 198, 6738, 9195,...
2.985294
68
"""Helper tools common to all notebooks. """ import os import numpy as np import re from toast.tod import hex_pol_angles_radial, hex_pol_angles_qu, hex_layout def check_nersc(reservation=None, repo=None): """Check if we are running at NERSC. If we are at NERSC, select the account to use for batch jobs....
[ 37811, 47429, 4899, 2219, 284, 477, 43935, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 198, 6738, 27805, 13, 83, 375, 1330, 17910, 62, 16104, 62, 27787, 62, 6335, 498, 11, 17910, 6...
1.862658
2,694
from bs4 import BeautifulSoup import requests html = getListHTML(getBPMRange(80)) artists = getArtistsInArray(html) songs = getSongsInArray(html) for artist, song in zip(artists, songs): print(artist, song)
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 628, 628, 628, 198, 6494, 796, 651, 8053, 28656, 7, 1136, 33, 5868, 17257, 7, 1795, 4008, 198, 433, 1023, 796, 651, 8001, 1023, 818, 19182, 7, 6494, 8, 198, 82, 28079, 7...
2.831169
77
#!/usr/bin/env python2 from pwn import * p = process("./times-up") p.recvuntil("Challenge: ") sol = eval(p.recvline()) p.sendline(str(sol)) p.interactive()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 6738, 279, 675, 1330, 1635, 198, 79, 796, 1429, 7, 1911, 14, 22355, 12, 929, 4943, 198, 79, 13, 8344, 85, 28446, 7203, 41812, 3540, 25, 366, 8, 198, 34453, 796, 5418, 7, 79, ...
2.384615
65
import os from unittest import expectedFailure from django.db.models import Q from django.test import TestCase from rest_framework import generics, serializers, status from rest_framework.test import APIRequestFactory from advanced_filters.filters import AdvancedFilter, ParseError from api.models import User
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 2938, 50015, 198, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 11, 11389, 1134...
3.91358
81
''' 我们在导入一个包时,实际上是导入了它的__init__.py文件 这样我们可以在__init__.py文件中批量导入我们所需要的模块,而不再需要一个一个的导入 __init__.py的第一个作用就是package的标识.如果没有该文件,该目录就不会认为是package Root目录->Pack1目录(->Pack1Class.py),Pack2目录(->Pack2Class.py) Python中的包和模块有两种导入方式:精确导入和模糊导入: 精确导入: from Root.Pack1 import Pack1Class import Root.Pack1.Pack1Class 模糊导入: from Root.P...
[ 7061, 6, 198, 198, 22755, 239, 20015, 105, 28839, 101, 43380, 120, 17739, 98, 31660, 10310, 103, 44293, 227, 33768, 114, 171, 120, 234, 22522, 252, 165, 247, 227, 41468, 42468, 43380, 120, 17739, 98, 12859, 228, 22522, 225, 21410, 834, ...
0.956325
1,328
import pandas as pd diary = pd.read_csv("../data/NationalFoodSurvey/NFS_1974/1974 diary data.txt", sep="\t") hhold = pd.read_csv("../data/NationalFoodSurvey/NFS_1974/1974 household data.txt", sep="\t") dta = diary.merge(hhold)
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 67, 8042, 796, 279, 67, 13, 961, 62, 40664, 7203, 40720, 7890, 14, 16186, 24602, 14214, 3304, 14, 45, 10652, 62, 40828, 14, 40828, 26339, 1366, 13, 14116, 1600, 198, 220, 220, 220, 220, 220...
2.053435
131
import cv2 import numpy as np import imutils # img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 545, 26791, 198, 2, 33705, 796, 269, 85, 17, 13, 33967, 83, 10258, 7, 9600, 11, 269, 85, 17, 13, 46786, 62, 33, 10761, 17, 38, 30631, 8, 628, 628 ]
2.238095
42
import functools import tensorflow as tf from composite_layers.utils import wrap @functools.wraps(tf.SparseTensor)
[ 11748, 1257, 310, 10141, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 24185, 62, 75, 6962, 13, 26791, 1330, 14441, 628, 198, 31, 12543, 310, 10141, 13, 29988, 862, 7, 27110, 13, 50, 29572, 51, 22854, 8, 198 ]
2.902439
41
import sys from kanshin.com.keyword import DetailPage as KeywordPage, ListPage as KeywordListPage import json import re if __name__ == '__main__': main(*sys.argv[1:])
[ 11748, 25064, 198, 6738, 479, 504, 20079, 13, 785, 13, 2539, 4775, 1330, 42585, 9876, 355, 7383, 4775, 9876, 11, 7343, 9876, 355, 7383, 4775, 8053, 9876, 198, 11748, 33918, 198, 11748, 302, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.866667
60
# This file is imported from __init__.py and exec'd from setup.py VERSION = (0, 10, 1, None)
[ 2, 770, 2393, 318, 17392, 422, 11593, 15003, 834, 13, 9078, 290, 2452, 1549, 422, 9058, 13, 9078, 198, 198, 43717, 796, 357, 15, 11, 838, 11, 352, 11, 6045, 8, 198 ]
2.9375
32
# # Copyright (c) 2017 Intel Corporation # # 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...
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 8180, 10501, 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, ...
3.645833
288
# -*- coding: utf-8 -*- from DataSource import DataSource import re
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 6060, 7416, 1330, 6060, 7416, 198, 11748, 302, 628, 198 ]
2.730769
26
""" Set runtime options and job submission strings for electronic structure package calculations. The options will be determined by the user input and will correspond to the default otherwise. Constructs `kwargs` dictionaries that are passed to elstruct package functions to write electronic struct...
[ 37811, 5345, 19124, 3689, 290, 1693, 14498, 13042, 329, 198, 220, 220, 220, 7914, 4645, 5301, 16765, 13, 628, 220, 220, 220, 383, 3689, 481, 307, 5295, 416, 262, 2836, 5128, 290, 198, 220, 220, 220, 481, 6053, 284, 262, 4277, 4306, ...
2.114924
3,672
''' Simple Convolutional Neural Network (CNN) example in Keras (Python) The program performs classification of input images into two groups: hand-drawn circles and hand-drawn lines Author: Goran Trlin Find more tutorials and code samples on: https://playandlearntocode.com ''' import os # os.environ['CUDA_VISIBLE_DEVIC...
[ 7061, 6, 198, 26437, 34872, 2122, 282, 47986, 7311, 357, 18474, 8, 1672, 287, 17337, 292, 357, 37906, 8, 198, 464, 1430, 17706, 17923, 286, 5128, 4263, 656, 734, 2628, 25, 1021, 12, 41549, 13332, 290, 1021, 12, 41549, 3951, 198, 13838...
2.666128
1,237
# Generated by Django 2.1.6 on 2019-02-14 06:47 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 21, 319, 13130, 12, 2999, 12, 1415, 9130, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
"""Test date handling and filtering for claims.""" import datetime from claims_to_quality.analyzer.models.claim import Claim from claims_to_quality.analyzer.models.claim_line import ClaimLine from claims_to_quality.analyzer.models.measures.eligibility_option import EligibilityOption from claims_to_quality.analyzer.mod...
[ 37811, 14402, 3128, 9041, 290, 25431, 329, 3667, 526, 15931, 198, 11748, 4818, 8079, 198, 198, 6738, 3667, 62, 1462, 62, 13237, 13, 38200, 9107, 13, 27530, 13, 6604, 1330, 22070, 198, 6738, 3667, 62, 1462, 62, 13237, 13, 38200, 9107, ...
2.41034
1,528
from os import path from setuptools import setup, find_packages this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'readme.md'), encoding='utf-8') as f: long_description = f.read() with open('adasher_requirements.txt') as f: required = f.read().splitlines() setup(name...
[ 6738, 28686, 1330, 3108, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 5661, 62, 34945, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 4480, 1280, 7, 6978, 13, ...
2.621711
304
# Adapted from subplemental materical of 'Marginally Calibrated Deep # Distributional Regression'. Paper and MATLAB code can be found at # https://www.tandfonline.com/doi/abs/10.1080/10618600.2020.1807996 # Author of corresponding MATLAB code: Nadja Klein
[ 2, 30019, 276, 422, 850, 26908, 282, 26910, 605, 286, 705, 24428, 3289, 2199, 2889, 515, 10766, 198, 2, 27484, 282, 3310, 2234, 4458, 14962, 290, 36775, 48780, 2438, 460, 307, 1043, 379, 198, 2, 3740, 1378, 2503, 13, 83, 392, 69, 25...
3.368421
76
''' Created on Oct 24, 2014 @author: jiao ''' import urllib2 from bs4 import BeautifulSoup import sys import os import time from lxml import etree from io import StringIO sys.path.append('/home/jiao/QTL') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'QTL.settings') from qtl.models import Gene,Marker,LOD,Experime...
[ 7061, 6, 198, 41972, 319, 2556, 1987, 11, 1946, 198, 198, 31, 9800, 25, 474, 13481, 198, 7061, 6, 198, 198, 11748, 2956, 297, 571, 17, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 25064, 198, 11748, 28686, 198, 11748,...
1.869333
5,250
''' Created on Nov 16, 2016 @author: cstras ''' import socket import struct import logging import locale from evtgen.datasources.datasourceinterface import DataGenerator, DataElement, DataStore, LabelFile from evtgen.datasources import PCAP from scapy.all import * class PacketStore(DataStore): ''' Represents ...
[ 7061, 6, 198, 41972, 319, 5267, 1467, 11, 1584, 198, 198, 31, 9800, 25, 269, 2536, 292, 198, 7061, 6, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 18931, 198, 11748, 36693, 198, 6738, 819, 83, 5235, 13, 19608, 292, 2203, 13, 196...
2.236655
4,927
""" Path tracking simulation with iterative linear model predictive control for speed and steer control author: Atsushi Sakai (@Atsushi_twi) """ import matplotlib.pyplot as plt import cvxpy import math import numpy as np import sys import csv import pandas as pd sys.path.append("../../PathPlanning/CubicSpline/") tr...
[ 37811, 198, 198, 15235, 9646, 18640, 351, 11629, 876, 14174, 2746, 33344, 1630, 329, 2866, 290, 27401, 1630, 198, 198, 9800, 25, 317, 912, 17731, 13231, 1872, 4275, 32, 912, 17731, 62, 4246, 72, 8, 198, 198, 37811, 198, 11748, 2603, 2...
2.002845
3,163
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' Project-wide **PEP-compliant type hint sign sets** (i.e., frozen set globals aggregating instances of the :class:`beartype._util.da...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 41436, 7, 38559, 24290, 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, 1267, 19351, 198, ...
2.775
4,920
import os, sys, pygame, random, array, gamemode import direction, bounds, timeout, menu from pygame.locals import * #Import game modules. from loader import load_image import player, maps, traffic, camera, tracks CENTER_W = -1 CENTER_H = -1 #Menu function #initialization pygame.init() screen = pygam...
[ 11748, 28686, 11, 25064, 11, 12972, 6057, 11, 4738, 11, 7177, 11, 9106, 368, 1098, 201, 198, 11748, 4571, 11, 220, 22303, 11, 26827, 11, 6859, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 201, 198, 201, 198, 2, 20939, 98...
2.353093
388
import pytest from django_fahrenheit import settings as fahrenheit_settings @pytest.mark.parametrize( argnames='auth_installed, use_added_by, expected_value', argvalues=[ (True, True, True), (True, False, False), (False, True, False), (False, False, False) ], )
[ 11748, 12972, 9288, 198, 198, 6738, 42625, 14208, 62, 69, 993, 34032, 1330, 6460, 355, 277, 993, 34032, 62, 33692, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 1822, 14933, 11639, 18439, 62, ...
2.395349
129
import torch import torch.nn.functional as F
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 201, 198, 201, 198 ]
2.833333
18
def Ejemplo(): """Función sin parametros ni retorno""" print("Hola mundo!") s = 5+7 print(s) def EjemploParam(n1, n2): """Función con parametros sin retorno""" s = n1 + n2 print(s) def EjemploRetorno(): """Función sin parametros con retorno""" s = 5 + 6 return s def Ejemplo...
[ 4299, 412, 73, 18856, 78, 33529, 198, 220, 220, 220, 37227, 24629, 979, 18840, 7813, 5772, 316, 4951, 37628, 1005, 46447, 37811, 198, 220, 220, 220, 3601, 7203, 39, 5708, 27943, 78, 2474, 8, 198, 220, 220, 220, 264, 796, 642, 10, 22...
2.097872
235
""" Duplicate POSTS in settings. Should not read each post twice, which causes conflicts. """ import pytest from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in...
[ 37811, 198, 35660, 489, 5344, 24582, 50, 287, 6460, 13, 198, 198, 19926, 407, 1100, 1123, 1281, 5403, 11, 543, 5640, 12333, 13, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 299, 1134, 5708, 1330, 11593, 12417, 834, 198, 1...
2.464516
310
import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import env import gym import pygame #0:space, 1: counter 2: agent, 3: tomato, 4: lettuce, 5: plate, 6: knife, 7: delivery # grid_dim = [7, 7] # map = [[1, 1, 1, 1, 1, 3, 1], # [6, 0, 2, 0, 2, 0, 4], # ...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 6, 22305, 198, 198, 11748, ...
1.739206
1,158
''' author: meng-zha data: 2020/05/26 ''' from torch.utils.data import Dataset import h5py import numpy as np import os
[ 7061, 6, 198, 9800, 25, 1450, 70, 12, 89, 3099, 198, 7890, 25, 12131, 14, 2713, 14, 2075, 198, 7061, 6, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 1...
2.586957
46
#Implements the multiple choice model described in Aravena et al. -WL import pdb import pyomo.environ as pe import json import numpy as np from PWL_Approx_Functions import * import egret.model_library.transmission.tx_utils as tx_utils import egret.model_library.transmission.tx_calc as tx_calc import egret.model_lib...
[ 2, 3546, 1154, 902, 262, 3294, 3572, 2746, 3417, 287, 30574, 574, 64, 2123, 435, 13, 532, 54, 43, 198, 11748, 279, 9945, 198, 11748, 12972, 17902, 13, 268, 2268, 355, 613, 198, 198, 11748, 33918, 198, 198, 11748, 299, 32152, 355, 45...
2.711599
638
from array import array from itertools import chain import time from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.graphics import Rectangle from kivy.graphics.texture import Texture from kivy.properties import NumericProperty, ListProperty from kivy.uix.widget import ...
[ 6738, 7177, 1330, 7177, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 11748, 640, 198, 198, 6738, 479, 452, 88, 13, 1324, 1330, 2034, 198, 6738, 479, 452, 88, 13, 15750, 1330, 21328, 198, 6738, 479, 452, 88, 13, 7295, 13, 17497,...
2.385882
425
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/callback.simpleprofiler.ipynb (unless otherwise specified). __all__ = ['SimpleProfilerPostCallback', 'SimpleProfilerCallback'] # Cell import time import pandas as pd import numpy as np from pathlib import Path from packaging.version import parse from fastcore.foundatio...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 299, 1443, 14, 47423, 13, 36439, 5577, 5329, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 26437, 15404, 5329, 6...
2.870326
1,658
""" Mixin for returning capture information. """ class CaptureMixin: """ Mixin for returning capture information. """ def get_video_length(self): """ Get the total length of the video. """ return self.frame_count / self.fps
[ 37811, 201, 198, 35608, 259, 329, 8024, 8006, 1321, 13, 201, 198, 37811, 201, 198, 201, 198, 201, 198, 4871, 31793, 35608, 259, 25, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 15561, 259, 329, 8024, 8006, 1321, 13, 201,...
2.377049
122
""" This module contains all constants representing the text directions of a :class:`~cms.models.languages.language.Language`: * ``LTR``: Text is left to right, e.g. in English * ``RTL``: Text is right to left, e.g. in Arabic """ from django.utils.translation import ugettext_lazy as _ LTR = "LTR" RTL = "RTL" CHO...
[ 37811, 198, 1212, 8265, 4909, 477, 38491, 10200, 262, 2420, 11678, 286, 257, 1058, 4871, 25, 63, 93, 46406, 13, 27530, 13, 75, 33213, 13, 16129, 13, 32065, 63, 25, 198, 198, 9, 7559, 43, 5446, 15506, 25, 8255, 318, 1364, 284, 826, ...
2.691781
146