id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
6,400
resource guid
# 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...
6,401
assembly parrot rule1
# Leo colorizer control file for assembly_parrot mode. # This file is in the public domain. # Properties for assembly_parrot mode. properties = { "lineComment": "#", } # Attributes dict for assembly_parrot_main ruleset. assembly_parrot_main_attributes_dict = { "default": "null", "digit_re": "(0x[[:xdigit:...
6,402
fix checklog
# 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 t...
6,403
get camera function image info
# -*- coding: utf-8 -*- import datetime import json import logging import os from mycodo.config import PATH_CAMERAS from mycodo.databases.models import CustomController from mycodo.mycodo_flask.utils.utils_general import bytes2human from mycodo.utils.database import db_retrieve_table_daemon logger = logging.getLogger...
6,404
logger
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from datetime import datetime from typing import Dict from unittest.mock import AsyncMock, MagicMock, call, patch from airbyte_cdk.models import ( AirbyteMessage, AirbyteRecordMessage, AirbyteStream, ConfiguredAirbyteCatalog, ConfiguredA...
6,405
update filter from operator
from __future__ import absolute_import ############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free softwa...
6,406
nndct info print
# # Copyright 2019 Xilinx 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 writi...
6,407
get voltage
############################################################################# # Accton # # Module contains an implementation of SONiC Platform Base API and # provides the PSUs status which are available in the platform # ############################################################################# try: from sonic_...
6,408
id
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
6,409
collate data
""" ASE scraper is meant to be disconnected from others, and therefore a collection of functions for now. This is by design since most use cases of ASE desire more flexibility; simply import the functions. """ import numpy as np from fitsnap3lib.tools.group_tools import assign_validation def ase_scraper(data, random...
6,410
package info
import os from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export...
6,411
test address query as anonymous user
import graphene from ....tests.utils import ( assert_no_permission, get_graphql_content, get_graphql_content_from_response, ) ADDRESS_QUERY = """ query address($id: ID!) { address(id: $id) { postalCode lastName firstName city country { code } ...
6,412
convert combed
from os.path import join, isdir, dirname, abspath from os import getcwd import os from sys import getfilesystemencoding from collections import OrderedDict import pandas as pd from nilm_metadata import convert_yaml_to_hdf5 from nilmtk.datastore import Key from nilmtk.measurement import LEVEL_NAMES from nilmtk.utils imp...
6,413
test flush
# Copyright 2021 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...
6,414
init
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2020 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
6,415
get setting
#!/usr/bin/env python # --!-- coding: utf8 --!-- import os import shutil import subprocess from PyQt5.QtCore import QSettings from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHBoxLayout, \ QLabel, QSpinBox, QComboBox, QLineEdit from manuskript.ui.collapsibleGroupBox2 import col...
6,416
test ruleset invalid
import os from unittest import mock import unittest from ScoutSuite.core.console import set_logger_configuration, print_debug from ScoutSuite.core.rule import Rule from ScoutSuite.core.ruleset import Ruleset class TestScoutRulesRuleset(unittest.TestCase): def setUp(self): set_logger_configuration(is_deb...
6,417
check uploads exists
from chemaboxwriters.app import write_abox import pytest import os from chemaboxwriters.common.pipeline import Pipeline import chemaboxwriters.common.assemble_pipeline as asp from chemaboxwriters.ontocompchem.pipeline import OC_PIPELINE from chemaboxwriters.ontospecies.pipeline import OS_PIPELINE from chemaboxwriters.o...
6,418
test assign empty
# # Copyright (c) 2020, Neptune Labs Sp. z o.o. # # 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 agr...
6,419
get
# 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 ...
6,420
set up
from unittest import mock from rest_framework import status from lego.apps.users.models import AbakusGroup, User from lego.utils.test_utils import BaseAPITestCase class ContactViewSetTestCase(BaseAPITestCase): fixtures = [ "initial_files.yaml", "initial_abakus_groups.yaml", "development_...
6,421
pool
# Copyright 2023 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
6,422
list by location
# 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...
6,423
success to map
# 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...
6,424
get preserved order
import libvoikko from django.db import connection from django.db.models import Case, When from services.models import ( OrganizationServiceNodeUnitCount, ServiceNode, ServiceNodeUnitCount, Unit, ) from services.search.constants import ( DEFAULT_TRIGRAM_THRESHOLD, SEARCHABLE_MODEL_TYPE_NAMES, ) ...
6,425
fully qualified name
""" Python representations of the JSON Schema Test Suite tests. """ from functools import partial from pathlib import Path import json import os import re import subprocess import sys import unittest import attr from asdf._jsonschema.validators import _VALIDATORS import asdf._jsonschema def _find_suite(): root...
6,426
joystick on off
#!/usr/bin/env python """ RS232 interface to a Zaber XY stage. Hazen 04/17 Jeff 04/21 """ import traceback import storm_control.sc_hardware.serial.RS232 as RS232 import storm_control.sc_library.hdebug as hdebug class ZaberXYRS232(RS232.RS232): """ ZaberXY stage RS232 interface class. """ def __init_...
6,427
output at dungeon tiles
"""NOTE: THIS IS CURRENTLY OUTDATAED FROM EARLY EXPERIMENTATION!""" # Copyright 2020-2023 Capypara and the SkyTemple Contributors # # This file is part of SkyTemple. # # SkyTemple is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
6,428
stan variable
"""Container for the results of running autodiff variational inference""" from collections import OrderedDict from typing import Dict, Optional, Tuple, Union import numpy as np import pandas as pd from cmdstanpy.cmdstan_args import Method from cmdstanpy.utils import scan_variational_csv from .metadata import Infere...
6,429
update
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU ...
6,430
run
# -*- coding: utf-8 -*- from urllib.parse import urlencode, urlparse from kubernetes import client from kubernetes.client import api_client from kubernetes.client.api import core_v1_api from kubernetes.client.exceptions import ApiException from sshtunnel import SSHTunnelForwarder, BaseSSHTunnelForwarderError from com...
6,431
test rand gamma forward
# Copyright 2017,2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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-...
6,432
create release metrics
#SPDX-License-Identifier: MIT """ Metrics that provide data about releases """ import datetime import sqlalchemy as s import pandas as pd from augur.api.util import register_metric from ..server import engine @register_metric() def releases(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=None): ...
6,433
battle 0
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...
6,434
pow
"""pytorch backend implementation""" from packaging.version import Version import torch if Version(torch.__version__) < Version("1.9.0"): raise RuntimeError("DeepXDE requires PyTorch>=1.9.0.") # To write device-agnostic (CPU or GPU) code, a common pattern is to first determine # torch.device and then use it for...
6,435
get queue iam policy
# 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...
6,436
get formatter by name
# -*- coding: utf-8 -*- """ pygments.formatters ~~~~~~~~~~~~~~~~~~~ Pygments formatters. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pygments.form...
6,437
get max ni
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import collections from libmozdata import utils as lmdutils from bugbot import logger, people, utils from bugbot.bzcle...
6,438
populate channels
# # Copyright (c) 2010--2016 Red Hat, Inc. # Copyright (c) 2022 SUSE, LLC # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOS...
6,439
is already covered
from typing import Iterator, Optional, Tuple from sortedcontainers import SortedDict class TaggedIntervalMap: """ Catalogs features of intervals. """ def __init__(self, nbits: int = 0): """ :param nbits: Number of binning bits. Higher values reduce detail. 0 for no binning. "...
6,440
sub tree
''' Implementation of a Decision Tree using ID3 Algorithm. Author - Anushka Nambiar Requirements: - Numpy - Pandas Python: - 3.10 Algorithm: 1. Calculate the entropy of the whole dataset. 2. Calculate the feature_entropy (entropy of each feature). 3. Calculate the Information Gain of each attrib...
6,441
find by id
import json from sqlalchemy import Column, Integer, String, Text, Boolean from sqlalchemy.dialects.postgresql import JSONB from superagi.models.base_model import DBBaseModel class IterationWorkflowStep(DBBaseModel): """ Step of an iteration workflow Attributes: id (int): The unique identifier o...
6,442
check quantile output
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Tests for BaseDistribution API points.""" __author__ = ["fkiraly"] import numpy as np import pandas as pd import pytest from sktime.datatypes import check_is_mtype from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester...
6,443
test missing car info
#!/usr/bin/env python3 from collections import defaultdict import os import re import unittest from openpilot.common.basedir import BASEDIR from openpilot.selfdrive.car.car_helpers import interfaces, get_interface_attr from openpilot.selfdrive.car.docs import CARS_MD_OUT, CARS_MD_TEMPLATE, generate_cars_md, get_all_ca...
6,444
set up
#!/usr/bin/env python """ _JobTestBase Base class for tests of WMBS job class. """ from __future__ import absolute_import, division, print_function import threading import unittest from WMCore.DAOFactory import DAOFactory from WMCore.DataStructs.Run import Run from WMCore.Services.UUIDLib import makeUUID from WMCore...
6,445
test04 fov axis
import pytest import drjit as dr import mitsuba as mi def create_camera(o, d, fov=34, fov_axis="x", s_open=1.5, s_close=5, near_clip=1.0): t = [o[0] + d[0], o[1] + d[1], o[2] + d[2]] camera_dict = { "type": "perspective", "near_clip": near_clip, "far_clip": 35.0, "focus_distan...
6,446
merge single
# 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...
6,447
update resource
import logging from typing import TypedDict from localstack.services.cloudformation.deployment_utils import check_not_found_exception LOG = logging.getLogger(__name__) # dict key used to store the deployment state of a resource KEY_RESOURCE_STATE = "_state_" class DependencyNotYetSatisfied(Exception): """Excep...
6,448
test tag
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
6,449
sync dir
import os import platform import tempfile import numpy as np class WriteHandle: """ Parameters: ----------- path : str Full path to the file to be written (should not exist, but the directory should) tmp_base_path : str Path to a directory where temporary files should be written ...
6,450
hook cmd
from __future__ import annotations import contextlib import os import random import re import shlex from typing import Any from typing import ContextManager from typing import Generator from typing import NoReturn from typing import Protocol from typing import Sequence import pre_commit.constants as C from pre_commit...
6,451
get extended attention mask
# ------------------------------------------------------------------------------------ # BaSSL # Copyright (c) 2021 KakaoBrain. All Rights Reserved. # Licensed under the Apache License, Version 2.0 [see LICENSE for details] # Github: https://github.com/kakaobrain/bassl # ------------------------------------------------...
6,452
worker status
""" Manage modjk workers ==================== Send commands to a :strong:`modjk` load balancer via the peer system. This module can be used with the :ref:`prereq <requisites-prereq>` requisite to remove/add the worker from the load balancer before deploying/restarting service. Mandatory Settings: - The minion needs...
6,453
get parent uids
from __future__ import annotations from sqlalchemy import ( BigInteger, Boolean, Column, Date, Float, ForeignKey, Integer, LargeBinary, PrimaryKeyConstraint, Table, delete, event, ) from sqlalchemy.dialects.postgresql import ARRAY, CHAR, JSONB, VARCHAR from sqlalchemy.ex...
6,454
clean annot dict
def raise_break(signal_number, stack_frame): import os import platform import psutil pl = platform.platform() if pl.startswith("Windows"): pid = os.getpid() ppid = os.getppid() for child in psutil.Process(pid).children(recursive=True): try: child....
6,455
read uint16
## Copyright 2018 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 import struct import numpy as np # Tensor Archive (TZA) file format VERSION = (2, 0) _MAGIC = 0x41D7 # Writes tensors to a TZA file class Writer(object): # Creates a new file def __init__(self, filename): self._table = [] self._fi...
6,456
replace atomic
import contextlib import io import os import sys import tempfile try: import fcntl except ImportError: fcntl = None # `fspath` was added in Python 3.6 try: from os import fspath except ImportError: fspath = None __version__ = '1.4.1' PY2 = sys.version_info[0] == 2 text_type = unicode if PY2 else s...
6,457
net
# Copyright (c) 2020 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...
6,458
test srmse
# Copyright (c) 2022 Samsung Electronics Co., Ltd. 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...
6,459
run test
#!/usr/bin/env python3 import os import sys import time sys.path.insert(1, os.path.dirname(sys.path[0])) from test_framework.test_framework import ConfluxTestFramework from test_framework.mininode import DefaultNode, network_thread_start from test_framework.util import connect_nodes, get_peer_addr, wait_until from co...
6,460
compare thin
# Copyright (c) 2012-2022 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. # https://github.com/GalSim-developers/GalSim # # GalSim is free software: redistribution and use in source and binary forms, # with or w...
6,461
worker func
# 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...
6,462
build route middleware stack
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING, Any, cast from litestar._asgi.routing_trie.types import ( ASGIHandlerTuple, PathParameterSentinel, create_node, ) from litestar._asgi.utils import wrap_in_exception_handler from litestar.types.internal_types impo...
6,463
test metadata
import datetime import os import zoneinfo from pathlib import Path from unittest import mock from django.test import TestCase from django.test import override_settings from httpx import Request from httpx import Response from rest_framework import status from documents.parsers import ParseError from paperless_tika.pa...
6,464
retry mysql creation fn
import logging import re import time from contextlib import contextmanager from typing import Callable, Iterator, Optional, Tuple, TypeVar, Union, cast from urllib.parse import ( quote_plus as urlquote, urlparse, ) import mysql.connector as mysql import mysql.connector.errorcode as mysql_errorcode import sqlal...
6,465
test get deck labware fixtures ot2 standard
"""Test deck data provider.""" import pytest from pytest_lazyfixture import lazy_fixture # type: ignore[import] from decoy import Decoy from opentrons_shared_data.deck.dev_types import DeckDefinitionV3 from opentrons.protocols.models import LabwareDefinition from opentrons.types import DeckSlotName from opentrons.pr...
6,466
test init by in
# Copyright (c) 2017 The University of Manchester # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
6,467
load
#!/usr/bin/env python3 # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) ''' Merge training configs into a single inference config. The single inference config is for CLI, which only takes a single config to do inferencing. The trainig configs includes: model config, preprocess config, decode conf...
6,468
pause
""" Skeleton example of a Ginga local plugin called 'MyLocalPlugin' To enable it, copy it to your $HOME/.ginga/plugins folder (create it first if it does not already exist), then run ginga with the command: $ ginga --plugins=MyLocalPlugin From the "Operations" menu you should be able to select Custom->MyLocalPlu...
6,469
test automatic background subtraction
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
6,470
test invalid port mapping fail
""" Tests that runs validity checks on arguments passed in from shell """ import os import subprocess import pytest here = os.path.dirname(os.path.abspath(__file__)) test_dir = os.path.dirname(here) docker_simple = os.path.join(test_dir, "dockerfile", "simple") # default to building in the cwd (a temporary director...
6,471
driver capabilities
import os import core.exceptions as ex import utilities.ping from .. import \ BaseContainer, \ KW_START_TIMEOUT, \ KW_STOP_TIMEOUT, \ KW_NO_PREEMPT_ABORT, \ KW_NAME, \ KW_HOSTNAME, \ KW_OSVC_ROOT_PATH, \ KW_GUESTOS, \ KW_PROMOTE_RW, \ KW_SCSIRESERV from env import Env from core...
6,472
get page data
from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, str_or_none, js_to_json, parse_filesize, traverse_obj, urlencode_postdata, urljoin, ) class ZoomIE(InfoExtractor): IE_NAME = 'zoom' _VALID_URL = r'(?P<base_url>https?://(?:[^.]+\.)?zoom.us/)rec...
6,473
list records
"""Module provider for CloudXNS""" import hashlib import json import logging import time from argparse import ArgumentParser from typing import List from urllib.parse import urlencode import requests from lexicon.exceptions import AuthenticationError from lexicon.interfaces import Provider as BaseProvider LOGGER = l...
6,474
handle undefine
""" Parse a C source file. To use, subclass CParser and override its handle_* methods. Then instantiate the class with a string to parse. """ __docformat__ = "restructuredtext" import os.path import sys from ctypesgen.parser import cgrammar, preprocessor, yacc # ---------------------------------------------------...
6,475
initialize control
# -*- coding: utf-8 -*- # Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np from pandapower.auxiliary import read_from_net, write_to_net from pandapower.control.controller.trafo_control imp...
6,476
prepare test
import os from virttest import utils_net from virttest import virsh from virttest.libvirt_xml import vm_xml from virttest.libvirt_xml.devices.controller import Controller # pylint: disable=W0611 from virttest.libvirt_xml.devices.disk import Disk # pylint: disable=W0611 from virttest.libvirt_xml.devices.filesystem imp...
6,477
extract toc items
""" TOC directive ~~~~~~~~~~~~~ The TOC directive syntax looks like:: .. toc:: Title :depth: 3 "Title" and "depth" option can be empty. "depth" is an integer less than 6, which defines the max heading level writers want to include in TOC. """ from .base import Directive ...
6,478
refresh access token
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import logging from typing import Any, List, Mapping, MutableMapping, Optional, Tuple import backoff import pendulum import requests from deprecated import deprecated from ..exceptions import DefaultBackoffException from .core import HttpAuthenticator lo...
6,479
table
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
6,480
test grid attributes
import numpy as np import yt # NOQA from yt.frontends.amrvac.api import AMRVACDataset, AMRVACGrid from yt.testing import requires_file from yt.units import YTArray from yt.utilities.answer_testing.framework import ( data_dir_load, requires_ds, small_patch_amr, ) blastwave_spherical_2D = "amrvac/bw_2d0000...
6,481
test gaussian distribution
import pytest from mlagents.torch_utils import torch from mlagents.trainers.torch_entities.distributions import ( GaussianDistribution, MultiCategoricalDistribution, GaussianDistInstance, TanhGaussianDistInstance, CategoricalDistInstance, ) @pytest.mark.parametrize("tanh_squash", [True, False]) @...
6,482
build arguments schema
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
6,483
test available modes
from homeassistant.components.humidifier import HumidifierEntityFeature from homeassistant.components.humidifier.const import ( MODE_AUTO, MODE_BOOST, MODE_NORMAL, MODE_SLEEP, ) from homeassistant.components.sensor import SensorDeviceClass from homeassistant.const import PERCENTAGE from ..const import ...
6,484
get label control name
import wx import wx.lib.rcsizer from cellprofiler_core.setting import DataTypes from ._module_view import ModuleView from ..utilities.module_view import edit_control_name class DataTypeController: """The DataTypeController manages a DataType setting""" DTC_NONE = "None" DTC_TEXT = "Text" DTC_INTEGER...
6,485
define decision state
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. #/ from antlr4.IntervalSet import IntervalSet from antlr4.RuleContext import RuleContext from antlr4.Token import Token from ant...
6,486
inspect versions
# Introspect Postgres instance, temBoard agent and system # # Discover is a stable set of properties identifying a running system. temBoard # computes an ETag from discover data to ease change detection. # # Discover data is cached in a discover.json file. temBoard refreshes this file # in two cases : start of agent, c...
6,487
test pool args
import numpy as np import pytest import dynesty import multiprocessing as mp import dynesty.pool as dypool from utils import get_rstate, get_printing """ Run a series of basic tests to check whether anything huge is broken. """ nlive = 1000 printing = get_printing() ndim = 2 gau_s = 0.01 def loglike_gau(x): re...
6,488
test find executable
"""Tests for distutils.spawn.""" import os import stat import sys import unittest.mock from test.support import run_unittest, unix_shell from test.support import os_helper from distutils.spawn import find_executable from distutils.spawn import spawn from distutils.errors import DistutilsExecError from distutils.tests ...
6,489
convert identity
# -*- coding: utf-8 -*- """Machine type converters for Series scitype. Exports conversion and mtype dictionary for Series scitype: convert_dict: dict indexed by triples of str 1st element = convert from - str 2nd element = convert to - str 3rd element = considered as this scitype - str elements are conversion f...
6,490
test terraform plan framework
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING import pytest from checkov.common.bridgecrew.check_type import CheckType from checkov.common.runners.runner_registry import RunnerRegistry from checkov.main import DEFAULT_RUNNERS from checkov.runner_filter im...
6,491
get info
# Copyright 2018 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
6,492
name
""" Built-in extensions for PyScaffold. """ import argparse import sys import textwrap from typing import Callable, Iterable, List, Optional, Type from ..actions import Action, register, unregister from ..exceptions import ErrorLoadingExtension from ..identification import dasherize, deterministic_sort, underscore if...
6,493
forward
"""Torch Module for Graph Isomorphism Network layer""" # pylint: disable= no-member, arguments-differ, invalid-name import torch as th from torch import nn from .... import function as fn from ....utils import expand_as_pair class GINConv(nn.Module): r"""Graph Isomorphism Network layer from `How Powerful are Gra...
6,494
adjust cores for memory request
import logging import math from typing import Dict, List, Optional, Tuple from ..globals import RESERVED_STORAGE_GB_PER_CORE from .azure.resource_utils import ( azure_is_valid_storage_request, azure_local_ssd_size, azure_machine_type_to_worker_type_and_cores, azure_memory_to_worker_type, azure_requ...
6,495
watch cursor line
from __future__ import annotations import typing as t from abc import abstractmethod from dataclasses import dataclass from rich import console from rich.text import Text from rich.style import Style from rich.table import box, Table from textual.app import Reactive from textual.widget import Widget from starwhale.u...
6,496
path
""" Ethereum Forks ^^^^^^^^^^^^^^ Detects Python packages that specify Ethereum hardforks. """ import importlib import pkgutil from enum import Enum, auto from pkgutil import ModuleInfo from types import ModuleType from typing import Any, Dict, Iterator, List, Optional, Type, TypeVar import ethereum from ethereum.fo...
6,497
test multiple input fit
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
6,498
test stop when stopped
""" Test for salt.modules.vmctl """ import pytest import salt.modules.vmctl as vmctl from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {vmctl: {}} def test_create_disk(): """ Tests creating a new disk image. """ ret = {} ret["stdout...
6,499
test run ui with valid users commands
# Copyright 2016 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...