content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Authors: Jonathan Huggins <jhuggins@mit.edu> # Trevor Campbell <tdjc@mit.edu> from __future__ import absolute_import, print_function import sys import csv import hashlib import pickle from warnings import warn import numpy as np import numpy.random as npr import scipy.sparse as sp import sklearn.datasets...
[ 2, 46665, 25, 11232, 367, 6837, 1040, 1279, 73, 71, 6837, 1040, 31, 2781, 13, 15532, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25389, 14327, 1279, 8671, 48055, 31, 2781, 13, 15532, 29, 198, 198, 6738, 11593, 37443, ...
2.174249
6,990
import os import django from distutils.version import StrictVersion DJANGO_VERSION = StrictVersion(django.get_version()) # Make filepaths relative to settings. ROOT = os.path.dirname(os.path.abspath(__file__)) path = lambda *a: os.path.join(ROOT, *a) DEBUG = True TEST_RUNNER = 'django.test.runner.DiscoverRunner' J...
[ 11748, 28686, 198, 11748, 42625, 14208, 198, 198, 6738, 1233, 26791, 13, 9641, 1330, 520, 2012, 14815, 198, 198, 35028, 1565, 11230, 62, 43717, 796, 520, 2012, 14815, 7, 28241, 14208, 13, 1136, 62, 9641, 28955, 198, 198, 2, 6889, 2393, ...
2.053254
1,352
"""This example showcase FastEstimator usage for tensorflow users. In this file, we use tf.dataset as data input. """ import numpy as np import tensorflow as tf from tensorflow.python.keras import Sequential, layers import fastestimator as fe from fastestimator.op.tensorop.loss import CrossEntropy from fastestimator.o...
[ 37811, 1212, 1672, 21742, 12549, 22362, 320, 1352, 8748, 329, 11192, 273, 11125, 2985, 13, 554, 428, 2393, 11, 356, 779, 48700, 13, 19608, 292, 316, 355, 1366, 5128, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192,...
3.260274
146
from tensorflow.keras.applications import InceptionV3 from tensorflow.keras.applications.imagenet_utils import preprocess_input, decode_predictions import numpy as np from tensorflow import keras from matplotlib import pyplot as plt from tensorflow.keras.preprocessing import image from tensorflow.keras import Input fro...
[ 6738, 11192, 273, 11125, 13, 6122, 292, 13, 1324, 677, 602, 1330, 554, 4516, 53, 18, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 1324, 677, 602, 13, 320, 11286, 316, 62, 26791, 1330, 662, 14681, 62, 15414, 11, 36899, 62, 28764,...
2.758865
423
import os import sys def get_project_path(): """ Return the path to the project root folder :return: The path to the project root folder """ return os.path.dirname(os.path.dirname(__file__)) def set_web_app_secret(): """ Replace the secret key in the web application Python source file ...
[ 11748, 28686, 198, 11748, 25064, 628, 198, 4299, 651, 62, 16302, 62, 6978, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8229, 262, 3108, 284, 262, 1628, 6808, 9483, 628, 220, 220, 220, 1058, 7783, 25, 383, 3108, 284, 262, 1...
2.324415
299
# -*- coding: utf-8 -*- from resources.lib import kodiutils from resources.lib import kodilogging from resources.lib.messenger.socketclient import SockClient as SocketClient import logging import time import xbmc import xbmcaddon from resources.lib.actions import execute ADDON = xbmcaddon.Addon() logg...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 4133, 13, 8019, 1330, 479, 23130, 26791, 201, 198, 6738, 4133, 13, 8019, 1330, 479, 375, 346, 30853, 201, 198, 6738, 4133, 13, 8019, 13, 37348, 65...
2.733813
139
import random from inventory import Inventory from skill import Skill from utility import Utility # POKEMING - GON'NA CATCH 'EM ALL # -- A simple hack 'n slash game in console # -- This class is handles all player related things # Default Constructor # This prints the player's current stats #...
[ 11748, 4738, 201, 198, 6738, 13184, 1330, 35772, 201, 198, 6738, 5032, 1330, 16023, 201, 198, 6738, 10361, 1330, 34030, 201, 198, 201, 198, 2, 350, 11380, 3620, 2751, 532, 402, 1340, 6, 4535, 327, 11417, 705, 3620, 11096, 201, 198, 2,...
3.424528
318
import time import grpc import threading from crawl_service import crawl_service_pb2 from crawl_service import crawl_service_pb2_grpc if __name__ == '__main__': start_new_thread(f, 'codeforces', 'ConanYu') start_new_thread(f, 'codeforces', 'ConanYu') start_new_thread(f, 'codeforces', 'ConanYu') st...
[ 11748, 640, 198, 11748, 1036, 14751, 198, 11748, 4704, 278, 198, 6738, 27318, 62, 15271, 1330, 27318, 62, 15271, 62, 40842, 17, 198, 6738, 27318, 62, 15271, 1330, 27318, 62, 15271, 62, 40842, 17, 62, 2164, 14751, 628, 628, 628, 198, 3...
2.306897
290
from ..core import BlockParser base_rules = [ (lambda x: ":GAP (global)" in x, _parse_bandgap) ] class Scf2Parser(BlockParser): """Parser for Wien2k's .scf2 file"""
[ 6738, 11485, 7295, 1330, 9726, 46677, 628, 198, 198, 8692, 62, 38785, 796, 685, 198, 220, 220, 220, 357, 50033, 2124, 25, 366, 25, 38, 2969, 357, 20541, 16725, 287, 2124, 11, 4808, 29572, 62, 3903, 43554, 8, 198, 60, 628, 198, 4871,...
2.542857
70
# -*- coding: utf-8 -*- """Top-level package for pdtimeout.""" __author__ = """Hugo Perrier""" __email__ = 'hperrier@quantmetry.com' __version__ = '0.1.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9126, 12, 5715, 5301, 329, 279, 67, 48678, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 48098, 78, 2448, 5277, 37811, 198, 834, 12888, 834, 796, 705, ...
2.378788
66
# coding:utf-8 import time from urllib import parse import logging from .SQLMap import SQLMap, CONTENT_STATUS, CONTENT_TYPE DEFAULT_LEVEL = 1
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 11748, 640, 198, 6738, 2956, 297, 571, 1330, 21136, 198, 11748, 18931, 198, 198, 6738, 764, 17861, 13912, 1330, 16363, 13912, 11, 22904, 3525, 62, 35744, 2937, 11, 22904, 3525, 62, 25216, 198, 19...
2.92
50
import torch from models.layers import Embedding, Linear, FactorizationMachine class HOFMModel(torch.nn.Module): """ Model: Higher-Order Factorization Machines Ref: M Blondel, et al. Higher-Order Factorization Machines, 2016. """ def forward(self, x): """ :param x: {'ids': Lo...
[ 11748, 28034, 198, 6738, 4981, 13, 75, 6962, 1330, 13302, 6048, 278, 11, 44800, 11, 27929, 1634, 37573, 198, 198, 4871, 367, 19238, 44, 17633, 7, 13165, 354, 13, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
1.977444
399
for _ in range(int(input())): n=int(input()) L=[2**(i+1) for i in range(n)] #I want an extra 1 @l[0] to make it less w=[0,0] L=[2**(i+1) for i in range(n)] L[n//2 -1],L[-1]=L[-1],L[n//2 -1] for i in range(n): if i<(n//2): w[0]+=L[i] else: w[1]+=...
[ 1640, 4808, 220, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 201, 198, 220, 220, 220, 299, 28, 600, 7, 15414, 28955, 201, 198, 220, 220, 220, 406, 41888, 17, 1174, 7, 72, 10, 16, 8, 329, 1312, 287, 2837, 7, 77, 15437, 1303, 40, ...
1.619048
336
import esprima import glob import os from copy import deepcopy
[ 11748, 1658, 1050, 8083, 198, 11748, 15095, 198, 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 628 ]
3.764706
17
from arekit.common.folding.base import BaseDataFolding class NoFolding(BaseDataFolding): """ The case of absent folding in experiment. """ @property def get_current_state(self): """ Returns in order to be compatible with cv-based experiment format. """ return "0"
[ 6738, 389, 15813, 13, 11321, 13, 11379, 278, 13, 8692, 1330, 7308, 6601, 37, 33266, 628, 198, 4871, 1400, 37, 33266, 7, 14881, 6601, 37, 33266, 2599, 198, 220, 220, 220, 37227, 383, 1339, 286, 13717, 29909, 287, 6306, 13, 198, 220, ...
2.825688
109
import tornado.web from pushpy_examples.client.ex_push_manager import ExamplePushManager from client.simple_interpreter import Interpreter, Adder, Multiplier m = ExamplePushManager() m.connect() repl_code_store = m.repl_code_store() repl_code_store.update({ "interpreter.Interpreter": Interpreter, "interpret...
[ 11748, 33718, 13, 12384, 198, 198, 6738, 4574, 9078, 62, 1069, 12629, 13, 16366, 13, 1069, 62, 14689, 62, 37153, 1330, 17934, 49222, 13511, 198, 6738, 5456, 13, 36439, 62, 3849, 3866, 353, 1330, 4225, 3866, 353, 11, 1215, 1082, 11, 15...
2.733333
210
import json import logger import os import random from datetime import date from dotenv import load_dotenv from sys import exit import discord from discord.ext import commands, tasks from discord.utils import get log = logger.setup_applevel_logger(file_name = 'app_debug.log') load_dotenv() TOKEN = os.getenv('DISC...
[ 11748, 33918, 198, 11748, 49706, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 25064, 1330, 8420, 198, 198, 11748, 36446, 198, 6738, 36446, 1...
2.450248
2,623
import time import requests import os from os import path import cv2 import numpy as np from aperturedb import ParallelLoader from aperturedb import CSVParser from aperturedb import ProgressBar HEADER_PATH = "filename" HEADER_URL = "url" class ImageDownloaderCSV(CSVParser.CSVParser): ''' ApertureDB Im...
[ 11748, 640, 198, 11748, 7007, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 257, 11766, 1522, 65, 1330, 42945, 17401, 198, 6738, 257, 11766, 1522, 65, ...
2.796703
182
from unittest import TestCase from unittest.mock import MagicMock import pytest from kubernetes import client from libs.api import API_KEY_NAME from scheduler.spawners.templates.env_vars import ( get_env_var, get_from_app_secret, get_resources_env_vars, get_service_env_vars ) @pytest.mark.spawner_m...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 479, 18478, 3262, 274, 1330, 5456, 198, 198, 6738, 9195, 82, 13, 15042, 1330, 7824, 62...
2.592
125
import matplotlib.pyplot as plt import numpy as np import seaborn as sns sns.reset_orig()
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 82, 5907, 13, 42503, 62, 11612, 3419, 198 ]
2.727273
33
"""Entity Xplora® Watch.""" from __future__ import annotations import logging from datetime import timedelta from typing import Any, Dict from homeassistant.components.switch import SwitchEntity from homeassistant.helpers.restore_state import RestoreEntity from .helper import XploraUpdateTime from pyxplora_api imp...
[ 37811, 32398, 1395, 489, 5799, 7461, 6305, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 6738, 1363, ...
3.305085
118
""" Unit test for Treadmill apptrace events module. """ import unittest import mock from treadmill.apptrace import events class AppTraceEventsTest(unittest.TestCase): """Test all event classes operations. """ @mock.patch('treadmill.apptrace.events.AbortedTraceEvent.from_data', mock.Moc...
[ 37811, 198, 26453, 1332, 329, 309, 961, 17805, 598, 40546, 2995, 8265, 13, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 198, 11748, 15290, 198, 198, 6738, 49246, 13, 1324, 40546, 1330, 2995, 628, 198, 4871, 2034, 2898, 558, 37103, ...
1.639959
8,774
""" Tests for plotdirective build using sphinx extensions Test ability to combine plot_directive with mathcode """ from os.path import dirname, join as pjoin import re import sphinx SPHINX_1p8 = sphinx.version_info[:2] >= (1, 8) from sphinxtesters import PageBuilder from texext.tests.test_plotdirective import EXP_...
[ 37811, 30307, 329, 7110, 12942, 425, 1382, 1262, 599, 20079, 87, 18366, 198, 198, 14402, 2694, 284, 12082, 7110, 62, 12942, 425, 351, 10688, 8189, 198, 37811, 198, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 4654, 355, 279, 22179...
2.946565
131
# Copyright (c) 2020 # [This program is licensed under the "MIT License"] # Please see the file LICENSE in the source # distribution of this software for license terms. import pygame as pg
[ 2, 15069, 357, 66, 8, 12131, 198, 2, 685, 1212, 1430, 318, 11971, 739, 262, 366, 36393, 13789, 8973, 198, 2, 4222, 766, 262, 2393, 38559, 24290, 287, 262, 2723, 198, 2, 6082, 286, 428, 3788, 329, 5964, 2846, 13, 198, 198, 11748, 1...
3.979167
48
"""Tests for the features module.""" import numpy as np from aroma import features def test_feature_time_series(mel_mix, mc, max_correls): """Test the feature_time_series feature against pre-calculated values.""" np.random.seed(1) # Read mel_mix mel_mix = np.loadtxt(mel_mix) # Run feature_time_s...
[ 37811, 51, 3558, 329, 262, 3033, 8265, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 31242, 1330, 3033, 628, 198, 4299, 1332, 62, 30053, 62, 2435, 62, 25076, 7, 17694, 62, 19816, 11, 36650, 11, 3509, 62, 10215, 2411, 82, ...
2.524155
828
import pytest from alive_progress.animations.spinners import alongside_spinner_factory, \ bouncing_spinner_factory, delayed_spinner_factory, frame_spinner_factory, \ scrolling_spinner_factory, sequential_spinner_factory from alive_progress.utils.cells import join_cells @pytest.mark.parametrize('frames, expec...
[ 11748, 12972, 9288, 198, 198, 6738, 6776, 62, 33723, 13, 11227, 602, 13, 39706, 2741, 1330, 7848, 62, 2777, 5083, 62, 69, 9548, 11, 3467, 198, 220, 220, 220, 30713, 62, 2777, 5083, 62, 69, 9548, 11, 11038, 62, 2777, 5083, 62, 69, ...
1.87513
2,891
#!/usr/bin/python # -*- coding: UTF-8 -*- import logging import datetime import smtplib import os import subprocess class ZpjUtils(object): ''' 一个工具类 ''' def __init__(self): ''' Constructor ''' begin_work_time = datetime.datetime.now() smtp = None ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 18931, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 895, 83, 489, 571, 201, 198, 11748, 28686, 201, ...
1.376168
428
from typing import Union, List from scriptable.api import AST from scriptable.api.ast_binding import ASTBinding DataType = Union[int, float]
[ 6738, 19720, 1330, 4479, 11, 7343, 198, 198, 6738, 4226, 540, 13, 15042, 1330, 29273, 198, 6738, 4226, 540, 13, 15042, 13, 459, 62, 30786, 1330, 29273, 33, 6020, 198, 198, 6601, 6030, 796, 4479, 58, 600, 11, 12178, 60, 628 ]
3.512195
41
import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from config import config # Create instances of necessary Flask extensions. db = SQLAlchemy() migrate = Migrate() # Import the models s...
[ 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 198, 6738, 663, 38537, 516, 1330, 5045, 276, 40386, 13908, 11712, 1300...
3.97
100
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in th...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 220, 220, 921, 743, ...
3.630252
238
import numpy as np from datetime import datetime, timedelta import json import os start_work = 9 * 60 * 60 # Work start from 9:00. unit: second end_work = 17 * 60 * 60 # Work end at 17:00. unit: second daily_report = 16 * 60 * 60 # Daily progress report at 16:00, in meeting room daily_report_mean = 15 * 60 # Daily...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 9688, 62, 1818, 796, 860, 1635, 3126, 1635, 3126, 220, 1303, 5521, 923, 422, 860, 25, 405, 13, 4...
1.678378
3,501
#!/usr/bin/env python3 from os import path import sys, subprocess, argparse parser = argparse.ArgumentParser(description='Automates the process of evaluating a word embedding.') parser.add_argument('file', type=str, help='Word embedding file.') parser.add_argument('-skip-regen', '--skip-regen', action='store_false', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 28686, 1330, 3108, 198, 11748, 25064, 11, 850, 14681, 11, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 38062, 689, 262, 1429, ...
2.790503
2,148
# -*- coding: utf-8 -*- """rpg_queries.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ufwd5h-epfNkHGiNJTkFTDQsbupk24Ld """ #How many total characters are there? import sqlite3 conn = sqlite3.connect('rpg_db.sqlite3') curs = conn.cursor() #How...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 81, 6024, 62, 421, 10640, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, ...
2.998213
2,239
# -*- coding: utf-8 -*- # # Author: Taylor Smith <taylor.smith@alkaline-ml.com> # # R approx function from __future__ import absolute_import from sklearn.utils.validation import check_array, column_or_1d import numpy as np from ..utils.array import c from ..utils import get_callable from ..compat.numpy import DTYPE ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 6434, 25, 8121, 4176, 1279, 83, 7167, 13, 21453, 31, 971, 20663, 12, 4029, 13, 785, 29, 198, 2, 198, 2, 371, 5561, 2163, 198, 198, 6738, 11593, 37443, 8...
2.54136
2,309
from pathlib import Path from common.observer import Observable if __name__ == '__main__': m = Model() test_path = Path.home().resolve() m.collect_metrics(str(test_path), [str(Path('.').resolve())], 'test.json')
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 2219, 13, 672, 15388, 1330, 19243, 540, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 285, 796, 9104, 3419, 198, 220, 220, 220, 1332, 62, ...
2.682353
85
"""Schemas linked to the database models""" import re from marshmallow import post_dump from marshmallow_sqlalchemy import ModelSchema class BaseSchema(ModelSchema): """ Custom base schema class that serializes datetime strings without the timezone offset. """ @post_dump def strip_timezone_of...
[ 37811, 27054, 5356, 6692, 284, 262, 6831, 4981, 37811, 198, 11748, 302, 198, 6738, 22397, 42725, 1330, 1281, 62, 39455, 198, 6738, 22397, 42725, 62, 25410, 282, 26599, 1330, 9104, 27054, 2611, 628, 198, 4871, 7308, 27054, 2611, 7, 17633, ...
2.052342
363
""" Write your own datasets under this directory. """
[ 37811, 198, 16594, 534, 898, 40522, 739, 428, 8619, 13, 198, 37811 ]
4.416667
12
from ..common.solver import BaseSolver, DEFAULT_BATCH_SIZE, DEFAULT_MAX_BATCHES from . import libmpopt_qap as lib from . primals import Primals import numpy DEFAULT_GREEDY_GENERATIONS = 10 INFINITY_COST = 1e99
[ 6738, 11485, 11321, 13, 82, 14375, 1330, 7308, 50, 14375, 11, 5550, 38865, 62, 33, 11417, 62, 33489, 11, 5550, 38865, 62, 22921, 62, 33, 11417, 1546, 198, 6738, 764, 1330, 9195, 3149, 8738, 62, 80, 499, 355, 9195, 198, 6738, 764, 26...
2.703704
81
from django import forms from django.db.models import Q from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType import django_filters from actstream.models import Action from rest_framework import serializers, viewsets, permissions, mixins, status from rest_framework.deco...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 13...
3.568966
232
"""Asyncio backports for Python 3.6 compatibility.""" from asyncio import coroutines, ensure_future from asyncio.events import AbstractEventLoop import concurrent.futures import logging import threading from typing import Any, Callable, Coroutine _LOGGER = logging.getLogger(__name__) def fire_coroutine_threadsafe(co...
[ 37811, 42367, 952, 736, 3742, 329, 11361, 513, 13, 21, 17764, 526, 15931, 198, 6738, 30351, 952, 1330, 1162, 448, 1127, 11, 4155, 62, 37443, 198, 6738, 30351, 952, 13, 31534, 1330, 27741, 9237, 39516, 198, 11748, 24580, 13, 69, 315, 9...
2.863636
704
"""Tests""" from hangman import check_letter, reveal_letter, print_result def test_check_letter(): """check_letter""" assert check_letter("world", "a") == 0 def test_reveal_letter(): """reveal_letter""" assert reveal_letter("te", ['*', 'e'], "t") == ['t', 'e'] def test_print_result(): """test ...
[ 37811, 51, 3558, 37811, 198, 6738, 8181, 805, 1330, 2198, 62, 9291, 11, 7766, 62, 9291, 11, 3601, 62, 20274, 628, 198, 4299, 1332, 62, 9122, 62, 9291, 33529, 198, 220, 220, 220, 37227, 9122, 62, 9291, 37811, 198, 220, 220, 220, 6818...
2.744526
137
# coding: utf-8 from __future__ import print_function import numpy as np import pandas as pd import os import json import re from pep_detectability import PeptideDetectabilityTrainer from pep_detectability import PeptideDetectabilityPredictor working_dir = '.' filenames_positive = [ f for f in os....
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 302, 198, 198, 6738, 279, ...
2.130068
1,899
"""Various `lstm_ee.data.data_loader` tests"""
[ 37811, 40009, 4600, 75, 301, 76, 62, 1453, 13, 7890, 13, 7890, 62, 29356, 63, 5254, 37811, 628 ]
2.666667
18
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
from leetcode_tester import Tester from src.binary_tree import TreeNode, null from typing import Optional, List if __name__ == '__main__': solution = Solution() test = Tester(solution.maxDepth) test.addTest( TreeNode.from_list([3, 9, 20, null, null, 15, 7]), 3 ) test.addTest( Tr...
[ 6738, 443, 316, 8189, 62, 4879, 353, 1330, 309, 7834, 198, 6738, 12351, 13, 39491, 62, 21048, 1330, 12200, 19667, 11, 9242, 198, 198, 6738, 19720, 1330, 32233, 11, 7343, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834...
2.423077
156
from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import ListView from reviewer.models import Reviewer
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 37823, 13, 27530, 1330, 6602, 263, 628 ]
3.833333
36
"""CKAN module is a wrapper around API calls. All of these methods will return raw json objects. The JSON that is returned can be used to construct CKANData objects. CKANData objects can be compared with one another. They will use the CKANTransform methods to identify fields that should and should not be used to co...
[ 37811, 34, 42, 1565, 8265, 318, 257, 29908, 1088, 7824, 3848, 13, 220, 1439, 286, 777, 5050, 481, 1441, 198, 1831, 33918, 5563, 13, 220, 383, 19449, 326, 318, 4504, 460, 307, 973, 284, 5678, 45233, 1565, 6601, 198, 48205, 13, 198, 1...
2.546033
8,179
from django.core.management import BaseCommand from devicedata.generic import _get_provider from devices.models import Device
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 7308, 21575, 198, 198, 6738, 1614, 3711, 1045, 13, 41357, 1330, 4808, 1136, 62, 15234, 1304, 198, 6738, 4410, 13, 27530, 1330, 16232, 628 ]
4
32
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2007 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 27156, 27156, 27156, 27156, 15116, 8728, 4907, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.733198
491
#!/usr/bin/env python #-*- coding=utf-8 -*- # # Copyright 2012 Jike Inc. All Rights Reserved. # Author: liwei@jike.com from StringIO import StringIO file = '/etc/passwd' lines = open(file, 'r').readlines() text = open(file, 'r').read() f = StringIO() for line in lines[:-2]: f.writelines(line) f.writelines(lines[-2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 449, 522, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 6434, 25, 7649, 42990, 31, 73, 522, 13, 785,...
2.495455
220
# # Stock Ticker server # Binds PUB socket to tcp://*:5556 # Publishes random stock updates # import zmq import time import random context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:5556") scrips = ['AAPL', 'GOOG', 'MSFT', 'AMZN'] while True: scrip = random.choice(scrips) pri...
[ 2, 198, 2, 220, 220, 10500, 309, 15799, 4382, 198, 2, 220, 220, 41211, 82, 350, 10526, 17802, 284, 48265, 1378, 47026, 2816, 3980, 198, 2, 220, 220, 8525, 19724, 4738, 4283, 5992, 198, 2, 198, 198, 11748, 1976, 76, 80, 198, 11748, ...
2.333333
189
""" WAMP messages definitions and serializers. Compatible with WAMP Document Revision: RC3, 2014/08/25, available at: https://github.com/tavendo/WAMP/blob/master/spec/basic.md """ import json import msgpack import uuid from copy import deepcopy from enum import IntEnum, Enum from io import BytesIO from base64 import ...
[ 37811, 198, 54, 23518, 6218, 17336, 290, 11389, 11341, 13, 198, 198, 7293, 16873, 351, 370, 23518, 16854, 46604, 25, 13987, 18, 11, 1946, 14, 2919, 14, 1495, 11, 1695, 379, 25, 198, 5450, 1378, 12567, 13, 785, 14, 83, 615, 31110, 14...
2.444271
5,132
import urllib from oauth2 import OAuth2Request import re from json_import import simplejson re_path_template = re.compile('{\w+}')
[ 11748, 2956, 297, 571, 198, 6738, 267, 18439, 17, 1330, 440, 30515, 17, 18453, 198, 11748, 302, 198, 6738, 33918, 62, 11748, 1330, 2829, 17752, 198, 198, 260, 62, 6978, 62, 28243, 796, 302, 13, 5589, 576, 10786, 31478, 86, 10, 92, 1...
2.956522
46
#!/usr/bin/env python from pathlib import Path import unicodedata output = [] filename = Path(__file__).parent.resolve() / "data/books.tsv" with open(filename) as handle: lines = handle.readlines() # lines will contain a row for each line in the file # Loop through lines and do data scrubbing, put each result ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28000, 9043, 1045, 198, 198, 22915, 796, 17635, 198, 34345, 796, 10644, 7, 834, 7753, 834, 737, 8000, 13, 411, 6442, 3419, 1220, 366, 78...
2.307071
495
#!/usr/bin/env python3 # Copyright 2020, Verizon Media # Licensed under the terms of the MIT license. See LICENSE file in project root for terms. import binascii import serial import subprocess import sys in_serport = sys.argv[1] in_fn = sys.argv[2] with open(in_fn, 'rb') as f: payload = f.read() ser = serial.Ser...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 12131, 11, 18062, 6343, 198, 2, 49962, 739, 262, 2846, 286, 262, 17168, 5964, 13, 4091, 38559, 24290, 2393, 287, 1628, 6808, 329, 2846, 13, 198, 198, 11748, 9874, ...
2.707792
154
from app import app, db from app.models import User, Channel @app.shell_context_processor
[ 6738, 598, 1330, 598, 11, 20613, 198, 6738, 598, 13, 27530, 1330, 11787, 11, 11102, 198, 198, 31, 1324, 13, 29149, 62, 22866, 62, 41341 ]
3.6
25
from random import randint from skills_ml.algorithms.nlp import clean_html, clean_str, lowercase_strip_punc, word_tokenize, sentence_tokenize, section_extract, strip_bullets_from_line from gensim.models.doc2vec import TaggedDocument from skills_utils.common import safe_get class CorpusCreator(object): """ ...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 4678, 62, 4029, 13, 282, 7727, 907, 13, 21283, 79, 1330, 3424, 62, 6494, 11, 3424, 62, 2536, 11, 2793, 7442, 62, 36311, 62, 79, 19524, 11, 1573, 62, 30001, 1096, 11, 6827, 62, 30001, 1096, ...
3.007806
1,153
# encoding: utf-8 from __future__ import unicode_literals from datetime import datetime, timedelta from mongoengine import (Document, ListField, StringField, BooleanField, DateTimeField, Embedd...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 285, 25162, 18392, 1330, 357, 24941, 11, 198, 220, 220, ...
1.808511
329
from tkinter import Button, messagebox from abc import ABCMeta, abstractmethod from src.tictactoe.game.Board import Board
[ 6738, 256, 74, 3849, 1330, 220, 20969, 11, 3275, 3524, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 12351, 13, 83, 713, 529, 2577, 13, 6057, 13, 29828, 1330, 5926, 628 ]
3.542857
35
# List of Builtins referred from here: https://docs.python.org/3/library/functions.html # xa = oct(10) import os import glob # print(xa, (type(xa)), sep="\n") xa = ["xa", "pranali", "srushti", "shailesh", "nimesh"] xa = [idx.upper() for idx in xa] # ya = xa.copy() # za = [] # for idx in xa: # za.append(idx.upper...
[ 2, 7343, 286, 28477, 1040, 6412, 422, 994, 25, 3740, 1378, 31628, 13, 29412, 13, 2398, 14, 18, 14, 32016, 14, 12543, 2733, 13, 6494, 198, 198, 2, 2124, 64, 796, 19318, 7, 940, 8, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 198...
2.308571
175
import discord from discord.commands.commands import Option, OptionChoice from discord.commands.context import ApplicationContext from discord.ext import commands, pages from discord.ext.commands import BucketType, cooldown import asyncio import random import schedule from Utilities import AssociationObje...
[ 11748, 36446, 201, 198, 6738, 36446, 13, 9503, 1746, 13, 9503, 1746, 1330, 16018, 11, 16018, 46770, 201, 198, 6738, 36446, 13, 9503, 1746, 13, 22866, 1330, 15678, 21947, 201, 198, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 5468, ...
2.108732
1,775
__version__ = '0.7.7' __author__ = 'Jimmy Liu' """ for trading data """ from tushare_trader.stock.trading import (get_hist_data, get_tick_data, get_today_all, get_realtime_quotes, get_h_data, get_today_ticks, ...
[ 834, 9641, 834, 796, 705, 15, 13, 22, 13, 22, 6, 201, 198, 834, 9800, 834, 796, 705, 40335, 18258, 6, 201, 198, 37811, 201, 198, 1640, 7313, 1366, 201, 198, 37811, 201, 198, 6738, 256, 1530, 533, 62, 2213, 5067, 13, 13578, 13, 2...
1.692589
2,186
from django.contrib import admin from django_mptt_admin.admin import DjangoMpttAdmin from menus.models import SystemMenu admin.site.register(SystemMenu, SystemMenuAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 62, 76, 457, 83, 62, 28482, 13, 28482, 1330, 37770, 44, 457, 83, 46787, 198, 6738, 26798, 13, 27530, 1330, 4482, 23381, 628, 198, 28482, 13, 15654, 13, 30238, 7,...
3.44
50
## import requests tmp2='http://pics5.baidu.com/feed/38dbb6fd5266d0164f8e49cdd24aa40234fa3522.jpeg?token=c2cbcc6f929b40eb8881ceb4746c0e8c&s=1994CB1452725B94340248850300F0AB' print(tmp2) r = requests.get(tmp2) with open('tmp.jpg', 'wb') as f: f.write(r.content) ## print("1111111111") print("1111111111") print("11111...
[ 2235, 198, 11748, 7007, 198, 22065, 17, 11639, 4023, 1378, 79, 873, 20, 13, 65, 1698, 84, 13, 785, 14, 12363, 14, 2548, 9945, 65, 21, 16344, 20, 25540, 67, 486, 2414, 69, 23, 68, 2920, 66, 1860, 1731, 7252, 1821, 24409, 13331, 232...
2.345238
252
# -*- coding: utf-8 -*- """ =============================================================================== Copyright (c) 2021 Kouadio K. Laurent 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 wi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 23926, 25609, 18604, 198, 15269, 357, 66, 8, 33448, 30559, 324, 952, 509, 13, 39734, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, ...
2.025714
18,745
import unittest import os import shutil
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 4423, 346, 198 ]
3.333333
12
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # 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 applicab...
[ 2, 220, 15069, 12131, 12, 1238, 1828, 5199, 14548, 354, 1879, 7854, 20626, 402, 2022, 39, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 4...
2.337569
9,601
from app.commands.create_admin import *
[ 6738, 598, 13, 9503, 1746, 13, 17953, 62, 28482, 1330, 1635, 198 ]
3.333333
12
from django.db import models from django.utils.translation import ugettext_lazy as _ from pyconde.conference.models import Conference, CurrentConferenceManager
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 12972, 66, 14378, 13, 41124, 13, 27530, 1330, 8785, 11, 9236, 3103, 4288, 13511, ...
3.857143
42
# -*- coding: utf-8 -*- import optparse import os import sys import getpass import json import hashlib import smtplib import commands import subprocess import shutil # import appicon_generate from xcode_build_module import XCodeBuild #主函数 current_work_path=os.getcwd() projecttest_path=current_work_path+"/project_test...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2172, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 651, 6603, 198, 11748, 33918, 198, 11748, 12234, 8019, 198, 11748, 895, 83, 489, 571, 198, 11748, 972...
2.505435
368
from defs import * import random import miscellaneous import pathfinding from _custom_constants import * from structure_display import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 's...
[ 6738, 825, 82, 1330, 1635, 198, 11748, 4738, 198, 11748, 2984, 25673, 198, 11748, 3108, 41070, 198, 6738, 4808, 23144, 62, 9979, 1187, 1330, 1635, 198, 6738, 4645, 62, 13812, 1330, 1635, 198, 198, 834, 1050, 363, 2611, 834, 10786, 3919,...
1.130868
703
""" Remove columns from a KGTK file. """ from argparse import Namespace, SUPPRESS import typing from kgtk.cli_argparse import KGTKArgumentParser, KGTKFiles def add_arguments_extended(parser: KGTKArgumentParser, parsed_shared_args: Namespace): """ Parse arguments Args: parser (argparse.ArgumentPar...
[ 37811, 198, 27914, 15180, 422, 257, 509, 19555, 42, 2393, 13, 198, 37811, 198, 6738, 1822, 29572, 1330, 28531, 10223, 11, 19549, 32761, 198, 11748, 19720, 198, 198, 6738, 479, 13655, 74, 13, 44506, 62, 853, 29572, 1330, 509, 19555, 42, ...
2.504775
733
""" """ from display import Display from load import Loader from game import Game class Initializer: """ The class that handles the program before a game is launched. """
[ 37811, 198, 198, 37811, 628, 198, 6738, 3359, 1330, 16531, 198, 6738, 3440, 1330, 8778, 263, 198, 6738, 983, 1330, 3776, 628, 198, 4871, 20768, 7509, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 1398, 326, 17105, 262, 1430,...
3.428571
56
#171602012 - Ender Yılmaz #Bilişim Sistemleri Mühendisliği #Elektronik Komponent Kayıt Kontrol Sistemi from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 1558, 14198, 6999, 532, 45322, 575, 30102, 75, 76, 1031, 198, 2, 33, 2403, 46481, 320, 311, 396, 368, 1754, 72, 40790, 15631, 3044, 72, 33133, 72, 198, 2, 28827, 21841, 1313, 1134, 509, 3361, 3471, 17356, 30102, 83, 509, 756, 322...
2.265625
64
import numpy as np def chunkify(tsd, seq_len): """ Splits a TimeSeriesDataset into chunks of length seq_len Args: tsd: TimeSeriesDataset object seq_len: length of the subsequences to return Returns: numpy arrays with chunks of size seq_len """ x, y = [], [] for s in tsd...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 16058, 1958, 7, 912, 67, 11, 33756, 62, 11925, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 13341, 896, 257, 3862, 27996, 27354, 292, 316, 656, 22716, 286, 4129, 33756, 62, 11925,...
2.078652
267
import cv2 import uuid import os # tar为目标车牌号的后4位
[ 11748, 269, 85, 17, 198, 11748, 334, 27112, 198, 11748, 28686, 628, 198, 198, 2, 13422, 10310, 118, 33566, 106, 43718, 229, 164, 121, 99, 31965, 234, 20998, 115, 21410, 28938, 236, 19, 19526, 235, 628 ]
1.472222
36
from .logs import * from .pull import * from .build import * from .clean import * from .prune import * from .test import * from .watch import * from .jooq import * from .dbpw import *
[ 6738, 764, 6404, 82, 1330, 1635, 198, 6738, 764, 31216, 1330, 1635, 198, 6738, 764, 11249, 1330, 1635, 198, 6738, 764, 27773, 1330, 1635, 198, 6738, 764, 1050, 1726, 1330, 1635, 198, 6738, 764, 9288, 1330, 1635, 198, 6738, 764, 8340, ...
3.101695
59
# -*- coding: utf-8 -*- # Scrapy settings for douban project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1446, 2416, 88, 6460, 329, 3385, 272, 1628, 198, 2, 198, 2, 1114, 21654, 11, 428, 2393, 4909, 691, 6460, 3177, 1593, 393, 198, 2, 8811, 973, 13, 921, 460, ...
2.277846
817
import os from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 628 ]
3.46875
32
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ =============== eJWST TAP tests =============== European Space Astronomy Centre (ESAC) European Space Agency (ESA) """ import os import shutil from unittest.mock import MagicMock import astropy.units as u import numpy as np import pytest from astrop...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 25609, 18604, 198, 68, 41, 54, 2257, 309, 2969, 5254, 198, 25609, 18604, 198, 198, 22030, 4687, 25398, 9145, 9072, ...
3.015075
398
import os import sys sys.path.insert(0, os.path.abspath(".")) project = "aizynthfinder" copyright = "2020-2022, Molecular AI group" author = "Molecular AI group" release = "3.3.0" # This make sure that the cli_help.txt file is properly formated with open("cli_help.txt", "r") as fileobj: lines = fileobj.read().sp...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 7203, 526, 4008, 198, 198, 16302, 796, 366, 64, 528, 2047, 400, 22805, 1, 198, 22163, 4766, 796, 366, 42334, 12, ...
2.632143
280
import _tkinter from turtle import Turtle, Screen import random tim = Turtle() tim.shape("turtle") tim.color("red") tim.speed("fastest") # r = random.random() # b = random.random() # g = random.random() # rgb = (random.random(), random.random(), random.random()) draw_spirograph(5) # for shape_sides_n in range(3,...
[ 11748, 4808, 30488, 3849, 198, 6738, 28699, 1330, 33137, 11, 15216, 198, 11748, 4738, 198, 198, 16514, 796, 33137, 3419, 198, 16514, 13, 43358, 7203, 83, 17964, 4943, 198, 16514, 13, 8043, 7203, 445, 4943, 198, 16514, 13, 12287, 7203, 7...
2.622642
212
from dataclasses import dataclass, field from typing import Optional from transformers import ( TrainingArguments ) @dataclass class ModelArguments: """ Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch. """ model_nick: Optional[str] = field...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 6121, 364, 1330, 357, 198, 220, 220, 220, 13614, 28100, 2886, 198, 220, 1267, 628, 198, 198, 31, 19608, 330, 31172, 198, 4871, 91...
2.595602
1,046
from project import motor from project import variables # My Blocks from lower_pen import lower_pen from lift_pen import lift_pen
[ 198, 6738, 1628, 1330, 5584, 198, 6738, 1628, 1330, 9633, 198, 198, 2, 2011, 35111, 198, 6738, 2793, 62, 3617, 1330, 2793, 62, 3617, 198, 6738, 10303, 62, 3617, 1330, 10303, 62, 3617, 628 ]
3.911765
34
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: BlackXploits # Telegram: @BlackXploits # Please don't delete this COPYRIGHT import argparse import subprocess import signal import Queue import time from threading import Thread, Lock from sys import argv, stdout from os import getpid, kill w = '\033[0m' y = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 2619, 55, 489, 78, 896, 198, 2, 50203, 25, 2488, 9915, 55, 489, 78, 896, 198, 198, 2, 4222, 836, 470...
2.411529
1,249
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>>=======30 Days of Code/Day 2/Operators.py ====== 12.00 20 8 15 >>>
[ 37906, 513, 13, 23, 13, 16, 357, 31499, 14, 85, 18, 13, 23, 13, 16, 25, 16, 65, 31675, 65, 21, 11, 4280, 1248, 13130, 11, 2242, 25, 1157, 25, 3510, 8, 685, 5653, 34, 410, 13, 1129, 1433, 5598, 1643, 357, 28075, 2414, 15437, 31...
2.223214
112
# Copyright 2018 The TensorFlow Probability Authors. # # 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 o...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 30873, 1799, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.222397
634
from django.conf.urls import url from django.contrib.staticfiles import views as static_views from django.conf.urls.static import static from django.conf import settings import jobs.views as views from django.views.generic import ListView,DetailView from jobs.models import Job from rest_framework.urlpatterns import for...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 12708, 16624, 1330, 5009, 355, 9037, 62, 33571, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, ...
2.474926
339
# Sorts y coordinate first, then x. if __name__ == "__main__": main()
[ 198, 198, 2, 311, 2096, 331, 20435, 717, 11, 788, 2124, 13, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.5
32
import argparse import json import pprint import pygerduty import time import yaml parser = argparse.ArgumentParser(description="Simple argument parser") parser.add_argument("-config", type=str, required=False, help="The location of a file containing a JSON payload.") parser.add_argument("-payload", type=str, ...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 279, 4798, 198, 11748, 12972, 1362, 26278, 198, 11748, 640, 198, 11748, 331, 43695, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 26437, 4578, 30751, 4943, 19...
2.655348
589
INPUTPATH = "input.txt" #INPUTPATH = "input-test.txt" with open(INPUTPATH) as ifile: raw = ifile.read() commands = tuple(map(parse_command, raw.strip().split("\n"))) h = d = 0 for word, n in commands: match word: case "forward": h += n case "down": d += n case "u...
[ 1268, 30076, 34219, 796, 366, 15414, 13, 14116, 1, 198, 2, 1268, 30076, 34219, 796, 366, 15414, 12, 9288, 13, 14116, 1, 198, 4480, 1280, 7, 1268, 30076, 34219, 8, 355, 611, 576, 25, 198, 220, 220, 220, 8246, 796, 611, 576, 13, 961...
1.859504
363
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198 ]
2.3
10
import pytest from detect_secrets.core.usage import ParserBuilder @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 4886, 62, 2363, 8004, 13, 7295, 13, 26060, 1330, 23042, 263, 32875, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198 ]
3.107143
28
# !/usr/bin/python3 # David Arboledas Brihuega # November 2021 # # ------------------------------------------------------ # This script is called by extractForensicJPEG to get # all the forensic data embebed in the jpeg files # -------------------------------------------------------- # import sys import binascii impor...
[ 2, 5145, 14, 14629, 14, 8800, 14, 29412, 18, 198, 2, 3271, 943, 28984, 276, 292, 25866, 71, 518, 4908, 198, 2, 3389, 33448, 198, 2, 198, 2, 20368, 19351, 438, 198, 2, 770, 4226, 318, 1444, 416, 7925, 16351, 19364, 12889, 7156, 284...
3.008547
234
# Generated by Django 3.0.7 on 2021-04-08 09:51 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 33448, 12, 3023, 12, 2919, 7769, 25, 4349, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import subprocess from functools import reduce
[ 11748, 850, 14681, 198, 6738, 1257, 310, 10141, 1330, 4646, 628, 198 ]
4.083333
12
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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/lice...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 1946, 11, 36763, 14318, 74, 296, 13077, 532, 46779, 357, 51, 12, 43, 8937, 8, 198, 2, 198, 2, 49962,...
3.552876
539
""" RabbitMQ container definition. """ from seaworthy.definitions import ContainerDefinition from seaworthy.utils import output_lines class RabbitMQContainer(ContainerDefinition): """ RabbitMQ container definition. .. todo:: Write more docs. """ # There seems to be a weird interaction b...
[ 37811, 198, 49, 14229, 49215, 9290, 6770, 13, 198, 37811, 198, 198, 6738, 32085, 18906, 13, 4299, 50101, 1330, 43101, 36621, 198, 6738, 32085, 18906, 13, 26791, 1330, 5072, 62, 6615, 628, 198, 198, 4871, 25498, 49215, 29869, 7, 29869, 3...
2.23468
2,203
# -*- coding: utf-8 -*- ''' gds.burp.api ~~~~~~~~~~~~ This module implements the Jython Burp Plugin API. Plugins written in Jython can implement the interfaces in this package in order to register for various methods exposed by Burp Extender. ''' from .core import Interface __all__ = [ 'INewScanIssueHandler', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 70, 9310, 13, 6236, 79, 13, 15042, 198, 15116, 8728, 198, 198, 1212, 8265, 23986, 262, 449, 7535, 5481, 79, 42636, 7824, 13, 198, 198, 23257, 1040, 3194,...
3.00543
3,131
from SinGAN.training import train from SinGAN.util import read_image, adjust_scales_to_image
[ 6738, 10884, 45028, 13, 34409, 1330, 4512, 201, 198, 6738, 10884, 45028, 13, 22602, 1330, 1100, 62, 9060, 11, 4532, 62, 1416, 2040, 62, 1462, 62, 9060, 201, 198, 201, 198 ]
3.129032
31