id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
3,400
add argument before
# SPDX-License-Identifier: LGPL-3.0-or-other # Copyright (C) 2021 Contributors to the SLS Detector Package """ Utility functions that are useful for testing and troubleshooting but not directly used in controlling the detector """ from collections import namedtuple import _slsdet #C++ lib import functools import date...
3,401
method1
# pylint: disable=invalid-name,unnecessary-pass,no-else-return,useless-else-on-loop # pylint: disable=undefined-variable,consider-using-sys-exit,unused-variable,too-many-return-statements # pylint: disable=redefined-outer-name,using-constant-test,unused-argument # pylint: disable=broad-except, not-context-manager, no-m...
3,402
created by
# 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__ ...
3,403
test no interpreter set
# (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
3,404
nunit
from align.cell_fabric import SingleGrid, EnclosureGrid from align.cell_fabric import CenterLineGrid, UncoloredCenterLineGrid from align.cell_fabric import Canvas as AbstractCanvas from align.cell_fabric import Wire, Via, Region class Canvas(AbstractCanvas): def __init__( self): super().__init__() ...
3,405
deploy prereq
""" This module provides base class for OCP deployment. """ import logging import os import json import pytest import yaml from ocs_ci.framework import config from ocs_ci.ocs import constants from ocs_ci.ocs.openshift_ops import OCP from ocs_ci.utility import utils, templating, system from ocs_ci.deployment.disconnec...
3,406
extract
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging from collections import namedtuple from itertools import groupby from typing import ( Any, Dict, Iterator, Union, ) from pyhocon import ConfigFactory, ConfigTree from databuilder import Scoped from databuilder....
3,407
reparent image
import toga from toga.constants import CENTER, COLUMN, HIDDEN, ROW, VISIBLE from toga.style import Pack class ExampleLayoutApp(toga.App): def startup(self): self.button_hide = toga.Button( text="Hide label", style=Pack(padding=10, width=120), on_press=self.hide_label, ...
3,408
get columns
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import copy import frappe from frappe import _ from frappe.query_builder.functions import IfNull from frappe.utils import date_diff, flt, getdate def execute(filters=None): if not filters: retu...
3,409
name
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import benchexec.result as result import benchexec.tools.template from benchexe...
3,410
es format datetime
import json import time from datetime import datetime, timedelta, timezone from django.conf import settings from django.core.management.base import CommandError from django.db.backends.base.creation import TEST_DATABASE_PREFIX from corehq.apps.es.exceptions import TaskError, TaskMissing from corehq.util.es.elasticsea...
3,411
extract candidates
from typing import List from fastapi import HTTPException from fastapi.encoders import jsonable_encoder from pydantic import BaseModel, StrictFloat, StrictStr, ValidationError, validator from mlflow.gateway.config import MlflowModelServingConfig, RouteConfig from mlflow.gateway.constants import MLFLOW_SERVING_RESPONS...
3,412
pytest generate tests
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Anshuman Bhaduri # Copyright (c) 2014 Sean Vig # Copyright (c) 2014-2015 Tycho Andersen # # 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 Soft...
3,413
get api operation policy
# 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__ ...
3,414
load selective
""" Module to load Family into project """ #pylint: disable=import-error,invalid-name,broad-except,superfluous-parens import os import re from pyrevit.framework import clr from pyrevit import forms, revit, DB, script logger = script.get_logger() class FamilyLoader: """ Enables loading a family from an absol...
3,415
update to one
from inkex import errormsg from .elements import EmbroideryElement from .i18n import _ from .metadata import InkStitchMetadata from .svg import PIXELS_PER_MM from .svg.tags import EMBROIDERABLE_TAGS, INKSTITCH_ATTRIBS INKSTITCH_SVG_VERSION = 1 def update_inkstitch_document(svg, selection=None): document = svg.g...
3,416
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 __all__ =...
3,417
append random iv
import hashlib import json import random from base64 import decodebytes, encodebytes from pubnub.crypto_core import PubNubCrypto from Cryptodome.Cipher import AES from Cryptodome.Util.Padding import pad, unpad Initial16bytes = '0123456789012345' class PubNubCryptodome(PubNubCrypto): mode = AES.MODE_CBC fal...
3,418
disable permute
# 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...
3,419
assert equivalent
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import abc import numpy as np import pandas as pd import nevergrad.common.typing as tp from nevergrad.common import testing...
3,420
test multiple region three sets of positions
import json import unittest from io import StringIO from micall.utils.projects_dump import check_key_positions class CheckKeyPositionsTest(unittest.TestCase): def setUp(self): self.warningIO = StringIO() def testSingleRegion(self): projects = json.loads("""\ { "R1": { "max_variants...
3,421
on reset
from __future__ import annotations import random from typing import Optional from src import users, config from src.cats import role_order, Win_Stealer from src.containers import UserDict from src.events import Event, event_listener from src.functions import get_all_players, change_role from src.messages import messa...
3,422
remove
import sys import time from multiprocessing import Process, SimpleQueue, set_start_method from avocado.core.nrunner.app import BaseRunnerApp from avocado.core.nrunner.runner import RUNNER_RUN_STATUS_INTERVAL, BaseRunner from avocado.core.utils import messages from avocado.utils.software_manager.main import MESSAGES fr...
3,423
agent
from __future__ import annotations import traceback from copy import deepcopy import cv2 import numpy as np from matplotlib import pyplot as plt from PIL import Image, ImageDraw, ImageFont from .. import __rootdir__ from ..data import agent_list,ocr_error from . import segment from .image import saveimg from .log im...
3,424
print
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import cProfile import functools import os import pstats import timeit from contextlib import contextmanager from io import StringIO from prettytable import ALL, PrettyTable FILE = os.path.abspath(__file__) PROF_DIR = os.path.joi...
3,425
from json dict convenience
from __future__ import annotations from dataclasses import dataclass from typing import Dict, Generic, List, Optional, Tuple, TypeVar from chia.consensus.coinbase import farmer_parent_id, pool_parent_id from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 fro...
3,426
list share subscription source share synchronization settings
# 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...
3,427
logs tags
import abc import os import time from typing import Any from typing import Dict from typing import List from typing import Optional from typing import TYPE_CHECKING from ddtrace.constants import SPAN_MEASURED_KEY from ddtrace.contrib.trace_utils import int_service from ddtrace.internal.dogstatsd import get_dogstatsd_c...
3,428
write application
############################################################################### # # App - A class for writing the Excel XLSX App file. # # Copyright 2013-2017, John McNamara, jmcnamara@cpan.org # # Package imports. from . import xmlwriter class App(xmlwriter.XMLwriter): """ A class for writing the Excel XLSX...
3,429
make pixel extractor
"""Helper methods for accessing single pixel from a rasterio file object. """ import rasterio import rasterio.crs import rasterio.warp from typing import Iterable, List, Optional, Tuple, Union RowCol = Tuple[int, int] XY = Tuple[float, float] LonLat = Tuple[float, float] SomeCoord = Union[RowCol, XY, LonLat] PixelVal...
3,430
decimation
# # Copyright 2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr from gnuradio import blocks import sys import math from . import fft_python as fft from . import fft_vfc, fft_vcc from .fft_python import window try: from...
3,431
to str
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.28 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
3,432
test max request size per handler
"""Tests for the CherryPy configuration system.""" import os import cherrypy from cherrypy.test import helper localDir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # Client-side code # class ServerConfigTests(helper.CPWebCase): @staticmethod...
3,433
update items
#!/usr/bin/env python # --!-- coding: utf8 --!-- from PyQt5.QtCore import Qt, QModelIndex, QMimeData from PyQt5.QtGui import QBrush, QColor from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem from lxml import etree as ET from manuskript import settings from manuskript.enums import Plot, Outline, PlotStep from man...
3,434
flushheaders
"""Generic MIME writer. This module defines the class MimeWriter. The MimeWriter class implements a basic formatter for creating MIME multi-part files. It doesn't seek around the output file nor does it use large amounts of buffer space. You must write the parts out in the order that they should occur in the final f...
3,435
test is iterable
# 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...
3,436
download
import os import os.path as osp import networkx as nx import numpy as np import requests import scipy.sparse as sp from sklearn.model_selection import train_test_split from spektral.data import Dataset, Graph from spektral.datasets.utils import DATASET_FOLDER from spektral.utils.io import load_binary class Citation...
3,437
add item
import Screens.InfoBar from enigma import eServiceReference, eTimer from Screens.Screen import Screen from Components.ServiceScan import ServiceScan as CScan from Components.ProgressBar import ProgressBar from Components.Label import Label from Components.ActionMap import ActionMap from Components.MenuList import Menu...
3,438
draw 4
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # You can run this .tac file directly with: # twistd -ny demo_insults.tac # # Re-using a private key is dangerous, generate one. # # For this example you can use: # # $ ckeygen -t rsa -f ssh-keys/ssh_host_rsa_key """ Various simple terminal ma...
3,439
test custom packagers
# 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...
3,440
test bbox json yes
"""Tests for `$ fio cat`.""" from click.testing import CliRunner from fiona.fio.main import main_group def test_one(path_coutwildrnp_shp): runner = CliRunner() result = runner.invoke(main_group, ['cat', path_coutwildrnp_shp]) assert result.exit_code == 0 assert result.output.count('"Feature"') == 6...
3,441
train
""" [Graph Attention Networks] (https://arxiv.org/abs/1710.10903) """ import dgl.sparse as dglsp import torch import torch.nn as nn import torch.nn.functional as F from dgl.data import CoraGraphDataset from torch.optim import Adam class GATConv(nn.Module): def __init__(self, in_size, out_size, num_heads, dropout...
3,442
build test graph
# Copyright 2017 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...
3,443
get termcolor opts
#!/usr/bin/env python """ Larch show() function """ import os import sys import types import numpy from larch import Group TERMCOLOR_COLORS = ('grey', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') def get(sym=None, _larch=None): """get object from symbol table from symbol name: >>> g = grou...
3,444
test multiple renders multiple unique slugs
import os from unittest.mock import patch from django.http import HttpRequest from django.template import engines from django.test import SimpleTestCase, TestCase, override_settings from core.tests.templatetags.test_svg_icon import VALID_SVG @override_settings( STATICFILES_DIRS=[ os.path.join(os.path.di...
3,445
on open shell
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
3,446
all hamming
import sys """ reference: dict_trie """ if sys.version_info.major < 3: from itertools import imap as map def _add(root, word, count): """Add a word to a trie. :arg dict root: Root of the trie. :arg str word: A word. :arg int count: Multiplicity of `word`. """ node = root for char ...
3,447
build arguments schema
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
3,448
get funding rate history
""" Base class for FuturesExchangeInterfaces. Provides common functionality for Futures Exchanges. Copyright (C) 2022 Matias Kotlik This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software ...
3,449
check platform type
import os import shutil import sys import time from typing import Any, NoReturn, Optional from .setting import ( CompilerType, LOG_DIR, PROFILE_DIR, TestList, TestPlatform, TestType, ) def convert_time(seconds: float) -> str: seconds = int(round(seconds)) seconds = seconds % (24 * 360...
3,450
pytest runtest makereport
# Copyright (C) 2015-2022, Wazuh Inc. # Created by Wazuh, Inc. <info@wazuh.com>. # This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 import pytest from py.xml import html import re from numpydoc.docscrape import FunctionDoc def pytest_addoption(parser): # Get comman...
3,451
get sampled df
""" This module provides the `SparkDataFrameConverter` class, which allows converting a `pyspark` `DataFrame` into a list of dictionaries representing series. """ from types import ModuleType from typing import List, Tuple from ipyvizzu.data.converters.defaults import NAN_DIMENSION, NAN_MEASURE from ipyvizzu.data.con...
3,452
parse default
from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.http import Request from scrapy.utils.test import get_crawler from tests.mockserver import MockServer from tests.spiders import MockServerSpider class InjectArgumentsDownloaderMiddleware: ...
3,453
calc new mode
# # This file is part of the CernVM File System. # import argparse class TreeNode: def __init__(self, mode): self.children = {} self.mode = mode def getString(self, prefix, wildcard): stringRes = '' if self.mode == '!': stringRes = '!' + prefix + '\n' if not wildcard: if self.mode ...
3,454
deps
# Copyright (C) 2017 - Daniele Forghieri # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is dis...
3,455
cancel
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2010. All Rights Reserved. # # # THIS IMPORT MUST COME FIRST # import mainUtils FIRST to get python version check # from qautils.gppylib.mainUtils import * import os, sys, traceback gProgramName = os.path.split(sys.argv[0])[-1] from qautils.gppylib.commands.base i...
3,456
run bpython
import fcntl import os import pty import struct import sys import termios import textwrap import unittest from bpython.test import TEST_CONFIG from bpython.config import getpreferredencoding try: from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.internet.protoco...
3,457
test readonly list del
import re from typing import Any, Callable, Dict, List, Union from pytest import mark, param, raises from omegaconf import DictConfig, ListConfig, OmegaConf, ReadonlyConfigError @mark.parametrize( "src, func, expectation", [ param( {}, lambda c: c.__setitem__("a", 1), ...
3,458
process option executable
""" Config module. """ from importlib import import_module from typing import Any, List from rebulk import Rebulk _regex_prefix = 're:' _import_prefix = 'import:' _import_cache = {} _eval_prefix = 'eval:' _eval_cache = {} _pattern_types = ('regex', 'string') _default_module_names = { 'validator': 'guessit.rules.c...
3,459
listdir ifcfg2
import errno import textwrap from os.path import basename import mock import six from leapp.libraries.actor import ifcfgscanner from leapp.libraries.common.testutils import make_OSError, produce_mocked from leapp.libraries.stdlib import api from leapp.models import IfCfg _builtins_open = "builtins.open" if six.PY3 e...
3,460
execute update cache
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import requests import grpc from loguru import logger as LOG import kv_pb2 as KV import http_pb2 as HTTP import kv_pb2_grpc as Service from google.protobuf.empty_pb2 import Empty as Empty class WikiCacherExecutor...
3,461
expand tuples
# mako/pyparser.py # Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handles parsing of Python code. Parsing to AST is done via _ast on Python > 2.5, otherwise the co...
3,462
test df to records mixed emoji type
# 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...
3,463
check view call
#!/usr/bin/env python3 """ Prober that is compatible with cloudprober. The ProberSplit queries two nodes for blocks and chunks at random heights and compares the results. The expectation is that the block and chunks at each height will be identical even when fetched from two different nodes. It also executes a contrac...
3,464
get option value from boolean
from __future__ import annotations from collections import namedtuple from typing import Any, Iterable, Mapping, Optional, Union from sentry.models.user import User from sentry.notifications.types import ( FineTuningAPIKey, NotificationScopeType, NotificationSettingOptionValues, NotificationSettingTyp...
3,465
test add repeated item
import pytest from reconcile.utils.aggregated_list import ( AggregatedDiffRunner, AggregatedList, ) class TestAggregatedList: @staticmethod def test_add_item(): alist = AggregatedList() params = {"a": 1, "b": 2} items = ["qwerty"] alist.add(params, items) as...
3,466
parse args
#!/usr/bin/python3 # # Copyright (C) 2019 Mario Limonciello <mario.limonciello@dell.com> # # SPDX-License-Identifier: LGPL-2.1+ import dbus import os.path import sys import tempfile import gi try: gi.require_version("Fwupd", "2.0") except ValueError: print("Missing gobject-introspection packages. Try to inst...
3,467
on validation end
import warnings from packaging import version import optuna from optuna.storages._cached_storage import _CachedStorage from optuna.storages._rdb.storage import RDBStorage # Define key names of `Trial.system_attrs`. _EPOCH_KEY = "ddp_pl:epoch" _INTERMEDIATE_VALUE = "ddp_pl:intermediate_value" _PRUNED_KEY = "ddp_pl:p...
3,468
batches
# Copyright 2016 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
3,469
is preempt requested
# The Notices and Disclaimers for Ocean Worlds Autonomy Testbed for Exploration # Research and Simulation can be found in README.md in the root directory of # this repository. import rospy import actionlib from abc import ABC, abstractmethod class ActionServerBase(ABC): """A base class that standardizes handling o...
3,470
import capsulebv
"""This script contains classes to import collision objects.""" # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2020, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
3,471
test warn seed unnecessary
import pytest import os from rasa.shared.core.events import UserUttered, SessionStarted from rasa.shared.core.trackers import DialogueStateTracker from rasa.shared.core.domain import Domain from rasa.shared.exceptions import RasaException from rasa.core.evaluation.marker_tracker_loader import ( MarkerTrackerLoader,...
3,472
rank
# 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 ...
3,473
test rmsf gmx
# 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. import biotite.structure as struc import biotite.structure.io as strucio import biotite.structure.io.mmtf as mmtf from os.path import join import numpy as np import...
3,474
new
from sys import exit import click from click.types import convert_type from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound from redash import models from redash.query_runner import ( get_configuration_schema_for_query_runner_type, query_runners, ) from redash.utils import json_loads fr...
3,475
try resync autojump threshold
import time from math import inf from .. import _core from .._abc import Clock from .._util import Final from ._run import GLOBAL_RUN_CONTEXT ################################################################ # The glorious MockClock ################################################################ # Prior art: # ht...
3,476
save options
"""Configuration window for Match tool.""" #pylint: disable=E0401,C0111,W0613 from pyrevit import HOST_APP from pyrevit import forms from pyrevit import script class MatchPropConfigWindow(forms.WPFWindow): def __init__(self, xaml_file_name): forms.WPFWindow.__init__(self, xaml_file_name) self._co...
3,477
right
# Title: Dijkstra's Algorithm for finding single source shortest path from scratch # Author: Shubham Malik # References: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm # Part of Cosmos by OpenGenus Foundation import math import sys class PriorityQueue: # Based on Min Heap def __init__(self): sel...
3,478
plot xvs y
""" Estimate Sobol' indices for the Ishigami function by a sampling method: a quick start guide to sensitivity analysis =================================================================================================================== """ # %% # # In this example, we estimate the Sobol' indices for the :ref:`Ishigami ...
3,479
remove
import functools import os import stat from conans import AutoToolsBuildEnvironment, ConanFile, tools from conans.errors import ConanInvalidConfiguration required_conan_version = ">=1.43.0" class NetSnmpConan(ConanFile): name = "net-snmp" description = ( "Simple Network Management Protocol (SNMP) is...
3,480
hundred non zero
from collections import defaultdict import pynini from fun_text_processing.text_normalization.de.utils import get_abs_path, load_labels from fun_text_processing.text_normalization.en.graph_utils import ( DAMO_DIGIT, DAMO_SIGMA, GraphFst, delete_space, insert_space, ) from pynini.lib import pynutil...
3,481
add
import schemas from chalicelib.core import integration_base from chalicelib.core.integration_jira_cloud_issue import JIRACloudIntegrationIssue from chalicelib.utils import pg_client, helper PROVIDER = schemas.IntegrationType.jira def obfuscate_string(string): return "*" * (len(string) - 4) + string[-4:] class ...
3,482
list steps
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with the Amazon EMR API to create and manage clusters and job steps. """ import logging from botocore.exceptions import ClientError logger = logging...
3,483
notify patch build created
from django.utils import timezone from django.db import transaction from squad.celery import app as celery from squad.core.models import ProjectStatus, Build, DelayedReport from squad.core.notification import send_status_notification import requests @celery.task def maybe_notify_project_status(status_id): """ ...
3,484
newlines
import abc import builtins import codecs import sys from _typeshed import FileDescriptorOrPath, ReadableBuffer, WriteableBuffer from collections.abc import Callable, Iterable, Iterator from os import _Opener from types import TracebackType from typing import IO, Any, BinaryIO, TextIO from typing_extensions import Liter...
3,485
test client sas credential async
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import pytes...
3,486
throttle
# Copyright 2016 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...
3,487
active summary items
#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\# import os import sys from GangaCore.Core.exceptions import PluginError from GangaCore.Utility.Shell import Shell from GangaCore.Utility.logging import getLogger from GangaLHCb.Lib.RTHandlers.LHCbGaudiRunTimeHandler import LHCbGaudiRunTimeHa...
3,488
set request header
# Copyright 2017 Workiva # 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 #...
3,489
get length in bits
# # 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...
3,490
test load postgres plugin
from asynctest import mock as async_mock, TestCase as AsyncTestCase from .. import wallet_plugin as test_module class TestWalletCrypto(AsyncTestCase): def setUp(self): test_module.LOADED = False async def test_file_ext(self): assert test_module.file_ext() def METHOD_NAME(self): ...
3,491
main
# @file # Split a file into two pieces at the request offset. # # Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import argparse import os import io import shutil import logging import sys import tempfile parser = argparse.Ar...
3,492
test help
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from typing import Optional from unittest.mock import AsyncMock, patch from click.testing import CliR...
3,493
es query string
""" Copyright(C) 2015-2020, Stamus Networks Written by Eric Leblond <eleblond@stamus-networks.com> This file is part of Scirius. Scirius 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...
3,494
test ai examples example clean from http
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
3,495
activate
from __future__ import annotations from typing import TYPE_CHECKING from typing import Any from typing import Callable import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.package import Package from poetry.plugins.application_plugin import ApplicationPlugin from poetry.plu...
3,496
port end
# sfputil.py # # Platform-specific SFP transceiver interface for SONiC # try: import time from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) class SfpUtil(SfpUtilBase): """Platform-specific SfpUtil class""" PORT_STA...
3,497
get train dicts
# Copyright 2020-2023 OpenDR European Project # # 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 agree...
3,498
save index
import json import random import subprocess from pathlib import Path from typing import Set, Union from librelingo_types.data_types import Course, PhraseIdentity from librelingo_utils import audio_id from librelingo_audios.functions import list_required_audios def update_audios_for_course( output_path: str, cou...
3,499
tophub context
# 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...