id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
9,300 | run test | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the preciousblock RPC."""
from test_framework.test_framework import BitcoinTestFramework
from tes... |
9,301 | test build rule book from gcs works | # Copyright 2017 The Forseti Security 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 ap... |
9,302 | value | # 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__ ... |
9,303 | delete schedule group | """Handles incoming scheduler requests, invokes methods, returns responses."""
import json
from typing import Any
from urllib.parse import unquote
from moto.core.common_types import TYPE_RESPONSE
from moto.core.responses import BaseResponse
from .models import scheduler_backends, EventBridgeSchedulerBackend
class Ev... |
9,304 | set test params | #!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test dust limit mempool policy (`-dustrelayfee` parameter)"""
from decimal import Decimal
from test_framewo... |
9,305 | rnq | # Copyright (c) 2022, 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... |
9,306 | get conv by frontend id | from typing import Optional
from fastapi import APIRouter, Depends
from oasst_backend.api import deps
from oasst_backend.api.v1 import utils
from oasst_backend.models import ApiClient
from oasst_backend.prompt_repository import PromptRepository
from oasst_shared.schemas import protocol
from sqlmodel import Session
ro... |
9,307 | ufl shape | # -*- coding: utf-8 -*-
"""This module defines the single index types and some internal index utilities."""
# Copyright (C) 2008-2016 Martin Sandve Alnæs and Anders Logg
#
# This file is part of UFL (https://www.fenicsproject.org)
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Modified by Massimiliano Leoni, 20... |
9,308 | test domain range scale rg b to | # !/usr/bin/env python
"""Define the unit tests for the :mod:`colour.models.rgb.prismatic` module."""
import numpy as np
import unittest
from itertools import product
from colour.models.rgb import RGB_to_Prismatic, Prismatic_to_RGB
from colour.utilities import domain_range_scale, ignore_numpy_errors
__author__ = "Co... |
9,309 | get fitted params | """Delegator mixin that delegates all methods to wrapped classifiers.
Useful for building estimators where all but one or a few methods are delegated. For
that purpose, inherit from this estimator and then override only the methods that
are not delegated.
"""
# copyright: sktime developers, BSD-3-Clause License (s... |
9,310 | test case name too many chars | from django.test import TestCase
from dfirtrack_main.forms import CaseForm
from dfirtrack_main.models import Casepriority, Casestatus
class CaseFormTestCase(TestCase):
"""case form tests"""
def setUp(cls):
# create objects
Casepriority.objects.create(casepriority_name='casepriority_1')
... |
9,311 | compute scores | import numpy as np
from scipy import stats
from sklearn import metrics
import logging
logger = logging.getLogger(__name__)
# Calculate the P@topK, P@bottomK, and Kendall-Tau in predicted topK/bottomK
def p_at_tb_k(predict_scores, true_scores, ks=[1, 5, 10, 20, 25, 30, 50, 75, 100]):
# ratios=[0.001, 0.005, 0.01... |
9,312 | parse url | """
Faraday Penetration Test IDE
Copyright (C) 2019 Infobyte LLC (http://www.infobytesec.com/)
See the file 'doc/LICENSE' for the license information
"""
import json
import re
from urllib.parse import urlparse
from faraday_plugins.plugins.plugin import PluginJsonFormat
__author__ = "Nicolas Rebagliati"
__copyright_... |
9,313 | repr | #* 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 sys
... |
9,314 | find | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
9,315 | do show | # Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com>
# See COPYING for license information.
import os
from . import command
from . import completers
from . import utils
from . import corosync
from . import parallax
from . import bootstrap
from . import log
logger = log.setup_logger(__name__)
def _push_com... |
9,316 | validate json | from pysys.basetest import BaseTest
import time
import json
"""
Validate tedge-mapper-collectd messages that are published
on tedge/measurements
Given a configured system
When we start the tedge-mapper-collectd with sudo in the background
When we start tedge sub with sudo in the background
When we start two publish... |
9,317 | sample predictor configs | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
9,318 | set from tanwcs | from django.db import models
#from astrometry.util import sip, starutil
import math
class TanWCS(models.Model):
crval1 = models.FloatField()
crval2 = models.FloatField()
crpix1 = models.FloatField()
crpix2 = models.FloatField()
cd11 = models.FloatField()
cd12 = models.FloatField()
cd21 = m... |
9,319 | test save with parameter of run type | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... |
9,320 | test adding wrappers ordering | import pytest
from pluggy import HookimplMarker, HookspecMarker
from pluggy.hooks import HookImpl
hookspec = HookspecMarker("example")
hookimpl = HookimplMarker("example")
@pytest.fixture
def hc(pm):
class Hooks(object):
@hookspec
def he_method1(self, arg):
pass
pm.add_hookspecs... |
9,321 | test partial residueinfo raise error | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... |
9,322 | test list of optional | import sys
from collections.abc import Sequence
from typing import List, Optional, Tuple, Union
import pytest
import strawberry
from strawberry.annotation import StrawberryAnnotation
from strawberry.type import StrawberryList
def test_basic_list():
annotation = StrawberryAnnotation(List[str])
resolved = ann... |
9,323 | test star wildcard in allowed mimetypes | from pathlib import Path
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import SimpleTestCase, override_settings
from rest_framework.exceptions import ValidationError
from ..api import validators
PIXEL_GIF = b"GIF89a\x01\x00\x01\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00... |
9,324 | config env | #-------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Stephan Krause <stephan.krause@eox.at>
# Stephan Meissl <stephan.meissl@eox.at>
# Fabian Schindler <fabian.schindler@eox.at>
# Martin Paces <martin.paces@e... |
9,325 | main | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ run_pretrain.py ]
# Synopsis [ scripts for running the pre-training of upstream models ]
# Author [ Andy T. Liu (Andi611) ]
# Copyright [ Copyleft(c), Speec... |
9,326 | get tables | from contextlib import closing
import pymssql
import pandas as pd
from mindsdb_sql import parse_sql
from mindsdb_sql.parser.ast.base import ASTNode
from mindsdb.integrations.libs.base import DatabaseHandler
from mindsdb.utilities import log
from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
from minds... |
9,327 | test query level eventid | import datetime
import pytest
import salt.modules.win_event as win_event
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
]
@pytest.fixture(scope="function")
def application_events():
# This deletes the contents of the Application event log
win_event.clear("Applic... |
9,328 | is type | from _typeshed import Incomplete, SupportsKeysAndGetItem
from collections.abc import Callable, Generator, Iterable, Iterator, Mapping
from contextlib import contextmanager
from typing import Any, ClassVar
from typing_extensions import TypeAlias
from ._format import FormatChecker
from ._types import TypeChecker
from ._... |
9,329 | jax args to inner func args | import jax
import jax.numpy as jnp
from pytensor.link.jax.dispatch.basic import jax_funcify
from pytensor.scan.op import Scan
@jax_funcify.register(Scan)
def jax_funcify_Scan(op: Scan, **kwargs):
info = op.info
if info.as_while:
raise NotImplementedError("While Scan cannot yet be converted to JAX")
... |
9,330 | parse as n1 private key | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... |
9,331 | test event hub schema validate | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from ..azure_common import BaseTest, arm_template, cassette_name
class EventHubTest(BaseTest):
def METHOD_NAME(self):
with self.sign_out_patch():
p = self.load_policy({
'name': 'test-event-hub-compl... |
9,332 | domain name | import base64
import json
from enum import Enum
from typing import Any, Dict, List, Optional, Union
from responses import Response
from localstack.constants import HEADER_LOCALSTACK_EDGE_URL
from localstack.utils.aws.aws_responses import parse_query_string
from localstack.utils.strings import short_uid, to_str
# typ... |
9,333 | find ground unit source in network | from __future__ import annotations
import logging
from collections import defaultdict
from typing import Optional, TYPE_CHECKING
from game.theater import ControlPoint
from .coalition import Coalition
from .dcs.groundunittype import GroundUnitType
from .theater.transitnetwork import (
NoPathError,
TransitNetwo... |
9,334 | test str | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
import pytest
from debugpy.common import log
from tests.patterns import some
NONE = None
NAN = float("nan")
def log_repr(x):
s = repr(x)
log.info("{0}", ... |
9,335 | checked join | # Copyright (c) 2015, Google Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA... |
9,336 | archname | """Run foreign-architecture binaries
Overview
--------
So you want to exploit ARM binaries on your Intel PC?
Pwntools has a good level of integration with QEMU user-mode emulation,
in order to run, debug, and pwn foreign architecture binaries.
In general, everything magic happens "behind the scenes", and pwntools
a... |
9,337 | mgmt apidoc | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... |
9,338 | execute patch | # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
""" Patch Handler.
This file manages execution of manaully written patches. Patches are script
that apply changes in database schema or data to accomodate for changes in the
code.
Ways to specify patches:
1. patches.txt ... |
9,339 | arn | # 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... |
9,340 | last modified by type | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ ... |
9,341 | test missing output keys | # Copyright 2018 The Kubernetes 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 ... |
9,342 | load test data | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test getblockstats rpc call
#
from test_framework.test_framework import MuntTestFramework
from test_f... |
9,343 | test nested class | # 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... |
9,344 | test tuya data enum | """Test units for new Tuya cluster framework."""
from unittest import mock
import pytest
import zigpy.types as t
import zigpy.zcl.foundation as zcl_f
from zhaquirks.tuya import (
TUYA_ACTIVE_STATUS_RPT,
TUYA_GET_DATA,
TUYA_SET_DATA_RESPONSE,
TUYA_SET_TIME,
TuyaCommand,
TuyaData,
TuyaDatap... |
9,345 | test big dict | from test import test_support
import java
import unittest
from collections import defaultdict
class DictInitTest(unittest.TestCase):
def testInternalSetitemInInit(self):
"""Test for http://jython.org/bugs/1816134
CPython's dict uses an internal setitem method to initialize itself
rather th... |
9,346 | process request | import hmac
import unittest
import urllib.error
from websockets.exceptions import InvalidStatusCode
from websockets.headers import build_authorization_basic
from websockets.legacy.auth import *
from websockets.legacy.auth import is_credentials
from .test_client_server import ClientServerTestsMixin, with_client, with_... |
9,347 | trigger | '''
File: SCPI.py
Author: Wouter Vlothuizen, TNO/QuTech
Purpose: base class for SCPI ('Standard Commands for Programmable
Instruments') commands
Usage: don't use directly, use a derived class (e.g. QWG)
Notes:
Bugs:
'''
from qcodes import IPInstrument
from qcodes import validators as vals... |
9,348 | remove vlan | # Copyright (c) 2021 Microsoft Open Technologies, 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
#
# THIS CODE IS PROVIDED ON AN *... |
9,349 | raise exc | """
This file contains all jobs that are used in tests. Each of these test
fixtures has a slightly different characteristics.
"""
import contextlib
import os
import signal
import subprocess
import sys
import time
from multiprocessing import Process
from redis import Redis
from rq import Connection, Queue, get_curre... |
9,350 | prepare request | # 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 ... |
9,351 | is empty | from __future__ import annotations
import contextlib
from abc import ABC, abstractmethod
from dataclasses import InitVar, dataclass, field
from datetime import date, datetime
from enum import Enum
from typing import Callable, ContextManager, Dict, Generic, Iterator, List, Optional, TypeVar
from metricflow.dataflow.sq... |
9,352 | test move l r table prefix to | import sqlglot
from splink.athena.athena_helpers.athena_transforms import cast_concat_as_varchar
from splink.input_column import InputColumn
from splink.spark.spark_helpers.custom_spark_dialect import Dialect # noqa 401
from splink.sql_transform import (
move_l_r_table_prefix_to_column_suffix,
sqlglot_transfo... |
9,353 | parse issue | import re
from collections import OrderedDict
from redash.query_runner import TYPE_STRING, BaseHTTPQueryRunner, register
from redash.utils import json_dumps, json_loads
# TODO: make this more general and move into __init__.py
class ResultSet(object):
def __init__(self):
self.columns = OrderedDict()
... |
9,354 | parse arp monitor | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The vyos lag_interfaces fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based o... |
9,355 | distance in miles | import abc
import json
import math
import random
from typing import NamedTuple
import requests
from django.conf import settings
from django.contrib.gis.geos import Point
class Directions(NamedTuple):
time: float # travel time in seconds
distance: float # distance in metres
mode: str # mode of transpor... |
9,356 | test python ctor repair | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2014 Glencoe Software, Inc. All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
# 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... |
9,357 | test refresh request body | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import logging
import pytest
from airbyte_cdk.sources.streams.http.auth import (
BasicHttpAuthenticator,
MultipleTokenAuthenticator,
NoAuth,
Oauth2Authenticator,
TokenAuthenticator,
)
LOGGER = logging.getLogger(__name__)
def test_tok... |
9,358 | test actions | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .common import BaseTest
from mock import Mock
from textwrap import dedent
from c7n import deprecated
class DeprecationTest(BaseTest):
def test_action(self):
deprecation = deprecated.action(
"use modify-db in... |
9,359 | get dates | #!/usr/bin/env python3
# Copyright 2015 The Kubernetes 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 appl... |
9,360 | on pre build | from __future__ import annotations
import logging
import os
from typing import TYPE_CHECKING, List
from mkdocs import utils
from mkdocs.config import base
from mkdocs.config import config_options as c
from mkdocs.contrib.search.search_index import SearchIndex
from mkdocs.plugins import BasePlugin
if TYPE_CHECKING:
... |
9,361 | hovmoller | import cmd
from fv3net.diagnostics.prognostic_run import load_run_data
import intake
import vcm.catalog
import vcm
import xarray as xr
import fv3viz
import pathlib
import matplotlib.pyplot as plt
import cartopy.crs
import sys
import io
import warnings
from . import iterm
warnings.filterwarnings("ignore")
def meridi... |
9,362 | wait for response | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
"""Test helpers for networking.
"""
import os
import re
import requests
import socket
import threading
import time
from debugpy.common import log, util
from tests.p... |
9,363 | forward single image | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import numpy as np
import torch
from torch import nn
from maskrcnn_benchmark.layers.misc import interpolate
from maskrcnn_benchmark.structures.bounding_box import BoxList
# TODO check if want to return a single BoxList or a composite
# object
cl... |
9,364 | set test params | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test logic for skipping signature validation on old blocks.
Test logic for skipping signature validati... |
9,365 | compute image timeout | #!/usr/bin/python3
# SPDX-FileCopyrightText: Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0-or-later
from __future__ import absolute_import
from __future__ import division
import os
import sys
import traceback
import fcntl
import signal
import subprocess
import struct
import threading
import hooking
from vdsm.com... |
9,366 | on 200 | # --------------------------------------------------------------------------------------------
# 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
# --------------------------------... |
9,367 | provisioning state | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
9,368 | d eps1 d ep s2 | """The ELL1k model for approximately handling near-circular orbits."""
import astropy.constants as c
import astropy.units as u
import numpy as np
from .ELL1_model import ELL1model
class ELL1kmodel(ELL1model):
"""This is a class for base ELL1k pulsar binary model.
ELL1k model is a generalization of ELL1 mode... |
9,369 | coerce named tuple | """
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 asdf._jsonschema impo... |
9,370 | get displayed text | # (C) Copyright 2004-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... |
9,371 | adapt data from data loader | import math
from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
import tensorflow as tf
import determined as det
from determined import keras
from determined.common import check
ArrayLike = Union[np.ndarray, List[np.ndarray], Dict[str, np.ndarray]]
InputData = Union[tf.keras.utils.Sequence... |
9,372 | test values type | import unittest
import six
import test_engine
import testutil
from formula_prompt import (
values_type, column_type, referenced_tables, get_formula_prompt, convert_completion,
)
from objtypes import RaisedException
from records import Record as BaseRecord, RecordSet as BaseRecordSet
class FakeTable(object):
de... |
9,373 | create pack dependencies | import os
from pathlib import Path
from typing import Dict, List
from neo4j import Transaction
from demisto_sdk.commands.common.constants import (
DEPRECATED_CONTENT_PACK,
GENERIC_COMMANDS_NAMES,
MarketplaceVersions,
)
from demisto_sdk.commands.common.handlers import JSON_Handler
from demisto_sdk.commands... |
9,374 | test none with another | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
9,375 | test copy raw fields | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2023 Bitergia
#
# 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.
#
# This ... |
9,376 | execute code | """
Ethereum Virtual Machine (EVM) Interpreter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. contents:: Table of Contents
:backlinks: none
:local:
Introduction
------------
A straightforward interpreter that executes EVM code.
"""
from dataclasses import dataclass
from typing import Set, Tuple
from ethereum... |
9,377 | test get bad user page | # Tests in this file use the secretariat credentials
import requests
import json
import random
import string
from src import env, utils
from src.utils import (assert_contains, ok_response_contains,
ok_response_contains_json, response_contains,
response_contains_json)
#### ... |
9,378 | test no args | """
Unittests for creating a course in an chosen modulestore
"""
from io import StringIO
from django.core.management import CommandError, call_command
from django.test import TestCase
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.dja... |
9,379 | solvevec | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
9,380 | get batch fmtstr | #!/usr/bin/env python3
# ==============================================================================
#
# Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved.
#
# TPU-MLIR is licensed under the 2-Clause BSD License except for the
# third-party components.
#
# =============================================... |
9,381 | 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
# --------------------------------... |
9,382 | genpareto log prob | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... |
9,383 | create | import astropy.units as u
from sunpy.coordinates.utils import get_rectangle_coordinates
from sunpy.net._attrs import Time, Wavelength
from sunpy.net.attr import AttrAnd, AttrComparison, AttrOr, AttrWalker, DataAttr, SimpleAttr
__all__ = ['Series', 'Protocol', 'Notify', 'Segment', 'PrimeKey', 'Cutout', "Keyword"]
# ... |
9,384 | get private endpoint connection | # 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... |
9,385 | main | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Stephan Schwarz <stearz@gmx.de>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_functio... |
9,386 | create test suites | # Copyright 2014 The Oppia 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 ... |
9,387 | copy | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
from __future__ import annotations
__all__ = ("IndexedOptionForm",)
from collections.abc import Callable
import awkward as ak
from awkward._nplikes.numpylike import NumpyMetadata
from awkward._parameters import parameters_union, t... |
9,388 | build | import tensorflow as tf
from tensorflow.keras import backend as K
from spektral.layers import ops
from spektral.layers.convolutional.conv import Conv
class GTVConv(Conv):
r"""
A graph total variation convolutional layer (GTVConv) from the paper
> [Total Variation Graph Neural Networks](https://arxiv.org... |
9,389 | run handler | # mautrix-telegram - A Matrix-Telegram puppeting bridge
# Copyright (C) 2021 Tulir Asokan
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... |
9,390 | select platforms | import Xlib.display
import glob
import warnings
import os
import ctypes.util
import xml.etree.ElementTree
class Request:
def __init__(self, system, width, height, x_display, headless):
self.system = system
self.width = width
self.height = height
self.x_display = x_display
s... |
9,391 | rsync | # 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/.
import os
import platform
import shutil
import subprocess
from pathlib import Path
from typing import List
import mozfi... |
9,392 | test client side filters simple | from collections import OrderedDict
from viadot.sources import SAPRFC, SAPRFCV2
sap = SAPRFC()
sap2 = SAPRFCV2()
sql1 = "SELECT a AS a_renamed, b FROM table1 WHERE table1.c = 1"
sql2 = "SELECT a FROM fake_schema.fake_table WHERE a=1 AND b=2 OR c LIKE 'a%' AND d IN (1, 2) LIMIT 5 OFFSET 3"
sql3 = "SELECT b FROM c WHE... |
9,393 | location | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . imp... |
9,394 | strict app | import logging
import pytest
from starlette.types import Receive, Scope, Send
from conftest import FIXTURES_FOLDER, OPENAPI3_SPEC, build_app_from_fixture
@pytest.fixture(scope="session")
def simple_app(spec, app_class):
return build_app_from_fixture(
"simple", app_class=app_class, spec_file=spec, valida... |
9,395 | process | def METHOD_NAME(client, edit, invitation):
journal = openreview.journal.Journal()
venue_id = journal.venue_id
decision_approval = client.get_note(edit.note.id)
decision = client.get_note(edit.note.replyto)
## On update or delete return
if decision_approval.tcdate != decision_approval.tmdate:
... |
9,396 | centroid x | import math
class Vector:
def __init__(self, x, y):
self.x = x
self.y = y
def __iter__(self):
return iter((self.x, self.y))
def __getitem__(self, key):
return (self.x, self.y)[key]
def __eq__(self, other):
return tuple(self) == tuple(other)
def __repr__(... |
9,397 | call | from __future__ import absolute_import, division, print_function, unicode_literals
import os
from tempfile import gettempdir
import tensorflow as tf
from tensorflow.keras.layers import Dense, Flatten, Conv2D
from tensorflow.keras import Model
from clearml import Task
# Connecting ClearML with the current process,... |
9,398 | formula definition | import os
import types
import pytest
import salt.spm
import salt.utils.files
from tests.support.mock import patch
@pytest.fixture
def METHOD_NAME():
return {
"name": "formula1",
"version": "1.2",
"release": "2",
"summary": "test",
"description": "testing, nothing to see h... |
9,399 | far exist |
import os
import string
from pathlib import Path
from typing import Dict
import pynini
from pynini import Far
from pynini.export import export
from pynini.lib import byte, pynutil, utf8
DAMO_CHAR = utf8.VALID_UTF8_CHAR
DAMO_DIGIT = byte.DIGIT
DAMO_LOWER = pynini.union(*string.ascii_lowercase).optimize()
DAMO_UPPER ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.