content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import string from utils import * IDEAL_Q_LENGTH = 10 MAX_SCORE = 17 class Ranker: ''' Holds the ranking data structure for how questions are scored and sorted The q_list becomes a max priority queue, with the max score at the front. Properties: q_list: (list(Question, int)) list tuples of un...
[ 11748, 4731, 198, 6738, 3384, 4487, 1330, 1635, 198, 198, 14114, 1847, 62, 48, 62, 43, 49494, 796, 838, 198, 22921, 62, 6173, 6965, 796, 1596, 198, 198, 4871, 10916, 263, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 9340, ...
2.827815
151
from . import arduino from . import platformio from . import unsupported
[ 6738, 764, 1330, 610, 24493, 198, 6738, 764, 1330, 3859, 952, 198, 6738, 764, 1330, 24222, 198 ]
4.294118
17
""" Create Profiles for existing Users """ from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models def create_profiles(apps, schema_editor): """ Create Profiles for all users that do't have it """ Users = apps.get_model("auth", "User") Pr...
[ 37811, 198, 16447, 4415, 2915, 329, 4683, 18987, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, ...
2.877193
171
import severus
[ 11748, 1750, 385, 628 ]
4
4
from threading import current_thread from django.utils.deprecation import MiddlewareMixin _requests = {}
[ 6738, 4704, 278, 1330, 1459, 62, 16663, 201, 198, 201, 198, 6738, 42625, 14208, 13, 26791, 13, 10378, 8344, 341, 1330, 6046, 1574, 35608, 259, 201, 198, 201, 198, 201, 198, 62, 8897, 3558, 796, 23884, 201, 198, 201, 198, 201, 198 ]
2.809524
42
import json import pandas as pd import os def getDict(title, dict): ''' 获取一个子列表,并返回该列表 ''' for child in dict: if child['title'] == title: return child return None def readSingleCarFile(path): ''' 读位于allData目录下的单个车辆信息json文件 ''' with open(path) as f: car...
[ 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 628, 198, 4299, 651, 35, 713, 7, 7839, 11, 8633, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5525, 236, 115, 20998, 244, 31660, 10310, 103, 36310, 2...
1.861772
1,512
"""BL Schedule."""
[ 37811, 9148, 19281, 526, 15931, 198 ]
3.166667
6
from tadataka.optimization.functions import Function
[ 6738, 36264, 48088, 13, 40085, 1634, 13, 12543, 2733, 1330, 15553, 628, 198 ]
4.230769
13
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 15069, 1584, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2393, 2845, 198, 2, 287, 11846, 351, 262, 13789, ...
3.787313
268
from flask import Blueprint, render_template, request, flash, jsonify, redirect, url_for from flask_login import login_required, current_user from . import db, cursor, dbmysql import json import random from . import user_info views = Blueprint('views', __name__) @views.route('/', methods=['GET', 'POST']) @login_requi...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 2581, 11, 7644, 11, 33918, 1958, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 11, 1459, 62, 7220, 198, 6738, 764, 1330, 20613, 11, 23493, 11, ...
3.15528
161
import operator from idaapi import * from idautils import * # Globals: risky but friendly peeps to speed up coding # A CFG constructed by angr CFGFast analysis cfg = '' # Count of methods discovered by auto-analysis methods_identified = 0 # A list of FuncInfo() structures holding information on # functions identified...
[ 11748, 10088, 198, 6738, 220, 3755, 15042, 1330, 1635, 198, 6738, 4686, 2306, 4487, 1330, 1635, 628, 198, 2, 40713, 874, 25, 17564, 475, 8030, 613, 25386, 284, 2866, 510, 19617, 198, 2, 317, 18551, 38, 12006, 416, 281, 2164, 18551, 21...
4.115702
242
#coding: utf-8 import json, pymysql, datetime, time import mysqlcredentials
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 11748, 33918, 11, 279, 4948, 893, 13976, 11, 4818, 8079, 11, 640, 198, 11748, 48761, 66, 445, 14817, 628 ]
2.75
28
"""Models for handling metadata.""" import dataclasses import logging from django.db import models from django.db.models import F, Func from django.utils.translation import gettext_lazy as _ from edd.fields import VarCharField from .common import EDDSerialize logger = logging.getLogger(__name__) class MetadataG...
[ 37811, 5841, 1424, 329, 9041, 20150, 526, 15931, 198, 198, 11748, 4818, 330, 28958, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 11, 11138, 66, 198, 6738...
2.076818
5,871
App.open("java -jar C:/JabRef-4.2-fat.jar") wait(30) click("1529632189350.png") wait(2) click("1529632296782.png") wait(2) click("1530899089323.png") wait(2) click("1530899105356.png") wait(2) click("1530899134798.png") wait(2) click("1530899120685.png") wait(2) click("1530899134798.png") wait(2) click("1530899165770.p...
[ 4677, 13, 9654, 7203, 12355, 532, 9491, 327, 14079, 41, 397, 8134, 12, 19, 13, 17, 12, 17359, 13, 9491, 4943, 198, 17077, 7, 1270, 8, 198, 12976, 7203, 1314, 27137, 2624, 1507, 6052, 1120, 13, 11134, 4943, 198, 17077, 7, 17, 8, 19...
2.084821
224
#!/usr/bin/python # Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. # Get and set email flags for a given user import optparse import sys # SYNC_ME: Search: Scripts: Load pyserver. import os import sys sys.path.insert(0, os.path.abspath('%s/util' ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 357, 66, 8, 4793, 12, 6390, 3310, 658, 286, 262, 2059, 286, 8919, 13, 198, 2, 1114, 15665, 2846, 11, 766, 262, 2393, 38559, 24290, 13, 198, 198, 2, 3497, 290, 900, 3053, ...
2.666093
581
import pytest import threading from unittest.mock import Mock, call from quickrpc.promise import Promise, PromiseDoneError, PromiseTimeoutError, PromiseDeadlockError @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 11748, 4704, 278, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 869, 198, 6738, 2068, 81, 14751, 13, 16963, 786, 1330, 34920, 11, 34920, 45677, 12331, 11, 34920, 48031, 12331, 11, 34920, 20489, 5354, ...
3.366667
60
import numpy as np import scipy.ndimage as nd import pyKinectTools.algs.Dijkstras as dgn # from pyKinectTools.utils.DepthUtils import * from pyKinectTools.utils.DepthUtils import depthIm2PosIm from copy import deepcopy from skimage.draw import circle from IPython import embed from pylab import * def geodesic_extrema...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 358, 9060, 355, 299, 67, 198, 11748, 12972, 49681, 478, 33637, 13, 14016, 82, 13, 35, 45961, 2536, 292, 355, 288, 4593, 198, 198, 2, 422, 12972, 49681, 478, 33637, 13, 267...
2.332552
2,132
import asynctest import asynctest.mock as amock from opsdroid.core import OpsDroid from opsdroid.matchers import match_always from opsdroid.message import Message from opsdroid.parsers.always import parse_always class TestParserAlways(asynctest.TestCase): """Test the opsdroid always parser."""
[ 198, 11748, 355, 2047, 310, 395, 198, 11748, 355, 2047, 310, 395, 13, 76, 735, 355, 716, 735, 198, 198, 6738, 39628, 67, 3882, 13, 7295, 1330, 26123, 35, 3882, 198, 6738, 39628, 67, 3882, 13, 6759, 3533, 1330, 2872, 62, 33770, 198, ...
3.15625
96
""" Manages VMware storage policies (called pbm because the vCenter endpoint is /pbm) Examples ======== Storage policy -------------- .. code-block:: python { "name": "salt_storage_policy" "description": "Managed by Salt. Random capability values.", "resource_type": "STORAGE", "s...
[ 37811, 198, 5124, 1095, 37754, 6143, 4788, 198, 7, 7174, 279, 20475, 780, 262, 410, 23656, 36123, 318, 1220, 79, 20475, 8, 198, 198, 27730, 198, 2559, 198, 198, 31425, 2450, 198, 26171, 198, 198, 492, 2438, 12, 9967, 3712, 21015, 628,...
1.852619
11,053
# Always prefer setuptools over distutils from setuptools import setup setup( name="mattermostwrapper", packages=['mattermostwrapper'], version="2.2", author="Brian Hopkins", author_email="btotharye@gmail.com", url='https://github.com/btotharye/mattermostwrapper.git', download_url='https:...
[ 2, 16622, 4702, 900, 37623, 10141, 625, 1233, 26791, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 47635, 1712, 48553, 1600, 198, 220, 220, 220, 10392, 28, 17816, 47635, 1712, 48553, ...
2.712871
202
from typing import List import pytest import numpy as np import pandas as pd from obp.dataset import ( linear_reward_function, logistic_reward_function, linear_behavior_policy_logit, SyntheticSlateBanditDataset, ) from obp.types import BanditFeedback # n_unique_action, len_list, dim_context, reward_...
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 909, 79, 13, 19608, 292, 316, 1330, 357, 198, 220, 220, 220, 14174, 62, 260, 904, 62, 8...
1.844304
4,573
from unittest import TestCase from mock import Mock, MagicMock from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim from cloudshell.cp.vcenter.common.vcenter.task_waiter import SynchronousTaskWaiter from cloudshell.cp.vcenter.common.vcenter.vmomi_service import pyVmomiService from cloudshell.cp.v...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 15290, 1330, 44123, 11, 6139, 44, 735, 198, 6738, 12972, 53, 320, 13, 8443, 1330, 10880, 13313, 11, 3167, 8443, 198, 6738, 12972, 53, 76, 12753, 1330, 43907, 198, 6738, 6279, 291...
3.322581
248
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import logging import threading LOGGER = logging.getLogger('keybinder') def configure_logging(log_level=None): """Performs basic logging configuration. :param log_level: logging level, e.g. logging.DEBUG Default: logging.INFO :p...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 10786...
2.18658
2,310
import json import dash_html_components as html import dash from dash.testing import wait from dash.dependencies import Input, Output, State, ALL, MATCH from dash.testing.plugin import * from .. import BaseDashView
[ 11748, 33918, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 198, 6738, 14470, 13, 33407, 1330, 4043, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 11, 1812, 11, 11096, 11, 337, 11417, 198, 6738...
3.688525
61
__author__ = 'Richard' TAGGING_RECEIVER = "tagging_receiver" DISTRIBUTOR = "distributor"
[ 834, 9800, 834, 796, 705, 22245, 6, 628, 198, 42197, 38, 2751, 62, 2200, 5222, 38757, 796, 366, 12985, 2667, 62, 260, 39729, 1, 198, 26288, 5446, 9865, 3843, 1581, 796, 366, 17080, 2455, 273, 1 ]
2.5
36
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is the entry point for the command-line interface (CLI) application. It can be used as a handy facility for running the task from a command line. .. note:: To learn more about Click visit the `project website <http://click.pocoo.org/5/>`_. There is als...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 318, 262, 5726, 966, 329, 262, 3141, 12, 1370, 7071, 357, 5097, 40, 8, 3586, 13, 198, 198, 1...
2.359811
1,901
from ..util import run
[ 6738, 11485, 22602, 1330, 1057, 628 ]
4
6
import click import pandas as pd import tensorflow as tf @click.command() @click.argument("src", nargs=-1) @click.argument("dst", nargs=1) @click.option( "--type", type=str, default="tf", help="Type of datasets to merge." ) # noqa @click.option("--debug", is_flag=True, help="Set level logging to DEBUG.") def mer...
[ 11748, 3904, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 49140, 7203, 10677, 1600, 299, 22046, 10779, 16, 8, 198, 31, 12976, 13, 49140, 720...
2.075089
839
# -*- coding: utf-8 -*- """ Created on Sat Oct 25 20:34:32 2014 @author: Imane """ import numpy as np import matplotlib.pyplot as plt #from os import listdir #from os.path import isfile, join #from zscoring import zscoringNII #from masking import maskdata from sklearn.decomposition import PCA from k_means import kmean...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 2556, 1679, 1160, 25, 2682, 25, 2624, 1946, 198, 198, 31, 9800, 25, 314, 805, 68, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11...
2.263006
346
from flask import Flask, request, jsonify, make_response from flask_restplus import Api, Resource, fields import joblib import numpy as np from nltk.corpus import stopwords import nltk import json import stanza import pandas as pd from nltk.probability import FreqDist pd.set_option("display.max_colwidth", 200) import...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 42903, 62, 2118, 9541, 1330, 5949, 72, 11, 20857, 11, 7032, 198, 11748, 1693, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 2528, 74, 13, ...
2.56
700
""" 刷新指数日线数据 """ import time from multiprocessing import Pool import pandas as pd from retry.api import retry_call from ..mongodb import get_db from ..setting.constants import MAIN_INDEX, MARKET_START, MAX_WORKER from ..utils import ensure_dtypes from ..utils.db_utils import to_dict from ..utils.log_utils import ma...
[ 37811, 198, 198, 26344, 115, 23877, 108, 162, 234, 229, 46763, 108, 33768, 98, 163, 118, 123, 46763, 108, 162, 235, 106, 198, 198, 37811, 198, 11748, 640, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 11748, 19798, 292, 355,...
2.048327
269
import unittest from ._common import * from Phen2Gene import Phen2Gene FOLDER = 'exec' KBASE_PATH = os.environ.get('KBASE_PATH', '/kbase')
[ 11748, 555, 715, 395, 198, 198, 6738, 47540, 11321, 1330, 1635, 198, 198, 6738, 34828, 17, 39358, 1330, 34828, 17, 39358, 198, 198, 37, 3535, 14418, 796, 705, 18558, 6, 198, 198, 22764, 11159, 62, 34219, 796, 28686, 13, 268, 2268, 13,...
2.648148
54
import math import numpy as np from rllab.envs.mujoco.gather.gather_env import GatherEnv from sandbox.finetuning.envs.mujoco.snake_env import SnakeEnv APPLE = 0 BOMB = 1
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 374, 297, 397, 13, 268, 14259, 13, 76, 23577, 25634, 13, 70, 1032, 13, 70, 1032, 62, 24330, 1330, 402, 1032, 4834, 85, 198, 6738, 35204, 13, 15643, 316, 46493, 13, 268, 14...
2.492754
69
"""Get RWIS FTP password from the database settings""" from __future__ import print_function from pyiem.util import get_properties def main(): """Go Main Go""" props = get_properties() print(props['rwis_ftp_password']) if __name__ == '__main__': main()
[ 37811, 3855, 33212, 1797, 45854, 9206, 422, 262, 6831, 6460, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 12972, 26597, 13, 22602, 1330, 651, 62, 48310, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 52...
3
91
import time import json import functools from math import atan2 import matplotlib.pyplot as plt # Debug func # Plotting points/hull # Graham Func #Assumption -> Input is vertices of polygon given in order (CCW) starting with leftmost point if __name__ == "__main__": a = [[0,0] , [5,0] , [6,1] , [3,2] , [7,5] , ...
[ 11748, 640, 198, 11748, 33918, 198, 11748, 1257, 310, 10141, 198, 6738, 10688, 1330, 379, 272, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 31687, 25439, 198, 198, 2, 28114, 889, 2173, 14, 71, 724, ...
1.851852
513
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from webnotes import _ @webnotes.whitelist(allow_roles=["System Manager", "Administrator"])
[ 2, 15069, 357, 66, 8, 2211, 11, 5313, 11822, 21852, 18367, 83, 13, 12052, 13, 198, 2, 17168, 13789, 13, 4091, 5964, 13, 14116, 198, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, ...
3.457831
83
from tsadm.log import TSAdmLogger from tsadm.views.base import TSAdmView logger = TSAdmLogger(__name__)
[ 6738, 40379, 324, 76, 13, 6404, 1330, 26136, 2782, 76, 11187, 1362, 198, 6738, 40379, 324, 76, 13, 33571, 13, 8692, 1330, 26136, 2782, 76, 7680, 198, 198, 6404, 1362, 796, 26136, 2782, 76, 11187, 1362, 7, 834, 3672, 834, 8, 198 ]
2.5
42
# -*- coding: utf-8 -*- """ Created on Tue Sep 5 16:54:20 2017 @author: HeyDude """ import os import json import warnings import logging import pydicom import SimpleITK as sitk import SimpleDicomToolkit as sdtk VERSION = 0.93 class Database(sdtk.Logger): """ Creates a Sqlite3 table from a list of dicom file...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 8621, 220, 642, 1467, 25, 4051, 25, 1238, 2177, 198, 198, 31, 9800, 25, 14690, 35, 2507, 198, 37811, 198, 11748, 28686, 198, 11748, 33918,...
2.176808
8,365
# Generated by Django 3.1.1 on 2020-09-18 10:05 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 2931, 12, 1507, 838, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # Copyright (C) 2015-2018 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Plotting/visualisation fun...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 1853, 12, 7908, 416, 19252, 83, 370, 48988, 3900, 1279, 4679, 358, 83, 31, 494, 1453, 13, 2398, 29, 198, 2, 1439, 2489, 10395, 13, 347, 10305, ...
2.447272
8,449
from onmt.translate.Translator import Translator from onmt.translate.Translation import Translation, TranslationBuilder from onmt.translate.Beam import Beam, GNMTGlobalScorer __all__ = [Translator, Translation, Beam, GNMTGlobalScorer, TranslationBuilder]
[ 6738, 319, 16762, 13, 7645, 17660, 13, 8291, 41880, 1330, 3602, 41880, 198, 6738, 319, 16762, 13, 7645, 17660, 13, 48313, 1330, 33322, 11, 33322, 32875, 198, 6738, 319, 16762, 13, 7645, 17660, 13, 3856, 321, 1330, 25855, 11, 15484, 1375...
3.764706
68
import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns sns.set(style="ticks") sns.set_context("poster") import sys, os from nested_dict import nested_dict import pandas as pd import numpy as np from pyfasta import Fasta import os import re from scipy import stats import util get_...
[ 11748, 2603, 29487, 8019, 355, 285, 489, 198, 76, 489, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 82, 5907, 13, 2617, 7, 7635, 2625, 8...
2.351199
709
# -*- coding: utf-8 -*- r""" \ +-------------------+--------------------+ | |Screenshot1| | |Screenshot3| | +-------------------+--------------------+ A program for calculating the mass of XAFS [X-Ray Absorption Fine Structure] samples. The chemical formula parser understands parentheses and weight percenta...
[ 171, 119, 123, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 198, 59, 198, 198, 10, 1783, 6329, 10, 19351, 10, 198, 91, 220, 220, 930, 34204, 16, 91, 220, 220, 930, 220, 220, 220, 930, 34204, 18, 91...
3.338589
2,537
#!/usr/bin/env python3 from __future__ import division import argparse import collections import glob import shelve import os.path import numpy as np import matplotlib.pyplot as plt import plot_helpers import weibull_workload axes = 'shape sigma load timeshape njobs'.split() parser = argparse.ArgumentParser(descr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 15095, 198, 11748, 7497, 303, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 299...
2.151778
2,306
import os import os.path import shutil import tempfile has_symlink = False compat_test_dir = tempfile.mkdtemp() # Check for symlink support (available and usable) src = os.path.join(compat_test_dir, "src") dst = os.path.join(compat_test_dir, "dst") with open(src, "w"): pass try: os.symlink(src, dst) exc...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 628, 198, 10134, 62, 1837, 4029, 676, 796, 10352, 628, 198, 5589, 265, 62, 9288, 62, 15908, 796, 20218, 7753, 13, 28015, 67, 29510, 3419, 198, ...
2.547414
232
import pytest from django.shortcuts import reverse from questionbank.users.constants import ADMIN pytestmark = pytest.mark.django_db def test_user_role(user, admin_user): """ calling user.role method should return the user group which they are in. if the user is not in any group, NotImplementedError is...
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 9575, 198, 198, 6738, 1808, 17796, 13, 18417, 13, 9979, 1187, 1330, 5984, 23678, 198, 198, 9078, 9288, 4102, 796, 12972, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 62...
2.986577
149
s = input() length = len(s) word_len = int(length / 3) t = "" if s[0:word_len] == s[word_len:word_len*2]: t = s[0:word_len] elif s[word_len:word_len*2] == s[word_len*2:word_len*3]: t = s[word_len:word_len*2] else: t = s[0:word_len] print(t)
[ 82, 796, 5128, 3419, 198, 198, 13664, 796, 18896, 7, 82, 8, 198, 4775, 62, 11925, 796, 493, 7, 13664, 1220, 513, 8, 198, 198, 83, 796, 13538, 198, 198, 361, 264, 58, 15, 25, 4775, 62, 11925, 60, 6624, 264, 58, 4775, 62, 11925, ...
1.868613
137
"""MCP45XX and MCP46XX commands.""" WRITE = 0x00 << 2 """Writes to the device.""" INCREASE = 0x01 << 2 """Increase the resistance.""" DECREASE = 0x02 << 2 """Decrease the resistance.""" READ = 0x03 << 2 """Read the current value."""
[ 37811, 44, 8697, 2231, 8051, 290, 337, 8697, 3510, 8051, 9729, 526, 15931, 628, 198, 18564, 12709, 796, 657, 87, 405, 9959, 362, 198, 37811, 20257, 274, 284, 262, 3335, 526, 15931, 198, 198, 30158, 2200, 11159, 796, 657, 87, 486, 9959...
2.735632
87
# Copyright 2018 Alibaba Cloud Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 15069, 2864, 41992, 10130, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.671937
253
import os import json from azureml.core import Workspace from azureml.exceptions import WorkspaceException, AuthenticationException, ProjectSystemException from azureml.core.authentication import ServicePrincipalAuthentication from adal.adal_error import AdalError from msrest.exceptions import AuthenticationError from...
[ 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 35560, 495, 4029, 13, 7295, 1330, 10933, 10223, 198, 6738, 35560, 495, 4029, 13, 1069, 11755, 1330, 10933, 10223, 16922, 11, 48191, 16922, 11, 4935, 11964, 16922, 198, 6738, 35560, 495, 402...
3.934426
122
arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9] x = 10 # Function call result = binary_Search(arr, 0, len(arr)-1, x) if result != -1: print ("Element is present at index % d" % result) else: print ("Element is not present in array")
[ 220, 198, 3258, 796, 685, 352, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 767, 11, 807, 11, 860, 60, 220, 198, 87, 796, 838, 198, 220, 220, 198, 2, 15553, 869, 220, 198, 20274, 796, 13934, 62, 18243, 7, 3258, 11, 657, ...
2.336538
104
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import numpy as np import tensorflow as tf import pandas as pd import model from data_reader import load_data, DataReader, DataReaderFastText, FasttextModel FLAGS = tf.flags.FLAGS def r...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, ...
2.003055
2,291
# This example demonstrates the use of the get_all_boards function import py8chan if __name__ == '__main__': main()
[ 2, 770, 1672, 15687, 262, 779, 286, 262, 651, 62, 439, 62, 12821, 2163, 198, 11748, 12972, 23, 3147, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.184211
38
fim = 1 vgremio = 0 vinter = 0 empate = 0 final = 0 soma = 0 while (fim == 1): inter, gremio = map(int, input().split()) soma += 1 if inter > gremio: vinter = vinter + 1 elif gremio > inter: vgremio = vgremio + 1 elif inter == gremio: empate += 1 print(...
[ 69, 320, 796, 352, 198, 45119, 2787, 952, 796, 657, 198, 85, 3849, 796, 657, 198, 45787, 378, 796, 657, 198, 20311, 796, 657, 198, 82, 6086, 796, 657, 198, 4514, 357, 69, 320, 6624, 352, 2599, 198, 220, 220, 220, 987, 11, 308, 2...
1.942424
330
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="ENXEASY", version="1.0", author="Pooyan Nayyeri", author_email="pnnayyeri@gmail.com", description="ENX EASY absolute rotary encoders library for Raspberry Pi.", long_description=long_d...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.427126
494
from dicom_parser.utils.sequence_detector.sequences.mr.dwi.dwi import \ MR_DIFFUSION_SEQUENCES
[ 6738, 288, 291, 296, 62, 48610, 13, 26791, 13, 43167, 62, 15255, 9250, 13, 3107, 3007, 13, 43395, 13, 67, 37686, 13, 67, 37686, 1330, 3467, 198, 220, 220, 220, 17242, 62, 35, 29267, 2937, 2849, 62, 5188, 10917, 24181, 1546, 198 ]
2.357143
42
# Ported from square/wire: # wire-library/wire-schema/src/commonMain/kotlin/com/squareup/wire/schema/internal/parser/TypeElement.kt from dataclasses import dataclass from karapace.protobuf.location import Location from typing import List, TYPE_CHECKING if TYPE_CHECKING: from karapace.protobuf.option_element import...
[ 2, 4347, 276, 422, 6616, 14, 21809, 25, 198, 2, 6503, 12, 32016, 14, 21809, 12, 15952, 2611, 14, 10677, 14, 11321, 13383, 14, 74, 313, 2815, 14, 785, 14, 23415, 929, 14, 21809, 14, 15952, 2611, 14, 32538, 14, 48610, 14, 6030, 2018...
3.052632
114
import sys import numpy as np import os.path as osp from functools import partial from copy import copy as _copy, deepcopy as _deepcopy from .apply import check_and_convert, sparse_apply from .io import load_npz
[ 11748, 25064, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 6738, 4866, 1330, 4866, 355, 4808, 30073, 11, 2769, 30073, 355, 4808, 2208...
3.013514
74
# -*- coding: utf-8 -*- import os.path import PyQt4.uic __all__ = ['loadUi'] def loadUi(modpath, widget): """ Uses the PyQt4.uic.loadUI method to load the inputed ui file associated with the given module path and widget class information on the inputed widget. :param modpath | str :par...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 9485, 48, 83, 19, 13, 84, 291, 198, 198, 834, 439, 834, 796, 37250, 2220, 52, 72, 20520, 628, 198, 4299, 3440, 52, 72, 7, ...
2.346614
251
import datetime import warnings from functools import update_wrapper from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, cast from dagster import check from dagster.core.definitions.partition import ( PartitionScheduleDefinition, PartitionSetDefinition, ScheduleType, TimeBasedPartiti...
[ 11748, 4818, 8079, 198, 11748, 14601, 198, 6738, 1257, 310, 10141, 1330, 4296, 62, 48553, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 3350, 198, 198, 6738, 48924, 170...
2.834717
9,033
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # Teslagrad. Прохождение игры на 100%. Карта расположения и изображения свитков (Сайт GamesisArt.ru) import os from urllib.parse import urljoin import requests # Cache if not os.path.exists('scrolls.html'): rs = requests.get('http://gamesi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 2, 10696, 30909, 6335, 13, 12466, 253, 21169, 15166...
2.149112
845
from django.core.management import BaseCommand from django.db import ProgrammingError from constants.jobs import JobLifeCycle from db.models.tensorboards import TensorboardJob from scheduler import tensorboard_scheduler
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 30297, 12331, 198, 198, 6738, 38491, 13, 43863, 1330, 15768, 14662, 20418, 2375, 198, 6738, 20613, 13, 27530, 13, 83, 22854, 12821, 1330,...
3.894737
57
from torch.optim.lr_scheduler import * from face_recognition.model import * from face_recognition.utils.utils import * from torch import nn import pytorch_lightning as pl from torchmetrics.functional.classification.accuracy import accuracy # will be used during inference
[ 6738, 28034, 13, 40085, 13, 14050, 62, 1416, 704, 18173, 1330, 1635, 198, 6738, 1986, 62, 26243, 653, 13, 19849, 1330, 1635, 198, 6738, 1986, 62, 26243, 653, 13, 26791, 13, 26791, 1330, 1635, 198, 6738, 28034, 1330, 299, 77, 198, 1174...
3.61039
77
import json from os.path import getmtime from threading import Thread from time import sleep from pyswip import Prolog from telegram.bot import Bot from telegram.ext import CommandHandler from telegram.ext import MessageHandler, Filters from telegram.ext import Updater from telegram.utils.request import Requ...
[ 11748, 33918, 201, 198, 6738, 28686, 13, 6978, 1330, 651, 76, 2435, 201, 198, 6738, 4704, 278, 1330, 14122, 201, 198, 6738, 640, 1330, 3993, 201, 198, 201, 198, 6738, 279, 893, 86, 541, 1330, 1041, 6404, 201, 198, 6738, 573, 30536, ...
3.529915
117
import requests import json from lxml.html import fromstring from chp6.login import login, parse_form COUNTRY_OR_DISTRICT_URL = 'http://example.python-scraping.com/edit/United-Kingdom-233' VIEW_URL = 'http://example.python-scraping.com/view/United-Kingdom-233' if __name__ == '__main__': add_population()
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 300, 19875, 13, 6494, 1330, 422, 8841, 198, 6738, 442, 79, 21, 13, 38235, 1330, 17594, 11, 21136, 62, 687, 198, 198, 34, 19385, 40405, 62, 1581, 62, 26288, 5446, 18379, 62, 21886, 796, 705, ...
2.79646
113
""" Train an initial model to compute non-IID client datasets based on the latent representations of samples. """ import numpy as np import pickle import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset, DataLoader, SubsetRandomSampler from torchvision.models import vgg11_bn...
[ 37811, 198, 44077, 281, 4238, 2746, 284, 24061, 1729, 12, 40, 2389, 5456, 40522, 1912, 319, 262, 41270, 24612, 286, 8405, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 198, 11748, 28034, 198, 11748, 280...
2.212396
1,323
A, B, C, D = input().split(" ") n1, n2, n3, n4 = float(A), float(B), float(C), float(D) estado = str("") media_final = False teste = 0 media = (n1 * 2 + n2 * 3 + n3 * 4 + n4 * 1) / (2 + 3 + 4 + 1) print(f"Media: {media:.1f}") if media >= 7: estado = "Aluno aprovado." elif media < 5: estado = "Aluno reprovado." ...
[ 32, 11, 347, 11, 327, 11, 360, 796, 5128, 22446, 35312, 7203, 366, 8, 198, 77, 16, 11, 299, 17, 11, 299, 18, 11, 299, 19, 796, 12178, 7, 32, 828, 12178, 7, 33, 828, 12178, 7, 34, 828, 12178, 7, 35, 8, 198, 395, 4533, 796, ...
2.083077
325
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Main suite tests for the Atom renderer. """ import logging import os import pytest import editor_python_test_tool...
[ 37811, 198, 15269, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 1890, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 198, 4303, 36227, 12, 34156, 12, 3323...
2.445055
3,822
# The MIT License (MIT) # # Copyright (c) 2013 Brad Ruderman # Copyright (c) 2014 Paul Colomiets # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limit...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 8114, 17421, 2224, 198, 2, 15069, 357, 66, 8, 1946, 3362, 1623, 12753, 1039, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 28...
3.535632
435
# Standard modules import numpy as np import random import pandas as pd from flask import Flask, request, render_template # Scikit Learn modules from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import RandomizedSearchCV from sklearn.pipeline import Pipeline from sklearn.preprocessing im...
[ 2, 8997, 13103, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 8543, 62, 28243, 198, 198, 2, 10286, 15813, 14365, 13103, 198, 6738, 1341, 35720, ...
3.214634
205
n=int(input()) sum=0.0 for i in range(1,n+1): sum += float(float(i)/(i+1)) print(sum)
[ 77, 28, 600, 7, 15414, 28955, 198, 16345, 28, 15, 13, 15, 198, 1640, 1312, 287, 2837, 7, 16, 11, 77, 10, 16, 2599, 198, 220, 220, 220, 2160, 15853, 12178, 7, 22468, 7, 72, 20679, 7, 72, 10, 16, 4008, 198, 4798, 7, 16345, 8, ...
1.914894
47
""" @Author : dilless @Time : 2018/6/25 22:46 @File : paper_download.py """ import os import re from datetime import datetime import MySQLdb from selenium import webdriver from selenium.common.exceptions import NoSuchElementException if __name__ == '__main__': db = MySQLAccess() down = DownloadPape...
[ 37811, 198, 198, 31, 13838, 220, 1058, 288, 359, 408, 198, 31, 7575, 220, 220, 220, 1058, 2864, 14, 21, 14, 1495, 2534, 25, 3510, 198, 31, 8979, 220, 220, 220, 1058, 3348, 62, 15002, 13, 9078, 198, 37811, 198, 11748, 28686, 198, 1...
2.484375
192
from api.strings import id_key, type_key, name_key from api.ver1.offices.strings import loc_gov_type, mca, state_type, gov, leg_type, prezzo, fed_type, sen political_offices = [ { id_key: 1, type_key: loc_gov_type, name_key: mca}, { id_key: 2, type_key: state_type, name_key: prezzo }, { id_key: 3, type_key: fed_type, ...
[ 6738, 40391, 13, 37336, 1330, 4686, 62, 2539, 11, 2099, 62, 2539, 11, 1438, 62, 2539, 198, 6738, 40391, 13, 332, 16, 13, 2364, 1063, 13, 37336, 1330, 1179, 62, 9567, 62, 4906, 11, 285, 6888, 11, 1181, 62, 4906, 11, 467, 85, 11, ...
2.503226
155
import radio import random from microbit import display, Image, button_a, sleep # Création de la liste "flash" contenant les images de l'animation # Comprends-tu comment ça fonctionne ? flash = [Image().invert()*(i/9) for i in range(9, -1, -1)] # La radio ne marchera pas sauf si on l'allume ! radio.on() # Boucle évé...
[ 11748, 5243, 198, 11748, 4738, 198, 6738, 4580, 2545, 1330, 3359, 11, 7412, 11, 4936, 62, 64, 11, 3993, 198, 198, 2, 3864, 2634, 341, 390, 8591, 1351, 68, 366, 34167, 1, 542, 268, 415, 10287, 4263, 390, 300, 6, 11227, 341, 198, 2,...
2.384988
413
from otree.api import * doc = """ Random number of rounds for multiplayer (random stopping rule) """ # PAGES page_sequence = [MyPage, ResultsWaitPage, Results]
[ 6738, 267, 21048, 13, 15042, 1330, 1635, 628, 198, 15390, 796, 37227, 198, 29531, 1271, 286, 9196, 329, 16913, 357, 25120, 12225, 3896, 8, 198, 37811, 628, 628, 628, 198, 198, 2, 350, 25552, 628, 628, 198, 7700, 62, 43167, 796, 685, ...
3.326923
52
import csv import math training_dataset = [] training_labels = [] test_dataset = [] test_labels = [] # Populate training and test sets with open('iris_training.csv', 'rU') as csvfile: spamreader = csv.reader(csvfile, delimiter=',', dialect=csv.excel_tab) for row in spamreader: training_dataset.append([ float...
[ 11748, 269, 21370, 198, 11748, 10688, 198, 198, 34409, 62, 19608, 292, 316, 796, 17635, 198, 34409, 62, 23912, 1424, 796, 17635, 198, 198, 9288, 62, 19608, 292, 316, 796, 17635, 198, 9288, 62, 23912, 1424, 796, 17635, 198, 198, 2, 809...
2.672727
385
# # PySNMP MIB module Wellfleet-DVMRP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-DVMRP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:33:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 3894, 33559, 12, 35, 53, 13599, 47, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, ...
2.390165
17,021
import os import json import requests from bs4 import BeautifulSoup as bs from googlesearch import search
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 198, 6738, 467, 519, 829, 3679, 1330, 2989, 628, 198 ]
3.6
30
# -*- coding: utf-8 -*- ############################################################################ # # Copyright © 2016 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this dis...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 198, 2, 198, 2, 15069, 10673, 1584, 7467, 38, 14459, 13, 3262, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 378...
3.911111
225
#!/usr/bin/env python from __future__ import division import rospy from ros_abstraction import IkController from geometry_msgs.msg import Point, Vector3 from std_msgs.msg import ColorRGBA from visualization_msgs.msg import Marker if __name__ == "__main__": LegPositionReader()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 686, 2777, 88, 198, 6738, 686, 82, 62, 397, 301, 7861, 1330, 32840, 22130, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 6252...
3.177778
90
# 学号:1827402013 # 姓名:司诺男 # IP:192.168.157.154 # 上传时间:2018/11/12 15:02:21 import math if __name__=="__main__": pass
[ 171, 119, 123, 2, 220, 10263, 255, 99, 20998, 115, 25, 1507, 1983, 1821, 6390, 201, 198, 2, 220, 10263, 100, 241, 28938, 235, 25, 20998, 116, 46237, 118, 18796, 115, 201, 198, 2, 220, 6101, 25, 17477, 13, 14656, 13, 18458, 13, 215...
1.419355
93
# == CRS settings == # CRS = {'init': 'epsg:4326'} # == KEYS == # # geopandas geometry key GPD_GEO_KEY = "geometry" # graph keys NODE_TYPE_KEY = "nodetype" EDGE_COST_KEY = "cost" EDGE_LENGTH_KEY = "length" SOLUTION_POWER_FLOW_KEY = "flow" NODE_ELEVATION_KEY = "z" ORIGINAL_EDGE_KEY = "original_edge" PIPE_DIAMETER_KEY ...
[ 2, 6624, 327, 6998, 6460, 6624, 1303, 198, 34, 6998, 796, 1391, 6, 15003, 10354, 705, 25386, 70, 25, 3559, 2075, 6, 92, 198, 198, 2, 6624, 47134, 16309, 6624, 1303, 198, 2, 30324, 392, 292, 22939, 1994, 198, 38, 5760, 62, 38, 4720...
2.211051
1,104
"""Main module.""" # ! /usr/bin/env python # # python I2C # # (C)2020 Aleksandr Saiapin <alstutor@gmail.com> # (C)2006 Patrick Nomblot <pyI2C@nomblot.org> # this is distributed under a free software license, see license.txt import time from typing import List from pyi2c.protocol import I2CProtocol I2C_REGISTER_WRITE...
[ 37811, 13383, 8265, 526, 15931, 198, 2, 5145, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 21015, 314, 17, 34, 198, 2, 198, 2, 357, 34, 8, 42334, 9300, 591, 46273, 25251, 499, 259, 1279, 282, 301, 38409, 31, 14816, 13,...
2.604478
134
from datetime import datetime, timedelta import numpy as np from ..api.sqlalchemy_declarative import ouraSleepSummary, ouraReadinessSummary, withings, athlete, stravaSummary, \ strydSummary, fitbod, workoutStepLog, dbRefreshStatus from sqlalchemy import func, cast, Date from sweat.io.models.dataframes import Workou...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11485, 15042, 13, 25410, 282, 26599, 62, 32446, 283, 876, 1330, 674, 64, 40555, 22093, 11, 674, 64, 5569, 1272, 22093, 11, 351, 654, ...
1.913225
9,081
from flask import Flask, jsonify from OpenSSL import SSL app = Flask(__name__) context = SSL.Context(SSL.TLSv1_1_METHOD) context.use_privatekey_file("server.key") context.use_certificate_file("server.crt") @app.route("/") @app.route("/data") if __name__ == "__main__": app.run(ssl_context=context)
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 198, 6738, 4946, 31127, 1330, 25952, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 22866, 796, 25952, 13, 21947, 7, 31127, 13, 51, 6561, 85, 16, 62, 16, 62, 49273, 8, 198, 22866, ...
2.663793
116
#!/usr/bin/env python """ moveit_fk_demo.py - Version 0.1.1 2015-08-26 Use forward kinemtatics to move the arm to a specified set of joint angles Copyright 2014 by Patrick Goebel <patrick@pirobot.org, www.pirobot.org> Copyright 2015 by YS Pyo <passionvirus@gmail.com> This program is free softwar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 220, 220, 220, 1445, 270, 62, 69, 74, 62, 9536, 78, 13, 9078, 532, 10628, 657, 13, 16, 13, 16, 1853, 12, 2919, 12, 2075, 628, 220, 220, 220, 5765, 2651, 479, 774...
2.939153
378
from flask import render_template from app import app, cache import app.views as v @app.route('/') @app.route('/index')
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 598, 1330, 598, 11, 12940, 198, 11748, 598, 13, 33571, 355, 410, 628, 628, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 198, 31, 1324, 13, 38629, 10786, 14, 9630, 11537, 198 ]
3.1
40
from .model_selection import time_series_splitter, cv_forecaster, backtesting_forecaster, grid_search_forecaster, random_search_forecaster, bayesian_search_forecaster
[ 6738, 764, 19849, 62, 49283, 1330, 640, 62, 25076, 62, 22018, 1967, 11, 269, 85, 62, 754, 17970, 11, 736, 33407, 62, 754, 17970, 11, 10706, 62, 12947, 62, 754, 17970, 11, 4738, 62, 12947, 62, 754, 17970, 11, 15489, 35610, 62, 12947,...
3.608696
46
import os from utils.config import opt_train,opt_test from data.datasets import load_dataset from noise2noise import Noise2Noise if __name__ == '__main__': os.environ['CUDA_VISIBLE_DEVICES'] = '1' # 选择哪块GPU运行 '0' or '1' or '0,1' #训练 # train() # 测试单张图片,将结果保存到文件夹下 test()
[ 11748, 28686, 198, 6738, 3384, 4487, 13, 11250, 1330, 2172, 62, 27432, 11, 8738, 62, 9288, 198, 6738, 1366, 13, 19608, 292, 1039, 1330, 3440, 62, 19608, 292, 316, 198, 6738, 7838, 17, 3919, 786, 1330, 30964, 17, 2949, 786, 628, 198, ...
1.701149
174
import requests url = 'http://localhost:5050/predict' body = { "text": "The insurance company is evil!" } response = requests.post(url, data=body) print(response.json())
[ 11748, 7007, 198, 198, 6371, 796, 705, 4023, 1378, 36750, 25, 1120, 1120, 14, 79, 17407, 6, 198, 198, 2618, 796, 1391, 198, 220, 220, 220, 366, 5239, 1298, 366, 464, 5096, 1664, 318, 6181, 2474, 198, 92, 198, 198, 26209, 796, 7007, ...
2.95
60
import random from typing import Any, Callable, List class RandomChoiceCompose: """ Randomly choose to apply one transform from a collection of transforms. """
[ 11748, 4738, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 7343, 628, 198, 4871, 14534, 46770, 7293, 577, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14534, 306, 3853, 284, 4174, 530, 6121, 422, 257, 4947, 286, 31408, 13, ...
3.625
48
from rfeed import *
[ 6738, 374, 12363, 1330, 1635, 628, 198 ]
3.142857
7
import os import numpy as np import pickle import lz4.frame import cv2 import pandas as pd pd.set_option('display.max_rows', 50) pd.set_option('display.max_columns', 100) pd.set_option('display.width', 1000) # Custom import from werdich_cfr.tfutils.TFRprovider import Dset from werdich_cfr.utils.processing import Vide...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 300, 89, 19, 13, 14535, 198, 11748, 269, 85, 17, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 30094, 13, 2617, 62, 18076, 10786, 13812, 13, 9806, ...
1.981461
3,560
import numpy as np inp1 = """<x=-1, y=0, z=2> <x=2, y=-10, z=-7> <x=4, y=-8, z=8> <x=3, y=5, z=-1>""" # moons 'Io', 'Europa', 'Ganymede', 'Callisto' # unit test part1 moons = parse_input(inp1) assert np.allclose(moons['Io'], np.array([-1, 0, 2])) velocities = {key: np.array([0, 0, 0]) for key in moons} if False...
[ 11748, 299, 32152, 355, 45941, 198, 198, 259, 79, 16, 796, 37227, 27, 87, 10779, 16, 11, 331, 28, 15, 11, 1976, 28, 17, 29, 198, 27, 87, 28, 17, 11, 331, 10779, 940, 11, 1976, 10779, 22, 29, 198, 27, 87, 28, 19, 11, 331, 107...
2.320856
935
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Sep 21 12:56:48 2019 @author: salim """ import os import pandas as pd import numpy as np import matplotlib.pyplot as plt os.chdir('/Users/salim/Desktop/EDEM/Python/Code') a11 = pd.read_csv ('rentals_weather_2011.csv', sep=',', decimal='.') a12 = pd....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 8621, 2310, 1105, 25, 3980, 25, 2780, 13130, 198, 198, 31, 9800, 25, 3664, 320, 198...
2.151361
588
with open("input.txt") as x: lines = x.read().splitlines() pairs = {"(": ")", "{": "}", "<": ">", "[": "]"} points = {")": 1, "]": 2, "}": 3, ">": 4} context = [] p_array = [] p = 0 corrupted = False for l in lines: context = [] corrupted = False p = 0 for char in l: if char in pairs.keys...
[ 4480, 1280, 7203, 15414, 13, 14116, 4943, 355, 2124, 25, 198, 220, 220, 220, 3951, 796, 2124, 13, 961, 22446, 35312, 6615, 3419, 198, 198, 79, 3468, 796, 1391, 18109, 1298, 366, 42501, 45144, 1298, 366, 92, 1600, 33490, 1298, 366, 29,...
1.96401
389
#!/usr/bin/env python3.8 # Copyright 2020 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys if __name__ == '__main__': print(os.path.isdir(sys.argv[1]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 23, 198, 198, 2, 15069, 12131, 383, 376, 37533, 544, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, ...
2.935484
93
# -*- coding:utf-8 -*- import sys from github import Github reload(sys) sys.setdefaultencoding('utf-8') # var legendData = ['linary', 'zhangyi', 'javame']; # var seriesData = [{name: 'linary', value: 2}, {name: 'zhangyi', value: 3},{name: 'javame', value: 4}]; # var selected = {'linary': true, 'zhangyi': true...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 198, 6738, 33084, 1330, 38994, 198, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 10786, 40477, 12, 23, 11537, 628, 198, 19...
2.256691
822
# -*- coding: utf-8 -*- from . import op_student from . import op_admission from . import account_invoice
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 1330, 1034, 62, 50139, 198, 6738, 764, 1330, 1034, 62, 324, 3411, 198, 6738, 764, 220, 1330, 1848, 62, 16340, 2942 ]
2.815789
38
import numpy as np from multiagent_envs.multiagent.core import World, Agent, Landmark, Hole, Snack, Obstacle from multiagent_envs.multiagent.scenario import BaseScenario import pdb from vars import pargs import math #from train import past import random from a2c_ppo_acktr.arguments import get_args
[ 11748, 299, 32152, 355, 45941, 198, 6738, 5021, 25781, 62, 268, 14259, 13, 41684, 25781, 13, 7295, 1330, 2159, 11, 15906, 11, 6379, 4102, 11, 24478, 11, 5489, 441, 11, 46378, 6008, 198, 6738, 5021, 25781, 62, 268, 14259, 13, 41684, 25...
3.333333
90