id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
18,200
aux
from pyparsing import Combine, Literal, Word, delimitedList, Group, Optional,\ ZeroOrMore, OneOrMore, nums, alphas, alphanums,\ StringStart, StringEnd, CaselessLiteral, Forward, oneOf class TermParse(object): def __str__(self): ss = "%s\n" % self.__class__ for key, val in self.__dict__.it...
18,201
test ext pillar nesting key
import copy import logging import pytest from requests.exceptions import HTTPError import salt.pillar.vault as vault from tests.support.mock import Mock, patch @pytest.fixture def configure_loader_modules(): return { vault: { "__utils__": { "vault.expand_pattern_lists": Mock(...
18,202
test exclude single tag
# Copyright 2014 Ben Ockmore # # 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. """Tests for mid3cp tool. Since the tool...
18,203
hb getallregs
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/build/simics/hb-simdebug.py $ # # OpenPOWER HostBoot Project # # Contributors Listed Below - COPYRIGHT 2011,2022 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
18,204
test not values
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Unit tests for the :func:`iris.common.metadata.metadata_manager_factory`. """ # Import iris.tests first so that some thin...
18,205
set blank lines between comment and class
# Copyright 2015 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...
18,206
fn
# Copyright 2017-2020 Palantir Technologies, Inc. # Copyright 2021- Python Language Server Contributors. import os from io import StringIO from unittest.mock import MagicMock import pytest from pylsp_jsonrpc.dispatchers import MethodDispatcher from pylsp_jsonrpc.endpoint import Endpoint from pylsp_jsonrpc.exceptions ...
18,207
sleet cube
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
18,208
demand
from pytest import approx, fixture @fixture(params=["without c", "with c"]) def METHOD_NAME(request): from numpy.random import choice, randint from xarray import DataArray METHOD_NAME = DataArray( randint(0, 10, (5, 3, 4)), coords={ "a": choice(range(15), 5, replace=False), ...
18,209
pick and freeze samples small
""" This module is used to test the functionalities of the baseclass. - test_pick_and_freeze_sampling: Test the `generate_pick_and_test_samples` function. - test_bootstrap_for_vector: Test the bootstrap sampling for a vector. - test_bootstrap_for_matrix: Test the bootstrap sampling for a matrix. """ i...
18,210
block
# SPDX-License-Identifier: EUPL-1.2 # Copyright (C) 2019 - 2020 Dimpact from urllib.parse import urlparse from django.conf import settings from django.db import models from django.db.models import Case, IntegerField, Q, Value, When from django.http.request import validate_host from vng_api_common.constants import Ver...
18,211
give trophy
""" The emergencies command group, allowing for finer control of the bot, raw debugging and statistics. """ from typing import Set import discord from discord import Embed from discord.ext import commands from tortoise import timezone from utils import checks from utils.cog_class import Cog from utils.ctx_class impor...
18,212
send email
import smtplib import argparse import logging from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText class EmailSender(object): def __init__(self, host="localhost", port=25, username=None, password=None): self.host = host self.port = port # we ...
18,213
next pull
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE __all__ = ("broadcast_fields",) import awkward as ak from awkward._backends.dispatch import backend_of from awkward._backends.numpy import NumpyBackend from awkward._behavior import behavior_of from awkward._dispatch import high_lev...
18,214
export slices to movie
import os import sys from OpenVisus import * from OpenVisus.gui import * # Scripting Node to remove the white-sh (TO TRY) """ import numpy input=Array.toNumPy(input) R,G,B=SplitChannels(input) A=ConvertToGrayScale([R,G,B]) # remove white-ish A[A>245]=0 output=InterleaveChannels([R,G,B,A]) output=Array.fromN...
18,215
test http client incorrect call
from unittest.mock import MagicMock from uuid import UUID import pytest import requests import requests_mock from urllib3.exceptions import ConnectTimeoutError from common.types import SocketAddress from infection_monkey.island_api_client import ( IslandAPIConnectionError, IslandAPIError, IslandAPIRequest...
18,216
initial validation
# (C) Datadog, Inc. 2023-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # This file is autogenerated. # To change this file you should edit assets/configuration/spec.yaml and then run the following commands: # ddev -x validate config -s <INTEGRATION_NAME> # ddev -x va...
18,217
body
# # This file is part of LiteX. # # This file is Copyright (c) 2019 Sean Cross <sean@xobs.io> # SPDX-License-Identifier: BSD-2-Clause from migen.fhdl.module import DUID from migen.util.misc import xdir from litex.soc.interconnect.csr_eventmanager import EventManager import textwrap import inspect class ModuleDoc(DU...
18,218
sanitize id to search
#!/usr/bin/env python3 # -*-coding:UTF-8 -* import hashlib import os import sys from flask import url_for from pymisp import MISPObject sys.path.append(os.environ['AIL_BIN']) ################################## # Import Project packages ################################## from lib.ConfigLoader import ConfigLoader fro...
18,219
test systemhistory type attribute label
from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from dfirtrack_main.models import System, Systemhistory, Systemstatus class SystemhistoryModelTestCase(TestCase): """systemhistory model tests""" @classmethod def setUpTestData(cls): # ...
18,220
parse storage url
''' s3.py - this file is part of S3QL. Copyright © 2008 Nikolaus Rath <Nikolaus@rath.org> This work can be distributed under the terms of the GNU GPLv3. ''' import hashlib import hmac import logging import re import time import urllib.parse from xml.sax.saxutils import escape as xml_escape from ..logging import Qui...
18,221
construct atlassian page
from collections.abc import Iterable from typing import ( Any, Optional, ) from reconcile.gql_definitions.fragments.vault_secret import VaultSecret from reconcile.gql_definitions.statuspage.statuspages import ( AppV1, ManualStatusProviderConfigV1, ManualStatusProviderV1, StatusPageComponentV1, ...
18,222
transform to command
import logging import time from os import listdir from pathlib import Path from typing import List, Set from antarest.core.config import Config from antarest.core.interfaces.service import IService from antarest.core.utils.fastapi_sqlalchemy import db from antarest.core.utils.utils import StopWatch from antarest.matri...
18,223
clean str
import pandas as pd import streamlit as st import yfinance from openbb_terminal.core.plots.plotly_helper import OpenBBFigure from openbb_terminal.core.session.current_system import set_system_variable from openbb_terminal.dashboards.stream import streamlit_helpers as st_helpers pd.options.plotting.backend = "plotly" ...
18,224
test pipe inference schedule singlestage
# Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 # DeepSpeed Team import pytest import deepspeed.runtime.pipe.schedule as schedule def _count_type(cmds, classtype): return len(list(filter(lambda c: type(c) == classtype, cmds))) def METHOD_NAME(): sched = schedule.InferenceSched...
18,225
is cloud env
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. import os from .environments import (AzureNBEnvironment, CredentialedVMEnvironment, DatabricksEnvironment, LocalIPythonEnvironment, PublicVMEnvironment) """Environment detection related utili...
18,226
draw buttons ext
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
18,227
ssh user
# 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...
18,228
initialize
"""tornado IOLoop API with zmq compatibility If you have tornado ≥ 3.0, this is a subclass of tornado's IOLoop, otherwise we ship a minimal subset of tornado in zmq.eventloop.minitornado. The minimal shipped version of tornado's IOLoop does not include support for concurrent futures - this will only be available if y...
18,229
allow migrate
from django.db import DEFAULT_DB_ALIAS, connections from codelists.coding_systems import CODING_SYSTEMS def query(sql, params=None, database=None): database = database or DEFAULT_DB_ALIAS with connections[database].cursor() as c: c.execute(sql, params) return c.fetchall() class CodingSystem...
18,230
test yaml representer
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import astropy.units as u from astropy.cosmology import Cosmology, FlatLambdaCDM, Planck18 from astropy.cosmology import units as cu from astropy.cosmology._io.yaml import ( from_yaml, to_yaml, yaml_constructor, yaml_represe...
18,231
test revisions
# This file is part of Indico. # Copyright (C) 2002 - 2023 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import pytest from sqlalchemy import inspect from sqlalchemy.exc import IntegrityError from indico.module...
18,232
async main
#!/usr/bin/env python """iScript: Apple signing and notarization.""" import logging import os from iscript.exceptions import IScriptError from iscript.hardened_sign import sign_hardened_behavior from iscript.mac import notarize_1_behavior, notarize_3_behavior, notarize_behavior, sign_and_pkg_behavior, sign_behavior, s...
18,233
cog unload
""" Bot monitoring. """ import asyncio import time from datetime import timedelta from typing import Callable, List, Union import discord from discord.ext import tasks from discord.ext.commands import CommandError from utils.cog_class import Cog from utils.ctx_class import MyContext from utils.models import BotState ...
18,234
test get release meta data
import json from src.changelog_entry import BugChangelogEntry from src.handler import MAXIMUM_FILE_NAME_MESSAGE_LENGTH, ChangelogHandler def test_add_entry(fs): file_path = ChangelogHandler().add_entry(BugChangelogEntry.type, "message") assert fs.isfile(file_path) def test_get_changelog_entries(fs): ha...
18,235
end session
# Copyright 2019 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...
18,236
move minion uploaded files
from subprocess import Popen, PIPE import logging import stat import grp import shlex import os import shutil import salt.utils import tempfile import certs.mgr_ssl_cert_setup log = logging.getLogger(__name__) GROUP_OWNER = 'susemanager' def delete_rejected_key(minion): ''' Delete a previously rejected min...
18,237
test multiclass dashboard no y
import pytest from explainerdashboard.dashboards import ExplainerDashboard pytestmark = pytest.mark.selenium def test_classification_dashboard(dash_duo, precalculated_rf_classifier_explainer): db = ExplainerDashboard(precalculated_rf_classifier_explainer, title="testing", responsive=False) html = db.to_html...
18,238
hashivault k8s auth role
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper import json ANSIBLE_METADATA = {'status': ['stable...
18,239
query
# 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 ...
18,240
create pretraining dataloader
import gzip import json import os import h5py from typing import List, Tuple import random import numpy as np import smdistributed.modelparallel.torch as smp import torch class BertPretrainingDataset(torch.utils.data.Dataset): def __init__(self, input_file, max_pred_length): self.input_file = input_file ...
18,241
log progress
# -*- 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...
18,242
build column def
# !/usr/bin/env python # encoding: utf-8 """ SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md """ from calendar import month_name from collections import defaultdict from django.core.paginator import Paginator...
18,243
extract pianoroll sequences
# Copyright 2023 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
18,244
load
import logging import random import re log = logging.getLogger(__name__) random.seed(31415) class Key: def __init__(self, word, weight, decomps): self.word = word self.weight = weight self.decomps = decomps class Decomp: def __init__(self, parts, save, reasmbs): self.parts =...
18,245
old read in chunks
# 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 use ...
18,246
sra
# Ref: MIPS® Architecture for Programmers Volume II-A: The MIPS32® Instruction Set Manual # Document Number: MD00086 Revision 6.05 # Accession: G00021 __all__ = [ # R-format "SLL", "SRL", "SRA", "JR", "JALR", "MFHI", "MTHI", "MFLO", "MTLO", "DIV", "DIVU", "MULT", "MULTU", "ADD", "ADDU", "SUB", "SUBU", "AND...
18,247
get geojson
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -*- coding: utf-8 -*- """ Mixin providing utility methods for geographic type queries. """ import rapidjson as json...
18,248
test format service name
# Import AWS utils from ScoutSuite.providers.aws.utils import ( get_keys, no_camel, get_name, is_throttled, get_aws_account_id, get_partition_name, snake_keys, ) from ScoutSuite.utils import * import collections import unittest from unittest import mock import datetime # # Test methods for ...
18,249
cluster ocm spec
import json import pytest from reconcile.ocm_upgrade_scheduler_org_updater import render_policy from reconcile.openshift_resources_base import Jinja2TemplateError from reconcile.utils.ocm import ( OCMClusterNetwork, OCMSpec, OSDClusterSpec, ) @pytest.fixture def METHOD_NAME(): n = OCMClusterNetwork(...
18,250
clear
# encoding: utf-8 import click import ckan.lib.jobs as bg_jobs import ckan.logic as logic import ckan.plugins as p from ckan.cli import error_shout @click.group(name=u"jobs", short_help=u"Manage background jobs.") def jobs(): pass @jobs.command(short_help=u"Start a worker.",) @click.option(u"--burst", is_flag...
18,251
parent path str
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # color # ----- @property def color(self): """ Sets the color of the threshold line. The 'color' property is a color and may be spe...
18,252
literal
#!/usr/bin/env python import sys from typing import Any, Iterator, List, Type from faust.types.settings import Settings from faust.types.settings.params import Param from faust.types.settings.sections import Section SECTION_TEMPLATE = '''\ .. _{section.refid}: {title} {settings} ''' SETTING_TEMPLATE = '''\ .. setti...
18,253
to native
# (C) Copyright 2020-2021 by Rocky Bernstein # # 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 ...
18,254
test enum tautomers for molecule
from __future__ import print_function import os import sys sys.path.append( os.path.normpath( os.path.join(os.path.abspath(__file__), "..", "..", "..", "common") ) ) from env_indigo import * # noqa indigo = Indigo() def checkMatch(query, mapping): d = dict() for query_atom in query.iterate...
18,255
get easing list
import array import colorsys import math from pynodegl_utils.misc import SceneCfg, scene from pynodegl_utils.toolbox.grid import AutoGrid import pynodegl as ngl def _block(w, h, color, corner=None): block_width = (w, 0, 0) block_height = (0, h, 0) block_corner = (-w / 2.0, -h / 2.0, 0) if corner is None...
18,256
test padding
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import copy import unittest import tests.utils as test_utils import torch from fairseq.criterions.cross_entropy import CrossE...
18,257
package info
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import ( apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm,...
18,258
approx equal
# %% [markdown] # Copyright 2022 The Jax Linear Operator 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 #...
18,259
start
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import os import shutil from zipfile import BadZipfile, ZipFile try: import re2 as re except ImportError: import re from lib.c...
18,260
test avg values list filter group by
from tests.testmodels import Author, Book from tortoise.contrib import test from tortoise.functions import Avg, Count, Sum, Upper class TestGroupBy(test.TestCase): async def asyncSetUp(self) -> None: await super(TestGroupBy, self).asyncSetUp() self.a1 = await Author.create(name="author1") ...
18,261
assert files exist in tar
# Copyright 2017-2020 Amazon.com, Inc. or its 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
18,262
write
# Copyright 2014 Davide Corio # Copyright 2016-2018 Lorenzo Battistini - Agile Business Group from odoo import _, api, fields, models from odoo.exceptions import UserError class FatturaPAAttachment(models.Model): _inherit = "fatturapa.attachment" _name = "fatturapa.attachment.out" _description = "Electro...
18,263
run
import random import string import traceback from tests.cephfs.cephfs_utilsV1 import FsUtils from utility.log import Log log = Log(__name__) def METHOD_NAME(ceph_cluster, **kw): """ Test Cases Covered : CEPH-83573499 Remove the original volume after cloning and verify the data is accessible from cloned ...
18,264
build
import os import shutil import sys from glob import glob from invoke import task from tasks import task_utils from scripts import u_utils from scripts.u_flags import u_flags_to_cflags, get_cflags_from_u_flags_yml from scripts.u_log_readers import URttReader from scripts.packages import u_package, u_pkg_utils DEFAULT_M...
18,265
delete rule groups namespace
"""PrometheusServiceBackend class with methods for supported APIs.""" from moto.core import BaseBackend, BackendDict, BaseModel from moto.core.utils import unix_time from moto.moto_api._internal import mock_random from moto.utilities.paginator import paginate from moto.utilities.tagging_service import TaggingService f...
18,266
test01 lists
# -*- coding: utf-8; -*- # # (c) 2014 Mandriva, http://www.mandriva.com/ # # This file is part of Pulse 2, http://pulse2.mandriva.org # # Pulse 2 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 ...
18,267
upsert group
""" A CLI command for inserting standard dev data into the DB. Usage: bin/hypothesis --dev devdata """ import json import os.path import pathlib import shutil import subprocess import tempfile import click import h from h import models class DevDataFactory: """Factory class for inserting standard dev data...
18,268
gen estring
import time import re from xml.dom import minidom import urlparse from string import lower, split, atoi, joinfields from StringIO import StringIO from constants import RT_ALLPROP, RT_PROPNAME, RT_PROP from BaseHTTPServer import BaseHTTPRequestHandler def METHOD_NAME(ecode): """ generate an error string from the...
18,269
get file
from builtins import str import uuid from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User ...
18,270
opensearch version
# 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...
18,271
test dict observation
"""Tests for the pixel observation wrapper.""" from typing import Optional import numpy as np import pytest import gymnasium as gym from gymnasium import spaces from gymnasium.wrappers.pixel_observation import STATE_KEY, PixelObservationWrapper class FakeEnvironment(gym.Env): def __init__(self, render_mode="sin...
18,272
convert
import logging import os import tarfile from typing import List, Optional, Dict from ase.io import read import numpy as np import torch from schnetpack.data import * from schnetpack.data import AtomsDataModuleError, AtomsDataModule __all__ = ["OrganicMaterialsDatabase"] class OrganicMaterialsDatabase(AtomsDataMod...
18,273
basic rest stream
from __future__ import annotations import json import typing as t try: from contextlib import nullcontext except ImportError: from contextlib2 import nullcontext from enum import Enum import pytest import requests from singer_sdk.exceptions import FatalAPIError, RetriableAPIError from singer_sdk.streams.re...
18,274
test no contiguous2
import math import unittest import numpy import pytest from cupy._core import internal from cupy import testing class TestProd(unittest.TestCase): def test_empty(self): assert internal.prod([]) == 1 def test_one(self): assert internal.prod([2]) == 2 def test_two(self): assert ...
18,275
depadding
# 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...
18,276
get generator
#!/usr/bin/env python3 # # Send an SNMP trap to a destination. # import pscheduler import pysnmp from pysnmp.hlapi import * import re import sys # check for missing required fields def missing_input(data_json, test_type, level): try: # general fields dest = data_json['dest'] trap_oid = da...
18,277
test rules with none in set
# ___________________________________________________________________________ # # Pyomo: Python Optimization Modeling Objects # Copyright (c) 2008-2022 # National Technology and Engineering Solutions of Sandia, LLC # Under the terms of Contract DE-NA0003525 with National Technology and # Engineering Solutions of ...
18,278
inserttestmsgs
# # Copyright (C) 2006, 2013 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # This program is distributed in th...
18,279
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...
18,280
get phil
# # LIBTBX_SET_DISPATCHER_NAME cspad.metrology # from __future__ import absolute_import, division, print_function from scipy.optimize import leastsq # special import from xfel.metrology.mark10 import fit_translation4 from libtbx.utils import Sorry import os.path master_phil=""" data = None .type = path .multiple ...
18,281
validate column names
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import codecs from enum import Enum from typing import Any, Dict, List, Optional, Set, Union from pydantic import BaseModel, Field, ValidationError, root_validator, validator class InferenceType(Enum): NONE = "None" PRIMITIVE_TYPES_ONLY = "Primiti...
18,282
test get package bad
import pytest from insights.combiners.ps import Ps from insights.core import dr, filters from insights.core.context import HostContext from insights.core.exceptions import SkipComponent from insights.core.spec_factory import DatasourceProvider from insights.parsers.ps import PsEoCmd from insights.specs import Specs fr...
18,283
query property
# orm/scoping.py # Copyright (C) 2005-2016 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 from .. import exc as sa_exc from ..util import ScopedRegistry, ThreadLocalRegistry, ...
18,284
read
import os import sys import warnings from collections.abc import Callable from pathlib import Path from more_itertools import always_iterable from yt.utilities.configuration_tree import ConfigLeaf, ConfigNode configuration_callbacks: list[Callable[["YTConfig"], None]] = [] def config_dir(): config_root = os.en...
18,285
test wrong jmx name
import os from bzt.utils import EXE_SUFFIX, get_full_path, BetterDict from bzt.modules.jmeter import JMeter from . import MockJMeter from tests.unit import BZTestCase, RESOURCES_DIR class TestJMeterTool(BZTestCase): def setUp(self): super(TestJMeterTool, self).setUp() config = BetterDict() ...
18,286
get rule group 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...
18,287
timeit
#! /usr/bin/env python # -*- coding: utf-8 -*- # flake8: noqa T001 """Measure performances of a basic tax-benefit system to compare to other OpenFisca implementations.""" import argparse import logging import sys import time import numpy as np from numpy.core.defchararray import startswith from openfisca_core impor...
18,288
handle org projects email report
# -*- coding: utf-8 -*- """Akvo RSR is covered by the GNU Affero General Public License. See more details in the license.txt file located at the root folder of the Akvo RSR module. For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. """ from akvo.rsr.models import Project,...
18,289
test sorting
#!/usr/bin/env python # This library 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 2.1 of the License, or (at your option) any later version. # # This library is distributed in the ho...
18,290
parse args
#!/usr/bin/env python3 # Note: this script is python2 and python 3 compatible. # # fiologparser.py # # This tool lets you parse multiple fio log files and look at interaval # statistics even when samples are non-uniform. For instance: # # fiologparser.py -s *bw* # # to see per-interval sums for all bandwidth logs or: ...
18,291
set iterations
# This source code is part of the Biotite package and is distributed # under the 3-Clause BSD License. Please see 'LICENSE.rst' for further # information. __name__ = "biotite.application.muscle" __author__ = "Patrick Kunzmann" __all__ = ["Muscle5App"] import numbers import warnings from tempfile import NamedTemporary...
18,292
test new transaction
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import json import unittest import frappe from frappe.utils.response import json_handler from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account from erpnext.erpnext_integrations.doctype.plai...
18,293
describe schedule
# Copyright Amazon.com, Inc. or its 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
18,294
test anonymize object info with missing args
import uuid import pytest from great_expectations.core.batch import BatchRequest from great_expectations.core.expectation_suite import ExpectationSuite from great_expectations.core.usage_statistics.anonymizers.anonymizer import Anonymizer @pytest.fixture def anonymizer_with_consistent_salt() -> Anonymizer: anon...
18,295
test40
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
18,296
triggered if block ends with if
# pylint: disable=missing-module-docstring, missing-function-docstring def triggered_if_if_block_ends_with_elif(machine, old_conf, new_conf): """Example code that will trigger the message Given an if-elif construct When the body of the if ends with an elif Then the message confusing-consecutive-elif ...
18,297
gen class
#!/usr/bin/env python3 import argparse from textwrap import dedent from subprocess import call def parse_lines(lines): # States EMPTY = 0 OP = 1 MACRO = 2 parse_state = EMPTY # Preprocess the macros curr_macro = "" macros = {} index = 0 while index < len(lines): ...
18,298
get bill amount
""" Display bill for Amazon Web Services. **WARNING: This module generate some costs on the AWS bill. Take care about the cache_timeout to limit these fees!** Configuration parameters: aws_access_key_id: Your AWS access key (default '') aws_account_id: The root ID of the AWS account Can be found here`...
18,299
request
import email.message import io import ssl import sys import types from _typeshed import ReadableBuffer, SupportsRead, WriteableBuffer from collections.abc import Callable, Iterable, Iterator, Mapping from socket import socket from typing import Any, BinaryIO, TypeVar, overload from typing_extensions import Self, TypeAl...