id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
18,600
handle
# Script to initialize: # # ALL known physical turnouts to the CLOSED state # and # ALL known physical sensors to the INACTIVE state # NOT TESTED WITH LCC Turnout or Sensor equipment # ( # The Internal Turnouts & Sensors are NOT DIRECTLY touched # BUT indirect responses from a...
18,601
test viewport
""" Low level tests for OpenGL 3.3 wrappers. """ import pytest from pyglet.math import Mat4 def test_ctx(ctx): if ctx.gl_api == "gl": assert ctx.gl_version >= (3, 3) elif ctx.gl_api == "gles": assert ctx.gl_version >= (3, 1) else: raise ValueError(f"Unsupported api: {ctx.gl_api}") ...
18,602
parse cmd
#!/usr/bin/env python3 # Copyright 2018 The Meson development team # 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 app...
18,603
init encoder
# # Pyserini: Reproducible IR research with sparse and dense representations # # 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...
18,604
count grids
import os import weakref import numpy as np from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch from yt.data_objects.static_output import Dataset from yt.funcs import setdefaultattr from yt.geometry.grid_geometry_handler import GridIndex from .fields import SkeletonFieldInfo class SkeletonGrid(AMR...
18,605
test ip list logged in
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from dfirtrack_main.models import Ip class IpViewTestCase(TestCase): """ip view tests""" @classmethod def setUpTestData(cls): # create object Ip.objects.create(ip_ip='127.0.0.1') # c...
18,606
import bundle root
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
18,607
runner
import asyncio import functools import threading import numpy as np from numba import cuda from numba.cuda.testing import unittest, CUDATestCase, skip_on_cudasim def with_asyncio_loop(f): @functools.wraps(f) def METHOD_NAME(*args, **kwds): loop = asyncio.new_event_loop() loop.set_debug(True) ...
18,608
string song
# pylint: disable=C0111,R0903 """Displays the current song being played in DeaDBeeF and provides some media control bindings. Left click toggles pause, scroll up skips the current song, scroll down returns to the previous song. Parameters: * deadbeef.format: Format string (defaults to '{artist} - {title}') ...
18,609
get fields
#!/usr/bin/env python """ Retrieves job status according to given criteria. Example: $ dstat -a -u your.dirac.username """ import datetime from DIRAC import exit as DIRACExit, S_OK, S_ERROR from DIRAC import gLogger from DIRAC.Interfaces.Utilities.DCommands import DSession from DIRAC.Interfaces.Utilities.DCon...
18,610
test patch twice warnings events
from gevent import monkey monkey.patch_all() import sys import unittest from gevent.testing.testcase import SubscriberCleanupMixin class TestMonkey(SubscriberCleanupMixin, unittest.TestCase): maxDiff = None def setUp(self): super(TestMonkey, self).setUp() self.all_events = [] self.a...
18,611
test all the things
# # Copyright (c) 2014-2015 Harvard, edX & OpenCraft # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) as published by the Free # Software Foundation (FSF), either version 3 of the L...
18,612
test lists
# test overloaded java methods dispatch logic in PyReflectedFunction # needs to grow more tests. Uses javatests.JOverload as a bag of overloaded methods. # (can be adapted to test alternative re-implemations even while they are developed # write a *Envl class and change/add to to_test for that) import sys import unitt...
18,613
restore
# 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...
18,614
test string split
# 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,615
foods by name
from collections import defaultdict from django.utils.functional import cached_property from attr import attrib, attrs, fields_dict from corehq.apps.fixtures.models import LookupTable, LookupTableRow class InddexFixtureError(Exception): pass def _wrap(FixtureClass, kwargs): try: return FixtureCla...
18,616
initialize
# coding=utf-8 import time import copy from flask_babel import lazy_gettext from mycodo.inputs.base_input import AbstractInput # Measurements measurements_dict = { 0: { 'measurement': 'temperature', 'unit': 'C' } } # Input information INPUT_INFORMATION = { 'input_name_unique': 'DS18B20',...
18,617
extract settings
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from urllib3.exceptions import TimeoutError import logging from etcd import EtcdKeyNotFound, EtcdConnectionFailed from etcd import Client as etcd_client from utils.service_discovery.abstract_config_store import A...
18,618
init and get a graph in cache
""" 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...
18,619
create time
# 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,620
place insts
# See LICENSE for licensing information. # # Copyright (c) 2016-2023 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from openram import debug from openram.base impo...
18,621
get from dict
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT from copy import deepcopy from enum import Enum from logging import getLogger from typing import List, Dict from packit.config.aliases import DEFAULT_VERSION from packit.config.common_package_config import CommonPackageConfig, MultiplePack...
18,622
metrics
from tensorflow.keras.models import Model from tensorflow.keras.METHOD_NAME import Mean import tensorflow as tf # from loss import compute_weighted_reconstruction_loss_with_error # from loss import compute_error_prediction_loss class Pix2Pose(Model): def __init__(self, image_shape, discriminator, generator, laten...
18,623
to dict
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyowm.commons import exceptions from pyowm.utils import formatting, timestamps from pyowm.weatherapi25 import location class AirStatus: """ A class representing a dataset about air quality :param reference_time: GMT UNIXtime telling when the data has be...
18,624
metadata updated on
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2020 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
18,625
read blacklist
#===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------...
18,626
test complex norm
import numpy as np import pytest import torch import torch_complex.functional as FC from packaging.version import parse as V from torch_complex.tensor import ComplexTensor from espnet2.enh.layers.complex_utils import ( cat, complex_norm, einsum, inverse, matmul, solve, stack, trace, ) ...
18,627
forward
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
18,628
test extract metadata
"""Process Model.""" import re from flask.app import Flask from spiffworkflow_backend.models.db import db from spiffworkflow_backend.models.process_instance_metadata import ProcessInstanceMetadataModel from spiffworkflow_backend.models.process_model import ProcessModelInfo from spiffworkflow_backend.models.spec_refere...
18,629
normal left down
from random import choice from traits.api import Any, Enum, HasTraits, Instance, Int, List, Str from chaco.api import Plot, cbrewer as COLOR_PALETTE from chaco.plot_canvas_toolbar import PlotToolbarButton DEBUG = False class ButtonController(HasTraits): """Tells buttons what to do Buttons defer to this when...
18,630
make object schema
from dataclasses import fields import pytest import schemathesis from schemathesis.specs.openapi.definitions import OPENAPI_30_VALIDATOR, SWAGGER_20_VALIDATOR from schemathesis.utils import fast_deepcopy def METHOD_NAME(is_loose=False, **properties): schema = { "additionalProperties": False, "pr...
18,631
test prediction proba linear
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import os import sys import unittest # noinspection PyProtectedMember from numpy.testing import assert_equal from numpy.testing import assert_raises from sklearn.base import clone # temporary solution for relative imports i...
18,632
get schedule output
# 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,633
disconnect
from textwrap import dedent from collections import OrderedDict from pandas import DataFrame import sqlanydb import sqlalchemy_sqlany.base as sqlany_dialect from mindsdb_sql import parse_sql from mindsdb_sql.parser.ast.base import ASTNode from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender from mindsd...
18,634
postprocess
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
18,635
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 # --------------------------------...
18,636
test range with ticks
from math import pi from unittest.mock import Mock import pytest from pytest import approx, fixture import toga from ..assertions import assert_set_get from .properties import ( # noqa: F401 test_enabled, test_flex_horizontal_widget_size, ) # Slider can't be given focus on mobile if toga.platform.current_p...
18,637
resolve single path
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
18,638
test read line too long need more
from websockets.streams import StreamReader from .utils import GeneratorTestCase class StreamReaderTests(GeneratorTestCase): def setUp(self): self.reader = StreamReader() def test_read_line(self): self.reader.feed_data(b"spam\neggs\n") gen = self.reader.read_line(32) line = ...
18,639
fetch text file
import csv import json import os import hashlib import datetime import lmdb import pickle from pathlib import Path from base.data_set import query_table_timestamp from base.webqtlConfig import TEXTDIR from base.webqtlConfig import TMPDIR from json.decoder import JSONDecodeError def cache_trait_metadata(dataset_name...
18,640
safe import
""" A set of convenient on-demand imports """ import sys from functools import wraps from importlib.util import find_spec from typing import Type class NotAModule: """ A class to implement an informative error message that will be outputted if someone tries to use an on-demand import without having the r...
18,641
get cache key
from datetime import datetime, timezone import logging import shlex import requests from django.conf import settings from django.core.cache import cache from allauth.socialaccount.models import SocialAccount from rest_framework.authentication import BaseAuthentication, get_authorization_header from rest_framework.ex...
18,642
test lr ucache operations
# SPDX-FileCopyrightText: 2020 - 2023 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 import string import dpctl.tensor as dpt import numpy as np import pytest import numba_dpex as dpex from numba_dpex.core.caching import LRUCache from numba_dpex.core.kernel_interface.dispatcher import JitKernel def METH...
18,643
forward
import torch import torch.nn as nn import random from annotator.lama.saicinpainting.training.modules.depthwise_sep_conv import DepthWiseSeperableConv class MultidilatedConv(nn.Module): def __init__(self, in_dim, out_dim, kernel_size, dilation_num=3, comb_mode='sum', equal_dim=True, shared_weights=...
18,644
mgm t 2718
""" https://github.com/csesoc/Circles/wiki/Manual-Fixes-to-Course-Prerequisites Copy this into a new file for the relevant faculty's fixes: e.g. COMPFixes.py, ACCTFixes.py, PSYCFixes.py Apply manual [code] fixes to processed conditions in conditionsProcessed.json so that they can be fed into algorithms. If you make ...
18,645
test cannot ignore error
# -*- coding: utf-8 -*- # # Copyright © 2015,2016 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> # Copyright © 2015,2016 Collabora Ltd # # 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 Found...
18,646
async initialize integration
"""Custom Integration to setup UI Lovelace Minimalist.""" from __future__ import annotations import logging from typing import Any from aiogithubapi import AIOGitHubAPIException, GitHubAPI from homeassistant.components import frontend from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassist...
18,647
generate
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, rmdir, save f...
18,648
test utils parse patran syntax
import unittest import numpy as np from pyNastran.bdf.bdf import BDF from pyNastran.bdf.utils import ( parse_patran_syntax, parse_patran_syntax_dict, parse_patran_syntax_dict_map, write_patran_syntax_dict, split_eids_along_nids) class TestBdfUtils(unittest.TestCase): def METHOD_NAME(self): """test...
18,649
cost 1q angles
from typing import List, Union import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator import numpy as np from .variational_baseparams import QAOAVariationalBaseParams from ..ansatz_constructor import QAOADescriptor from ..ansatz_constructor.baseparams import shapedArray class QAOAVariationalAnneal...
18,650
get params
import unittest import numpy as np import json import os import pytest import subprocess from openqaoa.backends.qaoa_backend import ( get_qaoa_backend, DEVICE_NAME_TO_OBJECT_MAPPER, DEVICE_ACCESS_OBJECT_MAPPER, ) from openqaoa.qaoa_components import ( Hamiltonian, create_qaoa_variational_params, ...
18,651
test archive stage hides correction task
from django.test import TestCase from django.shortcuts import reverse from django.utils import timezone from proofing import models from utils.testing import helpers from submission import models as submission_models class TestLogic(TestCase): @classmethod def setUpTestData(cls): cls.press = helpers...
18,652
on new role
from __future__ import annotations import re from typing import Optional from src.containers import UserSet, UserDict from src.decorators import command from src.events import Event, event_listener from src.functions import get_players, get_all_players, get_main_role, get_target from src.messages import messages from...
18,653
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,654
wrapper
import datetime import functools import numbers import time import collections.abc import contextlib import jaraco.functools class Stopwatch: """ A simple stopwatch which starts automatically. >>> w = Stopwatch() >>> _1_sec = datetime.timedelta(seconds=1) >>> w.split() < _1_sec True >>> ...
18,655
test function import fx match utils
# Owner(s): ["oncall: quantization"] from .common import AOMigrationTestCase class TestAOMigrationQuantizationFx(AOMigrationTestCase): def test_function_import_quantize_fx(self): function_list = [ '_check_is_graph_module', '_swap_ff_with_fxff', '_fuse_fx', '...
18,656
get availability zone from zone
# Copyright 2019 PerfKitBenchmarker 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,657
points to figure
"""Drawing meshes using svg.""" import webbrowser from functools import singledispatch from dataclasses import dataclass from http.server import HTTPServer, BaseHTTPRequestHandler import numpy as np from numpy import ndarray from ..assembly import CellBasis from ..mesh import Mesh2D def METHOD_NAME(p, kwargs): ...
18,658
reader driver init
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2023 ODC Contributors # SPDX-License-Identifier: Apache-2.0 """ xarray 3D driver plugin for 3D support testing """ from contextlib import contextmanager from pathlib import Path from typing import Any, Ge...
18,659
get specific state
# encoding: utf-8 # # Project: MXCuBE # https://github.com/mxcube # # This file is part of MXCuBE software. # # MXCuBE is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
18,660
test menus modify primed menu items
from __future__ import absolute_import, unicode_literals from bs4 import BeautifulSoup from django.test import TestCase from wagtail import hooks class TestHooks(TestCase): fixtures = ['test.json'] def METHOD_NAME(self): # NOTE: Positional args used to ensure supplied args remain consistent ...
18,661
config storage
from collections import defaultdict from io import StringIO import pytest from ilastik.applets.serverConfiguration.configStorage import ( ServerConfigStorage, SERVER_CONFIG_GROUP, SERVER_CONFIG_LIST_KEY, ) from ilastik.applets.serverConfiguration import types class PreferencesStub: def __init__(self...
18,662
validate protected resource request
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.resource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the resource protection provider logic of OAuth 1.0 RFC 5849. """ import logging from .. import errors from .base import BaseEndpoint log = logging.getLogger(__name__)...
18,663
test transform order explicit
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
18,664
test amax with random data empty dim
""" 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...
18,665
getop
""" Copyright 2022 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
18,666
close device
# -*- coding: utf-8 -*- """ Modified from https://github.com/plasmon360/python_newport_1918_powermeter """ from past.utils import old_div from nplab.instrument import Instrument from ctypes import * import time import numpy as np class NewportPowermeter(Instrument): def __init__(self, product_id, **kwargs): ...
18,667
write saved model
# Copyright 2021, The TensorFlow Federated 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 o...
18,668
test run returns exploiter result
from ipaddress import IPv4Address from threading import Event from unittest.mock import MagicMock from uuid import UUID import pytest from agent_plugins.exploiters.log4shell.src.log4shell_exploiter import Log4ShellExploiter from agent_plugins.exploiters.log4shell.src.plugin import Plugin, get_ports_to_try from common...
18,669
shortname
#!/usr/bin/python import os import re import sys def find_matching_bracket(text, startpos, left, right): c, i = 1, startpos while c > 0 and i < len(text): if text[i:].startswith(left): c += 1 i += len(left) elif text[i:].startswith(right): c -= 1 i += len(right) else: i +=...
18,670
test asg
import logging logger = logging.getLogger(name=__name__) import time import numpy as np from pyrpl import CurveDB from pyrpl.test.test_base import TestPyrpl class TestScopeAsgAms(TestPyrpl): def setup(self): self.extradelay = 0.6 * 8e-9 # no idea where this comes from def METHOD_NAME(self): ...
18,671
value
# 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__ ...
18,672
test update case
import json from django.test.testcases import TestCase from django.urls import reverse from corehq.apps.accounting.models import ( BillingAccount, DefaultProductPlan, SoftwarePlanEdition, Subscription, ) from corehq.apps.domain.models import Domain from corehq.apps.users.models import HQApiKey, WebUse...
18,673
test list pkgs
""" :codeauthor: Eric Vz <eric@base10.org> """ import pytest import salt.modules.pacmanpkg as pacman from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {pacman: {}} def METHOD_NAME(): """ Test if it list the packages currently installed in a dic...
18,674
test inverse document date
# Copyright (C) 2023-Today - Engenere (<https://engenere.one>). # @author Felipe Motter Pereira <felipe@engenere.one> from datetime import datetime, time, timedelta from pytz import UTC, timezone from odoo.tests import SavepointCase from odoo.addons.l10n_br_fiscal.constants.fiscal import DOCUMENT_ISSUER_PARTNER c...
18,675
to generic
from exceptions import * from copy import copy #from cd import * from omexceptions import * from objects import * from re import compile import StringIO from xml.sax.saxutils import XMLGenerator raiseException=True class Context(object): #TODO: Referenzen durch scope richtig behandeln def __init__(self): ...
18,676
test get application document types
import json, uuid from app.extensions import cache from app.api.constants import NOW_DOCUMENT_DOWNLOAD_TOKEN from tests.now_application_factories import NOWApplicationFactory, NOWApplicationIdentityFactory from app.api.now_applications.models.now_application_document_type import NOWApplicationDocumentType class TestG...
18,677
decorator
import logging from functools import partial from django.core.checks import Warning from django.http import Http404 from django.template.response import TemplateResponse from django.urls import URLResolver from django.urls import path as path_func from django.urls import re_path as re_path_func from django.urls.resolv...
18,678
test basic
# -*- 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,679
require
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. import typing as t from itertools import chain from flask.globals import current_app from flask import request, ...
18,680
import uv scale
"""This script contains helper methods to import shader property data.""" # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2019, 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...
18,681
generate tempfile
import logging from virttest import qemu_storage from virttest import data_dir from virttest import utils_disk from virttest.qemu_capabilities import Flags from provider import backup_utils from provider.virt_storage.storage_admin import sp_admin LOG_JOB = logging.getLogger('avocado.test') class BlockDevSnapshotT...
18,682
reset
import ctypes import time from tkinter import Button, Entry, Frame, Label, Tk from tkinter.constants import BOTTOM, FLAT, LEFT from tkinter.font import BOLD import threading import os try: import winsound ctypes.windll.shcore.SetProcessDpiAwareness(True) except Exception: pass root = Tk() root.config(bg="...
18,683
test install and execute in context
# Copyright 2021, The TensorFlow Federated 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 o...
18,684
replace and print
from argparse import ArgumentTypeError from copy import copy from dataclasses import dataclass from typing import Generator import attr from yaml import YAMLError from timApp.admin.search_in_documents import ( create_basic_search_argparser, search, SearchResult, SearchArgumentsBasic, ) from timApp.adm...
18,685
build schema on 200
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
18,686
generate sample config
import sys from collections import defaultdict from ipaddress import ip_interface from natsort import natsorted #TODO: Remove once Python 2 support is removed if sys.version_info.major == 3: UNICODE_TYPE = str else: UNICODE_TYPE = unicode def generate_common_config(data): data['FLEX_COUNTER_TABLE'] = { ...
18,687
integral
import numpy as np from .GaussLobattoQuadrature import GaussLobattoQuadrature from .GaussLegendreQuadrature import GaussLegendreQuadrature class PolygonMeshIntegralAlg(): def __init__(self, mesh, q, cellmeasure=None, cellbarycenter=None): self.mesh = mesh self.integrator = mesh.integrator(q) ...
18,688
deserialize
import gradio as gr import json from .class_configuration_file import ConfigurationFile from .class_source_model import SourceModel from .class_folders import Folders from .class_basic_training import BasicTraining from .class_advanced_training import AdvancedTraining from .class_sample_images import SampleImages from ...
18,689
get team id
from __future__ import annotations from urllib.parse import quote from sentry.eventstore.models import Event, GroupEvent from sentry.models import Group, Integration from sentry.services.hybrid_cloud.integration.model import RpcIntegration from sentry.shared_integrations.client.base import BaseApiResponseX from sentr...
18,690
use args
import functools from collections.abc import Mapping from typing import Any, Callable, Optional from flask.views import MethodView from marshmallow import Schema, exceptions as ma_exceptions from webargs.core import ( _UNKNOWN_DEFAULT_PARAM, ArgMap, Request, ValidateArg, _ensure_list_of_callables, ...
18,691
escape
import re try: from urllib.parse import quote import html except ImportError: from urllib import quote html = None class Scanner(re.Scanner): def iter(self, string, state, parse_text): sc = self.scanner.scanner(string) pos = 0 for match in iter(sc.search, None): ...
18,692
test rescue attribute error
# 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...
18,693
commdct2grouplist
# Copyright (c) 2016 Santosh Philip # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) """extract the groups from the iddfile""" from __future__ import absolute_import from _...
18,694
test parse folder url
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import time from functools import partial import pytest from azure.core.exceptions import ResourceExistsError from azure.keyvault.administration._internal import parse_...
18,695
wait and raise
from __future__ import annotations import asyncio import pytest import distributed from distributed import Nanny from distributed.client import wait from distributed.compatibility import LINUX from distributed.diagnostics.progress import ( AllProgress, GroupTiming, MultiProgress, Progress, Schedu...
18,696
mock collect query data
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from collections import defaultdict import mock import pytest from six import PY3 from six.moves import winreg HERE = os.path.abspath(os.path.dirname(__file__)) counters_by_class = defaultdict...
18,697
pan down
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
18,698
get canonical url
from django.utils.html import strip_tags from django.utils.text import unescape_entities from tendenci.apps.meta.utils import generate_meta_keywords from tendenci.apps.site_settings.utils import get_setting from tendenci.apps.base.utils import truncate_words from tendenci.apps.categories.models import Category class ...
18,699
get replied notification message
import html from typing import TYPE_CHECKING, Callable, Dict, overload from django.http import HttpRequest from django.utils.translation import pgettext from ..categories.trees import CategoriesTree from ..threads.views.goto import PrivateThreadGotoPostView, ThreadGotoPostView from .verbs import NotificationVerb from...