id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
16,400
avg pool
# Copyright 2023 The Flax 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 or agreed to in wri...
16,401
define endpoints
from fastapi import FastAPI, Request, WebSocket from fastapi.responses import HTMLResponse, PlainTextResponse, JSONResponse from fastapi.encoders import jsonable_encoder import asyncio import uuid import websockets import sys from a2ml.tasks_queue.tasks_api import new_project_task, list_projects_task, delete_project_...
16,402
get data container output
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
16,403
test01 btopen
""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import os, string import unittest from test_all import db, hashopen, btopen, rnopen, verbose, \ get_new_database_path class CompatibilityTestCase(unittest.TestCase): def setUp(self): self.filename = get_n...
16,404
fem3loop
import numpy as np import matplotlib.pyplot as plt import scipy.io from ipywidgets import interactive, IntSlider, widget, FloatText, FloatSlider, Checkbox def mind(x, y, z, dincl, ddecl, x0, y0, z0, aincl, adecl): x = np.array(x, dtype=float) y = np.array(y, dtype=float) z = np.array(z, dtype=float) ...
16,405
test marshal date
import unittest from urllib.parse import quote from DateTime import DateTime from ZTUtils.Zope import complex_marshal from ZTUtils.Zope import make_hidden_input from ZTUtils.Zope import make_query from ZTUtils.Zope import simple_marshal class QueryTests(unittest.TestCase): def testMarshalString(self): s...
16,406
projects
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.contenttypes.models import ContentType from django.shortcuts import get_object_or_404 from django.urls import reverse from django.views import generic from adhocracy4.actions.models import Action from adhocracy4.comments.models import Commen...
16,407
run check
import logging import operator import socket from contextlib import contextmanager from typing import Any, Callable, Mapping, MutableMapping, Optional, cast from mode import Service from faust.types import AppT from . import states from .app import send_update from .models import Status CHECK_FREQUENCY = 5.0 clas...
16,408
update
# # 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 us...
16,409
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...
16,410
test reverse parallel modules
"""Test runway.config.components.runway._deployment_dev.""" # pylint: disable=protected-access # pyright: basic from typing import Any, Dict, List import pytest from runway.config.components.runway import ( RunwayDeploymentDefinition, RunwayModuleDefinition, ) from runway.config.models.runway import ( Run...
16,411
get write buffer limits
import ssl import sys from collections import deque from collections.abc import Callable from enum import Enum from typing import Any, ClassVar from typing_extensions import Literal, TypeAlias from . import constants, events, futures, protocols, transports def _create_transport_context(server_side: bool, server_hostn...
16,412
server
import functools import hashlib import http.METHOD_NAME import multiprocessing import os import random import shutil import socket import sys from contextlib import closing import pytest import salt.utils.files class TestRequestHandler(http.METHOD_NAME.SimpleHTTPRequestHandler): """ Modified request handler...
16,413
fn
# Copyright (c) 2023 Intel Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writ...
16,414
askopenfile
import sys from _typeshed import Incomplete, StrOrBytesPath from collections.abc import Iterable from tkinter import Button, Entry, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, commondialog from typing import IO, ClassVar from typing_extensions import Literal if sys.version_info >= (3, 9): __all__ = [ ...
16,415
test prints help with question 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...
16,416
set systemd ulimits
import os import uuid import inspect from pathlib import Path from distutils.version import LooseVersion from setup_app import paths from setup_app import static from setup_app.utils import base from setup_app.config import Config from setup_app.utils.db_utils import dbUtils from setup_app.utils.progress import gluuP...
16,417
prob failure given displacement
from typing import Union import numpy as np g: float = 9.81 def newmark_critical_accel( factor_of_safety: Union[float, np.ndarray], slope: Union[float, np.ndarray] ) -> Union[float, np.ndarray]: """ Calculates the critical acceleration, i.e. the acceleration at which the slope fails. :param fact...
16,418
get input args hash
# Standard Library import json import logging from typing import Callable, Optional, Union # Sematic from sematic.abstract_future import AbstractFuture from sematic.types.serialization import ( get_json_encodable_summary, type_to_json_encodable, value_to_json_encodable, ) from sematic.utils.hashing import ...
16,419
build datasets
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data as data import torchvision.transforms as transforms class CheXpert(data.Dataset): # download_url = "http://download.cs.stanford.edu/deep/CheXpert-v1.0-small.zip" label_header = [ "No Finding", ...
16,420
test remove when removed
from unittest import mock import pytest from statemachine.exceptions import TransitionNotAllowed from tests.factories.network import NetworkFactory from yapapi.network import Network, NetworkError, NetworkState class TestNetwork: def test_init(self): ip = "192.168.0.0" network = Network(mock.Moc...
16,421
get runner
# ============================================================================== # # Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. # # TPU-MLIR is licensed under the 2-Clause BSD License except for the # third-party components. # # ====================================================================...
16,422
export output
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2023 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
16,423
test text complex elements
import json from typing import List from xml.etree import ElementTree import pytest import yaml from aiostream import stream from hypothesis import given, settings, HealthCheck from hypothesis.strategies import lists from resotocore.types import JsonElement, Json from resotocore.web.content_renderer import ( resp...
16,424
get presigned upload post from bucket
from aws_helpers.dynamo_db_utils.trainspace_db import TrainspaceData import boto3 import os import shutil import pandas as pd import io from aws_helpers.s3_utils.s3_bucket_names import FILE_UPLOAD_BUCKET_NAME """ This file contains wrappers to interface with S3 buckets through operations such as listing buckets, rea...
16,425
process
# Copyright 2022-present Facebook. All Rights Reserved. import os import pathlib import sys import subprocess import typing import unittest from libfb.py.testutil import BaseFacebookTestCase from __manifest__ import fbmake as build_info # For lldb, until there's a buck-visible library we can use. # Its path on TW con...
16,426
test aggregator
from __future__ import annotations from collections import OrderedDict from collections.abc import Generator from typing import TYPE_CHECKING import hypothesis.strategies as hst import numpy as np import pytest from hypothesis import HealthCheck, given, settings from qcodes.parameters import ManualParameter, combine...
16,427
setup
# Copyright © Michal Čihař <michal@weblate.org> # # SPDX-License-Identifier: GPL-3.0-or-later from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist, PermissionDenied, ValidationError from django.shortcuts import redirect from django.utils.decorators import meth...
16,428
test rg b to prismatic
# !/usr/bin/env python """Define the unit tests for the :mod:`colour.models.rgb.prismatic` module.""" import numpy as np import unittest from itertools import product from colour.models.rgb import RGB_to_Prismatic, Prismatic_to_RGB from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Co...
16,429
small sd
from django.core.exceptions import PermissionDenied from django.http import HttpResponse, HttpResponseNotFound from django.shortcuts import redirect, render from django.urls import reverse from activity.activity_type.activity_type import AbstractActivityType class Examen(AbstractActivityType): def student_...
16,430
split up
"""Module for parsing and testing package version predicate strings. """ import re import distutils.version import operator re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)") # (package) (rest) re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses re_splitComparison = re.com...
16,431
get multiavax balance
import logging from collections.abc import Sequence from typing import Any, Optional from eth_utils import to_checksum_address from web3 import HTTPProvider, Web3 from web3.datastructures import MutableAttributeDict from web3.exceptions import BadFunctionCallOutput from rotkehlchen.chain.constants import DEFAULT_EVM_...
16,432
clean
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
16,433
test merge auth
import pytest import requests from gitlab import Gitlab from gitlab.config import GitlabConfigParser def test_invalid_auth_args(): with pytest.raises(ValueError): Gitlab( "http://localhost", api_version="4", private_token="private_token", oauth_token="beare...
16,434
membership fixture
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. import dataclasses from datetime import timedelta import pytest from sqlalchemy import inspect, select from sql...
16,435
location
# 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...
16,436
test can remove issue
# Copyright (C) 2022 CVAT.ai Corporation # # SPDX-License-Identifier: MIT import io from logging import Logger from pathlib import Path from typing import Tuple import pytest from cvat_sdk import Client from cvat_sdk.api_client import exceptions, models from cvat_sdk.core.proxies.tasks import ResourceType, Task cla...
16,437
network selected
#!/usr/bin/python import dbus import sys, os import time import gobject from dbus.mainloop.glib import DBusGMainLoop WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1" WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1" WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1" WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface" ...
16,438
verify crm nexthop counter not increased
import pytest import logging import json import time from tests.common.dualtor.dual_tor_utils import get_crm_nexthop_counter from tests.common.dualtor.dual_tor_utils import mux_cable_server_ip from tests.common.helpers.assertions import pytest_assert as py_assert from tests.common.helpers.assertions import pytest_requ...
16,439
extract language options
import json import os import re from subprocess import CalledProcessError, check_output from typing import Any, Dict, List import orjson import polib from django.conf import settings from django.conf.locale import LANG_INFO from django.core.management.base import CommandParser from django.core.management.commands impo...
16,440
prop descriptions
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattercarpet.marker.colorbar" _path_str = "scattercarpet.marker.colorbar.title" _valid_props...
16,441
make deep sea dataset
# Copyright 2018 DeepMind Technologies 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 required by ...
16,442
tags
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
16,443
tear down
""" integration tests for mac_service """ import plistlib import pytest import salt.utils.files from tests.support.case import ModuleCase @pytest.mark.skip_if_not_root @pytest.mark.skip_if_binaries_missing("launchctl", "plutil") @pytest.mark.skip_unless_on_darwin class MacServiceModuleTest(ModuleCase): """ ...
16,444
help
import logging import requests import re import urllib.request import urllib.parse import urllib.error from bs4 import BeautifulSoup import ssl import itertools from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import decouple # Enable logging logging.basicConfig( format="%(asctime)s - %(na...
16,445
submit to datapusher
# encoding: utf-8 import logging import ckan.logic as logic import ckan.model as model import ckan.plugins as p import ckan.plugins.toolkit as toolkit import ckanext.datapusher.blueprint as blueprint import ckanext.datapusher.helpers as helpers import ckanext.datapusher.logic.action as action import ckanext.datapushe...
16,446
test render fields
""" Test the napalm_formula execution module. """ import textwrap import pytest import salt.modules.napalm_formula as napalm_formula from salt.utils.immutabletypes import freeze from tests.support.mock import MagicMock, patch @pytest.fixture def set_model(): return freeze( { "interfaces": {...
16,447
loading nessary files
# Copyright (c) Recommenders contributors. # Licensed under the MIT License. import tensorflow as tf from recommenders.models.deeprec.io.dkn_iterator import DKNTextIterator class DKNItem2itemTextIterator(DKNTextIterator): def __init__(self, hparams, graph): """This new iterator is for DKN's item-to-item...
16,448
modcontrol reports
import arrow from pyramid.httpexceptions import HTTPSeeOther from pyramid.response import Response from weasyl import define, macro, moderation, note, profile, report from weasyl.controllers.decorators import moderator_only, token_checked from weasyl.error import WeasylError # Moderator control panel functions @mod...
16,449
test add tableau user
from unittest import mock from corehq.apps.reports.const import HQ_TABLEAU_GROUP_NAME from corehq.apps.reports.tests.test_tableau_api_session import TestTableauAPISession from corehq.apps.reports.models import ( TableauUser, TableauAPISession ) from corehq.apps.reports.util import ( TableauGroupTuple, g...
16,450
teardown module
import re from app.alias_suffix import get_alias_suffixes from app.db import Session from app.models import SLDomain, PartnerUser, AliasOptions, CustomDomain from app.proton.utils import get_proton_partner from init_app import add_sl_domains from tests.utils import create_new_user, random_token def setup_module(): ...
16,451
mouse press event
import logging from PySide6.QtCore import QRectF, Qt from PySide6.QtGui import QColor, QPen from PySide6.QtWidgets import QGraphicsItem from angrmanagement.config import Conf from angrmanagement.utils import locate_function _l = logging.getLogger(__name__) class QStateBlock(QGraphicsItem): HORIZONTAL_PADDING =...
16,452
get next
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ import sys from typing import Any, List...
16,453
start north ocs v2
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END """ Test system/python/test_e2e_coap_OCS.py """ import os import subprocess import http.client import json import time import requests import pytest __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2019 Dianomic...
16,454
last modified by
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
16,455
main
""" converted from: - http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/extract_selectionCells """ import vtk from pyNastran.gui.vtk_interface import vtkUnstructuredGrid from pyNastran.gui.vtk_rendering_core import vtkRenderer, vtkRenderWindow, vtkRenderWindowInteractor, vtkActor def METHOD_NAME(): point_source ...
16,456
test fill int with none
# Copyright 2021-2022 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
16,457
recall
# Natural Language Toolkit: Evaluation # # Copyright (C) 2001-2023 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT import operator from functools import reduce from math import fabs from rand...
16,458
prepare request
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
16,459
test all 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...
16,460
main
#!/usr/bin/env python import argparse import xarray import numpy import dask import multiprocessing from multiprocessing.pool import ThreadPool from mpas_analysis.shared.io import write_netcdf from mpas_analysis.shared.constants import constants from mpas_analysis.shared.climatology import compute_climatology de...
16,461
sobel hsv
""" ========================================= Adapting gray-scale filters to RGB images ========================================= There are many filters that are designed to work with gray-scale images but not with color images. To simplify the process of creating functions that can adapt to RGB images, scikit-image p...
16,462
test qha qmesh analyzer
"""Tests for frozen_phonons""" import os import warnings import abipy.data as abidata from abipy.dfpt.qha import QHA, QHA3PF, QHA3P, QHAQmeshAnalyzer from abipy.dfpt.phonons import PhononBands from abipy.core.testing import AbipyTest class QhaTest(AbipyTest): @classmethod def setUpClass(cls): cls.st...
16,463
make on
# Copyright 2023 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 ...
16,464
test is datetime type with pandas datetime
from datetime import datetime from unittest.mock import patch import numpy as np import pandas as pd from sdv.utils import ( convert_to_timedelta, create_unique_name, get_datetime_format, is_datetime_type) from tests.utils import SeriesMatcher @patch('sdv.utils.pd.to_timedelta') def test_convert_to_timedelta(to...
16,465
is device spec
# Copyright 2015 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...
16,466
test topk
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
16,467
ensure path exists
from __future__ import print_function import re import os import subprocess import errno shortcuts = {} # regex matching on key, replacement of groups on value # implement any other shortcuts that you want to use #sources shortcuts["mp([0-9]*)"] = "sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduc...
16,468
build model
# Copyright (c) 2023 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...
16,469
transcribe live
from django.conf import settings from vosk import Model, KaldiRecognizer, SetLogLevel from webvtt import WebVTT, Caption from pod.main.tasks import task_end_live_transcription, task_start_live_transcription import threading import time import json import subprocess LIVE_CELERY_TRANSCRIPTION = getattr(settings, "LIVE_C...
16,470
test eval
# 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...
16,471
test log prefix norms
import matplotlib.pyplot as plt import pytest from pytest import raises import pyfar.plot as plot import pyfar as pf def test_prepare_plot(): # test without arguments plot._utils._prepare_plot() # test with single axes object fig = plt.gcf() ax = plt.gca() plot._utils._prepare_plot(ax) pl...
16,472
recvall
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Dummy Socks5 server for testing. ''' import socket, threading, queue import traceback, sys ### Proto...
16,473
load meta
# 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 multiprocessing import Pool import os from collections import defaultdict from itertools import starmap import torch from npy_append_arr...
16,474
epilog
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from memoized import memoized from commcare_cloud.colors import color_error, color_summary, color_highlight, color_link from .command_base import CommandBase, Argument class Fab(CommandBase): com...
16,475
split glyph list
# Authors: see git history # # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. from inkex import NSS from lxml import etree from ..svg.tags import INKSCAPE_LABEL class FontFileInfo(object): """ This class reads kerning information from an SVG f...
16,476
list namespaced pod
from unittest.mock import MagicMock import kubernetes from wandb.apis.internal import Api from wandb.sdk.launch import loader from wandb.sdk.launch.runner import kubernetes_runner from wandb.sdk.launch.utils import make_name_dns_safe def test_kubernetes_run_clean_generate_name(relay_server, monkeypatch, assets_path)...
16,477
test remove overlap otf
import pytest from shutil import copy2, copytree import os from booleanOperations.booleanGlyph import BooleanGlyph from defcon import Glyph from afdko.checkoutlinesufo import remove_tiny_sub_paths from afdko.fdkutils import ( get_temp_file_path, get_temp_dir_path, get_font_format, ) from test_utils impor...
16,478
serialize
__all__ = ['Serializer', 'SerializerError'] from .error import YAMLError from .events import * from .nodes import * class SerializerError(YAMLError): pass class Serializer: ANCHOR_TEMPLATE = 'id%03d' def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=None, ta...
16,479
to str
# Copyright 2023 The KServe 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 or agreed to in wr...
16,480
provide metadata
# testing/util.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from ..util import jython, pypy, defaultdict, decorator, py2k import decimal import ...
16,481
call
import tensorflow as tf from scipy import sparse from tensorflow.keras import backend as K from spektral.layers import ops from spektral.layers.pooling.src import SRCPool class LaPool(SRCPool): r""" A Laplacian pooling (LaPool) layer from the paper > [Towards Interpretable Sparse Graph Representation Le...
16,482
test queue connect to nats
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
16,483
relative child offset
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import functools import logging from typing import Any, ClassVar, Dict, List, Type from volatility3.framework import interfaces, exc...
16,484
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...
16,485
validation state
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
16,486
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
16,487
test config no file main option
import os import tempfile from alembic import config from alembic import testing from alembic import util from alembic.migration import MigrationContext from alembic.operations import Operations from alembic.script import ScriptDirectory from alembic.testing import assert_raises_message from alembic.testing import eq_...
16,488
tear down
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # # Copyright 2010 Google Inc. 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/LIC...
16,489
test larger circuit
# Copyright 2018 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 ...
16,490
add layout pins
# See LICENSE for licensing information. # # Copyright (c) 2016-2023 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import math from openram import debug from openr...
16,491
escape
# Copyright 2008-2015 Nokia Networks # 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
16,492
set test params
#!/usr/bin/env python3 # Copyright (c) 2021-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test that a node in blocksonly mode does not request compact blocks.""" from test_framework.messages i...
16,493
package info
from conans import ConanFile, Meson, tools from conan.tools.files import rename from conan.tools.microsoft import is_msvc from conans.errors import ConanInvalidConfiguration import glob import os import shutil class CairommConan(ConanFile): name = "cairomm" homepage = "https://github.com/freedesktop/cairomm" ...
16,494
get runtime profile
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
16,495
finalize rule
import os from enum import Enum from typing import Sequence, Union class AccessMode(Enum): NONE = 0 EXACT = 1 RECURSIVE = 2 # flake8 doesn't recognize `AccessMode` in type annotations here @classmethod def more_permissive(cls, mode1, mode2): return cls(max(mode1.value, mode2.value)) ...
16,496
array model form
#!/bin/env python __author__ = 'dongyun.zdy' import getopt import sys import math def material_model_form(args): ( Nrow, Ncol, ) = args Trow_col = 0.02674675 Trow_once = 0.07931677 total_cost = 0 #Tstartup total_cost += Nrow * (Trow_once + Ncol * Trow_col) return total_c...
16,497
test property is xsi type
import sys from xsdata.codegen.models import Restrictions from xsdata.models.enums import DataType from xsdata.models.enums import Namespace from xsdata.models.enums import Tag from xsdata.utils.testing import AttrFactory from xsdata.utils.testing import AttrTypeFactory from xsdata.utils.testing import FactoryTestCase...
16,498
on return to main menu
# Generate UI for Building OpenCore import wx import logging import threading import traceback from resources import constants from resources.build import build from resources.wx_gui import ( gui_main_menu, gui_install_oc, gui_support ) class BuildFrame(wx.Frame): """ Create a frame for building ...
16,499
test counting iterator index
# 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 unittest from fairseq.data import iterators, ListDataset class TestIterators(unittest.TestCase): def METHOD_NAME(self, ref=None,...