id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
3,700
close path
"""fontTools.pens.pointInsidePen -- Pen implementing "point inside" testing for shapes. """ from fontTools.pens.basePen import BasePen from fontTools.misc.bezierTools import solveQuadratic, solveCubic __all__ = ["PointInsidePen"] class PointInsidePen(BasePen): """This pen implements "point inside" testing: to...
3,701
test create tracking request
import unittest from unittest.mock import patch from karrio.core.utils import DP from karrio import Tracking from karrio.core.models import TrackingRequest from .fixture import gateway class TestCarrierTracking(unittest.TestCase): def setUp(self): self.maxDiff = None self.TrackingRequest = Trackin...
3,702
set initial data
from django import forms from django.core import exceptions from django.forms.models import inlineformset_factory from django.utils.translation import gettext_lazy as _ from oscar.core.loading import get_classes, get_model Product = get_model("catalogue", "Product") ProductClass = get_model("catalogue", "ProductClass...
3,703
test mark late runs marks multiple runs
import pendulum import pytest from prefect.server import models, schemas from prefect.server.services.late_runs import MarkLateRuns from prefect.settings import ( PREFECT_API_SERVICES_LATE_RUNS_AFTER_SECONDS, temporary_settings, ) @pytest.fixture async def late_run(session, flow): async with session.begi...
3,704
member
import urllib.parse from mage_ai.api.errors import ApiError from mage_ai.api.resources.GenericResource import GenericResource from mage_ai.cache.block_action_object import BlockActionObjectCache from mage_ai.data_preparation.models.custom_templates.constants import ( DIRECTORY_FOR_BLOCK_TEMPLATES, DIRECTORY_FO...
3,705
set last thread
from django.core.cache import cache from django.db import models from mptt.managers import TreeManager from mptt.models import MPTTModel, TreeForeignKey from . import PRIVATE_THREADS_ROOT_NAME, THREADS_ROOT_NAME from ..acl.cache import clear_acl_cache from ..acl.models import BaseRole from ..conf import settings from ...
3,706
get context data
# Copyright © Michal Čihař <michal@weblate.org> # # SPDX-License-Identifier: GPL-3.0-or-later import csv from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.urls im...
3,707
test range end only
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Scipp contributors (https://github.com/scipp) # @file # @author Matthew Andrew import numpy as np import pytest import scipp as sc class TestSliceByValue: def setup_method(self): var = sc.Variable(dims=['x'], values=np.arange(5, dtype=float) + ...
3,708
read elf
import subprocess import sys import re function_intro_re = re.compile(r'^(?P<addr>[0-9a-fA-F]{8}) <(?P<name>[a-zA-Z0-9\._]+)>:$') insn_re = re.compile(r'^\s+(?P<addr>[0-9a-fA-F]+):\s+(?P<insn>[0-9a-fA-F ]+)\s+\t(?P<op>.*)$') class Instruction: def __init__(self, addr, insn, op): self.addr = long(addr, 16)...
3,709
match end title
#!/usr/bin/env python3 # ---------------------- faust2sublimecompletions ----------------------- # Usage: `faust2sublimecompletions *.lib > faust.sublime-completions` # # Creates a ST4 completions file for each function in a library # Assumes the same format than faust2md. # This has been adapted from the faust2atomsn...
3,710
mark process
import argparse import datetime from functools import wraps import requests from mindsdb_sql import get_lexer_parser from mindsdb_sql.parser.ast import Identifier from mindsdb.utilities.fs import create_process_mark, delete_process_mark def args_parse(): parser = argparse.ArgumentParser(description='CL argument...
3,711
test invalid issue report params
# -*- coding: utf-8 -*- import io import os import re import tempfile from unittest.mock import MagicMock, patch from django import test import tests.factories as f from tcms.issuetracker.models import CredentialTypes from tests import HelperAssertions class TestIssueTrackerValidation(HelperAssertions, test.TestCa...
3,712
test make aware already aware
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
3,713
test hybrid units recording
import pytest import shutil from pathlib import Path from spikeinterface.core import WaveformExtractor, extract_waveforms, load_extractor from spikeinterface.core.testing import check_recordings_equal from spikeinterface.comparison import ( create_hybrid_units_recording, create_hybrid_spikes_recording, gene...
3,714
range callback
#!/usr/bin/env python3 import sys import cv2 import image_geometry import mil_ros_tools import numpy as np import rospy from geometry_msgs.msg import Pose2D from mil_msgs.msg import RangeStamped from std_msgs.msg import Header from subjugator_msgs.srv import VisionRequest2D, VisionRequest2DResponse def contour_sort(...
3,715
get ref data
# 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...
3,716
edit task
'Full terminal interface for TaskWarrior (task).' import tasklib from visidata import vd, launchExternalEditorValue, Sheet, ColumnItem, date, vlen, CellColorizer, Column, run from visidata import * vd.options.disp_date_fmt = '%Y-%m-%d %H:%M' vd.option('color_task_changed', 'reverse yellow', 'color when vtask is chang...
3,717
get output current
# # Copyright (c) 2017-2021 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # 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...
3,718
to dict
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.28 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
3,719
test radix tree lookup multi index
# Copyright (c) Meta Platforms, Inc. and affiliates. # SPDX-License-Identifier: LGPL-2.1-or-later from drgn import NULL, Object from drgn.helpers.linux.radixtree import radix_tree_for_each, radix_tree_lookup from tests.linux_kernel import LinuxKernelTestCase, skip_unless_have_test_kmod @skip_unless_have_test_kmod cl...
3,720
geti2c
#!/usr/bin/env python3 ####################################################### # # devicebase.py # Python implementation of the Class devicebase # Original author: rd@ruijie.com.cn # ####################################################### from plat_hal.osutil import osutil from plat_hal.baseutil import baseutil import ...
3,721
init test case
import numpy as np import sys import time from shapely.geometry import Polygon import paddle import unittest from ext_op import rbox_iou def rbox2poly_single(rrect, get_best_begin_point=False): """ rrect:[x_ctr,y_ctr,w,h,angle] to poly:[x0,y0,x1,y1,x2,y2,x3,y3] """ x_ctr, y_ctr, width, height...
3,722
inf
# 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 applic...
3,723
test password
import pytest from dvc_webdav import WebDAVFileSystem, WebDAVSFileSystem from dvc.fs import get_cloud_fs from tests.utils.asserts import issubset url_fmt = "{scheme}://{user}@example.com/public.php/webdav" url = "webdav://example.com/public.php/webdav" user = "username" password = "password" token = "4MgjsNM5aSJjxIKM...
3,724
etag
# 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...
3,725
extract data
# 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 ...
3,726
test raw ndarray
"""Unit tests for the PickleBuffer object. Pickling tests themselves are in pickletester.py. """ import gc from pickle import PickleBuffer import weakref import unittest from test import support class B(bytes): pass class PickleBufferTest(unittest.TestCase): def check_memoryview(self, pb, equiv): ...
3,727
test rng snapshot
# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests for the virtio-rng device""" # pylint:disable=redefined-outer-name import pytest from framework.properties import global_props from framework.utils import check_entropy if global_props.instance =...
3,728
create
import braintree from braintree.address import Address from braintree.resource import Resource from braintree.configuration import Configuration class PaymentMethod(Resource): @staticmethod def METHOD_NAME(params=None): if params is None: params = {} return Configuration.gateway()....
3,729
get ref data
# 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...
3,730
asyncio loop runner
import asyncio import inspect from .case import TestCase class IsolatedAsyncioTestCase(TestCase): # Names intentionally have a long prefix # to reduce a chance of clashing with user-defined attributes # from inherited test case # # The class doesn't call loop.run_until_complete(self.setUp()) and...
3,731
test not upload all languages
from io import BytesIO from django.test import SimpleTestCase from unittest import mock from couchexport.export import export_raw from corehq.apps.app_manager.models import Application, LinkedApplication from corehq.apps.app_manager.ui_translations import ( get_default_translations_for_download, process_ui_...
3,732
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 # --------------------------------...
3,733
get options
""" This helper looks in the /Operations section of the CS, considering its specific nature: the /Operations section is designed in a way that each configuration can be specific to a Setup, while maintaining a default. So, for example, given the following /Operations section:: Operations/ ...
3,734
set up
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. import copy import unittest import os import sys import PyOpenColorIO as OCIO from UnitTestUtils import TEST_NAMES, TEST_DESCS class LookTest(unittest.TestCase): TEST_PROCESS_SPACES = ['raw', 'lnh', 'vd8', 'a.b.c.', '1-...
3,735
test save load pretrained additional features
# Copyright 2023 The HuggingFace Team. 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 applicabl...
3,736
test 01 cassandra stress
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
3,737
calculate bucket index
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
3,738
flatten
"""Generic Rules for Diofant. This file assumes knowledge of Basic and little else. """ import functools from ..utilities.iterables import sift from .basic import Atom, Basic __all__ = ('arguments', 'operator', 'term', 'rm_id', 'glom', 'flatten', 'unpack', 'sort') @functools.singledispatch def argumen...
3,739
naws
""" Parser for the Telnet protocol. (Not a complete implementation of the telnet specification, but sufficient for a command line interface.) Inspired by `Twisted.conch.telnet`. """ from __future__ import unicode_literals import struct from six import int2byte, binary_type, iterbytes from .log import logger __all__...
3,740
get dims descriptor
# 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...
3,741
approve import
import os,sys, subprocess from tinyrpc.transports import ServerTransport from tinyrpc.protocols.jsonrpc import JSONRPCProtocol from tinyrpc.dispatch import public,RPCDispatcher from tinyrpc.server import RPCServer """ This is a POC example of how to write a custom UI for Clef. The UI starts the clef process with the '...
3,742
pre launch
""" QEMU qtest library qtest offers the QEMUQtestProtocol and QEMUQTestMachine classes, which offer a connection to QEMU's qtest protocol socket, and a qtest-enabled subclass of QEMUMachine, respectively. """ # Copyright (C) 2015 Red Hat Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under...
3,743
get api version
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
3,744
config options
from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save import os import textwrap required_conan_version = ">=1.52.0" ...
3,745
get messages by service
#!/usr/bin/env python import argparse import datetime import logging import smtplib import sys from collections import defaultdict from email.message import EmailMessage from socket import getfqdn import pysensu_yelp import requests from paasta_tools import mesos_tools from paasta_tools.monitoring_tools import send_e...
3,746
check
from django.conf import settings from django.core.cache import cache from django.utils.translation import gettext_lazy as _ from assets.const import DatabaseTypes from assets.models import Database from common.decorators import Singleton from common.exceptions import JMSException from common.utils import get_logger, g...
3,747
test voxelization output shape no z
# Copyright 2022 The KerasCV Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
3,748
sigpending
import sys from _typeshed import structseq from collections.abc import Callable, Iterable from enum import IntEnum from types import FrameType from typing import Any from typing_extensions import Final, Never, TypeAlias, final NSIG: int class Signals(IntEnum): SIGABRT: int SIGEMT: int SIGFPE: int SIGI...
3,749
forward
from typing import Optional from torch import Tensor from torch_geometric.nn.conv import MessagePassing from torch_geometric.nn.conv.gcn_conv import gcn_norm from torch_geometric.nn.dense.linear import Linear from torch_geometric.typing import Adj, OptTensor, SparseTensor from torch_geometric.utils import spmm clas...
3,750
delete ecs cluster
import time import pytest import boto3 from botocore.exceptions import ClientError from test import test_utils import test.test_utils.ecs as ecs_utils @pytest.fixture(scope="function") def ecs_client(region): return boto3.client("ecs", region_name=region) @pytest.fixture(scope="function") def ecs_cluster_name...
3,751
query mathoid
import hashlib import logging import re import requests from django.conf import settings from django.core.cache import caches from django.utils.html import format_html from mistune import escape from judge.utils.file_cache import HashFileCache from judge.utils.unicode import utf8bytes, utf8text logger = logging.getL...
3,752
convert to datetime
from __future__ import annotations import datetime as dt import logging import pathlib import traceback from functools import update_wrapper, wraps from typing import Any, Callable, List, Optional import click from dateutil.parser import parse import metricflow.cli.custom_click_types as click_custom from metricflow....
3,753
test number of parameters meets expectation
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
3,754
get empty instance
import logging from dataclasses import InitVar, is_dataclass from inspect import getmodule, signature from typing import Dict, List, Optional, Union, get_type_hints from hikaru import HikaruBase, HikaruDocumentBase from kubernetes.client.models.events_v1_event import EventsV1Event from kubernetes.client.models.v1_cont...
3,755
test lookup5
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and ...
3,756
update
#pylint: disable=missing-docstring #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/...
3,757
render
from __future__ import annotations import warnings from typing import Any import gymnasium.spaces import numpy as np from pettingzoo.utils.env import ActionType, AECEnv, AgentID, ObsType class BaseWrapper(AECEnv[AgentID, ObsType, ActionType]): """Creates a wrapper around `env` parameter. All AECEnv wrappe...
3,758
set up
# ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2015 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Gene...
3,759
test named only with types
import unittest from enum import Enum from robot.running.arguments.argumentspec import ArgumentSpec, ArgInfo from robot.utils.asserts import assert_equal class TestStringRepr(unittest.TestCase): def test_empty(self): self._verify('') def test_normal(self): self._verify('a, b', ['a', 'b']) ...
3,760
test request invalid key not base64
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...
3,761
get path
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
3,762
get mfr id
# # Sample pddf_psuutil file # # All the supported PSU SysFS aattributes are #- psu_present #- psu_model_name #- psu_power_good #- psu_mfr_id #- psu_serial_num #- psu_fan_dir #- psu_v_out #- psu_i_out #- psu_p_out #- psu_fan1_speed_rpm # import os.path import sys sys.path.append('/usr/share/sonic/platform/plugins') im...
3,763
assert redirect success
import json import re from unittest.mock import patch from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.test import RequestFactory, TestCase, override_settings from django.urls import reverse from core.govdelivery import MockGovDelivery from core.views import ( Ca...
3,764
delete
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
3,765
find nearest
from pathlib import Path import csv import json import numpy as np import matplotlib.pyplot as plt from one.api import ONE import ibllib.plots as iblplt from ibllib.time import convert_pgts, uncycle_pgts plt.ion() def METHOD_NAME(array, value): array = np.asarray(array) idx = (np.abs(array - value)).argmin...
3,766
do add parser
# Copyright (c) 2023, Antmicro <www.antmicro.com> # # Based on J-Link runner # Copyright (c) 2017 Linaro Limited. # SPDX-License-Identifier: Apache-2.0 """ Runner that implements flashing with SiLabs Simplicity Commander binary tool. See SiLabs UG162: "Simplicity Commander Reference Guide" for more info. """ import o...
3,767
set up
from DateTime import DateTime from plone.app.testing import TEST_USER_PASSWORD from plone.app.z3cform.interfaces import IPloneFormLayer from Products.CMFCore.permissions import SetOwnProperties from Products.CMFCore.utils import getToolByName from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING fr...
3,768
vi function 2 d
# Copyright 2022 INRIA import numpy as np import siconos.numerics as sn def vi_function_1D(n, x, F): F[0] = 1.0 + x[0] pass def vi_nabla_function_1D(n, x, nabla_F): nabla_F[0] = 1.0 pass def METHOD_NAME(n, z, F): M = np.array([[2.0, 1.0], [1.0, 2.0]]) q = np.array([-5.0, -6.0]) F[:]...
3,769
test rotation
import math import unittest import volmdlr from volmdlr import curves class TestEllipse3D(unittest.TestCase): ellipse = curves.Ellipse3D(4, 3, volmdlr.Frame3D(volmdlr.O3D, volmdlr.X3D, volmdlr.Z3D.cross(volmdlr.X3D), volmdlr.Z3D)) vector1 = volmdlr.Vector3...
3,770
cert pair
# (C) Datadog, Inc. 2020 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import json from datetime import datetime, timedelta from ...utils.date import UTC, parse_rfc3339 from .. import AgentCheck try: from datadog_agent import get_config except ImportError: def get_config(k...
3,771
interpret name
import collections from _typeshed import Incomplete from types import TracebackType from typing import Any from typing_extensions import Literal def encode_text(s: str) -> bytes: ... PDFDocEncoding: dict[int, str] def decode_text(b: bytes) -> str: ... class PdfFormatError(RuntimeError): ... def check_format_condit...
3,772
all reduce params
# 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. """ A modified version of the legacy DistributedDataParallel module that uses c10d communication primitives. This version is simpler than the ...
3,773
test browser open
import json from io import StringIO from logging import StreamHandler from typing import Any import pytest from traitlets.config import Config from jupyter_server.serverapp import ServerApp from .mockextensions.app import MockExtensionApp @pytest.fixture def jp_server_config(jp_template_dir): config = { ...
3,774
send request
# 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 ...
3,775
create
from contextlib import suppress import awxkit.exceptions as exc from awxkit.api.pages import base, WorkflowJobTemplate, UnifiedJobTemplate, JobTemplate from awxkit.api.mixins import HasCreate, DSAdapter from awxkit.api.resources import resources from awxkit.utils import update_payload, PseudoNamespace, random_title fr...
3,776
company id
import csv from typing import Dict, Optional from datetime import datetime from io import TextIOWrapper from zipfile import ZipFile from normality import collapse_spaces from followthemoney.util import join_text from zavod import Context TYPES = {"C": "HE", "P": "S", "O": "AE", "N": "BN", "B": "B"} def parse_date(t...
3,777
on timestamp timer
from qtpy import QtWidgets, QtCore from openpype.tools.utils.delegates import pretty_date class BaseInfoDialog(QtWidgets.QDialog): width = 600 height = 400 def __init__(self, message, title, info_obj, parent=None): super(BaseInfoDialog, self).__init__(parent) self._result = 0 sel...
3,778
set up
from django.urls import reverse from rest_framework import status from lego.apps.quotes.models import Quote from lego.apps.users.models import AbakusGroup, User from lego.utils.test_utils import BaseAPITestCase def _get_list_url(): return reverse("api:v1:quote-list") def _get_list_approved_url(): return _g...
3,779
from center cartesian
"""ProtocolEngine-based Well core implementations.""" from typing import Optional from opentrons_shared_data.labware.constants import WELL_NAME_PATTERN from opentrons.protocol_engine import WellLocation, WellOrigin, WellOffset from opentrons.protocol_engine.clients import SyncClient as EngineClient from opentrons.pro...
3,780
add file
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
3,781
test remote missing dependency on dir pull
import logging import os import pytest from funcy import first from voluptuous import MultipleInvalid, Schema from dvc.fs import RemoteMissingDepsError from dvc.ignore import _no_match from dvc.output import CHECKSUM_SCHEMA, Output from dvc.stage import Stage from dvc.utils.fs import remove def test_save_missing(dv...
3,782
get stitch density
# Authors: see git history # # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. import numpy as np from scipy.spatial import KDTree import inkex from ..i18n import _ from ..stitch_plan import stitch_groups_to_stitch_plan from ..svg import PIXELS_PER_MM ...
3,783
test embed kernel func
"""test embed_kernel""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import json import os import sys import threading import time from contextlib import contextmanager from subprocess import PIPE, Popen import pytest from flaky import flaky from jupyter_client...
3,784
equals
# # 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...
3,785
get extension
from typing import Any, Callable, Iterator, Optional, Protocol, Tuple, Union from thinc.types import Floats1d, FloatsXd from ..lexeme import Lexeme from ..vocab import Vocab from .doc import Doc from .morphanalysis import MorphAnalysis from .span import Span from .underscore import Underscore class TokenMethod(Proto...
3,786
make function list
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
3,787
hash143
from micropython import const from typing import TYPE_CHECKING from trezor.crypto.hashlib import blake2b from trezor.utils import HashWriter from trezor.wire import DataError from ..writers import TX_HASH_SIZE, write_bytes_reversed, write_uint32, write_uint64 from .bitcoinlike import Bitcoinlike if TYPE_CHECKING: ...
3,788
write code files
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import os import shutil import frappe import frappe.model from frappe.modules import get_module_path, scrub, scrub_dt_dn def export_doc(doc): write_document_file(doc) def export_to_files(record_list=None, record_modu...
3,789
test permutation3 q
import numpy as np import pytest from scipy.sparse import csr_matrix from qulacs import QuantumCircuit, QuantumState from qulacs.gate import ( CNOT, TOFFOLI, DenseMatrix, DiagonalMatrix, H, PauliRotation, ReversibleBoolean, SparseMatrix, T, X, ) nqubits_list = range(4, 26) de...
3,790
extract works
#!/usr/bin/env python import argparse import datetime import itertools import sys import time import requests BASE_URL = "https://openlibrary.org/recentchanges/" # BASE_URL = "http://0.0.0.0:8080/recentchanges/" def parse_options(args): parser = argparse.ArgumentParser( description="""Find works that h...
3,791
installaehandler
"""MiniAEFrame - A minimal AppleEvent Application framework. There are two classes: AEServer -- a mixin class offering nice AE handling. MiniApplication -- a very minimal alternative to FrameWork.py, only suitable for the simplest of AppleEvent servers. """ from warnings import warnpy3k warnpy3k("In 3...
3,792
get tag label
# 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...
3,793
setup method
# Copyright 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 in wr...
3,794
transform
# # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # import hashlib import unittest import tarfile import io import pytest from aistore.sdk.const import PROVIDER_AIS from aistore.sdk.errors import InvalidBckProvider from tests.integration import REMOTE_SET, TEST_TIMEOUT, OBJECT_COUNT from tests.integrat...
3,795
columns
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from bugbot import utils from bugbot.bzcleaner import BzCleaner class UnderestimatedSeverity(BzCleaner): def __ini...
3,796
pd post process
from typing import Optional import logging import networkx from ..utils.graph import compute_dominance_frontier, PostDominators, TemporaryNode from . import Analysis _l = logging.getLogger(name=__name__) class CDG(Analysis): """ Implements a control dependence graph. """ def __init__(self, cfg, s...
3,797
update
""" Create aircraft trails on the radar display.""" from math import * import numpy as np import bluesky as bs from bluesky import settings from bluesky.core import TrafficArrays class Trails(TrafficArrays): """ Traffic trails class definition : Data for trails Methods: Trails() : ...
3,798
name
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
3,799
is leader process
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ utility/helper.py ] # Synopsis [ helper functions ] # Author [ Andy T. Liu (Andi611) ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ] """*************...