id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
13,700 | set current lut | # /*##########################################################################
#
# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Sof... |
13,701 | test arn resolver sns | from unittest import TestCase
from unittest.mock import patch
from samcli.lib.intrinsic_resolver.invalid_intrinsic_exception import InvalidSymbolException
from samcli.lib.intrinsic_resolver.intrinsic_property_resolver import IntrinsicResolver
from samcli.lib.intrinsic_resolver.intrinsics_symbol_table import Intrinsic... |
13,702 | gather sample | # Copyright 2022 Scalyr 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, so... |
13,703 | downsample factory | # 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... |
13,704 | register model | """
Unit test for the TorchRec DLRM example
"""
import json
import shutil
import sys
from argparse import Namespace
from pathlib import Path
import pytest
import requests
import test_utils
import torch
from ts.torch_handler.unit_tests.test_utils.mock_context import MockContext
CURR_FILE_PATH = Path(__file__).parent
... |
13,705 | train on batch | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# 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 applicab... |
13,706 | post process | # Copyright © 2020 Province of British Columbia
#
# 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 agr... |
13,707 | process batch | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from typing import Any, Iterable, List, Mapping
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.destinations import Destination
from airbyte_cdk.models import (
AirbyteConnectionStatus,
AirbyteMessage,
AirbyteRecordMessage,
Configure... |
13,708 | test parenting | import pytest
import toga
from toga.colors import BLACK, BLUE, GREEN, RED
from toga.style import Pack
from toga.style.pack import HIDDEN, VISIBLE
from .probe import get_probe
@pytest.fixture
async def widget():
return toga.Box(style=Pack(width=100, height=200, background_color=RED))
async def test_visibility(... |
13,709 | test create app from env fails if | from unittest import mock
import pytest
from fastapi.testclient import TestClient
from mlflow.exceptions import MlflowException
from mlflow.gateway.app import create_app_from_config, create_app_from_env
from mlflow.gateway.config import GatewayConfig
from mlflow.gateway.constants import MLFLOW_GATEWAY_CRUD_ROUTE_BASE... |
13,710 | test differentiable hamiltonian | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... |
13,711 | test set invalid log location | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import re
import unittest.mock
import pytest
from pants.base.exception_sink import ExceptionSink
from pants.engine.platform import Platform
from pants.util.contextutil import t... |
13,712 | open | """Generic interface to all dbm clones.
Use
import dbm
d = dbm.open(file, 'w', 0o666)
The returned object is a dbm.gnu, dbm.ndbm or dbm.dumb object, dependent on the
type of database being opened (determined by the whichdb function) in the case
of an existing dbm. If the dbm does not exist and the cr... |
13,713 | run id | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
import contextlib
import logging
from pathlib import Path
from typing import AsyncIterator, Iterable
from uuid import uuid4
import aiodocker
import pytest
import simcore_service_agent
from aiodocker.volumes import DockerVolume
from models_librar... |
13,714 | test zcash hasher | from common import *
from trezor.messages import TxInput, SignTx, PrevOutput
from trezor.enums import InputScriptType
from trezor.utils import HashWriter
from apps.zcash.hasher import ZcashHasher, blake2b, write_hash
from apps.common.coininfo import by_name
ZCASH_COININFO = by_name("Zcash")
# NOTE: moved into tests... |
13,715 | emdb 14621 | import shutil
import pooch
from aspire import config
from aspire.downloader import file_to_method_map, registry, registry_urls
from aspire.volume import Volume
# Initialize pooch data fetcher instance.
_data_fetcher = pooch.create(
# Set the cache path defined in the config. By default, the cache
# folder op... |
13,716 | do not truncate numpy output | import pytest
import functools
import os
import tempfile
import numpy as np
def _add_repeats_if_marked(metafunc):
"""
If the metafunc is marked with the 'repeat' mark, then add the requisite
number of repeats via parametrisation.
"""
marker = metafunc.definition.get_closest_marker('repeat')
if... |
13,717 | query reference | import json
import numpy as np
import numpy.testing as npt
import pytest
from mudata import MuData
from scirpy.pp import ir_dist
from scirpy.tl._ir_query import (
_reduce_json,
_reduce_most_frequent,
_reduce_unique_only,
ir_query,
ir_query_annotate,
ir_query_annotate_df,
)
@pytest.mark.param... |
13,718 | test errors given default for draw | # 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... |
13,719 | create netlist | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2023 Regents of the University of California, Santa Cruz
# All rights reserved.
#
from openram.sram_factory import factory
from openram import OPTS
from .bitcell_base_array import bitcell_base_array
class row_cap_array(bitcell_base_array):
"""
Ge... |
13,720 | list children | # -*- coding: utf-8 -*-
"""Simple alembic loader for 3dsmax.
Because of limited api, alembics can be only loaded, but not easily updated.
"""
import os
from openpype.pipeline import load, get_representation_path
from openpype.hosts.max.api import lib, maintained_selection
from openpype.hosts.max.api.lib import unique... |
13,721 | set up | # Bob build tool
# Copyright (C) 2020
#
# SPDX-License-Identifier: GPL-3.0-or-later
from unittest import TestCase
from unittest.mock import MagicMock
from bob.stringparser import DEFAULT_STRING_FUNS, Env, IfExpression
from bob.errors import BobError
class TestIfExpressionParser(TestCase):
def METHOD_NAME(self):... |
13,722 | read | #
# Copyright (c) 2010--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... |
13,723 | create unique if absent |
# 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.
"""
Utility functions for use in Alembic migration scripts.
"""
from ... |
13,724 | dna plugin | # --- BEGIN COPYRIGHT BLOCK ---
# Copyright (C) 2021 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
#
"""Test DNA plugin functionality"""
import logging
import pytest
from lib389._constants import DEFAULT_SUFFIX
from lib3... |
13,725 | id | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
13,726 | resolve cmake trace targets | # SPDX-License-Identifer: Apache-2.0
# Copyright 2021 The Meson development team
from __future__ import annotations
from .common import cmake_is_debug
from .. import mlog
from pathlib import Path
import re
import typing as T
if T.TYPE_CHECKING:
from .traceparser import CMakeTraceParser
from ..environment imp... |
13,727 | serialize | # (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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 ve... |
13,728 | check escalation permissions | from flask import abort
from flask_jwt_extended import jwt_required
from flask_restful import current_app
from sqlalchemy.exc import StatementError
from zou.app.models.person import Person
from zou.app.services import deletion_service, index_service, persons_service
from zou.app.utils import permissions
from zou.app.... |
13,729 | save artifacts | import logging
import numpy as np
import os
import pandas as pd
import shutil
import sys
import tempfile
import warnings
warnings.simplefilter("ignore")
if sys.platform == 'darwin':
os.environ['OMP_NUM_THREADS'] = '1'
from autogluon.core.utils.savers import save_pd, save_pkl
from autogluon.timeseries import TimeS... |
13,730 | on meta | """
The Remote driver uses the following packet stricture.
1 byte for packet type. "D" for data, "M" for meta.
4 byte little endian integer for the size of the payload.
Arbitrary payload.
"""
from __future__ import annotations
import asyncio
import json
import os
import platform
import signal
import sys
from code... |
13,731 | p2id | # 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... |
13,732 | set version | #!/usr/bin/python3
import argparse
import glob
import os
import re
from subprocess import check_output, run
PACKAGE_PRERELEASE_RE = re.compile(r"(?<=[\.\d])(?P<prerelease>a|alpha|b|beta|c|rc|pre|preview)(?P<num>\d*)$")
SPEC_VERSION_RE = re.compile(r"^(?P<version_tag>Version:[ \t]*).*", re.M)
class Git:
def __... |
13,733 | test iter stdout with result | from subprocess import CalledProcessError
import tempfile
from typing import Any, Iterator, NamedTuple
import pytest
from dlt.common.exceptions import UnsupportedProcessStartMethodException
from dlt.common.runners import TRunMetrics, Venv
from dlt.common.runners.stdout import iter_stdout, iter_stdout_with_result
from ... |
13,734 | run | import os
import re
import logging
import time
import aexpect
from avocado.utils import process
from virttest import error_context
from virttest import utils_misc
from virttest import data_dir
LOG_JOB = logging.getLogger('avocado.test')
class QemuIOConfig(object):
"""
Performs setup for the test qemu_io.... |
13,735 | black scholes | import numpy as np
import math
from numba import cuda, double, void
from numba.cuda.testing import unittest, CUDATestCase
RISKFREE = 0.02
VOLATILITY = 0.30
A1 = 0.31938153
A2 = -0.356563782
A3 = 1.781477937
A4 = -1.821255978
A5 = 1.330274429
RSQRT2PI = 0.39894228040143267793994605993438
def cnd(d):
K = 1.0 / (... |
13,736 | set up | #!/usr/bin/env python3
# Copyright (c) 2021 CINN Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
13,737 | sort | from collections.abc import Callable
from collections.abc import Hashable
from collections.abc import Iterable
from typing import Any
from typing import NoReturn
from typing import overload
from typing import SupportsIndex
from typing import TypeVar
from _typeshed import SupportsKeysAndGetItem
from .headers import He... |
13,738 | set up | import unittest
from unittest import mock
from django.test import override_settings
from django.conf import settings
from django.core import management
from django.contrib.auth.models import User, Permission
from main.test_case import APITestCase
from lang.translation import IfrcTranslator
from .serializers import L... |
13,739 | parse detail | import re
from datetime import datetime
import dateutil.parser
from city_scrapers_core.constants import COMMISSION
from city_scrapers_core.items import Meeting
from city_scrapers_core.spiders import CityScrapersSpider
from scrapy import Selector
class ChiPlanCommissionSpider(CityScrapersSpider):
name = "chi_plan... |
13,740 | main | # Copyright (C) 2014 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
"""
This is code that is added to noarch Python packages. See
conda_build/noarch_python.py.
"""
from __future__ import annotations
import os
import re
import shutil
import sys
from os.path import dirname, exists, isdir, join, normpath
from path... |
13,741 | oneshot exit | import enum
from _typeshed import Incomplete
from collections.abc import Iterable
from typing import Any, NamedTuple
from psutil._common import (
ENCODING as ENCODING,
ENCODING_ERRS as ENCODING_ERRS,
AccessDenied as AccessDenied,
NoSuchProcess as NoSuchProcess,
TimeoutExpired as TimeoutExpired,
... |
13,742 | get color schemes | import os
from logging import getLogger
from typing import List, Union, Type
import qtawesome
import requests
from PyQt5.QtCore import (
pyqtSignal,
QObject,
QRunnable,
QSettings,
QFile,
QDir,
Qt,
)
from PyQt5.QtGui import QPalette, QColor, QFontMetrics
from PyQt5.QtWidgets import qApp, QSt... |
13,743 | location | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . im... |
13,744 | retrieve public key payload | # 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, software
# distributed under the Li... |
13,745 | get time | # OneNoteExtractor
# Copyright (C) 2023 Volexity, Inc.
"""Quick extractor for OneNote files, allowing for programmatic extraction of subfiles."""
import json
import logging
import re
import struct
# builtins
from datetime import datetime, timedelta
from typing import Iterator
EMBEDDED_FILE_MAGIC = b"\xe7\x16\xe3\xb... |
13,746 | symmetric difference | #\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\#
from GangaCore.Core.exceptions import GangaException
from GangaCore.GPIDev.Lib.Dataset import Dataset
from GangaCore.GPIDev.Schema import Schema, Version, SimpleItem, GangaFileItem
from GangaCore.GPIDev.Base.Proxy import getName
import Gan... |
13,747 | resolve | """Base Class for DID Resolvers."""
from abc import ABC, abstractmethod
from enum import Enum
import re
from typing import NamedTuple, Optional, Pattern, Sequence, Text, Union
import warnings
from pydid import DID
from ..cache.base import BaseCache
from ..config.injection_context import InjectionContext
from ..core.... |
13,748 | test code builder can io | # 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 os
import typing as tp
import unittest
from collections import Counter
from tempfile import NamedTemporaryFile, TemporaryDirectory
fro... |
13,749 | test nonempty maildir cur | # This set of tests exercises the backward-compatibility class
# in mailbox.py (the ones without write support).
import mailbox
import os
import time
import unittest
from test import test_support
# cleanup earlier tests
try:
os.unlink(test_support.TESTFN)
except os.error:
pass
FROM_ = "From some.body@dummy.d... |
13,750 | valid | """
Management of zc.buildout
=========================
This module is inspired from minitage's buildout maker
(https://github.com/minitage/minitage/blob/master/src/minitage/core/makers/buildout.py)
.. versionadded:: 2016.3.0
.. note::
This state module is beta; the API is subject to change and no promise
a... |
13,751 | raw | import numpy as np
import itertools
from ._util import obj_str_insert
class _lset(set):
def __hash__(self):
return int.from_bytes(":|\\!#è".join(sorted(self)).encode(), "little")
def __eq__(self, other):
return hash(self) == hash(_lset(other))
def copy(self):
return self.__class_... |
13,752 | find bigquery udf | """Module to convert from Ibis expression to SQL string."""
from __future__ import annotations
import re
from functools import partial
import toolz
import ibis.common.graph as lin
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
import ibis.expr.types as ir
from ibis.backends.base.sql import comp... |
13,753 | activation event | from datetime import datetime
from unittest import mock
import pytest
from pyramid import httpexceptions
from h.models import Annotation
from h.services.annotation_stats import AnnotationStatsService
from h.services.user_delete import UserDeleteService
from h.views.admin.users import (
UserNotFoundError,
form... |
13,754 | set ext attr osx | #!/usr/bin/env python
"""A test utilities for interacting with filesystem."""
import io
import os
import platform
import subprocess
import unittest
from typing import Text
def CreateFile(filepath: Text, content: bytes = b"") -> None:
"""Creates a file at specified path.
Note that if a file at the specified pat... |
13,755 | piecewise | """
Helper functions for evaluation of mathml expressions.
In this namespace all the possible names occuring in formula strings have to be defined.
In build in python are
*, /, +, -
and, or, not
"""
from __future__ import absolute_import, print_function, division
try:
from builtins import range
except Im... |
13,756 | test action hc simple | # 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, software
# distributed under t... |
13,757 | leg mpath disable | import os
from subprocess import *
import core.exceptions as ex
from utilities.proc import which
from . import BaseDiskScsireserv
DRIVER_GROUP = "disk"
DRIVER_BASENAME = "scsireserv"
def mpath_to_path(disks):
l = []
for disk in disks:
if "/dev/dsk" in disk:
l.append(disk.replace("/dev/ds... |
13,758 | print fib routes installed | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import subprocess
import sys
from builtins import object
from openr.cli.commands import config, decision,... |
13,759 | get function iam policy output | # 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... |
13,760 | test get | # -*- coding: utf-8 -*-
"""
Akvo RSR is covered by the GNU Affero General Public License.
See more details in the license.txt file located at the root folder of the Akvo RSR module.
For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
"""
import json
from django.contrib.aut... |
13,761 | find series cachekey | from __future__ import absolute_import
from binascii import b2a_base64
import sys
from graphite.http_pool import http
from graphite.util import json
from graphite.tags.base import BaseTagDB
class HttpTagDB(BaseTagDB):
"""
Stores tag information using an external http service that implements the graphite ta... |
13,762 | test conv2d | # 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... |
13,763 | unique name |
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.DistributedObjectBase import DistributedObjectBase
from direct.showbase.MessengerGlobal import messenger
#from PyDatagram import PyDatagram
#from PyDatagramIterator import PyDatagramIterator
# Values for DistributedObjectOV.activ... |
13,764 | test noncasesense | # pyOCD debugger
# Copyright (c) 2015,2018-2019 Arm Limited
# Copyright (c) 2022 Chris Reed
# SPDX-License-Identifier: 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:... |
13,765 | draw o | #Library to clear screen on every step
import os
import sys
def instructions():
#Instructions to play TicTacToe
os.system('cls')
print("TIC-TAC-TOE \n ")
print("Instructions To Play ")
print("Player 1: X ")
print("Player 2: O ")
... |
13,766 | process item | from math import ceil
from typing import Dict, Iterator, List, Optional
import numpy as np
from maggma.builders import Builder
from maggma.core import Store
from maggma.utils import grouper
from pymatgen.core.structure import Structure
from emmet.core.absorption import AbsorptionDoc
from emmet.core.utils import jsani... |
13,767 | test home dir expansion | import pathlib
import shutil
import tempfile
import unittest
import pytest
from mopidy.internal import path
from mopidy.internal.gi import GLib
class GetOrCreateDirTest(unittest.TestCase):
def setUp(self):
self.parent = pathlib.Path(tempfile.mkdtemp()).resolve()
def tearDown(self):
if self.... |
13,768 | test pfc asymmetric | import time
import pytest
from swsscommon import swsscommon
def getBitMaskStr(bits):
mask = 0
for b in bits:
mask = mask | 1 << b
return str(mask)
def setPortPfc(dvs, port_name, pfc_queues):
cfg_db = swsscommon.DBConnector(swsscommon.CONFIG_DB, dvs.redis_sock, 0)
port_qos_tbl = swss... |
13,769 | settings | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# 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
... |
13,770 | default stream | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import torch
from .abstract_accelerator import DeepSpeedAccelerator
class NPU_Accelerator(DeepSpeedAccelerator):
def __init__(self):
self._name = 'npu'
self._communication_backend_name = 'hccl'
de... |
13,771 | test sources add remove | """
Integration tests for Ruby Gem module
"""
import pytest
from tornado.httpclient import HTTPClient
from tests.support.case import ModuleCase
def check_status():
"""
Check the status of the rubygems source
"""
try:
return HTTPClient().fetch("https://rubygems.org").code == 200
except Ex... |
13,772 | add dependencies | import sys
import os
import shutil
import venv
import types
import subprocess
from typing import Any, List, Type
from dlt.common.exceptions import CannotInstallDependency, VenvNotFound
class DLTEnvBuilder(venv.EnvBuilder):
context: types.SimpleNamespace
def __init__(self) -> None:
super().__init__(w... |
13,773 | enum processes | from _typeshed import Incomplete
import _win32typing
from win32.lib.pywintypes import error as error
def STARTUPINFO() -> _win32typing.PySTARTUPINFO: ...
def beginthreadex(sa: _win32typing.PySECURITY_ATTRIBUTES, stackSize, entryPoint, args, flags) -> tuple[int, Incomplete]: ...
def CreateRemoteThread(
hprocess: i... |
13,774 | dump single dep | # Copyright (C) 2017 - Daniele Forghieri
#
# 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 dis... |
13,775 | get sequences | # Copyright (c) 2020-2022, NVIDIA CORPORATION & 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
13,776 | get volume group id for ldap user | # 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__ ... |
13,777 | test maxsize | import pytest
from _pytest._io.saferepr import _pformat_dispatch
from _pytest._io.saferepr import DEFAULT_REPR_MAX_SIZE
from _pytest._io.saferepr import saferepr
from _pytest._io.saferepr import saferepr_unlimited
def test_simple_repr():
assert saferepr(1) == "1"
assert saferepr(None) == "None"
def METHOD_N... |
13,778 | test invalid latitude of projection origin | # 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.
"""
Test function :func:`iris.fileformats._nc_load_rules.helpers.\
has_supported_polar_stereographic_parameters`.
"""
from un... |
13,779 | test outer atomic nesting | """Tests for util.db module."""
from importlib.metadata import version
from io import StringIO
import ddt
import pytest
from django.core.management import call_command
from django.db.transaction import TransactionManagementError, atomic
from django.test import TestCase, TransactionTestCase
from django.test.utils impo... |
13,780 | handle request | """The SQS Query API allows using Queue URLs as endpoints for operations on that queue. See:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html. This is a
generic implementation that creates from Query API requests the respective AWS requests, and uses an aws_stack c... |
13,781 | test iterable | """Built-in template tests used with the ``is`` operator."""
import operator
import typing as t
from collections import abc
from numbers import Number
from .runtime import Undefined
from .utils import pass_environment
if t.TYPE_CHECKING:
from .environment import Environment
def test_odd(value: int) -> bool:
... |
13,782 | url | # --------------------------------------------------------------------------------------------
# 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
# --------------------------------... |
13,783 | init weights | # Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn
from mmcv.cnn import ConvModule
from mmengine.logging import MMLogger
from mmengine.model.weight_init import constant_init, kaiming_init, normal_init
from mmengine.runner import load_checkpoint
from mmengine.utils.dl_utils.parrots_wrapper import _Bat... |
13,784 | prevalidate sender balance | from __future__ import annotations
from typing import Dict, Any
from ..common_neon.config import Config
from ..common_neon.data import NeonTxExecCfg, NeonEmulatedResult
from ..common_neon.elf_params import ElfParams
from ..common_neon.emulator_interactor import call_tx_emulated, check_emulated_exit_status
from ..comm... |
13,785 | copy | #! /usr/bin/env python
"""
"PYSTONE" Benchmark Program
Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes)
Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013.
Translated from ADA to C by Rick Richardson.
Every method to preserve ADA-likeness h... |
13,786 | build | """
BAE (BAE: BERT-Based Adversarial Examples)
============================================
"""
from textattack.constraints.grammaticality import PartOfSpeech
from textattack.constraints.pre_transformation import (
RepeatModification,
StopwordModification,
)
from textattack.constraints.semantics.sentence_encod... |
13,787 | dark brem | """Example configurations for producing biased interactions in the target.
Example
-------
from LDMX.Biasing import target
"""
from LDMX.SimCore import generators
from LDMX.SimCore import simulator
from LDMX.SimCore import bias_operators
from LDMX.Biasing import filters
from LDMX.Biasing import util
... |
13,788 | test line break | #!/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... |
13,789 | set to slim | import os
import yaml
import collections
from ...core.base import ErsiliaBase
from ...default import CONDA_ENV_YML_FILE, DOCKERFILE_FILE
from ...hub.fetch import MODEL_INSTALL_COMMANDS_FILE, REQUIREMENTS_TXT
from .repo import DockerfileFile
from dockerfile_parse import DockerfileParser
class BundleEnvironmentFile(Ers... |
13,790 | workspace fixture | import os
import pytest
from dagster import DagsterInstance, job, op, reconstructable, repository
from dagster._core.execution.api import execute_job
from dagster._core.execution.plan.resume_retry import ReexecutionStrategy
from dagster._core.storage.dagster_run import DagsterRunStatus
from dagster._core.storage.tags ... |
13,791 | decode | # Copyright (C) 2002-2006 Python Software Foundation
# Author: Ben Gertzfield
# Contact: email-sig@python.org
"""Base64 content transfer encoding per RFCs 2045-2047.
This module handles the content transfer encoding method defined in RFC 2045
to encode arbitrary 8-bit data using the three 8-bit bytes in four 7-bit
ch... |
13,792 | pretty print | # SPDX-FileCopyrightText: Christian Amsüss and the aiocoap contributors
#
# SPDX-License-Identifier: MIT
"""A pretty-printer for known mime types"""
import json
import re
import pygments
import pygments.lexers
import pygments.formatters
from aiocoap.util import linkformat, contenttype
from aiocoap.util.linkformat_... |
13,793 | first or nothing | import json
from twisted.internet import defer
from twisted.trial import unittest
from buildbot.test.fake.web import FakeRequest
from buildbot.test.fake.web import fakeMasterForHooks
from buildbot.test.reactor import TestReactorMixin
from buildbot.util import bytes2unicode
from buildbot.www.change_hook import ChangeH... |
13,794 | get fn name | #!/usr/bin/env python3
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Determine dependencies of python scripts or available python modules in a search path.
#
# Given the -d argument and a filename/filenames, returns the modules imported by those files.
# Given the -d argument and a directory/directories, recurses to fi... |
13,795 | test update allcontainers config | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
13,796 | is local | # Bob build tool
# Copyright (C) 2020 Jan Klötzke
#
# SPDX-License-Identifier: GPL-3.0-or-later
from ..errors import BuildError
from ..stringparser import IfExpression
from ..tty import stepAction, INFO, TRACE
from ..utils import asHexStr, hashDirectory, emptyDirectory
from .scm import Scm, ScmAudit
import base64
imp... |
13,797 | run one coro | """Support for running coroutines in parallel with staggered start times."""
__all__ = 'staggered_race',
import contextlib
import typing
from . import events
from . import exceptions as exceptions_mod
from . import locks
from . import tasks
async def staggered_race(
coro_fns: typing.Iterable[typing.Callabl... |
13,798 | handle | # Copyright 2020 Uber Technologies, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
13,799 | exit threshold | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.