id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
14,400
max range
# Copyright 1996-2023 Cyberbotics Ltd. # # 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 i...
14,401
p toktype
# parser for Unix yacc-based grammars # # Author: David Beazley (dave@dabeaz.com) # Date : October 2, 2006 import ylex tokens = ylex.tokens from ply import * tokenlist = [] preclist = [] emit_code = 1 def p_yacc(p): '''yacc : defsection rulesection''' def p_defsection(p): '''defsection : definitions SE...
14,402
list
# 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...
14,403
test bash shell
import shutil import pytest from buildtest.exceptions import BuildTestError from buildtest.utils.shell import Shell class TestShell: @pytest.mark.utility def test_default_shell(self): # creating a Shell object with no argument will result in bash shell shell = Shell() # checking if ...
14,404
get ctor name
#@+leo-ver=5-thin #@+node:ekr.20230203163544.1: * @file tracing_utils.py """ Stand-alone tracing and debugging functions. Leonista's are welcome to use this file in their own projects. Leo does not use this file. Unlike the corresponding functions in leoGlobals.py, all names in this file are pep8 compliant. """ imp...
14,405
set error status
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt from PyQt5.QtWidgets import QDialog from urh.signalprocessing.Filter import Filter, FilterType from urh.ui.ui_filter_dialog import Ui_FilterDialog class FilterDialog(QDialog): filter_accepted = pyqtSignal(Filter) def __init__(self, dsp_filter: Filter, parent...
14,406
get uv width height multiplier
import numpy as np __copyright__ = "Copyright 2016-2020, Netflix, Inc." __license__ = "BSD+Patent" class YuvWriter(object): SUPPORTED_YUV_8BIT_TYPES = ['yuv420p', 'yuv422p', 'yuv444p', 'gray', ...
14,407
order type to use
""" Simplest possible execution method, one market order """ from copy import copy from sysexecution.orders.named_order_objects import missing_order from sysexecution.algos.algo import Algo from sysexecution.algos.common_functions import ( post_trade_processing, MESSAGING_FREQUENCY, cancel_order, file_...
14,408
assert implementation equivalence
# Copyright 2018 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...
14,409
source
from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps from conan.tools.files import get, copy, rmdir from conan.tools.layout import basic_layout from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_...
14,410
add subscription hosts from info
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import abc import logging import os import re import tempfile import click import yaml from c7n.resources import load_resources from c7n.utils import local_session from c7n_azure.constants import ENV_CONTAINER_QUEUE_NAME, ENV_SUB_ID from...
14,411
plot wx wy data
#!/usr/bin/python # # Handles the plotting window # # Hazen 02/13 # from PyQt5 import QtCore, QtGui import pyqtgraph import numpy pyqtgraph.setConfigOption('background', 'w') pyqtgraph.setConfigOption('foreground', 'k') def saveData(filename, x, y, z): numpy.savetxt(filename, numpy.concatenate((x[:,None], y[:,N...
14,412
test endpoint should setup cfg with provider
import clientapp from flask import Flask, url_for from typing import List import json from helper import FlaskBaseTestCase def app_endpoints(app: Flask) -> List[str]: """ Return all enpoints in app """ endpoints = [] for item in app.url_map.iter_rules(): endpoint = item.endpoint.replace("_", "-")...
14,413
main
# Copyright 2020 Adap GmbH. 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 ag...
14,414
check test project static files
from __future__ import annotations from tempfile import TemporaryDirectory from argparse import Namespace from typing import List import os TEST_PROJECT_PATH = os.path.join( os.path.dirname(__file__), '../test_project', ) def _generate_command_line_args( destination: str, clean: bool = False...
14,415
print test name
#!/usr/bin/env python # Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com> # # 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 ...
14,416
same id
from _typeshed import Incomplete, ReadableBuffer, Unused from typing import IO, AnyStr, overload from typing_extensions import Literal from xml.dom.minidom import Document as _Document, Element as _Element, Node def getChildElementsByTagName(self: Node, tagName: str) -> list[Element]: ... def getFirstChildElementByTag...
14,417
get matches
# -*- coding: utf-8 -*- import io import logging import os from zipfile import ZipFile, is_zipfile from requests import Session from guessit import guessit from subliminal import Movie from subliminal.subtitle import SUBTITLE_EXTENSIONS, fix_line_ending from subliminal_patch.exceptions import APIThrottled from sublim...
14,418
get target
# 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...
14,419
test no asdf blocks
import io import os import pytest import asdf from asdf import generic_io def test_no_yaml_end_marker(tmp_path): content = b"""#ASDF 1.0.0 %YAML 1.1 %TAG ! tag:stsci.edu:asdf/ --- !core/asdf-1.0.0 foo: bar...baz baz: 42 """ path = os.path.join(str(tmp_path), "test.asdf") buff = io.BytesIO(content) ...
14,420
get log params
from __future__ import annotations import logging import random from typing import TYPE_CHECKING, Any, Iterable, Mapping, MutableMapping, Sequence from sentry.db.models import Model from sentry.notifications.notifications.base import BaseNotification from sentry.notifications.utils.actions import MessageAction from s...
14,421
generate c node data
# Copyright 2023 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...
14,422
formatter message
""" Logging support functions It's useful for experiments (and items of equipment) to be able to log what's happening. This module provides some support functions to help with that. Note that these usually won't be called directly - anything inheriting from Instrument (or possibly Experiment) should call self.log ins...
14,423
read bigendian float
# # 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 us...
14,424
get query strings
import numbers from django.utils.decorators import method_decorator from django.utils.translation import gettext from memoized import memoized from sqlagg.sorting import OrderBy from corehq.apps.reports.sqlreport import SqlData from corehq.apps.userreports.decorators import catch_and_raise_exceptions from corehq.apps...
14,425
get token endpoint
#!/usr/bin/python """ Given an X509 proxy, generate a dCache-style macaroon. """ from __future__ import print_function import os import sys import json import urlparse import argparse import requests class NoTokenEndpoint(Exception): pass def parse_args(): """ Parse command line arguments to this to...
14,426
sample program configs
# 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...
14,427
postprocess
########################################################################## # Ganga Project. http://cern.ch/ganga # # $Id: IApplication.py,v 1.1 2008-07-17 16:40:52 moscicki Exp $ ########################################################################## from GangaCore.GPIDev.Base import GangaObject from GangaCore.GPID...
14,428
test input field param
from textwrap import dedent import pytest from graphql import GraphQLArgument as Argument from graphql import GraphQLEnumType, GraphQLEnumValue, GraphQLID from graphql import GraphQLField as Field from graphql import GraphQLInputField as Input from graphql import GraphQLInputField as InputField from graphql import Gra...
14,429
get name
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
14,430
meminfo alloc
from collections import namedtuple from weakref import finalize as _finalize from numba.core.runtime import nrtdynmod from llvmlite import binding as ll from numba.core.compiler_lock import global_compiler_lock from numba.core.typing.typeof import typeof_impl from numba.core import types, config from numba.core.runti...
14,431
test numpy core umath functions
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE # Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt import unittest try: import numpy # pylint: disable=unused-import HAS_...
14,432
on connman vanished
from gettext import gettext as _ import os from typing import Dict, Callable, Any, Optional from gi.repository import GLib, Gio import struct import logging from blueman.main.DBusProxies import Mechanism from blueman.plugins.AppletPlugin import AppletPlugin from blueman.plugins.applet.PowerManager import PowerManager...
14,433
test abs out type
# Data Parallel Control (dpctl) # # Copyright 2020-2023 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/LICE...
14,434
append
import subprocess import sys import time from _typeshed import ReadableBuffer, SizedBuffer from builtins import list as _list # conflicts with a method named "list" from collections.abc import Callable from datetime import datetime from re import Pattern from socket import socket as _socket from ssl import SSLContext,...
14,435
test invalid order when removing lines
from unittest.mock import patch import graphene import pytest from django.db.models import Sum from .....order import OrderStatus from .....order import events as order_events from .....order.models import OrderEvent from .....warehouse.models import Stock from ....tests.utils import assert_no_permission, get_graphql...
14,436
async generator
# -*- coding: utf-8 -*- # Copyright 2023 Google LLC # # 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...
14,437
test boundaryspec classmethods
"""Tests boundary conditions.""" import pytest import pydantic.v1 as pydantic import tidy3d as td from tidy3d.components.boundary import BoundarySpec, Boundary from tidy3d.components.boundary import Periodic, PECBoundary, PMCBoundary, BlochBoundary from tidy3d.components.boundary import PML, StablePML, Absorber from ...
14,438
plot sample anonymous events
import os from typing import cast import matplotlib.pyplot as plt import pandas as pd import pandera as pa import requests import seaborn as sns from dagster_pandera import pandera_schema_to_dagster_type from pandera.typing import Series # **************************************************************************** #...
14,439
start pairing
"""Abstraction for authentication based on HAP/SRP.""" from abc import ABC, abstractmethod import binascii from enum import Enum, auto from typing import Optional, Tuple from pyatv import exceptions # pylint: disable=invalid-name class AuthenticationType(Enum): """Supported authentication type.""" Null = a...
14,440
test xls export list
# coding: utf-8 import os import unittest from django.urls import reverse from onadata.apps.main.tests.test_base import TestBase from onadata.apps.viewer.models.export import Export from onadata.apps.main.models.meta_data import MetaData from onadata.apps.viewer.views import export_list class TestExportList(TestBas...
14,441
test quarter full leak
from eth2spec.test.context import with_all_phases, with_phases, spec_state_test from eth2spec.test.helpers.constants import PHASE0 from eth2spec.test.helpers.rewards import leaking import eth2spec.test.helpers.rewards as rewards_helpers @with_all_phases @spec_state_test @leaking() def test_empty_leak(spec, state): ...
14,442
test it has the right response code
import logging import json from django.urls import path, include from django.test.utils import override_settings from django.test import TestCase from collection_json import Collection from rest_framework import status from rest_framework.routers import DefaultRouter from .models import Dummy, Idiot, Moron, Simple ...
14,443
clear
# -*- coding: utf-8 -*- """ babel.util ~~~~~~~~~~ Various utility classes and functions. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import codecs from datetime import timedelta, tzinfo import os import re import textwrap from babel._compat import izip...
14,444
item level recovery connections cf
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
14,445
test has request context
from __future__ import annotations import asyncio from typing import cast from unittest.mock import Mock import pytest from hypercorn.typing import HTTPScope from werkzeug.datastructures import Headers from werkzeug.exceptions import BadRequest from quart.app import Quart from quart.ctx import ( after_this_reque...
14,446
setup device
from collections import OrderedDict from multiprocessing import Array import numpy as np from urh.dev.native.Device import Device from urh.dev.native.lib import bladerf from multiprocessing.connection import Connection class BladeRF(Device): SYNC_RX_CHUNK_SIZE = 16384 SYNC_TX_CHUNK_SIZE = 16384 DEVICE_...
14,447
quartile percentage map
# SPDX-License-Identifier: AGPL-3.0-or-later import decimal import threading from searx import logger __all__ = ["Histogram", "HistogramStorage", "CounterStorage"] logger = logger.getChild('searx.metrics') class Histogram: _slots__ = '_lock', '_size', '_sum', '_quartiles', '_count', '_width' def __init...
14,448
close
# 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 may ...
14,449
create props param
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging from os import listdir from os.path import isfile, join from typing import ( Iterator, List, Set, ) import pandas from jinja2 import Template from neo4j import Neo4jDriver, Transaction from neo4j.exceptions impo...
14,450
configure cmake
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import functools import os required_conan_version = ">=1.43.0" class Pagmo2Conan(ConanFile): name = "pagmo2" description = "pagmo is a C++ scientific library for massively parallel optimization." license = ("LG...
14,451
draw line
import warnings import json import random from .base import Renderer from ..exporter import Exporter class VegaRenderer(Renderer): def open_figure(self, fig, props): self.props = props self.figwidth = int(props["figwidth"] * props["dpi"]) self.figheight = int(props["figheight"] * props["dp...
14,452
set series
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe from frappe.custom.doctype.property_setter.property_setter import make_property_setter doctype_series_map = { "Activity Cost": "PROJ-ACC-.#####", "Agriculture Task": "AG-TASK...
14,453
execute
import tmt import tmt.steps from tmt.options import option # See the online documentation for more details about writing plugins # https://tmt.readthedocs.io/en/stable/plugins.html @tmt.steps.provides_method('example') class ProvisionExample(tmt.steps.provision.ProvisionPlugin): """ Provision guest using no...
14,454
test can clear the cache for callee
from collections.abc import Generator import pytest from flask.app import Flask from spiffworkflow_backend.models.db import db from spiffworkflow_backend.models.process_caller import ProcessCallerCacheModel from spiffworkflow_backend.services.process_caller_service import ProcessCallerService from tests.spiffworkflow...
14,455
create datetime field
from collections import OrderedDict import django.forms from django.conf import settings from django.utils.html import conditional_escape from django.utils.translation import gettext_lazy as _ from wagtail.admin.forms import WagtailAdminPageForm class BaseForm(django.forms.Form): def __init__(self, *args, **kwa...
14,456
transform image
# 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...
14,457
test timer stops training
# Copyright The Lightning AI 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 applicable law or agreed to in wri...
14,458
node
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2019 ## ## ...
14,459
revoke authorization
# Xlib.ext.security -- SECURITY extension module # # Copyright (C) 2010-2013 Outpost Embedded, LLC # Forest Bond <forest.bond@rapidrollout.com> # # 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 Softwa...
14,460
test empty
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Tests for the auxiliary parameters contained in wcsaux from numpy.testing import assert_allclose from astropy.io import fits from astropy.wcs import WCS STR_EXPECTED_EMPTY = """ rsun_ref: dsun_obs: crln_obs: hgln_obs: hglt_obs:""".lstrip() def METH...
14,461
test filter by type
import uuid import sqlalchemy from alembic.autogenerate import compare_metadata from django.test.testcases import TestCase, SimpleTestCase from nose.tools import assert_list_equal from corehq.sql_db.connections import connection_manager, DEFAULT_ENGINE_ID from ..alembic_diffs import ( DiffTypes, SimpleDiff, ...
14,462
forward
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ upstream/apc/apc.py ] # Synopsis [ the apc and vq-apc model ] # Author [ iamyuanchung ] # Reference [ https://github.com/iamyuanchung/VQ-APC/blob/283d338/vq...
14,463
callback clip slider
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import sys ...
14,464
inventory directory
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
14,465
publish
""" This type stub file was generated by pyright. """ import logging logger = logging.getLogger(__name__) class Monitor(object): _EVENTS_TO_REGISTER = ... def __init__(self, adapter, publisher) -> None: """Abstraction for monitoring clients API calls :param adapter: An adapter that takes eve...
14,466
mock read existing config
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent from pants.backend.python.goals.coverage_py import ( CoverageSubsystem, create_or_update_coverage_config, get_b...
14,467
build fileindex
# -*- coding: utf-8; -*- # # (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com # (c) 2007 Mandriva, http://www.mandriva.com/ # # $Id$ # # This file is part of Mandriva Management Console (MMC). # # MMC is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
14,468
param to percent
# -*- coding: UTF-8 -*- # A part of NonVisual Desktop Access (NVDA) # This file is covered by the GNU General Public License. # See the file COPYING for more details. # Copyright (C) 2019 NV Access Limited """autoSettings for add-ons""" from abc import abstractmethod from copy import deepcopy from typing import Dict, ...
14,469
latest available
""" Manage Linux kernel packages on APT-based systems """ import functools import logging import re from salt.exceptions import CommandExecutionError from salt.utils.versions import LooseVersion log = logging.getLogger(__name__) __virtualname__ = "kernelpkg" def __virtual__(): """ Load this module on Deb...
14,470
label aid list
# -*- coding: utf-8 -*- """Interface to Azure object proposals.""" import logging from os.path import abspath, dirname, exists, expanduser, join # NOQA import numpy as np import requests import utool as ut import wbia.constants as const (print, rrr, profile) = ut.inject2(__name__, '[azure]') logger = logging.getLog...
14,471
get connection 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 . imp...
14,472
get data loader props
# ---------------------------------------------------------------------------- # Copyright (C) 2021-2023 Deepchecks (https://www.deepchecks.com) # # This file is part of Deepchecks. # Deepchecks is distributed under the terms of the GNU Affero General # Public License (version 3 or later). # You should have received a ...
14,473
test shows edit buttons if user authenticated
import re from candidates.tests.auth import TestUserMixin from candidates.tests.dates import templates_after, templates_before from candidates.tests.factories import ( BallotPaperFactory, MembershipFactory, PostFactory, ) from candidates.tests.helpers import TmpMediaRootMixin from candidates.tests.uk_examp...
14,474
test projects redirects list post
from .mixins import APIEndpointMixin from django.urls import reverse from readthedocs.redirects.models import Redirect class RedirectsEndpointTests(APIEndpointMixin): def test_unauthed_projects_redirects_list(self): response = self.client.get( reverse( "projects-redirects-list...
14,475
add batch dim
# Copyright 2018 DeepMind Technologies Limited. 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 ...
14,476
train an autoencoder confuser
from federatedml.util import LOGGER from federatedml.util import consts try: import torch import torch as t from torch import nn from torch.nn import Module from torch.nn import functional as F except ImportError: Module = object def entropy(tensor): return -t.sum(tensor * t.log2(tensor))...
14,477
transfer field
import warnings from typing import Optional import numpy as np import rich from anndata import AnnData from scvi import REGISTRY_KEYS, settings from scvi.data import _constants from scvi.data._utils import ( _check_nonnegative_integers, _verify_and_correct_data_format, ) from ._base_field import BaseAnnDataF...
14,478
test zaak with result
# SPDX-License-Identifier: EUPL-1.2 # Copyright (C) 2019 - 2020 Dimpact import uuid from django.test import tag import requests_mock from rest_framework import status from rest_framework.test import APITestCase from vng_api_common.tests import get_validation_errors, reverse from zgw_consumers.constants import APIType...
14,479
test python inspect
# Tests invocation of the interpreter with various command line arguments # All tests are executed with environment variables ignored # See test_cmd_line_script.py for testing of script execution import test.test_support import sys import unittest from test.script_helper import ( assert_python_ok, assert_python_fa...
14,480
serialize
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """QWebHistory serializer for QtWebEngine.""" from qutebrowser.qt.core import QByteArray, QDataStream, QIODevice, QUrl from qutebrowser.utils import qtutils # kHistoryStreamVersion = 3 was o...
14,481
remove excluded parent fields
import inspect from types import MappingProxyType from typing import Dict, Optional, TYPE_CHECKING, Tuple, Type, Union import pydantic from pydantic.fields import ModelField from pydantic.utils import lenient_issubclass from ormar.exceptions import ModelDefinitionError # noqa: I100, I202 from ormar.fields import Bas...
14,482
layout
from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get import os required_conan_version = ">=1.53.0" class Ntv2Conan(ConanFile): name = "ntv2" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage...
14,483
exec command
#!/usr/bin/env python # Copyright 2020-2023 The Defold Foundation # Copyright 2014-2020 King # Copyright 2009-2014 Ragnar Svensson, Christian Murray # Licensed under the Defold License version 1.0 (the "License"); you may not use # this file except in compliance with the License. # # You may obtain a copy of the Licen...
14,484
analyze
from __future__ import annotations import json from docker.types import Mount from helperFunctions.docker import run_docker_container from analysis.plugin import AnalysisPluginV0 from analysis.plugin.compat import AnalysisBasePluginAdapterMixin import pydantic from pydantic import Field from typing import Optiona...
14,485
test split multiseries data
import pandas as pd import pytest from evalml.preprocessing import split_data, split_multiseries_data from evalml.problem_types import ( ProblemTypes, is_binary, is_multiclass, is_regression, is_time_series, ) @pytest.mark.parametrize("problem_type", ProblemTypes.all_problem_types) @pytest.mark.p...
14,486
ignore
# Created By: Virgil Dupras # Created On: 2006/05/02 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
14,487
get indexer
# 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. # --------------------------------------------------------------------...
14,488
test init no settings
"""Tests for the CouchbaseBackend.""" from datetime import timedelta from unittest.mock import MagicMock, Mock, patch, sentinel import pytest from celery import states from celery.app import backends from celery.backends import couchbase as module from celery.backends.couchbase import CouchbaseBackend from celery.exc...
14,489
route supplies
# 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...
14,490
reset
""" Copyright (c) 2018-2023 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...
14,491
test job retried correctly
from datetime import timedelta from django.test import TestCase from django.urls import reverse from rq.exceptions import NoSuchJobError from rq.queue import Queue from rq.worker import SimpleWorker from autoemails import admin from autoemails.job import Job from autoemails.models import EmailTemplate, RQJob, Trigger...
14,492
csv to dict
from csv import DictReader from pathlib import Path from typing import TYPE_CHECKING from rotkehlchen.accounting.structures.balance import BalanceType from rotkehlchen.assets.asset import Asset, AssetWithOracles from rotkehlchen.constants import ONE from rotkehlchen.constants.assets import A_USD from rotkehlchen.db.db...
14,493
to rs t properties get
# This file is a part of the AnyBlok project # # Copyright (C) 2015 Jean-Sebastien SUZANNE <jssuzanne@anybox.fr> # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file,You can # obtain one at http://mozilla.org/MPL/2.0/. from...
14,494
test ping when auth mandatory allow ping
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END """ Test Common (ping, shutdown, restart) REST API """ import re import socket import subprocess import http.client import time import json import pytest __author__ = "Ashish Jabble" __copyright__ = "Copyright (c) 2019 Dia...
14,495
ldexp
import sys from collections.abc import Iterable from typing import Protocol, SupportsFloat, TypeVar, overload from typing_extensions import SupportsIndex, TypeAlias _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) if sys.version_info >= (3, 8): _SupportsFloatOrIndex: TypeAlias = SupportsFloat | Support...
14,496
screen rotate
# Copyright 2019 Shift Cryptosecurity AG # # 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...
14,497
test jv scalar
from pythran.typing import List, NDArray from pythran.tests import TestFromDir, TestEnv import os import numpy as np import platform # from http://www.scipy.org/Download , weave/example directory class TestScipy(TestFromDir): def test_laplace(self): code=""" def laplace(u,dx, dy): nx, ny=len(u), len...
14,498
read
"""Pseudo terminal utilities.""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. # Author: Steen Lumholt -- with additions by Guido. from select import select imp...
14,499
create packed input sandbox
import mimetypes import os import sys import GangaCore.Utility.logging logger = GangaCore.Utility.logging.getLogger(modulename=True) from GangaCore.Core.exceptions import GangaException, GangaIOError from .WNSandbox import OUTPUT_TARBALL_NAME, PYTHON_DIR class SandboxError(GangaException): def __init__(self...