id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
17,800
test first generic verse
# These tests are auto-generated with test data from: # https://github.com/exercism/problem-specifications/tree/main/exercises/bottle-song/canonical-data.json # File last updated on 2023-07-20 import unittest from bottle_song import ( recite, ) class BottleSongTest(unittest.TestCase): def METHOD_NAME(self):...
17,801
print coefficients
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
17,802
calculate stdp times
# 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 ...
17,803
align to move direction
############################################################################### # Simple Animator | Template v 1.0 | UPBGE 0.3.0+ # ############################################################################### # Created by: Guilherme Teres Nunes # ...
17,804
init predictor
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
17,805
inputs
""" integrate_over_elements ======================= Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.METHOD_NAME import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification imp...
17,806
test mobility classification inconsistent spatial units raises
# 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/. import pytest from flowmachine.features.subscriber.mobility_classification import ( MobilityClassification, ) from ...
17,807
test plot trees
import unittest import pandas as pd import plotly.graph_objects as go import dtreeviz from xgboost import XGBClassifier from explainerdashboard.explainers import ClassifierExplainer from explainerdashboard.datasets import * def test_xgbclas_graphviz_available(precalculated_xgb_classifier_explainer): assert i...
17,808
os name
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os import json from core.die import die_failure from core import color def version_info(): """ version information of the framework Returns: an array of version and code name """ from config import nettacker_paths retur...
17,809
test main
import builtins import os import select import socket import sys import unittest import errno from errno import EEXIST from test import support class SubOSError(OSError): pass class SubOSErrorWithInit(OSError): def __init__(self, message, bar): self.bar = bar super().__init__(message) class ...
17,810
get lis id
import datetime import re import attr from spatula import HtmlPage, HtmlListPage, XPath, URL from openstates.models import ScrapePerson PARTY_MAP = {"R": "Republican", "D": "Democratic", "I": "Independent"} party_district_pattern = re.compile(r"\((R|D|I)\) - (?:House|Senate) District\s+(\d+)") name_elect_pattern = re....
17,811
test 1 compilecommand
from clang.cindex import CompilationDatabase from clang.cindex import CompilationDatabaseError from clang.cindex import CompileCommands from clang.cindex import CompileCommand import os import gc kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS') def test_create_fail(): """Check we fail loading a data...
17,812
course id
# lint-amnesty, pylint: disable=missing-module-docstring import functools from django import forms from django.contrib import admin from django.db.models import F from django.urls import reverse from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ from opaque_keys.edx.keys ...
17,813
escape
# Copyright (c) 2013 Hesky Fisher # See LICENSE.txt for details. # # TODO: Convert non-ascii characters to UTF8 # TODO: What does ^ mean in Eclipse? # TODO: What does #N mean in Eclipse? # TODO: convert supported commands from Eclipse """Parsing an RTF/CRE dictionary. RTF/CRE spec: https://web.archive.org/web/2020101...
17,814
test runs tests with gtest internal flag
#!/usr/bin/env python # # Copyright 2009, Google Inc. # 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...
17,815
post form
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2016 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
17,816
parse key
import json, argparse, os from pathlib import Path ROOT = "en-us.json" # Tree structure: <lang-code.json>/<folder>/<json content> def generateTree(src: Path): tree = {} langs = {} directories = [] def readLangFile(path: Path): with open(path, 'r') as f: content = json.load(f) ...
17,817
ycoord
# This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.util import * from astrometry.util.starutil_numpy import * from numpy import * from pylab import * def cosdeg(y): return cos(deg2rad(y)) def plot_healpix_on_radec(nside=2, cosdec=Fals...
17,818
get schema type hint from dtype
import logging from typing import Tuple, Union import numpy as np import pandas as pd """ These routines drive all type inference for the schema generation and the FBS (REST OTA) encoding. They are also used for CXG generation. H5AD Type REST REST (ndarray, Series, Index) F...
17,819
test skip class
import unittest from .support import LoggingResult class Test_TestSkipping(unittest.TestCase): def test_skipping(self): class Foo(unittest.TestCase): def test_skip_me(self): self.skipTest("skip") events = [] result = LoggingResult(events) test = Foo("t...
17,820
perform create
import logging from core.permissions import ViewClassPermission, all_permissions from django.db.models import CharField, Count, Q from django.db.models.functions import Cast from django.utils.decorators import method_decorator from django_filters.rest_framework import DjangoFilterBackend from drf_yasg.utils import swa...
17,821
repr format
# 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 https://mozilla.org/MPL/2.0/. import pandas as pd import numpy as np import re try: from IPython.core.display import HTML except: HTML = None...
17,822
validate cert chain
# Copyright (c) 2023, NVIDIA CORPORATION. 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...
17,823
save loop
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
17,824
set content
## @file # This file is used to define class objects of INF file [UserExtension] section. # It will consumed by InfParser. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent ''' InfUserExtensionsObject ''' from Logger import StringTable as ST fr...
17,825
test indexed base sugar
import pytest from diofant import (Basic, Dict, Idx, Indexed, IndexedBase, Symbol, Tuple, oo, symbols) from diofant.abc import a, b, c, x from diofant.core.compatibility import iterable from diofant.tensor.indexed import IndexExceptionError __all__ = () def test_Idx_construction(): i, a = ...
17,826
check head permissions
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
17,827
use vectorcall
from __future__ import annotations import sys import sysconfig from typing import Any, Dict, Final from mypy.util import unnamed_function PREFIX: Final = "CPyPy_" # Python wrappers NATIVE_PREFIX: Final = "CPyDef_" # Native functions etc. DUNDER_PREFIX: Final = "CPyDunder_" # Wrappers for exposing dunder methods t...
17,828
split
# # SPDX-License-Identifier: GPL-2.0-only # import errno import re import os class OEList(list): """OpenEmbedded 'list' type Acts as an ordinary list, but is constructed from a string value and a separator (optional), and re-joins itself when converted to a string with str(). Set the variable type ...
17,829
do snap
from avocado.utils import lv_utils from avocado.utils import process from virttest import virsh from virttest.libvirt_xml import vm_xml from virttest.utils_libvirt import libvirt_disk from virttest.utils_test import libvirt from provider.backingchain import blockcommand_base from provider.backingchain import check_fu...
17,830
save dir
import os from typing import Any, Dict, Optional, Union from argparse import Namespace import packaging.version try: import pytorch_lightning as pl if packaging.version.parse(pl.__version__) < packaging.version.parse('1.7'): from pytorch_lightning.loggers.base import ( LightningLoggerBase...
17,831
apply schedule
# 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...
17,832
test get individual predictions
import json import os import shutil import sys import tempfile import numpy as np import pytest from sklearn import preprocessing from sklearn.preprocessing import StandardScaler from sklearn.model_selection import GridSearchCV from sklearn.neural_network import MLPClassifier from sklearn.preprocessing import LabelBin...
17,833
average nbest models
import logging from pathlib import Path from typing import Optional from typing import Sequence from typing import Union import warnings import os from io import BytesIO import torch from typing import Collection from funasr.train.reporter import Reporter @torch.no_grad() def METHOD_NAME( output_dir: Path, ...
17,834
on 200
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
17,835
body as dict
# -*- coding: utf-8 -*- import collections import json from typing import Optional, Iterable, Dict, List from TM1py.Objects.Hierarchy import Hierarchy from TM1py.Objects.TM1Object import TM1Object from TM1py.Utils.Utils import case_and_space_insensitive_equals class Dimension(TM1Object): """ Abstraction of TM1 ...
17,836
test compare postfix version
# Copyright (c) 2018 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Version import Version from unittest import TestCase import pytest major_versions = [Version("1"), Version(b"1"), Version(1), Version([1]), Version(["1"]), Version("1."), Version("MOD-1"), Version("1B"), Version...
17,837
validate
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...
17,838
get first written event source
# -*- coding: utf-8 -*- """Storage writer for SQLite storage files.""" from plaso.lib import definitions from plaso.storage import writer from plaso.storage.sqlite import sqlite_file class SQLiteStorageFileWriter(writer.StorageWriter): """SQLite-based storage file writer.""" def __init__(self, storage_type=defi...
17,839
list units
# -*- coding: utf-8 -*- # # This file is part of OpenMediaVault. # # @license http://www.gnu.org/licenses/gpl.html GPL Version 3 # @author Volker Theile <volker.theile@openmediavault.org> # @copyright Copyright (c) 2009-2023 Volker Theile # # OpenMediaVault is free software: you can redistribute it and/or modify #...
17,840
extend
from typing import Any, Callable, Dict, Iterable, List, Set, SupportsIndex, Union, overload from . import events class ObservableDict(dict): def __init__(self, data: Dict, on_change: Callable) -> None: super().__init__(data) for key, value in self.items(): super().__setitem__(key, ma...
17,841
dat e to python
#!/usr/bin/env python # # Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved. # from __future__ import annotations import time from datetime import date, datetime, timedelta from logging import getLogger from time import struct_time from typing import Any, Callable import pytz from .compat import ...
17,842
get certs
# Copyright 2018 Datawire. 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...
17,843
get network traffic
import os from wandb.sdk.internal.settings_static import SettingsStatic from .stats_impl import WandbSystemStats class SysStats: def __init__(self, process_id=None): settings = SettingsStatic(d={"_stats_pid": os.getpid() if process_id is None else process_id}) self.sys_stats_impl = WandbSystemSta...
17,844
set to full
import os import yaml import collections from ...core.base import ErsiliaBase from ...default import CONDA_ENV_YML_FILE, DOCKERFILE_FILE from ...hub.fetch import MODEL_INSTALL_COMMANDS_FILE, REQUIREMENTS_TXT from .repo import DockerfileFile from dockerfile_parse import DockerfileParser class BundleEnvironmentFile(Ers...
17,845
test execute raises when not converged
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
17,846
test 03 change group not discoverable
from django.test import TestCase from django.contrib.auth.models import Group from hs_core import hydroshare from hs_core.testing import MockIRODSTestCaseMixin from hs_access_control.tests.utilities import global_reset class T15CreateGroup(MockIRODSTestCaseMixin, TestCase): "Test creatng a group" def setUp...
17,847
package
from conan import ConanFile from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rm, rmdir from conan.tools.scm import Version import os required_conan_versio...
17,848
fetch
"""Deals with creating the beads class. Copyright (C) 2013, Joshua More and Michele Ceriotti 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 ...
17,849
test check and trigger conditions eval agg
# Copyright (c) 2011-present, Facebook, Inc. All rights reserved. # This source code is licensed under both the GPLv2 (found in the # COPYING file in the root directory) and Apache 2.0 License # (found in the LICENSE.Apache file in the root directory). from advisor.db_stats_fetcher import LogStatsParser, DatabaseP...
17,850
execute
from typing import List, AsyncIterator, Type, Optional, Any from resotocore.infra_apps.runtime import Runtime from resotocore.infra_apps.manifest import AppManifest from resotocore.service import Service from resotocore.types import Json, JsonElement from resotocore.ids import GraphName from resotocore.db.model import ...
17,851
disable stdlib finder
from __future__ import absolute_import, unicode_literals import io import abc import sys import email if sys.version_info > (3,): # pragma: nocover import builtins from configparser import ConfigParser import contextlib FileNotFoundError = builtins.FileNotFoundError IsADirectoryError = builtins....
17,852
mpexec
from functools import wraps from threading import Thread, Lock from multiprocessing import Process from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor class ThreadingIter(): """ Takes an iterator/generator and makes it thread-safe\n Implements locking for given iterator / generator ...
17,853
test meta graph def runs simplest case
# Copyright 2020, The TensorFlow Federated 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 o...
17,854
compile func
import unittest import pytest import numpy import cupy from cupy._core import core from cupy.cuda import compiler from cupy.cuda import runtime from cupy import testing def METHOD_NAME(kernel_name, code): # workaround for hipRTC extra_source = core._get_header_source() if runtime.is_hip else None mod = ...
17,855
get configuration
''' copyright: Copyright (C) 2015-2022, Wazuh Inc. Created by Wazuh, Inc. <info@wazuh.com>. This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 type: integration brief: These tests will check if the 'SSL' (Secure Socket Layer) protocol-related setti...
17,856
render
from __future__ import annotations from asyncio.events import AbstractEventLoop from typing import TYPE_CHECKING, Any, TextIO from prompt_toolkit.application import Application from prompt_toolkit.application.current import get_app_or_none, get_app_session from prompt_toolkit.application.run_in_terminal import run_in...
17,857
returns none type
"""Annotation parsing. For links inside annotations see test_inspect.TypeLinks.""" import sys from typing import List, Tuple, Dict, Any, Union, Optional, Callable, TypeVar, Generic, Iterator class Foo: """A class with properties""" @property def a_property(self) -> List[bool]: """A property with...
17,858
upscale uint8 image
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 ...
17,859
mark instruction in progress
from __future__ import annotations import logging import signal import time from dataclasses import dataclass from enum import Enum from typing import Optional, TypeVar import rapidjson from arroyo.dlq import InvalidMessage from arroyo.processing.strategies.abstract import ProcessingStrategy from arroyo.types import ...
17,860
prepare
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
17,861
training step
import random import pytest import torch import torch.nn as nn from torch.utils.data import TensorDataset, DataLoader import nni from nni.mutable import frozen from nni.nas.hub.pytorch.nasbench201 import OPS_WITH_STRIDE from nni.nas.nn.pytorch import Repeat from nni.nas.oneshot.pytorch.supermodule.base import BaseSu...
17,862
get num samples
import numpy as np from spikeinterface.core import BaseRecording, BaseRecordingSegment from .basepreprocessor import BasePreprocessorSegment from spikeinterface.core.core_tools import define_function_from_class class AverageAcrossDirectionRecording(BaseRecording): name = "average_across_direction" installed =...
17,863
test trans
#!/usr/bin/env python # Copyright 2020-2023 The PySCF Developers. 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 # # U...
17,864
test distance on device and is adjacent
# 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 ...
17,865
main
#!/usr/bin/env python3 ############################################################################### # # Copyright 2016, 2018 - 2021, Thomas Lauf, Paul Beckingham, Federico Hernandez. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
17,866
try given formats
import collections from collections.abc import Callable, Iterable, Iterator from datetime import datetime from re import Pattern from typing import ClassVar, overload from typing_extensions import Literal, TypeAlias from dateparser import _Settings from dateparser.conf import Settings from dateparser.languages.loader ...
17,867
leftmost
#!/usr/bin/env python import collections import numpy np = numpy class IArray(object): ''' An interpolated array based on numpy This contains some added functionality from the standard np.interp() method ''' def __init__(self, points, left=None, right=None, method='linear'): ...
17,868
test frontend
#!/usr/bin/env python3 # # QAPI parser test harness # # Copyright (c) 2013 Red Hat Inc. # # Authors: # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory. # import argparse import difflib import os impo...
17,869
resize flow
# The implementation is adopted from BasicSR, made public available under the Apache 2.0 License # at https://github.com/XPixelGroup/BasicSR/blob/master/basicsr/archs/arch_util.py import collections.abc import math import warnings from itertools import repeat import torch import torchvision from torch import nn as nn ...
17,870
fact view
# Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html """Serializer for Mnemosyne collections. Some notes about their structure: https://github.com/mnemosyne-proj/mnemosyne/blob/master/mnemosyne/libmnemosyne/docs/source/index.rst Anki | Mn...
17,871
test slot behaviour
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2023 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
17,872
validate json dict
import json from pydantic import Field, validator from ayon_server.settings import BaseSettingsModel, ensure_unique_names from ayon_server.exceptions import BadRequestException def METHOD_NAME(value): if not value.strip(): return "{}" try: converted_value = json.loads(value) success =...
17,873
associate only iou
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
17,874
make extension
""" Smart Symbols. pymdownx.smartsymbols Really simple plugin to add support for: copyright, trademark, and registered symbols plus/minus, not equal, arrows via: copyright = `(c)` trademark = `(tm)` registered = `(r)` plus/minus = `+/-` care/of = `c/o` fractions = `1/2` etc. ...
17,875
is valid india zip
from typing import Optional import indiapins from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.execution_engine import ( PandasExecutionEngine, ) from great_expectations.expectations.expectation import ColumnMapExpectation from great_expectations.expect...
17,876
url parameters
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
17,877
test failing different ragged ranks
# Copyright 2018 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...
17,878
pop front
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
17,879
test dihedral fake dihedraltype
import pytest from gmso.core.atom import Atom from gmso.core.atom_type import AtomType from gmso.core.dihedral import Dihedral from gmso.core.dihedral_type import DihedralType from gmso.core.topology import Topology from gmso.tests.base_test import BaseTest try: from pydantic.v1 import ValidationError except Impo...
17,880
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 ...
17,881
test reset successfully returns indicator to fresh
# ------------------------------------------------------------------------------------------------- # Copyright (C) 2015-2023 Nautech Systems Pty Ltd. All rights reserved. # https://nautechsystems.io # # Licensed under the GNU Lesser General Public License Version 3.0 (the "License"); # You may not use this file ex...
17,882
exchange current density average
# # Empirical hysteresis modelling # import pybamm from numpy import array pybamm.set_logging_level("INFO") # Load model options = { "open-circuit potential": ("current sigmoid", "single"), "exchange-current density": ("current sigmoid", "single"), "diffusivity": ("current sigmoid", "single"), } model = p...
17,883
may strip
# 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/. import os import struct import subprocess from io import BytesIO from mozpack.errors import errors MACHO_SIGNATURES = ...
17,884
setup
import argparse import functools import importlib import os import torch import torch.distributed as dist import torch.nn as nn from torch._dynamo.testing import reduce_to_scalar_loss from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import ( apply_activation_checkpointing, checkpoint_wrapper, ...
17,885
test call doc
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Unit tests for the :func:`iris.common.lenient._lenient_client`. """ # Import iris.tests first so that some things can be ...
17,886
set preference
# IMPORTS STANDARD import dataclasses from copy import deepcopy from pathlib import Path from typing import Any, Dict, Optional # IMPORTS INTERNAL from openbb_terminal.core.models import ( CredentialsModel, PreferencesModel, ProfileModel, SourcesModel, UserModel, ) from openbb_terminal.core.session...
17,887
bad web index
#!/usr/bin/env python3 # # Generates etag files. # Adds file names to list of tags in a TAGS file # # Derived from PETSc Python script of the same name. # # Walks through the source tree generating the TAGS file # import os import re from exceptions import * import sys from string import * import commands #...
17,888
accept encodings
import http.server import pydoc import socketserver from collections.abc import Callable, Iterable, Mapping from re import Pattern from typing import Any, ClassVar, Protocol from typing_extensions import TypeAlias from xmlrpc.client import Fault, _Marshallable # The dispatch accepts anywhere from 0 to N arguments, no ...
17,889
socket
""" The `socketpool` module provides sockets through a pool. The pools themselves act like CPython's `socket` module. For more information about the `socket` module, see the CPython documentation: https://docs.python.org/3/library/socket.html """ from __future__ import annotations from typing import Optional, Tuple ...
17,890
save image function
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 #...
17,891
test two star middle
# Owner(s): ["oncall: package/deploy"] from typing import Iterable from torch.package import GlobGroup from torch.testing._internal.common_utils import run_tests try: from .common import PackageTestCase except ImportError: # Support the case where we run this file directly. from common import PackageTest...
17,892
resolve tar file or dir
"""Utilities for extracting common archive formats""" import zipfile import tarfile import os import shutil import posixpath import contextlib from distutils.errors import DistutilsError from ._path import ensure_directory __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_fil...
17,893
assert flake8 is executable
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder 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/l...
17,894
test test unsupported algo
"""Tests of overview counting and creation.""" import numpy as np import pytest from .conftest import requires_gdal33 import rasterio from rasterio.enums import _OverviewResampling as OverviewResampling from rasterio.enums import Resampling from rasterio.errors import OverviewCreationError def test_count_overviews...
17,895
rebuild up to date
# -*- test-case-name: twisted.test.test_rebuild -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ *Real* reloading support for Python. """ import linecache # System Imports import sys import time import types from importlib import reload from types import ModuleType from typing import ...
17,896
system data
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
17,897
header parameters
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
17,898
clear irq
# MicroPython LoRa STM32WL55 embedded sub-ghz radio driver # MIT license; Copyright (c) 2022 Angus Gratton # # This driver is essentially an embedded SX1262 with a custom internal interface block. # Requires the stm module in MicroPython to be compiled with STM32WL5 subghz radio support. # # LoRa is a registered tradem...
17,899
flush
""" pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_choice_...