content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from datetime import date p = 0 for c in range(1, 8): i = int(input(f'Em qual ano a {c}ª pessoa nasceu? ')) if date.today().year - i >= 18: p += 1 print(f'{p} pessoas atingiram a maioridade!')
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 79, 796, 657, 198, 1640, 269, 287, 2837, 7, 16, 11, 807, 2599, 198, 220, 220, 220, 1312, 796, 493, 7, 15414, 7, 69, 6, 10161, 4140, 281, 78, 257, 1391, 66, 92, 126, 103, 279, 408, 12162, ...
2.079208
101
""" Trivial example of a minimal ggame App with Sprite. """ from ggame import App, ImageAsset, Sprite # Create a displayed object at 100,100 using an image asset Sprite(ImageAsset("bunny.png"), (100, 100)) # Create the app, with a default stage APP = App() # Run the app APP.run()
[ 37811, 198, 14824, 85, 498, 1672, 286, 257, 10926, 308, 6057, 2034, 351, 33132, 13, 198, 37811, 198, 6738, 308, 6057, 1330, 2034, 11, 7412, 45869, 11, 33132, 198, 198, 2, 13610, 257, 9066, 2134, 379, 1802, 11, 3064, 1262, 281, 2939, ...
3.27907
86
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
[ 2, 220, 220, 220, 220, 220, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 220, 220, 220, 220, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 220, 220, 220, 2...
2.347045
2,115
from setuptools import setup setup( name="geofeather", version="0.3.0-cr", packages=["geofeather"], url="https://github.com/brendan-ward/geofeather", license="MIT", author="Brendan C. Ward", author_email="bcward@astutespruce.com", description="Fast file-based format for geometries with...
[ 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 469, 1659, 68, 1032, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 18, 13, 15, 12, 6098, 1600, 198, 220, 220, 220, 10392, 28, 14692, 469, 165...
2.585153
229
# -*- encoding: utf-8 -*- """ Copyright (c) Minu Kim - minu.kim@kaist.ac.kr Templates from AppSeed.us """ import os import logging from datetime import date import json from flask import render_template, flash, redirect, url_for, request, jsonify from flask_login import login_user, logout_user, current_user, login_req...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15269, 357, 66, 8, 1855, 84, 6502, 532, 949, 84, 13, 74, 320, 31, 4914, 396, 13, 330, 13, 38584, 198, 12966, 17041, 422, 2034, 50, 2308, 13, 385, 198, ...
2.794278
734
import tensorflow as tf import numpy as np from .a2c import ContinuousA2CNetwork, DiscreteA2CNetwork from .a2c import ParticleFilteringA2CNetwork __all__ = [ "ContinuousClipPPONetwork", "DiscreteClipPPONetwork", "ParticleFilteringClipPPONetwork" ] ContinuousClipPPONetwork = clip_ppo_network_wrapper(Con...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 64, 17, 66, 1330, 45012, 32, 17, 34, 26245, 11, 8444, 8374, 32, 17, 34, 26245, 198, 6738, 764, 64, 17, 66, 1330, 2142, 1548, 11928, 20212...
2.730769
182
""" 1. Clarification 2. Possible solutions - Brute force - Prefix sum 3. Coding 4. Tests """ # # T=O(n^2), S=O(1) # class Solution: # def pivotIndex(self, nums: List[int]) -> int: # if not nums: return -1 # for i in range(len(nums)): # if sum(nums[:i]) == sum(nums[i+1:]): # ...
[ 37811, 198, 16, 13, 15420, 2649, 198, 17, 13, 33671, 8136, 198, 220, 220, 220, 220, 532, 1709, 1133, 2700, 198, 220, 220, 220, 220, 532, 3771, 13049, 2160, 198, 18, 13, 327, 7656, 198, 19, 13, 30307, 198, 37811, 628, 198, 2, 1303,...
1.850242
207
import torch import sys import os from torch import nn, optim from Losses.LossInterface import LossInterface import resmem from resmem import ResMem, transformer from torchvision import transforms recenter = transforms.Compose(( transforms.Resize((256, 256)), transforms.CenterCrop(227), ) ) from util impo...
[ 11748, 28034, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 28034, 1330, 299, 77, 11, 6436, 198, 6738, 22014, 274, 13, 43, 793, 39317, 1330, 22014, 39317, 198, 11748, 581, 11883, 198, 6738, 581, 11883, 1330, 1874, 13579, 11, 47385, 1...
3.107914
139
import datetime import freezegun import pytest from astral import Observer, sun, today @pytest.mark.parametrize( "day,jd", [ (datetime.date(2012, 1, 1), 2455927.5), (datetime.date(2013, 1, 1), 2456293.5), (datetime.date(2013, 6, 1), 2456444.5), (datetime.date(1867, 2, 1), 2402...
[ 11748, 4818, 8079, 198, 198, 11748, 1479, 89, 1533, 403, 198, 11748, 12972, 9288, 198, 6738, 6468, 1373, 1330, 27058, 11, 4252, 11, 1909, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 366, 820...
1.70674
1,988
#!/usr/bin/python # # Copyright (c) 2009-2013, Mendix bv # All Rights Reserved. # # http://www.mendix.com/ # import cmd import subprocess import atexit import os import pwd import sys import getpass import signal import string import random import pprint import yaml import datetime from m2ee import pgutil, M2EE, M2EE...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 357, 66, 8, 3717, 12, 6390, 11, 337, 19573, 275, 85, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 2638, 1378, 2503, 13, 76, 19573, 13, 785, 14, 198, 2, 198, 198, ...
2.303935
737
from unittest import TestCase, mock from basketball_reference_web_scraper.data import OutputWriteOption from basketball_reference_web_scraper.writers import JSONWriter
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 15290, 198, 198, 6738, 9669, 62, 35790, 62, 12384, 62, 1416, 38545, 13, 7890, 1330, 25235, 16594, 19722, 198, 6738, 9669, 62, 35790, 62, 12384, 62, 1416, 38545, 13, 34422, 1330, 19449, 34379, ...
4.047619
42
import os import json from tkinter import * from tkinter import filedialog, messagebox from fn_file import * from tooltip import * setting = get_setting() root = Tk() # root.geometry("600x400") root.title("fileNameChanger v1.0.0") root.resizable(False, False) # title_label = Label(root, text='[file name changer]') # ...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 11, 3275, 3524, 198, 6738, 24714, 62, 7753, 1330, 1635, 198, 6738, 49472, 1330, 1635, 198, 198, 33990, 796, 651, 62...
2.466981
848
import argparse import os from chainerui import _version from chainerui import create_app from chainerui import create_db from chainerui import DB_FILE_PATH from chainerui import DB_SESSION from chainerui.models.project import Project from chainerui import upgrade_db from chainerui.utils import db_revision def serv...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 6333, 263, 9019, 1330, 4808, 9641, 198, 6738, 6333, 263, 9019, 1330, 2251, 62, 1324, 198, 6738, 6333, 263, 9019, 1330, 2251, 62, 9945, 198, 6738, 6333, 263, 9019, 1330, 20137, 62, ...
2.511485
653
# -*- encoding: utf-8 -*- from elasticsearch import Elasticsearch, helpers from elasticsearch_dsl import Search from datetime import date, timedelta import bbcluster import csv if __name__ == "__main__": prefix = "albopop-v3-" days = 15 strf = "%Y.%m.%d" last_day = date.today() first_day = last_da...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 27468, 12947, 1330, 48567, 12947, 11, 49385, 198, 6738, 27468, 12947, 62, 67, 6649, 1330, 11140, 198, 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 11748...
2.414634
205
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.733333
15
# date:2018/9/6 15:26 # -*- coding: utf-8 -*- #author;cwd """ function: """ #!/usr/bin/env python #coding:utf-8 ''' Created on 2016年6月9日 @author: lei.wang ''' import os pathB = "F:\\ruijie\PartThree\StarBucksDoubleShot\StarBucksDoubleShot" pathA = "F:\\ruijie\PartThree\checked\StarBucksDoubleShot" if __name__ == '_...
[ 2, 3128, 25, 7908, 14, 24, 14, 21, 1315, 25, 2075, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9800, 26, 66, 16993, 198, 37811, 198, 8818, 25, 198, 37811, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 2...
2.207792
154
# -*- coding: utf-8 -*- ''' File name: code\balanced_sculptures\sol_275.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #275 :: Balanced Sculptures # # For more information see: # https://projecteuler.net/problem=275 # Problem Statement ...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 9220, 1438, 25, 2438, 59, 27753, 62, 1416, 13327, 942, 59, 34453, 62, 23195, 13, 9078, 198, 220, 220, 220, 6434, 25, 569, 1698, 291...
3.402367
338
#!/usr/bin/python # Navid Kayhani (navidk381) | May 20,2020 '''This script listens to /gazebo/default/pose/info on Gazebo topics and publishes PoseStamped messages on a ROS topic (/gazebo/bebop/pose) and TransformStamped on /gazebo/vicon/{model}/{model}''' import trollius as asyncio from trollius import From import ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 399, 8490, 17356, 29839, 357, 77, 8490, 74, 36626, 8, 930, 1737, 1160, 11, 42334, 198, 7061, 6, 1212, 4226, 35019, 284, 1220, 70, 1031, 1765, 78, 14, 12286, 14, 3455, 14, 10951, 319, 2...
2.587302
630
from django.conf.urls import include, patterns from leonardo.module.auth import views from allauth.account.views import LoginView views.LoginView = LoginView #views.LoginView.template_name = 'leonardo/common/modal.html' urlpatterns = patterns('', (r'^accounts/', include('allauth.urls')), ...
[ 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 7572, 198, 198, 6738, 443, 261, 13109, 13, 21412, 13, 18439, 1330, 5009, 198, 198, 6738, 477, 18439, 13, 23317, 13, 33571, 1330, 23093, 7680, 198, 198, 33571, 13, 47790...
2.408451
142
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: lib.coginvasion.shop.DistributedBattleShop from direct.directnotify.DirectNotifyGlobal import directNotify from direct.gui.DirectGui imp...
[ 2, 34318, 2349, 21, 2196, 513, 13, 17, 13, 19, 198, 2, 11361, 18022, 8189, 362, 13, 22, 357, 21, 1828, 1157, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 362, 13, 22, 13, 1314, 357, 85, 17, 13, 22, 13, 1314, 25, 6888, 2998, ...
2.796537
231
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from abc import ABC, abstractmethod from typing import Optional import numpy as np from fedot.core.data.data import OutputData from fedot.core.log import Log, default_log from fedot.core.repository.dataset_types import DataTypesEnum class DataOperationImplementation(ABC): """ Interface for data operations realis...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11672, 313, 13, 7295, 13, 7890, 13, 7890, 1330, 25235, 6601, 198, 6738, 11672, 313, 13, 7295, 13, 6404, 13...
2.659972
2,888
import pexpect from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 from...
[ 11748, 613, 87, 806, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 3862, 448, 16922, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103,...
3.02583
271
import time anoAtual = int(time.strftime('%Y', time.localtime())) anoNasc = int(input('Digite o ano que você nasceu: ')) idade = anoAtual - anoNasc if(idade == 18): print(f'Você tem {idade} anos. Chegou a hora de se alistar') elif(idade > 18): print(f'Passou {idade - 18} anos da hora de se alistar') elif(idad...
[ 11748, 640, 198, 5733, 2953, 723, 796, 493, 7, 2435, 13, 2536, 31387, 10786, 4, 56, 3256, 640, 13, 12001, 2435, 3419, 4008, 198, 5733, 45, 3372, 796, 493, 7, 15414, 10786, 19511, 578, 267, 281, 78, 8358, 12776, 25792, 25221, 344, 84...
2.267045
176
from __future__ import annotations import abc import functools import typing as ty class EasyDecorator(abc.ABC): """Легкий способ создать класс-декоратор""" def easy_func_decorator(func: ty.Callable): """ Args: func: ty.Callable: func: ty.Callable: Returns: """ @functools.wr...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 450, 66, 198, 11748, 1257, 310, 10141, 198, 11748, 19720, 355, 1259, 628, 198, 4871, 16789, 10707, 273, 1352, 7, 39305, 13, 24694, 2599, 198, 220, 220, 220, 37227, 140, 249, 16843, ...
1.942289
1,005
""" TLE dp[i][n][p] := considering profit[:i], what is the number of ways produce profit p with n people. """
[ 37811, 198, 51, 2538, 198, 26059, 58, 72, 7131, 77, 7131, 79, 60, 19039, 6402, 7630, 58, 25, 72, 4357, 644, 318, 262, 1271, 286, 2842, 4439, 7630, 279, 351, 299, 661, 13, 198, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.681818
44
# -*- coding: utf-8 -*- """MATRIX ROUTINES. This module contains methods for matrix operations. :Author: Samuel Farrens <samuel.farrens@cea.fr> """ from itertools import product import numpy as np from modopt.base.backend import get_array_module, get_backend def gram_schmidt(matrix, return_opt='orthonormal'): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 41636, 7112, 55, 371, 12425, 1268, 1546, 13, 198, 198, 1212, 8265, 4909, 5050, 329, 17593, 4560, 13, 198, 198, 25, 13838, 25, 17100, 6755, 918, 82, 1279, 3...
2.227094
3,809
# Run scripts from the root, as module e.g. # python -m examples.test_imports import sys for p in sys.path: print(p) try: import pipeline.common.file_utils as fu import pipeline.modeling.data_utils as dat import pipeline.annotation.annotate_utterances as au print("success") except Module...
[ 2, 5660, 14750, 422, 262, 6808, 11, 355, 8265, 304, 13, 70, 13, 198, 220, 220, 220, 1303, 21015, 532, 76, 6096, 13, 9288, 62, 320, 3742, 198, 220, 220, 220, 220, 198, 11748, 25064, 198, 198, 1640, 279, 287, 25064, 13, 6978, 25, ...
2.757813
128
import sys import string import logging import logging.config import logging.handlers import collections from punnsilm.core import Output if sys.platform.startswith('linux'): SYSLOG_SOCKET = '/dev/log' elif sys.platform.startswith('freebsd'): SYSLOG_SOCKET = "/var/run/log" class ExtradataWrapper: """st...
[ 11748, 25064, 198, 11748, 4731, 198, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 18931, 13, 4993, 8116, 198, 198, 11748, 17268, 198, 198, 6738, 4000, 5907, 346, 76, 13, 7295, 1330, 25235, 198, 198, 361, 25064, 13, 24254...
2.867435
347
#!/usr/bin/env python """ This script plots the measured and predicted mass loss rates for the PMMA case: exp. data, posterior mean, posterior low, and posterior high. """ from __future__ import division import matplotlib matplotlib.use("Agg") import numpy as np from pylab import * import sqlite3 # Initialize conn...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1212, 4226, 21528, 262, 8630, 290, 11001, 2347, 2994, 3965, 329, 198, 1169, 3122, 5673, 1339, 25, 1033, 13, 1366, 11, 34319, 1612, 11, 34319, 1877, 11, 290, 34319, 102...
2.255814
1,032
from random import choice import utils
[ 6738, 4738, 1330, 3572, 198, 11748, 3384, 4487, 628, 198 ]
4.1
10
"""add_room Revision ID: 25b24442f732 Revises: Create Date: 2022-04-17 18:11:57.195662 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "25b24442f732" down_revision = None branch_labels = None depends_on = None def upgrade(): """Add the room class and link...
[ 37811, 2860, 62, 3823, 198, 198, 18009, 1166, 4522, 25, 1679, 65, 1731, 39506, 69, 22, 2624, 198, 18009, 2696, 25, 198, 16447, 7536, 25, 33160, 12, 3023, 12, 1558, 1248, 25, 1157, 25, 3553, 13, 22186, 39380, 198, 198, 37811, 198, 67...
2.528947
380
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 220, 220, 220, 220, 220, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 220, 220, 220, 220, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536...
3.198276
464
import sys from typing import Dict, List, Any, Optional, Tuple from boa3.analyser.analyser import Analyser from boa3.constants import ONE_BYTE_MAX_VALUE, TWO_BYTES_MAX_VALUE from boa3.model.method import Method from boa3.model.operation.operation import IOperation from boa3.model.symbol import ISymbol from boa3.model....
[ 11748, 25064, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 4377, 11, 32233, 11, 309, 29291, 198, 198, 6738, 1489, 64, 18, 13, 272, 26266, 263, 13, 272, 26266, 263, 1330, 1052, 26266, 263, 198, 6738, 1489, 64, 18, 13, 9979, 1187, ...
2.262579
6,002
# Generated by Django 2.0.4 on 2018-05-05 21:44 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 19, 319, 2864, 12, 2713, 12, 2713, 2310, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from typing import Any, Callable, Dict, Iterable, Tuple, Union import numpy as np from sklearn.model_selection import ParameterGrid from tqdm import tqdm from podium.datasets import Dataset from podium.experimental.models import Experiment from podium.experimental.validation import k_fold_validation def grid_search...
[ 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 40806, 540, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 25139, 2357, 41339, 198, 6738, 256, 80, 36020...
2.73522
1,590
""" Copyright © 2019 Uncharted Software Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
[ 37811, 198, 220, 220, 15069, 10673, 13130, 48272, 10442, 3457, 13, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351...
3.582329
249
from clean.request.filters.fields import DateFilter from clean.request.inout.actions import RetrieveRequest, DeleteRequest, BaseRequest, ListRequest
[ 6738, 3424, 13, 25927, 13, 10379, 1010, 13, 25747, 1330, 7536, 22417, 198, 6738, 3424, 13, 25927, 13, 259, 448, 13, 4658, 1330, 4990, 30227, 18453, 11, 23520, 18453, 11, 7308, 18453, 11, 7343, 18453, 628, 628, 628, 628, 198 ]
3.925
40
import unittest import logging from system.solver_impl import NQueensProblemSolverWrapper if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 18931, 198, 6738, 1080, 13, 82, 14375, 62, 23928, 1330, 399, 15681, 641, 40781, 50, 14375, 36918, 2848, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555,...
2.916667
48
#%% import numpy as np # make function that creates an array of arbitrary dimensionality # arguments: dimension (d) # shape: (n, n+1, n+2, ...), where n is max(3, d) # len(shape) == d # must start at minimum of 3 # e.g., if d is 3, then it'll be # shape = (3, 4, 5) # fill with # final result is fin. # fin.ravel() == ...
[ 2, 16626, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 787, 2163, 326, 8075, 281, 7177, 286, 14977, 15793, 1483, 198, 2, 7159, 25, 15793, 357, 67, 8, 198, 2, 5485, 25, 357, 77, 11, 299, 10, 16, 11, 299, 10, 17, 11, 2644, 8...
1.906977
645
"""QRCoder - QR Code Generator for Fusion 360""" __version__ = '0.1.0' __author__ = 'Patrick Rainsberry <patrick.rainsberry@autodesk.com>' __all__ = []
[ 37811, 48, 7397, 12342, 532, 42137, 220, 6127, 35986, 329, 21278, 11470, 37811, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198, 834, 9800, 834, 796, 705, 32718, 371, 1299, 8396, 1279, 29615, 13, 81, 1299, 8396, 31, ...
2.732143
56
import os import typing import cfg_exporter.custom as custom from cfg_exporter.const import DataType from cfg_exporter.const import TEMPLATE_EXTENSION from cfg_exporter.exports.base.export import BaseExport from cfg_exporter.lang_template import lang from cfg_exporter.tables.base.type import DefaultValue EXTENSION = ...
[ 11748, 28686, 198, 11748, 19720, 198, 198, 11748, 30218, 70, 62, 1069, 26634, 13, 23144, 355, 2183, 198, 6738, 30218, 70, 62, 1069, 26634, 13, 9979, 1330, 6060, 6030, 198, 6738, 30218, 70, 62, 1069, 26634, 13, 9979, 1330, 309, 3620, 6...
2.147541
1,403
from .eth import Account, Contract, web3 from .pow import Powser __all__ = ["Account", "Contract", "web3", "Powser"]
[ 6738, 764, 2788, 1330, 10781, 11, 17453, 11, 3992, 18, 198, 6738, 764, 79, 322, 1330, 350, 1666, 263, 198, 198, 834, 439, 834, 796, 14631, 30116, 1600, 366, 45845, 1600, 366, 12384, 18, 1600, 366, 47, 1666, 263, 8973, 198 ]
2.878049
41
# encoding=utf8 from __future__ import absolute_import,unicode_literals,print_function import argparse from argparse import ArgumentDefaultsHelpFormatter import errno import logging import jenkins import os import sys import textwrap from jenkins_job_wrecker.modules.handlers import Handlers from jenkins_job_wrecker.reg...
[ 2, 21004, 28, 40477, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 46903, 1098, 62, 17201, 874, 11, 4798, 62, 8818, 198, 11748, 1822, 29572, 198, 6738, 1822, 29572, 1330, 45751, 7469, 13185, 22087, 8479, 1436, 198, 11748,...
3
305
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from dev0s.classes.defaults.files import * from dev0s.classes.defaults.exceptions import * from dev0s.classes import utils from dev0s.classes.response import response as _response_ import datetime # argument functions. # system functions. # a default cli ob...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17944, 13, 198, 6738, 1614, 15, 82, 13, 37724, 13, 12286, 82, 13, 16624, 1330, 1635, 198, 6738, 1614, 1...
2.920354
113
"""Support for links to external web pages.""" import logging import voluptuous as vol from homeassistant.const import CONF_ICON, CONF_NAME, CONF_URL import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.util import slugify _LOGGER = logging.getLogger...
[ 37811, 15514, 329, 6117, 284, 7097, 3992, 5468, 526, 15931, 198, 11748, 18931, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 7102, 37, 62, 2149, 1340, 11, 7102, 37, 62, 20608, 11, 710...
2.352809
890
from typing import Union import numpy as np import xarray as xr def preserve_float_range( array: Union[xr.DataArray, np.ndarray], rescale: bool=False) -> Union[xr.DataArray, np.ndarray]: """ Clips values below zero to zero. If values above one are detected, clips them to 1 unless `rescale`...
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 198, 4299, 12201, 62, 22468, 62, 9521, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7177, 25, 4479, 58, 87, 81, 13, 6601, ...
2.464912
456
################################################################################ # Author: Fanyang Cheng # Date: 03/20/2021 # Description: This program rolls one pair of dies for specific times and calculate # percentage of each points relative to the total number of rolling. ###########################################...
[ 29113, 29113, 14468, 198, 2, 6434, 25, 376, 1092, 648, 27692, 198, 2, 7536, 25, 7643, 14, 1238, 14, 1238, 2481, 198, 2, 12489, 25, 770, 1430, 14088, 530, 5166, 286, 10564, 329, 2176, 1661, 290, 15284, 198, 2, 5873, 286, 1123, 2173, ...
4.679245
106
#!/usr/bin/python import logging import os import re import sys import threading import time import traceback from datetime import datetime from functools import wraps from logging import StreamHandler from cloudshell.logging.interprocess_logger import MultiProcessingLog from cloudshell.logging.qs_config_parser import...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1257, 3...
2.500826
4,239
from dataclasses import dataclass from sqlalchemy import Column, String, Integer, Date, ForeignKey from sqlalchemy.orm import relationship from entity.base import Base @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 10903, 11, 34142, 11, 7536, 11, 8708, 9218, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 198, 6738, 9312, 13, 8692, 1330, 7...
3.734694
49
from __future__ import unicode_literals import os,json,sys,csv if __name__ == '__main__' and __package__ is None: from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) import youtube_dl import multiprocessing as mp output = mp.Queue() ydl_opts ={ 'format': '720p_HD...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 28686, 11, 17752, 11, 17597, 11, 40664, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 6, 290, 11593, 26495, 834, 318, 6045, 25, 198, 220, 220, 220, 422,...
2.493392
227
import copy from pathlib import Path import pickle import fire import second.data.kitti_dataset as kitti_ds import second.data.nuscenes_dataset as nu_ds from second.data.all_dataset import create_groundtruth_database, create_groundtruth_database_with_sweep_info import numpy as np from tqdm import trange ...
[ 11748, 4866, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 11748, 2046, 201, 198, 201, 198, 11748, 1218, 13, 7890, 13, 74, 715, 72, 62, 19608, 292, 316, 355, 479, 715, 72, 62, 9310, 201, ...
2.673913
138
import os import json import tempfile import tinydb from tinydb import operations from tinydb.middlewares import CachingMiddleware from e4s_cl import logger, util from e4s_cl.error import ConfigurationError from e4s_cl.cf.storage import AbstractStorage, StorageRecord, StorageError LOGGER = logger.get_logger(__name__) ...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 20218, 7753, 198, 11748, 7009, 9945, 198, 6738, 7009, 9945, 1330, 4560, 198, 6738, 7009, 9945, 13, 27171, 86, 3565, 1330, 327, 8103, 34621, 1574, 198, 6738, 304, 19, 82, 62, 565, 1330, 49706,...
2.198118
8,500
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import docker import requests from dockerfile_parse import DockerfileParser from atomic_reactor.plugin import PluginFailedException from at...
[ 37811, 198, 15269, 357, 66, 8, 2177, 2297, 10983, 11, 3457, 198, 3237, 2489, 10395, 13, 198, 198, 1212, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 1659, 262, 347, 10305, 5964, 13, 4091, 262, 38559, 24290, 2393, 329, 3307, ...
2.874745
982
from http import HTTPStatus from fastapi import APIRouter, HTTPException, Response from fastapi.responses import JSONResponse from wishlist.application.webapi.common.models import Metadata from wishlist.application.webapi.customer.models import ( CreateCustomerRequest, CustomerListResponse, FullCustomer )...
[ 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 14626, 16922, 11, 18261, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 19449, 31077, 198, 198, 6738, 4601, 4868, 13, 31438, 13, 12384, 15042, 13, ...
3.022346
358
#!/usr/bin/env python import argparse from datetime import datetime import itertools import logging logger = logging.getLogger('LR') import os os.environ.update( OMP_NUM_THREADS = '1', OPENBLAS_NUM_THREADS = '1', NUMEXPR_NUM_THREADS = '1', MKL_NUM_THREADS = '1', ) import warnings import numpy as np fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 35972, 11537, ...
2.058798
2,330
#### # # The MIT License (MIT) # # Copyright 2020 Eric Bach <eric.bach@aalto.fi> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
[ 4242, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 12131, 7651, 25332, 1279, 35626, 13, 19496, 31, 64, 282, 1462, 13, 12463, 29, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, ...
3.497561
410
'''Crie um programa que leia nome, ano de nascimento e carteira de trabalho e cadastre-o (com idade) em um dicionário. Se por acaso a CTPS for diferente de ZERO, o dicionário receberá também o ano de contratação e o salário. Calcule e acrescente, além da idade, com quantos anos a pessoa vai se aposentar.''' from da...
[ 7061, 6, 34, 5034, 23781, 1430, 64, 8358, 443, 544, 299, 462, 11, 281, 78, 390, 299, 3372, 3681, 78, 304, 6383, 68, 8704, 390, 491, 44349, 8873, 304, 20603, 459, 260, 12, 78, 357, 785, 4686, 671, 8, 198, 795, 23781, 288, 47430, ...
2.263666
622
"""Chatroom game.""" import logging from dallinger import networks from dallinger.compat import unicode from dallinger.config import get_config from dallinger.experiment import Experiment from dallinger.nodes import Agent try: from .bots import Bot Bot = Bot # Make name "Bot" importable without triggering s...
[ 37811, 30820, 3823, 983, 526, 15931, 198, 198, 11748, 18931, 198, 6738, 288, 439, 3889, 1330, 7686, 198, 6738, 288, 439, 3889, 13, 5589, 265, 1330, 28000, 1098, 198, 6738, 288, 439, 3889, 13, 11250, 1330, 651, 62, 11250, 198, 6738, 28...
2.857143
434
#!/usr/bin/python import email from inbox import Inbox from slacker import Slacker import tempfile import base64 import argparse import boto from boto.s3.key import Key import uuid import PIL from PIL import Image from cStringIO import StringIO # Init json parsing... import json parser = argparse.ArgumentParser(desc...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 3053, 198, 6738, 13734, 1330, 554, 3524, 198, 6738, 1017, 10735, 1330, 3454, 10735, 198, 11748, 20218, 7753, 198, 11748, 2779, 2414, 198, 11748, 1822, 29572, 198, 11748, 275, 2069, ...
2.916914
337
from typing import Optional from uuid import UUID from api.db.models.base import BaseSchema
[ 6738, 19720, 1330, 32233, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 40391, 13, 9945, 13, 27530, 13, 8692, 1330, 7308, 27054, 2611, 628, 198 ]
3.518519
27
''' 2018/11/29 1.添加 frame_gen 逻辑用于方便的生成流输入 2.测试中存在丢失端口检测的情况 3.复位极性,时钟,复位信号无法自动检测 4.信号没有再系统初始化的时候自动添加复位(reg型) 添加 function blog2 function integer blog2(input integer num); for ( blog2 = 0 ; num > 0...
[ 7061, 6, 2864, 14, 1157, 14, 1959, 352, 13, 162, 115, 119, 27950, 254, 5739, 62, 5235, 16268, 222, 119, 164, 122, 239, 18796, 101, 12859, 236, 43095, 160, 122, 123, 21410, 37955, 22755, 238, 38184, 223, 164, 122, 241, 17739, 98, 220...
1.247051
2,882
# -*- coding: utf-8 -*- """ @author: Zheng Fang This is the core of pahmc_ode_cpu. It receives all the user-provided specs from 'main.py' as well as the data generated by 'data_preparation.py' (or directly from the user if working with real data), and perform the PAHMC algorithm for state and parameter estima...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 31, 9800, 25, 44583, 24468, 201, 198, 201, 198, 1212, 318, 262, 4755, 286, 279, 993, 23209, 62, 1098, 62, 36166, 13, 632, 11583, 477, 262, 2836, ...
1.841478
9,904
#!/usr/bin/env python import sys import boto3 from botocore.exceptions import ClientError import time import argparse import re import json from collections import defaultdict from datetime import ( date, datetime ) from dateutil.parser import parse as dtparse from dateutil.tz import tzlocal from botocore.exce...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 3391...
2.760417
480
EDIT_COLS = ['H', 'L'] HEADER_ROWS = 2 HIDE_COLS = ['A', 'B', 'C', 'D', 'F', 'K'] CHAR_LIMIT_VAL_COL = 'I' CHAR_LIMIT_APPLY_COL = 'H' CHAR_LIMIT_REGEX = r'(\d+)\s*文字'
[ 24706, 62, 25154, 50, 796, 37250, 39, 3256, 705, 43, 20520, 198, 37682, 1137, 62, 49, 22845, 796, 362, 198, 39, 14114, 62, 25154, 50, 796, 37250, 32, 3256, 705, 33, 3256, 705, 34, 3256, 705, 35, 3256, 705, 37, 3256, 705, 42, 20520...
1.704082
98
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.s # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accomp...
[ 2, 15069, 1584, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 82, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 198, 2, 743, 407, 779, 428, 2...
3.643077
325
from test.utils import numpy_only, pandas_only from warnings import filterwarnings import pytest # type: ignore import redshift_connector # Tests relating to the pandas and numpy operation of the database driver # redshift_connector custom interface. @pytest.fixture @pandas_only @pandas_only @numpy_only
[ 6738, 1332, 13, 26791, 1330, 299, 32152, 62, 8807, 11, 19798, 292, 62, 8807, 198, 6738, 14601, 1330, 8106, 40539, 654, 198, 198, 11748, 12972, 9288, 220, 1303, 2099, 25, 8856, 198, 198, 11748, 2266, 30846, 62, 8443, 273, 198, 198, 2, ...
3.234694
98
#!/usr/bin/env python """Classes to encapsulate the idea of a dataset in machine learning, including file access. This file contains the ARFF class for people who have arff installed. """ ############################################################################################# # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 9487, 274, 284, 32652, 5039, 262, 2126, 286, 257, 27039, 287, 4572, 4673, 11, 198, 220, 220, 1390, 2393, 1895, 13, 628, 220, 220, 770, 2393, 4909, 262, 5923, 5777, 1398, ...
1.946166
2,582
"""Create and solve SMT problems related to the search for characteristics."""
[ 37811, 16447, 290, 8494, 9447, 51, 2761, 3519, 284, 262, 2989, 329, 9695, 526, 15931, 198 ]
4.9375
16
# https://deeplearningcourses.com/c/deep-learning-gans-and-variational-autoencoders # https://www.udemy.com/deep-learning-gans-and-variational-autoencoders from __future__ import print_function, division from builtins import range, input # Note: you may need to update your version of future # sudo pip install -U future...
[ 2, 3740, 1378, 22089, 40684, 66, 39975, 13, 785, 14, 66, 14, 22089, 12, 40684, 12, 39352, 12, 392, 12, 25641, 864, 12, 2306, 6571, 19815, 364, 198, 2, 3740, 1378, 2503, 13, 463, 3065, 13, 785, 14, 22089, 12, 40684, 12, 39352, 12, ...
2.876494
251
from sklearn.model_selection import train_test_split from pymir import settings from pymir.common import EXISTING_KEYS import csv import os import pandas as pd def compute(train_size=0.8): """ Each song in the dataset is represented by metadata and a time series that represents samples taken at a gi...
[ 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 6738, 279, 4948, 343, 1330, 6460, 198, 198, 6738, 279, 4948, 343, 13, 11321, 1330, 7788, 8808, 2751, 62, 7336, 16309, 628, 198, 11748, 269, 21370, 198...
2.673835
279
from django.shortcuts import render from django.http import HttpResponse, HttpResponseServerError, HttpResponseRedirect from django.views import generic from django.core.cache import cache import json import httplib import os import platform import datetime from .models import Movie, Booking, ShowTime, User NEW_USER...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 10697, 12331, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 33571, 1330, 14276, 198, 67...
4.453552
183
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Evaluating different SDC methods""" from __future__ import print_function, division, absolute_import, unicode_literals import os.path as op import numpy as np import nipype.pipel...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 2...
1.944842
2,375
import functools from numbers import Integral from itertools import product, starmap, cycle from collections import defaultdict from autoray import do from ..utils import check_opt, ensure_dict from ..gen.rand import randn, seed_rand from . import array_ops as ops from .tensor_core import ( Tensor, TensorNetw...
[ 11748, 1257, 310, 10141, 198, 6738, 3146, 1330, 15995, 1373, 198, 6738, 340, 861, 10141, 1330, 1720, 11, 336, 1670, 499, 11, 6772, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 1960, 273, 323, 1330, 466, 198, 198, 6738, 11485, ...
1.882783
7,243
#!/usr/bin/env python # encoding: utf-8 """ Utility functions for working with NLTK """ import nltk def wordify(text): """Generate a list of words given text, removing punctuation. Parameters ---------- text : unicode A piece of english text. Returns ------- words : list ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 18274, 879, 5499, 329, 1762, 351, 22879, 51, 42, 198, 37811, 198, 198, 11748, 299, 2528, 74, 628, 198, 4299, 1573, 1958, 7, 5239, 2...
2.613402
194
from typing import Hashable import pandas_flavor as pf import pandas as pd from janitor.utils import deprecated_alias @pf.register_dataframe_method @deprecated_alias(column="column_name") def expand_column( df: pd.DataFrame, column_name: Hashable, sep: str = "|", concat: bool = True, ) -> pd.DataFram...
[ 6738, 19720, 1330, 21059, 540, 198, 11748, 19798, 292, 62, 2704, 5570, 355, 279, 69, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 42897, 2072, 13, 26791, 1330, 39224, 62, 26011, 628, 198, 31, 79, 69, 13, 30238, 62, 7890, 14...
2.333333
657
"""high lvl interface for low lvl loader"""
[ 37811, 8929, 33309, 7071, 329, 1877, 33309, 40213, 37811 ]
4.777778
9
import unittest from ntupro.booking import Ntuple, Dataset, Cut, Weight class TestBookingMethods(unittest.TestCase): """ Test main classes and methods inside the booking submodule of ntuple_processor """ def test_ntuples(self): """ Ntuple objects equal if have same path and directory...
[ 11748, 555, 715, 395, 198, 198, 6738, 299, 83, 929, 305, 13, 2070, 278, 1330, 399, 83, 29291, 11, 16092, 292, 316, 11, 9712, 11, 14331, 628, 198, 4871, 6208, 10482, 278, 46202, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 2...
2.243478
805
#!/usr/bin/python version = "0.1"
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 9641, 796, 366, 15, 13, 16, 1 ]
2.1875
16
__version__ = "0.0.2" from authortools import authortools #Some ways to isolate parts of the text. chapters = authortools.chapters sentences = authortools.sentences sentences_by_punctuation = authortools.sentences_by_punctuation words = authortools.words quotes = authortools.quotes #Some ways to isolate parts of th...
[ 834, 9641, 834, 796, 366, 15, 13, 15, 13, 17, 1, 198, 198, 6738, 6284, 419, 10141, 1330, 6284, 419, 10141, 198, 198, 2, 4366, 2842, 284, 28091, 3354, 286, 262, 2420, 13, 198, 354, 12126, 796, 6284, 419, 10141, 13, 354, 12126, 198,...
2.987654
324
""" This file intends to gather code specific to Sentinel 2 Original author: Ignacio Heredia Date: February 2019 Adaptation ---------- Date: August 2019 Author: Daniel Garcia Email: garciad@ifca.unican.es Github: garciadd """ #APIs import os, re import shutil import numpy as np import time from osgeo import gdal, os...
[ 37811, 198, 1212, 2393, 19582, 284, 6431, 2438, 2176, 284, 26716, 362, 198, 20556, 1772, 25, 16583, 48711, 679, 445, 544, 198, 10430, 25, 3945, 13130, 198, 198, 48003, 341, 198, 35937, 198, 10430, 25, 2932, 13130, 198, 13838, 25, 7806, ...
2.201735
461
import numpy as np from matplotlib import pyplot as plt from ..Hub.HubSEIR import HubSEIR from Eir.utility import Person, randEvent, dist
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 11485, 16066, 13, 16066, 5188, 4663, 1330, 14699, 5188, 4663, 198, 6738, 412, 343, 13, 315, 879, 1330, 7755, 11, 43720, 9237,...
3.209302
43
# -*- coding: utf-8 -*- """ Created on Sat May 29 23:03:08 2021 @author: Septhiono """ student_scores = input("Input a list of student scores ").split() for n in range(0, len(student_scores)): student_scores[n] = int(student_scores[n]) maxi=0 mini=student_scores[0] for i in student_scores: if i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 7031, 1737, 2808, 2242, 25, 3070, 25, 2919, 33448, 201, 198, 201, 198, 31, 9800, 25, 8621, 400, 295, 78, 201, 198, 37811, 201, 198, ...
2.166667
222
from .widgets import AceWidget # adhere to PEP 386 __version__ = "0.3.1"
[ 6738, 764, 28029, 11407, 1330, 17102, 38300, 198, 198, 2, 26325, 284, 350, 8905, 48340, 198, 834, 9641, 834, 796, 366, 15, 13, 18, 13, 16, 1, 198 ]
2.642857
28
import concat.level1.stdlib.compositional import concat.level0.stdlib.types import unittest from typing import List, cast
[ 11748, 1673, 265, 13, 5715, 16, 13, 19282, 8019, 13, 785, 1930, 1859, 198, 11748, 1673, 265, 13, 5715, 15, 13, 19282, 8019, 13, 19199, 198, 11748, 555, 715, 395, 198, 6738, 19720, 1330, 7343, 11, 3350, 628 ]
3.236842
38
# hourglass.py import torch.nn as nn __all__ = ['HourGlass'] def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) class HourGlass(nn.Module): """ This is ...
[ 2, 1711, 20721, 13, 9078, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 834, 439, 834, 796, 37250, 43223, 47698, 20520, 628, 198, 4299, 3063, 18, 87, 18, 7, 259, 62, 22587, 11, 503, 62, 22587, 11, 33769, 28, 16, 2599,...
2.5
150
'''simulate annealing''' from numpy import * from abc import ABCMeta, abstractmethod from collections import namedtuple import pdb,time,copy __all__=['SAP','anneal','anneal_singlerun','sap'] class SAP(object, metaclass=ABCMeta): ''' Simulated Annealing Problem. ''' @abstractmethod def get_cost(s...
[ 7061, 6, 14323, 5039, 281, 710, 4272, 7061, 6, 198, 198, 6738, 299, 32152, 1330, 1635, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 279, 9945, 11, 2435, 11, 30073, 198, ...
2.158967
1,472
# @copyright@ # Copyright (c) 2006 - 2019 Teradata # All rights reserved. Stacki(r) v5.x stacki.com # https://github.com/Teradata/stacki/blob/master/LICENSE.txt # @copyright@ import stack.commands.set.network from stack.exception import ArgUnique class Command(stack.commands.set.network.command): """ Sets the DNS ...
[ 2, 2488, 22163, 4766, 31, 198, 2, 15069, 357, 66, 8, 4793, 532, 13130, 3813, 14706, 198, 2, 1439, 2489, 10395, 13, 23881, 72, 7, 81, 8, 410, 20, 13, 87, 8931, 72, 13, 785, 198, 2, 3740, 1378, 12567, 13, 785, 14, 15156, 14706, ...
2.9375
224
import csv from pathlib import Path from collections import defaultdict from typing import Dict, Iterable, Set, Tuple from ranking_utils.dataset import ParsableDataset def read_qrels_trec(fname: Path) -> Dict[str, Dict[str, int]]: """Read query relevances, TREC format. Args: fname (Path): Query rele...
[ 11748, 269, 21370, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 360, 713, 11, 40806, 540, 11, 5345, 11, 309, 29291, 198, 198, 6738, 12759, 62, 26791, 13, 19608, 292, 316, 1330, 23042, ...
2.164557
1,896
import plotly.express as px import os import plotly.graph_objects as go # Create initial placeholder figure for game simulator # Create initial placeholder figure for event plot # Create initial placeholder figure for radar plot
[ 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 28686, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 198, 2, 13610, 4238, 46076, 3785, 329, 983, 35375, 628, 198, 2, 13610, 4238, 46076, 3785, 329, 1785, 7110, 628, ...
4.5
52
from ckan.lib.celery_app import celery from requests import get from lib import TileProcessor import ckanapi @celery.task(name='mvt.process_resource')
[ 6738, 269, 27541, 13, 8019, 13, 7015, 88, 62, 1324, 1330, 18725, 1924, 198, 6738, 7007, 1330, 651, 198, 6738, 9195, 1330, 47870, 18709, 273, 198, 198, 11748, 269, 27541, 15042, 198, 198, 31, 7015, 88, 13, 35943, 7, 3672, 11639, 76, ...
3.122449
49
from rest_framework import viewsets, status from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from core.models import News, Campaing from newscampaing import serializers class NewsPrivate(viewsets.ModelView...
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 41299, 3299, 1330, 29130, 47649, 3299, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47649, 3474, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, ...
3.170124
241
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
import bblfsh_sonar_checks.utils as utils import bblfsh if __name__ == '__main__': utils.run_default_fixture(__file__, check)
[ 11748, 275, 65, 1652, 1477, 62, 1559, 283, 62, 42116, 13, 26791, 355, 3384, 4487, 198, 198, 11748, 275, 65, 1652, 1477, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 3384, 4487, 13, 5143, 62, 12286, 62, 69, 960...
2.509804
51
import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn import tree from Model import Model from Utility import Utility from PSEDD import PSEDD if __name__ == '__main__': tau = 0.05 dir = '../data/' subdir = 'm0.01/' for dataset in ['adult', 'dutch']: print('D...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 6738, 1341, 35720, 1330, 5509, 198, 6738, 9104, 1330, 9104, 198, 6738, 34030, 1330, 34030, 198, 6738, 6599, 1961, 35, 1330, 6599, ...
2.078853
558
import re if __name__ == '__main__': assert '1' == match_int('a1b') assert '12' == match_int('12a') assert '-1' == match_int('b-1') assert '-1000' == match_int('d-1000') print 'all passed.'
[ 11748, 302, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 6818, 705, 16, 6, 6624, 2872, 62, 600, 10786, 64, 16, 65, 11537, 201, 198, 220, 220, 220, 6818, 705, 1065...
2.145631
103
from unittest import TestCase from mock import patch from parameterized import parameterized from aws_lambda_builders.workflows.java_gradle.gradle_resolver import GradleResolver
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 15290, 1330, 8529, 198, 6738, 11507, 1143, 1330, 11507, 1143, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, 1818, 44041, 13, 12355, 62, 9744, 293, 13, 9744, 293, 62, 411, 14375,...
3.75
48
""" **************************************************************************************************** :copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
[ 37811, 198, 17174, 17174, 17174, 2466, 198, 25, 22163, 4766, 357, 66, 8, 13130, 12, 1238, 2481, 471, 27912, 1565, 8738, 11, 10302, 329, 45276, 6682, 11, 11419, 11, 290, 584, 20420, 13, 198, 198, 3237, 2489, 10395, 13, 198, 198, 7738, ...
3.918295
563
from jogger.exceptions import TaskError # noqa - for convenience from .base import Task # noqa from .docs import DocsTask # noqa from .lint import LintTask # noqa from .test import TestTask # noqa from .update import UpdateTask # noqa
[ 6738, 48342, 1362, 13, 1069, 11755, 1330, 15941, 12331, 220, 1303, 645, 20402, 532, 329, 15607, 198, 198, 6738, 764, 8692, 1330, 15941, 220, 1303, 645, 20402, 198, 6738, 764, 31628, 1330, 14432, 82, 25714, 220, 1303, 645, 20402, 198, 67...
3.226667
75
import os PROJECT_ROOT = os.path.dirname('..')
[ 11748, 28686, 198, 198, 31190, 23680, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 15908, 3672, 10786, 492, 11537, 198 ]
2.4
20