content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import scipy from .bench import Bench
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 198, 6738, 764, 26968, 1330, 25187, 198 ]
3.222222
18
#!/usr/bin/python from ansible.module_utils.basic import AnsibleModule from waldur_client import WaldurClientException, waldur_client_from_module ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'OpenNode', } DOCUMENTATION = ''' --- options: api_url: des...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 9093, 856, 13, 21412, 62, 26791, 13, 35487, 1330, 28038, 856, 26796, 198, 198, 6738, 266, 1940, 333, 62, 16366, 1330, 24261, 333, 11792, 16922, 11, 266, 1940, 333, 62, 16366, 62, ...
2.273874
1,665
import numpy as np # loading bar imports import os from tqdm import tqdm import time # Convolution Functions # single convolutional operation # Pool Funtions
[ 11748, 299, 32152, 355, 45941, 198, 2, 11046, 2318, 17944, 198, 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 640, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 130...
2.823529
68
import datetime import urllib.request from pathlib import Path if __name__ == "__main__": make_holidays_sql()
[ 11748, 4818, 8079, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 3108, 8019, 1330, 10644, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 787, 62, 3937, 13842, 62, 25410, 3419, 198 ]
2.878049
41
# -*- coding:utf-8 -*- from flask import Blueprint from flask import request from flask import Response import json import requests loginModule = Blueprint('login', __name__) @loginModule.route('/', methods=['POST']) # 获得验证码图片并保存cookie, 验证码对应登录网址为http://cer.nju.edu.cn/amserver/UI/Login @loginModule.route('/cer_cod...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 18261, 198, 11748, 33918, 198, 11748, 7007, 198, 198, 38235, 26796, 796, 39932, 10786, 38235, 32...
2.258278
151
from splinter import Browser from bs4 import BeautifulSoup from webdriver_manager.chrome import ChromeDriverManager import pymongo import pandas as pd import requests from flask import Flask, render_template import time conn = 'mongodb://localhost:27017' client = pymongo.MongoClient(conn) db = client.mars...
[ 6738, 4328, 3849, 1330, 34270, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 6738, 3992, 26230, 62, 37153, 13, 46659, 1330, 13282, 32103, 13511, 201, 198, 11748, 279, 4948, 25162, 201, 198, 11748, 19798, 292, 355, 279, ...
2.974576
118
from rest_framework import serializers from .consts import USE_TOTAL_SHAKE_TURN from .models import Shake, ViettelUser
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 1102, 6448, 1330, 23210, 62, 51, 27510, 62, 37596, 7336, 62, 51, 27064, 198, 6738, 764, 27530, 1330, 41113, 11, 8730, 37524, 12982, 628, 628, 628 ]
3.378378
37
""" Test for forward modeling of ASPECT output, using cookbook output """ #%% Import and setup files import matplotlib.pyplot as plt from matplotlib import cm,colors import numpy as np import pyvista as pv import vtk_plot as vp # Read in sample data from continental extension cookbook meshes = pv.re...
[ 37811, 201, 198, 14402, 329, 2651, 21128, 286, 34658, 9782, 5072, 11, 1262, 4255, 2070, 5072, 201, 198, 37811, 201, 198, 201, 198, 2, 16626, 17267, 290, 9058, 3696, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 20...
2.035473
592
# -*- coding: utf-8 -*- # Transformers installation import numpy as np from transformers import GPT2LMHeadModel, GPT2TokenizerFast from qtorch.quant import posit_quantize, float_quantize, configurable_table_quantize device = 'cuda' model_id = 'gpt2-large' tokenizer = GPT2TokenizerFast.from_pretrained(model_id) fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 39185, 9988, 628, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6121, 364, 1330, 402, 11571, 17, 31288, 13847, 17633, 11, 402, 11571, 17, 30642, 7509, 22968, 19...
2.678261
230
# -*- coding: utf-8 -*- """Various functions for client api.""" import subprocess def run_iib_command(**kwargs): """Calls predefined commands and returns their result.""" command_mapping = { 'get_brokers_status': 'mqsilist | grep Broker', 'get_integration_nodes_status': 'mqsilist | grep "Integ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 40009, 5499, 329, 5456, 40391, 526, 15931, 198, 11748, 850, 14681, 628, 198, 4299, 1057, 62, 72, 571, 62, 21812, 7, 1174, 46265, 22046, 2599, 198, 220, 220, 220, ...
2.057157
1,977
from __future__ import absolute_import, division, print_function import json import os import procrunner
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 13834, 16737, 628 ]
4
27
#!/usr/bin/env python import os from setuptools import setup, find_packages import versioneer here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() NEWS = open(os.path.join(here, 'NEWS.txt')).read() install_requires = [ "setuptools", "Sphinx >= 2.0", ] se...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 2196, 28153, 198, 198, 1456, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, ...
2.094516
857
from PyQt5.QtWidgets import QWidget from PyQt5.uic import loadUi from rapid_react.cargo.cargo_pipeline_params import CargoPipelineParams
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 198, 6738, 9485, 48, 83, 20, 13, 84, 291, 1330, 3440, 52, 72, 198, 198, 6738, 5801, 62, 45018, 13, 66, 9448, 13, 66, 9448, 62, 79, 541, 4470, 62, 37266, 13...
2.622642
53
# Running! if __name__ == '__main__': selection_3()
[ 198, 2, 18162, 0, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6356, 62, 18, 3419, 198 ]
2.375
24
import os import sys from PyQt4.Qt import * from PyQt4.QtCore import * from PyQt4.QtGui import * if __name__ == '__main__': app = QApplication(sys.argv) scene = QGraphicsScene() #text_edit = scene.addWidget(QLabel("Test")) #push_button = scene.addWidget(QPushButton("button")) #layout = QGraphicsG...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 1330, 1635, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 8205, 72, 1330, 1635, 198, 198, 361, 1159...
2.412698
252
"""Playwell slots API """ from playwell import ( API, Arg, ArgPos, Methods, load_config ) ## Alloc slots ## ALLOC = API( Methods.POST, "/v1/slot/alloc", ( Arg( "slots_num", ArgPos.BODY, { "required": True, "hel...
[ 37811, 11002, 4053, 17314, 7824, 198, 37811, 198, 6738, 711, 4053, 1330, 357, 198, 220, 220, 220, 7824, 11, 198, 220, 220, 220, 20559, 11, 198, 220, 220, 220, 20559, 21604, 11, 198, 220, 220, 220, 25458, 11, 198, 220, 220, 220, 3440...
1.729041
2,314
import textwrap import unittest from tests.analyzer.utils import AnalyzerTestCase from unimport.analyzer import Analyzer from unimport.constants import PY38_PLUS from unimport.statement import Import, ImportFrom, Name
[ 11748, 2420, 37150, 198, 11748, 555, 715, 395, 198, 198, 6738, 5254, 13, 38200, 9107, 13, 26791, 1330, 16213, 9107, 14402, 20448, 198, 6738, 555, 11748, 13, 38200, 9107, 1330, 16213, 9107, 198, 6738, 555, 11748, 13, 9979, 1187, 1330, 35...
3.666667
60
from django.shortcuts import render
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198 ]
1.794118
34
from functools import reduce import numpy as np import pytest import torch import torch.nn.functional as F import dace from dace import data import dace.sdfg.nodes as nd from dace.transformation.interstate import StateFusion import daceml.onnx as donnx from daceml.autodiff import AutoDiffException, add_backward_pass...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 288, 558, 198, 6738, 288, 558, 1330, 1366, 198,...
3.131086
267
# # 4.5 # Implement a function to check if a binary tree is a binary search tree # # create a new tree # 2 # / \ # 1 3 # \ \ # 0 4 # left_right = Tree(0) left = Tree(1, None, left_right) right_right = Tree(4) right = Tree(3, None, right_right) tree = Tree(2, left, rig...
[ 2, 201, 198, 2, 604, 13, 20, 201, 198, 2, 48282, 257, 2163, 284, 2198, 611, 257, 13934, 5509, 318, 257, 13934, 2989, 5509, 201, 198, 2, 201, 198, 201, 198, 201, 198, 2, 2251, 257, 649, 5509, 201, 198, 2, 220, 220, 220, 220, 22...
2.125
192
import pytest import json from pystratis.api.unity3d.requestmodels import * from pystratis.core.types import Address from pystratis.core.networks import CirrusMain @pytest.mark.parametrize('network', [CirrusMain()], ids=['CirrusMain'])
[ 11748, 12972, 9288, 198, 11748, 33918, 198, 6738, 12972, 2536, 37749, 13, 15042, 13, 9531, 18, 67, 13, 25927, 27530, 1330, 1635, 198, 6738, 12972, 2536, 37749, 13, 7295, 13, 19199, 1330, 17917, 198, 6738, 12972, 2536, 37749, 13, 7295, 1...
2.975
80
""" # PARTITION EQUAL SUBSET SUM Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. Example 1: Input: nums = [1,5,11,5] Output: true Explanation: The array can be partitioned as [1, 5, 5] and [...
[ 37811, 220, 198, 2, 16652, 17941, 46886, 1847, 13558, 4462, 2767, 35683, 198, 198, 15056, 257, 1729, 12, 28920, 7177, 997, 82, 7268, 691, 3967, 37014, 11, 1064, 611, 262, 7177, 460, 307, 18398, 276, 656, 734, 6352, 1039, 884, 326, 262...
2.902564
195
#!/usr/bin/python """ Test Utilities -------------- This module tests the test utilities. """ from . import test_state_machine from . import test_time_machine from . import test_extended_tag_list from . import test_client_state_machine from . import test_server_state_machine from . import test_service_access_point...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 14402, 41086, 198, 26171, 198, 198, 1212, 8265, 5254, 262, 1332, 20081, 13, 198, 37811, 198, 198, 6738, 764, 1330, 1332, 62, 5219, 62, 30243, 198, 6738, 764, 1330, 1332, 62, ...
3.451613
93
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Ge...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 26571, 15042, 628, 220, 220, 220, 383, 21201, 23113, 1037, 345, 26571, 1366, 13, 6822, 611, 281, 412, 12, 4529, 2209, 318, 1103, 13, 6822, 611, 257, 7386, 318, 1...
2.452439
2,891
import FWCore.ParameterSet.Config as cms # This modifier is to run the SiPixelDigiMorphing siPixelDigiMorphing = cms.Modifier()
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 2, 770, 23157, 318, 284, 1057, 262, 15638, 40809, 19511, 72, 44, 16300, 722, 198, 13396, 40809, 19511, 72, 44, 16300, 722, 796, 220, 269, 907, 13, 5841, 7483, ...
2.954545
44
# Adapt the merge algorithm to write each of these functions, as was suggested there: # # Return only those items that are present in the first list, but not in the second. import random def return_xs_unique(xs, ys): """ merge sorted lists xs and ys. Return only those items that are present in the first list, ...
[ 2, 30019, 262, 20121, 11862, 284, 3551, 1123, 286, 777, 5499, 11, 355, 373, 5220, 612, 25, 198, 2, 198, 2, 8229, 691, 883, 3709, 326, 389, 1944, 287, 262, 717, 1351, 11, 475, 407, 287, 262, 1218, 13, 198, 198, 11748, 4738, 628, ...
2.356366
1,563
import numpy as np import matplotlib.pyplot as plt ## softmax: 0.1 600 ## perceptron: 0.05 550 if __name__ == "__main__": csvname = 'breast_cancer_data.csv' x, y = readData(csvname) w = np.ones([x.shape[0] + 1, 1]) x = np.insert(x, 0, values=np.ones([1, x.shape[1]]), axis=0) xSoftList = [...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2235, 2705, 9806, 25, 657, 13, 16, 10053, 198, 2235, 34953, 1313, 25, 657, 13, 2713, 25240, 628, 628, 628, 198, 361, 220, 11593, ...
2.116737
711
from __future__ import annotations import json import os from DOM.hashing import get_hash if __name__ == "__main__": data_hash = generate_media_hash()[1] os.system(f"heroku config:set DATA_HASH={data_hash} -a dungeon-of-masters")
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 24121, 13, 71, 2140, 1330, 651, 62, 17831, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 13...
2.793103
87
import torch import random import time import copy import numpy as np from torch import nn from torch import optim import torchvision import torchvision.models as models from model.models import TaskNormalization from utils import getArguments, getModel from dataset.multidataset import DatasetGen as multi_cls from d...
[ 11748, 28034, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 11748, 28034, 10178, 198, 198, 11748, 28034, 10178, 13, 27530, 355,...
2.887139
381
import numpy as np import pandas as pd from sklearn.pipeline import FeatureUnion
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 27018, 38176, 198 ]
3.375
24
# coding=utf8 import json from typing import Dict, List, Set import unicodedata print(ord('alibaba')) ranges = [ # (ord(u"\u3300"), ord(u"\u33ff")), # compatibility ideographs # (ord(u"\ufe30"), ord(u"\ufe4f")), # compatibility ideographs # (ord(u"\uf900"), ord(u"\ufaff")), # compatibility ideographs ...
[ 2, 19617, 28, 40477, 23, 198, 11748, 33918, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 5345, 198, 198, 11748, 28000, 9043, 1045, 198, 198, 4798, 7, 585, 10786, 282, 37541, 6, 4008, 198, 198, 81, 6231, 796, 685, 198, 220, 220, ...
0.57877
20,452
import hashlib import json import re from enum import Enum from typing import Union, List, Optional import base58 import varint from peerdid.core.did_doc import ( VerificationMaterial, PublicKeyField, VerificationMaterialTypeAgreement, VerificationMaterialTypeAuthentication, JWK_OKP, ) from peerdi...
[ 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 302, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 32233, 198, 198, 11748, 2779, 3365, 198, 11748, 1401, 600, 198, 198, 6738, 12720, 20839, 13, 7295, 13...
2.512152
2,798
from gerencianet import Gerencianet from credentials import CREDENTIALS gn = Gerencianet(CREDENTIALS) body = { 'calendario': { 'expiracao': 3600 }, 'devedor': { 'cpf': '', 'nome': '' }, 'valor': { 'original': '' }, 'chave': '', 'solicitacaoPagador': 'Cob...
[ 6738, 308, 567, 10782, 666, 316, 1330, 402, 567, 10782, 666, 316, 198, 6738, 18031, 1330, 8740, 1961, 3525, 12576, 50, 198, 198, 4593, 796, 402, 567, 10782, 666, 316, 7, 9419, 1961, 3525, 12576, 50, 8, 198, 198, 2618, 796, 1391, 198...
2.058252
206
from models.cluster import Cluster from utils.markdown_mediator import MarkdownMediator from utils.reload_credentials import ask_for_new_credentials from utils.input_dialogs import yes_or_no_input_dialog from extensions.url import format_url from requests.models import Response from utils.logger import Log from config ...
[ 6738, 4981, 13, 565, 5819, 1330, 38279, 198, 6738, 3384, 4487, 13, 4102, 2902, 62, 2379, 1352, 1330, 2940, 2902, 9921, 38585, 198, 6738, 3384, 4487, 13, 260, 2220, 62, 66, 445, 14817, 1330, 1265, 62, 1640, 62, 3605, 62, 66, 445, 148...
3.693694
111
from django.views.decorators.csrf import csrf_exempt from rest_framework.decorators import api_view from rest_framework.response import Response from SumarySearch.compute_match import match from .serializers import BookSerializer from django.http import HttpResponseBadRequest @api_view(['POST']) @csrf_exempt def sear...
[ 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62, 42679, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6...
3.119534
343
''' Written by: Joao Rodrigues Last Update: October 16th 2020 ''' import sys from socket import gethostname if gethostname().lower() == "ph-photonbec5": sys.path.append("D:/Control/PythonPackages/") import pbec_ipc from time import sleep from time import time import matplotlib.pyplot as plt from single_spec_IP...
[ 7061, 6, 198, 197, 25354, 416, 25, 197, 197, 9908, 5488, 16114, 947, 198, 197, 5956, 10133, 25, 220, 197, 18517, 1467, 400, 12131, 198, 198, 7061, 6, 198, 198, 11748, 25064, 198, 6738, 17802, 1330, 651, 4774, 3672, 198, 361, 651, 47...
2.969496
754
""" Cameras App """ import logging import sys from django.apps import AppConfig logger = logging.getLogger(__name__) DEFAULT_SETTING_NAME = 'DEFAULT_SETTING' class CamerasConfig(AppConfig): """ Cameras App Config """ name = 'vision_on_edge.cameras' def ready(self): """ Cameras ...
[ 37811, 198, 34, 2382, 292, 2034, 198, 37811, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 72...
1.635521
1,402
import torch import logging import numpy as np from outliers import smirnov_grubbs as grubbs import seaborn as sns import matplotlib import matplotlib.pyplot as plt from torch.utils.data.sampler import SubsetRandomSampler from torchvision import datasets, transforms import torchvision.models as cv_models import os imp...
[ 11748, 28034, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 41528, 3183, 1330, 42821, 37302, 62, 2164, 549, 1443, 355, 1036, 549, 1443, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 198, 1...
2.158074
5,586
from os.path import join, dirname from setuptools import setup package_name = "pdfforms" package_version = "1.2.1" base_dir = dirname(__file__) setup( name = package_name, version = package_version, description = "Populate fillable pdf forms from csv data file", long_description = read("README.rst") +...
[ 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 26495, 62, 3672, 796, 366, 30094, 487, 579, 82, 1, 198, 26495, 62, 9641, 796, 366, 16, 13, 17, 13, 16, 1, 198, 8692, 62, 15908...
2.569343
411
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 663, 38537, 516, 198, 220, 220, 220, 220, 15116, 8728, 628, 220, 220, 220, 317, 8265, 326, 23986, 2972, 5499, 284, 1730, 351, 1418, 81, 8459...
2.636342
8,453
import struct import binascii import gap # HCI Events # Spec V4.0, Vol 2, sec 7.7 E_DISCONN_COMPLETE = 0x05 E_ENCRYPT_CHANGE = 0x08 E_CMD_RESPONSE = 0x0E E_CMD_STATUS = 0x0F E_LE_META_EVENT = 0x3E # LE Meta-event subcodes # Vol 2, 7.7.65 E_LE_CONN_COMPLETE = 0x01 E_LE_ADVERTISING_REPORT = 0x02 E_LE_CONN_UPDATE_COMP...
[ 11748, 2878, 198, 11748, 9874, 292, 979, 72, 198, 11748, 7625, 198, 198, 2, 367, 25690, 18715, 198, 2, 18291, 569, 19, 13, 15, 11, 4709, 362, 11, 792, 767, 13, 22, 198, 198, 36, 62, 26288, 10943, 45, 62, 41335, 9328, 796, 657, 8...
2.182965
317
#!/usr/bin/env python # Use the built in json and sqlite library import sqlite3 # Boilerplate python if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 5765, 262, 3170, 287, 33918, 290, 44161, 578, 5888, 198, 11748, 44161, 578, 18, 198, 198, 2, 3248, 5329, 6816, 21015, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.82
50
#!/usr/bin/python # -*- coding: utf-8 -*- """画像の2値化(binalize)とモーメント中心を見つけるモジュール.""" import numpy as np import cv2 from matplotlib import pyplot as plt def binalize(img): """画像の2値化を行う. 1. 画像をグレースケールに変換 2. しきい値[0, 255]を基準に2値化する # 入力: + img: cv2 モジュールで読み込んだ画像オブジェクト # 出力: + img_binalized:...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 18796, 119, 161, 225, 237, 5641, 171, 120, 240, 161, 222, 97, 44293, 244, 7, 65, 1292, 1096, 8, 30201, 40361, 12045, ...
1.585296
3,863
input = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """ output = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """
[ 15414, 796, 37227, 198, 4, 41277, 25, 201, 198, 17946, 7, 14781, 9362, 737, 201, 198, 17946, 7, 17080, 23656, 737, 201, 198, 17946, 7, 83, 30915, 737, 201, 198, 4, 17946, 7, 16520, 737, 201, 198, 201, 198, 4, 6400, 1095, 25, 201, ...
2.194444
108
from os import environ as env from urllib import parse as parse import ast import base64 import csv import hashlib import hmac import json import logging API_KEY = env.get("PERISCOPE_API_KEY").encode("UTF-8") input_csv = "chart_slide_deck.csv" output_csv = "chart_links.csv" if __name__ == "__main__": logging.b...
[ 6738, 28686, 1330, 551, 2268, 355, 17365, 198, 6738, 2956, 297, 571, 1330, 21136, 355, 21136, 198, 11748, 6468, 198, 11748, 2779, 2414, 198, 11748, 269, 21370, 198, 11748, 12234, 8019, 198, 11748, 289, 20285, 198, 11748, 33918, 198, 11748...
2.769663
178
from MapWay import * start = Place(name="Start", position=Position(latitude=20, longtitude=2)) ''' Уже точки не нужны, они в базе данных ''' # p_in_1 = Place(name="p_in_1", position=Position(latitude=10, longtitude=50)) # p_in_2 = Place(name="p_in_2", position=Position(latitude=18, longtitude=70)) # p_out_1 = P...
[ 6738, 9347, 25309, 1330, 1635, 198, 198, 9688, 796, 8474, 7, 3672, 2625, 10434, 1600, 2292, 28, 26545, 7, 15460, 3984, 28, 1238, 11, 890, 83, 3984, 28, 17, 4008, 628, 198, 7061, 6, 198, 220, 220, 220, 12466, 96, 140, 114, 16843, 2...
2.250737
339
import argparse import sys
[ 11748, 1822, 29572, 198, 11748, 25064, 628 ]
4
7
# -*- coding: utf-8 -*- # businessdate # ------------ # Python library for generating business dates for fast date operations # and rich functionality. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.5, copyright Wednesday, 18 September 2019 # Website: https://github.com/son...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1597, 4475, 198, 2, 220, 10541, 198, 2, 11361, 5888, 329, 15453, 1597, 9667, 329, 3049, 3128, 4560, 198, 2, 290, 5527, 11244, 13, 198, 2, 198, 2, 6434, 25, ...
3.536765
136
from pydantic import BaseModel
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 628 ]
4
8
import pyodbc dados_conexao = ( "Driver={SQL Server};" "Server=omicron;" "Database=perguntas;" ) conexao = pyodbc.connect(dados_conexao) print('Conexão bem sucedida!')
[ 11748, 12972, 375, 15630, 198, 198, 67, 22484, 62, 49180, 87, 5488, 796, 357, 198, 220, 220, 220, 366, 32103, 34758, 17861, 9652, 19629, 1, 198, 220, 220, 220, 366, 10697, 28, 10179, 1313, 26033, 198, 220, 220, 220, 366, 38105, 28, ...
2.222222
81
import pandas as pd import numpy as np import webbrowser import os import glob from pandas_profiling import ProfileReport '''Automated generation of HTML data report to be opened inside webbrowser''' if __name__ == '__main__': create_model_report(True)
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3992, 40259, 198, 11748, 28686, 198, 11748, 15095, 198, 6738, 19798, 292, 62, 5577, 4386, 1330, 13118, 19100, 198, 198, 7061, 6, 38062, 515, 5270, 286, 115...
3.363636
77
import os from fabric.api import env, sudo, put import helper from bootstrap import machine
[ 11748, 28686, 198, 198, 6738, 9664, 13, 15042, 1330, 17365, 11, 21061, 11, 1234, 198, 198, 11748, 31904, 198, 6738, 6297, 26418, 1330, 4572, 628 ]
3.8
25
from unittest import TestCase import pytest from FizzBuzz.fizzbuzz import fizzbuzz fizzbuzz_data = [(3, "Fizz"), (5, "Buzz"), (15, "FizzBuzz"), (2, "2")] fizzbuzz_7_11_data = [(7,"Fizz"),(11,"Buzz"),(77,"FizzBuzz"), (2, "2")] @pytest.mark.parametrize(('n','expected'),fizzbuzz_data) @pytest.mark.parametrize(('n','exp...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 12972, 9288, 198, 6738, 376, 6457, 48230, 13, 69, 6457, 65, 4715, 1330, 277, 6457, 65, 4715, 198, 198, 69, 6457, 65, 4715, 62, 7890, 796, 47527, 18, 11, 366, 37, 6457, 12340, 357, ...
2.245161
155
""" Handler for Cisco IOS-XE device specific information. Note that for proper import, the classname has to be: "<Devicename>DeviceHandler" ...where <Devicename> is something like "Default", "Nexus", etc. All device-specific handlers derive from the DefaultDeviceHandler, which implements the generic information...
[ 37811, 198, 25060, 329, 28289, 314, 2640, 12, 55, 36, 3335, 2176, 1321, 13, 198, 198, 6425, 326, 329, 1774, 1330, 11, 262, 1398, 3672, 468, 284, 307, 25, 628, 220, 220, 220, 33490, 13603, 291, 12453, 29, 24728, 25060, 1, 198, 198, ...
3.75
144
import os import time from cctv import * for i in range(0,10000000000): cctvDetect(i)# run cctv time.sleep(2) os.system('sudo python3 darknet_images.py --input /mnt/k/monitoring/204online_{}.png --batch_size 1 --weights /home/Social_Distance/darknet/backup/yolo-obj_last.weights --config_file /home/Social_...
[ 11748, 28686, 198, 11748, 640, 198, 6738, 269, 310, 85, 1330, 1635, 198, 198, 1640, 1312, 287, 2837, 7, 15, 11, 16, 8269, 405, 2599, 198, 220, 220, 220, 269, 310, 85, 47504, 7, 72, 8, 2, 1057, 269, 310, 85, 198, 220, 220, 220, ...
2.5
210
# Generated by Django 3.0 on 2021-09-02 23:10 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 319, 33448, 12, 2931, 12, 2999, 2242, 25, 940, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
import yfinance as yf import matplotlib.pyplot as plt import datetime import math import numpy as np from sklearn.model_selection import train_test_split from sklearn import preprocessing from sklearn.linear_model import LinearRegression import csv # Calculate slopes
[ 11748, 331, 69, 14149, 355, 331, 69, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 1341, 35720, 13, 198...
3.06383
94
import logging from .message_define import MyMessage from .utils import transform_tensor_to_list from ....core.distributed.communication.message import Message from ....core.distributed.server.server_manager import ServerManager
[ 11748, 18931, 198, 198, 6738, 764, 20500, 62, 13086, 1330, 2011, 12837, 198, 6738, 764, 26791, 1330, 6121, 62, 83, 22854, 62, 1462, 62, 4868, 198, 6738, 19424, 7295, 13, 17080, 6169, 13, 32560, 13, 20500, 1330, 16000, 198, 6738, 19424, ...
4.2
55
import re from urllib.parse import urljoin from ..schema.nexusphp import AttendanceHR from ..schema.site_base import Work, SignState
[ 11748, 302, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 6738, 11485, 15952, 2611, 13, 44520, 10121, 1330, 46502, 590, 17184, 198, 6738, 11485, 15952, 2611, 13, 15654, 62, 8692, 1330, 5521, 11, 5865, 9012, 628 ]
3.375
40
import datetime from flask import request from flask_restplus import Resource from flask_restplus import abort from sqlalchemy.orm import load_only from logger import Logger from api.serilizers import dataset_response_succes, get_trace from api.restplus import api from database.models import TbTrace log = Logger.log ...
[ 11748, 4818, 8079, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 9541, 1330, 20857, 198, 6738, 42903, 62, 2118, 9541, 1330, 15614, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 3440, 62, 8807, 198, 198, 6738, 49706, 1330, 597...
2.802676
299
import os, sys import subprocess from distutils.dir_util import copy_tree from bs4 import BeautifulSoup if __name__ == '__main__': #USAGE: (python3 AddJS.py path/To/Directory/With/All/WebApplication/ IPADRRESS) #NOTE: IPADDRESS should be in the form of http://IP:8080/ and IP is the ip address add_js(s...
[ 11748, 28686, 11, 25064, 201, 198, 11748, 850, 14681, 201, 198, 6738, 1233, 26791, 13, 15908, 62, 22602, 1330, 4866, 62, 21048, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705,...
2.601504
133
from pylasdev import * #from mnem_base import * # Simple test with full LAS output for LAS reader test_files = [ # LAS 1.2 "test_data/sample.las", # 0 - OK "test_data/sample_minimal.las", # 1 - OK "test_data/sample_wrapped.las", # 2 - OK "test_data/sample_curve_api.las", # 3 - OK # "test_dat...
[ 6738, 279, 2645, 292, 7959, 1330, 1635, 201, 198, 2, 6738, 285, 77, 368, 62, 8692, 1330, 1635, 201, 198, 201, 198, 2, 17427, 1332, 351, 1336, 406, 1921, 5072, 329, 406, 1921, 9173, 201, 198, 201, 198, 9288, 62, 16624, 796, 685, 20...
2.174769
864
import pygame from Corak.dicio import * from Corak.mapread4 import mapread screen = pygame.display.set_mode((ScreenX, ScreenY)) txt = "LRUDhallX.txt" sala = openSala(txt) tiles = mapread(sala) tiles2 = pygame.sprite.Group() size = getSize(sala) offsets = getOffset(sala, size) player1 = Corak() print(tiles) left =...
[ 11748, 12972, 6057, 198, 6738, 2744, 461, 13, 67, 46441, 1330, 1635, 198, 6738, 2744, 461, 13, 8899, 961, 19, 1330, 3975, 961, 628, 198, 9612, 796, 12972, 6057, 13, 13812, 13, 2617, 62, 14171, 19510, 23901, 55, 11, 15216, 56, 4008, ...
1.864754
1,464
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/xtark/ros_ws/install/include;/home/xtark/ros_ws/devel/lib/rtabmap-0.19/../../include/rtabmap-0.19;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv".split...
[ 2, 7560, 422, 3797, 5116, 14, 11215, 539, 14, 28243, 14, 35339, 13, 22866, 13, 14751, 13, 259, 198, 34, 1404, 42, 1268, 62, 47, 8120, 11879, 62, 47, 31688, 10426, 796, 13538, 198, 31190, 23680, 62, 40492, 38, 62, 10943, 16254, 62, ...
1.92841
3,548
from __future__ import absolute_import import itertools __all__ = ["Registry"] class Registry(object): """The registry of access control list.""" def add_role(self, role, parents=[]): """Add a role or append parents roles to a special role. All added roles should be hashable. (htt...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 340, 861, 10141, 628, 198, 834, 439, 834, 796, 14631, 8081, 4592, 8973, 628, 198, 4871, 33432, 7, 15252, 2599, 198, 220, 220, 220, 37227, 464, 20478, 286, 1895, 1630, 13...
2.45741
2,031
from __future__ import annotations import os import re import time import json import array import random import asyncio import logging import datetime import contextlib import collections from enum import IntEnum from dataclasses import dataclass, field from typing import Any, List, Dict, Optional, Tuple, TypeVar, Ca...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 7177, 198, 11748, 4738, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 11748, 4732, 80...
2.381718
1,991
# Apply White or Black Background Mask import cv2 from . import print_image from . import plot_image from . import fatal_error def apply_mask(img, mask, mask_color, device, debug=None): """Apply white image mask to image, with bitwise AND operator bitwise NOT operator and ADD operator. Inputs: img ...
[ 2, 27967, 2635, 393, 2619, 25353, 18007, 198, 198, 11748, 269, 85, 17, 198, 6738, 764, 1330, 3601, 62, 9060, 198, 6738, 764, 1330, 7110, 62, 9060, 198, 6738, 764, 1330, 10800, 62, 18224, 628, 198, 4299, 4174, 62, 27932, 7, 9600, 11,...
2.505013
798
from gym_cartpole_world.envs.cartpoleworld_env import CartPoleWorldEnv
[ 6738, 11550, 62, 26674, 36869, 62, 6894, 13, 268, 14259, 13, 26674, 36869, 6894, 62, 24330, 1330, 13690, 47, 2305, 10603, 4834, 85, 198 ]
2.958333
24
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='glisefjes', slug='glisefjes', annotations=frozenset({'fjes', 'lol', 'latter', 'morsomt', 'smilende fjes'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='glisefjes med smilende øyne', ...
[ 6738, 795, 13210, 20597, 13, 368, 13210, 414, 12272, 1330, 2295, 31370, 2025, 30078, 198, 368, 31370, 796, 685, 198, 220, 2295, 31370, 2025, 30078, 7, 368, 31370, 11639, 47249, 222, 3256, 14873, 538, 1563, 82, 16193, 1065, 5332, 1065, 1...
2.387105
61,916
from Jumpscale import j from .TLS import TLS JSBASE = j.baseclasses.object TESTTOOLS = j.baseclasses.testtools class TLSFactory(JSBASE, TESTTOOLS): """Factory class to deal with TLS, key and certificate generation""" __jslocation__ = "j.sal.tls" def get(self, path=None): """Get an instance of t...
[ 6738, 449, 8142, 38765, 1330, 474, 198, 6738, 764, 51, 6561, 1330, 33855, 198, 198, 41, 16811, 11159, 796, 474, 13, 8692, 37724, 13, 15252, 198, 51, 6465, 10468, 3535, 50, 796, 474, 13, 8692, 37724, 13, 9288, 31391, 628, 198, 4871, ...
2.575758
330
import argparse, os, csv, json, datetime, pathlib from typing import Iterator import kamaboko
[ 198, 11748, 1822, 29572, 11, 28686, 11, 269, 21370, 11, 33918, 11, 4818, 8079, 11, 3108, 8019, 198, 6738, 19720, 1330, 40806, 1352, 628, 198, 11748, 479, 321, 397, 16044 ]
3.2
30
import re import traceback from deoplete.source.base import Base # ------------------------------- KEYWORD ------------------------------------------------------------------------- ruby_core_keywords = [ '__callee__', '__dir__', '__enable', '__id__', '__method__', '__send__', '_id', 'abort', 'abort_on_exception', ...
[ 11748, 302, 198, 11748, 12854, 1891, 198, 6738, 390, 643, 660, 13, 10459, 13, 8692, 1330, 7308, 198, 198, 2, 34400, 24305, 35374, 54, 12532, 16529, 45537, 198, 49137, 62, 7295, 62, 2539, 10879, 796, 685, 198, 220, 220, 220, 705, 834, ...
2.600338
5,332
from neural_process.np import NeuralProcess from neural_process.cnp import ConditionalNP from neural_process.anp import AttentiveNP from neural_process.module.attention import Attention
[ 6738, 17019, 62, 14681, 13, 37659, 1330, 47986, 18709, 198, 6738, 17019, 62, 14681, 13, 31522, 79, 1330, 9724, 1859, 22182, 198, 6738, 17019, 62, 14681, 13, 272, 79, 1330, 3460, 298, 425, 22182, 198, 6738, 17019, 62, 14681, 13, 21412, ...
3.957447
47
"""Sphinx documentation generation configuration.""" import importlib.metadata project = "swf-typed" copyright = "2021, Laurie O" author = "Laurie O" release = importlib.metadata.version("swf-typed") # full version version = ".".join(release.split(".")[:2]) # short X.Y version extensions = [ "sphinx.ext.autodo...
[ 37811, 50, 746, 28413, 10314, 5270, 8398, 526, 15931, 198, 198, 11748, 1330, 8019, 13, 38993, 198, 198, 16302, 796, 366, 2032, 69, 12, 774, 9124, 1, 198, 22163, 4766, 796, 366, 1238, 2481, 11, 40811, 440, 1, 198, 9800, 796, 366, 43,...
2.526316
171
from typing import List s = Solution() # L, k = [1, 2, 3, 4, 5, 6, 7], 3 L, k = [-1, -100, 3, 99], 2 s.rotate(L, k) print(L)
[ 6738, 19720, 1330, 7343, 198, 198, 82, 796, 28186, 3419, 198, 2, 406, 11, 479, 796, 685, 16, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 767, 4357, 513, 198, 43, 11, 479, 796, 25915, 16, 11, 532, 3064, 11, 513, 11, 7388, ...
1.984127
63
from ds_linked_list.ll_node import Node if __name__ == "__main__": ll = Unsorted_linked_list() for i in range(1,10): ll.add(i) print(ll)
[ 6738, 288, 82, 62, 25614, 62, 4868, 13, 297, 62, 17440, 1330, 19081, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 32660, 796, 791, 82, 9741, 62, 25614, 62, 4868, 3419, 198, 220, 220, 220, ...
2.121622
74
"""FAça um programa que jogue par ou impar com o computadr. O jogo só será interrompido quando o jogador PERDER, mostrando o total de vitórias consecutivas que conquistou no final do jogo""" from random import randint print(f'''{"-=" * 20} PAR OU IMPAR {"-=" * 20}''') contador = 0 while True: jogadapc = randint(0,...
[ 37811, 7708, 50041, 23781, 1430, 64, 8358, 474, 5119, 1582, 267, 84, 848, 283, 401, 267, 2653, 41909, 13, 440, 474, 24076, 264, 10205, 1055, 6557, 987, 398, 79, 17305, 627, 25440, 267, 48342, 7079, 19878, 14418, 11, 198, 1712, 25192, ...
2.090482
851
import asyncio import logging from multiprocessing import Queue, Process, cpu_count import queue from threading import Thread import time import aiohttp import aiosqlite from bs4 import BeautifulSoup PROCESSES = cpu_count() #P parameter NUM_THREADS = 10 #T parameter TARGET_RESOURCES = [ 'https://example.org/', ...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 18540, 305, 919, 278, 1330, 4670, 518, 11, 10854, 11, 42804, 62, 9127, 198, 11748, 16834, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 640, 198, 11748, 257, 952, 4023, 198, 11748, 257, ...
2.683962
212
from dataclasses import dataclass from video_utils import Codec @dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 2008, 62, 26791, 1330, 39298, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
3.137931
29
# # Copyright (C) 2012 - 2017 Satoru SATOH <ssato @ redhat.com> # License: MIT # # pylint: disable=missing-docstring,invalid-name,too-few-public-methods from __future__ import absolute_import import anyconfig.backend.ini as TT import tests.backend.common as TBC # :seealso: `tests.backend.common.CNF_0` CNF_0_S = """\...
[ 2, 198, 2, 15069, 357, 34, 8, 2321, 532, 2177, 311, 1352, 84, 29020, 12096, 1279, 824, 5549, 2488, 2266, 5183, 13, 785, 29, 198, 2, 13789, 25, 17168, 198, 2, 198, 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 259...
2.304094
171
''' Как известно, два наиболее распространённых формата записи даты — это европейский (сначала день, потом месяц, потом год) и американски (сначала месяц, потом день, потом год). Системный администратор поменял дату на одном из бэкапов и сейчас хочет вернуть дату обратно. Но он не проверил, в каком формате дата использ...
[ 7061, 6, 198, 140, 248, 16142, 31583, 12466, 116, 140, 115, 38857, 16843, 21727, 20375, 22177, 15166, 11, 12466, 112, 38857, 16142, 12466, 121, 16142, 18849, 140, 109, 25443, 119, 16843, 16843, 220, 21169, 16142, 21727, 140, 123, 21169, 1...
1.001029
972
from materials_io.ase import AseParser from math import isclose import pytest import os @pytest.fixture @pytest.fixture
[ 6738, 5696, 62, 952, 13, 589, 1330, 317, 325, 46677, 198, 6738, 10688, 1330, 318, 19836, 198, 11748, 12972, 9288, 198, 11748, 28686, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628 ]
3.125
40
#coding=utf-8 from PySide2 import QtWidgets, QtCore, QtGui import numpy as np import os import os.path import processRS
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 6738, 9485, 24819, 17, 1330, 33734, 54, 312, 11407, 11, 33734, 14055, 11, 33734, 8205, 72, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 1429,...
2.755556
45
import cmd import logging from signalslot import Signal
[ 11748, 23991, 198, 11748, 18931, 198, 6738, 10425, 26487, 1330, 26484, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
3.142857
21
nint = leiaInt('Digite um numero Inteiro: ') nfloat = leiaFloat('Digite um número Flutuante: ') print(f'Você digitou um número Inteiro: {nint}\nE um número Flutuante: {nfloat}')
[ 201, 198, 201, 198, 201, 198, 77, 600, 796, 443, 544, 5317, 10786, 19511, 578, 23781, 997, 3529, 2558, 68, 7058, 25, 705, 8, 201, 198, 77, 22468, 796, 443, 544, 43879, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 1610, 315, 84, ...
2.102273
88
import numpy as np from math import gcd, ceil # import itertools def lcm(list_of_int): """ Get the Least Common Multyply (lcm) of a list of integer numbers. Parameters: -------- list_of_int A List of integers Returns: -------- An integer (the lcm...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 308, 10210, 11, 2906, 346, 198, 2, 1330, 340, 861, 10141, 198, 198, 4299, 300, 11215, 7, 4868, 62, 1659, 62, 600, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, ...
1.903112
1,703
#!/usr/bin/env python3 import cv2 import numpy as np # img = cv2.imread('4.png') # hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # img[hsv[:,:,0] > 20] = 255 img = cv2.imread("4.png") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img[gray > 200] = 255 cv2.imwrite("4_.png", img) cv2.imshow("img", img) cv2.waitKey(0)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 33705, 796, 269, 85, 17, 13, 320, 961, 10786, 19, 13, 11134, 11537, 198, 2, 289, 21370, 796, 269, 85, ...
1.932927
164
# -*- coding: utf-8 -*- """ cmdfunctools.types ~~~~~~~~~~~~~~~~~~~~~~~ Module with the type checkers for the function/commandline args. """ import string # *********************************************************** # default functions used when type argument are not provided def default_true(*arg): """ Aux...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 11215, 7568, 16260, 10141, 13, 19199, 198, 27156, 8728, 4907, 93, 198, 198, 26796, 351, 262, 2099, 2198, 364, 329, 262, 2163, 14, 21812, 1370, 26498, 13, 198...
2.997297
740
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.5625
16
import asyncio import ssl import websockets import os import json import time import base64 import random import string import hashlib from OpenSSL import crypto, SSL from datetime import datetime server_password = "" with open("./config.txt", "r") as config: data = config.read() data = json.loads(data) s...
[ 11748, 30351, 952, 198, 11748, 264, 6649, 198, 11748, 2639, 11603, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 2779, 2414, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 12234, 8019, 198, 6738, 4946, 31127, 1330, 2...
2.644231
312
# -*- coding: utf-8 -*- """ numcolorpy.py Created Saturday April 22 2017 @author: del lanier4@illinois.edu mradmstr514226508@gmail.com import numcolorpy as ncp """ import time import numpy as np from PIL import Image as IP from PIL import ImageColor as IC import colorsys def range_norm(Z, lo=0.0, hi=1.0): """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 22510, 8043, 9078, 13, 9078, 198, 41972, 3909, 3035, 2534, 2177, 198, 198, 31, 9800, 25, 1619, 198, 9620, 959, 19, 31, 359, 8981, 13, 15532, 198, 76, 6335,...
1.98858
2,627
from __future__ import absolute_import import threading from mercurial.node import hex, nullid from mercurial.pycompat import getattr from mercurial import ( mdiff, pycompat, revlog, ) from . import ( basestore, constants, shallowutil, ) class ChainIndicies(object): """A static class for...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 4704, 278, 198, 198, 6738, 11991, 333, 498, 13, 17440, 1330, 17910, 11, 9242, 312, 198, 6738, 11991, 333, 498, 13, 9078, 5589, 265, 1330, 651, 35226, 198, 6738, 11991, 3...
3.033898
295
import logging from proton.handlers import MessagingHandler from proton import Message
[ 11748, 18931, 198, 6738, 386, 1122, 13, 4993, 8116, 1330, 10626, 3039, 25060, 198, 6738, 386, 1122, 1330, 16000, 628 ]
4.4
20
from __future__ import print_function # Python program to solve N Queen # Problem using backtracking global N N = 4 # A utility function to check if a queen can # be placed on board[row][col]. Note that this # function is called when "col" queens are # already placed in columns from 0 to col -1. # So we need to che...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 2, 11361, 1430, 284, 8494, 399, 7542, 220, 198, 2, 20647, 1262, 736, 36280, 198, 198, 20541, 399, 198, 45, 796, 604, 628, 198, 2, 317, 10361, 2163, 284, 2198, 611, 257, 16599, 460,...
3.85641
195
from django.http import HttpResponseRedirect from google.appengine.api import memcache
[ 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 201, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 1066, 23870, 201 ]
3.461538
26
import os from PIL import Image ''' Test file for cropping images ''' file_loc = r'C:\Users\brenn\Desktop\Spectrogram/blues.00000.jpg' im = Image.open(file_loc) crop_box = (80, 58, 576, 427) img1 = im.crop(crop_box) img1.show()
[ 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 7061, 6, 198, 14402, 2393, 329, 6763, 2105, 4263, 198, 7061, 6, 628, 198, 7753, 62, 17946, 796, 374, 6, 34, 7479, 14490, 59, 65, 918, 77, 59, 36881, 59, 49738, 39529, 14, 2...
2.416667
96
from tensorflow.keras.layers import Layer, Dense from tensorflow.keras.regularizers import l2 import tensorflow as tf class Sampling(Layer): """Uses (z_mean, z_log_var) to sample z, the vector encoding a digit.""" class Encoder(Layer): """Maps MNIST digits to a triplet (z_mean, z_log_var, z).""" class Deco...
[ 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 34398, 11, 360, 1072, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 16338, 11341, 1330, 300, 17, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 4871, 3409, 11347, 7,...
2.971014
138
# # @lc app=leetcode id=15 lang=python3 # # [15] 3Sum # # O(n^2) time | O(n) space
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 1314, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 1314, 60, 513, 13065, 198, 2, 198, 198, 2, 440, 7, 77, 61, 17, 8, 640, 930, 440, 7, 77, 8, 2272, 628 ]
1.888889
45
input_file_name = "time_machine_input.txt" sum = 0 seen_sums = {} for time_input in infinite_input(): sum += int(time_input) sum_frequency = seen_sums.get(sum, 0) + 1 seen_sums[sum] = sum_frequency if sum_frequency > 1: print(sum) break
[ 15414, 62, 7753, 62, 3672, 796, 366, 2435, 62, 30243, 62, 15414, 13, 14116, 1, 198, 198, 16345, 796, 657, 198, 15898, 62, 82, 5700, 796, 23884, 198, 1640, 640, 62, 15414, 287, 15541, 62, 15414, 33529, 198, 220, 220, 220, 2160, 15853...
2.299145
117
from refbee.util import get_sparql_query_results platform_properties_dict = { "ORCID": "wdt:P496", "Google Scholar": "wdt:P1960", "VIAF": "wdt:P214", "DBLP": "wdt:P2456", "Dimensions": "wdt:P6178", "Github": "wdt:P2037", "Microsoft Academic": "wdt:P6366", "Semantic Scholar": "wdt:P4012"...
[ 6738, 1006, 20963, 13, 22602, 1330, 651, 62, 82, 1845, 13976, 62, 22766, 62, 43420, 198, 198, 24254, 62, 48310, 62, 11600, 796, 1391, 198, 220, 220, 220, 366, 1581, 34, 2389, 1298, 366, 16993, 83, 25, 47, 37747, 1600, 198, 220, 220,...
2.153213
607