content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""Module for views wrappers.""" from typing import Optional, List, Dict, Union from django.conf import settings from django.views.generic.base import View from django.http.response import JsonResponse, HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from rest_fram...
[ 37811, 26796, 329, 5009, 7917, 11799, 526, 15931, 198, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 360, 713, 11, 4479, 628, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, ...
2.413762
3,357
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='sublime-backup', version='0.3', py_modules=['cli'], author = 'nishantwrp', author_email = 'mittalnishant14@outlook.com', long_description=long_description, long_description_content...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 22...
2.476703
279
"""Provides the functionality to create a topic tree JSON file.""" import json from pathlib import Path from typing import Any, Dict, List, Optional, TypedDict, Union import pandas LANGUAGES = dict(en="", de="_de") class LeafNode(TypedDict): """A Node referencing a Concept""" title: str key: str ty...
[ 37811, 15946, 1460, 262, 11244, 284, 2251, 257, 7243, 5509, 19449, 2393, 526, 15931, 198, 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 17134, 276, 35, 713, 11, ...
2.832487
197
# -*- coding: utf-8 -*- from rest_framework.permissions import BasePermission, DjangoModelPermissions, DjangoObjectPermissions from system.models import User, Role
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 7308, 5990, 3411, 11, 37770, 17633, 5990, 8481, 11, 37770, 10267, 5990, 8481, 198, 198, 6738, 1080, 13, 27530, 1330, 117...
3.5
48
__version__ = "0.7.15"
[ 834, 9641, 834, 796, 366, 15, 13, 22, 13, 1314, 1, 198 ]
1.916667
12
""" """
[ 37811, 198, 37811, 628 ]
2.25
4
""" In mathematics, the greatest common divisor (gcd) of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For example, the gcd of 8 and 12 is 4. » https://en.wikipedia.org/wiki/Greatest_common_divisor Due to limited recursion depth this algorithm is not...
[ 37811, 198, 818, 19473, 11, 262, 6000, 2219, 2659, 271, 273, 357, 70, 10210, 8, 286, 734, 393, 517, 37014, 11, 198, 4758, 389, 407, 477, 6632, 11, 318, 262, 4387, 3967, 18253, 326, 36319, 1123, 286, 262, 37014, 13, 220, 198, 1890, ...
3.108108
148
from django.core.management.base import BaseCommand from django.db import transaction from ...models import (HomePage, ObjectBiographiesPage, ObjectBiographyPage, SourcePage, SourcesPage)
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 2644, 27530, 1330, 357, 16060, 9876, 11, 9515, 23286, 41480, 9876, 11, 9515, 23286, 4867, 9876, 11, 198...
3.042857
70
import os import cv2 import mmcv import numpy as np from mmcv.image import imread, imwrite from mmcv import color_val from mmdet.apis import init_detector, inference_detector config_file = 'configs_zhym/faster_rcnn_r50_fpn_1x_voc_handeonlytable.py' checkpoint_file = 'work_dirs/faster_rcnn_r50_fpn_1x_handeonlytable/epo...
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 8085, 33967, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 8085, 33967, 13, 9060, 1330, 545, 961, 11, 545, 13564, 198, 6738, 8085, 33967, 1330, 3124, 62, 2100, 198, 6738, 8085, 15255, ...
2.467466
584
"""Python serial number generator.""" class SerialGenerator: """Machine to create unique incrementing serial numbers. >>> serial = SerialGenerator(start=100) >>> serial.generate() 100 >>> serial.generate() 101 >>> serial.generate() 102 >>> serial.reset() >>> serial.gen...
[ 37811, 37906, 11389, 1271, 17301, 526, 15931, 198, 198, 4871, 23283, 8645, 1352, 25, 198, 220, 220, 220, 37227, 37573, 284, 2251, 3748, 18703, 278, 11389, 3146, 13, 198, 220, 220, 220, 220, 198, 220, 220, 220, 13163, 11389, 796, 23283, ...
2.46875
384
#! /usr/bin/env python # # Copyright (c) 2014, Dionach Ltd. All rights reserved. See LICENSE file. # # By BB # based on MS-PST Microsoft specification for PST file format [MS-PST].pdf v2.1 # import struct, datetime, math, os, sys, unicodedata, re, argparse, itertools, string import progressbar error_log_list = [] ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 11, 29628, 620, 12052, 13, 1439, 2489, 10395, 13, 4091, 38559, 24290, 2393, 13, 198, 2, 198, 2, 2750, 12597, 198, 2, 1912, 319, 6579, 12, 47...
2.165342
5,032
''' d_ij = matrice dei costi per ogni colonna trovo il minimo della colonna a ogni elemento della colonna sottraggo il minimo (d0) si ottiene una nuova matrice con pesi >= 0 --- stessa operazione con le righe (d1) --- ottengo matrice di coefficienti d2 assegnamento rappresentato da matrice X dove x_ij = 1 se i ...
[ 7061, 6, 198, 67, 62, 2926, 796, 2603, 20970, 390, 72, 1575, 72, 198, 198, 525, 267, 4593, 72, 951, 6415, 4161, 13038, 4229, 10356, 78, 390, 8466, 951, 6415, 198, 198, 64, 267, 4593, 72, 5002, 78, 390, 8466, 951, 6415, 264, 1252, ...
2.364882
803
import itertools from typing import List, Optional, Union from matplotlib import pyplot as plt from .asset_list import AssetList from .common.helpers import Float from .frontier.single_period import EfficientFrontier from .settings import default_ticker class Plots(AssetList): """ Plotting tools collection ...
[ 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 198, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 764, 562, 316, 62, 4868, 1330, 31433, 8053, 198, 6738, 764, 11321, 13, 167...
2.322375
5,171
# A class to collect alert properties import glob import os import pandas as pd
[ 2, 317, 1398, 284, 2824, 7995, 6608, 198, 198, 11748, 15095, 198, 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 628, 628 ]
3.541667
24
"""Downloading data from the M4 competition """ import os import requests if __name__ == "__main__": data_frequencies = ['Yearly', 'Quarterly', 'Monthly', 'Weekly', 'Daily', 'Hourly'] datapath = "./dataset/" url = "https://github.com/Mcompetitions/M4-methods/raw/master/Dataset/{}.csv" download(...
[ 37811, 10002, 278, 1366, 422, 262, 337, 19, 5449, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 7007, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1366, 62, 69, 8897, 3976, 796, 37250, ...
2.410377
212
import time import math import keyboard # Betting Breakdown initFee = 1500000 prefCard = 500000 infamous = 3000000 safe1 = 1000000 safe2 = 3300000 safe3 = 6500000 target = 1000000000 ct = 1 print(f'\nWelcome to your grind-less \'Golden Grin Anonymous\' Achievement!\n') currentSpend = int(input('What is your current...
[ 11748, 640, 198, 11748, 10688, 198, 11748, 10586, 198, 198, 2, 5147, 889, 12243, 2902, 198, 15003, 37, 1453, 796, 20007, 830, 198, 3866, 69, 16962, 796, 5323, 830, 198, 10745, 10877, 796, 513, 10535, 198, 21230, 16, 796, 1802, 2388, 1...
2.73431
478
# -*- coding: utf-8 -*- # # 3rd party imports from django_medusa.renderers import DiskStaticSiteRenderer # Project imports from statify.models import URL
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 198, 2, 513, 4372, 2151, 17944, 198, 6738, 42625, 14208, 62, 1150, 22064, 13, 10920, 19288, 1330, 31664, 45442, 29123, 49, 437, 11882, 198, 198, 2, 4935, 17944, ...
2.962264
53
import pysam from CigarIterator import CigarIterator, appendOrInc if __name__ == "__main__": pass #TODO
[ 11748, 279, 893, 321, 198, 6738, 32616, 283, 37787, 1330, 32616, 283, 37787, 11, 24443, 5574, 25517, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1208, 1303, 51, 3727, 46 ]
2.842105
38
""" WaveGlow teacher wrapper """ from functools import lru_cache import numpy as np import torch from models.waveglow import WaveGlow class WaveGlowTeacher(WaveGlow): """ A WaveGlow model optimized for use as a teacher in distillation """ @classmethod def sample_inputs_for(self, spect, sigma=1....
[ 37811, 198, 220, 220, 17084, 38, 9319, 4701, 29908, 198, 37811, 198, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 4981, 13, 19204, 4743, 322, 1330, 17084,...
2.182081
1,730
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ 2, 15069, 2177, 12350, 13485, 6682, 10302, 11, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.40456
1,886
# Coldwallet encryption related functions. This is the heart of coldwallet. from __future__ import absolute_import, division, print_function import base64 import math import os import coldwallet.aes import pylibscrypt def disable_randomness(): '''Make the random number generator produce deterministic (ie. non-ran...
[ 2, 10250, 44623, 15835, 3519, 5499, 13, 770, 318, 262, 2612, 286, 4692, 44623, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 2779, 2414, 198, 11748, 10688, 198, 11748, 286...
3.103795
896
# pylint: disable=duplicate-code # -*- coding: utf-8 -*- # # ramstk.models.action.record.py is part of The RAMSTK Project # # All rights reserved. # Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com """RAMSTKAction Table Module.""" # Standard Library Imports from datetime imp...
[ 2, 279, 2645, 600, 25, 15560, 28, 646, 489, 5344, 12, 8189, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 15770, 301, 74, 13, 27530, 13, 2673, 13, 22105, 13, 9078,...
2.256714
2,197
# # Vortex OpenSplice # # This software and documentation are Copyright 2006 to TO_YEAR ADLINK # Technology Limited, its affiliated companies and licensors. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
[ 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49790, 4946, 26568, 501, 198, 2, 198, 2, 220, 220, 770, 3788, 290, 10314, 389, 15069, 4793, 284, ...
3.099359
312
"""Contain the models related to the app ``users``.""" from django.contrib.auth.base_user import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from teamspirit.users.managers ...
[ 37811, 4264, 391, 262, 4981, 3519, 284, 262, 598, 7559, 18417, 15506, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 8692, 62, 7220, 1330, 27741, 14881, 12982, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, ...
3.541667
96
"""Process AWOS METAR file""" from __future__ import print_function import re import sys import os import datetime import ftplib import subprocess import tempfile from io import StringIO from pyiem import util INCOMING = "/mesonet/data/incoming" def fetch_files(): """Fetch files """ props = util.get_propert...
[ 37811, 18709, 14356, 2640, 31243, 1503, 2393, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 10117, 489, 571, 198, 11748, 850, 14681, 1...
2.036965
1,028
from django.db import models from django.core.exceptions import ObjectDoesNotExist
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 628, 628, 198 ]
3.48
25
S = input() result = 0 for s in S.split('+'): if s.count('0') == 0: result += 1 print(result)
[ 50, 796, 5128, 3419, 198, 198, 20274, 796, 657, 198, 1640, 264, 287, 311, 13, 35312, 10786, 10, 6, 2599, 198, 220, 611, 264, 13, 9127, 10786, 15, 11537, 6624, 657, 25, 198, 220, 220, 220, 1255, 15853, 352, 198, 4798, 7, 20274, 8, ...
2.244444
45
import os CACHE_DIRECTORY = os.path.join(os.path.expanduser('~'), os.path.join('temp', 'cache')) RESULT_DIRECTORY = os.path.join(os.path.expanduser('~'), os.path.join('temp', 'result')) # CACHE_DIRECTORY = 'cache' # RESULT_DIRECTORY = 'result'
[ 11748, 28686, 628, 198, 34, 2246, 13909, 62, 17931, 23988, 15513, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 11201, 392, 7220, 10786, 93, 33809, 28686, 13, 6978, 13, 22179, 10786, 29510, 3256, 705, 23870, 6, 4008, 198, 195...
2.411765
102
import os import yaml from launch import LaunchDescription from launch_ros.actions import Node from launch.actions import ExecuteProcess, DeclareLaunchArgument from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution from ament_index_python.packages import get_package_share_di...
[ 11748, 28686, 198, 11748, 331, 43695, 198, 6738, 4219, 1330, 21225, 11828, 198, 6738, 4219, 62, 4951, 13, 4658, 1330, 19081, 198, 6738, 4219, 13, 4658, 1330, 8393, 1133, 18709, 11, 16691, 533, 38296, 28100, 1713, 198, 6738, 4219, 13, 72...
3.873874
111
#!/usr/bin/python # -*- coding: UTF-8 -*- ''' This is a plugin for the Sublime Text Editor https://www.sublimetext.com/ Replace all occurences of the currently selected text in the document with an incrementing number. Some options are provided: * Start with an offset * Use fixed number of digits (fill up with lead...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 1212, 318, 257, 13877, 329, 262, 3834, 27299, 8255, 12058, 198, 5450, 1378, 2503, 13, 7266, 2475, 316, 2302, ...
3.412121
495
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ import urllib3 import shutil import zipfile from .hash import getFileSha256Hash import os PILLOW_MODULE_DOWNLOAD_FILE_NAME = "pillow_layer_module.zip" def downloadPillowLayerFile(directory: str, url: str, file_...
[ 37811, 198, 15269, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 17168, 12, 15, 198, 37811, 198, 198, 11748, 2956, 297, 571, 18, 198, 11748, 4423, 346, 198...
2.441581
582
import json from types import SimpleNamespace import pytest from mock import patch from backend.lambdas.settings import handlers pytestmark = [pytest.mark.unit, pytest.mark.api, pytest.mark.settings] @patch("backend.lambdas.settings.handlers.get_config")
[ 11748, 33918, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 198, 11748, 12972, 9288, 198, 6738, 15290, 1330, 8529, 198, 198, 6738, 30203, 13, 2543, 17457, 292, 13, 33692, 1330, 32847, 198, 198, 9078, 9288, 4102, 796, 685, 9078, 9288, ...
3.209877
81
from django.apps import AppConfig from django.conf import settings
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 628 ]
3.888889
18
# Copyright 2018 SUSE Linux GmbH # # 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 writ...
[ 2, 15069, 2864, 311, 19108, 7020, 402, 2022, 39, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 92...
2.7042
1,119
import numpy import os.path from amuse.test.amusetest import get_path_to_results try: from matplotlib import pyplot HAS_MATPLOTLIB = True from amuse.plot import plot, semilogy, xlabel, ylabel, loglog except ImportError: HAS_MATPLOTLIB = False from amuse.units import units from amuse.units import generi...
[ 11748, 299, 32152, 198, 11748, 28686, 13, 6978, 198, 6738, 26072, 13, 9288, 13, 25509, 316, 395, 1330, 651, 62, 6978, 62, 1462, 62, 43420, 198, 28311, 25, 198, 220, 220, 220, 422, 2603, 29487, 8019, 1330, 12972, 29487, 198, 220, 220, ...
2.175502
1,943
# -*- coding: utf-8 -*- import os import click from .._internal_utils import _config_utils from . import remote from . import branch from . import commit from . import blob @click.group() def cli(): """ModelDB versioning CLI for snapshotting and tracking model ingredients.""" pass @click.command() def i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 11748, 3904, 198, 198, 6738, 11485, 62, 32538, 62, 26791, 1330, 4808, 11250, 62, 26791, 198, 198, 6738, 764, 1330, 6569, 198, 6738, 764, 133...
2.814103
468
from oelint_adv.cls_rule import Rule from oelint_parser.cls_item import Variable
[ 6738, 267, 417, 600, 62, 32225, 13, 565, 82, 62, 25135, 1330, 14330, 198, 6738, 267, 417, 600, 62, 48610, 13, 565, 82, 62, 9186, 1330, 35748, 628 ]
2.928571
28
import random import unittest from clovars.scientific import brownian_motion, bounded_brownian_motion, reflect_around_interval, triangular_wave class TestBrownian(unittest.TestCase): """Class representing unit-tests for clovars.scientific.brownian_motion module.""" def test_bounded_brownian_motion_returns_va...
[ 11748, 4738, 198, 11748, 555, 715, 395, 198, 198, 6738, 537, 709, 945, 13, 41355, 1330, 7586, 666, 62, 38714, 11, 49948, 62, 33282, 666, 62, 38714, 11, 4079, 62, 14145, 62, 3849, 2100, 11, 46963, 62, 19204, 628, 198, 4871, 6208, 206...
2.094163
2,570
""" A nondeterministic transition function """ import copy from typing import Set from .state import State from .symbol import Symbol class NondeterministicTransitionFunction(object): """ A nondeterministic transition function in a finite automaton. The difference with a deterministic transition is that the...
[ 37811, 198, 32, 30745, 2357, 49228, 6801, 2163, 198, 37811, 198, 11748, 4866, 198, 6738, 19720, 1330, 5345, 198, 198, 6738, 764, 5219, 1330, 1812, 198, 6738, 764, 1837, 23650, 1330, 38357, 628, 198, 4871, 399, 623, 2357, 49228, 8291, 65...
2.168495
2,006
import contextlib import os import shelve from .registry import PlatformRegistry
[ 11748, 4732, 8019, 198, 11748, 28686, 198, 11748, 7497, 303, 198, 6738, 764, 2301, 4592, 1330, 19193, 8081, 4592, 628, 628, 198 ]
3.863636
22
from datetime import time from typing import List, Optional from pydantic import BaseModel, Field from papi_sdk.models.base import BaseResponse
[ 6738, 4818, 8079, 1330, 640, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 198, 198, 6738, 279, 15042, 62, 21282, 74, 13, 27530, 13, 8692, 1330, 7308, 31077, 628, 628, 628, 628,...
3.333333
51
#!/usr/bin/env python # -*-coding:utf-8-*- # net login from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import codecs import os driver = webdriver.PhantomJS() #driver = webdriver.Firefox(executable_path='/usr/local/bin/geckodriver') driver.get('https://gw.ict.ac.cn/srun_porta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 198, 2, 2010, 17594, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, ...
2.652
250
# Copyright 2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # less required by applicable law or agreed to i...
[ 2, 15069, 33160, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.077805
2,005
from django.shortcuts import render from rest_framework.decorators import api_view from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from rest_framework import status from rest_framework.response import Response from .models import * from .serializers import * from...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 33...
3.627451
204
if __name__ == '__main__': expected1 = {'c': 2, 'b': 2, 'a': 1} expected2 = {'a': 1, 'b': 2, 'c': 2} a = change(expected1) print(expected1 == a)
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 2938, 16, 796, 1391, 6, 66, 10354, 362, 11, 705, 65, 10354, 362, 11, 705, 64, 10354, 352, 92, 198, 220, 220, 220, 2938, 17, 796, 1391, 6, 64, 103...
2.075949
79
# -*- coding: utf-8 -*- r""" Finite State Machines, Automata, Transducers This module adds support for finite state machines, automata and transducers. See classes :class:`Automaton` and :class:`Transducer` (or the more general class :class:`FiniteStateMachine`) and the :ref:`examples <finite_state_machine_examples>` ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 198, 37, 9504, 1812, 31182, 11, 17406, 1045, 11, 3602, 41213, 198, 198, 1212, 8265, 6673, 1104, 329, 27454, 1181, 8217, 11, 3557, 1045, 290, 198, 7645, 41213,...
2.051147
168,787
import json import os import boto3 import secrets import time def lambda_handler(event, context): """ Sends an email notification to user with MAL OAuth link. Args: event (dict): AWS triggering event context (dict): AWS context Returns: (dict): JSON response to triggering even...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 275, 2069, 18, 198, 11748, 13141, 198, 11748, 640, 198, 198, 4299, 37456, 62, 30281, 7, 15596, 11, 4732, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 311, 2412, 281, 3053, 14483, 28...
2.103811
1,522
# -*- coding: utf-8 -*- from datetime import datetime import ruamel.yaml
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 7422, 17983, 13, 88, 43695, 628, 628 ]
2.566667
30
from flask import Blueprint, render_template, url_for, request, redirect from werkzeug.security import generate_password_hash from .models import User from . import db auth = Blueprint('auth', __name__) @auth.route('/signup') @auth.route('/signup', methods=['POST']) @ auth.route('/login') @ auth.route('/login'...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 2581, 11, 18941, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 198, 6738, 764, 27530, 1330, 11787, 198, 6738, 764, 1330, 20613, 1...
3.07563
119
from interlib.utility import key_var_check from interlib.utility import print_line from interlib.utility import inter_data_type from interlib.utility import list_dict_checker help_manual = " Syntax: \n" \ " Set <variable_name> [equal] to (<variable>/<number>/<string>/<list>/<table>) \n" \ ...
[ 6738, 987, 8019, 13, 315, 879, 1330, 1994, 62, 7785, 62, 9122, 198, 6738, 987, 8019, 13, 315, 879, 1330, 3601, 62, 1370, 198, 6738, 987, 8019, 13, 315, 879, 1330, 987, 62, 7890, 62, 4906, 198, 6738, 987, 8019, 13, 315, 879, 1330, ...
2.811236
445
import json try: from urllib.request import urlopen, Request except ImportError: from urllib2 import urlopen, Request
[ 11748, 33918, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 11, 19390, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 17, 1330, 19016, 9654, 11, 19390, 198 ]
3.097561
41
''' >>> heap = BikeHeap([4, 2, 1, 3]) >>> heap.pop() 1 >>> heap.pop() 2 ''' import heapq if __name__ == '__main__': import doctest print(doctest.testmod())
[ 7061, 6, 198, 33409, 24575, 796, 26397, 1544, 499, 26933, 19, 11, 362, 11, 352, 11, 513, 12962, 198, 33409, 24575, 13, 12924, 3419, 198, 16, 198, 33409, 24575, 13, 12924, 3419, 198, 17, 198, 7061, 6, 198, 198, 11748, 24575, 80, 628,...
2.210526
76
#!/usr/bin/env python import os from setuptools import setup, find_packages version = __import__('philo').VERSION setup( name = 'philo', version = '.'.join([str(v) for v in version]), url = "http://philocms.org/", description = "A foundation for developing web content management systems.", long_description =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 9641, 796, 11593, 11748, 834, 10786, 746, 18526, 27691, 43717, 628, 198, 40406, 7, 198, ...
2.615385
533
from winning.lattice_plot import densitiesPlot from winning.lattice import skew_normal_density, mean_of_density, implicit_state_prices, winner_of_many, sample_winner_of_many from winning.lattice_calibration import solve_for_implied_offsets, state_prices_from_offsets, densities_from_offsets import numpy as np PLOTS=Tru...
[ 6738, 5442, 13, 75, 1078, 501, 62, 29487, 1330, 220, 29509, 871, 43328, 198, 6738, 5442, 13, 75, 1078, 501, 1330, 43370, 62, 11265, 62, 43337, 11, 1612, 62, 1659, 62, 43337, 11, 16992, 62, 5219, 62, 1050, 1063, 11, 8464, 62, 1659, ...
2.882353
136
# A set of Python commands to pre-run for the galpy.org/repl redirect # Install astroquery import micropip await micropip.install('astroquery') # Install galpy await micropip.install('https://www.galpy.org/wheelhouse/galpy-latest-py3-none-any.whl') # Turn off warnings import warnings from galpy.util import galpyWarning...
[ 2, 317, 900, 286, 11361, 9729, 284, 662, 12, 5143, 329, 262, 9426, 9078, 13, 2398, 14, 35666, 18941, 198, 2, 15545, 6468, 305, 22766, 198, 11748, 12314, 1773, 541, 198, 707, 4548, 12314, 1773, 541, 13, 17350, 10786, 459, 305, 22766, ...
3.317073
246
from fishfeeder import FishFeeder import firebase url = "{your firebase url}" while True: result = firebase.get(url) if (result['action'] == True): FishFeeder().FeedNow(0, 90) firebase.put(url, {'action': False})
[ 6738, 5916, 12363, 263, 1330, 13388, 18332, 263, 198, 198, 11748, 2046, 8692, 198, 198, 6371, 796, 45144, 14108, 2046, 8692, 19016, 36786, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1255, 796, 2046, 8692, 13, 1136, 7, 6371, 8, 628,...
2.553191
94
from __future__ import division import unittest import numpy as np from numpy import testing as np_testing from pax.plugins.peak_processing.BasicProperties import integrate_until_fraction, put_w_in_center_of_field if __name__ == '__main__': unittest.main()
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 4856, 355, 45941, 62, 33407, 198, 198, 6738, 279, 897, 13, 37390, 13, 36729, 62, 36948, 13, 26416, 2964, ...
3.117647
85
import time import pytest from pyprofile import profile @pytest.fixture def test_profile_decorator(dump_dir): """Only test if the profile decorator is written correctly. """ @profile(dump_dir=dump_dir) @profile() assert fn() == 2, "fn with no parameters failed." assert fn_with_parameters...
[ 11748, 640, 198, 198, 11748, 12972, 9288, 198, 6738, 12972, 13317, 1330, 7034, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 4299, 1332, 62, 13317, 62, 12501, 273, 1352, 7, 39455, 62, 15908, 2599, 198, 220, 220, 220, 37227, 10049,...
2.991667
120
"""Externalized strings for better structure and easier localization""" setup_greeting = """ Dwarf - First run configuration Insert your bot's token, or enter 'cancel' to cancel the setup:""" not_a_token = "Invalid input. Restart Dwarf and repeat the configuration process." choose_prefix = """Choose a prefix. A pr...
[ 37811, 41506, 1143, 13042, 329, 1365, 4645, 290, 4577, 42842, 37811, 628, 198, 40406, 62, 70, 2871, 278, 796, 37227, 198, 35, 5767, 69, 532, 3274, 1057, 8398, 198, 198, 44402, 534, 10214, 338, 11241, 11, 393, 3802, 705, 66, 21130, 6, ...
3.140373
805
# pylint: disable=redefined-outer-name import collections import functools import itertools import pytest import slash from slash.core.scope_manager import ScopeManager, get_current_scope from .utils import make_runnable_tests from .utils.suite_writer import Suite def test_requirement_mismatch_end_of_module(): "...
[ 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 198, 11748, 17268, 198, 11748, 1257, 310, 10141, 198, 11748, 340, 861, 10141, 198, 198, 11748, 12972, 9288, 198, 11748, 24632, 198, 6738, 24632, 13, 7295, 13, 29982, 6...
2.689855
345
from __future__ import print_function import fns import numpy as np import os import matplotlib.pyplot as plt import matplotlib import scipy.signal from scipy import signal #from sklearn.model_selection import LeavePOut #from sklearn.model_selection import KFold from sklearn.model_selection import ShuffleSplit from skl...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 277, 5907, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 198, 11748, 629, 5...
2.235207
1,352
#!python """Check if docker container is running""" import argparse import subprocess import re import nagiosplugin @nagiosplugin.guarded if __name__ == '__main__': main()
[ 2, 0, 29412, 198, 198, 37811, 9787, 611, 36253, 9290, 318, 2491, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 302, 198, 198, 11748, 299, 363, 4267, 33803, 628, 628, 198, 31, 77, 363, 4267, 33803, 13, 5162, ...
3
62
import pymongo import json import numpy import plotly.graph_objs as go from datetime import datetime,timedelta import plotly import os from fedn.common.storage.db.mongo import connect_to_mongodb
[ 11748, 279, 4948, 25162, 198, 11748, 33918, 198, 11748, 299, 32152, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 16514, 276, 12514, 198, 11748, 7110, 306, 198, 11748, 28686, 198...
3.145161
62
# -*- coding: utf-8 -*- """ Created on Wed Jul 29 07:57:54 2020 @author: papalk """ # Code logbook # 10.02.2021 - Handover from Alkistis # changed filename to filename[0] due to variable type error # Changing from df.ix[...,0] to df.loc[..., df.columns[0]] due to a newer pandas version import sys import datetime as ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5979, 2808, 8753, 25, 3553, 25, 4051, 12131, 198, 198, 31, 9800, 25, 20461, 971, 198, 37811, 198, 2, 6127, 2604, 2070, 198, 2, 838, 13, ...
2.274002
4,135
# Uses python3 import sys if __name__ == '__main__': input = sys.stdin.readline() n = int(input) print(fibonacci_sum_faster(n))
[ 2, 36965, 21015, 18, 198, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5128, 796, 25064, 13, 19282, 259, 13, 961, 1370, 3419, 198, 220, 220, 220, 299, 796, 493, 7, 15414,...
2.253968
63
# encoding: utf-8 import re from django import template register = template.Library() @register.filter def truncchar(value, arg): ''' Truncate after a certain number of characters. Source: http://www.djangosnippets.org/snippets/194/ Notes ----- Super stripped down filter to truncate after...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 24455, 198, 4299, 40122, 10641, 7, 8367, 11, 1822, 2599, 198, 22...
2.648069
466
#!/usr/bin/env python import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(27,GPIO.OUT) GPIO.output(27,GPIO.HIGH) time.sleep(2) GPIO.output(27,GPIO.LOW)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 2749, 44, 8, 198, 16960, 9399, 13, 2617, 40539, 654, 7, 25...
2.073684
95
# Copyright 2018 Jetperch LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 2864, 19013, 525, 354, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921...
2.218591
3,335
# Copyright 2019 the gRPC authors. # # 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 wri...
[ 2, 15069, 13130, 262, 308, 49, 5662, 7035, 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.550162
309
# Generated by Django 3.0.6 on 2020-05-14 20:41 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 1415, 1160, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#MenuTitle: New Tab with Overlaps # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Opens a new Edit tab containing all glyphs that contain overlaps. """ import copy thisFont = Glyphs.font # frontmost font master_ids = [master.id for master in thisFont.masters] # al...
[ 2, 23381, 19160, 25, 968, 16904, 351, 3827, 75, 1686, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 834, 15390, 8...
2.824926
337
import random import datetime import asyncio import math import matplotlib.pyplot as plt import numpy as np import os import json import discord from discord.ext import commands intents = discord.Intents.default() intents.members = True intents.reactions = True intents.messages = True client = commands.Bot(command_pref...
[ 11748, 4738, 198, 11748, 4818, 8079, 198, 11748, 30351, 952, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 36446, 198...
3.071672
293
#coding=utf-8 import numpy import random import torch from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import Matern from scipy.stats import norm import random import os from numpy import argmax import argparse global accuracy_loss_constraint, latency_constr...
[ 2, 66, 7656, 28, 40477, 12, 23, 201, 198, 11748, 299, 32152, 201, 198, 11748, 4738, 201, 198, 11748, 28034, 201, 198, 6738, 1341, 35720, 13, 4908, 31562, 62, 14681, 1330, 12822, 31562, 18709, 8081, 44292, 201, 198, 6738, 1341, 35720, ...
2.192742
1,681
""" This is the module where the model is defined. It uses the nn.Module as backbone to create the network structure """ # Own modules # Built in import math # Libs import numpy as np # Pytorch module import torch.nn as nn import torch.nn.functional as F import torch """ class Decoder(nn....
[ 37811, 201, 198, 1212, 318, 262, 8265, 810, 262, 2746, 318, 5447, 13, 632, 3544, 262, 299, 77, 13, 26796, 355, 32774, 284, 2251, 262, 3127, 4645, 201, 198, 37811, 201, 198, 2, 11744, 13103, 201, 198, 201, 198, 2, 28477, 287, 201, ...
2.000758
2,638
""" * This file is part of the subhajeet2107/pylexer package. * * (c) Subhajeet Dey <subhajeet2107@gmail.com> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. """ from pylex.config.lexer_config import LexerConfig from pylex.config.token_defination imp...
[ 37811, 198, 1635, 770, 2393, 318, 636, 286, 262, 850, 71, 1228, 68, 316, 17, 15982, 14, 79, 2349, 87, 263, 5301, 13, 198, 1635, 198, 1635, 357, 66, 8, 3834, 71, 1228, 68, 316, 1024, 88, 1279, 7266, 71, 1228, 68, 316, 17, 15982, ...
3.020979
143
''' Generate an 0.1.x cortex for testing migration to 0.2.x ''' import os import json import shutil import asyncio import hashlib import synapse.common as s_common import synapse.cortex as s_cortex import synapse.lib.cell as s_cell import synapse.lib.module as s_module import synapse.lib.version as s_version import s...
[ 7061, 6, 198, 8645, 378, 281, 657, 13, 16, 13, 87, 20223, 329, 4856, 13472, 284, 657, 13, 17, 13, 87, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 4423, 346, 198, 11748, 30351, 952, 198, 11748, 12234, 8019, 198, ...
2.55642
257
import PySimpleGUI as sg from support import Velocity, Distance, Time, Acceleration from os import getlogin from re import sub error_count = 0 sg.set_options(element_padding=(5,5),icon="images/icon.ico",) sg.change_look_and_feel('blueMono') layout = [ [sg.Text('Initial Velocity'), sg.InputText(focus=Tru...
[ 11748, 9485, 26437, 40156, 355, 264, 70, 201, 198, 6738, 1104, 1330, 43137, 11, 34600, 11, 3862, 11, 29805, 341, 201, 198, 6738, 28686, 1330, 651, 38235, 201, 198, 6738, 302, 1330, 850, 201, 198, 201, 198, 18224, 62, 9127, 796, 657, ...
2.207181
3,036
import random from crypto_commons.generic import long_to_bytes, multiply, factorial from crypto_commons.rsa.rsa_commons import ensure_long, modinv, lcm_multi """ Here are some less popular asymmetric cryptosystems: - Damgard-Jurik - Paillier (same as Damgard Jurik for s = 1) """ def paillier_encrypt(m, g, n, r): ...
[ 11748, 4738, 198, 198, 6738, 21473, 62, 9503, 684, 13, 41357, 1330, 890, 62, 1462, 62, 33661, 11, 29162, 11, 1109, 5132, 198, 6738, 21473, 62, 9503, 684, 13, 3808, 64, 13, 3808, 64, 62, 9503, 684, 1330, 4155, 62, 6511, 11, 953, 16...
2.412987
1,155
mats = [ Mat(**m) for m in [ { "name": "Bronze", "smithing": 1, "forging": 15, "forging_levels": [1], "forging_burial": False, }, { "name": "Iron", "smithing": 2, "forging": 40, "f...
[ 76, 1381, 796, 685, 198, 220, 220, 220, 6550, 7, 1174, 76, 8, 198, 220, 220, 220, 329, 285, 287, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 3...
1.54339
1,233
from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 198, 6738, 42625...
3.636364
55
from typing import List if __name__ == '__main__': s = Solution() nums1 = [1, 2, 3] nums2 = [2, 3, 4, 5] # nums1 = [0, 0] # nums2 = [0, 0] print(s.findMedianSortedArrays(nums1=nums1, nums2=nums2))
[ 6738, 19720, 1330, 7343, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 264, 796, 28186, 3419, 198, 220, 220, 220, 997, 82, 16, 796, 685, 16, 11, 362, 11, 513, 60, 198, 220, 220, 220, ...
1.898305
118
# -*- coding: utf-8 -*- # @Author : Lyu Kui # @Email : 9428.al@gmail.com # @Created Date : 2021-02-24 13:58:46 # @Last Modified : 2021-03-05 18:14:17 # @Description : import tensorflow as tf from .nets.efficientnet import EfficientNetB0, EfficientNetB1, EfficientNetB2, EfficientNetB3 from .nets.effi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 220, 220, 220, 220, 220, 220, 1058, 9334, 84, 509, 9019, 198, 2, 2488, 15333, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 10048, 2078, 13, 282...
2.327027
370
from libs import *
[ 6738, 9195, 82, 1330, 1635, 201 ]
3.166667
6
from PygameFloatObjects.objects import * # circle_example()
[ 6738, 9485, 6057, 43879, 10267, 82, 13, 48205, 1330, 1635, 628, 628, 198, 2, 9197, 62, 20688, 3419, 198 ]
3.368421
19
''' This example demonstrates creating and usind an AdvancedEffectBase. In this case, we use it to efficiently pass the touch coordinates into the shader. ''' from kivy.base import runTouchApp from kivy.properties import ListProperty from kivy.lang import Builder from kivy.uix.effectwidget import EffectWidget, Advance...
[ 7061, 6, 198, 1212, 1672, 15687, 4441, 290, 514, 521, 281, 13435, 18610, 14881, 13, 554, 198, 5661, 1339, 11, 356, 779, 340, 284, 18306, 1208, 262, 3638, 22715, 656, 262, 33030, 13, 198, 7061, 6, 198, 198, 6738, 479, 452, 88, 13, ...
2.709091
330
from typing import Union from hypothesis import given from tests.utils import (FractionWithBuiltin, IntWithBuiltin, equivalence) from . import strategies @given(strategies.fractions_with_builtins, strategies.fractions_or_ints_with_builtins)
[ 6738, 19720, 1330, 4479, 198, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 5254, 13, 26791, 1330, 357, 37, 7861, 3152, 39582, 259, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.396825
126
#################### # Import Libraries #################### import os import sys import cv2 import numpy as np import pandas as pd import pytorch_lightning as pl from pytorch_lightning.metrics import Accuracy from pytorch_lightning import loggers from pytorch_lightning import seed_everything from pytorch_lightning im...
[ 14468, 4242, 198, 2, 17267, 46267, 198, 14468, 4242, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 12972, 13165, 354, 62, 2971, ...
2.701881
691
#!/shared/anaconda/bin/python # encoding=utf8 from __future__ import print_function from __future__ import division from __future__ import unicode_literals from builtins import bytes, chr from builtins import str from builtins import dict from builtins import object from builtins import range from builtins import map ...
[ 2, 48443, 28710, 14, 272, 330, 13533, 14, 8800, 14, 29412, 198, 2, 21004, 28, 40477, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 28000, 109...
3.114894
235
# Copyright 2017 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ 2, 15069, 2177, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330...
3.811321
159
import time from django.test import TestCase from algoliasearch_django import algolia_engine from algoliasearch_django import get_adapter from algoliasearch_django import register from algoliasearch_django import unregister from algoliasearch_django import raw_search from algoliasearch_django import clear_index from ...
[ 11748, 640, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 435, 70, 349, 4448, 3679, 62, 28241, 14208, 1330, 435, 70, 22703, 62, 18392, 198, 6738, 435, 70, 349, 4448, 3679, 62, 28241, 14208, 1330, 651, 62, ...
3.275
120
from .grade_metric import GradeMetric import types class NCU(GradeMetric): ''' NCU (Normalised Cumulative Utility) See Sakai. T. and Robertson, S.: Modelling A User Population for Designing Information Retrieval Metrics, EVIA 2008. Args: xrelnum: the number of judged X-rel docs (including 0-r...
[ 6738, 764, 9526, 62, 4164, 1173, 1330, 22653, 9171, 1173, 198, 11748, 3858, 198, 198, 4871, 8823, 52, 7, 42233, 9171, 1173, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 8823, 52, 357, 26447, 1417, 27843, 13628, 34030, 8, ...
2.831633
1,372
""" This automation attempts to remove a tag for a resource, identified as above or below the configured threshold by Hyperglance Rule(s) This automation will operate across accounts, where the appropriate IAM Role exists. """ import logging import processing.automation_utils as utils logger = logging.getLogger() l...
[ 37811, 198, 198, 1212, 22771, 6370, 284, 4781, 257, 7621, 329, 257, 8271, 11, 5174, 355, 2029, 393, 2174, 262, 17839, 11387, 198, 1525, 15079, 4743, 590, 14330, 7, 82, 8, 198, 198, 1212, 22771, 481, 8076, 1973, 5504, 11, 810, 262, 5...
3.160494
324
''' This file contains helper functions ''' from datetime import timedelta def date_range(start_date, end_date): ''' Name: dateRange Input: start date end date Output: list of dates Purpose: generate list of dates between start and end ''' # now re...
[ 7061, 6, 198, 220, 220, 220, 770, 2393, 4909, 31904, 5499, 198, 7061, 6, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 4299, 3128, 62, 9521, 7, 9688, 62, 4475, 11, 886, 62, 4475, 2599, 198, 220, 220, 220, 705, 7061, 198, 22...
2.441799
378
"""File list helper functions.""" import re def generate_glob_and_replacer(search, replace): """ Prepare a wildcard pattern for globbing and replacing. :param search: :param replace: :return: """ replace = generate_replacer(search, replace) glob_pattern = prepare_for_regex(search, tas...
[ 37811, 8979, 1351, 31904, 5499, 526, 15931, 198, 11748, 302, 628, 198, 4299, 7716, 62, 4743, 672, 62, 392, 62, 35666, 11736, 7, 12947, 11, 6330, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 43426, 257, 4295, 9517, 3912, 329, ...
2.53303
439
from aiogram import types from aiogram.utils.callback_data import CallbackData from money_bot.utils.strings import ADD_TASKS_MENU_TEXT, EARN_MENU_TEXT, MAIN_MENU_BUTTONS_LABELS earn_factory = CallbackData("earn", "skip") add_tasks_factory = CallbackData("add_tasks", "data")
[ 6738, 257, 72, 21857, 1330, 3858, 198, 6738, 257, 72, 21857, 13, 26791, 13, 47423, 62, 7890, 1330, 4889, 1891, 6601, 198, 198, 6738, 1637, 62, 13645, 13, 26791, 13, 37336, 1330, 27841, 62, 51, 1921, 27015, 62, 49275, 52, 62, 32541, ...
2.67619
105
import requests import regex as re import sys import socket import ssl import datetime try: from http.client import HTTPConnection except ImportError: from httplib import HTTPConnection from requests.packages.urllib3.connection import VerifiedHTTPSConnection requests.packages.urllib3.connectionpool.HTTPConnection =...
[ 11748, 7007, 198, 11748, 40364, 355, 302, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 264, 6649, 198, 11748, 4818, 8079, 198, 198, 28311, 25, 198, 197, 6738, 2638, 13, 16366, 1330, 14626, 32048, 198, 16341, 17267, 12331, 25, 198, ...
2.746627
667
import torch.optim as optim from .adamw import AdamW from .adabound import AdaBound, AdaBoundW from .asam import SAM, ASAM
[ 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 764, 324, 321, 86, 1330, 7244, 54, 198, 6738, 764, 324, 397, 633, 1330, 47395, 49646, 11, 47395, 49646, 54, 198, 6738, 764, 292, 321, 1330, 28844, 11, 7054, 2390, 628 ]
3.179487
39
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', 'user_profile.views.profile', name="user_profile"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 705, 7220, 62, 13317, 13, 33571, 13, 13317, 3256, 1438, 2...
2.72549
51
from __future__ import division import re from werkzeug.exceptions import BadRequest from flask import current_app from munimap.grid import Grid import logging log = logging.getLogger(__name__) MISSING = object() PRINT_NAME_REGEX = re.compile(r'^[0-9a-zA-Z_\.\-]+$')
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 302, 198, 6738, 266, 9587, 2736, 1018, 13, 1069, 11755, 1330, 7772, 18453, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 198, 6738, 29856, 320, 499, 13, 25928, 1330, 24846, 198, 198, ...
2.75
100
import os import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * # # PlotsSelfTest # # # PlotsSelfTestWidget # # # PlotsSelfTestLogic # class PlotsSelfTestLogic(ScriptedLoadableModuleLogic): """This class should implement all the actual computation done by your module. The inte...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 410, 30488, 11, 10662, 83, 11, 269, 30488, 11, 14369, 263, 198, 6738, 14369, 263, 13, 7391, 276, 8912, 540, 26796, 1330, 1635, 198, 198, 2, 198, 2, 1345, 1747, 24704, 14402, 198, ...
4.248366
306