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 urllib.request, json, datetime, time from urllib.request import urlopen from pathlib import Path csv_file = Path(__file__).parents[0] / 'data' / 'gdax-bitcoin.csv' if __name__ == '__main__': while True: now = datetime.datetime.now() while (now.second % 5): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 2956, 297, 571, 13, 25927, 11, 33918, 11, 4818, 8079, 11, 640, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 40664, ...
2.21466
191
# # @lc app=leetcode.cn id=251 lang=python3 # # [251] flatten-2d-vector # None # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 13, 31522, 4686, 28, 28072, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 28072, 60, 27172, 268, 12, 17, 67, 12, 31364, 198, 2, 198, 14202, 198, 2, 2488, 44601, 2438, 28, 437 ]
2.113636
44
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields, tools, _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 6738, 16298, 2238, 1330, 40391, 11, 4981, 11, 7032, 11, 4899, ...
3.104167
48
from typing import Optional import numpy as np import tensorflow as tf class PositionalEncoding(tf.keras.layers.Layer): """ Create a positional encoding layer, usually added on top of an embedding layer. Embeds information about the position of the elements using the formula .. math:: PE[po...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4871, 18574, 1859, 27195, 7656, 7, 27110, 13, 6122, 292, 13, 75, 6962, 13, 49925, 2599, 198, 220, 220, 220, 37227, ...
2.369701
1,439
with open("data.in") as file: lines = file.readlines() lines = [line.rstrip() for line in lines] lines = lines[0].split(",") arr = [] for ln in lines: arr.append(int(ln)) for i in range(80): for j in range(0, len(arr)): if arr[j] <= 0: arr[j] = 6 ...
[ 4480, 1280, 7203, 7890, 13, 259, 4943, 355, 2393, 25, 198, 220, 220, 220, 3951, 796, 2393, 13, 961, 6615, 3419, 198, 220, 220, 220, 3951, 796, 685, 1370, 13, 81, 36311, 3419, 329, 1627, 287, 3951, 60, 198, 220, 220, 220, 3951, 796...
1.971722
389
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from chrome_ent_test.infra.core import environment, before_all, test from infra import ChromeEnterpriseTestCase @environment(file="../policy_test...
[ 2, 15069, 13130, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 1174...
3.597484
159
from abc import abstractmethod
[ 6738, 450, 66, 1330, 12531, 24396, 198 ]
4.428571
7
import torch import torch.nn.functional as F import torch.nn as nn from collections import OrderedDict class double_conv(nn.Module): '''(conv => BN => ReLU) * 2''' __all__ = ["DeepLabV3"] class DeepLabV3(_SimpleSegmentationModel): """ Implements DeepLabV3 model from `"Rethinking Atrous Convo...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 220, 220, 220, 220, 198, 4871, 4274, 62, 42946, 7, 20471, 13, 26796, 2599,...
2.762463
341
# We are goint to be creating a viewset # and basing it of the combination of generic viewset # and we are specifically going to use the list model mixins # > A django rest frameworke feature # where you can pull in different parts of a viewset # that we want to use for our application # > so we only want to take...
[ 198, 198, 2, 775, 389, 467, 600, 284, 307, 4441, 257, 1570, 2617, 198, 2, 290, 1615, 278, 340, 286, 262, 6087, 286, 14276, 1570, 2617, 198, 2, 290, 356, 389, 5734, 1016, 284, 779, 262, 1351, 2746, 5022, 1040, 198, 2, 1875, 317, ...
2.766768
2,624
import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.const import * CONF_UPDATE_INSTANT = "update_instant" CONF_MAPPING = 'mapping' CONF_CONTROL_PARAMS = 'params' CONF_CLOUD = 'update_from_cloud' CONF_MODEL = 'model' CONF_SENSOR_PROPERTY = "sensor_property" CONF_SENSOR_UNIT ...
[ 11748, 1363, 562, 10167, 13, 16794, 364, 13, 11250, 62, 12102, 341, 355, 269, 85, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 1635, 198, 198, 10943, 37, 62, 16977, 62, 38604, 8643, 796, 366, ...
1.639104
2,455
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/type.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from ...
[ 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, 23645, 14, 11235, 672, 3046, 14, 4906, 13, 1676, 1462, 198, 37811, 8645, ...
2.316021
10,898
from resource_factory import ResourceFactory from modules.configs.environment import env
[ 6738, 8271, 62, 69, 9548, 1330, 20857, 22810, 198, 6738, 13103, 13, 11250, 82, 13, 38986, 1330, 17365 ]
4.888889
18
import datetime from decimal import Decimal from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.utils.translation import ugettext as _ from dateutil.relativedelta import relativedelta from factory import fuzzy from mymoney.apps.bankaccounts.factories import ...
[ 11748, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, ...
3.574257
303
BOARD_FIELDS_EXPECTED = { 'first_field': 0, 'second_field': 1, 'third_field': 2, 'fourth_field': 3, 'fifth_field': 4, 'sixth_field': 5, 'seventh_field': 6, 'eighth_field': 7, 'ninth_field': 8 } FIELD_EMPTY_VAL = " "
[ 8202, 9795, 62, 11674, 3698, 5258, 62, 49864, 9782, 1961, 796, 1391, 198, 220, 220, 220, 705, 11085, 62, 3245, 10354, 657, 11, 198, 220, 220, 220, 705, 12227, 62, 3245, 10354, 352, 11, 198, 220, 220, 220, 705, 17089, 62, 3245, 10354...
1.992063
126
__all__ = ('DiscordRPCError', ) class DiscordRPCError(BaseException): """ Discord RPC error code. Attributes ---------- code : `int` Discord RPC error code. message : `str` Discord RPC error message. """ def __init__(self, code, message): """ Creates...
[ 834, 439, 834, 796, 19203, 15642, 585, 20031, 5222, 81, 1472, 3256, 1267, 198, 198, 4871, 39462, 20031, 5222, 81, 1472, 7, 14881, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 39462, 39400, 4049, 2438, 13, 198, 220, 220,...
2.23219
379
""" Your task is pretty simple , given a string S , find the total count of numbers present in the digit. Input The first line contains T , the number of test cases. The first line of each and every testc ase will contain a integer N , the length of the string . The second line of each and every test case will contai...
[ 37811, 198, 7120, 4876, 318, 2495, 2829, 837, 1813, 257, 4731, 311, 837, 1064, 262, 2472, 954, 286, 3146, 1944, 287, 262, 16839, 13, 198, 198, 20560, 198, 198, 464, 717, 1627, 4909, 309, 837, 262, 1271, 286, 1332, 2663, 13, 383, 717...
2.444444
477
import os import sys import imp import venv import shutil import stat import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger(" dcc-venv ") import requirements_handler as reqhand # VENV_ROOT_FOLDER = os.path.join(os.path.expanduser('~'), ".dcc-venvs") VENV_ROOT_FOLDER = os.path.join(os.path.a...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 848, 198, 11748, 8710, 85, 198, 11748, 4423, 346, 198, 11748, 1185, 198, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 6404, 796, 18931, ...
2.248776
1,021
''' Basic Twilio handler function ''' import boto3 import random import StringIO import urllib2 from boto3.dynamodb.conditions import Key from boto3.session import Session # create an S3 & Dynamo session s3 = boto3.resource('s3') session = Session()
[ 7061, 6, 198, 26416, 1815, 346, 952, 21360, 2163, 198, 7061, 6, 198, 198, 11748, 275, 2069, 18, 198, 11748, 4738, 198, 11748, 10903, 9399, 198, 11748, 2956, 297, 571, 17, 198, 198, 6738, 275, 2069, 18, 13, 67, 4989, 375, 65, 13, 1...
2.976471
85
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re from setuptools import find_packages, setup def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 4299, 651,...
2.564797
517
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np from src.communications import Transmitter, AWGNChannel, Receiver from src.utils import * # Configuration MODULATION = 'BPSK' EbN0dBs = np.linspace(-20, 8, 20) # Initialization transmitter = Transmitter(MODULATION) receiver = Receiver(MODULAT...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12351, 13, 20860, 1330, 3602, 37974, 11, 14356, 16630, 29239, ...
2.491525
295
import json import sys from PyQt5.QtCore import QUrl from PyQt5.QtWidgets import QApplication from PyQt5.QtMultimedia import QMediaContent, QMediaPlayer voicePlayer = Sound('voice') # 人声音轨 soundPlayer = Sound('sound') # 音效音轨 # bgmPlayer = Sound('bgm') # BGM播放音轨,在该项目中不需要 if __name__ == '__main__': # 这里是标准用...
[ 11748, 33918, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 28165, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 15205, 20626,...
1.591837
392
import numpy as np import gen.dists as dists # This really should be a pass-through function for gen gas, etc. but oh well. if __name__ == "__main__": # Generate some test distribution and display in 3d with mpl gen = Generator(int(100), int(100), int(100), 1e5, 1e4, 10, 40, 100, 10, 40...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2429, 13, 67, 1023, 355, 288, 1023, 628, 628, 628, 220, 220, 220, 1303, 770, 1107, 815, 307, 257, 1208, 12, 9579, 2163, 329, 2429, 3623, 11, 3503, 13, 475, 11752, 880, 13, 628, 628, 198, ...
2.2263
327
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
[ 2, 532, 9, 12, 21015, 532, 9, 12, 198, 198, 2, 770, 3788, 373, 4635, 416, 399, 8808, 11, 281, 4086, 286, 262, 471, 13, 50, 13, 1230, 11, 198, 2, 290, 416, 14195, 318, 407, 2426, 284, 6634, 287, 262, 1578, 1829, 13, 198, 2, 3...
3.268868
212
import zmq context = zmq.Context() socket = context.socket(zmq.PAIR) socket.bind("tcp://*:5555" % port) while True: socket.send("What time is it?") msg = socket.recv() print msg time.sleep(1)
[ 11748, 1976, 76, 80, 198, 198, 22866, 796, 1976, 76, 80, 13, 21947, 3419, 198, 44971, 796, 4732, 13, 44971, 7, 89, 76, 80, 13, 4537, 4663, 8, 198, 44971, 13, 21653, 7203, 83, 13155, 1378, 47026, 2816, 2816, 1, 4064, 2493, 8, 198, ...
2.344444
90
from django.urls import path from website import api urlpatterns = [ path('', api.load_user_location), path('status/<status>', api.load_user_location), path('approve/<locid>', api.approve_user_location), path('approve/', api.approve_user_location), path('disapprove/<locid>', api.disapprove_...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 201, 198, 6738, 3052, 1330, 40391, 201, 198, 201, 198, 6371, 33279, 82, 796, 685, 201, 198, 220, 220, 220, 3108, 10786, 3256, 40391, 13, 2220, 62, 7220, 62, 24886, 828, 201, 198, 220, 22...
2.522293
157
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import datetime from sqlalchemy.exc import IntegrityError from mojibake.app import app, db from mojibake.models import Post, Category, Tag, User from mojibake.settings import TEST_DATABASE_URI #TO DO: More work on this on testing! #http://flask.pocoo.org/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 11748, 4818, 8079, 198, 6738, 44161, 282, 26599, 13, 41194, 1330, 39348, 12331, 198, 19...
2.704225
142
import pyglet
[ 11748, 12972, 70, 1616, 628 ]
3
5
# -*- coding: utf-8 -*- """ Created on Mon Aug 17 10:42:50 2020 @author: draveendran """ import json import boto3 import datetime import os #SSM Functions
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 2447, 1596, 838, 25, 3682, 25, 1120, 12131, 198, 198, 31, 9800, 25, 288, 5758, 437, 2596, 198, 37811, 198, 198, 11748, 33918, 198, 11748, ...
2.515625
64
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 357, 34, 8, 33448, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
3.743961
207
import unittest from component.LogReg import LogReg from autosklearn.pipeline.util import _test_classifier import sklearn.metrics
[ 11748, 555, 715, 395, 198, 198, 6738, 7515, 13, 11187, 8081, 1330, 5972, 8081, 198, 6738, 44619, 74, 35720, 13, 79, 541, 4470, 13, 22602, 1330, 4808, 9288, 62, 4871, 7483, 198, 11748, 1341, 35720, 13, 4164, 10466, 628 ]
3.384615
39
#!/usr/bin/env python3 print('hello')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 4798, 10786, 31373, 11537, 198 ]
2.533333
15
from PIL import Image, ImageOps import numpy as np import matplotlib.pyplot as plt def imagenet_data_augmentation(pillow_img, target_size, area_min=0.08, area_max=1.0, aspect_min=0.75, aspect_max=4.0/3.0): """ Data augmentation for single image(base...
[ 6738, 350, 4146, 1330, 7412, 11, 7412, 41472, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 4299, 3590, 268, 316, 62, 7890, 62, 559, 5154, 341, 7, 27215, 322, 62, 9600, 1...
2.456767
1,064
from fixate.core.common import TestClass from fixate.core.ui import user_ok, user_info from fixate.core.checks import * __version__ = "1" class SimpleTest(TestClass): """Simple passing test""" TEST_SEQUENCE = [SimpleTest()]
[ 6738, 4259, 378, 13, 7295, 13, 11321, 1330, 6208, 9487, 198, 6738, 4259, 378, 13, 7295, 13, 9019, 1330, 2836, 62, 482, 11, 2836, 62, 10951, 198, 6738, 4259, 378, 13, 7295, 13, 42116, 1330, 1635, 198, 198, 834, 9641, 834, 796, 366, ...
2.987179
78
"""Exactcover __init__.""" from .exactcover import solve, ExactCoverKeyError __all__ = ['solve', 'ExactCoverKeyError']
[ 37811, 3109, 529, 9631, 11593, 15003, 834, 526, 15931, 198, 6738, 764, 1069, 529, 9631, 1330, 8494, 11, 1475, 529, 27245, 9218, 12331, 198, 198, 834, 439, 834, 796, 37250, 82, 6442, 3256, 705, 3109, 529, 27245, 9218, 12331, 20520, 198 ]
2.926829
41
global cjk_list global unicode_list global cjk_jian_list global cjk_jian_fan_list global cjk_fan_list global cjk_count global unicode_count import os, sys global main_directory #if packaged by pyinstaller #ref: https://stackoverflow.com/questions/404744/determining-application-path-in-a-python-exe-gen...
[ 20541, 269, 73, 74, 62, 4868, 201, 198, 20541, 28000, 1098, 62, 4868, 201, 198, 201, 198, 20541, 269, 73, 74, 62, 73, 666, 62, 4868, 201, 198, 20541, 269, 73, 74, 62, 73, 666, 62, 24408, 62, 4868, 201, 198, 20541, 269, 73, 74, ...
1.4814
5,914
# MIT License # Copyright (c) 2017 Derek Selander # 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 # to use, copy, modify, merge,...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 2177, 20893, 15300, 4066, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, ...
2.634412
3,307
#!/usr/bin/env python3 import re, inspect set_mask(Logger.default_levels)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 302, 11, 10104, 628, 628, 198, 198, 2617, 62, 27932, 7, 11187, 1362, 13, 12286, 62, 46170, 8, 628 ]
2.612903
31
""" Base class to create Circus subscribers plugins. """ import sys import logging import errno import uuid import argparse from circus import zmq from zmq.eventloop import ioloop, zmqstream from zmq.utils.jsonapi import jsonmod as json from circus import logger, __version__ from circus.client import make_message, ca...
[ 37811, 7308, 1398, 284, 2251, 46658, 18327, 20652, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 11454, 3919, 198, 11748, 334, 27112, 198, 11748, 1822, 29572, 198, 198, 6738, 33125, 1330, 1976, 76, 80, 198, 6738, 1976,...
2.441335
929
import requests from globus_sdk import exc class SearchAPIError(exc.GlobusAPIError): """ Error class for the Search API client. In addition to the inherited ``code`` and ``message`` instance variables, provides ``error_data``. :ivar error_data: Additional object returned in the error response. May b...
[ 11748, 7007, 198, 198, 6738, 15095, 385, 62, 21282, 74, 1330, 2859, 628, 198, 4871, 11140, 17614, 12331, 7, 41194, 13, 9861, 672, 385, 17614, 12331, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13047, 1398, 329, 262, 11140, 78...
3.006211
161
import des109moeda n1 = float(input('Digite o preço: R$')) print(f'O valor {des109moeda.moeda(n1)} dobrado é {des109moeda.dobro(n1, True)}.') print(f'O valor {des109moeda.moeda(n1)} pela metade é {des109moeda.metade(n1, True)}.') print(f'O valor {des109moeda.moeda(n1)} aumentado em 15% é {des109moeda.aumenta(n1, 15, ...
[ 11748, 748, 14454, 5908, 18082, 628, 198, 77, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 662, 16175, 78, 25, 371, 3, 6, 4008, 198, 4798, 7, 69, 6, 46, 1188, 273, 1391, 8906, 14454, 5908, 18082, 13, 5908, 18082, 7, 77, 16, ...
2.129353
201
from env_alias import __title__ as NAME from env_alias import __version__ as VERSION from env_alias.utils import logger from env_alias.exceptions.EnvAliasException import EnvAliasException from env_alias.utils.config import EnvAliasConfig from env_alias.utils.content import EnvAliasContent from env_alias.utils.select...
[ 198, 6738, 17365, 62, 26011, 1330, 11593, 7839, 834, 355, 36751, 198, 6738, 17365, 62, 26011, 1330, 11593, 9641, 834, 355, 44156, 2849, 198, 198, 6738, 17365, 62, 26011, 13, 26791, 1330, 49706, 198, 6738, 17365, 62, 26011, 13, 1069, 117...
3.625
96
""" Module handling the I/O for an MD run. """ import csv import pickle import re import sys import yaml from copy import copy, deepcopy from IPython import get_ipython from numpy import float64 from numpy import load as np_load from numpy import savetxt, savez, zeros from numpy.random import randint from os import lis...
[ 37811, 198, 26796, 9041, 262, 314, 14, 46, 329, 281, 10670, 1057, 13, 198, 37811, 198, 11748, 269, 21370, 198, 11748, 2298, 293, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 6738, 4866, 1330, 4866, 11, 2769, 30073, ...
2.070305
18,747
# 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, Version 2.0 (the # 'License...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 1...
2.842896
732
# coding: utf-8 # Standard Libraries import unittest from pathlib import Path # Dopplerr from dopplerr.tasks.download_subtitles import DownloadSubtitleTask # Todo: # glob test of "The.Series.Name.S07E06.720p.BluRay.DD5.1.x264-EbP-Obfuscated"
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 8997, 46267, 198, 11748, 555, 715, 395, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 2141, 381, 1754, 81, 198, 6738, 466, 381, 1754, 81, 13, 83, 6791, 13, 15002, 62, 7266, 83, 305...
2.490196
102
a = 3 \ 4.0 print('hello')
[ 64, 796, 513, 3467, 604, 13, 15, 198, 4798, 10786, 31373, 11537, 198 ]
2.076923
13
class SpotifyObject: ''' Represents a generic Spotify Object. Attributes ---------- id: str Spotify ID of the object. name: str Name of the object. uri: str Spotify URI of the object. ''' _type = None @property
[ 4871, 26778, 10267, 25, 198, 197, 7061, 6, 198, 197, 6207, 6629, 257, 14276, 26778, 9515, 13, 198, 197, 198, 197, 29021, 198, 197, 35937, 198, 197, 198, 197, 312, 25, 965, 198, 197, 197, 32565, 1958, 4522, 286, 262, 2134, 13, 198, ...
2.681818
88
from flask import Flask from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS app = Flask(__name__, static_url_path='/static') app.config.from_object('config.DevConfig') CORS(app) ma = Marshmallow(app) db = SQLAlchemy(app) from routes import images app.re...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 76, 5406, 42725, 1330, 9786, 42725, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 198, 1324, 796, 46947, 7, 834, ...
2.971223
139
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * # Greed is a dice game where you roll up to five dice to accumulate # points. The following "score" function will be used calculate the # score of a single roll of the dice. # # A greed roll is scored as follows: # # * A set of three ones is 100...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 17490, 13, 7204, 272, 1330, 1635, 198, 198, 2, 11955, 276, 318, 257, 17963, 983, 810, 345, 4836, 510, 284,...
2.929487
312
# Función de generación de matrices de clases y características
[ 2, 11138, 979, 18840, 390, 1152, 32009, 18840, 390, 2603, 45977, 390, 537, 1386, 331, 1097, 7321, 8836, 11268, 292, 628, 628, 628, 198 ]
2.916667
24
# import dash # import dash_core_components as dcc # import dash_html_components as html # import pandas as pd # import plotly.graph_objs as go # from dash.dependencies import Input, Output # import requests, json # # df = pd.read_csv( # # 'wiki_fires_cleaned_2015-2018.csv') # year_data = requests.get("h...
[ 2, 1330, 14470, 201, 198, 2, 1330, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 201, 198, 2, 1330, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 201, 198, 2, 1330, 19798, 292, 355, 279, 67, 201, 198, 2, 1330, 7110, 306, 13, 34...
2.06392
1,893
from django.contrib.sessions.middleware import SessionMiddleware from django.test import TestCase, RequestFactory from django.urls import reverse from django.utils import timezone import experiments.utils as utils from experiments.models import RequestMonitor, Player, Experiment, Treatment, Session from experiments.vi...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 82, 6202, 13, 27171, 1574, 1330, 23575, 34621, 1574, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 19390, 22810, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 142...
3.674847
163
#!/usr/bin/env python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) Merchise Autrement [~º/~] and Contributors # All rights reserved. # # This is free software; you can do what the LICENCE file allows you to. # """An example of an application that use :...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 30934, 198, 2, 15069, 357, 66, 8, 34414, 786, 5231, 260, 434, 685, 93, 36165, 14, 93, 60, 290, 25767, 669...
3.285714
182
# Generated by Django 2.2.6 on 2019-12-12 22:24 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1065, 12, 1065, 2534, 25, 1731, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.818182
44
bit_pattern_31 = \ [ 8,-3, 9,5, #/*mean (0), correlation (0)*/, 4,2, 7,-12, #/*mean (1.12461e-05), correlation (0.0437584)*/, -11,9, -8,2, #/*mean (3.37382e-05), correlation (0.0617409)*/, 7,-12, 12,-13, #/*mean (5.62303e-05), correlation (0.0636977)*/, 2,-13, 2,12, #/*mean (0.000134953), correlat...
[ 198, 198, 2545, 62, 33279, 62, 3132, 796, 3467, 198, 58, 198, 220, 220, 220, 807, 12095, 18, 11, 860, 11, 20, 11, 1303, 15211, 32604, 357, 15, 828, 16096, 357, 15, 8, 16208, 11, 198, 220, 220, 220, 604, 11, 17, 11, 767, 12095, ...
1.96429
8,261
# -*- coding: utf-8 -*- """Script to compact all Brython scripts in a single one.""" import datetime import os import re import sys import tarfile import zipfile import make_static_doc # lint:ok try: import slimit minify = slimit.minify except ImportError: minify = slimit = None # path of parent di...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 37811, 7391, 284, 16001, 477, 9092, 400, 261, 14750, 287, 257, 2060, 530, 526, 15931, 628, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2...
2.14971
4,315
from game_data import data from art import logo, vs import random import os def compare(choice, curr, compare_against, points, game_is_over): """Compares the players choice with the other choice and updates game_is_over, 'Compare A' and points. Returns points and game_is_over.""" if choice == curr and choice[...
[ 6738, 983, 62, 7890, 1330, 1366, 198, 6738, 1242, 1330, 11112, 11, 3691, 198, 11748, 4738, 198, 11748, 28686, 628, 198, 4299, 8996, 7, 25541, 11, 1090, 81, 11, 8996, 62, 32826, 11, 2173, 11, 983, 62, 271, 62, 2502, 2599, 198, 220, ...
2.52027
740
import unittest from VintageousPlus.vi.utils import modes from VintageousPlus.state import State from VintageousPlus.tests import get_sel from VintageousPlus.tests import first_sel from VintageousPlus.tests import ViewTest from VintageousPlus.ex_commands import CURRENT_LINE_RANGE # TODO: test with multiple ...
[ 11748, 555, 715, 395, 198, 198, 6738, 34057, 516, 17860, 13, 8903, 13, 26791, 1330, 12881, 198, 198, 6738, 34057, 516, 17860, 13, 5219, 1330, 1812, 198, 198, 6738, 34057, 516, 17860, 13, 41989, 1330, 651, 62, 741, 198, 6738, 34057, 51...
3.542553
94
import math from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket from util.orientation import Orientation from util.vec import Vec3 import numpy as np import os
[ 11748, 10688, 198, 198, 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 25781, 1330, 7308, 36772, 11, 17427, 22130, 9012, 198, 6738, 374, 75, 13645, 13, 26791, 13, 7249, 942, 13, 6057, 62, 7890, 62, 7249, 1330, 3776, 51, 624, 47, 831...
3.438356
73
import pytest from qtoggleserver.core.expressions import comparison, Function from qtoggleserver.core.expressions import InvalidNumberOfArguments
[ 198, 11748, 12972, 9288, 198, 198, 6738, 10662, 83, 48549, 18497, 13, 7295, 13, 42712, 507, 1330, 7208, 11, 15553, 198, 6738, 10662, 83, 48549, 18497, 13, 7295, 13, 42712, 507, 1330, 17665, 15057, 5189, 28100, 2886, 628, 628, 628, 628, ...
3.44
50
#!/usr/bin/env python """ _CMSSW_ Template for a CMSSW Step """ import pickle from WMCore.WMSpec.ConfigSectionTree import nodeName from WMCore.WMSpec.Steps.Template import CoreHelper, Template class CMSSWStepHelper(CoreHelper): """ _CMSSWStepHelper_ Add API calls and helper methods to the basic WMSte...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 62, 24187, 5432, 54, 62, 198, 198, 30800, 329, 257, 16477, 5432, 54, 5012, 198, 198, 37811, 198, 198, 11748, 2298, 293, 198, 198, 6738, 370, 9655, 382, 13, 22117, 22882, ...
2.414001
6,128
import numpy as np from numpy import linalg as LA class Duffing: """ Create a duffing object by specifying it's parameter delta as input at initialization of the object It is a bistable dynamical system with 2 stable steady states and one unstable steady state """ def reset(self): ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 6738, 299, 32152, 1330, 300, 1292, 70, 355, 9131, 201, 198, 201, 198, 4871, 50209, 278, 25, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 13610, 257, 288, 1648, 278, 2134, 416, 315...
1.980855
1,567
#Matthew Trahms #EE 526 #5/25/21 #This file serves as the toplevel generation script. The user will enter #at least the number entries, bits, and reads, with options to specify #that the regfile should be split into banks. Vertical banks (v_banks) means #that the address space will be split between multiple banks. Thi...
[ 2, 25372, 4759, 71, 907, 198, 2, 6500, 642, 2075, 198, 2, 20, 14, 1495, 14, 2481, 198, 198, 2, 1212, 2393, 9179, 355, 262, 284, 1154, 626, 5270, 4226, 13, 383, 2836, 481, 3802, 198, 2, 265, 1551, 262, 1271, 12784, 11, 10340, 11,...
3.088117
749
from dlib import point, points try: import cPickle as pickle # Use cPickle on Python 2.7 except ImportError: import pickle
[ 6738, 288, 8019, 1330, 966, 11, 2173, 198, 28311, 25, 198, 220, 220, 220, 1330, 269, 31686, 293, 355, 2298, 293, 220, 1303, 5765, 269, 31686, 293, 319, 11361, 362, 13, 22, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 2298...
2.913043
46
# -*- coding: utf-8 -*- """ Editor: Zhao Xinlu School: BUPT Date: 2018-01-23 Function: 二叉树的下一节点 """ def getBTreeNextNode(pNode): """ 给定一棵二叉树和其中一个节点,找出中序遍历序列的下一个节点 :param pNode: 给定节点 :return: 该节点下一个节点 """ if pNode == None: return None if pNode.rchild != None: tmpNode = pNode....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 17171, 25, 29436, 25426, 2290, 198, 26130, 25, 347, 8577, 51, 198, 10430, 25, 2864, 12, 486, 12, 1954, 198, 22203, 25, 220, 12859, 234, 20998, 231, 43718, ...
1.599174
484
""" 日程表 https://pcrbot.github.io/pcr-calendar/#cn """ from datetime import datetime, timedelta from typing import Dict, Optional, Set import httpx from nonebot import get_bot from nonebot.log import logger from nonebot_plugin_apscheduler import scheduler from .config import plugin_config calender_obj = Calender()...
[ 37811, 10545, 245, 98, 163, 101, 233, 26193, 101, 198, 198, 5450, 1378, 79, 6098, 13645, 13, 12567, 13, 952, 14, 79, 6098, 12, 9948, 9239, 31113, 31522, 198, 37811, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738,...
3.028302
106
""" Common helper functions for handling k8s objects information """ import datetime as dt import logging import os import re import yaml from flask import current_app log = logging.getLogger(__name__) def get_prefixed_index_html(): """ The backend should modify the <base> element of the index.html file to ...
[ 37811, 198, 17227, 31904, 5499, 329, 9041, 479, 23, 82, 5563, 1321, 198, 37811, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 198, 11748, 331, 43695, 198, 6738, 42903, 1330, 1459, 62, ...
2.180623
1,445
# Blackbox tests for ndrdump # Copyright (C) 2008 Andrew Tridgell <tridge@samba.org> # Copyright (C) 2008 Andrew Bartlett <abartlet@samba.org> # Copyright (C) 2010 Jelmer Vernooij <jelmer@samba.org> # based on test_smbclient.sh # This program is free software; you can redistribute it and/or modify # it under the terms...
[ 2, 2619, 3524, 5254, 329, 299, 67, 4372, 931, 198, 2, 15069, 357, 34, 8, 3648, 6858, 833, 3130, 297, 1279, 2213, 3130, 31, 82, 31842, 13, 2398, 29, 198, 2, 15069, 357, 34, 8, 3648, 6858, 13167, 15503, 1279, 397, 433, 1616, 31, 8...
3.065217
414
import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import binary_sensor, rdm6300 from esphome.const import CONF_UID, CONF_ID from . import rdm6300_ns DEPENDENCIES = ['rdm6300'] CONF_RDM6300_ID = 'rdm6300_id' RDM6300BinarySensor = rdm6300_ns.class_('RDM6300BinarySensor', binary...
[ 11748, 1658, 746, 462, 13, 8189, 5235, 355, 269, 70, 198, 11748, 1658, 746, 462, 13, 11250, 62, 12102, 341, 355, 269, 85, 198, 6738, 1658, 746, 462, 13, 5589, 3906, 1330, 13934, 62, 82, 22854, 11, 374, 36020, 5066, 405, 198, 6738, ...
2.245136
257
############################################################################### # # taxonParser.py - parse taxonomic-specific marker sets # ############################################################################### # # # This prog...
[ 29113, 29113, 7804, 4242, 21017, 201, 198, 2, 201, 198, 2, 1687, 261, 46677, 13, 9078, 532, 21136, 1687, 40036, 12, 11423, 18364, 5621, 201, 198, 2, 201, 198, 29113, 29113, 7804, 4242, 21017, 201, 198, 2, 220, 220, 220, 220, 220, 22...
2.131671
2,005
#-*- coding:utf-8 -*- import sqlite3 # --------------------------------------------------------------------------------------- # Description : Database Processor # --------------------------------------------------------------------------------------- # duplicate_tag is the group id. # retrieve all different senten...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 44161, 578, 18, 198, 198, 2, 16529, 19351, 6329, 198, 2, 12489, 220, 220, 1058, 24047, 32893, 198, 2, 16529, 19351, 6329, 198, 198, 2, 23418, 62, 12985, 318, 262, 1...
5.626866
67
from Crypto.Cipher import AES from Crypto.Protocol.KDF import PBKDF2 from config import ConfigService
[ 6738, 36579, 13, 34, 10803, 1330, 34329, 201, 198, 6738, 36579, 13, 19703, 4668, 13, 42, 8068, 1330, 30524, 42, 8068, 17, 201, 198, 6738, 4566, 1330, 17056, 16177, 201, 198, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220 ]
2.804878
41
#!/usr/bin/python3 from app import app __author__ = "@ivanleoncz" if __name__ == "__main__": app.run(debug=True)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 598, 1330, 598, 198, 198, 834, 9800, 834, 796, 44212, 13809, 38970, 26691, 1, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 13, ...
2.4
50
from sanic import text from sanic.response import json from sanic_ext import serializer
[ 6738, 5336, 291, 1330, 2420, 198, 6738, 5336, 291, 13, 26209, 1330, 33918, 198, 198, 6738, 5336, 291, 62, 2302, 1330, 11389, 7509, 628, 198 ]
3.64
25
# COMP 551 Mini Project 4 # 2019-04-17 # Segev, Michael # Jacquier, Pierre # Han, Zhenze # loads and formats data from stanford sentiment tree bank import re import numpy as np # computes the fine-grained labels
[ 2, 24301, 642, 4349, 12558, 4935, 604, 198, 2, 13130, 12, 3023, 12, 1558, 198, 2, 1001, 469, 85, 11, 3899, 198, 2, 44726, 959, 11, 21204, 198, 2, 9530, 11, 1168, 831, 2736, 198, 2, 15989, 290, 17519, 1366, 422, 336, 272, 3841, 1...
3.084507
71
import sys import textwrap import pytest from radon.visitors import * dedent = lambda code: textwrap.dedent(code).strip() SIMPLE_BLOCKS = [ ( ''' if a: pass ''', 2, {}, ), ( ''' if a: pass else: pass ''', 2, {}, ), ( ...
[ 11748, 25064, 198, 11748, 2420, 37150, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2511, 261, 13, 4703, 6742, 1330, 1635, 198, 198, 9395, 298, 796, 37456, 2438, 25, 2420, 37150, 13, 9395, 298, 7, 8189, 737, 36311, 3419, 628, 198, 48...
1.619139
6,761
import torch import torch.nn as nn from models.dsam_layers import center_crop
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 4981, 13, 9310, 321, 62, 75, 6962, 1330, 3641, 62, 31476, 628 ]
3.291667
24
#!/usr/bin/env python # -*- coding: utf-8 -*- import arcpy arcpy.env.workspace = "C:/Temp/donnees.gdb" soustypes = arcpy.da.ListSubtypes("villes") for stcode, stdict in list(soustypes.items()): print("code: ", stcode, " nom: ", stdict['Name'], " defaut: ", stdict['Default']) """ Retourne ceci: ('code: ', 0, ' no...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10389, 9078, 198, 5605, 9078, 13, 24330, 13, 5225, 10223, 796, 366, 34, 14079, 30782, 14, 9099, 710, 274, 13, ...
2.361111
180
#! # coding:utf-8 ''' Add headerlink Extension for Python-Markdown ========================================== This extension adds headerlink CSS to the output HTML in Python-Markdown. This is intended for use with TocExtension(permalink=True) which generates the links Simple Usage: >>> import markdown >>>...
[ 2, 0, 220, 198, 2, 19617, 25, 40477, 12, 23, 198, 198, 7061, 6, 198, 198, 4550, 13639, 8726, 27995, 329, 11361, 12, 9704, 2902, 198, 10052, 2559, 855, 198, 198, 1212, 7552, 6673, 13639, 8726, 17391, 284, 262, 5072, 11532, 287, 11361...
3.030612
490
import json import sys import turtle from maze import Maze def draw_path(filepath, pen, origin, sq_size): """"Reads a path from a file and draws it on the maze.""" first = True with open(filepath, 'r') as file_object: for line in file_object: x, y, visited, heading = json.loads(line) ...
[ 11748, 33918, 198, 11748, 25064, 198, 11748, 28699, 198, 198, 6738, 31237, 1330, 33412, 628, 198, 4299, 3197, 62, 6978, 7, 7753, 6978, 11, 3112, 11, 8159, 11, 19862, 62, 7857, 2599, 198, 220, 220, 220, 13538, 15931, 5569, 82, 257, 310...
2.002825
1,770
""" SoftLayer.CLI.routes ~~~~~~~~~~~~~~~~~~~ Routes for shell-specific commands :license: MIT, see LICENSE for more details. """ ALL_ROUTES = [ ('exit', 'SoftLayer.shell.cmd_exit:cli'), ('shell-help', 'SoftLayer.shell.cmd_help:cli'), ('env', 'SoftLayer.shell.cmd_env:cli'), ] ALL_ALIASES =...
[ 37811, 198, 220, 220, 220, 8297, 49925, 13, 5097, 40, 13, 81, 448, 274, 198, 220, 220, 220, 220, 27156, 4907, 93, 198, 220, 220, 220, 39602, 274, 329, 7582, 12, 11423, 9729, 628, 220, 220, 220, 1058, 43085, 25, 17168, 11, 766, 385...
2.359281
167
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on Thu Oct 31 11:09:38 2019 @author: Jorge palma MARETEC/Instituto Superior Técnico Universidade de Lisboa ''' import sys import os import gc import argparse import traceback import time import datetime import pandas as pd import json import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 41972, 319, 26223, 2556, 3261, 1367, 25, 2931, 25, 2548, 13130, 198, 198, 31, 9800, 25, 34687, 6340, 26...
2.177232
12,131
#!/usr/bin/env python from pydpiper.application import AbstractApplication import atoms_and_modules.registration_functions as rf import atoms_and_modules.minc_modules as mm import atoms_and_modules.minc_parameters as mp import atoms_and_modules.LSQ6 as lsq6 import atoms_and_modules.LSQ12 as lsq12 import atoms_and_modu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 279, 5173, 79, 9346, 13, 31438, 1330, 27741, 23416, 198, 11748, 23235, 62, 392, 62, 18170, 13, 2301, 33397, 62, 12543, 2733, 355, 374, 69, 198, 11748, 23235, 62, 392, 62, ...
2.986239
218
# Enter the interest rate (%) as a float (ex. 4% = .04). P = int(input("What is the principal? \n \n")) n = int(input("How many compoundings per year? \n \n")) r = float(input("What is the interest rate? \n \n")) t = int(input("How many years will your money be compounded for? \n \n")) Total_money_compounded = P * (...
[ 2, 6062, 262, 1393, 2494, 11509, 355, 257, 12178, 357, 1069, 13, 604, 4, 796, 764, 3023, 737, 198, 198, 47, 796, 493, 7, 15414, 7203, 2061, 318, 262, 10033, 30, 3467, 77, 3467, 77, 48774, 220, 198, 77, 796, 493, 7, 15414, 7203, ...
2.907895
152
#!/usr/bin/env python import sys, os, torch, h5py from transformers import BertModel, BertTokenizer from nlptools.utils import zdump model_path = sys.argv[1] if len(sys.argv) > 1 else "." model_name = "bert-base-uncased" vocab_name = os.path.join(model_path, 'vocab') weight_path = os.path.join(model_path, '{}.h5py'.fo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 11, 28686, 11, 28034, 11, 289, 20, 9078, 198, 6738, 6121, 364, 1330, 22108, 17633, 11, 22108, 30642, 7509, 198, 6738, 299, 75, 457, 10141, 13, 26791, 1330, 1976, 39455, 1...
2.541916
334
FILENAME = './day1/data/input' measurements = [] with open(FILENAME) as file: for line in file: measurements.append(int(line.strip())) s = 0 for i in range(3, len(measurements)): if measurements[i] + measurements[i - 1] + measurements[i - 2] > measurements[i - 1] + measurements[i - 2] + measurements...
[ 46700, 1677, 10067, 796, 705, 19571, 820, 16, 14, 7890, 14, 15414, 6, 198, 198, 1326, 5015, 902, 796, 17635, 198, 198, 4480, 1280, 7, 46700, 1677, 10067, 8, 355, 2393, 25, 198, 220, 220, 220, 329, 1627, 287, 2393, 25, 198, 220, 22...
2.462069
145
import pytest from gyomu.gyomu_db_model import * from gyomu.gyomu_db_schema import * from gyomu.user_factory import UserFactory from gyomu.user import User from gyomu.db_connection_factory import DbConnectionFactory from gyomu.json import Json from marshmallow import ValidationError gyomuapps_schema = GyomuAppsSchema(...
[ 11748, 12972, 9288, 198, 6738, 21486, 296, 84, 13, 1360, 296, 84, 62, 9945, 62, 19849, 1330, 1635, 198, 6738, 21486, 296, 84, 13, 1360, 296, 84, 62, 9945, 62, 15952, 2611, 1330, 1635, 198, 6738, 21486, 296, 84, 13, 7220, 62, 69, 9...
2.652968
219
import os, sys import math import copy import time from datetime import datetime import re # import requests import urllib import lxml.html as ht # import lxml.etree as et ##------------------------------------------------------------ sys.path.append(os.path.join(os.path.dirname(__file__), '../_public')) ## Note: 현재 ...
[ 11748, 28686, 11, 25064, 198, 11748, 10688, 198, 11748, 4866, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 302, 198, 2, 1330, 7007, 198, 11748, 2956, 297, 571, 198, 11748, 300, 19875, 13, 6494, 355, 289, 83, 1...
1.641231
4,875
from azure.cosmos import CosmosClient import subprocess RES_GROUP = "my-cosmsos-resource-group" ACCT_NAME = "my-cosomso-account-name" url = get_account_uri(RES_GROUP, ACCT_NAME) key = get_key(RES_GROUP, ACCT_NAME) print(url, key) client = CosmosClient(url, credential=key)
[ 6738, 35560, 495, 13, 6966, 16785, 1330, 39972, 11792, 628, 198, 11748, 850, 14681, 198, 198, 19535, 62, 46846, 796, 366, 1820, 12, 6966, 907, 418, 12, 31092, 12, 8094, 1, 198, 2246, 4177, 62, 20608, 796, 366, 1820, 12, 6966, 296, 5...
2.67619
105
import logging import seqlog import time seqlog.log_to_seq( server_url="http://127.0.0.1:5341/", api_key="RK2UCFPEIY7dsttQJA9F", level=logging.NOTSET, batch_size=10, auto_flush_timeout=1, # seconds override_root_logger=True, # json_encoder_class=json.encoder.JSONEncoder # Optional; only specify ...
[ 11748, 18931, 198, 11748, 33756, 6404, 198, 11748, 640, 198, 198, 41068, 6404, 13, 6404, 62, 1462, 62, 41068, 7, 198, 220, 220, 4382, 62, 6371, 2625, 4023, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 20, 33660, 14, 1600, 198, 220, 22...
2.744186
344
import test_storage import storage
[ 198, 11748, 1332, 62, 35350, 198, 198, 11748, 6143, 628 ]
3.8
10
# dup_reads.py # # create duplicate reads # import sys import random if (len(sys.argv) < 4 or len(sys.argv) > 5): print "usage: %s <# of duplicate reads> <max duplication> read1.fq [read2.fq]" % sys.argv[p] exit(1) dupcount = int(sys.argv[1]) maxdup = int(sys.argv[2]) in1 = open(sys.argv[3], "r") out1 = ope...
[ 2, 32597, 62, 40779, 13, 9078, 198, 2, 198, 2, 2251, 23418, 9743, 198, 2, 198, 198, 11748, 25064, 198, 11748, 4738, 198, 198, 361, 357, 11925, 7, 17597, 13, 853, 85, 8, 1279, 604, 393, 18896, 7, 17597, 13, 853, 85, 8, 1875, 642,...
1.880282
426
import os from scrapy import Request from scrapy.pipelines.files import FilesPipeline from scrapy.exceptions import DropItem from .items import Course, Lesson from . import settings
[ 11748, 28686, 198, 198, 6738, 15881, 88, 1330, 19390, 198, 6738, 15881, 88, 13, 79, 541, 20655, 13, 16624, 1330, 13283, 47, 541, 4470, 198, 6738, 15881, 88, 13, 1069, 11755, 1330, 14258, 7449, 198, 198, 6738, 764, 23814, 1330, 20537, ...
3.647059
51
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import base64 import hashlib import traceback from django.conf import settings from django.contrib.auth.models import User from django.http import HttpResponseBadRequest from django.utils import timezone from django.utils.decorators import method_decorator from django.views import View from django.views.decorators.csrf...
[ 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 12854, 1891, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, ...
3.333333
258
# -*- coding: utf-8 -*- import datetime from odoo import models, fields, api , _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4818, 8079, 198, 6738, 16298, 2238, 1330, 4981, 11, 7032, 11, 40391, 837, 4808, 198 ]
2.645161
31
import os from datetime import datetime, timedelta import aiosqlite import disnake from aiosqlite import connect from disnake.ext import commands from dotenv import load_dotenv from exencolorlogs import Logger from utils.constants import *
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 257, 4267, 13976, 578, 198, 11748, 595, 77, 539, 198, 6738, 257, 4267, 13976, 578, 1330, 2018, 198, 6738, 595, 77, 539, 13, 2302, 1330, 9729, 19...
3.422535
71
# import libraries import clr import os # Get and build the pyrevit path userProfile = os.environ.get("USERPROFILE") prvPath = userProfile + '\\AppData\\Roaming\\pyRevit-Master\\' # Load the path try: os.startfile(prvPath) except: print('The path was not found.')
[ 2, 1330, 12782, 198, 11748, 537, 81, 198, 11748, 28686, 198, 198, 2, 3497, 290, 1382, 262, 12972, 18218, 270, 3108, 198, 7220, 37046, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 29904, 31190, 25664, 4943, 198, 1050, 85, 15235, 796, 283...
2.873684
95
""" Preprocess the XSUM dataset There are several noisy training instances which do not contain any words in pre-defined vocabulary of NTM. We remove these instances. Here are the details about these removed instance: - instance #37993: input: Here are our favourites: target: On Monday, we ask...
[ 37811, 198, 6719, 14681, 262, 1395, 50, 5883, 27039, 628, 220, 220, 220, 1318, 389, 1811, 31210, 3047, 10245, 543, 466, 407, 3994, 597, 2456, 287, 662, 12, 23211, 25818, 286, 399, 15972, 13, 198, 220, 220, 220, 775, 4781, 777, 10245, ...
2.621289
1,381
import numpy as np import pandas as pd import statsmodels.formula.api as sm from statsmodels.tools.eval_measures import bic import time from scipy.stats import pearsonr parent_dir = '/media/seb/HD_Numba_Juan/Dropbox/postdoc/NARPS/preprint1' data_fn = parent_dir + '/participants_and_model.csv' df = pd.read_csv(data_fn...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 687, 4712, 13, 15042, 355, 895, 198, 6738, 9756, 27530, 13, 31391, 13, 18206, 62, 47336, 1330, 275, 291, 198, 11748, 640, 198, 6738, 629...
2.303517
2,616
import turtle turtle.forward(300) turtle.right(120) turtle.forward(75) turtle.right(60) turtle.forward(300) turtle.right(120) turtle.forward(75) turtle.right(150) turtle.forward(100) turtle.right(30) turtle.forward(75) turtle.left(120) turtle.forward(300) turtle.left(60) turtle.forward(75) turtle.left(120) turtle.forw...
[ 11748, 28699, 198, 198, 83, 17964, 13, 11813, 7, 6200, 8, 198, 83, 17964, 13, 3506, 7, 10232, 8, 198, 83, 17964, 13, 11813, 7, 2425, 8, 198, 83, 17964, 13, 3506, 7, 1899, 8, 198, 83, 17964, 13, 11813, 7, 6200, 8, 198, 83, 1796...
2.306202
258