content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from unittest import TestCase
[ 6738, 555, 715, 395, 1330, 6208, 20448, 628 ]
3.875
8
greeting_message = ''' Hi John, We have received your purchase request successfully. We'll email you when after the package is dispatched. Thanks, Support Team ''' print(greeting_message)
[ 70, 2871, 278, 62, 20500, 796, 705, 7061, 198, 198, 17250, 1757, 11, 198, 198, 1135, 423, 2722, 534, 5001, 2581, 7675, 13, 775, 1183, 3053, 345, 618, 706, 262, 5301, 318, 26562, 13, 198, 198, 9690, 11, 198, 15514, 4816, 198, 198, ...
3.446429
56
import numpy as np import pandas as pd from sklearn.model_selection import KFold, train_test_split, GroupShuffleSplit def split_test(df, test_method='fo', test_size=.2): """ method of splitting data into training data and test data Parameters ---------- df : pd.DataFrame raw data waiting for test ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727, 11, 4512, 62, 9288, 62, 35312, 11, 4912, 2484, 18137, 41205, 198, 198, 4299, 6626, 62, 9288, ...
2.282301
3,390
import requests import os from collections import defaultdict import pandas as pd from io import StringIO from nearest_dict import NearestDict from utils import load_stats_endpoint if __name__ == '__main__': EthereumStats(verbose=True, update=True)
[ 11748, 7007, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 16936, 62, 11600, 1330, 3169, 12423, 35, 713, 198, 6738, 3384, 4487, 1330, 3440, ...
3.465753
73
# coding: utf-8 from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 2237, 1330, 4731, 62, 19199, 11, 11629, 23814, 198, 6738, 1643, 76, 709, 259, 62, 15042, 62, 21282, 74, 13, 11321, 13, 1930, 9122, 1330, 1426, 9122, ...
3.043478
46
# alias to keep the 'bytecode' variable free import bytecode as _bytecode from bytecode.instr import UNSET, Label, SetLineno, Instr
[ 2, 16144, 284, 1394, 262, 705, 26327, 8189, 6, 7885, 1479, 198, 11748, 18022, 8189, 355, 4808, 26327, 8189, 198, 6738, 18022, 8189, 13, 259, 2536, 1330, 4725, 28480, 11, 36052, 11, 5345, 14993, 23397, 11, 27901, 628, 628 ]
3.461538
39
#!/usr/bin/env python # encoding: utf-8 """ db.py Created by José Sánchez-Gallego on 25 Oct 2015. Licensed under a 3-clause BSD license. Revision history: 25 Oct 2015 J. Sánchez-Gallego Initial version """ from __future__ import division, print_function from SDSSconnect import DatabaseConnection from To...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 198, 9945, 13, 9078, 198, 198, 41972, 416, 36997, 311, 21162, 2395, 89, 12, 26552, 1455, 78, 319, 1679, 2556, 1853, 13, 198, 26656, ...
2.541505
1,289
# Modifique as funções que form criadas no desafio 107 para que elas aceitem um parâmetro a mais, # informando se o valor retornado por elas vai ser ou não formatado pela função moeda(), desenvolvida no desafio 108. import moeda #Programa Principal valor = float(input('Digite o preço:R$ ')) print(f' A aumentand...
[ 2, 3401, 361, 2350, 355, 1257, 16175, 127, 113, 274, 8358, 1296, 269, 21244, 292, 645, 748, 1878, 952, 16226, 31215, 8358, 1288, 292, 31506, 9186, 23781, 1582, 22940, 4164, 305, 257, 285, 15152, 11, 201, 198, 2, 220, 4175, 25440, 384,...
2.364865
296
import treq from mk2.events import EventPriority, ServerEvent, ServerStarted, ServerStopped, ServerStopping, ServerStarting from mk2.plugins import Plugin from mk2.shared import decode_if_bytes class WebhookObject(dict): """ Custom dict object that represents a discord webhook object """ def add_embed(s...
[ 11748, 2054, 80, 198, 198, 6738, 33480, 17, 13, 31534, 1330, 8558, 22442, 414, 11, 9652, 9237, 11, 9652, 10434, 276, 11, 9652, 1273, 38333, 11, 9652, 1273, 33307, 11, 9652, 22851, 198, 6738, 33480, 17, 13, 37390, 1330, 42636, 198, 673...
2.819113
293
# -*- coding: utf-8 -*- """ Analysis tools """ import sciplot import numpy as np import matplotlib.pyplot as plt from .functions import _hist_init def plot_flatness(sig, tag, bins=None, ax=None, xrange=None, percent_step=5): """ Plotting differences of sig distribution in percentiles of tag distribution Arg...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 14691, 4899, 198, 198, 37811, 198, 11748, 20681, 29487, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738,...
1.991525
1,416
import string import random from set1.Aes_cipher import * from set2.PkcsPadding import pkcs7_pad_check from set1.Xor import xorPlain KEY = ''.join([chr(random.randint(0,255)) for i in range(16)]) IV = ''.join([chr(random.randint(0,255)) for i in range(16)]) if __name__ == '__main__': # replace d with ; and se...
[ 11748, 4731, 198, 11748, 4738, 198, 6738, 900, 16, 13, 32, 274, 62, 66, 10803, 1330, 1635, 198, 6738, 900, 17, 13, 47, 74, 6359, 47, 26872, 1330, 279, 74, 6359, 22, 62, 15636, 62, 9122, 198, 6738, 900, 16, 13, 55, 273, 1330, 212...
2.755501
409
import torch import torch.nn as nn import torch.nn.functional as F from networks.layers import NoisyLinear from networks.network_bodies import SimpleBody, AtariBody device = torch.device("cuda" if torch.cuda.is_available() else "cpu") ########Recurrent Architectures######### ########Actor Critic Architectur...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 7686, 13, 75, 6962, 1330, 1400, 13560, 14993, 451, 198, 6738, 7686, 13, 27349, 62, 65, 5042, 1330, 17427, 258...
3.569892
93
import sys from PyQt5 import QtGui, QtWidgets from PyQt5.QtCore import QRect from PyQt5.QtWidgets import QApplication, QFileDialog from Shadow import ShadowTools as ST from orangewidget import gui from oasys.widgets import gui as oasysgui, widget from oasys.util.oasys_util import EmittingStream from orangecontrib.wof...
[ 11748, 25064, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 42137, 478, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1...
2.681034
232
import os basePath = './install_root' RLGlue_Files = [] pythonTemplateFileName='uninstall-rlglue-template.py' pythonUninstallFileName='uninstall-resources/uninstall-rlglue.py' for root, dirs, files in os.walk(basePath): for f in files: if f.endswith('.h') or f.endswith('.dylib') or f.endswith('a'): thisName=os....
[ 11748, 28686, 198, 8692, 15235, 796, 705, 19571, 17350, 62, 15763, 6, 198, 7836, 9861, 518, 62, 25876, 796, 17635, 198, 198, 29412, 30800, 8979, 5376, 11639, 403, 17350, 12, 45895, 4743, 518, 12, 28243, 13, 9078, 6, 198, 29412, 3118, ...
2.527778
288
# Krishan Patel # Bank Account Class """Chaper 14: Objects From Hello World! Computer Programming for Kids and Beginners Copyright Warren and Carter Sande, 2009-2013 """ # Chapter 14 - Try it out class BankAccount: """Creates a bank account""" def display_balance(self): """Displays the balance of the...
[ 2, 31372, 272, 33110, 198, 2, 5018, 10781, 5016, 198, 198, 37811, 1925, 2136, 1478, 25, 35832, 198, 4863, 18435, 2159, 0, 13851, 30297, 329, 17476, 290, 16623, 2741, 198, 15269, 11328, 290, 10831, 3837, 68, 11, 3717, 12, 6390, 198, 37...
3.174168
511
import platform import textwrap import termios import struct import fcntl import sys from accessories import ( as_subprocess, TestTerminal, many_columns, all_terms, ) import pytest def test_SequenceWrapper_invalid_width(): """Test exception thrown from invalid width""" WIDTH = -3 @as_su...
[ 11748, 3859, 198, 11748, 2420, 37150, 198, 11748, 3381, 4267, 198, 11748, 2878, 198, 11748, 277, 66, 429, 75, 198, 11748, 25064, 198, 198, 6738, 18199, 1330, 357, 198, 220, 220, 220, 355, 62, 7266, 14681, 11, 198, 220, 220, 220, 6208,...
2.758242
364
from logging import getLogger from os import system from discord.ext import commands import discord from src.constants import Colours from src.exts.utils.converter import acute_remover log = getLogger(__name__) class Commands(commands.Cog): """A couple of simple commands.""" @commands.command(name="hello...
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 28686, 1330, 1080, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 198, 6738, 12351, 13, 9979, 1187, 1330, 1623, 4662, 198, 6738, 12351, 13, 2302, 82, 13, 26791, 13, ...
2.873171
205
#나누어 떨어지는 숫자 배열 ''' 채점을 시작합니다. 정확성 테스트 테스트 1 〉 통과 (0.02ms, 10.2MB) 테스트 2 〉 통과 (0.01ms, 10.3MB) 테스트 3 〉 통과 (0.02ms, 10.2MB) 테스트 4 〉 통과 (0.02ms, 10.2MB) 테스트 5 〉 통과 (0.01ms, 10.1MB) 테스트 6 〉 통과 (3.22ms, 13.4MB) 테스트 7 〉 통과 (0.27ms, 10.3MB) 테스트 8 〉 통과 (0.00ms, 10.2MB) 테스트 9 〉 통과 (0.19ms, 10.2MB) 테스트 10 〉 통과 (0.13ms, 10.2M...
[ 2, 167, 224, 246, 167, 230, 226, 168, 244, 112, 31619, 244, 101, 168, 244, 112, 168, 100, 222, 167, 232, 242, 23821, 230, 104, 168, 252, 238, 31619, 108, 108, 168, 245, 112, 628, 198, 7061, 6, 198, 168, 109, 226, 168, 254, 238, ...
0.838558
638
# -*- coding: utf-8 -*- """ Class for the ogs FUNCTION file. .. currentmodule:: ogs5py.fileclasses.fct File Class ^^^^^^^^^^ .. autosummary:: FCT ---- """ from ogs5py.fileclasses.fct.core import FCT __all__ = ["FCT"]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9487, 329, 262, 267, 14542, 29397, 4177, 2849, 2393, 13, 198, 198, 492, 1459, 21412, 3712, 267, 14542, 20, 9078, 13, 7753, 37724, 13, 69, 310, 198, 198, 89...
2.368421
95
#! /usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2014, Dionach Ltd. All rights reserved. See LICENSE file. # # PANhunt: search directories and sub directories for documents with PANs # By BB import os import sys import re import argparse import time import hashlib import platform import colorama import...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 11, 29628, 620, 12052, 13, 1439, 2489, 10395, 13, 4091, 38559, 24290, 2393, 13, ...
2.723019
2,650
self.description = "server failover after 404" self.require_capability("curl") p1 = pmpkg('pkg') self.addpkg2db('sync', p1) url_broke = self.add_simple_http_server({ '/{}'.format(p1.filename()): { 'code': 404, 'body': 'a', } }) url_good = self.add_simple_http_server({ '/{}'.format(p1.filen...
[ 944, 13, 11213, 796, 366, 15388, 2038, 2502, 706, 32320, 1, 198, 944, 13, 46115, 62, 11128, 1799, 7203, 66, 6371, 4943, 198, 198, 79, 16, 796, 279, 3149, 10025, 10786, 35339, 11537, 198, 944, 13, 2860, 35339, 17, 9945, 10786, 27261, ...
2.271605
243
from bidict import bidict
[ 6738, 8406, 713, 1330, 8406, 713, 628 ]
3.857143
7
/home/wai/anaconda3/lib/python3.6/hmac.py
[ 14, 11195, 14, 86, 1872, 14, 272, 330, 13533, 18, 14, 8019, 14, 29412, 18, 13, 21, 14, 71, 20285, 13, 9078 ]
1.863636
22
""" # ================================== # AUTHOR : Yan Li, Qiong Wang # CREATE DATE : 02.10.2020 # Contact : liyanxian19@gmail.com # ================================== # Change History: None # ================================== """ ########## Import python libs ########## import os ########## Import third...
[ 37811, 201, 198, 2, 46111, 28, 201, 198, 2, 44746, 1058, 10642, 7455, 11, 1195, 295, 70, 15233, 201, 198, 2, 29244, 6158, 360, 6158, 1058, 7816, 13, 940, 13, 42334, 201, 198, 2, 14039, 1058, 7649, 4121, 87, 666, 1129, 31, 14816, 1...
3.449495
198
from typing import Optional from .base import Base, Condition, DayTime, PhenomCondition, PrecipitationType, Season, WindDir
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 764, 8692, 1330, 7308, 11, 24295, 11, 3596, 7575, 11, 34828, 296, 48362, 11, 28737, 541, 3780, 6030, 11, 7369, 11, 3086, 35277, 628 ]
4.064516
31
with open("README.md", "r") as fh: long_description = fh.read() from setuptools import setup, find_packages setup( name='lcd-controller2', version='', packages=find_packages('src'), package_dir={'': 'src'}, url='', license='', author='Lukas Brennauer, Samuel Kroiss', author_email=...
[ 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 628, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, ...
2.452381
168
# -*- coding: utf-8 -*- """ Created on Mon Feb 24 01:14:06 2020 Github: https://github.com/tjczec01 @author: Travis J Czechorski E-mail: tjczec01@gmail.com """ import sympy as sp from sympy import diff, Matrix, symbols, Add, Mul, Pow, Symbol, Integer, latex, exp, simplify from sympy.matrices.dense im...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 3158, 1987, 5534, 25, 1415, 25, 3312, 12131, 201, 198, 201, 198, 38, 10060, 25, 3740, 1378, 12567, 13, 785, 14, 83, 73, 26691, ...
2.602392
669
import json import multiprocessing as mp import os import pkgutil import shutil import subprocess import tarfile import tempfile from random import randint from typing import Tuple, cast import pytest import requests from ethereum.base_types import Uint from ethereum.crypto import keccak256 from ethereum.ethash impor...
[ 11748, 33918, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 28686, 198, 11748, 279, 10025, 22602, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753, 198, 6738, 4738, 1330, 43720, 6...
2.632096
916
__author__ = 'thorn' import logging import sys LOGGER = logging.getLogger()
[ 834, 9800, 834, 796, 705, 400, 1211, 6, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 3419, 198 ]
2.961538
26
import json import logging from os import environ as env import requests from dotenv import load_dotenv # Get environment load_dotenv() DATASERVICE_PUBLISHER_HOST_URL = env.get("DATASERVICE_PUBLISHER_HOST_URL") ADMIN_USERNAME = env.get("ADMIN_USERNAME", "admin") ADMIN_PASSWORD = env.get("ADMIN_PASSWORD") INPUT_FILE =...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 28686, 1330, 551, 2268, 355, 17365, 198, 11748, 7007, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2, 3497, 2858, 198, 2220, 62, 26518, 24330, 3419, 198, 35, 1404, 192...
2.386345
1,201
# Import our libraries # Import pandas and numpy import pandas as pd import numpy as np import pickle import matplotlib.pyplot as plt # Helper function to split our data from sklearn.model_selection import train_test_split # Import our Logistic Regression model from sklearn.linear_model import LogisticRegressi...
[ 2, 17267, 674, 12782, 198, 198, 2, 17267, 19798, 292, 290, 299, 32152, 220, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 2298, 293, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355...
2.784029
1,653
import contextlib from multiprocessing import connection import os import queue import threading from porcupine import dirs _ADDRESS_FILE = os.path.join(dirs.cachedir, 'ipc_address.txt') # the addresses contain random junk so they are very unlikely to # conflict with each other # example addresses: r'\\.\pipe\pyc-1...
[ 11748, 4732, 8019, 198, 6738, 18540, 305, 919, 278, 1330, 4637, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 4704, 278, 198, 198, 6738, 16964, 25244, 500, 1330, 288, 17062, 198, 198, 62, 2885, 7707, 7597, 62, 25664, 796, 28686, 13,...
2.482178
1,010
# -*- coding: utf-8 -*- from Physics import eps_0, mu_0 from math import pi, sqrt resistivity = {'copper': 1.7e-8, 'aluminum': 2.8e-8, 'iron': 1e-7, 'steel-electrical': 4.6e-7, 'steel-stainless': 6.9e-7, 'gold': 2.44e-8, 'silver': 1.68e-8, 'graphite-min': 2.5e-6, 'graphite-...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 23123, 1330, 304, 862, 62, 15, 11, 38779, 62, 15, 198, 6738, 10688, 1330, 31028, 11, 19862, 17034, 198, 198, 35119, 3458, 796, 1391, 6, 1073, 2848, 10354, 352, 1...
2.173913
782
#!/usr/bin/env python3 import random from mytcputils import * from mytcp import Servidor foi_aceita = False rede = CamadaRede() dst_port = random.randint(10, 1023) servidor = Servidor(rede, dst_port) servidor.registrar_monitor_de_conexoes_aceitas(conexao_aceita) src_port = random.randint(1024, 0xffff) seq_no = rando...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 4738, 198, 6738, 616, 23047, 1996, 4487, 1330, 1635, 198, 6738, 616, 83, 13155, 1330, 3116, 312, 273, 198, 198, 6513, 72, 62, 558, 5350, 796, 10352, 198, 198, 445, 68, 796...
2.350176
851
"""Video stream client for Raspberry Pi-powered dash cam.""" import signal import sys from pathlib import Path from typing import Any, Optional import arrow import cv2 from loguru import logger from vidgear.gears import VideoGear, WriteGear from minigugl import annotation, config from minigugl.log import setup_loggin...
[ 37811, 10798, 4269, 5456, 329, 24244, 13993, 12, 12293, 14470, 12172, 526, 15931, 198, 11748, 6737, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 11748, 15452, 198, 11748, 269, 8...
2.485802
1,620
from sanic import response, Sanic import asyncio import timeit # MaryJane is an mjpeg server - it works by fetching *the same* jpeg image over and over from a ram drive # MIT license # copyright 2021 Andrew Stuart andrew.stuart@supercoders.com.au app = Sanic(__name__) @app.route('/maryjane/') if __name__ == '__main...
[ 6738, 5336, 291, 1330, 2882, 11, 2986, 291, 198, 11748, 30351, 952, 198, 11748, 640, 270, 198, 198, 2, 5335, 41083, 318, 281, 285, 73, 22071, 4382, 532, 340, 2499, 416, 21207, 278, 1635, 1169, 976, 9, 474, 22071, 2939, 625, 290, 625...
2.754491
167
GET_PACKAGE_ADT_XML='''<?xml version="1.0" encoding="utf-8"?> <pak:package xmlns:pak="http://www.sap.com/adt/packages" xmlns:adtcore="http://www.sap.com/adt/core" adtcore:masterLanguage="EN" adtcore:name="$IAMTHEKING" adtcore:type="DEVC/K" adtcore:changedAt="2019-01-29T23:00:00Z" adtcore:version="active" adtcore:create...
[ 18851, 62, 47, 8120, 11879, 62, 2885, 51, 62, 55, 5805, 28, 7061, 6, 47934, 19875, 2196, 2625, 16, 13, 15, 1, 21004, 2625, 40477, 12, 23, 13984, 29, 198, 27, 41091, 25, 26495, 35555, 5907, 25, 41091, 2625, 4023, 1378, 2503, 13, 82...
2.714731
1,283
################################################################# # Code written by Edward Choi (mp2893@gatech.edu) # For bug report, please contact author using the email address ################################################################# import sys, random import numpy as np import cPickle as pickle from colle...
[ 29113, 29113, 2, 198, 2, 6127, 3194, 416, 10443, 42198, 357, 3149, 2078, 6052, 31, 10494, 354, 13, 15532, 8, 198, 2, 1114, 5434, 989, 11, 3387, 2800, 1772, 1262, 262, 3053, 2209, 198, 29113, 29113, 2, 198, 198, 11748, 25064, 11, 473...
2.753425
511
#! /usr/bin/env python # # This file is part of pySerial - Cross platform serial port support for Python # (C) 2001-2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause """\ Some tests for the serial module. Part of pyserial (http://pyserial.sf.net) (C)2001-2009 cliechti@gmx.net Intended...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 12972, 32634, 532, 6372, 3859, 11389, 2493, 1104, 329, 11361, 198, 2, 357, 34, 8, 5878, 12, 4626, 5180, 12060, 354, 20259, 1279, 565, 494, 35...
3.062893
636
from django.shortcuts import render from django.shortcuts import redirect from django.contrib.auth.decorators import login_required from django.http import JsonResponse from django.core import serializers # Create your views here. from django.http import HttpResponse from django.template import loader from django.views...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 4023, ...
3.743119
109
with open("tinder_api/utils/token.txt", "r") as f: tinder_token = f.read() # it is best for you to write in the token to save yourself the file I/O # especially if you have python byte code off #tinder_token = "" headers = { 'app_version': '6.9.4', 'platform': 'ios', 'content-type': 'application/json'...
[ 4480, 1280, 7203, 83, 5540, 62, 15042, 14, 26791, 14, 30001, 13, 14116, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, 256, 5540, 62, 30001, 796, 277, 13, 961, 3419, 198, 198, 2, 340, 318, 1266, 329, 345, 284, 3551, 287, ...
2.434783
207
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class IssueListDeviceRemote(RemoteModel): """ This table list out the entries of issues in the device. | ``IssueTimestamp:`` The date and time this issue list device record was collected or calculated. |...
[ 6738, 11485, 47960, 1330, 21520, 17633, 198, 6738, 1167, 45292, 1140, 62, 3262, 76, 380, 13, 26791, 13, 26791, 1330, 2198, 62, 15042, 62, 47274, 628, 198, 4871, 18232, 8053, 24728, 36510, 7, 36510, 17633, 2599, 198, 220, 220, 220, 37227...
2.595868
1,210
""" """ from revibe.exceptions import RevibeException # -----------------------------------------------------------------------------
[ 37811, 198, 37811, 198, 198, 6738, 2710, 32438, 13, 1069, 11755, 1330, 5416, 32438, 16922, 198, 198, 2, 16529, 32501, 198 ]
6.47619
21
""" Automatically shutdown windows after a user defined time period """ import subprocess from time import sleep print("") print("Auto Shutdown Windows") print("=====================") print("") seconds = float(raw_input("Specify time in minutes: ")) * 60.0 print("") print(">>> Computer will force shutdown automatica...
[ 37811, 198, 38062, 4142, 18325, 9168, 706, 257, 2836, 5447, 640, 2278, 198, 37811, 198, 198, 11748, 850, 14681, 198, 6738, 640, 1330, 3993, 198, 198, 4798, 7203, 4943, 198, 4798, 7203, 27722, 40411, 3964, 4943, 198, 4798, 7203, 4770, 14...
3.529915
117
""" 744. Find Smallest Letter Greater Than Target Input: letters = ["c", "f", "j"] target = "a" Output: "c" Input: letters = ["c", "f", "j"] target = "c" Output: "f" Input: letters = ["c", "f", "j"] target = "d" Output: "f" Input: letters = ["c", "f", "j"] target = "g" Output: "j" Input: le...
[ 37811, 201, 198, 22, 2598, 13, 9938, 10452, 395, 18121, 18169, 17924, 12744, 201, 198, 201, 198, 20560, 25, 201, 198, 15653, 796, 14631, 66, 1600, 366, 69, 1600, 366, 73, 8973, 201, 198, 16793, 796, 366, 64, 1, 201, 198, 26410, 25, ...
2.036866
217
# -*- coding: utf-8 -*- import nuke import edgeNode SantoshMenu.addCommand("edgeNode/Jump to First", "edgeNode.jump_to_edge_node('top')") SantoshMenu.addCommand("edgeNode/Jump to Last", "edgeNode.jump_to_edge_node('bottom')") SantoshMenu.addCommand("edgeNode/View First", "edgeNode.view_edge_node('top')") SantoshMenu.a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 4649, 198, 11748, 5743, 19667, 198, 198, 50, 415, 3768, 23381, 13, 2860, 21575, 7203, 14907, 19667, 14, 36046, 284, 3274, 1600, 366, 14907, 19667, 13, 43327, ...
2.771429
140
#Python 3 #Usage: python3 UDPClient3.py localhost 12000 #coding: utf-8 from socket import * import sys # The argument of client servername = sys.argv[1] serverPort = sys.argv[2] udpPort = sys.argv[3] serverPort = int(serverPort) clientSocket = socket(AF_INET, SOCK_STREAM) clientSocket.connect((servername...
[ 2, 37906, 513, 201, 198, 2, 28350, 25, 21015, 18, 36428, 11792, 18, 13, 9078, 1957, 4774, 1105, 830, 201, 198, 2, 66, 7656, 25, 3384, 69, 12, 23, 201, 198, 6738, 17802, 1330, 1635, 201, 198, 11748, 25064, 201, 198, 201, 198, 2, ...
2.063763
1,584
from django.utils.translation import ugettext_lazy as _ import horizon horizon.register(Techbk_Head)
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 11748, 17810, 628, 198, 198, 17899, 8637, 13, 30238, 7, 17760, 65, 74, 62, 13847, 8, 198 ]
3
35
from django import forms from django.utils.encoding import force_text from orchestra.admin.utils import admin_link from orchestra.forms.widgets import SpanWidget
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 5239, 198, 198, 6738, 40095, 13, 28482, 13, 26791, 1330, 13169, 62, 8726, 198, 6738, 40095, 13, 23914, 13, 28029, 11407, 1330, 49101, 3...
3.860465
43
import os import argparse import time import torch.nn.functional as F import torch.nn.parallel import torch.optim from sklearn.metrics import confusion_matrix, accuracy_score import seaborn as sns import matplotlib.pyplot as plt import pandas as pd from dataset import TBNDataSet from DA_model import TBN from transfor...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 20471, 13, 1845, 29363, 198, 11748, 28034, 13, 40085, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, ...
3.014184
141
import pytest import napari_morphodynamics import napari_morphodynamics.napari_gui from morphodynamics.data import synth import numpy as np import h5py import napari_morphodynamics @pytest.fixture(scope="session") def dataset(tmp_path_factory): """Create a dataset for testing.""" new_path = tmp_path_factory....
[ 11748, 12972, 9288, 198, 11748, 25422, 2743, 62, 24503, 44124, 198, 11748, 25422, 2743, 62, 24503, 44124, 13, 77, 499, 2743, 62, 48317, 198, 6738, 17488, 44124, 13, 7890, 1330, 33549, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, ...
2.43662
568
import numpy as np from enthought.mayavi import mlab import Image if __name__ == '__main__': import dipy.core.qball as qball from dipy.io.bvectxt import read_bvec_file filename='/Users/bagrata/HARDI/E1322S8I1.nii.gz' grad_table_filename='/Users/bagrata/HARDI/E1322S8I1.bvec' from nipy import load_im...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 920, 71, 2917, 13, 11261, 15820, 1330, 285, 23912, 198, 11748, 7412, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 19550, 88, 13, 7295, 13, 80, ...
2.162963
405
import re reg_ex = re.compile(r"^[a-z][a-z]*[a-z]$") no_reg_ex = re.compile(r".*[0-9].*") mc_reg_ex = re.compile(r".*[A-Z].*[A-Z].*") def containsNumber(text): """包含数字.""" return no_reg_ex.match(text) def containsMultiCapital(text): """包含多个大写字母.""" return mc_reg_ex.match(text) def can_spellcheck(...
[ 11748, 302, 198, 198, 2301, 62, 1069, 796, 302, 13, 5589, 576, 7, 81, 1, 61, 58, 64, 12, 89, 7131, 64, 12, 89, 60, 9, 58, 64, 12, 89, 60, 3, 4943, 198, 3919, 62, 2301, 62, 1069, 796, 302, 13, 5589, 576, 7, 81, 1911, 9, 5...
1.812721
283
from pandas.core.algorithms import isin import pytest from ncmw.utils import get_models import numpy as np from pandas import DataFrame from ncmw.community.community_models import ( BagOfReactionsModel, ShuttleCommunityModel, create_stoichiometry_matrix, ) MODELS = get_models("models") CO...
[ 6738, 19798, 292, 13, 7295, 13, 282, 7727, 907, 1330, 318, 259, 201, 198, 11748, 12972, 9288, 201, 198, 201, 198, 201, 198, 6738, 299, 11215, 86, 13, 26791, 1330, 651, 62, 27530, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 67...
2.615385
195
# -*- coding: utf-8 -*- """ Automatically detect rotation and line spacing of an image of text using Radon transform If image is rotated by the inverse of the output, the lines will be horizontal (though they may be upside-down depending on the original image) It doesn't work with black borders Courtesy: https://gist....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 38062, 4142, 4886, 13179, 290, 1627, 31050, 286, 281, 2939, 286, 2420, 1262, 198, 15546, 261, 6121, 198, 1532, 2939, 318, 38375, 416, 262, 34062, 286, 262, 5...
3.326531
245
from yapapi.runner import Engine, Task, vm from yapapi.runner.ctx import WorkContext from yapapi.log import log_summary, log_event_repr from datetime import timedelta import json import uuid from core import TranscodingData, TranscodingTask, GolemParameters, SubtaskFinishedEvent # image hash of the geomandel docker i...
[ 6738, 331, 499, 15042, 13, 16737, 1330, 7117, 11, 15941, 11, 45887, 198, 6738, 331, 499, 15042, 13, 16737, 13, 49464, 1330, 5521, 21947, 198, 6738, 331, 499, 15042, 13, 6404, 1330, 2604, 62, 49736, 11, 2604, 62, 15596, 62, 260, 1050, ...
2.526823
1,659
#!/usr/bin/env python3 """ Take a polyglot from mitra, generate a OFB ciphertext which decrypts correctly under two different keys. iv = dec(c0 ^ p0) """ import binascii import os import argparse import re from Crypto.Cipher import AES from Crypto.Util.number import long_to_bytes,bytes_to_long from Crypto.Util.numbe...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 12322, 257, 7514, 4743, 313, 422, 10255, 430, 11, 198, 8612, 378, 257, 3963, 33, 38012, 5239, 543, 42797, 82, 9380, 739, 734, 1180, 8251, 13, 198, 198, 452, 796,...
2.199019
1,427
from __future__ import annotations import inspect import threading import weakref from types import MethodType from typing import ( Any, Callable, Generic, Iterator, List, MutableSet, Optional, Type, TypeVar, cast, ) __all__ = ["EventIterator", "Event"] _TResult = TypeVar("_TR...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 10104, 198, 11748, 4704, 278, 198, 11748, 4939, 5420, 198, 6738, 3858, 1330, 11789, 6030, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 4889, 540, ...
2.62963
162
from typing import Dict, Any import tensorflow as tf from tensorflow.keras.utils import plot_model from kashgari_local.abc_feature_model import ABCClassificationModel from kashgari.layers import L
[ 6738, 19720, 1330, 360, 713, 11, 4377, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 26791, 1330, 7110, 62, 19849, 198, 6738, 479, 1077, 70, 2743, 62, 12001, 13, 39305, 62, 30053, 62,...
3.316667
60
""" Stiny - A home automation assistant """ import os import posixpath import calendar import datetime import json import logging import requests from collections import defaultdict from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.conf...
[ 37811, 520, 3541, 532, 317, 1363, 22771, 8796, 37227, 198, 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 198, 11748, 11845, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 17268, 1330, 4277, 11...
2.552425
2,804
""" Creates a URL to search jobs on specific filters. """ from typing import Dict, Union import config experience = { 'No': 'noExperience', '1-3': 'between1And3', '3-6': 'between3And6', 'More 6': 'moreThan6' } areas = { 'Moscow': '1', 'StPetersburg': '2', 'Krasnodar': '53' }
[ 37811, 198, 16719, 274, 257, 10289, 284, 2989, 3946, 319, 2176, 16628, 13, 198, 37811, 198, 198, 6738, 19720, 1330, 360, 713, 11, 4479, 198, 198, 11748, 4566, 198, 198, 23100, 1240, 796, 1391, 198, 220, 220, 220, 705, 2949, 10354, 705...
2.255474
137
from beaker.cache import cache_region as Cache, region_invalidate as Invalidate from Houdini.Handlers import Handlers, XT from Houdini.Handlers.Play.Moderation import cheatBan from Houdini.Data.Penguin import Inventory cardStarterDeckId = 821 fireBoosterDeckId = 8006 waterBoosterDeckId = 8010 boosterDecks = { ca...
[ 6738, 307, 3110, 13, 23870, 1330, 12940, 62, 36996, 355, 34088, 11, 3814, 62, 259, 12102, 378, 355, 17665, 378, 198, 198, 6738, 367, 2778, 5362, 13, 12885, 8116, 1330, 7157, 8116, 11, 44235, 198, 6738, 367, 2778, 5362, 13, 12885, 8116...
2.514107
319
from flask import Flask, request, render_template, redirect, url_for, flash, abort, send_from_directory from flask_bootstrap import Bootstrap from flask_ckeditor import CKEditor from datetime import date from werkzeug.security import generate_password_hash, check_password_hash from flask_sqlalchemy import SQLAlche...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 7644, 11, 15614, 11, 3758, 62, 6738, 62, 34945, 201, 198, 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 201, 198, 6738, 42903, 62, 694, ...
3.58114
1,824
import os import yaml folders = [] files = [] for entry in os.scandir('./lambda_functions/source/'): if entry.is_dir(): if "asset." not in entry.path: print("WARN: Skipping path...") else: folders.append(entry.path) templateStream = open('./templates/AwsBiotechBlueprint.t...
[ 11748, 28686, 198, 11748, 331, 43695, 220, 198, 198, 11379, 364, 796, 17635, 198, 16624, 796, 17635, 198, 1640, 5726, 287, 28686, 13, 1416, 392, 343, 7, 4458, 14, 50033, 62, 12543, 2733, 14, 10459, 14, 6, 2599, 198, 220, 220, 220, 6...
2.156764
1,397
import os import uuid from azure.storage.blob import BlobServiceClient
[ 198, 11748, 28686, 198, 11748, 334, 27112, 198, 198, 6738, 35560, 495, 13, 35350, 13, 2436, 672, 1330, 1086, 672, 16177, 11792, 198 ]
3.173913
23
from .cnmf import napari_experimental_provide_dock_widget
[ 6738, 764, 66, 21533, 69, 1330, 25422, 2743, 62, 23100, 9134, 62, 15234, 485, 62, 67, 735, 62, 42655 ]
3
19
# -*- coding: utf-8 -*- """ Created on Thu Jul 16 08:39:36 2020 @author: abhi0 """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 26223, 5979, 1467, 8487, 25, 2670, 25, 2623, 12131, 201, 198, 201, 198, 31, 9800, 25, 450, 5303, 15, 201, 198, 37811, 201 ]
2.069767
43
# web_app/__init__.py from flask import Flask import os from dotenv import load_dotenv from web_app.routes.home_routes import home_routes from web_app.routes.stats_routes import stats_routes if __name__ == "__main__": my_app = create_app() my_app.run(debug=True)
[ 2, 3992, 62, 1324, 14, 834, 15003, 834, 13, 9078, 198, 6738, 42903, 1330, 46947, 198, 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 6738, 3992, 62, 1324, 13, 81, 448, 274, 13, 11195, 62, 81, 448, 274...
2.5
110
import numpy as np import tensorflow as tf from PIL import Image import glob import os # import tensorflow.contrib.slim as slim import tensorflow.keras as keras def get_feature_extracting_model(input_tensor=None,input_shape=(480,640,3),model_name='resnet50',layer_index=[6,38,80,142,174]): """ input_shape : the...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 15095, 198, 11748, 28686, 198, 2, 1330, 11192, 273, 11125, 13, 3642, 822, 13, 82, 2475, 355, 18862, 198, 11748, 1119...
2.804196
429
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Android system-wide tracing utility. This is a tool for capturing a trace that includes data from both userland and the kernel...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2813, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, ...
2.516883
1,925
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import matplotlib.pyplot as plt from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.decomposition import TruncatedSVD from sklearn import preprocessing, model_selection, metr...
[ 11748, 299, 32152, 355, 45941, 1303, 14174, 37139, 198, 11748, 19798, 292, 355, 279, 67, 1303, 1366, 7587, 11, 44189, 2393, 314, 14, 46, 357, 68, 13, 70, 13, 279, 67, 13, 961, 62, 40664, 8, 198, 11748, 2603, 29487, 8019, 13, 9078, ...
2.537255
765
# spec for webdriver processors class WebDriverProcessor(object): """Allows outside users to have the final say on things like capabilities that are used to instantiate WebDriver. """ def process_capabilities(self, capabilities): """Process capabilities passed in and return the final dict. ...
[ 2, 1020, 329, 3992, 26230, 20399, 198, 198, 4871, 5313, 32103, 18709, 273, 7, 15252, 2599, 198, 220, 220, 220, 37227, 34934, 2354, 2985, 284, 423, 262, 2457, 910, 319, 1243, 588, 9889, 198, 220, 220, 220, 326, 389, 973, 284, 9113, 9...
3.069767
129
constants.physical_constants["atomic unit of electric field"]
[ 9979, 1187, 13, 42854, 62, 9979, 1187, 14692, 47116, 4326, 286, 5186, 2214, 8973 ]
4.357143
14
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response from django.http import HttpResponseServerError from django.template import RequestContext from freechess.models import ChessGame from dateutil.relativedelta import relativedelta import datetime
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 10697, 12331, 198, 6738, 42625, 14208, 1...
3.573333
75
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import hashlib from cli_tools.flakiness_cli import api from cli_tools.flakiness_cli import frames def GetBuilders(): """Get the builders...
[ 2, 15069, 2864, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 11748...
3.186722
241
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.RpaCrawlerTaskVO import RpaCrawlerTaskVO
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 26209, 13, 2348, 541, 323, 31077, 1330, 978,...
2.586667
75
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is govered by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """This file exists so that code in gRPC *_pb2.py files is importable. The protoc compiler for ...
[ 2, 15069, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 467, 21917, 416, 257, 347, 10305, 12, 7635, 198, 2, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 393, 379, 198,...
3.741935
186
import requests import argparse import colorama import os import csv import pandas as pd from bs4 import BeautifulSoup as soup if __name__ == '__main__': colorama.init() url = 'https://github.com' parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, ...
[ 11748, 7007, 198, 11748, 1822, 29572, 198, 11748, 3124, 1689, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 17141, 628, 628, 628, 198, 361, 11593, ...
2.138067
507
import pytest from vakt.rules.string import PairsEqual, StringPairsEqualRule @pytest.mark.parametrize('against, result', [ ([[]], False), ([], True), ("not-list", False), ([['a']], False), ([['a', 'a']], True), ([['й', 'й']], True), ([[1, '1']], False), ([['1', 1]], False), ([[1, ...
[ 11748, 12972, 9288, 198, 198, 6738, 410, 461, 83, 13, 38785, 13, 8841, 1330, 350, 3468, 36, 13255, 11, 10903, 47, 3468, 36, 13255, 31929, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 10786, 32826, 11, 1255, 3256, 6...
2.036735
245
from functools import reduce from pathlib import Path from code_scanner.enums import FileType from code_scanner.file_info import FileInfo from code_scanner.filter_utils import IFileFilter
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 2438, 62, 35836, 1008, 13, 268, 5700, 1330, 9220, 6030, 198, 6738, 2438, 62, 35836, 1008, 13, 7753, 62, 10951, 1330, 9220, 12360, 198, 6738, 2438, 62, ...
3.555556
54
# Generated by Django 3.2.8 on 2021-11-11 09:19 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 1157, 12, 1157, 7769, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import time import numpy as np import solver board = np.array([ [0,0,0,0,9,0,8,2,3], [0,8,0,0,3,2,0,7,5], [3,0,2,5,8,0,4,9,0], [0,2,7,0,0,0,0,0,4], [0,9,0,2,1,4,0,8,0], [4,0,0,0,0,0,2,0,0], [0,4,0,0,7,1,0,0,2], [2,0,0,9,4,0,0,5,0], [0,0,6,0,2,5,0,4,0] ]) b = solver.SudokuSolver(...
[ 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1540, 332, 628, 198, 3526, 796, 45941, 13, 18747, 26933, 198, 220, 220, 220, 685, 15, 11, 15, 11, 15, 11, 15, 11, 24, 11, 15, 11, 23, 11, 17, 11, 18, 4357, ...
1.492212
321
#!/usr/bin/env python # Root topic rootTopic = "truck1" # Broker configuration mqttBroker = "192.168.1.126" mqttPort = "1883" mqttUser = " " mqttPasswd = " " # Components configuration componentDic = { "imuClass": "Imu", "proximityClass": "ProximitySensor", "motorClass": "Motor", "cameraClass": "Cam...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 20410, 7243, 198, 15763, 33221, 796, 366, 83, 30915, 16, 1, 198, 198, 2, 2806, 6122, 8398, 198, 76, 80, 926, 15783, 6122, 796, 366, 17477, 13, 14656, 13, 16, 13, 19420, 1, ...
2.308458
201
import time import RPi.GPIO as gpio pin = 33 pin_wheel = 35 while True: print 'go straight ' gpio.setmode(gpio.BOARD) gpio.setup(pin, gpio.OUT) gpio.setup(pin_wheel, gpio.OUT) gpio.output(pin_wheel, gpio.HIGH) p = gpio.PWM(pin, 400) p.start(0) dc = 10 for i in range(40): dc...
[ 11748, 640, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 27809, 952, 198, 198, 11635, 796, 4747, 198, 11635, 62, 22001, 796, 3439, 198, 4514, 6407, 25, 198, 220, 220, 220, 3601, 705, 2188, 3892, 705, 198, 220, 220, 220, 27809, ...
1.923729
236
# Bài tập 2. Sử dụng thư viện pandas đọc vào file Iris.csv được biến bộ nhớ df. # 2a. Hiển thị df. # 2b. Chuyển cột nhãn y Species thành dạng dữ liệu mã hóa OHE. Hiển thị dữ liệu được mã hóa. # 2c. Tạo ra cột vector đầu vào x, và cột nhãn vector đầu ra y của df. Hiển thị x và y. # G: import pandas as pd # 2a df = pd.r...
[ 2, 347, 24247, 72, 256, 157, 118, 255, 79, 362, 13, 311, 157, 119, 255, 288, 157, 119, 98, 782, 294, 130, 108, 25357, 157, 119, 229, 77, 19798, 292, 34754, 239, 157, 119, 235, 66, 410, 24247, 78, 2393, 34230, 13, 40664, 34754, 2...
1.605392
408
import pathlib from functools import reduce from typing import List, Tuple if __name__ == "__main__": main()
[ 11748, 3108, 8019, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3.025
40
# Start of file import bpy bpy.context.scene.render.engine = 'CYCLES' bpy.context.scene.render.resolution_x = 320 bpy.context.scene.render.resolution_y = 208 bpy.context.scene.render.resolution_percentage = 100 bpy.context.scene.render.image_settings.file_format = 'BMP' bpy.context.scene.render.tile_x = 16 bpy.context....
[ 2, 7253, 286, 2393, 198, 11748, 275, 9078, 198, 65, 9078, 13, 22866, 13, 29734, 13, 13287, 13, 18392, 796, 705, 34, 56, 5097, 1546, 6, 198, 65, 9078, 13, 22866, 13, 29734, 13, 13287, 13, 29268, 62, 87, 796, 20959, 198, 65, 9078, ...
2.44386
1,710
import os from kivy.uix.image import Image print("Warning: this module will be removed in future") ASSET_PATH = os.path.dirname(__file__) SIZE_MOD = 32 tiles = { 'grass': lambda **kwargs: tile_factory("grass.png", **kwargs), 'settlement': lambda **kwargs: tile_factory("settlement.png", **kwargs), ...
[ 198, 198, 11748, 28686, 198, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 9060, 1330, 7412, 628, 198, 4798, 7203, 20361, 25, 428, 8265, 481, 307, 4615, 287, 2003, 4943, 628, 198, 10705, 2767, 62, 34219, 796, 28686, 13, 6978, 13, 15908,...
2.428261
460
"""Sanity check.""" import os import sys from pathlib import Path from time import sleep import requests from subprocess import Popen import portalocker from logzero import logger # start the server if not already started lockfile = f'{Path(__file__).parent.parent / "deepl_fastapi" / "deepl_server.py.portalocker.loc...
[ 37811, 15017, 414, 2198, 526, 15931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 7007, 198, 6738, 850, 14681, 1330, 8099, 268, 198, 11748, 17898, 12721, 198, 6738,...
2.32363
584
import logging import numpy as np
[ 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.6
10
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils import timezone import plotly.offline as plotly import plotly.graph_objs as go from core.utils import duration_parts from reports import utils def sleep_totals(instances): """ Create a graph showing total time sleeping for e...
[ 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, 26791, 1330, 640, 11340, 198, 198, 11748, 7110, 306, 13, 2364, 1370, 355, 7...
2.409274
992
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from ovm.exceptions import OVMError from ovm.drivers.driver_loader import DriverLoader from ovm.drivers.storage.lvm import LvmDriver from ovm.drivers.storage.file import FileDriver from ovm.drivers.network.bridge import BridgeDriver
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 267, 14761, 13, 1069, 11755, 1330, 440, 15996, 12331, 198, 6738, 267, ...
3.114583
96
from parameterized import parameterized from api.proquest.identifier import ProQuestIdentifierParser from core.model import Identifier
[ 6738, 11507, 1143, 1330, 11507, 1143, 198, 198, 6738, 40391, 13, 1676, 6138, 13, 738, 7483, 1330, 1041, 12166, 33234, 7483, 46677, 198, 6738, 4755, 13, 19849, 1330, 11440, 7483, 628 ]
4.419355
31
import functools import operator from enum import Enum from itertools import combinations from typing import Any, Sequence, Tuple import geopandas as gpd import numpy as np import pygeos import shapely.geometry as sg IntArray = np.ndarray FloatArray = np.ndarray coord_dtype = np.dtype([("x", np.float64), ("y", np.flo...
[ 11748, 1257, 310, 10141, 198, 11748, 10088, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 19720, 1330, 4377, 11, 45835, 11, 309, 29291, 198, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 1174...
2.504085
1,224
import time import DFL168A SuccessFresh=False
[ 11748, 640, 201, 198, 11748, 360, 3697, 14656, 32, 201, 198, 33244, 35857, 28, 25101, 201 ]
3
16
import numpy as np import logging import cv2 import os from torch.utils.data import Dataset
[ 11748, 299, 32152, 355, 45941, 198, 11748, 18931, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 628 ]
3.241379
29
####################################### # Copyright 2019 PMP SA. # # SPDX-License-Identifier: Apache-2.0 # ####################################### import os import pytest from rpackutils.config import Config
[ 29113, 4242, 21017, 198, 2, 15069, 13130, 3122, 47, 14719, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 1303, 198, 29113, 4242...
3.539683
63
import pandas as pd import numpy as nm import sqlite3 from scipy.sparse.linalg import svds from sqlalchemy import create_engine engine=create_engine("postgres://postgres:25736534@localhost:5432/postgres") print(user_row_number) sorted_user_predictions = predictions_df.iloc[user_row_number].sort_values(ascending=Fa...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 28642, 198, 11748, 44161, 578, 18, 198, 6738, 629, 541, 88, 13, 82, 29572, 13, 75, 1292, 70, 1330, 38487, 9310, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, ...
2.328054
442
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\gsi_handlers\buff_handlers.py # Compiled at: 2014-05-30 02:11:42 # Size of source mod 2**32: 4843 by...
[ 2, 34318, 2349, 21, 2196, 513, 13, 22, 13, 19, 198, 2, 11361, 18022, 8189, 513, 13, 22, 357, 2091, 5824, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 513, 13, 22, 13, 24, 357, 31499, 14, 85, 18, 13, 22, 13, 24, 25, 1485, 66,...
2.605381
892
keyboard.send_keys("<shift>+<right>")
[ 2539, 3526, 13, 21280, 62, 13083, 7203, 27, 30846, 29, 10, 27, 3506, 29, 4943 ]
2.466667
15