id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
4,600
arc create job file factory
# coding: utf-8 """ ARC remote workflow implementation. See http://www.nordugrid.org/arc/ce. """ __all__ = ["ARCWorkflow"] import os from abc import abstractmethod from collections import OrderedDict from law.workflow.remote import BaseRemoteWorkflow, BaseRemoteWorkflowProxy from law.job.base import JobArguments, ...
4,601
test not found
import time from http.client import BadStatusLine from unittest import mock from urllib.error import HTTPError, URLError from ssl import CertificateError from socket import timeout, error import pytest from django.utils.timezone import now from datetime import timedelta from django.core.management import call_comma...
4,602
handler
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
4,603
layout
from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import chdir, copy, get, rename, replace_in_file, rm, rmdir from conan.tools.gnu import Autotools, ...
4,604
one hot encoding
"""Implements the k-nearest neighbors (kNN) classifier""" from typing import Callable import heat as ht from heat.core.dndarray import DNDarray class KNeighborsClassifier(ht.BaseEstimator, ht.ClassificationMixin): """ Implementation of the k-nearest-neighbors Algorithm [1]. This algorithm predicts labe...
4,605
get private link scoped resource 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__ =...
4,606
test examples security secure boot key revoke
from __future__ import print_function import os import struct import zlib from io import BytesIO import ttfw_idf # To prepare a runner for these tests, # 1. Connect an FPGA with C3 image # 2. Use a COM port for programming and export it as ESPPORT # e.g export ESPPORT=/dev/ttyUSB0 # 3. Use another COM port for re...
4,607
info
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
4,608
test run sequential catch tests
import sys sys.path.insert(0, '../common_python') import tools import pytest import os, re import subprocess as sp # BVE this should work for now, but needs to be cleaned up more def hack_find_spack_build_dir(basedir): if os.getenv('LBANN_BUILD_DIR', default=None): build_dir = os.getenv('LBANN_BUILD_DIR') ...
4,609
check shutdown
import re import threading import asyncio from aiohttp import web from openpype.lib import Logger from .cors_middleware import cors_middleware class WebServerManager: """Manger that care about web server thread.""" def __init__(self, port=None, host=None): self._log = None self.port = port...
4,610
demo
#!/usr/bin/env python3 from __future__ import division from builtins import range import copy import math from asciimatics.effects import Cycle, Print, Stars from asciimatics.renderers import SpeechBubble, FigletText, Box from asciimatics.scene import Scene from asciimatics.screen import Screen from asciimatics.sprite...
4,611
get model
# /usr/bin/env python3.8 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
4,612
status handler
import time from machine import Pin, ADC, UART from picographics import PicoGraphics, DISPLAY_ENVIRO_PLUS from pimoroni import RGBLED, Button from breakout_bme68x import BreakoutBME68X, STATUS_HEATER_STABLE from pimoroni_i2c import PimoroniI2C from breakout_ltr559 import BreakoutLTR559 from pms5003 import PMS5003 impor...
4,613
test init terraform with in repo module
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import textwrap from pathlib import Path from typing import Optional from pants.backend.terraform.dependencies import TerraformInitRequest, TerraformInitResponse from pants.bac...
4,614
test pushing with owner
import io import sys from pathlib import Path from uuid import uuid4 import pendulum import pytest from _pytest.capture import CaptureFixture from prefect.utilities.dockerutils import ( ImageBuilder, PushError, push_image, silence_docker_warnings, ) from prefect.utilities.slugify import slugify with ...
4,615
int to float
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
4,616
spec
""" time_freq_provider ================== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecific...
4,617
kind
# -*- coding: utf-8 -*- # Copyright 2023 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...
4,618
login
# coding=utf-8 """Provider code for HDTorrents.""" from __future__ import unicode_literals import logging import re from medusa import tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import ( convert_size, try_int, ) from medusa.helper.exceptions import AuthException from medusa.logger....
4,619
check rst data
"""distutils.command.check Implements the Distutils 'check' command. """ from distutils.core import Command from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docutils.parsers.rst import Parser from docutils import frontend from d...
4,620
replicate
import torch from torch.nn.modules import Module from torch.nn.parallel.scatter_gather import gather from torch.nn.parallel.METHOD_NAME import METHOD_NAME from torch.nn.parallel.parallel_apply import parallel_apply from .scatter_gather import scatter_kwargs class _DataParallel(Module): r"""Implements data paral...
4,621
from json
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) ...
4,622
get user cache dir
import os.path import re import subprocess import sys from dataclasses import dataclass from logging import getLogger from typing import List, Optional, Set, Tuple import pkg_resources logger = getLogger(__name__) @dataclass class ParsedWheelFilename: project: str version: str build: Optional[str] p...
4,623
error format
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
4,624
test validate rbtree null root parent
# Copyright (c) Meta Platforms, Inc. and affiliates. # SPDX-License-Identifier: LGPL-2.1-or-later import collections from drgn import NULL from drgn.helpers import ValidationError from drgn.helpers.linux.rbtree import ( RB_EMPTY_NODE, RB_EMPTY_ROOT, rb_find, rb_first, rb_last, rb_next, rb_...
4,625
handler
import asyncio import time from datetime import datetime from unittest.mock import AsyncMock, patch import pytest from aiogram import Bot, flags from aiogram.dispatcher.event.METHOD_NAME import HandlerObject from aiogram.types import Chat, Message, User from aiogram.utils.chat_action import ChatActionMiddleware, Chat...
4,626
test is type
""" Tests for the `TypeChecker`-based type interface. The actual correctness of the type checking is handled in `test_jsonschema_test_suite`; these tests check that TypeChecker functions correctly at a more granular level. """ from collections import namedtuple from unittest import TestCase from jsonschema import Val...
4,627
grad
import numpy as np from scipy.sparse import csc_matrix, csr_matrix, spdiags, triu, tril, find, hstack, eye from scipy.sparse.linalg import cg, inv, dsolve from scipy.linalg import norm from pyamg import * class TriRadiusRatio(): def __init__(self, mesh): self.mesh = mesh; def get_free_node_info(self):...
4,628
test ctc loss
# Copyright 2017 Shigeki Karita # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import chainer.functions as F import numpy import pytest import torch from espnet.nets.pytorch_backend.e2e_asr import pad_list from espnet.nets.pytorch_backend.nets_utils import th_accuracy @pytest.mark.parametrize("ctc_type"...
4,629
parse rect
# # Part of p5: A Python package based on Processing # Copyright (C) 2017-2019 Abhik Pal # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
4,630
do in
#!/usr/bin/env python3 import linuxcnc, hal import sys, os # Set up pins h = hal.component("test-ui") h.newpin('d_out', hal.HAL_BIT, hal.HAL_IN) # pin for reading digital out h.newpin('a_out', hal.HAL_FLOAT, hal.HAL_IN) # pin for reading analog out h.newpin('d_in', hal.HAL_BIT, hal.HAL_OUT) # pin for setting digital ...
4,631
init widgets
from typing import TYPE_CHECKING, Dict, Optional import networkx from angr import SIM_PROCEDURES from angr.code_location import ExternalCodeLocation from PySide6.QtCore import QSize from PySide6.QtWidgets import QHBoxLayout from angrmanagement.ui.widgets.qdep_graph import QDependencyGraph from angrmanagement.ui.widge...
4,632
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 . imp...
4,633
imag
import sys from collections.abc import Callable from decimal import Decimal from numbers import Integral, Rational, Real from typing import Any, overload from typing_extensions import Literal, Self, SupportsIndex, TypeAlias _ComparableNum: TypeAlias = int | float | Decimal | Real if sys.version_info >= (3, 9): __...
4,634
get old to new bnf codes
""" Update the prescribing data in a SQLite file using the `bnf_map` table in BigQuery which maps old BNF codes to their current versions """ import logging import os.path import sqlite3 from gcutils.bigquery import Client from matrixstore.matrix_ops import sparse_matrix, finalise_matrix, is_integer from matrixstore.s...
4,635
get value handle
#!/usr/bin/env python3 import struct BLUETOOTH_BASE_UUID = bytes ([ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB ]); def hex_string(bytes): return " ".join([('%02x' % a) for a in bytes]) def unpack24(data): (upper, ) = struct.unpack("<H", data[1:]) ...
4,636
test check is legal port false
import datetime import pytest # For tests from pymilvus import * from pymilvus import MilvusException from pymilvus.client.check import ( check_pass_param, ) from pymilvus.client.utils import ( mkts_from_unixtime, mkts_from_datetime, mkts_from_hybridts, hybridts_to_unixtime ) from pymilvus.client ...
4,637
test hybrid recurrent ppo
import attr import pytest from mlagents.trainers.tests.simple_test_envs import ( SimpleEnvironment, MemoryEnvironment, ) from mlagents.trainers.settings import NetworkSettings from mlagents.trainers.tests.dummy_config import ppo_dummy_config, sac_dummy_config from mlagents.trainers.tests.check_env_trains im...
4,638
test adaptive avg pool 2d grad grad
""" 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...
4,639
is synonym
""" cheminformatics related functions """ import functools import logging import ipywidgets as widgets import matchms import numpy as np from matchms.filtering.load_adducts import load_adducts_dict from rdkit import Chem from metatlas.interfaces.compounds import structure_cleaning as cleaning logger = logging.getL...
4,640
system data
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
4,641
sanitize general
"""pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers: ignore Python 2 vs 3 differences. """ import pytest import textwrap import difflib import re import sys import contextlib import platform import gc _u...
4,642
test invalid get
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re from dataclasses import dataclass from typing import Callable import pytest from pants.engine.internals.selectors import Get, MultiGet from pants.engine.unions import union c...
4,643
register to server
""" Within this module is defined the class from which all other accounting types are defined """ import datetime from DIRAC import S_OK, S_ERROR from DIRAC.Core.Base.Client import Client from DIRAC.AccountingSystem.Client.DataStoreClient import gDataStoreClient class BaseAccountingType: def __init__(self): ...
4,644
main
#!/usr/bin/env python3 ############################################################ # Program is part of MintPy # # Copyright (c) 2013, Zhang Yunjun, Heresh Fattahi # # Author: Antonio Valentino, Zhang Yunjun, Aug 2022 # #####################################################...
4,645
get corpus directory
# 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, ...
4,646
item from index
# /*########################################################################## # # Copyright (c) 2017-2018 European Synchrotron Radiation Facility # # 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 Sof...
4,647
test encode datamap grid
import warnings import pytest from sqlalchemy.exc import SAWarning from ichnaea.models.content import ( decode_datamap_grid, encode_datamap_grid, DataMap, RegionStat, Stat, StatKey, ) from ichnaea import util class TestDataMapCodec(object): def test_decode_datamap_grid(self): ass...
4,648
test delete cascade transaction to splits
# Copyright (c) 2022. 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 from functools import partial import pytest from sqlalchemy import select, func, text from sqlalchemy.exc im...
4,649
test str
from django.test import TestCase from nav.models.arnold import Justification from nav.auditlog import find_modelname from nav.auditlog.models import LogEntry from nav.auditlog.utils import get_auditlog_entries class AuditlogModelTestCase(TestCase): def setUp(self): # This specific model is used because ...
4,650
get counts
import json import logging import time from multiprocessing import Pool from urllib import urlencode import requests import transaction from AccessControl.SecurityManagement import newSecurityManager from Acquisition import aq_parent from BTrees.OOBTree import OOBTree from castle.cms.indexing.hps import index_in_es f...
4,651
begin and validate translation async
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from devtools_testutils import ( AzureRecordedTestCase ) from testcase import DocumentTranslationTest, Document from azure.ai.translation.document import DocumentTr...
4,652
get secondary fire ammo
# ../weapons/_base.py """Provides simplified weapon functionality.""" # ============================================================================= # >> IMPORTS # ============================================================================= # Source.Python Imports # Entities from entities.entity import Entity # ...
4,653
test default value
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
4,654
main instance
"""Relay method calls to interfaces of multiple implementations. A Relayer instance keeps track of multiple subclasses of an interface and forwards method calls to one of the instances based on a priority list. Using this example: * Metadata - DmapMetadata - MrpMetadata - CompanionMetadata - AirPlayMetadata ...
4,655
stop tuning
import collections import os import re import traceback import tuned.exceptions import tuned.logs import tuned.plugins.exceptions import tuned.consts as consts from tuned.utils.global_config import GlobalConfig from tuned.utils.commands import commands log = tuned.logs.get() __all__ = ["Manager"] class Manager(objec...
4,656
test get valid primitives selected primitives
import pytest from woodwork.column_schema import ColumnSchema from featuretools.primitives import ( AggregationPrimitive, Count, Hour, IsIn, Not, TimeSincePrevious, TransformPrimitive, ) from featuretools.synthesis.get_valid_primitives import get_valid_primitives from featuretools.utils.gen...
4,657
get os name
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ This file contains functions used for telemetry. """ import math import os import platform import sys import distr...
4,658
load detection model
# Copyright (c) Facebook, Inc. and its affiliates. # install `vqa-maskrcnn-benchmark` from # https://github.com/ronghanghu/vqa-maskrcnn-benchmark-m4c import argparse import os import sys import cv2 import numpy as np import torch import tqdm from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.layers imp...
4,659
validate pricing rules
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import frappe from frappe import _ from frappe.model.document import Document pricing_rule_fields = [ "apply_on", "mixed_conditions", "is_cumulative", "other_item_code", "other_item_group", "a...
4,660
tear down
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
4,661
handler
#!/usr/bin/env python2 """ posix_test.py: Tests for our posix_ module subset. NOTE: There are more tests in Python-2.7.13/Lib/test/test_posix.py. Notes on stripping posixmodule.c: I left in: - putenv, unsetenv: Isn't it simpler to use these than os.environ? I'm not sure how it works. - tcgetpgrp, tcsetpgrp...
4,662
rclick menu
# ##### 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...
4,663
comma list
#! /usr/bin/env python # 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 ...
4,664
test transpiling
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
4,665
job view cb
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Harddisk import harddiskmanager from Components.MenuList import MenuList from Components.Label import Label from Components.Pixmap import Pixmap from Components.Task import job_manager from Components.config import config from ...
4,666
test prediction scores
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import os import sys import unittest from os import path # noinspection PyProtectedMember from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from num...
4,667
torch sparse mm
import warnings import backend as F import pytest import torch from dgl.sparse import bspmm, diag, from_coo, val_like from dgl.sparse.matmul import matmul from .utils import ( clone_detach_and_grad, dense_mask, rand_coo, rand_csc, rand_csr, rand_stride, sparse_matrix_to_dense, sparse_...
4,668
format dialogue with target
import logging import time import os import random from transformers import AutoTokenizer, AutoModelForCausalLM import torch from flask import Flask, request, jsonify from healthcheck import HealthCheck import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration sentry_sdk.init(dsn=os.getenv("SENTRY_...
4,669
inputs
""" pres_to_field ============= Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.METHOD_NAME import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification...
4,670
get compute
# 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...
4,671
open
import logging import os import shutil import sqlite3 import warnings from aequilibrae import global_logger from aequilibrae.log import Log from aequilibrae.parameters import Parameters from aequilibrae.project.about import About from aequilibrae.project.data import Matrices from aequilibrae.project.database_connectio...
4,672
test fits
import os import re import numpy as np import pytest from astropy.table.scripts import showtable ROOT = os.path.abspath(os.path.dirname(__file__)) ASCII_ROOT = os.path.join(ROOT, "..", "..", "io", "ascii", "tests") FITS_ROOT = os.path.join(ROOT, "..", "..", "io", "fits", "tests") VOTABLE_ROOT = os.path.join(ROOT, "....
4,673
send mattermost request
import logging from typing import Dict, List, Optional, Tuple from robusta.core.model.env_vars import ROBUSTA_LOGO_URL from robusta.integrations.common.requests import HttpMethod, check_response_succeed, process_request _API_PREFIX = "api/v4" class MattermostClient: channel_id: str bot_id: str team_id: O...
4,674
set up
import datetime import pytest import responses from django.http import HttpRequest from freezegun import freeze_time from sentry.auth.authenticators.sms import SmsInterface, SMSRateLimitExceeded from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test from sentry.utils.sms impor...
4,675
test pytorch trainable and transferable
# coding: utf-8 import argparse import json import os import tempfile import numpy as np import pytest import torch import espnet.nets.pytorch_backend.lm.default as lm_pytorch from espnet.asr.asr_utils import torch_save from espnet.asr.pytorch_backend.asr_init import freeze_modules, load_trained_modules from espnet....
4,676
blacklist
#!/usr/bin/env python # -*- coding: utf-8 -*- """Properties: This section contains additional properties to be guessed by guessit.""" from __future__ import unicode_literals import re from guessit.reutils import build_or_pattern from guessit.rules.common import dash from guessit.rules.common.validators import seps_s...
4,677
delete nodes
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
4,678
child main
# Copyright 2017, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
4,679
test create enkelvoudiginformatieobject
# SPDX-License-Identifier: EUPL-1.2 # Copyright (C) 2020 Dimpact """ Test the flow described in https://github.com/VNG-Realisatie/gemma-zaken/issues/39 """ import base64 from datetime import date from urllib.parse import urlparse from django.test import override_settings from rest_framework import status from vng_api...
4,680
test botservice create channel specific location
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
4,681
make drive
# SPDX-FileCopyrightText: Red Hat, Inc. # SPDX-License-Identifier: GPL-2.0-or-later from __future__ import absolute_import from __future__ import division import logging import pytest import vdsm.virt.vmdevices.storage as storage from vdsm.clientIF import clientIF from vdsm.common import response from vdsm.common i...
4,682
downsample basic block
import torch.nn as nn def conv3x3(in_planes, out_planes, stride=1): """conv3x3. :param in_planes: int, number of channels in the input sequence. :param out_planes: int, number of channels produced by the convolution. :param stride: int, size of the convolving kernel. """ return nn.Conv2d( ...
4,683
generate swagger readme
import argparse import logging from pathlib import Path import os from jinja2 import Environment, FileSystemLoader from subprocess import check_call from typing import Any import json _LOGGER = logging.getLogger(__name__) _TEMPLATE = Path(__file__).resolve().parent / "template" _TEMPLATE_TESTS = Path(__file__).resolv...
4,684
test shim translates set command
# -*- coding: utf-8 -*- # Copyright 2013 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/LICENSE-2.0 # # Unless require...
4,685
jacobian adjoint action
""" Solves a optimal control problem constrained by the Poisson equation: min_(u, m) \int_\Omega 1/2 || u - d ||^2 + 1/2 || f ||^2 subjecct to grad \cdot \grad u = f in \Omega u = 0 on \partial \Omega """ from dolfin import * from dolfin_adjoint import * try: import Op...
4,686
log distribution
# Copyright 2020 Adap GmbH. 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 ag...
4,687
rcodesign notary wait
#!/usr/bin/env python """Functions that interface with rcodesign""" import asyncio import logging import re from signingscript.exceptions import SigningScriptError log = logging.getLogger(__name__) class RCodesignError(SigningScriptError): pass async def _execute_command(command): """Executes a command, lo...
4,688
get wireguard file
# Copyright 2017 the Isard-vdi project authors: # Josep Maria Viñolas Auquer # Alberto Larraz Dalmases # License: AGPLv3 #!/usr/bin/env python # coding=utf-8 import os import traceback from pydoc import describe from rethinkdb import RethinkDB from api import app from .._common.api_exceptions import Erro...
4,689
get first or none
""" A simple XPath-like language for tree traversal. This works by creating a filter chain of generator functions. Each function selects a part of the expression, e.g. a child node, a specific descendant or a node that holds an attribute. """ from __future__ import absolute_import import re import operator import s...
4,690
set inf depex content item list
## @file # This file is used to define class objects of INF file [Depex] section. # It will consumed by InfParser. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent ''' InfDepexObject ''' from Library import DataType as DT from Library import G...
4,691
get
from __future__ import annotations from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response from sentry import features from sentry.api.api_publish_status import ApiPublishStatus from sentry.api.base import region_silo_endpoint from sentry.api.base...
4,692
read keys from env
import getpass import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import web3 from eth_account.account import Account # type: ignore from eth_typing.evm import ChecksumAddress from hexbytes.main import HexBytes from web3 import Web3 from web3.contract import Contract, ContractFunction from...
4,693
test valid daily scheduler invalid days
import datetime from unittest import mock from testifycompat import assert_equal from testifycompat import assert_raises from testifycompat import run from testifycompat import TestCase from tron.config import config_utils from tron.config import ConfigError from tron.config import schedule_parse class TestPadSequen...
4,694
async set up
from __future__ import annotations import random from unittest import IsolatedAsyncioTestCase from functional_tests.conftest import IAMBIC_TEST_DETAILS from iambic.plugins.v0_1_0.aws.models import Tag from iambic.plugins.v0_1_0.aws.organizations.scp.models import PolicyTargetProperties from .utils import generate_sc...
4,695
test which
from varmat_compatibility_summary import convert_signatures_list_to_functions, select_signatures_matching_functions, remove_signatures_matching_functions, process_results import unittest class HelpersTest(unittest.TestCase): def setUp(self): self.signatures_list = ["chicken(array[] real) => real", "squirre...
4,696
close
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
4,697
test val interaction
# Copyright (c) MONAI Consortium # 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, so...
4,698
header
import os import time import tempfile import threading import urllib.parse import pycurl from hashlib import sha256 from io import BytesIO from tenacity import retry, wait_random_exponential, stop_after_attempt from openpilot.common.file_helpers import mkdirs_exists_ok, atomic_write_in_dir # Cache chunk size K = 1000 ...
4,699
do prepare partition
#!/usr/bin/env python3 # # Copyright (c) 2011 Intel, Inc. # # SPDX-License-Identifier: GPL-2.0-only # __all__ = ['ImagerPlugin', 'SourcePlugin'] import os import logging from collections import defaultdict from importlib.machinery import SourceFileLoader from wic import WicError from wic.misc import get_bitbake_var...