id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,300
file exists
import pytest import datetime import os import json from sacred.observers import GoogleCloudStorageObserver storage = pytest.importorskip("google.cloud.storage") T1 = datetime.datetime(1999, 5, 4, 3, 2, 1, 0) T2 = datetime.datetime(1999, 5, 5, 5, 5, 5, 5) try: BUCKET = os.environ["CLOUD_STORAGE_BUCKET"] _CR...
16,301
test solver factory
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
16,302
search
import json import re from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.providers.torrent.TorrentProvider import TorrentProvider class Provider(TorrentProvider): def __init__(self): super().__init__("ncore") ...
16,303
to python
import os from io import BytesIO import willow from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import FileExtensionValidator from django.forms.fields import FileField, ImageField from django.template.defaultfilters import filesizeformat from django.utils....
16,304
get disabled
""" Service support for Debian systems (uses update-rc.d and /sbin/service) .. important:: If you feel that Salt should be using this module to manage services on a minion, and it is using a different module (or gives an error similar to *'service.start' is not available*), see :ref:`here <module-provi...
16,305
run max mem proc
# # See top-level LICENSE.rst file for Copyright information # # -*- coding: utf-8 -*- """ desispec.pipeline.tasks.redshift ================================ """ from __future__ import absolute_import, division, print_function import numpy as np from .base import BaseTask, task_classes, task_type from ...io import f...
16,306
test request additional connection
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,307
copy
from __future__ import annotations from typing import ( Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Protocol, Tuple, Union, ) __all__ = ["Headers", "HeadersLike", "MultipleValuesError"] class MultipleValuesError(LookupError): """ Exception raised wh...
16,308
crypto key id
# 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...
16,309
test nginx type loadbalancer omits nodeports
from tests.chart_tests.helm_template_generator import render_chart import pytest class TestNginx: def test_nginx_service_basics(self): docs = render_chart( show_only=["charts/nginx/templates/nginx-service.yaml"], ) assert len(docs) == 1 doc = docs[0] assert d...
16,310
test search errors
import tempfile import time import numpy as np from nose.tools import assert_raises import yt.utilities.lib.cykdtree as cykdtree from yt.utilities.lib.cykdtree.tests import ( make_points, make_points_neighbors, parametrize, ) @parametrize( npts=100, ndim=(2, 3), periodic=(False, True), use_sliding_m...
16,311
prescriptive renderer
from typing import Any, List, Union from global_land_mask import globe from great_expectations.core import ExpectationValidationResult from great_expectations.execution_engine import PandasExecutionEngine from great_expectations.expectations.expectation import ( ColumnMapExpectation, ExpectationConfiguration,...
16,312
test munson1a
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
16,313
add abbreviation
from collections.abc import Callable, Generator, Iterable, Sequence from queue import Queue from threading import Event as _UninterruptibleEvent from typing_extensions import TypeAlias from ._canonical_names import all_modifiers as all_modifiers, sided_modifiers as sided_modifiers from ._keyboard_event import KEY_DOWN...
16,314
connect
from multiprocessing import Pipe, Process from multiprocessing import connection as mp_connection import click import fabric from .hostinfo import HostInfo, HostInfoList def run_on_host(hostinfo: HostInfo, workdir: str, recv_conn: mp_connection.Connection, send_conn: mp_connection.Connection, env: d...
16,315
test
'''Regsitration of SIRF images. Usage: registration [--spm] [--help] Options: --spm test spm functionality ''' # SyneRBI Synergistic Image Reconstruction Framework (SIRF) # Copyright 2018 - 2020 University College London # # This is software developed for the Collaborative Computational # Project in Synergistic...
16,316
update repository
"""Class for integrations in HACS.""" from __future__ import annotations from typing import TYPE_CHECKING, Any from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.loader import async_get_custom_components from ..const import DOMAIN from ..enums import HacsCategory, H...
16,317
run
# This file is licensed under the MIT-0 License. # See LICENSE-MIT-0.txt in the current directory. """ This program serves as an example of a simulator for hardware, i.e., a simulator for robots that one might have in their lab. There is no controller built-in to this program -- it merely sends status and sensor messa...
16,318
test order pending incomplete complex custom form
import json from app.models.custom_form import CustomForms from app.models.order import Order from app.models.ticket_holder import TicketHolder from tests.factories.attendee import AttendeeSubFactory from tests.factories.event import EventFactoryBasic from tests.factories.order import OrderSubFactory from tests.factor...
16,319
evaluate
import copy import io from contextlib import redirect_stdout import numpy as np import pycocotools.mask as mask_util import torch import utils from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval class CocoEvaluator: def __init__(self, coco_gt, iou_types): if not isinstance(iou_typ...
16,320
mass integrand3d
__author__ = "dangilman" from lenstronomy.LensModel.Profiles.splcore import SPLCORE import numpy as np from scipy.integrate import quad import pytest import numpy.testing as npt class TestSPLCORE(object): def setup_method(self): self.profile = SPLCORE() def test_no_potential(self): npt.asse...
16,321
confirm deadline
from datetime import datetime, timedelta from pytz import UTC from residue import CoerceUTF8 as UnicodeText, UTCDateTime, UUID from sqlalchemy.orm import backref from sqlalchemy.schema import ForeignKey from sqlalchemy.types import Boolean, Integer from sqlalchemy.ext.hybrid import hybrid_property from uber.config im...
16,322
save
from django import forms from django.db import transaction from django.urls import reverse from django.utils.safestring import mark_safe from django.utils.translation import gettext_lazy as _ from oscar.apps.voucher.utils import get_unused_code from oscar.core.loading import get_model from oscar.forms import widgets ...
16,323
task push service outputs
import logging from typing import Annotated, Final from fastapi import APIRouter, Depends, HTTPException, status from models_library.projects_nodes import NodeID from pydantic import BaseModel, PositiveInt from servicelib.fastapi.long_running_tasks.client import ( ProgressMessage, ProgressPercent, ) from servi...
16,324
apply config
import logging import time from tron import actioncommand from tron import command_context from tron import node from tron.config import manager from tron.config.schema import MASTER_NAMESPACE from tron.core.job import Job from tron.core.job_collection import JobCollection from tron.core.job_scheduler import JobSchedu...
16,325
copy tree
"""distutils.dir_util Utility functions for manipulating directories and directory trees.""" import os import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating ...
16,326
del files by pattern
# pylint: skip-file import os import re from datetime import datetime from typing import Dict, List, Optional import numpy as np import pandas as pd import pytest from numpy.testing import assert_allclose from pyspark.ml.linalg import DenseVector from pyspark.sql import DataFrame from replay.data import REC_SCHEMA, ...
16,327
benchmark dataset
# Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np from itertools import count from typing import List, Tuple import torch import tqdm from fvcore.common.timer import Timer from detectron2.utils import comm from .build import build_batch_data_loader from .common import DatasetFromLis...
16,328
datetime trunc sql
import json from collections.abc import Iterable, Sequence from datetime import date, time, timedelta from datetime import datetime as real_datetime from decimal import Decimal from typing import Any from django.core.management.color import Style from django.db.backends.base.base import BaseDatabaseWrapper from django...
16,329
supports fetch outside dataloader
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict from typing import Callable, Dict, List import numpy as np from . import FairseqDataset def uniform_sa...
16,330
test reduction
import pytest import numpy as np from numpy.testing import assert_array_almost_equal from scipy.spatial.transform import Rotation from scipy.optimize import linear_sum_assignment from scipy.spatial.distance import cdist from scipy.constants import golden as phi from scipy.spatial import cKDTree TOL = 1E-12 NS = rang...
16,331
private endpoint
# 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,332
list
from functools import cached_property import structlog from django.utils import timezone from django.utils.translation import gettext as _ from rest_framework.exceptions import ValidationError from rest_framework.generics import GenericAPIView from rest_framework.permissions import AllowAny from rest_framework.throttl...
16,333
compute ext stats
import json, os, time from solver.commonSolver import CommonSolver from logic.helpers import Pickup from utils.utils import PresetLoader from solver.conf import Conf from solver.out import Out from solver.comeback import ComeBack from utils.parameters import easy, medium, hard, harder, hardcore, mania, infinity from u...
16,334
to dict
# Copyright 2023 The KServe 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
16,335
update attacks
""" Copyright 2020 kivou.2000607@gmail.com This file is part of yata. yata 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 any later version. yata is dist...
16,336
record service
# fake-enigma class slot: def __init__(self): self.list = [] def get(self): return self.list def __call__(self): for x in self.list: x() timers = set() import time from events import eventfnc ##################### ENIGMA BASE class eTimer: def __init__(self): self.timeout = slot() self.next_...
16,337
g4 opposite
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
16,338
add list response
import pytest import responses from sentry.integrations.slack.utils import get_channel_id from sentry.integrations.slack.utils.channel import CHANNEL_PREFIX, MEMBER_PREFIX from sentry.shared_integrations.exceptions import ApiRateLimitedError, DuplicateDisplayNameError from sentry.testutils.cases import TestCase from s...
16,339
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
16,340
handler
# -------------------------------------------------------------------------------------------- # 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,341
convert example
# Copyright (c) 2022 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 appli...
16,342
get arq function
from __future__ import absolute_import import sys from sentry_sdk._compat import reraise from sentry_sdk._types import TYPE_CHECKING from sentry_sdk import Hub from sentry_sdk.consts import OP from sentry_sdk.hub import _should_send_default_pii from sentry_sdk.integrations import DidNotEnable, Integration from sentry...
16,343
allreduce
# 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...
16,344
encode decimal
""" Copyright 2011 Jeff Garzik AuthServiceProxy has the following improvements over python-jsonrpc's ServiceProxy class: - HTTP connections persist for the life of the AuthServiceProxy object (if server supports HTTP/1.1) - sends protocol 'version', per JSON-RPC 1.1 - sends proper, incrementing 'id' ...
16,345
execute
# Copyright 2014-2018 ARM Limited # # 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...
16,346
apply overrides for instrument and strategy
""" Called from sysproduction code in a while loop, each time it runs loops over strategies For each strategy gets the required trades per instrument It then passes these to the 'virtual' order queue So called because it deals with instrument level trades, not contract implementation """ from sysexecution.orders.named...
16,347
get fees
""" Keyless interface definition Copyright (C) 2022 Emerson Dove 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) an...
16,348
check file exists
from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING logger = logging.getLogger(__name__) # https://stackoverflow.com/questions/39740632/python-type-hinting-without-cyclic-imports if TYPE_CHECKING: from .linker import Linker class SplinkDataFrame: """A...
16,349
test post non existant prep
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
16,350
add related
from collections.abc import Generator, Iterator, Sequence from email import _ParamsType, _ParamType from email.charset import Charset from email.contentmanager import ContentManager from email.errors import MessageDefect from email.policy import Policy from typing import Any, TypeVar, overload from typing_extensions im...
16,351
dynamic attribute lookup
""" Moves the status to open and then launches the Dynamic playbooks for Reputation Analysis, Attribute Lookup, and Related Tickets. """ import phantom.rules as phantom import json from datetime import datetime, timedelta @phantom.playbook_block() def on_start(container): phantom.debug('on_start() called') ...
16,352
merits
""" Copyright 2019 kivou.2000607@gmail.com This file is part of yata. yata 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 any later version. yata is dist...
16,353
get system error count
""" File: SCPIBase.py Author: Wouter Vlothuizen, TNO/QuTech Purpose: self contained base class for SCPI ('Standard Commands for Programmable Instruments') commands, with selectable transport Usage: don't use directly, use a derived class (e.g. Qutech_CC) Notes: ...
16,354
test project created
"""Test file for Sync Server, tests site operations add_site, remove_site. File: creates temporary directory and downloads .zip file from GDrive unzips .zip file uses content of .zip file (MongoDB's dumps) to import to new databases with use of 'monkeypatch_session' modifies require...
16,355
get next
# 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,356
oracle responsive
from __future__ import annotations import asyncio import os import re import subprocess import sys import timeit from pathlib import Path from typing import Any, Awaitable, Callable, Generator import asyncmy import asyncpg import oracledb import pytest from google.auth.credentials import AnonymousCredentials from goo...
16,357
test import steps
from tests.source.shotgun.base import ShotgunTestCase class ImportShotgunStepTestCase(ShotgunTestCase): def setUp(self): super(ImportShotgunStepTestCase, self).setUp() def METHOD_NAME(self): self.steps = self.load_fixture("steps") self.assertEqual(len(self.steps), 3) self.dep...
16,358
set up class
import unittest from unittest.mock import patch, MagicMock, ANY from kfp.components.structures import ( ComponentSpec, InputSpec, OutputSpec, ContainerImplementation, InputValuePlaceholder, OutputPathPlaceholder, ContainerSpec, ) from common.component_compiler import ( IOArgs, Sage...
16,359
process pipeline args
# Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is # licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
16,360
process chunk
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint:...
16,361
test bad hypot usage
import math import re import textwrap import operator import numpy as np import unittest from numba.core.compiler import compile_isolated from numba import jit from numba.core import types from numba.core.errors import TypingError from numba.core.types.functions import _header_lead from numba.tests.support import Tes...
16,362
parse switches
#! /usr/bin/env python ######################################################################## # File : dirac-stager-monitor-requests # Author : Daniela Remenska ######################################################################## """ Report the details of file staging requests, based on selection filters WAR...
16,363
run
#!/usr/bin/env python3 # Software License Agreement (BSD License) # Copyright © 2021-2023 belongs to Shadow Robot Company Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributio...
16,364
test flow with complex conditions
from unittest import mock import pytest import requests from settings import TEST_DATA from suite.utils.resources_utils import ensure_response_from_backend, wait_before_test from suite.utils.vs_vsr_resources_utils import patch_virtual_server_from_yaml resp_1 = mock.Mock() resp_2 = mock.Mock() resp_3 = mock.Mock() d...
16,365
layout
import os from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.METHOD_NAME import basic_layout from conan.tools.build import check_min_cppstd from conan.tools.scm ...
16,366
test has collection unavailable exception
import pytest import grpc from pymilvus import MilvusException, MilvusUnavailableException from pymilvus.client.grpc_handler import GrpcHandler from pymilvus.grpc_gen import milvus_pb2, common_pb2 descriptor = milvus_pb2.DESCRIPTOR.services_by_name['MilvusService'] class TestGrpcHandler: @pytest.mark.parametrize...
16,367
test returns false for existing permission
from redash.models import AccessPermission from redash.permissions import ACCESS_TYPE_MODIFY from tests import BaseTestCase class TestObjectPermissionsListGet(BaseTestCase): def test_returns_empty_list_when_no_permissions(self): query = self.factory.create_query() user = self.factory.user ...
16,368
test post order
""" Tests for graph traversal generator functions. """ from collections import defaultdict from unittest import TestCase from ..graph_traversals import traverse_post_order, traverse_pre_order, traverse_topologically class TestGraphTraversals(TestCase): """ Test Class for graph traversal generator functions...
16,369
sub modules dict
import re import os from parso import python_bytes_to_unicode from jedi.evaluate.cache import evaluator_method_cache from jedi._compatibility import iter_modules, all_suffixes from jedi.evaluate.filters import GlobalNameFilter, ContextNameMixin, \ AbstractNameDefinition, ParserTreeFilter, DictFilter, MergedFilter...
16,370
apply dense
# 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...
16,371
test send contact default protect content
#!/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 #...
16,372
test retake cap
import os from tests.base import ApiDBTestCase from zou.app.utils import events from zou.app.services import projects_service, tasks_service from PIL import Image class RouteTaskChangeTestCase(ApiDBTestCase): def setUp(self): super(RouteTaskChangeTestCase, self).setUp() self.generate_fixture_...
16,373
footer
############################################################################## # Copyright 2016-2019 Rigetti Computing # # 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...
16,374
cancel jobs
# Copyright © 2018-2019 Red Hat, Inc. # # This file is part of Bodhi. # # 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 option) any later version. ...
16,375
tmp parted
from __future__ import annotations import os from posixpath import join as pjoin import pandas as pd import pandas.testing as tm import pytest import ibis from ibis import util from ibis.tests.util import assert_equal pytest.importorskip("impala") from ibis.backends.impala.compat import ImpylaError # noqa: E402 ...
16,376
default predict fn
# Copyright 2019-2020 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" fil...
16,377
get orm database
# Copyright 2021 Collate # 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...
16,378
export backup
# backup.py # # Copyright 2022 brombinmirko <send@mirko.pm> # # 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, in version 3 of the License. # # This program is distributed in the hope that it wil...
16,379
test catches multiple leaked mocks
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
16,380
quit
# Copyright 2019 Wilke Schwiedop. 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 """ eval.py: evaluator for find. """ fro...
16,381
get title
from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin from django.core.exceptions import PermissionDenied from django.db import IntegrityError from django.db.models import F from django.forms.models i...
16,382
execute dataget
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ============= TAP plus ============= @author: Juan Carlos Segovia @contact: juan.carlos.segovia@sciops.esa.int European Space Astronomy Centre (ESAC) European Space Agency (ESA) Created on 30 jun. 2016 """ from astroquery.utils.tap import taputils...
16,383
get api portal
# 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,384
test create client
import uuid from typing import Tuple import pytest from httpx import Client from fides.api.graph.traversal import TraversalNode from fides.api.models.connectionconfig import ConnectionConfig, ConnectionTestStatus from fides.api.models.datasetconfig import DatasetConfig from fides.api.models.policy import Policy from ...
16,385
max positions
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import os.path as op from argparse import Namespace from fairseq.data import Dictionary, encoders from fairseq.data.audio.spee...
16,386
test init with zero size
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
16,387
method
# -------------------------------------------------------------------------------------------- # 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,388
test pdlookup query
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Test Pu...
16,389
get data
""" Display list of network interfaces and IP addresses. This module supports both IPv4 and IPv6. There is the possibility to blacklist interfaces and IPs, as well as to show interfaces with no IP address. It will show an alternate text if no IP are available. Configuration parameters: cache_timeout: refresh inte...
16,390
container spec
"""This type stub file was generated by pyright.""" # pylint: disable=C,E,W,R from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from docker.types.healthcheck import Healthcheck from typing_extensions import Literal class TaskTemplate(Dict[str, Any]): def __init__( ...
16,391
test get build environment
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2021 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 the h...
16,392
with md
"""Check that the generic Ada API works as expected.""" from langkit.dsl import ( ASTNode, AbstractField, Field, MetadataField, NullField, Struct, T, UserField, abstract, env_metadata ) from langkit.expressions import ( AbstractKind, ArrayLiteral, BigIntLiteral, ...
16,393
encryption
# 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,394
prepare 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...
16,395
conditional lower case c make group
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import re # Define regexes for matches commandCallRegex = \ re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*\(') commandCallWithSpacesRegex = \ re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*[\s]*\(') macroDefRegex = \ re.compile(r'[^a-zA-Z_][mM][aA][cC][rR][oO]\([\s]...
16,396
get args
# -*- coding: utf-8 -*- """ Process the textgrid files """ import argparse import codecs from distutils.util import strtobool from pathlib import Path import textgrid import pdb class Segment(object): def __init__(self, uttid, spkr, stime, etime, text): self.uttid = uttid self.spkr = spkr s...
16,397
extract data
# 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,398
tokenize
"""Demo of a simple transformer language model. Code is adapted from the PyTorch examples at https://github.com/pytorch/examples/blob/main/word_language_model """ import math import os from pathlib import Path from typing import Dict, List, Optional, Tuple import requests import torch import torch.nn as nn import to...
16,399
list by location
# 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...