id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
100
get num thermals
#!/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...
101
parse record
# -*- coding: utf-8 -*- """Text parser plugin for vsftpd log files.""" import pyparsing from dfdatetime import time_elements as dfdatetime_time_elements from plaso.containers import events from plaso.lib import errors from plaso.parsers import text_parser from plaso.parsers.text_plugins import interface class Vsft...
102
test copy file fails if not authenticated
from ipaddress import IPv4Address from pathlib import PureWindowsPath from typing import List from unittest.mock import MagicMock import pytest from agent_plugins.exploiters.wmi.src.smb_client import ShareInfo, SMBClient from agent_plugins.exploiters.wmi.src.smb_options import SMBOptions from agent_plugins.exploiters....
103
keys
# Authors: # Trevor Perrin # Martin von Loewis - python 3 port # # See the LICENSE file for legal information regarding use of this file. """Base class for SharedKeyDB and VerifierDB.""" try: import anydbm except ImportError: # Python 3 import dbm as anydbm import threading import time import logging...
104
has gdrcopy
import subprocess import functools from common import SshConnectionError, is_ssh_connection_error, has_ssh_connection_err_msg, ClientServerTest from retrying import retry def efa_run_client_server_test(cmdline_args, executable, iteration_type, completion_semantic, memory_type, message_si...
105
build
"""scons.Node.Alias Alias nodes. This creates a hash of global Aliases (dummy targets). """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # 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 So...
106
a3 plus
# Copyright (c) 2017 The University of Manchester # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
107
run
#!/usr/bin/python # ----------------------------------------------------------------------------- # Copyright Siemens AG, 2021. Part of the SW360 Portal Project. # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.ecl...
108
docker container inspect
# pylint:disable=redefined-outer-name # pylint:disable=unused-argument import asyncio import logging from collections.abc import Iterable from typing import Final import pytest from fastapi import FastAPI from pydantic import PositiveFloat, PositiveInt from pytest_mock import MockerFixture from pytest_simcore.helpers...
109
compute d p4deps rho
#------------------------------------------------------------------------------- # TillotsonEquationOfState #------------------------------------------------------------------------------- from PYB11Generator import * from SolidEquationOfState import * from EOSAbstractMethods import * @PYB11template("Dimension") @PYB1...
110
make layer
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
111
derive flops
from matplotlib import rcParams import os rcParams.update({'figure.autolayout': True}) KINDS = ["bar", "hist", "line"] METRICS = {"bandwidth": "bandwidth(GiB/s)", "FLOPS": "GFLOPS", "speedup": "time(s)/time(s)", "throughput": "throughput(GProblemsize/s)", "time/rep": "time/...
112
apply max
import inspect from PYB11Generator import * from FieldBase import FieldBase from Field import Field #------------------------------------------------------------------------------- # Add numeric operations to a Field #------------------------------------------------------------------------------- @PYB11template("Dimen...
113
test flow single protocol default random port
import itertools import os.path import pytest import requests as req from docarray import Document, DocumentArray from jina import Client, Executor, Flow, requests from jina.helper import random_port PROTOCOLS = ['grpc', 'http', 'websocket'] cur_dir = os.path.dirname(__file__) class MyExecutor(Executor): @requ...
114
add events to session
import logging import json from typing import Dict, List, Optional from moonstreamdb.blockchain import AvailableBlockchainType, get_label_model from moonstreamdb.models import Base from moonworm.crawler.function_call_crawler import ContractFunctionCall # type: ignore from sqlalchemy.orm import Session from ..setting...
115
raise exc
import asyncio import asynctest from stig.client.errors import AuthError, ConnectionError from stig.client.poll import RequestPoller class TestRequestPoller(asynctest.ClockedTestCase): def setUp(self): self.mock_request_args = None self.mock_request_kwargs = None self.mock_request_calls ...
116
get next week
import datetime from collections.abc import Sequence from typing import Any, TypeVar from django.db import models from django.db.models.query import QuerySet from django.http import HttpRequest, HttpResponse from django.utils.datastructures import _IndexableCollection from django.views.generic.base import View from dj...
117
method
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
118
test list outputs only
import json from dvc.cli import parse_args from dvc.commands.ls import CmdList def _test_cli(mocker, *args): cli_args = parse_args(["list", *args]) assert cli_args.func == CmdList cmd = cli_args.func(cli_args) m = mocker.patch("dvc.repo.Repo.ls") assert cmd.run() == 0 return m def test_li...
119
flatten
from typing import List, Optional, NamedTuple from mlagents.torch_utils import torch import numpy as np from mlagents.trainers.torch_entities.utils import ModelUtils from mlagents.trainers.buffer import AgentBuffer, BufferKey from mlagents_envs.base_env import _ActionTupleBase class LogProbsTuple(_ActionTupleBase): ...
120
mock io call
""" Benchmark for async tree workload, which calls asyncio.gather() on a tree (6 levels deep, 6 branches per level) with the leaf nodes simulating some (potentially) async work (depending on the benchmark variant). Benchmark variants include: 1) "none": No actual async work in the async tree. 2) "io": All leaf nodes s...
121
test check
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os import pytest from six import PY2 from datadog_checks.dev.utils import get_metadata_metrics from datadog_checks.kong import Kong from .common import HERE, METRICS_URL pytestmark = [pytest.mar...
122
test templatetags get related category pages draft
"""Test suite for the GetRelatedCategories template tag.""" from django.test import RequestFactory from cms.api import add_plugin from cms.test_utils.testcases import CMSTestCase from richie.apps.core.factories import PageFactory from richie.apps.courses.factories import CategoryFactory class GetRelatedCategoriesTe...
123
test non critical cleanups not called
# pylint: disable=unused-argument,unused-variable,redefined-outer-name import gossip import pytest import slash import slash.hooks from .conftest import Checkpoint def test_interruption(interrupted_suite, interrupted_index): interrupted_suite.run(expect_interruption=True) def test_interruption_added_to_result...
124
test create blob outside workdir
# Copyright 2010-2023 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public License, # the authors give ...
125
on textinput gain focus
import random from travertino.constants import COLUMN import toga from toga.style import Pack WIDGETS_GROUP = toga.Group("Widgets", order=2) FOCUS_ORDER_GROUP = toga.Group("Focus Order", order=3) class ExampleFocusApp(toga.App): def startup(self): # Window class # Main window of the applicati...
126
split and sort
"""pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers. """ import contextlib import difflib import gc import re import textwrap import pytest # Early diagnostic for failed imports import pybind11_tests _...
127
build
#!/usr/bin/env python # # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright...
128
copy
#!/usr/bin/env python import logging l = logging.getLogger("claripy.frontends.full_frontend") from ..frontend import Frontend _VALIDATE_BALANCER = False class HybridFrontend(Frontend): def __init__(self, exact_frontend, approximate_frontend, approximate_first=False, **kwargs): Frontend.__init__(self, ...
129
serialize results
# 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...
130
gettransactions
# -*- coding: utf-8 -*- # # BitcoinLib - Python Cryptocurrency Library # Litecore.io Client # © 2018-2022 October - 1200 Web Development <http://1200wd.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publ...
131
test voltage to uint16
import unittest import numpy as np try: import zhinst.utils except ImportError: zhinst = None from qupulse.utils.types import TimeType from qupulse.hardware.util import voltage_to_uint16, find_positions, get_sample_times, not_none_indices, \ zhinst_voltage_to_uint16 from tests.pulses.sequencing_dummies i...
132
adjust
""" This file defines some primitives to draw a circuit schematic on Widgets. For now it is only used in IqManagerWidget. """ import os.path as osp from qtpy import QtCore, QtWidgets, QtGui IMAGE_PATH = osp.join(osp.split(osp.dirname(__file__))[0], "images") class MyLabelSignal(QtWidgets.QLabel): pass class M...
133
parse footnote reference
#!/usr/bin/env python3 """Convert Google Docs V1 API's JSON to Markdown. """ __copyright__ = "Copyright (C) 2019 Martin Blais" __license__ = "GNU GPLv2" from os import path import argparse import textwrap import datetime import hashlib import collections import json import logging import os import pickle import ppri...
134
download with login
# coding: utf-8 #!/usr/bin/env python # encoding: utf-8 ''' Wrapper script around common use of i18n. 1. Add new language: creates PO files and instruct how to add to transifex. 2. Update languages: Regenerate English PO files. TX gets it automaticaly. 3. Update translations: download translations f...
135
url
# -*- coding: utf-8 -*- from time import time from uuid import uuid5, NAMESPACE_URL from urllib.parse import urlencode def clean(data): """Remove all keys where value is None""" return dict((k, v) for k, v in data.items() if v is not None) DEFAULT_VARS = { "string": "", "integer": 0, "number": ...
136
test save
import unittest from os.path import join from rastervision.pipeline.file_system.utils import get_tmp_dir, file_exists from rastervision.core.box import Box from rastervision.core.data import (ClassConfig, IdentityCRSTransformer, ChipClassificationGeoJSONStore) from rastervision.core...
137
format value
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...
138
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...
139
test handle message dump one
from typing import List import pytest from mock import AsyncMock from opentrons.drivers.rpi_drivers.types import USBPort from opentrons.hardware_control.emulation.module_server import ( helpers, ModuleStatusClient, ) from opentrons.hardware_control.emulation.module_server import models from opentrons.hardware_...
140
get object from version
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig import logging from alembic.operations import Operations, MigrateOperation from flask import current_app # this is the Alembic Config object, which provides # access ...
141
parse downloads
import re from loguru import logger from flexget import plugin from flexget.components.sites.urlrewriting import UrlRewritingError from flexget.event import event from flexget.utils import requests from flexget.utils.soup import get_soup logger = logger.bind(name='serienjunkies') regex_single_ep = re.compile(r'(S\d...
142
solve
import numpy as np from scipy.sparse import bmat from scipy.sparse.linalg import spsolve import vtk import vtk.util.numpy_support as vnp from fealpy.decorator import barycentric from fealpy.functionspace import IsoLagrangeFiniteElementSpace class PhaseFieldCrystalModel(): def __init__(self, mesh, timeline, optio...
143
main
import os import sys from time import time sys.path.append(".") import mindspore as ms import mindspore.nn as nn from mindspore import Tensor, ops from mindspore.communication import get_group_size, get_rank, init from mindspore.parallel._utils import _get_device_num, _get_gradients_mean from mindcv.data import crea...
144
random bdims
# Copyright 2021 The JAX 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
145
test help advanced global
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import re import textwrap from pants.testutil.pants_integration_test import run_pants from pants.util.docutil import doc_url def test_help() -> None: pants_run = run_pan...
146
ltp bind payload
# SPDX-License-Identifier: GPL-2.0-or-later # This file is part of Scapy # See https://scapy.net/ for more information # Copyright 2012 (C) The MITRE Corporation """ .. centered:: NOTICE This software/technical data was produced for the U.S. Government under Prime Contract No. NASA-03001 and JPL Contract N...
147
gl debug wrapper
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """This module provides a (functional) API to OpenGL ES 2.0. There are multiple backend implementations of this API, available as submodules of this module. On...
148
test one of every n export versions
# 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...
149
compile
#!/usr/bin/env python3 # Contest Management System - http://cms-dev.github.io/ # Copyright © 2010-2012 Giovanni Mascellani <mascellani@poisson.phc.unipi.it> # Copyright © 2010-2018 Stefano Maggiolo <s.maggiolo@gmail.com> # Copyright © 2010-2012 Matteo Boscariol <boscarim@hotmail.com> # Copyright © 2012-2013 Luca Wehrs...
150
extract module names
from __future__ import annotations from typing import Iterable, Set import mypy.types as types from mypy.types import TypeVisitor from mypy.util import split_module_names def METHOD_NAME(type_name: str | None) -> list[str]: """Returns the module names of a fully qualified type name.""" if type_name is not N...
151
create tiles
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """Test desispec.specstatus """ import unittest, os import numpy as np from astropy.table import Table from desispec.specstatus import update_specstatus class TestSpecStatus(unittest.TestCase): """Test desispec.specstatus ...
152
test repeated qubit
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
153
create subdomain id
import logging import os import re import shortuuid from libs.python.helperJson import addKeyValuePair, saveJsonToFile from libs.python.helperServices import BTPSERVICE log = logging.getLogger(__name__) def getTimingsForStatusRequest(btpUsecase, thisService): search_every_x_seconds = btpUsecase.repeatstatusrequ...
154
graph positional encoder
from typing import Tuple, Union, Optional, Dict, Any, OrderedDict from copy import deepcopy import numpy as np import torch from scipy.sparse import spmatrix from collections import OrderedDict as OderedDictClass from graphium.features.spectral import compute_laplacian_pe from graphium.features.rw import compute_rwse ...
155
validate name
from rest_framework import fields, serializers from .primitive_serializers import FilterBlobSerializer, FilterPreviewSerializer from .media import api_safely_get_medium_object from .models import DestinationConfig, Filter, Media, NotificationProfile, TimeRecurrence, Timeslot class TimeRecurrenceSerializer(serializer...
156
get dates
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
157
get channel ids
from __future__ import absolute_import, division, print_function import NuRadioReco.framework.base_station import NuRadioReco.framework.channel import NuRadioReco.framework.sim_channel import collections try: import cPickle as pickle except ImportError: import pickle import logging logger = logging.getLogger('S...
158
update attribute
"""Map from manufacturer to standard clusters for electric heating thermostats.""" import logging from zigpy.profiles import zha import zigpy.types as t from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_...
159
parse txt
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from dataclasses import dataclass from pathlib import Path from typing import Any, Iterable import numpy as np from scipy.io import loadmat from ..logging import logger from ..mod...
160
get requests 24hrs ago
import datetime import logging from django.conf import settings from memoized import memoized from django.db import models from corehq.apps.domain.models import Domain log = logging.getLogger(__name__) class RegistrationRequest(models.Model): tos_confirmed = models.BooleanField(default=False) request_time...
161
test zero mean
from unittest import TestCase import numpy as np from aspire.basis import FFBBasis2D from aspire.covariance import BatchedRotCov2D, RotCov2D from aspire.noise import WhiteNoiseAdder from aspire.operators import RadialCTFFilter from aspire.source.simulation import Simulation from aspire.utils import utest_tolerance ...
162
test02 chi2 thin back side
import pytest import drjit as dr import mitsuba as mi def test00_construction_and_lobes(variant_scalar_rgb): # By default the BSDF should only have 2 lobes, no anisotropic / transmission b = mi.load_dict({ 'type': 'principledthin', }) assert b.component_count() == 3 assert mi.has_flag(b.fl...
163
tau y
# Copyright (c) 2017 The University of Manchester # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
164
parse bytes
#!/usr/bin/env python3 # Copyright 2021 The Kubernetes 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 appl...
165
analyser osmosis full
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2011 ## ## ...
166
fc name
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # # Copyright (C) 2006 Red Hat # see file 'COPYING' for use and warranty information # # 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; v...
167
payload encryption cryptobox
# automatically generated by the FlatBuffers compiler, do not modify # namespace: proto import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class PublisherFeatures(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode....
168
get fullpath
################################################################################ # Copyright (C) 2023 Maxim Integrated Products, Inc., All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to d...
169
test get dockerrun happy case
# Copyright 2017 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 accompa...
170
reduce mean
# Copyright (c) 2020 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...
171
next
"""A readline()-style interface to the parts of a multipart message. The MultiFile class makes each part of a multipart message "feel" like an ordinary file, as long as you use fp.readline(). Allows recursive use, for nested multipart messages. Probably best used together with module mimetools. Suggested use: real...
172
compute shapes
# Copyright (c) 2020 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 applic...
173
cmake args
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Pumi(CMakePackage): """SCOREC RPI's Parallel Unstructured Mesh Infrastructure (PUM...
174
seek
#!/usr/bin/env python3 # # Cross Platform and Multi Architecture Advanced Binary Emulation Framework # import contextlib import logging from typing import ( Iterator, Set ) from ..abc import CodeStreamAPI from ..validation import ( validate_is_bytes, ) from ..vm.opcode_values import ( PUSH1, PUSH...
175
set path
from typing import Any, Optional, Union from AnyQt.QtWidgets import ( QGraphicsItem, QGraphicsObject, QStyleOptionGraphicsItem, QWidget ) from AnyQt.QtGui import ( QPainterPath, QPainterPathStroker, QBrush, QPen, QPainter, QColor ) from AnyQt.QtCore import Qt, QPointF, QRectF from AnyQt.QtCore import pyqtSigna...
176
test copy hbm2ddr
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. from dace import subsets as sbs, dtypes, memlet as mem import dace import numpy as np from dace.codegen.targets.fpga import _FPGA_STORAGE_TYPES from dace.dtypes import StorageType from dace.fpga_testing import fpga_test, xilinx_test # A test c...
177
get next
# 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...
178
add
from __future__ import annotations from pathlib import Path from typing import Dict, Optional, Text, Any, List import rasa.shared.utils.io from rasa.engine.graph import ExecutionContext, GraphComponent from rasa.engine.storage.storage import ModelStorage from rasa.engine.storage.resource import Resource class AddIn...
179
read profile
import collections import os import re import sys from dataclasses import dataclass, field from typing import Sequence _CONTRACT_PAT = re.compile(r"(\w+) <Contract>") _FUNCTION_PAT = re.compile(r".+─ (\w+)\s+-\s+avg:\s+(\d+)") _ANSI_ESCAPE_PAT = re.compile( r""" \x1B # ESC (?: # 7-bit C1 Fe (except CSI)...
180
render report
from akvo.rsr.models import Project from akvo.utils import ensure_decimal from akvo.rsr.decorators import with_download_indicator from datetime import datetime from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from pyexcelerate import Workbook, Style, Font, Fill, C...
181
get client
# # (C) Copyright Cloudlab URV 2020 # # 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 wr...
182
get special fields
import itertools from django.utils.translation import gettext as _ from dimagi.ext import jsonobject from corehq.apps.app_manager.app_schemas.case_properties import ( get_all_case_properties_for_case_type, ) from corehq.apps.case_importer.util import RESERVED_FIELDS from corehq.apps.data_dictionary.util import g...
183
post
import logging from django.http import HttpResponseRedirect from django.shortcuts import render from django.utils.translation import gettext_lazy as _ from django.views.generic import UpdateView from rdmo.core.views import ObjectPermissionMixin, RedirectViewMixin from rdmo.questions.models import Catalog from rdmo.tas...
184
test custom theme override
"""Tests for embargo app views. """ from unittest.mock import patch, MagicMock import ddt import maxminddb import geoip2.database from django.urls import reverse from django.conf import settings from .factories import CountryAccessRuleFactory, RestrictedCourseFactory from .. import messages from lms.djangoapps.cou...
185
add party
# -*- coding: utf-8 -*- """ Autogenerated IBEISController functions TemplateInfo: autogen_time = 15:14:53 2015/03/11 autogen_key = party ToRegenerate: python -m wbia.templates.template_generator --key party --Tcfg with_api_cache=False with_web_api=False with_deleters=False --diff python -m wbia.templa...
186
embed builder
import logging import random import textwrap from collections import defaultdict from datetime import UTC, datetime from discord import Color, Embed, Emoji from discord.ext import commands from bot.bot import Bot from bot.constants import Colours, ERROR_REPLIES from bot.utils.pagination import LinePaginator from bot....
187
get fanout os
import logging from tests.common.devices.sonic import SonicHost from tests.common.devices.onyx import OnyxHost from tests.common.devices.ixia import IxiaHost from tests.common.devices.eos import EosHost from tests.common.devices.aos import AosHost logger = logging.getLogger(__name__) class FanoutHost(object): "...
188
save history
#!/usr/bin/env python """ Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/) See the file 'LICENSE' for copying permission """ import atexit import os from lib.core import readlineng as readline from lib.core.common import getSafeExString from lib.core.data import logger from lib.core.data import paths ...
189
document send
# Copyright (C) 2019 Renato Lima - Akretion # Copyright (C) 2019 KMEE INFORMATICA LTDA # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError from ..constants.fiscal import ( DOCUMENT_ISSUER, DOCUMENT_IS...
190
parse uri
from _typeshed import Incomplete, Unused from typing import Any, NoReturn from typing_extensions import Literal, TypeAlias from urllib.request import OpenerDirector from xml.dom.expatbuilder import ExpatBuilder, ExpatBuilderNS from xml.dom.minidom import Node __all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSour...
191
tags
# 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...
192
test evaluation
# 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...
193
play
import pychromecast from t_modules.t_extra import shooter import time import socket def get_ip(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.settimeout(0) try: # doesn't even have to be reachable s.connect(('10.255.255.255', 1)) IP = s.getsockname()[0] except Excepti...
194
process response
""" An extension to retry failed requests that are potentially caused by temporary problems such as a connection timeout or HTTP 500 error. You can change the behaviour of this middleware by modifying the scraping settings: RETRY_TIMES - how many times to retry a failed page RETRY_HTTP_CODES - which HTTP response code...
195
list all
#!/usr/bin/python3 # SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2019-2021 Patryk Obara <patryk.obara@gmail.com> # pylint: disable=invalid-name # pylint: disable=missing-docstring """ Count all compiler warnings and print a summary. It returns success to the shell if the number or warnings encounte...
196
check chain
""" X509Request is a class for managing X509 requests with their Pkeys. It's main use is for proxy delegation. """ import M2Crypto from DIRAC import S_OK, S_ERROR from DIRAC.Core.Security.m2crypto import DEFAULT_PROXY_STRENGTH from DIRAC.Core.Utilities import DErrno # from DIRAC.Core.Security.m2crypto.X509Chain import...
197
test regularization
# ___________________________________________________________________________ # # 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 ...
198
print info
#!/usr/bin/python # monitoring write syscall # # Print processes and PID which call write method and ordered by counts # # Based on opensnoopy(bcc) # # version 2.0 from __future__ import print_function from bcc import BPF from bcc.utils import printb from ctypes import c_int from time import sleep, strftime import p...
199
test demux package
# 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 pathlib import tempfile import pytest from tcr_misc import get_sample from lib.cuckoo.common import demux @pytest.fixture def grab_sample():...