content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 import scanner # ------------------------------------------------------------------------------ # Classes for holding source code entities # ------------------------------------------------------------------------------ # Factories for module and function filters # ----------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 27474, 628, 198, 2, 16529, 26171, 198, 2, 38884, 329, 4769, 2723, 2438, 12066, 628, 628, 198, 2, 16529, 26171, 198, 2, 19020, 1749, 329, 8265, 290, 2163, 16628, 628, ...
6.805825
103
''' Instructions: 1. Make sure you have Flask, Flask-Rauth, and SQLAlchemy installed. $ pip install Flask Flask-Rauth SQLAlchemy 2. Open a Python shell in this directory and execute the following: $ python >>> from tweet import init_db >>> init_db() >>> exit() This will initia...
[ 7061, 6, 198, 43993, 507, 25, 198, 198, 16, 13, 6889, 1654, 345, 423, 46947, 11, 46947, 12, 49, 18439, 11, 290, 16363, 2348, 26599, 6589, 13, 628, 220, 220, 220, 220, 220, 220, 720, 7347, 2721, 46947, 46947, 12, 49, 18439, 16363, ...
2.942795
1,853
# -*- coding: utf-8 -*- from dp_tornado.engine.controller import Controller as dpController
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 288, 79, 62, 45910, 4533, 13, 18392, 13, 36500, 1330, 22741, 355, 288, 79, 22130, 628 ]
2.9375
32
import typing from abc import ABC, abstractmethod
[ 11748, 19720, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.25
12
import os from collections import namedtuple from hyperopt import fmin, tpe, Trials, space_eval import numpy as np import pandas as pd import pytest import requests import yaml from crosspredict.crossval import \ CrossLightgbmModel, CrossXgboostModel, CrossCatboostModel from crosspredict.iterator import Iterator ...
[ 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 8718, 8738, 1330, 277, 1084, 11, 256, 431, 11, 28945, 11, 2272, 62, 18206, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12...
2.955285
246
# -*- coding: utf-8 -*- import os # For different service SITE_NAME = 'Dentimonial' TRACKING_HASHTAG = '#dentimonial' TWEET_ACTION_NAME = 'Send' SERVICE_NAME = 'Identi.ca' SERVICE_URI = 'http://identi.ca/' FOLLOWERS_NAME = 'Subscribers' FOLLOWED_NAME = 'Subscribed' FOLLOW_NAME = 'Subscribe to' TWEET_NAME = 'Notice' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 628, 198, 2, 1114, 1180, 2139, 198, 50, 12709, 62, 20608, 796, 705, 35, 298, 20473, 498, 6, 198, 5446, 8120, 2751, 62, 39, 1921, 6535, 4760, 796, ...
2.306349
630
version_info = (2, 0, 5) version = '.'.join(str(c) for c in version_info)
[ 9641, 62, 10951, 796, 357, 17, 11, 657, 11, 642, 8, 198, 9641, 796, 705, 2637, 13, 22179, 7, 2536, 7, 66, 8, 329, 269, 287, 2196, 62, 10951, 8 ]
2.433333
30
from itertools import chain from dmutils.email.helpers import get_email_addresses, hash_string from dmutils.env_helpers import get_web_url_from_stage
[ 6738, 340, 861, 10141, 1330, 6333, 198, 198, 6738, 288, 21973, 4487, 13, 12888, 13, 16794, 364, 1330, 651, 62, 12888, 62, 2860, 16746, 11, 12234, 62, 8841, 198, 198, 6738, 288, 21973, 4487, 13, 24330, 62, 16794, 364, 1330, 651, 62, ...
3.039216
51
# # Copyright (C) 2020 The Android Open Source Project # # 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 la...
[ 2, 198, 2, 15069, 357, 34, 8, 12131, 383, 5565, 4946, 8090, 4935, 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, ...
2.401841
3,693
frase = str(input('Digite uma frase: ')).strip().upper() palavras = frase.split() junto = ''.join(palavras) inverso = '' for letra in range(len(junto) -1, -1, -1): inverso += junto[letra] if inverso == junto: print('Temos um palíndromo') else: print('A frase digitada não é um palíndromo!') #a debaixo pegue...
[ 8310, 589, 796, 965, 7, 15414, 10786, 19511, 578, 334, 2611, 1216, 589, 25, 705, 29720, 36311, 22446, 45828, 3419, 198, 18596, 615, 8847, 796, 1216, 589, 13, 35312, 3419, 198, 29741, 1462, 796, 705, 4458, 22179, 7, 18596, 615, 8847, 8...
2.322581
217
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Precompute DCASE2021 Task 2 Dataset fixed representations (logSTFT, logMel) """ import os from pathlib import Path import json # from omegaconf import OmegaConf import numpy as np # from d2021umaps.utils import IncrementalHDF5 from d2021umaps.logging import ColorLogg...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 628, 198, 37811, 198, 6719, 5589, 1133, 6257, 11159, 1238, 2481, 15941, 362, 16092, 292, 316, 5969, 24612, 357, 6404, 2257, 9792,...
2.055394
2,744
import numpy as np import matplotlib.pyplot as plt from numberGenerator.chaos.cprng import CPRNG from particleSwarmOptimization.pso import PSO from particleSwarmOptimization.structure.particle import Particle from particleSwarmOptimization.structure.chaoticParticle import ChaoticParticle from neuralNetwork.feedForward...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 1271, 8645, 1352, 13, 354, 7495, 13, 66, 1050, 782, 1330, 42920, 10503, 198, 6738, 18758, 10462, 1670, 27871, 320, 1634, 13, ...
3.577236
123
"""Notification channels for django-notifs.""" from json import dumps import pika from notifications.channels import BaseNotificationChannel class BroadCastWebSocketChannel(BaseNotificationChannel): """Fanout notification for RabbitMQ.""" def _connect(self): """Connect to the RabbitMQ server.""" ...
[ 37811, 3673, 2649, 9619, 329, 42625, 14208, 12, 1662, 361, 82, 526, 15931, 198, 198, 6738, 33918, 1330, 45514, 198, 198, 11748, 279, 9232, 198, 198, 6738, 19605, 13, 354, 8961, 1330, 7308, 3673, 2649, 29239, 628, 198, 4871, 9765, 19248,...
2.809019
377
# Copyright 2019-2022 Simon Zigelli # # 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, 220, 15069, 13130, 12, 1238, 1828, 11288, 24992, 23225, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.56338
284
""" @brief test log(time=21s) """ import os import unittest from pyquickhelper.pycode import ExtTestCase from ensae_teaching_cs.td_1a.discours_politique import enumerate_speeches_from_elysees if __name__ == "__main__": unittest.main()
[ 37811, 198, 31, 65, 3796, 220, 220, 220, 220, 220, 1332, 2604, 7, 2435, 28, 2481, 82, 8, 198, 37811, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 12972, 24209, 2978, 525, 13, 9078, 8189, 1330, 5683, 14402, 20448, 198, 67...
2.520408
98
import warnings from functools import wraps def scraper_enabled(func): """ Decorator which ensures that a :class:`pyanimelist.Client.scraper` isn't used without it being explictly allowed Example usage: .. code-block:: py from pyanimelist.util.web import scraper_enabled @scraper_enab...
[ 11748, 14601, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 4299, 19320, 525, 62, 25616, 7, 20786, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4280, 273, 1352, 543, 19047, 326, 257, 1058, 4871, 25, 63, 79, 4121, 320, ...
2.716981
159
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 22935, 90, 198, 2, 43907, 25, 900, 277, 12685, 28, 40477, 12, 23, 10117, 28, 29412, 1509, 28, 19, 40379, 28, 19, 39747, 28, 19, 2123, 25, 198, 2, 198, 2, 15069, 12131, ...
3.376404
890
import asyncio from datetime import datetime from typing import Callable import discord from discord.ext import commands
[ 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 628 ]
4.392857
28
import torch.nn as nn import torch from torchsummary import summary import torchsummaryX from lib.medzoo.BaseModelClass import BaseModel import torch.nn.functional as F class BaseAttentionBlock(nn.Module): """The basic implementation for self-attention block/non-local block.""" class BaseOCModule(nn.Module): ...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 6738, 28034, 49736, 1330, 10638, 198, 11748, 28034, 49736, 55, 198, 6738, 9195, 13, 1150, 89, 2238, 13, 14881, 17633, 9487, 1330, 7308, 17633, 198, 11748, 28034, 13, 20471, ...
3.04
150
from setuptools import setup, find_packages # Always prefer setuptools over distutils from os import path, walk here = path.abspath(path.dirname(__file__)) datadir = 'pyKriging/sampling_plans' package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)] data_files=[] for i in package_d...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 1303, 16622, 4702, 900, 37623, 10141, 625, 1233, 26791, 198, 6738, 28686, 1330, 3108, 11, 2513, 628, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834,...
2.519637
331
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import json from classify_r_equiv.const import get_seed_functions from tqdm import tqdm from sympy import * import random x, y = symbols("x y")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 6738, 36509, 62, 81, 62, 4853, 452, 13, 9979, 1330, 651, 62, 2...
2.679012
81
#! /usr/bin/env python # Source https://lorenzod8n.wordpress.com/2007/05/30/pygame-tutorial-3-mouse-events/ # Deal with mouse events. import pygame # Tracks the position of the mouse on our window. # Draws lines that cut the mouse pointer’s coordinates. # Draws lines that cut the mouse pointer’s coordinates fl...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 8090, 3740, 1378, 31131, 27305, 375, 23, 77, 13, 40346, 13, 785, 14, 12726, 14, 2713, 14, 1270, 14, 9078, 6057, 12, 83, 44917, 12, 18, 12, 35888, 12, 31534, 14, 198, 2,...
3.154286
175
# -*- coding: utf-8 -*- """ Created on Sun Sep 30 12:33:58 2018 @author: michaelek """ import os import pandas as pd from hilltoppy import web_service as ws from hilltoppy.util import convert_site_names from pyhydrotel import get_ts_data, get_sites_mtypes from flownat import FlowNat from pdsql import mssql import yaml...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 8621, 1542, 1105, 25, 2091, 25, 3365, 2864, 198, 198, 31, 9800, 25, 285, 488, 3609, 293, 74, 198, 37811, 198, 11748, 28686, 198, 11748, 1...
2.492409
1,976
# 카드 짝 맞추기 """ 1. 현재 보드를 모두 순회하면서 카드의 종류를 모두 긁어 모은다. 2. 순회한 보드에 따라 permutations 한다. 3. 방문할 좌표들을 백트래킹한다. -> 좌표들을 저장하고 좌표의 인덱스만 백트래킹한다. 4. 방문해야할 모든 좌표 세트를 구하고 bfs를 실행한다. """ import copy from collections import deque from itertools import permutations dy = [-1, 1, 0, 0] dx = [0, 0, -1, 1] INF = 987654321 if __name...
[ 2, 23821, 117, 112, 167, 241, 250, 23821, 100, 251, 31619, 100, 252, 168, 114, 242, 166, 116, 108, 198, 37811, 198, 16, 13, 220, 169, 246, 226, 168, 252, 105, 31619, 111, 112, 167, 241, 250, 167, 98, 120, 31619, 103, 101, 167, 2...
1.047619
420
import numpy def local_energy_hubbard_holstein_momentum(system, G, P, Lap, Ghalf=None): r"""Calculate local energy of walker for the Hubbard-Hostein model. Parameters ---------- system : :class:`HubbardHolstein` System information for the HubbardHolstein model. G : :class:`numpy.ndarray` ...
[ 11748, 299, 32152, 198, 4299, 1957, 62, 22554, 62, 40140, 23024, 62, 3937, 5714, 62, 32542, 298, 388, 7, 10057, 11, 402, 11, 350, 11, 26944, 11, 11972, 1604, 28, 14202, 2599, 198, 220, 220, 220, 374, 37811, 9771, 3129, 378, 1957, 25...
2.204655
3,308
# -*- coding: utf-8 -*- # (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # 3p import mock from datadog_checks.http_check import HTTPCheck from datadog_checks.utils.headers import headers as agent_headers from .common import ( FAKE_CERT, CONFIG, CONFIG_HTT...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 357, 34, 8, 16092, 324, 519, 11, 3457, 13, 2864, 198, 2, 1439, 2489, 10395, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 357, 3826, ...
2.519765
1,872
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
[ 2, 38093, 25609, 855, 198, 2, 15069, 1946, 14757, 9847, 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.442879
639
"""Top-level package for advertools.""" __author__ = """Elias Dabbas""" __email__ = 'eliasdabbas@gmail.com' __version__ = '0.9.0' from advertools.ad_create import ad_create from advertools.ad_from_string import ad_from_string from advertools.emoji import emoji_search, emoji_df from advertools.extract import * from a...
[ 198, 37811, 9126, 12, 5715, 5301, 329, 6728, 10141, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 9527, 4448, 360, 6485, 292, 37811, 198, 834, 12888, 834, 796, 705, 417, 4448, 67, 6485, 292, 31, 14816, 13, 785, 6, 198, 834, 9641...
3.282297
209
import argparse import os import sys import pandas as pd from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from . import exceptions, query, settings, utils from .models import Base, Bulletin from .version import __version__
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 7742, 1330, 35886, 27201, 198, 198, 6738, 764, 1...
3.776119
67
from keras.datasets import cifar10 from autokeras.generator import DefaultClassifierGenerator from autokeras.net_transformer import default_transform from autokeras.preprocessor import OneHotEncoder from autokeras.utils import ModelTrainer if __name__ == '__main__': (x_train, y_train), (x_test, y_test) = cifar10...
[ 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 269, 361, 283, 940, 198, 198, 6738, 1960, 11020, 292, 13, 8612, 1352, 1330, 15161, 9487, 7483, 8645, 1352, 198, 6738, 1960, 11020, 292, 13, 3262, 62, 7645, 16354, 1330, 4277, 62, 35636, 19...
2.364532
406
from dotenv import load_dotenv load_dotenv() import os os.chdir(os.path.dirname(os.path.realpath(__file__))) from trello import TrelloClient boardTitle = os.getenv("BOARD_NAME") listTitle = os.getenv("LIST_NAME")
[ 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 11748, 28686, 198, 418, 13, 354, 15908, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 22305, 19...
2.7
80
#!/usr/bin/env python 3 """ MQTT client base class to Connect, Publish and Subscribe messages using Mosquitto broker """ __author__ = "Amjad B." __license__ = "MIT" __version__ = '1.0' __status__ = "beta" import time import json import ssl import sys import logging import paho.mqtt.client as mqtt_client logger...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 513, 198, 37811, 198, 49215, 15751, 5456, 2779, 1398, 284, 8113, 11, 8525, 1836, 290, 19808, 6218, 1262, 5826, 421, 37606, 20426, 220, 220, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 5...
2.853659
123
import magma as m from magma.testing import check_files_equal import os
[ 11748, 2153, 2611, 355, 285, 198, 6738, 2153, 2611, 13, 33407, 1330, 2198, 62, 16624, 62, 40496, 198, 11748, 28686, 628 ]
3.47619
21
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import time import universe seed = 91231 n_steps_pretraining = 3000 n_steps = 3500 steps_to_reward = 9 max_reward = n_steps / steps_to_reward # uni = universe.Universe('grid_world', world='world0') uni = universe.Universe('grid_world', wor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 11748, 6881, 628, 198, 28826, 796, 860, 1065...
2.111954
527
'''Aprimore o desafio 93 para que ele funcione com varios jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador'''
[ 7061, 6, 13680, 9401, 267, 748, 1878, 952, 10261, 31215, 8358, 9766, 25439, 7935, 401, 1401, 4267, 198, 73, 519, 324, 2850, 11, 13358, 84, 521, 78, 23781, 264, 396, 19687, 390, 5874, 23638, 16175, 28749, 390, 1062, 282, 956, 198, 4598...
2.529412
68
#!/usr/bin/env python from getpass import getpass from pprint import pprint from lxml import etree # import xmltodict from jnpr.junos import Device # from jnpr.junos.op.ethport import EthPortTable # from jnpr.junos.op.arp import ArpTable # from jnpr.junos.op.routes import RouteTable # from jnpr.junos.op.phyport impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 2, 1330, 2124, 76, 2528, 375, 713, 198, 198, 6738, 474...
2.914179
268
import json from simpl.constants.urls import URL from simpl.resources.base import BaseResource
[ 11748, 33918, 198, 198, 6738, 7106, 13, 9979, 1187, 13, 6371, 82, 1330, 10289, 198, 6738, 7106, 13, 37540, 13, 8692, 1330, 7308, 26198, 198 ]
3.84
25
import unittest from dalpy.queues import Queue, QueueUnderflowError if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 288, 282, 9078, 13, 4188, 947, 1330, 4670, 518, 11, 4670, 518, 9203, 11125, 12331, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13,...
2.586957
46
import polyphony from polyphony.io import Port from polyphony.typing import bit, uint3, uint12, uint16 from polyphony.timing import clksleep, clkfence, wait_rising, wait_falling CONVST_PULSE_CYCLE = 10 CONVERSION_CYCLE = 40 @polyphony.module @polyphony.testbench @polyphony.rule(scheduling='parallel') spic = AD7...
[ 11748, 7514, 23021, 198, 6738, 7514, 23021, 13, 952, 1330, 4347, 198, 6738, 7514, 23021, 13, 774, 13886, 1330, 1643, 11, 20398, 18, 11, 20398, 1065, 11, 20398, 1433, 198, 6738, 7514, 23021, 13, 16514, 278, 1330, 537, 591, 8892, 11, 53...
2.700787
127
#! /usr/bin/env python # -*- coding:utf-8 -*- """ @author : MG @Time : 2018/7/6 10:21 @File : run.py.py @contact : mmmaaaggg@163.com @desc : """ if __name__ == '__main__': import logging from app.config import config from app.app import app logger = logging.getLogger() if config.APP_ENAB...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 220, 1058, 34809, 198, 31, 7575, 220, 220, 220, 1058, 2864, 14, 22, 14, 21, 838, 25, 2481, 198...
2.170139
288
"""Test MSlider class""" import pytest from dayu_widgets3.slider import MSlider from dayu_widgets3.qt import Qt @pytest.mark.parametrize('orient', (Qt.Horizontal, Qt.Vertical)) def test_slider_init(qtbot, orient): """Test MSlider init""" slider = MSlider(orientation=orient) slider.setValue(10) qtbot.a...
[ 37811, 14402, 6579, 75, 1304, 1398, 37811, 198, 11748, 12972, 9288, 198, 6738, 1110, 84, 62, 28029, 11407, 18, 13, 6649, 1304, 1330, 6579, 75, 1304, 198, 6738, 1110, 84, 62, 28029, 11407, 18, 13, 39568, 1330, 33734, 628, 198, 31, 9078...
2.571429
238
''' Module is a file which contains various Python functions and global variables. It is simply just .py extension file which has python executable code. Package is a collection of modules. It must contain an init.py file as a flag so that the python interpreter processes it as such. The init.py could be an empty file...
[ 7061, 6, 198, 26796, 318, 257, 2393, 543, 4909, 2972, 11361, 5499, 290, 3298, 9633, 13, 198, 1026, 318, 2391, 655, 764, 9078, 7552, 2393, 543, 468, 21015, 28883, 2438, 13, 198, 198, 27813, 318, 257, 4947, 286, 13103, 13, 632, 1276, ...
3.654709
223
import requests from bs4 import BeautifulSoup import sqlite3 import re import threading from os import system from time import sleep from PySide2.QtWidgets import ( QMessageBox, QDialog, QMessageBox, QVBoxLayout, QLabel, QLineEdit ) from PySide2 import QtGui, QtCore ## DB ## SOCORRO!! lembra o tamnho dessas ...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 220, 198, 11748, 44161, 578, 18, 220, 198, 11748, 302, 198, 11748, 4704, 278, 198, 6738, 28686, 1330, 1080, 198, 6738, 640, 1330, 3993, 198, 6738, 9485, 24819, 17, 13, 48, ...
2.584034
238
from datetime import datetime, time from decimal import Decimal from random import randint, choice from uuid import uuid4 import factory import factory.fuzzy import faker.providers.phone_number.pt_BR import faker.providers.date_time from src.classes import ValorHoraInput from src.enums import EstadosEnum, UploadStatu...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 4738, 1330, 43720, 600, 11, 3572, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 11748, 8860, 198, 11748, 8860, 13, 69, 4715, 88, 198,...
2.924157
356
import sys import solution_reader3 # load a solution reader object which parses the input spec sr = solution_reader3.SolutionReader('input_data') # should properly set in "solution_reader3.py" if 32-bit or 64-bit # load the density data at output step 20 rho = sr.loadVec('rho001.dat') # the shape of the data is (NX,...
[ 11748, 25064, 198, 11748, 4610, 62, 46862, 18, 198, 198, 2, 3440, 257, 4610, 9173, 2134, 543, 13544, 274, 262, 5128, 1020, 198, 27891, 796, 4610, 62, 46862, 18, 13, 46344, 33634, 10786, 15414, 62, 7890, 11537, 1303, 815, 6105, 900, 28...
3.167331
251
""" Contains classes and methods to process the VRM data and convert it to the format as required by the 3D CNN model""" import pandas as pd import numpy as np from tqdm import tqdm #from numba import cuda class GetTrainData(): """GetTrainData Class (No initialization parameter) """ def data_import(self,file_nam...
[ 37811, 49850, 6097, 290, 5050, 284, 1429, 262, 6453, 44, 1366, 290, 10385, 340, 284, 262, 5794, 355, 2672, 416, 262, 513, 35, 8100, 2746, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738,...
2.354486
2,285
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628 ]
2.4
10
import os import random from random import shuffle import pandas as pd from pandas.core.frame import DataFrame hdfs_train = data_read('data/hdfs_train') hdfs_test_normal = data_read('data/hdfs_test_normal') hdfs_test_abnormal = data_read('data/hdfs_test_abnormal') hdfs_train.extend(hdfs_test_normal) ...
[ 11748, 28686, 201, 198, 11748, 4738, 201, 198, 6738, 4738, 1330, 36273, 201, 198, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 19798, 292, 13, 7295, 13, 14535, 1330, 6060, 19778, 201, 198, 201, 198, 201, 198, 201, 198, ...
2.404871
657
from django.urls import path from dataworkspace.apps.accounts.utils import login_required from dataworkspace.apps.applications.views import ( application_spawning_html_view, application_running_html_view, tools_html_view, quicksight_start_polling_sync_and_redirect, UserToolSizeConfigurationView, ) ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 4818, 707, 3647, 10223, 13, 18211, 13, 23317, 82, 13, 26791, 1330, 17594, 62, 35827, 198, 6738, 4818, 707, 3647, 10223, 13, 18211, 13, 1324, 677, 602, 13, 33571, 1330, 357,...
2.501193
419
# coding: utf-8 """ cccc-praying-api The API for CCCC Praying project # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.api.user_api im...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 269, 535, 66, 12, 1050, 8369, 12, 15042, 628, 220, 220, 220, 383, 7824, 329, 327, 46361, 1736, 8369, 1628, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, ...
2.340206
388
from functools import wraps from multiprocessing import Process import webbrowser from .utils import processing_func_name def processing_function(func): """Decorator for turning Sketch methods into Processing functions. Marks the function it's decorating as a processing function by camel casing the name...
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 3992, 40259, 198, 198, 6738, 764, 26791, 1330, 7587, 62, 20786, 62, 3672, 628, 198, 4299, 7587, 62, 8818, 7, 20786, 2599, 198, 220, 220, 22...
3.877256
277
import argparse from app import init_app from common.config import Config if __name__ == "__main__": args = get_runtime_args() config = Config(args) app = init_app(config) app.run(debug=config.debug, host=config.host, port=config.port)
[ 11748, 1822, 29572, 198, 198, 6738, 598, 1330, 2315, 62, 1324, 198, 6738, 2219, 13, 11250, 1330, 17056, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 26498, 796, 651, 62, 43282, 62, 22046, 3419...
2.791209
91
from typing import List solution = Solution() print(solution.reverseOnlyLetters(s = "ab-cd")) print(solution.reverseOnlyLetters(s = "a-bC-dEf-ghIj")) print(solution.reverseOnlyLetters(s = "Test1ng-Leet=code-Q!"))
[ 6738, 19720, 1330, 7343, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 82, 2122, 796, 28186, 3419, 198, 198, 4798, 7, 82, 2122, 13, 50188, 10049, 5756, 1010, 7, 82, 796, 366, 397, 12, 10210, 48774, 198, 198, 4798, 7,...
2.364583
96
from gevent import monkey monkey.patch_all() import time import logging import copy_reg import types import grequests import requests from multiprocessing import JoinableQueue, Process SLEEP_INTERVAL = 5 # We need to pickle instance methods of the Worker Class below so this snippet does that # Refer: http://stack...
[ 6738, 4903, 1151, 1330, 21657, 198, 49572, 13, 17147, 62, 439, 3419, 198, 198, 11748, 640, 198, 11748, 18931, 198, 198, 11748, 4866, 62, 2301, 198, 11748, 3858, 198, 198, 11748, 308, 8897, 3558, 198, 11748, 7007, 198, 198, 6738, 18540, ...
2.374065
2,005
import torch import torch.optim as optim import argparse import numpy as np import time from tensorboardX import SummaryWriter from collections import deque import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys sys.path.append('../..') from pg_travel.deeprm import model fro...
[ 11748, 28034, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 640, 201, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 201, 198, 6738, 17268, 13...
2.35503
507
# -*- coding: utf-8 -*- """ Created on Fri Jan 18 18:07:30 2019 @author: Guillaume """ """ This file contains functions to calculate the score of the students and the statistics for the group """ # calculates the statistics for the class # given the correction, marks every answer of ONE s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 2365, 1248, 1248, 25, 2998, 25, 1270, 13130, 201, 198, 201, 198, 31, 9800, 25, 1962, 5049, 2454, 201, 198, 37811, 201, 198, 20...
1.764919
2,765
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] direction = input("Type 'encode' to encrypt, type 'decode' to decrypt : \n") text = input("Ty...
[ 17307, 8380, 796, 37250, 64, 41707, 65, 41707, 66, 41707, 67, 41707, 68, 41707, 69, 41707, 70, 41707, 71, 41707, 72, 41707, 73, 41707, 74, 41707, 75, 41707, 76, 41707, 77, 41707, 78, 41707, 79, 41707, 80, 41707, 81, 41707, 82, 41707, ...
2.365145
241
""" 将 M 个同样的糖果放在 N 个同样的篮子里,允许有的篮子空着不放,共有多少种不同的分法? 比如,把 7 个糖果放在 3 个篮子里,共有 8 种分法(每个数表示篮子中放的糖果数,数的个数为篮子数): 1 1 5 1 2 4 1 3 3 2 2 3 2 5 0 3 4 0 6 1 0 7 0 0 注意:相同的分布,顺序不同也只算作一种分法,如 7 0 0、0 7 0 和 0 0 7 只算作一种。 输入包含二个正整数 M 和 N,以(,)分开,M 表示有几个同样的糖果,N 表...
[ 37811, 628, 220, 220, 220, 10263, 108, 228, 337, 220, 10310, 103, 28938, 234, 43718, 115, 21410, 163, 111, 244, 162, 252, 250, 162, 242, 122, 28839, 101, 399, 220, 10310, 103, 28938, 234, 43718, 115, 21410, 163, 107, 106, 36310, 34932...
0.812598
635
from mpi4py import MPI import argparse import numpy from arcsilib.arcsiutils import ARCSIEnum import sys # Define MPI message tags mpiTags = ARCSIEnum('READY', 'DONE', 'EXIT', 'START') arcsiStages = ARCSIEnum('ARCSIPART1', 'ARCSIPART2', 'ARCSIPART3', 'ARCSIPART4') # Initializations and preliminaries mpiComm = MPI.CO...
[ 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 198, 6738, 44606, 22282, 13, 5605, 13396, 26791, 1330, 5923, 7902, 40, 4834, 388, 198, 11748, 25064, 198, 198, 2, 2896, 500, 4904, 40, 3275, ...
2.020889
2,250
from __future__ import print_function from collections import namedtuple from distutils.util import get_platform import subprocess import sys class CommandFailed(Exception): """ The command failed to run for any reason """ pass class CommandError(CommandFailed): """ The command returned...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 1233, 26791, 13, 22602, 1330, 651, 62, 24254, 198, 11748, 850, 14681, 198, 11748, 25064, 628, 628, 628, 198, 198, 4871, 9455, 37, 6255, ...
2.856826
901
# Basketball Scores # apple vs banana # input - apples apple_three = int(input()) apple_two = int(input()) apple_free = int(input()) # input - bananas banana_three = int(input()) banana_two = int(input()) banana_free = int(input()) apple_total = (apple_three * 3) + (apple_two * 2) + apple_free banana_total = (banana...
[ 2, 25911, 44654, 198, 2, 17180, 3691, 25996, 198, 198, 2, 5128, 532, 22514, 198, 18040, 62, 15542, 796, 493, 7, 15414, 28955, 198, 18040, 62, 11545, 796, 493, 7, 15414, 28955, 198, 18040, 62, 5787, 796, 493, 7, 15414, 28955, 198, 19...
2.702247
178
# /******************************************************************************* # Copyright Intel Corporation. # This software and the related documents are Intel copyrighted materials, and your use of them # is governed by the express license under which they were provided to you (License). # Unless the License pro...
[ 2, 1220, 17174, 17174, 46068, 8162, 198, 2, 15069, 8180, 10501, 13, 198, 2, 770, 3788, 290, 262, 3519, 4963, 389, 8180, 33696, 5696, 11, 290, 534, 779, 286, 606, 198, 2, 318, 21825, 416, 262, 4911, 5964, 739, 543, 484, 547, 2810, ...
3.525581
430
#!/usr/bin/env python3 import sys import warnings import pandas as pd import statsmodels.api as sm from copy import deepcopy # Used to create sentiment word dictionary warnings.simplefilter(action="ignore", category=FutureWarning) # ************************************************************************** ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 14601, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 15042, 355, 895, 198, 198, 6738, 4866, 1330, 2769, 30073, 220, 1303, 16718, ...
5.962963
108
import os template_dir = os.path.dirname(__file__) ene_ana_old_path = template_dir + "/ene_ana_REEDS_7state.md++.lib" ene_ana_lib_path = template_dir + "/new_ene_ana_REEDS_9state.md++.lib"
[ 11748, 28686, 198, 198, 28243, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 198, 1734, 62, 2271, 62, 727, 62, 6978, 796, 11055, 62, 15908, 1343, 12813, 1734, 62, 2271, 62, 2200, 1961, 50, 62, 22, 52...
2.301205
83
import numpy as np from scipy.special import legendre
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 20887, 1330, 8177, 260, 198 ]
3.375
16
# coding:utf-8 # 版权信息: All rights Reserved, Designed By XHal.cc # 代码作者: Hal # 创建时间: 2021/2/4 22:08 # 文件版本: V1.0.0 # 功能描述: 字典对象 - 基础使用 # 创建方式1:{} 花括号,与javascript Object 一样 # 空字典 dic = {} print(dic) # 键: 值 dic = {'a': 'aa', 'b': 3} print(dic, id(dic), type(dic)) # 创建方式2: 内置函数 dic1 = dict({'a': 'aa', 'b': 3}) print(dic...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 13328, 231, 230, 30266, 225, 46479, 94, 162, 223, 107, 25, 1439, 2489, 33876, 11, 39198, 2750, 1395, 40202, 13, 535, 198, 2, 220, 47987, 163, 254, 223, 43291, 38519, 25, 11023, 198, 2, 10263, 2...
1.229858
422
# -*- coding: utf-8 -*- """ANN MNIST .ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1iKLukhHa0mOTG2BBrKnlJawBK1ZYaEC0 """ import keras from keras.datasets import mnist (x_train,y_train),(x_test,y_test)=mnist.load_data() x_train=x_train.reshap...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 22846, 29060, 8808, 764, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, ...
2.350109
457
import distutils.dir_util as copy_tree import glob import os import shutil import tempfile import runner1c import runner1c.common as common import runner1c.exit_code as exit_code
[ 11748, 1233, 26791, 13, 15908, 62, 22602, 355, 4866, 62, 21048, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 11748, 17490, 16, 66, 198, 11748, 17490, 16, 66, 13, 11321, 355, 2219, 198, ...
3.327273
55
"""API configuration.""" import os from typing import Any, Dict, Set from elasticsearch import AsyncElasticsearch, Elasticsearch # type: ignore from stac_fastapi.types.config import ApiSettings _forbidden_fields: Set[str] = {"type"} class ElasticsearchSettings(ApiSettings): """API settings.""" # Fields ...
[ 37811, 17614, 8398, 526, 15931, 198, 11748, 28686, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 5345, 198, 198, 6738, 27468, 12947, 1330, 1081, 13361, 9527, 3477, 12947, 11, 48567, 12947, 220, 1303, 2099, 25, 8856, 198, 6738, 336, 33...
3.113793
290
from efr32fg13p.halconfig import halconfig_types as types from efr32fg13p.halconfig import halconfig_dependency as dep
[ 6738, 304, 8310, 2624, 40616, 1485, 79, 13, 14201, 11250, 1330, 10284, 11250, 62, 19199, 355, 3858, 198, 6738, 304, 8310, 2624, 40616, 1485, 79, 13, 14201, 11250, 1330, 10284, 11250, 62, 45841, 1387, 355, 1207 ]
3.277778
36
import logging import re import scipy.sparse as sp import numpy as np import tensorflow as tf from sklearn.base import ClassifierMixin, BaseEstimator from sklearn.utils import check_X_y, check_array, check_random_state from sklearn.utils.multiclass import type_of_target from sklearn.exceptions import NotFittedError f...
[ 11748, 18931, 198, 11748, 302, 198, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 1341, 35720, 13, 8692, 1330, 5016, 7483, 35608, 259, ...
2.081917
7,532
from monitorrent.plugins.trackers import Topic
[ 6738, 5671, 1156, 13, 37390, 13, 11659, 364, 1330, 47373, 628 ]
4.363636
11
""" Function for loading go dependencies for the go jsonformat library""" load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") def fhir_go_dependencies(): """ Loads dependencies of the Go FHIR library"...
[ 37811, 15553, 329, 11046, 467, 20086, 329, 262, 467, 33918, 18982, 5888, 37811, 198, 198, 2220, 7203, 31, 952, 62, 65, 41319, 62, 38785, 62, 2188, 1003, 2188, 25, 10378, 82, 13, 65, 48274, 1600, 366, 2188, 62, 30238, 62, 25981, 38861,...
2.032417
1,018
[![AnalyticsDojo](https://github.com/rpi-techfundamentals/spring2019-materials/blob/master/fig/final-logo.png?raw=1)](http://introml.analyticsdojo.com) <center><h1>Introduction to Python - Null Values</h1></center> <center><h3><a href = 'http://introml.analyticsdojo.com'>introml.analyticsdojo.com</a></h3></center> ...
[ 58, 0, 58, 37702, 14094, 5211, 7639, 16151, 5450, 1378, 12567, 13, 785, 14, 81, 14415, 12, 13670, 10990, 3263, 874, 14, 16469, 23344, 12, 33665, 82, 14, 2436, 672, 14, 9866, 14, 5647, 14, 20311, 12, 6404, 78, 13, 11134, 30, 1831, ...
3.256864
1,129
from django.template import loader from django.conf import settings import os from goods.models import SKU from contents.utils import get_categories from goods.utils import get_goods_specs, get_breadcrumb from celery_tasks.main import celery_app @celery_app.task(name='generate_static_sku_detail_html') def generate_s...
[ 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 28686, 198, 198, 6738, 7017, 13, 27530, 1330, 14277, 52, 198, 6738, 10154, 13, 26791, 1330, 651, 62, 66, 26129, 198, 6738, 7017, 13,...
1.766871
652
import copy import json import threading from collections import defaultdict from typing import List, Dict, Union, Optional, Callable, TypeVar, Iterable, Tuple def find_key(obj: Union[Dict, List], key: str): """ 根据字符串查找对象值,字符串形式如a.b.0, 查找对象,如:: {'a':{'b':['val']}} val值将被查出 :param obj:...
[ 11748, 4866, 198, 11748, 33918, 198, 11748, 4704, 278, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4479, 11, 32233, 11, 4889, 540, 11, 5994, 19852, 11, 40806, 540, 11, 309, 29291, 628, 198, 198...
1.296744
3,471
from astropy import units as u from astropy.modeling import models, fitting from astropy.stats import sigma_clip from ccdproc import CCDData from scipy import signal import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys sys.path.append('/user/simon/development/soar/goo...
[ 6738, 6468, 28338, 1330, 4991, 355, 334, 198, 198, 6738, 6468, 28338, 13, 4666, 10809, 1330, 4981, 11, 15830, 198, 6738, 6468, 28338, 13, 34242, 1330, 264, 13495, 62, 15036, 198, 6738, 269, 10210, 36942, 1330, 327, 8610, 6601, 198, 6738...
2.693396
212
#!/usr/bin/env python3 import torch from .marginal_log_likelihood import MarginalLogLikelihood from ..likelihoods import _GaussianLikelihoodBase from ..distributions import MultivariateNormal
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28034, 198, 6738, 764, 30887, 1292, 62, 6404, 62, 2339, 11935, 1330, 11899, 1292, 11187, 7594, 11935, 198, 6738, 11485, 2339, 11935, 82, 1330, 4808, 35389, 31562, 7594, 1...
3.660377
53
import logging logger = logging.getLogger('blossom')
[ 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 2436, 25548, 11537 ]
3.466667
15
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #----------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 10097, 22369, 438, 2, 198, 2, 770, 2393, 318, 636, 286, 9485, 66, 5276, 543, 318, 2716, 739, 17168, 13789, 13, 4091, 262, 38559, 24290, 2393, 393, 1303, 198, 2, 4...
2.908807
2,884
# -*- coding: utf-8 -*- # @Project: fluentpython # @Author: xuzhiyi # @File name: __init__.py # @Create time: 2021/8/1 20:20
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 16775, 25, 43472, 29412, 198, 2, 2488, 13838, 25, 2124, 10277, 5303, 48111, 198, 2, 2488, 8979, 1438, 25, 11593, 15003, 834, 13, 9078, 198, 2, 2488, 16447, 64...
2.296296
54
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 25, 357, 66, 8, 2864, 11, 28038, 856, 4935, 198, 2, 15069, 25, 357, 66, 8, 2864, 11, 2275, 71, 2926, 68, 316, ...
2.433153
7,390
"""Functions and classes to deduplicate and simplify test code.""" class ColumnAssertionMixin: """Mixin class for making columns assertions in tests for Kedro nodes."""
[ 37811, 24629, 2733, 290, 6097, 284, 4648, 84, 489, 5344, 290, 30276, 1332, 2438, 526, 15931, 628, 198, 4871, 29201, 8021, 861, 295, 35608, 259, 25, 198, 220, 220, 220, 37227, 35608, 259, 1398, 329, 1642, 15180, 29965, 287, 5254, 329, ...
3.645833
48
import io import mimetypes from pathlib import Path from typing import Optional, Tuple, Union from django.core.files.uploadedfile import SimpleUploadedFile from django.utils.timezone import now from PIL import Image, ImageOps from .models import TFile # TODO: Convert this into a class to handle image formatting
[ 11748, 33245, 198, 11748, 17007, 2963, 12272, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 11, 4479, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 25850, 276, 7753, 1330, 17427, 41592, 276, ...
3.709302
86
#!/usr/bin/env python3 # https://knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script # https://github.com/EnergieID/KNMI-py # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html # https://rethinkdb.com/ import knmi from latlon import Latitude, Longitude # Pandas Data...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3740, 1378, 15418, 11632, 13, 21283, 14, 74, 10679, 12, 268, 12, 19608, 12643, 6582, 14, 620, 353, 2164, 623, 14, 7890, 12, 2522, 282, 268, 12, 10438, 5013, 12, 6429, 1...
2.505556
360
from . import ServiceMixin, ForecastMixin, EpisodeMixin from datetime import timedelta from dateutil.parser import parse
[ 6738, 764, 1330, 4809, 35608, 259, 11, 4558, 2701, 35608, 259, 11, 7922, 35608, 259, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136 ]
4
30
# -*- coding: utf-8 -*- """ # youbot Illustrates the V-REP MATLAB bindings, more specifically the way to take a 3D point cloud. # (C) Copyright Renaud Detry 2013, Thibaut Cuvelier 2017. # Distributed under the GNU General Public License. # (See http://www.gnu.org/copyleft/gpl.html) """ # VREP import sim as vrep # Use...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 2, 345, 13645, 23279, 9700, 262, 569, 12, 35316, 36775, 48780, 34111, 11, 517, 5734, 262, 835, 284, 1011, 257, 513, 35, 966, 6279, 13, 198, 198, 2, 357, ...
2.887782
1,907
# TODO: # - cached scenes from __future__ import division from libtbx.math_utils import roundoff from cctbx.miller import display2 as display from cctbx.array_family import flex from scitbx import graphics_utils from cctbx import miller from libtbx.utils import Sorry from websocket_server import WebsocketServer impo...
[ 198, 2, 16926, 46, 25, 198, 2, 220, 532, 39986, 8188, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 9195, 83, 65, 87, 13, 11018, 62, 26791, 1330, 2835, 2364, 198, 6738, 269, 310, 65, 87, 13, 76, 4665, 1330, 3359, 17, ...
2.341034
909
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
import json from pprint import pprint import re import termplotlib as tpl image_data = {} # need permissions ihash = '' img_id = [] with open("/var/lib/docker/image/btrfs/repositories.json", "r") as f3: data = f3.read() js = json.loads(data) for reponame in js['Repositories']: for image in js['Rep...
[ 11748, 33918, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 302, 198, 11748, 3381, 29487, 8019, 355, 256, 489, 198, 198, 9060, 62, 7890, 796, 23884, 198, 2, 761, 21627, 198, 198, 4449, 1077, 796, 10148, 198, 9600, 62, 312, 796, ...
2.145614
570
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: contact@digitick.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 7367, 270, 624, 30617, 7824, 628, 220, 220, 220, 383, 7367, 270, 624, 30617, 7824, 318, 257, 900, 286, 5050, 3501, 1895, 284, 18388, 11, 2836, 290, 6383, 4542, 1...
2.123623
2,451
import time import progressbar import os files = os.listdir('D:\Python') for i in progressbar.progressbar(files): do_something(i)
[ 11748, 640, 198, 11748, 4371, 5657, 198, 11748, 28686, 198, 198, 16624, 796, 28686, 13, 4868, 15908, 10786, 35, 7479, 37906, 11537, 198, 198, 1640, 1312, 287, 4371, 5657, 13, 33723, 5657, 7, 16624, 2599, 198, 197, 4598, 62, 18927, 7, ...
2.854167
48
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/ai/vision/v1/text_detection.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 331, 392, 1069, 14, 17721, 14, 1872, 14, 10178, 14, 85, 16, 14, 5239, ...
2.354816
5,679
from lib.ANSIEscape import ANSIEscape #TODO: copy paste
[ 6738, 9195, 13, 15037, 10008, 6794, 1330, 3537, 50, 10008, 6794, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 220, 220, 220, 1303, 51, 3727, 46, 25, 4866, 17008 ]
2.181818
33
""" This module assumes that OpenCanary has been installed and is running. In particular it assumes that OpenCanary is logging to /var/tmp/opencanary.log and that the services it's testing are enabled. It would be much better to setup tests to start the services needed and provide the configuration files so that test...
[ 37811, 198, 1212, 8265, 18533, 326, 4946, 6090, 560, 468, 587, 6589, 290, 318, 2491, 13, 198, 198, 818, 1948, 340, 18533, 326, 4946, 6090, 560, 318, 18931, 284, 1220, 7785, 14, 22065, 14, 9654, 5171, 560, 13, 6404, 198, 392, 326, 26...
2.376235
4,048
""" Abstract base classes for different kinds of feature. """ import numpy as np class Feature: """ Feature function base class. Implements various methods common to feature functions, which are generally the same across the various features in this library. """ @property class Functiona...
[ 37811, 198, 23839, 2779, 6097, 329, 1180, 6982, 286, 3895, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 220, 628, 198, 4871, 27018, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 27018, 2163, 2779, 1398, 13, 628, 220, 220, ...
3.037705
610
import numpy as np import pandas as pd import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import matplotlib.animation as animation #Reading the input instructions and names of the objects. obj_names=[] f = open("../run/input.dat","r") obj_count=int(f.readline()) for obj in range(obj_count): o...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 13, 897, 274, 18, 67, 355, 279, 18...
2.458128
812
if __name__ == '__main__': test()
[ 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 3419, 198, 220, 220, 220, 220, 198 ]
1.916667
24
from io import StringIO from django.core import management from django.core.management.base import BaseCommand from django.db import connection def reset_db(): """ Reset database to a blank state by removing all the tables and recreating them. """ with connection.cursor() as cursor: cursor.ex...
[ 6738, 33245, 1330, 10903, 9399, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 4542, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 4637, 628, 198, 4299, 13259, 62, 994...
3.085502
269
""" Rational number type based on Python integers. The PythonRational class from here has been moved to sympy.external.pythonmpq This module is just left here for backwards compatibility. """ from sympy.core.numbers import Rational from sympy.core.sympify import _sympy_converter from sympy.utilities import public f...
[ 37811, 198, 49, 864, 1271, 2099, 1912, 319, 11361, 37014, 13, 198, 198, 464, 11361, 49, 864, 1398, 422, 994, 468, 587, 3888, 284, 198, 1837, 3149, 88, 13, 22615, 13, 29412, 3149, 80, 198, 198, 1212, 8265, 318, 655, 1364, 994, 329, ...
3.397059
136