id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
11,600
test current sigmoid
# # Tests for the lithium-ion MPM model # from tests import TestCase import pybamm import unittest class TestMPM(TestCase): def test_well_posed(self): options = {"thermal": "isothermal"} model = pybamm.lithium_ion.MPM(options) model.check_well_posedness() # Test build after init ...
11,601
id
# 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...
11,602
temp pyfile
# encoding: utf-8 """ IO related utilities. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function from __future__ import absolute_import import atexit import os import sys import tempfile import warnings from warnings import wa...
11,603
attempt to reconcile submitted data
#!/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. from mephisto.data_model.agent import Agent from mephisto.abstractions.blueprint import AgentState from mephisto.abstrac...
11,604
s ifmt
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
11,605
bias variable
# Copyright 2016 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...
11,606
prepare message
"""pyamqp transport module for Kombu. Pure-Python amqp transport using py-amqp library. Features ======== * Type: Native * Supports Direct: Yes * Supports Topic: Yes * Supports Fanout: Yes * Supports Priority: Yes * Supports TTL: Yes Connection String ================= Connection string can have the following format...
11,607
policy data
# 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...
11,608
get class info
# -*- coding: utf-8 -*- # # LinOTP - the open source solution for two factor authentication # Copyright (C) 2010-2019 KeyIdentity GmbH # Copyright (C) 2019- netgo software GmbH # # This file is part of LinOTP server. # # This program is free software: you can redistribute it and/or # modify it und...
11,609
from json
import pprint from hail.typecheck import typecheck_method, sequenceof from hail.utils.java import escape_parsable from hail.expr.types import dtype, tstruct from hail.utils.java import jiterable_to_list class tmatrix(object): __slots__ = 'global_type', 'col_type', 'col_key', 'row_type', 'row_key', 'entry_type' ...
11,610
test pickler save and load key
""" Unit test of the (non-rendering) exporters and importers. """ import os import numpy as np from holoviews import Image, Layout from holoviews.core.io import Serializer, Pickler, Unpickler, Deserializer from holoviews.element.comparison import ComparisonTestCase class TestSerialization(ComparisonTestCase): ""...
11,611
test composite option
"""Tests for tools for constructing domains for expressions.""" from diofant import (EX, QQ, RR, ZZ, E, Float, GoldenRatio, I, Integer, Poly, Rational, construct_domain, exp, pi, sin, sqrt) from diofant.abc import x, y __all__ = () def test_construct_domain(): assert construct_domain([1, 2...
11,612
has spdx text in analysed file
""" SPDX-License-Identifier: Apache-2.0 Copyright (c) 2020 Arm Limited. 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 requ...
11,613
test enable profile payment method issuer error
import json import pytest from mollie.api.error import IdentifierError from mollie.api.objects.issuer import Issuer from mollie.api.objects.method import Method from .utils import assert_empty_object, assert_list_object PROFILE_ID = "pfl_v9hTwCvYqw" METHOD_ID = "bancontact" GIFTCARD_ISSUER_ID = "festivalcadeau" VOU...
11,614
create data single batch
#!/usr/bin/env python3 import unittest import torch from gpytorch.kernels import SpectralMixtureKernel class TestSpectralMixtureKernel(unittest.TestCase): def create_kernel(self, num_dims, **kwargs): return SpectralMixtureKernel(num_mixtures=5, ard_num_dims=num_dims, **kwargs) def create_data_no_b...
11,615
test trim single quotes
""" Created on Fri Aug 21 12:33:04 2020 @author: sjswerdloff """ import os import pathlib import tempfile import pytest from src.Model.Anon import ( _check_identity_mapping_file_exists, _create_reidentification_spreadsheet, _trim_bracketing_single_quotes, anonymize, ) def METHOD_NAME(): no_quo...
11,616
purview account list
# -------------------------------------------------------------------------- # 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 cause incor...
11,617
get id
############################################################################## # # Copyright (c) 2004, 2005 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. # TH...
11,618
test output shape matches vocab size
# 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...
11,619
set data
# COPYRIGHT (C) 2020-2023 Nicotine+ Contributors # COPYRIGHT (C) 2020 Lene Preuss <lene.preuss@gmail.com> # # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # 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...
11,620
metricgetter
"""Base classes for metric annotators for the standings generator. Each metric annotator is responsible for computing a particular metric for each item and annotating the standings with them, for example, in the case of teams, number of wins (points), or draw strength. Subclasses should be defined in context-specific ...
11,621
brian1 cuba
import time from processify import processify def halfway_timer(): global halftime halftime = time.time() @processify def METHOD_NAME(N, duration=1, do_refractory=False, exact_method=False, do_monitor=False, do_synapses=False, **ignored_opts): global halftime import tim...
11,622
update sampling dates
import datetime import logging import os from dateutil import parser from data_research.models import ( CountyMortgageData, MetroArea, MortgageMetaData, MSAMortgageData, NationalMortgageData, NonMSAMortgageData, State, StateMortgageData, validate_counties, ) logger = logging.getL...
11,623
test build parser configure modules
"""Tests for command handling""" from __future__ import annotations import argparse from contextlib import contextmanager import os import pytest from sopel import config from sopel.cli.run import ( build_parser, get_configuration, get_pid_filename, get_running_pid, ) TMP_CONFIG = """ [core] owner ...
11,624
get segment performance
"""Class to handle the computation of the metric of the square path benchmark.""" from path_segment import PathSegment # Size of one edge of the square, in meters. SQUARE_EDGE_SIZE = 2 # Amount of time, in seconds, the robot is allowed to stop before the # supervisor considers the robot has finished. MAX_STOP_TIME =...
11,625
get signal r replica
# 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...
11,626
id
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
11,627
prop descriptions
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contour(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.contour" _valid_props = {"color", "show", "width"} # color...
11,628
test dask array builder
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020-2023 Alibaba Group Holding 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/LI...
11,629
test run with mgimn model
# Copyright (c) Alibaba, Inc. and its affiliates. import unittest import numpy as np from modelscope.hub.api import HubApi from modelscope.hub.snapshot_download import snapshot_download from modelscope.models import Model from modelscope.models.nlp import SbertForFaqQuestionAnswering from modelscope.pipelines import ...
11,630
call command
from pathlib import Path from datetime import date from io import StringIO import os import pytest import boto3 # noqa from django.core.management import call_command, CommandError from django.utils import timezone from sqlite_utils import Database from ..models import SiteCheck from ...accounts import models as ac...
11,631
expected sync streams include schemas
import tap_tester.connections as connections import tap_tester.menagerie as menagerie import tap_tester.runner as runner import os import unittest import string import random import ssl from mongodb_common import drop_all_collections, get_test_connection, ensure_environment_variables_set RECORD_COUNT = {} de...
11,632
wrapped
"""Scipy interface for Minuit.""" from .minuit import Minuit import warnings import numpy as np def minimize( fun, x0, args=(), method="migrad", jac=None, hess=None, hessp=None, bounds=None, constraints=None, tol=None, callback=None, options=None, ): """ Interf...
11,633
pickle jobs
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import os import tempfile from pathlib import Path from typing import Any, List, Sequence, Union import cloudpickle # type: ignore from hydra.core.singleton import Singleton from hydra.core.utils import JobReturn, configure_log, fil...
11,634
load all
""" Module to load Family into project """ #pylint: disable=import-error,invalid-name,broad-except,superfluous-parens import os import re from pyrevit.framework import clr from pyrevit import forms, revit, DB, script logger = script.get_logger() class FamilyLoader: """ Enables loading a family from an absol...
11,635
fromflat
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ functions for sampling from hidden state """ import tensorflow.compat.v1 as tf tf.disable_v2_behavior() from .util import fc class Pd: """ A particular probability distribution """ def flatparam(self): raise NotImp...
11,636
test changing version dropdown changes client information
#!/usr/bin/env python """Test the GUI host information.""" from absl import app from grr_response_core.lib.rdfvalues import config as rdf_config from grr_response_server import data_store from grr_response_server.flows.general import discovery from grr_response_server.gui import gui_test_lib from grr.test_lib import ...
11,637
mode
import logging from pyroute2.ndb.main import NDB log = logging.getLogger(__name__) class ObjectProxy(dict): def __init__(self, obj): self._obj = obj def __getattribute__(self, key): if key[:4] == 'set_': def set_value(value): self[key[4:]] = value ...
11,638
store
# # 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...
11,639
default
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
11,640
benchmark passthrough snapshot simple
# Copyright 2019 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...
11,641
get tag description 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 __all__ ...
11,642
create timeseries
################################################ # Authors: Markus Hofmeister (mh807@cam.ac.uk) # # Date: 20 Jul 2022 # ################################################ # The purpose of this module is to provide functionality to use # the TimeSeriesClient from the JPS_BASE_LIB from contextl...
11,643
on new line
# -*- coding: utf-8 -*- """ du command module. """ __author__ = 'Marcin Szlapa' __copyright__ = 'Copyright (C) 2019-2023, Nokia' __email__ = 'marcin.szlapa@nokia.com' from moler.cmd.unix.genericunix import GenericUnixCommand from moler.exceptions import ParsingDone from moler.util.converterhelper import ConverterHelp...
11,644
set up
# -*- coding: utf-8 -*- # # Copyright (c) 2021, Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type import s...
11,645
run
#!/usr/bin/env sage-bootstrap-python # vim: set filetype=python: """ This script runs the given command under a file lock (similar to the flock command on some systems). """ # This is originally motivated by pip, but has since been generalized. We # should avoid running pip while uninstalling a package because that i...
11,646
max virtual memory
#!/usr/bin/env python # ~ Copyright 2014 Sjoerd Cranen, Wieger Wesselink #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import time import psutil import threading import subprocess class TimeExceededError(Exception): ...
11,647
p
#! /usr/bin/env python # # Implementation of elliptic curves, for cryptographic applications. # # This module doesn't provide any way to choose a random elliptic # curve, nor to verify that an elliptic curve was chosen randomly, # because one can simply use NIST's standard curves. # # Notes from X9.62-1998 (draft): # ...
11,648
evaluate number of clos id needed
#!/usr/bin/env python3 # # Copyright (C), 2022 Intel Corporation. # Copyright (c), 2018-2021, SISSA (International School for Advanced Studies). # # SPDX-License-Identifier: BSD-3-Clause # import sys, os from decimal import Decimal from copy import copy import operator import elementpath # Allow this script to find t...
11,649
test read audio multichannel
import torch import os def test_read_audio_info(tmpdir, device): from speechbrain.dataio.dataio import read_audio_info, write_audio test_waveform = torch.rand(32000, device=device) for ext in ["wav", "ogg", "mp3"]: audio_path = os.path.join(tmpdir, f"test.{ext}") write_audio(audio_path, ...
11,650
test broadcast like backward
""" 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...
11,651
check
"""Test correct operation of the print function. """ # In 2.6, this gives us the behavior we want. In 3.0, it has # no function, but it still must parse correctly. from __future__ import print_function import unittest from test import test_support from StringIO import StringIO NotDefined = object() # A dispatch ...
11,652
collect additional context
#!/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 #...
11,653
is enabled
# Copyright 2021 The Matrix.org Foundation C.I.C. # # 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...
11,654
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...
11,655
return test marc bin
import pytest from pathlib import Path from openlibrary.catalog import get_ia from openlibrary.core import ia from openlibrary.catalog.marc.marc_xml import MarcXml from openlibrary.catalog.marc.marc_binary import MarcBinary, BadLength, BadMARC TEST_DATA = Path(__file__).parents[2] / 'catalog' / 'marc' / 'tests' / 'te...
11,656
y file to dict
import pprint import pandas as pd import yaml from deepdiff import DeepDiff from linkml_runtime import SchemaView from strsimpy.cosine import Cosine import click import click_log import logging pd.set_option("display.max_columns", None) logger = logging.getLogger(__name__) click_log.basic_config(logger) def METH...
11,657
call each
# # gpodder.registry - Central hub for exchanging plugin resolvers (2014-03-09) # Copyright (c) 2014, Thomas Perl <m@thp.io> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice...
11,658
cache and get instances
import re from openpype.pipeline import LoaderPlugin from openpype.pipeline.create import ( CreatedInstance, get_subset_name, AutoCreator, Creator, ) from openpype.pipeline.create.creator_plugins import cache_and_get_instances from .lib import get_layers_data SHARED_DATA_KEY = "openpype.tvpaint.inst...
11,659
timeout soft cmd
#!/usr/bin/env python3 """Standalone utility functions for Mininet tests.""" import collections import os import socket import subprocess import time # pylint: disable=import-error from mininet.log import error, output DEVNULL = open(os.devnull, "wb", encoding=None) # pylint: disable=consider-using-with GETPORT =...
11,660
find alignment
from typing import Tuple, List, Dict import cv2 import numpy as np import opensfm.transformations as tf from opensfm import align, types, pymap, multiview def points_errors( reference: types.Reconstruction, candidate: types.Reconstruction ) -> np.ndarray: common_points = set(reference.points.keys()).intersec...
11,661
wallets
import json from typing import Type from cryptoadvance.specter.util.reflection import get_subclasses_for_clazz from .key import Key from typing import List from .persistence import read_json_file, write_json_file import logging from .helpers import is_testnet, is_liquid from embit import ec logger = logging.getLogger...
11,662
install
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
11,663
test class fields with all scopes false
""" Tests for `api.names`. """ from textwrap import dedent import pytest def _assert_definition_names(definitions, names): assert [d.name for d in definitions] == names def _check_names(get_names, source, names): definitions = get_names(dedent(source)) _assert_definition_names(definitions, names) ...
11,664
unregister
# ##### 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...
11,665
test decodetwice
""" Tests for uu module. Nick Mathewson """ import unittest from test import support import sys, os import uu from io import BytesIO import io plaintext = b"The smooth-scaled python crept over the sleeping dog\n" encodedtext = b"""\ M5&AE('-M;V]T:\"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P (:6YG(&1O9PH """ # ...
11,666
create application commands
# Stubs for sublime_plugin (Python 3.5) # # NOTE: This dynamically typed stub was automatically generated by stubgen. import sublime from typing import Any, Dict, Optional, Tuple WindowCommandR = Optional[Tuple[str, Optional[Dict[str, Any]]]] api_ready = ... # type: bool application_command_classes = ... # type: A...
11,667
set up
###################################################################################################################### # Copyright (C) 2017-2022 Spine project consortium # This file is part of Spine Toolbox. # Spine Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Gen...
11,668
parse capabilities
# This file is part of the MapProxy project. # Copyright (C) 2011 Omniscale <http://omniscale.de> # # 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...
11,669
mask sensitive values
from datetime import datetime from typing import Any, Dict, List, Optional, cast from fideslang.models import Dataset from fideslang.validation import FidesKey from loguru import logger from pydantic import BaseModel, Extra, root_validator from fides.api.common_exceptions import NoSuchConnectionTypeSecretSchemaError ...
11,670
read decam tables
#!/usr/bin/env python import psycopg2 import argparse import astropy from astropy.io import fits from astropy.table import vstack, Table import sys, os, re, glob, distutils from distutils.util import strtobool import numpy as np from desitarget.db import my_psql import desitarget.bin.tractor_load as dbload def re...
11,671
test mnemonic to seed invalid checksum
# -*- coding: utf-8 -*- # # BitcoinLib - Python Cryptocurrency Library # Unit Tests for Key, Encoding and Mnemonic Class # © 2016 - 2019 December - 1200 Web Development <http://1200wd.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
11,672
test retrieve pipeline
# Copyright 2018 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
11,673
load command table
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
11,674
process bar
# Copyright 2021 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
11,675
change
from urllib.request import Request, urlopen from bs4 import BeautifulSoup as soup class TopGainers: """ Create an instance of `TopGainers` class ```python topgainers = TopGainers() ``` | Methods | Details | | -------------------|--...
11,676
test post unauthenticated
from opencodelists.tests.assertions import assert_difference, assert_no_difference from ..helpers import csv_builder from .assertions import ( assert_get_unauthenticated, assert_get_unauthorised, assert_post_unauthenticated, assert_post_unauthorised, ) from .helpers import force_login def test_get_un...
11,677
test with access
import hashlib from http import HTTPStatus import io import json import os from pathlib import Path from typing import Callable import pytest import requests import responses from pbench.agent import PbenchAgentConfig from pbench.agent.results import CopyResultToRelay, CopyResultToServer class TestCopyResults: ...
11,678
parse args
import ast import yaml import copy import argparse from argparse import ArgumentParser, RawDescriptionHelpFormatter class ArgsParser(ArgumentParser): def __init__(self): super(ArgsParser, self).__init__( formatter_class=RawDescriptionHelpFormatter) self.add_argument( "-o", ...
11,679
close
# -*- coding: utf-8 -*- """XML RPC server and client.""" import socketserver as SocketServer import threading from xmlrpc import server as SimpleXMLRPCServer from xmlrpc import client as xmlrpclib from xml.parsers import expat from plaso.multi_process import logger from plaso.multi_process import rpc class XMLRPCC...
11,680
map 1d
from __future__ import absolute_import, division, print_function from scitbx.array_family import flex import iotbx.pdb import cctbx.maptbx.mem as mem from cctbx import miller from six.moves import zip def METHOD_NAME(xrs, map_data, n_steps=300, step_size=0.01): atom_center = xrs.scatterers()[0].site a_cell = xrs.u...
11,681
test startup function
from pathlib import Path from unittest.mock import MagicMock import toga from toga.widgets.base import WidgetRegistry from toga_dummy.utils import TestCase class AppTests(TestCase): def setUp(self): super().setUp() self.name = "Test App" self.app_id = "org.beeware.test-app" self....
11,682
mintypecode
from collections.abc import Container, Iterable from typing import ( Literal as L, Any, overload, TypeVar, Protocol, ) from numpy import ( dtype, generic, bool_, floating, float64, complexfloating, integer, ) from numpy._typing import ( ArrayLike, DTypeLike, ...
11,683
write
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) #...
11,684
test fast pitch model export to onnx
# Copyright (c) 2020, 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...
11,685
test param
# Windows specific tests from ctypes import * from ctypes.test import requires import unittest, sys from test import test_support as support import _ctypes_test # Only windows 32-bit has different calling conventions. @unittest.skipUnless(sys.platform == "win32", 'Windows-specific test') @unittest.skipUnless(sizeof(...
11,686
test convert to coco
# Copyright (c) Facebook, Inc. and its affiliates. import json import numpy as np import os import tempfile import unittest import pycocotools.mask as mask_util from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.data.datasets.coco import convert_to_coco_dict, load_coco_json from detectron2.str...
11,687
extract data
# 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 ...
11,688
test commmit hash sent correctly
import os import platform import queue import subprocess import unittest.mock import pytest import wandb from wandb.sdk.interface.interface_queue import InterfaceQueue from wandb.sdk.internal import context from wandb.sdk.internal.sender import SendManager from wandb.sdk.internal.system.system_info import SystemInfo ...
11,689
pretty in
from _typeshed import Incomplete, Unused from typing import NoReturn, type_check_only from typing_extensions import final from pyasn1.type import constraint, namedtype from pyasn1.type.tag import TagSet class Asn1Item: @classmethod def getTypeId(cls, increment: int = 1): ... class Asn1Type(Asn1Item): tag...
11,690
test mode
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.selinux as selinux from tests.support.mock import MagicMock, patch pytestmark = [pytest.mark.skip_unless_on_linux] @pytest.fixture def configure_loader_modules(): return {selinux: {}} def METHOD_NAME(): """ ...
11,691
run error handlers
import logging import parsl # noqa F401 (used in string type annotation) import time import zmq from typing import Dict, Sequence from typing import List # noqa F401 (used in type annotation) from parsl.jobs.states import JobStatus, JobState from parsl.jobs.strategy import Strategy from parsl.executors.status_handli...
11,692
test slug replace no conflict
from unittest import mock from urllib.parse import quote from django import http from olympia.addons import decorators as dec from olympia.addons.models import Addon from olympia.amo.tests import TestCase, addon_factory class TestAddonView(TestCase): def setUp(self): super().setUp() self.addon =...
11,693
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 # --------------------------------...
11,694
set as monitor for
import contextlib import inspect import time import numpy as np class TimingMonitor: """This class keeps track of how long a Property is taking to evaluate, and (if the Property is implemented to take advantage of this), the time spent on sub-tasks. It provides formatting to place this information into t...
11,695
create or update objective
import aiohttp_apispec from aiohttp import web from app.api.v2.handlers.base_object_api import BaseObjectApi from app.api.v2.managers.base_api_manager import BaseApiManager from app.api.v2.schemas.base_schemas import BaseGetAllQuerySchema, BaseGetOneQuerySchema from app.objects.c_objective import Objective, ObjectiveS...
11,696
test await cancellable connect init
import asyncio import os import sys import pytest from cockpit.packages import BridgeConfig from cockpit.peer import ConfiguredPeer, PeerRoutingRule from cockpit.protocol import CockpitProtocolError from cockpit.router import Router from . import mockpeer from .mocktransport import MockTransport PEER_CONFIG = Bridg...
11,697
check placements equal
# bluemira is an integrated inter-disciplinary design tool for future fusion # reactors. It incorporates several modules, some of which rely on other # codes, to carry out a range of typical conceptual fusion reactor design # activities. # # Copyright (C) 2021-2023 M. Coleman, J. Cook, F. Franza, I.A. Maione, S. McInto...
11,698
setup legend location
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import sys ...
11,699
test apply sorted
from typing import ( Callable, Optional, ) from unittest.mock import call import pytest from pytest_mock import MockerFixture from reconcile.gql_definitions.status_board.status_board import StatusBoardV1 from reconcile.status_board import ( AbstractStatusBoard, Application, Product, StatusBoar...