content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- from django.conf import settings from django.core.management.base import BaseCommand, CommandError from monapay.rpc import make_rpc_connection
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 937, 499, 323, 13,...
3.111111
54
from typing import * # usage.dask: 8 # usage.sklearn: 9 CategoricalDtype: object # usage.dask: 2 is_categorical_dtype: object # usage.dask: 3 is_sparse: object
[ 6738, 19720, 1330, 1635, 198, 198, 2, 8748, 13, 67, 2093, 25, 807, 198, 2, 8748, 13, 8135, 35720, 25, 860, 198, 34, 2397, 12409, 35, 4906, 25, 2134, 198, 198, 2, 8748, 13, 67, 2093, 25, 362, 198, 271, 62, 66, 2397, 12409, 62, ...
2.469697
66
""" Defines decorators that Architect provides. """ import inspect import functools from .bases import BaseFeature from .registry import registry, Registrar from ..exceptions import ( ORMError, FeatureInstallError, FeatureUninstallError, MethodAutoDecorateError ) from copy import deepcopy class ins...
[ 37811, 198, 7469, 1127, 11705, 2024, 326, 17340, 3769, 13, 198, 37811, 198, 198, 11748, 10104, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 764, 65, 1386, 1330, 7308, 38816, 198, 6738, 764, 2301, 4592, 1330, 20478, 11, 46439, 198, 6738...
2.589062
2,633
# -*- coding: utf-8 -*- # Importing the Libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the Data dataset=pd.read_csv('Data.csv') X = dataset.iloc[:,:-1].values y = dataset.iloc[:,3].values # Taking care of missing Data from sklearn.preprocessing import Imputer imputer = I...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17267, 278, 262, 46267, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, ...
2.75
416
# Copyright (c) 2013, TZCODE SRL and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, flt, date_diff, nowdate def get_data(filters): """ Return the data that needs to be rendered """ fields = ge...
[ 2, 15069, 357, 66, 8, 2211, 11, 309, 57, 34, 16820, 311, 7836, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198,...
2.353574
4,743
# -*- coding: utf-8 -*- import codecs import json from setuptools import setup, find_packages # with codecs.open('README.md', encoding='utf-8') as f: README = f.read() with open('./ocrd-tool.json', 'r') as f: version = json.load(f)['version'] setup( name='ocrd_vandalize', version=version, descri...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 40481, 82, 198, 11748, 33918, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 2, 220, 198, 4480, 40481, 82, 13, 9654, 10786, 15675, ...
2.335
400
dic = {'name':'lili','age':12} print(dic) del dic['name'] print(dic) dic2 ={'name':'mam'} print(dic2) dic.update(dic2) print(dic)
[ 67, 291, 796, 1391, 6, 3672, 10354, 6, 75, 2403, 41707, 496, 10354, 1065, 92, 201, 198, 4798, 7, 67, 291, 8, 201, 198, 201, 198, 12381, 288, 291, 17816, 3672, 20520, 201, 198, 4798, 7, 67, 291, 8, 201, 198, 201, 198, 67, 291, ...
1.690476
84
from django.db import transaction from rest_framework import serializers from hacktheback.forms.models import Form, Question, QuestionOption
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 8156, 1169, 1891, 13, 23914, 13, 27530, 1330, 5178, 11, 18233, 11, 18233, 19722, 628, 628 ]
4.264706
34
import numpy as np filename='deltaz.asc' file=open(filename) delta_z=np.loadtxt(file,comments='#') filename='SOM_cov_multiplied.asc' file=open(filename) cov_z=np.loadtxt(file,comments='#') L = np.linalg.cholesky(cov_z) inv_L = np.linalg.inv(L) delta_x = np.dot(inv_L,delta_z) print(delta_x)
[ 11748, 299, 32152, 355, 45941, 198, 198, 34345, 11639, 67, 2120, 1031, 13, 3372, 6, 198, 7753, 28, 9654, 7, 34345, 8, 198, 67, 12514, 62, 89, 28, 37659, 13, 2220, 14116, 7, 7753, 11, 15944, 11639, 2, 11537, 628, 198, 34345, 11639, ...
2.083916
143
import pygame from pygame.locals import * from pygame import * import globals import pygame as pg from pygame.mixer import Sound import time pg.init() # definindo cores BLACK = (0, 0, 0) WHITE = (255, 255, 255) BLUE = (0, 0, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) ROXO = (127,0,127) LARANJA = (255, 127, 0) AMARELO...
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 6738, 12972, 6057, 1330, 1635, 198, 11748, 15095, 874, 198, 11748, 12972, 6057, 355, 23241, 198, 6738, 12972, 6057, 13, 19816, 263, 1330, 9506, 198, 11748, 640, ...
1.630205
1,417
#!/usr/bin/python """ Rescale baseline density files, Nring(u), into n(x) = n(u=d/lambda) / lambda^2, which is approx. const. with frequency (and x = u / nu). Phil Bull (2014) """ import numpy as np import pylab as P import scipy.integrate import os, sys try: Ndish = int(sys.argv[1]) infile = sys.argv[2] ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 49, 3798, 1000, 14805, 12109, 3696, 11, 399, 1806, 7, 84, 828, 656, 299, 7, 87, 8, 796, 299, 7, 84, 28, 67, 14, 50033, 8, 1220, 37456, 61, 17, 11, 220, 198, 4758, 318, 556...
2.19802
1,111
import cv2 cap=cv2.VideoCapture(0) ret,frame1=cap.read() ret,frame2=cap.read() print(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) print(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) while (cap.isOpened()): diff=cv2.absdiff(frame1,frame2) diff=doContour(setFrame(diff),frame1) cv2.imshow('Detection',frame1) frame1=frame2 ...
[ 11748, 269, 85, 17, 198, 198, 11128, 28, 33967, 17, 13, 10798, 49630, 7, 15, 8, 198, 1186, 11, 14535, 16, 28, 11128, 13, 961, 3419, 198, 1186, 11, 14535, 17, 28, 11128, 13, 961, 3419, 198, 4798, 7, 11128, 13, 1136, 7, 33967, 17,...
2.046083
217
from flask import Flask, jsonify, request import pymongo from flask_cors import CORS from os import environ from bson.json_util import dumps import json app = Flask(__name__) client = pymongo.MongoClient( "mongodb+srv://iotadmin:iotadminpassword@cluster0.cowqf.mongodb.net/iotTest?retryWrites=true&w=majority&ssl=t...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 11748, 279, 4948, 25162, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 275, 1559, 13, 17752, 62, 22602, 1330, 45514, 198, 198, ...
2.5
320
import json from collections import Counter ALLSKL = 'allSkillLvlup' # Key for character dictionary to get 2-7 level up mats LVCOST = 'lvlUpCost' MCOSTC = 'levelUpCostCond' # Key for mastery level cost upgrades. MCOST = 'levelUpCost' SKILLS = 'skills' ELITE = 'phases' PROMOTE = 'evolveCost' RARE = 'rarity' ID = 'id' C...
[ 11748, 33918, 198, 6738, 17268, 1330, 15034, 198, 198, 1847, 6561, 42, 43, 796, 705, 439, 35040, 43, 19279, 929, 6, 1303, 7383, 329, 2095, 22155, 284, 651, 362, 12, 22, 1241, 510, 46054, 198, 30976, 8220, 2257, 796, 705, 47147, 4933, ...
2.540284
211
"""A backend for playing twenty questions.""" import logging import flask from backend.views import ( twentyquestions, socketio) logger = logging.getLogger(__name__) app = flask.Flask(__name__) @app.route('/') def root(): """A root page for twentyquestions.""" return ( 'This server is u...
[ 37811, 32, 30203, 329, 2712, 8208, 2683, 526, 15931, 198, 198, 11748, 18931, 198, 198, 11748, 42903, 198, 198, 6738, 30203, 13, 33571, 1330, 357, 198, 220, 220, 220, 8208, 6138, 507, 11, 198, 220, 220, 220, 17802, 952, 8, 628, 198, ...
2.857843
204
import json import requests import os my_directory = os.path.dirname(os.path.abspath(__file__)) with open(f'{my_directory}/secrets/keys.json') as f: api_keys = json.load(f) TGKEY = api_keys["Telegram"]["Key"] DEVID = api_keys["Telegram"]["DeviceID"] def send_analytics(req, fingerprint): """Sends analytics da...
[ 11748, 33918, 198, 11748, 7007, 198, 11748, 28686, 198, 198, 1820, 62, 34945, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 4480, 1280, 7, 69, 6, 90, 1820, 62, 34945, 92...
2.854749
537
import datetime import logging import os.path import traceback from io import BytesIO import django_tables2 as tables import numpy as np from bokeh.embed import components from bokeh.models import DataRange1d, LinearColorMapper, ColorBar, LabelSet, FuncTickFormatter, TapTool, OpenURL from bokeh.plotting import figure...
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 13, 6978, 198, 11748, 12854, 1891, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 42625, 14208, 62, 83, 2977, 17, 355, 8893, 198, 11748, 299, 32152, 355, 45941, 198, 1...
2.776907
6,634
#!/usr/bin/env python3 from gabriel_server.network_engine import server_runner import logging import argparse import importlib DEFAULT_PORT = 9099 DEFAULT_NUM_TOKENS = 2 INPUT_QUEUE_MAXSIZE = 60 logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 308, 397, 11719, 62, 15388, 13, 27349, 62, 18392, 1330, 4382, 62, 16737, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 1330, 8019, 198, 198, 7206, 38865, 62, 1...
2.700855
117
from acondbs.db.sa import sa from acondbs.models import ProductRelationType ##__________________________________________________________________|| ##__________________________________________________________________||
[ 6738, 936, 623, 1443, 13, 9945, 13, 11400, 1330, 473, 198, 6738, 936, 623, 1443, 13, 27530, 1330, 8721, 6892, 341, 6030, 628, 198, 2235, 27193, 834, 15886, 628, 198, 2235, 27193, 834, 15886, 198 ]
6.342857
35
# -*- coding: utf-8 -*- from gitlint.rules import LineRule, RuleViolation, CommitMessageTitle from gitlint.options import ListOption """ Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules The SpecialChars class below is an example of a user-defined LineRule. Line rules are gitlin...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 17606, 75, 600, 13, 38785, 1330, 6910, 31929, 11, 14330, 33894, 341, 11, 35910, 12837, 19160, 198, 6738, 17606, 75, 600, 13, 25811, 1330, 7343, 19722, 198, 19...
3.416981
530
import ctre from wpilib import SmartDashboard as Dash from wpilib.command import Subsystem from constants import Constants from utils import singleton, units, lazytalonsrx, pidf class BackArm(Subsystem, metaclass=singleton.Singleton): """The back arm subsystem controls the back arm motors and encoders.""" d...
[ 11748, 269, 33945, 198, 6738, 266, 79, 22282, 1330, 10880, 43041, 3526, 355, 16189, 198, 6738, 266, 79, 22282, 13, 21812, 1330, 3834, 10057, 198, 198, 6738, 38491, 1330, 4757, 1187, 198, 6738, 3384, 4487, 1330, 2060, 1122, 11, 4991, 11,...
2.361264
728
import re import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from collections import OrderedDict import torch.utils.model_zoo as model_zoo __all__ = ['DenseNet', 'densenet50', 'densenet121', 'densenet169', 'densenet201', 'densenet161'] model_urls = { 'densenet1...
[ 11748, 302, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 26791, 13, 9122, 4122, 355, 31396, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, ...
2.542061
1,902
from sqlalchemy import ARRAY from sqlalchemy import Column from sqlalchemy.types import String, Integer, BigInteger, Float, Date, Text from rfdmovie.db import BaseModel from rfdmovie.utils import generate_timestamp
[ 6738, 44161, 282, 26599, 1330, 5923, 30631, 198, 6738, 44161, 282, 26599, 1330, 29201, 198, 6738, 44161, 282, 26599, 13, 19199, 1330, 10903, 11, 34142, 11, 4403, 46541, 11, 48436, 11, 7536, 11, 8255, 198, 198, 6738, 374, 16344, 41364, 1...
3.694915
59
# modified from: # https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/ from scipy.spatial import distance as dist import numpy as np
[ 2, 9518, 422, 25, 198, 2, 3740, 1378, 2503, 13, 9078, 17566, 3679, 13, 785, 14, 7908, 14, 2998, 14, 1954, 14, 36439, 12, 15252, 12, 36280, 12, 4480, 12, 9654, 33967, 14, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 5253, 355, ...
2.536232
69
import lightbus from lightbus.api import Api, Event from dataclasses import dataclass from ib_insync.objects import Position, PortfolioItem from ib_insync.contract import Contract from ib_insync.order import Order, Trade from trader.container import Container from trader.trading.trading_runtime import Action, Trader fr...
[ 11748, 1657, 10885, 198, 6738, 1657, 10885, 13, 15042, 1330, 5949, 72, 11, 8558, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 24283, 62, 1040, 13361, 13, 48205, 1330, 23158, 11, 4347, 13652, 7449, 198, 6738, 24283, 62...
3.63522
159
import pytest from turing.generated.exceptions import ApiValueError from turing.router.config.resource_request import (ResourceRequest, InvalidReplicaCountException) @pytest.mark.parametrize( "min_replica,max_replica,cpu_request,memory_request,expected", [ pytest.param( 1, 3, ...
[ 11748, 12972, 9288, 198, 6738, 256, 870, 13, 27568, 13, 1069, 11755, 1330, 5949, 72, 11395, 12331, 198, 6738, 256, 870, 13, 472, 353, 13, 11250, 13, 31092, 62, 25927, 1330, 357, 26198, 18453, 11, 17665, 39232, 3970, 12332, 16922, 8, 6...
1.745786
2,195
from bs_utils.utils import * import re BAM_MATCH = 0 BAM_INS = 1 BAM_DEL = 2 BAM_SOFTCLIP = 4 CIGAR_OPS = {'M' : BAM_MATCH, 'I' : BAM_INS, 'D' : BAM_DEL, 'S' : BAM_SOFTCLIP} #---------------------------------------------------------------- """ Exmaple: ======== Read : ACCGCGTTGATCGAGTACGTACGTGGGTC Adapter ...
[ 6738, 275, 82, 62, 26791, 13, 26791, 1330, 1635, 198, 11748, 302, 628, 198, 33, 2390, 62, 44, 11417, 796, 657, 198, 33, 2390, 62, 20913, 796, 352, 198, 33, 2390, 62, 35, 3698, 796, 362, 198, 33, 2390, 62, 15821, 37, 4825, 43, 40...
2.06487
1,002
if not "mo02=o" in sm.getQRValue(22013): sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon02") sm.addQRValue(22013, "mo02=o")
[ 361, 407, 366, 5908, 2999, 28, 78, 1, 287, 895, 13, 1136, 48, 49, 11395, 7, 17, 6390, 2599, 198, 220, 220, 220, 895, 13, 615, 9459, 46, 380, 4714, 7203, 18610, 14, 2202, 12982, 36, 487, 13, 9600, 14, 41311, 18610, 14, 1990, 272,...
2.162162
74
import numpy as np import matplotlib.pyplot as plt from sklearn.neighbors import KNeighborsRegressor from sklearn.metrics import euclidean_distances from .datasets import make_wave from .plot_helpers import cm3
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 46445, 32289, 8081, 44292, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 304, 366...
3.147059
68
"""A subpackage containing plotting functions.""" __all__ = [ 'd3', 'three', 'vis', ] from .d3 import d3 from .three import three from .vis import vis
[ 37811, 32, 850, 26495, 7268, 29353, 5499, 526, 15931, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 67, 18, 3256, 198, 220, 220, 220, 705, 15542, 3256, 198, 220, 220, 220, 705, 4703, 3256, 198, 60, 198, 198, 6738, 76...
2.66129
62
#!/usr/bin/env python3 from .random_manifest import RandomManifest
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 764, 25120, 62, 805, 8409, 1330, 14534, 5124, 8409, 198 ]
3.090909
22
#!/bin/bash from mimetypes import init import unittest import coal_mine class TestCoalMine(unittest.TestCase): # Test that worker property sets values in range correctly # Test that worker property sets negative values to zero # Test that worker property sets values exceeding threshold to t...
[ 2, 48443, 8800, 14, 41757, 198, 198, 6738, 17007, 2963, 12272, 1330, 2315, 198, 11748, 555, 715, 395, 198, 11748, 5655, 62, 3810, 198, 198, 4871, 6208, 7222, 282, 24461, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, ...
3.382271
361
import os import time import logging import pytest from subprocess import run from seldon_e2e_utils import ( wait_for_status, wait_for_rollout, rest_request_ambassador, initial_rest_request, retry_run, API_AMBASSADOR, API_ISTIO_GATEWAY, ) with_api_gateways = pytest.mark.parametrize( "...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 12972, 9288, 198, 6738, 850, 14681, 1330, 1057, 198, 6738, 384, 25900, 62, 68, 17, 68, 62, 26791, 1330, 357, 198, 220, 220, 220, 4043, 62, 1640, 62, 13376, 11, 198, 220, ...
2.208791
273
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.domain.mandates.definitions.create_mandate_base import CreateMandateBase
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 1398, 373, 8295, 12, 27568, 422, 262, 7824, 10288, 1043, 379, 198, 2, 3740, 1378, 538, 323, 902, 12, 15042, 13, 16244, 263, 12, 36795, 3713, 13, 785,...
2.885057
87
################################################################################ # UNIVERSIDADE FEDERAL DE CATALÃO (UFCAT) # WANDERLEI MALAQUIAS PEREIRA JUNIOR, ENG. CIVIL / PROF (UFCAT) # DONIZETTI SOUZA JUNIOR, ENG. CIVIL (UFCAT) ###################################...
[ 29113, 29113, 14468, 198, 2, 49677, 2389, 19266, 376, 1961, 27130, 5550, 38348, 1847, 5746, 46, 357, 44534, 1404, 8, 198, 2, 370, 6981, 1137, 2538, 40, 337, 1847, 32, 43702, 1921, 350, 9338, 40, 3861, 449, 4944, 41254, 11, 220, 220, ...
1.699057
7,317
#!/usr/bin/env python # ================================= # Music Visualizer # ------------ # Reference to -> [May 2020] - Mina PECHEUX # # Based on the work by Yu-Jie Lin # (Public Domain) # Github: https://gist.github.com/manugarri/1c0fcfe9619b775bb82de0790ccb88da import wave import click from compute import plt, c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 46111, 198, 2, 7849, 15612, 7509, 198, 2, 220, 10541, 198, 2, 20984, 284, 4613, 685, 6747, 12131, 60, 532, 337, 1437, 350, 2943, 13909, 31235, 198, 2, 198, 2, 13403, 319, 262, 6...
2.794667
375
# IMPORTAÇÕES import random import string # FUNÇÃO QUE GERA NÚMEROS DE INSCRIÇÃO ESTADUAL
[ 2, 30023, 1581, 5603, 127, 229, 127, 243, 1546, 201, 198, 11748, 4738, 201, 198, 11748, 4731, 201, 198, 201, 198, 201, 198, 2, 29397, 127, 229, 5746, 46, 1195, 8924, 44186, 32, 399, 127, 248, 29296, 2640, 5550, 3268, 6173, 7112, 127...
1.921569
51
import pandas as pd import pytest from cognite.client.data_classes import Datapoints, DatapointsList from cognite.client.testing import monkeypatch_cognite_client from cognite.model_hosting.data_fetcher._cdp_client import CdpClient, DatapointsFrameQuery @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 198, 6738, 8866, 578, 13, 16366, 13, 7890, 62, 37724, 1330, 16092, 499, 1563, 82, 11, 16092, 499, 1563, 82, 8053, 198, 6738, 8866, 578, 13, 16366, 13, 33407, 1330, 21657, ...
2.943396
106
''' 오락실 pang 게임 만들기 [게임 조건] 1. 캐릭터는 화면 아래에 위치, 좌우로만 이동 가능 2. 스페이스를 누르면 무기를 쏘아 올림 3. 큰 공 1개가 나타나서 바운스 4. 무기에 닿으면 공은 작은 크기 2개로 분할, 가장 작은 크기의 공은 사라짐 5. 모든 공을 없애면 게임 종료(성공) 6. 캐릭터는 공에 닿으면 게임 종료(실패) 7. 시간 제한 99초 초과시 게임 종료(실패) 8. FPS는 30으로 고정(필요시 speed 값을 조정) [게임 이미지] 1. 배경 : 640 * 480(가로, 세로) - background.png 2. 무대 : 640 ...
[ 7061, 6, 198, 168, 246, 97, 167, 251, 121, 168, 233, 97, 279, 648, 220, 166, 110, 234, 168, 252, 226, 31619, 100, 234, 167, 241, 97, 166, 116, 108, 198, 198, 58, 166, 110, 234, 168, 252, 226, 23821, 94, 108, 166, 109, 112, 60,...
1.505186
6,170
'''VGG11/13/16/19 in Pytorch.''' import torch import torch.nn as nn import torchvision.models as models import torch.nn.functional as F from ipdb import set_trace as bp cfg = { 'VGG16_POST': [512, 512, 'M'] }
[ 7061, 6, 53, 11190, 1157, 14, 1485, 14, 1433, 14, 1129, 287, 9485, 13165, 354, 2637, 7061, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 13, 27530, 355, 4981, 198, 11748, 28034, 13, 20471, 13...
2.559524
84
import os import pkg_resources from unittest import TestCase from cyvcf2 import VCF from vafator.annotator import Annotator import vafator.tests.utils as test_utils import time from logzero import logger
[ 11748, 28686, 201, 198, 11748, 279, 10025, 62, 37540, 201, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 201, 198, 6738, 3075, 85, 12993, 17, 1330, 569, 22495, 201, 198, 6738, 410, 1878, 1352, 13, 34574, 1352, 1330, 1052, 1662, 1352, 2...
3.057143
70
# # Implementation of the exhaustive search algorithm # import sys, time import main.tuner.search.search #----------------------------------------------------- class Exhaustive(main.tuner.search.search.Search): '''The search engine that uses an exhaustive search approach''' def __init__(self, cfrags, axis_...
[ 2, 198, 2, 46333, 286, 262, 36049, 2989, 11862, 220, 198, 2, 198, 198, 11748, 25064, 11, 640, 198, 11748, 1388, 13, 28286, 263, 13, 12947, 13, 12947, 198, 198, 2, 3880, 19351, 12, 198, 198, 4871, 1475, 42456, 425, 7, 12417, 13, 28...
2.282871
1,909
import os import joblib classifier = joblib.load(r'smartirrigation.pkl') # importing Flask and other modules from flask import Flask, request, render_template import numpy as np # Flask constructor app = Flask(__name__) # A decorator used to tell the application # which URL is associated function...
[ 11748, 28686, 201, 198, 11748, 1693, 8019, 201, 198, 4871, 7483, 796, 1693, 8019, 13, 2220, 7, 81, 338, 13822, 343, 4359, 341, 13, 79, 41582, 11537, 201, 198, 201, 198, 2, 33332, 46947, 290, 584, 13103, 201, 198, 6738, 42903, 1330, ...
2.681564
179
""" Django settings for bebotPlatform project. Generated by 'django-admin startproject' using Django 2.0.1. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ from dj...
[ 37811, 198, 35, 73, 14208, 6460, 329, 307, 13645, 37148, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 362, 13, 15, 13, 16, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 19...
2.322439
2,050
# Census_CBP.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 """ Pulls County Business Patterns data in NAICS from the Census Bureau Writes out to various FlowBySector class files for these data items EMP = Number of employees, Class = Employment PAYANN = Annual payroll ($1,000), Class = Money ESTAB = Number of esta...
[ 2, 20962, 62, 34, 20866, 13, 9078, 357, 44041, 64, 8, 198, 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 42940, 82, 3418, 7320, 47020, 1366, 287, 11746, 19505, 422, 262, 209...
3.311881
202
# This sample tests various conditions under which Unpack # can and cannot be used. # pyright: reportMissingModuleSource=false from typing import Generic, List, Tuple, TypeVar, Union from typing_extensions import TypeVarTuple, Unpack _T = TypeVar("_T") _Xs = TypeVarTuple("_Xs") # This should generate an error. x...
[ 2, 770, 6291, 5254, 2972, 3403, 739, 543, 791, 8002, 198, 2, 460, 290, 2314, 307, 973, 13, 198, 198, 2, 279, 4766, 25, 989, 43730, 26796, 7416, 28, 9562, 198, 198, 6738, 19720, 1330, 42044, 11, 7343, 11, 309, 29291, 11, 5994, 1985...
2.959799
199
# -*- coding: utf-8 -*- # # Copyright (c) 2016, Giacomo Cariello. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 11, 8118, 330, 17902, 1879, 494, 18798, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628,...
2.457294
3,208
#!/usr/bin python3 #importing stuffs import speech_recognition as sr import os import sys import re import webbrowser import smtplib import requests import subprocess from pyowm import OWM import youtube_dl import vlc import urllib import urllib3 import json from bs4 import BeautifulSoup as soup from urllib.request i...
[ 2, 48443, 14629, 14, 8800, 21015, 18, 628, 198, 2, 11748, 278, 3404, 82, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 3992, 40259, 198, 11748, 895, 83, 489, 571, 198,...
2.892857
392
# Copyright 2017-present Open Networking 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 law or agr...
[ 2, 15069, 2177, 12, 25579, 4946, 7311, 278, 5693, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
3.989583
192
"""This module implements .joinall.""" from __future__ import ( unicode_literals, absolute_import, print_function, division ) from sopel import module import time @module.require_admin @module.commands('joinall') @module.thread(True) def handle_joins(bot, trigger): """Join some channels.""" ...
[ 37811, 1212, 8265, 23986, 764, 22179, 439, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 357, 198, 220, 220, 220, 28000, 1098, 62, 17201, 874, 11, 198, 220, 220, 220, 4112, 62, 11748, 11, 198, 220, 220, 220, 3601, 62, 8818, 1...
2.547368
190
import requests import json from bs4 import BeautifulSoup import sys word = sys.argv[1] word = word.strip().replace("&", "+") main()
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 25064, 198, 220, 198, 4775, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 4775, 796, 1573, 13, 36311, 22446, 33491, 7203, 5, 1600, 43825, 4943, ...
2.84
50
# --- default imports --- # --- load utils --- from WGALP.utils.commandLauncher import run_sp from WGALP.step import Step description = """ load kraken_db in a ramdisk """ input_description = """ the position (on disk) of the kraken2 database """ output_description = """ the mounting point of the newly created ramdis...
[ 2, 11420, 4277, 17944, 11420, 198, 198, 2, 11420, 3440, 3384, 4487, 11420, 198, 6738, 370, 38, 1847, 47, 13, 26791, 13, 21812, 46182, 2044, 1330, 1057, 62, 2777, 198, 6738, 370, 38, 1847, 47, 13, 9662, 1330, 5012, 198, 198, 11213, 7...
2.634615
468
# Copyright (C) 2015 UCSC Computational Genomics Lab # # 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, 357, 34, 8, 1853, 14417, 6173, 22476, 864, 5215, 31994, 3498, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.820961
229
from flask import Flask, request import requests, json app = Flask(__name__) @app.route('/shazam', methods=['GET', 'POST']) @app.route('/') if __name__ == '__main__': app.run('0.0.0.0', debug = 'True')
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 11748, 7007, 11, 33918, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 31, 1324, 13, 38629, 10786, 14, 1477, 1031, 321, 3256, 5050, 28, 17816, 18851, 3256, 705, 32782, 6, 12962, ...
2.488095
84
# A converter that takes a denary number and converts it, using comparison # rather than recursion, to binary import sys from colorama import init from termcolor import cprint from pyfiglet import figlet_format init(strip=not sys.stdout.isatty()) cprint(figlet_format('Binary / Decimal Converter', font='doom'), 'whit...
[ 2, 317, 38394, 326, 2753, 257, 2853, 560, 1271, 290, 26161, 340, 11, 1262, 7208, 198, 2, 2138, 621, 664, 24197, 11, 284, 13934, 198, 198, 11748, 25064, 198, 198, 6738, 3124, 1689, 1330, 2315, 198, 6738, 3381, 8043, 1330, 269, 4798, ...
2.479204
553
''' Add an SnmpCredentials model to the models.py file. This model should support both SNMPv3 and SNMPv1/v2c. Add a foreign key reference in the NetworkDevice model pointing to the SnmpCredentials model. ''' from django.db import models
[ 7061, 6, 198, 4550, 281, 5489, 3149, 34, 445, 14817, 2746, 284, 262, 4981, 13, 9078, 2393, 13, 770, 2746, 815, 1104, 220, 198, 16885, 11346, 7378, 85, 18, 290, 11346, 7378, 85, 16, 14, 85, 17, 66, 13, 220, 3060, 257, 3215, 1994, ...
3.213333
75
from .. import Device class AD_ImagePlugin(Device): """ AreaDetector Image Plugin """ attrs = ('ArrayData', 'UniqueId', 'UniqueId_RBV', 'NDimensions', 'NDimensions_RBV', 'ArraySize0', 'ArraySize0_RBV', 'ArraySize1', 'ArraySize1_RBV', 'Arr...
[ 6738, 11485, 1330, 16232, 198, 198, 4871, 5984, 62, 5159, 37233, 7, 24728, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9498, 11242, 9250, 7412, 42636, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 708, 3808, 796, 19203, 1918...
2.043269
416
import subprocess as sp from . import util # This is a Tazer Server class. It is here to help wrap several functions that # exist across the Tazer source. The Commands listed in the arguments are the # equivalent commands (and arguments) as if run from the build tree. # The path is the path to the build director...
[ 11748, 850, 14681, 355, 599, 198, 6738, 764, 1330, 7736, 198, 198, 2, 770, 318, 257, 309, 19178, 9652, 1398, 13, 220, 632, 318, 994, 284, 1037, 14441, 1811, 5499, 326, 198, 2, 2152, 1973, 262, 309, 19178, 2723, 13, 220, 383, 49505, ...
3.229167
480
from django.forms.widgets import Media def get_class_media(base, instance): '''Convenience function to be used when overriding the `media` property. This function maintains the tasks of the media property set up by `MediaDefiningClass` but allows you to extend the normal behavior. Use: class MyCl...
[ 6738, 42625, 14208, 13, 23914, 13, 28029, 11407, 1330, 6343, 198, 198, 4299, 651, 62, 4871, 62, 11431, 7, 8692, 11, 4554, 2599, 198, 220, 220, 220, 705, 7061, 3103, 574, 1240, 2163, 284, 307, 973, 618, 44987, 262, 4600, 11431, 63, 3...
2.322335
394
from indy import pool from utilities import utils from utilities import common, constant from test_scripts.functional_tests.pool.pool_test_base import PoolTestBase import pytest
[ 6738, 773, 88, 1330, 5933, 198, 198, 6738, 20081, 1330, 3384, 4487, 198, 6738, 20081, 1330, 2219, 11, 6937, 198, 6738, 1332, 62, 46521, 13, 45124, 62, 41989, 13, 7742, 13, 7742, 62, 9288, 62, 8692, 1330, 19850, 14402, 14881, 198, 1174...
4
45
## Bokeh server for Select import pandas as pd from bokeh.io import curdoc from bokeh.layouts import row from bokeh.models import ColumnDataSource, Select from bokeh.plotting import figure x=[3,4,6,12,10,1,5,6,3,8] y=[7,1,3,4,1,6,10,4,10,3] label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange','Red', 'Orange','Red'...
[ 2235, 347, 2088, 71, 4382, 329, 9683, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1489, 365, 71, 13, 952, 1330, 1090, 15390, 198, 6738, 1489, 365, 71, 13, 10724, 5269, 1330, 5752, 198, 6738, 1489, 365, 71, 13, 27530, 1330,...
2.539359
343
# -*- coding: utf-8 -*- from sklearn.feature_extraction.text import CountVectorizer from natto import MeCab _morpheme_type = ['NNG', 'NNP'] _escape_pattern = ['\n'] _nm = MeCab() corpus = generate_corpus2('news.txt') print('corpus : ', corpus) _cv = CountVectorizer() word_matrix = _cv.fit_transform(corpus) inde...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 6738, 299, 45807, 1330, 2185, 34, 397, 628, 198, 62, 4491, 36335, 1326, 62, ...
2.505747
174
#!/usr/bin/python3 from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198 ]
2.25
28
# -*- coding: utf-8 -*- """ Created on April 12, 2018 @author: neerbek """ import os import getopt import sys import io import monUtil import monsantoData import textClean import server_rnn_helper from similarity import load_trees from importlib import reload reload(textClean) # from backends import PDFMinerBack...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 41972, 319, 3035, 1105, 11, 2864, 198, 198, 31, 9800, 25, 220, 497, 23552, 988, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 651, 8738, 198, 11748, ...
2.468585
2,085
import datetime as dt import re class Field(object): """Base class for fields validation. Attributes ---------- allowed_type : Optional[type or Tuple[type]] Allowed field's type. Parameters ---------- label: Optional[unicode] Name of the field. required : bool ...
[ 11748, 4818, 8079, 355, 288, 83, 198, 11748, 302, 628, 198, 198, 4871, 7663, 7, 15252, 2599, 198, 220, 220, 220, 37227, 14881, 1398, 329, 7032, 21201, 13, 628, 220, 220, 220, 49213, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220...
2.330322
1,771
#t=int(input('Quantos anos tem seu carro?')) #if t <=3: # print('Carro novo') #else: # print('Carro velho') #print('Carro novo' if t<=3 else 'Carro velho') #print('fim') # print('Que nome lindo') #print('Bom dia, {}'.format(n)) #print('fim') #_____________________________ import random from time import sleep c ...
[ 2, 83, 28, 600, 7, 15414, 10786, 24915, 418, 281, 418, 2169, 384, 84, 1097, 305, 8348, 4008, 198, 2, 361, 256, 19841, 18, 25, 198, 2, 220, 220, 3601, 10786, 9914, 305, 645, 13038, 11537, 198, 2, 17772, 25, 198, 2, 220, 220, 220,...
2.164444
450
from __future__ import annotations import os import click from pelutils.logger import log from pelutils.ds.plot import figsize_std, tab_colours, update_rc_params, rc_params import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np from daluke.ner.training import TrainResults from daluke....
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 11748, 28686, 198, 198, 11748, 3904, 198, 6738, 16176, 26791, 13, 6404, 1362, 1330, 2604, 198, 6738, 16176, 26791, 13, 9310, 13, 29487, 1330, 2336, 7857, 62, 19282, 11, 7400, 62, 4033, 4662, 11...
2.936047
172
# 定义函数 def count_numbers(filename): """获取指定的文件,并计算单词'the'在每个文件中出现的次数""" try: with open(filename) as file_object: contents = file_object.read() except FileNotFoundError: print(f"Sorry, the file {filename} does not exits.") else: # 计算出现的次数 numbers = contents.low...
[ 2, 10263, 106, 248, 20046, 231, 49035, 121, 46763, 108, 198, 4299, 954, 62, 77, 17024, 7, 34345, 2599, 198, 220, 220, 220, 37227, 164, 236, 115, 20998, 244, 162, 234, 229, 22522, 248, 21410, 23877, 229, 20015, 114, 171, 120, 234, 33...
1.96
425
# standard library import json # local Django from apps.article.models import Article from apps.article.serializers.article import ArticleHeavySerializer from apps.tests.fixtures import RepositoryTestCase class ListArticleTest(RepositoryTestCase): """ ... """ serializer = ArticleHeavySerializer
[ 2, 3210, 5888, 198, 11748, 33918, 198, 198, 2, 1957, 37770, 198, 6738, 6725, 13, 20205, 13, 27530, 1330, 10172, 198, 6738, 6725, 13, 20205, 13, 46911, 11341, 13, 20205, 1330, 10172, 33210, 32634, 7509, 198, 6738, 6725, 13, 41989, 13, ...
3.632184
87
from ai.players.random_ai_player import RandomAIPlayer from ai.games.ai_game import AIGame from checkers.game import Game import random
[ 6738, 257, 72, 13, 32399, 13, 25120, 62, 1872, 62, 7829, 1330, 14534, 20185, 14140, 198, 6738, 257, 72, 13, 19966, 13, 1872, 62, 6057, 1330, 317, 3528, 480, 198, 6738, 2198, 364, 13, 6057, 1330, 3776, 198, 11748, 4738, 198 ]
3.317073
41
# Copyright 2021 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 the "license...
[ 2, 15069, 33448, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, ...
3.367742
310
import os from shutil import copyfile from os import listdir save_dir =r'J:/game/seg_classification/data/' imgs_dir =r'J:/game/seg_classification/_ouput_dir_/' if not os.path.isdir(save_dir): os.makedirs(save_dir) for files in listdir(imgs_dir): if files[-5] =='0': source_file=os.path.join(imgs_dir ...
[ 11748, 28686, 220, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 28686, 1330, 1351, 15908, 628, 198, 21928, 62, 15908, 796, 81, 6, 41, 14079, 6057, 14, 325, 70, 62, 4871, 2649, 14, 7890, 14, 6, 198, 9600, 82, 62, 15908, 796, ...
2.274194
186
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 15069, 13130, 10766, 28478, 21852, 15302, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 35...
3.802281
263
from frappe import _
[ 6738, 5306, 27768, 1330, 4808, 198 ]
3.5
6
from argparse import ArgumentParser import os import sys from six.moves.configparser import ConfigParser from najdisi_sms import utils from .api import SMSSender log = utils.get_logger() class SettingParser(object): """docstring for SettingParser""" def merge_settings(self, parser_space): """ ...
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 2237, 13, 76, 5241, 13, 11250, 48610, 1330, 17056, 46677, 198, 198, 6738, 299, 1228, 6381, 72, 62, 82, 907, 1330, 3384, 4487, 198, 6738, 764, ...
2.171296
432
""" Modified from ML-GCN/util.py: * adding calculations: OP, OR, OF1, CP, CR, CF1, EP, ER, EF1 * removing args: difficult_examples """ import math import torch from PIL import Image from tqdm import tqdm import numpy as np import random import torch.nn.functional as F
[ 37811, 198, 5841, 1431, 422, 10373, 12, 15916, 45, 14, 22602, 13, 9078, 25, 198, 9, 4375, 16765, 25, 13349, 11, 6375, 11, 3963, 16, 11, 16932, 11, 8740, 11, 18551, 16, 11, 14724, 11, 13793, 11, 33685, 16, 198, 9, 10829, 26498, 25,...
2.956522
92
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 6 12:05:46 2019 @author: chrisbartel """ import numpy as np from sklearn.metrics import confusion_matrix, r2_score
[ 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, 30030, 2447, 220, 718, 1105, 25, 2713, 25, 3510, 13130, 198, 198, 31, 9800, 25, 442, 2442...
2.583333
72
from ceph_deploy.util import templates from ceph_deploy.lib.remoto import process
[ 6738, 269, 27446, 62, 2934, 1420, 13, 22602, 1330, 24019, 198, 6738, 269, 27446, 62, 2934, 1420, 13, 8019, 13, 2787, 2069, 1330, 1429, 628, 198 ]
3.230769
26
Bar()
[ 198, 10374, 3419, 198 ]
1.75
4
""" Problem Statement: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. """ from __future__ import print_function import os try: raw_input # Python 2 except NameError: raw_input = input # Python 3 def solution(array): """Returns the first ten digits of the sum of ...
[ 37811, 198, 40781, 21983, 25, 198, 12468, 503, 262, 717, 3478, 19561, 286, 262, 2160, 286, 262, 1708, 530, 12, 71, 3229, 2026, 12, 27003, 198, 77, 17024, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, ...
2.527869
305
import discord from discord.ext import commands import json import subprocess class Music(commands.Cog): """Play all great classics""" @commands.command(name='play', description="play a given music", brief="play a given music") @commands.command(name='stop'...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 198, 4871, 7849, 7, 9503, 1746, 13, 34, 519, 2599, 198, 220, 220, 220, 37227, 11002, 477, 1049, 29039, 37811, 628, 220, 220, 220, 24...
2.331551
187
import re import csv from dmutils.documents import get_document_path, generate_download_filename
[ 11748, 302, 198, 11748, 269, 21370, 198, 198, 6738, 288, 21973, 4487, 13, 15390, 2886, 1330, 651, 62, 22897, 62, 6978, 11, 7716, 62, 15002, 62, 34345, 628, 628, 198 ]
3.4
30
## @ingroup Methods-Flight_Dynamics-Dynamic_Stability-Full_Linearized_Equations-Supporting_Functions # cm_alphadot.py # # Created: Jun 2014, A. Wendorff # Modified: Jan 2016, E. Botero # ---------------------------------------------------------------------- # Method # ----------------------------------------------...
[ 2235, 2488, 278, 3233, 25458, 12, 43069, 62, 35, 4989, 873, 12, 44090, 62, 1273, 1799, 12, 13295, 62, 14993, 451, 1143, 62, 23588, 602, 12, 15514, 278, 62, 24629, 2733, 198, 2, 12067, 62, 17307, 324, 313, 13, 9078, 198, 2, 220, 19...
2.459016
488
from test.base import BaseTestCase from application.models import RequestAssertion
[ 6738, 1332, 13, 8692, 1330, 7308, 14402, 20448, 198, 6738, 3586, 13, 27530, 1330, 19390, 8021, 861, 295, 628 ]
4.421053
19
#Author: ahmelq - github.com/ahmedelq/ #License: MIT #This is a solution of https://www.codewars.com/kata/583203e6eb35d7980400002a if __name__ == "__main__": print( countSmileys([':)', ';(', ';}', ':-D']), # should return 2 countSmileys([';D', ':-(', ':-)', ';~)']), # should return ...
[ 198, 2, 13838, 25, 29042, 17694, 80, 532, 220, 33084, 13, 785, 14, 993, 1150, 417, 80, 14, 198, 2, 34156, 25, 17168, 198, 2, 1212, 318, 257, 4610, 286, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 3365, 1950...
2.014925
201
import json import logging import os from argparse import Namespace from datetime import datetime from tempfile import NamedTemporaryFile from time import sleep from plastron import pcdm from plastron.stomp import Message from plastron.exceptions import FailureException, DataReadException, RESTAPIException from plast...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 1822, 29572, 1330, 28531, 10223, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 6738, 640, 1330, 3993, 198, 198, 67...
3.618705
139
<<<<<<< HEAD '''Implements ResNet9,..56 dynamically for CIFAR-10 Description of implementation can be found here: https://arxiv.org/pdf/1512.03385.pdf''' import tensorflow as class ResNetBlock(tf.keras.layers.Layer): '''See official RStudio/Keras documentation here: https://github.com/rstudio/keras/blob/main/vigne...
[ 16791, 16791, 16791, 27, 39837, 198, 7061, 6, 3546, 1154, 902, 1874, 7934, 24, 11, 492, 3980, 32366, 329, 327, 5064, 1503, 12, 940, 198, 11828, 286, 7822, 460, 307, 1043, 994, 25, 3740, 1378, 283, 87, 452, 13, 2398, 14, 12315, 14, ...
2.752722
643
import pkgutil from ram.classes import Service
[ 11748, 279, 10025, 22602, 198, 198, 6738, 15770, 13, 37724, 1330, 4809, 628 ]
3.769231
13
from unittest import TestCase, skip from hw1cs561s2018 import Chess, Configuration, alphabeta_cutoff_search, minimax_decision
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 14267, 198, 198, 6738, 289, 86, 16, 6359, 47915, 82, 7908, 1330, 25774, 11, 28373, 11, 24830, 64, 62, 8968, 2364, 62, 12947, 11, 10356, 897, 62, 12501, 1166, 628 ]
3.368421
38
""" Dataflow visualization. An upstream dataflow visualization explains the derivation of a value. Take for example this dataflow visualization of the derivation of a VCF file from a bioinformatic analysis: ``` value = File(path=sample4.vcf, hash=********) value <-- <********> call_variants(bam, ref_genome) bam ...
[ 37811, 198, 6601, 11125, 32704, 13, 198, 198, 2025, 28717, 1366, 11125, 32704, 6688, 262, 16124, 341, 286, 257, 1988, 13, 7214, 198, 1640, 1672, 428, 1366, 11125, 32704, 286, 262, 16124, 341, 286, 257, 569, 22495, 2393, 198, 6738, 257, ...
2.368731
18,664
import matplotlib.pyplot as plt import scipy.stats import numpy as np from tqdm import tqdm from PIL import Image from deeplab3.config.defaults import get_cfg_defaults from dataloaders.utils import sample_distribution from dataloaders.datasets.cityscapes import CityscapesSegmentation from dataloaders.datasets.coco i...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 629, 541, 88, 13, 34242, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 6738, ...
2.513333
450
import os import json import logging import requests from unittest.mock import patch, MagicMock import walters_art_museum as wam RESOURCES = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'tests/resources/waltersartmuseum' ) logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s: ...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 6139, 44, 735, 198, 11748, 6514, 1010, 62, 433, 62, 76, 6744, 355, 266, 321, 628, 198, 19535, 2606, 7397, 1...
2.689796
245
# -*- coding: utf-8 -*- """ Created on Tue Jan 14 09:35:53 2020 @author: Christian """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2365, 1478, 7769, 25, 2327, 25, 4310, 12131, 198, 198, 31, 9800, 25, 4302, 198, 37811, 628 ]
2.472222
36
#!/usr/bin/env python3 """ Convert from pre-trained models. """ import argparse import math import os import sys from collections import OrderedDict from dataclasses import dataclass from typing import Dict import numpy as np import onnx import toml from onnx import shape_inference from pydeacon.graph import ( D...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 38240, 422, 662, 12, 35311, 4981, 13, 37227, 198, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 3...
2.714286
182
"""Assortment of utilities for application.""" import itertools import operator import os import random from typing import List from flask_sqlalchemy import Model, SQLAlchemy from pma_api.app import PmaApiFlask B64_CHAR_SET = ''.join(('abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'...
[ 37811, 8021, 33920, 286, 20081, 329, 3586, 526, 15931, 198, 11748, 340, 861, 10141, 198, 11748, 10088, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 9104, 11, 16363,...
2.40469
1,663
# !/usr/bin/env python3 ####################################################################################### # # # Program purpose: Concatenates N-strings. # # Program Author : Happi...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 220, 21015, 18, 198, 198, 29113, 29113, 14468, 4242, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.873391
466
import requests import hmac import hashlib import datetime as dt import simplejson as json access_key = '80473469' # example secret_key = 'GhDzk8Lc00xUzUjHFJqDqLztMNq5KMgU' # example # Generate the X-Timestamp t = dt.datetime.utcnow().replace(microsecond=0) timestamp = t.isoformat() timestamp = '2015-10-29T14:33:46' ...
[ 11748, 7007, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 2829, 17752, 355, 33918, 198, 198, 15526, 62, 2539, 796, 705, 1795, 2857, 2682, 3388, 6, 1303, 1672, 198, 21078, 62, 2539, ...
2.716069
641
# -*- encoding=utf-8 -*- """ # ********************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # [oecp] is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL ...
[ 2, 532, 9, 12, 21004, 28, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 2, 41906, 17174, 8412, 1174, 198, 2, 15069, 357, 66, 8, 43208, 21852, 1766, 1539, 12052, 13, 12131, 12, 42334, 13, 1439, 2489, 10395, 13, 198, 2, 685, 78, 721...
2.078462
1,950
import re import os import vim
[ 11748, 302, 198, 11748, 28686, 198, 11748, 43907, 198 ]
3.444444
9
# pylint:disable=line-too-long import logging from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool from ...calling...
[ 2, 279, 2645, 600, 25, 40223, 28, 1370, 12, 18820, 12, 6511, 198, 11748, 18931, 198, 198, 6738, 2644, 14323, 62, 4906, 1330, 3184, 6030, 22203, 11, 220, 220, 220, 220, 3184, 6030, 16438, 11, 3184, 6030, 5317, 11, 3184, 6030, 14617, ...
2.849673
1,224