id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
15,900
extract tracing zip
#!/usr/bin/env python3 from argparse import ArgumentParser import zipfile import shutil import os import random import string import wkw import numpy as np import re import json import itertools data_zip_filename = 'data.zip' data_zip_dirname = 'data_zip' def main(): args = create_parser().parse_args() mapp...
15,901
add server
#!/usr/bin/env python3 # 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. import os import unittest import time from mcrouter.test.MCProcess import Mcrouter, Memcached, MockMemcached class...
15,902
prepare expected element paths
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # ...
15,903
space include
from builtins import str import os from django.template import TemplateSyntaxError, VariableDoesNotExist from django.template import Library, Variable from django.template.loader_tags import do_extends, do_include, IncludeNode from django.contrib.auth.models import AnonymousUser, User from django.utils.translation imp...
15,904
fetch page
import functools from .common import InfoExtractor from ..utils import ( format_field, int_or_none, OnDemandPagedList, smuggle_url, ) class StoryFireBaseIE(InfoExtractor): _VALID_URL_BASE = r'https?://(?:www\.)?storyfire\.com/' def _call_api(self, path, video_id, resource, query=None): ...
15,905
family
import socket import sys from _typeshed import ReadableBuffer from builtins import type as Type # alias to avoid name clashes with property named "type" from collections.abc import Iterable from types import TracebackType from typing import Any, BinaryIO, NoReturn, overload from typing_extensions import TypeAlias # T...
15,906
redo
# defines the default edit actions for windows from talon import Context, actions ctx = Context() ctx.matches = r""" os: windows """ @ctx.action_class("edit") class EditActions: def copy(): actions.key("ctrl-c") def cut(): actions.key("ctrl-x") def delete(): actions.key("backsp...
15,907
test collect and send report
import json import platform import pytest from voluptuous import Any, Schema from dvc import analytics from dvc.cli import parse_args @pytest.fixture def tmp_global_dir(mocker, tmp_path): """ Fixture to prevent modifying the actual global config """ def _user_config_dir(appname, *_args, **_kwargs):...
15,908
fully shard
from typing import Callable, Iterable, Optional, Union import torch import torch.distributed as dist import torch.nn as nn from torch.distributed._composable.contract import contract from torch.distributed._composable_state import _get_module_state, _insert_module_state from torch.distributed.fsdp._common_utils import...
15,909
system data
# 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...
15,910
all chain ids
from __future__ import absolute_import, division, print_function import string from itertools import product from six.moves import range class generate_n_char_string: """ Iterator to generate strings of length n_chars, using upper-case, lower-case and numbers as desired. Allows specialty sets of characters a...
15,911
list services
from datetime import date, datetime, time from typing import TypedDict import pytz from dateutil.parser import isoparse from requests import Session from .exceptions import QmaticException from .models import QmaticConfig # API DATA DEFINITIONS class ServiceDict(TypedDict): publicId: str name: str # co...
15,912
sys path reset
import contextlib import json import os import re from pathlib import Path import signal import sys from time import sleep import pytest from kart import cli, is_windows H = pytest.helpers.helpers() def test_version(cli_runner): r = cli_runner.invoke(["--version"]) assert r.exit_code == 0, r assert re...
15,913
set expiration timeout
"""PasswordResetTool.py Mailback password reset product for CMF. Author: J Cameron Cooper, Sept 2003 """ from AccessControl import ClassSecurityInfo from AccessControl import ModuleSecurityInfo from AccessControl.class_init import InitializeClass from BTrees.OOBTree import OOBTree from OFS.SimpleItem import SimpleItem...
15,914
clean region name
from _typeshed import Incomplete from typing import Any from boto.auth_handler import AuthHandler SIGV4_DETECT: Any class HmacKeys: host: Any def __init__(self, host, config, provider) -> None: ... def update_provider(self, provider): ... def algorithm(self): ... def sign_string(self, string_to_s...
15,915
create keras model
# Copyright 2019, The TensorFlow Federated 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 o...
15,916
cna2df
"""The 'heatmap' command.""" import collections import logging import numpy as np import pandas as pd from matplotlib import pyplot as plt from matplotlib.colors import ListedColormap from skgenome.rangelabel import unpack_range from . import plots def METHOD_NAME(cna): """Extract a subset of DataFrame columns ...
15,917
test anydbm not existing
"""Test script for the dbm.open function based on testdumbdbm.py""" import unittest import dbm import os from test.support import import_helper from test.support import os_helper try: from dbm import ndbm except ImportError: ndbm = None dirname = os_helper.TESTFN _fname = os.path.join(dirname, os_helper.TEST...
15,918
expected index
""" tests for :mod:`pvlib.iotools.bsrn` """ import pandas as pd import pytest import os import tempfile from pvlib.iotools import read_bsrn, get_bsrn from ..conftest import (DATA_DIR, RERUNS, RERUNS_DELAY, assert_index_equal, requires_bsrn_credentials) @pytest.fixture(scope="module") def bsrn...
15,919
setup once
from __future__ import absolute_import import sys import types from sentry_sdk._functools import wraps from sentry_sdk.hub import Hub from sentry_sdk._compat import reraise from sentry_sdk.utils import capture_internal_exceptions, event_from_exception from sentry_sdk.integrations import Integration from sentry_sdk.in...
15,920
should prepare
from __future__ import annotations import tarfile import tempfile import zipfile from contextlib import redirect_stdout from io import StringIO from pathlib import Path from typing import TYPE_CHECKING from build import BuildBackendException from build import ProjectBuilder from build.env import IsolatedEnv as BaseI...
15,921
has imbalanced output
import bisect import logging from typing import Dict from numpy import nan_to_num from pandas import Series from ludwig.api_annotations import DeveloperAPI from ludwig.constants import ( BINARY, CATEGORY, COMBINER, CONFIG, HYPEROPT, IMBALANCE_DETECTION_RATIO, NAME, NUMBER, PARAMETE...
15,922
test question required property required after option
import pytest from django_scopes import scope from pretalx.submission.models import Answer, Question @pytest.mark.parametrize("target", ("submission", "speaker", "reviewer")) @pytest.mark.django_db def test_missing_answers_submission_question(submission, target, question): with scope(event=submission.event): ...
15,923
import
# -*- coding: utf-8 -*- # # This file is part of SENAITE.CORE. # # SENAITE.CORE 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, bu...
15,924
pre sos setup
# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution ...
15,925
get json data
######################################################################## # File: File.py # Date: 2012/08/03 15:02:53 ######################################################################## """ :mod: File .. module: File :synopsis: RMS operation file operation file """ # Disable invalid names warning # pylint: disa...
15,926
get sorted children
import logging from _typeshed import Incomplete, SupportsWrite from collections.abc import Iterable, Iterator from typing import Any, TypeVar, overload from typing_extensions import Literal logger: logging.Logger DEBUG: bool CR: str LF: str CRLF: str SPACE: str TAB: str SPACEORTAB: str _V = TypeVar("_V", bound=VBase)...
15,927
is saveable
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project from Qt import QtCore, QtWidgets from rezgui.objects.App import app from rezgui.widgets.ContextManagerWidget import ContextManagerWidget from rezgui.mixins.ContextViewMixin import ContextViewMixin from rezgui.mixins.StoreSizeMixin impor...
15,928
build folder api url
from abc import ABC, abstractmethod import requests from os import path from app.plugins import logger VALID_IMAGE_EXTENSIONS = ['.tiff', '.tif', '.png', '.jpeg', '.jpg'] class CloudPlatform(ABC): """A Cloud Platform is an online platform that can store files. For example Piwigo, Dropbox, Google Drive. Pla...
15,929
get
""" FiftyOne operator server. | Copyright 2017-2023, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ import types from starlette.endpoints import HTTPEndpoint from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.responses import JSONResponse, StreamingRespons...
15,930
b2x
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2016-2022 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . from test_framework.test_framework import BitcoinTestFra...
15,931
test get record data returns none when
from unittest.mock import MagicMock, patch import pytest from catalog.tests.dags.providers.provider_api_scripts.resources.json_load import ( make_resource_json_func, ) from providers.provider_api_scripts.wordpress import WordPressDataIngester _get_resource_json = make_resource_json_func("wordpress") @pytest.f...
15,932
init letters
#!/usr/bin/env python3 import sys import os from PyQt5 import QtGui, QtWidgets, uic from PyQt5.QtCore import Qt, QEvent from qtvcp.core import Info from qtvcp import logger LOG = logger.getLogger(__name__) INFO = Info() class VirtualKeyboard(QtWidgets.QWidget): def __init__(self, parent=None): super(Virt...
15,933
url parameters
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
15,934
after submit job request
# 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 # distributed under the Li...
15,935
get auth header
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import logging from abc import abstractmethod from typing import Any, List, Mapping, MutableMapping, Optional, Tuple, Union import backoff import pendulum import requests from airbyte_cdk.models import Level from airbyte_cdk.sources.http_logger import forma...
15,936
boolean
""" Provides operations to set SELinux file contexts, booleans and port types. """ from pyinfra import host from pyinfra.api import QuoteString, StringCommand, operation from pyinfra.facts.selinux import FileContext, FileContextMapping, SEBoolean, SEPort, SEPorts from pyinfra.facts.server import Which @operation( ...
15,937
handle focus
from __future__ import annotations from lona.unique_ids import generate_unique_id from lona.static_files import StaticFile from lona.html.selector import Selector from lona.protocol import NODE_TYPE from lona.state import State class DummyLock: def __enter__(self, *args, **kwargs): pass def __exit__...
15,938
use ssl
# Copyright 2021-2023 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 from vdk.internal.core.config import ConfigurationBuilder IMPALA_HOST = "IMPALA_HOST" IMPALA_PORT = "IMPALA_PORT" IMPALA_DATABASE = "IMPALA_DATABASE" IMPALA_TIMEOUT = "IMPALA_TIMEOUT" IMPALA_USE_SSL = "IMPALA_USE_SSL" IMPALA_CA_CERT = "IMPALA_CA_...
15,939
get containing while context
# Copyright 2020 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...
15,940
label offsets
""" Reflectometry thickness interactor. """ from .config import thickness_color, pick_radius from .interactor import BaseInteractor from .util import clip class ThicknessInteractor(BaseInteractor): """ Control the size of the layers. """ def __init__(self, profile): BaseInteractor.__init__(self...
15,941
test kanren relation sub filters
from copy import copy import numpy as np import pytest from etuples import etuple from kanren import eq, fact, run from kanren.assoccomm import associative, commutative, eq_assoccomm from kanren.core import lall from unification import var, vars import aesara.tensor as at from aesara.graph.basic import Apply from aes...
15,942
get unique chunks
from math import ceil, sqrt from logging import getLogger from modlunky2.sprites.base_classes.types import chunk_map_type, image_crop_tuple logger = getLogger("modlunky2") def chunks_from_animation( base_name: str, start_chunk: image_crop_tuple, num_chunks: int, off: int = 0 ): chunk_width = start_chunk[2] ...
15,943
iter ruptures
# The Hazard Library # Copyright (C) 2012-2023 GEM Foundation # # 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 the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. #...
15,944
get activity log alert
# 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...
15,945
test dict to am undirected
import pytest import numpy as np from numpy.testing import assert_allclose from openpnm._skgraph import tools from openpnm._skgraph.generators import cubic class SKGRToolsTest: def setup_class(self): pass def teardown_class(self): pass def METHOD_NAME(self): g = cubic(shape=[3, 2...
15,946
validate
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # This file is autogenerated. # To change this file you should edit assets/configuration/spec.yaml and then run the following commands: # ddev -x validate config -s <INTEGRATION_NAME> # ddev -x va...
15,947
set width
# Status: ported. # Base revision: 64488 # # Copyright (c) 2010 Vladimir Prus. # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE.txt or # https://www.bfgroup.xyz/b2/LICENSE.txt) # This module defines function to help with two main tasks: # # -...
15,948
get channel map
import sys from collections.abc import Callable, Mapping, Sequence from typing import ClassVar from typing_extensions import Final, TypeAlias __docformat__: str paFloat32: Final[int] paInt32: Final[int] paInt24: Final[int] paInt16: Final[int] paInt8: Final[int] paUInt8: Final[int] paCustomFormat: Final[int] paInDeve...
15,949
parse write task
#! /usr/bin/env python # vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker nu: from __future__ import print_function import re import sys import time REG_SQL_WAKE = re.compile(r'Begin\s+to\s+read\s+record\s+by\s+Sql', re.IGNORECASE) REG_SQL_DONE = re.compile(r'Finished\s+read\s+record\s+by\s+Sql', re.IGNORE...
15,950
method
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
15,951
get channel map
import sys from collections.abc import Callable, Mapping, Sequence from typing import ClassVar from typing_extensions import Final, TypeAlias __docformat__: str paFloat32: Final[int] paInt32: Final[int] paInt24: Final[int] paInt16: Final[int] paInt8: Final[int] paUInt8: Final[int] paCustomFormat: Final[int] paInDeve...
15,952
test delete when guild id is none
# -*- coding: utf-8 -*- # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # 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 t...
15,953
maybe link
from django.contrib import admin from django.urls import reverse from django.utils.html import format_html from morphodict.lexicon.models import ( Definition, DictionarySource, TargetLanguageKeyword, Wordform, SourceLanguageKeyword, ) # https://stackoverflow.com/a/1720961/14558 def admin_url_for(...
15,954
name
# 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...
15,955
extend
from __future__ import absolute_import, division, print_function from cctbx.array_family import flex from cctbx import miller import math from six.moves import range class merge_data_handler(object): """keep arrays of unmerged data""" def __init__(self): #extract data self.miller_indices_merge = flex.mille...
15,956
practice to practice map
""" This module provides the primary interface between the MatrixStore and the rest of the application. It makes use of the assumption that data is static throughout the runtime of the application and therefore any data imports or updates will require an application restart before they take effect. """ from functools ...
15,957
test update page user not in workspace
from unittest.mock import patch import pytest from baserow.contrib.builder.pages.exceptions import PageNotInBuilder from baserow.contrib.builder.pages.models import Page from baserow.contrib.builder.pages.service import PageService from baserow.core.exceptions import UserNotInWorkspace @patch("baserow.contrib.build...
15,958
test using hebbian learning of orthognal inputs
import numpy as np import psyneulink as pnl import pytest import psyneulink.core.components.functions.nonstateful.learningfunctions import psyneulink.core.components.functions.nonstateful.transferfunctions class TestContrastiveHebbian: def test_scheduled_contrastive_hebbian(self): o = pnl.TransferMechan...
15,959
to text
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2001-2017 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permis...
15,960
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...
15,961
build
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 the hope that it will ...
15,962
get graph ql api resolver 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__ =...
15,963
finalize
# Copyright (c) 2022 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...
15,964
modify brainsprite scene template
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Functions for generating the executive summary.""" from nipype import logging LOGGER = logging.getLogger("nipype.utils") def make_mosaic(png_files): """Take path to .png anatomical slices, create ...
15,965
test passtest filter notfound
import os import stat import unittest from avocado.core import resolver from avocado.plugins.resolvers import ( AvocadoInstrumentedResolver, ExecTestResolver, PythonUnittestResolver, ) from avocado.utils import script from selftests.utils import BASEDIR #: What is commonly known as "0664" or "u=rw,g=rw,o=...
15,966
test cuda multi lib
# 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...
15,967
abort job
import os import time from virttest import virsh from virttest import utils_misc from virttest.libvirt_xml import vm_xml from virttest.utils_libvirt import libvirt_disk from virttest.utils_libvirt import libvirt_misc from virttest.utils_test import libvirt from provider.backingchain import blockcommand_base def ru...
15,968
test handles expires in
# Copyright 2016 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...
15,969
open cell
from copy import copy import itertools from visidata import vd, asyncthread, vlen, VisiData, Column, AttrColumn, Sheet, ColumnsSheet, ENTER from visidata.pivot import PivotSheet, PivotGroupRow vd.option('disp_histogram', '■', 'histogram element character') vd.option('histogram_bins', 0, 'number of bins for histogram...
15,970
unload driver
#!/usr/bin/env python3 import os import subprocess import time import click from platform_config import GLOBALCONFIG, WARM_UPGRADE_STARTED_FLAG, WARM_UPG_FLAG CONTEXT_SETTINGS = {"help_option_names": ['-h', '--help']} class AliasedGroup(click.Group): def get_command(self, ctx, cmd_name): rv = click.Grou...
15,971
test kanren basic
from copy import copy import numpy as np import pytest from etuples import etuple from kanren import eq, fact, run from kanren.assoccomm import associative, commutative, eq_assoccomm from kanren.core import lall from unification import var, vars import pytensor.tensor as at from pytensor.graph.basic import Apply from...
15,972
query error handler
#!/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...
15,973
test
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal point """ f...
15,974
is dict subset
from unittest import mock import pytest from astro.constants import Database, FileType from astro.databases import create_database from astro.files import File from astro.settings import SCHEMA from astro.table import Metadata, Table def METHOD_NAME(superset: dict, subset: dict) -> bool: """ Compare superse...
15,975
lookup user
import subprocess, base64 import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry from people.models import Profile def METHOD_NAME(kth_id): """ Lookup a user by KTH-ID. First, an attempt to connect to KTH directory using LDAP protocol is made. If...
15,976
get review request reopened body
from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventTypeError from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.validator import WildValue, check_int, ch...
15,977
start events async
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
15,978
chunks provider
from __future__ import annotations import csv import json import logging import os.path from contextlib import contextmanager from dataclasses import dataclass from typing import Generator, Iterable, Iterator, NewType, Sequence import jsonschema from snuba import settings from snuba.snapshots import ( BulkLoadSo...
15,979
tear down module
"""Tests support for new syntax introduced by PEP 492.""" import sys import types import unittest from unittest import mock import asyncio from test.test_asyncio import utils as test_utils def METHOD_NAME(): asyncio.set_event_loop_policy(None) # Test that asyncio.iscoroutine() uses collections.abc.Coroutine ...
15,980
get properties dict
# GridCal # Copyright (C) 2022 Santiago Peñate Vera # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3 of the License, or (at your option) any later version. # # This ...
15,981
test repr one attr no commas
# -*- coding: utf-8 -*- import warnings import deprecation import pytest from os.path import join, sep from datetime import datetime, timezone, timedelta from sceptre.exceptions import PathConversionError from sceptre.helpers import ( get_external_stack_name, create_deprecated_alias_property, delete_keys...
15,982
test abs blobs
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Azure S...
15,983
test state from new data
"""Basic tests for the BQ info container and BQ state.""" import numpy as np import pytest from probnum.quad.integration_measures import IntegrationMeasure, LebesgueMeasure from probnum.quad.kernel_embeddings import KernelEmbedding from probnum.quad.solvers import BQIterInfo, BQState from probnum.randprocs.kernels im...
15,984
get firewall rule 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__ ...
15,985
generate input
# 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...
15,986
test state drop
from common import * import vaex.ml def test_state_skip_main(df_factory): df = df_factory(x=[1, 2]).hashed()._future() dff = df[df.x > 1] dff._push_down_filter() state = dff.state_get() assert dff.dataset.id in state['objects'] assert df.dataset.id not in state['objects'] def test_state_skip...
15,987
dump
"""Inventory utility functions for Sphinx.""" from __future__ import annotations import os import re import zlib from typing import IO, TYPE_CHECKING, Callable from sphinx.util import logging BUFSIZE = 16 * 1024 logger = logging.getLogger(__name__) if TYPE_CHECKING: from collections.abc import Iterator fro...
15,988
set mocked audit info
from unittest.mock import patch import botocore import yaml from boto3 import client, session from moto import mock_ssm from moto.core import DEFAULT_ACCOUNT_ID from prowler.providers.aws.lib.audit_info.audit_info import AWS_Audit_Info from prowler.providers.aws.services.ssm.ssm_service import SSM, ResourceStatus fro...
15,989
set up test data
######################################################################### # # Copyright (C) 2020 OSGeo # Copyright (C) 2022 King's College London # # 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...
15,990
discretize
#!/usr/bin/env python # This file is part of the pyMOR project (https://www.pymor.org). # Copyright pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) from typer import Argument, run from pymor.core.config import config def main( ...
15,991
get token
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
15,992
rows
""" Search application using Open Library book data. Requires the following steps to be run: Install Streamlit pip install streamlit Download and prepare data mkdir openlibrary && cd openlibrary wget -O works.txt.gz https://openlibrary.org/data/ol_dump_works_latest.txt.gz gunzip works.txt.gz grep "\"descrip...
15,993
get hits
# BSD 3-Clause License # # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, t...
15,994
end file
#!/usr/bin/python3 -i # # 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, modify...
15,995
to str
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.28 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
15,996
test targets required if probing
# Copyright 2022 The KerasCV 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
15,997
crack mayes units
import os from pathlib import Path from tempfile import tempdir import numpy as np import pytest from numpy.testing import assert_allclose, assert_almost_equal import ross as rs from ross.defects.crack import Crack from ross.units import Q_ steel2 = rs.Material(name="Steel", rho=7850, E=2.17e11, Poisson=0.2992610837...
15,998
test objects to values
import numpy as np from numpy.testing import assert_allclose from astropy.coordinates import SkyCoord from astropy.units import Quantity from astropy.wcs import WCS from astropy.wcs.wcsapi.high_level_api import ( HighLevelWCSMixin, high_level_objects_to_values, values_to_high_level_objects, ) from astropy....
15,999
check shared album token
import hashlib import io import logging import os import tarfile from zipfile import ZipFile, ZipInfo, is_zipfile from django.conf import settings from django.contrib import messages from django.core.files import File from django.core.files.base import ContentFile from django.core.files.uploadedfile import InMemoryUpl...