id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
19,700 | set up | import time
import uuid
from itertools import zip_longest
from unittest import TestCase
from unittest.mock import patch, mock_open, call, Mock, ANY
from botocore.exceptions import ClientError
from parameterized import parameterized
from samcli.lib.observability.xray_traces.xray_event_puller import XRayTracePuller
fro... |
19,701 | color | from __future__ import annotations
import pathlib
import tracemalloc
from dataclasses import dataclass, field
from functools import lru_cache
from subprocess import check_call
from sys import stdout
from typing import Dict, List, Optional, Set
import click
from colorama import Back, Fore, Style, init
@dataclass
cla... |
19,702 | do exit | #!/usr/bin/env python
from panda3d.core import load_prc_file_data
load_prc_file_data('', 'bullet-filter-algorithm callback')
import sys
from direct.showbase.ShowBase import ShowBase
from direct.showbase.InputStateGlobal import inputState
from panda3d.core import AmbientLight
from panda3d.core import DirectionalLight... |
19,703 | get graph | import docker
import pytest
from neo4j import GraphDatabase
from kgx.graph.nx_graph import NxGraph
CONTAINER_NAME = "kgx-neo4j-integration-test"
DEFAULT_NEO4J_URL = "neo4j://localhost:7687"
DEFAULT_NEO4J_USERNAME = "neo4j"
DEFAULT_NEO4J_PASSWORD = "test"
def check_container():
try:
client = docker.from_... |
19,704 | source | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, mkdir, replace_in_file
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain
from conan.tools.layout import basic_layout
fr... |
19,705 | test distribution | # Copyright 2019 DeepMind Technologies 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 agr... |
19,706 | test convnet with maxpool1d large baselines | #!/usr/bin/env python3
from typing import Union
import torch
from captum._utils.typing import TargetType
from captum.attr._core.deep_lift import DeepLift, DeepLiftShap
from captum.attr._core.integrated_gradients import IntegratedGradients
from tests.helpers.basic import assertAttributionComparision, BaseTest
from tes... |
19,707 | test notconfigured | import itertools
import unittest
from typing import Any, Dict
from unittest.mock import patch
from scrapy import Spider
from scrapy.crawler import Crawler, CrawlerRunner
from scrapy.exceptions import NotConfigured
from scrapy.settings import BaseSettings, Settings
from scrapy.utils.test import get_crawler
class Simp... |
19,708 | test call func | # IMPORTATION STANDARD
import os
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.alternative.oss import oss_controller
from openbb_terminal.core.session.current_user import PreferencesModel, copy_user
# pylint: disable=E1101
# pylint: disable=W0603
# pylint: disable=E1111
@pytes... |
19,709 | test bot responds to empty message | from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler, get_bot_message_handler
class TestGithubDetailBot(BotTestCase, DefaultTests):
bot_name = "github_detail"
mock_config = {"owner": "zulip", "repo": "zulip"}
empty_config = {"owner": "", "repo": ""}
# Overrides default test_bot_u... |
19,710 | get timeout | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. 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 ... |
19,711 | get zingg training data marked dir | # Databricks notebook source
import pandas as pd
from pathlib import Path
import time
import os
import traceback
def getZinggBaseTrainingDataDir() :
return zinggDir + "/" + modelId + "/trainingData/";
def getZinggTrainingDataUnmarkedDir() :
return getZinggBaseTrainingDataDir() + "/unmarked/";
def METHOD_NAME() :
... |
19,712 | benchmark with timer | import inspect
import itertools
import sys
import time
import click
import torch
torch.set_num_threads(1)
torch._C._debug_set_fusion_group_inlining(False)
def rand(*shape):
return torch.rand(*shape).mul(16).add(1)
# ------------------------------------------------------------------------------
# Shape test ca... |
19,713 | update groups | # upgrade.py
# Upgrade CLI command.
#
# Copyright (C) 2014-2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is... |
19,714 | test feature count noops | import json
import pytest
from kart.repo import KartRepo
H = pytest.helpers.helpers()
@pytest.mark.parametrize(
"head_sha,head1_sha",
[
pytest.param(H.POINTS.HEAD_SHA, H.POINTS.HEAD1_SHA, id="commit_hash"),
pytest.param(H.POINTS.HEAD_TREE_SHA, H.POINTS.HEAD1_TREE_SHA, id="tree_hash"),
]... |
19,715 | create config | import re
import time
from http.client import HTTPException
from pathlib import Path
from typing import Any
import pytest
from _pytest.monkeypatch import MonkeyPatch
from prometheus_client import REGISTRY
from pytest_mock import MockerFixture
from litestar import get, post, websocket_listener
from litestar.contrib.pr... |
19,716 | postgres integration db | from typing import Dict, Generator, List
from uuid import uuid4
import pytest
from sqlalchemy.orm import Session
from sqlalchemy.orm.exc import ObjectDeletedError
from sqlalchemy_utils.functions import drop_database
from fides.api.db.session import get_db_engine, get_db_session
from fides.api.models.connectionconfig ... |
19,717 | is non empty string | # SPDX-License-Identifier: Apache-2.0
# Copyright 2022 The HuggingFace Authors.
import logging
from http import HTTPStatus
from typing import Any, Callable, Coroutine, List, Literal, Optional
from libcommon.exceptions import CustomError
from libcommon.utils import orjson_dumps
from starlette.requests import Request
f... |
19,718 | trait | # (C) Copyright 2020-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... |
19,719 | test mark notification as read | import pytest
from baserow.core.models import WorkspaceUser
from baserow.core.notifications.exceptions import NotificationDoesNotExist
from baserow.core.notifications.handler import NotificationHandler
from baserow.core.notifications.models import Notification, NotificationRecipient
@pytest.mark.django_db
def test_g... |
19,720 | event return | """
Send json response data to Splunk via the HTTP Event Collector
Requires the following config values to be specified in config or pillar:
.. code-block:: yaml
splunk_http_forwarder:
token: <splunk_http_forwarder_token>
indexer: <hostname/IP of Splunk indexer>
sourcetype: <Destination sourcet... |
19,721 | data processing | # Copyright (c) Recommenders contributors.
# Licensed under the MIT License.
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
from recommenders.utils.constants import (
DEFAULT_ITEM_COL,
DEFAULT_USER_COL,
DEFAULT_RATING_COL,
DEFAULT_TIMESTAMP_COL,
)
class RLRMCdataset(objec... |
19,722 | choice | import json
from pathlib import Path
import pytest
from nni.common.framework import get_default_framework, set_default_framework
from nni.nas.space import StationaryMutator, Mutator, MutationSampler, GraphModelSpace, ModelStatus, MutatorSequence
from nni.nas.space.mutator import _RandomSampler
from nni.nas.space.graph... |
19,723 | process recognition | #
# This file is part of Dragonfly.
# (c) Copyright 2007, 2008 by Christo Butcher
# Licensed under the LGPL.
#
# Dragonfly is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the L... |
19,724 | get openlineage facets on complete | from __future__ import annotations
from typing import Any
from airflow.decorators.base import get_unique_task_id
from airflow.models.xcom_arg import XComArg
from astro.airflow.datasets import kwargs_with_datasets
from astro.databases import create_database
from astro.sql.operators.base_operator import AstroSQLBaseOp... |
19,725 | parse include | #!/usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2023 Google LLC. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
#... |
19,726 | setup command | import shlex
from unittest import mock
from testifycompat import assert_equal
from testifycompat import assert_not_equal
from testifycompat import setup
from testifycompat import TestCase
from tests.testingutils import autospec_method
from tron import actioncommand
from tron.actioncommand import ActionCommand
from tro... |
19,727 | extract data | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... |
19,728 | init amps | #!/usr/bin/env python
# Copyright 2014-2020 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... |
19,729 | favourite count | import datetime
import pytz
from flask_jwt_extended import current_user
from sqlalchemy import event, func
from sqlalchemy.sql import func as sql_func
from sqlalchemy_utils import aggregated
from app.models import db
from app.models.base import SoftDeletionModel
from app.models.feedback import Feedback
from app.model... |
19,730 | count kmers | import os
import typing
from collections import Counter
from csv import DictWriter, DictReader
from pathlib import Path
from subprocess import run, PIPE
import numpy as np
import matplotlib
from scipy.stats import entropy
matplotlib.use('Agg')
from matplotlib import pyplot as plt # noqa
def merge_reads(fastq1_path... |
19,731 | patch eventlet | """Distributed Task Queue."""
# :copyright: (c) 2017-2026 Asif Saif Uddin, celery core and individual
# contributors, All rights reserved.
# :copyright: (c) 2015-2016 Ask Solem. All rights reserved.
# :copyright: (c) 2012-2014 GoPivotal, Inc., All rights reserved.
# :copyright: (c) 2009 - 2012 Ask Sole... |
19,732 | list | from django.shortcuts import render, redirect, get_object_or_404
from django.template.response import TemplateResponse
from django.contrib.auth.models import User
from django.utils import timezone
from django import forms
from django.core.exceptions import PermissionDenied
from django.forms import ModelForm
from django... |
19,733 | handler | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------... |
19,734 | main | #!/usr/bin/env python
"""
Do the initial installation and configuration of a DIRAC component
"""
from DIRAC import S_OK
from DIRAC import exit as DIRACexit
from DIRAC import gConfig, gLogger
from DIRAC.Core.Base.Script import Script
from DIRAC.Core.Utilities.Extensions import extensionsByPriority
from DIRAC.FrameworkSy... |
19,735 | test exists | import posixpath
import shutil
import pytest
import dvc_data
from dvc.fs import localfs
from dvc.fs.data import DataFileSystem
from dvc.utils.fs import remove
from dvc_data.hashfile.build import build
from dvc_data.hashfile.hash_info import HashInfo
@pytest.mark.parametrize(
"path, key",
[
("", ()),... |
19,736 | list metrics | # 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... |
19,737 | from json | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
... |
19,738 | get registry image 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... |
19,739 | associate | # Copyright (c) 2022 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... |
19,740 | build paddle program | # Copyright (c) 2023 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 required by applicable la... |
19,741 | draw | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
"""
Antigrain Geometr... |
19,742 | app alias | import io
import os
import shlex
import six
from collections import namedtuple
from ..logs import warn
from ..utils import memoize
from ..conf import settings
from ..system import Path
ShellConfiguration = namedtuple('ShellConfiguration', (
'content', 'path', 'reload', 'can_configure_automatically'))
class Gene... |
19,743 | meta | from __future__ import absolute_import
from plotly.utils import _list_repr_elided
class InputDeviceState:
def __init__(
self, ctrl=None, alt=None, shift=None, METHOD_NAME=None, button=None, buttons=None, **_
):
self._ctrl = ctrl
self._alt = alt
self._meta = METHOD_NAME
... |
19,744 | test set list compare | #!/usr/bin/env python
"""
_Fileset_t_
Testcase for Fileset
"""
from builtins import range
import logging
import random
import unittest
from WMCore.DataStructs.Fileset import Fileset
from WMCore.DataStructs.File import File
from WMCore.DataStructs.Run import Run
class FilesetTest (unittest.TestCase):
"""
_Fi... |
19,745 | get sensor values | # -*- coding: utf-8 -*-
'''
Created on 5 November 2020
@author: Anders Muskens
Copyright © 2020 Anders Muskens, Delmic
This file is part of Odemis.
Odemis 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 Foundati... |
19,746 | root dir | import ctypes
import logging
import multiprocessing
import os
import pathlib
import shutil
import stat
import time
from pathlib import Path
import pytest
import tornado.gen
import tornado.ioloop
from pytestshellutils.utils import ports
from saltfactories.utils import random_string
import salt.channel.client
import sa... |
19,747 | pre step initialize | #-------------------------------------------------------------------------------
# GSPHHydroBase
#-------------------------------------------------------------------------------
from PYB11Generator import *
from GenericRiemannHydro import *
from RestartMethods import *
@PYB11template("Dimension")
@PYB11module("Spheral... |
19,748 | score | r"""
.. _zupt_dependency:
ZUPT Dependency of the Trajectory Estimation
============================================
The estimation of the trajectory using the Kalman filter is heavily dependend on the ZUPT detection [1]_.
For this reason we provide various ZUPT detection methods in gaitmap.
Each of these methods has ... |
19,749 | emit iff |
from collections import defaultdict
import pysat.solvers
import pysat.formula
class BitVar:
def __repr__( self):
return 'BitVar[' + self.nm + ']'
def __init__( self, s, nm):
self.s = s
self.nm = nm
self.vars = [ s.add_var() ]
def var( self):
return self.vars[0]
def val( self):
retur... |
19,750 | restart rsyslog service | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... |
19,751 | build arguments schema | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------... |
19,752 | test copy tree skips nfs temp files | """Tests for distutils.dir_util."""
import unittest
import os
import stat
import shutil
import sys
from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree,
ensure_relative)
from distutils import log
from distutils.tests import support
from test.test_support import r... |
19,753 | a m | # 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... |
19,754 | test identity document bad endpoint | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from io import BytesIO
from devtools_testutils import recorded_by_proxy
from azure.core.exceptions import ServiceRequestEr... |
19,755 | test stats collector collect server stats | from datetime import datetime
from typing import List
from unittest.mock import Mock, call
import pytest
from libretime_shared.config import IcecastOutput, ShoutcastOutput
from lxml.etree import XMLSyntaxError
from requests.exceptions import HTTPError
from libretime_playout.history.stats import AnyOutput, Stats, Stat... |
19,756 | header received | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
19,757 | test memory mappable | from pathlib import Path
import io
import threading
import pytest
import fsspec.implementations.memory
import vaex.file
import vaex.file.asyncio
import pyarrow as pa
import time
def test_parse():
fs, path = vaex.file.parse('s3://vaex/testing/xys.hdf5?anonymous=true')
assert fs is not None
fs, path = vaex... |
19,758 | get test input | import traceback
from torch.multiprocessing import Process
import numpy as np
import os
import torch
def get_input(data, render):
real_image = data['image']
input_semantics, rotated_mesh, orig_landmarks, rotate_landmarks, rendered_images_erode, original_angles, \
Rd_a, rendered_images_rotate_artifac... |
19,759 | build target list | """
owtf.protocols.smtp
~~~~~~~~~~~~~~~~~~~
Description:
This is the OWTF SMTP handler, to simplify sending emails.
"""
from email.mime import base, multipart, text as mimetext
from email import encoders
import logging
import os
import smtplib
from owtf.utils.file import FileOperations, get_file_as_list
__all__ = ["... |
19,760 | normalize format | from urllib.parse import urlparse
from flask import current_app
from udata.forms import ModelForm, fields, validators
from udata.i18n import lazy_gettext as _
from udata.uris import validate as validate_url, ValidationError
from udata.core.storages import resources
from udata.core.spatial.forms import SpatialCoverag... |
19,761 | netloc | import os
import posixpath
import re
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._internal.utils.filetypes import WHEEL_EXTENSION
from pip._internal.utils.misc import (
redact_auth_from_url,
split_auth_from_netloc,
splitext,
)
from pip._internal.utils.models import KeyBasedComp... |
19,762 | prepare pip source args | from __future__ import annotations
import re
from collections.abc import Mapping
from pipenv.exceptions import PipenvUsageError
from pipenv.patched.pip._vendor.urllib3.util import parse_url
from pipenv.utils.constants import MYPY_RUNNING
from .internet import create_mirror_source, is_pypi_url
if MYPY_RUNNING:
f... |
19,763 | generate req spell cast list | from functools import lru_cache
from utils.constants.MiscCodes import QuestSpecialFlags, QuestMethod, QuestFlags
class QuestHelpers:
@staticmethod
def is_instant_complete_quest(quest_template):
return quest_template.Method == QuestMethod.QUEST_AUTOCOMPLETE
@staticmethod
@lru_cache
def is... |
19,764 | climain | import asyncio
import os
import sys
from contextlib import contextmanager
from socket import socket, AF_INET, SOCK_STREAM
from feeluown.consts import CACHE_DIR
from feeluown.library import fmt_artists_names
from feeluown.server import Request, Response
from feeluown.server.dslv2 import unparse
from feeluown.server.ser... |
19,765 | test field hierarchy | from datetime import datetime
from django.db import connection
import pytest
from baserow.contrib.database.fields.models import DateField, LinkRowField, TextField
@pytest.mark.django_db
def test_model_class_name(data_fixture):
field_1 = data_fixture.create_text_field(name="Some test table")
assert field_1.... |
19,766 | simulation reset physics | # Copyright 1996-2023 Cyberbotics Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
19,767 | data parameters | # 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... |
19,768 | vina hbond | """
Utilities to score protein-ligand poses using DeepChem.
"""
import numpy as np
def pairwise_distances(coords1: np.ndarray, coords2: np.ndarray) -> np.ndarray:
"""Returns matrix of pairwise Euclidean distances.
Parameters
----------
coords1: np.ndarray
A numpy array of shape `(N, 3)`
c... |
19,769 | get test content | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 Satpy developers
#
# This file is part of satpy.
#
# satpy 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... |
19,770 | get slug | import logging
from html import escape
from typing import Any, Dict, List, Optional, Union
from django.conf import settings
from django.utils.translation import gettext as _
from sentry.utils.canonical import get_canonical_name
from sentry.utils.decorators import classproperty
from sentry.utils.imports import import_... |
19,771 | test zhu liquefaction prob | import os
import unittest
import numpy as np
import pandas as pd
from openquake.sep.landslide.common import static_factor_of_safety
from openquake.sep.landslide.newmark import (
newmark_critical_accel,
newmark_displ_from_pga_M,
prob_failure_given_displacement,
)
from openquake.sep.liquefaction import (
... |
19,772 | test morlet2 gpu | # Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# 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 right... |
19,773 | add variable log | import pandas as pd
from Basilisk.utilities import unitTestSupport
class VariableRetentionParameters:
"""
Represents a variable's logging parameters.
"""
def __init__(self, varName, varRate, startIndex=0, stopIndex=0, varType='double'):
self.varName = varName
self.varRate = varRate
... |
19,774 | rule runner | # Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import json
from pathlib import Path
from textwrap import dedent
import pytest
from pants.backend.javascript import package_json
from pants.backend.jav... |
19,775 | build output comparison page | # (C) Copyright 2005-2023 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... |
19,776 | get otp | # -*- coding: utf-8 -*-
#
# LinOTP - the open source solution for two factor authentication
# Copyright (C) 2010-2019 KeyIdentity GmbH
# Copyright (C) 2019- netgo software GmbH
#
# This file is part of LinOTP server.
#
# This program is free software: you can redistribute it and/or
# modify it und... |
19,777 | update | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from abc import abstractmethod
from typing import Any, Dict
from azure.ai.ml._utils.utils import dump_yaml
class RestTranslatableMixin:
... |
19,778 | test drifter meta | import os
import unittest
from unittest.mock import MagicMock, Mock, patch
import numpy as np
from oceannavigator import create_app
from utils.misc import *
class TestMisc(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(TestMisc, self).__init__(*args, **kwargs)
self.app = create_a... |
19,779 | clear | # GridCal
# Copyright (C) 2022 Santiago Peñate Vera
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This pr... |
19,780 | validate | """Enterprise models"""
from base64 import b64decode
from binascii import Error
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
from functools import lru_cache
from time import mktime
from uuid import uuid4
from cryptography.exceptions import InvalidSignature
fro... |
19,781 | reencrypt | import enum # Python 3 style enums from enum34
import nacl.secret
import nacl.utils
from inbox.config import config
class EncryptionScheme(enum.Enum):
# No encryption
NULL = 0
# nacl.secret.SecretBox with a static key
SECRETBOX_WITH_STATIC_KEY = 1
def get_encryption_oracle(secret_name):
"""
... |
19,782 | create directory | # Copyright 2010 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
19,783 | service version | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
# pylint: disable=too-many-arguments
import urllib.parse
from typing import Any, Callable
import pytest
from pytest_mock.plugin import MockerFixture
from respx.router import MockRouter
from starlette import stat... |
19,784 | test custom state measurement | # Copyright 2018-2020 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... |
19,785 | replace plugin | #
# Copyright (c) 2023, 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 appl... |
19,786 | from published scene | import os
import attr
import getpass
import pyblish.api
from datetime import datetime
from openpype.lib import (
env_value_to_bool,
collect_frames,
)
from openpype.pipeline import legacy_io
from openpype_modules.deadline import abstract_submit_deadline
from openpype_modules.deadline.abstract_submit_deadline im... |
19,787 | hook solver update | # Copyright 2017,2018,2019,2020,2021 Sony Corporation.
# Copyright 2022 Sony Group 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-... |
19,788 | fset | """
Result Proxy
------------
The result proxy wraps the result instance given to each test. It
performs two functions: enabling extended error/failure reporting
and calling plugins.
As each result event is fired, plugins are called with the same event;
however, plugins are called with the nose.case.Test instance tha... |
19,789 | audit hybrid cloud writes and deletes | import os
from typing import MutableMapping
import pytest
import responses
from django.db import connections
from sentry.silo import SiloMode
pytest_plugins = ["sentry.testutils.pytest"]
# XXX: The below code is vendored code from https://github.com/utgwkk/pytest-github-actions-annotate-failures
# so that we can a... |
19,790 | on click | """
Adjust screen backlight brightness.
Configuration parameters:
brightness_delta: Change the brightness by this step.
(default 8)
brightness_initial: Set brightness to this value on start.
(default None)
brightness_minimal: Don't go below this brightness to avoid black screen
(def... |
19,791 | create from xml | import numpy
import matplotlib.pylab as plt
class UnconfinedSeepageHead(object):
ft2m = 0.3048 # feet to meters
m2ft = 3.28084 # meters to feet
d2s = 86400 # days to seconds
y2s = 31536000 # years to seconds
"""
Solves the system: MUST HAVE RICHARDS EQUATION HERE... |
19,792 | remove job | # -*- coding: utf-8 -*-
"""
Wazuh app - Report generation backend.
Copyright (C) 2015-2019 Wazuh, 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 2 of the License, or
(at your op... |
19,793 | close | from __future__ import absolute_import
from __future__ import division
import errno
import socket
from pwnlib.context import context
from pwnlib.log import getLogger
from pwnlib.timeout import Timeout
from pwnlib.tubes.sock import sock
log = getLogger(__name__)
class listen(sock):
r"""Creates an TCP or UDP-sock... |
19,794 | test agent heart beat 2 | from test.apiserver.test_agent_base import AgentTestCase
from time import time
from django.core.cache import cache
from dongtai_common.models.heartbeat import IastHeartbeat
from dongtai_engine.tasks import is_alive, update_agent_status
class ApiHeartBeatTestCase(AgentTestCase):
def test_agent_heart_beat(self):
... |
19,795 | serialize mol | from scm.plams.core.errors import ResultsError
from scm.plams.core.functions import log
from scm.plams.interfaces.adfsuite.scmjob import SCMJob, SCMResults
from scm.plams.tools.units import Units
__all__ = ['DFTBJob', 'DFTBResults']
class DFTBResults(SCMResults):
_kfext = '.rkf'
_rename_map = {'dftb.rkf':'$... |
19,796 | get sessions | import prov.model as pm
from .Core import Core, getUUID
from ..core import Constants
class Project(pm.ProvActivity, Core):
"""Class for NIDM-Experiment Project-Level Objects.
Default constructor uses empty graph with namespaces added from NIDM/Scripts/Constants.py.
Additional alternate constructors for u... |
19,797 | test time filter | from __future__ import annotations
import datetime
from typing import TYPE_CHECKING
import pytest
from beancount.core.account import has_component
from fava.beans import create
from fava.beans.account import get_entry_accounts
from fava.core.filters import AccountFilter
from fava.core.filters import AdvancedFilter
f... |
19,798 | map img data | # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SkyTemple is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General ... |
19,799 | test x2 handover | """
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.