id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
300 | export sources | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.microsoft import is_msvc_static_runtime, is_msvc
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rm
from conan.tools.build import check_min_cppstd
from conan.tools.scm impor... |
301 | mma schedule | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
302 | test pgbouncer certgenerator with custom registry secret | import jmespath
import pytest
from tests.chart_tests.helm_template_generator import render_chart
from .. import supported_k8s_versions
expected_rbac = {
"apiGroups": [""],
"resources": ["secrets"],
"verbs": ["get", "watch", "list", "create", "patch", "delete"],
}
@pytest.mark.parametrize("kube_version"... |
303 | test parameter import lines | import os
import unittest
from checkov.cloudformation.context_parser import ContextParser
from checkov.cloudformation.runner import Runner
from checkov.runner_filter import RunnerFilter
from checkov.cloudformation.parser import parse
class TestCfnYaml(unittest.TestCase):
def test_skip_parsing(self):
cur... |
304 | test transformed identify | # This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... |
305 | test equivalence forecast | import numpy as np
from numpy.testing import assert_allclose
import pandas as pd
import pytest
import statsmodels.datasets
from statsmodels.tsa.ar_model import AutoReg
from statsmodels.tsa.arima.model import ARIMA
from statsmodels.tsa.base.prediction import PredictionResults
from statsmodels.tsa.deterministic import F... |
306 | prefetch | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import bisect
import numpy as np
from torch.utils.data.dataloader import default_collate
from . import FairseqDataset
class ConcatDataset(... |
307 | run | # -*- coding: utf-8 -*-
# Copyright (c) 2022, Jonathan Lung <lungj@heresjono.com>
# 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_function)
__metaclass_... |
308 | compute panel | from __future__ import annotations
import typing
from copy import copy
import numpy as np
import pandas as pd
from ..exceptions import PlotnineError
from ..utils import groupby_apply, pivot_apply
from .position_dodge import position_dodge
if typing.TYPE_CHECKING:
from plotnine.typing import IntArray
class pos... |
309 | with dsn | import pytest
import datetime as dt
from typing import Any, Dict
import psycopg
from psycopg.conninfo import conninfo_to_dict
from . import dbapi20
from . import dbapi20_tpc
@pytest.fixture(scope="class")
def METHOD_NAME(request, session_dsn):
request.cls.connect_args = (session_dsn,)
@pytest.mark.usefixtures... |
310 | test unary op | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test the propagation of info on Quantity during operations."""
import copy
import numpy as np
from astropy import units as u
def assert_info_equal(a, b, ignore=set()):
a_info = a.info
b_info = b.info
for attr in (a_info.attr_names | b_i... |
311 | init repo | #!/usr/bin/env python
"""Script to commit the doc build outputs into the github-pages repo.
Use:
gh-pages.py [tag]
If no tag is given, the current output of 'git describe' is used. If given,
that is how the resulting directory will be named.
In practice, you should use either actual clean tags from a current bui... |
312 | test debounced long lasting | import asyncio
import vaex.jupyter
import time
import pytest
import sys
if sys.version_info >= (3, 10):
import pytest
pytest.skip("Skipping tests on python 3.10 or higher", allow_module_level=True)
@pytest.mark.asyncio
async def test_await_promise(df_trimmed):
df = df_trimmed
execute_time = 0
@va... |
313 | set default minor | #!/usr/bin/env python3
import argparse
import functools
import re
import sys
from dataclasses import dataclass
from pathlib import Path
from typing import Callable, Match, Pattern
SUCCESS_CHAR = '\u2714'
FAIL_CHAR = '\u2716'
CVAT_VERSION_PATTERN = re.compile(r'VERSION\s*=\s*\((\d+),\s*(\d*),\s*(\d+),\s*[\',\"](\w+)... |
314 | on text filter change | import os
import sys
from qtpy import QtWidgets, QtCore
import qtawesome
from openpype import style
from openpype.client import get_projects
from openpype.pipeline import legacy_io
from openpype.tools.utils.delegates import VersionDelegate
from openpype.tools.utils.lib import (
qt_app_context,
preserve_expand... |
315 | test forward methods without rewrap | import os
import pathlib
import pytest
import trio
from trio._file_io import AsyncIOWrapper
from trio._path import AsyncAutoWrapperType as Type
@pytest.fixture
def path(tmpdir):
p = str(tmpdir.join("test"))
return trio.Path(p)
def method_pair(path, method_name):
path = pathlib.Path(path)
async_pat... |
316 | tear down class | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
317 | test invalid alias name | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from typing import ContextManager
import pytest
from pants.option.alias import CliAlias, CliAliasCycleError, CliAliasInvalidError
from pants.option.sc... |
318 | get line cap | from typing import Any, Optional
class Context:
def __init__(self, target: Any) -> None: ...
def get_target(self): ...
def save(self) -> None: ...
def restore(self) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ...
def push_group... |
319 | test fit decay | """
Tests for tedana.decay
"""
import os.path as op
import numpy as np
import pytest
from tedana import combine
from tedana import decay as me
from tedana import io, utils
from tedana.tests.utils import get_test_data_path
@pytest.fixture(scope="module")
def testdata1():
tes = np.array([14.5, 38.5, 62.5])
i... |
320 | clear | #!/usr/bin/python
'''* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus - code_convert.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2010 Rhett Osborne ... |
321 | exit query | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
322 | edge l2 error | import numpy as np
from .GaussLobattoQuadrature import GaussLobattoQuadrature
from .GaussLegendreQuadrature import GaussLegendreQuadrature
class PolygonMeshIntegralAlg():
def __init__(self, mesh, q, cellmeasure=None, cellbarycenter=None):
self.mesh = mesh
self.integrator = mesh.integrator(q)
... |
323 | test csp custom | import requests
from PySide6 import QtTest
from .gui_base_test import GuiBaseTest
class TestWebsite(GuiBaseTest):
# Shared test methods
def view_website(self, tab):
"""Test that we can download the share"""
url = f"http://127.0.0.1:{tab.app.port}/"
r = requests.get(url)
QtTe... |
324 | categorical | import torch
import torch.nn.functional as tnn
from keras_core.backend.config import floatx
from keras_core.backend.torch.core import convert_to_tensor
from keras_core.backend.torch.core import get_device
from keras_core.backend.torch.core import to_torch_dtype
from keras_core.random.seed_generator import SeedGenerato... |
325 | get code pull request id | from typing import Callable, Dict, Optional
from django.http import HttpRequest, HttpResponse
from zerver.decorator import webhook_view
from zerver.lib.exceptions import UnsupportedWebhookEventTypeError
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.... |
326 | build get request | # 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... |
327 | find | """Extensions to the 'distutils' for large or complex distributions"""
import os
import functools
import distutils.core
import distutils.filelist
import re
from distutils.errors import DistutilsOptionError
from distutils.util import convert_path
from fnmatch import fnmatchcase
from ._deprecation_warning import Setupt... |
328 | say error | """
Utility functions for building OpenVR Advanced Settings.
"""
import os
import sys
import argparse
import subprocess
import string
def get_version_string():
dir_path = os.path.dirname(os.path.realpath(__file__))
with open(dir_path + "/../compile_version_string.txt", "r") as file:
contents = file.rea... |
329 | add | from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Callable, Optional
import pytest
import ue.hierarchy
from ark.discovery import initialise_hierarchy
from ark.types import DCSC_CLS
from automate.ark import ArkSteamManager
from config import HIERARCHY_FILENAME, ConfigFile, get_global_... |
330 | private link service connection 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... |
331 | test init | import pathlib
import subprocess
import sys
import unittest
import os
import numpy
import pytest
from cupy.cuda import nccl
from cupy import testing
from cupyx.distributed import init_process_group
from cupyx.distributed._nccl_comm import _mpi_available
nccl_available = nccl.available
def _run_test(test_name, dt... |
332 | init generation dict |
# Copyright 2016-2022 The FEAGI 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 applic... |
333 | tf shape to list | # Copyright 2019 Xilinx 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, ... |
334 | test playlist load non extm3u | # This file is part of beets.
# Copyright 2022, J0J0 Todos.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
335 | print usage | #!/usr/bin/env python2
##############################################################
# distrib_stats.py #
##############################################################
# Python script for generating statistics based on the #
# contents of the distrib log files. ... |
336 | unbind client function | # Setup logging ---------------
from GangaCore.Utility.logging import getLogger
log = getLogger()
class MonitoringClient(object):
def __init__(self, monitoringService, serviceName='Main'):
self.__MC = {}
self.subscribe(serviceName, monitoringService)
def subscribe(self, serviceName, monitor... |
337 | connections | import enum
from _typeshed import Incomplete
from typing import Any, NamedTuple
from psutil._common import (
NIC_DUPLEX_FULL as NIC_DUPLEX_FULL,
NIC_DUPLEX_HALF as NIC_DUPLEX_HALF,
NIC_DUPLEX_UNKNOWN as NIC_DUPLEX_UNKNOWN,
AccessDenied as AccessDenied,
NoSuchProcess as NoSuchProcess,
ZombieProc... |
338 | feed | ###############################################################################
# Queue and SimpleQueue implementation for loky
#
# authors: Thomas Moreau, Olivier Grisel
#
# based on multiprocessing/queues.py (16/02/2017)
# * Add some custom reducers for the Queues/SimpleQueue to tweak the
# pickling process. (overl... |
339 | need rerun | from typing import (
Dict, Optional, Type, TYPE_CHECKING
)
from typing_extensions import Literal
import numpy as np
from libertem.io.dataset.base import DataSet
from libertem.udf.base import UDF, UDFResultDict
# Base classes for results moved to common for MIT licensing, refs #1031
from libertem.common.analysis ... |
340 | get value | import os
import sys
import argparse
import re
class style():
RED = '\033[31m'
GREEN = '\033[32m'
RESET = '\033[0m'
resultRegex = r"init time = (.*)s, run time = (.*)s"
def getTimesFromFile( filePath ):
"""
Return the init time and run time from a GEOSX standard output file.
Arguments:
... |
341 | has too small nets | #
# Copyright (C) 2012 Uninett AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope... |
342 | generate dataloader | #!/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... |
343 | on night death message | from __future__ import annotations
import random
import re
from typing import Optional, Union
from src import config
from src import users
from src.cats import Wolf
from src.containers import UserSet, UserDict
from src.decorators import command
from src.dispatcher import MessageDispatcher
from src.events import Event... |
344 | layout | from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir
import os
required_conan_version = ">=1.52.0"
class CgnsCon... |
345 | header parameters | # --------------------------------------------------------------------------------------------
# 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
# --------------------------------... |
346 | test block splitter with iter | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2010-2023 GEM Foundation
#
# OpenQuake 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 Licens... |
347 | wrap mitmproxy | #!/usr/bin/env python
#
# Helper tool to enable/disable OS X proxy and wrap mitmproxy
#
# Get usage information with:
#
# mitmproxywrapper.py -h
#
import argparse
import contextlib
import os
import re
import signal
import socketserver
import subprocess
import sys
class Wrapper:
def __init__(self, port, use_mitmwe... |
348 | test creates new stats model if not | # coding: utf-8
#
# Copyright 2021 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 requi... |
349 | create response | from boto.compat import http_client
from tests.compat import mock, unittest
class AWSMockServiceTestCase(unittest.TestCase):
"""Base class for mocking aws services."""
# This param is used by the unittest module to display a full
# diff when assert*Equal methods produce an error message.
maxDiff = Non... |
350 | submit ftp creation | #!/usr/local/CyberCP/bin/python
import os,sys
sys.path.append('/usr/local/CyberCP')
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup()
from plogical import mysqlUtilities as sql
import subprocess
from plogical import CyberCPLogFileWriter as logging
import os
import shlex
im... |
351 | test sanitized render extensions | # -*- encoding: utf-8 -*-
import unittest
import textwrap
from isso import config
from isso.utils import html
class TestHTML(unittest.TestCase):
def test_markdown(self):
convert = html.Markdown(extensions=())
examples = [
("*Ohai!*", "<p><em>Ohai!</em></p>"),
("<em>Hi</e... |
352 | test flag v | """
Name: r.what test
Purpose: Tests r.what and its flags/options.
Author: Sunveer Singh, Google Code-in 2018
Copyright: (C) 2018 by Sunveer Singh and the GRASS Development Team
Licence: This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that ... |
353 | release level | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limit... |
354 | clear all alru caches | # The MIT License
#
# Copyright (c) 2018 aio-libs team https://github.com/aio-libs/
# Copyright (c) 2017 Ocean S. A. https://ocean.io/
# Copyright (c) 2016-2017 WikiBusiness Corporation http://wikibusiness.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and assoc... |
355 | compute chunksize | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... |
356 | gram matrix | r"""
Weyl Lie Conformal Algebra
Given a commutative ring `R`, a free `R`-module `M` and a
non-degenerate, skew-symmetric, bilinear pairing
`\langle \cdot,\cdot\rangle: M \otimes_R M \rightarrow R`. The *Weyl*
Lie conformal algebra associated to this datum is the free
`R[T]`-module generated by `M` plus a central vecto... |
357 | make graph match | # Copyright 2015 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... |
358 | test confusion matrix multiclass subset labels | #
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
359 | test uniqueness data check warnings | import numpy as np
import pandas as pd
import pytest
from evalml.data_checks import (
DataCheckActionCode,
DataCheckActionOption,
DataCheckMessageCode,
DataCheckWarning,
UniquenessDataCheck,
)
uniqueness_data_check_name = UniquenessDataCheck.name
def test_uniqueness_data_check_init():
unique... |
360 | cache stampede | import functools
import math
import random
import time
from datetime import datetime
from dateutil.parser import isoparse
from django.core.cache import cache as django_cache
from django_redis.client import DefaultClient
from django_redis.client.default import _main_exceptions
DEFERRED_FLAG = "__DEFERRED"
def METHO... |
361 | spawn | from collections.abc import Callable
from typing import Any
from typing_extensions import TypeAlias
_Macro: TypeAlias = tuple[str] | tuple[str, str | None]
def gen_lib_options(
compiler: CCompiler, library_dirs: list[str], runtime_library_dirs: list[str], libraries: list[str]
) -> list[str]: ...
def gen_preproces... |
362 | tear down | #
# Copyright (C) 2013-2022 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... |
363 | delete account | """Routes for settings view."""
from dataclasses import field
from typing import Any
from flask import render_template, session, flash, Response
from flask import request
from jinja2 import TemplateNotFound
from timApp.admin.user_cli import do_soft_delete
from timApp.answer.answer_models import AnswerUpload
from timA... |
364 | measure thread | import json
import cv2
import base64
import threading
import time
from datetime import datetime
from websocket_server import WebsocketServer
import os
# Graphical User Interface Class
class GUI:
# Initialization function
# The actual initialization
def __init__(self, host, car):
t = threading.Thre... |
365 | salesforce dataset | from typing import Any, Dict, Generator
import pydash
import pytest
import requests
from sqlalchemy.orm import Session
from starlette.status import HTTP_204_NO_CONTENT, HTTP_404_NOT_FOUND
from fides.api.cryptography import cryptographic_util
from fides.api.db import session
from fides.api.models.connectionconfig impo... |
366 | ensure movement not obstructed by module | """Labware movement command handling."""
from __future__ import annotations
from typing import Optional, TYPE_CHECKING
from opentrons_shared_data.gripper.constants import IDLE_STATE_GRIP_FORCE
from opentrons.hardware_control import HardwareControlAPI
from opentrons.hardware_control.types import OT3Mount, Axis
from op... |
367 | get whit monday | from _typeshed import Incomplete
from collections.abc import Generator
from typing import ClassVar
MON: Incomplete
TUE: Incomplete
WED: Incomplete
THU: Incomplete
FRI: Incomplete
SAT: Incomplete
SUN: Incomplete
ISO_MON: Incomplete
ISO_TUE: Incomplete
ISO_WED: Incomplete
ISO_THU: Incomplete
ISO_FRI: Incomplete
ISO_SAT:... |
368 | test multiport floodping | #!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... |
369 | test save blob s3 | # This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2023 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import pytest
import moto
from pathlib import Path
import dask
import dask.delayed
from datacube.utils.io import slurp
from datacube.utils.das... |
370 | cancel | #
# An Introduction to Tkinter
# tkSimpleDialog.py
#
# Copyright (c) 1997 by Fredrik Lundh
#
# fredrik@pythonware.com
# http://www.pythonware.com
#
# --------------------------------------------------------------------
# dialog base class
'''Dialog boxes
This module handles dialog boxes. It contains the following
pu... |
371 | test notifications api returns 403 error if | from django.urls import reverse
from ....notifications.models import Notification
def METHOD_NAME(db, client):
response = client.get(reverse("misago:apiv2:notifications"))
assert response.status_code == 403
def test_notifications_api_returns_empty_list_if_user_has_no_notifications(user_client):
respons... |
372 | test nested dictionaries with difference | # -*- coding: utf-8 -*-
# 2018.07.26 --- use DictComparison instead of GcpRequest
#
# Copyright (c) 2016, Tom Melendez <tom@supertom.com>
#
# 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__ impo... |
373 | delete | from typing import List, Optional
from pydantic.error_wrappers import ErrorWrapper, ValidationError
from sqlalchemy.sql.expression import true
from dispatch.exceptions import NotFoundError
from dispatch.project import service as project_service
from .models import (
CasePriority,
CasePriorityCreate,
Case... |
374 | cli | import re
from genie.libs.parser.utils.common import Common
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import (And, Any, Default, Optional,
Or, Schema, Use)
# ======================================================
# Parser for '... |
375 | filter supported wikis | #!/usr/bin/env python
# coding=utf-8
import copy
import os
import json
import codecs
import requests
from jinja2 import Environment, FileSystemLoader
CHINESE_WIKI_LANG = "zh"
SIMPLIFIED_CHINESE_LANG = "zh-hans"
TRADITIONAL_CHINESE_LANG = "zh-hant"
# T114042
NORWEGIAN_BOKMAL_WIKI_LANG = "no"
NORWEGIAN_BOKMAL_LANG = ... |
376 | wait for | #
# Copyright © 2022 Josep Maria Viñolas Auquer
#
# This file is part of IsardVDI.
#
# IsardVDI 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
# ... |
377 | create chunked tasks signatures | """Loads and instantiates Celery, registers our tasks, and performs any other
necessary Celery-related setup. Also provides Celery-related utility methods,
in particular exposing a shortcut to the @task decorator.
Please note that this module should not import model-related code because
Django may not be properly set-... |
378 | test file not found in home | import netrc, os, unittest, sys, tempfile, textwrap
from test import support
from test.support import os_helper
class NetrcTestCase(unittest.TestCase):
def make_nrc(self, test_data):
test_data = textwrap.dedent(test_data)
mode = 'w'
if sys.platform != 'cygwin':
mode += 't'
... |
379 | lock | """
Control concurrency of steps within state execution using zookeeper
===================================================================
:depends: kazoo
:configuration: See :py:mod:`salt.modules.zookeeper` for setup instructions.
This module allows you to "wrap" a state's execution with concurrency control.
This ... |
380 | test using half static synapse singles | # Copyright (c) 2017 The University of Manchester
#
# 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 ... |
381 | stop | """
daemontools service module. This module will create daemontools type
service watcher.
This module is compatible with the :mod:`service <salt.states.service>` states,
so it can be used to maintain services using the ``provider`` argument:
.. code-block:: yaml
myservice:
service.running:
- provid... |
382 | define simple | import logging
from collections import defaultdict
from typing import Callable, Mapping, Sequence
from dagster import DagsterEvent, job, op
from dagster._core.definitions.graph_definition import GraphDefinition
from dagster._core.definitions.job_definition import JobDefinition
from dagster._core.definitions.node_defin... |
383 | seconds from string | #!/usr/bin/env python
from __future__ import print_function
import sys
import time
import calendar
""" Converts between a 64bit timestamp and a human readable string
usage: ./convertTime.py [-l] time1 [time2 ...]
- "-l" to use local time
- "time" is either a 64bit timestamp or a string formatted "DD/MM/YYYY H... |
384 | test bounds of child objects | ##########################################################################
#
# Copyright (c) 2017, Image Engine Design 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:
#
# * Redistrib... |
385 | test filter single label dataset | # Copyright 2019, The TensorFlow Federated 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 o... |
386 | read text pair | # 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... |
387 | log file | import abc
import time
import shutil
import psutil
import datetime
import threading
import subprocess
from ..hands import *
class BaseService(object):
def __init__(self, **kwargs):
self.name = kwargs['name']
self._process = None
self.STOP_TIMEOUT = 10
self.max_retry = 0
se... |
388 | assert xranges equivalent | # Python test set -- built-in functions
import test.test_support, unittest
import sys
import pickle
import itertools
import warnings
warnings.filterwarnings("ignore", "integer argument expected",
DeprecationWarning, "unittest")
# pure Python implementations (3 args only), for comparison
def p... |
389 | get iterator for map style | # Copyright (c) 2023 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writ... |
390 | test invalid sharing | from common import *
from trezor.crypto import slip39, random
from slip39_vectors import vectors
def combinations(iterable, r):
# Taken from https://docs.python.org/3.7/library/itertools.html#itertools.combinations
pool = tuple(iterable)
n = len(pool)
if r > n:
return
indices = list(range(... |
391 | python2relay | # type: ignore
import tvm
from tvm import relay
from calyx.py_ast import CompVar, Stdlib, CompInst, Cell, Invoke, CompPort
from calyx.utils import bits_needed
from typing import List
from dataclasses import dataclass
# Mapping from the tensor dimensions to the
# corresponding Calyx primitive.
NumDimsToCell = {
0: ... |
392 | do kill | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
393 | test enrich repo labels | # -*- 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 ... |
394 | test attach detach rar activation reject | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
395 | get firewall rule output | # 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__ ... |
396 | dblinks | # Copyright 2001 by Tarjei Mikkelsen. All rights reserved.
# Copyright 2007 by Michiel de Hoon. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been... |
397 | instance queue pattern | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import copy
import logging
import os
import re
import pytest
from six.moves import range
from datadog_checks.dev import docker_run
from datadog_checks.dev.conditions import CheckDockerLogs, WaitFor
from ... |
398 | is nve | #!/usr/bin/env python3
#
# Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# 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... |
399 | test no context lines | # Copyright 2010-2023 The pygit2 contributors
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2,
# as published by the Free Software Foundation.
#
# In addition to the permissions in the GNU General Public License,
# the authors give ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.