id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
2,400
create or update
from __future__ import annotations import itertools from functools import reduce from typing import Any, Tuple, Type from django.db import IntegrityError, router, transaction from django.db.models import Model, Q from django.db.models.expressions import CombinedExpression from django.db.models.signals import post_sav...
2,401
get word rep
"""stimuli utility funcs for the stroop experiment assume red is the "dominant color" - which should be okay since stroop task is symmetric w.r.t to color """ import numpy as np # constants COLORS = ['red', 'green'] TASKS = ['color naming', 'word reading'] CONDITIONS = ['control', 'conflict', 'congruent'] # input che...
2,402
test set spikes
# Copyright (c) 2017 The University of Manchester # # 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 ...
2,403
subtest convergence order
import numpy as np import unittest import simsoptpp as sopp from numpy.testing import assert_raises def get_random_polynomial(dim, degree): coeffsx = np.random.standard_normal(size=(degree+1, dim)) coeffsy = np.random.standard_normal(size=(degree+1, dim)) coeffsz = np.random.standard_normal(size=(degree+1...
2,404
dummy callback
# Standard library from __future__ import division, print_function, absolute_import, unicode_literals # On some systems mpi4py is available but broken we avoid crashes by importing # it only when an MPI Pool is explicitly created. # Still make it a global to avoid messing up other things. MPI = None # Project from . ...
2,405
get model params
import torch import torchvision.transforms as transforms from torchvision.datasets import CIFAR10 import warnings warnings.filterwarnings("ignore") # DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") def load_data(): """Load CIFAR-10 (training and test set).""" transform = transforms....
2,406
test reduce slice sum2 d
# 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...
2,407
do down
import signal import sys from bdb import Bdb from cmd import Cmd from collections.abc import Callable, Iterable, Mapping, Sequence from inspect import _SourceObjectType from types import CodeType, FrameType, TracebackType from typing import IO, Any, ClassVar, TypeVar from typing_extensions import ParamSpec, Self __all...
2,408
gen flow
from typing import Any, Dict, List, Literal, Union import pandas as pd from prefect import Flow, Task, apply_map from viadot.task_utils import ( add_ingestion_metadata_task, credentials_loader, df_to_csv, df_to_parquet, union_dfs_task, ) from viadot.tasks import AzureDataLakeUpload, OutlookToDF ...
2,409
load db
#!/usr/bin/env python3 # coding: utf-8 -*- # # Author: badz & pipiche38 # import logging import Classes.ZigpyTransport.AppGeneric import zigpy.config as zigpy_conf import zigpy.device import zigpy.profiles import zigpy.zdo.types as zdo_types import zigpy_znp.commands.util import zigpy_znp.config as znp_conf import zi...
2,410
last alive time
# 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__ ...
2,411
dcuboid
import numpy as np from .geoalg import project def dcircle(p, cxy=[0, 0], r=1): x = p[..., 0] y = p[..., 1] return np.sqrt((x - cxy[0])**2 + (y - cxy[1])**2) - r def drectangle(p, box): x = p[..., 0] y = p[..., 1] d = dmin(y - box[2], box[3] - y) d = dmin(d, x - box[0]) d = dmin(d, box...
2,412
split namespace
import ctypes import struct # 3p import bson from bson.codec_options import CodecOptions from bson.son import SON # project from ...ext import net as netx from ...internal.compat import to_unicode from ...internal.logger import get_logger log = get_logger(__name__) # MongoDB wire protocol commands # http://docs.m...
2,413
test by pid dwarf
# Copyright (c) Meta Platforms, Inc. and affiliates. # SPDX-License-Identifier: LGPL-2.1-or-later import os import unittest from drgn import Object, Program from tests import assertReprPrettyEqualsStr from tests.linux_kernel import ( LinuxKernelTestCase, fork_and_sigwait, setenv, skip_unless_have_stac...
2,414
verify captcha
import secrets from typing import Optional from aiohttp import ClientSession from fastapi import HTTPException from fastapi.security import OAuth2PasswordBearer, SecurityScopes from passlib.context import CryptContext from starlette.requests import Request from starlette.status import HTTP_401_UNAUTHORIZED, HTTP_403_F...
2,415
run forever
"""From https://github.com/erdewit/nest_asyncio""" import asyncio import asyncio.events as events import os import sys import threading from contextlib import contextmanager, suppress from heapq import heappop def apply(loop=None): """Patch asyncio to make its event loop reentrant.""" _patch_asyncio() _pa...
2,416
extract sdk
# # Copyright 2018 by Garmin Ltd. or its subsidiaries # # SPDX-License-Identifier: MIT # from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor class TestSDKBase(object): @staticmethod def get_sdk_configuration(d, test_type): import platform import oe.lsb from oeqa.uti...
2,417
create prepared statement
"""Amazon Athena Module gathering all functions related to prepared statements.""" import logging from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, cast import boto3 from botocore.exceptions import ClientError from awswrangler import _utils, exceptions from awswrangler._config import apply_config...
2,418
features
"""Host function like audio, D-Bus or systemd.""" from contextlib import suppress from functools import lru_cache import logging from awesomeversion import AwesomeVersion from ..const import BusEvent from ..coresys import CoreSys, CoreSysAttributes from ..exceptions import HassioError, HostLogError, PulseAudioError f...
2,419
get config dict
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
2,420
set image to pre view
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2018, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
2,421
test urls used by tornado client
""" Unit test on client selection: - By default: RPCClient should be used - If we use Tornado service TornadoClient is used Should work with - 'Component/Service' - URL - List of URL Mock Config: - Service using HTTPS with Tornado - Service using Dis...
2,422
symbolic bcast
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import numpy as np import dace from common import compare_numpy_output ### Left, match first pos ###################################################### @compare_numpy_output() def test_subl1(A: dace.float64[5, 3], B: dace.float64[3]): r...
2,423
create network
from unittest import TestCase from lamden.crypto.wallet import Wallet from lamden.network import Network from lamden.peer import Peer import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) GET_ALL_PEERS = "get_all_peers" GET_LATEST_BLOCK = 'get_latest_block' class TestMultiNode(TestCas...
2,424
test array dual
# *************************************************************** # Copyright (c) 2023 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
2,425
test
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2013 EOX IT Services GmbH # # Permission...
2,426
get available tables
# Licensed under a 3-clause BSD style license - see LICENSE.rst from io import StringIO, BytesIO from astropy.io import votable import astropy.units as u from astropy.table import Table from requests import HTTPError from astroquery.query import BaseQuery from astroquery.exceptions import InvalidQueryError from astr...
2,427
fix files
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
2,428
filter param
# Copyright 2021-2022 The Alibaba Fundamental Vision Team Authors. All rights reserved. import os.path as osp from typing import Any, Dict import numpy as np import torch from modelscope.metainfo import Models from modelscope.models.base import TorchModel from modelscope.models.builder import MODELS from modelscope....
2,429
discriminator
# coding: utf-8 """ Paasta API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 impor...
2,430
test csv tsv parser with csv
""" Tests of neo.rawio.phyrawio Author: Regimantas Jurkus """ import unittest from neo.rawio.phyrawio import PhyRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO import csv import tempfile from pathlib import Path from collections import OrderedDict import sys class TestPhyRawIO(BaseTestRawIO...
2,431
test pol list
##################################################################### # Module for testing the functionality of the SNAP processing module ##################################################################### import os import pytest from pyroSAR import identify from pyroSAR.snap import geocode from spatialist import bb...
2,432
fwd
# coding=utf-8 # Copyright 2022 The Pax 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 ag...
2,433
filter accepts row
###################################################################################################################### # Copyright (C) 2017-2022 Spine project consortium # This file is part of Spine Toolbox. # Spine Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Gen...
2,434
fit func ex
import numpy as np import scipy import scipy.linalg.basic as slb from scipy.optimize import leastsq from . import functions import qt from qt import plot as plot from lmfit import minimize, Parameters, Parameter, report_fit def residuals_lmfit(pars, fit_func, data): res = fit_func(pars)-data #print type(dat...
2,435
to json
# Copyright The OpenTelemetry 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 ...
2,436
policy name empty
# -*- coding: utf-8 -*- # # LinOTP - the open source solution for two factor authentication # Copyright (C) 2010-2019 KeyIdentity GmbH # Copyright (C) 2019- netgo software GmbH # # This file is part of LinOTP server. # # This program is free software: you can redistribute it and/or # modify it und...
2,437
parse arguments
#!/usr/bin/env python import argparse import importlib import logging import re import sys from pathlib import Path from typing import Iterator, List, Optional, Set, Type from streamlink import Streamlink from streamlink.logger import basicConfig # add root dir to sys path, so the "tests" package can be imported sy...
2,438
get position
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. try: from msvcrt import get_osfhandle except ImportError: def get_osfhandle(_): raise OSError("This isn't windows!") from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 ...
2,439
build
from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtim...
2,440
day of week
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
2,441
set up
# coding: utf-8 # Copyright (C) 1994-2021 Altair Engineering, Inc. # For more information, contact Altair at www.altair.com. # # This file is part of both the OpenPBS software ("OpenPBS") # and the PBS Professional ("PBS Pro") software. # # Open Source License Information: # # OpenPBS is free software. You can redistr...
2,442
test token is none then set
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import os from datetime import datetime import pytest from requre.utils import get_datafile_filename from requre.online_replacing import record_requests_for_all_methods from tests.integration.pagure.base import PagureTests from ogr import...
2,443
strip function space
# -*- coding: utf-8 -*- """Algorithm for replacing form arguments with 'stripped' versions where any data-carrying objects have been extracted to a mapping.""" from ufl.classes import Form, Integral from ufl.classes import Argument, Coefficient, Constant from ufl.classes import FunctionSpace, TensorProductFunctionSpac...
2,444
rtptime
"""Base classes used by streaming protocols.""" from abc import ABC, abstractmethod import asyncio import logging from random import randrange from typing import Optional, Tuple from pyatv.auth.hap_pairing import NO_CREDENTIALS, HapCredentials from pyatv.protocols.raop import timing from pyatv.protocols.raop.packets i...
2,445
wrapper
import asyncio import functools import logging import ssl import time from enum import Enum from typing import Dict from typing import Optional import msgpack from pydantic import BaseModel, validator import pika from pika.exceptions import AMQPConnectionError logger = logging.getLogger(__name__) def sync(f): ...
2,446
create connects
from PyQt5.QtCore import Qt, pyqtSlot from PyQt5.QtGui import QBrush, QColor, QIcon, QPen from PyQt5.QtWidgets import QMessageBox from urh import settings from urh.controller.dialogs.SendRecvDialog import SendRecvDialog from urh.dev.VirtualDevice import VirtualDevice, Mode from urh.signalprocessing.IQArray import IQAr...
2,447
str
from bsb import config from bsb.config import types from bsb.simulation.cell import CellModel from bsb.exceptions import AdapterError from bsb.reporting import warn import itertools as _it import collections try: import arbor _has_arbor = True except ImportError: _has_arbor = False import types as _t ...
2,448
bgp connected
import logging import pytest import re from collections import defaultdict from tests.common.helpers.assertions import pytest_assert from tests.common.utilities import wait_until from .vnet_constants import CLEANUP_KEY from .vnet_utils import cleanup_vnet_routes, cleanup_dut_vnets, cleanup_vxlan_tunnels, \ apply_d...
2,449
set geometry
#!/usr/bin/env python3 import os import sys import numpy as np import rospkg import rospy import yaml from gazebo_msgs.srv import GetModelState from geometry_msgs.msg import Point, Pose, PoseStamped, Vector3 from mil_misc_tools import text_effects from mil_msgs.srv import SetGeometry from std_msgs.msg import Header fr...
2,450
test aqt device str
# Copyright 2022 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
2,451
goal
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE import numpy as np from math impor...
2,452
test delimeter in text
"""Test v.in.ascii CSV capabilities :author: Vaclav Petras """ import os from grass.gunittest.case import TestCase from grass.gunittest.main import test from grass.script.core import read_command INPUT_NOQUOTES = """Id,POINT_X,POINT_Y,Category,ED field estimate 100,437343.6704,4061363.41525,High Erosion,Low Deposit...
2,453
find text in file
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
2,454
release locks
import datetime import uuid import psutil import os import time import logging import weakref from typing import Union from enum import Enum from pathlib import Path from dataclasses import dataclass, field from dateutil.relativedelta import relativedelta from filelock import UnixFileLock, SoftFileLock, Timeout from ...
2,455
test cpu routine
import unittest from unittest import mock import numpy import cupy from cupy import testing from cupyx import profiler from cupyx.profiler import _time class TestBenchmark(unittest.TestCase): def METHOD_NAME(self): with mock.patch('time.perf_counter', mock.Mock(side_effect=[2.4,...
2,456
to class
import pickle import cv2 import numpy as np from cv_bridge import CvBridge from mil_ros_tools import BagCrawler, CvDebug from .HOG_descriptor import HOGDescriptor from .SVM_classifier import SVMClassifier ___author___ = "Tess Bianchi" class Config: def __init__(self): self.classes = ["totem", "scan_the...
2,457
decrement quota
from viur.core import current, db, errors, utils from viur.core.tasks import PeriodicTask, DeleteEntitiesIter from typing import Literal, Union from datetime import timedelta class RateLimit(object): """ This class is used to restrict access to certain functions to *maxRate* calls per minute. Usa...
2,458
program listing
"""Learner dashboard views""" from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_GET from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication from rest_framework import permissions, status from rest_framework.authentication import Sessi...
2,459
test quaternion to rotation matrix y
import pytest import numpy as np from paz.backend.groups import homogenous_quaternion_to_rotation_matrix from paz.backend.groups import quaternion_to_rotation_matrix from paz.backend.groups import rotation_vector_to_rotation_matrix from paz.backend.groups import to_affine_matrix from paz.backend.groups import build_ro...
2,460
test log output strided
# Data Parallel Control (dpctl) # # Copyright 2020-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/LICE...
2,461
get all background task specs
""" collections of wrapper function for helping you to create BackgroundTask ~~BackgroundTasks:Feature~~ """ import inspect import pkgutil from typing import Callable, Type, Iterable, Tuple from huey import RedisHuey import portality.tasks from portality import models, constants from portality.background import Backg...
2,462
max pool node
import numpy as np import onnx ############## ## Settings ## ############## producer_name = "onnx-layer-zoo" input_name = "x" output_name = "y" #################### ## Helper methods ## #################### def make_network(name, node, input_shape, output_shape, aux_nodes): input = [onnx.helper.make_tensor_val...
2,463
html
import json from typing import Dict, Optional, Union from .explorer import Explorer from .template import read_template, render_template PLAYGROUND_HTML = read_template("playground.html") SettingsDict = Dict[str, Union[str, int, bool, Dict[str, str]]] class ExplorerPlayground(Explorer): def __init__( s...
2,464
id
from enum import IntFlag from typing import Dict, List from pyroute2 import MPTCP from socket import AF_INET, AF_INET6 from lnst.Common.IpAddress import ipaddress, BaseIpAddress class MPTCPFlags(IntFlag): # via https://github.com/torvalds/linux/blob/9d31d2338950293ec19d9b095fbaa9030899dcb4/include/uapi/linux/mptc...
2,465
test implicit group by
from tests.testmodels import Author, Book from tortoise.contrib import test from tortoise.functions import Avg, Count, Sum, Upper class TestGroupBy(test.TestCase): async def asyncSetUp(self) -> None: await super(TestGroupBy, self).asyncSetUp() self.a1 = await Author.create(name="author1") ...
2,466
test transform lattice
from __future__ import annotations import unittest from numpy.testing import assert_allclose from pymatgen.symmetry.settings import JonesFaithfulTransformation, Lattice, SymmOp __author__ = "Matthew Horton" __copyright__ = "Copyright 2017, The Materials Project" __version__ = "0.1" __maintainer__ = "Matthew Horton"...
2,467
serialize provider
from __future__ import annotations import logging from typing import Any, Dict, Mapping, MutableMapping, Optional, Sequence from sentry.api.serializers import Serializer, register, serialize from sentry.integrations import IntegrationProvider from sentry.models import Integration, OrganizationIntegration, User from s...
2,468
create product
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests.common import TransactionCase class TestGetWeight(TransactionCase): """Test get_weight functions.""" # some helpers def _create_order(self, customer): return self.env["sale.order"].create({"partner_id": customer.id}...
2,469
setup history
from __future__ import with_statement import os.path import sys from warnings import warn import java.lang.reflect.Array __all__ = ['add_history', 'clear_history', 'get_begidx', 'get_completer', 'get_completer_delims', 'get_current_history_length', 'get_endidx', 'get_history_item', 'get_history_...
2,470
set volume
# ruff: noqa: ARG002 from __future__ import annotations import logging from typing import TYPE_CHECKING, Any, ClassVar, Literal, Optional import pykka from pykka.typing import ActorMemberMixin, proxy_field, proxy_method from mopidy import listener if TYPE_CHECKING: from typing_extensions import TypeAlias ...
2,471
evaluate with adaptive batch size
# 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...
2,472
temp dir
"""Helpers for writing unit tests.""" from collections.abc import Iterable from io import BytesIO import os import re import shutil import sys import tempfile from unittest import TestCase as _TestCase from fontTools.config import Config from fontTools.misc.textTools import tobytes from fontTools.misc.xmlWriter import...
2,473
bulk index
# -*- coding: utf-8 -*- # # RERO ILS # Copyright (C) 2019-2022 RERO # Copyright (C) 2019-2022 UCLouvain # # 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, version 3 of the License. # # Thi...
2,474
biosample characterization 1
import pytest @pytest.fixture def biosample_characterization_no_review(testapp, award, lab, biosample, attachment): item = { 'characterizes': biosample['@id'], 'award': award['@id'], 'lab': lab['@id'], 'attachment': attachment, } return testapp.post_json('/biosample_charact...
2,475
decrypt
''' Brent Waters (Pairing-based) | From: "Functional Encryption for Regular Languages". | Published in: 2012 | Available from: http://eprint.iacr.org/2012/384 | Notes: | Security Assumption: | | type: functional encryption ("public index") | setting: Pairing :Authors: J Ayo Akinyele :Date: ...
2,476
remove all children
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
2,477
get numpy dtype info
# 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...
2,478
generate setup
""" Generates setups for tracer advection-diffusion MMS test """ import sympy from sympy import init_printing init_printing() # coordinates x, y, z = sympy.symbols('x y z') # domain lenght, x in [0, Lx], y in [0, Ly] lx, ly = sympy.symbols('lx ly') def is_constant(u): """ True if u does not depend on x,y,z...
2,479
get voltage
import os from Components.config import config, ConfigSubList, ConfigSubsection, ConfigSlider from Components.SystemInfo import BoxInfo from Tools.BoundFunction import boundFunction import NavigationInstance from enigma import iRecordableService, pNavigation class FanControl: # ATM there's only support for one fan...
2,480
qhull pkgconfig name
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.microsoft import is_msvc import os required_conan_version = ">=1.53.0" class QhullConan(ConanFile): name...
2,481
enricher rules
import logging from typing import TYPE_CHECKING, Any, Callable from rotkehlchen.accounting.structures.types import HistoryEventSubType, HistoryEventType from rotkehlchen.assets.asset import EvmToken from rotkehlchen.chain.ethereum.modules.balancer.constants import BALANCER_LABEL, CPT_BALANCER_V2 from rotkehlchen.chain...
2,482
request
# Copyright (c) 2011 Jeff Garzik # # Previous copyright, from python-jsonrpc/jsonrpc/proxy.py: # # Copyright (c) 2007 Jan-Klaas Kollhof # # This file is part of jsonrpc. # # jsonrpc is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # th...
2,483
pyinit
#------------------------------------------------------------------------------- # PorousStrengthModel #------------------------------------------------------------------------------- from PYB11Generator import * from StrengthModel import * from StrengthModelAbstractMethods import * @PYB11template("Dimension") @PYB11m...
2,484
test or
from itertools import islice import pytest from pkgcore.ebuild.eapi import get_eapi from pkgcore.ebuild.ebuild_src import base as ebuild from pkgcore.restrictions.required_use import find_constraint_satisfaction as solver def parse(required_use): o = ebuild(None, "dev-util/diffball-0.1-r1") object.__setattr...
2,485
init ui
# (C) Copyright 2004-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
2,486
set up
"""Integration tests for covidcast's metadata caching.""" # standard library import json import unittest # third party import mysql.connector import requests # first party from delphi_utils import Nans from delphi.epidata.client.delphi_epidata import Epidata import delphi.operations.secrets as secrets import delphi....
2,487
default resolver
import sys import warnings from . import constants from .exceptions import AsdfDeprecationWarning class Resolver: """ A class that can be used to map strings with a particular prefix to another. """ def __init__(self, mappings, prefix): """ Parameters ---------- m...
2,488
refresh state
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
2,489
get function defaults
import builtins import operator import types import unittest from _typeshed import IdentityFunction, Unused, _KT_contra, _VT_co from builtins import next as next from collections.abc import Callable, ItemsView, Iterable, Iterator as _Iterator, KeysView, Mapping, ValuesView from functools import wraps as wraps from impo...
2,490
refresh columns
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2022-2023 NV Access Limited # This file is covered by the GNU General Public License. # See the file COPYING for more details. from typing import ( Optional, ) import wx from gui import ( guiHelper, nvdaControls, ) from gui.dpiScalingHelper import DpiSca...
2,491
close
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
2,492
lowest mu
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ lib_acquisition_function.py """ import sys import numpy from scipy.stats import norm from scipy.optimize import minimize from . import lib_data def next_hyperparameter_expected_improvement(fun_prediction, ...
2,493
test from address w
import unittest from ctypes import * formats = "bBhHiIlLqQfd" formats = c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, \ c_long, c_ulonglong, c_float, c_double, c_longdouble class ArrayTestCase(unittest.TestCase): def test_simple(self): # create classes holding simple numeric types, and che...
2,494
check sudo
# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2014-2023 Greenbone AG # # SPDX-License-Identifier: AGPL-3.0-or-later from typing import Optional, Dict, Any import logging import subprocess import psutil logger = logging.getLogger(__name__) _BOOL_DICT = {'no': 0, 'yes': 1} class NASLCli: """Class for calli...
2,495
test cannot reserve seats waiting list if
from datetime import timedelta import pytest from django.utils.timezone import localtime from rest_framework import status from events.tests.utils import versioned_reverse as reverse from registrations.models import SeatReservationCode from registrations.tests.test_seatsreservation_post import assert_reserve_seats ...
2,496
acceptance fn divide
# Data Parallel Control (dpctl) # # Copyright 2020-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....
2,497
test context manager replace
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistribution and use in ...
2,498
test mine operation status reason code validate
import pytest from app.api.constants import MINE_OPERATION_STATUS, MINE_OPERATION_STATUS_REASON, MINE_OPERATION_STATUS_SUB_REASON from app.api.mines.status.models.mine_operation_status_code import MineOperationStatusCode from app.api.mines.status.models.mine_operation_status_reason_code import MineOperationStatusReaso...
2,499
ensure no l3 drops
import logging import re import json import pytest from tests.common.utilities import wait_until logger = logging.getLogger(__name__) # CLI commands to obtain drop counters. NAMESPACE_PREFIX = "sudo ip netns exec {} " NAMESPACE_SUFFIX = "-n {} " GET_L2_COUNTERS = "portstat -j " GET_L3_COUNTERS = "intfstat -j " ACL_CO...