id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,000
parse wheel
"""Support functions for working with wheel files. """ import logging from email.message import Message from email.parser import Parser from typing import Tuple from zipfile import BadZipFile, ZipFile from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import UnsupportedWheel VER...
16,001
data serializers
from __future__ import absolute_import ############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free softwa...
16,002
test auth with pw redacted
import os import tempfile from unittest import mock import pytest from pipenv.patched.pip._internal.operations.prepare import File from pipenv.utils.requirements import import_requirements from pipenv.project import Project @pytest.mark.cli @pytest.mark.deploy @pytest.mark.system @mock.patch("pipenv.utils.dependen...
16,003
convert train
# 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 argparse import os import os.path as op from collections import namedtuple from multiprocessing import cpu_count from typing import Li...
16,004
get project file root
import hashlib import os import shutil from django.conf import settings from physionet.utility import serve_file, sorted_tree_files, zip_dir from project.projectfiles.base import BaseProjectFiles from project.utility import ( clear_directory, get_directory_info, get_file_info, get_tree_size, list_i...
16,005
test infolm class
# Copyright The Lightning 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 law or agreed to in writin...
16,006
sig events refresh
import errno import logging import tornado.httpserver import tornado.ioloop from mitmproxy import addons from mitmproxy import flow from mitmproxy import log from mitmproxy import master from mitmproxy import options from mitmproxy import optmanager from mitmproxy.addons import errorcheck from mitmproxy.addons import...
16,007
add def
from typing import DefaultDict, Optional, List, Set, Tuple, TYPE_CHECKING from collections import defaultdict from angr.knowledge_plugins.key_definitions.atoms import Tmp from .constants import ObservationPointType, OP_BEFORE, OP_AFTER if TYPE_CHECKING: from .definition import Definition from angr.code_loca...
16,008
dict
# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2014-2023 Greenbone AG # # SPDX-License-Identifier: AGPL-3.0-or-later from unittest.mock import patch, MagicMock from xml.etree import ElementTree as et from ospd_openvas.daemon import OSPDopenvas class FakeDataManager: def __init__(self): pass de...
16,009
test tpid add lag mbr with non
import sys import os import click from click.testing import CliRunner import pytest import traceback test_path = os.path.dirname(os.path.abspath(__file__)) modules_path = os.path.dirname(test_path) scripts_path = os.path.join(modules_path, "scripts") sys.path.insert(0, test_path) sys.path.insert(0, modules_path) mock...
16,010
main
""" Copyright (c) 2021, NVIDIA CORPORATION. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
16,011
add connector
# This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # DEAP is distributed ...
16,012
forward
# 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 numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair class PQConv2...
16,013
col values
# Stubs for xlrd.sheet (Python 3) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from .biffh import * from .timemachine import * from typing import Any, Optional DEBUG: int OBJ_MSO_DEBUG: int class Sheet(BaseObject): name: str = ... book: Any = ... nrows: int = ... ncol...
16,014
get credential set 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...
16,015
get selected tracks
# Copyright (C) 2008-2010 Adam Olsen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that...
16,016
name
from pubnub import utils from pubnub.endpoints.endpoint import Endpoint from pubnub.errors import PNERR_MESSAGE_MISSING from pubnub.exceptions import PubNubException from pubnub.models.consumer.pubsub import PNPublishResult from pubnub.enums import HttpMethod, PNOperationType from pubnub.endpoints.mixins import TimeTok...
16,017
get name
from panda3d.core import ( AmbientLight, DirectionalLight, LightAttrib, Material, NodePath, PerspectiveLens, PointLight, Spotlight, VBase4, ) from direct.showbase.MessengerGlobal import messenger class DirectLight(NodePath): def __init__(self, light, parent): # Initial...
16,018
get workload network dns zone
# 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__ =...
16,019
format percentage
import json import re TEXT_CODES = {'bold': {'start': '\x1b[1m', 'end': '\x1b[22m'}, 'cyan': {'start': '\x1b[36m', 'end': '\x1b[39m'}, 'blue': {'start': '\x1b[34m', 'end': '\x1b[39m'}, 'red': {'start': '\x1b[...
16,020
ljust colored
from __future__ import annotations import os import re from collections import namedtuple from typing import Any from typing import List from . import theme NORMAL = "\x1b[0m" BLACK = "\x1b[30m" RED = "\x1b[31m" GREEN = "\x1b[32m" YELLOW = "\x1b[33m" BLUE = "\x1b[34m" PURPLE = "\x1b[35m" CYAN = "\x1b[36m" LIGHT_GREY...
16,021
prepare request
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
16,022
cache info
# The MIT License # # Copyright (c) 2018 aio-libs team https://github.com/aio-libs/ # Copyright (c) 2017 Ocean S. A. https://ocean.io/ # Copyright (c) 2016-2017 WikiBusiness Corporation http://wikibusiness.org/ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and assoc...
16,023
qplot
from __future__ import annotations import typing from contextlib import suppress from warnings import warn import numpy as np import pandas as pd from .exceptions import PlotnineError, PlotnineWarning from .facets import facet_grid, facet_null, facet_wrap from .facets.facet_grid import parse_grid_facets from .facets...
16,024
execute bootstrap
from logging import getLogger logger = getLogger('update') import contextlib import io import os import platform import requests import tempfile from wxUI import commonMessageDialogs import widgetUtils import webbrowser try: import czipfile as zipfile except ImportError: import zipfile from platform_utils imp...
16,025
test valid
# Copyright 2017 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
16,026
properties
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
16,027
main
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 """ Example: Variational Autoencoder ================================ """ import argparse import inspect import os import time import matplotlib.pyplot as plt from jax import jit, lax, random from jax.example_libraries import stax i...
16,028
main
# # 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...
16,029
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...
16,030
write to file
#!/usr/bin/env python """Doxygen XML to SWIG docstring converter for ITK classes. Usage: itk_doxy2swig.py [input directory name] [output swing interface file name] """ import sys import os import glob from doxy2swig import * from io import StringIO class itkDoxy2SWIG(Doxy2SWIG): def __init__(self, src, cpp_...
16,031
lookup
""" ARP service implementation Description: <FILL ME HERE> How to use: <FILL ME HERE> Author: Itay Marom """ from .trex_service import Service, ServiceFilter from ..trex_vlan import VLAN from ..trex_types import listify from scapy.layers.l2 import Ether, ARP, Dot1Q, Dot1AD from scapy.layers.inet import ...
16,032
run guest cmd
import re import time import logging from virttest import utils_package LOG_JOB = logging.getLogger('avocado.test') class IpuTest(object): """ Class for in_place_upgrade test in the vm """ def __init__(self, test, params): """ Init the default values of in_place_upgrade object. ...
16,033
tear down module
# Copyright 2020 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 required by applicable law or agreed to in writing, ...
16,034
cell to cell
import numpy as np import torch from torch import Tensor from .mesh_ds import MeshDataStructure, Redirector class Mesh3dDataStructure(MeshDataStructure): """ @brief The topology data structure of 3-d mesh.\ This is an abstract class and can not be used directly. """ # Variables face2c...
16,035
test backcompat resource tags
import pytest from dagster import DynamicOut, DynamicOutput, job, op from dagster._core.errors import DagsterInvalidConfigError from dagster._core.execution.api import create_execution_plan from dagster._core.execution.plan.state import KnownExecutionState from dagster_k8s.job import ( K8S_RESOURCE_REQUIREMENTS_KEY...
16,036
to tuple
from typing import Tuple, Any, AbstractSet, Mapping, Union, Iterator from numbers import Number from dataclasses import dataclass from functools import lru_cache import itertools from qupulse.utils import checked_int_cast, cached_property from qupulse.expressions import ExpressionScalar, ExpressionVariableMissingExcep...
16,037
sample refresh data feed ingestion async
# 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. # --------------------------------------------------------------------...
16,038
run test
#!/usr/bin/env python3 # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2017 # [+] International Business Machines Corp. # # # 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 Lic...
16,039
fromdict
# # DeepLabCut Toolbox (deeplabcut.org) # © A. & M.W. Mathis Labs # https://github.com/DeepLabCut/DeepLabCut # # Please see AUTHORS for contributors. # https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS # # Licensed under GNU Lesser General Public License v3.0 # """Base classes for benchmark and result defin...
16,040
send request
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
16,041
test constitutive failure strain sens
import unittest import numpy as np from tacs import TACS, constitutive, elements class ConstitutiveTest(unittest.TestCase): def setUp(self): # fd/cs step size if TACS.dtype is complex: self.dh = 1e-200 self.rtol = 1e-11 else: self.dh = 1e-8 ...
16,042
error format
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
16,043
create sources
#!/usr/bin/env python3 # Copyright 2014 Steven Watanabe # Copyright 2015 Artur Shepilko # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) # This tests the GLOB_ARCHIVE rule. import os import sys try: from StringIO import S...
16,044
test request with bad recursive flag
import json from base64 import standard_b64encode from copy import deepcopy from http import HTTPStatus from urllib.parse import quote import pytest from test.common_helper import TEST_FW, CommonDatabaseMock TEST_FW_PAYLOAD = { 'binary': standard_b64encode(b'\x01\x23\x45\x67\x89').decode(), 'file_name': 'no_...
16,045
hello new add authfactor2 type
# automatically generated by the FlatBuffers compiler, do not modify # namespace: proto import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class HelloNew(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatb...
16,046
write parameters
# Copyright (c) 2015 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 ...
16,047
get customer subscription
# 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__ ...
16,048
failed test ids
#!/usr/bin/env python3 # 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 # "L...
16,049
test with processes
import unittest import multiprocessing from ..pubsub import * from ..message import * def predicate_contains_hello(x): """Predicate True when 'hello' is in value.""" return 'hello' in x class PubSubTest(unittest.TestCase): """'Black Box' testing of the pubsub module.""" def setUp(self): # in...
16,050
fixup prngs
# Copyright 2017, David Wilson # # 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 conditions and the following disclaimer. # # 2....
16,051
test flags unrecognized
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
16,052
test plot xs
import numpy as np import openmc import pytest @pytest.fixture(scope='module') def test_mat(): mat_1 = openmc.Material() mat_1.add_element("H", 4.0, "ao") mat_1.add_element("O", 4.0, "ao") mat_1.add_element("C", 4.0, "ao") return mat_1 def test_calculate_cexs_elem_mat_sab(test_mat): """Check...
16,053
job template with survey passwords factory
# Python import pytest from unittest import mock from contextlib import contextmanager from awx.main.models import Credential, UnifiedJob, Instance from awx.main.tests.factories import ( create_organization, create_job_template, create_instance, create_instance_group, create_notification_template, ...
16,054
apply time bonus
"""Event prioritizer.""" import math from datetime import timedelta from django.utils import timezone from events.serializers import EventSerializer BASE = 1000 # Base points FINISHED_PENALTY = 600 # Direct penalty if event is done WEIGHT_START_TIME = 800 ...
16,055
resolve expression
import logging from typing import List, Optional, Union from django.conf import settings from django.contrib.postgres.search import ( CombinedSearchVector, SearchVector, SearchVectorCombinable, ) from django.db.models import Expression logger = logging.getLogger(__name__) class NoValidationSearchVectorC...
16,056
composite measurements
from datetime import datetime import numpy as np import pytest from stonesoup.updater.categorical import HMMUpdater from ..categorical import SimpleCategoricalMeasurementInitiator from ..composite import CompositeUpdateInitiator from ..simple import SinglePointInitiator, GaussianParticleInitiator from ...predictor.te...
16,057
service unavailable
import logging from pyramid import httpexceptions from pyramid.authorization import Authenticated from pyramid.httpexceptions import HTTPTemporaryRedirect from pyramid.security import NO_PERMISSION_REQUIRED, forget from pyramid.settings import asbool from pyramid.view import view_config from kinto.core.errors import ...
16,058
unhex
#! /usr/bin/env python """Conversions to/from quoted-printable transport encoding as per RFC 1521.""" # (Dec 1991 version). __all__ = ["encode", "decode", "encodestring", "decodestring"] ESCAPE = '=' MAXLINESIZE = 76 HEX = '0123456789ABCDEF' EMPTYSTRING = '' try: from binascii import a2b_qp, b2a_qp except Impo...
16,059
test terminal constructor
"""This module contains tests of the Terminal""" # pylint: disable=missing-function-docstring,protected-access import logging import sys import time import uuid import pytest import panel as pn not_windows = pytest.mark.skipif(sys.platform == 'win32', reason="Does not work on Windows") not_osx = pytest.mark.skipif(s...
16,060
register op attr
# 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...
16,061
to bytes
"""DLite YAML storage plugin written in Python.""" import os from typing import TYPE_CHECKING import yaml as pyyaml # To not clash with the current file name. import dlite from dlite.options import Options from dlite.utils import instance_from_dict if TYPE_CHECKING: # pragma: no cover from typing import Genera...
16,062
test weights
import unittest import visgraph.graphcore as vs_graphcore import vivisect.tools.graphutil as viv_graph class VivGraphTest(unittest.TestCase): def setUp(self): g = vs_graphcore.HierGraph() g.addHierRootNode('Rooty') g.addNode('Righty') g.addNode('SonOfRighty') g.addNode('R...
16,063
test fused cross feature interaction v2
""" 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...
16,064
uuid4
# This file is part of Indico. # Copyright (C) 2002 - 2023 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os import tarfile import uuid from datetime import datetime, timedelta from io import BytesIO impo...
16,065
get temperature
#!/usr/bin/env python3 ######################################################################## # Ruijie # # Module contains an implementation of SONiC Platform Base API and # provides the Thermals' information which are available in the platform # ######################################################################...
16,066
applies to
# Copyright (C) 2000-2014 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distr...
16,067
mute
#!/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 os import sys import logging from logging import getLogger # noqa: F401 try: import coloredlogs COLORED...
16,068
load
# # 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 retain the above copyright notice, this # list o...
16,069
get coip pools output
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
16,070
get related idea
from ideas.serializers.idea import IdeaMinimalSerializer from climateconnect_api.serializers.role import RoleSerializer from rest_framework import serializers from ideas.models import Idea from chat_messages.models import ( Message, MessageParticipants, MessageReceiver, Participant, ) from climateconnec...
16,071
main
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2023 Blender Authors # # SPDX-License-Identifier: GPL-2.0-or-later import argparse import re import shutil import subprocess import sys import time class COLORS: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL...
16,072
remove job
from __future__ import absolute_import from apscheduler.jobstores.base import BaseJobStore, JobLookupError, ConflictingIdError from apscheduler.util import maybe_ref, datetime_to_utc_timestamp, utc_timestamp_to_datetime from apscheduler.job import Job try: import cPickle as pickle except ImportError: # pragma: n...
16,073
test copy file from worker
# Copyright 2019 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 required by applicable law or agreed to in writing, ...
16,074
source
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.mi...
16,075
bbox
#!/usr/bin/python # layers.py # # Copyright Michael Graff # graff@hm.edu # # 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 ver...
16,076
test non existing address
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.ident module. """ import builtins import struct from io import StringIO from twisted.internet import defer, error from twisted.internet.testing import StringTransport from twisted.protocols import ident from...
16,077
get energies
"""Implementation for `pmg analyze` CLI.""" from __future__ import annotations import logging import multiprocessing import os import re from tabulate import tabulate from pymatgen.apps.borg.hive import SimpleVaspToComputedEntryDrone, VaspToComputedEntryDrone from pymatgen.apps.borg.queen import BorgQueen from pyma...
16,078
json
#!/usr/bin/env python # Build script for Sphinx documentation import os import shlex import shutil import subprocess import sys from collections import OrderedDict # You can set these variables from the command line. SPHINXOPTS = os.getenv('SPHINXOPTS', '') SPHINXBUILD = os.getenv('SPHINXBUILD', 'sphinx-build') PA...
16,079
test dynamopsy names
# ----------------------------------------------------------------------------- # BSD 3-Clause License # # Copyright (c) 2021-2022, 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 fol...
16,080
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 ...
16,081
peak load district
import plotly.graph_objs as go from plotly.offline import plot from cea.plots.variable_naming import LOGO, COLOR, NAMING import cea.plots.demand class PeakLoadSupplyPlot(cea.plots.demand.DemandPlotBase): name = "Peak Supply" def __init__(self, project, parameters, cache): super(PeakLoadSupplyPlot...
16,082
test maybe delete app
from __future__ import annotations import asyncio from test.plugins.v0_1_0.okta.test_utils import ( # noqa: F401 # intentional for mocks mock_okta_organization, ) import okta.models import pytest from iambic.core.models import ProposedChangeType from iambic.plugins.v0_1_0.okta.app.utils import ( get_app, ...
16,083
enable matplotlib
"""An in-process kernel""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import logging import sys from contextlib import contextmanager from IPython.core.interactiveshell import InteractiveShellABC from traitlets import Any, Enum, Instance, List, Type, default ...
16,084
build params callback
from pubnub.endpoints.file_operations.file_based_endpoint import FileOperationEndpoint from pubnub.crypto import PubNubFileCrypto from pubnub.enums import HttpMethod, PNOperationType from pubnub.models.consumer.file import PNSendFileResult from pubnub.endpoints.file_operations.publish_file_message import PublishFileMe...
16,085
test no scheme
# Copyright © Michal Čihař <michal@weblate.org> # # SPDX-License-Identifier: GPL-3.0-or-later import os from django.conf import settings from django.core.exceptions import ValidationError from django.test import SimpleTestCase from django.test.utils import override_settings from weblate.utils.render import validate_...
16,086
test packet count
""" tests for the spec-is-valid command """ import pscheduler import unittest class SpecIsValidTest(pscheduler.TestSpecIsValidUnitTest): name = 'latencybg' def test_failures(self): #test missing dest expected_errors = ["'dest' is a required property"] self.assert_cmd('{}', expecte...
16,087
as instanceof cause
# Copyright 1999-2022 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...
16,088
test weird disc
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from tests import TestCase from quodlibet.util.string.splitters import...
16,089
test session cookie
import re from starlette.applications import Starlette from starlette.middleware import Middleware from starlette.middleware.sessions import SessionMiddleware from starlette.responses import JSONResponse from starlette.routing import Mount, Route from starlette.testclient import TestClient def view_session(request):...
16,090
returncode
__all__ = 'create_subprocess_exec', 'create_subprocess_shell' import subprocess from . import events from . import protocols from . import streams from . import tasks from .log import logger PIPE = subprocess.PIPE STDOUT = subprocess.STDOUT DEVNULL = subprocess.DEVNULL class SubprocessStreamProtocol(streams.FlowC...
16,091
test init
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import shutil import unittest from unittest import mock from datetime import datetime from opentelemetry.sdk.util.instrumentation import InstrumentationScope from opentelemetry.sdk.resources import Resource from ope...
16,092
dcos agent validation
# (C) Datadog, Inc. 2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import requests from .baseutil import BaseUtil CHRONOS_JOB_NAME = "CHRONOS_JOB_NAME" CHRONOS_JOB_OWNER = "CHRONOS_JOB_OWNER" MARATHON_APP_ID = "MARATHON_APP_ID" MESOS_TASK_ID = "MESOS_TASK_ID" MESOS_AGENT_...
16,093
get history file name
from subprocess import Popen, PIPE from time import time import os import sys import six from .. import logs from ..conf import settings from ..const import ARGUMENT_PLACEHOLDER from ..utils import DEVNULL, cache from .generic import Generic @cache('~/.config/fish/config.fish', '~/.config/fish/functions') def _get_fu...
16,094
test phase active
import pytest import rules from adhocracy4.projects.enums import Access from adhocracy4.test.helpers import freeze_phase from adhocracy4.test.helpers import freeze_post_phase from adhocracy4.test.helpers import freeze_pre_phase from adhocracy4.test.helpers import setup_phase from adhocracy4.test.helpers import setup_u...
16,095
rule runner
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import pytest from pants.backend.python import target_types_rules from pants.backend.python.lint.yapf.rules import YapfFieldSet, YapfRequest from pants...
16,096
test error on multiple dataframe outputs
import os import pandas as pd import pytest from mlserver_sklearn import SKLearnModel from mlserver_sklearn.sklearn import ( PREDICT_OUTPUT, PREDICT_PROBA_OUTPUT, WELLKNOWN_MODEL_FILENAMES, PREDICT_TRANSFORM, ) from sklearn.dummy import DummyClassifier, DummyRegressor from sklearn.pipeline import Pipel...
16,097
format resistence neg
# NanoVNASaver # # A python program to view and export Touchstone data from a NanoVNA # Copyright (C) 2019, 2020 Rune B. Broberg # Copyright (C) 2020ff NanoVNA-Saver Authors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
16,098
forward
# -*- coding: utf-8 -*- """ Implementation of UNet """ from torch.nn import ModuleList from GANDLF.models.seg_modules.DownsamplingModule import DownsamplingModule from GANDLF.models.seg_modules.EncodingModule import EncodingModule from GANDLF.models.seg_modules.DecodingModule import DecodingModule from GANDLF.models.s...
16,099
gas without landuse
import concurrent.futures import pandas as pd from pathlib import Path import requests def concurrent_executor(func): """decorator to make concurrent futures""" def wrapper(*args, **kwargs): if isinstance(args[0], str): args = ([args[0]],) with concurrent.futures.ThreadPoolExecuto...