id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
13,400
test gift card add note expired card
import json from datetime import date, timedelta from unittest import mock import graphene import pytest from django.utils.functional import SimpleLazyObject from freezegun import freeze_time from .....core.utils.json_serializer import CustomJsonEncoder from .....giftcard import GiftCardEvents from .....giftcard.erro...
13,401
test stereo camera
import os import os.path import shutil import tempfile from unittest import TestCase import numpy as np from yt.testing import assert_fname, fake_random_ds from yt.visualization.volume_rendering.api import ( ColorTransferFunction, ProjectionTransferFunction, ) from yt.visualization.volume_rendering.old_camera...
13,402
to key
# Copyright 2021 Hathor Labs # # 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, s...
13,403
settargetlang
# # Copyright 2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your optio...
13,404
do draw rectangle outline
""" This is for testing geometry shader shapes. Please keep. """ from __future__ import annotations import time import math import random import arcade from arcade.types import NamedPoint SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 TITLE = "Shape Test" # [x] draw_line # [x] draw_lines # [x] draw_circle_filled # [x] draw...
13,405
test new sc new rbd pool
import logging import pytest from ocs_ci.ocs import constants from ocs_ci.framework.testlib import ManageTest, tier1 from ocs_ci.ocs.ui.block_pool import BlockPoolUI from ocs_ci.ocs.ui.storageclass import StorageClassUI from ocs_ci.framework.pytest_customization.marks import ( skipif_external_mode, skipif_ocs_...
13,406
get
from voluptuous import ( Required, All, Match, Range, Coerce, Schema, REMOVE_EXTRA, ) from rest_framework import (permissions) from apps.fhir.bluebutton.constants import DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE from apps.fhir.bluebutton.views.generic import FhirDataView from apps.authorization.perm...
13,407
process response
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
13,408
resolve ref
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # """Markdown extension for xrefs and reference to other Markdown files. Xref is a reference of form [`sym...
13,409
set up
import os from collections import defaultdict from fireworks import FiretaskBase, Firework, FWAction, explicit_serialize from pymongo.database import Database from atomate.utils.testing import AtomateTest from atomate.utils.utils import ( env_chk, get_database, get_logger, get_mongolike, get_uri, ...
13,410
get storage info
import logging import os import shutil from django.conf import settings from django.contrib.contenttypes.fields import GenericRelation from django.db import models from physionet.settings.base import StorageTypes from project.modelcomponents.metadata import Metadata from project.utility import StorageInfo from project...
13,411
tmp path
#!/usr/bin/env python """Wrapper for running a fleetspeak client in a virtualenv setup. This script is meant to be used for development. Requirements for running this script: * Running from a virtualenv. * PIP package `fleetspeak-client-bin` is installed. * `grr_config_updater initialize` has been run. * Fleetsp...
13,412
a
import pickle import time import numpy as np import pytest import pytensor from pytensor.compile.mode import Mode from pytensor.link.basic import PerformLinker from pytensor.link.c.basic import OpWiseCLinker from pytensor.tensor.type import dvector, lvector def test_no_reuse(): x = lvector() y = lvector() ...
13,413
get voidstar
from ctypes import * import sys import threading import numpy as np from numba.core.compiler import compile_isolated from numba import jit from numba.core import types, errors from numba.core.typing import ctypes_utils from numba.tests.support import MemoryLeakMixin, tag, TestCase from numba.tests.ctypes_usecases im...
13,414
test pending without workers
# Copyright 2022 The EasyDL 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...
13,415
search analyze
from pathlib import Path import click from . import __version__ from .constants import ( CI, CONTENT_ROOT, CONTENT_TRANSLATED_ROOT, DEFAULT_BUCKET_NAME, DEFAULT_BUCKET_PREFIX, DEFAULT_CACHE_CONTROL, DEFAULT_NO_PROGRESSBAR, DEFAULT_REPO, DEFAULT_GITHUB_TOKEN, ELASTICSEARCH_URL, ...
13,416
make record and handle
# Stubs for logbook.base (Python 3) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from logbook._fallback import StackedObject from typing import Any, Optional def set_datetime_format(datetime_format: Any) -> None: ... CRITICAL: int ERROR: int WARNING: int NOTICE: int INFO: int DEBUG: ...
13,417
random 32
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2009-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...
13,418
paint event
from logging import getLogger from typing import Union, Protocol from PyQt5.QtCore import ( Qt, QRect, QSize, QPoint, pyqtSignal, ) from PyQt5.QtGui import QFontMetrics from PyQt5.QtWidgets import ( QStyle, QLabel, QWidget, QStyleOptionTab, QStylePainter, QTabBar, QTabWi...
13,419
create response async generator
""" FiftyOne operator server. | Copyright 2017-2023, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ import types from starlette.endpoints import HTTPEndpoint from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.responses import JSONResponse, StreamingRespons...
13,420
default env
# 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...
13,421
add reaction
# coding=utf-8 from http import HTTPStatus from pyramid.config import Configurator import typing from tracim_backend.exceptions import ReactionAlreadyExistError from tracim_backend.exceptions import UserNotMemberOfWorkspace from tracim_backend.extensions import hapic from tracim_backend.lib.core.reaction import React...
13,422
add test3
# automatically generated by the FlatBuffers compiler, do not modify # namespace: NestedUnion import flatbuffers from flatbuffers.compat import import_numpy from typing import Any from MyGame.Example.NestedUnion.Test import Test from typing import Optional np = import_numpy() class Vec3(object): __slots__ = ['_t...
13,423
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...
13,424
data to world
import warnings import numpy as np from magicgui.widgets import Container, HBox, PushButton, SpinBox, create_widget from napari import Viewer from napari.layers import Labels from napari.utils.notifications import show_info from qtpy.QtCore import QTimer from vispy.geometry import Rect from PartSeg.common_gui.napari_...
13,425
get available firmware version
############################################################################# # Celestica # # Component contains an implementation of SONiC Platform Base API and # provides the components firmware management function # ############################################################################# try: import os.pa...
13,426
not found
import asyncio import json from typing import Optional, Dict, Union, Any, List from base64 import b64decode from aiohttp import web from .logs import logs from .app_state import app_state from .util import to_bytes, to_string, constant_time_compare # Supported networks in restapi url MAINNET = 'main' TESTNET = 'test...
13,427
glossary
"""Markdown routes Render pages from github, or if they are unavailable, look for it else where """ import requests import markdown import os import sys from bs4 import BeautifulSoup # type: ignore from flask import send_from_directory from flask import Blueprint from flask import render_template from typing impo...
13,428
cancel removal
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
13,429
get serv
""" Return data to a memcache server To enable this returner the minion will need the python client for memcache installed and the following values configured in the minion or master config, these are the defaults. .. code-block:: yaml memcache.host: 'localhost' memcache.port: '11211' Alternative configurat...
13,430
get training class distribution
# # # Thin wrapper around sparknlp_jsl classes # --> Spark NLP annotator Objects # from johnsnowlabs import Finance, Legal, Medical # johnsnowlabs.start() # # # Under the hood using MedcicalNer/EnterpriseNer Scala class # fin_ner = Finance.Ner.pretrained().setInputCols() ..... # # NerDl # MedicalNerDl # FinanceNerDl # ...
13,431
safe initial data
from typing import Dict, List, Union from django.db.models import Q, QuerySet, Value from django.http import QueryDict from baserow.api.exceptions import ( InvalidSortAttributeException, InvalidSortDirectionException, UnknownFieldProvided, ) class UnknownFieldRaisesExceptionSerializerMixin: """ ...
13,432
set up class
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
13,433
calib
# pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-18 pywws contributors # 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;...
13,434
read all
""" http://stanford-clark.com/MQTT/ """ import asyncio import json import random from asyncio import StreamReader, StreamWriter from typing import Optional CONNECT = 1 CONNACK = 2 PUBLISH = 3 PUBACK = 4 SUBSCRIBE = 8 SUBACK = 9 PINGREQ = 12 PINGRESP = 13 DISCONNECT = 14 class MQTTMessage: type: int dup: bool...
13,435
test is usage statistics key set if
"""These tests exercise ConfigurationBundle including Serialization.""" import pytest from great_expectations.data_context import BaseDataContext from great_expectations.data_context.migrator.configuration_bundle import ( ConfigurationBundle, ConfigurationBundleJsonSerializer, ConfigurationBundleSchema, ) ...
13,436
explanatory tooltip is correct
# # SecureDrop whistleblower submission system # Copyright (C) 2017 Loic Dachary <loic@dachary.org> # # 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 #...
13,437
test full width exclmation point
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2022 NV Access Limited, Rob Meredith # This file may be used under the terms of the GNU General Public License, version 2 or later. # For more details see: https://www.gnu.org/licenses/gpl-2.0.html import unittest from documentNavigation import sentenceHelper...
13,438
inner
# 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 ...
13,439
josephy
import unittest import numpy as np from dolo.numeric.optimize.ncpsolve import ncpsolve def METHOD_NAME(x): # Computes the function value F(x) of the NCP-example by Josephy. n = len(x) Fx = np.zeros(n) Fx[0] = 3 * x[0] ** 2 + 2 * x[0] * x[1] + 2 * x[1] ** 2 + x[2] + 3 * x[3] - 6 Fx[1] = 2 * x[0...
13,440
setup databases
import logging from argparse import ArgumentParser from collections.abc import Iterator, Sequence from contextlib import contextmanager from io import StringIO from typing import Any, Literal from unittest import TestCase, TestLoader, TestSuite, TextTestResult, TextTestRunner from django.db.backends.base.base import B...
13,441
to tensor
# Copyright (c) Alibaba, Inc. and its affiliates. import time from collections.abc import Sequence from typing import Mapping import numpy as np import torch from modelscope.utils.registry import default_group from .builder import PREPROCESSORS, build_preprocessor @PREPROCESSORS.register_module() class Compose(obj...
13,442
read alphabet
# Copyright 2018 by Ariel Aptekmann. # All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Module for the supp...
13,443
gather build configuration
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
13,444
games
import datetime import os from typing import List, Dict, Union import jinja2.exceptions from flask import request, redirect, url_for, render_template, Response, session, abort, send_from_directory from pony.orm import count, commit, db_session from worlds.AutoWorld import AutoWorldRegister from . import app, cache fr...
13,445
test windows sequence
"""Unittests for $ rio blocks""" from itertools import zip_longest import json import re import numpy as np import rasterio from rasterio.warp import transform_bounds from rasterio.rio.main import main_group def check_features_block_windows(features, src, bidx): """Compare GeoJSON features to a datasource's b...
13,446
is replaceable
######################################################################## # NOKIA IXS7215 # # Module contains an implementation of SONiC Platform Base API and # provides the Components' (e.g., BIOS, CPLD, FPGA, etc.) available in # the platform # ######################################################################## ...
13,447
memory profile decorator
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
13,448
update
# -*- coding: UTF-8 -*- from struct import pack, unpack import sys from tempfile import NamedTemporaryFile from ._lowlevel import ffi, lib from .minhash import to_bytes, MinHash from .utils import RustObject, rustcall, decode_str from .exceptions import SourmashError class Nodegraph(RustObject): __dealloc_func_...
13,449
set file
""" Support for Debconf """ import logging import os import re import salt.utils.files import salt.utils.path import salt.utils.stringutils import salt.utils.versions log = logging.getLogger(__name__) __func_alias__ = {"set_": "set"} # Define the module's virtual name __virtualname__ = "debconf" def __virtual__(...
13,450
consume
import asyncio import logging import re import aiohttp from ..abc.connection import Connection # L = logging.getLogger(__name__) # class InfluxDBConnection(Connection): """ Description: InfluxDBConnection serves to connect BSPump application with an InfluxDB database. The InfluxDB server is accessed via URL, ...
13,451
executable
import copy import io import socket import subprocess from concurrent.futures import ThreadPoolExecutor from pathlib import Path from typing import Any, Dict, Generator, List import numpy as np import pytest from sklearn.datasets import make_blobs, make_regression from sklearn.metrics import accuracy_score TESTS_DIR ...
13,452
retry on io error and server error
# # 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 us...
13,453
do dma
import unittest import random import itertools from migen import * from misoc.interconnect import wishbone from artiq.coredevice.exceptions import RTIOUnderflow, RTIODestinationUnreachable from artiq.gateware import rtio from artiq.gateware.rtio import dma, cri from artiq.gateware.rtio.phy import ttl_simple def enc...
13,454
test iterscan
import os from pathlib import Path import pytest from pkgcore.fs import fs, livefs from pkgcore.fs.contents import contentsSet class TestFsObjs: def check_attrs(self, obj, path, offset=None): if offset is None: st = path.lstat() else: st = (offset / path).lstat() ...
13,455
test empty refs and hyps
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
13,456
get low power mode
#! /usr/bin/python # # Platform-specific SFP transceiver interface for SONiC # try: import time from sonic_sfp.sfputilbase import SfpUtilBase import sys sys.path.append('/usr/lib/python2.7/dist-packages/sonic_sfp/') from sff8472 import sff8472InterfaceId from sff8472 import sff8472Dom from ...
13,457
validate docs
import os import re from usaspending_api.settings import REPO_DIR # Typically we only care about v2 API endpoints, but if we ever add v3 or # whatever, add the base path to this tuple. CURRENT_ENDPOINT_PREFIXES = ("/api/v2/",) ENDPOINTS_MD = "usaspending_api/api_docs/markdown/endpoints.md" # This should match stuff...
13,458
encode video
# Copyright (c) OpenMMLab. All rights reserved. from typing import Any, Dict, List, Tuple import torch from mmengine.dist import all_gather, get_rank from mmengine.model import BaseModel from mmengine.structures import InstanceData from mmaction.registry import MODELS from mmaction.utils import ForwardResults, OptSam...
13,459
test open file
import os.path import sys import pathlib import unittest from importlib import import_module from importlib_resources.readers import MultiplexedPath, NamespaceReader class MultiplexedPathTest(unittest.TestCase): @classmethod def setUpClass(cls): path = pathlib.Path(__file__).parent / 'namespacedata01...
13,460
test pipeline model parallel rank
import torch import megatron.core.parallel_state as ps import pytest from tests.unit_tests.test_utilities import Utils import os rank = Utils.rank world_size = Utils.world_size def test_initialize__and_destroy_model_parallel(): with pytest.raises(AssertionError): assert(ps.initialize_model_parallel()) ...
13,461
make ogrid transform
#!/usr/bin/env python3 from __future__ import annotations import asyncio from random import shuffle import cv2 import mil_tools import numpy as np import tf.transformations as trns from nav_msgs.msg import OccupancyGrid from . import pose_editor from .navigator import NaviGatorMission WEST = trns.quaternion_matrix(...
13,462
clone
"""Support non-bonded interactions between sites.""" import warnings from typing import Optional, Set import unyt as u from gmso.core.parametric_potential import ParametricPotential from gmso.utils._constants import UNIT_WARNING_STRING from gmso.utils.expression import PotentialExpression from gmso.utils.misc import ...
13,463
write
# Copyright (c) 2018, 2022-2023 by Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This prog...
13,464
test step
# coding=utf-8 # Copyright 2020 The TF-Agents 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 la...
13,465
test raises on revert
#!/usr/bin/python3 import pytest from brownie import compile_source from brownie.exceptions import VirtualMachineError from brownie.network.contract import ProjectContract from brownie.network.transaction import TransactionReceipt def test_returns_contract_on_success(BrownieTester, accounts): """returns a Contr...
13,466
test scan test
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Unit tests for Amazon DynamoDB TryDax code example. """ import importlib import boto3 from boto3.dynamodb.conditions import Key # import_module is needed because the file names are not valid Python identif...
13,467
test handle chinese chars
import pickle import pytest from tokenizers import NormalizedString, Tokenizer from tokenizers.models import BPE from tokenizers.normalizers import BertNormalizer, Lowercase, Normalizer, Sequence, Strip, Prepend class TestBertNormalizer: def test_instantiate(self): assert isinstance(BertNormalizer(), No...
13,468
test config list setitem
import os from tempfile import NamedTemporaryFile from unittest.mock import call, Mock from django.test import SimpleTestCase from zentral.conf.config import ConfigDict, ConfigList from zentral.conf import ZentralSettings class ConfTestCase(SimpleTestCase): def test_config_dict_eq_different_type(self): se...
13,469
num param
import numpy as np __all__ = ["PointSourceParam"] from lenstronomy.Sampling.param_group import ModelParamGroup, SingleParam, ArrayParam class SourcePositionParam(SingleParam): """Source position parameter, ra_source and dec_source.""" param_names = ["ra_source", "dec_source"] _kwargs_lower = {"ra_sourc...
13,470
configure
from __future__ import annotations import asyncio import json import logging from dataclasses import dataclass from typing import Any from urllib import parse as urllib_parse from uuid import uuid4 from sanic import Blueprint, Sanic, request, response from sanic.config import Config from sanic.server.websockets.conne...
13,471
pyproject toml
""" Templates for all files of a project's scaffold All template files (`*.template`) within this subpackage are licensed under the BSD 0-Clause license. """ import os import string import sys from types import ModuleType from types import SimpleNamespace as Object from typing import Any, Dict, Set, Union, cast from...
13,472
test parser should skip heartbeat frames
# SPDX-FileCopyrightText: Red Hat, Inc. # SPDX-License-Identifier: GPL-2.0-or-later from __future__ import absolute_import import pytest from yajsonrpc.stomp import Command, Frame, Parser def test_empty_parser(): parser = Parser() assert parser.pending == 0 assert parser.pop_frame() is None @pytest.m...
13,473
count num servers
# 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...
13,474
aeroo report
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import api, models, fields, _ class Parser(models.AbstractMod...
13,475
getready
# # See top-level LICENSE.rst file for Copyright information # # -*- coding: utf-8 -*- """ desispec.pipeline.tasks.fiberflatnight ====================================== """ from __future__ import absolute_import, division, print_function from collections import OrderedDict from ..defs import (task_name_sep, task_st...
13,476
default port
from __future__ import annotations import re import urllib.parse from collections.abc import Sequence from typing import AnyStr from mitmproxy.net import check from mitmproxy.net.check import is_valid_host from mitmproxy.net.check import is_valid_port from mitmproxy.utils.strutils import always_str # This regex extr...
13,477
support
# 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...
13,478
test with authorization
from unittest.mock import patch import pytest import responses from sentry.services.hybrid_cloud.usersocialauth.serial import serialize_usersocialauth from sentry.shared_integrations.exceptions import ( ApiError, ApiHostError, ApiUnauthorized, UnsupportedResponseType, ) from sentry.shared_integrations...
13,479
test lineage table from name
# Copyright 2021-2023 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import json from vdk.plugin.trino.lineage_utils import _get_input_tables_from_explain from vdk.plugin.trino.lineage_utils import _get_lineage_table_from_plan from vdk.plugin.trino.lineage_utils import _lineage_table_from_name from vdk.plugin.trin...
13,480
body
import datetime import socket import ssl import sys from _typeshed import Unused from builtins import list as _list # conflicts with a method named "list" from collections.abc import Iterable from typing import IO, Any, NamedTuple from typing_extensions import Literal, Self, TypeAlias __all__ = [ "NNTP", "NNT...
13,481
account 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 __all__ ...
13,482
delete item
""" This is an advanced Piccolo feature which allows runtime reflection of database tables. """ import asyncio import typing as t from dataclasses import dataclass from piccolo.apps.schema.commands.generate import get_output_schema from piccolo.table import Table class Immutable(object): def _immutable(self, *a...
13,483
target branch candidates
#!/usr/bin/env python # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 # internal use only # called by CI jobs when it uses a project related to IDF import argparse import json import os import re import subprocess from typing import List, Tuple IDF_GIT_DESCRIB...
13,484
service buffer has identifier
# automatically generated by the FlatBuffers compiler, do not modify # namespace: reflection import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class Service(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(f...
13,485
pre operations
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
13,486
test pixel
import json import os from unittest import TestCase import large_image_source_mapnik import large_image from .datastore import datastore from .source_geo_base import _BaseGeoTests class InvalidMapnikTests: # TODO: fix syling on Mapnik source to match GDAL and delete this test def testTileLinearStyleFromGe...
13,487
test neg 128
import itertools import contextlib import operator import pytest import numpy as np import numpy.core._multiarray_tests as mt from numpy.testing import assert_raises, assert_equal INT64_MAX = np.iinfo(np.int64).max INT64_MIN = np.iinfo(np.int64).min INT64_MID = 2**32 # int128 is not two's complement, the sign bit ...
13,488
build list request
# 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...
13,489
test conv2d radial constraint
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
13,490
loop constraint loss
import numpy as np import torch import torch.nn.functional as F import random import math import time import diffdart as dart from diffdart import DartTorchLossFn, DartTorchTrajectoryRollout def main(): world = dart.simulation.World() world.setGravity([0, -9.81, 0]) # Set up the 2D cartpole walker = dart.dy...
13,491
create temporary credential
import logging from werkzeug.utils import import_string from flask import Response from flask import request as flask_req from authlib.oauth1 import ( OAuth1Request, AuthorizationServer as _AuthorizationServer, ) from authlib.common.security import generate_token from authlib.common.urls import url_encode log ...
13,492
set up
"""Tests for distutils.core.""" import io import distutils.core import os import shutil import sys from test.support import captured_stdout, run_unittest from test.support import os_helper import unittest from distutils.tests import support from distutils import log # setup script that uses __file__ setup_using___fil...
13,493
do download
#!/usr/bin/env python # @HEADER # ************************************************************************ # # TriBITS: Tribal Build, Integrate, and Test System # Copyright 2013 Sandia Corporation # # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Govern...
13,494
test transform datetime
import queue from datetime import datetime, timedelta from typing import Any, Callable from unittest import mock import pytest from clickhouse_driver import errors from dateutil.tz import tz from snuba import state from snuba.clickhouse.errors import ClickhouseError from snuba.clickhouse.native import ClickhousePool,...
13,495
list serve
""" 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 use...
13,496
execute
#!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkmeshtonumpy.py,v $ ## Language: Python ## Date: FEB 23, 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; wi...
13,497
test edge switching inplace
#!/usr/bin/env python3 import unittest import sys from copy import copy import networkit as nk def check_graphs(G1, G2): assert(G1.numberOfNodes() == G2.numberOfNodes()) assert(G1.numberOfEdges() == G2.numberOfEdges()) failed = False for i in range(G1.numberOfNodes()): if (G1.degree(i) != G2.d...
13,498
test to cloudformation with dlq generated with
from unittest import TestCase from parameterized import parameterized from samtranslator.model.eventsources.push import Schedule from samtranslator.model.exceptions import InvalidEventException from samtranslator.model.lambda_ import LambdaFunction class ScheduleEventSource(TestCase): def setUp(self): se...
13,499
t number
# Minimal ethereum type signature parser. # This parses the signature and types used to calculate the function hash import warnings from ..exceptions import EthereumError import ply.yacc as yacc # Lexer # ------------------------------------------------------------ import ply.lex as lex import re # List of token name...