id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
18,700
test listify ndarray
# -*- coding: utf-8 -*- # # Copyright (c) 2023, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Unit tests for parser data module.""" import unittest from unittest import mock import numpy import cclib class St...
18,701
head object request
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
18,702
on start step
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, 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. r"""Helper functions for profiling. Profilers like Nvidia Nsight can capture the time spent in annotated ranges. E...
18,703
compute fsm location id
# Copyright (C) 2019 Brian McMaster # Copyright (C) 2019 Open Source Integrators # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models from odoo.exceptions import ValidationError class SaleOrder(models.Model): _inherit = "sale.order" fsm_location_id = fields....
18,704
test input file is missing error is
import json import uuid from unittest import TestCase import os import io from tempfile import TemporaryDirectory from hypothesis import given from hypothesis.strategies import sampled_from from pathlib import Path from oasislmf.model_execution.conf import create_analysis_settings_json from oasislmf.model_execution....
18,705
update
import numpy as np from keras_core import backend from keras_core import initializers from keras_core import metrics as metrics_module from keras_core import ops from keras_core import testing from keras_core.metrics.metric import Metric class ExampleMetric(Metric): def __init__(self, name="mean_square_error", d...
18,706
post operations
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
18,707
run
from itertools import zip_longest as izip_longest from pymol import cmd, stored, wizard class Command(wizard.Wizard): ''' Generic wizard for any PyMOL command. ''' async_ = 1 ignored_args = ('quiet',) def __getstate__(self): d = super(Command, self).__getstate__() d['shortcut...
18,708
literal processor datetime
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from ... import exc from ...sql import sqltypes from ...types import NVARCHAR f...
18,709
generate
import json import os import re DIR = os.path.dirname(__file__) GUIDES_DIR = os.path.abspath(os.path.join(DIR, "../../../../../guides")) GUIDE_ASSETS_DIR = os.path.join(GUIDES_DIR, "assets") DEMOS_DIR = os.path.abspath(os.path.join(DIR, "../../../../../demo")) CN_GUIDES_DIR = os.path.abspath(os.path.join(DIR, "../../....
18,710
get offspring
"""Optimisation class""" """ Copyright (c) 2016-2022, EPFL/Blue Brain Project This file is part of BluePyOpt <https://github.com/BlueBrain/BluePyOpt> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3.0 as published by the Fr...
18,711
test container
# Copyright 2020-2022 Capypara and the SkyTemple Contributors # # This file is part of SkyTemple. # # SkyTemple 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 3 of the License, or # (at y...
18,712
get mandatory constraints
# -*- coding: utf-8 """Module for class SubsystemInterface. This file is part of project TESPy (github.com/oemof/tespy). It's copyrighted by the contributors recorded in the version control history of the file, available from its original location tespy/components/basics/subsystem_interface.py SPDX-License-Identifi...
18,713
test slash in filename patterns
import logging import pickle import shutil import sys from pathlib import Path import pytest from porcupine import dirs from porcupine.plugins import filetypes @pytest.fixture def custom_filetypes(): # We don't overwrite the user's file because porcupine.dirs is monkeypatched if sys.platform == "win32": ...
18,714
test present no parent existing with parent
""" Test cases for salt.states.openvswitch_bridge. """ import pytest import salt.states.openvswitch_bridge as openvswitch_bridge from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {openvswitch_bridge: {"__opts__": {"test": False}}} def test_present_no_parent...
18,715
add unexpected success
"""Test result object""" import io import sys import traceback from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() return method(self, *args, **kw) ...
18,716
update
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
18,717
test 8svx
"""Routines to help recognizing sound files. Function whathdr() recognizes various types of sound file headers. It understands almost all headers that SOX can decode. The return tuple contains the following items, in this order: - file type (as SOX understands it) - sampling rate (0 if unknown or hard to decode) - nu...
18,718
onerror
import json import shutil from glob import glob from pathlib import Path import pytest from assisted_service_client import PlatformType from junit_report import JunitTestSuite from assisted_test_infra.test_infra import ClusterName from assisted_test_infra.test_infra.helper_classes.cluster import Cluster from assisted...
18,719
test with simple
"""Tests for the unparse.py script in the Tools/parser directory.""" import unittest import test.support import io import os import random import tokenize import ast from test.test_tools import basepath, toolsdir, skip_if_missing skip_if_missing() parser_path = os.path.join(toolsdir, "parser") with test.support.Di...
18,720
list
# 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 ...
18,721
dyld framework path
""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * try: from _ctypes import _dyld_shared_cache_contains_path except ImportError: def _dyld_shared_cache_contains_path(*args): raise NotImplementedError...
18,722
test stringio
# Copyright (C) 2003 Python Software Foundation import unittest import plistlib import os import datetime from test import test_support # This test data was generated through Cocoa's NSDictionary class TESTDATA = """<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" \ "http:/...
18,723
destroy ocs
# -*- coding: utf8 -*- """ This module contains platform specific methods and classes for deployment on Fusion aaS """ import logging import os from ocs_ci.deployment.helpers.rosa_prod_cluster_helpers import ROSAProdEnvCluster from ocs_ci.deployment import rosa as rosa_deployment from ocs_ci.framework import config f...
18,724
setup
# *************************************************************** # Copyright (c) 2023 Jittor. All Rights Reserved. # Maintainers: # Guowei Yang <471184555@qq.com> # Meng-Hao Guo <guomenghao1997@gmail.com> # Dun Liang <randonlang@gmail.com>. # # This file is subject to the terms and conditions defined i...
18,725
test redacted certificates cannot contain sensitive data
# Parsec Cloud (https://parsec.cloud) Copyright (c) BUSL-1.1 2016-present Scille SAS from __future__ import annotations import pytest from parsec._parsec import ( DateTime, UserProfile, ) from parsec.api.data import DeviceCertificate from parsec.api.protocol import ( AuthenticatedPingRepOk, DeviceCrea...
18,726
parameters polynomial
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES). # # Copyright (c) 2018-2023 by the software own...
18,727
test add column readonly
# Copyright (c) 2018-2023, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions an...
18,728
clean old password
# -*- coding: utf-8 -*- # # Copyright (C) 2009 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV 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 the Free # Software Foundation. # # This program is...
18,729
test update aml compute
import sys from typing import Callable from unittest.mock import Mock import pytest import vcr from azure.identity import DefaultAzureCredential from pytest_mock import MockFixture from azure.ai.ml import load_compute from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationScope from azure.ai.ml...
18,730
list signal r keys output
# 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__ ...
18,731
buffer
import abc import builtins import codecs import sys from _typeshed import FileDescriptorOrPath, ReadableBuffer, WriteableBuffer from collections.abc import Callable, Iterable, Iterator from os import _Opener from types import TracebackType from typing import IO, Any, BinaryIO, TextIO from typing_extensions import Liter...
18,732
graph implementation
""" Copyright 2013 Steven Diamond 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, software...
18,733
test multi direction tuple
import magma as m from magma.testing import check_files_equal class T(m.Product): I = m.In(m.Bit) O = m.Out(m.Bit) def def_foo(): class foo(m.Circuit): name = "Foo" io = m.IO(ifc=T) m.wire(io.ifc.I, io.ifc.O) return foo def METHOD_NAME(): foo = def_foo() m.compile("b...
18,734
sort url
# -*- coding: utf-8 -*- """ A example for creating a Table that is sortable by its header """ import logging import socket import flask import flask_table import tornado.httpserver # from flask_table import Table, Col, LinkCol import tornado.wsgi import utool as ut (print, rrr, profile) = ut.inject2(__name__) logger...
18,735
test windows relative path
"""Test `uniprops`.""" from pymdownx import util import unittest import pytest class TestUrlParse(unittest.TestCase): """Test UrlParse.""" def test_url(self): """Test URL.""" url = 'http://www.google.com' scheme, netloc, path, params, query, fragment, is_url, is_absolute = util.parse...
18,736
get page link
import time from typing import Any, Dict, Optional if False: from google.cloud import aiplatform # type: ignore # noqa: F401 from wandb.apis.internal import Api from wandb.util import get_module from .._project_spec import LaunchProject, get_entry_point_command from ..builder.build import get_env_vars_dict fr...
18,737
id
# 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...
18,738
test lead sheet extractor
# Copyright 2023 The Magenta 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 ...
18,739
set motors
# # Copyright (C) 1997-2016 JDE Developers Team # # 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 3 of the License, or # (at your option) any later version. # # This program...
18,740
test invalid querystring
from rest_framework import status from sentry.models import NotificationSetting from sentry.notifications.types import NotificationSettingOptionValues, NotificationSettingTypes from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.types.integrations import Exter...
18,741
decode enum type flags
# Copyright (c) Meta Platforms, Inc. and affiliates. # SPDX-License-Identifier: LGPL-2.1-or-later """ Formatting ---------- The ``drgn.helpers.common.format`` module provides generic helpers for formatting different things as text. """ from typing import Iterable, SupportsFloat, Tuple from drgn import IntegerLike, ...
18,742
set up test data
from django.test import TestCase from rest_framework import status from usaspending_api.idvs.tests.data.idv_test_data import create_idv_test_data from model_bakery import baker class IDVFundingTestCase(TestCase): # Need to set this so that data for TestCase (and inheritors like SimpleTestCase) flush these DBs at ...
18,743
test str to time str error
import calendar import time from datetime import datetime import pytest from oic.utils.time_util import TimeUtilError from oic.utils.time_util import a_while_ago from oic.utils.time_util import add_duration from oic.utils.time_util import after from oic.utils.time_util import before from oic.utils.time_util import f_...
18,744
set low power mode
#!/usr/bin/env python import time try: from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError(str(e) + "- required module not found") ATTR_PATH = '/sys/class/hwmon/hwmon2/device/' SFP_GROUPS = { 'SFP-G01': { "type": "QSFP28", 'number': 8, 'paren...
18,745
initial providers
import pytest import io import os import contextlib from typing import Any from unittest.mock import patch from dlt.common.configuration.container import Container from dlt.common.configuration.paths import DOT_DLT from dlt.common.configuration.providers import ConfigTomlProvider, CONFIG_TOML from dlt.common.configura...
18,746
import library
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
18,747
clear callbacks
import atexit import logging import epics from epics import ca, caget, caput from packaging.version import parse from ._dispatch import EventDispatcher, _CallbackThread, wrap_callback _min_pyepics = "3.4.2" if parse(epics.__version__) < parse(_min_pyepics): raise ImportError( "Version of pyepics too old...
18,748
test c native backend lifetime
import os import time import docker import utils from GangaCore.Core.GangaRepository.container_controllers import ( checkNative, docker_handler, get_database_config, mongod_exists, udocker_handler) from GangaCore.testlib.GangaUnitTest import GangaUnitTest from GangaCore.Utility.Config import getConfig from Gan...
18,749
test gridmapdisplay fancy basemap
""" Unit Tests for Py-ART's graph/gridmapdisplay_basemap.py module. """ # execute this script to create figure_gridmapdisplay_*.png files. # TODO use matplotlib's @image_comparison decorator to compare to file # in baseline_images directory. Current this test only determines if files can # be created, not that they ar...
18,750
resnet print
# Copyright 2018 MLBenchmark Group. 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 applicable l...
18,751
test include include read event nested includes
"""Test the other directives.""" from pathlib import Path import pytest from docutils import nodes from sphinx import addnodes from sphinx.testing import restructuredtext from sphinx.testing.util import assert_node @pytest.mark.sphinx(testroot='toctree-glob') def test_toctree(app): text = (".. toctree::\n" ...
18,752
importance
# 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__ =...
18,753
tear down
# 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...
18,754
transform
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- # copyright: aeon developers, BSD-3-Clause License (see LICENSE file) """Implements transformers for detecting outliers in a time series.""" __author__ = ["aiwalter"] __all__ = ["HampelFilter"] import warnings import numpy as np import pandas as pd from aeon.forecas...
18,755
set test params
#!/usr/bin/env python3 # Copyright (c) 2017-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactio...
18,756
unsafe fn view
from django.views.generic.base import View from unittest.mock import MagicMock from corehq.apps.reports.dispatcher import ReportDispatcher from corehq.apps.reports.generic import GenericReportView from ..permissions import conditionally_location_safe, is_location_safe, location_safe @location_safe def safe_fn_view...
18,757
verify optimization options
# Copyright (C) 2015 Joshua Willis # # 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 3 of the License, or (at your # option) any later version. # # This program is distributed in ...
18,758
response handler
import json from datetime import datetime, timedelta from stix_shifter_utils.stix_transmission.utils.RestApiClientAsync import RestApiClientAsync from stix_shifter_utils.utils import logger class APIClient: endpoint_start = 'v1.0/events' token_endpoint = 'v1.0/endpoint/default/token' def __init__(self, ...
18,759
is valid unix time
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
18,760
suite
#!/usr/bin/env python # coding: utf-8 # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # Copyright (C) 2015-2018 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # # Permission is hereby granted, fr...
18,761
add symbol
import collections import os import subprocess import re Tree = lambda: collections.defaultdict(Tree) # noqa: E731 EXCLUDE_DIRS = [ # Only look in girder, plugins and clients folders i.e. exclude all directories that don't begin # with "clients" or "girder" or "plugins" '^(?!(clients|girder|plugins|pytes...
18,762
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...
18,763
test get command multi exe
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
18,764
test inserting infinity values retrieves infinity values
from datetime import datetime, timedelta from django.core.exceptions import ValidationError from django.test import TestCase from django.utils import timezone from django.utils.timezone import is_aware, make_aware from rest_framework.test import APIClient from argus.auth.models import User from argus.util.utils impor...
18,765
target exists
#!/usr/bin/env python3 # # Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center # Distributed under the terms of the 3-clause BSD License. from .targets import BaseTarget from .utils import env, textMD5 class Py_Module(BaseTarget): '''A target for a Python module.''' LIB_STATUS_CACHE ...
18,766
run
# This code is part of Qiskit. # # (C) Copyright IBM 2022. # # 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 derivative wo...
18,767
get bitmaps info
from provider import backup_utils from provider import blockdev_base from provider import block_dirty_bitmap class BlockdevIncBackupNonPersistentBitmapTest(blockdev_base.BlockdevBaseTest): def __init__(self, test, params, env): super(BlockdevIncBackupNonPersistentBitmapTest, self).__init__(test, ...
18,768
tear down class
# 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...
18,769
test header input override
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
18,770
test atom parse
# Copyright 2012 by Eric Talevich. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for SeqIO PdbIO module.""" import unittest import warnings try: import numpy ...
18,771
set up class
import unittest import tempfile import json import copy import os import numpy as np import pandas as pd from numpy.testing import assert_almost_equal from sklearn import datasets from supervised.algorithms.lightgbm import LightgbmAlgorithm, additional from supervised.utils.metric import Metric additional["max_round...
18,772
test fromdict asdict
from __future__ import annotations import unittest import matplotlib.pyplot as plt from pytest import approx from pymatgen.io.phonopy import get_gruneisen_ph_bs_symm_line, get_gruneisenparameter from pymatgen.phonon.gruneisen import GruneisenParameter from pymatgen.phonon.plotter import GruneisenPhononBandStructureS...
18,773
test initgroups chain
import textwrap from six import StringIO from leapp.libraries.actor.sssdfacts import SSSDFactsLibrary from leapp.libraries.common import utils from leapp.models import SSSDConfig, SSSDDomainConfig def get_config(content): parser = utils.parse_config(StringIO(textwrap.dedent(content))) return parser def te...
18,774
assert index template not loaded
import datetime import unittest import pytest from elasticsearch import NotFoundError class IdxMgmt(unittest.TestCase): def __init__(self, client, index): self._client = client self._index = index if index != '' and index != '*' else 'mockbeat' self.patterns = [self.default_pattern(), "1"...
18,775
automation token
from unittest.mock import MagicMock import pytest from reconcile.gql_definitions.fragments.vault_secret import VaultSecret from reconcile.gql_definitions.terraform_repo.terraform_repo import ( AWSAccountV1, TerraformRepoV1, ) from reconcile.terraform_repo import ( TerraformRepoIntegration, TerraformRe...
18,776
ens config
import logging import re import netCDF4 import numpy as np import pytest import xarray as xr import xarray.backends import ert.storage import ert.storage.migration._block_fs_native as bfn import ert.storage.migration.block_fs as bf from ert.config import ErtConfig from ert.storage.local_storage import local_storage_s...
18,777
handle stderr
from collections.abc import Iterable, Mapping from types import TracebackType from typing import Any, TextIO, overload from typing_extensions import Literal, TypeAlias from .watchers import StreamWatcher _Hide: TypeAlias = Literal[None, True, False, "out", "stdout", "err", "stderr", "both"] class Runner: read_ch...
18,778
trackedness
#!/usr/bin/env python import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet import DictTypes import sys, os, os.path # enable tracing cms.Sequences, cms.Paths and cms.EndPaths for all imported modules (thus, process.load(...), too) import tracingImport result = dict() result['procname'] = '' resul...
18,779
test caption
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022) # # 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 appl...
18,780
save
import json from datetime import datetime from typing import ( Any, Iterable, Optional, ) from pydantic import ( BaseModel, Field, ) from reconcile.aus.models import OrganizationUpgradeSpec from reconcile.utils.semver_helper import parse_semver from reconcile.utils.state import State class Workl...
18,781
set up
from tethys_sdk.testing import TethysTestCase from tethys_compute.models.tethys_job import TethysJob from tethys_compute.models.condor.condor_job import CondorJob from tethys_compute.models.condor.condor_scheduler import CondorScheduler from tethys_compute.models.condor.condor_base import CondorBase from tethys_compute...
18,782
get chrome web store page
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Chrome extension analysis plugin.""" import collections import os import unittest from plaso.analysis import chrome_extension from plaso.containers import artifacts from plaso.containers import reports from plaso.lib import definitions from tests import...
18,783
mock delete keyvault secret
""" Tests for vault""" class Popen: def __init__(self, cmd, **kwargs): self.cmd = cmd def communicate(self, input=None, timeout=None): return "secret", None class Popen1: def __init__(self, cmd, **kwargs): self.cmd = cmd def communicate(self, input=None, timeout=None): ...
18,784
test fix metadata ocean var
"""Tests for the fixes of IPSL-CM6A-LR.""" import unittest import iris import numpy as np import pytest from iris.coords import AuxCoord from iris.cube import Cube, CubeList from iris.exceptions import CoordinateNotFoundError from esmvalcore.cmor._fixes.cmip6.ipsl_cm6a_lr import AllVars, Clcalipso, Omon from esmvalco...
18,785
main
# Copyright 2017 The Forseti Security 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 ap...
18,786
ci
"""Filter copy number segments.""" import functools import logging import numpy as np import pandas as pd from .descriptives import weighted_median def require_column(*colnames): """Wrapper to coordinate the segment-filtering functions. Verify that the given columns are in the CopyNumArray the wrapped func...
18,787
get updates
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END """ Fledge package updater API support""" import json from aiohttp import web import datetime import os import asyncio import re from fledge.common import utils from fledge.common.logger import FLCoreLogger from fledge.ser...
18,788
white space fix
# coding=utf-8 # Based on the MLQA evaluation script from: # https://github.com/facebookresearch/MLQA/blob/master/mlqa_evaluation_v1.py # Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source ...
18,789
test order with no invoice
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
18,790
package
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tool...
18,791
get country code
import functools import pycountry import scrapy from locations.categories import Categories, apply_category from locations.dict_parser import DictParser from locations.hours import DAYS_FULL, OpeningHours class FordSpider(scrapy.Spider): name = "ford" available_countries = [ "PER", "ATG", ...
18,792
test control html
# Copyright 2023 Avaiga Private Limited # # 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 ...
18,793
parse config
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from collections import ChainMap import boto3 from datadog_checks.base import OpenMetricsBaseCheckV2 from datadog_checks.base.checks.openmetrics.v2.scraper import OpenMetricsCompatibilityScraper from dat...
18,794
add new resource
import json import requests from flask import g from wqflask.database import database_connection from base import webqtlConfig from utility.redis_tools import (get_redis_conn, get_resource_info, get_resource_id, add_res...
18,795
repr list
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr", "repr", "recursive_repr"] import builtins from itertools import islice from _thread import get_ident def recursive_repr(fillvalue='...'): 'Decorator to make a repr function return fillvalue for a recursive call' ...
18,796
tmpname
#!/usr/bin/env python ############################################################################## # # MODULE: r.random.weight # AUTHOR(S): paulo van Breugel <paulo ecodiv earth> # PURPOSE: Create a layer with weighted random sample # COPYRIGHT: (C) 2014-2022 Paulo van Breugel and GRASS DEVELOPMENT TE...
18,797
attributes is none
# automatically generated by the FlatBuffers compiler, do not modify # namespace: reflection import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class Enum(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flat...
18,798
canon
"""Utils for messages.""" import logging import re from datetime import datetime, timedelta, timezone from hashlib import sha256 from math import floor from typing import Any, Union LOGGER = logging.getLogger(__name__) I32_BOUND = 2**31 def datetime_to_str(dt: Union[str, datetime]) -> str: """Convert a datet...
18,799
on get role metadata
from __future__ import annotations import random import re from typing import Optional from src import users from src.containers import UserSet, UserDict from src.decorators import command from src.events import Event, event_listener from src.functions import get_players, get_all_players, get_target from src.messages...