id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
7,600
abs
# Copyright (c) 2022-2023, 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 ...
7,601
datetime tz to utc
""" datetime.datetime helper functions for converting to/from UTC and other datetime manipulations""" # source: https://github.com/RhetTbull/datetime-utils __version__ = "2022.04.30" import datetime # TODO: probably shouldn't use replace here, see this: # https://stackoverflow.com/questions/13994594/how-to-add-time...
7,602
request
from __future__ import absolute_import from .filepost import encode_multipart_formdata from .packages.six.moves.urllib.parse import urlencode __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen` method, such as :class:`~urllib3.con...
7,603
get data for q3 2015
import csv import io import json import os import unittest from datetime import datetime import requests from django.conf import settings """ Run smoke tests against live site. 35 separate tests to run. Spending BY: one practice, multiple practices, one CCG, multiple CCGs, all Spending ON: one presentation, multiple ...
7,604
test apigateway to eventbridge
import json import requests from localstack.testing.pytest import markers from localstack.utils.strings import short_uid from localstack.utils.sync import retry from tests.aws.services.apigateway.apigateway_fixtures import ( api_invoke_url, create_rest_api_deployment, create_rest_api_integration, crea...
7,605
parse
# coding=utf-8 """Provider code for TorrentDay.""" from __future__ import unicode_literals import json import logging import re from json.decoder import JSONDecodeError from medusa import tv from medusa.helper.common import convert_size from medusa.logger.adapters.style import BraceAdapter from medusa.providers.tor...
7,606
test idempotent string
from test import test_support import unittest import sys, cStringIO, subprocess import quopri ENCSAMPLE = """\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=...
7,607
arc
# (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...
7,608
test split ors
# -*- coding: utf-8 -*- from lmfdb.tests import LmfdbTest class NumberFieldTest(LmfdbTest): # All tests should pass def test_Q(self): self.check_args('/NumberField/Q', r'\chi_{1}') self.check_args('/NumberField/1.1.1.1', r'\chi_{1}') def test_hard_degree10(self): self.check_args('/...
7,609
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 . imp...
7,610
umount any
"""BaseRecovery.py Base classes for recovery. """ import subprocess, os, stat import tempfile import binascii import glob import logging from InstallUtils import TempdirContext, MountContext, SubprocessMixin, ProcMountsParser from InstallUtils import InitrdContext, BlkidParser from ConfUtils import ChrootGrubEnv cla...
7,611
handle buffer
import math from typing import Any, Optional import numpy as np from .ATS import AcquisitionController # DFT AcquisitionController class DemodulationAcquisitionController(AcquisitionController[float]): """ This class represents an example acquisition controller. End users will probably want to use somet...
7,612
getcwd
from collections.abc import Callable, Sequence from contextlib import AbstractContextManager from stat import S_IMODE as S_IMODE from types import TracebackType from typing import IO from typing_extensions import Literal, Self, TypeAlias import paramiko from paramiko import AuthenticationException as AuthenticationExc...
7,613
create dbs file
from __future__ import absolute_import from builtins import range, object from .Globals import GlobalParams from . import Globals class NoDatasetError(Exception): """Standard error baseclass""" def __init__(self, error): Exception.__init__(self, error) self.msg = 'NoDatasetError' self....
7,614
test cloud run resources
from pathlib import Path from unittest import mock import pytest from pytest_mock import MockerFixture from checkov.common.bridgecrew.bc_source import get_source_type from checkov.common.output.report import CheckType from checkov.runner_filter import RunnerFilter from checkov.terraform.runner import Runner from tes...
7,615
set report id
"""factories to help testing Quipucords.""" import random import factory from factory.django import DjangoModelFactory from faker import Faker from api import models from api.status import get_server_id from constants import DataSources def format_sources(obj): """Format fingerprint sources. obj has access...
7,616
get files
# 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...
7,617
test stack tensors 3d
# Copyright (c) 2023, 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 requ...
7,618
set hardware limits
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2023 PyMeasure Developers # # 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...
7,619
test markdown cell with code works
import re from time import sleep import nbformat import pytest from nbformat.v4.nbbase import ( new_code_cell, new_markdown_cell, new_notebook, new_raw_cell, ) import jupytext from jupytext.cli import jupytext as jupytext_cli from jupytext.compare import compare, compare_cells, compare_notebooks def...
7,620
test function call statement
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
7,621
test multi load
import unittest import pinocchio as pin import os def checkGeom(geom1,geom2): return geom1.ngeoms == geom2.ngeoms @unittest.skipUnless(pin.WITH_URDFDOM,"Needs URDFDOM") class TestGeometryObjectUrdfBindings(unittest.TestCase): def setUp(self): self.current_file = os.path.dirname(str(os.path.abspath(__fi...
7,622
node to edge
import numpy as np import torch from torch import Tensor from .mesh_ds import MeshDataStructure, Redirector class Mesh3dDataStructure(MeshDataStructure): """ @brief The topology data structure of 3-d mesh.\ This is an abstract class and can not be used directly. """ # Variables face2c...
7,623
list folder
# -*- coding: utf-8 -*- from functools import wraps import paramiko import socketserver import stat import time from girder import logger from girder.exceptions import AccessException, ValidationException, ResourcePathNotFound from girder.models.file import File from girder.models.folder import Folder from girder.mode...
7,624
test active rmd
import pytest from nbformat import NotebookNode import jupytext from jupytext.compare import compare, compare_cells HEADER = { ".py": """# --- # jupyter: # jupytext: # main_language: python # --- """, ".R": """# --- # jupyter: # jupytext: # main_language: python # --- """, ".md": """--- jupy...
7,625
close
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
7,626
callback for test
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
7,627
purview account create
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
7,628
execute search document request
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging from typing import Dict, List # noqa: F401 from http import HTTPStatus from flask import current_app as app from amundsen_application.api.utils.request_utils import request_search from amundsen_common.models.sea...
7,629
internal paging
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
7,630
address prefix
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
7,631
replace non pi names
import csv import loremipsum import random import re from encoded.loadxl import * class Anonymizer(object): """Change email addresses and names consistently """ # From Colander. Not exhaustive, will not match .museum etc. email_re = re.compile(r'(?i)[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}') random...
7,632
temp pyfile
# encoding: utf-8 """ IO related utilities. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import atexit import os import sys import tempfile from pathlib import Path from warnings import warn from IPython.utils.decorators import undoc from .capture import ...
7,633
assigned sic
''' See COPYRIGHT.md for copyright information. ''' import os from arelle import XmlUtil from arelle.ModelObject import ModelObject newRssWatchOptions = { "feedSource": "", "feedSourceUri": None, "matchTextExpr": "", "formulaFileUri": "", "logFileUri": "", "emailAddress": "", "validateXbrlR...
7,634
test s2n server buffered send
import pytest from configuration import available_ports, PROTOCOLS, ALL_TEST_CIPHERS, MINIMAL_TEST_CERTS from common import ProviderOptions, data_bytes from fixtures import managed_process # lgtm [py/unused-import] from providers import Provider, S2N, OpenSSL, GnuTLS from utils import invalid_test_parameters, get_par...
7,635
test update assistance linkages fain and uri
# Stdlib imports # Core Django imports from django.core.management import call_command # Third-party app imports import pytest from model_bakery import baker # Imports from your apps from usaspending_api.awards.models import Award, FinancialAccountsByAwards from usaspending_api.search.models import AwardSearch @py...
7,636
test chi2 mcnemar
import pytest import numpy as np import pandas as pd import pingouin as pg from unittest import TestCase from scipy.stats import chi2_contingency df_ind = pg.read_dataset("chi2_independence") df_mcnemar = pg.read_dataset("chi2_mcnemar") data_ct = pd.DataFrame( { "A": [0, 1, 0, 0], "B": [False, Tru...
7,637
logistic regressor
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
7,638
evaluate
# Copyright 2017 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 or a...
7,639
listen serial
import pathlib import sys import threading import time from logging import getLogger from textwrap import dedent from .connection import MicroPythonConnection OUTPUT_ENQ = b"\x05" OUTPUT_ACK = b"\x06" NORMAL_PROMPT = b">>> " FIRST_RAW_PROMPT = b"raw REPL; CTRL-B to exit\r\n>" logger = getLogger(__name__) class Se...
7,640
precision none score
import numpy as np import pandas from sklearn.metrics import make_scorer, recall_score, average_precision_score, roc_auc_score, precision_score, recall_score, f1_score from sklearn.metrics import confusion_matrix from sklearn.metrics import matthews_corrcoef as mcc from sklearn.metrics._scorer import _SCORERS def kap...
7,641
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...
7,642
test img srcset parsing
# Copyright (C) 2005-2014 Bastian Kleineidam # # 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 distr...
7,643
set up
#!/usr/bin/env python3 # Copyright (c) 2022 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...
7,644
deprecated
# Copyright (c) "Neo4j" # Neo4j Sweden AB [https://neo4j.com] # # This file is part of Neo4j. # # 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...
7,645
get acl
from django.urls import reverse from rest_framework import serializers from ...core.serializers import MutableFields from ...users.serializers import UserSerializer as BaseUserSerializer from ..models import Post __all__ = ["PostSerializer"] UserSerializer = BaseUserSerializer.subset_fields( "id", "username"...
7,646
get lineno
from __future__ import annotations import typing import rope.base.pyobjects from rope.base import exceptions, utils if typing.TYPE_CHECKING: from typing import Union from rope.base import pyobjectsdef class PyName: """References to `PyObject` inside python programs""" def get_object(self): ...
7,647
make extension
#! # coding:utf-8 ''' id Extension for Python-Markdown ========================================== This extension adds ids to block elements in Python-Markdown. Simple Usage: >>> import markdown >>> from markdown.extensions.toc import TocExtension >>> def _strip_CSS(str): ... return str.split("<...
7,648
test exceptions
''' Test all operations for cats mover work ''' import datetime import os from os.path import basename import numpy as np import pytest import tempfile import zipfile from gnome.movers import CatsMover from gnome.environment import Tide from gnome.utilities import time_utils from ..conftest import (sample_sc_rel...
7,649
school city
import urllib.parse from django.contrib import messages from django.urls import reverse from django.utils.translation import gettext_lazy as _ from oioioi.base import admin from oioioi.base.permissions import make_request_condition from oioioi.base.utils import make_html_link from oioioi.contests.menu import contest_a...
7,650
mint
from .contractlib import Contract from .secretlib import secretlib from base64 import b64encode import json class SNIP20(Contract): def __init__(self, label, name="token", symbol="TKN", decimals=3, seed="cGFzc3dvcmQ=", public_total_supply=False, enable_deposit=False, enable_redeem=False, enable_m...
7,651
mktemp
#! /usr/bin/env python """ This script adds a license file to a DMG. Requires Xcode and a plain ascii text license file or an RTF license file. Obviously only runs on a Mac. Copyright (C) 2011-2019 Jared Hobbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated...
7,652
get unsubscribe link
from __future__ import annotations import logging from typing import TYPE_CHECKING, Any, Iterable, Mapping, MutableMapping import sentry_sdk from django.utils.encoding import force_str from sentry import options from sentry.models import Project, ProjectOption, Team from sentry.notifications.notifications.base impor...
7,653
test abs complex fp special values
# Data Parallel Control (dpctl) # # Copyright 2020-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/LICE...
7,654
get services
# Copyright 2021 Collate # 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...
7,655
spec
""" unitary_field ============= Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Spe...
7,656
test timeout for failed connections is limitted
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. # # Licensed to Elasticsearch B.V. under...
7,657
convert ip port
#!/usr/bin/env python3 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Linux network utilities import sys import socket import fcntl import struct import array import os from bina...
7,658
install
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class NetlibLapack(CMakePackage): """LAPACK version 3.X is a comprehensive FORTRAN libra...
7,659
message
"""Class(es) implementing layers to be used in `graphnet` models.""" from typing import Any, Callable, Optional, Sequence, Union, List, Tuple import torch from torch.functional import Tensor from torch_geometric.nn import EdgeConv from torch_geometric.nn.pool import knn_graph from torch_geometric.typing import Adj, P...
7,660
values
import weakref from _typeshed import Incomplete, Self, SupportsItems, SupportsKeysAndGetItem from collections.abc import Callable, Generator, Hashable, Iterable, Iterator, Mapping from typing import Any, Generic, TypeVar, overload _KT = TypeVar("_KT") _VT = TypeVar("_VT") _T = TypeVar("_T") PREV: int NEXT: int KEY: i...
7,661
close
from time import time from typing import Optional, Type, TypeVar from urllib.parse import urldefrag from twisted.internet.base import DelayedCall from twisted.internet.defer import Deferred from twisted.internet.error import TimeoutError from twisted.web.client import URI from scrapy.core.downloader.contextfactory im...
7,662
write length block
""" Various utility functions for low-level binary processing. """ from __future__ import unicode_literals, print_function, division import logging import sys import struct import array try: unichr = unichr except NameError: unichr = chr logger = logging.getLogger(__name__) def pack(fmt, *args): fmt = s...
7,663
min cppstd
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy from conan.tools.layout import basic_layout from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" class MgsConan(ConanFile)...
7,664
test transform str
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
7,665
destroy
# Copyright 2018 Google 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, ...
7,666
test parse library reg ex match
#!/usr/bin/env python # pylint: disable=relative-import,protected-access,unused-argument # Copyright 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellect...
7,667
assert build fields
# -*- coding: utf-8 -*- from typing import Any, Dict import pytest import hypothesis.strategies as st from hypothesis import given, HealthCheck, settings from responses.matchers import query_param_matcher from tests.unit_tests.strategies import build_dict, mock_workspace from verta._internal_utils import time_utils...
7,668
load json
import os import json from bgpcfgd.template import TemplateFabric from bgpcfgd.config import ConfigMgr from .util import load_constants_dir_mappings TEMPLATE_PATH = os.path.abspath('../../dockers/docker-fpm-frr/frr') def load_tests(peer_type, template_name): constants = load_constants_dir_mappings() path ...
7,669
package to anchor
import os import pathlib import tempfile import functools import contextlib import types import importlib import inspect import warnings import itertools from typing import Union, Optional, cast from .abc import ResourceReader, Traversable from ._compat import wrap_spec Package = Union[types.ModuleType, str] Anchor ...
7,670
test volumes unique name max length can
# pylint: disable=redefined-outer-name # pylint: disable=unused-argument import os from pathlib import Path from typing import Any, Callable from uuid import UUID import aiodocker import pytest from faker import Faker from models_library.projects import ProjectID from models_library.services import RunID from models_...
7,671
for client
"""Defines the App class.""" from typing import Type from absl import flags from perfkitbenchmarker.scripts.messaging_service_scripts.common import client from perfkitbenchmarker.scripts.messaging_service_scripts.common import log_utils from perfkitbenchmarker.scripts.messaging_service_scripts.common import runners ...
7,672
test expiry with cache control
import base64 from datetime import datetime, timedelta import json import pytest import time from test_subscriptions import init_ws_conn from validate import authorize_for_webhook, check_query_f # The tests below would ideally use parameterization rather than subclassing, # but that doesn't work because of `hge_fixt...
7,673
get user groups
from __future__ import unicode_literals import re from functools import wraps from inspect import ismethod from urllib.parse import urlparse from flask import abort, request from flask_login import current_user from mongoengine import Q from werkzeug.exceptions import Forbidden from core.group import Group from core...
7,674
test insert segment
from operator import attrgetter import pytest from .tree import IndexedTree, Node @pytest.fixture(name='basic_tree') def fixture_basic_tree() -> Node[str]: t = Node[str]('root') t.add('a') t.add('b') t.nodes[0].add('a1') t.nodes[1].add('b1') t.nodes[1].add('b2') return t def test_const...
7,675
is expired
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com # This file is copied from legacy way of using thumbor result storage...
7,676
test scatter default
import logging import unittest import matplotlib.colors import matplotlib.pyplot as plt import mpltern.ternary import numpy as np import pandas as pd from numpy.random import multivariate_normal from pyrolite.geochem import REE from pyrolite.plot import density, pyroplot, spider from pyrolite.util.synthetic import no...
7,677
get choices
from django import forms from django.forms import ValidationError from django.core.signing import Signer, BadSignature from django.contrib.postgres.fields import ArrayField from django.forms.widgets import FILE_INPUT_CONTRADICTION from django.forms.fields import CallableChoiceIterator import pickle import base64 from ...
7,678
test connect
# # 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 us...
7,679
get cpld num
# sfputil.py # # Platform-specific SFP transceiver interface for SONiC # try: import time import string import pprint from ctypes import create_string_buffer from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) # fr...
7,680
run all cells
""" Before running this script make sure you have ```bash git pull pip install -e . -U python setup.py develop ``` Then run the script to create/ update the notebooks for Panelite ```bash python scripts/generate_panelite_content.py ``` Follow the steps in the Panel Jupyterlite guide including ```bash cd lite pip i...
7,681
test filter rsin in
# SPDX-License-Identifier: EUPL-1.2 # Copyright (C) 2019 - 2020 Dimpact from rest_framework import status from vng_api_common.tests import get_validation_errors, reverse from ..models import Catalogus from .base import APITestCase from .factories import CatalogusFactory class CatalogusAPITests(APITestCase): maxD...
7,682
is property
""" QEMU Object Model FUSE filesystem tool This script offers a simple FUSE filesystem within which the QOM tree may be browsed, queried and edited using traditional shell tooling. This script requires the 'fusepy' python package. usage: qom-fuse [-h] [--socket SOCKET] <mount> Mount a QOM tree as a FUSE filesystem...
7,683
test federal account invalid defc type
import pytest from rest_framework import status url = "/api/v2/disaster/federal_account/spending/" @pytest.mark.django_db def test_federal_account_success(client, generic_account_data, monkeypatch, helpers): helpers.patch_datetime_now(monkeypatch, 2022, 12, 31) helpers.reset_dabs_cache() resp = helpers...
7,684
test attributes
"""Tests for the asdl parser in Parser/asdl.py""" import importlib.machinery import importlib.util import os from os.path import dirname import sys import sysconfig import unittest # This test is only relevant for from-source builds of Python. if not sysconfig.is_python_build(): raise unittest.SkipTest('test irr...
7,685
test assign non strict shape checking
# 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...
7,686
create corners
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
7,687
register plugin
from loguru import logger from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.requests import RequestException, Session, TimedLimiter from flexget.utils.soup import get_soup logger = logger.bind(name='letterboxd') ...
7,688
test get data array indexing
import os.path import numpy as np import pytest from podpac.core.data.dataset_source import Dataset class TestDataset(object): """test xarray dataset source""" source = os.path.join(os.path.dirname(__file__), "assets/dataset.nc") lat = [0, 1, 2] lon = [10, 20, 30, 40] time = np.array(["2018-01-...
7,689
not data actions
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ ...
7,690
add reader
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A poll() based implementation of the twisted main loop. To install the event loop (and you should do this before any connections, listeners or connectors are added):: from twisted.internet import pollreactor pollreactor.install() """...
7,691
model arch
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import paddle import paddle.nn as nn import typing from ppdet.core.workspace import register from ppdet.modeling.post_process import nms __all__ = ['BaseArch'] @register class BaseArch(nn...
7,692
paged review
# Copyright 2020 The Forseti Security 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 ap...
7,693
on job terminated
# 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...
7,694
is unsupported folder
""" Copyright (c) 2020, 2023, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """ from oracle.weblogic.deploy.util import FileUtils from wlsdeploy.exception import exception_helper from wlsdeploy.exception.expection_types import Excep...
7,695
gen block
#@+leo-ver=5-thin #@+node:ekr.20140723122936.18151: * @file ../plugins/importers/leo_rst.py """ The @auto importer for restructured text. This module must **not** be named rst, so as not to conflict with docutils. """ from __future__ import annotations from typing import TYPE_CHECKING from leo.plugins.importers.base_i...
7,696
test with course data
""" Tests for send_course_update management command. """ from unittest import skipUnless from unittest.mock import patch import ddt from django.conf import settings from django.core import mail from edx_ace.utils.date import serialize from openedx.core.djangoapps.schedules import resolvers, tasks from openedx.core....
7,697
checkout existing
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Supports git repositories for the benchmarked project. """ import os import re import shlex from ..console import log from ..repo import Repo, NoSuchNameError from .. import util class Git(Repo): dvcs = "git" def __init__(self, url, mirro...
7,698
test get date no acquisition date
# -*- coding: utf-8 -*- # Copyright (C) 2015 Glencoe Software, Inc. # All rights reserved. # # Use is subject to license terms supplied in LICENSE.txt """ gateway tests - Testing the gateway image wrapper pytest fixtures used as defined in conftest.py: - gatewaywrapper """ from builtins import range from ...
7,699
test get client
from datetime import datetime from unittest.mock import patch import botocore from boto3 import session from prowler.providers.aws.lib.audit_info.audit_info import AWS_Audit_Info from prowler.providers.aws.services.backup.backup_service import Backup from prowler.providers.common.models import Audit_Metadata # Mock ...