id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
4,000
draw buttons
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
4,001
async swap
from typing import TYPE_CHECKING, Any, Awaitable, Callable, TypeVar from returns.io import IO, IOResult from returns.primitives.hkt import Kind2, dekind from returns.result import Failure, Result, Success if TYPE_CHECKING: from returns.future import Future, FutureResult # noqa: F401 _ValueType = TypeVar('_Valu...
4,002
test ungzip
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import pytest from parlai.core import build_data import unittest import unittest.mock import requests import pa...
4,003
test covariancenormsmetric compute metric
"""Uncertainty metric tests.""" import datetime import numpy as np import pytest from ..manager import MultiManager from ..uncertaintymetric import SumofCovarianceNormsMetric, MeanofCovarianceNormsMetric from ...types.detection import Detection from ...types.groundtruth import GroundTruthPath, GroundTruthState from ....
4,004
native query
from collections import OrderedDict import psycopg from psycopg.pq import ExecStatus from pandas import DataFrame from mindsdb_sql import parse_sql from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender from mindsdb_sql.parser.ast.base import ASTNode from mindsdb.integrations.libs.base import DatabaseHand...
4,005
tear down
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE Authors. 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/lic...
4,006
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
4,007
make workout
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
4,008
node parent
# This file is part of rinohtype, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/. from pathlib import Path from docutils.core import publi...
4,009
get data
# Copyright (c) 2021 PaddlePaddle Authors. 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 appli...
4,010
mock db fetch upcoming event
from datetime import datetime from pathlib import Path import socket import pytest from voting_node.db import EventDb from voting_node.models import Contribution, Event, HostInfo, Objective, Proposal, ServiceSettings, Voter, VotingGroup from voting_node.tasks import Leader0Schedule # Test Fixtures @pytest.fixture ...
4,011
source
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.micr...
4,012
as feature
from __future__ import annotations # superfluous in Python 3.10 import logging from abc import ABCMeta, abstractmethod from typing import NamedTuple import numpy as np from geojson import Feature from ohsome_quality_api.definitions import get_attribution, get_metadata from ohsome_quality_api.indicators.base import ...
4,013
mk submitter
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2023 ODC Contributors # SPDX-License-Identifier: Apache-2.0 # # type: ignore import sys from deprecat import deprecat _REMOTE_LOG_FORMAT_STRING = '%(asctime)s {} %(process)d %(name)s %(levelname)s %(mess...
4,014
generate
from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, save from conan.tools.scm import Version from conan.tools.microsoft import is_msvc import os import textwrap require...
4,015
synapse information
# Copyright (c) 2014 The University of Manchester # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
4,016
end file
#!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modif...
4,017
test lsblk unescape
#!/usr/bin/env python3 # Copyright 2015-2020 Canonical Ltd. # Written by: # Shawn Wang <shawn.wang@canonical.com> # Jonathan Cave <jonathan.cave@canonical.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, # as published by...
4,018
is mine
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Optional, TYPE_CHECKING, List from PyQt6.QtCore import pyqtSignal, pyqtProperty, QObject, pyqtSlot, QUrl from PyQt6.QtGui import QImage from cura.CuraApplication import CuraApplication if TYPE_CHECKING...
4,019
cleanup
# The following comment should be removed at some point in the future. # mypy: strict-optional=False from __future__ import absolute_import import contextlib import errno import hashlib import logging import os from pip._vendor import contextlib2 from pip._internal.utils.temp_dir import TempDirectory from pip._inte...
4,020
get reshape dim
# SPDX-License-Identifier: Apache-2.0 """symbolic executor Computes a part of the graph symbolically using SymbolicTensorElements """ import numpy as np from tf2onnx import utils # pylint: disable=logging-not-lazy,unused-argument,missing-docstring class SymbolicTensorElement: """ Helps with symbolic e...
4,021
difference
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
4,022
get latencies
""" Utilities to measure metrics of a model. """ import torch import time import dataclasses from torchbenchmark.util.model import BenchmarkModel from torchbenchmark.util.experiment.instantiator import TorchBenchModelConfig from torchbenchmark import ModelTask from typing import List, Union, Tuple, Optional WARMUP_ROU...
4,023
set start method
# # SPDX-FileCopyrightText: # Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # """This is a helper module for distributed training. The code uses an official implementation of distributed data parallel launcher as just a reference. https://github.com/p...
4,024
get instances
import json import os from typing import Dict, List from helm.common.general import ensure_directory_exists, ensure_file_downloaded from .scenario import Scenario, Instance, ALL_SPLITS, CORRECT_TAG, Reference, PassageQuestionInput, Output class PubMedQAScenario(Scenario): """ From "PubMedQA: A Dataset for Bi...
4,025
remove pipeline
""" Pipeline manager module that provides functionality to add, modify and delete pipelines. """ import os import sys from argparse import ArgumentParser if __name__ == '__main__': # django needs to be loaded when this script is run standalone from the command line sys.path.append(os.path.join(os.path.dirname...
4,026
enable
''' Wifi Facade. ============= The :class:`Wifi` is to provide access to the wifi of your mobile/ desktop devices. It currently supports `connecting`, `disconnecting`, `scanning`, `getting available wifi network list` and `getting network information`. Simple examples --------------- To enable/ turn on wifi scannin...
4,027
filter on subsidiary
# coding: utf-8 """ Pydici billing tables @author: Sébastien Renard (sebastien.renard@digitalfox.org) @license: AGPL v3 or newer (http://www.gnu.org/licenses/agpl-3.0.html) """ from itertools import chain from django.db.models import Q from django.utils.safestring import mark_safe from django.urls import reverse from...
4,028
test process current order
import unittest from unittest import mock from betfairlightweight.resources.bettingresources import PriceSize from flumine.order.order import OrderStatus, OrderTypes from flumine import config from flumine.markets.market import Market from flumine.markets.markets import Markets from flumine.order.order import ( Ba...
4,029
write jsonl
import json from visidata import vd, date, VisiData, PyobjSheet, AttrDict, stacktrace, TypedExceptionWrapper, options, visidata, ColumnItem, wrapply, TypedWrapper, Progress, Sheet, InferColumnsSheet vd.option('json_indent', None, 'indent to use when saving json') vd.option('json_sort_keys', False, 'sort object keys w...
4,030
test middle css changes order with first
import pytest from django.urls import reverse from ....cache.test import assert_invalidates_cache from ....test import assert_has_error_message from ... import THEME_CACHE from ..css import get_next_css_order FIRST = 0 MIDDLE = 1 LAST = 2 @pytest.fixture def css_list(theme): return [ theme.css.create(na...
4,031
test derivatives
import pytest from diofant import (Derivative, Float, I, O, PoleError, Rational, Symbol, dirichlet_eta, exp, exp_polar, expand_func, lerchphi, log, nan, oo, pi, polar_lift, polylog, sqrt, zeta, zoo) from diofant.abc import a, s, x, z from diofant.core.function import ArgumentI...
4,032
main
#!/usr/bin/python # Copyright (c) 2010-2022 Belledonne Communications SARL. # # This file is part of Liblinphone # (see https://gitlab.linphone.org/BC/public/liblinphone). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publis...
4,033
format row
#!/usr/bin/env python3 import argparse from collections import defaultdict import difflib import pickle from openpilot.selfdrive.car.docs import get_all_car_info from openpilot.selfdrive.car.docs_definitions import Column FOOTNOTE_TAG = "<sup>{}</sup>" STAR_ICON = '<a href="##"><img valign="top" src="https://raw.gith...
4,034
get instance version name
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
4,035
get payment
from datetime import datetime, timedelta from tapiriik.database import db from tapiriik.settings import PAYMENT_AMOUNT, PAYMENT_SYNC_DAYS from bson.objectid import ObjectId class Payments: def LogPayment(id, amount, initialAssociatedAccount, email): # pro-rate their expiry date expires_in_days = mi...
4,036
delete
# This file is part of wger Workout Manager <https://github.com/wger-project>. # Copyright (C) 2013 - 2021 wger Team # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either ...
4,037
delay unlock
"""Generic thread tests. Meant to be used by dummy_thread and thread. To allow for different modules to be used, test_main() can be called with the module to use as the thread implementation as its sole argument. """ import _dummy_thread as _thread import time import queue import random import unittest from test imp...
4,038
archive
import click from kfp import client from kfp.cli import output from kfp.cli.utils import parsing @click.group() def experiment(): """Manage experiment resources.""" @experiment.command() @click.option( '-d', '--description', help=parsing.get_param_descr(client.Client.create_experiment, ...
4,039
test wrapped function contextmanager
"""Test the autodoc extension. This tests mainly the Documenters; the auto directives are tested in a test source file translated by test_build. """ import pytest from .test_ext_autodoc import do_autodoc @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_classes(app): actual = do_autodoc(app, 'functi...
4,040
filter
"""Filters for filtering the data of the projects app endpoints.""" from datetime import date, timedelta from django.db.models import Count, Q from django_filters.constants import EMPTY_VALUES from django_filters.rest_framework import BaseInFilter, Filter, FilterSet, NumberFilter from timed.projects import models c...
4,041
test cross net numercial forward 1 expert
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import unittest import torch from torch.fx import GraphModule, Tracer from torchrec.mod...
4,042
reset world
# noqa: D212, D415 """ # Simple Reference ```{figure} mpe_simple_reference.gif :width: 140px :name: simple_reference ``` This environment is part of the <a href='..'>MPE environments</a>. Please read that page first for general information. | Import | `from pettingzoo.mpe import simple_reference_v3` | |-...
4,043
slc id dict for azimuth time test
from pathlib import Path from typing import Callable import pytest test_dir = Path(__file__).parents[0] TEST_DIR = test_dir.resolve() def pytest_addoption(parser): parser.addoption( "--skip-isce3", action="store_true", default=False, help="skip tests which require ISCE3" ) def pytest_configure(con...
4,044
get registered
import logging import os from ddtrace.internal import agent from ddtrace.internal import atexit from ddtrace.internal import forksafe from ddtrace.internal import periodic from ddtrace.internal.logger import get_logger from ddtrace.internal.remoteconfig._pubsub import PubSub from ddtrace.internal.remoteconfig.client i...
4,045
list steps
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with the Amazon EMR API to create and manage clusters and job steps. """ import logging from botocore.exceptions import ClientError logger = logging...
4,046
add fields
import io from typing import Any, Iterable, List, Optional from urllib.parse import urlencode from multidict import MultiDict, MultiDictProxy from . import hdrs, multipart, payload from .helpers import guess_filename from .payload import Payload __all__ = ("FormData",) class FormData: """Helper class for form ...
4,047
can change organiser settings
import datetime as dt import rules from django.utils.timezone import now from pretalx.person.permissions import ( can_change_submissions, is_administrator, is_reviewer, ) from pretalx.submission.permissions import ( can_be_reviewed, can_view_all_reviews, can_view_reviews, is_review_author,...
4,048
test goal state generation
import io import os import os.path import attr import pytest import salt.config import salt.loader from salt.exceptions import SaltRenderError REQUISITES = ["require", "require_in", "use", "use_in", "watch", "watch_in"] @attr.s class Renderer: tmp_path = attr.ib() def __call__( self, content, sls=...
4,049
test random mix good and bad gradients
# Copyright 2018 The TensorFlow Authors. 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 applica...
4,050
fastapi handled exception
# Copyright 2023 Iguazio # # 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, softwa...
4,051
filter stdlib tests
# pylint: disable=3rd-party-module-not-gated import logging import pathlib import sys from PyInstaller.utils import hooks log = logging.getLogger(__name__) def METHOD_NAME(name): """ Filter out non useful modules from the stdlib """ if ".test." in name: return False if ".tests." in name...
4,052
create run in thread decorator
""" Implements run_in_thread_with_timeout decorator for running tests that might deadlock. """ from __future__ import print_function import functools import os import sys import threading import traceback import unittest MODULE_PID = os.getpid() DEFAULT_TEST_TIMEOUT = 15 def METHOD_NAME(test_timeout=None): ...
4,053
test dashboard tags strategy
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,054
get index for keyword
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os import re from datadog_checks.base.utils.platform import Platform from datadog_checks.sqlserver.const import ENGINE_EDITION_AZURE_MANAGED_INSTANCE, ENGINE_EDITION_SQL_DATABASE CURRENT_DIR = os....
4,055
get antlir linux flavor
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ This provides helpers useful for working with flavors. For more information check out [the flavor docs](/docs/concepts/rpms/overview). "...
4,056
prepare data disks
import logging from avocado.core import exceptions from avocado.utils import memory from virttest import data_dir from virttest import utils_misc from virttest import env_process from virttest import qemu_storage from virttest import error_context from virttest import utils_disk from virttest.qemu_capabilities import...
4,057
query index
# Copyright (c) 2021, NVIDIA CORPORATION. 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 appli...
4,058
run wing
"""A script wrapper for the Wing IDE.""" import os import os.path from os.path import exists, abspath, dirname, join import sys import fnmatch import logging from subprocess import Popen from configparser import ConfigParser from optparse import OptionParser def find_up(name, path=None): """Find the named file ...
4,059
extract frames
from typing import List, Optional, Tuple import cv2 import PIL import numpy as np from super_gradients.common.abstractions.abstract_logger import get_logger logger = get_logger(__name__) __all__ = ["load_video", "save_video", "includes_video_extension", "show_video_from_disk", "show_video_from_frames"] VIDEO_EXTE...
4,060
test float str
"""Float tests Made for Jython. """ import math import sys import unittest from test import test_support jython = test_support.is_jython class FloatTestCase(unittest.TestCase): def test_float_repr(self): self.assertEqual(repr(12345678.000000005), '12345678.000000006') self.assertEqual(repr(12345...
4,061
get lb
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: elb_classic_lb_info version_added: 1.0.0 short_description: Gather information about EC2 Elastic Load...
4,062
test mcmt v chain simulation
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
4,063
test bitbakelayers showappends
# # SPDX-License-Identifier: MIT # import os import re import oeqa.utils.ftools as ftools from oeqa.utils.commands import runCmd, get_bb_var, get_bb_vars from oeqa.selftest.case import OESelftestTestCase class BitbakeLayers(OESelftestTestCase): def test_bitbakelayers_layerindexshowdepends(self): result...
4,064
save json
"""Serializable configuration classes for specifying all training job parameters. These configuration classes are intended to specify all the parameters required to run a training job or perform inference from a serialized one. They are explicitly not intended to implement any of the underlying functionality that the...
4,065
configure
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
4,066
format inline epc qr
import io from lxml import etree import asyncio from flask import render_template, current_app as app from markupsafe import Markup from pyppeteer.launcher import launch import barcode from barcode.writer import ImageWriter, SVGWriter import segno from segno import helpers from main import external_url from models im...
4,067
call fn
from typing import Any, Callable, Dict, Optional, Tuple, Type, TypeVar import srsly from ..compat import tensorflow as tf from ..model import Model from ..shims import TensorFlowShim, keras_model_fns, maybe_handshake_model from ..types import ArgsKwargs, ArrayXd from ..util import ( assert_tensorflow_installed, ...
4,068
get submesh choices
from math import pow import numpy as np def METHOD_NAME(num_hosts, num_devices_per_host, mode="new"): submesh_choices = [] i = 1 p = -1 while i <= num_devices_per_host: i *= 2 p += 1 assert pow(2, p) == num_devices_per_host, ("Only supports the cases where num_devices_per_host is ...
4,069
test unoptimized scopes
# -*- coding: utf-8 -*- import pytest from jinja2 import DictLoader from jinja2 import Environment from jinja2.exceptions import TemplateNotFound from jinja2.exceptions import TemplatesNotFound from jinja2.exceptions import TemplateSyntaxError @pytest.fixture def test_env(): env = Environment( loader=Dic...
4,070
test issue backlog
#SPDX-License-Identifier: MIT import pytest import pandas as pd from augur.api.metrics.issue import * def test_issues_new(): #repo_id assert issues_new(1, 1 , period='year').iloc[0]['issues'] > 0 #repo_group_id assert issues_new(10, period='year').iloc[1]['issues'] > 0 #begin_date & end_date ...
4,071
l1 t stage1 digis summary
from __future__ import print_function import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing import os import sys ############################################################################## # customisations for L1T utilities # # customisations which add utilities features such a...
4,072
test names
""" Tests the pure Python functionality of `cpp_param`: (a) idempotent mapping for unaliased types, and (b) correct mapping for aliased types (as the aliases relate in C++). N.B. The C++ types are not registered in this test. They are registered and tested in `cpp_param_pybind_test`. """ import ctypes import unittest...
4,073
test kernel projection
from UQpy.utilities import ProjectionKernel from UQpy.utilities.GrassmannPoint import GrassmannPoint from UQpy.dimension_reduction.grassmann_manifold.projections.SVDProjection import SVDProjection from UQpy.utilities.kernels.grassmannian_kernels.BinetCauchyKernel import BinetCauchyKernel from UQpy.utilities.kernels.Gau...
4,074
get urns not in
from typing import Any, Dict, Iterable, List, Tuple, Type import pydantic from datahub.emitter.mce_builder import make_assertion_urn, make_container_urn from datahub.ingestion.source.state.checkpoint import CheckpointStateBase from datahub.utilities.checkpoint_state_util import CheckpointStateUtil from datahub.utilit...
4,075
make extension
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import os im...
4,076
setup ui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'rare/ui/components/tabs/games/game_info/game_dlc.ui' # # Created by: PyQt5 UI code generator 5.15.7 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you ar...
4,077
vcenter password
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
4,078
get next
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
4,079
test rss nzedb parser
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later ver...
4,080
test remove prefix
# Copyright 2018 The TensorFlow Authors. 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 applica...
4,081
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
4,082
show version
import sudo import errno import sys import os import pwd import grp import shutil VERSION = 1.0 class SudoPolicyPlugin(sudo.Plugin): """Example sudo policy plugin Demonstrates how to use the sudo policy plugin API. All functions are added as an example on their syntax, but note that most of them are o...
4,083
run max procs
# # See top-level LICENSE.rst file for Copyright information # # -*- coding: utf-8 -*- """ desispec.pipeline.tasks.redshift ================================ """ from __future__ import absolute_import, division, print_function import numpy as np from .base import BaseTask, task_classes, task_type from ...io import f...
4,084
get duplicates
# add the root of the project into the path to allow cd-ing into this folder and running the script. from os.path import abspath from sys import path path.insert(0, abspath(__file__).rsplit('/', 2)[0]) from typing import List from collections import Counter from constants.data_stream_constants import CHUNKABLE_FILES...
4,085
test file props mkv
import numpy as np import pytest from utils import ( DEFAULT_FOURCC, MJPEG_FOURCC, MJPEG_FPS, MJPEG_LEN, MJPEG_SIZE, MKV_FOURCC, MKV_FPS, MKV_LEN, MKV_SIZE, MP4_FOURCC, MP4_FPS, MP4_LEN, MP4_SIZE, TEST_FPS, TEST_HEIGHT, TEST_NUM_COLOR_FRAMES, TEST_WIDT...
4,086
import note
from django.core.management.base import BaseCommand from django.db import transaction from django.core.files import File from optparse import make_option import csv import datetime import os.path import mimetypes from advisornotes.models import AdvisorNote from coredata.models import Person, Unit from coredata.queries...
4,087
do get
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
4,088
serialize
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides a RegionsRegistry class. """ from astropy.table import Table __all__ = [] class IORegistryError(Exception): """Exception class for various registry errors.""" class RegionsRegistry: """ Class to hold a registry to...
4,089
operation
# Copyright 2022 NVIDIA Corporation # # 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 wr...
4,090
outputs
""" cos_fc ====== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.METHOD_NAME import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Specification...
4,091
multilingual cleaners
"""Set of default text cleaners""" # TODO: pick the cleaner for languages dynamically import re from anyascii import anyascii from TTS.tts.utils.text.chinese_mandarin.numbers import replace_numbers_to_characters_in_text from .english.abbreviations import abbreviations_en from .english.number_norm import normalize_n...
4,092
send
import enum import json import typing from starlette.requests import HTTPConnection from starlette.types import Message, Receive, Scope, Send class WebSocketState(enum.Enum): CONNECTING = 0 CONNECTED = 1 DISCONNECTED = 2 class WebSocketDisconnect(Exception): def __init__(self, code: int = 1000, rea...
4,093
get next
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
4,094
get enabled zones
from __future__ import annotations from typing import Set, Dict from seedemu.core import Node, Emulator, Layer from seedemu.services import DomainNameServer, DomainNameService DnssecFileTemplates: Dict[str, str] = {} DnssecFileTemplates['enable_dnssec_script'] = """\ #!/bin/bash rm -fr /etc/bind/keys mkdir /etc/bind...
4,095
test modified potentials
import numpy as np import pytest import unyt as u from gmso.exceptions import EngineIncompatibilityError from gmso.formats.mcf import write_mcf from gmso.tests.base_test import BaseTest class TestMCF(BaseTest): def test_write_lj_simple(self, n_typed_ar_system): top = n_typed_ar_system(n_sites=1) ...
4,096
test post sorting
from datetime import datetime, timedelta from django.conf import settings from kitsune.forums.models import Forum, Thread, ThreadLockedError from kitsune.forums.tests import ForumTestCase, PostFactory, ThreadFactory from kitsune.forums.views import sort_threads from kitsune.sumo.tests import get from kitsune.users.te...
4,097
test call to discrete
import numpy as np import pytest from probnum import diffeq, randvars import probnum.problems.zoo.diffeq as diffeq_zoo @pytest.fixture def rng(): return np.random.default_rng(seed=42) @pytest.fixture def stepsize(): return 0.1 @pytest.fixture def timespan(): return (0.0, 0.5) @pytest.fixture def po...
4,098
on 200
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
4,099
submit
import os import re import shutil import socket import tempfile import six from django.utils.translation import gettext_lazy as _ OIOIOI_LANGUAGE_TO_MOSS = { "C++": "cc", "C": "c", "Python": "python", "Pascal": "pascal", "Java": "java", } MOSS_SUPPORTED_LANGUAGES = set(OIOIOI_LANGUAGE_TO_MOSS) ...