id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
7,000 | test queryset not deleted | from unittest.mock import MagicMock, patch
import pytest
from django import forms
from django.urls import reverse
from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _
from github3.exceptions import NotFoundError
from ..admin import JSONWidget, ProjectForm, SiteAdminForm, SoftDe... |
7,001 | get variable from table | import copy
import re
from collections import defaultdict
from pathlib import Path
from typing import List, Optional
import pandas as pd
import structlog
from owid.catalog import Dataset, Table, Variable
from owid.catalog.utils import concat_variables
from etl.paths import DATA_DIR
log = structlog.get_logger(__name_... |
7,002 | load arguments | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
7,003 | test scaled interval score | # 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... |
7,004 | get table | import copy
from .fixtures.datacatalog import TABLE_INPUT, PARTITION_INPUT, DATABASE_INPUT
from .fixtures.schema_registry import (
TEST_REGISTRY_NAME,
TEST_SCHEMA_NAME,
TEST_BACKWARD_COMPATIBILITY,
TEST_AVRO_DATA_FORMAT,
TEST_AVRO_SCHEMA_DEFINITION,
TEST_SCHEMA_ID,
TEST_NEW_AVRO_SCHEMA_DEFI... |
7,005 | construct model | import functools
import operator
import os
import os.path
import sys
import numpy as np
# Bamboo utilities
current_file = os.path.realpath(__file__)
current_dir = os.path.dirname(current_file)
sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python'))
import tools
# ==============================... |
7,006 | get md links | #!/usr/bin/env python
#
# Checks that all links in the readme markdown files are valid
#
# SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
#
import argparse
import concurrent.futures
import os
import os.path
import re
import sys
import urllib.error
import url... |
7,007 | build | # pylint: disable=inconsistent-return-statements
#!/usr/bin/env python
# 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 yo... |
7,008 | getmtime | """
Path operations common to more than one OS
Do not use directly. The OS specific modules import the appropriate
functions from this module themselves.
"""
import os
import stat
__all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime',
'getsize', 'isdir', 'isfile', 'samefile', 'sameopenfil... |
7,009 | layout | from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from conan.tools.files import get, rmdir, apply_conandata_patches, export_conandata_patches, copy
from conan.tools.scm import Version
import os
required_conan_version... |
7,010 | release | """
JBoss version
=============
Provide information about the versions of all running Jboss on a system.
"""
import json
from collections import namedtuple
from insights import Parser, parser
from insights.specs import Specs
# define namedtuple to store the property of version
_VersionNameTuple = namedtuple("_Version... |
7,011 | process | import re
import pyblish.api
class CollectClipEffects(pyblish.api.InstancePlugin):
"""Collect soft effects instances."""
order = pyblish.api.CollectorOrder - 0.078
label = "Collect Clip Effects Instances"
families = ["clip"]
def METHOD_NAME(self, instance):
family = "effect"
effe... |
7,012 | world size | # Owner(s): ["oncall: distributed"]
import itertools
import torch
from torch.distributed._tensor import distribute_tensor
from torch.distributed._tensor._utils import (
compute_local_shape,
compute_local_shape_and_global_offset,
)
from torch.distributed._tensor.device_mesh import DeviceMesh
from torch.distrib... |
7,013 | predict | # 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... |
7,014 | teardown method | # Generated by Selenium IDE
# pylint: skip-file
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import ... |
7,015 | dump state | import os
import sys
from PyQt5.QtCore import Qt, QDir
from PyQt5.QtGui import QIcon, QPixmap, QGuiApplication
from PyQt5.QtWidgets import QApplication, QWidget
from feeluown.gui.browser import Browser
from feeluown.gui.hotkey import HotkeyManager
from feeluown.gui.image import ImgManager
from feeluown.gui.theme impo... |
7,016 | load index | # Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
"""Defines the dashboard class."""
import json
import os
import uuid
from html.parser import HTMLParser
from rai_core_flask import FlaskHelper # , environment_detector
from raiutils.data_processing import serialize_json_safe
from raiwidgets.int... |
7,017 | update render storage | # Copyright (c) 2022 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
from typing import Optional, Tuple
from PyQt6.QtGui import QImage #For typing.
from UM.Logger import Logger
from UM.View.GL.OpenGL import OpenGL
from UM.View.GL.FrameBufferObject import FrameBufferObject
class RenderP... |
7,018 | test negative values | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown copyright. The Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... |
7,019 | test create folder err | # Copyright (C) 2010-2015 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
import pytest
from tcr_misc import random_string
from lib.cuckoo.common import utils
from lib.cuckoo.common.exceptions import CuckooOperati... |
7,020 | test mean | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import numpy as np
from copy import deepcopy as dc
from common import compare_numpy_output
@compare_numpy_output()
def test_sum(A: dace.float64[10, 5, 3]):
return np.sum(A)
@compare_numpy_output()
def test_sum_1(A: dace.floa... |
7,021 | two step1 | import attr
import pytest
from ... import _abc, _core
from .tutil import check_sequence_matches
@attr.s(eq=False, hash=False)
class TaskRecorder:
record = attr.ib(factory=list)
def before_run(self):
self.record.append(("before_run",))
def task_scheduled(self, task):
self.record.append((... |
7,022 | test async future | from browser import aio, timer
from tester import assert_raises
results = []
def report(*args):
for url, size in results:
if size is not None:
print(f"file at {url}: {size} bytes")
else:
print(f"file at {url}: not found")
class Done(Exception):
pass
class AIter:
... |
7,023 | get next | # 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,024 | functional impl | import torch
from torch.library import Library
from torch._ops import OpOverload
from torchgen.model import FunctionSchema, OperatorName, SchemaKind, BaseTy, BaseType
from torch._C import _ExcludeDispatchKeyGuard, DispatchKeySet, DispatchKey
from .autograd import autograd_not_implemented
import torch.utils._pytree as p... |
7,025 | run command | #!/usr/bin/env python
"""
Runs a ROSE tool. Impersonates CXX. For use by /kull/systemconf/compilers/
Linux_run_rose_gnu_4_9_3_mvapich2_2_2_compiler.py and similar.
If the tool returns status 0, logs "PASSED" to stdout and copies the command
and its arguments to kull_testing/passed.txt. Otherwise, logs "FAILED" to ... |
7,026 | tableqa tracking and print results with tableid | # Copyright (c) Alibaba, Inc. and its affiliates.
import os
import unittest
from threading import Thread
from typing import List
import json
from transformers import BertTokenizer
from modelscope.hub.snapshot_download import snapshot_download
from modelscope.models import Model
from modelscope.outputs import OutputKe... |
7,027 | on notify | # -*- coding: utf-8 -*-
""" *==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
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... |
7,028 | compute metrics | """
This module computes evaluation metrics for MSMARCO dataset on the ranking task.
Command line:
python msmarco_eval_ranking.py <path_to_reference_file> <path_to_candidate_file>
Creation Date : 06/12/2018
Last Modified : 1/21/2019
Authors : Daniel Campos <dacamp@microsoft.com>, Rutger van Haasteren <ruvanh@microsoft... |
7,029 | get view output | #!/usr/bin/env python
import os
import sys
import argcomplete
from tron.commands import cmd_utils
from tron.commands import display
from tron.commands.client import Client
from tron.commands.client import get_object_type_from_identifier
from tron.commands.client import RequestError
from tron.commands.client import Tr... |
7,030 | test semi circle | # 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... |
7,031 | requested attribute type from string | #!/usr/bin/env python
#
# Generated Tue Jul 18 14:58:29 2017 by parse_xsd.py version 0.5.
#
import saml2
from saml2 import SamlBase
from saml2 import saml
NAMESPACE = "http://eidas.europa.eu/saml-extensions"
class RequestedAttributeType_(SamlBase):
"""The http://eidas.europa.eu/saml-extensions:RequestedAttrib... |
7,032 | default output file | """Class for output file configuration"""
import logging
from DDSim.Helper.ConfigHelper import ConfigHelper
logger = logging.getLogger(__name__)
#: True if DD4hep was built with LCIO
DD4HEP_USE_LCIO = "@DD4HEP_USE_LCIO@" != "OFF"
#: True if DD4hep was built with EDM4hep
DD4HEP_USE_EDM4HEP = "@DD4HEP_USE_EDM4HEP@" !=... |
7,033 | test morphsnakes simple shape chan vese | import numpy as np
import pytest
from numpy.testing import assert_array_equal
from skimage.segmentation import (disk_level_set,
inverse_gaussian_gradient,
morphological_chan_vese,
morphological_geodesic_active_contour... |
7,034 | main | #!/usr/bin/env python3
"""Tool to take files from a font family project upstream git repository
to the google/fonts GitHub repository structure, taking care of all the details.
Documentation at gftools/docs/gftools-packager/README.md
"""
import sys
from gftools import packager
from gftools.packager import UserAbortEr... |
7,035 | get folder group share list | import os
import configparser
from django.db import connection
class SeafileDB:
def __init__(self):
self.db_name = self._get_seafile_db_name()
def _get_seafile_db_name(self):
conf_dir = os.environ.get('SEAFILE_CENTRAL_CONF_DIR') or \
os.environ.get('SEAFILE_CONF_DIR')
... |
7,036 | check p2p message | #!/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.
""" Tests the net:* tracepoint API interface.
See https://github.com/bitcoin/bitcoin/blob/master/doc/tra... |
7,037 | healthz | # 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... |
7,038 | on click | import pytest
import reactpy
from reactpy.core.events import (
EventHandler,
merge_event_handler_funcs,
merge_event_handlers,
to_event_handler_function,
)
from reactpy.testing import DisplayFixture, poll
from tests.tooling.common import DEFAULT_TYPE_DELAY
def test_event_handler_repr():
handler = ... |
7,039 | validate | #!./.mnist-pytorch/bin/python
import collections
import json
import math
import os
import docker
import fire
import torch
from fedn.utils.pytorchhelper import PytorchHelper
NUM_CLASSES = 10
def _get_data_path():
""" For test automation using docker-compose. """
# Figure out FEDn client number from containe... |
7,040 | serialize instances | from typing import Dict, Any, Union
from pathlib import Path
import os
from labelbox.data.annotation_types.collection import LabelCollection, LabelGenerator
from labelbox.data.serialization.coco.instance_dataset import CocoInstanceDataset
from labelbox.data.serialization.coco.panoptic_dataset import CocoPanopticDatase... |
7,041 | add script | from lost.db import model
# from celery.utils.log import get_task_logger
# from celery import task
from lostconfig import LOSTConfig
from lost.db.access import DBMan
from datetime import datetime, timedelta
import json
def register_worker(dbm, lostconfig):
worker = model.Worker(
env_name=lostconfig.env_nam... |
7,042 | set active axis | # Copyright (c) 2019 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
from typing import Optional
from enum import IntEnum
import random
from UM.Logger import Logger
from UM.Mesh.MeshData import MeshData
from . import SceneNode
from UM.Resources import Resources
from UM.Application import... |
7,043 | overfeat arg scope | # 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,044 | filter code | from typing import List
from uuid import UUID
import django_filters
import graphene
from django.db.models import Exists, OuterRef, Q
from graphql.error import GraphQLError
from ...account import models as account_models
from ...giftcard import models
from ...order import models as order_models
from ...product import ... |
7,045 | test final envvars | # Copyright 2017 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 accompa... |
7,046 | type | # Copyright 2021 The Kubeflow 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... |
7,047 | resource apply dense | # Copyright 2020 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,048 | set | # Tkinter font wrapper
#
# written by Fredrik Lundh, February 1998
#
__version__ = "0.9"
import itertools
import tkinter
# weight/slant
NORMAL = "normal"
ROMAN = "roman"
BOLD = "bold"
ITALIC = "italic"
def nametofont(name):
"""Given the name of a tk named font, returns a Font representation.
"""
ret... |
7,049 | find script dir | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.util.environment import is_system_path
class Tcl(AutotoolsPackage, SourceforgePackage):
"""Tcl... |
7,050 | test powerwall update if cookie cached | import json
from unittest.mock import Mock
import pytest
import requests
import requests_mock
from modules.devices.tesla import bat
from modules.devices.tesla.device import Device, Tesla
from modules.common.component_state import BatState
from modules.devices.tesla.config import TeslaConfiguration
from test_utils.moc... |
7,051 | test bug id from url | # pylint: disable=attribute-defined-outside-init
import os
import time
import unittest
from django.utils import timezone
from tcms.core.contrib.linkreference.models import LinkReference
from tcms.issuetracker.types import GitHub
from tcms.rpc.tests.utils import APITestCase
from tcms.testcases.models import BugSystem... |
7,052 | visit call | """ Inlining inline functions body. """
from pythran.analyses import Inlinable, Aliases
from pythran.passmanager import Transformation
import gast as ast
import copy
class Inlining(Transformation):
"""
Inline one line functions.
>>> import gast as ast
>>> from pythran import passmanager, backend
... |
7,053 | wrapped md5 function | import os
import sys
from typing import TYPE_CHECKING
from ddtrace.appsec.iast import oce
from ddtrace.appsec.iast._metrics import _set_metric_iast_instrumented_sink
from ddtrace.appsec.iast._patch import set_and_check_module_is_patched
from ddtrace.appsec.iast._patch import set_module_unpatched
from ddtrace.appsec.ia... |
7,054 | gen output file name | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: imagick.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 10/14/2010
description:
... |
7,055 | ensure structure calc is set | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import numpy as np
from pyiron_atomistics.atomistics.job.interactive import GenericInteractive
from pyiron_atomistics.at... |
7,056 | compute rnd reward | # Copyright 2018 DeepMind Technologies Limited. 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 ... |
7,057 | get resample time | # -*- coding: utf-8 -*-
# Copyright 2016-2023 The pyXem developers
#
# This file is part of pyXem.
#
# pyXem 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 optio... |
7,058 | impossible return type | import math
import re
import textwrap
import operator
import numpy as np
import unittest
from numba.core.compiler import compile_isolated
from numba import jit
from numba.core import types
from numba.core.errors import TypingError
from numba.core.types.functions import _header_lead
from numba.tests.support import Tes... |
7,059 | deserialize tuple | """
The serialization API supports the following datatypes: dict, list, str, bytes, int, float, and whatever is supported by group.serialize and group.deserialize
"""
from __future__ import print_function
import io, pickle
import json, zlib
from base64 import *
from charm.toolbox.bitstring import *
def serializeDict... |
7,060 | 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__ =... |
7,061 | log | """
This type stub file was generated by pyright.
"""
from supervisor.medusa import http_server
from supervisor.medusa.auth_handler import auth_handler
class NOT_DONE_YET:
...
class deferring_chunked_producer:
"""A producer that implements the 'chunked' transfer coding for HTTP/1.1.
Here is a sample usa... |
7,062 | set bookmarked | """
Bookmarks service.
"""
import logging
from django.core.exceptions import ObjectDoesNotExist
from edx_django_utils.cache import DEFAULT_REQUEST_CACHE
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError
from . import DEFAULT_FIELDS, api_impl as api
log... |
7,063 | predict load data | # Copyright The PyTorch Lightning 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 i... |
7,064 | operator config set bool | from ansys.dpf.gate.generated import operator_config_abstract_api
from ansys.dpf.gate import errors
# -------------------------------------------------------------------------------
# OperatorConfig
# -------------------------------------------------------------------------------
def _get_stub(server):
return ser... |
7,065 | test register random within nested function scope | # This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Copyright the Hypothesis Authors.
# Individual contributors are listed in AUTHORS.rst and the git log.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the... |
7,066 | check errors | from __future__ import print_function
from six.moves import queue as Queue
from six.moves import range
from functools import partial
import threading
import time
from tqdm import tqdm
DEFAULT_THREADS = 20
class ThreadedQueue(object):
"""Grant threaded task processing to any derived class."""
def __init__(self, ... |
7,067 | test trans rdm1 | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... |
7,068 | process source | import csv
import datetime
import logging
import os
import sys
from io import StringIO
from dateutil import parser
from data_research.models import (
County,
CountyMortgageData,
MortgageDataConstant,
)
from data_research.mortgage_utilities.fips_meta import validate_fips
from data_research.mortgage_utiliti... |
7,069 | test inflow double | #
# Copyright (C) 2022-2023 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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... |
7,070 | logout | import json
from typing import Any
from starwhale.core.instance.view import InstanceTermView
from . import CLI
from .base.invoke import invoke_output, invoke_with_react
class Instance:
instance_cmd = "instance"
def login(
self,
user: str = "starwhale",
password: str = "abcd1234",
... |
7,071 | test venv and pths | import os
from glob import glob
import sys
import shutil
from pathlib import Path
import pytest
from ..helpers import skip_if_windows, skip_if_not_windows, get_example_dir
from jedi.inference import sys_path
from jedi.api.environment import create_environment
def test_paths_from_assignment(Script):
def paths(sr... |
7,072 | get info | # This file is generated by numpy's setup.py
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
import os
import sys
extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
if sys.platform == 'win32' and os.path.isdir(extra_dll_dir):
os.add_dll_directo... |
7,073 | memoize | """
Return a list of recent PyTorch wheels published on download.pytorch.org.
Users can specify package name, python version, platform, and the number of days to return.
If one of the packages specified is missing on one day, the script will skip outputing the results on that day.
"""
import os
import re
import reques... |
7,074 | run | # -*- encoding: utf8 -*-
"""Tests for distutils.command.check."""
import textwrap
import unittest
from test.test_support import run_unittest
from distutils.command.check import check, HAS_DOCUTILS
from distutils.tests import support
from distutils.errors import DistutilsSetupError
try:
import pygments
except Impo... |
7,075 | set thirdparty installed dir | # Copyright (c) Yugabyte, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... |
7,076 | configure gcs | # 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,077 | check list of dict table | # -*- coding: utf-8 -*-
"""Machine type checkers for Table scitype.
Exports checkers for Table scitype:
check_dict: dict indexed by pairs of str
1st element = mtype - str
2nd element = scitype - str
elements are checker/validation functions for mtype
Function signature of all elements
check_dict[(mtype, scitype)... |
7,078 | write | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from logging import Logger, getLogger
from typing import Any, Iterable, Mapping
from airbyte_cdk.destinations import Destination
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, DestinationSyncMode, Status, ... |
7,079 | metadata | #-----------------------------------------------------------------------------
# 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.
#-------------------------------------------------------------------... |
7,080 | get web pub sub hub | # 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... |
7,081 | get sorted tasks | # Copyright 2023 Avaiga Private Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
7,082 | system data | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
7,083 | set up | ############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... |
7,084 | configure | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
import os
required_conan_version = ">=1... |
7,085 | tuned bmm | import torch
from ..lowering import register_lowering
from ..select_algorithm import (
autotune_select_algorithm,
ExternKernelChoice,
TritonTemplate,
)
from ..utils import ceildiv as cdiv, use_aten_gemm_kernels, use_triton_template
from .mm_common import addmm_epilogue, mm_args, mm_configs, mm_options
at... |
7,086 | remove resource | """ Wrapper around a Redis-backed registry for storing resources in a hash (https://redis.io/topics/data-types).
Redis stores key/values.
key hashes are generated from a dictionary (e.g. {"user_id":"a_user_id, "some_other_id":123} will
create a hash named "user_id=a_user_id:some_other_id=123:resources")
... |
7,087 | run around tests | import pytest
import asyncio
import tempfile
import shutil
import weakref
from aiohttp import web
from unittest.mock import MagicMock, patch
from pathlib import Path
from gns3server.web.route import Route
from gns3server.controller import Controller
from gns3server.config import Config
from gns3server.compute import ... |
7,088 | prop descriptions | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
Sets the marker color of unselected points, applied only when a
selection exists.
... |
7,089 | configured session | # 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://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... |
7,090 | example files | import os
import shutil
import sys
import unittest.mock
from pathlib import Path
from queue import Queue
from typing import Any, Callable, Generator, Optional, Union
os.environ["WANDB_ERROR_REPORTING"] = "false"
import git # noqa: E402
import pytest # noqa: E402
import wandb # noqa: E402
import wandb.old.settings ... |
7,091 | list available models | # Copyright (c) 2020, 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,092 | show | """ Plots points on an all-sky sinusoidal projection plot. """
import numpy as np
import matplotlib.pyplot as plt
class AllSkyPlot(object):
def __init__(self, ax_handle=None):
self.ra0 = 180.0
if ax_handle is None:
self.fig = plt.figure()
self.ax = self.fig.add_subplot(1, 1, 1, facecolor='black')... |
7,093 | g | import sys
import unittest
import io
import atexit
from test import support
### helpers
def h1():
print("h1")
def h2():
print("h2")
def h3():
print("h3")
def h4(*args, **kwargs):
print("h4", args, kwargs)
def raise1():
raise TypeError
def raise2():
raise SystemError
class GeneralTest(uni... |
7,094 | test report slave id request | """Test other messages."""
from unittest import mock
import pymodbus.other_message as pymodbus_message
class TestOtherMessage:
"""Unittest for the pymodbus.other_message module."""
requests = [
pymodbus_message.ReadExceptionStatusRequest,
pymodbus_message.GetCommEventCounterRequest,
... |
7,095 | test get dynamic linker undefined | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2016-2023 Canonical Ltd.
#
# This program 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 program is distributed in the... |
7,096 | config dash ipv4 | import click
def get_attr_full_name(ctx, threshold):
attr = 'dash_'
if ctx.obj["crm"].addr_family:
attr += ctx.obj["crm"].addr_family + '_'
if ctx.obj["crm"].direction:
attr += ctx.obj["crm"].direction + '_'
attr += ctx.obj["crm"].res_type + '_' + threshold
return attr
@click.co... |
7,097 | test validation date1 | #
# @file TestValidation.py
# @brief Validation of Date ModelCreator and ModelHistory unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Sarah Keating
#
# ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ======
#
# DO NOT EDIT THIS FILE.
#
# This file was generated automat... |
7,098 | test bad type cache | # -----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
# ----------------------------------------------------------------------... |
7,099 | sympy euler | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.