id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,200
generate ping endpoints
from lnst.Common.Parameters import ( Param, IntParam, StrParam, IPv4NetworkParam, IPv6NetworkParam, ) from lnst.Common.IpAddress import interface_addresses from lnst.Controller import HostReq, DeviceReq, RecipeParam from lnst.Recipes.ENRT.BaremetalEnrtRecipe import BaremetalEnrtRecipe from lnst.Reci...
16,201
test non utf8 encodings
import os from unittest import mock from pkgcheck import addons from pkgcheck.checks import repo from pkgcore.ebuild import atom from pkgcore.test.misc import FakeRepo from snakeoil.cli import arghparse from snakeoil.fileutils import touch from snakeoil.osutils import ensure_dirs, pjoin from .. import misc class Te...
16,202
encode description
#!/usr/bin/env python # Copyright 1996-2022 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
16,203
test on real audio
# Copyright The Lightning 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 by applicable law or agreed to in writin...
16,204
get tenant
import mlflow import hashlib import numpy as np from decouple import config from utils import pg_client from utils.df_utils import _process_pg_response from time import time host = config('pg_host_ml') port = config('pg_port_ml') user = config('pg_user_ml') dbname = config('pg_dbname_ml') password = config('pg_passwor...
16,205
diverging color
import os import math import numpy as np # reference: https://www.kennethmoreland.com/color-maps/ColorMapsExpanded.pdf # RGB to XYZ matrix # 0.4124 | 0.2126 | 0.0193 # 0.3576 | 0.7152 | 0.1192 # 0.1805 | 0.0722 | 0.9505 # Inverse # 3.24063 | -0.968931 | 0.0557101 # -1.53721 | 1.87576 | -0.204021 # -0.498629 ...
16,206
set up
# # Copyright (C) 2013-2022 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
16,207
finalize options
"""distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" # XXX this module has *lots* of code ripped-off quite transparently from # build_ext.py -- not surprisingly really, as the work req...
16,208
cut segment
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE import numpy as np from math impor...
16,209
test hrv time
import numpy as np import pandas as pd import pytest import neurokit2 as nk from neurokit2 import misc def METHOD_NAME(): ecg_slow = nk.ecg_simulate(duration=60, sampling_rate=1000, heart_rate=60, random_state=42) ecg_fast = nk.ecg_simulate(duration=60, sampling_rate=1000, heart_rate=150, random_state=42) ...
16,210
set up
import json from datetime import datetime from typing import TYPE_CHECKING, Any, Final, Optional, Union, cast, overload from django.db.models.query import QuerySet import factory from django.db import models from django.http.response import HttpResponse from graphene.utils.str_converters import to_snake_case from grap...
16,211
test inference steps
import torch from diffusers import DDIMScheduler from .test_schedulers import SchedulerCommonTest class DDIMSchedulerTest(SchedulerCommonTest): scheduler_classes = (DDIMScheduler,) forward_default_kwargs = (("eta", 0.0), ("num_inference_steps", 50)) def get_scheduler_config(self, **kwargs): con...
16,212
cur
import random from urllib.parse import urlparse from visidata import VisiData, vd, Sheet, options, anytype, asyncthread, ColumnItem __all__ = ['openurl_postgres', 'openurl_postgresql', 'openurl_rds', 'PgTable', 'PgTablesSheet'] vd.option('postgres_schema', 'public', 'The desired schema for the Postgres database') d...
16,213
print section heading
#!/usr/bin/python3 # # SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2022 Xilinx, Inc # import sys import math # ---------------------------------------------------------------------------- # VT100 ASCII Constants ESC = '\x1b' # Escape character CSI = ESC + '[' # Control Sequence Introducer ...
16,214
to json
import base64 import copy import json from io import BytesIO import grpc import fedn.common.net.grpc.fedn_pb2 as fedn import fedn.common.net.grpc.fedn_pb2_grpc as rpc class CombinerUnavailableError(Exception): pass class Channel: """ """ def __init__(self, address, port, certificate): se...
16,215
afd rd wrapper
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Compute the mean Apparent Fiber Density (AFD) and mean Radial fODF (radfODF) maps along a bundle. This is the "real" fixel-based fODF amplitude along every streamline of the bundle provided, averaged at every voxel. Please use a bundle file rather than a whole tract...
16,216
stop
from rclpy.node import Node import threading from math import asin, atan2, pi import nav_msgs.msg def quat2Yaw(qw, qx, qy, qz): ''' Translates from Quaternion to Yaw. @param qw,qx,qy,qz: Quaternion values @type qw,qx,qy,qz: float @return Yaw value translated from Quaternion ''' rotateZ...
16,217
run qnn func
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
16,218
update interval
""" An example of how to use Chaco to render a visual TraitsUI editor. This particular editor allows the user to set two endpoints of an interval. """ from traits.api import HasTraits from traits.etsconfig.api import ETSConfig if ETSConfig.toolkit == "wx": from traitsui.wx.editor import Editor else: from trai...
16,219
test connection dialog remembers input with ssh
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright © Spyder Project Contributors # # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) # ----------------------------------------------------------------------------- """Tes...
16,220
element size
from typing import Iterator, List, Optional, Tuple import torch import torch.nn.functional as F from colossalai.legacy.nn._ops._utils import dual_all_to_all from colossalai.tensor import ColoParameter, ColoTensor, ColoTensorSpec, ComputePattern, ProcessGroup, ShardSpec from .cache_mgr import CachedParamMgr, Eviction...
16,221
test as pep440 requirement archive
import os from functools import partial from pathlib import Path from unittest import mock from pip._internal.models.direct_url import ArchiveInfo, DirectUrl, DirInfo, VcsInfo from pip._internal.models.link import Link from pip._internal.utils.direct_url_helpers import ( direct_url_as_pep440_direct_reference, ...
16,222
load settings
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
16,223
load cube
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Mesh data loading benchmark tests. Where possible benchmarks should be parameterised for two sizes of input data: * mini...
16,224
main
#!/usr/bin/env python3 """Pymodbus Synchronous Client Example. An example of a single threaded synchronous client. usage:: client_sync.py [-h] [-c {tcp,udp,serial,tls}] [-f {ascii,binary,rtu,socket,tls}] [-l {critical,error,warning,info,debug}] [-p PORT] ...
16,225
address family
# 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,226
connect
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license import socket import struct import time from typing import Any, Optional import aioquic.quic.configuration # type: ignore import aioquic.quic.connection # type: ignore import dns.inet QUIC_MAX_DATAGRAM = 2048 class UnexpectedEOF(Excepti...
16,227
test simple if else
from typing import List import astroid from python_ta.cfg import CFGVisitor, ControlFlowGraph def build_cfg(src: str) -> ControlFlowGraph: mod = astroid.parse(src) t = CFGVisitor() mod.accept(t) return t.cfgs[mod] def build_cfg_separate_conditions(src: str) -> ControlFlowGraph: """Build a CFG...
16,228
cog unload
""" MIT License Copyright (c) 2020-present phenom4n4n 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, pub...
16,229
test errors are propagated
#!/usr/bin/env python # 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://aws.amazon.com/apache2.0/ # # or in ...
16,230
export sources
from conan import ConanFile from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rmdir, apply_conandata_patches, replace_in_file, export_conandata_patches from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft impo...
16,231
eval integral
# This code is part of a Qiskit project. # # (C) Copyright IBM 2021, 2023. # # 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 ...
16,232
test parameterized indent
import pytest from dagster._check import CheckError from dagster._utils.indenting_printer import IndentingPrinter, IndentingStringIoPrinter LOREM_IPSUM = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut " "labore et dolore magna aliqua. Ut enim ad minim veniam, qu...
16,233
create counter component
#!/usr/bin/env python3 import logging import re from typing import Union, List from helpermodules.cli import run_using_positional_cli_args from modules.common import req from modules.common.abstract_device import DeviceDescriptor from modules.common.configurable_device import ConfigurableDevice, ComponentFactoryByType...
16,234
spatial map
from __future__ import annotations from abc import ABC, abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar, Iterable, NamedTuple from ._spatial_map import SpatialMap from .geometry import Offset, Region, Size, Spacing if TYPE_CHECKING: from typing_extensions import TypeAl...
16,235
file repository
import io import re from copy import copy import pytest from tests.monkey_island import InMemoryFileRepository, SingleFileRepository from monkey_island.cc import repositories from monkey_island.cc.repositories import FileRepositoryCachingDecorator @pytest.fixture def METHOD_NAME(): return FileRepositoryCachingD...
16,236
get office irm data connector
# 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,237
test04 sample all
import pytest import drjit as dr import mitsuba as mi def test01_create(variant_scalar_rgb): bsdf = mi.load_dict({ 'type': 'blendbsdf', 'nested1': { 'type' : 'diffuse' }, 'nested2': { 'type' : 'diffuse' }, 'weight': 0.2, }) assert bsdf is not None assert bsdf.component_...
16,238
feature
from testflows.core import * from testflows.asserts import error from rbac.requirements import * from rbac.helper.common import * import rbac.helper.errors as errors @TestSuite def privileges_granted_directly(self, node=None): """Check that a user is able to execute `DROP QUOTA` with privileges are granted direct...
16,239
test record input simple zlib
# 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...
16,240
port start
# sfputil.py # # Platform-specific SFP transceiver interface for SONiC # try: import time from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) class SfpUtil(SfpUtilBase): """Platform-specific SfpUtil class""" PORT_STA...
16,241
format ms
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
16,242
test single quote
import ast import re import struct from decimal import Decimal from pprint import pprint import pytest from celery.utils.saferepr import saferepr D_NUMBERS = { b'integer': 1, b'float': 1.3, b'decimal': Decimal('1.3'), b'long': 4, b'complex': complex(13.3), } D_INT_KEYS = {v: k for k, v in D_NUMBE...
16,243
test normalize and validate
import pytest from .._headers import * def METHOD_NAME(): assert normalize_and_validate([("foo", "bar")]) == [(b"foo", b"bar")] assert normalize_and_validate([(b"foo", b"bar")]) == [(b"foo", b"bar")] # no leading/trailing whitespace in names with pytest.raises(LocalProtocolError): normalize_...
16,244
test logratiomean default
import unittest import numpy as np import pyrolite.comp from pyrolite.geochem.ind import REE from pyrolite.util.synthetic import normal_frame np.random.seed(81) class TestPyroComp(unittest.TestCase): def setUp(self): self.cols = ["MgO", "SiO2", "CaO"] # can run into interesting singular matrix...
16,245
plot
# GridCal # Copyright (C) 2022 Santiago Peñate Vera # # This program 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 # version 3 of the License, or (at your option) any later version. # # This ...
16,246
add theater unit mapping
"""Maps generated units back to their Liberation types.""" from __future__ import annotations import itertools import math from dataclasses import dataclass from typing import Dict, Optional, Any, TYPE_CHECKING from dcs.triggers import TriggerZone from dcs.unit import Unit from dcs.unitgroup import FlyingGroup, Vehic...
16,247
test delete
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
16,248
put valid
# 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...
16,249
filter invalid value
import blackboxprotobuf import json import sqlite3 import time from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly is_windows = is_platform_windows() slash = '\\' if is_windows else '/' def recursive_convert_bytes_t...
16,250
convert scalar
from __future__ import annotations from typing import TYPE_CHECKING, Generic, TypeVar if TYPE_CHECKING: from ibis.expr.datatypes import DataType from ibis.expr.schema import Schema C = TypeVar("C") T = TypeVar("T") S = TypeVar("S") class TypeMapper(Generic[T]): # `T` is the format-specific type object,...
16,251
cls pdf
# -*- coding: utf-8 -*- # File generated from our OpenAPI spec from __future__ import absolute_import, division, print_function import stripe from stripe import api_requestor from stripe import util from stripe.api_resources.abstract import CreateableAPIResource from stripe.api_resources.abstract import ListableAPIRes...
16,252
metric resource id
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
16,253
generate health error alert
"""Module to test ceph health alerts""" import traceback from json import loads from time import sleep from ceph.ceph_admin import CephAdmin from utility.log import Log log = Log(__name__) def execute_commands(node, commands): for cmd in commands: out, err = node.exec_command(sudo=True, cmd=cmd) ...
16,254
test global sparsity mask creator
# Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b...
16,255
after process document
"""Block class represents the basic Udapi processing unit.""" import logging import inspect def not_overridden(method): method.is_not_overridden = True return method class Block(object): """The smallest processing unit for processing Universal Dependencies data. Parameters: zones: which zone to proce...
16,256
showtip
"""A CallTip window class for Tkinter/IDLE. After ToolTip.py, which uses ideas gleaned from PySol Used by the CallTips IDLE extension. """ from Tkinter import * HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>" HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>") CHECKHIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-checkhide...
16,257
episode is success
# 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 applicable law or agree...
16,258
test ogr builder exceptions
"""Tests for geometry objects.""" import pytest from fiona._geometry import GeomBuilder, geometryRT from fiona.errors import UnsupportedGeometryTypeError from fiona.model import Geometry def geometry_wkb(wkb): try: wkb = bytes.fromhex(wkb) except AttributeError: wkb = wkb.decode("hex") r...
16,259
test push left
from mpfmc.tests.MpfMcTestCase import MpfMcTestCase from mpfmc.transitions.push import PushTransition from kivy.uix.screenmanager import WipeTransition, NoTransition class TestTransitions(MpfMcTestCase): def get_machine_path(self): return 'tests/machine_files/transitions' def get_config_file(self): ...
16,260
test selective readonly buffer
import ctypes import io import struct import pytest import env from pybind11_tests import ConstructorStats from pybind11_tests import buffers as m np = pytest.importorskip("numpy") def test_from_python(): with pytest.raises(RuntimeError) as excinfo: m.Matrix(np.array([1, 2, 3])) # trying to assign a 1...
16,261
alias filtering func
""" This script samples triples to use and constructs sentences from templates. 1. Subsample 1k triples per relation. 2. Get names of QIDs for each and construct sentences. """ import argparse from collections import defaultdict import numpy as np from tqdm import tqdm from pathlib import Path from utils import jsonl...
16,262
test activate alternate casing
import json from django.http.response import HttpResponseBadRequest from django.http.response import HttpResponseForbidden from django.http.response import HttpResponseRedirectBase from mock import mock from contentcuration.tests import testdata from contentcuration.tests.base import StudioAPITestCase from contentcur...
16,263
test can handle lists with strings that
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
16,264
run checks
from collections import namedtuple from compare_locales.checks import getChecker from compare_locales.keyedtuple import KeyedTuple from compare_locales.parser.android import AndroidParser from compare_locales.parser.base import Junk from compare_locales.parser.dtd import DTDEntityMixin from compare_locales.parser.flue...
16,265
get subscriber state
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
16,266
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 # --------------------------------...
16,267
instance namespace
# This file is autogenerated. # To change this file you should edit assets/configuration/spec.yaml and then run the following commands: # ddev -x validate config -s <INTEGRATION_NAME> # ddev -x validate models -s <INTEGRATION_NAME> from datadog_checks.base.utils.models.fields import get_default_field_value d...
16,268
recursive diff analyzer
from abc import ABC, abstractmethod from logging import debug from typing import Callable, Union import requests from cli_ui import debug as verbose from gitlabform.gitlab import GitLab from gitlabform.output import EffectiveConfigurationFile from gitlabform.processors.util.decorators import configuration_to_safe_dic...
16,269
mock storage backend add
# Copyright 2020 ACSONE SA/NV (<http://acsone.eu>) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). import base64 import functools import mock from odoo.addons.edi_oca.tests.common import EDIBackendCommonComponentTestCase STORAGE_BACKEND_MOCK_PATH = ( "odoo.addons.storage_backend.models.stora...
16,270
test remove
import os import time import pytest import requests from common import httputil as hu def get_project(host, port, name): url = '{api}/project/{project}' res = requests.get(url=url.format(api=hu.url(host, port), project=name), headers=hu.header()) return res class TestProject: ...
16,271
on 204
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
16,272
test round trip
import contextlib import unittest from websockets.datastructures import Headers from websockets.exceptions import ( InvalidHandshake, InvalidHeader, InvalidHeaderValue, InvalidUpgrade, ) from websockets.legacy.handshake import * from websockets.utils import accept_key class HandshakeTests(unittest.Te...
16,273
test project scaffold command with runtime manifest
import importlib import os import shutil import subprocess import sys from pathlib import Path from typing import TYPE_CHECKING import pytest from dagster_dbt.cli.app import app from typer.testing import CliRunner if TYPE_CHECKING: from dagster import Definitions pytest.importorskip("dbt.version", minversion="1....
16,274
setup test source trees
# -*- coding: utf-8 -*- import codecs import io import logging import os import re import shutil import sys import tempfile import unittest from lib2to3 import main TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data") PY2_TEST_MODULE = os.path.join(TEST_DATA_DIR, "py2_test_grammar.py") class TestMain(un...
16,275
test not self in script child or
import os from django.conf import settings from django.test.utils import override_settings from olympia.amo.tests import TestCase from olympia.lib import settings_base as base_settings def test_default_settings_no_report_only(): assert settings.CSP_REPORT_ONLY is False @override_settings(CSP_REPORT_ONLY=False...
16,276
test nvprof
# Copyright 2021-2022 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
16,277
test refresh postcodes
# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for command line interface wrapper for refresk command. """ import pytest import nominatim.tools.refre...
16,278
settings build
from conans import ConanFile, tools, AutoToolsBuildEnvironment, MSBuild from conans.errors import ConanInvalidConfiguration import os import shutil required_conan_version = ">=1.33.0" class LibId3TagConan(ConanFile): name = "libid3tag" description = "ID3 tag manipulation library." topics = ("conan", "mad...
16,279
package id
import os import sys from conan import ConanFile, conan_version # FIXME: linter complains, but function is there # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd # from conan.tools.build import stdcpp_library, check_min_cppstd, check_max_cppstd from c...
16,280
normalize
import datetime import math from pony import orm from pony.orm import db_session from tribler.core.components.metadata_store.db.orm_bindings.channel_node import LEGACY_ENTRY def define_binding(db): # ACHTUNG! This thing should be used as a singleton, i.e. there should be only a single row there! # We store ...
16,281
quadkey
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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,282
test set dtype
# 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,283
compile
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # # Copyright (C) 2006 Red Hat # see file 'COPYING' for use and warranty information # # 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; v...
16,284
all fields
import re import string from typing import List ALLOWED_CHARACTERS = string.ascii_letters + "_0123456789" class FieldEditor: """Allows user to edit the project data tables The field editor is used for two different purposes: * Managing data tables (adding and removing fields) * Editing the tables' ...
16,285
sag pool
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
16,286
grow
# Represents all kernels used by an Executorch model. # It maintains a Dict[OperatorName, Dict[ETKernelKey, BackendMetadata]] structure. import itertools from collections import defaultdict, namedtuple from dataclasses import dataclass from enum import IntEnum from typing import Dict, List, Tuple, Union from torchgen...
16,287
merge path params
# -*- 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,288
track
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019-2020 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
16,289
get installer url
import platform import json import argparse import urllib import urllib.request from subprocess import check_call, CalledProcessError import sys import os import zipfile import tarfile import time from packaging.version import Version, InvalidVersion # SOURCE OF THIS FILE: https://github.com/actions/python-versions #...
16,290
test create thumbnails command
import os from builtins import open from django.core.files.base import File from django.core.files.storage import default_storage from django.core.management import call_command from django.db.utils import DataError from django.utils import timezone from onadata.apps.main.tests.test_base import TestBase from onadata....
16,291
indices
# coding: utf-8 # # Copyright 2018 Yaman Güçlü import numpy as np from psydac.core.bsplines import elements_spans from psydac.core.bsplines import quadrature_grid from psydac.core.bsplines import basis_ders_on_quad_grid from psydac.core.bsplines import elevate_knots from psydac.utiliti...
16,292
close
# 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,293
check asdu 51
# Copyright (C) 2017 Patrick Reichenberger (University of Passau) <patrick.reichenberger@t-online.de> # # 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...
16,294
runctx
import sys from _typeshed import ExcInfo, TraceFunction from collections.abc import Callable, Iterable, Mapping from types import CodeType, FrameType, TracebackType from typing import IO, Any, SupportsInt, TypeVar from typing_extensions import Literal, ParamSpec __all__ = ["BdbQuit", "Bdb", "Breakpoint"] _T = TypeVar...
16,295
get authorization provider 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,296
set up
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
16,297
splay
# Path: Python\Trees\splay_tree.py # Python program to implement Splay Tree. # A splay tree is a self-adjusting binary search tree # where recently accessed nodes are moved to the root for # from colorama import Fore, Style class Node: def __init__(self, key): self.key = key self.left = None ...
16,298
create container from config
"""This type stub file was generated by pyright.""" # pylint: disable=C,E,W,R from __future__ import annotations from docker import utils class ContainerApiMixin: @utils.check_resource("container") def attach( self, container, stdout=..., stderr=..., stream=..., logs=..., demux=... ): ... @uti...
16,299
post forward
from abc import ABC, abstractmethod from contextlib import contextmanager from typing import Any, List, Tuple import torch from torch.utils._pytree import TreeSpec, tree_flatten, tree_unflatten class ColoParamOpHook(ABC): """ Hook which is triggered by each operation when operands contain ColoParameter. ...