id
int64
0
300k
label
stringlengths
1
74
βŒ€
text
stringlengths
4k
8k
15,400
to columns string
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆ β–ˆ β–ˆ β–ˆ β–ˆ β–ˆβ–„ β–€β–ˆβ–ˆβ–ˆ β–ˆ ┃ # ┃ β–„β–„β–„β–„β–„β–ˆ β–ˆβ–„β–„β–„β–„β–„ β–„β–„β–„β–„β–„β–ˆ β–€β–€β–€β–€β–€β–ˆβ–€β–€β–€β–€β–€ β–ˆ β–€β–€β–€β–€β–€β–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œβ–β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–„ β–€β–ˆ β–ˆ β–€β–€β–€β–€β–€ ┃ # ┃ β–ˆβ–€β–€β–€β–€β–€ β–ˆβ–€β–€β–€β–€β–€ β–ˆβ–€β–ˆβ–ˆβ–€β–€ β–„β–„β–„β–„β–„ β–ˆ β–„β–„β–„β–„β–„β–ˆ β–„β–„β–„β–„β–„β–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œβ–β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆ β–„β–„β–„β–„...
15,401
name op
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG"] cmp_op = ('<...
15,402
test one line
# Copyright (c) 2018 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 app...
15,403
is temporal
""" GDELT dataset for temporal graph """ import os import numpy as np from .. import backend as F from ..convert import graph as dgl_graph from .dgl_dataset import DGLBuiltinDataset from .utils import _get_dgl_url, load_info, loadtxt, save_info class GDELTDataset(DGLBuiltinDataset): r"""GDELT dataset for event-...
15,404
test export xls
# Copyright 2019 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import json from unittest import mock from unittest.mock import patch import freezegun from dateutil.relativedelta import relativedelta import odoo.tests.common as common from odoo import fields from odoo.addons.web.contro...
15,405
random array
# Copyright 2021-2022 NVIDIA 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 ...
15,406
full name
#!/usr/bin/env python import dataclasses import importlib import os import pathlib import re import click from django.apps import apps from sentry.runner import configure configure() @dataclasses.dataclass class MigrationMeta: number: int name: str path: str @property def METHOD_NAME(self) -> ...
15,407
edit
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
15,408
wait until responsive
from __future__ import annotations import asyncio import os import re import subprocess import sys import timeit from pathlib import Path from typing import Any, Awaitable, Callable, Generator import asyncmy import asyncpg import oracledb import pytest from google.auth.credentials import AnonymousCredentials from goo...
15,409
log
# common.py - functions that are used by different modules # # Copyright (C) 2010-2019 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the Licens...
15,410
depth
import http.client from _typeshed import Incomplete from collections.abc import Generator from typing import Any, ClassVar from typing_extensions import Self from .error import * __author__: str __copyright__: str __contributors__: list[str] __license__: str __version__: str debuglevel: int RETRIES: int class Authe...
15,411
test compute too many configs
# SPDX-License-Identifier: Apache-2.0 # Copyright 2022 The HuggingFace Authors. from dataclasses import replace from typing import Callable from unittest.mock import patch import pytest from libcommon.exceptions import CustomError from libcommon.processing_graph import ProcessingGraph from libcommon.resources import ...
15,412
generic erc checks
import logging from typing import Dict, List, Optional, Set from slither.core.declarations import Contract from slither.slithir.operations import EventCall from slither.utils import output from slither.utils.erc import ERC, ERC_EVENT from slither.utils.type import ( export_nested_types_from_variable, export_re...
15,413
sample rate available
# Copyright (C) 2019-2023 Analog Devices, Inc. # # SPDX short identifier: ADIBSD from adi.attribute import attribute from adi.context_manager import context_manager class ad9166(attribute, context_manager): """ AD9166 Vector Signal Generator """ _complex_data = False channel = [] # type: ignore _de...
15,414
p expression uminus
#!/usr/bin/env python # ----------------------------------------------------------------------------- # calc.py # # A simple calculator with variables. This is from O'Reilly's # "Lex and Yacc", p. 63. # # Class-based example contributed to PLY by David McNab # --------------------------------------------------------...
15,415
optional volume env
from __future__ import print_function import os import core.exceptions as ex from utilities.naming import factory from utilities.lazy import lazy from utilities.converters import convert_size class BasePool(object): type = None def __init__(self, name=None, node=None, **kwargs): try: nam...
15,416
patch
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :para...
15,417
album sort order
""" Example function for use with osxphotos export --post-function option showing how to record album sort order """ import os import pathlib from typing import Optional from osxphotos import ExportResults, PhotoInfo from osxphotos.albuminfo import AlbumInfo from osxphotos.path_utils import sanitize_dirname from osxp...
15,418
test cycle
import pytest import networkx as nx from networkx.utils import pairwise class TestAStar: @classmethod def setup_class(cls): edges = [ ("s", "u", 10), ("s", "x", 5), ("u", "v", 1), ("u", "x", 2), ("v", "y", 1), ("x", "u", 3), ...
15,419
process phc output
########################################################################### # A Python interface to PHCPACK ########################################################################### # This takes the entire output of a PHCPACK run, and returns a list of # solutions. # Each solution is a Python dictionary with the fol...
15,420
t bool
# Minimal ethereum type signature parser. # This parses the signature and types used to calculate the function hash import warnings from ..exceptions import EthereumError import ply.yacc as yacc # Lexer # ------------------------------------------------------------ import ply.lex as lex import re # List of token name...
15,421
uuid
# 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...
15,422
execute operations
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
15,423
distance
# -*- coding: utf-8 -*- import logging import logging import collections logger = logging.getLogger("expr") logger.setLevel(logging.ERROR) class Base(object): def __neg__(self): return Neg(self) def __add__(self, rhs): return Add(self, rhs) def __radd__(self, lhs): return Add(lhs, self) def __sub__(self, rh...
15,424
optimize widths
# -*- coding: utf-8 -*- """T2CharString glyph width optimizer. CFF glyphs whose width equals the CFF Private dictionary's ``defaultWidthX`` value do not need to specify their width in their charstring, saving bytes. This module determines the optimum ``defaultWidthX`` and ``nominalWidthX`` values for a font, when pro...
15,425
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 . im...
15,426
add unexpected success
"""Running tests""" import sys import time import warnings from . import result from .signals import registerResult __unittest = True class _WritelnDecorator(object): """Used to decorate file-like objects with a handy 'writeln' method""" def __init__(self,stream): self.stream = stream def __ge...
15,427
test listdir
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import os import sys import unittest import warnings from unicodedata import normalize from test.support import os_helper filenames = [ '1_abc', '2_ascii', '3_Gr\xf...
15,428
extract names
import re from .common import InfoExtractor from ..utils import ( float_or_none, int_or_none, merge_dicts, str_or_none, str_to_int, url_or_none, ) class SpankwireIE(InfoExtractor): _VALID_URL = r'''(?x) https?:// (?:www\.)?spankwire\.com/ ...
15,429
filter file to avoid overly long shebangs
# 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) import spack.build_systems.autotools import spack.hooks.sbang as sbang from spack.package import * class GobjectIntrospec...
15,430
to drawing
# -*- coding: utf-8 -*- """ The free traced category, i.e. diagrams where outputs can feedback into inputs. Note that these diagrams are planar traced so that e.g. :mod:`pivotal` diagrams are traced in this sense. See :mod:`symmetric` for the usual notion of trace. Whenever the diagrams are also :mod:`symmetric`, th...
15,431
main
"""A command line interface (CLI) to the main PUDL ETL functionality. This script cordinates the PUDL ETL process, based on parameters provided via a YAML settings file. If the settings for a dataset has empty parameters (meaning there are no years or tables included), no outputs will be generated. See :doc:`/dev/run...
15,432
check equals
import re # pylint: disable=unused-argument import numpy as np import pandas as pd import pytest from kedro.io import DatasetError, MemoryDataset from kedro.io.memory_dataset import _copy_with_mode, _infer_copy_mode def _update_data(data, idx, jdx, value): if isinstance(data, pd.DataFrame): data.iloc[id...
15,433
test add contains one key
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
15,434
test empty is false
from typing import Callable import pytest from _pytest.mark.expression import Expression from _pytest.mark.expression import ParseError def evaluate(input: str, matcher: Callable[[str], bool]) -> bool: return Expression.compile(input).evaluate(matcher) def METHOD_NAME() -> None: assert not evaluate("", lam...
15,435
depends on
# Copyright 2020-2023 Capypara and the SkyTemple Contributors # # This file is part of SkyTemple. # # SkyTemple 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 y...
15,436
get
# 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/. import os import time import unittest from shutil import rmtree from tempfile import mkdtemp import mozunit from mozbu...
15,437
update progress
""" 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...
15,438
find wasm files
import glob import logging import shutil from abc import abstractmethod from os import path from pathlib import Path from typing import Any, Dict, List, Union, cast, final from multiversx_sdk_cli import dependencies, errors, myprocess, utils from multiversx_sdk_cli.dependencies.modules import StandaloneModule from mul...
15,439
properties
# 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__ ...
15,440
rax cdb user
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type DO...
15,441
model input names
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. 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...
15,442
test clean old jobs empty jid dir
""" Unit tests for the Default Job Cache (local_cache). """ import os import time import pytest import salt.returners.local_cache as local_cache import salt.utils.files import salt.utils.jid import salt.utils.job import salt.utils.platform from tests.support.mock import MagicMock, patch @pytest.fixture def tmp_cac...
15,443
navigation
from hypothesis.strategies import ( composite, SearchStrategy, lists, sampled_from, builds, just, integers, booleans, tuples, ) from resotocore.model.graph_access import EdgeTypes, Direction from tests.resotocore.hypothesis_extension import Drawer, optional, UD, any_string, any_date...
15,444
retranslate ui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mslib/msui/ui/ui_wms_multilayers.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MultilayersDialog(object): def setupUi(s...
15,445
clear
from __future__ import absolute_import, division, print_function import platform import sys import types import warnings PY2 = sys.version_info[0] == 2 PYPY = platform.python_implementation() == "PyPy" if PYPY or sys.version_info[:2] >= (3, 6): ordered_dict = dict else: from collections import OrderedDict ...
15,446
value names
from copy import copy import itertools from visidata import vd, asyncthread, vlen, VisiData, Column, AttrColumn, Sheet, ColumnsSheet, ENTER from visidata.pivot import PivotSheet, PivotGroupRow vd.option('disp_histogram', 'β– ', 'histogram element character') vd.option('histogram_bins', 0, 'number of bins for histogram...
15,447
test wrong translation type
import pytest import torch import torchio as tio from ...utils import TorchioTestCase class TestRandomAffine(TorchioTestCase): """Tests for `RandomAffine`.""" def setUp(self): # Set image origin far from center super().setUp() affine = self.sample_subject.t1.affine affine[:3,...
15,448
test results size of downpayment values
# Author: Niels Nuyttens <niels@nannyml.com> # Author: Nikolaos Perrakis <nikos@nannyml.com> # # License: Apache Software License 2.0 """Tests for Drift package.""" import pandas as pd import pytest from nannyml._typing import Result from nannyml.data_quality import UnseenValuesCalculator from nannyml.datas...
15,449
split text attribute
import os import re import csv from io import StringIO from PIL import Image from django.db import migrations from django.conf import settings from cvat.apps.engine.media_extractors import get_mime def parse_attribute(value): match = re.match(r'^([~@])(\w+)=(\w+):(.+)?$', value) if match: prefix = matc...
15,450
display name
# # Copyright 2013-2023 The Foundry Visionmongers 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
15,451
rouge
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
15,452
test execute bakes
# 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...
15,453
cluster number
""" Health Checks ------------- """ import logging import numpy as np import pandas as pd logger = logging.getLogger(__name__) __all__ = [ 'bidirectional_throats', 'cluster_number', 'cluster_size', 'count_coincident_pores', 'duplicate_throats', 'find_coincident_pores', 'isolated_pores', ...
15,454
map zpow and unroll
# Copyright (C) 2023 qBraid # # This file is part of the qBraid-SDK # # The qBraid-SDK is free software released under the GNU General Public License v3 # or later. You can redistribute and/or modify it under the terms of the GPL v3. # See the LICENSE file in the project root or <https://www.gnu.org/licenses/gpl-3.0.ht...
15,455
read sentences
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
15,456
check output
#!/usr/bin/env python """ Script to run doctests. """ import doctest import sys import os from optparse import OptionParser optionflags = doctest.IGNORE_EXCEPTION_DETAIL + doctest.NORMALIZE_WHITESPACE optionflags = doctest.NORMALIZE_WHITESPACE class MyOutputChecker(doctest.OutputChecker): """ Modification o...
15,457
configure
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os, fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import get, copy, rmdir, rm, export_conan...
15,458
sessions canceled count
from marshmallow_jsonapi import fields from marshmallow_jsonapi.flask import Schema from sqlalchemy import distinct, func from app.api.helpers.cache import cache from app.api.helpers.utilities import dasherize from app.models.session import Session from app.models.speaker import Speaker from app.models.sponsor import ...
15,459
register state
#------------------------------------------------------------------------------- # RKCorrections #------------------------------------------------------------------------------- from PYB11Generator import * from Physics import * from PhysicsAbstractMethods import * from RestartMethods import * @PYB11template("Dimensio...
15,460
parse args
# 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...
15,461
build requirements
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import collect_libs, copy, get, replace_in_file, rename, rm f...
15,462
get set string
#!/usr/bin/env python # XXX #1767: Python3 introduces a print function instead of the print # statement in python2. This import allows us to access the print # function in python2+. from __future__ import print_function import gdb import os import traceback import re # XXX #1767: Python3 unified the int and long typ...
15,463
test div
from functools import partial import pytest from tests.helpers import TEST_FIXTURES from ..vm.vm_test_helpers import run_test ETHEREUM_TESTS_PATH = TEST_FIXTURES["ethereum_tests"]["fixture_path"] run_arithmetic_vm_test = partial( run_test, f"{ETHEREUM_TESTS_PATH}/LegacyTests/Constantinople/VMTests/vmArith...
15,464
mop reference
''' Created on Dec 1, 2021 @author: Aleksandar Kondinski ''' def getMOPIRIs(): """This function collects all MOPs from the KG.""" queryStr = """ PREFIX OntoMOPs: <http://www.theworldavatar.com/ontology/ontomops/OntoMOPs.owl#> PREFIX OntoSpecies: <http://www.theworldavatar.com/ontology/ontospecies/OntoSp...
15,465
pan camera to player
""" Blending two Backgrounds. This program loads two infinite scrolling backgrounds. It then blends between the two when the player reaches a certain x pos. If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.background_blending """ from __future__ impor...
15,466
readings end update
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) function_active = [] update_locks = {} wsconnection = None readings = {} attributes = {} internals = {} command_define = [] command_attr = [] def mock_module(mocker): mocker.patch("fhempy.lib.fhem.updateConnection", updateConnec...
15,467
init ignore string
"""Implementation of Rule RF04.""" import regex from typing import List, Optional from sqlfluff.core.rules import BaseRule, LintResult, RuleContext from sqlfluff.core.rules.crawlers import SegmentSeekerCrawler from sqlfluff.utils.identifers import identifiers_policy_applicable class Rule_RF04(BaseRule): """Keywo...
15,468
check values
# This file is originally part of Fed-BioMed # SPDX-License-Identifier: Apache-2.0 """ top class for all aggregators """ import os import functools import math from typing import Any, Dict, Optional, Tuple, List from fedbiomed.common.constants import ErrorNumbers, TrainingPlans from fedbiomed.common.exceptions impo...
15,469
test fixed adaptive error
# Copyright 2021 The NetKet 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 ...
15,470
show
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np import inspect import trimesh from trimesh.exchange.binvox import voxelize_mesh from trimesh import voxel as v log = trimesh.util.log dir_current = os.path.dirname( os.path.a...
15,471
test gate error
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
15,472
dt
import csv import gzip import json import logging import os from typing import ClassVar, List, Optional import pendulum from calitp_data_infra.storage import ( GTFSDownloadConfig, PartitionedGCSArtifact, ProcessingOutcome, fetch_all_in_partition, get_fs, ) from utils import GTFSScheduleFeedFile fr...
15,473
to datetime value 1d
""" Helper classes to do common tasks in pyGnome like; - convert_formats to convert datetime_value to time_value_pair """ from gnome.utilities import time_utils, transforms from gnome import basic_types import numpy as np # fixme: in_ts_format should not be optional! def to_time_value_pair(datetime_value, in_ts_form...
15,474
label path
# Copyright 2017 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import platform from gi.repository...
15,475
focus field
#!/usr/bin/python # coding: utf-8 ################################# # Python Mac Lock # Written by Tomas Pollak <tomas@forkhq.com> # (c) 2011 Fork Ltd. # Licensed under the GPLv3 ################################# import os import sys import hashlib import base64 # import objc # import signal # from Foundation import ...
15,476
set up
""" Tests for django admin commands in the verify_student module Lots of imports from verify_student's model tests, since they cover similar ground """ from freezegun import freeze_time from unittest.mock import call, patch, ANY from django.conf import settings from django.core.management import call_command from te...
15,477
render
import typing as t from ast import literal_eval from ast import parse from itertools import chain from itertools import islice from types import GeneratorType from . import nodes from .compiler import CodeGenerator from .compiler import Frame from .compiler import has_safe_repr from .environment import Environment fro...
15,478
test cfn remove tag
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from .common import BaseTest import time import json class TestCFN(BaseTest): def test_delete(self): factory = self.replay_flight_data("test_cfn_delete") p = self.load_policy( { "name": "cfn...
15,479
test timestamp with timezone
from __future__ import annotations import numpy as np import pandas as pd import pandas.testing as tm import pytest import ibis import ibis.expr.datatypes as dt import ibis.expr.schema as sch from ibis.backends.impala.pandas_interop import DataFrameWriter pytest.importorskip("impala") @pytest.fixture def exhaustiv...
15,480
add slider
import numpy as np import cv2 as cv import math class ThParameters: def __init__(self): self.levelNoise=6 self.angle=45 self.scale10=5 self.origin=10 self.xg=150 self.yg=150 self.update=True def UpdateShape(x ): p.update = True def union(a,b): x = min...
15,481
test after aot cuda compile error
# Owner(s): ["module: inductor"] import functools import unittest from unittest.mock import patch import torch import torch._dynamo.config as dynamo_config import torch._inductor.config as inductor_config import torch._inductor.utils from torch._dynamo.test_minifier_common import MinifierTestBase from torch._inductor ...
15,482
post invitation
# Copyright Β© 2019 Province of British Columbia # # 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...
15,483
new special layer
#!/usr/bin/python3 # -*- coding: utf-8 -*- #****************************************************************************** # ZYNTHIAN PROJECT: Zynthian GUI # # Zynthian GUI Main Menu Class # # Copyright (C) 2015-2020 Fernando Moyano <jofemodo@zynthian.org> # #************************************************************...
15,484
test remove points from addressbase
from addressbase.models import Address, UprnToCouncil from addressbase.tests.factories import UprnToCouncilFactory from councils.tests.factories import CouncilFactory from data_importers.management.commands.misc_fixes import ( assign_addresses_by_district, delete_council_data, remove_points_from_addressbase...
15,485
test abi
from .support import HPyTest, make_hpy_abi_fixture class TestCPythonCompatibility(HPyTest): hpy_abi = make_hpy_abi_fixture('with hybrid', class_fixture=True) # One note about the supports_refcounts() in the tests below: on # CPython, handles are actually implemented as INCREF/DECREF, so we can # chec...
15,486
avatar
from datetime import date from django.contrib.auth import models as auth_models from django.core import validators from django.db import models from django.templatetags.static import static from django.utils import timezone from django.utils.translation import gettext_lazy as _ from django_countries import fields as c...
15,487
provisioning state
# 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__ ...
15,488
setup ui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/modules/docker/ui/docker_vm_preferences_page.ui' # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets cl...
15,489
interactively get data for stage and method
import matplotlib.pyplot as pyplot import pandas as pd from syscore.exceptions import missingData from syscore.fileutils import full_filename_for_file_in_home_dir from syscore.constants import user_exit from syscore.interactive.menus import print_menu_of_values_and_get_response from syscore.interactive.run_functions ...
15,490
video comparison
from __future__ import annotations import json import os from functools import wraps from pathlib import Path from typing import Any from manim import get_video_metadata from ..assert_utils import assert_shallow_dict_compare from ..helpers.video_utils import get_section_dir_layout, get_section_index def load_contr...
15,491
test automatic completions hide complete
# -*- coding: utf-8 -*- # # Copyright Β© Spyder Project Contributors # Licensed under the terms of the MIT License # """Tests some cases were completions need to be hidden.""" # Third party imports from flaky import flaky import pytest from qtpy.QtCore import Qt @pytest.mark.order(1) @flaky(max_runs=10) def METHOD_N...
15,492
test assemble xml file
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2023, John McNamara, jmcnamara@cpan.org # import unittest from io import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import...
15,493
analyse overview field
""" DRBD administration module """ import logging log = logging.getLogger(__name__) def METHOD_NAME(content): """ Split the field in drbd-overview """ if "(" in content: # Output like "Connected(2*)" or "UpToDate(2*)" return content.split("(")[0], content.split("(")[0] elif "/" i...
15,494
test parse organization
import os import tempfile from wandb.sdk.launch.github_reference import GitHubReference def test_parse_bad() -> None: """Expected parse failures, None result.""" ref = GitHubReference.parse("not a url") assert ref is None ref = GitHubReference.parse("http://github.com") # Not HTTPS assert ref is...
15,495
rename
# --- BEGIN COPYRIGHT BLOCK --- # Copyright (C) 2016, William Brown <william at blackhats.net.au> # Copyright (C) 2023 Red Hat, Inc. # All rights reserved. # # License: GPL (version 3 or any later version). # See LICENSE for details. # --- END COPYRIGHT BLOCK --- from lib389.idm.posixgroup import PosixGroup, PosixGrou...
15,496
hw deconfig
from lnst.Recipes.ENRT.ConfigMixins.BaseSubConfigMixin import BaseSubConfigMixin class BaseHWConfigMixin(BaseSubConfigMixin): def apply_sub_configuration(self, config): super().apply_sub_configuration(config) self.hw_config(config) def remove_sub_configuration(self, config): self.METHO...
15,497
get case size stats
import json import math from django.core.management.base import BaseCommand from corehq.apps.es import FormES, CaseSearchES, CaseES, filters from corehq.apps.reports.analytics.esaccessors import ( get_case_types_for_domain_es, ) from corehq.const import MISSING_APP_ID from couchforms.analytics import ( get_al...
15,498
test case4gs
# -*- coding: utf-8 -*- # Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pytest import pandapower as pp import pandapower.networks as pn def _ppc_element_test(net, n_bus=None, n_branch=None, n_...
15,499
is token expiring soon
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from thre...