content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import pprint from typing import Optional, List, Tuple, Set, Dict import numpy as np from overrides import overrides from python.handwritten_baseline.pipeline.data.base import Dataset from python.handwritten_baseline.pipeline.model.feature_extr import DEBUG_EXTR from python.handwritten_baseline.pipeline.model.feature...
[ 11748, 279, 4798, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 309, 29291, 11, 5345, 11, 360, 713, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 23170, 1460, 1330, 23170, 1460, 198, 198, 6738, 21015, 13, 4993, 15266, 62, 12093, ...
3.297297
111
# -*- coding: utf-8 -*- # # Author: Tomi Jylh-Ollila, Finland 2014 # # This file is part of Kunquat. # # CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/ # # To the extent possible under law, Kunquat Affirmers have waived all # copyright and related or neighboring rights to Kunquat. # from __futur...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 6434, 25, 4186, 72, 449, 2645, 71, 12, 46, 297, 10102, 11, 17837, 1946, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 22673, 421, 265, 13, 198, 2, 19...
3.040201
199
import warnings import unittest from igraph import * def suite(): atlas_suite = unittest.makeSuite(GraphAtlasTests) isoclass_suite = unittest.makeSuite(IsoclassTests) return unittest.TestSuite([atlas_suite, isoclass_suite]) def test(): runner = unittest.TextTestRunner() runner.run(suite()) ...
[ 198, 198, 11748, 14601, 198, 11748, 555, 715, 395, 198, 6738, 45329, 1470, 1330, 1635, 198, 198, 4299, 18389, 33529, 198, 220, 220, 220, 379, 21921, 62, 2385, 578, 796, 555, 715, 395, 13, 15883, 5606, 578, 7, 37065, 2953, 21921, 51, ...
2.425676
148
import dataclasses import enum # Set of types considered to be simple. CL_TYPES_SIMPLE = { CLType.BOOL, CLType.I32, CLType.I64, CLType.KEY, CLType.PUBLIC_KEY, CLType.STRING, CLType.U8, CLType.U32, CLType.U64, CLType.U128, CLType.U256, CLType.U512, CLType.UNIT, ...
[ 11748, 4818, 330, 28958, 198, 11748, 33829, 628, 628, 198, 2, 5345, 286, 3858, 3177, 284, 307, 2829, 13, 198, 5097, 62, 9936, 47, 1546, 62, 48913, 16437, 796, 1391, 198, 220, 220, 220, 7852, 6030, 13, 8202, 3535, 11, 198, 220, 220, ...
1.874346
191
# -*- coding: utf-8 -*- # Copyright 2020 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 o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 12131, 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, 4...
3.385965
228
# Copyright (c) 2009 Bryan Cain ("Plombo") # Class and functions to read .PAK files. import struct from cStringIO import StringIO def get_file(pak, borfile): '''Prevents a need to directly use PackFileReader when you only want to get one file, like in borplay and bor2wav. Returns a file-like object.'''...
[ 2, 15069, 357, 66, 8, 3717, 17857, 28370, 5855, 3646, 47265, 4943, 201, 198, 2, 5016, 290, 5499, 284, 1100, 764, 4537, 42, 3696, 13, 201, 198, 201, 198, 11748, 2878, 201, 198, 6738, 269, 10100, 9399, 1330, 10903, 9399, 201, 198, 197...
2.510264
341
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Created by magus0219[magus0219@gmail.com] on 2020/3/23 from types import FunctionType from flask import ( Flask, redirect, url_for, ) import artascope.src.web.lib.filter as module_filter from artascope.src.web.lib.content_processor import inject_version
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15622, 416, 2153, 385, 2999, 1129, 58, 19726, 385, 2999, 1129, 31, 14816, 13, 785, 60, 319, 12131, 1...
2.658333
120
# Copyright 2019 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 # # Unless required by applicable law or agreed to...
[ 2, 15069, 13130, 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.848442
706
""" Utility functions and classes shared by multiple backends """ from collections import namedtuple import logging from . import symbols from . import types LOGGER = logging.getLogger('spc.backend_utils') # NameContexts encapsulate both the function stack (which holds values) and # the symbol table context (which b...
[ 37811, 198, 18274, 879, 5499, 290, 6097, 4888, 416, 3294, 736, 2412, 198, 37811, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 18931, 198, 198, 6738, 764, 1330, 14354, 198, 6738, 764, 1330, 3858, 198, 198, 25294, 30373, 796, 1893...
2.373009
2,260
__version__ = "2021.0.6"
[ 834, 9641, 834, 796, 366, 1238, 2481, 13, 15, 13, 21, 1, 198 ]
1.923077
13
""" recommender_engine ----- recommender_engine is a recommendation application using either item-based or user-based approaches :copyright: (c) 2016 - 2019 by Tran Ly Vu. All Rights Reserved. :license: Apache License 2.0 """ from .cosine import cosine from .euclidean_distance import euclidean_distance from .p...
[ 37811, 198, 197, 47335, 2194, 62, 18392, 198, 197, 30934, 198, 197, 47335, 2194, 62, 18392, 318, 257, 15602, 3586, 1262, 2035, 2378, 12, 3106, 393, 2836, 12, 3106, 10581, 628, 197, 25, 22163, 4766, 25, 357, 66, 8, 1584, 532, 13130, ...
3.036735
245
a,b=map(int,input().split()) print((a+b)%24)
[ 64, 11, 65, 28, 8899, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 4798, 19510, 64, 10, 65, 8, 4, 1731, 8 ]
2
22
if __name__ == '__main__': import doctest doctest.testmod()
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 10412, 395, 198, 220, 220, 220, 10412, 395, 13, 9288, 4666, 3419 ]
2.366667
30
import math import torch import unittest import gpytorch from torch import optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import GaussianLikelihood from gpytorch.random_variables import GaussianRandomVariable # Simple ...
[ 11748, 10688, 198, 11748, 28034, 198, 11748, 555, 715, 395, 198, 11748, 308, 9078, 13165, 354, 198, 6738, 28034, 1330, 6436, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 308, 9078, 13165, 354, 13, 74, 44930, 1330, 1798...
2.912037
216
from CyberSource import * import os import json from importlib.machinery import SourceFileLoader config_file = os.path.join(os.getcwd(), "data", "Configuration.py") configuration = SourceFileLoader("module.name", config_file).load_module() # To delete None values in Input Request Json body if __name__ == "__main__":...
[ 6738, 15101, 7416, 1330, 1635, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 1330, 8019, 13, 76, 620, 15451, 1330, 8090, 8979, 17401, 198, 198, 11250, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 1136, 66, 16993, 22784, 3...
3.261261
111
import numpy as np import random import math import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import style angle = np.linspace( 0 , 2 * np.pi , 150) radius = 1 x = radius * np.cos(angle) y = radius * np.sin(angle) #prints the circle style.use('fivethirtyeight') fig = plt.f...
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 6738, 2603, 29487, 8019, 1330, 3918, ...
2.719101
178
""" This is where the web application starts running """ from app.index import create_app app = create_app() if __name__ == "__main__": app.secret_key = 'mysecret' app.run(port=8080, host="0.0.0.0", debug=True)
[ 37811, 198, 1212, 318, 810, 262, 3992, 3586, 4940, 2491, 198, 37811, 198, 6738, 598, 13, 9630, 1330, 2251, 62, 1324, 198, 1324, 796, 2251, 62, 1324, 3419, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, ...
2.703704
81
# Time: sum(O(l * 2^l) for l in range(1, 11)) = O(20 * 2^10) = O(1) # Space: O(1)
[ 2, 3862, 25, 220, 2160, 7, 46, 7, 75, 1635, 362, 61, 75, 8, 329, 300, 287, 2837, 7, 16, 11, 1367, 4008, 796, 440, 7, 1238, 1635, 362, 61, 940, 8, 796, 440, 7, 16, 8, 198, 2, 4687, 25, 440, 7, 16, 8, 198 ]
1.804348
46
# -*- coding: utf-8 -*- from __future__ import unicode_literals try: from django.core.urlresolvers import reverse except ImportError: # Django 2.0 from django.urls import reverse from django.utils.translation import force_text from cms import api from cms.utils.i18n import force_language from aldryn_peop...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, ...
3.11039
154
# Copyright (C) 2020 THL A29 Limited, a Tencent company. # All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may # not use this file except in compliance with the License. You may # obtain a copy of the License at # https://opensource.org/licenses/BSD-3-Clause # Unless required by appl...
[ 2, 15069, 357, 34, 8, 12131, 2320, 43, 317, 1959, 15302, 11, 257, 9368, 1087, 1664, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2,...
4.006061
165
# This script contains the get_joke() function to generate a new dad joke import requests def get_joke(): """Return new joke string from icanhazdadjoke.com.""" url = "https://icanhazdadjoke.com/" response = requests.get(url, headers={'Accept': 'application/json'}) raw_joke = response.json() joke ...
[ 2, 770, 4226, 4909, 262, 651, 62, 73, 2088, 3419, 2163, 284, 7716, 257, 649, 9955, 9707, 198, 198, 11748, 7007, 628, 198, 4299, 651, 62, 73, 2088, 33529, 198, 220, 220, 220, 37227, 13615, 649, 9707, 4731, 422, 220, 7490, 71, 1031, ...
2.84
125
from .test_commands import all_commands all_triggers = all_commands from .test_quack import TestQuack all_triggers.append(TestQuack)
[ 6738, 764, 9288, 62, 9503, 1746, 1330, 477, 62, 9503, 1746, 198, 198, 439, 62, 2213, 328, 5355, 796, 477, 62, 9503, 1746, 198, 198, 6738, 764, 9288, 62, 421, 441, 1330, 6208, 4507, 441, 198, 198, 439, 62, 2213, 328, 5355, 13, 3329...
2.72
50
from __future__ import print_function from crassus import Crassus from crassus.output_converter import OutputConverter def cfn_output_converter(event, context): """ Convert an AWS CloudFormation output message to our defined ResultMessage format. """ output_converter = OutputConverter(event, cont...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 1067, 562, 385, 1330, 3864, 562, 385, 198, 6738, 1067, 562, 385, 13, 22915, 62, 1102, 332, 353, 1330, 25235, 3103, 332, 353, 628, 198, 198, 4299, 269, 22184, 62, 22915, 62, 1...
3.068966
116
import sys success = False in_ironpython = "IronPython" in sys.version if in_ironpython: try: from ironpython_clipboard import GetClipboardText, SetClipboardText success = True except ImportError: pass else: try: from win32_clipboard import GetClipboardText, SetClipboardTex...
[ 11748, 25064, 198, 198, 13138, 796, 10352, 198, 259, 62, 1934, 29412, 796, 366, 22797, 37906, 1, 287, 25064, 13, 9641, 198, 361, 287, 62, 1934, 29412, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 422, ...
2.257143
420
import logging logging.disable(logging.CRITICAL) import math from tabulate import tabulate from mjrl.utils.make_train_plots import make_train_plots from mjrl.utils.gym_env import GymEnv from mjrl.samplers.core import sample_paths import numpy as np import torch import pickle import imageio import time as timer import o...
[ 11748, 18931, 198, 6404, 2667, 13, 40223, 7, 6404, 2667, 13, 9419, 2043, 20151, 8, 198, 11748, 10688, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 6738, 285, 73, 45895, 13, 26791, 13, 15883, 62, 27432, 62, 489, 1747, 1330, 787, 62, ...
2.380571
875
import json from datetime import timedelta from decimal import Decimal import pytest from django.utils.timezone import now from pretix.base.models import Event, Order, OrderRefund, Organizer, Team, User from pretix.plugins.banktransfer.models import RefundExport from pretix.plugins.banktransfer.views import ( _ro...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 783, 198, 198, 6738, 2181, 844, 13, 8692, 13, 27530, 1...
1.862298
1,053
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 from django.conf.urls.defaults import patterns, url from datawinners.alldata.views import get_entity_list_by_type from datawinners.alldata.views import smart_phone_instruction from datawinners.alldata.views import index, reports from datawinners.alldata.views import failed_s...
[ 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 21004, 28, 40477, 12, 23, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 7572, 11, 19016, 198, 6738, 4818, 707, 259, 2741, 13, 282, ...
2.716511
321
from NewLifeUtils.ColorModule import ACC, MCC from NewLifeUtils.UtilsModule import hex_to_rgb from NewLifeUtils.FileModule import DataStorage, LogFile from NewLifeUtils.StringUtilModule import remove_csi from datetime import datetime import sys log, wrn, err, tip, rea = init_from_cfg()
[ 6738, 968, 14662, 18274, 4487, 13, 10258, 26796, 1330, 15859, 11, 337, 4093, 198, 6738, 968, 14662, 18274, 4487, 13, 18274, 4487, 26796, 1330, 17910, 62, 1462, 62, 81, 22296, 198, 6738, 968, 14662, 18274, 4487, 13, 8979, 26796, 1330, 60...
3.152174
92
from rest_framework import routers from boards.api.viewsets import BoardViewSet from fleets.api.viewsets import FleetViewSet from missiles.api.viewsets import MissileViewSet app_name = 'api' router = routers.DefaultRouter() router.register(r'boards', BoardViewSet, base_name='board') router.register(r'fleets', FleetV...
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 11490, 13, 15042, 13, 1177, 28709, 1330, 5926, 7680, 7248, 198, 6738, 39439, 13, 15042, 13, 1177, 28709, 1330, 20001, 7680, 7248, 198, 6738, 12798, 13, 15042, 13, 1177, 28709, 1330, 25...
3.211679
137
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 14:22, 11/04/2020 % # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 16529, 3880, 23031, 4, 198, 2, 15622, 416, 366, 817, 22304, 42379, 1, 379, 1478, 25, 1828, 11, 1367, 14, 3023, 14, 42334, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.864143
449
from estimagic.inference.ml_covs import cov_cluster_robust from estimagic.inference.ml_covs import cov_hessian from estimagic.inference.ml_covs import cov_jacobian from estimagic.inference.ml_covs import cov_robust from estimagic.inference.ml_covs import cov_strata_robust from estimagic.inference.shared import calculat...
[ 6738, 3959, 9083, 13, 259, 4288, 13, 4029, 62, 66, 709, 82, 1330, 39849, 62, 565, 5819, 62, 22609, 436, 198, 6738, 3959, 9083, 13, 259, 4288, 13, 4029, 62, 66, 709, 82, 1330, 39849, 62, 33979, 666, 198, 6738, 3959, 9083, 13, 259, ...
2.854848
5,415
import six import chainer import numpy as np import chainer.links as L import chainer.functions as F import nutszebra_chainer import functools from collections import defaultdict def __call__(self, x, train=False): x = [x] outputs = [] for i in six.moves.range(len(self.out_channels)): ...
[ 11748, 2237, 198, 11748, 6333, 263, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 6333, 263, 13, 28751, 355, 406, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 11748, 14380, 89, 37052, 62, 7983, 263, 198, 11748, 1257, 310, ...
2.149847
654
import pytest from abra import Experiment, HypothesisTest def test_proportions_delta_experiment_t(proportions_data_small): """Small sample sizes defautl to t-tests""" exp = Experiment(proportions_data_small.sample(29), name='proportions-test') test_aa = HypothesisTest( metric='metric', ...
[ 11748, 12972, 9288, 198, 6738, 450, 430, 1330, 29544, 11, 21209, 313, 8497, 14402, 628, 628, 198, 198, 4299, 1332, 62, 1676, 634, 507, 62, 67, 12514, 62, 23100, 3681, 62, 83, 7, 1676, 634, 507, 62, 7890, 62, 17470, 2599, 198, 220, ...
2.555556
198
# -*- coding: utf-8 -*- # pylint: disable= """ Tanuki Java Service Wrapper runtime environment. Debian JSW paths (Wheezy 3.5.3; Jessie 3.5.22):: /usr/sbin/wrapper ELF executable /usr/share/wrapper/daemon.sh /usr/share/wrapper/make-wrapper-init.sh /usr/share/wrapper/wrapper.conf ""...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 279, 2645, 600, 25, 15560, 28, 198, 37811, 11818, 11308, 7349, 4809, 27323, 2848, 19124, 2858, 13, 628, 220, 220, 220, 26062, 449, 17887, 13532, 357, 10842, 68, 7357,...
3.120846
331
import numpy as np
[ 11748, 299, 32152, 355, 45941, 201, 198 ]
2.857143
7
from copy import copy DEFAULT_SCHEDULE = {} for day in "lmwjvs": for mod in "12345678": DEFAULT_SCHEDULE[day + mod] = "'FREE'" def process_schedule(text_sc): """For a given schedule text in BC format, returns the SQL queries for inserting the full schedule and schedule info. Those queries have t...
[ 6738, 4866, 1330, 4866, 628, 198, 7206, 38865, 62, 50, 3398, 1961, 24212, 796, 23884, 198, 1640, 1110, 287, 366, 75, 76, 86, 73, 14259, 1298, 198, 220, 220, 220, 329, 953, 287, 366, 10163, 2231, 30924, 1298, 198, 220, 220, 220, 220,...
2.321178
713
# Copyright 2012 Nebula, 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 agree...
[ 2, 15069, 2321, 46915, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.322284
543
"""Tests for YesssSMS."""
[ 37811, 51, 3558, 329, 575, 408, 82, 50, 5653, 526, 15931, 198 ]
2.166667
12
# This is used by Environment to populate its env # Due to circular dependencies it cannot reference other parts of bldr import toml
[ 2, 770, 318, 973, 416, 9344, 284, 48040, 663, 17365, 198, 2, 14444, 284, 18620, 20086, 340, 2314, 4941, 584, 3354, 286, 275, 335, 81, 198, 11748, 284, 4029 ]
4.551724
29
import re from typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.events import SlotSet import lark_module
[ 11748, 302, 198, 6738, 19720, 1330, 4377, 11, 8255, 11, 360, 713, 11, 7343, 198, 198, 6738, 374, 15462, 62, 21282, 74, 1330, 7561, 11, 26885, 198, 6738, 374, 15462, 62, 21282, 74, 13, 18558, 38409, 1330, 9745, 278, 7279, 8071, 2044, ...
3.140625
64
from baseparser import BaseParser, grab_url, logger # Different versions of BeautifulSoup have different properties. # Some work with one site, some with another. # This is BeautifulSoup 3.2. from BeautifulSoup import BeautifulSoup # This is BeautifulSoup 4 import bs4
[ 6738, 1615, 538, 28198, 1330, 7308, 46677, 11, 5552, 62, 6371, 11, 49706, 198, 198, 2, 20615, 6300, 286, 23762, 50, 10486, 423, 1180, 6608, 13, 198, 2, 2773, 670, 351, 530, 2524, 11, 617, 351, 1194, 13, 198, 2, 770, 318, 23762, 50...
3.763889
72
import os import sys from queue import Queue from threading import Thread from helper.pytest import DoltConnection # Utility functions UPDATE_BRANCH_FAIL_MSG = "Failed to update branch" # work functions # test script MAX_SIMULTANEOUS_CONNECTIONS = 2 PORT_STR = sys.argv[1] CONNECTIONS = [None]*MAX_SIMULTANEOU...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 6738, 31904, 13, 9078, 9288, 1330, 360, 5978, 32048, 628, 198, 2, 34030, 5499, 198, 198, 16977, 62, 11473, 1565, 3398,...
2.674883
852
from requests import get, post, exceptions from datetime import datetime from PyQt5 import QtWidgets, QtCore from PyQt5.QtWidgets import QMessageBox from PyQt5.QtGui import QFont from qtwidgets import PasswordEdit from client_commands import (help_client, online, status, myself, reg, role, ban, unban) from client_con...
[ 6738, 7007, 1330, 651, 11, 1281, 11, 13269, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 11, 33734, 14055, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1...
3.247619
210
from __future__ import unicode_literals import inspect import os import signal import sys import threading import weakref from wcwidth import wcwidth from six.moves import range __all__ = ( 'Event', 'DummyContext', 'get_cwidth', 'suspend_to_background_supported', 'is_conemu_ansi'...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 201, 198, 11748, 10104, 201, 198, 11748, 28686, 201, 198, 11748, 6737, 201, 198, 11748, 25064, 201, 198, 11748, 4704, 278, 201, 198, 11748, 4939, 5420, 201, 198, 201, 198, 6738...
2.331839
1,115
# # Copyright 2013 The py-lmdb authors, all rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted only as authorized by the OpenLDAP # Public License. # # A copy of this license is available in the file LICENSE in the # top-level directory of the distribut...
[ 2, 198, 2, 15069, 2211, 383, 12972, 12, 75, 9132, 65, 7035, 11, 477, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 691, 355, 10435, 41...
2.031152
6,677
# default_exp core #hide from nbdev.showdoc import * from fastcore.test import * # export import os import torch from torch import nn from torch.nn import functional as F from torch.utils.data import DataLoader import warnings import torchvision from torchvision.datasets import MNIST, ImageFolder from torchvision...
[ 2, 4277, 62, 11201, 4755, 628, 198, 2, 24717, 198, 6738, 299, 65, 7959, 13, 12860, 15390, 1330, 1635, 198, 6738, 3049, 7295, 13, 9288, 1330, 1635, 628, 198, 2, 10784, 220, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 28034, ...
2.65037
675
from seedwork.application.modules import BusinessModule from modules.iam.application.services import AuthenticationService
[ 6738, 9403, 1818, 13, 31438, 13, 18170, 1330, 7320, 26796, 198, 198, 6738, 13103, 13, 1789, 13, 31438, 13, 30416, 1330, 48191, 16177, 628 ]
5.208333
24
# Copyright 2015 Ufora 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 i...
[ 2, 220, 220, 15069, 1853, 471, 1640, 64, 3457, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.190202
347
import os import gc import random import numpy as np import torch def memory_cleanup(): """ Cleans up GPU memory https://github.com/huggingface/transformers/issues/1742 """ for obj in gc.get_objects(): if torch.is_tensor(obj): del obj gc.collect() torch.cuda.empty_...
[ 11748, 28686, 198, 11748, 308, 66, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 220, 220, 220, 220, 198, 198, 4299, 4088, 62, 27773, 929, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3779, 504...
2.326241
141
from conans import ConanFile, CMake, tools import os import shutil required_conan_version = ">=1.43.0"
[ 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 11, 4899, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 35827, 62, 1102, 272, 62, 9641, 796, 366, 29, 28, 16, 13, 3559, 13, 15, 1, 628 ]
2.837838
37
#!/usr/bin/env python # # Copyright 2007 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 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, 284...
2.604284
24,558
# flake8: noqa import warnings import pytest import torch from sklearn.exceptions import UndefinedMetricWarning from sklearn.metrics import recall_score from torchflare.metrics.recall_meter import Recall from torchflare.metrics.meters import _BaseInputHandler torch.manual_seed(42)
[ 2, 781, 539, 23, 25, 645, 20402, 198, 11748, 14601, 198, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 6738, 1341, 35720, 13, 1069, 11755, 1330, 13794, 18156, 9171, 1173, 20361, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 10014, 6...
3.272727
88
from __future__ import unicode_literals import unittest from ..utils import compose, flatten, truncate, join, unary, equals
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 11485, 26791, 1330, 36664, 11, 27172, 268, 11, 40122, 378, 11, 4654, 11, 555, 560, 11, 21767, 628, 628, 628, 198 ]
3.3
40
from Utils.Array import input_array # Time : O(n2) # Space : O(1) Constant space """ Ill be having 2 pointers here one of them will move through the array looking for -ve numbers to operate on and another will be pointing to the correct location where i can put the -ve elements, after i find them also this same...
[ 6738, 7273, 4487, 13, 19182, 1330, 5128, 62, 18747, 198, 198, 2, 3862, 220, 1058, 440, 7, 77, 17, 8, 198, 2, 4687, 1058, 440, 7, 16, 8, 20217, 2272, 628, 198, 37811, 198, 21478, 307, 1719, 362, 32007, 994, 198, 505, 286, 606, 48...
2.885387
349
# coding=utf8 import socket import select from datetime import datetime from datetime import timedelta EOL = b'\n\n' response = b'HTTP/1.0 200 OK\nDate: Mon, 1 Jan 1996 01:01:01 GMT\n' response += b'Content-Type: text/plain\nContent-Length: 13\n\n' response += b'Hello, world!\n' # serversocket = socket...
[ 2, 19617, 28, 40477, 23, 201, 198, 201, 198, 11748, 17802, 201, 198, 11748, 2922, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 4818, 8079, 1330, 28805, 12514, 201, 198, 201, 198, 36, 3535, 796, 275, 6, 59, 77, 59, ...
1.879828
1,398
import collections from pprint import pprint example1 = open("input.txt", "r").read() # grid = [[val for val in line] for line in example1.split("\n")] grid = example1.split("\n") length = 0 for line in grid: length = max(len(line), length) out = [] for line in grid: out.append(line[::-1].zfill(length)[::-1...
[ 11748, 17268, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 20688, 16, 796, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 11074, 961, 3419, 198, 198, 2, 10706, 796, 16410, 2100, 329, 1188, 287, 1627, 60, 329, 1627, 287, 1672, 16, ...
1.916861
1,287
#!/usr/bin/env python """ test_history.py """ # Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved. import unittest from OR_Client_Library.openrefine_client.google.refine.history import * if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 9288, 62, 23569, 13, 9078, 198, 37811, 198, 198, 2, 15069, 357, 66, 8, 2813, 3362, 6889, 22988, 11, 6416, 6118, 11056, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 555, 71...
2.89011
91
""" Provide tests for command line interface's get batch command. """ import json import pytest from click.testing import CliRunner from cli.constants import ( DEV_BRANCH_NODE_IP_ADDRESS_FOR_TESTING, FAILED_EXIT_FROM_COMMAND_CODE, PASSED_EXIT_FROM_COMMAND_CODE, ) from cli.entrypoint import cli from cli.ut...
[ 37811, 198, 15946, 485, 5254, 329, 3141, 1627, 7071, 338, 651, 15458, 3141, 13, 198, 37811, 198, 11748, 33918, 198, 198, 11748, 12972, 9288, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 198, 6738, 537, 72, 13, 9979, 1187, 1...
1.794057
2,928
import sys from gssl.datasets import load_dataset from gssl.inductive.datasets import load_ppi from gssl.utils import seed if __name__ == "__main__": main()
[ 11748, 25064, 198, 198, 6738, 308, 45163, 13, 19608, 292, 1039, 1330, 3440, 62, 19608, 292, 316, 198, 6738, 308, 45163, 13, 521, 45857, 13, 19608, 292, 1039, 1330, 3440, 62, 381, 72, 198, 6738, 308, 45163, 13, 26791, 1330, 9403, 628, ...
2.704918
61
# Generated by Django 2.2.16 on 2022-04-12 13:28 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.db.models.expressions import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1433, 319, 33160, 12, 3023, 12, 1065, 1511, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, ...
3.097222
72
from flask.ext.wtf import Form from wtforms import StringField, BooleanField, PasswordField from wtforms.validators import InputRequired, Email, EqualTo, Length
[ 6738, 42903, 13, 2302, 13, 86, 27110, 1330, 5178, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 41146, 15878, 11, 30275, 15878, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 23412, 37374, 11, 9570, 11, 28701, 2514, 11, 22313 ]
3.902439
41
from problem import Problem from typing import Any, Tuple from random import randint import ast import json
[ 6738, 1917, 1330, 20647, 198, 6738, 19720, 1330, 4377, 11, 309, 29291, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 6468, 198, 11748, 33918, 628, 628, 198 ]
4.148148
27
import numpy as np from .movement_matrix import movement_matrix from ..image import image_circles def movement_circles(n=50, duration=2, fps=30, width=500, height=500, **kwargs): """ >>> import pyllusion as ill >>> >>> images = ill.movement_circles(n=50, duration=4, fps=30, color="black", size=0.05) ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 764, 21084, 434, 62, 6759, 8609, 1330, 3356, 62, 6759, 8609, 198, 6738, 11485, 9060, 1330, 2939, 62, 66, 343, 5427, 628, 198, 4299, 3356, 62, 66, 343, 5427, 7, 77, 28, 1120, 11, 9478, 28, ...
2.338983
295
#%% import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score from sklearn.naive_bayes import GaussianNB f...
[ 2, 16626, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, ...
2.163852
1,599
import tensorflow as tf import numpy as np from graphsage.models import FCPartition from graphsage.partition_train import construct_placeholders from graphsage.utils import load_graph_data, load_embedded_data, load_embedded_idmap flags = tf.app.flags FLAGS = flags.FLAGS # flags.DEFINE_integer('dim_1', ...
[ 201, 198, 11748, 11192, 273, 11125, 355, 48700, 220, 201, 198, 11748, 299, 32152, 355, 45941, 220, 201, 198, 201, 198, 6738, 28770, 496, 13, 27530, 1330, 10029, 7841, 653, 201, 198, 6738, 28770, 496, 13, 3911, 653, 62, 27432, 1330, 56...
2.40678
295
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Copyright (c) 2015, Elham Abbasian <e_abbasian@yahoo.com>, Kersten Doering <kersten.doering@gmail.com> This parser reads annotated sentences (output from get_relations.py) in a tab-separated format to generate a unified XML format (Tikk et al., 2010. A compreh...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 15069, 357, 66, 8, 1853, 11, 2574, 2763, 28354, 666, 1279, 68, 62, 6485, 292, 666, 31, ...
2.311849
5,756
from django.conf import settings from django.conf.urls.static import static from django.urls import path from members import views urlpatterns = [ path('solicitud-alta/', views.signup_initial, name='signup'), path('solicitud-alta/persona/', views.signup_form_person, name='signup_person'), path('solicitud-...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 1866, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 6...
2.794326
423
# -*- coding: utf-8 -*- """ Created on Wed Jul 18 14:04:03 2018 @author: zyv57124 """ import scipy.io as sio import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib import matplotlib.pyplot as plt from tensorflow.python.training import gradient_descent from time import tim...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5979, 1248, 1478, 25, 3023, 25, 3070, 2864, 198, 198, 31, 9800, 25, 1976, 88, 85, 3553, 17464, 198, 37811, 198, 198, 11748, 629, 541, 88,...
2.428727
919
# Solution of Exercise 8 - Exercise_8.py # # Uploaded by Aurimas A. Nausedas on 11/23/20. # Updated by Aurimas A. Nausedas on 11/06/21. formatter = "%r %r %r %r" print formatter % (1, 2, 3, 4) print formatter % ("one", "two", "three", "four") print formatter % (True, False, False, True) print formatter % (formatter,...
[ 2, 28186, 286, 32900, 807, 532, 32900, 62, 23, 13, 9078, 198, 2, 198, 2, 36803, 276, 416, 15412, 320, 292, 317, 13, 11013, 1484, 292, 319, 1367, 14, 1954, 14, 1238, 13, 198, 2, 19433, 416, 15412, 320, 292, 317, 13, 11013, 1484, ...
2.583333
192
# solution 1: Brute Force # time complexity: O(n^2) # space complexity: O(1) print(twoNumberSum([3,5,-4,8,11,1,-1,6], 10))
[ 2, 4610, 352, 25, 1709, 1133, 5221, 198, 2, 640, 13357, 25, 440, 7, 77, 61, 17, 8, 198, 2, 2272, 13357, 25, 440, 7, 16, 8, 198, 198, 4798, 7, 11545, 15057, 13065, 26933, 18, 11, 20, 12095, 19, 11, 23, 11, 1157, 11, 16, 12095...
2.296296
54
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-28 17:32 from __future__ import unicode_literals import ckeditor.fields import destinations.models from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 22, 319, 2177, 12, 1157, 12, 2078, 1596, 25, 2624, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.950617
81
# Kontsioti, Maskell, Dutta & Pirmohamed, A reference set of clinically relevant # adverse drug-drug interactions (2021) # Code to extract single-drug side effect data from the BNF website from bs4 import BeautifulSoup import urllib import os, csv import numpy as np import pandas as pd import re from tqdm i...
[ 2, 509, 756, 13396, 5092, 11, 11066, 17164, 11, 360, 315, 8326, 1222, 350, 2533, 1219, 2434, 11, 317, 4941, 900, 286, 36688, 5981, 220, 201, 198, 2, 12681, 2563, 12, 30349, 12213, 357, 1238, 2481, 8, 201, 198, 2, 6127, 284, 7925, ...
2.515783
3,358
from django import forms
[ 6738, 42625, 14208, 1330, 5107, 628, 628, 198 ]
3.625
8
from django.utils import timezone from django.utils.text import slugify
[ 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 628 ]
3.65
20
# This Python program is used to create a plot displaying the sponge # function we use in the CASTRO hydrodynamics for the wdmerger problem. import numpy as np import matplotlib.pyplot as plt rs = 0.75 rt = 0.85 r = np.linspace(0.0, 1.0, 1000) f = np.zeros(len(r)) idx = np.where(r < rs) f[idx] = 0.0 idx = np.wher...
[ 2, 770, 11361, 1430, 318, 973, 284, 2251, 257, 7110, 19407, 262, 40206, 220, 198, 2, 2163, 356, 779, 287, 262, 35106, 5446, 46, 7409, 14892, 4989, 873, 329, 262, 266, 67, 647, 1362, 1917, 13, 198, 198, 11748, 299, 32152, 355, 45941,...
2.020349
344
# 005 while(1): level = int(input()) if(level <= 0): break L = 2*level-1 mid = int((L - 1) / 2) inspa = mid * 2 - 1 for i in range(L): spa = level - i - 1 if spa >= 0: print(" " * spa, end='') print('*', end='') if spa < 0: ...
[ 2, 3571, 20, 220, 201, 198, 4514, 7, 16, 2599, 201, 198, 220, 220, 220, 1241, 796, 493, 7, 15414, 28955, 201, 198, 220, 220, 220, 611, 7, 5715, 19841, 657, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 201, 198, 220, ...
1.631808
459
import numpy as np from ..tools.utils import update_dict from .utils import save_fig
[ 11748, 299, 32152, 355, 45941, 198, 6738, 11485, 31391, 13, 26791, 1330, 4296, 62, 11600, 198, 6738, 764, 26791, 1330, 3613, 62, 5647, 628 ]
3.583333
24
# Copyright 2018 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 import json import logging import os from collections import namedtuple import eth_account import eth_keys import eth_utils from eth_keys import KeyAPI from eth_utils import big_endian_to_int from ocean_lib.web3_internal.web3_provider i...
[ 2, 220, 15069, 2864, 10692, 20497, 5693, 198, 2, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748,...
2.645592
1,123
import autofront.autofront as autofront import autofront.utilities as utilities initialize = autofront.initialize add = autofront.add run = autofront.run get_display = utilities.get_display
[ 11748, 1960, 1659, 4298, 13, 2306, 1659, 4298, 355, 1960, 1659, 4298, 198, 11748, 1960, 1659, 4298, 13, 315, 2410, 355, 20081, 198, 198, 36733, 1096, 796, 1960, 1659, 4298, 13, 36733, 1096, 198, 2860, 796, 1960, 1659, 4298, 13, 2860, ...
3.147541
61
# THIS IS A FILE TO TEST THE CODE. DO NOT USE IT AS PART OF THE CODE. import matplotlib.pyplot as plt import numpy as np from StochasticMechanics import Stochastic from scipy.optimize import minimize from Performance import PerformanceOpt from Hazards import Stationary from Building import * from BuildingProperties im...
[ 2, 12680, 3180, 317, 45811, 5390, 43001, 3336, 42714, 13, 8410, 5626, 23210, 7283, 7054, 16652, 3963, 3336, 42714, 13, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 520...
1.994332
4,234
from categorical_embedder.embedders.core.aux.custom_layers import get_custom_layer_class from categorical_embedder.embedders.core.aux.loss_factory import get_loss_function
[ 6738, 4253, 12409, 62, 20521, 1082, 13, 20521, 67, 364, 13, 7295, 13, 14644, 13, 23144, 62, 75, 6962, 1330, 651, 62, 23144, 62, 29289, 62, 4871, 198, 6738, 4253, 12409, 62, 20521, 1082, 13, 20521, 67, 364, 13, 7295, 13, 14644, 13, ...
3.181818
55
# Copyright 2014 Mirantis Inc. # All Rights Reserved. # # 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...
[ 2, 15069, 1946, 7381, 20836, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, ...
3.361702
282
"""Utilities.""" from functools import wraps import re from typing import Callable, List, Optional, TypeVar, Union from .data import ( all_classes, all_slots, ) def pascal_to_snake(s: str, sep: str = "_") -> str: """Convert Pascal case to snake case. Assumes that a) all words are either all-lowercas...
[ 37811, 18274, 2410, 526, 15931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 302, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 32233, 11, 5994, 19852, 11, 4479, 198, 198, 6738, 764, 7890, 1330, 357, 198, 220, 220, 220, 47...
2.343687
998
# # OMNIVORE CONFIDENTIAL # __________________ # # [2013] - [2019] Omnivore Technologies # All Rights Reserved. # # NOTICE: All information contained herein is, and remains # the property of Omnivore Technologies and its suppliers, # if any. The intellectual and technical concepts contained # herein are proprietary...
[ 2, 198, 2, 32468, 45, 3824, 6965, 7102, 37, 25256, 12576, 198, 2, 220, 4841, 834, 198, 2, 198, 2, 220, 685, 6390, 60, 532, 685, 23344, 60, 31816, 452, 382, 21852, 198, 2, 220, 1439, 6923, 33876, 13, 198, 2, 198, 2, 28536, 25, ...
4.132075
159
__author__ = ["Markus Lning"] __all__ = [ "compute_relative_to_n_timepoints", "time_series_slope", "fit_trend", "remove_trend", "add_trend" ] import numpy as np from sklearn.utils import check_array from sktime.utils.validation.forecasting import check_time_index def compute_relative_to_n_timepo...
[ 834, 9800, 834, 796, 14631, 9704, 385, 406, 768, 8973, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 5589, 1133, 62, 43762, 62, 1462, 62, 77, 62, 2435, 13033, 1600, 198, 220, 220, 220, 366, 2435, 62, 25076, 62, 6649, 3008...
2.285099
3,483
#!/usr/bin/env python from __future__ import print_function import os import sys import csv import numpy as np import math import random from collections import defaultdict import torch from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn as nn import torch.nn.functional as F i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, ...
3.052863
227
from collections import namedtuple Accelerometer = namedtuple('Accelerometer', ["timestamp", "x", "y", "z"]) Magnetometer = namedtuple('Magnetometer', ['timestamp', 'x', 'y', 'z']) Gyroscope = namedtuple('Gyroscope', ['timestamp', 'x', 'y', 'z']) Euler = namedtuple('Euler', ['timestamp', 'x', 'y', 'z']) Quaternion = ...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 12832, 7015, 15635, 796, 3706, 83, 29291, 10786, 12832, 7015, 15635, 3256, 14631, 16514, 27823, 1600, 366, 87, 1600, 366, 88, 1600, 366, 89, 8973, 8, 198, 13436, 3262, 15635, 796, 3706, 83, ...
1.80298
604
from __future__ import print_function import os import string import argparse try: maketrans = string.maketrans # python2 except AttributeError: maketrans = str.maketrans # python3 def caeser_cipher(string_: str, offset: int, decode: bool, file_: string) -> None: """Caeser Cipher implementation, reads ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 4731, 198, 11748, 1822, 29572, 198, 198, 28311, 25, 198, 220, 220, 220, 285, 461, 21879, 504, 796, 4731, 13, 76, 461, 21879, 504, 220, 1303, 21015, 17, 198,...
2.553363
1,115
from collections import defaultdict from django.contrib.contenttypes.models import ContentType from guardian.shortcuts import ( assign_perm, remove_perm, get_perms, get_users_with_perms) from onadata.apps.api.models import OrganizationProfile from onadata.apps.main.models.user_profile import UserProfi...
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 21688, 13, 19509, 23779, 1330, 357, 198, 220, 220, 220, 8333, 62, 16321, 11, 198, 220, 220, 220, 4...
2.532972
1,107
# Self-Driving Car Engineer Nanodegree # # ## Project: **Finding Lane Lines on the Road** # ## Import Packages #importing some useful packages import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 import math import moviepy image = mpimg.imread('test_images/solidWhiteRight...
[ 2, 12189, 12, 20564, 1075, 1879, 23164, 18008, 1098, 70, 631, 198, 2, 220, 198, 2, 22492, 4935, 25, 12429, 36276, 15016, 26299, 319, 262, 5567, 1174, 220, 198, 198, 2, 22492, 17267, 6400, 1095, 198, 198, 2, 11748, 278, 617, 4465, 10...
2.611454
3,405
try: from collections.abc import MutableMapping except ImportError: from collections import MutableMapping import zipfile
[ 28311, 25, 198, 220, 220, 220, 422, 17268, 13, 39305, 1330, 13859, 540, 44, 5912, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 17268, 1330, 13859, 540, 44, 5912, 198, 11748, 19974, 7753, 628 ]
3.638889
36
# Copyright 2014 A10 Networks # # 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 agree...
[ 2, 15069, 1946, 317, 940, 27862, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262,...
3.420664
271
# [h] hTools2.modules.ftp """Tools to connect to a FTP server, upload files etc.""" # This module uses the `ftplib` library to handle FTP connection and upload. # http://docs.python.org/library/ftplib.html import os from ftplib import FTP def connect_to_server(url, login, password, folder, verbose=False): """Co...
[ 2, 685, 71, 60, 289, 33637, 17, 13, 18170, 13, 701, 79, 198, 198, 37811, 33637, 284, 2018, 284, 257, 45854, 4382, 11, 9516, 3696, 3503, 526, 15931, 198, 198, 2, 770, 8265, 3544, 262, 4600, 701, 489, 571, 63, 5888, 284, 5412, 45854...
2.880668
419
import Net import configparser import torch from PIL import Image config = configparser.ConfigParser() config.read('./config.ini') MODEL = config.get("Network", "Model") transformations = Net.transformations net = Net.Net() net.eval() net.load_state_dict(torch.load(MODEL)) image = Image.open("./html/rwby.jpg") imag...
[ 11748, 3433, 198, 11748, 4566, 48610, 198, 11748, 28034, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11250, 796, 4566, 48610, 13, 16934, 46677, 3419, 198, 11250, 13, 961, 7, 4458, 14, 11250, 13, 5362, 11537, 198, 33365, 3698, 796, 4566,...
2.645933
209
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
3.421875
64
import torch from tuframework.network_architecture.generic_UNet import Generic_UNet from tuframework.network_architecture.initialization import InitWeights_He from tuframework.training.network_training.tuframework_variants.data_augmentation.tuframeworkTrainerV2_insaneDA import \ tuframeworkTrainerV2_insaneDA from t...
[ 11748, 28034, 198, 6738, 256, 3046, 859, 6433, 13, 27349, 62, 998, 5712, 495, 13, 41357, 62, 4944, 316, 1330, 42044, 62, 4944, 316, 198, 6738, 256, 3046, 859, 6433, 13, 27349, 62, 998, 5712, 495, 13, 36733, 1634, 1330, 44707, 1135, ...
3.069767
129
from typing import List from src.command.command import Command
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 12351, 13, 21812, 13, 21812, 1330, 9455, 628 ]
4.4
15
from build.chart_data_functions import get_confirmed_cases_by_county from build.chart_data_functions import get_county_by_day from build.constants import CONFIRMED_CASES_BY_COUNTIES_PATH from build.constants import COUNTY_MAPPING from build.constants import COUNTY_POPULATION from build.constants import DATE_SETTINGS fr...
[ 6738, 1382, 13, 40926, 62, 7890, 62, 12543, 2733, 1330, 651, 62, 36349, 62, 33964, 62, 1525, 62, 9127, 88, 198, 6738, 1382, 13, 40926, 62, 7890, 62, 12543, 2733, 1330, 651, 62, 9127, 88, 62, 1525, 62, 820, 198, 6738, 1382, 13, 997...
3.278302
212
# encoding=utf-8 import rospy import tf if __name__ == '__main__': rospy.init_node('py_tf_broadcaster') br = tf.TransformBroadcaster() x = 0.0 y = 0.0 z = 0.0 roll = 0 pitch = 0 yaw = 1.57 rate = rospy.Rate(1) while not rospy.is_shutdown(): yaw = yaw + 0.1 roll...
[ 2, 21004, 28, 40477, 12, 23, 198, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 686, 2777, 88, 13, 15003, 62, 17440, 10786, 9078, 62, 27110, 62,...
1.770115
348
# Imports import numpy as np
[ 2, 1846, 3742, 198, 11748, 299, 32152, 355, 45941, 628 ]
3
10