id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
6,000 | connect ec2 endpoint | import logging
from _typeshed import Incomplete
from typing import Any
from .s3.connection import S3Connection
Version: Any
UserAgent: Any
config: Any
BUCKET_NAME_RE: Any
TOO_LONG_DNS_NAME_COMP: Any
GENERATION_RE: Any
VERSION_RE: Any
ENDPOINTS_PATH: Any
def init_logging(): ...
class NullHandler(logging.Handler):
... |
6,001 | 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... |
6,002 | revise organization mappings | #!/usr/bin/env python
from typing import List
import click
import docker
from django.apps import apps
from sentry.runner import configure
from sentry.silo.base import SiloMode
configure()
from django.conf import settings
from sentry.models.organizationmapping import OrganizationMapping
def exec_run(container, c... |
6,003 | get dashboard data | import frappe
from frappe import _
from frappe.utils import flt
from india_compliance.gst_india.overrides.sales_invoice import (
update_dashboard_with_gst_logs,
)
from india_compliance.gst_india.overrides.transaction import validate_transaction
from india_compliance.gst_india.utils import get_gst_accounts_by_type,... |
6,004 | guess config type | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Utility functions for experiment config classes, internal part.
If you are implementing a config class for a training service, it's unlikely you will need these.
"""
from __future__ import annotations
__all__ = [
'get_base_path', 'set_... |
6,005 | recurring scans | # 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... |
6,006 | p expression number | #!/usr/bin/env python
import numpy as np
import ply.yacc as yacc
import data.calculated_parser.functions as functions
import data.calculated_parser.lexer
class Parser:
"""The parsing portion of the domain specific language"""
def __init__(self, **kwargs):
self.lexer = data.calculated_parser.lexer.L... |
6,007 | creation 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... |
6,008 | get waiting request | from _typeshed import _BufferWithLen
from socket import socket
from typing import TypeVar, overload
from typing_extensions import Literal
from Xlib import error
from Xlib._typing import ErrorHandler
from Xlib.display import _ResourceBaseClass, _ResourceBaseClassesType
from Xlib.protocol import rq
from Xlib.support imp... |
6,009 | to bytes | """Module for editing the hardcoded table mapping of ground levels to dungeon tilesets."""
# 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... |
6,010 | stub list transcription jobs | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Stub functions that are used by the Amazon Transcribe unit tests.
When tests are run against an actual AWS account, the stubber class does not
set up stubs and passes all calls through to the Boto3 client.
"... |
6,011 | test syncs existing fixture | from django.test import TestCase
from corehq.apps.linked_domain.models import DomainLink
from corehq.apps.fixtures.models import (
LookupTable,
LookupTableRow,
TypeField,
Field,
)
from corehq.apps.linked_domain.exceptions import UnsupportedActionError
from corehq.apps.linked_domain.updates import update... |
6,012 | plot lsection | # -*- coding: utf-8 -*-
"""
mslib.mswms.mpl_lsec
~~~~~~~~~~~~~~~~~~~~
Linear section style super class.
This file is part of MSS.
:copyright: Copyright 2021 May Baer
:copyright: Copyright 2021-2023 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed... |
6,013 | import | """Helper functions for the ``actions`` package."""
from __future__ import annotations
import functools
import importlib
import importlib.resources as importlib_resources
import logging
import os
import re
from collections import namedtuple
from collections.abc import Generator
from typing import Any
from typing impo... |
6,014 | cover image | from django.conf import settings
from django_filters import rest_framework as filters
from djqscsv import render_to_csv_response
from drf_spectacular.utils import extend_schema, extend_schema_view
from dry_rest_permissions.generics import DRYPermissionFiltersBase, DRYPermissions
from rest_framework import filters as dr... |
6,015 | get unique planning area ids | """ HFI admin logic """
from collections import defaultdict
from itertools import groupby
from operator import attrgetter
from typing import Dict, List, Set, Tuple
from datetime import datetime
from app.db.models.hfi_calc import PlanningWeatherStation
from app.schemas.hfi_calc import HFIAdminAddedStation
def update_... |
6,016 | get group urls | __all__ = ["PluginConfigMixin"]
from django import forms
from rest_framework import serializers
from sentry.exceptions import PluginError
from sentry.utils.forms import form_to_config
from .providers import ProviderMixin
from .validators import DEFAULT_VALIDATORS
VALIDATOR_ERRORS = (forms.ValidationError, serializ... |
6,017 | orders | """
Logic to provide consistency across exchanges
Copyright (C) 2021 Emerson Dove
This program 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 of the License, or
(... |
6,018 | unpair | """
Support for Bluetooth (using BlueZ in Linux).
The following packages are required packages for this module:
bluez >= 5.7
bluez-libs >= 5.7
bluez-utils >= 5.7
pybluez >= 0.18
"""
import shlex
import salt.utils.validate.net
from salt.exceptions import CommandExecutionError
HAS_PYBLUEZ = False
try:... |
6,019 | shell lookup | import shutil
from buildtest.exceptions import BuildTestError
from buildtest.utils.command import BuildTestCommand
from buildtest.utils.file import is_file
def get_shells():
"""Return a list of shell returned from /etc/shells file. If file exist we return a list
The command we run is the following which will... |
6,020 | custom response | import os
import json
try:
from urllib.parse import parse_qs
except ImportError:
from urlparse import parse_qs
import boto3.session
from chalice import Chalice, BadRequestError, NotFoundError, Response,\
CORSConfig, UnauthorizedError, AuthResponse, AuthRoute
# This is a test app that is used by integrat... |
6,021 | spherical yn | from ._ufuncs import (_spherical_jn, _spherical_yn, _spherical_in,
_spherical_kn, _spherical_jn_d, _spherical_yn_d,
_spherical_in_d, _spherical_kn_d)
def spherical_jn(n, z, derivative=False):
r"""Spherical Bessel function of the first kind or its derivative.
Defined... |
6,022 | flatten fun for sparse ad | # Copyright 2021 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... |
6,023 | supervised | from __future__ import annotations
from abc import abstractmethod
from asyncio import CancelledError, Condition, Task, as_completed, create_task, wait
from dataclasses import dataclass
from pathlib import Path
from time import monotonic
from typing import (
Any,
AsyncIterator,
Awaitable,
Generic,
M... |
6,024 | test load kps | # Copyright (c) OpenMMLab. All rights reserved.
import copy
import os.path as osp
import numpy as np
import pytest
from mmcv.transforms import LoadAnnotations, LoadImageFromFile
class TestLoadImageFromFile:
def test_load_img(self):
# file_client_args and backend_args can not be both set
with py... |
6,025 | training step | # Copyright The Lightning AI 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
6,026 | test equality of objs with different message | # -*- coding: utf-8 -*-
from unittest.mock import patch
from django.core.exceptions import ValidationError
from django.test import TestCase, SimpleTestCase
from django_extensions.validators import NoControlCharactersValidator, NoWhitespaceValidator, HexValidator
class NoControlCharactersValidatorTests(TestCase):
... |
6,027 | char field field factory | from iommi.shortcut import Shortcut
from iommi.base import MISSING
def setup_db_compat():
setup_db_compat_django()
def register_factory(django_field_class, *, shortcut_name=MISSING, factory=MISSING, **kwargs):
from iommi.form import register_field_factory
from iommi.query import register_filter_factory... |
6,028 | create row comment | from baserow_premium.license.models import License, LicenseUser
from baserow_premium.row_comments.models import RowComment
from baserow_premium.views.models import (
CalendarView,
CalendarViewFieldOptions,
KanbanView,
KanbanViewFieldOptions,
)
from baserow.contrib.database.fields.models import Field
fr... |
6,029 | test drt | #!/usr/bin/env python3
# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# A script which makes it easy to execute common DOM-related tasks
import os
impo... |
6,030 | 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
# --------------------------------... |
6,031 | left | from talon import Context, actions, clip
ctx = Context()
ctx.matches = r"""
os: mac
"""
@ctx.action_class("edit")
class EditActions:
def copy():
actions.key("cmd-c")
def cut():
actions.key("cmd-x")
def delete():
actions.key("backspace")
def delete_line():
actions.ed... |
6,032 | test action selection with epsilon decay | # coding=utf-8
# Copyright 2020 The TF-Agents 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 la... |
6,033 | data sources add file path for specified | #-------------------------------------------------------------------------------
# DataSources
#-------------------------------------------------------------------------------
class DataSourcesAbstractAPI:
@staticmethod
def init_data_sources_environment(object):
pass
@staticmethod
def finish_data_sources_enviro... |
6,034 | 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__ =... |
6,035 | external url | from blinker import Signal
from mongoengine.signals import pre_save, post_save
from werkzeug.utils import cached_property
from udata.core.storages import images, default_image_basename
from udata.frontend.markdown import mdstrip
from udata.i18n import lazy_gettext as _
from udata.models import db, BadgeMixin, WithMetr... |
6,036 | name | # 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... |
6,037 | is valid image | from __future__ import annotations
import os
import re
from typing import Any
import sentry_sdk
from sentry.lang.java.utils import deobfuscation_template
from sentry.models import Project, ProjectDebugFile
from sentry.utils import json
from sentry.utils.safe import get_path
# Obfuscated type values are either in th... |
6,038 | generate dict | from copy import deepcopy
from random import randint
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from moto.moto_api._internal import mock_random
from tests.test_eks.test_eks_constants import (
ClusterAttributes,
ClusterInputs,
FargateProfileAttributes,
... |
6,039 | close | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
6,040 | test taskstatus list logged in | import urllib.parse
from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import Taskstatus
class TaskstatusViewTestCase(TestCase):
"""taskstatus view tests"""
@classmethod
def setUpTestData(cls):
# create object
Taskstatus.objects.creat... |
6,041 | get bb ellipse | """
`regfilter` provides functions for filtering out regions outside the image space.
:Authors: Mihai Cara
:License: :doc:`LICENSE`
"""
__author__ = 'Mihai Cara'
def fast_filter_outer_regions(reglist, width, height, origin=1):
# fast_filter_outer_regions filters regions that are outside a rectangle
# ('ima... |
6,042 | setup test environment | from __future__ import print_function
import os
import re
import sys
import time
import signal
import traceback
import warnings
import __res
from __res import importer
def METHOD_NAME():
try:
from yatest_lib.ya import Ya
import yatest.common as yc
yc.runtime._set_ya_config(ya=Ya())
e... |
6,043 | test create metadata | """
:codeauthor: Ted Strzalkowski (tedski@gmail.com)
tests.unit.modules.mdadm_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import re
import pytest
import salt.modules.mdadm_raid as mdadm
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {mdadm: {}}
... |
6,044 | 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
__all__ ... |
6,045 | get job group | #!/usr/bin/env python
"""
Retrieves job status according to given criteria.
Example:
$ dstat -a -u your.dirac.username
"""
import datetime
from DIRAC import exit as DIRACExit, S_OK, S_ERROR
from DIRAC import gLogger
from DIRAC.Interfaces.Utilities.DCommands import DSession
from DIRAC.Interfaces.Utilities.DCon... |
6,046 | f1 score | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 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
#
# Unl... |
6,047 | get init state | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Optional, Dict, Any, TYPE_CHECKING
from mephisto.abstractions.blueprint import AgentState
import os
i... |
6,048 | run subprocess | """Read and write the machine's pretty hostname.
See the `name_management` package docstring for background on the pretty hostname
and how it's distinct from other names on the machine.
"""
import asyncio
from logging import getLogger
from typing import List, Union
_log = getLogger(__name__)
async def get_pretty... |
6,049 | tear down | # Copyright (c) Facebook, Inc. and its affiliates.
import unittest
import tests.test_utils as test_utils
import torch
from mmf.common.sample import SampleList
from mmf.models.vinvl import VinVLBase, VinVLForClassification, VinVLForPretraining
from mmf.utils.build import build_model
from mmf.utils.configuration import... |
6,050 | get nodes | """Utility functions for tests."""
import os
import subprocess
import tarfile
from contextlib import contextmanager
from glob import glob
from gzip import GzipFile
from io import BytesIO
import nibabel as nb
import numpy as np
import requests
from bids.layout import BIDSLayout
from nipype import logging
LOGGER = logg... |
6,051 | etag | # 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... |
6,052 | test prealloc | #!/usr/bin/env python3
#
# Test for preallocate filter
#
# Copyright (c) 2020 Virtuozzo International GmbH.
#
# 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
... |
6,053 | extract data | # 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... |
6,054 | test collection delete | import unittest
from unittest import mock
from pyramid import httpexceptions
from kinto.core.resource import Resource, ShareableResource
from kinto.core.storage import exceptions as storage_exceptions
from kinto.core.testing import DummyRequest
from . import BaseTest
class ResourceTest(BaseTest):
def test_rais... |
6,055 | test outstream | """Test IO capturing functionality"""
import io
import os
import subprocess
import sys
import threading
import time
import warnings
from concurrent.futures import Future, ThreadPoolExecutor
from unittest import mock
import pytest
import zmq
from jupyter_client.session import Session
from ipykernel.iostream import MA... |
6,056 | test deleting theme invalidates themes cache | from pathlib import Path
import pytest
from django.core.files.base import ContentFile
from django.urls import reverse
from ....cache.test import assert_invalidates_cache
from ....test import assert_has_error_message
from ... import THEME_CACHE
from ...models import Theme, Css, Media
@pytest.fixture
def delete_link(... |
6,057 | test catches leaked mock when enabled | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
6,058 | multi occurrence | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... |
6,059 | channel 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... |
6,060 | test put mc | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
6,061 | to hex | #!/usr/bin/python
# Simple fuzzing tool by disassembling random code. By Nguyen Anh Quynh, 2014
# Syntax:
# ./suite/fuzz.py --> Fuzz all archs
# ./suite/fuzz.py x86 --> Fuzz all X86 (all 16bit, 32bit, 64bit)
# ./suite/fuzz.py x86-16 --> Fuzz X86-32 arch only
# ./suite/fuzz.py x86-32 --> Fuzz X86-32 a... |
6,062 | get export full path | # -*- coding: UTF-8 -*-
import datetime
import os
from urllib.parse import quote
import MySQLdb
import simplejson as json
from django.template import loader
from archery import settings
from sql.engines import get_engine
from django.contrib.auth.decorators import permission_required
from django.http import HttpRespons... |
6,063 | test psi4 restarts | """
Tests the DQM compute dispatch module
"""
import msgpack
import numpy as np
import pytest
from qcelemental.models import AtomicInput, BasisSet
from qcelemental.tests.test_model_results import center_data
import qcengine as qcng
from qcengine.testing import has_program, using
qcsk_bs = BasisSet(name="custom_basis"... |
6,064 | run chat pipeline with model id | # Copyright (c) Alibaba, Inc. and its affiliates.
import unittest
import torch
from transformers import BitsAndBytesConfig
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.utils.test_utils import test_level
class QWenTextGenerationPipelineTest(unittest.TestCase)... |
6,065 | test is in code | """Unittest for idlelib.HyperParser"""
import unittest
from test.test_support import requires
from Tkinter import Tk, Text
from idlelib.EditorWindow import EditorWindow
from idlelib.HyperParser import HyperParser
class DummyEditwin:
def __init__(self, text):
self.text = text
self.indentwidth = 8
... |
6,066 | as header | from _typeshed import Incomplete
from collections.abc import Iterable, Iterator
from typing import ClassVar
from typing_extensions import Self, TypedDict
from pkg_resources import Environment
from .. import Command, SetuptoolsDeprecationWarning
__all__ = ["easy_install", "PthDistributions", "extract_wininst_cfg", "g... |
6,067 | search | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import re
from typing import Generator, List, Tuple, Dict, Optional
from volatility3.framework.interfaces import layers
from volatil... |
6,068 | on event | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... |
6,069 | hessian | """ Utilities for Potential classes """
# Standard library
from functools import wraps
# Third-party
import numpy as np
# Project
from ..common import PotentialParameter
from .core import PotentialBase
__all__ = ['from_equation']
__doctest_requires__ = {('from_equation', ): ['sympy']}
def from_equation(expr, vars... |
6,070 | get filename | """
Copyright 2007 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
from os import path
from gi.repository import Gtk
from . import Constants, Utils, Dialogs
class FileDialogHelper(Gtk.FileChooserDialog, object):
"""
A wrapper class for the gtk ... |
6,071 | test no overlap | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Unit tests for the :func:`iris.analysis.geometry.geometry_area_weights`
function.
"""
# Import iris.tests first so that ... |
6,072 | set user | """Ensure OpenID Connect Authorization Request 'claims' are preserved across authorization.
The claims parameter is an optional query param for the Authorization Request endpoint
but if it is provided and is valid it needs to be deserialized (from urlencoded JSON)
and persisted with the authorization code itself, th... |
6,073 | get service db row | import sqlite3
from collections import namedtuple
from wazuh_testing.modules.aws import (
ALB_TYPE,
AWS_SERVICES_DB_PATH,
CISCO_UMBRELLA_TYPE,
CLB_TYPE,
CLOUD_TRAIL_TYPE,
CUSTOM_TYPE,
GUARD_DUTY_TYPE,
NLB_TYPE,
S3_CLOUDTRAIL_DB_PATH,
SERVER_ACCESS_TABLE_NAME,
VPC_FLOW_TYPE,
... |
6,074 | test default method override method | # (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... |
6,075 | test oversample | #!/usr/bin/env python3
#* 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/lgp... |
6,076 | add stream handler | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.
#
# This file is part of kiwi.
#
# kiwi 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 la... |
6,077 | test get gz object nosuchkey | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from indra.literature import s3_client
from indra.util import unicode_strs
import zlib
import pytest
@pytest.mark.webservice
@pytest.mark.nonpublic
@pytest.mark.cron
def test_check_pmid():
pmid = s3_client.chec... |
6,078 | test metrics connections | # Copyright The OpenTelemetry 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 ... |
6,079 | close | """
Session server-sent events client.
| Copyright 2017-2023, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from collections import defaultdict
from dataclasses import asdict, dataclass
import logging
from retrying import retry
from threading import Thread, Event as ThreadEvent
import time
import typing ... |
6,080 | annotate method | #!/usr/bin/python2.7
# Copyright 2011 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 requi... |
6,081 | patch sources | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir
fr... |
6,082 | test account properties v2 | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import functools
import pytest
from devtools_testutils import recorded_by_proxy, set_custom_default_matcher
from azure.core.credentials import AzureKeyCr... |
6,083 | default global ctx | # Copyright (c) 2021-2023 The Chan Zuckerberg Initiative Foundation
# Copyright (c) 2021-2023 TileDB, Inc.
#
# Licensed under the MIT License.
import datetime
import functools
import time
from typing import Any, Dict, Optional, Union
import attrs
import tiledb
from typing_extensions import Self
from .._types import ... |
6,084 | set watch dir | from __future__ import absolute_import, division, print_function
#-----------------------------------------------------------------------
# more-or-less real-time plotting of Bragg peak count and XES detector
# skewness.
#-----------------------------------------------------------------------
from xfel.cxi.gfx import... |
6,085 | make json request | import json
import pytest
from lms.validation import ValidationError
from lms.validation._api import (
APIReadResultSchema,
APIRecordResultSchema,
APIRecordSpeedgraderSchema,
)
class TestAPIRecordSpeedgraderSchema:
def test_it_parses_request(self, json_request, all_fields):
request = json_re... |
6,086 | run | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright Redhat
#
# SPDX-License-Identifier: GPL-2.0
# Author: Nan Li <nanli@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import os
import re
from avocado.utils import process
from virttest impo... |
6,087 | extract data | # 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... |
6,088 | validate name | from django.db.models import F
from rest_framework import serializers
from zentral.core.compliance_checks.models import ComplianceCheck
from .cleanup import get_default_snapshot_retention_days
from .compliance_checks import InventoryJMESPathCheck
from .models import EnrollmentSecret, JMESPathCheck, MetaBusinessUnit, Ta... |
6,089 | delaunay 2d | """Filters module with a class to manage filters/algorithms for unstructured grid datasets."""
from functools import wraps
from pyvista.core import _vtk_core as _vtk
from pyvista.core.errors import VTKVersionError
from pyvista.core.filters import _get_output, _update_alg
from pyvista.core.filters.data_set import DataS... |
6,090 | gen args | #!/usr/bin/env python
#
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
6,091 | compilers minimum version | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc
from conan.tools.files import get, copy, rm, rmdir, collect_libs
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.to... |
6,092 | get needed files | from __future__ import print_function
import datetime
import itertools
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from django.utils.translation import gettext as _
from django.utils.translation import ngettext
from filetracker.utils import split_name
from oioioi.fi... |
6,093 | 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
# --------------------------------... |
6,094 | test io update | from artiq.experiment import *
from artiq.test.hardware_testbench import ExperimentCase
from artiq.coredevice import urukul
class UrukulExp(EnvExperiment):
def build(self, runner):
self.setattr_device("core")
self.dev = self.get_device("urukul_cpld")
self.runner = runner
def run(self)... |
6,095 | build schema 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
# --------------------------------... |
6,096 | test null | # bluemira is an integrated inter-disciplinary design tool for future fusion
# reactors. It incorporates several modules, some of which rely on other
# codes, to carry out a range of typical conceptual fusion reactor design
# activities.
#
# Copyright (C) 2021-2023 M. Coleman, J. Cook, F. Franza, I.A. Maione, S. McInto... |
6,097 | run | # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
#
# 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... |
6,098 | build schema 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
# --------------------------------... |
6,099 | test linear | from nutils import transform, evaluable, numeric, types
from nutils.testing import TestCase
import numpy
class specialcases(TestCase):
def test_tensoredge_swapup_index(self):
lineedge = transform.SimplexEdge(1, 0, False)
for edge in transform.TensorEdge1(lineedge, 1), transform.TensorEdge2(1, lin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.