id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
6,200
get featureset version feature
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
6,201
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 __all__ ...
6,202
prepare
# Copyright 2019 Google 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 to in writing, ...
6,203
create file temp
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
6,204
test to string scalar
""" Tests the Angle string formatting capabilities. SkyCoord formatting is in test_sky_coord """ import pytest from astropy import units as u from astropy.coordinates.angles import Angle def test_to_string_precision(): # There are already some tests in test_api.py, but this is a regression # test for the bu...
6,205
do ignore
import signal import sys from bdb import Bdb from cmd import Cmd from collections.abc import Callable, Iterable, Mapping, Sequence from inspect import _SourceObjectType from types import CodeType, FrameType, TracebackType from typing import IO, Any, ClassVar, TypeVar from typing_extensions import ParamSpec, Self __all...
6,206
train epoch
import os import random from pathlib import Path import nni import torch import torch.nn.functional as F # remember to import nni.retiarii.nn.pytorch as nn, instead of torch.nn as nn import nni.retiarii.nn.pytorch as nn import nni.retiarii.strategy as strategy from nni.retiarii import model_wrapper from nni.retiarii.e...
6,207
initialize options
# # Copyright (C) 2014-2017, 2018, 2020, 2021, 2022, 2023 # Smithsonian Astrophysical Observatory # # # 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 # ...
6,208
output types
# Copyright (c) 2020, MeetKai Inc. All rights reserved. # Copyright (c) 2020, NVIDIA CORPORATION. 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.apa...
6,209
test command os error
import json import subprocess import logging import pytest from unittest import mock from elastalert.alerters.command import CommandAlerter from elastalert.alerts import BasicMatchString from elastalert.util import EAException from tests.alerts_test import mock_rule def test_command_getinfo(): # Test command as...
6,210
parse start
import re from collections import defaultdict from datetime import datetime, time from city_scrapers_core.constants import BOARD from city_scrapers_core.items import Meeting from city_scrapers_core.spiders import CityScrapersSpider class IlProcurementPolicySpider(CityScrapersSpider): name = "il_procurement_polic...
6,211
test schedule release test no plans to
import logging import re from contextlib import ExitStack from unittest import mock from unittest.mock import patch import pytest from cumulusci.core.config import OrgConfig from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from dja...
6,212
close milestone
# -*- coding: utf-8 -*- # 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/. # # Copyright (c) 2021-present Kaleidos Ventures SL from taiga.base.utils import db from taiga.e...
6,213
export actions
# Copyright (c) 2012 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2012 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publis...
6,214
test extra needed exit
import sys import pytest from conftest import ImportRaiser, remove_import_raiser, reload_module from fontbakery.status import FAIL from fontbakery.codetesting import ( assert_PASS, assert_results_contain, CheckTester, TEST_FILE, ) from fontbakery.profiles import iso15008 as iso15008_profile def MET...
6,215
characters
## Original version of code heavily based on recipe written by Wai Yip ## Tung, released under PSF license. ## http://code.activestate.com/recipes/534109/ import re import os import xml.sax.handler class DataNode (object): def __init__ (self, **kwargs): self._attrs = {} # XML attributes and child ele...
6,216
test no header
# Copyright 2022 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,217
set up
# coding: utf-8 # # Copyright 2022 The Oppia 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 requi...
6,218
test setrusage refcount
import unittest from test import test_support import time resource = test_support.import_module('resource') # This test is checking a few specific problem spots with the resource module. class ResourceTest(unittest.TestCase): def test_args(self): self.assertRaises(TypeError, resource.getrlimit) ...
6,219
htmlparser trace
"""Diagnostic functions, mainly for use when doing tech support.""" # Use of this source code is governed by the MIT license. __license__ = "MIT" import cProfile from io import BytesIO from html.parser import HTMLParser import bs4 from bs4 import BeautifulSoup, __version__ from bs4.builder import builder_registry im...
6,220
test main
# Copyright (c) 2001-2006 Twisted Matrix Laboratories. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
6,221
test one cluster
import numpy as np import pytest from sklearn.cluster import BisectingKMeans from sklearn.metrics import v_measure_score from sklearn.utils._testing import assert_allclose, assert_array_equal from sklearn.utils.fixes import CSR_CONTAINERS @pytest.mark.parametrize("bisecting_strategy", ["biggest_inertia", "largest_cl...
6,222
test operations varied tolerance
## Program: VMTK ## Language: Python ## Date: January 12, 2018 ## Version: 1.4 ## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved. ## See LICENSE file for details. ## This software is distributed WITHOUT ANY WARRANTY; without even ## the implied warranty of MERCHANTABILITY or FITNES...
6,223
delete alias
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
6,224
handle gripper
"""Pipette Sensors OT3.""" import argparse import asyncio from typing import Optional, Dict, List from opentrons.hardware_control.ot3api import OT3API from opentrons.hardware_control.instruments.ot3.pipette import Pipette from opentrons_hardware.firmware_bindings.constants import SensorId, SensorType from hardware_t...
6,225
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 ...
6,226
test can be implemented
import pytest from traitlets import TraitError from traitlets.config.loader import Config from ctapipe.containers import ArrayEventContainer from ctapipe.core import Component from ctapipe.io import DataLevel, EventSource, SimTelEventSource from ctapipe.utils import get_dataset_path prod5_path = "gamma_20deg_0deg_run...
6,227
get actual data
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe from frappe import _ from erpnext.accounts.doctype.monthly_distribution.monthly_distribution import ( get_periodwise_distribution_data, ) from erpnext.accounts.report.financia...
6,228
test exec command stderr
import os import pytest import sys from tempfile import TemporaryFile from numpy.distutils import exec_command from numpy.distutils.exec_command import get_pythonexe from numpy.testing import tempdir, assert_, assert_warns, IS_WASM # In python 3 stdout, stderr are text (unicode compliant) devices, so to # emulate th...
6,229
run test
#!/usr/bin/env python3 # Copyright (c) 2016-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test version bits warning system. Generate chains with block versions that appear to be signalling unk...
6,230
to dict
import json from abc import abstractmethod from typing import Any, Dict, Optional from mlflow.data.dataset_source import DatasetSource from mlflow.entities import Dataset as DatasetEntity from mlflow.utils.annotations import experimental @experimental class Dataset: """ Represents a dataset for use with MLfl...
6,231
load
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os from pathlib import Path from typing import Any import pytest import timm import torch import torchvision from hydra.utils import instantiate from lightning.pytorch import Trainer from omegaconf import OmegaConf fr...
6,232
set config
#!/usr/bin/env python3 import json import os import subprocess import time import unittest import socket import requests from osv import client class HttpError(Exception): def __init__(self, code): self.code = code class Basetest(unittest.TestCase): @classmethod def METHOD_NAME(cls, parser): ...
6,233
set up
#!/usr/bin/env python # # Copyright 2015,2016 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import time import struct import pmt from gnuradio import gr, gr_unittest, digital, blocks from gnuradio.digital import packet_utils class test_packet_for...
6,234
ancestors from exception
# Standard Library import sys import traceback from dataclasses import dataclass, field from typing import List, Optional, Type, Union # Sematic from sematic.abstract_function import FunctionError @dataclass class ExceptionMetadata: repr: str name: str module: str # defaults to empty list for backwa...
6,235
get formality values
from pathlib import Path import os import re import discord from models.deepl_model import TranslationModel from services.moderations_service import ModerationOptions from services.usage_service import UsageService from models.openai_model import ImageSize, Model, ModelLimits, Models, Mode from services.environment_s...
6,236
fake failing open
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Tests for coverage.sqlitedb""" from __future__ import annotations from typing import NoReturn from unittest import mock import pytest import coverage.sqlited...
6,237
list workspace notebook access token
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
6,238
get column attnums from tables
import warnings from sqlalchemy import and_, asc, cast, select, text, exists, Identity from db.columns.exceptions import DynamicDefaultWarning from db.connection import execute_msar_func_with_engine from db.tables.operations.select import reflect_table_from_oid from db.utils import execute_statement, get_pg_catalog_t...
6,239
test directory radius server status failed
from unittest import mock from prowler.providers.aws.services.directoryservice.directoryservice_service import ( AuthenticationProtocol, Directory, DirectoryType, RadiusSettings, RadiusStatus, ) AWS_REGION = "eu-west-1" AWS_ACCOUNT_NUMBER = "123456789012" class Test_directoryservice_supported_mf...
6,240
get view
# 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 Free Software Foundation, either version 3 of the License, or # (at y...
6,241
reverse archive
import datetime import json from django.test import RequestFactory from django.utils import timezone from rest_framework import status from rest_framework.reverse import reverse from schedule.models import ScheduleEntry from schedule.tests.utils import TEST_SCHEDULE_ENTRY, post_schedule from scheduler.tests.utils imp...
6,242
register collection blocks
import json from pathlib import Path import sqlalchemy as sa import prefect from prefect.logging import get_logger from prefect.server import models, schemas logger = get_logger("server") COLLECTIONS_BLOCKS_DATA_PATH = ( Path(__file__).parent.parent / "collection_blocks_data.json" ) async def _install_protect...
6,243
if enum group
from __future__ import annotations from enum import Enum from typing import Iterable, List, Literal, Tuple, TypedDict, Union import navi from base_types import InputId from nodes.base_input import BaseInput from nodes.group import NestedGroup, group InputValue = Union[int, str] EnumValues = Union[ InputValue, ...
6,244
step update
# 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 dataclasses import dataclass, field from typing import List import torch.optim.lr_scheduler from omegaconf import II from fairseq.datac...
6,245
region
# 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,246
cache das filenames
#!/usr/bin/env python3 from __future__ import print_function #Hack to get ROOT to ignore command line arguments that we want #to pass to Python def import_ROOT(): import sys tmpargv = sys.argv sys.argv = ['-b', '-n'] import ROOT sys.argv[:] = tmpargv[:] return ROOT import yaml import subproce...
6,247
test outline
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Tests map creation. """ # import iris tests first so that some things can be initialised before # importing anything else...
6,248
test address missing mask
"""Test IPAM forms.""" from unittest import skip from django.test import TestCase from nautobot.extras.models import Status from nautobot.ipam import forms, models from nautobot.ipam.choices import IPAddressTypeChoices from nautobot.ipam.models import IPAddress, Namespace, Prefix class BaseNetworkFormTest: form...
6,249
value
# 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,250
squeeze
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding 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 # # http://www.apache.org/licenses/LICENSE-...
6,251
show locked mapset info
""" @package datacatalog.infomanager @brief Class for managing info messages in Data Catalog Classes: - infomanager::DataCatalogInfoManager (C) 2020 by the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details. @aut...
6,252
delete dataset
# 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 ...
6,253
get eg
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2019, Sandeep Kasargod (sandeep@vexata.com) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_f...
6,254
get backend
# 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...
6,255
build
import pathlib import os from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.apple import is_apple_os from conan.tools.files import apply_conandata_patches, get, copy, rm from conan.tools.METHOD_NAME import check_min_cp...
6,256
main
from __future__ import nested_scopes, generators, division, absolute_import from __future__ import with_statement, print_function import sys, os # Copyright 2021 Richardson Lab at Duke University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
6,257
to list
from tensorflow.keras.utils import Sequence import numpy as np from .processor import SequentialProcessor class SequenceExtra(Sequence): def __init__(self, pipeline, batch_size, as_list=False): if not isinstance(pipeline, SequentialProcessor): raise ValueError('``processor`` must be a ``Sequen...
6,258
exercise 1
from __future__ import absolute_import, division, print_function import mmtbx.model import iotbx.pdb from libtbx.utils import format_cpu_times, null_out pdb_str_1=""" CRYST1 10.000 10.000 10.000 90.00 90.00 90.00 P 1 HELIX 1 1 THR A 1 THR A 2 1 6 HELIX 1 1 T...
6,259
get branches
import datetime import git from django.conf import settings import evennia from evennia import CmdSet, InterruptCommand from evennia.commands.default.muxcommand import MuxCommand from evennia.utils.utils import list_to_string class GitCommand(MuxCommand): """ The shared functionality between git/git evennia...
6,260
message for source
# -*- coding: utf-8 -*- """Functions to call when running the function. This module should contain a function called `run_module`, that is executed when the module is run with `python -m delphi_sir_complainsalot`. """ import time from itertools import groupby import covidcast from delphi_utils import SlackNotifier f...
6,261
test add non selections
"""Core selection list unit tests, aimed at testing basic list creation. Note that the vast majority of the API *isn't* tested in here as `SelectionList` inherits from `OptionList` and so that would be duplicated effort. Instead these tests aim to just test the things that have been changed or wrapped in some way. """...
6,262
most common
import weakref from _typeshed import Incomplete, Self, SupportsItems, SupportsKeysAndGetItem from collections.abc import Callable, Generator, Hashable, Iterable, Iterator, Mapping from typing import Any, Generic, TypeVar, overload _KT = TypeVar("_KT") _VT = TypeVar("_VT") _T = TypeVar("_T") PREV: int NEXT: int KEY: i...
6,263
load
# -*- coding: utf-8 -*- # vStream https://github.com/Kodi-vStream/venom-xbmc-addons # jordigarnacho import re from resources.lib.gui.hoster import cHosterGui from resources.lib.gui.gui import cGui from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameter...
6,264
f3
import pytest from dash import Dash, Input, Output, State, html from dash.exceptions import InvalidCallbackReturnValue, IncorrectTypeException def test_cbva001_callback_dep_types(): app = Dash(__name__) app.layout = html.Div( [ html.Div("child", id="in1"), html.Div("state", id...
6,265
test set by scale factor
# Copyright (c) 2019 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. import unittest import numpy import pytest from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector import copy class TestMatrix(unittest.TestCase): def setUp(self): # Called before the first tes...
6,266
test strategy stochasic depth
# Copyright (c) 2022, NVIDIA CORPORATION. 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,267
uniquify
import os from fnmatch import fnmatch import yaml from django.conf import settings DATA_URI_START = "<!--[if (!IE)|(gte IE 8)]><!-->" DATA_URI_END = "<!--<![endif]-->" MHTML_START = "<!--[if lte IE 7]>" MHTML_END = "<![endif]-->" class JammitAssets: ASSET_FILENAME = 'assets.yml' def __init__(self, asset...
6,268
inner raising func
# Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
6,269
hash obj
""" Utilities for hashing objects. """ from __future__ import absolute_import, division import base64 from io import IOBase import pickle from pickle import PickleError, PicklingError import hashlib import struct from collections.abc import Iterable from pkg_resources import resource_filename import numpy as np fr...
6,270
pypi name munger
import os from itertools import permutations EXTS = [".tar.gz", ".zip", ".tar", ".tar.bz2", ".tar.xz", ".tgz"] def _ext_munger(url): for old_ext, new_ext in permutations(EXTS, 2): if url.endswith(old_ext): yield url[: -len(old_ext)] + new_ext def _jinja2_munger_factory(field): def _jinj...
6,271
write table style info
############################################################################### # # Table - A class for writing the Excel XLSX Worksheet file. # # SPDX-License-Identifier: BSD-2-Clause # Copyright 2013-2023, John McNamara, jmcnamara@cpan.org # from . import xmlwriter class Table(xmlwriter.XMLwriter): """ A c...
6,272
remote source
"""Create models with a set of default valid properties, to avoid changes forcing an update of all test code. """ import os import uuid from datetime import datetime from itertools import cycle from typing import List from sdclientapi import Reply as SDKReply from sdclientapi import Source as SDKSource from sdclientap...
6,273
get supervisors by cluster web api
# -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
6,274
before post
from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship from app.api.bootstrap import api from app.api.custom_placeholders import CustomPlaceholder from app.api.helpers.db import safe_query_kwargs from app.api.helpers.errors import ForbiddenError from app.api.helpers.permission_manager import...
6,275
create
import typing import uuid from datetime import datetime import simplejson as json from django.db import models from django.utils import timezone from task_processor.exceptions import TaskProcessingError from task_processor.managers import RecurringTaskManager, TaskManager from task_processor.task_registry import regi...
6,276
test is valid hex color
# Copyright (c) Ansible project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import pytest from ansible_...
6,277
test generate document not supported
import json, uuid from app.extensions import cache from app.api.constants import NOW_DOCUMENT_DOWNLOAD_TOKEN from tests.now_application_factories import NOWApplicationFactory, NOWApplicationIdentityFactory from app.api.now_applications.models.now_application_document_type import NOWApplicationDocumentType class TestG...
6,278
serverinfo
#!/usr/bin/env python """ Version of dbsClient.dbsApi intended to be used with mock or unittest.mock """ from __future__ import (division, print_function) from builtins import object from future.utils import viewitems import copy import json import os from RestClient.ErrorHandling.RestClientExceptions import HTTPEr...
6,279
apply dense
# Copyright 2015 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,280
get config
################################################################################# # FOQUS Copyright (c) 2012 - 2023, by the software owners: Oak Ridge Institute # for Science and Education (ORISE), TRIAD National Security, LLC., Lawrence # Livermore National Security, LLC., The Regents of the University of # California...
6,281
ship
import atexit import collections import datetime import queue import sys import threading import time import types from typing import Any, Callable, Dict, Iterator, List, Optional, TextIO, Union from determined import core from determined.common import api class _LogShipper: def __init__( self, *...
6,282
test dense
# 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...
6,283
list
# 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,284
outer
""" Provide basic components for groupby. These defintiions hold the whitelist of methods that are exposed on the SeriesGroupBy and the DataFrameGroupBy objects. """ import types from pandas.util._decorators import make_signature from pandas.core.dtypes.common import is_list_like, is_scalar class GroupByMixin(obje...
6,285
render
import json from flask import current_app from lemur import database from lemur.dns_providers.models import DnsProvider from lemur.logs import service as log_service def METHOD_NAME(args): """ Helper that helps us render the REST Api responses. :param args: :return: """ query = database.sess...
6,286
check new episode scores
from logging import debug, info, warning, error from datetime import datetime, timedelta import services def main(config, db, **kwargs): # Find data not provided by the edit module _check_missing_stream_info(config, db, update_db=not config.debug) # Check for new show scores if config.record_scores: METHOD_NAME...
6,287
analyser end
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frederic Rodrigo 2013 ## ## ...
6,288
test noisemodel
import pytest from pytest_lazyfixture import lazy_fixture as lf import numpy as np import tensorcircuit as tc from tensorcircuit.noisemodel import ( NoiseConf, circuit_with_noise, sample_expectation_ps_noisfy, expectation_noisfy, ) from tensorcircuit.channels import composedkraus @pytest.mark.paramet...
6,289
test dt64 array tzaware indexer
from unittest import TestCase import pytest import xarray as xr import pandas as pd from pytz import UTC import numpy as np from pandas import DatetimeTZDtype from xcube.util.timeindex import ensure_time_label_compatible class TimeIndexTest(TestCase): nonstandard_time_dimension_name = 'a_nonstandard_time_dimens...
6,290
get model params
import copy import logging import math import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler import fedml from fedml.core.alg_frame.client_trainer import ClientTrainer from model.yolov7.utils.general import ( box_iou, non_max_suppres...
6,291
test after 2fa
from datetime import timedelta from django.contrib.auth.models import AnonymousUser from django.contrib.sessions.backends.base import SessionBase from django.http import HttpRequest from django.urls import reverse import sentry.utils.auth from sentry.models import User from sentry.testutils.cases import TestCase from...
6,292
test mine get
import pytest import salt.config import salt.daemons.masterapi as masterapi import salt.utils.platform from tests.support.mock import MagicMock, patch pytestmark = [ pytest.mark.slow_test, ] class FakeCache: def __init__(self): self.data = {} def store(self, bank, key, value): self.data...
6,293
test clean permission
"""Tests for the Schema endpoint on the API of the Marsha project.""" from django.test import TestCase, override_settings from rest_framework.permissions import BasePermission from marsha.core.api.schema import ( clean_permission, extract_permission_docstring, format_permissions_and_docstring, ) from mars...
6,294
transform
"""Extract LIEF features from PE files""" from h2oaicore.transformer_utils import CustomTransformer import datatable as dt import numpy as np class PEDataDirectoryFeatures(CustomTransformer): _unsupervised = True _modules_needed_by_name = ['lief==0.11.4'] _regression = True _binary = True _multic...
6,295
decorate
# event/api.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Public API functions for the event system. """ from __future__ import absolute_impo...
6,296
setup
from __future__ import annotations import ast import importlib import inspect import re from functools import cache from pathlib import Path from typing import TYPE_CHECKING, Any, Generator from docutils.utils import get_source_line if TYPE_CHECKING: from docutils.nodes import Element, Node from sphinx.addno...
6,297
test tensordot list neg dim
""" Copyright 2020 The OneFlow 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 applicable law or agr...
6,298
wrap inputs
# 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...
6,299
resource apply sparse
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...