id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
8,000
get inflow bounds
# -*- coding: utf-8 -*- """ In-development Converter with piecewise linear efficiencies. SPDX-FileCopyrightText: Uwe Krien <krien@uni-bremen.de> SPDX-FileCopyrightText: Simon Hilpert SPDX-FileCopyrightText: Cord Kaldemeyer SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText: Johannes Röder SPDX-FileCopyr...
8,001
test list restore jobs
# (c) 2022 Red Hat Inc. # This file is part of Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import pytest from unittest.mock import MagicMock from unittest.mock import patch from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict f...
8,002
email
# 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__ ...
8,003
register state
#------------------------------------------------------------------------------- # JohnsonCookDamage #------------------------------------------------------------------------------- from PYB11Generator import * from Physics import * from RestartMethods import * @PYB11template("Dimension") class JohnsonCookDamage(Physi...
8,004
kill processes
import traceback import logging import signal import atexit import os import time import werkzeug import gevent from werkzeug.middleware.proxy_fix import ProxyFix from flask import Flask, request from flask_socketio import SocketIO import flask_security from spectree import SpecTree from mxcube3.core.util import n...
8,005
get fan fault
#!/usr/bin/env python # Copyright (c) 2019 Edgecore Networks 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 # # THIS CODE IS PROVIDED O...
8,006
run cmd
# Copyright (c) OpenMMLab. All rights reserved. import argparse import multiprocessing import os from collections import defaultdict from typing import List import decord def get_kinetics_frames(kinetics_anotation_file: str) -> dict: """Given the AVA-kinetics anotation file, return a lookup to map the video ...
8,007
inner
# -*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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 later version. OpenSesame is distr...
8,008
print certs
#!/usr/bin/env python """cert_util.py: X509 certificate parsing utility. Usage: cert_util.py <command> [flags] [cert_file ...] Known commands: print: print information about the certificates in given files Each file must contain either one or more PEM-encoded certificates, or a single DER certificate. F...
8,009
make sparse matrix
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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 applicab...
8,010
load files
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Inria Aerial Image Labeling Dataset.""" import glob import os from typing import Any, Callable, Optional import matplotlib.pyplot as plt import numpy as np import rasterio as rio import torch from matplotlib.figure impor...
8,011
add items to self
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2018 Thomas Hess # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
8,012
config
import os import pytest class TestExistsSeries: _config = """ templates: global: parsing: series: __parser__ tasks: test: mock: - {title: 'Foo.Bar.S01E02.XViD'} - {title: 'Foo.Bar.S01E03.XViD'} serie...
8,013
system data
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
8,014
setup ui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_valve.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_QtValveControlWidget(object): def METHOD_NAME(self, QtValveControlWid...
8,015
max abs
# Copyright (c) 2013-2018 Commissariat à l'énergie atomique et aux énergies alternatives (CEA) # Copyright (c) 2013-2018 Centre national de la recherche scientifique (CNRS) # Copyright (c) 2018-2023 Simons Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
8,016
forward
from typing import Optional, Tuple import torch from torch import Tensor from torch_geometric.experimental import disable_dynamic_shapes from torch_geometric.utils import scatter, segment, to_dense_batch class Aggregation(torch.nn.Module): r"""An abstract base class for implementing custom aggregations. Ag...
8,017
test it with no user
from unittest import mock import pytest from h_matchers import Any from h.jinja_extensions.navbar_data import navbar_data class TestNavbarData: def test_it(self, pyramid_request, user): pyramid_request.matched_route = None pyramid_request.params["q"] = "tag:question" pyramid_request.user...
8,018
write params
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC ''' Generate a primitive to place at ...
8,019
process history
# The MIT License (MIT) # Copyright © 2021 Yuma Rao # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the “Software”), to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, ...
8,020
class one err
# Original author: Henrik Linusson (github.com/donlnz) import numpy as np # ----------------------------------------------------------------------------- # Validity measures # ----------------------------------------------------------------------------- def reg_n_correct(prediction, y, significance=None): """Cal...
8,021
cross
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2023 The Pybricks Authors """Common tools for timing, data logging, and linear algebra.""" from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional, Sequence, Tuple, overload if TYPE_CHECKING: from ._common import MaybeAwaitable f...
8,022
main
import os import argparse import yaml import json from pathlib import Path from huggingface_hub import HfApi from huggingface_hub.repocard import metadata_save from typing import Tuple from mlagents_envs import logging_util from mlagents_envs.logging_util import get_logger logger = get_logger(__name__) logging_ut...
8,023
prepare
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. import inspect import logging import subprocess import timeit from os import environ, path, sys, waitpid from lib.api.process import Proces...
8,024
click
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020-2023 Alibaba Group Holding Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
8,025
visit arguments
"""Transform an AST to fix type annotations.""" import ast from typing import Optional, Union from .config import CPP_CORE_MODULE_NAME def unqualified_cpp_class(node: Union[ast.Attribute, ast.Name]) -> Optional[str]: """Return the unqualified name of a C++ class in _scipp.core. Returns None if the class is ...
8,026
report coverage
# # Copyright (c) YugaByte, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
8,027
set data
#!/usr/bin/python ################## # recArrayView.py # # Copyright David Baddeley, 2009 # d.baddeley@auckland.ac.nz # # 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 L...
8,028
register plugin
import re from loguru import logger from requests import RequestException from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.soup import get_soup logger = logger.bind(name='anidb_list') USER_ID_RE = r'^\d{1,6}$' ...
8,029
tear down
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ import ipaddress import time...
8,030
test verify exports compliance denied
"""Compliance pipeline tests""" import pytest from social_core.exceptions import AuthException from authentication.exceptions import ( UserExportBlockedException, UserTryAgainLaterException, ) from authentication.pipeline import compliance from compliance.factories import ExportsInquiryLogFactory pytestmark ...
8,031
analyze string
from __future__ import annotations import logging from typing import Set, Any, Generator, Pattern, Optional, Dict, Tuple, TYPE_CHECKING, cast from detect_secrets.constants import VerifiedResult from detect_secrets.core.potential_secret import PotentialSecret from detect_secrets.plugins.base import RegexBasedDetector ...
8,032
run module via rpc
# 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...
8,033
read fn
# coding=utf-8 # Copyright 2022 The Pax 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 ag...
8,034
tear down
# This file is part of beets. # Copyright 2016, Stig Inge Lea Bjornsen. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use...
8,035
set up
import os import pytest from pathlib import Path from dbt.tests.adapter.hooks.fixtures import ( macros__hook, macros__before_and_after, models__hooks, seeds__example_seed_csv, macros_missing_column, models__missing_column, ) from dbt.tests.util import ( check_table_does_not_exist, run...
8,036
has text before cursor
# pylint: disable=function-redefined from __future__ import annotations from prompt_toolkit.application.current import get_app from prompt_toolkit.filters import ( Condition, emacs_insert_mode, has_selection, in_paste_mode, is_multiline, vi_insert_mode, ) from prompt_toolkit.key_binding.key_pro...
8,037
test selected majorana fermion gate
# 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 ...
8,038
config log
""" openEO client configuration (e.g. through config files) """ from __future__ import annotations import logging import os import platform from configparser import ConfigParser from copy import deepcopy from pathlib import Path from typing import Any, Iterator, List, Optional, Sequence, Union from openeo.util imp...
8,039
test url map url with root and
import unittest import tethys_apps.base.url_map as base_url_map class TestUrlMap(unittest.TestCase): def setUp(self): self.name = "foo_name" self.controller = "foo_app.controllers.foo" self.root_url = "foo-app" self.bound_UrlMap = base_url_map.url_map_maker(self.root_url) def ...
8,040
test max columns
#!/usr/bin/env python import sys from io import StringIO from unittest.mock import patch from csvkit.utilities.csvlook import CSVLook, launch_new_instance from tests.utils import CSVKitTestCase, EmptyFileTests, stdin_as_string class TestCSVLook(CSVKitTestCase, EmptyFileTests): Utility = CSVLook def test_la...
8,041
test tpc rollback with prepare
# flake8: noqa # fmt: off """ Python DB API 2.0 driver Two Phase Commit compliance test suite. """ import unittest from typing import Any class TwoPhaseCommitTests(unittest.TestCase): driver: Any = None def connect(self): """Make a database connection.""" raise NotImplementedError _l...
8,042
system exit exception
#!/usr/bin/python # # Script to synchronize RHN meta data between Red Hat and a local Red Hat Satellite. # # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the ...
8,043
test dump load hex
import binascii import math import struct import sys import pytest from shapely import wkt from shapely.geometry import Point from shapely.geos import geos_version from shapely.tests.legacy.conftest import shapely20_todo from shapely.wkb import dump, dumps, load, loads @pytest.fixture(scope="module") def some_point...
8,044
expjpi
from .ctx_base import StandardBaseContext import math import cmath from . import math2 from . import function_docs from .libmp import mpf_bernoulli, to_float, int_types from . import libmp class FPContext(StandardBaseContext): """ Context for fast low-precision arithmetic (53-bit precision, giving at most ...
8,045
git root sheet
import io from visidata import AttrDict, vd, Path, asyncthread, Sheet class GitSheet(Sheet): @property def gitargstr(self): return ' '.join(self.gitargs) def git(self, subcmd, *args, **kwargs): 'For non-modifying commands; not logged except in debug mode' sh = vd.importExternal('...
8,046
validate joints
import math import quaternion import arcor2.transformations as tr from arcor2.data.common import Joint, Orientation, Pose, Position, StrEnum from arcor2_dobot.dobot import Dobot, DobotException from arcor2_dobot.dobot_api import DobotApiException class Joints(StrEnum): J1: str = "magician_joint_1" J2: str =...
8,047
get line
# # SPDX-License-Identifier: GPL-2.0-only # import abc import asyncio import json import os import socket from . import chunkify, DEFAULT_MAX_CHUNK class AsyncClient(object): def __init__(self, proto_name, proto_version, logger, timeout=30): self.reader = None self.writer = None self.max_...
8,048
test event omission
import json import pytest from ansible_runner import run, run_async @pytest.mark.test_all_runtimes @pytest.mark.parametrize('containerized', [True, False]) def test_basic_events(containerized, runtime, tmp_path, container_image, is_run_async=False, g_facts=False): inventory = 'localhost ansible_connection=local...
8,049
tear down
"""Test t.unregister (C) 2014 by the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details. :authors: Soeren Gebbert """ import os import grass.pygrass.modules as pymod import grass.temporal as tgis from grass.gunittes...
8,050
load panel
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
8,051
supported languages
# Copyright 2021 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 ...
8,052
main make alias
import argparse import enum import os import sys import pytest from loguru import logger from httprunner import __description__, __version__ from httprunner.compat import ensure_cli_args from httprunner.make import init_make_parser, main_make from httprunner.utils import ga4_client, init_logger, init_sentry_sdk init...
8,053
properties
# 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...
8,054
push callback
# Copyright 2012 Martijn Pieters <mj@zopatista.com> # Copyright 2014 Eric Le Lay elelay.fr:dev # # 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 op...
8,055
id
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
8,056
test unsupported charge method
import re import numpy import pytest from openff.units import unit from openff.utilities import has_package, skip_if_missing from openff.toolkit import Molecule from openff.toolkit._tests.create_molecules import ( create_acetaldehyde, create_cis_1_2_dichloroethene, create_cyclohexane, create_ethanol, ...
8,057
test drop all previous
# Copyright 2013-2018 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
8,058
append question
import logging from typing import Callable, List import datetime import json import random from df_engine.core import Context, Actor import df_engine.conditions as cnd from common.books import QUESTIONS_ABOUT_BOOKS, SWITCH_BOOK_SKILL_PHRASE from common.gaming import ALL_LINKS_TO_BOOKS logger = logging.getLogger(__na...
8,059
request
""" Proxy Minion to manage RESTCONF Devices :codeauthor: Jamie (Bear) Murphy <jamiemurphyit@gmail.com> :maturity: new :platform: any Usage ===== .. note:: To be able to use this module you need to enable RESTCONF on your device and have https enabled. Cisco Configuration example: .. code-block...
8,060
func with bad return value
import time import mitogen.core import mitogen.parent from mitogen.core import str_partition import testlib import plain_old_module class CrazyType(object): pass def function_that_adds_numbers(x, y): return x + y def function_that_fails(s=''): raise plain_old_module.MyError('exception text'+s) def...
8,061
download pretrained
import hashlib import os import urllib import warnings from tqdm import tqdm _RN50 = dict( openai="https://openaipublic.azureedge.net/clip/models/afeb0e10f9e5a86da6080e35cf09123aca3b358a0c3e3b6c78a7b63bc04b6762/RN50.pt", yfcc15m="https://github.com/mlfoundations/open_clip/releases/download/v0.2-weights/rn50-q...
8,062
get w
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
8,063
test function info
""" Test the API of the symtable module. """ import symtable import unittest from test import test_support TEST_CODE = """ import sys glob = 42 class Mine: instance_var = 24 def a_method(p1, p2): pass def spam(a, b, *var, **kw): global bar bar = 47 x = 23 glob def internal(): ...
8,064
process binop
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
8,065
test get log correlation context opentracer
import pytest import structlog from ddtrace import Tracer from ddtrace import config from ddtrace import tracer from ddtrace.context import Context from ddtrace.opentracer.tracer import Tracer as OT_Tracer from tests.utils import override_global_config @pytest.fixture def global_config(): config.service = "test-...
8,066
add handler
# coding=utf-8 """ This file is part of OpenSesame. OpenSesame 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 later version. OpenSesame is distributed i...
8,067
test output mode nooutput
import pytest ENV = dict(PATH="$PWD/xrandr:$PATH") OUTPUTS = sorted("DP-0 DP-1 DP-2 DP-3 eDP-1-1 HDMI-0".split()) @pytest.mark.bashcomp(pre_cmds=("PATH=$PATH:$PWD/xrandr",)) class TestXrandr: @pytest.mark.complete("xrandr ", require_cmd=True) def test_no_args(self, completion): assert completion ...
8,068
add
#!/usr/bin/python3 import os class ScopeVars: def __init__(self, depth): self.variables = [] self.depth = depth def exists(self, string): return string in self.variables def METHOD_NAME(self, string): self.variables.append(string) def check_file_for_dupe_lets(file): ...
8,069
algorithm
#!/usr/bin/env python """ The actual jobTracker algorithm """ __all__ = [] import threading import logging import os import os.path from Utils.Timers import timeFunction from WMCore.WMExceptions import WM_JOB_ERROR_CODES from WMCore.WorkerThreads.BaseWorkerThread import BaseWorkerThread from WMCore.DAOFactory import...
8,070
main
# Copyright 2023 The Magenta 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 ...
8,071
operator name
#------------------------------------------------------------------------------- # Operator #------------------------------------------------------------------------------- class OperatorAbstractAPI: @staticmethod def init_operator_environment(object): pass @staticmethod def finish_operator_environment(object):...
8,072
test check iso15008 proportions
import sys import pytest from conftest import ImportRaiser, remove_import_raiser, reload_module from fontbakery.status import FAIL from fontbakery.codetesting import ( assert_PASS, assert_results_contain, CheckTester, TEST_FILE, ) from fontbakery.profiles import iso15008 as iso15008_profile def tes...
8,073
config
"""Project Packages Module.""" import shutil from pathlib import Path from typing import Any, Optional, Union from boltons import fileutils from micropy import utils from micropy.METHOD_NAME import Config from micropy.packages import ( LocalDependencySource, Package, PackageDependencySource, create_de...
8,074
get content title
from operator import itemgetter from celery.result import AsyncResult from django.contrib import messages from django.contrib.auth.mixins import PermissionRequiredMixin from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseRedirect from django.urls import reverse from django.utils.html imp...
8,075
json request
# Copyright (c) 2020 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2020 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publis...
8,076
test setup
#!/usr/bin/python # -*- coding: UTF-8 -*- """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Description: PKI TPS CONFIG CLI tests # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # The following pki tps cli commands needs to be tested: # pki tps-config-mod # ~~~...
8,077
unorderable list difference
"""Various utility functions.""" from collections import namedtuple, Counter from os.path import commonprefix __unittest = True _MAX_LENGTH = 80 _PLACEHOLDER_LEN = 12 _MIN_BEGIN_LEN = 5 _MIN_END_LEN = 5 _MIN_COMMON_LEN = 5 _MIN_DIFF_LEN = _MAX_LENGTH - \ (_MIN_BEGIN_LEN + _PLACEHOLDER_LEN + _MIN_COMMO...
8,078
add separator
""" novelWriter – Custom Widget: Paged SideBar ========================================== File History: Created: 2023-02-21 [2.1b1] NPagedSideBar Created: 2023-02-21 [2.1b1] NPagedToolButton Created: 2023-02-21 [2.1b1] NPagedToolLabel This file is a part of novelWriter Copyright 2018–2023, Veronica Berglyd Olsen Thi...
8,079
test nsga2 ranking 2
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import random import numpy as np import nevergrad as ng import nevergrad.common.typing as tp from nevergrad.parametrization import parameter...
8,080
output format
# Copyright 2021 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 required by applicable law or a...
8,081
has aggregation
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, List, Optional, Union import torch from pytorch3d.implicitron.tools.config import Con...
8,082
use two funcs
import sys import numpy as np import numba.core.typing.cffi_utils as cffi_support from numba.tests.support import import_dynamic, temp_directory from numba.core.types import complex128 def load_inline_module(): """ Create an inline module, return the corresponding ffi and dll objects. """ from cffi ...
8,083
city
import csv from pathlib import Path from dataclasses import dataclass from typing import Dict, Set, TextIO, Iterator, NamedTuple from django.core.management.base import BaseCommand from django.db import transaction import pydantic from project.util.nyc import to_pad_bbl from nycha.models import NychaOffice, NychaPrope...
8,084
array
# pylint: disable=redefined-outer-name, missing-docstring import sys import pytest import numpy as np sys.path.append('..') from batchflow import make_rng, Normalizer, Quantizer @pytest.fixture def METHOD_NAME(): return np.arange(0, 100).astype('float32') @pytest.fixture def normal_array(): return make_rng(...
8,085
frame
#!/usr/bin/env python # Copyright 2000 by Thomas Sicheritz-Ponten. # Copyright 2016 by Markus Piotrowski. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Created: Wed Jun 21 ...
8,086
has changed
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import copy...
8,087
parameter objects
"""A module for inferring objects For more information see the documentation in `rope.base.oi` package. """ import rope.base.builtins # Use full qualification for clarity. from rope.base import arguments, evaluate, pynames, pyobjects, utils from rope.base.oi.type_hinting.factory import get_type_hinting_factory _ign...
8,088
forward test
# Copyright (c) OpenMMLab. All rights reserved. from typing import Dict, List, Optional, Sequence, Union import torch from mmengine.model import BaseModule from mmocr.models.common.dictionary import Dictionary from mmocr.registry import MODELS, TASK_UTILS from mmocr.structures import TextRecogDataSample @MODELS.reg...
8,089
test apps installation by app missing permission
import graphene import pytest from .....thumbnail import IconThumbnailFormat from .....thumbnail.models import Thumbnail from ....tests.utils import assert_no_permission, get_graphql_content APPS_INSTALLATION_QUERY = """ { appsInstallations{ id } } """ def test_apps_installation(app_inst...
8,090
test binary masked
import asyncio import codecs import dataclasses import unittest import unittest.mock import warnings from websockets.exceptions import PayloadTooBig, ProtocolError from websockets.frames import OP_BINARY, OP_CLOSE, OP_PING, OP_PONG, OP_TEXT, CloseCode from websockets.legacy.framing import * from .utils import Asyncio...
8,091
disable cache
# -*- coding: utf-8 -*- # 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 applicab...
8,092
test state defaults shapes
"""Basic tests for the BQ info container and BQ state.""" import numpy as np import pytest from probnum.quad.integration_measures import IntegrationMeasure, LebesgueMeasure from probnum.quad.kernel_embeddings import KernelEmbedding from probnum.quad.solvers import BQIterInfo, BQState from probnum.randprocs.kernels im...
8,093
identity
# 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...
8,094
tear down
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
8,095
default nlg
import asyncio from rasa.utils.endpoints import EndpointConfig from sanic.request import Request import uuid from datetime import datetime from typing import Generator, Callable, Dict, Text from scipy import sparse import pytest from rasa.core.agent import Agent from rasa.core.channels.channel import CollectingOut...
8,096
tags overview page
from flask import Blueprint, request, make_response, render_template, flash, url_for, redirect from changedetectionio.store import ChangeDetectionStore from changedetectionio import login_optionally_required def construct_blueprint(datastore: ChangeDetectionStore): tags_blueprint = Blueprint('tags', __name__, tem...
8,097
build
import os import sys from invoke import task from .build_tags import filter_incompatible_tags, get_build_tags, get_default_build_tags from .flavor import AgentFlavor from .go import deps from .utils import REPO_PATH, bin_name, get_build_flags from .windows_resources import build_messagetable, build_rc, versioninfo_va...
8,098
f3
import pytest from mlflow.utils import gorilla class Delegator: def __init__(self, delegated_fn): self.delegated_fn = delegated_fn def __get__(self, instance, owner): return self.delegated_fn def delegate(delegated_fn): return lambda fn: Delegator(delegated_fn) def gen_class_A_B(): ...
8,099
test json list
import seldom from seldom import data, file_data class BingTest(seldom.TestCase): """Bing search test case""" @data([ ("First case description", "seldom"), ("Second case description", "selenium"), ("Third case description", "unittest"), ]) def test_bing_tuple(self, desc, searc...