id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
18,400 | host | # mypy: disallow_untyped_defs=False
from typing import List
from ._abstract import AbstractScraper
from ._exceptions import ElementNotFoundInHtml
from ._grouping_utils import IngredientGroup
from ._utils import get_minutes, get_yields, normalize_string
class NIHHealthyEating(AbstractScraper):
@classmethod
de... |
18,401 | compute metrics from files | """
This module computes evaluation metrics for MSMARCO dataset on the ranking task. Intenral hard coded eval files version. DO NOT PUBLISH!
Command line:
python msmarco_eval_ranking.py <path_to_candidate_file>
Creation Date : 06/12/2018
Last Modified : 4/09/2019
Authors : Daniel Campos <dacamp@microsoft.com>, Rutger ... |
18,402 | test flask stream | import os
import signal
import subprocess
import time
from typing import Callable
from typing import Dict
from typing import Generator
from typing import List
import pytest
from ddtrace.contrib.flask.patch import flask_version
from ddtrace.internal.utils.retry import RetryError
from tests.webclient import Client
DE... |
18,403 | get output | #!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
18,404 | merge | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development
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 limit... |
18,405 | decorator | # Copyright (C) Unitary Fund
#
# This source code is licensed under the GPL license (v3) found in the
# LICENSE file in the root directory of this source tree.
"""High-level Quantum Susbapce Expansion tools."""
from functools import wraps
from typing import Callable, Dict, List, Sequence, Union
from mitiq import QP... |
18,406 | test host | from recipe_scrapers.bakingmischeif import BakingMischeif
from tests import ScraperTest
class TestBakingMischeifScraper(ScraperTest):
scraper_class = BakingMischeif
def METHOD_NAME(self):
self.assertEqual("bakingmischief.com", self.harvester_class.host())
def test_author(self):
self.ass... |
18,407 | test historical sensors no data | import csv
from datetime import date
import os
import tempfile
from unittest.mock import patch
import numpy as np
import pandas as pd
from delphi_nowcast.data_containers import LocationSeries, SensorConfig
from delphi_nowcast.sensorization.sensor import compute_sensors, historical_sensors
class TestComputeSensors:
... |
18,408 | test xml from dict with unicode characters | from tests.test_helper import *
class TestXmlUtil(unittest.TestCase):
def test_dict_from_xml_simple(self):
xml = """
<container>val</container>
"""
expected = {"container": "val"}
self.assertEqual(expected, XmlUtil.dict_from_xml(xml))
def test_dict_from_xml_typecasts_in... |
18,409 | produce | # Copyright 2021 Telstra Open Source
#
# 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 o... |
18,410 | test localaccount | #!/usr/bin/python3
import pytest
from brownie import compile_source
from brownie.exceptions import VirtualMachineError
from brownie.network.transaction import TransactionReceipt
code = """
pragma solidity ^0.6.0;
contract Foo {
fallback () external payable {}
}
"""
def test_to_string(accounts):
"""Can send... |
18,411 | mock wrapper | # stdlib
import inspect
from typing import Callable
from typing import List
from typing import Optional
# third party
import pytest
# syft absolute
from syft.types import transforms
from syft.types.syft_object import SyftBaseObject
from syft.types.syft_object import SyftObjectRegistry
from syft.types.transforms impor... |
18,412 | is apoc available | import hashlib
import os
import shutil
from pathlib import Path
import docker
import requests
from demisto_sdk.commands.common.content_constant_paths import CONTENT_PATH
from demisto_sdk.commands.common.docker_helper import init_global_docker_client
from demisto_sdk.commands.common.logger import logger
from demisto_s... |
18,413 | test update | from typing import List
import pytest
from arango.database import StandardDatabase
from resotocore.config import ConfigEntity, ConfigValidation
from resotocore.db import configdb
from resotocore.db.async_arangodb import AsyncArangoDB
from resotocore.db.configdb import ConfigEntityDb, ConfigValidationEntityDb
from res... |
18,414 | location | # 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... |
18,415 | test multiplier returns expected value | # -------------------------------------------------------------------------------------------------
# Copyright (C) 2015-2023 Nautech Systems Pty Ltd. All rights reserved.
# https://nautechsystems.io
#
# Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
# You may not use this file ex... |
18,416 | init source | """Testing utilities that involve database (and often related
filesystem) interaction.
"""
import datetime
import io
import math
import os
import random
import subprocess
from pathlib import Path
from typing import Dict, List
from db import db
from encryption import EncryptionManager
from journalist_app.utils import m... |
18,417 | set successful message | #* 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/lgpl-2.1.html
import trac... |
18,418 | set value | # Princeton University licenses this file to You 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... |
18,419 | low level address tuple | # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2003-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permis... |
18,420 | get hdu | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import logging
import sys
import astropy.units as u
from astropy.coordinates import Angle, EarthLocation
from astropy.io import fits
from astropy.units import Quantity
from .scripts import make_path
log = logging.getLogger(__name__)
__all__ = ["earth_loc... |
18,421 | test multiple mt response compare type 1 | from mtpy.gui.SmartMT.visualization import MultipleMTResponses
from tests.SmartMT import SmartMTGUITestCase, _click_area
class TestGUIPlotMultipleMTResponse(SmartMTGUITestCase):
def METHOD_NAME(self):
plot_config = self._switch_to_plot(MultipleMTResponses, 2) # type: MultipleMTResponses
_click_are... |
18,422 | is opset supported | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import os
import platform
import sys
import unittest
from typing import Any
import numpy
import onnx.backend.base
import onnx.backend.test
import onnx.shape_inference
import onnx.version_converter
from onnx import ModelProto
from onnx.b... |
18,423 | check device | # 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... |
18,424 | test begin tag repeat | #!/usr/bin/env python
#
# Copyright 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import os
import tempfile
import array
import pmt
from gnuradio import gr, gr_unittest, blocks
class test_file_source(gr_unittest.TestCase):
@classmethod
... |
18,425 | visit unbound type | from __future__ import annotations
from typing import Iterable, Set
import mypy.types as types
from mypy.types import TypeVisitor
from mypy.util import split_module_names
def extract_module_names(type_name: str | None) -> list[str]:
"""Returns the module names of a fully qualified type name."""
if type_name... |
18,426 | get role by id | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
class RoleServiceApi:
def __init__(self, client, base_path = "/v1"):
self.client = client
self.base_path = base_path
def deleteRole(self, body=None):
__query = {
}
if body is None:
raise Exception("Missing required parameter \"body\"")
form... |
18,427 | filetype completion available | # Copyright (C) 2013-2020 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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.
#
#... |
18,428 | get task downstream dependencies | """Represents a collection of configured Airflow DAGs."""
from collections import defaultdict
from functools import partial
from itertools import groupby
from multiprocessing import get_context, set_start_method
from operator import attrgetter
from pathlib import Path
import yaml
from black import FileMode, format_fi... |
18,429 | sanitize restructured text | # util/deprecations.py
# Copyright (C) 2005-2016 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
"""Helpers related to deprecation of functions, methods, classes, other
functio... |
18,430 | to str | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.28
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... |
18,431 | make sym link | # 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)
from spack.package import *
target_arch_list = (
"armv7a",
"armv7a-hf",
"arm64-v8a",
"arm64-v8.2-a",
... |
18,432 | get base queryset | from datetime import datetime
from django.db.models import Exists, F, OuterRef, Q
from olympia import amo
from olympia.abuse.models import AbuseReport
from olympia.addons.models import Addon
from olympia.addons.tasks import (
delete_addons,
extract_colors_from_static_themes,
find_inconsistencies_between_e... |
18,433 | test refresh repo files conflict | import os
from git import GitCommandError, RepositoryDirtyError, GitError
import pytest
from dlt.common.storages import FileStorage
from dlt.common.git import clone_repo, ensure_remote_head, git_custom_key_command, get_fresh_repo_files, get_repo, is_dirty, is_clean_and_synced
from tests.utils import test_storage, ski... |
18,434 | return bool | import logging
from enum import Enum
from typing import List, Union
from slither.core.declarations import Function
from slither.core.solidity_types import ElementaryType
from slither.core.variables.variable import Variable
from slither.slithir.exceptions import SlithIRError
from slither.slithir.operations.lvalue impor... |
18,435 | to onnx | #!/usr/bin/python3
# ==============================================================================
#
# Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved.
#
# TPU-MLIR is licensed under the 2-Clause BSD License except for the
# third-party components.
#
# =================================================... |
18,436 | select from table | """
@package dbmgr.vinfo
@brief Support classes for Database Manager
List of classes:
- vinfo::VectorDBInfo
(C) 2007-2013 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.
@author Martin Landa <landa.ma... |
18,437 | main | #!/usr/bin/env python3
# Copyright (C) 2018, 2019 Collabora Limited
# Author: Guillaume Tucker <guillaume.tucker@collabora.com>
#
# This module is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either ve... |
18,438 | name | # 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... |
18,439 | lexicons | import json
import re
from typing import Any, Dict, Tuple, Union
from urllib.parse import urlsplit
from moto.core.responses import BaseResponse
from .models import polly_backends, PollyBackend
from .resources import LANGUAGE_CODES, VOICE_IDS
LEXICON_NAME_REGEX = re.compile(r"^[0-9A-Za-z]{1,20}$")
class PollyRespons... |
18,440 | resource 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... |
18,441 | test deps | import os
import pytest
import yaml
from contextlib import contextmanager
from pathlib import Path
from argparse import Namespace
import dbt.flags as flags
from dbt.tests.util import (
run_dbt,
run_dbt_and_capture,
write_file,
rm_file,
)
@pytest.fixture(scope="class")
def profiles_yml(profiles_root... |
18,442 | marshal | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# 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, merge... |
18,443 | load tests from name | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite
~~~~~~~~~~~~~~~~~~
Contains all test Werkzeug tests.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import re
import sys
import unittest
import shutil
import tempfile
im... |
18,444 | import csv | import csv
import logging
from pathlib import Path
from typing import TYPE_CHECKING, Any
from rotkehlchen.assets.converters import asset_from_kraken
from rotkehlchen.constants import ZERO
from rotkehlchen.constants.assets import A_DAI, A_SAI
from rotkehlchen.data_import.utils import BaseExchangeImporter
from rotkehlch... |
18,445 | test multiple register from bit | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... |
18,446 | company | """Tests the Polar API as an external consumer"""
from pathlib import Path
import pytest
from oso import Oso
from polar import exceptions
# Fake global actor name → company ID map.
# Should be an external database lookup.
actors = {"guest": "1", "president": "1"}
class User:
name: str = ""
verified: bool ... |
18,447 | create file | import logging
from typing import Union, Dict
import numpy as np
from .abstract_recorder import *
class VideoRecorder(Recorder):
"""
Writes video streams (.mjpeg/.h264/.hevc) or directly to mp4/avi container.
"""
def __init__(self, lossless: bool = False):
self.path = None
self._str... |
18,448 | get task details | # Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... |
18,449 | test pmf from sh | import warnings
import numpy as np
import numpy.testing as npt
from dipy.core.gradients import gradient_table
from dipy.core.sphere import HemiSphere, unit_octahedron
from dipy.data import default_sphere, get_sphere
from dipy.direction.pmf import SimplePmfGen, SHCoeffPmfGen, BootPmfGen
from dipy.reconst.csdeconv impor... |
18,450 | capture event | import inspect
from sentry_sdk._types import TYPE_CHECKING
from sentry_sdk.hub import Hub
from sentry_sdk.scope import Scope
from sentry_sdk.tracing import NoOpSpan, Transaction
if TYPE_CHECKING:
from typing import Any
from typing import Dict
from typing import Optional
from typing import overload
... |
18,451 | test programming challenge solution view with invalid | from http import HTTPStatus
from django.urls import reverse
from tests.BaseTestWithDB import BaseTestWithDB
from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator
class ProgrammingChallengeSolutionViewTest(BaseTestWithDB):
def __init__(self, *args, **kwargs):
super().__init__(*args, **k... |
18,452 | headers | ################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Read the zproject/README.md for information about making permanent changes. #
#############################################################################... |
18,453 | test duplication with en passant | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated d... |
18,454 | 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... |
18,455 | handler | import io
import base64
from gi.repository import Gtk
from gaphor.core import transactional, gettext
from gaphor.core.modeling import Comment
from gaphor.diagram.general.metadata import MetadataItem
from gaphor.diagram.general.picture import PictureItem
from gaphor.diagram.propertypages import (
PropertyPageBase... |
18,456 | get endpoint | # Copyright (C) 2021-2022 Intel Corporation
# Copyright (C) 2022-2023 CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import json
from http import HTTPStatus
import pytest
from cvat_sdk.api_client.api_client import ApiClient, Endpoint
from deepdiff import DeepDiff
from shared.utils.config import get_method, mak... |
18,457 | update | #!/usr/bin/env python
import sys
from direct.showbase.ShowBase import ShowBase
from direct.showbase.InputStateGlobal import inputState
from panda3d.core import AmbientLight
from panda3d.core import DirectionalLight
from panda3d.core import LPoint3
from panda3d.core import TransformState
from panda3d.core import BitM... |
18,458 | test with spec only | """
NOTE: this tests are also meant to be run as PyPy "applevel" tests.
This means that global imports will NOT be visible inside the test
functions. In particular, you have to "import pytest" inside the test in order
to be able to use e.g. pytest.raises (which on PyPy will be implemented by a
"fake pytest module")
""... |
18,459 | test get edit utf8 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------... |
18,460 | benchmark draw path flags | # (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... |
18,461 | main | #!/usr/bin/env python
#
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===---------... |
18,462 | get state dict | import json
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def METHOD_NAME(file):
try:
pretrain_state_dict = torch.load(file)
except AssertionError:
pretrain_state_dict = torch.load(
file, map_location=lambda storage, location: storage
... |
18,463 | test set as default | from unittest.mock import patch
import pytest
from szurubooru import api, db, errors, model
from szurubooru.func import snapshots, tag_categories, tags
def _update_category_name(category, name):
category.name = name
@pytest.fixture(autouse=True)
def inject_config(config_injector):
config_injector(
... |
18,464 | invalidate uri | from typing import Optional, Hashable, TypeVar, Generic, Iterator, Tuple, Set
from robotframework_ls.impl.protocols import (
IRobotDocument,
ICompletionContextWorkspaceCaches,
ICompletionContextDependencyGraph,
IOnDependencyChanged,
)
from robocorp_ls_core import uris
from collections import OrderedDict... |
18,465 | pre descend | import dataclasses
from typing import Any, Callable, Iterable, Mapping, Union
from magma.array import Array, ArrayMeta
from magma.backend.mlir.common import make_unique_name
from magma.backend.mlir.graph_lib import Graph
from magma.circuit import Circuit, DefineCircuitKind
from magma.common import replace_all, Stack, ... |
18,466 | test output with rms scaling | import numpy as np
import pytest
from keras_core import layers
from keras_core import ops
from keras_core import regularizers
from keras_core import testing
class LayerNormalizationTest(testing.TestCase):
@pytest.mark.requires_trainable_backend
def test_ln_basics(self):
self.run_layer_test(
... |
18,467 | result | # Copyright 2019 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... |
18,468 | change policy | #
# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... |
18,469 | mack r | ### Building out a dev environment with a working copy
### of R ChainLadder is difficult. These tests are
### Currently inactive, but available should the compatibility
### of the installs improve at a later date.
import numpy as np
import pytest
import chainladder as cl
try:
from rpy2.robjects.packages import ... |
18,470 | test save restore | # 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... |
18,471 | webauthn b64encode | # 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 the Li... |
18,472 | created by 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
__all__ =... |
18,473 | get speed tolerance | #!/usr/bin/env python
#############################################################################
# Celestica
#
# Module contains an implementation of SONiC Platform Base API and
# provides the fan status which are available in the platform
#
##########################################################################... |
18,474 | weighted sum | """
Copyright 2017 Steven Diamond
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... |
18,475 | cmt | import subprocess
import GangaCore.Utility.logging
import os
logger = GangaCore.Utility.logging.getLogger()
def get_user_platform(env=os.environ):
if 'CMTCONFIG' in env:
return env['CMTCONFIG']
else:
msg = '"CMTCONFIG" not set. Cannot determine the platform you want to use'
logger.inf... |
18,476 | test play with handlers | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... |
18,477 | test permissions for slurm db secret | # Copyright 2022 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.txt" file accom... |
18,478 | send invite | # encoding: utf-8
import codecs
import os
import smtplib
import socket
import logging
from time import time
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email import utils
from ckan.common import config
import ckan.common
from six import text... |
18,479 | change number mock | """Split syncrhonization task test module."""
import threading
import time
from splitio.api.commons import FetchOptions
from splitio.tasks import segment_sync
from splitio.storage import SegmentStorage, SplitStorage
from splitio.models.splits import Split
from splitio.models.segments import Segment
from splitio.models... |
18,480 | test compare 3d and frame impact distance | #!/usr/bin/env python3
"""
tests for impact distance computations
"""
import numpy as np
from astropy import units as u
from ctapipe.containers import ReconstructedGeometryContainer
from ctapipe.coordinates.impact_distance import (
impact_distance,
shower_impact_distance,
shower_impact_distance_with_fram... |
18,481 | test get status no secrets | import logging
from pathlib import Path
import pytest
import responses
from authlib.integrations.base_client import OAuthError
from requests import Session
from toucan_connectors.common import HttpError
from toucan_connectors.oauth2_connector.oauth2connector import NoOAuth2RefreshToken, OAuth2Connector
from toucan_co... |
18,482 | test childrens day | # python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2... |
18,483 | test map to grid constant roi | """ Unit Tests for Py-ART's map/gates_to_grid.py. """
import numpy as np
import pytest
from numpy.testing import assert_almost_equal
import pyart
EXPECTED_CENTER_SLICE = [40, 30, 20, 10, 0, 0, 10, 20, 30, 40]
COMMON_MAP_TO_GRID_ARGS = {
"grid_shape": (3, 9, 10),
"grid_limits": ((-400.0, 400.0), (-900.0, 900... |
18,484 | test rgb capitalized | import pytest
import pygame
from pygame_gui.core.colour_parser import parse_degree_string, is_u8_string, is_degree_string, is_percentage_string, parse_colour_or_gradient_string, is_valid_colour_string, is_valid_gradient_string
class TestColourParsing:
def test_rgb(self, _init_pygame):
assert parse_colour_... |
18,485 | get lang | from rest_framework import viewsets
from .models import ListModel
from . import serializers
from utils.page import MyPageNumberPagination
from rest_framework.filters import OrderingFilter
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.response import Response
from .filter import Filte... |
18,486 | build schema on 200 | # --------------------------------------------------------------------------------------------
# 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
# --------------------------------... |
18,487 | drop mode | from typing import Union
from .safe_class import SafeClass
from aequilibrae.project.network.mode import Mode
class Link(SafeClass):
"""A Link object represents a single record in the *links* table
.. code-block:: python
>>> from aequilibrae import Project
>>> proj = Project.from_path("/tmp/... |
18,488 | test authentication flow document | import pytest
import jwt
import os
import time
from api.authenticator import (
PatronData,
)
from api.config import (
Configuration,
temp_config,
)
from api.firstbook2 import (
FirstBookAuthenticationAPI,
MockFirstBookAuthenticationAPI,
)
from api.circulation_exceptions import (
RemoteInitia... |
18,489 | get attr | # Copyright (c) 2021 Charles University, Faculty of Arts,
# Institute of the Czech National Corpus
# Copyright (c) 2021 Martin Zimandl <martin.zimandl@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... |
18,490 | test label balance coco raw | import json
import os
import shutil
import unittest
import numpy as np
import tensorflow as tf
from PIL import Image
from neural_compressor.data import DATALOADERS, FILTERS, TRANSFORMS, Datasets
from neural_compressor.utils.create_obj_from_config import create_dataloader, create_dataset, get_preprocess
class TestCO... |
18,491 | test b spline |
# ISC License
#
# Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copie... |
18,492 | test start tensorboard for multi experiment | import subprocess
from pathlib import Path
from typing import Dict, Optional
import pytest
from determined.common import api, yaml
from tests import command as cmd
from tests import config as conf
from tests import experiment as exp
from tests.api_utils import determined_test_session
from tests.filetree import FileTr... |
18,493 | test to dict | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2023
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... |
18,494 | tuplify | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 12 17:58:51 2014
@author: david
"""
import numpy as np
try:
import copy_reg
except ImportError:
import copyreg as copy_reg
def pickleSlice(slice):
return unpickleSlice, (slice.start, slice.stop, slice.step)
def unpickleSlice(start, stop, step):
... |
18,495 | grad full | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... |
18,496 | supported database flags | # 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... |
18,497 | set up | import json
import os
import unittest
from avocado.utils import genio, process
from selftests.utils import AVOCADO, TestCaseTmpDir
ALL_MESSAGES = [
"setup pre",
"setup post",
"test pre",
"test post",
"teardown pre",
"teardown post",
]
# Format: {klass.test_method: (status,
# ... |
18,498 | test bss provider put | # coding: utf-8
# Copyright (c) 2001-2022, Hove and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# powered by Hove (www.hove.com).
# Help us simplify mobility and open public transport:
# a non ending quest to the respo... |
18,499 | get deployment 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 . imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.