content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import yaml from pathlib import Path from typing import Optional, Union, List, Dict from pydantic import BaseModel ServerList = Dict[str, Dict[int, List[Server]]]
[ 11748, 331, 43695, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 11, 4479, 11, 7343, 11, 360, 713, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198, 198, 10697, 8053, 796, 360, 713, 58, 2536, 11, 360, 713, ...
3.27451
51
#!/usr/bin/python3 import os import sys import json import argparse import subprocess from PIL import Image, ImageOps from glob import glob animSize = 65536 srcdir = os.path.dirname(os.path.abspath(__file__)) ldsfile = os.path.join(srcdir,'animation.lds') # The list of animations to build. animations = ['marquee-ima...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 41472, 198, 6738, 15095, 1330, 15095, 198, 1...
2.289878
6,827
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse from os.path import abspath, basename, dirname, exists, expandvars, isdir, isfile, join import json import os import fnmatch import requests import subprocess import sys import yaml def json_parse(string): """ Parse a JSON string into a dictionary """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 1615, 12453, 11, 26672, 3672, 11, ...
2.728016
489
from telegram.ext import * from datetime import time import os, logging import dialog import secret from database import * from user import * from service import Service, ServiceAdd from game import Game logging.basicConfig(format="%(message)s", level=logging.INFO) request_kwargs = { "proxy_url": "soc...
[ 6738, 573, 30536, 13, 2302, 1330, 1635, 198, 198, 6738, 4818, 8079, 1330, 640, 198, 198, 11748, 28686, 11, 18931, 198, 198, 11748, 17310, 198, 11748, 3200, 198, 198, 6738, 6831, 1330, 1635, 198, 6738, 2836, 220, 220, 220, 220, 1330, 1...
2.760234
171
#csvfile='aa.csv' #outfile='SKA1AA2km.in' csvfile='dish.csv' outfile='SKA1Dish.in' dmax=100000.0 lonref=40.019 latref=-30.7131 import math import csv sm_a = 6378137.0 invf = 298.257223563 f = 1.0 / invf # Convert WGS-84 to ITRF # lat and lon are the latitude and longitude in radians, h is the height in metres. ants...
[ 2, 40664, 7753, 11639, 7252, 13, 40664, 6, 198, 2, 448, 7753, 11639, 18831, 32, 16, 3838, 17, 13276, 13, 259, 6, 198, 40664, 7753, 11639, 67, 680, 13, 40664, 6, 198, 448, 7753, 11639, 18831, 32, 16, 35, 680, 13, 259, 6, 198, 67,...
1.96051
785
# intentionally empty - nothing to intitalise
[ 2, 16464, 6565, 532, 2147, 284, 493, 1287, 786 ]
5
9
#!/usr/bin/python import sys,os if len(sys.argv) != 2: print "Usage: %s <ptb file>"%os.path.basename(sys.argv[0]) exit(1) file = sys.argv[1] separator = '_' with open(file) as f: for line in f: tokens = line.split() tokens = map(clean_token, tokens) # For some reason ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 11, 418, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 3601, 366, 28350, 25, 4064, 82, 1279, 457, 65, 2393, 24618, 4, 418, 13, 6...
2.232
250
import os from typing import Dict from ape.api import ReceiptAPI, TransactionAPI, UpstreamProvider, Web3Provider from ape.exceptions import ContractLogicError, ProviderError, TransactionError, VirtualMachineError from ape.utils import gas_estimation_error_message from web3 import HTTPProvider, Web3 # type: ignore fro...
[ 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 43835, 13, 15042, 1330, 19520, 10257, 17614, 11, 45389, 17614, 11, 3205, 5532, 29495, 11, 5313, 18, 29495, 198, 6738, 43835, 13, 1069, 11755, 1330, 17453, 11187, 291, 12331, ...
3.174312
218
import logging import os from functools import wraps from flask import current_app, Flask from flask_sqlalchemy import SQLAlchemy from wallet_api.config import FlaskAppConfig as flask_conf from wallet_api.config import PSQLClientConfig as db_conf db = SQLAlchemy() def create_app(test: bool = False) -> Flask: ...
[ 11748, 18931, 198, 11748, 28686, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 11, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 6738, 13008, 62, 15042, 13, ...
2.513748
691
""" The MIT License (MIT) Copyright (c) 2017-2018 Nariman Safiulin 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 limitation the rights to use, cop...
[ 37811, 201, 198, 464, 17168, 13789, 357, 36393, 8, 201, 198, 201, 198, 15269, 357, 66, 8, 2177, 12, 7908, 13596, 24086, 6895, 72, 11599, 201, 198, 201, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 1672...
2.543015
1,267
import math rad = float(input()) degree = rad * 180 / math.pi print(round(degree))
[ 11748, 10688, 198, 198, 6335, 796, 12178, 7, 15414, 28955, 198, 16863, 796, 2511, 1635, 11546, 1220, 10688, 13, 14415, 198, 4798, 7, 744, 7, 16863, 4008 ]
3.074074
27
import sys import click from neoload_cli_lib import user_data @click.command() @click.option('--url', default="https://neoload-api.saas.neotys.com/", help="The URL of api ", metavar='URL') @click.option('--no-write', is_flag=True, help="don't save login on application data") @click.argument('token', required=False) ...
[ 11748, 25064, 198, 11748, 3904, 198, 198, 6738, 497, 349, 1170, 62, 44506, 62, 8019, 1330, 2836, 62, 7890, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 18076, 10786, 438, 6371, 3256, 4277, 2625, 5450, 1378, 710, 349, 1170...
2.524272
309
""" Auxiliar descriptor models -------------------------- This is a module which purpose is contain all the functions in parts that could be useful for creating descriptor models. """ ## Invocable characterizer functions from characterizers import characterizer_1sh_counter,\ characterizer_summer, characterizer_su...
[ 198, 37811, 198, 32, 2821, 4797, 43087, 4981, 198, 22369, 438, 198, 1212, 318, 257, 8265, 543, 4007, 318, 3994, 477, 262, 5499, 287, 3354, 326, 714, 198, 1350, 4465, 329, 4441, 43087, 4981, 13, 198, 37811, 198, 198, 2235, 10001, 420, ...
3.451247
441
__author__ = "Tonakai" from classes import * from models import * from services import * from views import *
[ 834, 9800, 834, 796, 366, 35416, 461, 1872, 1, 201, 198, 6738, 6097, 1330, 1635, 201, 198, 6738, 4981, 1330, 1635, 201, 198, 6738, 2594, 1330, 1635, 201, 198, 6738, 5009, 1330, 1635, 201, 198 ]
3.257143
35
import os import numpy as np from ffn.inference import segmentation def split_segmentation_by_intersection(a, b, min_size): """Computes the intersection of two segmentations. Intersects two spatially overlapping segmentations and assigns a new ID to every unique (id1, id2) pair of overlapping voxels. If 'id2' i...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 277, 22184, 13, 259, 4288, 1330, 10618, 341, 628, 198, 4299, 6626, 62, 325, 5154, 341, 62, 1525, 62, 3849, 5458, 7, 64, 11, 275, 11, 949, 62, 7857, 2599, 198, 220, 37227, ...
2.327425
2,031
import os while 1: ifn = open("version") major, minor, revision = ifn.read().split(".") major = int(major) minor = int(minor) revision = int(revision) ifn.close() print "version", major, minor, revision print "Increment Major version ?" if raw_input().upper() == "Y": major ...
[ 11748, 28686, 198, 198, 4514, 352, 25, 198, 220, 220, 220, 611, 77, 796, 1280, 7203, 9641, 4943, 198, 220, 220, 220, 1688, 11, 4159, 11, 18440, 796, 611, 77, 13, 961, 22446, 35312, 7203, 19570, 198, 220, 220, 220, 1688, 796, 493, ...
2.205976
1,573
import os import docker import pytest from jina.docker.hubio import HubIO from jina.enums import BuildTestLevel from jina.logging import JinaLogger from jina.parsers.hub import set_hub_build_parser cur_dir = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture(scope='function') @pytest.fixture(scope='functi...
[ 11748, 28686, 198, 198, 11748, 36253, 198, 11748, 12972, 9288, 198, 6738, 474, 1437, 13, 45986, 13, 40140, 952, 1330, 14699, 9399, 198, 6738, 474, 1437, 13, 268, 5700, 1330, 10934, 14402, 4971, 198, 6738, 474, 1437, 13, 6404, 2667, 1330...
2.818966
116
from nltk.corpus import stopwords from nltk.tokenize import TweetTokenizer from nltk.stem.wordnet import WordNetLemmatizer
[ 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 18752, 30642, 7509, 198, 6738, 299, 2528, 74, 13, 927, 13, 4775, 3262, 1330, 9678, 7934, 43, 368, 6759, 7509 ]
3.05
40
b = BinarySearchTree() b.add(1) b.add(2) b.add(20) b.add(-1) b.add(0) b.add(-2) b.add(-2) # b.inorderTrans() b.printLeafs()
[ 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 65, 796, 45755, 18243, 27660, 3419, 201, 198, 201, 198, 65, 13, 2860, 7, 16, 8, 201, 198, 65, 13, 2860, 7, 17, 8, 201, 198, ...
1.509804
102
from fastapi.encoders import jsonable_encoder from services.authentication import authenticate from fastapi import APIRouter, Request, HTTPException, status from fastapi.responses import JSONResponse from schema.categories import Category from models.categories import Category as CategoryModel from config.config_loader...
[ 6738, 3049, 15042, 13, 12685, 375, 364, 1330, 33918, 540, 62, 12685, 12342, 198, 6738, 2594, 13, 41299, 3299, 1330, 8323, 5344, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 19390, 11, 14626, 16922, 11, 3722, 198, 6738, 3049, 150...
3.931034
145
# -*- coding: utf-8 -*- ''' File name: code\hilberts_new_hotel\sol_359.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #359 :: Hilbert's New Hotel # # For more information see: # https://projecteuler.net/problem=359 # Problem Statement ...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 9220, 1438, 25, 2438, 59, 71, 346, 527, 912, 62, 3605, 62, 8940, 417, 59, 34453, 62, 30743, 13, 9078, 198, 220, 220, 220, 6434, 2...
3.199616
521
# Copyright 2013 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 ag...
[ 2, 15069, 2211, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 220, 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, 13...
3.153942
799
#!/usr/bin/python import optparse import os import zipfile import fnmatch import gzip from ConfigParser import SafeConfigParser import logging logging.basicConfig( level = logging.INFO, format = "%(asctime)s %(levelname)-5.5s %(message)s", datefmt = "%H:%M:%S" ) log = logging.getLogger(__name__) if ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 2172, 29572, 198, 11748, 28686, 198, 198, 11748, 19974, 7753, 198, 11748, 24714, 15699, 198, 11748, 308, 13344, 198, 6738, 17056, 46677, 1330, 19978, 16934, 46677, 198, 198, 11748, 18...
2.159125
1,326
import os from pypi_config import PASSWORD, USERNAME os.system("python setup.py sdist") os.system(f"twine upload dist/* -u {USERNAME} -p {PASSWORD} --skip-existing")
[ 11748, 28686, 198, 198, 6738, 279, 4464, 72, 62, 11250, 1330, 41752, 54, 12532, 11, 1294, 1137, 20608, 198, 198, 418, 13, 10057, 7203, 29412, 9058, 13, 9078, 264, 17080, 4943, 198, 418, 13, 10057, 7, 69, 1, 4246, 500, 9516, 1233, 15...
2.709677
62
import re from django.conf import settings from django.conf.urls import include, url from django.urls import path urlpatterns = [] if settings.SERVE_MEDIA: from django.views.static import serve urlpatterns += [ url( r"^%s(?P<path>.*)$" % re.escape(settings.STATIC_URL.lstrip("/")), ...
[ 11748, 302, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6371, 33279, 82, 796, 17635, 198, 1...
2.024316
329
""" Plotting: Graphical representations of data extracted from datasets. Graphical representations of cw-EPR data are an indispensable aspect of data analysis. To facilitate this, a series of different plotters are available. Plotting relies on `matplotlib <https://matplotlib.org/>`_, and mainly its object-oriented i...
[ 37811, 198, 43328, 889, 25, 29681, 605, 24612, 286, 1366, 21242, 422, 40522, 13, 198, 198, 37065, 605, 24612, 286, 269, 86, 12, 36, 4805, 1366, 389, 281, 35669, 4843, 286, 1366, 198, 20930, 13, 1675, 15570, 428, 11, 257, 2168, 286, ...
2.869875
8,292
#!/usr/bin/env python3 from codekit.codetools import debug, error, info, warn from codekit import codetools, pygithub import argparse import codekit.progressbar as pbar import github import re import sys import textwrap def parse_args(): """Parse command-line arguments""" prog = 'github-tag-teams' pars...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 14873, 988, 270, 13, 19815, 316, 10141, 1330, 14257, 11, 4049, 11, 7508, 11, 9828, 198, 6738, 14873, 988, 270, 1330, 14873, 316, 10141, 11, 12972, 12567, 198, 11748, 182...
2.051925
3,428
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: github.com/metaprov/modelaapi/services/system/v1/system.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 33084, 13, 785, 14, 4164, 499, 18657, 14, 4666, 10304, 15042, 14, 30416, ...
2.494795
5,956
import asyncio from typing import Any, List, Optional from util.iterables import reduce
[ 11748, 30351, 952, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 198, 198, 6738, 7736, 13, 2676, 2977, 1330, 4646, 628 ]
4.090909
22
""" Determine the spatial relation between two nD-boxes Based on http://sfclib.github.io """ from itertools import product from pysfc.ndgeom import ndbox def relate(rect, qrt): """ Spatial relationship between two nd-boxes. Outcome can be: 0: equal 1: contains 2: intersects ...
[ 37811, 198, 35, 2357, 3810, 262, 21739, 8695, 1022, 734, 299, 35, 12, 29305, 198, 198, 15001, 319, 2638, 1378, 28202, 565, 571, 13, 12567, 13, 952, 198, 37811, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 279, 893, 16072, 13, ...
2.186858
487
# -*- coding: UTF-8 -*- import os import logging import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from models.BaseModel import SequentialModel from utils import layers """ Encoder Layer """
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152...
3.267606
71
from gi.repository import Gtk from gi.repository import Pango from html.parser import HTMLParser
[ 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 30488, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 350, 14208, 198, 198, 6738, 27711, 13, 48610, 1330, 11532, 46677, 198 ]
3.16129
31
import io import re from setuptools import setup, find_packages from mylib import __version__ readme = read('README.rst') # вычищаем локальные версии из файла requirements (согласно PEP440) requirements = '\n'.join( re.findall(r'^([^\s^+]+).*$', read('requirements.txt'), flags=re.MU...
[ 11748, 33245, 198, 11748, 302, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 6738, 616, 8019, 1330, 11593, 9641, 834, 628, 198, 961, 1326, 796, 1100, 10786, 15675, 11682, 13, 81, 301, 11537, 198, 2, 12466, 1...
2.23676
321
# minimal pyre typing stubs for lark from typing import Any
[ 2, 10926, 12972, 260, 19720, 17071, 82, 329, 300, 668, 198, 198, 6738, 19720, 1330, 4377, 198 ]
3.588235
17
"""Kwaliteitsaanpak PPTX-presentation builder.""" import pathlib import shutil from lxml import etree from pptx import Presentation from pptx.util import Inches, Pt import xmltags from custom_types import TreeBuilderAttributes from .builder import Builder class PptxBuilder(Builder): """Kwaliteitsaanpak present...
[ 37811, 42, 16783, 578, 896, 28340, 41091, 350, 11571, 55, 12, 25579, 341, 27098, 526, 15931, 198, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 279, 457, 87, 1330, 21662, 341, 1...
2.611455
646
# -*- coding: utf-8 -*- """ Example of script. This script sweeps values of gamma at a fixed value of b. Author: Jean-Gabriel Young <info@jgyoung.ca> """ if __name__ == '__main__': # Relative paths import sys from os import path, remove sys.path.insert(0, path.join(path.dirname(path.realpath(__file__)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 16281, 286, 4226, 13, 198, 198, 1212, 4226, 46778, 3815, 286, 34236, 379, 257, 5969, 1988, 286, 275, 13, 198, 198, 13838, 25, 11320, 12, 46079, 11719, 6960, ...
1.742984
1,354
/home/runner/.cache/pip/pool/f2/54/dc/f36ec238d67dc3f69bdfc25685140fdb6eb8c2bdc13acf2e5a171e4ab6
[ 14, 11195, 14, 16737, 11757, 23870, 14, 79, 541, 14, 7742, 14, 69, 17, 14, 4051, 14, 17896, 14, 69, 2623, 721, 23721, 67, 3134, 17896, 18, 69, 3388, 65, 7568, 66, 1495, 35978, 15187, 69, 9945, 21, 1765, 23, 66, 17, 17457, 66, 14...
1.714286
56
import pandas as pd import numpy as np from .dataMaker import * from pandas.io.parsers import read_csv from .BOAmaster.BOAmodel import * from collections import defaultdict import subprocess import sys import os
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 7890, 48890, 1330, 1635, 198, 6738, 19798, 292, 13, 952, 13, 79, 945, 364, 1330, 1100, 62, 40664, 198, 6738, 764, 8202, 5840, 1603, 13, 8202, 32, 1...
3.359375
64
from AmcCarrierCore.AppHardware.AmcCryo._amcCryoCore import * from AmcCarrierCore.AppHardware.AmcCryo._amcCryoCtrl import *
[ 6738, 1703, 66, 9914, 5277, 14055, 13, 4677, 49865, 13, 5840, 66, 26677, 78, 13557, 321, 66, 26677, 78, 14055, 1330, 1635, 198, 6738, 1703, 66, 9914, 5277, 14055, 13, 4677, 49865, 13, 5840, 66, 26677, 78, 13557, 321, 66, 26677, 78, ...
2.695652
46
""" ====== C test ====== :filename=2:title=3:lines=1:filesize=1: """ print('foo')
[ 37811, 198, 50155, 198, 34, 1332, 198, 50155, 198, 198, 25, 34345, 28, 17, 25, 7839, 28, 18, 25, 6615, 28, 16, 25, 16624, 1096, 28, 16, 25, 198, 37811, 198, 198, 4798, 10786, 21943, 11537, 198 ]
2.27027
37
import tensorflow as tf import numpy as np import os import math import glob from scipy import ndimage, misc from data.prepare_cifar import read_h5 # you need to change this to your data directory train_dir = 'data/train/' def shuffle_data(data, labels): """ Shuffle data and labels. Input: ...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 11748, 10688, 201, 198, 11748, 15095, 201, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 11, 12747, 201, 198, 6738, 1366, ...
2.287037
324
frase = 'Curso em Vídeo Python' print('Curso' in frase) #Verifica se a palavra 'Curso' esta dentro da string.
[ 8310, 589, 796, 705, 26628, 568, 795, 569, 8836, 2934, 78, 11361, 6, 198, 4798, 10786, 26628, 568, 6, 287, 1216, 589, 8, 198, 2, 13414, 811, 64, 384, 257, 6340, 615, 430, 705, 26628, 568, 6, 1556, 64, 18794, 305, 12379, 4731, 13 ]
2.477273
44
import unittest import numpy import chainer from chainer import configuration from chainer import cuda import chainer.functions as F from chainer import gradient_check from chainer.graph_optimizations.static_graph import static_graph import chainer.links as L from chainer import links from chainer import testing from...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 198, 198, 11748, 6333, 263, 198, 6738, 6333, 263, 1330, 8398, 198, 6738, 6333, 263, 1330, 269, 15339, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 6738, 6333, 263, 1330, 313...
2.871233
365
from ralph.settings import * # noqa def only_true(request): '''For django debug toolbar.''' return True DEBUG = True INSTALLED_APPS = INSTALLED_APPS + ( 'debug_toolbar', 'django_extensions', ) MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEB...
[ 6738, 374, 17307, 13, 33692, 1330, 1635, 220, 1303, 645, 20402, 628, 198, 4299, 691, 62, 7942, 7, 25927, 2599, 198, 220, 220, 220, 705, 7061, 1890, 42625, 14208, 14257, 50149, 2637, 7061, 198, 220, 220, 220, 1441, 6407, 198, 198, 3053...
2.044888
802
#!/usr/bin/env python3 import errno import struct import json import socket import os import re import subprocess from enum import Enum from collections import deque from threading import Timer, Lock import time class CommandReply(_ReplyType): """ Info about a command that was executed with :func:`Connect...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 11454, 3919, 198, 11748, 2878, 198, 11748, 33918, 198, 11748, 17802, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 6738, 33829, 1330, 2039, 388, 198, 6...
2.399322
7,668
#!/usr/bin/env python3 import logging import os import os.path as path import re # process templates import chocolatey_packages SCRIPT_PATH = path.dirname(path.realpath(__file__)) preprocessor(SCRIPT_PATH, 'chocolatey.template.adoc', 'chocolatey.adoc')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 11748, 302, 628, 198, 198, 2, 1429, 24019, 198, 11748, 11311, 88, 62, 43789, 198, 6173, 46023, 62, 342...
3.035714
84
from rest_framework import routers from django.conf.urls import include, url router = routers.DefaultRouter() urlpatterns = [ url(r'^/', include(router.urls)), ]
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 198, 472, 353, 796, 41144, 13, 19463, 49, 39605, 3419, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, ...
2.847458
59
import sys sys.path.append('..') import numpy as np from Auraliser import Signal if __name__ == '__main__': main()
[ 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 317, 1523, 5847, 1330, 26484, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, ...
2.695652
46
from django.shortcuts import render from django.views import generic from .models import Zoo, Exhibit, Animal # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 1330, 14276, 198, 198, 6738, 764, 27530, 1330, 21980, 11, 35880, 11, 13792, 198, 198, 2, 13610, 534, 5009, 994, 13, 198 ]
3.833333
36
import cv2 import numpy as np def overlay_rect(im, polygons): """[This function overlays rectangles defined in polygons [list of x y coords] on an image] Args: im ([np.ndarray]): [image] polygons ([list]): [x y coords of rectangles] Returns: [np.ndarray]: [image with rectangles dr...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 33345, 62, 2554, 7, 320, 11, 25052, 684, 2599, 198, 220, 220, 220, 13538, 17912, 1212, 2163, 12893, 592, 13621, 27787, 5447, 287, 25052, 684, 685, 4868, 286, 2124...
2.436391
676
#!/usr/bin/env python import argparse parser = argparse.ArgumentParser(description="Given a set of MCMC samples of T, log L, use scipy.kde to approximate the density field.") parser.add_argument("--config", default="config.yaml", help="The config file specifying everything we need.") args = parser.parse_args() impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 15056, 257, 900, 286, 13122, 9655, 8405, 286, 309, 11, 2604, 406, 11, 779, 629, 541,...
2.648248
742
#!/usr/bin/env python import argparse cli = argparse.ArgumentParser() subparsers = cli.add_subparsers(dest="subcommand") def argument(*name_or_flags, **kwargs): """Convenience function to properly format arguments to pass to the subcommand decorator. """ return (list(name_or_flags), kwargs) def s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 628, 198, 44506, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 7266, 79, 945, 364, 796, 537, 72, 13, 2860, 62, 7266, 79, 945, 364, 7, 16520, 2625, 726...
2.721414
481
from django import template from django.conf import settings from django.contrib.sites.models import Site from django.urls import reverse from ..utils import load_package_json, origin, uri from .. import breadcrumbs from entries import kinds register = template.Library() @register.simple_tag @register.simple_ta...
[ 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 27530, 1330, 14413, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 11485, 26791, ...
3.140541
185
import os from lmod.spider import Spider
[ 11748, 28686, 198, 6738, 300, 4666, 13, 2777, 1304, 1330, 12648, 628 ]
3.5
12
""" MIT License Copyright (c) 2019-2021 naoTimesdev 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 limitation the rights to use, copy, modify, merge, publi...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 13130, 12, 1238, 2481, 299, 5488, 28595, 7959, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, ...
3.518072
664
from datetime import datetime import logging import requests from shared_code import configurations from shared_code.models.oat import OATDetectionResult from shared_code.trace_utils.trace import trace_manager XDR_HOST_URL = configurations.get_xdr_host_url() # Get List of Events # Get raw logs from search api
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 4888, 62, 8189, 1330, 25412, 198, 6738, 4888, 62, 8189, 13, 27530, 13, 15073, 1330, 440, 1404, 11242, 3213, 23004, 198, 6738, 4888, 62, 8189, 13, 40546,...
3.613636
88
import traceback import pandas as pd import matplotlib.pyplot as plt from wordcloud import WordCloud, STOPWORDS
[ 11748, 12854, 1891, 201, 198, 11748, 19798, 292, 355, 279, 67, 220, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 201, 198, 6738, 1573, 17721, 1330, 9678, 18839, 11, 44934, 45359, 5258, 220, 201 ]
3.025641
39
import os import requests import requests.auth import urllib
[ 11748, 28686, 198, 11748, 7007, 198, 11748, 7007, 13, 18439, 198, 11748, 2956, 297, 571, 628, 198 ]
3.705882
17
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2021-2022 Aarno Labs LLC # # Permission is hereby granted, free of ...
[ 2, 16529, 26171, 198, 2, 6127, 39, 19301, 45755, 16213, 9107, 198, 2, 6434, 25, 367, 11870, 311, 541, 2611, 198, 2, 16529, 26171, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 12, 1238, 1828, ...
2.89789
1,185
from __future__ import print_function import cv2 import numpy as np import glob, os #import matplotlib.pyplot as plt import sys #import time import h5py import random #from scipy import ndimage import ntpath DATA_PATH = './training_patches_varied_256/input/' LABEL_PATH = './training_patches_varied_256...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 15095, 11, 28686, 201, 198, 2, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, ...
2.246831
1,499
# -*- coding: utf-8 -*- """ Created on Sun Jan 28 18:12:44 2018 @author: Utkarsh """ import numpy as np from skimage.morphology import convex_hull_image, erosion from skimage.morphology import square
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 2365, 2579, 1248, 25, 1065, 25, 2598, 2864, 201, 198, 201, 198, 31, 9800, 25, 7273, 74, 5406, 201, 198, 37811, 201, 198, 201, ...
2.6375
80
# ---------------------------------------------------------------------------- # Gimel Studio Copyright 2019-2022 by the Gimel Studio project contributors # # 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...
[ 2, 16529, 10541, 198, 2, 41123, 417, 11733, 15069, 13130, 12, 1238, 1828, 416, 262, 41123, 417, 11733, 1628, 20420, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 74...
3.549572
817
from guillotina.db.interfaces import IStorageCreatedEvent from zope.interface import implementer @implementer(IStorageCreatedEvent)
[ 6738, 915, 359, 313, 1437, 13, 9945, 13, 3849, 32186, 1330, 314, 31425, 41972, 9237, 198, 6738, 1976, 3008, 13, 39994, 1330, 3494, 263, 628, 198, 31, 320, 26908, 263, 7, 40, 31425, 41972, 9237, 8, 198 ]
3.621622
37
#========================================================================= # ListMemPortAdapter #========================================================================= # These classes provides a list interface, but the implementation # essentially turns reads/writes into memory requests sent over a # port-based memo...
[ 2, 23926, 2559, 28, 198, 2, 7343, 13579, 13924, 47307, 198, 2, 23926, 2559, 28, 198, 2, 2312, 6097, 3769, 257, 1351, 7071, 11, 475, 262, 7822, 198, 2, 6986, 4962, 9743, 14, 8933, 274, 656, 4088, 7007, 1908, 625, 257, 198, 2, 2493,...
8.03012
166
import sys MAX_ITERABLES_SIZE = min(100, sys.maxsize)
[ 11748, 25064, 198, 198, 22921, 62, 2043, 1137, 6242, 28378, 62, 33489, 796, 949, 7, 3064, 11, 25064, 13, 9806, 7857, 8, 198 ]
2.391304
23
#coding:utf-8 import cv2 import numpy as np from matplotlib import pyplot as plt # reference: https://blog.csdn.net/u010128736/article/details/52801310 image = cv2.imread("./china-1-jiao-1997.jpg") gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) plt.subplot(131), plt.imshow(image, "gray") plt.title("source...
[ 2, 66, 7656, 25, 40477, 12, 23, 201, 198, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 201, 198, 2, 4941, 25, 3740, 1378, 140...
2.083333
324
""" Copyright (c) 2015-2018 Raj Patel(raj454raj@gmail.com), StopStalk 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 limitation the rights ...
[ 37811, 198, 220, 220, 220, 15069, 357, 66, 8, 1853, 12, 7908, 13308, 33110, 7, 430, 73, 34229, 430, 73, 31, 14816, 13, 785, 828, 13707, 1273, 971, 628, 220, 220, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597...
2.062637
1,820
#===================== begin_copyright_notice ================================== #Copyright (c) 2017 Intel Corporation #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, incl...
[ 2, 4770, 1421, 28, 2221, 62, 22163, 4766, 62, 42138, 46111, 28, 198, 198, 2, 15269, 357, 66, 8, 2177, 8180, 10501, 198, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 30073, 286,...
2.593214
8,223
''' Need improvement from the code and knowledge is used to built this. Sorry for the readableness and the quality of code not as your expectation. ''' import networkx as nx import matplotlib.pyplot as plt from itertools import combinations # return GCD from pair of nums by modulating the nums iteratively. # Par...
[ 7061, 6, 198, 23037, 9025, 422, 262, 2438, 290, 3725, 318, 973, 284, 3170, 428, 13, 198, 14385, 329, 262, 1100, 23117, 9449, 290, 262, 3081, 286, 2438, 407, 355, 534, 17507, 13, 198, 7061, 6, 198, 198, 11748, 3127, 87, 355, 299, 8...
3.157095
592
import unittest import os from programytest.client import TestClient
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 198, 6738, 1430, 88, 9288, 13, 16366, 1330, 6208, 11792, 628, 628 ]
3.65
20
import os import numpy as np import dmtools from dmtools import transform, colorspace, arrange # COMPILE PIECES | XXXX-XX-XX pieces = [('taughannock_1', 'taughannock_2')] os.makedirs('output', exist_ok=True) for source, dest in pieces: A = dmtools.read(f"input/{source}.png") B = dmtools.read(f"input/{de...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 16762, 10141, 198, 6738, 288, 16762, 10141, 1330, 6121, 11, 7577, 10223, 11, 21674, 628, 628, 628, 198, 2, 9440, 11901, 2538, 30434, 2943, 1546, 930, 27713, 55, 12, 8051...
2.409574
188
"""Sentiment serializer.""" # Django REST Framework from rest_framework import serializers # Models from feelit.posts.models import Sentiment, Comment # Utilities import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry class CreateSentimentSerializer(seriali...
[ 37811, 31837, 3681, 11389, 7509, 526, 15931, 198, 198, 2, 37770, 30617, 25161, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 2, 32329, 198, 6738, 1254, 270, 13, 24875, 13, 27530, 1330, 11352, 3681, 11, 18957, 198, 198, 2, ...
3.612903
124
#!/usr/bin/python # module_check: supported # Copyright 2021 VMware, Inc. All rights reserved. VMware Confidential # SPDX-License-Identifier: Apache License 2.0 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION =...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 8265, 62, 9122, 25, 4855, 198, 198, 2, 15069, 33448, 37754, 11, 3457, 13, 220, 1439, 2489, 10395, 13, 37754, 7326, 35599, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 13789,...
2.460205
2,827
# USAGE # python /home/nmorales/cxgn/DroneImageScripts/CropToPolygonBulk.py --inputfile_path /export/archive/input.csv # import the necessary packages import argparse import imutils import cv2 import numpy as np import json import csv import pandas as pd import CropPolygons.CropPolygonsToSingleImage as CropPolygonsToS...
[ 2, 1294, 11879, 198, 2, 21015, 1220, 11195, 14, 77, 4491, 2040, 14, 66, 87, 4593, 14, 6187, 505, 5159, 7391, 82, 14, 34, 1773, 2514, 34220, 14520, 33, 12171, 13, 9078, 1377, 15414, 7753, 62, 6978, 1220, 39344, 14, 17474, 14, 15414, ...
2.383079
851
from ethereum import tester, blocks import ethereum.utils as utils import rlp import ethereum.testutils as testutils from ethereum.testutils import fixture_to_bytes import ethereum.config as config import sys import os import json from ethereum.slogging import get_logger logger = get_logger() # customize VM log output...
[ 6738, 304, 17733, 1330, 256, 7834, 11, 7021, 198, 11748, 304, 17733, 13, 26791, 355, 3384, 4487, 198, 11748, 374, 34431, 198, 11748, 304, 17733, 13, 9288, 26791, 355, 1332, 26791, 198, 6738, 304, 17733, 13, 9288, 26791, 1330, 29220, 62,...
3.265306
147
from ctypes import windll
[ 198, 6738, 269, 19199, 1330, 2344, 297, 198 ]
3.375
8
# internal data manipulations import numpy as np # operate on data from the hdf5 file and image generation import pandas as pd # Data frames from numpy arrays, especially for output # image generation, manipulation, and analysis import cv2 from matplotlib import path # dealing with voronoi facets polylines as paths...
[ 2, 5387, 1366, 7704, 5768, 198, 11748, 299, 32152, 355, 45941, 220, 1303, 8076, 319, 1366, 422, 262, 289, 7568, 20, 2393, 290, 2939, 5270, 198, 11748, 19798, 292, 355, 279, 67, 220, 1303, 6060, 13431, 422, 299, 32152, 26515, 11, 2592,...
2.819439
8,169
import numpy as np from nose.tools import eq_ from knnimpute import ( knn_impute_few_observed, knn_impute_with_argpartition, knn_impute_optimistic, knn_impute_reference, ) from low_rank_data import XY_incomplete, missing_mask
[ 11748, 299, 32152, 355, 45941, 198, 6738, 9686, 13, 31391, 1330, 37430, 62, 198, 198, 6738, 638, 77, 11011, 1133, 1330, 357, 198, 220, 220, 220, 638, 77, 62, 11011, 1133, 62, 32146, 62, 672, 45852, 11, 198, 220, 220, 220, 638, 77, ...
2.505155
97
# -*- coding: utf-8 -*- import sys, os from django.conf import settings from django.core.management import call_command TEST_TEMPLATE_DIR = 'templates' RUNTESTS_DIR = os.path.dirname(__file__) PREVIOUS_DIR = os.path.abspath(os.path.join(RUNTESTS_DIR, "..")) sys.path.insert(0, PREVIOUS_DIR) test_settings = { 'DA...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 11, 28686, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 198, 51, 6465, 62,...
2.003865
1,035
"""Module with Kytos Events.""" from kytos.core.helpers import now class KytosEvent: """Base Event class. The event data will be passed in the `content` attribute, which should be a dictionary. """ def __init__(self, name=None, content=None): """Create an event to be published. ...
[ 37811, 26796, 351, 11118, 83, 418, 18715, 526, 15931, 198, 198, 6738, 479, 20760, 418, 13, 7295, 13, 16794, 364, 1330, 783, 628, 198, 4871, 11118, 83, 418, 9237, 25, 198, 220, 220, 220, 37227, 14881, 8558, 1398, 13, 628, 220, 220, 2...
2.478621
725
import pytest from warnings import catch_warnings import numpy as np from pandas.util import testing as tm from pandas import Panel, date_range, DataFrame
[ 11748, 12972, 9288, 198, 6738, 14601, 1330, 4929, 62, 40539, 654, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19798, 292, 13, 22602, 1330, 4856, 355, 256, 76, 198, 6738, 19798, 292, 1330, 18810, 11, 3128, 62, 9521, 11, 6060, 1...
3.651163
43
from django.shortcuts import render, redirect from op_tasks.models import Product, Dataset from django.contrib.auth.decorators import login_required from tasks import user_authorized from django.contrib.auth.decorators import login_required from base import LOGIN_URL @login_required(login_url=LOGIN_URL) @login_requ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 1034, 62, 83, 6791, 13, 27530, 1330, 8721, 11, 16092, 292, 316, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 1...
2.94152
171
#!/usr/bin/python import string, sys, re from bb import * asz=len(sys.argv)-1 if ((asz&1)==1): print 'even no. of args expected' args=sys.argv[1:] bss=[] for i in range(asz/2): f = open(args[i*2+1], 'r') bs=rbb(args[i*2], f) bss.append(bs) wrong=False for i in range(len(bss)-1): for j in range(i...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 4731, 11, 25064, 11, 302, 220, 198, 6738, 275, 65, 1330, 1635, 198, 198, 292, 89, 28, 11925, 7, 17597, 13, 853, 85, 13219, 16, 198, 198, 361, 14808, 292, 89, 5, 16, 8, 855, ...
1.857143
294
import tensorflow as tf from Feeder import Feeder import Modules feeder = Feeder(0, True) acoustics = tf.keras.layers.Input( shape= [None, 256], dtype= tf.float32 ) net = Modules.Network() lo = Modules.Loss() logits, _, _ = net([acoustics, net.get_initial_state()]) model = tf.keras.Model(inputs= acousti...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 18272, 263, 1330, 18272, 263, 198, 11748, 3401, 5028, 198, 198, 12363, 263, 796, 18272, 263, 7, 15, 11, 6407, 8, 198, 198, 330, 23968, 873, 796, 48700, 13, 6122, 292, 13, 75, 696...
2.23689
553
#encoding=utf-8 from whoosh.analysis import RegexAnalyzer,LowercaseFilter,StopFilter,StemFilter from whoosh.analysis import Tokenizer,Token from whoosh.lang.porter import stem import jieba import re STOP_WORDS = frozenset(('a', 'an', 'and', 'are', 'as', 'at', 'be', 'by', 'can', 'for', 'from',...
[ 2, 12685, 7656, 28, 40477, 12, 23, 198, 6738, 508, 3768, 13, 20930, 1330, 797, 25636, 37702, 9107, 11, 31426, 7442, 22417, 11, 19485, 22417, 11, 1273, 368, 22417, 198, 6738, 508, 3768, 13, 20930, 1330, 29130, 7509, 11, 30642, 220, 198...
1.931889
323
"""Tag model for Uchapishaji. A tag is a low-level descriptive categorization for posts. Tags are non-hierarchical and are meant to describe individual posts that share a common theme. "An Excellent Blog Engine" Copyright (c) 2021 by William Ellison. This program is licensed under the terms of the Do What ...
[ 37811, 24835, 2746, 329, 471, 354, 499, 680, 26436, 13, 201, 198, 201, 198, 32, 7621, 318, 257, 1877, 12, 5715, 35644, 17851, 1634, 329, 6851, 13, 201, 198, 36142, 389, 1729, 12, 71, 959, 998, 605, 290, 389, 4001, 284, 6901, 1981, ...
3.022642
265
from __future__ import absolute_import from semantic_aware_models.models.classification.abstract_classifier import * from semantic_aware_models.models.classification.bert_classifier import *
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 37865, 62, 9685, 62, 27530, 13, 27530, 13, 4871, 2649, 13, 397, 8709, 62, 4871, 7483, 1330, 1635, 198, 6738, 37865, 62, 9685, 62, 27530, 13, 27530, 13, 4871, 2649, 13, ...
3.979167
48
""" Contains classes and functions related to the authenticated Roblox account. Not to be confused with users.py or the Account system. """ from datetime import date from .utilities.shared import ClientSharedObject class AccountProvider: """ Provides methods that control the authenticated user's account. ...
[ 37811, 198, 198, 4264, 1299, 6097, 290, 5499, 3519, 284, 262, 44529, 3851, 75, 1140, 1848, 13, 198, 3673, 284, 307, 10416, 351, 2985, 13, 9078, 393, 262, 10781, 1080, 13, 198, 198, 37811, 198, 198, 6738, 4818, 8079, 1330, 3128, 198, ...
2.453086
810
from pioneer_sdk import Pioneer import time delta = 0.1 m_to_led = 1000 led_min = 0 led_max = 255 r = led_min g = led_min b = led_min low = 0.25 mid = 0.5 high = 0.75 if __name__ == '__main__': pioneer_mini = Pioneer(logger=False) curr_time = time.time() while True: if time.time()-curr_time > de...
[ 6738, 29570, 62, 21282, 74, 1330, 31437, 198, 11748, 640, 198, 67, 12514, 796, 657, 13, 16, 198, 76, 62, 1462, 62, 992, 796, 8576, 198, 198, 992, 62, 1084, 796, 657, 198, 992, 62, 9806, 796, 14280, 198, 198, 81, 796, 2957, 62, 1...
1.611748
698
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE:...
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 1...
3.885449
323
import configparser import logging import os import re import sys from datetime import datetime from enum import Enum from pkg_resources import DistributionNotFound, get_distribution from typing import List, Optional from qaseio import client from qaseio.client.models import ( TestCaseInfo, TestRunCreate, ...
[ 11748, 4566, 48610, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 279, 10025, 62, 37540, 1330, 27484, 3673, 21077, 11, 651,...
3.026706
337
"""The PowerCalc integration.""" from __future__ import annotations import logging from typing import Optional from homeassistant.helpers.typing import HomeAssistantType from .const import ( CONF_FIXED, CONF_LINEAR, CONF_MAX_POWER, CONF_MAX_WATT, CONF_MIN_POWER, CONF_MIN_WATT, CONF_POWER...
[ 37811, 464, 4333, 9771, 66, 11812, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 13, 774, 13886, 1330, 5995, 48902, 6...
2.673401
297
import torch def any_nan(tensor: torch.Tensor) -> bool: """Returns true if the tensor contains a NaN Args: tensor (torch.Tensor): the input tensor Returns: bool: true if contains a NaN """ return bool(torch.isnan(tensor).any().item()) def print_min_max(name, tensor): """Pri...
[ 11748, 28034, 628, 198, 4299, 597, 62, 12647, 7, 83, 22854, 25, 28034, 13, 51, 22854, 8, 4613, 20512, 25, 198, 220, 220, 220, 37227, 35561, 2081, 611, 262, 11192, 273, 4909, 257, 11013, 45, 628, 220, 220, 220, 943, 14542, 25, 198, ...
2.517065
586
from collections.abc import Collection from dataclasses import dataclass from enum import Enum from timeit import timeit from typing import Any from uuid import UUID, uuid4 import orjson # used in timeit # noqa from apischema import PassThroughOptions, serialization_default, serialization_method @dataclass # o...
[ 6738, 17268, 13, 39305, 1330, 12251, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 640, 270, 1330, 640, 270, 198, 6738, 19720, 1330, 4377, 198, 6738, 334, 27112, 1330, 471, 27586, 11,...
3.148607
323
import json import numpy as np import tensorflow as tf import time import os from distutils.version import StrictVersion import PIL import argparse import sys sys.path.append("../utils/") from utils.visualization_utils import visualize_boxes_and_labels_on_image_array if __name__ == "__main__": main()
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 1233, 26791, 13, 9641, 1330, 520, 2012, 14815, 198, 11748, 350, 4146, 198, 11748, 1822, 29572, 198...
3.173469
98
import gym import universe if __name__ == "__main__": env = gym.make('flashgames.DuskDrive-v0') env.configure(remotes=1) observations = env.reset() while True: action = [[('KeyEvent', 'ArrowUp', True)] for obs in observations] observation, reward, done, info = env.step(action) ...
[ 11748, 11550, 198, 11748, 6881, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 17365, 796, 11550, 13, 15883, 10786, 34167, 19966, 13, 35, 17990, 24825, 12, 85, 15, 11537, 198, 220, 220, 220, 173...
2.561538
130
# Generated by Django 3.2 on 2021-07-18 12:53 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 2998, 12, 1507, 1105, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
""" The MIT License (MIT) Copyright (c) 2016 Jake Lussier (Stanford University) 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 limitation the rights to use...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 1584, 14757, 406, 1046, 959, 357, 32140, 3841, 2059, 8, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 19...
2.888067
1,081
import collections import fcntl import termios import pathlib
[ 11748, 17268, 198, 11748, 277, 66, 429, 75, 198, 11748, 3381, 4267, 198, 11748, 3108, 8019, 628, 628, 628 ]
3.526316
19
import json from django.core.serializers.json import DjangoJSONEncoder import django_url_framework #for type hinting import pprint from abc import ABC, abstractmethod from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect default_charset = "utf8"
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 46911, 11341, 13, 17752, 1330, 37770, 40386, 27195, 12342, 198, 198, 11748, 42625, 14208, 62, 6371, 62, 30604, 1303, 1640, 2099, 9254, 278, 198, 198, 11748, 279, 4798, 198, 6738, ...
3.353659
82