content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.985425
2,470
from osrsmath.general.skills import * import unittest
[ 6738, 28686, 3808, 11018, 13, 24622, 13, 8135, 2171, 1330, 1635, 201, 198, 11748, 555, 715, 395, 201, 198, 201, 198 ]
2.761905
21
import socket import serial import time import sys import glob import signal from sys import exit address = '127.0.0.1' port = 8080 def serial_ports(): """ Lists serial port names :raises EnvironmentError: On unsupported or unknown platforms :returns: A list of the s...
[ 11748, 17802, 198, 11748, 11389, 198, 11748, 640, 220, 220, 220, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 6737, 198, 6738, 25064, 1330, 8420, 198, 198, 21975, 796, 705, 16799, 13, 15, 13, 15, 13, 16, 6, 198, 634, 796, 4019, ...
2.097865
1,124
import socket import thread import time __author__ = "Sushant Raikar" __email__ = "sushantraikar123@yahoo.com" class SocketClient: """ ================= Pub Sub Generic Client ================= Description: This is a generic client implementation. All interaction with the broker is done throug...
[ 11748, 17802, 198, 11748, 4704, 198, 11748, 640, 198, 198, 834, 9800, 834, 796, 366, 50, 1530, 415, 7567, 1134, 283, 1, 198, 834, 12888, 834, 796, 366, 82, 1530, 415, 430, 1134, 283, 10163, 31, 40774, 13, 785, 1, 198, 198, 4871, 4...
2.565977
1,546
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 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, 198...
3.476974
304
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, re from frappe.website.website_generator import WebsiteGenerator from frappe.website.render import clear_cache from frappe import _ from frappe.utils import to...
[ 2, 15069, 357, 66, 8, 2211, 11, 5313, 11822, 21852, 18367, 83, 13, 12052, 13, 290, 25767, 669, 198, 2, 17168, 13789, 13, 4091, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 5...
3.521739
92
#Siege import bs import bsUtils import random
[ 2, 50, 14566, 198, 11748, 275, 82, 198, 11748, 275, 82, 18274, 4487, 198, 11748, 4738, 198 ]
2.705882
17
import serial
[ 11748, 11389 ]
6.5
2
# encoding: utf-8 from __future__ import print_function from functools import wraps import numpy as np import pandas as pd import matplotlib as mpl mpl.use('Agg') import matplotlib.cm as cm import matplotlib.pyplot as plt from matplotlib.ticker import ScalarFormatter import matplotlib.gridspec as gridspec import sea...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 2603, ...
2.088223
9,374
# Copyright (c) 2014-2015, Doug Kelly # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
[ 2, 15069, 357, 66, 8, 1946, 12, 4626, 11, 15115, 9077, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 170...
3.540117
511
# from .constants import * from rcosautomation.discord.constants import MATTERMOST_USERNAME, MATTERMOST_PASSWORD, VOICE_CHANNEL from rcosautomation.discord.channels import add_channel_if_not_exists import requests from mattermostdriver import Driver # mattermost = Driver({ # 'url': '54.197.25.170', # 'login_...
[ 2, 422, 764, 9979, 1187, 1330, 1635, 198, 6738, 374, 6966, 2306, 296, 341, 13, 15410, 585, 13, 9979, 1187, 1330, 36775, 5781, 44, 10892, 62, 29904, 20608, 11, 36775, 5781, 44, 10892, 62, 47924, 54, 12532, 11, 30578, 8476, 62, 3398, ...
2.948012
327
import chess_diagrams # setup for all tests. See https://docs.pytest.org/en/2.7.3/xunit_setup.html # # Test for a single response. See http://flask.pocoo.org/docs/1.0/testing/ #
[ 11748, 19780, 62, 10989, 6713, 82, 628, 198, 2, 9058, 329, 477, 5254, 13, 4091, 3740, 1378, 31628, 13, 9078, 9288, 13, 2398, 14, 268, 14, 17, 13, 22, 13, 18, 14, 87, 20850, 62, 40406, 13, 6494, 198, 2, 628, 198, 2, 6208, 329, ...
2.520548
73
import base64 import hashlib from Crypto import Random from Crypto.Cipher import DES3 class TDESCipher(object): """ Triple DES (Data Encryption Standard) Enchaine 3 applications successives de l'algorithme DES sur le meme bloc de donnees de 64 bits, avec 2 ou 3 clef DES differentes. Le TDES est crypto...
[ 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 198, 6738, 36579, 1330, 14534, 198, 6738, 36579, 13, 34, 10803, 1330, 22196, 18, 198, 198, 4871, 13320, 1546, 34, 10803, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1...
2.773504
234
import os from pymodm import fields, MongoModel, connect from pymodm.errors import DoesNotExist from passlib.hash import pbkdf2_sha256 connect("mongodb://localhost:27017/database") def add_user(username, password): """Creates new user if user does not exist in the mongo database :param username: user e...
[ 11748, 28686, 198, 6738, 12972, 4666, 76, 1330, 7032, 11, 42591, 17633, 11, 2018, 198, 6738, 12972, 4666, 76, 13, 48277, 1330, 8314, 3673, 3109, 396, 198, 6738, 1208, 8019, 13, 17831, 1330, 279, 65, 74, 7568, 17, 62, 26270, 11645, 198...
2.623011
1,634
from flask import Flask, request, send_from_directory, jsonify import nltk nltk.download('vader_lexicon') from nltk.sentiment.vader import SentimentIntensityAnalyzer app = Flask(__name__, static_url_path='/static') @app.route('/js/<path:path>') @app.route("/") @app.route("/get_sentiment", methods=['GET', 'POST']...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 3758, 62, 6738, 62, 34945, 11, 33918, 1958, 198, 11748, 299, 2528, 74, 198, 77, 2528, 74, 13, 15002, 10786, 85, 5067, 62, 2588, 4749, 11537, 198, 6738, 299, 2528, 74, 13, 34086, 3681, 13, 85, ...
2.644928
138
from __future__ import unicode_literals import pytest @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2306, 1076, 28, 17821, 8, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 6...
2.560606
66
from model.group import Group testdata = [ Group(name='Name1', header='header1', footer='footer1'), Group(name='Name2', header='header2', footer='footer2') ]
[ 6738, 2746, 13, 8094, 1330, 4912, 198, 198, 9288, 7890, 796, 685, 198, 220, 220, 220, 4912, 7, 3672, 11639, 5376, 16, 3256, 13639, 11639, 25677, 16, 3256, 2366, 263, 11639, 5898, 263, 16, 33809, 198, 220, 220, 220, 4912, 7, 3672, 11...
2.766667
60
##### This script splits of the assembly in subcontigs wherever there is a "N" stretch longer than 30N from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.Alphabet import IUPAC import glob Assemblies = glob.glob("/media/avneesh/AneeshHDDfat/AssembledScaffolds/*") N_stretch_len...
[ 198, 4242, 2, 770, 4226, 30778, 286, 262, 10474, 287, 850, 3642, 9235, 14530, 612, 318, 257, 366, 45, 1, 7539, 2392, 621, 1542, 45, 198, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 6738, 16024, 13, 4653, 80, 1330, 1001, 80, 198, ...
2.047236
995
from flask import Blueprint, render_template, request, jsonify from helpers.database import db from model.models import Project, Component comp = Blueprint('component', __name__) @comp.route('/component', methods=['GET']) @comp.route('/component', methods=['POST']) @comp.route('/component', methods=['PUT']) @c...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 198, 6738, 49385, 13, 48806, 1330, 20613, 198, 6738, 2746, 13, 27530, 1330, 4935, 11, 35100, 198, 198, 5589, 796, 39932, 10786, 42895, 3256, 11593, 3672, 834, 8, ...
3.37963
108
from cloudferry.lib.base.action import action
[ 6738, 6279, 2232, 563, 13, 8019, 13, 8692, 13, 2673, 1330, 2223, 628 ]
3.615385
13
import ice import torch from ice.core.loss import LossNode from ice.core.metric import MetricNode from torch import autocast, nn from torch.nn import functional as F from torch.optim import Adam from torchvision.datasets import CIFAR10 from torchvision.transforms import Compose, Normalize, ToTensor # arguments ice.ar...
[ 11748, 4771, 198, 11748, 28034, 198, 6738, 4771, 13, 7295, 13, 22462, 1330, 22014, 19667, 198, 6738, 4771, 13, 7295, 13, 4164, 1173, 1330, 3395, 1173, 19667, 198, 6738, 28034, 1330, 1960, 420, 459, 11, 299, 77, 198, 6738, 28034, 13, 2...
2.33122
631
import requests
[ 11748, 7007, 628 ]
5.666667
3
"""Contract test cases for main.""" from typing import Any import pytest import requests @pytest.mark.contract def test_main(http_service: Any) -> None: """Should return 200 and html.""" url = f"{http_service}" response = requests.get(url) assert response.status_code == 200 assert response.heade...
[ 37811, 45845, 1332, 2663, 329, 1388, 526, 15931, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 12972, 9288, 198, 11748, 7007, 628, 198, 31, 9078, 9288, 13, 4102, 13, 28484, 198, 4299, 1332, 62, 12417, 7, 4023, 62, 15271, 25, 4377, 8,...
3.014925
134
"""ESI slack bot for tweetfleet.""" import os import time from slackclient import SlackClient from esi_bot import ESI from esi_bot import ESI_CHINA from esi_bot import LOG from esi_bot import request from esi_bot.processor import Processor from esi_bot.commands import ( # noqa: F401; # pylint: disable=unused-impor...
[ 37811, 1546, 40, 30740, 10214, 329, 6126, 33559, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 30740, 16366, 1330, 36256, 11792, 198, 198, 6738, 1658, 72, 62, 13645, 1330, 412, 11584, 198, 6738, 1658, 72, 62, 1364...
2.313821
615
# Copyright (c) 2017 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import itertools from . import scheduler from signac.common.six import with_metaclass import uuid # def _fn_bundle(self, bundle_id): # return os.path.join(self.root_dire...
[ 2, 15069, 357, 66, 8, 2177, 383, 3310, 658, 286, 262, 2059, 286, 7055, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 11971, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 11748, 340, 861, 10141, 198, 6738, 764,...
2.329803
661
import cv2 as cv img = cv.imread("testeOpenCV.jpg") cinza = cv.cvtColor(img, cv.COLOR_BGR2GRAY) print(cinza.shape) cv.imshow("Joelma Cinza", cinza) cv.waitKey(0)
[ 11748, 269, 85, 17, 355, 269, 85, 198, 9600, 796, 269, 85, 13, 320, 961, 7203, 9288, 68, 11505, 33538, 13, 9479, 4943, 198, 17879, 4496, 796, 269, 85, 13, 33967, 83, 10258, 7, 9600, 11, 269, 85, 13, 46786, 62, 33, 10761, 17, 38,...
2
81
import pandas as pd import matplotlib.pyplot as plt plt.switch_backend('Qt4Agg') import os data_folder = "C:\\Users\\jeroe\\PycharmProjects\\PythonDataScienceWorkshops\\data" os.chdir(data_folder) temp = pd.read_csv("mean_temperature.csv", delimiter="\t", header=None) print(temp.head())
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 31943, 62, 1891, 437, 10786, 48, 83, 19, 46384, 11537, 198, 198, 11748, 28686, 198, 7890, 62, 43551, 796, 366, 34, 25, ...
2.675926
108
from .stats_influx import StatsInflux from pymongo import MongoClient, database, collection from urllib.parse import quote_plus
[ 6738, 764, 34242, 62, 10745, 22564, 1330, 20595, 18943, 22564, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 11, 6831, 11, 4947, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 62, 9541, 628, 628, 628, 628, 628, 628, 628, 628, 62...
3.395349
43
from torchvision.models.resnet import ResNet, Bottleneck, model_urls
[ 6738, 28034, 10178, 13, 27530, 13, 411, 3262, 1330, 1874, 7934, 11, 14835, 43163, 11, 2746, 62, 6371, 82, 628 ]
3.5
20
s = raw_input() n = len(s) global dp dp = [[False]*n for x in range(n)] count = 0 for i in range(n-1): if s[i:i+2] in ["()","??","(?","?)"]: # print "NEtered" dp[i][i+1] = True #for i in range(n): # for j in range(n): # if dp[i][j]:count+=1;print i,j,s[i:j+1] if n%2==0: recur(s,n,0,n-1) for i i...
[ 198, 82, 796, 8246, 62, 15414, 3419, 198, 77, 796, 18896, 7, 82, 8, 198, 20541, 288, 79, 198, 26059, 796, 16410, 25101, 60, 9, 77, 329, 2124, 287, 2837, 7, 77, 15437, 198, 9127, 796, 657, 198, 1640, 1312, 287, 2837, 7, 77, 12, ...
1.571429
553
from .element import Element from .mixin import ReqInjectScriptMixin from .menu import Menu, MenuItem from .icon import Icon class SideBar(Element, ReqInjectScriptMixin): """Sidebar widget (sidebar_menu, nav_menu, content) Example: append sidebar_menu:: sidebar = uio.SideBar() sidebar...
[ 6738, 764, 30854, 1330, 11703, 198, 6738, 764, 19816, 259, 1330, 797, 80, 818, 752, 7391, 35608, 259, 198, 6738, 764, 26272, 1330, 21860, 11, 21860, 7449, 198, 6738, 764, 4749, 1330, 26544, 198, 198, 4871, 12075, 10374, 7, 20180, 11, ...
2.092157
510
from datetime import datetime from freezegun import freeze_time import doccron def foo() -> None: """ This function prints "foo" /etc/crontab:: * * * * * 2021 * * * * * 2020 :returns: None """ print("foo") def bar() -> None: """ /etc/crontab:: * * * ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 1479, 89, 1533, 403, 1330, 16611, 62, 2435, 198, 198, 11748, 2205, 66, 1313, 628, 198, 4299, 22944, 3419, 4613, 6045, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 2163, ...
2.125
248
# Authors: Gavin Niendorf <gavinniendorf@gmail.com> # # Classes and methods for defining rays and their propagation rules. # # License: MIT import numpy as np from .transforms import * from .exceptions import NormalizationError, NotOnSurfaceError class ray: """Class for rays and their propagation through surface...
[ 2, 46665, 25, 30857, 11556, 18738, 69, 1279, 70, 615, 3732, 72, 18738, 69, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 38884, 290, 5050, 329, 16215, 24823, 290, 511, 43594, 3173, 13, 198, 2, 198, 2, 13789, 25, 17168, 198, 198, 11748, ...
2.213173
3,401
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- ''' @author: yuejl @application: @contact: lewyuejian@163.com @file: strutil.py @time: 2021/7/3 0003 22:19 @desc: ''' import ujson import re import random import string import uuid
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 9800, 25, 331, 518, 20362, 198, 31, 31438, 25, 198, 31, 32057, 25, 443, 21768, 518, 73, 666, ...
2.385417
96
import numpy as np from numba import jitclass from numba import int32, float32 spec = [ ('value', int32), ('array', float32[:]), ] @jitclass(spec)
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 997, 7012, 1330, 474, 270, 4871, 198, 6738, 997, 7012, 1330, 493, 2624, 11, 12178, 2624, 628, 198, 16684, 796, 685, 198, 220, 220, 220, 19203, 8367, 3256, 493, 2624, 828, 198, 220, 220, ...
2.580645
62
import random
[ 11748, 4738, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198 ]
1.666667
18
""" Patrons file incoming from IS&T in a version 1 schema to a version 2 schema written by J Ammerman [jwacooks] (2015-10-09) edited by A Sawyer [atla5] (2019-09-04) """ # coding: utf-8 # requires python 3.x # load required modules import codecs import os import xml.etree.ElementTree as ET import glob from zipfil...
[ 37811, 198, 12130, 12212, 2393, 15619, 422, 3180, 5, 51, 287, 257, 2196, 352, 32815, 284, 257, 2196, 362, 32815, 198, 220, 3194, 416, 449, 1703, 647, 805, 685, 73, 86, 330, 31085, 60, 357, 4626, 12, 940, 12, 2931, 8, 198, 220, 130...
2.305677
1,145
from extract_image_features.video_utils import * import numpy as np from extract_image_features.keras_pretrained_models.imagenet_utils import preprocess_input from keras.models import Model from keras.preprocessing import image from extract_image_features.keras_pretrained_models.vgg19 import VGG19 # file saving and lo...
[ 6738, 7925, 62, 9060, 62, 40890, 13, 15588, 62, 26791, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7925, 62, 9060, 62, 40890, 13, 6122, 292, 62, 5310, 13363, 62, 27530, 13, 320, 11286, 316, 62, 26791, 1330, 662, 14681, ...
2.488764
1,780
import sqlite3
[ 11748, 44161, 578, 18 ]
3.5
4
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 28, 15, 11, 1306, 28, 14202, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, ...
2.272727
66
"""Allows to configure custom shell commands to turn a value for a sensor.""" CONF_COMMAND_TIMEOUT = "command_timeout" DEFAULT_TIMEOUT = 15 DOMAIN = "command_line" PLATFORMS = ["binary_sensor", "cover", "sensor", "switch"]
[ 37811, 34934, 284, 17425, 2183, 7582, 9729, 284, 1210, 257, 1988, 329, 257, 12694, 526, 15931, 198, 198, 10943, 37, 62, 9858, 44, 6981, 62, 34694, 12425, 796, 366, 21812, 62, 48678, 1, 198, 7206, 38865, 62, 34694, 12425, 796, 1315, 19...
3.068493
73
import os import sys import hashlib
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 12234, 8019, 628, 628, 628, 628, 198 ]
3.142857
14
# Generated by Django 2.2.10 on 2020-05-29 12:30 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 2713, 12, 1959, 1105, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
from transformers import ElectraTokenizer, ElectraForSequenceClassification, pipeline from pprint import pprint tokenizer = ElectraTokenizer.from_pretrained("monologg/koelectra-small-finetuned-nsmc") model = ElectraForSequenceClassification.from_pretrained("monologg/koelectra-small-finetuned-nsmc") nsmc = pipeline("s...
[ 6738, 6121, 364, 1330, 5903, 430, 30642, 7509, 11, 5903, 430, 1890, 44015, 594, 9487, 2649, 11, 11523, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 30001, 7509, 796, 5903, 430, 30642, 7509, 13, 6738, 62, 5310, 13363, 7203, 2144, 9...
1.371212
396
from __future__ import division import numpy as np import tensorflow as tf from SIDLoader import SIDLoader from ModelBuilder import ModelBuilder from Experiment import Experiment import time,datetime,os,glob path_prefix = '.' checkpoint_dir = path_prefix+'/chk' dataset_dir = path_prefix+'/dataset' black_level = 512 se...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 311, 2389, 17401, 1330, 311, 2389, 17401, 198, 6738, 9104, 32875, 1330, 9104, 32875, 198, 6738, 29544, 1330, 29...
2.49938
1,614
with open('./input.txt') as infile: jumps = [int(i.rstrip('\n')) for i in infile.readlines()] steps = 0 idx = 0 while idx < (len(jumps)): step = jumps[idx] if step >= 3: jumps[idx] -= 1 else: jumps[idx] += 1 idx += step steps += 1 pr...
[ 4480, 1280, 7, 4458, 14, 15414, 13, 14116, 11537, 355, 1167, 576, 25, 198, 220, 220, 220, 18045, 796, 685, 600, 7, 72, 13, 81, 36311, 10786, 59, 77, 6, 4008, 329, 1312, 287, 1167, 576, 13, 961, 6615, 3419, 60, 198, 220, 220, 220...
1.849162
179
from geneal.genetic_algorithms import ContinuousGenAlgSolver, BinaryGenAlgSolver
[ 6738, 9779, 282, 13, 5235, 5139, 62, 282, 7727, 907, 1330, 45012, 13746, 2348, 70, 50, 14375, 11, 45755, 13746, 2348, 70, 50, 14375, 628 ]
3.28
25
# from KK import matplotlib matplotlib.use('Agg') from rnn import RNN from copy import deepcopy import time import os import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader from torch.nn.utils.clip_grad import clip_grad_norm import torch.nn.functional as F import torch.optim as optim from t...
[ 2, 422, 509, 42, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 6738, 374, 20471, 1330, 371, 6144, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 28034, 19...
2.430898
2,518
# climatology test adpated from Patrick Halsall's # ftp://ftp.aoml.noaa.gov/phod/pub/bringas/XBT/AQC/AOML_AQC_2018/codes/qc_checks/clima_checker.py import sys, numpy import util.AOMLinterpolation as interp_helper import util.AOMLnetcdf as read_netcdf def climatology_check(temperature, interpMNTemp, interpSDTemp, sig...
[ 2, 5424, 265, 1435, 1332, 512, 79, 515, 422, 9925, 367, 874, 439, 338, 220, 198, 2, 10117, 79, 1378, 701, 79, 13, 64, 296, 75, 13, 3919, 7252, 13, 9567, 14, 746, 375, 14, 12984, 14, 48580, 292, 14, 55, 19313, 14, 32, 48, 34, ...
2.991202
682
from django.contrib import admin from .models import * admin.site.register(Scientist) admin.site.register(Employer) admin.site.register(DataPool) admin.site.register(DataEntry)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 28482, 13, 15654, 13, 30238, 7, 23010, 396, 8, 198, 28482, 13, 15654, 13, 30238, 7, 29733, 263, 8, 198, 28482, 13, 15654, 13, 30238, 7, 660...
3.218182
55
""" Module containing different distance functions. """ import numpy as np from scipy import stats def linear_distance(data, synth_data): """ compute linear distance between autocorrelations. Parameters ----------- data : 1d array autocorrelation of real data. synth_data : 1d array ...
[ 37811, 198, 26796, 7268, 1180, 5253, 5499, 13, 220, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 9756, 628, 198, 4299, 14174, 62, 30246, 7, 7890, 11, 33549, 62, 7890, 2599, 198, 220, 220, 220, 37227, ...
2.589005
382
# Copyright 2013-2014 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ 2, 15069, 2211, 12, 4967, 6060, 1273, 897, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789...
3.619512
205
""" This module contains a class to represent multiple Tichu Cards. """ BOMBS = ['four_bomb', 'straight_bomb'] class Cards(): """ A class to represent multiple Tichu Cards. Can either be a hand (i.e. no specific combination) or a combination (e.g. pair, straight, ...). The type is determined auto...
[ 37811, 770, 8265, 4909, 257, 1398, 284, 2380, 3294, 309, 488, 84, 15824, 13, 37227, 198, 198, 33, 2662, 4462, 796, 37250, 14337, 62, 27657, 3256, 705, 42729, 62, 27657, 20520, 198, 198, 4871, 15824, 33529, 198, 220, 220, 220, 37227, 1...
1.982524
12,131
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
[ 2, 15069, 14633, 1096, 11, 3457, 13, 290, 20420, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 5765, 286, 428, 3788, 318, 21825, 416, 262, 7320, 8090, 13789, 198, 2, 3017, 287, 262, 38559, 24290, 2393, 379, 262, 6808, 286, 428, 16099, ...
4.115044
113
import itertools import Utterance import PossibleWorld #this table contains all the possible worlds #this adds up all of the possible world probabilities in the rows and columns of a table #re-adds up all of the columns and rows so that normalization is accurate #important function for normalizing so that we ca...
[ 11748, 340, 861, 10141, 198, 11748, 7273, 353, 590, 198, 11748, 33671, 10603, 198, 2, 5661, 3084, 4909, 477, 262, 1744, 11621, 628, 197, 2, 5661, 6673, 510, 477, 286, 262, 1744, 995, 39522, 287, 262, 15274, 290, 15180, 286, 257, 3084,...
4.395062
81
# coding=utf-8 """ dataloader for PASCAL VOC 2012 dataset """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from PIL import Image from torchvision import transforms from torch.utils.data import Dataset from RMI.dataloaders i...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 67, 10254, 1170, 263, 329, 350, 42643, 1847, 569, 4503, 2321, 27039, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 19...
2.474289
1,828
''' Dataloader.py ''' import cv2 import sys,os import xml.etree.ElementTree as ET import numpy as np print(os.listdir()) ''' Gets the coordinates of the bounding box of the object returns the bounding box ''' ''' Returns the one hot encoded label list as a numpy array ''' ''' This is the function th...
[ 7061, 6, 201, 198, 35, 10254, 1170, 263, 13, 9078, 201, 198, 7061, 6, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 25064, 11, 418, 201, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 11748, 299, 32152, ...
2.862857
175
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-10 22:32 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 319, 1584, 12, 3023, 12, 940, 2534, 25, 2624, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, ...
2.781818
55
# # 1 uzdevums name = input("Enter your name: ") age = int(input(name + ", how old are you?")) import datetime currentYear = datetime.datetime.now().year print("You will be 100 in", 100-age, "years and that will be year", currentYear+(100-age)) # name = input("What is your name?") # age = input (f"What is your age {n...
[ 2, 1303, 352, 334, 89, 7959, 5700, 198, 3672, 796, 5128, 7203, 17469, 534, 1438, 25, 366, 8, 198, 496, 796, 493, 7, 15414, 7, 3672, 1343, 33172, 703, 1468, 389, 345, 1701, 4008, 198, 11748, 4818, 8079, 198, 14421, 17688, 796, 4818, ...
2.788732
213
# coding: utf-8 import time import torch import torch.nn.functional as F import torchvision import numpy as np from PIL import Image import matplotlib.pyplot as plt import sys device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # 均已测试 print(device, torch.__version__) # 读取内容图像和样式图像 content_img = ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 640, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 10178, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 26...
2.102094
764
"""Scraping reviews and ratings from goodreads.com DESCRIPTION: Scraping the newest reviews from a given goodreads book url. Script works as follows: 1. Get the given url and open with webdriver of selenium. 2. Sort the reviews by newest. 3. Parse the returned web page using BeautifulSoup4...
[ 37811, 3351, 2416, 278, 8088, 290, 10109, 422, 922, 40779, 13, 785, 198, 198, 30910, 40165, 25, 628, 220, 220, 220, 1446, 2416, 278, 262, 15530, 8088, 422, 257, 1813, 922, 40779, 1492, 19016, 13, 12327, 2499, 355, 5679, 25, 198, 220, ...
2.527778
324
"""Format base class""" import abc from typing import Any, BinaryIO, Iterable, Iterator from wingline.types import Payload class Format(metaclass=abc.ABCMeta): """Base class for a file format.""" mime_type: str suffixes: Iterable[str] = set() @property def reader(self) -> Iterator[dict[str, An...
[ 37811, 26227, 2779, 1398, 37811, 198, 198, 11748, 450, 66, 198, 6738, 19720, 1330, 4377, 11, 45755, 9399, 11, 40806, 540, 11, 40806, 1352, 198, 198, 6738, 8539, 1370, 13, 19199, 1330, 7119, 2220, 628, 198, 4871, 18980, 7, 4164, 330, 3...
2.682099
324
# Generated by Django 3.0.2 on 2020-03-20 11:48 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 3070, 12, 1238, 1367, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from flask import jsonify, make_response from api.v1.models.office_model import OfficesModel from api.v1.models.party_model import PartiesModel
[ 6738, 42903, 1330, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 40391, 13, 85, 16, 13, 27530, 13, 31810, 62, 19849, 1330, 3242, 1063, 17633, 198, 6738, 40391, 13, 85, 16, 13, 27530, 13, 10608, 62, 19849, 1330, 32024, 17633, 628, 198 ]
3.47619
42
from functools import reduce from operator import mul from AoC20.day_16 import data as data, parse rules, my_ticket, other_tickets = parse(data) other_tickets = [ticket for ticket in other_tickets if rules.ticket_violation(ticket) is None] fields = rules.field_deduction(other_tickets) print(reduce(mul, [my_ticket[id...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 10088, 1330, 35971, 198, 198, 6738, 27378, 34, 1238, 13, 820, 62, 1433, 1330, 1366, 355, 1366, 11, 21136, 628, 198, 38785, 11, 616, 62, 43350, 11, 584, 62, 83, 15970, 796, 21136, 7, 789...
3.046875
128
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.tag
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 628, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, 13, 12985, 628, 198 ]
3.588235
34
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """OS information for testing.""" from coverage import env if env.WINDOWS: # Windows implementation def process_ram(): """How much RAM is this pr...
[ 2, 49962, 739, 262, 24843, 13789, 25, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 1114, 3307, 25, 3740, 1378, 2545, 27041, 316, 13, 2398, 14, 2817, 14, 1073, 1857, 9078, 14, ...
2.069523
1,237
import random # for declaring function using def test_function() test_function_parameter("teste parameter") # function type get type variable list = ["ade"] print(type(list)) # function int formating string to int string = "10" print(int(string)) # function input receive a value entry from the user in version...
[ 11748, 4738, 628, 198, 2, 329, 18684, 2163, 1262, 825, 628, 198, 9288, 62, 8818, 3419, 628, 198, 198, 9288, 62, 8818, 62, 17143, 2357, 7203, 9288, 68, 11507, 4943, 198, 198, 2, 2163, 2099, 651, 2099, 7885, 198, 4868, 796, 14631, 671...
3.043624
596
# # -------------------------------------------------------------------------------------------------------------------- # <copyright company="Aspose" file="base_test_context.py"> # Copyright (c) 2020 Aspose.Tasks Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaini...
[ 2, 198, 2, 16529, 3880, 19351, 198, 2, 1279, 22163, 4766, 1664, 2625, 1722, 3455, 1, 2393, 2625, 8692, 62, 9288, 62, 22866, 13, 9078, 5320, 198, 2, 220, 220, 15069, 357, 66, 8, 12131, 1081, 3455, 13, 51, 6791, 10130, 198, 2, 7359,...
4.095477
398
"""Tests for :py:mod:`katsdpdisp.data`.""" import numpy as np from numpy.testing import assert_array_equal from katsdpdisp.data import SparseArray def test_sparsearray(fullslots=100,fullbls=10,fullchan=5,nslots=10,maxbaselines=6,islot_new_bls=6): """Simulates the assignment and retrieval of data as it happens in ...
[ 37811, 51, 3558, 329, 1058, 9078, 25, 4666, 25, 63, 74, 1381, 26059, 6381, 79, 13, 7890, 63, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 6738, 479, 13...
2.310642
1,043
import requests from urllib.parse import urlencode from_mate = "http://172.16.0.69:3000" to_mate = "http://mete.cloud.cccfr" for category in ("users", "drinks"): items = get_items(category) for item in items: set_item(item, category)
[ 11748, 7007, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 198, 6738, 62, 9830, 796, 366, 4023, 1378, 23628, 13, 1433, 13, 15, 13, 3388, 25, 23924, 1, 198, 1462, 62, 9830, 796, 366, 4023, 1378, 4164, 68, 13, ...
2.52
100
#!/usr/bin/python import fire import os import re import requests from configparser import ConfigParser from datetime import datetime HTTP_OK_200 = 200 HTTP_CREATED_201 = 201 HTTP_AUTHORIZATION_401 = 401 HTTP_NOT_FOUND_404 = 404 class Github(object): '''Base class to interface with Github.com. ''' usern...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 2046, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 7007, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 40717, 62, 11380, 62, 2167, 796...
2.035565
1,912
"""Helper to check if path is safe to remove.""" from pathlib import Path from custom_components.racelandshop.share import get_racelandshop def is_safe_to_remove(path: str) -> bool: """Helper to check if path is safe to remove.""" racelandshop = get_racelandshop() paths = [ Path(f"{racelandshop.c...
[ 37811, 47429, 284, 2198, 611, 3108, 318, 3338, 284, 4781, 526, 15931, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 2183, 62, 5589, 3906, 13, 11510, 8822, 24643, 13, 20077, 1330, 651, 62, 11510, 8822, 24643, 628, 198, 4299, 318, ...
2.585014
347
#!/usr/bin/env python #-*- coding:utf-8 -*- # Ref: # https://www.reddit.com/r/learnpython/comments/9oc0mu/just_an_interesting_thing_i_found/ # https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments a = f() b = f() a.append(3) b.append(4) print(b) # Solution # Ref: https://docs.python-guide.org/w...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 6524, 25, 220, 198, 2, 3740, 1378, 2503, 13, 10748, 13, 785, 14, 81, 14, 35720, 29412, 14, 15944, 14, 24, 420, ...
2.431579
190
""" Created on Thu Oct 26 14:19:44 2017 @author: Utku Ozbulak - github.com/utkuozbulak """ import os import numpy as np import torch from torch.optim import SGD from cnn_visualization.misc_functions import preprocess_image, recreate_image, save_image import argparse import torch.nn as nn class ClassSpecificImageGe...
[ 37811, 198, 41972, 319, 26223, 2556, 2608, 1478, 25, 1129, 25, 2598, 2177, 198, 198, 31, 9800, 25, 7273, 23063, 440, 14969, 377, 461, 532, 33084, 13, 785, 14, 315, 23063, 8590, 15065, 461, 198, 37811, 198, 11748, 28686, 198, 11748, 29...
2.277802
2,293
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 3012, 11419, 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, 198, 2, 921, 743, 733...
1.672961
5,984
""" A Python module containing various utility functions, classes, decorators or whatever. """ from collections import namedtuple, Iterable import sys import functools import inspect from bs4 import BeautifulSoup import logging import time import random import os import errno # Constants # ========= USER_AGENTS = [...
[ 37811, 198, 32, 11361, 8265, 7268, 2972, 10361, 5499, 11, 6097, 11, 11705, 2024, 393, 198, 39664, 13, 198, 37811, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 11, 40806, 540, 198, 11748, 25064, 198, 11748, 1257, 310, 10141, 198, 11748,...
2.517676
2,857
import argparse import subprocess import random import os import tensorflow as tf import sys #os.environ["CUDA_VISIBLE_DEVICES"]="0,1,2,3,4,5,6,7" from tensorflow.python.client import device_lib if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 25064, 198, 2, 418, 13, 268, 2268, 14692, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 8973, 2625,...
2.651685
89
from typing import Any import numpy as np
[ 6738, 19720, 1330, 4377, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.666667
12
import requests from bs4 import BeautifulSoup headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Max-Age': '3600', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Fire...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 50145, 796, 1391, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 35265, 12, 39688, 10354, 705, 9, 3256, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 35265, 12,...
2.5
192
""" Modified example from: https://github.com/pytorch/examples """ from __future__ import print_function import warnings import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.optim.lr_scheduler import StepLR
[ 37811, 198, 5841, 1431, 1672, 422, 25, 198, 5450, 1378, 12567, 13, 785, 14, 9078, 13165, 354, 14, 1069, 12629, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 14601, 198, 198, 11748, 28034, 198, 1...
3.516854
89
from utils.primes import is_prime # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. # # What is the 10 001st prime number? # # Answer: 104743
[ 6738, 3384, 4487, 13, 1050, 999, 1330, 318, 62, 35505, 628, 198, 2, 2750, 13487, 262, 717, 2237, 6994, 3146, 25, 362, 11, 513, 11, 642, 11, 767, 11, 1367, 11, 290, 1511, 11, 356, 460, 766, 326, 262, 718, 400, 6994, 318, 1511, 13...
2.855072
69
# -*- coding:utf-8 -*- __author__ = 'Leo.Z' ''' image_name.jpg x y x2 y2 c x y x2 y2 c xy为左上角坐标,x2y2为右下角坐标 ''' import os import os.path import random import numpy as np import torch import torch.utils.data as data import torchvision.transforms as transforms import cv2
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 3123, 78, 13, 57, 6, 198, 198, 7061, 6, 198, 9060, 62, 3672, 13, 9479, 2124, 331, 2124, 17, 331, 17, 269, 2124, 331, 2124, 17, 331, 17, 269,...
2.044444
135
__version__ = '0.0.dev5'
[ 834, 9641, 834, 796, 705, 15, 13, 15, 13, 7959, 20, 6, 198 ]
1.923077
13
# from config import conf #import telegram # # tg_token=conf['telegram_token'] # bot = telegram.Bot(token=tg_token) # print(tg_token) # # #proxy list: https://50na50.net/ru/proxy/socks5list # # proxy_url='socks5://66.33.210.203:24475' # # pp = telegram.utils.request.Request(proxy_url=proxy_url) # bot = telegram.Bot(to...
[ 198, 2, 422, 4566, 1330, 1013, 198, 2, 11748, 573, 30536, 198, 2, 198, 2, 256, 70, 62, 30001, 28, 10414, 17816, 660, 30536, 62, 30001, 20520, 198, 2, 10214, 796, 573, 30536, 13, 20630, 7, 30001, 28, 25297, 62, 30001, 8, 198, 2, ...
2.466667
675
# -*- coding: utf-8 -*- """ Microsoft-Windows-Forwarding GUID : 699e309c-e782-4400-98c8-e21d162d7b7b """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15905, 12, 11209, 12, 39746, 278, 198, 38, 27586, 1058, 718, 2079, 68, 26895, 66, 12, 68, 46519, 12, 2598, 405, 12, 4089, 66, 23, 12, 68, 2481, 67, 25061...
2.015817
569
import numpy as np from tqdm.auto import tqdm COLS_GROUP1 = 24 COLS_GROUP2 = 47 COLS_GROUP3 = 24*13 COLS_GROUP4 = 55 COLS_TOTAL = COLS_GROUP1 + COLS_GROUP2 + COLS_GROUP3 + COLS_GROUP4 same_color_suit = {'C':'S', 'D':'H', 'H':'D', 'S':'C'} COLS_TARGET = 24 def format_data(data, usetqdm=True, start=0, stop=None, count=N...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 13, 23736, 1330, 256, 80, 36020, 198, 198, 25154, 50, 62, 46846, 16, 796, 1987, 198, 25154, 50, 62, 46846, 17, 796, 6298, 198, 25154, 50, 62, 46846, 18, 796, 1987, 9, 1485, ...
2.237612
5,025
"""Vectordump configuration information. """ #: MONGO URI MONGO_URI = 'mongodb://localhost:27017/'
[ 37811, 53, 478, 585, 931, 8398, 1321, 13, 198, 37811, 198, 198, 2, 25, 25000, 11230, 43975, 198, 27857, 11230, 62, 47269, 796, 705, 31059, 375, 65, 1378, 36750, 25, 1983, 29326, 14, 6, 198 ]
2.857143
35
import math #TODO: WRITEME sciNum
[ 11748, 10688, 198, 198, 2, 51, 3727, 46, 25, 11342, 2043, 3620, 36, 20681, 33111 ]
2.266667
15
import os from special_math.common_utilities import SpecialMathCalc, RequestUtils from special_math import MAX_SPECIAL_NUMBER_ENTRY import logging from flask import Blueprint bp = Blueprint('specialmath', __name__, url_prefix='/specialmath') logger = logging.getLogger(__name__) logger.setLevel(os.getenv("LOG_LEVEL",...
[ 11748, 28686, 198, 6738, 2041, 62, 11018, 13, 11321, 62, 315, 2410, 1330, 6093, 37372, 9771, 66, 11, 19390, 18274, 4487, 198, 6738, 2041, 62, 11018, 1330, 25882, 62, 48451, 12576, 62, 41359, 13246, 62, 3525, 18276, 198, 11748, 18931, 19...
2.207831
996
import Qt as Qt import Qt.QtGui as QtGui import Qt.QtCore as QtCore from qtLearn.nodes import Node import qtLearn.uiUtils as uiUtils ############################################################################ ############################################################################
[ 11748, 33734, 355, 33734, 198, 11748, 33734, 13, 48, 83, 8205, 72, 355, 33734, 8205, 72, 198, 11748, 33734, 13, 48, 83, 14055, 355, 33734, 14055, 198, 198, 6738, 10662, 83, 20238, 13, 77, 4147, 1330, 19081, 198, 11748, 10662, 83, 2023...
4.271429
70
# Полуавтоматические тесты # # list_temp = [1,2,3,'abc'] # # print(test_function(list_temp)) # теперь пишем полуавтоматическую фун-ю function_test() list_temp = [1, 2, 3,'5', 'abc', 4] list_out = test_function(list_temp) print(list_out)
[ 2, 12466, 253, 25443, 119, 35072, 16142, 38857, 20375, 25443, 120, 16142, 20375, 18849, 141, 229, 16843, 21727, 31583, 18849, 16843, 220, 20375, 16843, 21727, 20375, 45035, 198, 2, 198, 2, 1351, 62, 29510, 796, 685, 16, 11, 17, 11, 18, ...
1.596026
151
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198 ]
1.714286
14
import certifi import ftplib import hatanaka import os import urllib.request import pycurl import time import tempfile from datetime import datetime from urllib.parse import urlparse from io import BytesIO from .constants import SECS_IN_HR, SECS_IN_DAY, SECS_IN_WEEK from .gps_time import GPSTime dir_path = os.path.d...
[ 11748, 5051, 22238, 198, 11748, 10117, 489, 571, 198, 11748, 6877, 272, 8130, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 12972, 66, 6371, 198, 11748, 640, 198, 11748, 20218, 7753, 198, 198, 6738, 4818, 8079, 1...
2.744373
622
import urllib2 import json import MySQLdb conn = MySQLdb.connect(host= "localhost", user="root", passwd="", db="hackerone_reports") x = conn.cursor() hackerone = "https://hackerone.com/programs/search?query=bounties%3Ayes&sort=name%3Aascending&limit=1000" opener = urllib2.build_opener() opener.addheaders = [('Accept...
[ 198, 11748, 2956, 297, 571, 17, 198, 11748, 33918, 198, 11748, 33476, 9945, 198, 198, 37043, 796, 33476, 9945, 13, 8443, 7, 4774, 28, 366, 36750, 1600, 2836, 2625, 15763, 1600, 1208, 16993, 2625, 1600, 20613, 2625, 71, 10735, 505, 62, ...
2.849445
631
import logging import re from pathlib import Path from subprocess import check_output, CalledProcessError, STDOUT from typing import Any, Dict, List, Optional, Tuple, Union from .common import convert_external_variables _RULE_BLOCK_REGEX = re.compile(r'^(?P<rule>\w+)\s+\[(?P<raw_meta>.*)\]\s+(?P<scanned_file>.*)\n(?...
[ 11748, 18931, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 11, 34099, 18709, 12331, 11, 48571, 12425, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291,...
2.467161
944
# BOJ 2448
[ 2, 16494, 41, 1987, 2780, 198 ]
1.833333
6
""" A script for finding equal or near-equal partitions in a group. Do parts a, b, and g """ from itertools import combinations import random import numpy as np from matplotlib import pyplot as plt from pathlib import Path from progressbar import progressbar as pbar DIR = Path(__file__).parent group1 = [10, 13, 23, 6...
[ 37811, 198, 32, 4226, 329, 4917, 4961, 393, 1474, 12, 40496, 43869, 287, 257, 1448, 13, 198, 5211, 3354, 257, 11, 275, 11, 290, 308, 198, 37811, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 11748, 4738, 198, 11748, 299, 32152, 355, ...
2.681373
204
from matplotlib import pyplot as plt import io from PIL import Image import cv2 import torch import os WIDTH = 1280 HEIGHT = 760 model = torch.hub.load("ultralytics/yolov5", "custom", path="./best.pt") # results_pandas structure # xmin ymin xmax ymax confidence class name cap = cv2.VideoCapture("./driving_v...
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 33245, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 11748, 28686, 628, 198, 54, 2389, 4221, 796, 37674, 198, 13909, 9947, 796, ...
2.09589
511
import runs import optimization as opt
[ 11748, 4539, 198, 11748, 23989, 355, 2172, 628 ]
5
8