id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
18,300
get options label
# tool_eraser.py # # Copyright 2018-2023 Romain F. T. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program...
18,301
extract metadata
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, parse_iso8601, float_or_none, int_or_none, compat_str, determine_ext, ) class HitboxIE(InfoExtractor): IE_NAME = 'hitbox' _VALID_URL = r'https?://(?:w...
18,302
test dataset name
# ---------------------------------------------------------------------------- # Copyright (C) 2021 Deepchecks (https://www.deepchecks.com) # # This file is part of Deepchecks. # Deepchecks is distributed under the terms of the GNU Affero General # Public License (version 3 or later). # You should have received a copy ...
18,303
do roundtrip
from io import StringIO import re import astropy.units as u import numpy as np import pytest from hypothesis import given from hypothesis.strategies import lists, tuples, from_regex from pint.toa import get_TOAs basic_tim_header = "FORMAT 1\n" basic_tim = """ 53358.000056.3.000.000.9y.x.ff 424.000000 53358.767912764...
18,304
test repr
from io import StringIO from unittest import TestCase import pytest from micall.resistance.genreport import ReportTemplate, ReportPage, read_config, read_resistance, read_mutations class GenReportTest(TestCase): def test_unknown_keys(self): with self.assertRaisesRegex( ValueError, ...
18,305
test scope reenter
import pytest from nni.mutable import label_scope, auto_label from nni.mutable.utils import reset_uid def test_label_simple(): reset_uid('global') with label_scope('param'): label1 = auto_label() label2 = auto_label() with label_scope() as scope: assert scope.activated ...
18,306
parse int2
''' Parser utilities ================ Helper functions used for CSS parsing. ''' __all__ = ('parse_color', 'parse_int', 'parse_float', 'parse_string', 'parse_bool', 'parse_int2', 'parse_float4', 'parse_filename') import re from kivy.logger import Logger from kivy.resources import resource_find ...
18,307
system
import os import platform import csv from typing import TYPE_CHECKING from xdg import ( xdg_cache_home, xdg_config_dirs, xdg_config_home, xdg_data_dirs, xdg_data_home, xdg_runtime_dir, xdg_state_home, ) from tackle.settings import settings if TYPE_CHECKING: from tackle.models import Co...
18,308
test
from __future__ import print_function ############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free softwar...
18,309
test fcntl fileno
"""Test program for the fcntl C module. """ import platform import os import struct import sys import unittest from test.support import (verbose, TESTFN, unlink, run_unittest, import_module, cpython_only) # Skip test if no fcntl module. fcntl = import_module('fcntl') # TODO - Write tests fo...
18,310
badge disk icon
# -*- coding: utf-8 -*- from __future__ import unicode_literals from Quartz import * import math _REMOVABLE_DISK_PATH = '/System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Removable.icns' def METHOD_NAME(badge_file, output_file): # Load the Removable disk icon url = CFURLCreateWithFileSystemP...
18,311
get sample by label
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyowm.commons import exceptions from pyowm.utils import formatting, timestamps from pyowm.weatherapi25 import location class NO2Index: """ A class representing the Nitrogen DiOxide Index observed in a certain location in the world. The index is made up o...
18,312
versions details
""" Dot NET functions .. versionadded:: 3001 """ import salt.utils.platform import salt.utils.win_reg as win_reg from salt.utils.versions import Version __virtualname__ = "dotnet" # Although utils are often directly imported, it is also possible to use the # loader. def __virtual__(): """ Only load if plat...
18,313
prepare 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 ...
18,314
test enabled warning status
import mock import pytest from uaclient import exceptions, messages from uaclient.entitlements.entitlement_status import ApplicationStatus from uaclient.entitlements.landscape import LandscapeEntitlement class TestLandscapeEntitlement: @pytest.mark.parametrize( [ "assume_yes", "ex...
18,315
prune invalid filenames
"""Analyze code coverage data to determine which integration test targets provide coverage for each arc or line.""" from __future__ import annotations import os import typing as t from .....encoding import ( to_text, ) from .....data import ( data_context, ) from .....util_common import ( ResultType, ) ...
18,316
java class name
# 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 use ...
18,317
include filter
#! /usr/bin/env python import os, sys, shutil from waflib.TaskGen import feature, before, after from waf_dynamo import platform_supports_feature @feature('sdk_include_filter') @before('c') def sdk_include_filter(self): dynamo_home = self.env['DYNAMO_HOME'] new_cpppath = [os.path.join(self.env['DYNAMO_HOME'], '...
18,318
on changed
# *************************************************************************** # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
18,319
get virtual network gateway nat rule output
# 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...
18,320
to str
# 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...
18,321
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 . imp...
18,322
reload
""" The service module for NetBSD .. important:: If you feel that Salt should be using this module to manage services on a minion, and it is using a different module (or gives an error similar to *'service.start' is not available*), see :ref:`here <module-provider-override>`. """ import fnmatch import...
18,323
bool from request
""" Greynir: Natural language processing for Icelandic Copyright (C) 2023 Miðeind ehf. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, ...
18,324
as artist
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module defines point regions in both pixel and sky coordinates. """ import numpy as np from regions.core.attributes import (RegionMetaDescr, RegionVisualDescr, ScalarPixCoord, ScalarSkyCoord) from regions.cor...
18,325
channel
from typing import Tuple import imagehash from pydantic import BaseModel, HttpUrl from tortoise import fields import config from constants import SSType from core import Context from models import BaseDbModel from models.helpers import * from utils import emote class ImageResponse(BaseModel): url: HttpUrl d...
18,326
test animate with anim with option
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring import unittest from ipyvizzu import ( Animate, AnimationMerger, ChartProperty, Config, EventHandler, EventOff, EventOn, Feature, Log, Method, Snapshot, Store, Style, ) c...
18,327
pytest configure
# -*- coding: utf-8 -*- """ generic mechanism for marking and selecting python functions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from .legacy import matchkeyword from .legacy import matchmark from .structures import EMPTY_PARAMETERSET_OPTION fro...
18,328
get inject configs
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
18,329
test get redis cache
"""Test funmooc cache plugin""" # pylint: disable=protected-access import datetime from unittest import mock from django.core.cache.backends.dummy import DummyCache from django.test import TestCase, override_settings from django_redis.cache import RedisCache from ..cache import RedisCacheWithFallback class RedisCa...
18,330
imread
__all__ = ['imread', 'imsave'] import numpy as np from PIL import Image from ...util import img_as_ubyte, img_as_uint def METHOD_NAME(fname, dtype=None, img_num=None, **kwargs): """Load an image from file. Parameters ---------- fname : str or file File name or file-like-object. dtype : ...
18,331
make dataset
# Copyright 2019 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
18,332
extract data
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
18,333
escape
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2023 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
18,334
test jwt token user authentication custom tokenuser
# -*- coding: utf-8 -*- # 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/. # # Copyright (c) 2021-present Kaleidos Ventures SL # # The code is partially taken (and modified...
18,335
test cache
############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # 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 SOF...
18,336
log info
import json import logging import pprint import shutil import subprocess from types import SimpleNamespace import attr from tests.conftest import REPO_ROOT log = logging.getLogger(__name__) @attr.s(frozen=True) class ProcessResult: """ This class serves the purpose of having a common result class which wil...
18,337
test realizations in toplevel dir
# Licensed under a 3-clause BSD style license - see LICENSE.rst # STDLIB import pickle # THIRD PARTY import pytest # LOCAL import astropy.cosmology.units as cu import astropy.units as u from astropy import cosmology from astropy.cosmology import parameters, realizations from astropy.cosmology.realizations import Pla...
18,338
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...
18,339
do extract values
from string import ascii_lowercase, ascii_uppercase, digits import toga from toga import validators from toga.constants import COLUMN, RIGHT from toga.style import Pack EMPTY_PASSWORD = "Empty password" class TextInputApp(toga.App): # Button callback functions def METHOD_NAME(self, widget, **kwargs): ...
18,340
base path
# 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...
18,341
os path isfile patch
# Copyright (c) 2018 Foundries.io # Copyright (c) 2019 Nordic Semiconductor ASA. # # SPDX-License-Identifier: Apache-2.0 import argparse import os from unittest.mock import patch, call import pytest from runners.dfu import DfuUtilBinaryRunner, DfuSeConfig from conftest import RC_KERNEL_BIN DFU_UTIL = 'dfu-util' TES...
18,342
get name
# Copyright (C) 2022 CVAT.ai Corporation # # SPDX-License-Identifier: MIT import csv import json import os import random import sys from itertools import product NAME = "organizations" def read_rules(name): rules = [] with open(os.path.join(sys.argv[1], f"{name}.csv")) as f: reader = csv.DictReader(...
18,343
add center line
import copy import operator import logging logger = logging.getLogger(__name__) class Grid: def __init__( self): """ grid is a list of pairs: the grid coord and associated attributes (e.g., width, color) """ self.grid = [] self.legalIndices = set() def semantic( self):...
18,344
from yaml
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from typin...
18,345
lint css files
# 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...
18,346
update
"""Displays the current song being played and allows pausing, skipping ahead, and skipping back. Requires the following library: * python-dbus Parameters: * spotify.format: Format string (defaults to '{artist} - {title}') Available values are: {album}, {title}, {artist}, {trackNumber} * spotify.la...
18,347
decode landm
# -------------------------------------------------------- # Modified from https://github.com/biubug6/Pytorch_Retinaface # -------------------------------------------------------- from itertools import product as product from math import ceil import numpy as np import torch class PriorBox(object): def __init__...
18,348
test get or create
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
18,349
to df
"""Reddit Helpers.""" __docformat__ = "numpy" import logging import re import urllib.request from typing import List import pandas as pd import praw from prawcore.exceptions import ResponseException from openbb_terminal.core.models import UserModel from openbb_terminal.rich_config import console logger = logging.ge...
18,350
repr pretty
# Copyright 2023 Iguazio # # 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, softwa...
18,351
init layers
# Copyright (c) OpenMMLab. All rights reserved. import copy from typing import List, Sequence, Tuple import torch import torch.nn as nn from mmcv.cnn import Scale from mmengine import ConfigDict from mmengine.structures import InstanceData from torch import Tensor from mmdet.models.dense_heads import CenterNetUpdateH...
18,352
set measurement mask
import dataclasses from typing import Union, Iterable, Dict, Tuple, Mapping, Optional from types import MappingProxyType import logging import numpy from qupulse.utils.types import TimeType from qupulse.hardware.dacs.dac_base import DAC from qupulse.hardware.dacs.alazar import AlazarProgram import atsaverage from at...
18,353
get
import asyncio import functools import logging from typing import Any, Awaitable, Callable, Optional, Union import httpx from fastapi import FastAPI, HTTPException from servicelib.json_serialization import json_dumps from starlette import status from tenacity._asyncio import AsyncRetrying from tenacity.before_sleep im...
18,354
test show list logged in staff
import tempfile from io import BytesIO from unittest.mock import patch from django.core.files import File from django.test import override_settings from django.urls import reverse, reverse_lazy from django_webtest import WebTest from openforms.accounts.tests.factories import StaffUserFactory, UserFactory from openfo...
18,355
select simple rnn internal ops to quantize
# -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2020, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
18,356
content disposition
import os.path import urllib from contextlib import contextmanager from mimetypes import guess_type from django.conf import settings from django.core.validators import FileExtensionValidator from django.db import models from django.dispatch import Signal from django.urls import reverse from django.utils.translation im...
18,357
parse pkcs12
# Copyright (c) 2015 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
18,358
build query for containerized cpu usage
from collections import OrderedDict from hikaru.model.rel_1_26 import Node from robusta.core.model.base_params import PrometheusParams from robusta.core.model.env_vars import PROMETHEUS_REQUEST_TIMEOUT_SECONDS from robusta.integrations.prometheus.utils import get_prometheus_connect class NodeCpuAnalyzer: # TODO...
18,359
prepare request
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
18,360
main
#!/usr/bin/env python3 """ Written to see how well a set of assembled transcripts covers reference transcripts, this script accepts a BLAST file (with -m 8 or -m 9 options) and reports the coverage of each query. Assumes BLAST was run like this: blastall -p blastn -d assembly.fasta -i query.fasta -m 9 -e 1 -o ass...
18,361
fsum
# pylint: disable=invalid-name import sys import os from functools import partial import numpy as np import tensorflow as tf import pytest from pytest_lazyfixture import lazy_fixture as lf thisfile = os.path.abspath(__file__) modulepath = os.path.dirname(os.path.dirname(thisfile)) sys.path.insert(0, modulepath) impo...
18,362
multi index matrix3d
""" Notes ----- 网格模块的核心部分,涉及编号,形函数等内容。 Authors ------- Huayi Wei, weihuayi@xtu.edu.cn """ import numpy as np class LinearMeshDataStructure(): def total_edge(self): NC = self.NC cell = self.cell localEdge = self.localEdge totalEdge = cell[:, localEdge].reshape(-1, 2) ...
18,363
get bios version
############################################################################# # # Component contains an implementation of SONiC Platform Base API and # provides the components firmware management function # ############################################################################# try: import subprocess fro...
18,364
test write csv generic
import tempfile import numpy as np from .. import csv_reader class TestCSV: def test_read_csv_generic(self): f = tempfile.NamedTemporaryFile(delete=False) f.write(b'type,x,y,z,extra1,extra2\n') f.write(b'Generic,1,2,3,a1,a2\n') f.write(b'Generic,1.2,2.4,3.6,b1,b2\n') f.clos...
18,365
clean clone or recover
#!/usr/bin/env python # coding=utf-8 import config import requests import json errcodelist = { '0': 'Exec success', '-1': 'Internal error', '-2': 'Server init fail', '-3': 'Server start fail', '-4': 'Service is stop', '-5': 'BadRequest: Invalid request', '-6': 'Task already exist', '-7'...
18,366
test probe no go sources
# This file is part of Checkbox. # # Copyright 2014 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, # as published by the Free Software Foundation. #...
18,367
get config
import json from enum import Enum from typing import TYPE_CHECKING, Any, Callable, Dict, ForwardRef, Optional, Tuple, Type, Union from typing_extensions import Literal, Protocol from .typing import AnyArgTCallable, AnyCallable from .utils import GetterDict from .version import compiled if TYPE_CHECKING: from typ...
18,368
default arg is name not names
from pytest import skip, raises from invoke.parser import Argument class Argument_: class init: "__init__" def may_take_names_list(self): names = ("--foo", "-f") a = Argument(names=names) # herp a derp for name in names: assert name...
18,369
get job details v1
import os from json.decoder import JSONDecodeError # noqa: TID251 - importing JSON in CI is OK from types import SimpleNamespace from typing import Dict, Optional import requests from requests.auth import HTTPBasicAuth from demisto_sdk.commands.common.logger import logger API_BASE_URL = "https://circleci.com/api" P...
18,370
add prefix
from __future__ import annotations from copy import deepcopy import sqlglot import sqlglot.expressions as exp from sqlglot.errors import ParseError from .default_from_jsonschema import default_value_from_schema def sqlglot_tree_signature(tree): """ A short string representation of a SQLglot tree. Allo...
18,371
get users
from __future__ import annotations import random import string from flask import current_app from flask_security import current_user, SQLAlchemySessionUserDatastore from flask_security.recoverable import update_password from email_validator import ( validate_email, EmailNotValidError, EmailUndeliverableEr...
18,372
test where to add values where is
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...
18,373
register track func
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from __future__ import annotations import logging from typing import List, Dict, overload import torch from torch import Tensor from ..base.compressor import Compressor, Quantizer from ..base.wrapper import ModuleWrapper from ..base.target_spa...
18,374
exchange id
# # Copyright 2021 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
18,375
weights
"""Unscented Kalman filtering / spherical cubature Kalman filtering.""" import numpy as np import scipy.linalg from probnum import randprocs, randvars from ._interface import _LinearizationInterface class DiscreteUKFComponent( _LinearizationInterface, randprocs.markov.discrete.NonlinearGaussian ): """Discr...
18,376
teams
"""Views for organizations.""" from __future__ import annotations from typing import List, Optional, Tuple from flask import abort, render_template, request, url_for from baseframe import _ from baseframe.forms import render_delete_sqla, render_form, render_message from coaster.auth import current_auth from coaster...
18,377
add
# write a mesh in OGRE XML format import sys #import libxml2 as myxml import xmlout as myxml import pprint def vector_to_xml(elem, vector, coord_names): for i in range(len(coord_names)): coord = "%.6f" % vector[i] elem.setProp(coord_names[i], coord) class ogre_writer: def __init__(self): self.xmldoc = m...
18,378
get parameters
"""Flower Client for CIFAR10/100.""" from collections import OrderedDict from pathlib import Path from typing import Callable, Dict, Tuple import flwr as fl import numpy as np import torch from flwr.common.typing import NDArrays, Scalar from torch.utils.data import DataLoader from .utils import ClientDataset, get_c...
18,379
get serializer class
import datetime from django.db.models import Q from django.http import HttpResponse from rest_framework import viewsets, status, mixins from rest_framework.decorators import action from rest_framework.permissions import AllowAny from rest_framework.response import Response from api.models.ApprovedFuel import Approve...
18,380
test large binning
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
18,381
get vrms
import sys import numpy as np from NuRadioReco.detector import detector from NuRadioReco.modules.io import NuRadioRecoio from NuRadioReco.modules.neutrinoDirectionReconstructor import voltageToEfieldAnalyticConverterForNeutrinos from NuRadioMC.utilities import medium from NuRadioReco.utilities import units, fft, trace_...
18,382
get cui for hp id
__author__ = 'Finn Womack' __copyright__ = 'Oregon State University' __credits__ = ['Finn Womack'] __license__ = 'MIT' __version__ = '0.1.0' __maintainer__ = '' __email__ = '' __status__ = 'Prototype' import _mysql import pandas as pd import _mysql_exceptions class QueryUMLSSQL(): def __init__(self, host, port, us...
18,383
unload phase far
from direct.directnotify.DirectNotifyGlobal import directNotify class PhasedObject: """ This class is governs the loading and unloading of successive phases in an ordered and automatic manner. An object can only have one phase at any given moment. At the completion of setPhase() the current and a...
18,384
test closed typing tuple output fail
from typing import Tuple import pytest from dagster import DagsterTypeCheckDidNotPass, In, Out, op from dagster._core.types.python_tuple import create_typed_tuple from dagster._utils.test import wrap_op_in_graph_and_execute def test_vanilla_tuple_output(): @op(out=Out(tuple)) def emit_tuple(): return...
18,385
set repo default for current environment
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
18,386
test ask 50 center detection
import unittest import numpy as np from tests.test_util import get_path_for_data_file from urh.ainterpretation.AutoInterpretation import detect_center from urh.cythonext.signal_functions import afp_demod from urh.signalprocessing.Filter import Filter, FilterType from urh.signalprocessing.Signal import Signal class...
18,387
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...
18,388
test bad open helptext
# ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors # All rights reserved. # # The full license is in the LICENSE file, distributed with this software. # ----------------------------------------------------------------------...
18,389
get social login provider
# Copyright (c) 2017, Frappe Technologies and contributors # License: MIT. See LICENSE import json import frappe from frappe import _ from frappe.model.document import Document class BaseUrlNotSetError(frappe.ValidationError): pass class AuthorizeUrlNotSetError(frappe.ValidationError): pass class AccessTokenU...
18,390
test datagram bytes
import pytest from panda3d import core import tempfile # Fixtures for generating interesting datagrams (and verification functions) on # the fly... @pytest.fixture(scope='module', params=[False, True], ids=['stdfloat_float', 'stdfloat_double']) def datagram_small(request): """Retur...
18,391
get snapshot
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import time from typing import Optional, Tuple, cast import psutil from pants.engine.fs import PathGlobs, Snapshot from pants.engine.internals.scheduler import ExecutionTi...
18,392
start auth
""" OAuth backend for LinkedIn """ import json import logging import requests from oic.utils.authn.authn_context import UNSPECIFIED from oic.oauth2.consumer import stateID from oic.oauth2.message import AuthorizationResponse from satosa.backends.oauth import _OAuthBackend from satosa.internal import AuthenticationInf...
18,393
diff one
from typing import Optional, Tuple, TypeVar, List import argparse import asyncio import orjson import logging import sys from concurrent.futures import ThreadPoolExecutor from ..utils.rich_progress_bar import SimpleRichProgressBar, SimpleRichProgressBarTask from .router_fs import RouterAsyncFS from .fs import AsyncFS...
18,394
get partition table type
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
18,395
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
18,396
show summary
from __future__ import absolute_import, division, print_function from cctbx import miller from cctbx import crystal from cctbx import sgtbx from cctbx import uctbx from cctbx.array_family import flex import sys import boost_adaptbx.boost.python as bp from six.moves import range dtrek_ext = bp.import_ext("iotbx_dtrek_e...
18,397
trans weight unit
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 ...
18,398
export
#! /usr/bin/python3 # -*- coding: utf-8 -*- """Test Import / Export and recording. recording-test.py loads a WAV file, plays it, recording at the same time until the end of the track, and then exports the recording as a WAV with "-out" appended to the file name. To run the test without input prompts, set valid value...
18,399
test grant roles with special characters in
# -*- coding: utf-8 -*- import pytest import time from .test_base_class import TestBaseClass from aerospike import exception as e import aerospike class TestGrantRoles(TestBaseClass): pytestmark = pytest.mark.skipif( not TestBaseClass.auth_in_use(), reason="No user specified, may be not secured cluster...