id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
12,000
create csv
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # # 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 # th...
12,001
test rule module
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, no-member, len-as-condition import pytest from rebulk.test.default_rules_module import RuleRemove0, RuleAppend0, RuleRename0, RuleAppend1, RuleRemove1, \ RuleRename1, RuleAppend2, RuleR...
12,002
test model run upsert data rows with
import time import os import pytest from collections import Counter from labelbox import DataSplit, ModelRun def test_model_run(client, configured_project_with_label, data_row, rand_gen): project, _, _, label = configured_project_with_label label_id = label.uid ontology = project.ontology() data = {...
12,003
on icc gamelist item
import datetime from gi.repository import GObject from pychess.ic import GAME_TYPES_BY_FICS_NAME from pychess.ic.icc import DG_GAMELIST_BEGIN, DG_GAMELIST_ITEM, DG_RATING_TYPE_KEY from pychess.ic.managers.AdjournManager import AdjournManager from pychess.ic.FICSObjects import FICSAdjournedGame, FICSHistoryGame, FICSJ...
12,004
convert to dimension values
""" This module provides the `NumpyArrayConverter` class, which allows converting a `numpy` `array` into a list of dictionaries representing series. """ from types import ModuleType from typing import Dict, List, Optional, Tuple, Union from ipyvizzu.data.converters.defaults import NAN_DIMENSION, NAN_MEASURE from ipyv...
12,005
tear down
"""Test program for the fcntl C module. OS/2+EMX doesn't support the file locking operations. """ import os import struct import sys import _testcapi import unittest from test.test_support import (verbose, TESTFN, unlink, run_unittest, import_module) # Skip test if no fnctl module. fcntl = import_module('fcntl')...
12,006
test uninstall
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> Test cases for salt.modules.npm """ import textwrap import pytest import salt.modules.npm as npm import salt.utils.json from salt.exceptions import CommandExecutionError from tests.support.mock import MagicMock, patch @pytest.fixture def configure_lo...
12,007
present
""" Manage LXD profiles. .. versionadded:: 2019.2.0 .. note: - `pylxd`_ version 2 is required to let this work, currently only available via pip. To install on Ubuntu: $ apt-get install libssl-dev python-pip $ pip install -U pylxd - you need lxd installed on the minion ...
12,008
lookup var
"""New project generation. How it Works ============ Project template are placed with the ./chalice/templates directory. Each directory corresponds to a single template. The name of the directory has the structure ``0123-template-name``, where the first part consists of a four digit number followed by a ``-``, then...
12,009
consent store 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...
12,010
get celery status
# -*- coding: utf-8 -*- # import json import redis_lock import redis from django.conf import settings from django.utils.timezone import get_current_timezone from django.db.utils import ProgrammingError, OperationalError from django_celery_beat.models import ( PeriodicTask, IntervalSchedule, CrontabSchedule, Period...
12,011
tear down class
import datetime from django.test import TestCase from corehq.apps.accounting import tasks from corehq.apps.accounting.models import ( BillingAccountWebUserHistory, DomainUserHistory, SoftwarePlanEdition, ) from corehq.apps.accounting.tests import generator from corehq.apps.accounting.tests.test_invoicing ...
12,012
link
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """Fake implementation of AbstractSpan for tests. Copied from `azure-core/tests`.""" from contextlib import contextmanager from typing import Union, Sequence, Optional,...
12,013
is success
# 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...
12,014
real initialize
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, urlencode_postdata, ) class AtresPlayerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?atresplayer\.com/[^...
12,015
sync columns
# 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...
12,016
default config
""" time_freq_provider ================== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecific...
12,017
retain grad
from collections import OrderedDict from typing import Any, List, Optional, Tuple import torch import torch.cuda from torch.nn import Module from torch.utils._pytree import ( SUPPORTED_NODES, LeafSpec, TreeSpec, _is_leaf, _register_pytree_node, tree_flatten, tree_map, tree_unflatten, ) ...
12,018
adjust function
# Princeton University licenses this file to You under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. You may obtain a copy of the License at: # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writin...
12,019
test budget authority endpoint no records
import pytest from model_bakery import baker from rest_framework import status @pytest.fixture def model_instances(): baker.make("accounts.BudgetAuthority", year=2000, amount=2000000, agency_identifier="000") baker.make("accounts.BudgetAuthority", year=2001, amount=2001000, agency_identifier="000") baker...
12,020
get weights
# Copyright 2019-2023 The AmpliGraph Authors. All Rights Reserved. # # This file is Licensed under the Apache License, Version 2.0. # A copy of the Licence is available in LICENCE, or at: # # http://www.apache.org/licenses/LICENSE-2.0 # import abc import logging import six import tensorflow as tf logger = logging...
12,021
message extractor
import json from kairon import Utility from kairon.exceptions import AppException from kairon.shared.constants import ElementTypes class ElementTransformerOps(): def __init__(self, message_type, channel): self.message_type = message_type self.channel = channel @staticmethod def getChannel...
12,022
find label issues
# Copyright (C) 2017-2023 Cleanlab Inc. # This file is part of cleanlab. # # cleanlab 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 ve...
12,023
get path root
from typing import TYPE_CHECKING from storage import cache, device from trezor import wire from trezor.crypto import cardano from apps.common import mnemonic from apps.common.seed import get_seed from .helpers.paths import BYRON_ROOT, MINTING_ROOT, MULTISIG_ROOT, SHELLEY_ROOT if TYPE_CHECKING: from typing impor...
12,024
test check access
# ----------------------------------------------------------------------------- # BSD 3-Clause License # # Copyright (c) 2022-2023, Science and Technology Facilities Council # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
12,025
update state
# # ISC License # # Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all...
12,026
test ws frame get iter none in
import re from asyncio import Event, Queue, TimeoutError from unittest.mock import Mock, call import pytest from websockets.frames import CTRL_OPCODES, DATA_OPCODES, Frame from sanic.exceptions import ServerError from sanic.server.websockets.frame import WebsocketFrameAssembler try: from unittest.mock import ...
12,027
test legend not already exists
#----------------------------------------------------------------------------- # 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. #-------------------------------------------------------------------...
12,028
test smallkernel box2 d kernel
# Licensed under a 3-clause BSD style license - see LICENSE.rst import itertools import numpy as np import pytest from numpy.testing import assert_allclose, assert_almost_equal from astropy import units as u from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import ( ...
12,029
beacon
""" Beacon to monitor network adapter setting changes on Linux .. versionadded:: 2016.3.0 """ import ast import logging import re import salt.loader import salt.utils.beacons # first choice: NDB + compat adapter, requires pyroute2 >= 0.7.1 try: from pyroute2 import NDB from pyroute2.ndb.compat import ipdb_...
12,030
replace con
# Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved. # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. import copy import os import numpy as np from pandapip...
12,031
get discounted line items
from decimal import Decimal import itertools __all__ = ['LineItemDiscounter'] class LineItemDiscounter: def METHOD_NAME(self, line_items, coupons=[]): """Return line items with the maximum possible discount applied.""" if not line_items: return None if len({line_item.item_id f...
12,032
get feature
import copy from typing import List, Tuple import torch from torch import nn, Tensor __all__ = ["PoseRescoringNet"] from super_gradients.common.object_names import Models from super_gradients.common.registry import register_model from super_gradients.training.models import SgModule from super_gradients.training.util...
12,033
ip addresses
# 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...
12,034
test key by name
from mpfmc.uix.slide import Slide from mpfmc.tests.MpfMcTestCase import MpfMcTestCase class TestSlides(MpfMcTestCase): def get_machine_path(self): return 'tests/machine_files/slide' def get_config_file(self): return 'test_slides.yaml' def test_slide(self): slide = Slide(mc=self.m...
12,035
temp dir config
import itertools import logging import re import subprocess from pathlib import Path from typing import Union from metagraph_workflows import workflow_configs, utils from metagraph_workflows.workflow_configs import GNU_TIME_CMD, TMP_DIR, \ RULE_CONFIGS_KEY, SEQS_FILE_LIST_PATH, SEQS_DIR_PATH logger = logging.getL...
12,036
test lost in the middle order even
import pytest from haystack import Document from haystack.nodes.ranker.lost_in_the_middle import LostInTheMiddleRanker @pytest.mark.unit def test_lost_in_the_middle_order_odd(): # tests that lost_in_the_middle order works with an odd number of documents docs = [Document(str(i)) for i in range(1, 10)] ran...
12,037
quantize dequantize
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
12,038
spin
#!/usr/bin/python3 #*********************************************************** #* Software License Agreement (BSD License) #* #* Copyright (c) 2009, Willow Garage, Inc. #* All rights reserved. #* #* Redistribution and use in source and binary forms, with or without #* modification, are permitted provided that the ...
12,039
restrictions
from enum import Enum from typing import Optional, List, Union, Literal from pydantic import BaseModel, Field, EmailStr from pydantic import root_validator, validator import schemas from chalicelib.utils.TimeUTC import TimeUTC class Permissions(str, Enum): session_replay = "SESSION_REPLAY" dev_tools = "DEV_...
12,040
skip test
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright (c) 2017, Massachusetts Institute of Technology 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 r...
12,041
test concurrent unique writes
#!/usr/bin/env python """Collection of tests for :mod:`orion.core.io.database.pickleddb`.""" import logging import random import uuid from multiprocessing import Pool import pytest from filelock import FileLock, SoftFileLock, Timeout from orion.core.io.database import DatabaseTimeout, DuplicateKeyError from orion.cor...
12,042
test ccharp struct
from ctypes import * import unittest class SimpleTestCase(unittest.TestCase): def test_cint(self): x = c_int() self.assertEqual(x._objects, None) x.value = 42 self.assertEqual(x._objects, None) x = c_int(99) self.assertEqual(x._objects, None) def test_ccharp(sel...
12,043
get dict members
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ A base class is created. Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ import os import p...
12,044
recalculate devicetype template counts
from django.db import migrations from django.db.models import Count import utilities.fields def METHOD_NAME(apps, schema_editor): DeviceType = apps.get_model("dcim", "DeviceType") device_types = list(DeviceType.objects.all().annotate( _console_port_template_count=Count('consoleporttemplates', distinc...
12,045
sliding window
from __future__ import annotations import collections import itertools import json import shutil import os from collections.abc import Callable, Iterable from pathlib import Path as P from typing import Optional import click import requests import yaml # pylint: disable=redefined-builtin from requests.exceptions imp...
12,046
initpoint type
import math import numpy as np class Segment: '''A class wrapping segment data that must be passed through the work manager or data manager. Most fields are self-explanatory. One item worth noting is that a negative parent ID means that the segment starts from the initial state with ID -(segment.parent_...
12,047
convert old enum name
""" Models Node as a central element in a project's pipeline """ import re from copy import deepcopy from typing import Any, ClassVar, TypeAlias, Union from pydantic import ( BaseModel, ConstrainedStr, Extra, Field, Json, StrictBool, StrictFloat, StrictInt, validator, ) from ....
12,048
list
# 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...
12,049
check control d
#!/usr/bin/env python3 # Copyright (C) 2017 Alexandre Abadie <alexandre.abadie@inria.fr> # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys import os from testrunner import run EXPECTED_...
12,050
test magic methods not deferred
from __future__ import annotations import operator import pickle import pytest from pytest import param import ibis from ibis import _ @pytest.fixture def table(): return ibis.table({"a": "int", "b": "int", "c": "str"}) def test_hash(): """Deferred expressions must be hashable""" expr1 = _.a expr...
12,051
system data
# 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...
12,052
export model
#!/usr/bin/env python3 # 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 importlib from typing import List import torch.jit import torch.nn as nn from packaging import version from parl...
12,053
update
#!/usr/bin/env python """ATS input converter from 0.87 to 0.88""" import sys, os try: amanzi_xml = os.path.join(os.environ["AMANZI_SRC_DIR"], "tools","amanzi_xml") except KeyError: pass else: if amanzi_xml not in sys.path: sys.path.append(amanzi_xml) from amanzi_xml.utils import search as asearch...
12,054
init widgets
import re import tkinter as tk from tkinter import ttk from thonny import get_workbench from thonny.languages import tr from thonny.ui_utils import SafeScrollbar class OutlineView(ttk.Frame): def __init__(self, master): ttk.Frame.__init__(self, master) self.METHOD_NAME() self._tab_change...
12,055
test successful password
"""Test token view""" from json import loads from django.test import RequestFactory from django.urls import reverse from jwt import decode from authentik.blueprints.tests import apply_blueprint from authentik.core.models import Application, Group, Token, TokenIntents, UserTypes from authentik.core.tests.utils import ...
12,056
test add pipeline
# 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...
12,057
get name for component id
from collections.abc import Iterable from typing import ( Any, Optional, ) from reconcile.gql_definitions.fragments.vault_secret import VaultSecret from reconcile.gql_definitions.statuspage.statuspages import ( AppV1, ManualStatusProviderConfigV1, ManualStatusProviderV1, StatusPageComponentV1, ...
12,058
trigger release jobs
# Copyright 2014-2016 Open Source Robotics Foundation, 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 applicabl...
12,059
clear events
import pytest import sys import shlex import core.module import core.widget import core.config import core.input @pytest.fixture(autouse=True) def METHOD_NAME(): core.event.clear() @pytest.fixture def empty_config(): return core.config.Config([]) @pytest.fixture def widget_a(): return core.widget.Wi...
12,060
width
#!/usr/bin/python ################## # visHelpers.py # # Copyright David Baddeley, 2009 # d.baddeley@auckland.ac.nz # # 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 Lic...
12,061
add file to clean
# Copyright 2013 by Christian Brueffer. All rights reserved. # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for MSAProbs tool.""" import os import sys import unittest from Bio import Al...
12,062
test empty global tensor to
""" 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...
12,063
close
"""Functionality for reading in HDF5 files following the OpenPMD standard.""" __all__ = ["HDF5Reader"] import astropy.units as u import h5py import numpy as np from packaging.version import Version from pathlib import Path from plasmapy.plasma.exceptions import DataStandardError from plasmapy.plasma.plasma_base imp...
12,064
test no changes no calc
import os import tempfile import unittest import unittest.mock from medcat.cat import CAT from medcat.cdb import CDB from medcat.vocab import Vocab class CDBHashingTests(unittest.TestCase): temp_dir = tempfile.TemporaryDirectory() @classmethod def setUpClass(cls) -> None: cls.cdb = CDB.load(os.p...
12,065
model parameter vector
import copy import torch from torch import nn from ...core.alg_frame.client_trainer import ClientTrainer import logging def METHOD_NAME(model): param = [p.view(-1) for p in model.parameters()] return torch.concat(param, dim=0) def parameter_vector(parameters): param = [p.view(-1) for p in parameters.v...
12,066
get sub response
from __future__ import annotations import json import warnings from typing import ( TYPE_CHECKING, Any, Dict, List, Mapping, Optional, Type, cast, ) from sanic.request import Request from sanic.response import HTTPResponse, html from sanic.views import HTTPMethodView from strawberry.ht...
12,067
define flags
# Copyright 2020 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...
12,068
underlay port channel interfaces
# Copyright (c) 2023 Arista Networks, Inc. # Use of this source code is governed by the Apache License 2.0 # that can be found in the LICENSE file. from collections import ChainMap from ansible_collections.arista.avd.plugins.plugin_utils.avdfacts import AvdFacts from .utils import UtilsMixin class AvdInterfaceDescr...
12,069
test hmmerdomtab 30 hmmscan 001
# Copyright 2012 by Wibowo Arindrarto. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for SearchIO hmmer3-domtab indexing.""" import os import unittest from search_t...
12,070
get success url
from django.contrib.admin.utils import quote, unquote from django.core.exceptions import ImproperlyConfigured from django.shortcuts import get_object_or_404, redirect from django.urls import reverse from django.utils.translation import gettext_lazy as _ from django.views import View from django.views.generic.base impor...
12,071
get constant default population
# Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
12,072
test mx
# Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # 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 re...
12,073
test update
from naas.ntypes import t_notebook, t_add, t_delete, t_update from naas.runner.jobs import Jobs from naas.runner.logger import Logger from naas.runner import n_env import pytest # noqa: F401 import json import uuid import os clean = True init_data = [] user_folder_name = "test_user_folder" test_file = "test_add.py" ...
12,074
register type
"""Builders to generate in memory representation of model and fields tree.""" from __future__ import absolute_import from collections import defaultdict import six from . import errors from .fields import NotSet class Builder(object): def __init__(self, parent=None, nullable=False, default=NotSet): s...
12,075
parse transcript record
import collections import gzip import logging import os from tqdm import tqdm from django.core.management.base import CommandError from reference_data.management.commands.utils.download_utils import download_file from reference_data.models import GeneInfo, TranscriptInfo, GENOME_VERSION_GRCh37, GENOME_VERSION_GRCh38 ...
12,076
set beam splash run settings
from __future__ import print_function from __future__ import absolute_import import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing import sys from .dqmPythonTypes import * options = VarParsing.VarParsing('analysis') # options.inputFiles are inherited from 'analysis' options.reg...
12,077
get partial resource type
from typing import TYPE_CHECKING, Any, Generic, Optional, Type, TypeVar, Union, cast import pydantic from pydantic import Field from typing_extensions import Annotated, dataclass_transform, get_origin from dagster._core.errors import DagsterInvalidDagsterTypeInPythonicConfigDefinitionError from .utils import safe_is...
12,078
test failure 2
import unittest import hcl2 from checkov.terraform.checks.resource.gcp.GoogleComputeSerialPorts import check from checkov.common.models.enums import CheckResult class TestGoogleComputeSerialPorts(unittest.TestCase): def test_failure_1(self): hcl_res = hcl2.loads(""" resource "google_compute...
12,079
last modified by 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 __all__ ...
12,080
test get all apis
# Copyright 2017 The Forseti Security 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 ap...
12,081
test estimate read filtering minimal
import deeptools.estimateReadFiltering as est import deeptools.alignmentSieve as sieve import os.path from os import unlink import hashlib import pysam ROOT = os.path.dirname(os.path.abspath(__file__)) + "/test_data/" BAMFILE_FILTER = ROOT + "test_filtering.bam" BEDFILE_FILTER = ROOT + "test_filtering.blacklist.bed" ...
12,082
navigate
# Copyright (c) 2019-2023 Vector 35 Inc # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, ...
12,083
has permission
from django.apps.registry import apps from django.db.models import Q from rest_framework.decorators import action from rest_framework.response import Response from drfautoapi.drfautoapi import ApiViewSetConstrutor, \ customize, wrapper_queryset_response_for_drf_action from sapl.api.permissions import SaplModelPer...
12,084
two step2
import attr import pytest from ... import _abc, _core from .tutil import check_sequence_matches @attr.s(eq=False, hash=False) class TaskRecorder: record = attr.ib(factory=list) def before_run(self): self.record.append(("before_run",)) def task_scheduled(self, task): self.record.append((...
12,085
establish connection
from typing import Optional from ...configuration.utilities import enable_yaml_load from ...exceptions.executorexceptions import CommandExecutionFailure from ...interfaces.executor import Executor from ..attributedict import AttributeDict import asyncio import asyncssh from asyncstdlib import ( ExitStack as AsyncE...
12,086
test dataset aggregate string types size
import logging from unittest import SkipTest import numpy as np try: import cudf except ImportError: raise SkipTest("Could not import cuDF, skipping cuDFInterface tests.") from holoviews.core.data import Dataset from holoviews.core.spaces import HoloMap from .base import HeterogeneousColumnTests, Interface...
12,087
test old data dir docker no version
from pathlib import Path import pytest from monkey_island.cc.setup.data_dir import IncompatibleDataDirectory, setup_data_dir from monkey_island.cc.setup.env_utils import DOCKER_ENV_VAR from monkey_island.cc.setup.version_file_setup import _version_filename current_version = "1.1.1" old_version = "1.1.0" @pytest.fi...
12,088
test multiple status node
import numpy as np import pytest from hypothesis import given from hypothesis.strategies import text from numpy.testing import assert_array_equal from landlab import RasterModelGrid from landlab.field import GroupError from landlab.values import constant, plane, random, units from landlab.values.synthetic import _plan...
12,089
infer net
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable ...
12,090
get state by prefix
# Copyright 2017 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 wri...
12,091
test hyper graph cycle
# Copyright 2020 The AutoKeras 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 i...
12,092
test quote plus unicode compound
import json from pathlib import Path from unittest.mock import MagicMock, Mock, patch from urllib.parse import unquote_plus import pytest from tribler.gui.utilities import TranslatedString, compose_magnetlink, create_api_key, dict_item_is_any_of, \ duration_to_string, format_api_key, get_i18n_file_path, get_langu...
12,093
test truncated range
# # 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...
12,094
add delivery cost to so
# Copyright 2021 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from lxml import etree from odoo import fields, models from odoo.osv import expression from odoo.tools.safe_eval import safe_eval from odoo.addons.base.models.ir_ui_view import ( transfer_modifiers_to_node, transfer...
12,095
test nat simple mode3
#!/router/bin/python from .trex_general_test import CTRexGeneral_Test, CTRexScenario from .tests_exceptions import * import time from CPlatform import CStaticRouteConfig, CNatConfig from nose.tools import assert_equal class CTRexNoNat_Test(CTRexGeneral_Test):#(unittest.TestCase): """This class defines the NAT tes...
12,096
get index sql
from typing import TYPE_CHECKING, Any, List, Type from tortoise.backends.base.schema_generator import BaseSchemaGenerator from tortoise.converters import encoders from tortoise.fields import CASCADE, SET_NULL if TYPE_CHECKING: # pragma: nocoverage from tortoise.backends.oracle import OracleClient from tortoi...
12,097
check roundtrip
"""Tests for the unparse.py script in the Tools/parser directory.""" import unittest import test.support import io import os import random import tokenize import ast from test.test_tools import basepath, toolsdir, skip_if_missing skip_if_missing() parser_path = os.path.join(toolsdir, "parser") with test.support.Di...
12,098
is subordinate
# Copyright 2023 Canonical Ltd. # Licensed under the Apache V2, see LICENCE file for details. import logging from . import model from .errors import JujuEntityNotFoundError log = logging.getLogger(__name__) class Endpoint: def __init__(self, model, data): self.model = model self.data = data ...
12,099
create layout
# See LICENSE for licensing information. # # Copyright (c) 2016-2023 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from openram.base import design from openram.sra...