content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/env python # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21015, 532, 9, 12, 198, 2, 33, 43312, 62, 2538, 38, 1847, 198, 2, 198, 2, 15269, 357, 66, 8, 13130, 8180, 10501, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 137...
3.366516
221
import pytest from tenable_io.api.target_groups import TargetListEditRequest from tenable_io.api.models import TargetGroup, TargetGroupList
[ 11748, 12972, 9288, 198, 198, 6738, 3478, 540, 62, 952, 13, 15042, 13, 16793, 62, 24432, 1330, 12744, 8053, 18378, 18453, 198, 6738, 3478, 540, 62, 952, 13, 15042, 13, 27530, 1330, 12744, 13247, 11, 12744, 13247, 8053, 628, 628, 628 ]
3.560976
41
""" Module containing all the spectrogram classes """ # 0.2.0 import torch import torch.nn as nn from torch.nn.functional import conv1d, conv2d, fold import numpy as np from time import time from nnAudio.librosa_functions import * from nnAudio.utils import * sz_float = 4 # size of a float epsilon = 10e-8 # fudg...
[ 37811, 198, 26796, 7268, 477, 262, 5444, 39529, 6097, 198, 37811, 198, 198, 2, 657, 13, 17, 13, 15, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 45124, 1330, 3063, 16, 67, 11, ...
3.389937
159
import argparse import logging import os import numpy as np import pandas as pd import pytorch_lightning as pl import torch from pytorch_lightning import loggers as pl_loggers from torch.utils.data import DataLoader, Dataset from dataset import KoBARTSummaryDataset from transformers import BartForConditionalGeneration,...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 28034, 198, 6738, 12972, 13165, 354, ...
1.92254
1,575
"""Sensor for Shelly.""" from __future__ import annotations from datetime import timedelta import logging from typing import Final, cast import aioshelly from homeassistant.components import sensor from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from home...
[ 37811, 47864, 329, 1375, 12810, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 18931, 198, 6738, 19720, 1330, 8125, 11, 3350, 198, 198, 11748, 257, 4267, 12758, 88, 198, ...
2.289987
3,745
""" Web settings to override for testing. """ import os from biothings.web.settings.default import QUERY_KWARGS # ***************************************************************************** # Elasticsearch Variables # ***************************************************************************** ES_INDEX = 'bts_...
[ 37811, 198, 220, 220, 220, 5313, 6460, 284, 20957, 329, 4856, 13, 198, 37811, 198, 11748, 28686, 198, 198, 6738, 3182, 849, 654, 13, 12384, 13, 33692, 13, 12286, 1330, 19604, 19664, 62, 42, 16279, 14313, 198, 198, 2, 41906, 17174, 455...
4.091195
318
""" Custom management command to rebuild thumbnail images - May be required after importing a new dataset, for example """ import os import logging from PIL import UnidentifiedImageError from django.core.management.base import BaseCommand from django.conf import settings from django.db.utils import OperationalError...
[ 37811, 198, 15022, 4542, 3141, 284, 17884, 40901, 4263, 198, 198, 12, 1737, 307, 2672, 706, 33332, 257, 649, 27039, 11, 329, 1672, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 6738, 350, 4146, 1330, 791, 19107, 5159,...
4.089286
112
import discord from discord.ext import commands import urllib.parse from .constants import themes, controls, languages, fonts, escales import os from pathlib import Path from typing import Any # from pyppeteer import launch from io import * import requests def hex_to_rgb(hex: str) -> tuple: """ Args: ...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 2956, 297, 571, 13, 29572, 198, 6738, 764, 9979, 1187, 1330, 13460, 11, 6973, 11, 8950, 11, 26806, 11, 3671, 2040, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, ...
2.788235
170
# shows artist info for a URN or URL import spotipy_twisted import sys import pprint if len(sys.argv) > 1: urn = sys.argv[1] else: urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu' sp = spotipy_twisted.Spotify() artist = sp.artist(urn) pprint.pprint(artist)
[ 2, 2523, 6802, 7508, 329, 257, 37902, 45, 393, 10289, 198, 198, 11748, 4136, 541, 88, 62, 4246, 6347, 198, 11748, 25064, 198, 11748, 279, 4798, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1875, 352, 25, 198, 220, 220, 220, 220...
2.188525
122
import busio import digitalio import board import adafruit_mcp3xxx.mcp3002 as MCP from adafruit_mcp3xxx.analog_in import AnalogIn # create the spi bus spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI) # create the cs (chip select) cs = digitalio.DigitalInOut(board.D5) # create the mcp object mcp = M...
[ 11748, 1323, 952, 198, 11748, 4875, 952, 198, 11748, 3096, 198, 11748, 512, 1878, 4872, 62, 76, 13155, 18, 31811, 13, 76, 13155, 6200, 17, 355, 337, 8697, 198, 6738, 512, 1878, 4872, 62, 76, 13155, 18, 31811, 13, 272, 11794, 62, 259...
2.495
200
from glue.core.data_factories.helpers import has_extension from glue.config import data_factory __all__ = ['tabular_data']
[ 6738, 22749, 13, 7295, 13, 7890, 62, 22584, 1749, 13, 16794, 364, 1330, 468, 62, 2302, 3004, 198, 6738, 22749, 13, 11250, 1330, 1366, 62, 69, 9548, 628, 198, 834, 439, 834, 796, 37250, 8658, 934, 62, 7890, 20520, 628 ]
3.15
40
from django.shortcuts import render from django.http import Http404 from django.views.generic.edit import UpdateView from django.views.generic import ListView, View from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.utils.decorators import method_decorator...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 19312, 1330, 10133, 7680, 198, 6738, 42625, 14208, 13, 33571, 13, 41357,...
3.578616
159
# External deps import os, sys, json from pathlib import Path from typing import Dict, List # Internal deps os.chdir(sys.path[0]) sys.path.append("..") import df_common as dfc import analyses_common as ac # Generated files directory GEN_FILE_DIR = str(Path(__file__).resolve().parent.parent) + os.sep + "generated_file...
[ 2, 34579, 390, 862, 198, 11748, 28686, 11, 25064, 11, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 2, 18628, 390, 862, 198, 418, 13, 354, 15908, 7, 17597, 13, 6978, 58, 15, 12962, ...
2.134912
971
import math import pytorch_lightning as pl
[ 11748, 10688, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198 ]
3.307692
13
# -*- coding: utf-8 -*- # # Copyright (C) 2020 Chris Caron <lead2gold@gmail.com> # All rights reserved. # # This code is licensed under the MIT License. # # 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 th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 5180, 1879, 261, 1279, 28230, 17, 24267, 31, 14816, 13, 785, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2438, 318...
2.883278
1,208
import sys import subprocess from subprocess import Popen, PIPE AV_LOG_QUIET = "quiet" AV_LOG_PANIC = "panic" AV_LOG_FATAL = "fatal" AV_LOG_ERROR = "error" AV_LOG_WARNING = "warning" AV_LOG_INFO = "info" AV_LOG_VERBOSE = "verbose" AV_LOG_DEBUG = "debug" ffmpeg_loglevel = AV_LOG_ERROR IS_WIN32 = 'win32' ...
[ 11748, 25064, 198, 11748, 850, 14681, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 198, 10116, 62, 25294, 62, 43702, 2767, 220, 220, 796, 366, 39624, 1, 198, 10116, 62, 25294, 62, 47, 1565, 2149, 220, 220, 796, 36...
2.361538
260
from setuptools import setup setup( name="nmn-iwp", version="0.1", keywords="", packages=["vr", "vr.models"] )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 77, 10295, 12, 14246, 79, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 1600, 198, 220, 220, 220, 26286, 2625, 1600, 198, 220, 220, 220, ...
2.285714
56
""" Represent a triangulated surface using a 3D boolean grid""" import logging import numpy as np from rpl.tools.ray_tracing.bsp_tree_poly import BSP_Element from rpl.tools.geometry import geom_utils import data_io def make_grid(veh_surfs, settings): """ Make coordinates of voxelated grid based ...
[ 37811, 10858, 257, 1333, 648, 4817, 4417, 1262, 257, 513, 35, 25131, 10706, 37811, 201, 198, 11748, 18931, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 6738, 374, 489, 13, 31391, 13, 2433, 62, 2213, 4092, 13, 24145, 62...
1.857749
5,188
''' >List of functions 1. encrypt(user_input,passphrase) - Encrypt the given string with the given passphrase. Returns cipher text and locked pad. 2. decrypt(cipher_text,locked_pad,passphrase) - Decrypt the cipher text encrypted with SBET. It requires cipher text, locked pad, and passphrase. ''' # CODE ============...
[ 7061, 6, 198, 29, 8053, 286, 5499, 198, 197, 16, 13, 34117, 7, 7220, 62, 15414, 11, 6603, 34675, 8, 197, 12, 197, 27195, 6012, 262, 1813, 4731, 351, 262, 1813, 1208, 34675, 13, 16409, 38012, 2420, 290, 8970, 14841, 13, 198, 197, 1...
3.69863
146
# -*- coding: utf-8 -*- """ pyfire.errors ~~~~~~~~~~~~~~~~~~~~~~ Holds the global used base errors :copyright: 2011 by the pyfire Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import xml.etree.ElementTree as ET
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 12972, 6495, 13, 48277, 198, 220, 220, 220, 220, 27156, 8728, 4907, 628, 220, 220, 220, 9340, 82, 262, 3298, 973, 2779, 8563, 628, 220, 220,...
2.854167
96
import random
[ 11748, 4738, 628, 628, 197, 197, 220, 628, 628, 628 ]
2.6
10
from dataclasses import dataclass import math import chess import chess.engine from model import EngineMove, NextMovePair from chess import Color, Board from chess.pgn import GameNode from chess.engine import SimpleEngine, Score nps = [] def win_chances(score: Score) -> float: """ winning chances from -1 to ...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 10688, 198, 11748, 19780, 198, 11748, 19780, 13, 18392, 198, 6738, 2746, 1330, 7117, 21774, 11, 7406, 21774, 47, 958, 198, 6738, 19780, 1330, 5315, 11, 5926, 198, 6738, 19780, ...
2.202797
429
import time, morning from datetime import datetime
[ 11748, 640, 11, 3329, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201 ]
4
13
from unittest import TestCase from mock import patch, Mock from samcli.commands.local.start_lambda.cli import do_cli as start_lambda_cli from samcli.commands.local.cli_common.user_exceptions import UserException from samcli.commands.validate.lib.exceptions import InvalidSamDocumentException from samcli.commands.local....
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 15290, 1330, 8529, 11, 44123, 198, 198, 6738, 6072, 44506, 13, 9503, 1746, 13, 12001, 13, 9688, 62, 50033, 13, 44506, 1330, 466, 62, 44506, 355, 923, 62, 50033, 62, 44506, 198, 6738, ...
3.542857
105
from django.test import TestCase import pandas as pd from .getters import Getter from .converter import Converter from strategies.models import Company from strategies.models import IndicatorType
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 1136, 1010, 1330, 3497, 353, 198, 6738, 764, 1102, 332, 353, 1330, 35602, 353, 198, 198, 6738, 10064, 13, 27530, 1330, 58...
3.846154
52
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ 37811, 198, 15069, 357, 66, 8, 12131, 8180, 10501, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 921, 743, 7...
3.967914
187
import sys import json import subprocess import re import statistics # Main service body if __name__ == "__main__": complexity = get_complexity() duplicate_const_strings = get_duplicate_const_strings() files = set() files.update(complexity.keys()) files.update(duplicate_const_strings.keys()) ...
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 302, 198, 11748, 7869, 198, 198, 2, 8774, 2139, 1767, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 220, 220, 628, 220, 220, 220, 13357, 796, 651, 62...
2.627615
239
""" Testing if parso finds syntax errors and indentation errors. """ import sys import warnings import pytest import parso from parso._compatibility import is_pypy from .failing_examples import FAILING_EXAMPLES, indent, build_nested if is_pypy: # The errors in PyPy might be different. Just skip the module for n...
[ 37811, 198, 44154, 611, 1582, 568, 7228, 15582, 8563, 290, 33793, 341, 8563, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 14601, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 1582, 568, 198, 6738, 1582, 568, 13557, 5589, 25901, 1330, ...
2.583474
2,953
# -*- coding: utf-8 -*- from __future__ import unicode_literals from shogitk.shogi import Coords, Move, BLACK, WHITE, DROP, PROMOTE RANKNUM = { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9 }
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 427, 519, 270, 74, 13, 1477, 44381, 1330, 1766, 3669, 11, 10028, 11, 31963, 11, 44925, 11, ...
1.653409
176
import click from . import utils if __name__ == '__main__': main()
[ 11748, 3904, 198, 6738, 764, 1330, 3384, 4487, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.655172
29
import getpass from plumbum import local from plumbum.machines.paramiko_machine import ParamikoMachine from plumbum.path.utils import copy def get_local_machine(): return local def with_machine_rule(cls): old_init = cls.__init__ cls.__init__ = new_init old_apply = cls.apply cls.apply = new_app...
[ 11748, 651, 6603, 198, 6738, 458, 2178, 388, 1330, 1957, 198, 6738, 458, 2178, 388, 13, 76, 620, 1127, 13, 17143, 12125, 62, 30243, 1330, 25139, 12125, 37573, 198, 6738, 458, 2178, 388, 13, 6978, 13, 26791, 1330, 4866, 628, 198, 198, ...
2.558824
136
salario = float(input('digite o seu salario: ')) aumento = (salario + (salario * 15)/100 if salario <= 1250 else salario + (salario * 10)/100) print(aumento)
[ 21680, 4982, 796, 12178, 7, 15414, 10786, 12894, 578, 267, 384, 84, 3664, 4982, 25, 705, 4008, 198, 64, 1713, 78, 796, 357, 21680, 4982, 1343, 357, 21680, 4982, 1635, 1315, 20679, 3064, 611, 3664, 4982, 19841, 1105, 1120, 2073, 3664, ...
2.706897
58
#!/usr/bin/env python import os import os.path import airflow import airflow.plugins_manager from airflow import configuration from flask import Flask from unittest import TestCase, main from airflow_code_editor.commons import PLUGIN_NAME from airflow_code_editor.tree import ( get_tree, ) assert airflow.plugins_m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 45771, 198, 11748, 45771, 13, 37390, 62, 37153, 198, 6738, 45771, 1330, 8398, 198, 6738, 42903, 1330, 46947, 198, 6738, 555, 7...
3.231405
121
from quart import Quart, jsonify, request from quart_jwt_extended import ( JWTManager, jwt_required, create_access_token, jwt_refresh_token_required, create_refresh_token, get_jwt_identity, fresh_jwt_required, ) app = Quart(__name__) app.config["JWT_SECRET_KEY"] = "super-secret" # Change ...
[ 6738, 28176, 1330, 48748, 11, 33918, 1958, 11, 2581, 198, 6738, 28176, 62, 73, 46569, 62, 2302, 1631, 1330, 357, 198, 220, 220, 220, 449, 39386, 13511, 11, 198, 220, 220, 220, 474, 46569, 62, 35827, 11, 198, 220, 220, 220, 2251, 62,...
3.355828
326
from datetime import datetime from typing import Any, Dict, Union __all__ = 'AnyDict' AnyDict = Dict[str, Any] # pragma: no mutate datetime_or_str = Union[datetime, str] # pragma: no mutate
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 4479, 198, 198, 834, 439, 834, 796, 705, 7149, 35, 713, 6, 198, 198, 7149, 35, 713, 796, 360, 713, 58, 2536, 11, 4377, 60, 220, 1303, 23864, 2611,...
2.671233
73
import os os.environ['KERAS_BACKEND'] = 'theano' os.environ['THEANO_FLAGS'] = 'floatX=float32,device=cpu' import cloudpickle as pickle import pipeline_invoke import pandas as pd import numpy as np import keras from keras.layers import Input, Dense from keras.models import Model from keras.models import save_model, loa...
[ 11748, 28686, 198, 418, 13, 268, 2268, 17816, 42839, 1921, 62, 31098, 10619, 20520, 796, 705, 1169, 5733, 6, 198, 418, 13, 268, 2268, 17816, 10970, 1565, 46, 62, 38948, 50, 20520, 796, 705, 22468, 55, 28, 22468, 2624, 11, 25202, 28, ...
2.46337
546
from unittest import TestCase from unittest.mock import Mock, patch import sys sys.modules['smbus'] = Mock() # Mock the hardware layer to avoid errors. from ledshimdemo.canvas import Canvas from ledshimdemo.effects.cheerlights import CheerLightsEffect
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 11748, 25064, 198, 198, 17597, 13, 18170, 17816, 82, 2022, 385, 20520, 796, 44123, 3419, 220, 1303, 44123, 262, 6890, 7679, 284...
3.240506
79
from colicoords.synthetic_data import add_readout_noise, draw_poisson from colicoords import load import numpy as np import mahotas as mh from tqdm import tqdm import os import tifffile def gen_im(data_dir): """Generate microscopy images from a list of cell objects by placing them randomly oriented in the ima...
[ 6738, 951, 3713, 3669, 13, 1837, 429, 6587, 62, 7890, 1330, 751, 62, 961, 448, 62, 3919, 786, 11, 3197, 62, 7501, 30927, 198, 6738, 951, 3713, 3669, 1330, 3440, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 42768, 313, 292, 355, 2...
2.385768
1,068
word = input("Enter a word: ") if word == "a": print("one; any") elif word == "apple": print("familiar, round fleshy fruit") elif word == "rhinoceros": print("large thick-skinned animal with one or two horns on its nose") else: print("That word must not exist. This dictionary is very comprehensive.")
[ 4775, 796, 5128, 7203, 17469, 257, 1573, 25, 366, 8, 198, 198, 361, 1573, 6624, 366, 64, 1298, 198, 220, 220, 220, 3601, 7203, 505, 26, 597, 4943, 198, 417, 361, 1573, 6624, 366, 18040, 1298, 198, 220, 220, 220, 3601, 7203, 69, 19...
3.097087
103
cnt = int(input()) num = list(map(int, input())) sum = 0 for i in range(len(num)): sum = sum + num[i] print(sum)
[ 66, 429, 796, 493, 7, 15414, 28955, 198, 22510, 796, 1351, 7, 8899, 7, 600, 11, 5128, 3419, 4008, 198, 16345, 796, 657, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 22510, 8, 2599, 198, 220, 220, 220, 2160, 796, 2160, 1343, 997, 58, ...
2.27451
51
from distutils.core import setup setup( name = 'kube_navi', packages = ['kube_navi'], # this must be the same as the name above version = '0.1', description = 'Kubernetes resource discovery toolkit', author = 'Srini Seetharaman', author_email = 'srini.seetharaman@gmail.com', url = 'https://github.com/sdnh...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 1438, 796, 705, 74, 3266, 62, 77, 15820, 3256, 198, 220, 10392, 796, 37250, 74, 3266, 62, 77, 15820, 6, 4357, 1303, 428, 1276, 307, 262, 976, 355, 262, 1438, 2029, ...
2.887755
196
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
3.488479
434
# -*- coding: UTF-8 -*- from PySide2.QtWidgets import QWidget, QPushButton, QVBoxLayout from PySide2.QtCore import Signal from moduels.component.NormalValue import from moduels.component.SponsorDialog import SponsorDialog import os, webbrowser def initElement(self): self. = QPushButton(self.tr('')) ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 11, 1195, 49222, 21864, 11, 1195, 53, 14253, 32517, 198, 6738, 9485, 24819, 17, 13, 48, 83, 140...
2.291941
1,216
from typing import Callable, Optional, Type, cast from fastapi import APIRouter, HTTPException, Request, status from app.models import users from app.common.user import ErrorCode, run_handler from app.users.user import ( CreateUserProtocol, InvalidPasswordException, UserAlreadyExists, ValidatePassword...
[ 6738, 19720, 1330, 4889, 540, 11, 32233, 11, 5994, 11, 3350, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 14626, 16922, 11, 19390, 11, 3722, 198, 198, 6738, 598, 13, 27530, 1330, 2985, 198, 6738, 598, 13, 11321, 13, 7220,...
3.153846
234
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import numpy as np def flow_to_img(flow, normalize=True): """Convert flow to viewable image, using color hue to encode flow vector orientation, and color saturation to encode vector length. This is similar to the OpenCV tutorial on dense optical flow, e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 5202, 62, 1462, 62, 9600, 7, 11125, 11, ...
2.407095
592
import argparse from PIL import Image, ImageStat import math parser = argparse.ArgumentParser() parser.add_argument('fname') parser.add_argument('pref', default="", nargs="?") args = parser.parse_args() im = Image.open(args.fname) RGB = im.convert('RGB') imWidth, imHeight = im.size ratg = 1.2 ratgb = 1.66 ming = 10...
[ 11748, 1822, 29572, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 17126, 198, 11748, 10688, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 69, 3672, 11537, 198, 48610, 13, 2860, 62...
2.486056
251
#!/usr/bin/env python """cluster storage stats for python""" # import pyhesity wrapper module from pyhesity import * from datetime import datetime import codecs # command line arguments import argparse parser = argparse.ArgumentParser() parser.add_argument('-v', '--vip', type=str, default='helios.cohesity.com') # cl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 565, 5819, 6143, 9756, 329, 21015, 37811, 198, 198, 2, 1330, 12972, 956, 414, 29908, 8265, 198, 6738, 12972, 956, 414, 1330, 1635, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, ...
2.713115
1,586
#coding=utf-8 from PyQt4 import QtCore import os, glob, numpy, sys from PIL import Image from sklearn.cross_validation import StratifiedKFold from sklearn.metrics import confusion_matrix from sklearn.neighbors import KNeighborsClassifier from sklearn.neighbors import BallTree from sklearn import cross_validation from ...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 14055, 198, 11748, 28686, 11, 15095, 11, 299, 32152, 11, 25064, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1341, 35720, 13, 19692, 62, 12102, 341, 1330...
3.243056
144
# coding: utf-8 """test_find_fork.""" # pylint: disable=no-self-use from __future__ import absolute_import, division, print_function, unicode_literals from os import path import unittest from six import PY3 from find_forks.__init__ import CONFIG from find_forks.find_forks import add_forks, determine_names, find_fork...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 9288, 62, 19796, 62, 32523, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 944, 12, 1904, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818,...
2.838889
180
# Copyright (c) 2015 Openstack Foundation # # 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 ...
[ 2, 15069, 357, 66, 8, 1853, 4946, 25558, 5693, 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, ...
3.268222
343
""":mod:`sider.warnings` --- Warning categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module defines several custom warning category classes. """
[ 15931, 1298, 4666, 25, 63, 82, 1304, 13, 40539, 654, 63, 11420, 15932, 9376, 198, 27156, 27156, 15116, 8728, 4907, 93, 198, 198, 1212, 8265, 15738, 1811, 2183, 6509, 6536, 6097, 13, 198, 198, 37811, 628, 628, 198 ]
4.394737
38
MEDIA_SEARCH = """ query ($search: String, $type: MediaType, $exclude: MediaFormat, $isAdult: Boolean) { Media(search: $search, type: $type, format_not: $exclude, isAdult: $isAdult) { id type format title { english romaji native } synonyms status description start...
[ 30733, 3539, 62, 5188, 31315, 796, 37227, 198, 22766, 7198, 12947, 25, 10903, 11, 720, 4906, 25, 6343, 6030, 11, 720, 1069, 9152, 25, 6343, 26227, 11, 720, 271, 42995, 25, 41146, 8, 1391, 198, 220, 6343, 7, 12947, 25, 720, 12947, 11...
2.012821
1,248
import unittest import operator import sandbox.chainop as chainop def suite(suffix="Test"): suite = unittest.TestSuite() all_names = globals() for name in all_names: if name.endswith(suffix): suite.addTest(unittest.makeSuite(all_names[name], "test")) return suite if __name__ == ...
[ 11748, 555, 715, 395, 198, 11748, 10088, 198, 11748, 35204, 13, 7983, 404, 355, 6333, 404, 628, 628, 198, 4299, 18389, 7, 37333, 844, 2625, 14402, 1, 2599, 198, 220, 220, 220, 18389, 796, 555, 715, 395, 13, 14402, 5606, 578, 3419, 1...
2.46875
160
#!/usr/bin/env python import chainer from algs import trpo from env_makers import EnvMaker from models import GaussianMLPPolicy, MLPBaseline from utils import SnapshotSaver import numpy as np import os import logger log_dir = "data/local/trpo-pendulum" np.random.seed(42) # Clean up existing logs os.system("rm -rf {...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 6333, 263, 198, 198, 6738, 435, 14542, 1330, 491, 7501, 198, 6738, 17365, 62, 6620, 1330, 2039, 85, 48890, 198, 6738, 4981, 1330, 12822, 31562, 5805, 10246, 21424, 11, 10373, 47, ...
2.222004
509
#!/usr/bin/python3.7 # -*- coding: utf-8 -*- # @Time : 2019/12/2 10:17 # @Author: Jtyoui@qq.com """ """ try: import xml.etree.cElementTree as et except ModuleNotFoundError: import xml.etree.ElementTree as et import re
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 1058, 13130, 14, 1065, 14, 17, 838, 25, 1558, 198, 2, 2488, 13838, 25, 449, 774, 280, 72...
2.3
100
""" Main Author: Will LeVine Corresponding Email: levinewill@icloud.com """ import keras import numpy as np from sklearn.tree import DecisionTreeClassifier from sklearn.utils.validation import check_array, check_is_fitted, check_X_y from .base import BaseTransformer
[ 37811, 198, 13383, 6434, 25, 2561, 1004, 53, 500, 198, 10606, 5546, 278, 9570, 25, 443, 7114, 413, 359, 31, 291, 75, 2778, 13, 785, 198, 37811, 198, 11748, 41927, 292, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, ...
3.214286
84
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.collections as mcoll from matplotlib.ticker import MaxNLocator plt.style.use('seaborn-darkgrid') def colorline(x, y, z=None, cmap=plt.get_cmap('copper'), norm=plt.Normalize(0.0, 1.0), linewidth=3, alpha=1.0, zord...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 4033, 26448, 355, 285, 26000, 198, 6738, 2603, 29487, 8019, 13...
2.31039
770
import imp from venv import create from django.shortcuts import render, redirect from django.views import View from django.views.generic import ( ListView, ) from account.models import * from account.forms import * from data.models import * from django.contrib.auth import login as auth_login from django.contrib.a...
[ 11748, 848, 198, 6738, 8710, 85, 1330, 2251, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 357, 198, 220, 220, 220,...
3.326203
187
import cv2 import aiohttp import asyncio import concurrent.futures import argparse import numpy as np def main(): parser = argparse.ArgumentParser('fpds.client') parser.add_argument('url', type=str, help='WebSocket endpoint of fpds.server e.g. http://localhost:8181/fpds') args = parser.parse_args() lo...
[ 11748, 269, 85, 17, 198, 11748, 257, 952, 4023, 198, 11748, 30351, 952, 198, 11748, 24580, 13, 69, 315, 942, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 30751, 796, 182...
2.517787
253
import logging import os import pickle import sys import threading import time from typing import List from Giveme5W1H.extractor.root import path from Giveme5W1H.extractor.tools.util import bytes_2_human_readable
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 640, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 13786, 1326, 20, 54, 16, 39, 13, 2302, 40450, 13, 15763, 1330, 3108, 198, ...
3.359375
64
from argparse import ArgumentParser from tqdm import tqdm import NSST from nsst_translate import best_transition_sequence if __name__ == '__main__': parser = ArgumentParser() parser.add_argument("--nsst_file", default="output/nsst_tss20_th4_nSt100_Q0.pkl", help="nsst file") parser.add_argument("--src_lan...
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 10896, 2257, 198, 6738, 36545, 301, 62, 7645, 17660, 1330, 1266, 62, 7645, 653, 62, 43167, 198, 198, 361, 11593, 3672, 834, ...
1.905372
1,638
# Import library import math # Define functionts # Set data size = int(input()) numbers = list(map(int, input().split())) # Get standard deviation print(round(stddev(numbers, size), 1))
[ 2, 17267, 5888, 198, 11748, 10688, 198, 198, 2, 2896, 500, 2163, 912, 198, 198, 2, 5345, 1366, 198, 7857, 796, 493, 7, 15414, 28955, 198, 77, 17024, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 198, 2, 3497...
3
63
Alice='Ti rga eoe esg o h ore"ermetsCmuainls' Bob='hspormdcdsamsaefrtecus Hraina optcoae"' print(decode(Alice,Bob,''))
[ 198, 44484, 11639, 40533, 374, 4908, 304, 2577, 220, 1658, 70, 267, 289, 23751, 1, 7780, 1039, 34, 30300, 391, 7278, 6, 198, 18861, 11639, 71, 2777, 579, 17896, 9310, 4105, 64, 891, 81, 660, 9042, 367, 3201, 64, 2172, 1073, 3609, 30...
2.1
60
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
[ 2, 38093, 25609, 855, 198, 2, 15069, 2321, 14757, 9847, 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, ...
4.114486
428
# refactored from make_play to simplify # by Russell on 3/5/21 #from ttt_package.libs.move_utils import get_open_cells from ttt_package.libs.compare import get_transposed_games, reorient_games from ttt_package.libs.calc_game_bound import calc_game_bound from ttt_package.libs.maxi_min import maximin # find the best mo...
[ 2, 1006, 529, 1850, 422, 787, 62, 1759, 284, 30276, 198, 2, 416, 11563, 319, 513, 14, 20, 14, 2481, 198, 198, 2, 6738, 256, 926, 62, 26495, 13, 8019, 82, 13, 21084, 62, 26791, 1330, 651, 62, 9654, 62, 46342, 198, 6738, 256, 926,...
3.04
125
#!/usr/bin/env python3 # python import _thread import time from yvhai.demo.base import YHDemo if __name__ == '__main__': RawThreadDemo.demo()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21015, 220, 628, 198, 11748, 4808, 16663, 198, 11748, 640, 198, 198, 6738, 331, 85, 44488, 13, 9536, 78, 13, 8692, 1330, 575, 10227, 41903, 628, 628, 198, 361, 11593, 3672, 83...
2.483871
62
# constants for configuration parameters of our tensorflow models LABEL = "label" IDS = "ids" # LABEL_PAD_ID is used to pad multi-label training examples. # It should be < 0 to avoid index out of bounds errors by tf.one_hot. LABEL_PAD_ID = -1 HIDDEN_LAYERS_SIZES = "hidden_layers_sizes" SHARE_HIDDEN_LAYERS = "share_hid...
[ 2, 38491, 329, 8398, 10007, 286, 674, 11192, 273, 11125, 4981, 198, 198, 48780, 3698, 796, 366, 18242, 1, 198, 14255, 796, 366, 2340, 1, 198, 2, 406, 6242, 3698, 62, 47, 2885, 62, 2389, 318, 973, 284, 14841, 5021, 12, 18242, 3047, ...
2.451104
1,268
# # Copyright 2016-2019 Games Creators Club # # MIT License # import math import pyroslib import pyroslib.logging import time from pyroslib.logging import log, LOG_LEVEL_ALWAYS, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG from rover import WheelOdos, WHEEL_NAMES from rover import normaiseAngle, angleDiference from challenge_uti...
[ 198, 2, 198, 2, 15069, 1584, 12, 23344, 5776, 7921, 669, 6289, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 198, 11748, 10688, 198, 11748, 12972, 4951, 8019, 198, 11748, 12972, 4951, 8019, 13, 6404, 2667, 198, 11748, 640, 198, 198, 67...
2.378194
587
PROTO = { 'spaceone.monitoring.interface.grpc.v1.data_source': ['DataSource'], 'spaceone.monitoring.interface.grpc.v1.metric': ['Metric'], 'spaceone.monitoring.interface.grpc.v1.project_alert_config': ['ProjectAlertConfig'], 'spaceone.monitoring.interface.grpc.v1.escalation_policy': ['EscalationPolicy']...
[ 4805, 26631, 796, 1391, 198, 220, 220, 220, 705, 13200, 505, 13, 41143, 278, 13, 39994, 13, 2164, 14751, 13, 85, 16, 13, 7890, 62, 10459, 10354, 37250, 6601, 7416, 6, 4357, 198, 220, 220, 220, 705, 13200, 505, 13, 41143, 278, 13, ...
2.577465
284
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation ) from django.contrib.contenttypes.models import ContentType from django.db import models # Models for #15776 # Models for #16128
[ 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 25747, 1330, 357, 198, 220, 220, 220, 42044, 33616, 9218, 11, 42044, 6892, 341, 198, 8, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 1...
3.1125
80
import cv2 from cv2 import * import numpy as np from matplotlib import pyplot as plt ###############################SIFT MATCH Function################################# ################################################################################################### #################################...
[ 11748, 269, 85, 17, 201, 198, 6738, 269, 85, 17, 1330, 1635, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 14468, 7804...
2.443537
735
import dash from dash.exceptions import PreventUpdate import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import dash_bootstrap_components as dbc import dash_table import plotly.express as ex import plotly.graph_objects as go import pandas as pd imp...
[ 11748, 14470, 198, 6738, 14470, 13, 1069, 11755, 1330, 31572, 10260, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11...
1.278417
10,944
import pyxon.decode as pd def unobjectify(obj): """ Turns a python object (must be a class instance) into the corresponding JSON data. Example: >>> @sprop.a # sprop annotations are needed to tell the >>> @sprop.b # unobjectify function what parameter need >>> @sprop.c # to be written out....
[ 11748, 12972, 23813, 13, 12501, 1098, 355, 279, 67, 198, 198, 4299, 555, 15252, 1958, 7, 26801, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30875, 257, 21015, 2134, 357, 27238, 307, 257, 1398, 4554, 8, 198, 220, 220, 220, 6...
2.448301
1,383
# Segmentation script # ------------------- # This script lets the user segment automatically one or many images based on the default segmentation models: SEM or # TEM. # # Maxime Wabartha - 2017-08-30 # Imports import sys from pathlib import Path import json import argparse from argparse import RawTextHelpFormatter...
[ 2, 1001, 5154, 341, 4226, 198, 2, 34400, 6329, 198, 2, 770, 4226, 8781, 262, 2836, 10618, 6338, 530, 393, 867, 4263, 1912, 319, 262, 4277, 10618, 341, 4981, 25, 48603, 393, 198, 2, 309, 3620, 13, 198, 2, 198, 2, 5436, 524, 370, ...
2.219229
8,612
from dcstats.hedges import Hedges_d from dcstats.statistics_EJ import simple_stats as mean_SD import random import math ###tests
[ 6738, 30736, 34242, 13, 704, 3212, 1330, 30920, 3212, 62, 67, 198, 6738, 30736, 34242, 13, 14269, 3969, 62, 36, 41, 1330, 2829, 62, 34242, 355, 1612, 62, 10305, 198, 11748, 4738, 198, 11748, 10688, 198, 198, 21017, 41989, 628, 628 ]
3.243902
41
from django.urls import path from . import views urlpatterns = [ path('', views.Records, name ="fRec"), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 6690, 3669, 11, 1438, 796, 1, 69, 6690, 12340, 198, 60 ]
2.75
40
import pytest from spacy.training.example import Example from spacy.util import make_tempdir from spacy import util from thinc.api import Config TRAIN_DATA = [ ("I'm so happy.", {"cats": {"POSITIVE": 1.0, "NEGATIVE": 0.0}}), ("I'm so angry", {"cats": {"POSITIVE": 0.0, "NEGATIVE": 1.0}}), ] cfg_string = """ ...
[ 11748, 12972, 9288, 198, 6738, 599, 1590, 13, 34409, 13, 20688, 1330, 17934, 198, 6738, 599, 1590, 13, 22602, 1330, 787, 62, 29510, 15908, 198, 6738, 599, 1590, 1330, 7736, 198, 6738, 294, 1939, 13, 15042, 1330, 17056, 628, 198, 51, 3...
2.469565
345
import asyncio from ..core.common.io import input from .action_creator import ActionCreator
[ 11748, 30351, 952, 198, 198, 6738, 11485, 7295, 13, 11321, 13, 952, 1330, 5128, 198, 6738, 764, 2673, 62, 45382, 1330, 7561, 16719, 273, 628 ]
3.76
25
"""Trainining script for seq2seq text-to-speech synthesis model. usage: train.py [options] options: --data-root=<dir> Directory contains preprocessed features. --checkpoint-dir=<dir> Directory where to save model checkpoints [default: checkpoints]. --hparams=<parmas> Hyper param...
[ 37811, 44077, 3191, 4226, 329, 33756, 17, 41068, 2420, 12, 1462, 12, 45862, 21263, 2746, 13, 198, 198, 26060, 25, 4512, 13, 9078, 685, 25811, 60, 198, 198, 25811, 25, 198, 220, 220, 220, 1377, 7890, 12, 15763, 28, 27, 15908, 29, 220...
2.453939
3,897
#! /usr/bin/python2 import time start = time.time() import pygame, numpy import pygame.camera # Init display screen = pygame.display.set_mode((0,0), pygame.FULLSCREEN) pygame.display.set_caption("Magic Mirror") #pygame.mouse.set_visible(False) # Init font pygame.font.init() font_colour = 16, 117, 186 fonts = {40: p...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 17, 198, 11748, 640, 198, 9688, 796, 640, 13, 2435, 3419, 198, 198, 11748, 12972, 6057, 11, 299, 32152, 198, 11748, 12972, 6057, 13, 25695, 198, 198, 2, 44707, 3359, 198, 9612, 796, 12972, 605...
2.516755
567
""".. Ignore pydocstyle D400. ======= Resolwe ======= Open source enterprise dataflow engine in Django. """ from resolwe.__about__ import ( # noqa: F401 __author__, __copyright__, __email__, __license__, __summary__, __title__, __url__, __version__, )
[ 37811, 492, 41032, 279, 5173, 420, 7635, 360, 7029, 13, 198, 198, 1421, 18604, 198, 4965, 349, 732, 198, 1421, 18604, 198, 198, 11505, 2723, 13953, 1366, 11125, 3113, 287, 37770, 13, 198, 198, 37811, 198, 6738, 581, 349, 732, 13, 834,...
2.380165
121
# %% [markdown] # # Testing python-som with audio dataset # %% [markdown] # # Imports # %% import matplotlib.pyplot as plt # import librosa as lr # import librosa.display as lrdisp import numpy as np import pandas as pd import pickle import seaborn as sns import sklearn.preprocessing from python_som import SOM FILE...
[ 2, 43313, 685, 4102, 2902, 60, 198, 2, 1303, 23983, 21015, 12, 82, 296, 351, 6597, 27039, 198, 198, 2, 43313, 685, 4102, 2902, 60, 198, 2, 1303, 1846, 3742, 198, 198, 2, 43313, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, ...
2.073159
4,292
"""Prediction Engine - Update the data model with the most resent fixtures and results.""" from footy.domain import Competition
[ 37811, 39156, 2867, 7117, 532, 10133, 262, 1366, 2746, 351, 262, 749, 20315, 34609, 290, 2482, 526, 15931, 198, 198, 6738, 2366, 88, 13, 27830, 1330, 27348, 628 ]
4.642857
28
"""Script to embed pydeck examples into .rst pages with code These populate the files you see once you click into a grid cell on the pydeck gallery page """ from multiprocessing import Pool import os import subprocess import sys from const import DECKGL_URL_BASE, EXAMPLE_GLOB, GALLERY_DIR, HTML_DIR, HOSTED_STATIC_PAT...
[ 37811, 7391, 284, 11525, 12972, 35875, 6096, 656, 764, 81, 301, 5468, 351, 2438, 198, 198, 4711, 48040, 262, 3696, 345, 766, 1752, 345, 3904, 656, 257, 10706, 2685, 198, 261, 262, 12972, 35875, 15604, 2443, 198, 37811, 198, 6738, 18540,...
3.064356
202
import numpy as np import sympy as sp import re import os ###################### # # # 17 16 21 # # 18 15 22 # # 19 14 23 # # 20 01 24 # # 02 08 # # 03 09 # # 04 10 # # 05 11 # # 06 12 # # 07...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10558, 88, 355, 599, 198, 11748, 302, 198, 11748, 28686, 198, 198, 14468, 4242, 2235, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.156689
3,842
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key, misp_verifycert import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . if __name__ == '__main__': parser = argparse.ArgumentParser(description='Download latest events fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 279, 4948, 8802, 1330, 9485, 44, 1797, 47, 198, 6738, 8251, 1330, 2984, 79, 62, 6371, 11, 2984, 79, 62, ...
2.692833
293
from django.conf.urls import include, url from django.views.generic.base import TemplateView from . import views as core_views from .category.urls import urlpatterns as category_urls from .collection.urls import urlpatterns as collection_urls from .customer.urls import urlpatterns as customer_urls from .discount.urls ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 37350, 7680, 198, 198, 6738, 764, 1330, 5009, 355, 4755, 62, 33571, 198, 6738, 764, 22872, 13, 6371, 82...
2.905419
1,015
import os import sys import torch import yaml from functools import partial sys.path.append('../../../../') from trainers import trainer, frn_train from datasets import dataloaders from models.FRN import FRN args = trainer.train_parser() with open('../../../../config.yml', 'r') as f: temp = yaml.safe_load(f) data...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 28034, 198, 11748, 331, 43695, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 40720, 40720, 40720, 11537, 198, 6738, 28514, 1330, 21997, 11, 1216, 77, ...
2.199616
521
import argparse import argparse import os import numpy as np import torch from dataloaders.LoaderBase import LoaderBase import exp.feature.feature_utils as feature_utils if __name__ == '__main__': args = parse_args() if 'other_ranks' in args.rank_func: args.rank_func.remove('other_ranks') ...
[ 11748, 1822, 29572, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 4818, 282, 1170, 364, 13, 17401, 14881, 1330, 8778, 263, 14881, 198, 11748, 1033, 13, 30053, 13, ...
2.398148
216
from gym_pcgrl.envs.reps.representation3D import Representation3D from PIL import Image from gym import spaces import numpy as np from gym_pcgrl.envs.probs.minecraft.mc_render import reps_3D_render """ The wide representation where the agent can pick the tile position and tile value at each update. """
[ 6738, 11550, 62, 14751, 2164, 75, 13, 268, 14259, 13, 260, 862, 13, 15603, 341, 18, 35, 1330, 10858, 341, 18, 35, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 11550, 1330, 9029, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, ...
3.388889
90
"""This module contains the general information for AdaptorMenloQStats ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta
[ 37811, 1212, 8265, 4909, 262, 2276, 1321, 329, 30019, 273, 10418, 5439, 48, 29668, 1869, 1886, 10267, 526, 15931, 198, 198, 6738, 2644, 1229, 5796, 78, 1330, 1869, 1886, 10267, 198, 6738, 2644, 1229, 26675, 28961, 1330, 4270, 21746, 48526...
3.925926
54
import unittest import pytest from old_password import old_password import csv import re def test_password_with_space(): """ spaces in password are skipped """ assert old_password("pass word") == old_password("password") def test_password_with_tab(): """ tabs in password are skipped "...
[ 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 6738, 1468, 62, 28712, 1330, 1468, 62, 28712, 198, 198, 11748, 269, 21370, 198, 11748, 302, 628, 198, 198, 4299, 1332, 62, 28712, 62, 4480, 62, 13200, 33529, 198, 220, 220, 220, 3722...
3.07874
127
# -*- coding: utf-8 -*- """ ------------------------------------------------- Description : Author : cmy date 2020/1/2 ------------------------------------------------- """ import datetime import heapq import numpy as np import tensorflow as tf import time from metrics import ndcg_at_k from tra...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 198, 220, 220, 12489, 1058, 198, 220, 220, 6434, 1058, 220, 220, 220, 220, 220, 220, 269, 1820, 198, 220, 220, 3128, 220, 220, 220, 220, 220, ...
3.098958
192
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 28 19:28:17 2019 @author: Wanling Song """ import mdtraj as md import numpy as np import pandas as pd import argparse import sys from collections import defaultdict import pickle import os import matplotlib matplotlib.use('Agg') import matplotlib.p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2447, 2579, 678, 25, 2078, 25, 1558, 13130, 198, 198, 31, 9800, 25, 33242, 1359, 10...
2.756399
5,665
# RT by Rext from asyncio import run from discord import Intents, Status, Game, AllowedMentions from core.bot import RT from data import SECRET try: from uvloop import install except ModuleNotFoundError: ... else: install() intents = Intents.default() intents.message_content = True intents.members = True bot = RT...
[ 2, 11923, 416, 797, 742, 198, 198, 6738, 30351, 952, 1330, 1057, 198, 198, 6738, 36446, 1330, 2558, 658, 11, 12678, 11, 3776, 11, 1439, 6972, 44, 298, 507, 198, 198, 6738, 4755, 13, 13645, 1330, 11923, 198, 6738, 1366, 1330, 10729, ...
3.061798
178
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import uuid import random import math import time import typing as t from . import experiment as hip # Demos from the README. If one of those ...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, 198, 11748...
2.532138
669
"""Ingredient dto. """
[ 37811, 27682, 445, 1153, 288, 1462, 13, 198, 37811, 198 ]
2.3
10
import logging import groceries.api as groceries import barcodescanner.scan as barcode if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) main()
[ 11748, 18931, 198, 11748, 38464, 13, 15042, 355, 38464, 198, 11748, 2318, 19815, 3798, 272, 1008, 13, 35836, 355, 2318, 8189, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 18931, 13, 35487, ...
3.035088
57
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="easy-icm-runner", version="1.0.6", author="Bachir El Koussa", author_email="bgkoussa@gmail.com", description="A wrapper for IBM ICMs Scheduler API Calls", long_description=long_descrip...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.5
316
import unittest from molecule import onize_formula, update_equation_with_multiplier, flaten_formula, parse_molecule if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 27756, 1330, 319, 1096, 62, 687, 4712, 11, 4296, 62, 4853, 341, 62, 4480, 62, 47945, 959, 11, 6228, 268, 62, 687, 4712, 11, 21136, 62, 76, 2305, 23172, 628, 198, 361, 11593, 3672, 834, 6624, 7...
2.813559
59