content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# pylint:disable=unused-variable # pylint:disable=unused-argument # pylint:disable=redefined-outer-name import json import shutil import urllib.request from pathlib import Path from typing import Dict import pytest import docker import jsonschema import yaml # HELPERS # FIXTURES @pytest.fixture(scope="function"...
[ 2, 279, 2645, 600, 25, 40223, 28, 403, 1484, 12, 45286, 198, 2, 279, 2645, 600, 25, 40223, 28, 403, 1484, 12, 49140, 198, 2, 279, 2645, 600, 25, 40223, 28, 445, 18156, 12, 39605, 12, 3672, 198, 198, 11748, 33918, 198, 11748, 4423,...
2.890625
128
from setuptools import setup descr = """h5cat: Quick preview of hdf5 files Quickly check the contents of multiple hdf5 files. Usage: `h5cat -h` `h5cat path/to/hdffiles/*.h5` Note: h5cat is no longer maintained. For similar functionality, see h5glance at https://pypi.org/project/h5glance/#description """ DISTNAME ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 20147, 81, 796, 37227, 71, 20, 9246, 25, 12029, 12714, 286, 289, 7568, 20, 3696, 198, 198, 21063, 306, 2198, 262, 10154, 286, 3294, 289, 7568, 20, 3696, 13, 29566, 25, 198, 198, 63, 71,...
2.067019
567
import datetime as dt import sys import typing as tp from loguru import logger from motor.motor_asyncio import AsyncIOMotorClient from .Unit import Unit def _get_database_client(mongo_connection_uri: str) -> AsyncIOMotorClient: """Get MongoDB connection url""" try: db_client = AsyncIOMotorClient(mon...
[ 11748, 4818, 8079, 355, 288, 83, 198, 11748, 25064, 198, 11748, 19720, 355, 256, 79, 198, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 5584, 13, 76, 20965, 62, 292, 13361, 952, 1330, 1081, 13361, 40, 2662, 20965, 11792, 198, 198, 6...
2.543071
267
import pytest import sys import agent as agent import lux.game as g import lux.game_objects as go import lux.game_map as gm import lux.constants as c from collections import deque """ [WARN] (match_NF4VsaRK1hf9) - Agent 0 sent malformed command: 'rp 0 0' <- research points (player id, num) [WARN] (match_NF4VsaRK1hf9)...
[ 11748, 12972, 9288, 198, 11748, 25064, 198, 11748, 5797, 355, 5797, 198, 11748, 10632, 13, 6057, 355, 308, 198, 11748, 10632, 13, 6057, 62, 48205, 355, 467, 198, 11748, 10632, 13, 6057, 62, 8899, 355, 308, 76, 198, 11748, 10632, 13, 9...
2.404688
640
import datetime import pandas as pd import numpy as np import matplotlib.pyplot as plt from time import * program_begin = time() # a=pd.DataFrame(pd.date_range("2022-2-14 0:0:02","2022-2-15 23:59:58",freq='2S')) workdir = r"C:\Users\zyhly\Downloads\mydata" df = pd.read_excel(f"{workdir}/a03_data.xlsx", index_...
[ 11748, 4818, 8079, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 640, 1330, 1635, 201, 198, 201, 198, 23065, 62, ...
1.883892
1,223
# SPDX-License-Identifier: MIT """NAND IO init.""" from .interface import NandIO __all__ = ["NandIO"]
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 37811, 45, 6981, 24418, 2315, 526, 15931, 198, 6738, 764, 39994, 1330, 399, 392, 9399, 198, 198, 834, 439, 834, 796, 14631, 45, 392, 9399, 8973, 198 ]
2.710526
38
""" File: Drawing Name: Johnson ---------------------- TODO: """ from campy.graphics.gobjects import GOval, GRect, GPolygon from campy.graphics.gwindow import GWindow if __name__ == '__main__': main()
[ 37811, 198, 8979, 25, 40027, 198, 5376, 25, 5030, 198, 19351, 438, 198, 51, 3727, 46, 25, 198, 37811, 198, 198, 6738, 1413, 88, 13, 70, 11549, 13, 70, 48205, 1330, 10351, 2100, 11, 10863, 478, 11, 14714, 3366, 14520, 198, 6738, 1413...
2.863014
73
from typing import Any, Dict, Optional, Type, TypeVar import warnings from .webviz_factory import WebvizFactory from .webviz_instance_info import WebvizInstanceInfo, WEBVIZ_INSTANCE_INFO T = TypeVar("T", bound=WebvizFactory) class WebvizFactoryRegistry: """Global registry for factories that allows the actual fa...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 11, 5994, 11, 5994, 19852, 198, 11748, 14601, 198, 198, 6738, 764, 12384, 85, 528, 62, 69, 9548, 1330, 5313, 85, 528, 22810, 198, 6738, 764, 12384, 85, 528, 62, 39098, 62, 10951, 133...
3.106227
546
# coding: utf-8 """ Author: Pham Duy Created date: 2020/08/05 """ # coding: utf-8 import numpy as np import random import torch import torch.nn as nn import torch.optim as optim from sklearn.metrics import roc_auc_score, accuracy_score, f1_score import torchtext import pandas as pd import datetime import os import sy...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 13838, 25, 1380, 321, 360, 4669, 198, 41972, 3128, 25, 12131, 14, 2919, 14, 2713, 198, 37811, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 47...
2.813149
289
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198 ]
3.576923
26
import uuid from datetime import datetime, timedelta from django.test import SimpleTestCase, TestCase from django.test.utils import override_settings import pytz from corehq.util.es.elasticsearch import ConnectionError from mock import MagicMock, patch from casexml.apps.case.const import CASE_ACTION_CREATE from case...
[ 11748, 334, 27112, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 11, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 13, 26791, 1330, 20957, 62, 33692, 198, ...
2.76886
1,246
''' Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algorithm to use less time and space. The input size may be as large as 5,000,000. '''
[ 7061, 6, 198, 11259, 281, 18253, 299, 11, 1441, 352, 532, 299, 287, 31191, 291, 17046, 1502, 13, 198, 198, 1890, 1672, 11, 1813, 1511, 11, 1441, 25, 685, 16, 11, 940, 11, 1157, 11, 1065, 11, 1485, 11, 17, 11, 18, 11, 19, 11, 2...
2.747126
87
# 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 to in...
[ 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.448029
279
import pytest from flask import current_app from flask_bootstrap import ( VERSION_BOOTSTRAP, VERSION_JQUERY, VERSION_POPPER, BOOTSTRAP_CSS_INTEGRITY, BOOTSTRAP_JS_INTEGRITY, JQUERY_INTEGRITY, POPPER_INTEGRITY ) @pytest.mark.usefixtures('client')
[ 11748, 12972, 9288, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 62, 18769, 26418, 1330, 357, 198, 220, 220, 220, 44156, 2849, 62, 8202, 2394, 18601, 2969, 11, 44156, 2849, 62, 41, 10917, 19664, 11, 44156, 2849, 62, 47, 3...
2.385321
109
from django.shortcuts import redirect, render from django.core import mail from django.views.generic import CreateView from .forms import CreationForm
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 11, 8543, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 13610, 7680, 198, 198, 6738, 764, 23914, 1330, 21582, 8479, 628 ]
4.026316
38
from .. import PropertyCalculation, LivePropertyCalculation import numpy as np from tangos import get_halo
[ 6738, 11485, 1330, 14161, 9771, 14902, 11, 7547, 21746, 9771, 14902, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 13875, 418, 1330, 651, 62, 71, 7335, 628 ]
4
27
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.009434
848
# Generated by Django 3.1.3 on 2020-12-03 11:12 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1065, 12, 3070, 1367, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import argparse import logging import signal import sys from pathlib import Path from aiohttp import web from factorio_status_ui.state import application_config from factorio_status_ui.web import setup_routes, setup_templates, start_background_tasks, cleanup_background_tasks, \ get_version if __name__ == '__ma...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 6737, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 5766, 952, 62, 13376, 62, 9019, 13, 5219, 1330, 3586, 62, 11250,...
3.219048
105
import io import numpy as np # Read embeddings to a numpy array and word2id dictionary # Normalize embeddings # Read lines from .txt file into a list of lists of words
[ 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 4149, 11525, 67, 654, 284, 257, 299, 32152, 7177, 290, 1573, 17, 312, 22155, 628, 198, 2, 14435, 1096, 11525, 67, 654, 628, 198, 2, 4149, 3951, 422, 764, 14116, 2393, 65...
3.48
50
from collections import Counter from typing import Callable, Union import numpy as np from rdkit import Chem from dglt.data.featurization.mol2features import register_features_generator from third_party.descriptastorus.descriptors import rdDescriptors Molecule = Union[str, Chem.Mol] FeaturesGenerator = Callable[[Mol...
[ 6738, 17268, 1330, 15034, 198, 6738, 19720, 1330, 4889, 540, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 374, 67, 15813, 1330, 12870, 198, 198, 6738, 288, 70, 2528, 13, 7890, 13, 5036, 2541, 1634, 13, 43132, 17, 4089...
2.099093
1,544
from ...source.source import Sources from ...base import field FIELD_SOURCES = field( "Sources for loading and saving", default_factory=lambda: Sources(), labeled=True, )
[ 6738, 2644, 10459, 13, 10459, 1330, 26406, 198, 6738, 2644, 8692, 1330, 2214, 628, 198, 44603, 62, 50, 2606, 7397, 1546, 796, 2214, 7, 198, 220, 220, 220, 366, 21188, 329, 11046, 290, 8914, 1600, 198, 220, 220, 220, 4277, 62, 69, 95...
3.135593
59
from requests import get from requests import RequestException from collections import OrderedDict from contextlib import closing import os import logging from .file import FileUtil from datetime import date import json os.chdir(os.getcwd()) def simple_get(url): """ Attempts to get the content at `url` by m...
[ 6738, 7007, 1330, 651, 198, 6738, 7007, 1330, 19390, 16922, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4732, 8019, 1330, 9605, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 764, 7753, 1330, 9220, 18274, 346, 198, 6738, ...
2.831025
361
import logging import os from typing import Dict, IO, Iterable, Union import pyteomics.mzxml import spectrum_utils.spectrum as sus from lxml.etree import LxmlError logger = logging.getLogger('falcon') def get_spectra(source: Union[IO, str]) -> Iterable[sus.MsmsSpectrum]: """ Get the MS/MS spectra from the ...
[ 11748, 18931, 198, 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 11, 24418, 11, 40806, 540, 11, 4479, 198, 198, 11748, 12972, 660, 31994, 13, 76, 89, 19875, 198, 11748, 10958, 62, 26791, 13, 4443, 6582, 355, 2341, 198, 6738, 300, 19...
2.268595
968
from math import ceil from django import http from rest_framework.pagination import PageNumberPagination from rest_framework.viewsets import ModelViewSet from rest_framework.decorators import action from person.models import Post, Reply, ForumCategory, Person from person.serializers import PostSerializer, LogicalDele...
[ 6738, 10688, 1330, 2906, 346, 198, 198, 6738, 42625, 14208, 1330, 2638, 198, 6738, 1334, 62, 30604, 13, 79, 363, 1883, 1330, 7873, 15057, 47, 363, 1883, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 198, 6738, 1...
4.176
125
if __name__ == "__main__": main()
[ 628, 198, 220, 220, 220, 220, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 220 ]
1.88
25
################################################################################################## # # The MIT License (MIT) # # Peter Moss Acute Myeloid Leukemia Research Project # Copyright (C) 2018 Adam Milton-Barker (AdamMiltonBarker.com) # # Permission is hereby granted, free of charge, to any person obtaining a...
[ 29113, 29113, 29113, 2235, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 220, 198, 2, 5613, 19935, 4013, 1133, 2011, 417, 1868, 1004, 43505, 4992, 4935, 198, 2, 15069, 357, 34, 8, 2864, 7244, 30979, 12, 33, 668, 263, 3...
3.892606
568
# Generated by Django 3.2.8 on 2021-11-15 04:55 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 1157, 12, 1314, 8702, 25, 2816, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# import the necessary package from app.main import db from app.main.service.user_service import get_a_user from app.main.model.tokens import Token from datetime import datetime def check_token(access_token): """check if the token is opened""" token = Token.check_opened_token_by_token(access_token) if tok...
[ 2, 1330, 262, 3306, 5301, 198, 198, 6738, 598, 13, 12417, 1330, 20613, 198, 6738, 598, 13, 12417, 13, 15271, 13, 7220, 62, 15271, 1330, 651, 62, 64, 62, 7220, 198, 6738, 598, 13, 12417, 13, 19849, 13, 83, 482, 641, 1330, 29130, 19...
2.405405
296
import torch from .constants import a0 def elec_energy_isolated_atom(const, Z, uss, upp, gss, gpp, gsp, gp2, hsp): """ electrionc energy for a single atom #eisol in block.f or in calpar.f return Eiso, shape (natoms,) """ Eiso = uss*const.ussc[Z] \ + upp*const.uppc[Z] \ + gss...
[ 11748, 28034, 198, 6738, 764, 9979, 1187, 1330, 257, 15, 198, 198, 4299, 9766, 66, 62, 22554, 62, 30152, 515, 62, 37696, 7, 9979, 11, 1168, 11, 514, 82, 11, 334, 381, 11, 308, 824, 11, 308, 381, 11, 308, 2777, 11, 27809, 17, 11,...
2.126214
2,060
######################################################### # 2020-01-23 12:41:37 # AI # ins: XRL A, @Ri ######################################################### from .common.INS_XXX_A_Ri import XXX_A_Ri from ..asmconst import * p = XRL_A_Ri().gen(0, 15, 1)
[ 29113, 14468, 7804, 2, 198, 2, 12131, 12, 486, 12, 1954, 1105, 25, 3901, 25, 2718, 198, 2, 9552, 198, 2, 1035, 25, 1395, 7836, 317, 11, 2488, 49, 72, 198, 29113, 14468, 7804, 2, 198, 198, 6738, 764, 11321, 13, 20913, 62, 43145, ...
2.913043
92
# -*- coding: utf-8 -*- """A handful of integration tests to check for idiomatic use cases that we want make sure are as convinient as possible for users. """ from . import _unittest as unittest import math import datetime import datatest try: import squint except ImportError: squint = None try: import pa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 32, 10089, 286, 11812, 5254, 284, 2198, 329, 46205, 13730, 779, 2663, 198, 5562, 356, 765, 787, 1654, 389, 355, 9120, 1153, 355, 1744, 329, 2985, 13, 198, 37811, ...
2.625171
731
"""The tests for day03.""" from days import day03 from ddt import ddt, data, unpack import unittest import helpers @ddt
[ 37811, 464, 5254, 329, 1110, 3070, 526, 15931, 198, 6738, 1528, 1330, 1110, 3070, 198, 6738, 288, 28664, 1330, 288, 28664, 11, 1366, 11, 555, 8002, 198, 11748, 555, 715, 395, 198, 11748, 49385, 628, 198, 31, 1860, 83, 198 ]
3.05
40
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 2211, 438, 11, 629, 1134, 270, 12, 65, 952, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, ...
2.922614
2,494
"""This is the command line interface to the master. """ import os import os.path import sys from optparse import OptionParser import logging from logging.handlers import RotatingFileHandler logger = logging.getLogger(__name__) from master import * import defs try: import datablox_engage_adapter.file_locator usin...
[ 37811, 1212, 318, 262, 3141, 1627, 7071, 284, 262, 4958, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 11748, 18931, 198, 6738, 18931, 13, 4993, 8116, ...
2.568093
771
#!/usr/bin/env python3 import os import re import requests # Inputs images_dir = "/home/student/supplier-data/images/" upload_url = "http://xxx.xxx.xxx.xxx/upload/" # Get a list of paths of all .jpeg files in directory file_list = os.listdir(images_dir) jpeg_paths = [images_dir + item for item in file_list if bool(r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 7007, 198, 198, 2, 23412, 82, 198, 17566, 62, 15908, 796, 12813, 11195, 14, 50139, 14, 18608, 2505, 12, 7890, 14, 17566, 30487, 198,...
2.803109
193
import random import objs import utils #manh only
[ 11748, 4738, 201, 198, 201, 198, 11748, 909, 8457, 201, 198, 11748, 3384, 4487, 220, 201, 198, 201, 198, 220, 220, 220, 1303, 805, 71, 691, 201, 198 ]
2.25
28
import FWCore.ParameterSet.Config as cms run3_RPC = cms.Modifier()
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 5143, 18, 62, 49, 5662, 796, 220, 269, 907, 13, 5841, 7483, 3419, 628 ]
2.592593
27
import os from mock import patch from cloudify_rest_client import deployments from ... import local from .test_base import CliCommandTest from ...constants import DEFAULT_UNINSTALL_WORKFLOW, \ DEFAULT_TIMEOUT, DEFAULT_PARAMETERS from .constants import BLUEPRINTS_DIR, DEFAULT_BLUEPRINT_FILE_NAME
[ 11748, 28686, 198, 198, 6738, 15290, 1330, 8529, 198, 198, 6738, 6279, 1958, 62, 2118, 62, 16366, 1330, 40854, 198, 198, 6738, 2644, 1330, 1957, 198, 6738, 764, 9288, 62, 8692, 1330, 1012, 72, 21575, 14402, 198, 6738, 2644, 9979, 1187, ...
3.134021
97
# Simple GPS datalogging demonstration. # This example uses the GPS library and to read raw NMEA sentences # over I2C or UART from the GPS unit and dumps them to a file on an SD card # (recommended), microcontroller internal storage (be careful as only a few # kilobytes are available), or to a filesystem. # If you...
[ 2, 17427, 15472, 4818, 11794, 2667, 13646, 13, 201, 198, 2, 770, 1672, 3544, 262, 15472, 5888, 290, 284, 1100, 8246, 399, 11682, 32, 13439, 201, 198, 2, 625, 314, 17, 34, 393, 471, 7227, 422, 262, 15472, 4326, 290, 45514, 606, 284, ...
3.003861
1,036
from graph_editor import GraphEditor from category_object import CategoryObject from category_arrow import CategoryArrow from qt_tools import simpleMaxContrastingColor, Pen, firstParentGfxItemOfType from PyQt5.QtGui import QTransform from PyQt5.QtWidgets import QMenu import re from PyQt5.QtCore import Qt from g...
[ 6738, 4823, 62, 35352, 1330, 29681, 17171, 201, 198, 6738, 6536, 62, 15252, 1330, 21743, 10267, 201, 198, 6738, 6536, 62, 6018, 1330, 21743, 3163, 808, 201, 198, 6738, 10662, 83, 62, 31391, 1330, 2829, 11518, 4264, 5685, 278, 10258, 11,...
3.466667
150
from contextlib import contextmanager from mock import patch from mock import DEFAULT import six import time from threading import Event @contextmanager
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 15290, 1330, 8529, 198, 6738, 15290, 1330, 5550, 38865, 198, 11748, 2237, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 8558, 198, 198, 31, 22866, 37153, 198 ]
4.4
35
import data_preparation from bokeh.models import ColumnDataSource, BooleanFilter, CDSView from bokeh.plotting import figure from bokeh.io import curdoc from bokeh.palettes import Category20c from bokeh.models.formatters import NumeralTickFormatter from bokeh.models.widgets import ( Panel, Tabs, DataTable, TableColu...
[ 11748, 1366, 62, 3866, 1845, 341, 198, 6738, 1489, 365, 71, 13, 27530, 1330, 29201, 6601, 7416, 11, 41146, 22417, 11, 327, 5258, 7680, 198, 6738, 1489, 365, 71, 13, 29487, 889, 1330, 3785, 198, 6738, 1489, 365, 71, 13, 952, 1330, 10...
2.510082
1,835
# Importing the libraries import matplotlib.pyplot as plt import torch from torch.autograd import Variable import numpy as np from collections import namedtuple, deque #This step/experience includes the state of game, action performed, the reward for the state # whether the game had ended after this state and the LSTM...
[ 2, 17267, 278, 262, 12782, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 3706, 83, 29291,...
3.707317
123
data = '22222120221222212222221122222222222222222222220222202222222222200222122222222222022220222220212222202022222202102022002212222222222022222220222222222222222120220222212222222222222222222222222222220222202222222222202222022222222222022221222221222222222022222222112122202202222222222222222221222222222222222020220...
[ 198, 7890, 796, 705, 1828, 23148, 10232, 1828, 1065, 1828, 21777, 1828, 1828, 2481, 1065, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1828, 1238, 1828, 17572, 1828, 1828, 1828, 1828, 1828, 2167, 1828, 21777, 1828, 1828, 1828, 18...
2.324708
6,686
from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from rest_framework.authtoken.models import Token # Create your models here. @receiver(post_save, sender='auth.User') @receiver(post_save, sender='auth.User')
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 1334, 62, 30604, 13, 18439, 30001, 13, 27530...
3.267442
86
# coding: utf-8 """ App::Netdisco No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 2.050003 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 2034, 3712, 7934, 67, 4861, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14, ...
2.099611
56,038
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 15069, 12131, 383, 23881, 32173, 46665, 13, 198, 2, 15069, 13130, 18111, 27862, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
3.285276
652
from .constants import * JSON_QUOTE = '"' JSON_WHITESPACE = [' ', '\t', '\b', '\n', '\r'] JSON_SYNTAX = [JSON_COMMA, JSON_COLON, JSON_LEFTBRACKET, JSON_RIGHTBRACKET, JSON_LEFTBRACE, JSON_RIGHTBRACE] FALSE_LEN = len('false') TRUE_LEN = len('true') NULL_LEN = len('null')
[ 6738, 764, 9979, 1187, 1330, 1635, 198, 198, 40386, 62, 10917, 23051, 796, 705, 30543, 198, 40386, 62, 12418, 2043, 1546, 47, 11598, 796, 37250, 46083, 705, 59, 83, 3256, 705, 59, 65, 3256, 705, 59, 77, 3256, 705, 59, 81, 20520, 198...
2.056738
141
""" boot.py file for Pico data logging example. If this file is present when the pico starts up, make the filesystem writeable by CircuitPython. """ import storage storage.remount("/", readonly=False)
[ 37811, 198, 18769, 13, 9078, 2393, 329, 350, 3713, 1366, 18931, 1672, 13, 1002, 428, 2393, 318, 1944, 618, 198, 1169, 279, 3713, 4940, 510, 11, 787, 262, 29905, 3551, 540, 416, 13588, 37906, 13, 198, 37811, 198, 11748, 6143, 198, 198,...
3.672727
55
"""Testing athenet.algorithm.derest.derivative functions. """ import numpy as np import theano import unittest from athenet.algorithm.derest.layers.fully_connected import d_fully_connected from athenet.algorithm.derest.layers.convolutional import d_conv from athenet.algorithm.derest.layers.pool import d_pool from ath...
[ 37811, 44154, 379, 831, 316, 13, 282, 42289, 13, 67, 1260, 13, 1082, 452, 876, 5499, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 262, 5733, 198, 11748, 555, 715, 395, 198, 198, 6738, 379, 831, 316, 13, 282, ...
2.902439
287
"""A module for housing the Cursor class. Exported Classes: Cursor -- Class for representing a database cursor. """ from collections import deque from .statement import Statement, PreparedStatement from .exception import Error, NotSupportedError, ProgrammingError class Cursor(object): """Class for represent...
[ 37811, 32, 8265, 329, 5627, 262, 327, 21471, 1398, 13, 198, 198, 3109, 9213, 38884, 25, 198, 198, 34, 21471, 1377, 5016, 329, 10200, 257, 6831, 23493, 13, 198, 198, 37811, 198, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 6738, 764, ...
2.501162
3,011
from .one import * from .two import * from .three import * properties = [PropertyOne, PropertyTwo, PropertyThree]
[ 6738, 764, 505, 1330, 1635, 198, 6738, 764, 11545, 1330, 1635, 198, 6738, 764, 15542, 1330, 1635, 198, 198, 48310, 796, 685, 21746, 3198, 11, 14161, 7571, 11, 14161, 12510, 60, 198 ]
3.59375
32
from logs import logDecorator as lD import json import numpy as np import torch from torch.nn import functional as F from lib.agents import qNetwork as qN import torch config = json.load(open('../config/config.json')) logBase = config['logging']['logBase'] + '.modules.tests.testPolicy' @lD.log( logBase + '.testA...
[ 6738, 17259, 1330, 2604, 10707, 273, 1352, 355, 300, 35, 220, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 6738, 9195, 13, 49638, 1330, 1066...
2.888889
126
map_template = ( ( (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0...
[ 8899, 62, 28243, 796, 357, 198, 220, 357, 198, 220, 220, 220, 357, 15, 11, 15, 11, 15, 11, 15, 11, 18, 11, 18, 11, 18, 11, 18, 11, 18, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 1...
1.023773
7,151
from tensordata.paper.WACV._wacv import *
[ 6738, 11192, 585, 1045, 13, 20189, 13, 54, 2246, 53, 13557, 86, 330, 85, 1330, 1635, 198 ]
2.470588
17
import numpu as np import scipy as sp import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import pdb
[ 11748, 299, 931, 84, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 279, 994...
2.818182
44
"""Connectivity and cut algorithms """ from networkx.algorithms.connectivity.connectivity import * from networkx.algorithms.connectivity.cuts import * from networkx.algorithms.connectivity.stoer_wagner import *
[ 37811, 13313, 3458, 290, 2005, 16113, 198, 37811, 198, 6738, 3127, 87, 13, 282, 7727, 907, 13, 8443, 3458, 13, 8443, 3458, 1330, 1635, 198, 6738, 3127, 87, 13, 282, 7727, 907, 13, 8443, 3458, 13, 23779, 1330, 1635, 198, 6738, 3127, ...
3.459016
61
import torch from torch import nn import torch.nn.functional as F import pytorch_lightning as pl
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 628 ]
3.5
28
from __future__ import annotations import os import typing as tp from time import time import httpx from loguru import logger from ..shared.config import config PINATA_ENDPOINT: str = "https://api.pinata.cloud" PINATA_API: str = config.pinata.pinata_api PINATA_SECRET_API: str = config.pinata.pinata_secret_api AUTH_...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 28686, 198, 11748, 19720, 355, 256, 79, 198, 6738, 640, 1330, 640, 198, 198, 11748, 2638, 87, 198, 6738, 2604, 14717, 1330, 49706, 198, 198, 6738, 11485, 28710, 13, 11250, 1330, 456...
2.70303
165
#### # custom ref handler # If the newref is the same as the oldref except the retrieved date is `days` newer, overwrite # the retrieved date is NOT `days` newer, keep the old ref # If the refs are different (in any other way), overwrite with new ref # #### from datetime i...
[ 4242, 198, 2, 2183, 1006, 21360, 198, 2, 1002, 262, 649, 5420, 318, 262, 976, 355, 262, 1468, 5420, 2845, 262, 29517, 3128, 318, 4600, 12545, 63, 15064, 11, 49312, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.235133
1,463
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ SPL conversion functions for scikit-maad Collection of miscelaneous functions that help to convert wav and volt data to Sound Pressure Level (SPL in Pascal) and Leq (Continuous Equivalent SPL) """ # # Authors: Juan Sebastian ULLOA <lisofomia@gmail.com> # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 46341, 11315, 5499, 329, 629, 1134, 270, 12, 2611, 324, 198, 36307, 286, 2984, 5276, 11655, 5499, 326, ...
2.424918
5,827
import unittest from vodem.api import total_time
[ 11748, 555, 715, 395, 198, 198, 6738, 410, 375, 368, 13, 15042, 1330, 2472, 62, 2435, 628 ]
3
17
from zeep import Client, Settings from zeep.transports import Transport from requests import Session
[ 6738, 41271, 538, 1330, 20985, 11, 16163, 201, 198, 6738, 41271, 538, 13, 7645, 3742, 1330, 19940, 201, 198, 6738, 7007, 1330, 23575, 201, 198, 201, 198, 201, 198, 201, 198 ]
3.548387
31
# # PySNMP MIB module UMSAOL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/UMSAOL-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:28:38 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 44352, 4090, 3535, 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, 67, 615, 47562, 19...
2.881649
9,438
# Copyright 2019 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, 13130, 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,...
3.386236
712
# Monarch Apartment Price Scraper # Monarch.py # Checks Monarch apartment webpages every hour to see if the prices have changed import bs4 import requests import smtplib import time # time between checks in seconds sleeptime = 3600 # generic network request function that returns an array of prices last_A4_Prices =...
[ 2, 41768, 5949, 1823, 7886, 1446, 38545, 198, 198, 2, 41768, 13, 9078, 198, 2, 47719, 41768, 7962, 3992, 31126, 790, 1711, 284, 766, 611, 262, 4536, 423, 3421, 198, 198, 11748, 275, 82, 19, 198, 11748, 7007, 198, 11748, 895, 83, 489...
2.495979
373
from .gameMap import GameMap from .lineMapFeatures import Road from .pointMapFeatures import Settlement, City from .tiles import Tile
[ 198, 6738, 764, 6057, 13912, 1330, 3776, 13912, 198, 6738, 764, 1370, 13912, 23595, 1330, 5567, 198, 6738, 764, 4122, 13912, 23595, 1330, 45404, 11, 2254, 198, 6738, 764, 83, 2915, 1330, 47870, 198 ]
3.970588
34
"""Fixes for CCSM4 model.""" import dask.array as da from ..fix import Fix from ..shared import round_coordinates from .bnu_esm import Cl as BaseCl Cl = BaseCl class Csoil(Fix): """Fixes for Csoil.""" def fix_data(self, cube): """Fix data. The data is not properly masked. This fix...
[ 37811, 22743, 274, 329, 327, 7902, 44, 19, 2746, 526, 15931, 198, 198, 11748, 288, 2093, 13, 18747, 355, 12379, 198, 198, 6738, 11485, 13049, 1330, 13268, 198, 6738, 11485, 28710, 1330, 2835, 62, 37652, 17540, 198, 6738, 764, 9374, 84, ...
2.25289
692
from types import GeneratorType from typing import List, Mapping, Union __all__ = [ 'clean_picard_style_value', 'snakecase_to_kebab_case', 'clean_picard_style_key', 'format_bedtools_params', 'format_bwa_params', 'format_dwgsim_params', 'format_fgbio_params', 'format_kraken_params', ...
[ 6738, 3858, 1330, 35986, 6030, 198, 6738, 19720, 1330, 7343, 11, 337, 5912, 11, 4479, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 27773, 62, 16564, 446, 62, 7635, 62, 8367, 3256, 198, 220, 220, 220, 705, 16184, 539, ...
2.314543
1,774
# # Copyright (C) 2016 Andrew Rodgers-Schatz <me@andrew.rs> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This p...
[ 2, 198, 2, 15069, 357, 34, 8, 1584, 6858, 19947, 12, 14874, 27906, 1279, 1326, 31, 392, 1809, 13, 3808, 29, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, ...
2.951128
798
#!/usr/bin/env python3 # coding: UTF-8 #--------------------------------------------------------------- # author:"Haxhimitsu" # date :"2021/01/06" # cite : # sample:python3 imgtrim_gui_ver.2.0.py --input_dir ../assets/original_img/cbn_test_01/ --output_dir ../assets/sample_output/ --trim_width 32 --trim_height 64 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 41002, 12, 23, 198, 198, 2, 47232, 24305, 198, 2, 1772, 11097, 39, 897, 38400, 19831, 1, 198, 2, 3128, 220, 1058, 1, 1238, 2481, 14, 486, 14, 3312, 1, 198, 2, ...
2.163127
1,177
# ----------------------------------------------------------------------------- # Copyright (C) 2019-2021 The python-ndn authors # # This file is part of python-ndn. # # 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 ...
[ 2, 16529, 32501, 198, 2, 15069, 357, 34, 8, 13130, 12, 1238, 2481, 383, 21015, 12, 358, 77, 7035, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 21015, 12, 358, 77, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, ...
4.304348
207
# Django settings for testproject project. from django.conf import settings settings.configure( ALLOWED_HOSTS=['*'], DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:' } }, ROOT_URLCONF='tests.test_urls', INSTALLED_APPS=( ...
[ 2, 37770, 6460, 329, 1332, 16302, 1628, 13, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 33692, 13, 11250, 495, 7, 198, 220, 220, 220, 11096, 3913, 1961, 62, 39, 10892, 50, 28, 17816, 9, 6, 4357, 198, 220, 220, 220, 3...
1.879397
398
import subprocess import os from glob import glob import cv2 # def printnow(s): # sys. tempdir= './temp_for_video' if os.path.exists(tempdir): print "Removing temp_for_video directory" subprocess.call('rm -rf {0}'.format(tempdir), shell=True) print "Creating temp_for_video directory" os.mkdir(tempdir) i...
[ 11748, 850, 14681, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 198, 11748, 269, 85, 17, 198, 198, 2, 825, 3601, 2197, 7, 82, 2599, 198, 220, 220, 220, 1303, 25064, 13, 198, 198, 29510, 15908, 28, 705, 19571, 29510, 62, 16...
2.297546
326
from fowt_force_gen import run_fast from fowt_force_gen import filegen from fowt_force_gen import parse import math import numpy as np import os import argparse def tune(water_depth, platform, output_moordyn_filename): """ Using metocean and platform information, generates MoorDyn .dat files with a properly t...
[ 6738, 277, 322, 83, 62, 3174, 62, 5235, 1330, 1057, 62, 7217, 198, 6738, 277, 322, 83, 62, 3174, 62, 5235, 1330, 2393, 5235, 198, 6738, 277, 322, 83, 62, 3174, 62, 5235, 1330, 21136, 198, 11748, 10688, 198, 11748, 299, 32152, 355, ...
3.165657
495
""" Dictionary of supported Bitbucket events and output friendly format """ bitbucket_server_event_names = { "pr:comment:added": "Pull Request: Comment Added", "pr:comment:deleted": "Pull Request: Comment Deleted", "pr:comment:edited": "Pull Request: Comment Edited", "pr:opened": "Pull Request: Opened",...
[ 37811, 198, 35, 14188, 286, 4855, 4722, 27041, 316, 2995, 290, 5072, 8030, 5794, 198, 37811, 198, 2545, 27041, 316, 62, 15388, 62, 15596, 62, 14933, 796, 1391, 198, 220, 220, 220, 366, 1050, 25, 23893, 25, 29373, 1298, 366, 42940, 193...
3.030357
560
#!/usr/local/bin/python3.6 from ipico.reader import BoxReader if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 13, 21, 198, 6738, 20966, 3713, 13, 46862, 1330, 8315, 33634, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 1388, 3419, 628, 628 ]
2.615385
39
from myLinkedList import *
[ 6738, 616, 11280, 276, 8053, 1330, 1635, 628 ]
3.5
8
# Originally auto-generated on 2021-02-15-12:14:36 -0500 EST # By '--verbose --verbose x7.lib.shell_tools' from unittest import TestCase from x7.lib.annotations import tests from x7.testing.support import Capture from x7.lib import shell_tools from x7.lib.shell_tools_load import ShellTool @tests(shell_tools) class T...
[ 2, 19486, 8295, 12, 27568, 319, 33448, 12, 2999, 12, 1314, 12, 1065, 25, 1415, 25, 2623, 532, 2713, 405, 17160, 198, 2, 2750, 705, 438, 19011, 577, 1377, 19011, 577, 2124, 22, 13, 8019, 13, 29149, 62, 31391, 6, 198, 198, 6738, 555...
2.836842
190
import pytest from graph.graph import Graph, Vertex, Edge, Queue
[ 11748, 12972, 9288, 198, 6738, 4823, 13, 34960, 1330, 29681, 11, 4643, 16886, 11, 13113, 11, 4670, 518, 628, 628, 628, 628, 628, 198 ]
3.125
24
from SPARQLWrapper import SPARQLWrapper, JSON from sparql_queries import * import json # Put the repository URL from Graph DB here sparql = SPARQLWrapper(r"http://192.168.1.106:7200/repositories/tinyml2022_v2") # Put the query here sparql.setQuery(query_1) sparql.setReturnFormat(JSON) results = sparql.query().convert...
[ 6738, 6226, 1503, 9711, 36918, 2848, 1330, 6226, 1503, 9711, 36918, 2848, 11, 19449, 198, 6738, 37331, 13976, 62, 421, 10640, 1330, 1635, 198, 11748, 33918, 198, 198, 2, 5930, 262, 16099, 10289, 422, 29681, 20137, 994, 198, 82, 1845, 13...
2.787097
155
#!/usr/bin/env python #! -*- coding: utf-8 -*- """Contains the base-class for all goo.gl commands.""" import apiclient.discovery import googleapiclient.errors import httplib2 import oauth2client.file import os import lnk.config import lnk.errors from lnk.abstract import AbstractCommand class Command(AbstractComman...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 0, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 4264, 1299, 262, 2779, 12, 4871, 329, 477, 467, 78, 13, 4743, 9729, 526, 15931, 198, 198, 11748, 2471,...
2.892651
1,388
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Nvtop(CMakePackage, CudaPackage): """Nvtop stands for NVidia TOP, a (h)top like task monit...
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
2.648438
256
from django.db import models from django.utils.translation import ugettext_lazy as _ from feincms.module.medialibrary.models import MediaFile from feincms import extensions
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 730, 1939, 907, 13, 21412, 13, 1150, 498, 4115, 13, 27530, 1330, 6343, 8979, 198, 198...
3.571429
49
# -*- coding: utf-8 -*- import cv2 import os, sys sys.path.append('./') import numpy as np import glob import math """ Created on Thu Jan 10 10:48:00 2013 @author: Chen Ming """ def read_YUV420(image_path, rows, cols, numfrm): """ 读取YUV文件,解析为Y, U, V图像 :param image_path: YUV图像路径 :param...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 28686, 11, 25064, 201, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 11537, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198...
1.774773
5,510
""" AI Neural Network Training For Captain Pi Created By: Vicky Bao """ import tensorflow as tf from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.layers import Embedding, LSTM, Dense, Bidirectional, GRU from tensorflow.keras...
[ 37811, 198, 20185, 47986, 7311, 13614, 1114, 8599, 13993, 198, 41972, 2750, 25, 569, 17479, 347, 5488, 198, 37811, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 3866, 36948, 13, 5239, 1330, ...
2.666094
1,746
import secrets from flask_login import UserMixin from werkzeug.security import check_password_hash, generate_password_hash from lamby.database import db from lamby.models.projects import projects
[ 11748, 13141, 198, 198, 6738, 42903, 62, 38235, 1330, 11787, 35608, 259, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 2198, 62, 28712, 62, 17831, 11, 7716, 62, 28712, 62, 17831, 198, 198, 6738, 30592, 1525, 13, 48806, 1330, 20613,...
3.826923
52
import numpy as np def mask_image_threshold(image, masking_image, threshold=0): """ Mask one image, based on the values in another image that are above a threshold :param image: Input image :param masking_image: Image to base the mask on (same shape as image) :param threshold: Threshold to bas...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 9335, 62, 9060, 62, 400, 10126, 7, 9060, 11, 9335, 278, 62, 9060, 11, 11387, 28, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 18007, 530, 2939, 11, 1912, 319, 262, 3815, 2...
3.019108
314
import random def generate_points(n, bounds): ''' Generates a list of n points with random coordinates. ''' return [Point.create_random(bounds) for i in range(n)] def generate_class_fn(bounds): ''' Generates a function used to classify the generated points. The function returned is the ...
[ 11748, 4738, 628, 198, 198, 4299, 7716, 62, 13033, 7, 77, 11, 22303, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2980, 689, 257, 1351, 286, 299, 2173, 351, 4738, 22715, 13, 198, 220, 220, 220, 705, 7061, 198, 220, 220...
2.695187
187
raise NotImplementedError("robotparser is not yet implemented in Skulpt")
[ 40225, 1892, 3546, 1154, 12061, 12331, 7203, 305, 13645, 48610, 318, 407, 1865, 9177, 287, 3661, 13327, 4943, 198 ]
3.894737
19
from rl_games.common import object_factory import rl_games.algos_tf14 from rl_games.algos_tf14 import network_builder from rl_games.algos_tf14 import models
[ 6738, 374, 75, 62, 19966, 13, 11321, 1330, 2134, 62, 69, 9548, 198, 11748, 374, 75, 62, 19966, 13, 14016, 418, 62, 27110, 1415, 198, 6738, 374, 75, 62, 19966, 13, 14016, 418, 62, 27110, 1415, 1330, 3127, 62, 38272, 198, 6738, 374, ...
2.857143
56
from seleniumbase import BaseCase from parameterized import parameterized
[ 6738, 384, 11925, 1505, 8692, 1330, 7308, 20448, 198, 6738, 11507, 1143, 1330, 11507, 1143, 628 ]
4.6875
16
import os import zlib from dataclasses import dataclass, field from typing import TYPE_CHECKING, List, Optional import tfaip.util.logging from bidi.algorithm import get_base_level from paiargparse import PAIArgumentParser, pai_meta, pai_dataclass from calamari_ocr import __version__ from calamari_ocr.ocr.dataset.data...
[ 11748, 28686, 198, 11748, 1976, 8019, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 7343, 11, 32233, 198, 198, 11748, 256, 13331, 541, 13, 22602, 13, 6404, 2667, 198, ...
2.809798
347
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' import sys import cv2 import numpy as np import tensorflow as tf from tensorflow.compat.v1 import ConfigProto from tensorflow.compat.v1 import InteractiveSession from tensorflow.python.saved_model import tag_constants import tensorflow_yolov4.core.utils as utils from ...
[ 11748, 28686, 198, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 796, 705, 16, 6, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, ...
2.976401
339
import discord import aiosqlite from discord.commands import slash_command from discord.ext import commands # Courtesy of Pycord examples """ Let users assign themselves roles by clicking on Buttons. The view made is persistent, so it will work even when the bot restarts. See this example for more information...
[ 11748, 36446, 201, 198, 11748, 257, 4267, 13976, 578, 201, 198, 6738, 36446, 13, 9503, 1746, 1330, 24632, 62, 21812, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 201, 198, 2, 22984, 286, 9485, 66, 585, 6096, 201, 198, 37811,...
2.329769
1,777
import time from mock import patch, MagicMock from paradrop.backend import token_manager @patch("paradrop.backend.token_manager.nexus")
[ 11748, 640, 198, 6738, 15290, 1330, 8529, 11, 6139, 44, 735, 198, 198, 6738, 11497, 1773, 13, 1891, 437, 1330, 11241, 62, 37153, 628, 198, 198, 31, 17147, 7203, 1845, 324, 1773, 13, 1891, 437, 13, 30001, 62, 37153, 13, 44520, 4943, ...
3.255814
43
# -*- coding: utf-8 -*- """ @author: hsowan <hsowan.me@gmail.com> @date: 2019/10/19 """ import os from tkinter import * from tkinter import simpledialog, messagebox, filedialog, dialog from tkinter import ttk import yaml import smtplib from email.mime.text import MIMEText from email.header import Header from smtplib ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31, 9800, 25, 289, 82, 45197, 1279, 11994, 45197, 13, 1326, 31, 14816, 13, 785, 29, 198, 31, 4475, 25, 13130, 14, 940, 14, 1129, 198, 198, 37811, 19...
1.696217
3,463
import irc_wheat import sys def parse_date(d): """Parse date string to (yyyy, MM, dd) :param d: the date string to parse :returns: parsed date as tuple or None on error """ date_fields = d.split('-') if date_fields and len(date_fields) == 3: return (int(date_fields[0]), int(da...
[ 11748, 220, 1980, 62, 12491, 265, 198, 11748, 25064, 628, 198, 4299, 21136, 62, 4475, 7, 67, 2599, 198, 220, 220, 220, 37227, 10044, 325, 3128, 4731, 284, 357, 22556, 22556, 11, 20806, 11, 49427, 8, 628, 220, 220, 220, 220, 220, 220...
1.973316
1,574
from typing import Any, Union, List from ..utils.types import Header, HeaderList import json
[ 6738, 19720, 1330, 4377, 11, 4479, 11, 7343, 198, 6738, 11485, 26791, 13, 19199, 1330, 48900, 11, 48900, 8053, 198, 11748, 33918, 628 ]
4.086957
23