id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
7,100
test nominal and do not remember me
from django.conf import settings from django.urls import reverse from django.test import TestCase from django.utils.html import escape from zds.member.forms import LoginForm from zds.member.models import Profile from zds.member.tests.factories import ProfileFactory, NonAsciiProfileFactory class LoginTests(TestCase):...
7,101
run
import json import cv2 import base64 import threading import time from datetime import datetime from websocket_server import WebsocketServer import logging import os from interfaces.pose3d import ListenerPose3d from interfaces.laser import ListenerLaser from lap import Lap from map import Map # Graphical User Interf...
7,102
error page
import logging import sys from datetime import timedelta from functools import update_wrapper from json import dumps import user_agents from flask import Response, current_app, make_response, render_template, request from dallinger.config import get_config logger = logging.getLogger(__name__) def crossdomain( ...
7,103
create finding from project
# SPDX-FileCopyrightText: the secureCodeBox authors # # SPDX-License-Identifier: Apache-2.0 import argparse import logging from datetime import datetime from typing import List, Optional import gitlab from gitlab.v4.objects import Project, ProjectManager from git_repo_scanner.abstract_scanner import AbstractScanner,...
7,104
transform
# Copyright (c) 2021 - present / Neuralmagic, 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 b...
7,105
handle input
# Copyright 2017 Battelle Energy Alliance, 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 t...
7,106
prefetch generic related
""" Common model classes """ import copy from typing import Iterable from django.conf import settings from django.db import models from django.core.exceptions import ValidationError from django.db.models import ( DateTimeField, ForeignKey, Manager, Model, PROTECT, prefetch_related_objects, ) fr...
7,107
set build state string
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
7,108
test files delete
import unittest import sys import os, json from pactman import Consumer, Provider # from .example import node_json, _build_node api_key = os.getenv("OPENSCIENCEFRAMEWORK_API_KEY", default=None) node_json = """ { "data": { "relationships": { "files": { "links": { "related": { ...
7,109
test file
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
7,110
test xy
# This code is part of a Qiskit project. # # (C) Copyright IBM 2022, 2023. # # 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 ...
7,111
using
from _typeshed import Incomplete, StrOrBytesPath, SupportsItems from typing import Any from typing_extensions import Self class CryptPolicy: @classmethod def from_path(cls, path, section: str = "passlib", encoding: str = "utf-8"): ... @classmethod def from_string(cls, source, section: str = "passlib", ...
7,112
update tree
# -*- coding: utf-8 -*- # vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0: import errno import os import os.path import shutil import stat import subprocess import time from . import exception from .trace_decorator import getLog, traceLog @traceLog() def mkdirIfAbsent(*args): for dirN...
7,113
sv init
import numpy as np import bpy from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty from mathutils import Vector from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode, zip_long_repeat, repeat_last_for_length, ensure_nesting_level from sverchok.utils...
7,114
test format list
"""Test the codeclimate JSON formatter.""" from __future__ import annotations import json import pathlib import subprocess import sys import pytest from ansiblelint.errors import MatchError from ansiblelint.file_utils import Lintable from ansiblelint.formatters import CodeclimateJSONFormatter from ansiblelint.rules ...
7,115
list
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
7,116
test pickle
# Copyright (c) 2020-2023 by Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved. # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. import os import pandapipes import pytest from pandas....
7,117
setparent callsign
from FreeTAKServer.model.FTSModel.fts_protocol_object import FTSProtocolObject ####################################################### # # Link.py # Python implementation of the Class Link # Generated by Enterprise Architect # Created on(FTSProtocolObject): 11-Feb-2020 11(FTSProtocolObject):08(FTSProtocolObject):...
7,118
test jsonize
from datetime import datetime, timedelta import jinja2 import pytest from markupsafe import Markup from uber.custom_tags import jsonize, linebreaksbr, datetime_local_filter, datetime_filter, full_datetime_local, \ hour_day_local, time_day_local, timedelta_filter, timestamp, url_to_link, basename, form_link, human...
7,119
replace merge conflict dialog
import sys import textwrap import pytest from gaphor import UML from gaphor.ui.filemanager import FileManager try: import pygit2 except ImportError: pass else: from gaphor.storage.tests.fixtures import create_merge_conflict @pytest.fixture def file_manager(event_manager, element_factory, modeling_langu...
7,120
parse version string
from collections import namedtuple import re import sys from ast import literal_eval from functools import total_ordering from parso._compatibility import unicode # The following is a list in Python that are line breaks in str.splitlines, but # not in Python. In Python only \r (Carriage Return, 0xD) and \n (Line Feed...
7,121
create display widget
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
7,122
enable mod
""" Distribution specific override class for Debian family (Ubuntu/Debian) """ import logging from certbot import errors from certbot import util from certbot.compat import filesystem from certbot.compat import os from certbot_apache._internal import apache_util from certbot_apache._internal import configurator from c...
7,123
is report generated
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with AWS Audit Manager to create an assessment report that consists of only one day of evidence. """ # snippet-start:[python.example_code.auditmanage...
7,124
get relay mode
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2022 PyMeasure Developers # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limit...
7,125
test nocolor force nounderline
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # # Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated d...
7,126
test logbook logger error level
# BSD 3-Clause License # # Copyright (c) 2019, Elasticsearch BV # 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, t...
7,127
get activated threads
# Copyright (C) 2007 Samuel Abels # # This file is part of SpiffWorkflow. # # SpiffWorkflow is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, or (at your option) any l...
7,128
get event name
from typing import Callable, Dict, Optional from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventTypeError from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver....
7,129
has syswow64 dir
# -*- coding: UTF-8 -*- # A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2020-2023 NV Access Limited, Łukasz Golonka, Luke Davis # This file may be used under the terms of the GNU General Public License, version 2 or later. # For more details see: https://www.gnu.org/licenses/gpl-2.0.html """ System related...
7,130
of
# Copyright 2017 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...
7,131
load pretrained
import logging import torch import os from transformers import PreTrainedTokenizer from primeqa.util.transformers_utils.hypers_base import HypersBase logger = logging.getLogger(__name__) def save_transformer(hypers: HypersBase, model, tokenizer, *, save_dir=None): if hypers.global_rank == 0: if save_dir ...
7,132
migrate vatlayer
# Generated by Django 3.2.14 on 2022-08-18 10:31 from typing import List, Optional from django_countries import countries from django.db import migrations VATLAYER_ID = "mirumee.taxes.vatlayer" # Must be the same as in 0004_migrate_tax_class.py TAX_CLASS_ZERO_RATE = "No Taxes" def _clear_country_code(country_cod...
7,133
get normalized output and leaky tests
#!/usr/bin/env python # # Copyright 2008, 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...
7,134
test gcp repr
"""Tests of ground control points""" import numpy import pytest import rasterio from rasterio.control import GroundControlPoint def test_gcp_empty(): with pytest.raises(ValueError): GroundControlPoint() def test_gcp(): gcp = GroundControlPoint(1.0, 1.5, 100.0, 1000.0, z=0.0) assert gcp.row == ...
7,135
test add activates session
# TODO(mc, 2022-07-07): these tests are very coupled to the implementation # both the tests and the code under test likely needs to be rewritten # if we want useful unit test coverage from mock import patch, AsyncMock # type: ignore[attr-defined] import pytest from robot_server.service.session.errors import SessionCr...
7,136
from matrix
import numpy as np def METHOD_NAME(ranges_i, ranges_j, keep): r"""Turns a boolean matrix into a KeOps-friendly **ranges** argument. This routine is a helper for the **block-sparse** reduction mode of KeOps, allowing you to turn clustering information (**ranges_i**, **ranges_j**) and a cluster-to-clus...
7,137
on cr stirring effect changed
# Copyright 2020-2023 Capypara and the SkyTemple Contributors # # This file is part of SkyTemple. # # SkyTemple 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 y...
7,138
prod batch
#!/usr/bin/env python3 from __future__ import annotations from typing import List, Optional, Tuple, Union import torch from jaxtyping import Float from torch import Tensor from ._linear_operator import IndexType, LinearOperator, to_dense class DenseLinearOperator(LinearOperator): def _check_args(self, tsr): ...
7,139
windows stub disk partition
""" tests.pytests.unit.beacons.test_diskusage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk usage beacon test cases """ from collections import namedtuple import pytest import salt.beacons.diskusage as diskusage from tests.support.mock import MagicMock, Mock, patch @pytest.fixture def configure_loader...
7,140
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...
7,141
add event history
# automatically generated by the FlatBuffers compiler, do not modify # namespace: proto import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class SubscriberFeatures(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode...
7,142
domain gate
import logging import os from abc import ABC from concurrent.futures import Future, ThreadPoolExecutor from threading import Semaphore, Thread from typing import Dict, Iterable, List, Optional, TypeVar from tqdm import tqdm from ..utils.ratelimit import RateLimiter logger = logging.getLogger(__name__) T = TypeVar("...
7,143
test get tile intersection tms
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
7,144
numpy reverse
# 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...
7,145
has icon
from os import walk from os.path import splitext from glob import glob import importlib from inspect import getmembers, isclass, getfile from sverchok.utils.testing import * from sverchok.utils import yaml_parser sverchok_directory = dirname(getfile(sverchok)) class UiTests(SverchokTestCase): def test_all_node...
7,146
describe dataset
""" Command line utility which prints data about labels file. """ import os def describe_labels(data_path, verbose=False): from sleap.io.dataset import Labels video_callback = Labels.make_video_callback([os.path.dirname(data_path)]) labels = Labels.load_file(data_path, video_search=video_callback) p...
7,147
sv init
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE import bpy from bpy.props import...
7,148
assert almost equal
# 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 argparse import copy import unittest import torch from fairseq.criterions.cross_entropy import CrossEntropyCriterion from fairseq.cri...
7,149
get npoints
# lint-amnesty, pylint: disable=missing-module-docstring # ----------------------------------------------------------------------------- # class used to store graded responses to CAPA questions # # Used by responsetypes and capa_problem class CorrectMap(object): """ Stores map between answer_id and response e...
7,150
pending tasks
from .utils import NamespacedClient, query_params, _make_path class ClusterClient(NamespacedClient): @query_params('level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_relocating_shards', 'wait_for_status') def health(self, index=None, params=None...
7,151
finish
import time import signal import re from lnst.Controller.RecipeResults import ResultLevel from lnst.RecipeCommon.Perf.Results import PerfInterval from lnst.RecipeCommon.Perf.Results import SequentialPerfResult from lnst.RecipeCommon.Perf.Measurements.BaseFlowMeasurement import BaseFlowMeasurement from lnst.RecipeComm...
7,152
modify and assert
''' copyright: Copyright (C) 2015-2022, Wazuh Inc. Created by Wazuh, Inc. <info@wazuh.com>. This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 type: integration brief: File Integrity Monitoring (FIM) system watches selected files and triggering ale...
7,153
main
from great_ape_safe import GreatApeSafe from helpers.addresses import registry from brownie import interface from rich.console import Console CONSOLE = Console() DEV_MULTISIG = registry.eth.badger_wallets.dev_multisig OLD_OPS_MULTISIG = registry.eth.badger_wallets.ops_multisig_old TREASURY_VAULT = registry.eth.badger...
7,154
test tlimit
import logging import time from qcodes.instrument import InstrumentBase from qcodes.instrument_drivers.Lakeshore.Model_336 import Model_336 from .test_lakeshore import ( DictClass, MockVisaInstrument, command, instrument_fixture, query, split_args, ) log = logging.getLogger(__name__) VISA_LO...
7,155
initialize
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
7,156
assert same structure
import os import pytest import random import re import requests import string import unittest from base import BaseTest INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) @unittest.skip("flaky: https://github.com/elastic/beats/issues/16247") class Test(BaseTest): def setUp(self): super(Base...
7,157
build arguments schema
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
7,158
test zero shape
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
7,159
test list of scan indices
# /*########################################################################## # Copyright (C) 2016-2023 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 Softw...
7,160
run
# # Copyright 2018 BhaaL # # This file is part of translate. # # translate 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. # # translat...
7,161
test split attribute saved during graph building
# 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...
7,162
dumps
#!/usr/bin/env python # -*- coding: utf-8 -*- # Used code from commentjson library : https://github.com/vaidik/commentjson """Add JavaScript or Python style comments in JSON. commentjson (Comment JSON) is a Python package that helps you create JSON files with Python and JavaScript style inline comments. Its API is ve...
7,163
test gogogo
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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 cod...
7,164
test get repo state
from unittest.mock import MagicMock import pytest from reconcile.gql_definitions.fragments.vault_secret import VaultSecret from reconcile.gql_definitions.terraform_repo.terraform_repo import ( AWSAccountV1, TerraformRepoV1, ) from reconcile.terraform_repo import ( TerraformRepoIntegration, TerraformRe...
7,165
main
import argparse import os import yaml def METHOD_NAME(args): folder = os.path.join( args.config_root, args.config_type, "zc_only" if args.zc_only else "zc_architecture", "use_zc_api" if args.use_zc_api else "use_predictor", args.optimizer, f'{args.search_space}-{args...
7,166
test dense
# 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...
7,167
publication channels
import pytest from briefcase.commands import PublishCommand from briefcase.commands.base import full_options from briefcase.config import AppConfig from briefcase.console import Console, Log from ...utils import create_file class DummyPublishCommand(PublishCommand): """A dummy publish command that doesn't actua...
7,168
get graph url
# # Copyright (C) 2012-2019 Uninett AS # Copyright (C) 2022 Sikt # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # This pro...
7,169
list templates
# -*- coding: utf-8 -*- """ flask.templating ~~~~~~~~~~~~~~~~ Implements the bridge to Jinja2. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import posixpath from jinja2 import BaseLoader, Environment as BaseEnvironment, \ TemplateNotFound from .glo...
7,170
test check results
#!/usr/bin/env python3 # Copyright (c) 2021 CINN 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 r...
7,171
test multi captured
from contextlib import redirect_stderr, redirect_stdout from io import StringIO from pybind11_tests import iostream as m def test_captured(capsys): msg = "I've been redirected to Python, I hope!" m.captured_output(msg) stdout, stderr = capsys.readouterr() assert stdout == msg assert stderr == "" ...
7,172
write choice
# # Copyright (c) 2014-2015 Sylvain Peyrefitte # Copyright (c) 2018, 2019, 2022 GoSecure Inc. # # This file is part of rdpy and PyRDP. # # PyRDP 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...
7,173
get fq name
#!/usr/bin/env python3 # # Copyright (c) 2021, General Electric Company, Inc. # # All Rights Reserved # # This material is based upon work supported by the Defense Advanced Research # Projects Agency (DARPA) under Contract No. FA8750-20-C-0203. # # Any opinions, findings and conclusions or recommendations expressed in ...
7,174
test resample
#!/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...
7,175
test write before nested map exit
# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved. import copy import dace import numpy as np from dace.transformation.dataflow import RemoveIntermediateWrite def test_write_before_map_exit(): sdfg = dace.SDFG('test_write_before_map_exit') sdfg.add_array('A', (10, ), dace.int32) ...
7,176
get geography
from core.mixins import UpdateElectionsTimestampedModel from django.contrib.gis.db import models from django.urls import reverse from model_utils import Choices from .mixins import DateConstraintMixin, DateDisplayMixin class OrganisationManager(models.QuerySet): def get_date_filter(self, date): return mo...
7,177
test input rotation cell with qubits
# Copyright 2019 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 ...
7,178
test set file type failure 2
import os from django.core.files.uploadedfile import UploadedFile from rest_framework import status from hs_core.hydroshare import resource from hs_core.hydroshare.utils import resource_file_add_process from hs_core.views.utils import create_folder, move_or_rename_file_or_folder from .base import HSRESTTestCase c...
7,179
set status to queued
"""This type stub file was generated by pyright.""" from __future__ import annotations from concurrent import futures from typing import ( TYPE_CHECKING, Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Set, Type, Union, ) from typing_extensions import Literal if...
7,180
test retrieve pipeline
# Copyright 2018 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
7,181
email new user
import datetime from newsblur_web.celeryapp import app from apps.profile.models import Profile, RNewUserQueue from utils import log as logging from apps.reader.models import UserSubscription, UserSubscriptionFolders from apps.social.models import MSocialServices, MActivity, MInteraction @app.task(name="email-new-user"...
7,182
test localization loss
import numpy as np import pytest from paz.optimization.losses.multi_box_loss import MultiBoxLoss @pytest.fixture def loss(): return MultiBoxLoss() @pytest.fixture def y_true(): y_true = np.array( [[38.38629, 48.666668, 10.362101, 11.512976, 0., 1., 0., 0., 0., 0., 0., 0., 0.,...
7,183
compute shape from block spec
# Copyright 2023 The JAX 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
7,184
rgbd odometry
# ---------------------------------------------------------------------------- # - Open3D: www.open3d.org - # ---------------------------------------------------------------------------- # Copyright (c) 2018-2023 www.open3d.org # SPDX-License-Identifier: MIT # ---------...
7,185
clip sparse
# 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...
7,186
make plot
""" * GTDynamics Copyright 2020, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * See LICENSE for the license information * * @file jr_visualizer.py * @brief Visualize the jumping trajectory of the jumping robot. * @author Yetong Zhang """ import inspect import os.path ...
7,187
convert datetime
import datetime from decimal import Decimal from .err import DataError import re import time def escape_item(val, mapping=None): if mapping is None: mapping = encoders encoder = mapping.get(type(val)) # Fallback to default when no encoder found if not encoder: try: encoder...
7,188
test old heartbeat cleanup
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
7,189
remove special chars
# Copyright 2009 Pablo Angulo '''Script to export zim wiki pages to trac / mediawiki To use it, call python trac2zim.py notebook output_folder prefix where prefix is a string you put before each wiki page name. It will fill output_folder with plain text files ready to be loaded with trac-admin: trac-admin /path...
7,190
list
# 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 ...
7,191
test set parameters
from test import test_support test_support.requires('audio') from test.test_support import findfile ossaudiodev = test_support.import_module('ossaudiodev') import errno import sys import sunau import time import audioop import unittest # Arggh, AFMT_S16_NE not defined on all platforms -- seems to be a # fairly rece...
7,192
test not contains
import re import numpy as np import pytest from gymnasium.spaces import Discrete, Graph, GraphInstance def test_node_space_sample(): space = Graph(node_space=Discrete(3), edge_space=None) space.seed(0) sample = space.sample( mask=(tuple(np.array([0, 1, 0], dtype=np.int8) for _ in range(5)), Non...
7,193
test no request timeout in config
import unittest import requests from unittest import mock import tap_hubspot class TestRequestTimeoutValue(unittest.TestCase): def test_integer_request_timeout_in_config(self): """ Verify that if request_timeout is provided in config(integer value) then it should be use """ tap_...
7,194
test try except else finally
from test.test_support import run_unittest import unittest class ExceptionTestCase(unittest.TestCase): def METHOD_NAME(self): hit_except = False hit_else = False hit_finally = False try: raise Exception, 'nyaa!' except: hit_except = True els...
7,195
is valid
import itertools class CombinationRow: """ Row object store all combinations between two parameters into dictionary. Keys in dictionary are values of combinations and values in dictionary are information about coverage. Row object has information how many combinations are uncovered and how many o...
7,196
get transform
""" Copyright (c) 2018-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 i...
7,197
test anonymous cannot create proposal
import pytest from django.urls import reverse from adhocracy4.test.helpers import assert_template_response from adhocracy4.test.helpers import freeze_phase from adhocracy4.test.helpers import freeze_post_phase from adhocracy4.test.helpers import redirect_target from adhocracy4.test.helpers import setup_phase from apps...
7,198
store credential
"""Base Indy Holder class.""" from abc import ABC, ABCMeta, abstractmethod from typing import Tuple, Union from ..core.error import BaseError from ..ledger.base import BaseLedger class IndyHolderError(BaseError): """Base class for holder exceptions.""" class IndyHolder(ABC, metaclass=ABCMeta): """Base cla...
7,199
on 204
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...