id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,100
predict
# -*- coding: utf-8 # pylint: disable=line-too-long """A simple module with classes for learning operations""" import pickle import numpy as np import anvio import anvio.utils as utils import anvio.terminal as terminal import anvio.filesnpaths as filesnpaths from anvio.errors import ConfigError with terminal.Suppre...
16,101
test solve mde backward values
import numpy as np import pytest from probnum import randprocs, randvars from tests.test_randprocs.test_markov.test_continuous import test_sde class TestLinearSDE(test_sde.TestSDE): # Replacement for an __init__ in the pytest language. See: # https://stackoverflow.com/questions/21430900/py-test-skips-test-c...
16,102
test init flowproject
# Copyright (c) 2021 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import os import subprocess import sys from tempfile import TemporaryDirectory import pytest import signac import flow class ExitCodeError(RuntimeError): pass class...
16,103
test malformed dict
"""Unit tests for the process module.""" from django.test import TestCase from api.models import Credential, Scan, ScanJob, ScanTask, Source from scanner.network.processing import process from scanner.network.processing.util_for_test import ansible_result, ansible_results HOST = "host" NOT_A_KEY = "not_a_key" NO_PRO...
16,104
options handler
"""Notify Slack channel SCHEMA_UPDATE_CHANNEL on schema struct file changes. Schema struct files are those who start with PREFIX and end with SUFFIX.""" import argparse import os from pprint import pformat from typing import Any, Dict, List, Tuple from slack_sdk import WebClient from demisto_sdk.commands.common.log...
16,105
depart subfig html
""" Adds subfigure functionality """ from docutils import nodes import docutils.parsers.rst.directives as directives from docutils.parsers.rst import Directive from sphinx import addnodes class subfig(nodes.General, nodes.Element): pass def skip_visit(self, node): raise nodes.SkipNode def visit_subfig_tex(s...
16,106
get gains
# # License: BSD-3-Clause import os from defusedxml.minidom import parse import re import numpy as np from ...utils import _pl def _extract(tags, filepath=None, obj=None): """Extract info from XML.""" if obj is not None: fileobj = obj elif filepath is not None: fileobj = parse(filepath)...
16,107
get commercial and manufacturing floorspace to land
# literature_values.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 """ Values from the literature used for data allocation are specified here and can be called on using functions. """ import pandas as pd import numpy as np from flowsa.settings import datapath def get_US_urban_green_space_and_public_parks_ratio(...
16,108
get job target group output
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
16,109
f
from os.path import abspath import pytest from ddtrace.debugging._function.discovery import FunctionDiscovery from ddtrace.debugging._function.discovery import _undecorate from ddtrace.internal.compat import PY2 import tests.submod.stuff as stuff def METHOD_NAME(f): if PY2: return f.im_func return f...
16,110
register
import bpy import os import glob import bpy.utils.previews import sverchok # custom icons dictionary _icon_collection = {} class SvIconProviderRecord(object): def __init__(self, provider_id, provider): self.provider_id = provider_id self.provider = provider self.provider_inited = False ...
16,111
get description
# Copyright (c) 2010 - Luca Invernizzi <invernizzi.l@gmail.com> # 2012 - Izidor Matušov <izidor.matusov@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 published by the Free Software # Foundation, either version...
16,112
test key removal no change
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import tempfile from ansible.module_utils import basic from units.compat import unittest from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.basic import AnsibleModule from ansible...
16,113
get bandwidth schedule
# 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,114
filenames from metadata
# (C) Datadog, Inc. 2022-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) """ Script to update test data. It downloads a minimal subset of files from the actual online repository which is enough to test downloading an integration. The files are saved in zip files under tests/da...
16,115
start
import asyncio import inspect from asyncio import Task as _Task from datetime import datetime, timedelta from typing import Callable import interactions from interactions.client.const import get_logger from .triggers import BaseTrigger __all__ = ("Task",) class Task: """ Create an asynchronous background ta...
16,116
test numpy array
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import numpy as np import pytest # noqa: F401 import awkward as ak def test_ListOffsetArray(): v2_array = ak.highlevel.Array( [[0.0, 1.1, 2.2, 3.3], [], [4.4, 5.5, 6.6], [7.7], [8.8, 9.9, 10.0, 11.1, 12.2]] ).la...
16,117
reset
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 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 # # Un...
16,118
home
"""Test Signals.""" import asyncio from math import copysign from numpy import float64 from typing import List, Union from opentrons_shared_data.errors.exceptions import MotionFailedError from opentrons_hardware.hardware_control.motion import ( MoveStopCondition, create_step, MoveGroupStep, ) from opentro...
16,119
is enabled
""" .. module: lemur.plugins.base.v1 :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ from flask import current_app from threading import local from typing import Optional, D...
16,120
get reports
from django.views.generic.base import View from unittest.mock import MagicMock from corehq.apps.reports.dispatcher import ReportDispatcher from corehq.apps.reports.generic import GenericReportView from ..permissions import conditionally_location_safe, is_location_safe, location_safe @location_safe def safe_fn_view...
16,121
head commit
# Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is # licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
16,122
prepare request
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
16,123
notify dashboard
from collections import defaultdict from contextlib import contextmanager from decimal import Decimal from itertools import chain from typing import Dict, Iterable, Optional from django.db.models import Q from ....core.tracing import opentracing_trace from ....order import FulfillmentStatus from ....order.events impo...
16,124
sanity check step
## # Copyright 2018-2023 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
16,125
test patch repr
import pyhf import pytest import pyhf.exceptions import pyhf.patchset import json from unittest import mock @pytest.fixture( scope='function', params=['patchset_good.json', 'patchset_good_2_patches.json'], ids=['patchset_good.json', 'patchset_good_2_patches.json'], ) def patchset(datadir, request): wi...
16,126
test query records x
from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from .....admin.request_context import AdminRequestContext from .....storage.error import StorageError from .. import routes as test_module from ..manager import V20DiscoveryMgr from ..messages.queries import Queries, QueryItem ...
16,127
installcheck clean
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import stat import tempfile from spack.package import * from spack.pkg.builtin.boost import Boost class Nix(A...
16,128
test get property by active status
# -*- coding: utf-8 -*- from tcms.xmlrpc.api import env from tests import factories as f from tests.xmlrpc.utils import XmlrpcAPIBaseTest class TestFilterGroups(XmlrpcAPIBaseTest): """Test filter_groups""" @classmethod def setUpTestData(cls): super().setUpTestData() cls.grp_1 = f.TCMSEn...
16,129
idealfourths
#!/usr/bin/env python __author__ = "Daniel McDonald" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Catherine Lozupone", "Yoshiki Vazquez Baeza"] __license__ = "BSD" __version__ = "1.7.0-dev" __maintainer__ = "Yoshiki Vazquez Baeza" __email__ = "yoshik89@gmail.com" __status__ = "Development" fro...
16,130
detach disk
import uuid from typing import Mapping, Any, Optional, MutableMapping, List, Dict import logging import aiohttp from hailtop.utils import retry_transient_errors, sleep_before_try from .base_client import GoogleBaseClient log = logging.getLogger('compute_client') class GCPOperationError(Exception): def __init__...
16,131
on open terminal
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """Dialog prompting the user to configure their system for Linux specific optimizations. "...
16,132
fake range
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import inspect from typing import Any, Dict, List, Set import torch from torch.fx._sym...
16,133
resource type
# 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,134
test urlparse
from plone.app.testing import login from plone.app.testing import TEST_USER_ID from plone.app.testing import TEST_USER_NAME from Products.CMFCore.utils import getToolByName from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING from Products.MailHost.interfaces import IMailHost from Products.status...
16,135
test async query parallel
# # Copyright The NOMAD Authors. # # This file is part of NOMAD. See https://nomad-lab.eu for further info. # # 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/licen...
16,136
test tableau user download
from datetime import datetime from unittest import mock from django.test import TestCase from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es.tests.utils import es_test, populate_user_index from corehq.apps.es.users import user_adapter from corehq.apps.users.bulk_download import parse_web_users ...
16,137
test light async turn on
from homeassistant.components.fan import ( DIRECTION_FORWARD, DIRECTION_REVERSE, FanEntityFeature, ) from homeassistant.components.light import ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ColorMode from ..const import ARLEC_FAN_LIGHT_PAYLOAD from ..helpers import assert_device_properties_set from ..mixins.select imp...
16,138
test get appropriate descendants
import datetime as dt import json from io import StringIO from django.test import SimpleTestCase, TestCase from scripts import _atomic_helpers as atomic from search.elasticsearch_helpers import ElasticsearchTestsMixin from v1.documents import FilterablePagesDocument from v1.models import AbstractFilterPage, BrowseFil...
16,139
callback
#!/usr/bin/env python3 # Copyright 2020-2023 OpenDR European Project # # 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 ...
16,140
test ordered multidigraph
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import unittest from dace.sdfg.graph import * class TestOrderedGraphs(unittest.TestCase): def test_ordered_digraph(self): g = OrderedDiGraph() g.add_edge(0, 7, "abc") g.add_edge(0, 3, "def") g.add_edge(0, 5...
16,141
test cannot create comment of nonexistent object
''' Faraday Penetration Test IDE Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/) See the file 'doc/LICENSE' for the license information ''' from faraday.server.api.modules.comments import CommentView from faraday.server.models import Comment from tests.factories import ServiceFactory from tests.test_ap...
16,142
usage
#! /usr/bin/env python # -*- coding: utf-8 -*- """TXT to PRETTY JSON.""" from __future__ import print_function from gdsii import tags, types import sys import re def show_data(tag_type, data): """Shows data in a human-readable format.""" if tag_type == types.ASCII: return '"%s"' % data[1:-1] elif ...
16,143
expect
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright David Halter and Contributors # Modifications are dual-licensed: MIT and PSF. from typing import Optional, Iterator, Tuple, List from parso.python.tokenize import tokenize ...
16,144
create
from dataclasses import dataclass from datetime import datetime from expungeservice.models.charge import OeciCharge, Charge, EditStatus from expungeservice.models.expungement_result import ChargeEligibilityStatus from expungeservice.util import DateWithFuture as date_class from typing import Optional, Tuple, Iterable ...
16,145
i n experimental
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/appleapiopts.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 ...
16,146
ensure execution context
# This file is part of Aenea # # Aenea is free software: you can redistribute it and/or modify it under # the terms of version 3 of the GNU Lesser General Public License as # published by the Free Software Foundation. # # Aenea is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even ...
16,147
conv1x1
# Implementation of this model is borrowed and modified # (from torch to paddle) from here: # https://github.com/Beckschen/TransUNet/blob/main/networks/vit_seg_modeling_resnet_skip.py # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # y...
16,148
render md goaltable
""" TIM plugin: a radiobutton field """ import json from dataclasses import dataclass, asdict from typing import Union from flask import render_template_string from marshmallow.utils import missing from tim_common.markupmodels import GenericMarkupModel from tim_common.pluginserver_flask import ( GenericHtmlModel,...
16,149
test multr1
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import numpy as np import dace from common import compare_numpy_output ### Left, match first pos ###################################################### @compare_numpy_output() def test_subl1(A: dace.float64[5, 3], B: dace.float64[3]): r...
16,150
help exit
#!/usr/bin/env python3 # Copyright (c) 2020 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....
16,151
resetarrays
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
16,152
str references
import re, inspect, textwrap, pydoc from docscrape import NumpyDocString, FunctionDoc, ClassDoc from six import iteritems class SphinxDocString(NumpyDocString): # string conversion routines def _str_header(self, name, symbol='`'): return ['.. rubric:: ' + name, ''] def _str_field_list(self, name):...
16,153
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 . im...
16,154
test carbon txt url and content
import logging import pytest import pathlib from django.urls import reverse from rest_framework.test import APIRequestFactory from ... import api import apps.accounts.models as ac_models from ... import exceptions pytestmark = pytest.mark.django_db logger = logging.getLogger(__name__) rf = APIRequestFactory() ...
16,155
run test
#!/usr/bin/env python3 # Copyright (c) 2018-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 the deriveaddresses rpc call.""" from test_framework.test_framework import DefiTestFramework from ...
16,156
test instantiation
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import json from datetime import datetime from pyowm.commons.enums import ImageTypeEnum from pyowm.agroapi10.search import SatelliteImagerySearchResultSet from pyowm.agroapi10.enums import PresetEnum class TestSatelliteImagerySearchResultSet(unittest.Test...
16,157
quintic
import numpy as np def linear(r): return -r def thin_plate_spline(r): if r == 0: return 0.0 else: return r**2*np.log(r) def cubic(r): return r**3 def METHOD_NAME(r): return -r**5 def multiquadric(r): return -np.sqrt(r**2 + 1) def inverse_multiquadric(r): return 1/...
16,158
shape
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Shim for type hints in buck. A lot of this can be deleted when we move to buck2 entirely, but for now this is required to keep buck1 cod...
16,159
makeplots
import os.path, glob, sys import ROOT import array import math # N.B.: Consult ./xeon_scripts/benchmark-cmssw-ttbar-fulldet-build.sh for info on nTHs, nVUs, and text file names def run(): # command line input arch = sys.argv[1] # SNB, KNL, SKL-SP sample = sys.argv[2] build = sys.argv[3] # BH, STD,...
16,160
get project with code
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
16,161
anti
## ## ## Feynrules Header ## ## ## ## ## from __future__ import absolute_import import cmath class UFOBaseClass(object): """The class from which all FeynRules classes are derived.""" require_args = [] def __init__(self, *args, **options): assert(len(self.require_args) == len (args)) ...
16,162
set up
from rest_framework import status from sentry.models import NotificationSetting from sentry.notifications.types import NotificationSettingOptionValues, NotificationSettingTypes from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.types.integrations import Exter...
16,163
test x user defined
# coding: utf-8 """ webencodings.tests ~~~~~~~~~~~~~~~~~~ A basic test suite for Encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ from __future__ import unicode_literals from . import (lookup, LABELS, decode, encode, iter_decode, iter_encode, ...
16,164
end element
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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 wi...
16,165
uri
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
16,166
title
from collections import OrderedDict from django.core.cache import cache from django.db import models from django.db.models import Q from django.utils.translation import get_language, get_language_info from django.utils.translation import gettext_lazy as _ from c3nav.mapdata.fields import I18nField from c3nav.mapdata....
16,167
py obj to value
#!/usr/bin/env python2 """ cpython.py - temporary bridge """ from __future__ import print_function from _devbuild.gen.runtime_asdl import ( value, value_e, value_t, ) from _devbuild.gen.syntax_asdl import loc from core import error from core import vm from mycpp.mylib import log, NewDict, tagswitch from t...
16,168
test eks pytorch densenet inference
import os import random import pytest from time import sleep from invoke import run import test.test_utils.eks as eks_utils import test.test_utils as test_utils def __run_pytorch_neuron_inference(image, model_name, model_url, processor): server_type = test_utils.get_inference_server_type(image) model = f"...
16,169
data
import os import string import sys from random import randint from enum import Enum import numpy as np import pandas as pd from datetime import datetime, timedelta from PySide2.QtWidgets import QWidget, QApplication from GridCal.Gui.LoadDesigner.gui import * class LoadPointsModel(QtCore.QAbstractTableModel): ""...
16,170
test blank coupon str
from copy import deepcopy from decimal import Decimal import pytest import stripe from django.test.testcases import TestCase from djstripe.models import Coupon from . import FAKE_COUPON from .conftest import CreateAccountMixin pytestmark = pytest.mark.django_db class TransferTest(CreateAccountMixin, TestCase): ...
16,171
parameter handler
########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
16,172
configure cmake
#!/usr/bin/env python3 # NOTE: This script requires Python >= 3.7 and CMake >= 3.15 import argparse import asyncio import atexit import os import re import shutil import subprocess import sys import tempfile from enum import Enum from timeit import default_timer as timer enable_verbose_logging = False class LogLe...
16,173
toy s3 sensor
import os from dagster import ( AssetKey, RunFailureSensorContext, RunRequest, SkipReason, _check as check, asset_sensor, run_failure_sensor, sensor, ) from dagster_slack import make_slack_on_run_failure_sensor from slack_sdk.web.client import WebClient from dagster_test.toys.error_mon...
16,174
test positive disable hammer defaults
"""Tests related to hammer command and its options and subcommands. :Requirement: Hammer :CaseAutomation: Automated :CaseLevel: Component :CaseComponent: Hammer :Team: Endeavour :TestType: Functional :CaseImportance: Critical :Upstream: No """ import io import json import re import time import pytest from rob...
16,175
validation step
import os import traceback from argparse import ArgumentParser from typing import Callable, Literal, Optional import torch import torch.nn.functional as F import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler from torch.utils.data import Dataset from lightning import LightningModule, Trainer fro...
16,176
test invalid op
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ from test.testlib.testcase import BaseTestCase from unittest.mock import patch from six import StringIO import cfnlint.decode.cfn_yaml # pylint: disable=E0401 from cfnlint.core import DEFAULT_RULESDIR # pylint:...
16,177
test with cw log group but without
import itertools from unittest import TestCase from unittest.mock import Mock, patch, call import pytest from botocore.exceptions import ClientError from click.testing import CliRunner from parameterized import parameterized from samcli.commands.logs.command import do_cli, cli from samcli.lib.observability.util impor...
16,178
verify conv3d transpose ncdhw
# 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,179
is dask backend
from typing import Dict, List, Optional, Tuple import numpy as np import pandas as pd from ludwig.api_annotations import DeveloperAPI from ludwig.constants import DASK_MODULE_NAME from ludwig.data.dataframe.base import DataFrameEngine from ludwig.utils.types import DataFrame @DeveloperAPI def is_dask_lib(df_lib) ->...
16,180
check sessions
""" Copyright 2016 Inmanta 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 ...
16,181
fmod
"""mathematical functions The `math` module provides some basic mathematical functions for working with floating-point numbers. |see_cpython_module| :mod:`cpython:math`. """ from __future__ import annotations from typing import Tuple e: float """base of the natural logarithm""" pi: float """the ratio of a circle'...
16,182
get long vo
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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-...
16,183
check
import _collections_abc import _weakrefset import abc import collections import contextlib import copy import copyreg import dataclasses import enum import functools import glob import importlib import inspect import linecache import logging import multiprocessing import operator import os import posixpath import rando...
16,184
on entry id changed
# 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...
16,185
render
# Copyright (c) 2015 aggftw@gmail.com # Distributed under the terms of the Modified BSD License. from plotly.graph_objs import Figure, Layout from plotly.offline import iplot try: from pandas.core.base import DataError except ImportError: try: from pandas.core.groupby import DataError except Impo...
16,186
test frame via fill value e
from __future__ import annotations import frame_fixtures as ff import numpy as np from static_frame import Frame from static_frame import FrameGO from static_frame import Series from static_frame.test.test_case import TestCase class TestUnit(TestCase): def test_frame_via_fill_value_a1(self) -> None: f...
16,187
register derivatives
#------------------------------------------------------------------------------- # RKCorrections #------------------------------------------------------------------------------- from PYB11Generator import * from Physics import * from PhysicsAbstractMethods import * from RestartMethods import * @PYB11template("Dimensio...
16,188
make serving version
# Copyright 2020 The Nomulus 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...
16,189
test equality
from __future__ import annotations import random import unittest import pytest from pymatgen.core.composition import Composition from pymatgen.core.ion import Ion from pymatgen.core.periodic_table import Element class TestIon(unittest.TestCase): def setUp(self): self.comp = [] self.comp.append(...
16,190
d1 entity id key
import os import vtk # # Represent a zero-origin index using a base-64 ascii digits string. # Digit chars LSC to MSC are 0-9a-zA-Z%# for 64 (6 bits) digit chars. # Using 6-bit digits chars (base-64) in this way means our ascii # representation for an integer index is 25% inefficient because # we're using 8-bit ascii c...
16,191
test saved model
# Copyright 2023 The KerasCV Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
16,192
tear down
# Copyright (c) Facebook, Inc. and its affiliates. import gc import unittest import tests.test_utils as test_utils import torch from mmf.modules.hf_layers import undo_replace_with_jit from mmf.utils.build import build_model from mmf.utils.configuration import Configuration from mmf.utils.env import setup_imports, tea...
16,193
removeallspaces
# -*- mode: python; coding: utf-8 -* # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 3-clause BSD License """ Generate a test pattern based on ascii characters. Place test pattern above given location on a given date. """ import argparse import sys import matplotlib.image as mpimg import nump...
16,194
test set virt pxe boot
import uuid from ipaddress import AddressValueError, NetmaskValueError import pytest from cobbler import enums, validate from cobbler.utils import signatures from tests.conftest import does_not_raise @pytest.mark.parametrize( "input_dnsname,expected_result,expected_exception", [ (0, "", pytest.rais...
16,195
about wiki
from typing import Optional, Tuple, Callable import re import logging import json from df_engine.core import Context, Actor from tools.wiki import ( get_name, what_is_book_about, get_published_year, best_plain_book_by_author, genre_of_book, ) logger = logging.getLogger(__name__) BOOKREADS_DATA =...
16,196
initialize model
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
16,197
insert other
import sqlite3 import datetime now = datetime.datetime.utcnow() CREATE_GROCERIES = "CREATE TABLE IF NOT EXISTS groceries (id INTEGER PRIMARY KEY,good TEXT, price INTEGER, date DATE);" CREATE_HOUSEHOLD = "CREATE TABLE IF NOT EXISTS household (id INTEGER PRIMARY KEY,good TEXT, price INTEGER, date DATE);" CREATE_ENTERTAI...
16,198
call api
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import urljoin class NhkBaseIE(InfoExtractor): _API_URL_TEMPLATE = 'https://nwapi.nhk.jp/nhkworld/%sod%slist/v7b/%s/%s/%s/all%s.json' _BASE_URL_REGEX = r'https?://www3\.nhk\.or\.jp/nhkworld/(?P<l...
16,199
ber pc
# # Copyright (c) 2014-2015 Sylvain Peyrefitte # # This file is part of rdpy. # # rdpy 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. ...