id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,700
layout
from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file, rm, rmdir fr...
16,701
end
import NuRadioReco.framework.event from NuRadioReco.modules.base.module import register_run import NuRadioReco.framework.station import NuRadioReco.framework.channel import ROOT import numpy as np from NuRadioReco.utilities import units import sys import os import logging import time from scipy import interpolate impor...
16,702
start
#! /usr/bin/env python3 """ Firmware Analysis and Comparison Tool (FACT) Copyright (C) 2015-2023 Fraunhofer FKIE 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 ...
16,703
draw outline circle
# ===-- __init__.py -------------------------------------------------------===## # # The KLEE Symbolic Virtual Machine # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # # ===------------------------------------------------------...
16,704
valid proof of inclusion fixture
from __future__ import annotations import dataclasses from typing import List import pytest # TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469 from _pytest.fixtures import SubRequest from chia.data_layer.data_layer_util import ( ClearPendingRootsRequest, ClearPendingRootsRes...
16,705
convert keras tensor to tf
import types import numpy as np import tensorflow as tf from tensorflow.compiler.tf2xla.python.xla import dynamic_update_slice from keras_core.backend.common import KerasVariable from keras_core.backend.common import global_state from keras_core.backend.common import standardize_dtype from keras_core.backend.common.k...
16,706
has bulk upsert permission
from care.facility.models.mixins.permissions.base import BasePermissionMixin from care.users.models import User class FacilityPermissionMixin(BasePermissionMixin): @staticmethod def METHOD_NAME(request): return request.user.is_superuser @staticmethod def has_write_permission(request): ...
16,707
loop
from qtpy import QtCore from pyrpl.software_modules.lockbox import * from pyrpl.async_utils import sleep_async class GainOptimizerLoop(LockboxPlotLoop): amplitude = FloatProperty(default=0.1, doc='Amplitude of gain modulation for the estimation of the dependency ' 'o...
16,708
set url
from __future__ import annotations import asyncio from toga.handlers import AsyncResult, wrapped_handler from .base import Widget class JavaScriptResult(AsyncResult): RESULT_TYPE = "JavaScript" class WebView(Widget): def __init__( self, id=None, style=None, url: str | None...
16,709
test check sim status
import testing from testing import divert_nexus,restore_nexus,clear_all_sims from testing import failed,FailedTest from testing import value_eq,object_eq,text_eq pseudo_inputs = dict( pseudo_dir = 'pseudopotentials', pseudo_files_create = ['C.BFD.upf'], ) def get_system(): from physical_system imp...
16,710
test basic functional with value
# Copyright 2017 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...
16,711
build func line tpetra
import sys sys.path.append('lib/') import os from string import Template from ConfigParser import SafeConfigParser from XpetraLib import * from XpetraLibConfig import * def METHOD_NAME( functionNode ): #TODO: clean up tree = etree.parse(conf_XMLclass) root = tree.getroot() # root == <doxygen> classNode ...
16,712
add layout pins
# See LICENSE for licensing information. # # Copyright (c) 2016-2023 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from openram import debug from openram.base impo...
16,713
to engine
import logging import threading from angr.errors import AngrError from .engine import SuccessorsMixin from ..errors import SimConcreteRegisterError l = logging.getLogger("angr.engines.concrete") # l.setLevel(logging.DEBUG) try: from angr_targets.concrete import ConcreteTarget except ImportError: ConcreteTarg...
16,714
possible products
from abc import ABCMeta, abstractmethod from collections.abc import Mapping from typing import TYPE_CHECKING, Any, Callable, Optional from rotkehlchen.accounting.structures.evm_event import EvmProduct from rotkehlchen.types import ChecksumEvmAddress, DecoderEventMappingType if TYPE_CHECKING: from rotkehlchen.acco...
16,715
get const metatypes
# Copyright (c) 2023 Intel Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writ...
16,716
set
from collections.abc import Callable from collections.abc import Hashable from collections.abc import Iterable from typing import Any from typing import NoReturn from typing import overload from typing import SupportsIndex from typing import TypeVar from _typeshed import SupportsKeysAndGetItem from .headers import He...
16,717
make log record
import logging import time from threading import Thread from unittest.mock import patch import pytest from pip._internal.utils.logging import ( BrokenStdoutLoggingError, IndentingFormatter, RichPipStreamHandler, indent_log, ) from pip._internal.utils.misc import captured_stderr, captured_stdout logge...
16,718
error format
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
16,719
single doc
import os import json try: from urllib.parse import parse_qs except ImportError: from urlparse import parse_qs import boto3.session from chalice import Chalice, BadRequestError, NotFoundError, Response,\ CORSConfig, UnauthorizedError, AuthResponse, AuthRoute # This is a test app that is used by integrat...
16,720
create volume
""" A module for all PSI-openstack related utilities """ import logging from cinderclient import client as cinderc from cinderclient import exceptions as cinderexception from keystoneauth1 import loading, session from novaclient import client as novac from ocs_ci.framework import config from ocs_ci.ocs import consta...
16,721
get test suite
#!/usr/bin/env python3 # encoding: utf-8 import unittest as ut from .SEEDBlockchain import Wallet from web3 import Web3 from seedemu import * import os import getopt import sys import time from test import SeedEmuTestCase class EthereumPOWTestCase(SeedEmuTestCase): @classmethod def setUpClass(cls) -> None: ...
16,722
after job complete
"""SageMaker component for transform.""" # 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 wri...
16,723
test vdk options
# Copyright 2021-2023 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import configparser import os import pathlib import shutil import tempfile import pytest from vdk.internal.builtin_plugins.config.job_config import JobConfig from vdk.internal.core.errors import VdkConfigurationError class TestJobConfig: de...
16,724
validate acl
# # Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates # # 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...
16,725
get service info
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
16,726
patch
# (c) 2016-2021 Paul Sokolovsky, MIT license, https://github.com/pfalcon/pycopy-lib import usocket class Request: pass class Response: def __init__(self, f): self.raw = f self.encoding = "utf-8" self._cached = None def close(self): if self.raw: self.raw.clos...
16,727
extract data
# 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...
16,728
test service start
""" Simple Smoke Tests for Connected Proxy Minion """ import logging import pytest log = logging.getLogger(__name__) pytestmark = [ pytest.mark.skip_on_spawning_platform( reason="Deltaproxy minions do not currently work on spawning platforms.", ), pytest.mark.slow_test, ] @pytest.fixture(scope=...
16,729
assert string not in recent logs
import os import re import unittest import uuid from buildpack import util from lib.m2ee.util import strtobool from .runner import CfLocalRunnerWithLocalDB, CfLocalRunnerWithPostgreSQL class BaseTest(unittest.TestCase): _multiprocess_can_split_ = True ENV_PREFIX = "TEST_" # This class provides integrat...
16,730
test settingsqr parses line break separators
import pytest from base import BaseTest from seedsigner.models.settings import InvalidSettingsQRData, Settings from seedsigner.models.settings_definition import SettingsConstants class TestSettings(BaseTest): @classmethod def setup_class(cls): super().setup_class() cls.settings = Settings.get...
16,731
description
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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 fr...
16,732
test by org with tag
import datetime from django.test import TestCase from frontend.models import MeasureGlobal, MeasureValue class MeasureValueManagerTests(TestCase): fixtures = ["one_month_of_measures"] def test_by_regional_team_with_no_org(self): mvs = MeasureValue.objects.by_org("regional_team") self.assertE...
16,733
test download all
""" integration tests for mac_softwareupdate """ import pytest from tests.support.case import ModuleCase @pytest.mark.skip_if_not_root @pytest.mark.skip_if_binaries_missing("softwareupdate") @pytest.mark.skip_unless_on_darwin class MacSoftwareUpdateModuleTest(ModuleCase): """ Validate the mac_softwareupdate...
16,734
test four term case
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
16,735
get
# -*- coding: utf-8 -*- # # API handling recipient user functionalities import base64 import json from datetime import datetime from sqlalchemy.sql.expression import distinct, func, and_ from globaleaks import models from globaleaks.handlers.base import BaseHandler from globaleaks.handlers.recipient.rtip import db_g...
16,736
private link service connection state
# 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...
16,737
test acl users protected
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
16,738
query 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 # --------------------------------...
16,739
share delete retention policy
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
16,740
tear down
"""Tests for distutils.dir_util.""" import unittest import os import stat import sys from unittest.mock import patch from distutils import dir_util, errors from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) from distutils import log from distu...
16,741
delete
""" Repository pattern, errors and data structures for models.tags """ import functools import itertools from dataclasses import dataclass from typing import TypedDict import sqlalchemy as sa from aiopg.sa.connection import SAConnection from simcore_postgres_database.models.groups import user_to_groups from simcore_p...
16,742
fill items
from __future__ import annotations import asyncio import typing as T import discord from utils.default import split_list from .Context import Context from .views import QuotientView class PageLine(T.NamedTuple): line: T.Optional[str] = None image: T.Optional[str] = None # embed: T.Optional[discord.Emb...
16,743
get middle frame
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # GNU General Public Licence (GPL) # # 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...
16,744
test upload to gcs
import os import pytest from google.api_core.exceptions import Forbidden from google.api_core.retry import Retry from google.auth.exceptions import DefaultCredentialsError from google.cloud.storage.retry import DEFAULT_RETRY_IF_GENERATION_SPECIFIED, ConditionalRetryPolicy from scriptworker.exceptions import ScriptWork...
16,745
tokenise maturity requirement
""" Documentation: TBA Assume everything is a maturity condition for now. - Tokenise the pre-processed data. """ from contextlib import suppress import re from typing import Dict, Iterator, List, Optional from data.processors.program_conditions_pre_processing import PRE_PROCESSED_DATA_PATH from data.utility.data_help...
16,746
test reverse language
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for API access commands of command-line interface wrapper. """ import json import pytest import nomina...
16,747
on mempool
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. """Test message sending before handshake completion. A node should never send anything other than VERSION...
16,748
is falsy
# 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 ...
16,749
load config from file
# 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...
16,750
delete
"Test percolator, coverage 100%." from idlelib.percolator import Percolator, Delegator import unittest from test.support import requires requires('gui') from tkinter import Text, Tk, END class MyFilter(Delegator): def __init__(self): Delegator.__init__(self, None) def insert(self, *args): se...
16,751
should run scan
from __future__ import annotations from typing import Any, TYPE_CHECKING from checkov.common.bridgecrew.check_type import CheckType from checkov.common.checks.base_check_registry import BaseCheckRegistry from checkov.runner_filter import RunnerFilter if TYPE_CHECKING: from checkov.common.checks.base_check import...
16,752
get request headers
""" ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 Founda...
16,753
test contains unary sample nodes
""" Tests that look at the result of specific recipes in test_recipes These may depend on the exact random seed used to run the SLiM simulation. Individual recipes can be specified by decorating with @pytest.mark.parametrize('recipe', ['test_____my_specific_recipe.slim'], indirect=True) """ import msprime import numpy ...
16,754
num cpus
# encoding: utf-8 """ Utilities for getting information about IPython and the system it's running in. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in ...
16,755
get proc features from lists
#! /usr/bin/env python # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
16,756
test noop other union
from libcst.codemod import CodemodTest from strawberry.codemods.annotated_unions import ConvertUnionToAnnotatedUnion class TestConvertConstantCommand(CodemodTest): TRANSFORM = ConvertUnionToAnnotatedUnion def test_update_union(self) -> None: before = """ AUnion = strawberry.union(name="A...
16,757
test mixed derivatives
import pytest import numpy as np from firedrake import * @pytest.mark.skipif(utils.complex_mode, reason="Don't expect coordinate derivatives to work in complex") def test_first_shape_derivative(): mesh = UnitSquareMesh(6, 6) n = FacetNormal(mesh) X = SpatialCoordinate(mesh) x, y = X V = FunctionSp...
16,758
test minimum state pickle
from iminuit._core import ( FCN, MnUserParameterState, MnUserTransformation, MnMigrad, MnStrategy, MnScan, FunctionMinimum, MnSimplex, MnPrint, MnUserCovariance, MinimumState, ) from pytest import approx import pytest import pickle import numpy as np @pytest.fixture def deb...
16,759
test plot dfsu contourf levels
import os import numpy as np import pytest import matplotlib as mpl from mikeio import Mesh import mikeio mpl.use("Agg") mpl.rcParams.update({"figure.max_open_warning": 100}) ################################################## # these tests will not run if matplotlib is not installed ##############################...
16,760
execute 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 # --------------------------------...
16,761
get keypoint res
# 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...
16,762
expect properties
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import logging import os import re import sys import pexpect import pytest from common_test_methods import get_env_config_variable from pytest_embedded import Dut def get_sdk_path() -> str: id...
16,763
try get default category
import re from typing import Any, Callable, Dict, List, Optional import sqlalchemy as sa from szurubooru import config, db, errors, model, rest from szurubooru.func import cache, serialization, util DEFAULT_CATEGORY_NAME_CACHE_KEY = "default-pool-category" class PoolCategoryNotFoundError(errors.NotFoundError): ...
16,764
map data init
from module.logger import logger from module.map.map_base import CampaignMap from module.map.map_grids import RoadGrids, SelectedGrids from .campaign_14_base import CampaignBase from .campaign_14_base import Config as ConfigBase MAP = CampaignMap('14-4') MAP.shape = 'K9' MAP.camera_data = ['D2', 'D5', 'D7', 'H2', 'H5...
16,765
itruediv
import sys from _typeshed import SupportsGetItem from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence from typing import Any, AnyStr, Generic, Protocol, SupportsAbs, TypeVar, overload from typing_extensions import ParamSpec, SupportsIndex, TypeAlias, final _R = TypeVar("...
16,766
is ligature mark
from fontTools.misc.transform import Transform import fontTools.pens.boundsPen from .constants import COMPONENT_INFO_KEY def to_ufo_propagate_font_anchors(self, ufo): """Copy anchors from parent glyphs' components to the parent.""" processed = set() for glyph in ufo: _propagate_glyph_anchors(sel...
16,767
test netcdftimesearch
""" Test netcd time interpolation """ from thetis.interpolation import * from scipy.interpolate import interp1d import netCDF4 import numpy import pytest import os @pytest.fixture() def dataset(request): # create random time series on regular intervals numpy.random.seed(2) x_scale = 100. ndata = 35 ...
16,768
update ui slot
# -*- coding: utf-8 -*- # # Copyright (C) 2014 GNS3 Technologies Inc. # # 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. ...
16,769
maximum
import triton import triton.language as tl @triton.jit def promote_to_tensor(x): # Addition promotes to tensor for us return x + tl.zeros((1,), tl.int1) @triton.jit def is_floating(x): return promote_to_tensor(x).dtype.is_floating() @triton.jit def _prod_accumulate(a, b): return a * b @triton.ji...
16,770
raw env
# noqa: D212, D415 """ # Space Invaders ```{figure} atari_space_invaders.gif :width: 140px :name: space_invaders ``` This environment is part of the <a href='..'>Atari environments</a>. Please read that page first for general information. | Import | `from pettingzoo.atari import space_invaders_v2` | |-...
16,771
search special chars
""" Base test cases for all media types. These are not tests and cannot be invoked. """ import json from test.constants import API_URL import requests def search(fixture): """Return results for test query.""" assert fixture["result_count"] > 0 def search_by_category(media_path, category, fixture): r...
16,772
test insert and delete rows
import pytest from cognite.client.data_classes import Row from cognite.client.utils._text import random_string @pytest.fixture(scope="session") def new_database_with_table(cognite_client): db_name = "db_" + random_string(10) table_name = "table_" + random_string(10) db = cognite_client.raw.databases.crea...
16,773
test query autoboost null
# Copyright 2016 PerfKitBenchmarker 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...
16,774
callback
import sys from pathlib import Path from typing import TYPE_CHECKING, Optional, Type, Union import pytest from litestar import Litestar, MediaType, get from litestar.contrib.jinja import JinjaTemplateEngine from litestar.contrib.mako import MakoTemplateEngine from litestar.contrib.minijnja import MiniJinjaTemplateEng...
16,775
parse actions
# Copyright 2022 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
16,776
test fetch top level resources
from dagster_graphql.test.utils import ( execute_dagster_graphql, infer_repository_selector, infer_resource_selector, ) TOP_LEVEL_RESOURCES_QUERY = """ query ResourceDetailsListQuery($selector: RepositorySelector!) { allTopLevelResourceDetailsOrError(repositorySelector: $selector) { __typename .....
16,777
test get status
import json from typing import Awaitable, Dict, List from unittest import mock import pytest from tornado.httpclient import HTTPError from jupyter_server.auth import Authorizer, IdentityProvider, User async def test_get_spec(jp_fetch): response = await jp_fetch("api", "spec.yaml", method="GET") assert respo...
16,778
rename replayer
#!/usr/bin/env python3 # Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved # # 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 limi...
16,779
is pairwise
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
16,780
required packages
from __future__ import annotations import glob import logging import os import shutil from typing import Any, Dict, List, Optional, Text from rasa.engine.graph import ExecutionContext from rasa.engine.recipes.default_recipe import DefaultV1Recipe from rasa.engine.storage.resource import Resource from rasa.engine.stora...
16,781
iter parse
# Copyright (C) 2017-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
16,782
test predefined accelerator
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
16,783
test notify
# ############################################################################## import ast import socket import time from http.client import HTTPException, HTTPSConnection from ssl import SSLError from urllib.parse import urlencode from sickchill import logger, settings from sickchill.oldbeard import common, db cla...
16,784
init
import logging from datetime import datetime import time import uuid import sys from asyncua import ua from asyncua.server.internal_session import InternalSession from ..common import events, event_objects, Node class EventGenerator: """ Create an event based on an event type. Per default is BaseEventType us...
16,785
get transceiver change event
# sfputil.py # # Platform-specific SFP transceiver interface for SONiC # import os try: import time from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) class SfpUtil(SfpUtilBase): """Platform-specific SfpUtil class""" ...
16,786
add arguments
# util/tool_support.py # 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: allow-untyped-defs, allow-untyped-calls """support routines for the hel...
16,787
xml unescape
""" Functions that communicate with OBS API and work with related XML data. """ import xml.sax.saxutils from xml.etree import ElementTree as ET def get(apiurl, path, query=None): """ Send a GET request to OBS. :param apiurl: OBS apiurl. :type apiurl: str :param path: URL path segments. :ty...
16,788
get server collector
# 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...
16,789
test shell plus plain startup with pythonrc
# -*- coding: utf-8 -*- import os import re import pytest import inspect from textwrap import dedent from django.core.management import call_command from django.db.models import Model from django.test import override_settings from django_extensions.management.commands import shell_plus def test_shell_plus_command(c...
16,790
slis t hea d initializer
# Generated by h2py from /usr/include/netinet/in.h IPPROTO_IP = 0 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_IPV4 = 4 IPPROTO_IPIP = IPPROTO_IPV4 IPPROTO_TCP = 6 IPPROTO_ST = 7 IPPROTO_EGP = 8 IPPROTO_PIGP = 9 IPPROTO_RCCMON = 10 IPPROTO_NVPII = 11 IPPROTO_PUP = 12 IPPROTO_ARGUS = 13 ...
16,791
test input array to stdp synapse
# -*- coding: utf-8 -*- # # test_connect_all_to_all.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
16,792
suspend functionalization
import itertools import unittest.mock from contextlib import contextmanager from typing import Iterator import torch import torch._C import torch._ops import torch.utils._python_dispatch import torch.utils._pytree as pytree __all__ = ["enable_python_dispatcher", "no_python_dispatcher", "enable_pre_dispatch"] no_pyth...
16,793
from string
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Glencoe Software, Inc. All rights reserved. # Use is subject to license terms supplied in LICENSE.txt # """ Used to be generated by blitz/templates/resources/combined.vm """ import omero.constants.permissions as ocp import Ice import IceImport IceImport.l...
16,794
set packages
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project from Qt import QtCore, QtWidgets from rezgui.util import create_pane, get_icon_widget from rezgui.mixins.ContextViewMixin import ContextViewMixin from rezgui.widgets.PackageLoadingWidget import PackageLoadingWidget from rez.vendor.versi...
16,795
execute 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 # --------------------------------...
16,796
get casts to type
# # This source file is part of the EdgeDB open source project. # # Copyright 2021-present MagicStack Inc. and the EdgeDB 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...
16,797
display carbon metrics
import logging from typing import Union import mstarpy import pandas as pd from openbb_terminal import OpenBBFigure from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import print_rich_table from openbb_terminal.mutual_funds import mstarpy_model from openbb_terminal.mutual_funds.mu...
16,798
extract data
# 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 ...
16,799
fused add tanh sigmoid multiply
import math import torch from torch.nn import functional as F def slice_pitch_segments(x, ids_str, segment_size=4): ret = torch.zeros_like(x[:, :segment_size]) for i in range(x.size(0)): idx_str = ids_str[i] idx_end = idx_str + segment_size ret[i] = x[i, idx_str:idx_end] return ret...