id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
1,800
superscript
################################################################################# # FOQUS Copyright (c) 2012 - 2023, by the software owners: Oak Ridge Institute # for Science and Education (ORISE), TRIAD National Security, LLC., Lawrence # Livermore National Security, LLC., The Regents of the University of # California...
1,801
test common neighbors index
#!/usr/bin/env python3 import unittest import os import networkit as nk class TestLinkprediction(unittest.TestCase): def setUp(self): self.L = nk.readGraph("input/looptest1.gml", nk.Format.GML) #without self-loops def testAdamicAdarIndex(self): AI = nk.linkprediction.AdamicAdarIndex() AI.setGraph(self.L) ...
1,802
set up
import pickle import unittest from unittest import mock from atorch.auto.engine.client import GlobalAutoAccelerationClient from atorch.protos import acceleration_pb2 class AutoAccelerationClient(unittest.TestCase): def METHOD_NAME(self): self.client = GlobalAutoAccelerationClient.AUTO_ACC_CLIENT def...
1,803
decode
import time import json from abc import ABC, abstractmethod from typing import Callable, Any, Dict, List, Optional from helm.common.hierarchical_logger import hlog from helm.common.request import Request, RequestResult, Sequence, Token from helm.common.tokenization_request import ( TokenizationRequest, Tokeniz...
1,804
assert count
# # SPDX-License-Identifier: MIT # from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake class BitBakeLogging(OESelftestTestCase): def METHOD_NAME(self, item, entry, count): self.assertEqual(item.count(entry), count, msg="Output:\n'''\n%s\n'''\ndoesn't contain %d copi...
1,805
stop pages
import discord from redbot.core.bank import get_currency_name from redbot.vendored.discord.ext import menus class BadgeMenu(menus.MenuPages, inherit_buttons=False): def __init__( self, source: menus.PageSource, timeout: int = 30, can_buy=False, ): super().__init__( ...
1,806
socket clear
# # 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...
1,807
model agnostic extract
# Copyright 2018 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, ...
1,808
no suggestion if not bool
"""Functional test""" # pylint: disable=missing-function-docstring, invalid-name def any_even(items): """Return True if the list contains any even numbers""" for item in items: # [consider-using-any-or-all] if item % 2 == 0: return True return False def all_even(items): """Return T...
1,809
test boundary height units
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
1,810
families
# Tkinter font wrapper # # written by Fredrik Lundh, February 1998 # # FIXME: should add 'displayof' option where relevant (actual, families, # measure, and metrics) # __version__ = "0.9" import Tkinter # weight/slant NORMAL = "normal" ROMAN = "roman" BOLD = "bold" ITALIC = "italic" def nametofont(name): ...
1,811
init queue
#!/usr/bin/env python # -*- coding: utf-8 -*- from json import loads as loadjson from os import environ from random import randint from urllib import urlencode from twisted.python import log as logger from twisted.internet.task import LoopingCall from twisted.internet.defer import DeferredList, inlineCallbacks, return...
1,812
get divider options
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2012-2023 MOD Audio UG # SPDX-License-Identifier: AGPL-3.0-or-later # List of all subdividers' 'value's and 'label's dividers = [{ 'value': 0.333, 'label': "2." }, { 'value': 0.5, 'label': "2" }, { 'value': 0.75, 'label': "2T" },{ '...
1,813
verify
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
1,814
test xml case f
""" tests.unit.xmlutil_test ~~~~~~~~~~~~~~~~~~~~ """ import xml.etree.ElementTree as ET import salt.utils.xmlutil as xml from tests.support.unit import TestCase class XMLUtilTestCase(TestCase): """ Tests that salt.utils.xmlutil properly parses XML data and returns as a properly formatted dictiona...
1,815
get indexes
import numpy as np import random import os from functools import lru_cache from pathlib import Path # Various pre-crafted datasets/variables for testing # !!! Must not be changed -- only appended !!! # while testing numpy we better not rely on numpy to produce random # sequences random.seed(1) # but will seed it never...
1,816
is required checksum
""" This linter ensures that users don't set a SHA hash checksum in Bazel for the http_archive. Although the security practice of setting the checksum is good, it doesn't work when the archive is downloaded from some sites like GitHub because it can change. Specifically, GitHub gives no guarantee to keep the same value...
1,817
test with error while getting key
from unittest.mock import patch import boto3 import pytest from botocore.exceptions import ClientError from moto import mock_s3 from celery import states from celery.backends.s3 import S3Backend from celery.exceptions import ImproperlyConfigured class test_S3Backend: @patch('botocore.credentials.CredentialReso...
1,818
get file map f
from random import shuffle class AniDBMapper: blacklist = ("unused", "retired", "reserved") def getAnimeBitsA(self, amask): map = self.getAnimeMapA() return self._getBitChain(map, amask) def getAnimeCodesA(self, aBitChain): amap = self.getAnimeMapA() return self._getCodes...
1,819
get kriging kernel distance
import numpy as np def get_spatial_interpolation_kernel( source_location, target_location, method="kriging", sigma_um=20.0, p=1, num_closest=3, sparse_thresh=None, dtype="float32", force_extrapolate=False, ): """ Compute the spatial kernel for linear spatial interpolation. ...
1,820
test order after complete
import pytest from iommi.sort_after import ( LAST, SortAfterException, ) from iommi.struct import Struct from iommi.base import ( keys, values, ) from iommi.sort_after import sort_after def test_order_after_0(): sorts_right( dict( foo=Struct(expected_position=1), b...
1,821
runtime
"""Python project.""" from __future__ import annotations import logging import shutil from typing import TYPE_CHECKING, ClassVar, Optional, Set, Tuple from typing_extensions import Literal from .....compat import cached_property from .....dependency_managers import ( Pip, Pipenv, PipenvNotFoundError, ...
1,822
test cdf values
# 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...
1,823
test facet configuration with existing facet dict
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2018 CERN. # # INSPIRE 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 ...
1,824
test is extreme weight
import math import pytest from robotoff.prediction.ocr.dataclass import OCRRegex from robotoff.prediction.ocr.product_weight import ( PRODUCT_WEIGHT_REGEX, find_product_weight, is_extreme_weight, is_suspicious_weight, is_valid_weight, normalize_weight, ) from robotoff.types import Prediction, ...
1,825
description
# 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__ ...
1,826
test opf task
# -*- coding: utf-8 -*- # Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np import pytest import pandapower as pp import pandapower.networks as nw import pandapower.toolbox def METHOD_N...
1,827
source rse
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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-...
1,828
test assemble xml file
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2023, John McNamara, jmcnamara@cpan.org # import unittest from io import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import...
1,829
filter indices by size
# 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 logging from collections import OrderedDict from typing import Dict, Sequence import numpy as np from . import FairseqDataset, Langua...
1,830
calverted years
from _typeshed import Incomplete from collections.abc import Generator from typing import ClassVar MON: Incomplete TUE: Incomplete WED: Incomplete THU: Incomplete FRI: Incomplete SAT: Incomplete SUN: Incomplete ISO_MON: Incomplete ISO_TUE: Incomplete ISO_WED: Incomplete ISO_THU: Incomplete ISO_FRI: Incomplete ISO_SAT:...
1,831
test trim nodes
import numpy as np from openpnm._skgraph import generators as gen from openpnm._skgraph.visualization import plot_edges, plot_nodes import openpnm._skgraph.operations as ops class SKGROperationsTest: def setup_class(self): pass def teardown_class(self): pass def test_join(self): ...
1,832
packets to vectors
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr import pmt def make_lengthtags(lengths, offsets, tagname='length', vlen=1): tags = [] assert(len(offsets) == len(lengths)) f...
1,833
test rabit ops ipv6
import re import sys import numpy as np import pytest import xgboost as xgb from xgboost import RabitTracker, collective from xgboost import testing as tm if sys.platform.startswith("win"): pytest.skip("Skipping dask tests on Windows", allow_module_level=True) def test_rabit_tracker(): tracker = RabitTrack...
1,834
fetch production
#!/usr/bin/env python3 from datetime import datetime from logging import Logger, getLogger from typing import Optional from requests import Session from .lib import IN, web, zonekey from .lib.exceptions import ParserException def fetch_consumption( zone_key: str = "IN-KA", session: Optional[Session] = None...
1,835
get user display name
"""ProtocolEngine-based Labware core implementations.""" from typing import List, Optional, cast from opentrons_shared_data.labware.dev_types import ( LabwareParameters as LabwareParametersDict, LabwareDefinition as LabwareDefinitionDict, ) from opentrons_shared_data.labware.labware_definition import LabwareR...
1,836
test formatting with objects
# -*- coding: utf-8 -*- import pytest from markupsafe import escape from markupsafe import escape_silent from markupsafe import Markup from markupsafe._compat import PY2 from markupsafe._compat import text_type def test_adding(): unsafe = '<script type="application/x-some-script">alert("foo");</script>' safe...
1,837
clean office
from .base import * import submission.forms from django.forms.widgets import Textarea, FileInput, SelectMultiple from django import forms from django.http import HttpResponse from jsonfield.fields import JSONField from jsonfield.forms import JSONField as JSONFormField OFFICE_TYPES = [ # (label, internal identifier, ex...
1,838
test dot state id in requisites
import io import os import os.path import attr import pytest import salt.config import salt.loader from salt.exceptions import SaltRenderError REQUISITES = ["require", "require_in", "use", "use_in", "watch", "watch_in"] @attr.s class Renderer: tmp_path = attr.ib() def __call__( self, content, sls=...
1,839
broadcast unclassified changed
from django.dispatch import receiver from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from froide.foirequest.models import FoiAttachment, FoiRequest from froide.publicbody.models import PublicBody from .api_views import ProblemReportSerializer from .consumers import PRESENCE_ROOM ...
1,840
update items
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. import enum from typing import Callable, Optional from PySide2 import QtCore, QtGui, QtWidgets from ..utils import SignalsBlocked class ComboBox(QtWidgets.QComboBox): def __init__(self, parent: Optional[QtCore.QObject]...
1,841
lookup function
# -*- test-case-name: twisted.web.test.test_soap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ SOAP support for twisted.web. Requires SOAPpy 0.10.1 or later. Maintainer: Itamar Shtull-Trauring Future plans: SOAPContext support of some kind. Pluggable method lookup policies. """ #...
1,842
check encoded file
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: test_encoding.py author: Cyrus Harrison (cyrush@llnl.gov) created: 4/09/2010 descript...
1,843
slugify
"""Test module of the references.""" import unittest from books import Books import os import re import sys def METHOD_NAME(txt): """Slugify function.""" output = txt.lower() output = re.sub(r'\]\([^)]*\)', ']', output) # remove the content of parenthesis if reference output = re.sub(r'<[^>]+>', '',...
1,844
gen flow
import os from pathlib import Path from typing import Any, Dict, List, Literal import pendulum from prefect import Flow from prefect.backend import set_key_value from viadot.task_utils import ( add_ingestion_metadata_task, df_get_data_types_task, df_map_mixed_dtypes_for_parquet, df_to_csv, df_to_p...
1,845
is segments local
#!/usr/bin/env python """ GPDB Configuration Usage: from mpp.lib.config import GPDBConfig """ from mpp.lib.PSQL import PSQL from tinctest.main import TINCException import os # ============================================================================ class GPDBConfigException(TINCException): pass class GPDBCon...
1,846
test crop frequencies
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
1,847
apply filters
import re import logging from .base import ResponseMicroService from ..context import Context from ..exception import SATOSAError logger = logging.getLogger(__name__) class AddStaticAttributes(ResponseMicroService): """ Add static attributes to the responses. """ def __init__(self, config, *args, **...
1,848
select frame
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework Foundation # # 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 Licens...
1,849
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...
1,850
dpi to steps
from meerk40t.core.units import MM_PER_INCH, UNITS_PER_INCH, Length from meerk40t.svgelements import Matrix class View: def __init__( self, width, height, dpi=float(UNITS_PER_INCH), dpi_x=None, dpi_y=None ): """ This should init the simple width and height dimensions. The defa...
1,851
valid resource type
# Copyright (c) 2001-2022, Hove and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Hove (www.hove.com). # Help us simplify mobility and open public transport: #...
1,852
test default
# Copyright Cartopy Contributors # # This file is part of Cartopy and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Tests for Robinson projection. """ import numpy as np from numpy.testing import assert_almost_equal, assert_array_a...
1,853
get integration runtime connection info
# 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__ =...
1,854
test get halo returns values specified by
from unittest import mock from lazyflow.operators.tiktorch.classifier import ModelSession, enforce_min_shape import pytest from tiktorch.proto import inference_pb2 @pytest.fixture def pb_session(): return inference_pb2.ModelSession( inputAxes=["xyc"], outputAxes=["xyc"], hasTraining=Fals...
1,855
construct model templates distillation
import logging from typing import Dict, List from autogluon.core.models import AbstractModel from autogluon.core.trainer.abstract_trainer import AbstractTrainer from autogluon.core.utils import generate_train_test_split from ..models.lgb.lgb_model import LGBModel from .model_presets.presets import MODEL_TYPES, get_pr...
1,856
time total
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Optional, TYPE_CHECKING, List from PyQt6.QtCore import pyqtSignal, pyqtProperty, QObject, pyqtSlot, QUrl from PyQt6.QtGui import QImage from cura.CuraApplication import CuraApplication if TYPE_CHECKING...
1,857
test date to list uses fill value
from copy import deepcopy from datetime import date, datetime from typing import Any, List import pytest import torch from dateutil.parser import parse from ludwig.constants import ENCODER_OUTPUT, FILL_WITH_CONST, MISSING_VALUE_STRATEGY from ludwig.features import date_feature from ludwig.features.date_feature import...
1,858
transform acl list output
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
1,859
xnli compute metrics
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
1,860
self scheduler sim options
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES). # # Copyright (c) 2018-2023 by the software own...
1,861
set up
# Owner(s): ["oncall: jit"] import os import sys import unittest import torch import torch._C from pathlib import Path from test_nnapi import TestNNAPI # Make the helper files in test/ importable pytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.append(pytorch_test_dir) if __n...
1,862
get metadata
"""Generate documentation for derived datasets.""" import logging from pathlib import Path from jinja2 import Environment, FileSystemLoader from bigquery_etl.config import ConfigLoader from bigquery_etl.dependency import extract_table_references from bigquery_etl.metadata.parse_metadata import DatasetMetadata, Metada...
1,863
test refresh token returns correct new token
from datetime import timedelta from django.conf import settings from django.urls import reverse from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.test import APIClient, APITestCase from argus.auth.factories import AdminUserFactory, PersonUserFactory from argus.aut...
1,864
test empty
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
1,865
get open
"""Stocks Trading Hours Model.""" import logging import os from datetime import datetime import pandas as pd import pytz from openbb_terminal.decorators import log_start_end logger = logging.getLogger(__name__) # pylint: disable=no-member # pylint: disable=no-member @log_start_end(log=logger) def get_bursa(symbo...
1,866
process worker
# pylint:disable=no-member import logging import stat from asyncio import CancelledError, Task, create_task, get_event_loop from asyncio import sleep as async_sleep from concurrent.futures import ThreadPoolExecutor from contextlib import suppress from pathlib import Path from queue import Empty from time import sleep ...
1,867
forward
# Authors: Divyesh Narayanan <divyesh.narayanan@gmail.com> # # License: BSD (3-clause) import numpy as np import torch from torch import nn class SleepStagerBlanco2020(nn.Module): """Sleep staging architecture from Blanco et al 2020. Convolutional neural network for sleep staging described in [Blanco2020]_....
1,868
user gas msg
#!/usr/bin/env python3 import unittest from panda import Panda from panda.tests.libpanda import libpanda_py import panda.tests.safety.common as common from panda.tests.safety.common import CANPackerPanda MSG_LENKHILFE_3 = 0x0D0 # RX from EPS, for steering angle and driver steering torque MSG_HCA_1 = 0x0D2 ...
1,869
create transfer reply
#!/usr/bin/python # SPDX-License-Identifier: LGPL-2.1-or-later from __future__ import absolute_import, print_function, unicode_literals from optparse import OptionParser import os.path import sys import dbus import dbus.service import dbus.mainloop.glib try: from gi.repository import GObject except ImportError: i...
1,870
test
""" An implementation of RandLA-Net based on the paper: RandLA-Net: Efficient Semantic Segmentation of Large-Scale Point Clouds Reference: https://arxiv.org/abs/1911.11236 """ import os.path as osp import torch import torch.nn.functional as F from randlanet_classification import DilatedResidualBlock, SharedMLP, decima...
1,871
test must resolve with respect to cwd
""" Unit test for local API service """ from unittest import TestCase from unittest.mock import Mock, patch from samcli.lib.providers.provider import Api from samcli.lib.providers.api_collector import ApiCollector from samcli.lib.providers.api_provider import ApiProvider from samcli.commands.local.lib.exceptions imp...
1,872
test flexible image widget
import pytest from django.core.exceptions import ValidationError from guardian.shortcuts import assign_perm from grandchallenge.cases.widgets import FlexibleImageField, WidgetChoices from grandchallenge.components.models import ComponentInterface from grandchallenge.core.guardian import get_objects_for_user from grand...
1,873
copy fusion profile
import os import shutil import platform from pathlib import Path from openpype.hosts.fusion import ( FUSION_HOST_DIR, FUSION_VERSIONS_DICT, get_fusion_version, ) from openpype.lib.applications import ( PreLaunchHook, LaunchTypes, ApplicationLaunchFailed, ) class FusionCopyPrefsPrelaunch(PreLau...
1,874
activate
""" This type stub file was generated by pyright. """ class _ANY(object): """ A helper object that compares equal to everything. Copied from unittest.mock """ def __eq__(self, other) -> bool: ... def __ne__(self, other) -> bool: ... def __repr__(self): ... ANY = _ANY() class Stubber(obje...
1,875
power
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2023 PyMeasure Developers # # 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 limit...
1,876
test debug function calls device function
from numba.tests.support import override_config from numba.cuda.testing import skip_on_cudasim from numba import cuda from numba.core import types from numba.cuda.testing import CUDATestCase import itertools import re import unittest @skip_on_cudasim('Simulator does not produce debug dumps') class TestCudaDebugInfo(C...
1,877
test main
# test_getopt.py # David Goodger <dgoodger@bigfoot.com> 2000-08-19 from test.support import verbose, run_doctest, run_unittest, EnvironmentVarGuard import unittest import getopt sentinel = object() class GetoptTests(unittest.TestCase): def setUp(self): self.env = EnvironmentVarGuard() if "POSIXL...
1,878
test constraint weighted undirected
"""Unit tests for the :mod:`networkx.algorithms.structuralholes` module.""" import math import pytest import networkx as nx from networkx.classes.tests import dispatch_interface class TestStructuralHoles: """Unit tests for computing measures of structural holes. The expected values for these functions were...
1,879
write entry
# Copyright 2023 OpenC3, Inc. # All Rights Reserved. # # This program is free software; you can modify and/or redistribute it # under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; version 3 with # attribution addendums as found in the LICENSE.txt # # This program is ...
1,880
train forward
# Copyright (c) 2020 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...
1,881
test create new environment cname taken script
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
1,882
fetch pr info
#!/usr/bin/env python3 """ Summarizes recent PRs based on their GitHub labels. The result can be copy-pasted into CHANGELOG.md, though it often needs some manual editing too. """ import multiprocessing import re import sys from dataclasses import dataclass from typing import Any, List, Optional import requests from...
1,883
test parse version
#!/usr/bin/env python # coding=utf-8 import pytest from sacred.utils import ( PATHCHANGE, convert_to_nested_dict, get_by_dotted_path, is_prefix, iter_prefixes, iterate_flattened, iterate_flattened_separately, join_paths, recursive_update, set_by_dotted_path, get_inheritors,...
1,884
tear down
#!/usr/bin/env python3 """ MODULE: Test of r.learn.ml AUTHOR(S): Steven Pawley <dr.stevenpawley gmail com> PURPOSE: Test of r.learn.ml for regression COPYRIGHT: (C) 2020 by Steven Pawley and the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COP...
1,885
cleanup prompts
import logging import re import time from typing import Mapping from urllib.parse import urlencode, urlparse from bs4 import BeautifulSoup, Tag from readability import Document from lncrawl.core.browser import EC from lncrawl.core.crawler import Crawler from lncrawl.models import Chapter, SearchResult from lncrawl.te...
1,886
tear down
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
1,887
hover artists
import logging from typing import Optional from feeluown.app import App from feeluown.utils.aio import run_fn, run_afn from feeluown.player import SongRadio from feeluown.library import SongProtocol, VideoModel logger = logging.getLogger(__name__) MV_BTN_TEXT = '播放 MV' class SongMenuInitializer: def __init__...
1,888
read qa frame
""" desispec.io.qa ============== IO routines for QA. """ from __future__ import print_function, absolute_import, division import os, yaml import json from desiutil.io import yamlify from desispec.io import findfile, read_meta_frame from desispec.io.util import makepath from desiutil.log import get_logger from .uti...
1,889
start rendering
import os import unreal from openpype.settings import get_project_settings from openpype.pipeline import Anatomy from openpype.hosts.unreal.api import pipeline from openpype.widgets.message_window import Window queue = None executor = None def _queue_finish_callback(exec, success): unreal.log("Render complete...
1,890
connectivity
from typing import List from qcs_api_client.client import QCSClientConfiguration from pyquil.api._engagement_manager import EngagementManager from pyquil import get_qc from openqaoa.backends.devices_core import DeviceBase class DevicePyquil(DeviceBase): """ Contains the required information and methods neede...
1,891
get product default version
#!/usr/bin/env python # @HEADER # ************************************************************************ # # TriBITS: Tribal Build, Integrate, and Test System # Copyright 2013 Sandia Corporation # # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Govern...
1,892
activate spectrum node
import logging import os from cryptoadvance.specter.managers.node_manager import NodeManager from cryptoadvance.specter.services.service import ( Service, devstatus_prod, ) # A SpecterError can be raised and will be shown to the user as a red banner from cryptoadvance.specter.specter_error import SpecterError...
1,893
parse cert
""" Module to interact with keystores """ import logging import os from datetime import datetime from salt.exceptions import CommandExecutionError, SaltInvocationError log = logging.getLogger(__name__) __virtualname__ = "keystore" try: import jks import OpenSSL has_depends = True except ImportError:...
1,894
score with l2 normalize
# Copyright (c) 2019 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 applic...
1,895
activate
from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from registration import signals from registration.forms import RegistrationForm from registration.models import RegistrationProfile class DefaultBackend(object): """ A registration backend which follows a simple wor...
1,896
nonfatal error
from Cython.TestUtils import CythonTest import Cython.Compiler.Errors as Errors from Cython.Compiler.Nodes import * from Cython.Compiler.ParseTreeTransforms import * from Cython.Compiler.Buffer import * class TestBufferParsing(CythonTest): # First, we only test the raw parser, i.e. # the number and contents o...
1,897
update repository
# Copyright The Linux Foundation and each contributor to CommunityBridge. # SPDX-License-Identifier: MIT """ Controller related to repository operations. """ import uuid import cla.hug_types from cla.utils import get_repository_instance, get_supported_repository_providers from cla.models.dynamo_models import Project,...
1,898
infer
# Copyright 2020-2023 OpenDR European Project # # 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 agree...
1,899
set speed
#!/usr/bin/env python ############################################################################# # Dell # # Module contains an implementation of SONiC FAN Base API and # provides various info about the FANs which are available in the platform # ########################################################################...