id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
5,500
test wait on event
# -*- coding: utf-8 -*- """Common test case for all resources. """ import gc import logging import re from typing import Union import pytest from pyvisa import InvalidSession, ResourceManager from pyvisa.constants import InterfaceType, ResourceAttribute, StatusCode, Timeouts from pyvisa.resources.resource import Res...
5,501
make url key
import json import uuid from base64 import urlsafe_b64encode from functools import cached_property from django.conf import settings from django.db import transaction from django.http import QueryDict, HttpResponse, JsonResponse from django.utils.translation import gettext as _ import attr from casexml.apps.phone.xml...
5,502
allow duplicates
# 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...
5,503
procfolder
# parse xml files and output simplified version import xml.dom.minidom import os import sys import multiprocessing def parsexml(afile, outpath): outfile = os.path.join(outpath, afile.split('/')[-1] + '.simp') with open(outfile, 'w') as bw: domtree = xml.dom.minidom.parse(afile) collection = ...
5,504
query service config2
from _typeshed import Incomplete from collections.abc import Iterable import _win32typing from win32.lib.pywintypes import error as error def GetThreadDesktop(ThreadId) -> _win32typing.PyHDESK: ... def EnumWindowStations() -> tuple[tuple[str, Incomplete], ...]: ... def GetUserObjectInformation(Handle: int, _type) -> ...
5,505
name
# 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...
5,506
get hash
import numpy as np import random import itertools import torch from naslib.search_spaces.core.graph import Graph from naslib.search_spaces.core.query_metrics import Metric class NATSBenchSizeSearchSpace(Graph): """ Implementation of the nasbench 201 search space. It also has an interface to the tabular b...
5,507
get raw
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any l...
5,508
setup network
#!/usr/bin/env python3 # Copyright (c) 2021-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test that a node in blocksonly mode does not request compact blocks.""" from test_framework.messages i...
5,509
test aggregates widget load weighted mean
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃ # ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃ # ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄...
5,510
resolve repository flags
from . import api from .api import ET from .. import core as osc_core from .. import oscerr class APIXMLBase: def __init__(self, xml_root, apiurl=None): self.root = xml_root self.apiurl = apiurl def to_bytes(self): api.xml_indent(self.root) return ET.tostring(self.root, encodi...
5,511
inner radius
""" The MIT License (MIT) Copyright (c) 2012-2014 Alexander Turkin Copyright (c) 2014 William Hallatt Copyright (c) 2015 Jacob Dawid Copyright (c) 2016 Luca Weiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
5,512
test conv lstm dropout
# 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...
5,513
addtrigger
import torch.utils.data as data from PIL import Image import glob import time import numpy as np import random import os from torchvision import transforms def METHOD_NAME(img, firefox, fixed_pic): length = 40 firefox.thumbnail((length, length)) if not fixed_pic: img.paste(firefox, (random.randint...
5,514
get command
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
5,515
name
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
5,516
get api key
"""A script that generates the Lambda Cloud catalog. Usage: python fetch_lambda_cloud.py [-h] [--api-key API_KEY] [--api-key-path API_KEY_PATH] If neither --api-key nor --api-key-path are provided, this script will parse `~/.lambda/lambda_keys` to look for Lambda API key. """ impo...
5,517
save data from raw ms file
import logging import time from pathlib import Path from pprint import pformat from shutil import copytree, rmtree from typing import Optional, Dict from pyspark import SparkContext, SparkConf from sm.engine import molecular_db, storage from sm.engine.annotation.acq_geometry import make_acq_geometry from sm.engine.an...
5,518
execute operations
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
5,519
get metadata
"""Module for accessing the Earth Engine Data Catalog with dot notation.""" # *******************************************************************************# # This module contains extra features of the geemap package. # # The geemap community will maintain the extra features. ...
5,520
test both
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014-2015 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # # 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...
5,521
get value
# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. """ Utility ...
5,522
load
from __future__ import annotations import logging import traceback from pathlib import Path from typing import Optional import configobj from configobj import ParseError from pydantic import BaseSettings, Extra, PrivateAttr from tribler.core.components.bandwidth_accounting.settings import BandwidthAccountingSettings...
5,523
test get full name returns username
import pytest from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from rdmo.accounts.models import Role from rdmo.accounts.utils import get_full_name, is_site_manager, delete_user, get_user_from_db_or_none normal_users = ( ('user', 'user', 'user@example.com'), ) s...
5,524
p binary expr
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ File: visit_exprs_parser.py Authors: Cyrus Harrison <cyrush@llnl.gov> Maysam Moussa...
5,525
name
# 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...
5,526
application
import argparse import importlib import logging import sys import uuid from urllib.parse import parse_qs from urllib.parse import unquote import cherrypy from beaker.middleware import SessionMiddleware from oic.oauth2.consumer import Consumer from oic.utils.http_util import NotFound from oic.utils.http_util import Re...
5,527
blocksize
from __future__ import print_function import core.exceptions as ex from utilities.lazy import lazy from drivers.array.freenas import Freenass from core.pool import BasePool LOCK_NAME = "freenas_update_disk" LOCK_TIMEOUT = 120 class Pool(BasePool): type = "freenas" capabilities = ["roo", "rwo", "rox", "rwx", ...
5,528
test data before
# Copyright 2020. ThingsBoard # # 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 ...
5,529
test t3 its
# Copyright (c) 2021 Horizon Robotics and ALF Contributors. 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...
5,530
io
# These lines were mostly generated by h2py.py (see demo/scripts) # from <sys/ioctl.h>, <sys/termio.h> and <termios.h> on Irix 4.0.2 # with some manual changes to cope with imperfections in h2py.py. # The applicability on other systems is not clear; especially non-SYSV # systems may have a totally different set of ioct...
5,531
pre val loop
import logging from typing import List, Optional import jax import jax.numpy as jnp import nltk import numpy as np import optax from datasets import load_metric from flax.training.common_utils import onehot from transformers import AutoConfig, AutoTokenizer, FlaxAutoModelForSeq2SeqLM from tango.integrations.flax impo...
5,532
sampletype uid
# -*- coding: utf-8 -*- # # This file is part of SENAITE.CORE. # # SENAITE.CORE 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, bu...
5,533
test error on negative
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json from django.core.exceptions import ValidationError from manage_treemap.views.management import update_benefits from treemap.instance import Instance from treemap.models i...
5,534
delete index
# Copyright (c) 2023 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...
5,535
make instance
# coding: utf-8 """ Kubeflow Pipelines API This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import ...
5,536
assets
"""Classes/utilities for support of a dandiset""" from __future__ import annotations from collections.abc import Iterable, Iterator from dataclasses import dataclass import os.path from pathlib import Path, PurePath, PurePosixPath from typing import Optional, TypeVar from dandischema.models import get_schema_version ...
5,537
apply
# Copyright (c) Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang import bpy import mathutils from numpy.random import uniform as U, normal as N, randint from nodes.node_wrangler import Nodes...
5,538
show images
""" The Pygame Zero mode for the Mu editor. Copyright (c) 2015-2017 Nicholas H.Tollervey and others (see the AUTHORS file). This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the Li...
5,539
deep deannotate
# sql/annotation.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The :class:`.Annotated` class and related routines; creates hash-equivalent cop...
5,540
test if pie charts of costs is
import os import shutil import mock import pandas as pd import pytest import multi_vector_simulator.A0_initialization as initializing import multi_vector_simulator.F1_plotting as F1 from multi_vector_simulator.cli import main from multi_vector_simulator.utils.constants import ( INPUT_FOLDER, PLOTS_BUSSES, ...
5,541
on adapter property changed
from enum import Enum from gettext import gettext as _ import logging from typing import Callable, Any, Optional from blueman.plugins.AppletPlugin import AppletPlugin from blueman.bluez.Adapter import Adapter from gi.repository import GLib from blueman.plugins.applet.StatusIcon import StatusIconProvider class Powe...
5,542
tuple depth
''' See COPYRIGHT.md for copyright information. ''' from arelle import ViewFile, XbrlConst, XmlUtil from collections import defaultdict def viewFacts(modelXbrl, outfile, lang=None, labelrole=None, cols=None): modelXbrl.modelManager.showStatus(_("viewing facts")) view = ViewFacts(modelXbrl, outfile, labelrole, ...
5,543
yolo collate fn
# Copyright (c) 2021 - present / Neuralmagic, 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 b...
5,544
xml close
############################################################################### # # XMLwriter - A base class for XlsxWriter classes. # # Used in conjunction with XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright 2013-2023, John McNamara, jmcnamara@cpan.org # # Standard packages. import re from io impor...
5,545
create app
"""Fixtures and testing utilities for :pypi:`pytest <pytest>`.""" import os from contextlib import contextmanager from typing import TYPE_CHECKING, Any, Mapping, Sequence, Union # noqa import pytest if TYPE_CHECKING: from celery import Celery from ..worker import WorkController else: Celery = WorkContro...
5,546
verify urls
import os import traceback from requests import ConnectionError, Timeout from toolset.utils.output_helper import log # Cross-platform colored text from colorama import Fore, Style class FrameworkTest: def __init__(self, name, directory, benchmarker, runTests, args): ''' Construc...
5,547
test metrics show json
import json from dvc.cli import parse_args from dvc.commands.metrics import CmdMetricsDiff, CmdMetricsShow def test_metrics_diff(dvc, mocker, capsys): cli_args = parse_args( [ "metrics", "diff", "HEAD~10", "HEAD~1", "-R", "--all", ...
5,548
log to file
# Copyright 2017, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
5,549
ping loop
# -*- coding: utf-8 -*- from asyncio import sleep, ensure_future, wait_for, TimeoutError from .functions import milliseconds, iso8601, deep_extend from ccxt import NetworkError, RequestTimeout, NotSupported from ccxt.async_support.base.ws.future import Future class Client(object): url = None ws = None f...
5,550
test items
import json from xml.etree import ElementTree as etree import pytest from pycsw.ogc.api.records import API pytestmark = pytest.mark.functional def test_landing_page(config_virtual_collections): api = API(config_virtual_collections) headers, status, content = api.landing_page({}, {'f': 'json'}) content ...
5,551
test error checking
# Copyright (c) Meta Platforms, Inc. and affiliates. import vpdq # type: ignore import pytest import test_util from pathlib import Path import glob import re from typing import Union, Sequence, NamedTuple from collections import namedtuple DIR = Path(__file__).parent VPDQ_DIR = DIR.parent.parent SAMPLE_HASH_FOLDER = ...
5,552
test nonsquare bin
import numpy as np import Orange from Orange.widgets.tests.base import WidgetTest from orangecontrib.spectroscopy.utils import get_ndim_hyperspec from orangecontrib.spectroscopy.widgets.owbin import OWBin class TestOWBin(WidgetTest): @classmethod def setUpClass(cls): super().setUpClass() cls....
5,553
set up test data
from datetime import datetime from functools import reduce import operator from django.contrib.auth.models import Group, Permission from django.db.models import Q from django.urls import reverse from django.utils.crypto import get_random_string from django.test import TestCase, override_settings from accounts.models im...
5,554
simple relu
import unittest import numpy as np import copy from hypothesis import given import hypothesis.strategies as st from caffe2.python.model_helper import ModelHelper from caffe2.python.models import resnet from caffe2.python import workspace, brew import caffe2.python.hypothesis_test_util as hu import caffe2.python.m...
5,555
yes no
# ========================================================================== # AIDA Detector description implementation # -------------------------------------------------------------------------- # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) # All rights reserved. # # For the licensing te...
5,556
root conf
from contextlib import asynccontextmanager as acm from functools import partial import logging import os from pathlib import Path import pytest import tractor from piker import ( config, ) from piker.service import ( Services, ) from piker.log import get_console_log def pytest_addoption(parser): parser.a...
5,557
get music list
# Copyright 2020-2023 Capypara and the SkyTemple Contributors # # This file is part of SkyTemple. # # SkyTemple 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 y...
5,558
draw box
from pybricks.media.ev3dev import Font, Image, ImageFile from pybricks.parameters import Color from typing import Union class Screen: """ A stub class to represent the screen member of the EV3Brick class. Attributes: height (int): The height of the screen in pixels. width (int): The width...
5,559
build
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.METHOD_NAME import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_con...
5,560
ns create
import urllib class CurieBackendException(Exception): pass class Backends(object): backends = {} @classmethod def register(cls, scheme): def do_reg(c): cls.backends[scheme] = c return c return do_reg @classmethod def get_backend(cls, app, url, *args...
5,561
output
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
5,562
split dir filename ext
#!/usr/bin/python # Copyright (c) 2018 Samsung Electronics Co., Ltd. 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 # #...
5,563
create mixed use type
""" This script creates a new use-type by aggregating values from a list of different use-types """ import os import numpy as np import pandas as pd import cea import cea.config import cea.inputlocator from cea.datamanagement.archetypes_mapper import calculate_average_multiuse from cea.datamanagement.schedule_hel...
5,564
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...
5,565
modify doc
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
5,566
test shape of earth pre 6
# Copyright iris-grib contributors # # This file is part of iris-grib and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Integration tests for grib2 file loading. These tests load various files from iris-test-data, and compare the cu...
5,567
sort partition
# Copyright 2023 Iguazio # # 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, softwa...
5,568
get seasonal shows
# API information # https://myanimelist.net/modules.php?go=api from logging import debug, info, warning, error import re from .. import AbstractInfoHandler from data.models import UnprocessedShow, ShowType class InfoHandler(AbstractInfoHandler): _show_link_base = "https://myanimelist.net/anime/{id}/" _show_link_m...
5,569
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) import os import socket import llnl.util.tty as tty from spack.package import * def cmake_cache_entry(name, value, vt...
5,570
batch sizes
# Copyright 2019 The WPT Dashboard Project. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib import gzip import tempfile import unittest import warnings import test_util from wptscreenshot import WPTScreenshot class WPTScree...
5,571
upgrade
# 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. """Migrate from 0.14 to 0.15 Revision ID: 49a4a1e3779a Revises: 057b08...
5,572
handle ratelimit
# Copyright (c) 2018 Philipp Wolfer <ph.wolfer@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify...
5,573
mode select
from boxbranding import getBoxType, getMachineName, getHaveRCA, getHaveDVI, getHaveSCART, getHaveAVJACK from Screens.Wizard import WizardSummary from Screens.WizardLanguage import WizardLanguage from Screens.Rc import Rc from Components.AVSwitch import iAVSwitch as iAV from Components.Pixmap import Pixmap from Compone...
5,574
decide
#!/usr/bin/env python # Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # ...
5,575
setup device
from collections import OrderedDict from multiprocessing import Array from multiprocessing.connection import Connection import numpy as np from urh.dev.native.Device import Device from urh.dev.native.lib import usrp class USRP(Device): DEVICE_METHODS = Device.DEVICE_METHODS.copy() DEVICE_METHODS.update({"SE...
5,576
build analysis pipeline
# This is a template for the "aminer" logfile miner tool. Copy # it to "config.py" and define your ruleset. config_properties = {} # skipcq: PY-W0072 # Define the list of log resources to read from: the resources # named here do not need to exist when aminer is started. This # will just result in a warning. However ...
5,577
deduplicate entries
# Copyright (c) 2020, Frappe Technologies and contributors # License: MIT. See LICENSE from typing import Protocol, runtime_checkable import frappe from frappe import _ from frappe.model.base_document import get_controller from frappe.model.document import Document from frappe.utils import cint from frappe.utils.cach...
5,578
get nodeman api
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in complia...
5,579
test delete all
# Copyright 2023 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
5,580
notify translated
from meerk40t.core.node.node import Node class RootNode(Node): """ RootNode is one of the few directly declarable node-types and serves as the base type for all Node classes. The notifications are shallow. They refer *only* to the node in question, not to any children or parents. """ def __init_...
5,581
test safe build s2 msi l2a
# -*- coding: utf-8 -*- # Copyright 2018, CS GROUP - France, http://www.c-s.fr # # This file is part of EODAG project # https://www.github.com/CS-SI/EODAG # # 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...
5,582
main
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE...
5,583
submit production
""" desispec.scripts.submit_prod ============================ """ import yaml import numpy as np import os import sys import time import re ## Import some helper functions, you can see their definitions by uncomenting the bash shell command from desispec.workflow.utils import verify_variable_with_environment, listpath...
5,584
process resource
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from c7n_azure.provider import resources from c7n_azure.query import ChildTypeInfo from c7n_azure.actions.base import AzureBaseAction from c7n_azure.resources.arm import ChildArmResourceManager from c7n.filters.core import type_schema from ...
5,585
validate options
from cumulusci.core.exceptions import ( ApexCompilationException, ApexException, SalesforceException, TaskOptionsError, ) from cumulusci.core.utils import process_bool_arg from cumulusci.tasks.salesforce import BaseSalesforceApiTask from cumulusci.utils import in_directory, inject_namespace from cumulus...
5,586
get folders with tasks
import collections from ayon_api.graphql import GraphQlQuery, FIELD_VALUE, fields_to_dict from .constants import DEFAULT_FOLDER_FIELDS def folders_tasks_graphql_query(fields): query = GraphQlQuery("FoldersQuery") project_name_var = query.add_variable("projectName", "String!") folder_ids_var = query.add_v...
5,587
init
# # Project: MXCuBE # https://github.com/mxcube # # This file is part of MXCuBE software. # # MXCuBE 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...
5,588
test utf8 argument name
# coding: utf-8 import pytest import rpy2.rinterface as rinterface import rpy2.rlike.container as rlc rinterface.initr() def _noconsole(x): pass @pytest.fixture(scope='module') def silent_consolewrite(): module = rinterface.callbacks name = 'consolewrite_print' backup_func = getattr(module, name) ...
5,589
unchanged answer
import base64 import hashlib import os.path import random import string import urllib from django import forms from django.conf import settings from django.core.files.uploadedfile import UploadedFile from django.forms import ClearableFileInput from django.shortcuts import resolve_url from django.template.defaultfilter...
5,590
ssa
import magma.ast_utils as ast_utils import ast import typing from collections import defaultdict import astor import functools def flatten(l: list): """ Non-recursive flatten that ignores non-list children """ flat = [] for item in l: if not isinstance(item, list): item = [item...
5,591
test a test client side submit
import os import shutil import copy import glob from GangaCore.testlib.GangaUnitTest import GangaUnitTest from GangaCore.testlib.file_utils import generate_unique_temp_file class TestLocalFileClient(GangaUnitTest): """test for sjid in filename names explain each test""" _managed_files = [] # Num of sj ...
5,592
reset attempts
import json import traceback from datetime import datetime, timedelta from dateutil.parser import parse from django.conf import settings import math from django.db import models from django.db.models.aggregates import Count from jsonfield.fields import JSONField from pillow_retry import const from pillowtop.feed.couch...
5,593
test random progs
# Copyright (C) Unitary Fund # # This source code is licensed under the GPL license (v3) found in the # LICENSE file in the root directory of this source tree. """NB: Copied in large part from rigetti/forest-benchmarking (Apache-2.0) and modified to test a larger gateset. """ import inspect import itertools import ra...
5,594
handler
#!/usr/bin/env python # # Copyright (C) 2017 Accton Technology Corporation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
5,595
test unicode fast tainting
# -*- coding: utf-8 -*- import random import sys import pytest from ddtrace.appsec.iast import oce try: from ddtrace.appsec.iast._taint_tracking import OriginType from ddtrace.appsec.iast._taint_tracking import Source from ddtrace.appsec.iast._taint_tracking import TaintRange from ddtrace.appsec.ias...
5,596
generate manifest
# # Copyright (c) 2016 Nordic Semiconductor ASA # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of con...
5,597
back
# The MIT License (MIT) # # Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. # # 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 ...
5,598
create user
# pylint: disable=unused-argument # pylint: disable=keyword-arg-before-vararg # pylint: disable=inconsistent-return-statements # pylint: disable=line-too-long """Custom authentication pipeline steps.""" from social_core.pipeline.partial import partial from django.shortcuts import redirect, render from django.contrib.a...
5,599
tau
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Gas Data""" __all__ = [ 'photo_lengthscale', 'photo_timescale', 'fluorescence_band_strength', 'OHFluorescenceSA88' ] from warnings import warn import numpy as np try: import scipy from scipy import interpolate except ImportErr...