id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
5,300
test serialize snapshot without sequence number
# 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...
5,301
tear down
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
5,302
deserialize rfc
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
5,303
main
#!/usr/bin/python # Wflow is Free software, see below: # # Copyright (c) J. Schellekens 2005-2011 # # 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 you...
5,304
test reset
# -*- coding: utf-8 -*- # # test_corr_det.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, ...
5,305
a
# type: ignore from __future__ import annotations import sys import textwrap from typing import List from typing_extensions import Annotated import pytest import strawberry from strawberry.printer import print_schema from strawberry.scalars import JSON from strawberry.type import StrawberryList, StrawberryOptional f...
5,306
test dim from tblock size
# -*- coding: utf-8 -*- # # Copyright (c) 2023, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Unit tests for utilities.""" import unittest from cclib.parser import utils import numpy import scipy.spatial.transf...
5,307
on sendcmpct
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. """Test message sending before handshake completion. A node should never send anything other than VERSION...
5,308
bq table unversioned
"""Methods for working with stable table schemas.""" import json import tarfile import urllib.request from dataclasses import dataclass from io import BytesIO from itertools import groupby from typing import List from bigquery_etl.config import ConfigLoader from bigquery_etl.dryrun import DryRun @dataclass class Sch...
5,309
schools yishuvs api
# pylint: disable=no-member import json import logging import pandas as pd from flask import Response, request from sqlalchemy import and_, not_ from anyway.app_and_db import db from anyway.models import School, SchoolWithDescription2020 def schools_api(): logging.debug("getting schools") schools = ( ...
5,310
type
# 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...
5,311
get pattern to quantize handlers
import torch from torch.fx.graph import ( Node, ) from .utils import ( all_node_args_have_no_tensors, ) from torch.ao.quantization.backend_config import ( BackendConfig, DTypeConfig, ObservationType, ) from torch.ao.quantization.utils import ( NodePattern, Pattern, QuantizerCls, ) from...
5,312
default node factory
# # Copyright (c) 2022, Neptune Labs Sp. z o.o. # # 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...
5,313
tags
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
5,314
test domain range scale oetf inverse b
""" Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_709` module. """ import numpy as np import unittest from colour.models.rgb.transfer_functions import oetf_BT709, oetf_inverse_BT709 from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ = "Colour Developers...
5,315
test create inference graph without mfcc
# 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...
5,316
feed
from operator import attrgetter from snakeoil.mappings import defaultdictkey from snakeoil.strings import pluralism from .. import addons, results, sources from . import Check class RedundantVersion(results.VersionResult, results.Info): """Redundant version(s) of a package in a specific slot.""" def __init...
5,317
get noc base addr
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Copyright 2022-2023 Advanced Micro Devices Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 ...
5,318
service highstate
""" Functions to perform introspection on a minion, and return data in a format usable by Salt States """ import os def running_service_owners( exclude=("/dev", "/home", "/media", "/proc", "/run", "/sys/", "/tmp", "/var") ): """ Determine which packages own the currently running services. By default, ...
5,319
list disaster recovery config keys
# 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__ ...
5,320
handler
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
5,321
set called callback
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
5,322
add ignore pass case
# 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...
5,323
validate time
from pysys.basetest import BaseTest import time import json """ Validate tedge-mapper-collectd messages that are published on tedge/measurements Given a configured system When we start the tedge-mapper-collectd with sudo in the background When we start tedge sub with sudo in the background When we start two publish...
5,324
config options
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration, ConanException import functools import os required_conan_version = ">=1.43.0" class MagnumIntegrationConan(ConanFile): name = "magnum-integration" description = "Integration libraries for the Magnum C++11/C++14 gr...
5,325
conv2d hwcn
# 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...
5,326
ipv6 to int
######################################################################### # # Utils in this file: # ip_to_int(ipstr) # int_to_ip(n) # incr_ipv4(ipaddr, mask=32, step=1) # range_ipv4(start_ip, count, mask=32) # network(ipaddr, mask=24) # ipv6_to_int(ipv6_addr) # int_to_ipv6(i) # incr_ipv6(ipaddr, mask=128, step=1) # ran...
5,327
test reset device 192
# This file is part of the Trezor project. # # Copyright (C) 2012-2019 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
5,328
add unpack method
import types import typing from _typeshed import Incomplete from collections.abc import Generator from dataclasses import Field from mashumaro.config import ( ADD_DIALECT_SUPPORT as ADD_DIALECT_SUPPORT, ADD_SERIALIZATION_CONTEXT as ADD_SERIALIZATION_CONTEXT, BaseConfig as BaseConfig, SerializationStrate...
5,329
deserialize
import array import datetime from decimal import Decimal from io import BytesIO from uuid import uuid4 import fastavro from .conftest import assert_naive_datetime_equal_to_tz_datetime schema = { "fields": [ { "name": "union_uuid", "type": ["null", {"type": "string", "logicalType": "...
5,330
test new pr
# Copyright 2016 Battelle Energy Alliance, 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 agr...
5,331
normalize block
#!/usr/bin/env python3 """ Copyright 2020 Hans-Kristian Arntzen for Valve Corporation 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 License, or (at your option) an...
5,332
handle match
""" Progress Bar. pymdownx.progressbar Simple plugin to add support for progress bars ``` /* No label */ [==30%] /* Label */ [==30% MyLabel] /* works with attr_list inline style */ [==50/200 MyLabel]{: .additional-class } ``` New line is not required before the progress bar but suggested unless in a table. Can t...
5,333
test ellipse
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
5,334
test failing different mask ranks
# 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...
5,335
test element factory is an iterable
import gc from collections.abc import Container, Iterable import pytest from gaphor.core import event_handler from gaphor.core.modeling.event import ( ElementCreated, ElementDeleted, ModelFlushed, ModelReady, ServiceEvent, ) from gaphor.core.modeling.presentation import Presentation from gaphor.UM...
5,336
get
from flask import current_app, request from flask_restplus import Resource, reqparse, fields, inputs from app.extensions import api from app.api.utils.access_decorators import requires_role_edit_permit, requires_role_view_all from werkzeug.exceptions import BadRequest, NotFound, InternalServerError from app.api.utils...
5,337
clear timings
""" Utility functions to keep performance information """ from __future__ import annotations import collections from typing import Dict import pyglet import time # Evil globals _timings: Dict = {} _pyglets_dispatch_event = None _frame_times: collections.deque = collections.deque() _max_history: int = 100 __all__ = ...
5,338
stamp
# Copyright 2023 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
5,339
complex
# # GPT - Grid Python Toolkit # Copyright (C) 2020 Christoph Lehner (christoph.lehner@ur.de, https://github.com/lehner/gpt) # 2020 Tilo Wettig # # 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 # ...
5,340
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 # --------------------------------...
5,341
test get handle from dummy func
# # Copyright (c) 2020-2023, 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 ag...
5,342
test spectacular view
from unittest import mock import pytest import yaml from django import __version__ as DJANGO_VERSION from django.http import HttpResponseRedirect from django.urls import path from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.test import APIClient from drf_...
5,343
validate measures
# encoding: utf-8 """ SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md """ import json import logging import re import string from django.db import models from seed.models import Organization _log = logging....
5,344
test ecs mxnet training gluonnlp cpu
import os import pytest from test.test_utils import ECS_AML2_CPU_USWEST2, ECS_AML2_GPU_USWEST2, CONTAINER_TESTS_PREFIX from test.test_utils import ecs as ecs_utils from test.test_utils import ec2 as ec2_utils from test.test_utils import get_framework_and_version_from_tag from packaging.version import Version MX_MNI...
5,345
test doctests
import doctest import json from datetime import datetime from unittest.mock import Mock from django.test.testcases import TestCase from corehq.apps.domain.shortcuts import create_domain from corehq.apps.locations.models import LocationType, SQLLocation from corehq.apps.users.models import WebUser from corehq.motech.d...
5,346
test return at least 1 at the
# Copyright 2016 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-3.0.html # The commented out tests are tests for func...
5,347
get instancemaker
import django.forms from django.conf import settings from django.core.exceptions import ValidationError from django.utils import timezone from collections import OrderedDict from datetime import timedelta from postgresqleu.util.time import time_sinceoruntil, datetime_string from postgresqleu.util.widgets import Stati...
5,348
get urls
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-FileCopyrightText: Copyright contributors to the OpenScanHub project. import os from glob import glob from django.contrib import admin from django.shortcuts import render from django.urls import path from django.utils.safestring import mark_safe from kobo.hub.models ...
5,349
test add email wrong otp
"""Tests to add a new phone number or email address.""" # pylint: disable=redefined-outer-name from unittest.mock import patch import pytest from werkzeug.datastructures import MultiDict from coaster.utils import newpin from funnel import models PATCH_EMAIL_VALIDATOR = ( 'funnel.models.email_address.EmailAddre...
5,350
w cp u control
# SPDX-License-Identifier: MIT import struct from enum import IntEnum from ..hv import TraceMode from ..utils import * from . import ADTDevTracer from ..hw.asc import * class DIR(IntEnum): RX = 0 TX = 1 def msg(message, direction=None, regtype=None, name=None): def f(x): x.is_message = True ...
5,351
test public task exception
from unittest.mock import patch import pytest from allauth.socialaccount.models import SocialAccount from django.contrib.auth.models import User from django.test import TestCase from django_dynamic_fixture import get from messages_extends.models import Message from readthedocs.builds import tasks as build_tasks from ...
5,352
test serine rna sequence 2
# These tests are auto-generated with test data from: # https://github.com/exercism/problem-specifications/tree/main/exercises/protein-translation/canonical-data.json # File last updated on 2023-07-19 import unittest from protein_translation import ( proteins, ) class ProteinTranslationTest(unittest.TestCase): ...
5,353
drop event
# coding: utf-8 # /*########################################################################## # # Copyright (C) 2016-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
5,354
load texture
# Copyright 2020-2023 OpenDR European Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
5,355
attrs
# Copyright (c) Meta Platforms, Inc. and affiliates. # SPDX-License-Identifier: LGPL-2.1-or-later import itertools from typing import Generic, Iterator, List, Mapping, Sequence, TypeVar, Union from drgndoc.parse import ( Class, DocumentedNode, Function, Import, ImportFrom, Module, Node, ...
5,356
get hook
import os import tempfile import typing as t from airflow.models import BaseOperator from airflow.providers.apache.spark.hooks.spark_submit import SparkSubmitHook from airflow.utils.context import Context import sqlmesh from sqlmesh.engines import commands from sqlmesh.schedulers.airflow.operators.targets import Base...
5,357
featured
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2018 Steve Kowalik <steven@wedontsleep.org> # # ...
5,358
test lookup blob
# Copyright 2010-2023 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public License, # the authors give ...
5,359
forward
# Copyright (c) 2022 Microsoft # Licensed under The MIT License [see LICENSE for details] import torch import torch.nn as nn import torch.nn.functional as F from apex.normalization import FusedLayerNorm as LayerNorm class set_torch_seed(object): def __init__(self, seed): assert isinstance(seed, int) ...
5,360
write
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## import json from odoo import models, fields, api, _ from lxml import etre...
5,361
edge attr func
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018, 2020. # # 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 d...
5,362
modelstr
#!/usr/bin/env python ############################################################################# # DellEmc Z9264F # # Platform and model specific eeprom subclass, inherits from the base class, # and provides the followings: # - the eeprom format definition # - specific encoder/decoder if there is special need #####...
5,363
num qubits
# Copyright 2021 The Cirq Developers # # 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 ...
5,364
make link node
"""Define text roles for GitHub * ghissue - Issue * ghpull - Pull Request * ghuser - User Adapted from bitbucket example here: https://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/bitbucket/sphinxcontrib/bitbucket.py Authors ------- * Doug Hellmann * Min RK """ # # Original Copyright (c) 2010 Doug Hellmann. All...
5,365
log output of job pods
import logging from ocs_ci.framework import config from ocs_ci.ocs import constants from ocs_ci.ocs import exceptions from ocs_ci.ocs.ocp import OCP from ocs_ci.ocs.resources.ocs import OCS from ocs_ci.utility.utils import TimeoutIterator log = logging.getLogger(__name__) def get_job_obj(name, namespace=None): ...
5,366
add callback
from os import listdir, path, remove from enigma import eConsoleAppContainer from Components.Harddisk import harddiskmanager from Tools.Directories import resolveFilename, SCOPE_LIBDIR from boxbranding import getImageDistro opkgDestinations = [] opkgStatusPath = '' def opkgExtraDestinations(): global opkgDestinati...
5,367
with type
# Copyright 2018, 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...
5,368
update user
import hashlib import logging from django.conf import settings from django.utils.translation import gettext_lazy as _ from googleapiclient.errors import HttpError from members.models import Member from utils.google_api import get_directory_api logger = logging.getLogger(__name__) class GSuiteUserService: def ...
5,369
get train dataloader
import os import math import torch import random import pandas as pd from pathlib import Path from collections import Counter import torch import torch.nn as nn from torch.utils.data import DataLoader, DistributedSampler from torch.distributed import is_initialized from torch.nn.utils.rnn import pad_sequence from ..m...
5,370
assemble sfx option
# Quick script to build top-level color and sfx options for pickling from Colors import * import Sounds as sfx def assemble_color_option(f, internal_name: str, func, display_name: str, default_option: str, outer=False): color_options = func() if outer: color_options.append("Match Inner") format_c...
5,371
search
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
5,372
predict
__all__ = ["FastTextModel"] import contextlib import gc import logging import os import tempfile import numpy as np import pandas as pd from autogluon.common.features.types import S_TEXT from autogluon.common.utils.resource_utils import ResourceManager from autogluon.common.utils.try_import import try_import_fasttex...
5,373
update request
from logging import getLogger from django.utils.module_loading import import_string from django.utils.timezone import now from axes.conf import settings from axes.handlers.base import AxesBaseHandler, AbstractAxesHandler, AxesHandler from axes.helpers import ( get_client_ip_address, get_client_user_agent, ...
5,374
done
#!/usr/bin/env python # pylint: disable=unused-argument, import-error # This program is dedicated to the public domain under the CC0 license. """ First, a few callback functions are defined. Then, those functions are passed to the Application and registered at their respective places. Then, the bot is started and runs...
5,375
source subfolder
from conans import CMake, ConanFile, tools from conans.errors import ConanInvalidConfiguration required_conan_version = ">=1.33.0" class MsixConan(ConanFile): name = "msix" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/microsoft/msix-packaging"...
5,376
download
# Copyright 2020-2023 OpenDR European Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
5,377
test bitrate
# Copyright 2013 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 os from io import BytesIO f...
5,378
get bios component
# # Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # 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...
5,379
tear down
from __future__ import print_function import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import os from . import session from . import settings from . import resource_suite from .. import lib class Test_Irmdir(resource_suite.ResourceBase, unittest.TestCase): def ...
5,380
assert feefilter received
#!/usr/bin/env python3 # Copyright (c) 2016-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from decimal import Decimal from test_framework.messages im...
5,381
fetch report data
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import json from abc import abstractmethod from typing import Any, Iterable, List, Mapping, MutableMapping, Optional from urllib.parse import urljoin import backoff import requests from airbyte_cdk.models import SyncMode from source_pinterest.streams import...
5,382
lap pause
import json import os import rclpy import cv2 import sys import base64 import threading import time import numpy as np from datetime import datetime from websocket_server import WebsocketServer import multiprocessing import logging from interfaces.pose3d import ListenerPose3d from shared.image import SharedImage from...
5,383
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 from sklearn.metrics import roc_auc_score #...
5,384
wrapper
def x(): return #? None x() def array(first_param): #? ['first_param'] first_param return list() #? [] array.first_param #? [] array.first_param. func = array #? [] func.first_param #? list() array() #? ['array'] arr def inputs(param): return param #? list inputs(list) def variable_middle()...
5,385
get value rows
import math import functools import collections import statistics from visidata import vd, Progress, Column, vlen from visidata import * vd.option('null_value', None, 'a value to be counted as null', replay=True) @Column.api def METHOD_NAME(self, rows): 'Generate (value, row) for each row in *rows* at this col...
5,386
run
# ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -----------------------------------------------------------------...
5,387
get insecure proxy
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
5,388
pass result
import noodles from noodles.workflow import (get_workflow) from noodles.run.coroutines import (Connection, coroutine_sink) from noodles.run.experimental import (logging_worker) from noodles.display import SimpleDisplay import subprocess import sys import argparse import json import time import shlex import os logFold...
5,389
set
import sys from struct import pack from . import consts def align4_int(i: int): return (4 - i) % 4 def align4_data(data): return data + b"\x00" * align4_int(len(data)) class Norcow: def __init__(self): self.sectors = None self.active_sector = 0 def init(self): if self.sec...
5,390
record event tags management
from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from zds.tutorialv2.models.database import PublishableContent from zds.tutorialv2 import signals from zds.tutorialv2.views.authors import AddAuthorToContent, RemoveAuthorFromContent from zds.tutorialv2.views.b...
5,391
encode
"""Extend the Python codecs module with a few encodings that are used in OpenType (name table) but missing from Python. See https://github.com/fonttools/fonttools/issues/236 for details.""" import codecs import encodings class ExtendCodec(codecs.Codec): def __init__(self, name, base_encoding, mapping): ...
5,392
parse typedefs
"""Parses header files, extract declarations of functions and struct, union, enum definitions.""" import logging import re from .func_info import FuncInfo from .func_info import get_declarations from .func_info import parse_func_declaration from .header_text_filters import filter_oneline_typedefs from .header_text_fi...
5,393
do parse old state file
""" Dynamic roster from terraform current state =========================================== This roster module allows you dynamically generate the roster from the terraform resources defined with the `Terraform Salt`_ provider. It exposes all salt_host resources with the same attributes to the salt-ssh roster, making...
5,394
close brace callback
# -*- coding: utf-8 -*- """ pygments.lexers.bibtex ~~~~~~~~~~~~~~~~~~~~~~ Lexers for BibTeX bibliography data and styles :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLe...
5,395
sort suggestions
# This file is part of Indico. # Copyright (C) 2002 - 2023 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import datetime, timedelta from functools import cmp_to_key from indico.modules.rb import r...
5,396
setup driver
from selenium import webdriver from selenium.webdriver.firefox.options import Options as Options_firefox from selenium.webdriver.chrome.options import Options as Options_chrome from pathlib import Path import pdfkit def METHOD_NAME(): # use the driver that exists in working directory - chromedriver and geckodri...
5,397
processing graph
# SPDX-License-Identifier: Apache-2.0 # Copyright 2022 The HuggingFace Authors. from typing import Iterator from libapi.config import UvicornConfig from libcommon.METHOD_NAME import ProcessingGraph from libcommon.queue import _clean_queue_database from libcommon.resources import CacheMongoResource, QueueMongoResource...
5,398
set properties
############################################################################### # # App - A class for writing the Excel XLSX App file. # # Copyright 2013-2017, John McNamara, jmcnamara@cpan.org # # Package imports. from . import xmlwriter class App(xmlwriter.XMLwriter): """ A class for writing the Excel XLSX...
5,399
set force
# 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...