id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
700
bump sdk version
import glob import os import re import sys from lxml import etree from functions import replace_files class VersionBumper: module_list = [ "AWSAPIGateway", "AWSAutoScaling", "AWSChimeSDKIdentity", "AWSChimeSDKMessaging", "AWSCloudWatch", "AWSCognitoAuth", ...
701
prepare request
# 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 ...
702
swap32
import struct from PIL import Image def METHOD_NAME(i): return struct.unpack("<I", struct.pack(">I", i))[0] def _clamp(n, smallest, largest): return max(smallest, min(n, largest)) def yuv422_to_rgb(bytesequence): img = [] for i in range(len(bytesequence) // 4): offset = i * 4 byte1 = bytesequence[offse...
703
optimizer config
# 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. from torch.optim import Adagrad from fairseq.optim import LegacyFairseqOptimizer, register_optimizer @register_optimizer("adagrad_with_grad...
704
merge informative pair
from typing import Optional import pandas as pd from freqtrade.exchange import timeframe_to_minutes def METHOD_NAME(dataframe: pd.DataFrame, informative: pd.DataFrame, timeframe: str, timeframe_inf: str, ffill: bool = True, append_timeframe: bool = True, ...
705
test area padding logx
from holoviews.element import Area, Overlay import pandas as pd import numpy as np from ...utils import LoggingComparisonTestCase from .test_plot import TestMPLPlot, mpl_renderer class TestAreaPlot(LoggingComparisonTestCase, TestMPLPlot): def test_area_padding_square(self): area = Area([(1, 1), (2, 2), ...
706
update notification to cancelled
from app.notify_client import NotifyAdminAPIClient, _attach_current_user class NotificationApiClient(NotifyAdminAPIClient): def get_notifications_for_service( self, service_id, job_id=None, template_type=None, status=None, page=None, page_size=None, ...
707
num color blocks
# Authors: see git history # # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. from sys import exit from typing import List from inkex import errormsg from ..i18n import _ from ..svg import PIXELS_PER_MM from ..utils.geometry import Point from ..utils....
708
conditional decorator
# -*- coding: utf-8 -*- """ mslib.utils ~~~~~~~~~~~~~~ Collection of utility routines for the Mission Support System. This file is part of MSS. :copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. :copyright: Copyright 2011-2014 Marc Rautenhaus (mr) :copyright:...
709
test supported single version
import pytest from pip._vendor.packaging.tags import Tag from pip._internal.exceptions import InvalidWheelFilename from pip._internal.models.wheel import Wheel from pip._internal.utils import compatibility_tags class TestWheelFile: def test_std_wheel_pattern(self) -> None: w = Wheel("simple-1.1.1-py2-non...
710
is defined in parent
import json import re from pathlib import Path from typing import Iterator from ..diagnostic import Diagnostic from .linter import Linter from ..replacement import Replacement class Definition(Linter): """ Finds issues in definition files, such as overriding default parameters """ def __init__(self, file: Pa...
711
endheaders
import email.message import io import ssl import sys import types from _typeshed import ReadableBuffer, SupportsRead, WriteableBuffer from collections.abc import Callable, Iterable, Iterator, Mapping from socket import socket from typing import Any, BinaryIO, TypeVar, overload from typing_extensions import Self, TypeAl...
712
ci client
import io import pytest from typing import Iterator from dlt.common.schema import Schema from dlt.common.configuration.container import Container from dlt.common.configuration.specs.config_section_context import ConfigSectionContext from dlt.common.utils import uniq_id from dlt.destinations import weaviate from dlt.d...
713
get pixel
# Copyright 1996-2023 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
714
do finalize
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Lucas Teske <lucas@teske.com.br> # SPDX-License-Identifier: BSD-2-Clause # The Muselab IceSugar Pro PCB and IOs have been documented by @wuxx # https://github.com/wuxx/icesugar-pro from litex.build.generic_platform import * from litex.build.lattice import ...
715
extend name
# # SPDX-License-Identifier: GPL-2.0-only # import collections def get_packages(d): pkgs = d.getVar("PACKAGES_NONML") extcls = d.getVar("EXTENDERCLASS") return extcls.rename_packages_internal(pkgs) def get_depends(varprefix, d): extcls = d.getVar("EXTENDERCLASS") return extcls.map_depends_variabl...
716
run compare with baseline sweep
# 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 unittest import numpy as np from fairseq.data.data_utils_fast import batch_by_size_fn from fairseq.data.data_utils_fast import batch_b...
717
test exclude the first half points
# Copyright 2022 Waymo LLC. # # Licensed under the terms in https://github.com/keras-team/keras-cv/blob/master/keras_cv/layers/preprocessing_3d/waymo/LICENSE # noqa: E501 import numpy as np from keras_cv.layers.preprocessing_3d import base_augmentation_layer_3d from keras_cv.layers.preprocessing_3d.waymo.frustum_ran...
718
test env required no env
#!/usr/bin/env python3 # Owner(s): ["oncall: distributed"] # Copyright (c) Facebook, Inc. and its 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 os import unittest from argparse import Argumen...
719
test download file
# -*- coding: utf-8 -*- # # This file is part of HEPData. # Copyright (C) 2016 CERN. # # HEPData 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...
720
test serialize subclassed kb
from pathlib import Path from typing import Any, Callable, Dict, Iterable import srsly from numpy import zeros from thinc.api import Config from spacy import Errors, util from spacy.kb.kb_in_memory import InMemoryLookupKB from spacy.util import SimpleFrozenList, ensure_path, load_model_from_config, registry from spac...
721
radial split 2 d
import math from warnings import warn from pyaedt.generic.general_methods import pyaedt_function_handler from pyaedt.modeler.cad.Modeler import GeometryModeler from pyaedt.modeler.cad.Modeler import Modeler from pyaedt.modeler.cad.Primitives2D import Primitives2D class ModelerRMxprt(Modeler): """Provides the Mod...
722
base mac addr
# -*- coding: utf-8 -*- ######################################################################## # Ruijie B6510-48VS8CQ # # Module contains platform specific implementation of SONiC Platform # Base API and provides the EEPROMs' information. # # The different EEPROMs available are as follows: # - System EEPROM : Contai...
723
create app file
from __future__ import annotations import importlib.util import sys from pathlib import Path from shutil import rmtree from typing import TYPE_CHECKING, Callable, Generator, Protocol, cast import pytest from _pytest.fixtures import FixtureRequest from _pytest.monkeypatch import MonkeyPatch from click.testing import C...
724
text
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Pop-up window to display keybindings of current mode.""" from typing import List, Tuple, Iterator, Set from vimiv.qt.widgets import QLabel, QHBoxLayout, QVBoxLayout, QLayout, QLineEdit import vimiv from vimiv import api, utils from vimiv.config import styles from...
725
checkbox
import sys from collections.abc import Container, Iterable, Sequence from types import ModuleType from typing import Any from typing_extensions import Literal if sys.platform == "win32": from _msi import * from _msi import _Database AMD64: bool Win64: bool datasizemask: Literal[0x00FF] type_v...
726
triples
from __future__ import absolute_import from __future__ import print_function from owmeta_core.command import OWM from owmeta_core.dataobject import ObjectProperty from owmeta_core.custom_dataobject_property import CustomProperty from owmeta_core.context import Context from owmeta.neuron import Neuron from owmeta.netw...
727
build csv response
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import csv import json from io import StringIO import requests import frappe from frappe import _, msgprint from frappe.utils import cint, comma_or, cstr, flt def read_csv_content_from_attached_file(doc): fileid = frap...
728
get logo part
from abc import ABC, abstractmethod from shutil import get_terminal_size from textwrap import indent, wrap from typing import Dict, Optional from sanic import __version__ from sanic.helpers import is_atty from sanic.log import logger class MOTD(ABC): """Base class for the Message of the Day (MOTD) display.""" ...
729
test init templatedir already set
from __future__ import annotations import os.path from unittest import mock import pytest import pre_commit.constants as C from pre_commit.commands.init_templatedir import init_templatedir from pre_commit.envcontext import envcontext from pre_commit.util import cmd_output from testing.fixtures import git_dir from te...
730
party choices
import re from django.db import models from django.utils import timezone from .constants import JOINT_DESCRIPTION_REGEX class PartyQuerySet(models.QuerySet): def active_for_date(self, date=None): if not date: date = timezone.now() qs = self.filter(date_registered__lte=date) r...
731
report error
'''Define SearchEngine for search dialogs.''' import re from Tkinter import StringVar, BooleanVar, TclError import tkMessageBox def get(root): '''Return the singleton SearchEngine instance for the process. The single SearchEngine saves settings between dialog instances. If there is not a SearchEngine alre...
732
build list request
# 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...
733
test hadoop version url override
"""Tests for dbp_service.""" import unittest from absl.testing import flagsaver from packaging import version from perfkitbenchmarker import errors from perfkitbenchmarker.linux_packages import hadoop from tests import pkb_common_test_case import requests_mock HADOOP_STABLE_DIR = """\ <!DOCTYPE HTML PUBLIC "-//W3C//...
734
new config
# Copyright (c) 2023 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 # # Un...
735
get gh backup
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy from typing import Any, Optional from hydra import version from hydra._internal.deprecation_warning import deprecation_warning from hydra.core.global_hydra import GlobalHydra from hydra.core.singleton import Singleton from hydra.initial...
736
test arithmetic drops references
import sys import os import mmap import pytest from pathlib import Path from tempfile import NamedTemporaryFile, TemporaryFile from numpy import ( memmap, sum, average, product, ndarray, isscalar, add, subtract, multiply) from numpy import arange, allclose, asarray from numpy.testing import ( assert_, assert_...
737
pre 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 # --------------------------------...
738
exec action
import logging import os.path as op from functools import partial from itertools import chain import sublime import sublime_plugin import flower from . import manager from .utils import rootSplit, getBinaryFolder from .compilerutils import getCompiler, COMPILER_KEY from .process import Executor, Callback, Default fro...
739
save
# 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...
740
get component custom id
from __future__ import annotations import dataclasses from collections.abc import Mapping from rest_framework import status from rest_framework.request import Request from sentry import options from sentry.services.hybrid_cloud.identity.model import RpcIdentity from sentry.services.hybrid_cloud.identity.service impo...
741
fallback getpass
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the passw...
742
test auto q
import unittest from email import _encoded_words as _ew from email import errors from test.test_email import TestEmailBase class TestDecodeQ(TestEmailBase): def _test(self, source, ex_result, ex_defects=[]): result, defects = _ew.decode_q(source) self.assertEqual(result, ex_result) self.a...
743
create component structure
""" Algorithms for asteroidal triples and asteroidal numbers in graphs. An asteroidal triple in a graph G is a set of three non-adjacent vertices u, v and w such that there exist a path between any two of them that avoids closed neighborhood of the third. More formally, v_j, v_k belongs to the same connected component...
744
check mt
# # Test virtio-scsi and virtio-blk queue settings for all machine types # # Copyright (c) 2019 Virtuozzo International GmbH # # 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...
745
get task data
import numpy as np from libertem.masks import _make_circular_mask from libertem.udf import UDF class CrystallinityUDF(UDF): """ Determine crystallinity by integration over a ring in the fourier spectrum of each frame. Parameters ---------- rad_in: float Inner radius in pixels of a ring ...
746
docker push
#!/usr/bin/env python # Copyright 2014 The Serviced 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 applicabl...
747
length in bytes
# # 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...
748
set time frame
"""Base classes.""" from enum import Enum, auto import numpy as np import pandas as pd from .const import ChartType, TimeFrame __all__ = ('Indicator', 'Symbol', 'Quotes') # I actually can't think of a worse reason to override an array than # this: # - a method .new() that mutates the data from an input data frame...
749
detach
############################################################################### # Popen for LokyProcess. # # author: Thomas Moreau and Olivier Grisel # import os import sys import signal import pickle from io import BytesIO from multiprocessing import util, process from multiprocessing.connection import wait from multi...
750
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 # --------------------------------...
751
resolve model field relations
from collections.abc import Iterable, Iterator, Sequence from contextlib import contextmanager from typing import Any from django.apps import AppConfig from django.apps.registry import Apps from django.db.models.base import Model from django.db.models.fields import Field from django.db.models.manager import Manager fr...
752
format perc
# Copyright 2012 Christoph Reiter # # 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. from gi.repository import Gst, Gtk,...
753
snmp get
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from typing import Any, Dict, Generator # noqa: F401 from pyasn1.type.univ import Null from pysnmp import hlapi # noqa: F401 from pysnmp.entity.rfc3413 import cmdgen from pysnmp.hlapi.asyncore.cmdgen import v...
754
mmio read cb
#!/usr/bin/env python3 # # Cross Platform and Multi Architecture Advanced Binary Emulation Framework # import ctypes from qiling.core import Qiling from qiling.hw.peripheral import QlPeripheral from qiling.utils import ql_get_module_function from qiling.exception import QlErrorModuleFunctionNotFound class QlHwMana...
755
set role
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from ..uac import RoleV2_pb2 as uac_dot_RoleV2__pb2 class RoleServiceV2Stub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grp...
756
get terminal penalty
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
757
reset hook
# pylint: disable=wrong-or-nonexistent-copyright-notice from typing import Tuple, List from unittest.mock import create_autospec import cirq import numpy as np from pyquil.gates import MEASURE, RX, DECLARE, H, CNOT, I from pyquil.quilbase import Pragma, Reset from cirq_rigetti import circuit_transformers as transformer...
758
test for break npm
import warnings import unittest from numba.core.compiler import compile_isolated, Flags from numba.core import types, errors from numba.tests.support import TestCase, CompilationCache enable_pyobj_flags = Flags() enable_pyobj_flags.enable_pyobject = True force_pyobj_flags = Flags() force_pyobj_flags.force_pyobject ...
759
start server
# noinspection PyPackageRequirements import wx from logbook import Logger import threading import time import base64 import json import config import webbrowser import eos.db from service.const import EsiLoginMethod, EsiSsoMode from eos.saveddata.ssocharacter import SsoCharacter from service.esiAccess import APIExcept...
760
parse proxy pac
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request, urllib.error, urllib.parse import sys import json import logging import re ''' HTTP Proxy parser and Connection connect() function: - auto detects proxy in windows, osx - in ux systems, the http_proxy enviroment variable must be set - if...
761
set up
import unittest from collections import namedtuple from unittest import mock from PyQt5.QtTest import QSignalSpy from securedrop_client import state from tests.helper import app # noqa: F401 Source = namedtuple("Source", ["uuid"]) File = namedtuple("File", ["uuid", "source", "is_downloaded"]) class TestState(unit...
762
sqrtbox
# -*- coding: utf-8 -*- """ Lower-level formatter Mathics objects as plain text. """ from mathics.builtin.box.graphics import GraphicsBox from mathics.builtin.box.graphics3d import Graphics3DBox from mathics.builtin.box.layout import ( FractionBox, GridBox, RowBox, SqrtBox, StyleBox, Subscript...
763
move item down
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. from dataclasses import dataclass from typing import Any, Callable, Optional, Type import PyOpenColorIO as ocio from PySide2 import QtCore, QtGui, QtWidgets from ..config_cache import ConfigCache from ..undo import ConfigSna...
764
get charmer or summoner
from game.world.managers.objects.ObjectManager import ObjectManager from game.world.managers.objects.farsight.FarSightManager import FarSightManager from game.world.managers.objects.guids.GuidManager import GuidManager from utils.constants.MiscCodes import ObjectTypeIds, HighGuid, ObjectTypeFlags from utils.constants.U...
765
head200
# 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...
766
default nfe environment
# Copyright (C) 2009 Renato Lima - Akretion # Copyright (C) 2011 Vinicius Dittgen - PROGE, Leonardo Santagada - PROGE # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import base64 import time from datetime import datetime from odoo import _, fields, models from odoo.exceptions import Warning as Use...
767
outputs
""" generalized_inner_product ========================= 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 ...
768
interpret args
# 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 app...
769
array model form
#!/bin/env python __author__ = 'dongyun.zdy' import math import numpy as np from scipy.optimize import leastsq from scipy.optimize import curve_fit import sys from lmfit import Model import getopt import os # # def array_model_form(args): # # ( # # Nelem, # # ) = args # # Telem_ence = 0.00898860 #...
770
check target num partitions
# Copyright (c) Alibaba, Inc. and its affiliates. import os import shutil from typing import Dict, List, Union import torch from torch import nn from modelscope.utils.logger import get_logger from modelscope.utils.torch_utils import is_master logger = get_logger() _DEFAULT_CFG_WITH_MODEL_TYPE = { 'gpt-moe': { ...
771
run
import json import logging from pathlib import Path import hydra import numpy as np from omegaconf import DictConfig from scipy.optimize import curve_fit from scipy.stats import kendalltau, pearsonr logger = logging.getLogger(__name__) def rmse_score(x, y): return np.sqrt(np.mean((x - y) ** 2)) def ncc_score(...
772
restore
import sys from collections.abc import Callable, Iterable, Iterator, Sequence from typing import Any, AnyStr, Generic, NamedTuple, TypeVar, overload if sys.version_info >= (3, 9): from types import GenericAlias __all__ = [ "get_close_matches", "ndiff", "restore", "SequenceMatcher", "Differ", ...
773
inherits filter
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2019-2020 Thomas Hess <thomas.hess@udo.edu> # # 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 opt...
774
test floordiv 128 64
import itertools import contextlib import operator import pytest import numpy as np import numpy.core._multiarray_tests as mt from numpy.testing import assert_raises, assert_equal INT64_MAX = np.iinfo(np.int64).max INT64_MIN = np.iinfo(np.int64).min INT64_MID = 2**32 # int128 is not two's complement, the sign bit ...
775
test cossin error missing partitioning
import pytest import numpy as np from numpy.random import seed from numpy.testing import assert_allclose from scipy.linalg.lapack import _compute_lwork from scipy.stats import ortho_group, unitary_group from scipy.linalg import cossin, get_lapack_funcs REAL_DTYPES = (np.float32, np.float64) COMPLEX_DTYPES = (np.compl...
776
test name including spaces
# -*- coding: utf-8 -*- # 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 i...
777
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...
778
test property xml type
import sys from xsdata.codegen.models import Restrictions from xsdata.models.enums import DataType from xsdata.models.enums import Namespace from xsdata.models.enums import Tag from xsdata.utils.testing import AttrFactory from xsdata.utils.testing import AttrTypeFactory from xsdata.utils.testing import FactoryTestCase...
779
set log levels
""" Command to load course blocks. """ import logging from django.core.management.base import BaseCommand import openedx.core.djangoapps.content.block_structure.api as api import openedx.core.djangoapps.content.block_structure.store as store import openedx.core.djangoapps.content.block_structure.tasks as tasks from...
780
test organization name method
import doctest from decimal import Decimal from uuid import uuid4 from django.test import SimpleTestCase from nose.tools import assert_equal from .. import matchers from ..const import SYSTEM_URI_CASE_ID from ..matchers import ( GivenName, NegativeIdentifier, OrganizationMatcher, OrganizationName, ...
781
test staff can fetch the invite
import datetime from pytest import mark from schedule.models import ScheduleItem pytestmark = mark.django_db def test_fetch_an_invitation( submission_factory, graphql_client, user, schedule_item_factory, slot_factory, day_factory, ): graphql_client.force_login(user) submission = sub...
782
add key
""" Basic Module to manage performance results """ import logging import json import time from elasticsearch import Elasticsearch, exceptions as ESExp log = logging.getLogger(__name__) class PerfResult: """ Basic Performance results object for Q-PAS team """ def __init__(self, uuid, crd): ...
783
get
# 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...
784
required name
"""Slightly extends the ``botocore.validate`` package to provide better integration with our parser/serializer.""" from typing import Any, Dict, List, NamedTuple from botocore.model import OperationModel, Shape from botocore.validate import ParamValidator as BotocoreParamValidator from botocore.validate import Validat...
785
test with container
from mock.mock import patch import os import pytest import ca_test_common import ceph_osd_flag fake_cluster = 'ceph' fake_container_binary = 'podman' fake_container_image = 'quay.io/ceph/daemon:latest' fake_flag = 'noup' fake_user = 'client.admin' fake_keyring = '/etc/ceph/{}.{}.keyring'.format(fake_cluster, fake_user...
786
complete
import os class TaskStatus: requested = "requested" reserved = "reserved" started = "started" scraper_started = "scraper_started" scraper_running = "scraper_running" scraper_completed = "scraper_completed" scraper_killed = "scraper_killed" failed = "failed" cancel_requested = "canc...
787
test reoccurred error message
from zerver.lib.test_classes import WebhookTestCase class RaygunHookTests(WebhookTestCase): STREAM_NAME = "raygun" URL_TEMPLATE = "/api/v1/external/raygun?&api_key={api_key}&stream={stream}" WEBHOOK_DIR_NAME = "raygun" def test_status_changed_message(self) -> None: expected_topic = "test" ...
788
consume
import asyncio import io import numpy as np import pyaudio import wave from aiortc.contrib.media import MediaBlackhole from aiortc.mediastreams import AudioStreamTrack, MediaStreamError, MediaStreamTrack from aiortc.mediastreams import VIDEO_CLOCK_RATE, VIDEO_TIME_BASE from aiortc.rtcrtpsender import RTCRtpSender from...
789
test drop null transformer transform default pct
import numpy as np import pandas as pd import pytest import woodwork as ww from pandas.testing import assert_frame_equal from woodwork.logical_types import ( Boolean, Categorical, Double, Integer, NaturalLanguage, ) from evalml.pipelines.components import DropNullColumns def test_drop_null_transf...
790
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 # --------------------------------...
791
site url
from xml.sax.saxutils import escape from django.conf import settings from django.contrib.syndication.views import Feed from django.core.cache import cache from django.urls import reverse from django.utils.feedgenerator import Enclosure, Rss201rev2Feed from django.utils.safestring import SafeString, mark_safe from djan...
792
current user
import typing import datetime import strawberry from strawberry.types import Info from django.forms.models import model_to_dict import karrio.lib as lib from karrio.server.serializers import Context from karrio.server.user.serializers import TokenSerializer import karrio.server.graph.utils as utils import karrio.serve...
793
catch log error
from pathlib import Path from typing import Type, Dict, Optional import bpy import inspect import traceback import logging import logging.handlers from contextlib import contextmanager import sverchok if not sverchok.reload_event: # otherwise it leeds to infinite recursion old_factory = logging.getLogRecordFac...
794
single tiff setup
import ufo.numpy import numpy as np import tifffile import contextlib from common import disable, tempdir a, b = 1.5, 2.5 ones = np.ones((512, 512)) zeros = np.zeros((512, 512)) small = np.ones((256, 256)) random = np.random.random((512, 512)) def have_camera_plugin(): from gi.repository import Ufo return ...
795
parameters
# coding=utf-8 # Copyright 2021-present, the Recognai S.L. team. # # 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 ...
796
main
import struct import math import os import os.path import sys # From lib/stm32wb_copro/wpan/interface/patterns/ble_thread/shci/shci.h __STACK_TYPE_CODES = { "BLE_FULL": 0x01, "BLE_HCI": 0x02, "BLE_LIGHT": 0x03, "BLE_BEACON": 0x04, "BLE_BASIC": 0x05, "BLE_FULL_EXT_ADV": 0x06, "BLE_HCI_EXT_...
797
stream name from stream arn
import contextlib import logging import threading import time from typing import Dict from bson.json_util import dumps from localstack.aws.api.dynamodbstreams import StreamStatus, StreamViewType from localstack.aws.connect import connect_to from localstack.services.dynamodbstreams.models import DynamoDbStreamsStore, ...
798
test scan iterates through all docs
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. from __future__ import unicode_literals ...
799
exit code
# Tests invocation of the interpreter with various command line arguments # All tests are executed with environment variables ignored # See test_cmd_line_script.py for testing of script execution import test.test_support import sys import unittest from test.script_helper import ( assert_python_ok, assert_python_fa...