id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
14,200
fuse op
# 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...
14,201
run thread
# Copyright 2019 Xilinx Inc. # # 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, ...
14,202
test delete workspace without permissions
# 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 by applicable la...
14,203
get tokens embeddings
import logging from typing import Any, Optional, Text, List, Dict, Tuple, Type import numpy as np import openai from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.constants import ( DENSE_FEATURIZABLE_ATTRIBUTES, SEQUENCE_FEATURES, SENTENCE_FEATURES, FEATURIZER_CLASS_ALIAS, TOKENS_NAMES )...
14,204
assert ok
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
14,205
test effective chat
#!/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 #...
14,206
detector send to queues
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from json import loads from unittest import mock from preggy import...
14,207
get namespace
import yaml import os ALLVALUES_PATH = os.getenv("CH_VALUES_PATH", '/opt/cloudharness/resources/allvalues.yaml') class ConfigObject(object): def __init__(self, dictionary: dict): self.conf = dictionary for key, val in dictionary.items(): if isinstance(val, (list, tuple)): ...
14,208
test prediction proba unify
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import os import sys import unittest from os import path # noinspection PyProtectedMember from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from num...
14,209
add to list
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
14,210
get current user
""" Support for converting a django user to an XBlock user """ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from opaque_keys.edx.keys import CourseKey from xblock.reference.user_service import UserService, XBlockUser from openedx.core.djangoapps.external_user_ids.mo...
14,211
test lookup fails when cannot reconcile requested
"""Tests of the builder registry.""" import pytest import warnings from bs4 import BeautifulSoup from bs4.builder import ( builder_registry as registry, HTMLParserTreeBuilder, TreeBuilderRegistry, ) try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError: HTML...
14,212
test default include not array
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import pytest from datadog_checks.base import ConfigurationError pytestmark = [pytest.mark.unit] class TestParseConfig: def test_components_not_mapping(self, sonarqube_check): check = sonar...
14,213
backend class
"""email stage models""" from os import R_OK, access from pathlib import Path from typing import Type from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.backends.smtp import EmailBackend from django.db import models from django.utils.translation import ge...
14,214
test execute
""" Test class for JobWrapper """ import os import shutil import pytest from unittest.mock import MagicMock from DIRAC import gLogger from DIRAC.DataManagementSystem.Client.test.mock_DM import dm_mock from DIRAC.Resources.Catalog.test.mock_FC import fc_mock from DIRAC.WorkloadManagementSystem.JobWrapper.JobWrapper i...
14,215
expected sync streams
import os import tap_tester.connections as connections import tap_tester.menagerie as menagerie import tap_tester.runner as runner from functools import reduce # TODO fix setup.py? so zenpy module is availalble on dev_vm without manually running pip install from zenpy import Zenpy from zenpy.lib.api_objects imp...
14,216
test get biz inst topology
# -*- 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...
14,217
get snapshot ids
# 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...
14,218
test scaled float from floats
import pytest import numpy as np from numpy.testing import assert_array_equal from numpy.core._multiarray_umath import ( _discover_array_parameters as discover_array_params, _get_sfloat_dtype) SF = _get_sfloat_dtype() class TestSFloat: def _get_array(self, scaling, aligned=True): if not aligned: ...
14,219
percentage error
import numpy as np from sklearn.metrics import make_scorer, mean_squared_error, mean_squared_log_error, mean_absolute_error from sklearn.metrics._scorer import _SCORERS EPSILON = 1e-10 def _error(actual: np.ndarray, predicted: np.ndarray): """ Simple error """ return actual - predicted def METHOD_NAME(actua...
14,220
initialize test module single instance
# -*- coding: utf-8 -*- from sst_unittest import * from sst_unittest_support import * module_init = 0 module_sema = threading.Semaphore() ################################################################################ # Code to support a single instance module initialize, must be called setUp method def METHOD_NAM...
14,221
simulate
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. # # Licensed to Elasticsearch B.V. under...
14,222
sigmoid
# Copyright (c) Alibaba, Inc. and its affiliates. from typing import Any, Dict, Optional, Union import numpy as np import torch from modelscope.metainfo import Pipelines from modelscope.models import Model from modelscope.outputs import OutputKeys from modelscope.pipelines.base import Pipeline from modelscope.pipeli...
14,223
as tuple
import sys from _typeshed import StrOrBytesPath from collections.abc import Callable, Hashable, Iterable, Sequence from configparser import RawConfigParser from re import Pattern from threading import Thread from typing import IO, Any, overload from typing_extensions import Literal, SupportsIndex, TypeAlias, TypedDict ...
14,224
classify mol type for nexus
# Copyright 2008-2010, 2012-2014, 2016-2017 by Peter Cock. 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. "...
14,225
main
#! /usr/bin/env python # ------------------------------------------------------------------------------ # Script which flags a study within the triage portal for deployment into # production portal. # ------------------------------------------------------------------------------ # ----------------------------------...
14,226
scrub data
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # 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 ...
14,227
extract task features
""" A collection of helper utility functions for working with instructor tasks. """ import json import logging from django.utils.translation import gettext as _ from django.utils.translation import ngettext from common.djangoapps.util.date_utils import get_default_time_display from lms.djangoapps.bulk_email.models ...
14,228
evaluate
from collections import OrderedDict from typing import Optional import pycparser.plyparser from angr import sim_type from PySide6.QtCore import Qt from PySide6.QtWidgets import QDialog, QDialogButtonBox, QLineEdit, QMessageBox, QPushButton, QVBoxLayout from angrmanagement.config import Conf from .set_comment import ...
14,229
stop
#!/usr/bin/env python3 from http.server import ThreadingHTTPServer as Server from http.server import BaseHTTPRequestHandler as BaseHandler bootstrapFromURL = True try: import requests except ImportError: bootstrapFromURL = False import ctypes from ctypes.util import find_library import selectors import soc...
14,230
test zcount
import pytest def METHOD_NAME(judge_command): judge_command( "zcount foo -10 0", {"command": "zcount", "key": "foo", "min": "-10", "max": "0"}, ) def test_bzpopmax(judge_command): judge_command( "bzpopmax set set2 set3 4", {"command": "bzpopmax", "keys": "set set2 set3", ...
14,231
test display database
###################################################################################################################### # Copyright (C) 2017-2022 Spine project consortium # This file is part of Spine Toolbox. # Spine Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Gen...
14,232
test construct spark dbfs datasource
from __future__ import annotations import logging import os import pathlib import re from typing import TYPE_CHECKING, cast import boto3 import botocore import pytest from great_expectations.core.util import DBFSPath from great_expectations.datasource.fluent import SparkDBFSDatasource from great_expectations.datasou...
14,233
test actual
import unittest import Tkinter as tkinter import tkFont as font from test.test_support import requires, run_unittest, gc_collect from test_ttk.support import AbstractTkTest requires('gui') fontname = "TkDefaultFont" class FontTest(AbstractTkTest, unittest.TestCase): @classmethod def setUpClass(cls): ...
14,234
test require flag check
import unittest import pytest import numpy import cupy from cupy import testing class TestKind(unittest.TestCase): @testing.for_orders('CFAK') @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() def test_asarray_chkfinite(self, xp, dtype, order): a = [0, 4, 0, 5] return xp.a...
14,235
getpwnam r
# # Module for simulation of utility "getent passwd -s sss" from coreutils # # Copyright (c) 2016 Red Hat, Inc. # # 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,...
14,236
init properties
# *************************************************************************** # * * # * Copyright (c) 2013-2015 - Juergen Riegel <FreeCAD@juergen-riegel.net> * # * Copyright (c) 2017-2018 Oliver Oxtoby (CSIR) <ooxtoby@csir.co.za> * # * Co...
14,237
log l
from lenstronomy.LensModel.lens_model_extensions import LensModelExtensions import numpy as np __all__ = ["FluxRatioLikelihood"] class FluxRatioLikelihood(object): """Likelihood class for magnification of multiply lensed images.""" def __init__( self, lens_model_class, flux_ratios, ...
14,238
test require
"""Test Allocation action""" # pylint: disable=missing-function-docstring, missing-class-docstring, invalid-name, line-too-long import os from . import CuratorTestCase from . import testvars HOST = os.environ.get('TEST_ES_SERVER', 'http://127.0.0.1:9200') TIEREDROUTING = {'allocation': {'include': {'_tier_preference'...
14,239
test op tags
import re import pytest from dagster import ( DagsterInvalidConfigDefinitionError, DagsterInvalidDefinitionError, DependencyDefinition, Field, GraphDefinition, In, OpDefinition, Out, ResourceDefinition, op, ) from dagster._check import ParameterCheckError from dagster._core.util...
14,240
get model size
import gc import os import os.path as osp import random import subprocess as sp import sys import warnings from collections.abc import Mapping, Sequence from typing import Any, Tuple import torch from torch import Tensor from torch_geometric.data.data import BaseData from torch_geometric.typing import SparseTensor ...
14,241
read
import asyncio import pickle import numpy as np import pytest import ucp cudf = pytest.importorskip("cudf") distributed = pytest.importorskip("distributed") cuda = pytest.importorskip("numba.cuda") @pytest.mark.asyncio @pytest.mark.parametrize( "g", [ lambda cudf: cudf.Series([1, 2, 3]), la...
14,242
build module
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import re from spack.package import * class Opencascade(CMakePackage): """Open CASCADE Technology is a software dev...
14,243
test cpy2d
#!/usr/bin/env python # /*########################################################################## # # Copyright (c) 2016-2022 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
14,244
test conv wave only
import pytest import numpy as np import astropy from astropy import units as u from astropy.nddata import InverseVariance from specutils import Spectrum1D from astropy.utils.introspection import minversion ASTROPY_LT_5_3 = not minversion(astropy, "5.3") # On failure, should not crash; essentially a no-op. @pytest.ma...
14,245
load
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path import traceback import yaml import os import sys import codecs from psychopy.localization import _translate """ The Alerts module is used for generating alerts during PsychoPy integrity checks. Attributes ---------- catalog : AlertCatalog ...
14,246
conv factory
# 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...
14,247
is correct image property outliers result
# ---------------------------------------------------------------------------- # Copyright (C) 2021-2023 Deepchecks (https://www.deepchecks.com) # # This file is part of Deepchecks. # Deepchecks is distributed under the terms of the GNU Affero General # Public License (version 3 or later). # You should have received a ...
14,248
use absolute position
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2023 PyMeasure Developers # # 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...
14,249
as symbol block predictor
# 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...
14,250
login with server docker mode
import os import platform import click from fedml.computing.scheduler.comm_utils import sys_utils from .device_server_constants import ServerConstants from .device_server_runner import FedMLServerRunner def METHOD_NAME(userid, version, docker_rank): account_id = userid # Get os name sys_name = platfor...
14,251
wait for cluster
# 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...
14,252
make config proto
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
14,253
test update agent returns false if does
from uuid import uuid4 import pendulum import pytest from sqlalchemy.exc import IntegrityError from prefect.server import models, schemas @pytest.fixture async def work_queue(session): work_queue = await models.work_queues.create_work_queue( session=session, work_queue=schemas.actions.WorkQueueC...
14,254
has var
import logging from traceback import format_exc from pyaerocom import const from pyaerocom._lowlevel_helpers import BrowseDict, ListOfStrings, StrType from pyaerocom.exceptions import InitialisationError from pyaerocom.metastandards import DataSource logger = logging.getLogger(__name__) class ObsEntry(BrowseDict): ...
14,255
test cov equiv cluster weighted
from itertools import product import numpy as np from numpy.testing import assert_allclose import pandas as pd import pytest from linearmodels.iv import IV2SLS from linearmodels.panel.data import PanelData from linearmodels.panel.model import PooledOLS from linearmodels.tests.panel._utility import ( access_attrib...
14,256
get private endpoint connection
# 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...
14,257
test 0d true condition raises dimension error
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Scipp contributors (https://github.com/scipp) # @file # @author Simon Heybrock import pytest import scipp as sc def make_var(xx=4) -> sc.Variable: return sc.arange('dummy', 12, dtype='int64').fold( dim='dummy', sizes={'xx': xx, 'yy': 3} ) ...
14,258
merge
import io import os import json import logging import sqlalchemy as sa import pandas as pd from glob import glob from tornado.web import HTTPError from gramex.http import BAD_REQUEST import gramex import gramex.data from gramex.config import app_log, variables folder = os.path.dirname(os.path.abspath(__file__)) templa...
14,259
get context data
# -*- coding: utf-8 -*- from django import forms from django.conf.urls import url from django.contrib import messages from django.core.urlresolvers import reverse from django.db import IntegrityError, models, transaction from django.forms import ValidationError from django.http import HttpResponseForbidden, HttpRespons...
14,260
verify
# 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...
14,261
get user from request
import asyncio from typing import Dict, List from django.contrib.auth.models import Group, User from django.utils.decorators import sync_and_async_middleware from rest_framework.authentication import BaseAuthentication from rest_framework.exceptions import ParseError class GatewayUser: def __init__( self...
14,262
test mcol gga ab ks
#!/usr/bin/env python # Copyright 2022 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 # # Unless...
14,263
get logo active
# SPDX-License-Identifier: GPL-2.0-or-later from openrazer_daemon.dbus_services import endpoint def set_led_effect_common(self, zone: str, effect: str) -> None: driver_path = self.get_driver_path(zone + '_led_effect') with open(driver_path, 'w') as driver_file: driver_file.write(effect) @endpoint(...
14,264
open
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
14,265
build requirements
from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain from co...
14,266
handle prop exploding futbol socket
import math import bpy from mathutils import Euler from .abstract_entity_handlers import _srgb2lin from .base_entity_handler import srgb_to_linear from .portal2_entity_classes import * from .portal_entity_handlers import PortalEntityHandler local_entity_lookup_table = PortalEntityHandler.entity_lookup_table.copy() l...
14,267
test query png
# -*- coding: utf-8 -* # Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from astropy import wcs as astropy_wcs from astropy.io import fits from astropy.utils.exceptions import AstropyUserWarning import numpy as np from matplotlib.colors import Colormap from ..core import hips2fits @pyte...
14,268
load workbook
# pyright: reportMissingImports=false from __future__ import annotations from pandas._typing import ( FilePath, ReadBuffer, Scalar, StorageOptions, ) from pandas.compat._optional import import_optional_dependency from pandas.util._decorators import doc from pandas.core.shared_docs import _shared_docs ...
14,269
get meta
import uuid from datetime import datetime from django.db import models from django.urls import reverse from tendenci.apps.user_groups.models import Group from tendenci.apps.user_groups.utils import get_default_group from django.utils.translation import gettext_lazy as _ from django.contrib.contenttypes.fields import Ge...
14,270
faster exports
from ceph.parallel import parallel from tests.rbd.rbd_utils import initial_rbd_config from utility.log import Log log = Log(__name__) def METHOD_NAME(rbd, pool_type, **kw): """ Run rbd export tests Args: rbd: RBD object pool_type: pool type (ec_pool_config or rep_pool_config) **kw...
14,271
test db2 lin
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
14,272
compute action norm
# Copyright 2018 DeepMind Technologies Limited. 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 ...
14,273
test random tucker
import numpy as np from numpy.linalg import matrix_rank from ... import backend as T from ..base import random_cp, random_tucker, random_tt, random_tr from ...tucker_tensor import tucker_to_tensor from ...tenalg import multi_mode_dot from ...base import unfold from ...testing import assert_equal, assert_array_almost_e...
14,274
wrapper
####################################################### # # osutil.py # Python implementation of the Class osutil # Original author: sonic_rd@ruijie.com.cn # ####################################################### import time import glob import re #import chardet from rjutil.smbus import SMBus import time from functo...
14,275
circle to rhino
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry import Point from compas.geometry import Vector from compas.geometry import Line from compas.geometry import Plane from compas.geometry import Frame from compas.geometry import Circle from ...
14,276
div
""" This file contains all jobs that are used in tests. Each of these test fixtures has a slightly different characteristics. """ import contextlib import os import signal import subprocess import sys import time from multiprocessing import Process from redis import Redis from rq import Connection, Queue, get_curre...
14,277
test pss evaluate metric batch counter
# 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...
14,278
get batch e t
import os import numpy as np import pandas as pd import torch from torch import nn from torch.optim import Adam from tqdm import tqdm from transformers import BertModel, BertTokenizer from Training.ScoringFunction.playground.location import PLAYGROUND_DIR from Marie.Util.Embedding.Embedding import Embedding tokenizer...
14,279
get feature preview
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import json import logging from pkg_resources import iter_entry_points from http import HTTPStatus from flask import Response, jsonify, make_response, request, current_app as app from flask.blueprints import Blueprint from marshm...
14,280
assert keys exist
import json import os from tempfile import SpooledTemporaryFile from typing import Any, Callable, Dict, Iterable, Union from fastapi import APIRouter, Depends, File, HTTPException, UploadFile, status from libmambapy import bindings as libmamba_api from quetz import authorization from quetz.config import Config from q...
14,281
merge list of clusters
# Copyright (c) 2023 Intel Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writ...
14,282
timestamp with seconds
from django import forms from django.conf import settings from django.contrib import admin from django.core.exceptions import ValidationError from django.utils.safestring import mark_safe from django.utils.timezone import localtime from django.utils.translation import ugettext_lazy as _ from modeltranslation.admin impo...
14,283
email confirm
import base64 import hashlib import hmac import json from django.conf import settings from django.core.cache import cache from django.http import Http404, HttpResponse from django.shortcuts import render, get_object_or_404 from authn.decorators.auth import require_auth from club.exceptions import AccessDenied, NotFou...
14,284
determine geolocation data
# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. # Copyright (c) 2016, Gluu # # Author: Yuriy Movchan # from java.util import Arrays from org.apache.http.params import CoreConnectionPNames from org.gluu.service.cdi.util import CdiUtil from org.gluu.oxauth.securi...
14,285
test failure paths
import os import types import pytest import salt.spm import salt.utils.files from tests.support.mock import patch @pytest.fixture def formula_definition(): return { "name": "formula1", "version": "1.2", "release": "2", "summary": "test", "description": "testing, nothing t...
14,286
main
import numpy as np import onnxruntime import onnx import tokenization import os from run_onnx_squad import * import json from run_onnx_squad import read_squad_examples, convert_examples_to_features, write_predictions import torch from torch.utils.data import Dataset from torch.utils.data import DataLoader import tqdm f...
14,287
test list images
#!/usr/bin/env python # # Copyright (C) 2020 GNS3 Technologies Inc. # # 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. # ...
14,288
save receipt
import functools import inspect from datetime import datetime from typing import Callable, Optional, TypeVar, Union import eth_utils from constant_sorrow.constants import ( CONTRACT_ATTRIBUTE, CONTRACT_CALL, NO_BLOCKCHAIN_CONNECTION, TRANSACTION, UNKNOWN_CONTRACT_INTERFACE, ) from web3.types impo...
14,289
test header repeated multi items
#!/usr/bin/env python3 import pytest import httpx def echo_headers(request: httpx.Request) -> httpx.Response: data = {"headers": dict(request.headers)} return httpx.Response(200, json=data) def echo_repeated_headers_multi_items(request: httpx.Request) -> httpx.Response: data = {"headers": list(request...
14,290
test validate moment
# Copyright 2020 The Cirq Developers # # 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 ...
14,291
build datasets
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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...
14,292
package
from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir ) from conan.tools.gnu import PkgConfigDeps from conan.tool...
14,293
set up
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import logging from shutil import which from unittest import TestCas...
14,294
do update
from functools import wraps from django.db import transaction from django_fsm import (transition, TransitionNotAllowed, ConcurrentTransitionMixin, ConcurrentTransition) from silver.utils.models import AutoCleanModelMixin def locking_atomic_transition( field, source='*', target=None, on_e...
14,295
validate
import os from conan import ConanFile from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.tools.layout import basic_layout from conan.tools.apple import fix_apple_shared_install_name from conan.tools.files import ( export_conandata_patches, apply_conandata_patches, get, copy, rmdir...
14,296
mulmod
""" Ethereum Virtual Machine (EVM) Arithmetic Instructions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. contents:: Table of Contents :backlinks: none :local: Introduction ------------ Implementations of the EVM Arithmetic instructions. """ from ethereum.base_types import U255_CEIL_VALUE, U256, ...
14,297
terminate with
from __future__ import annotations import os import re from collections import namedtuple from typing import Any from typing import List from . import theme NORMAL = "\x1b[0m" BLACK = "\x1b[30m" RED = "\x1b[31m" GREEN = "\x1b[32m" YELLOW = "\x1b[33m" BLUE = "\x1b[34m" PURPLE = "\x1b[35m" CYAN = "\x1b[36m" LIGHT_GREY...
14,298
name to ipv6
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
14,299
test leading underscore
# Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...