id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
10,400
should sync file
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # import logging from datetime import datetime, timedelta from typing import Any, MutableMapping from airbyte_cdk.sources.file_based.config.file_based_stream_config import FileBasedStreamConfig from airbyte_cdk.sources.file_based.remote_file import RemoteFile...
10,401
execute
#!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkmeshclipper.py,v $ ## Language: Python ## Date: $Date: 2006/05/26 12:35:13 $ ## Version: $Revision: 1.8 $ ## Copyright (c) Luca Antiga, David Steinman. All rights reserved. ## See LICENSE file for details. ## This software is distr...
10,402
append shutdown
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
10,403
apply entry
"""Timer scheduling Python callbacks.""" from __future__ import annotations import heapq import sys from collections import namedtuple from datetime import datetime from functools import total_ordering from time import monotonic from time import time as _time from typing import TYPE_CHECKING from weakref import proxy...
10,404
results
"""Classes for tracking performance and timing.""" import functools import inspect import time from typing import Sequence, TextIO, Union class Stats: """A collection of statistics.""" def __init__(self): """Initialize the Stats instance.""" self.counts = {} self.max_time = {} ...
10,405
use websocket
import json import os import signal import subprocess from pathlib import Path import tomlkit import web3 from pystarport import ports from web3.middleware import geth_poa_middleware from .cosmoscli import CosmosCLI from .utils import supervisorctl, wait_for_port DEFAULT_CHAIN_BINARY = "evmosd" class Evmos: de...
10,406
run supervisor
import os import signal import subprocess import time from setproctitle import setproctitle from ipaddress import ip_address from doreah.control import mainfunction from doreah.io import col from doreah.logging import log from . import __pkginfo__ as pkginfo from .pkg_global import conf from .proccontrol import task...
10,407
specific heat
#------------------------------------------------------------------------------- # TillotsonEquationOfState #------------------------------------------------------------------------------- from PYB11Generator import * from SolidEquationOfState import * from EOSAbstractMethods import * @PYB11template("Dimension") @PYB1...
10,408
run
from __future__ import unicode_literals from builtins import range from builtins import object from gi.repository import Gtk, Gdk from gi.repository import GObject toolkit = "gtk" # Code responses for GTK +3 dialogs. # this is when an user presses OK on a dialogue. OK = Gtk.ResponseType.OK # This is when an user press...
10,409
authorized
from abc import ABC, abstractmethod from collections.abc import Callable from dataclasses import dataclass, field from aiohttp import web from models_library.api_schemas_storage import LinkType, UploadedPart from models_library.projects_nodes_io import LocationID, LocationName, StorageFileID from models_library.users ...
10,410
add metrics distributed fit
# 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...
10,411
prune
import math from typing import Any from typing import Optional import optuna from optuna.pruners import BasePruner from optuna.pruners._percentile import _is_first_in_interval_step def _check_value(value: Any) -> float: try: # For convenience, we allow users to report a value that can be cast to `float`....
10,412
is valid
import logging from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.translation import gettext_lazy as _ from accounts.const import AliasAccount from accounts.models import Account from assets.models import Asset from common.utils import date_expired_default ...
10,413
create table
# # -*- coding: utf-8 -*- # # Copyright (c) 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 app...
10,414
reference
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...
10,415
check
import random import sys import threading import time import transaction from persistent.mapping import PersistentMapping import ZODB from ZODB.Connection import TransactionMetaData from ZODB.POSException import ConflictError from ZODB.tests.MinPO import MinPO from ZODB.tests.StorageTestBase import zodb_pickle from Z...
10,416
get location
""" Copyright 2019 Inmanta 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 ...
10,417
connect
# Copyright 2019, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
10,418
model builder rf
# DeepCrystal Technologies 2017 - Patrick Hop # MIT License - have fun!! from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import numpy as np np.random.seed(123) from sklearn.ensemble import RandomForestRegressor from sklearn import svm import ten...
10,419
test query matches categories
# This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis/ # # Copyright the Hypothesis Authors. # Individual contributors are listed in AUTHORS.rst and the git log. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the...
10,420
download
# ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (c) 2018 Torben Hohn <torben.hohn@linutronix.de> # # SPDX-License-Identifier: GPL-3.0-or-later import sys import os import re from shutil import copyfile from urllib.request import urlopen from gpg import core from gpg.constants import PROTOCOL_OpenPG...
10,421
apply ghost boundary6
#------------------------------------------------------------------------------- # ReflectingBoundary #------------------------------------------------------------------------------- from PYB11Generator import * from Boundary import * from PlanarBoundary import * from BoundaryAbstractMethods import * from RestartMethod...
10,422
create blocklist entry
#!/usr/bin/env python # 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 __future__ import print_function import json import urlparse categories = ("Advertising", ...
10,423
set camera
""" defines: - CameraWindow """ from copy import deepcopy from qtpy.QtWidgets import ( QApplication, QLabel, QLineEdit, QPushButton, QTableWidget, QTableWidgetItem, QHBoxLayout, QVBoxLayout, QGridLayout) from pyNastran.gui.utils.qt.pydialog import PyDialog class CameraWindow(PyDialog): """defines the C...
10,424
removestartup
#!/usr/bin/env python import logging from collections import defaultdict from functools import reduce from django.core.cache import cache from django.db.models import Q from django.forms.models import model_to_dict from django.utils.translation import gettext_lazy as _ from dongtai_common.endpoint import R, UserEndPo...
10,425
perform create
import datetime import pytz from django.db.models import Q from django_filters.rest_framework import DjangoFilterBackend from rest_framework import status from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework...
10,426
create task
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in complia...
10,427
test carbon success value metric from topic
# -*- coding: utf-8 -*- # (c) 2021-2022 The mqttwarn developers from unittest import mock from unittest.mock import Mock, call from mqttwarn.model import ProcessorItem as Item from mqttwarn.util import load_module_from_file def test_carbon_success_metric_value_timestamp(mocker, srv, caplog): item = Item( ...
10,428
test field filters
from solvebio import Filter from solvebio.test.helper import SolveBioTestCase class BaseFileQueryTest(SolveBioTestCase): """Test File Queries""" def setUp(self): super(BaseFileQueryTest, self).setUp() self.file = self.client.Object.get_by_full_path( self.TEST_FILE_FULL_PATH) ...
10,429
set up files
# coding: utf-8 # flake8: noqa """ Run the tests. $ docker pull swaggerapi/petstore $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore $ pytest -vv """ import os import unittest import asyncio import pytest import petstore_api from petstore_api import ...
10,430
to representation
from functools import partial from urllib.parse import urlencode from django.db.models import Manager from rest_framework import serializers from rest_framework.serializers import HyperlinkedModelSerializer from rest_framework.utils.field_mapping import get_nested_relation_kwargs from rest_framework.fields import get_...
10,431
test level default
import numpy as np from skimage.measure import find_contours from skimage._shared.testing import assert_array_equal import pytest a = np.ones((8, 8), dtype=np.float32) a[1:-1, 1] = 0 a[1, 1:-1] = 0 x, y = np.mgrid[-1:1:5j, -1:1:5j] r = np.sqrt(x**2 + y**2) def test_binary(): ref = [[6.0, 1.5], [5.0...
10,432
test ignore methods
from .fixtures import * import json as pyjson from archivebox.extractors import ignore_methods, get_default_archive_methods, should_save_title def test_wget_broken_pipe(tmp_path, process, disable_extractors_dict): disable_extractors_dict.update({"USE_WGET": "true"}) add_process = subprocess.run(['archivebox', ...
10,433
init handler
import datetime import logging import queue import threading from pathlib import Path from typing import Any, Dict from cloudevents.conversion import to_json from cloudevents.http import CloudEvent from _ert_job_runner.client import ( Client, ClientConnectionClosedOK, ClientConnectionError, ) from _ert_jo...
10,434
test get header list
import unittest from unittest import mock from wqflask import app from wqflask.snp_browser.snp_browser import get_gene_id from wqflask.snp_browser.snp_browser import get_gene_id_name_dict from wqflask.snp_browser.snp_browser import check_if_in_gene from wqflask.snp_browser.snp_browser import get_browser_sample_lists fr...
10,435
phase noise diffusion
# Copyright 2016 CERN. This software is distributed under the # terms of the GNU General Public Licence version 3 (GPL Version 3), # copied verbatim in the file LICENCE.md. # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Orga...
10,436
filter international words
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
10,437
test load index from storage multiple
from pathlib import Path from typing import List import pytest from llama_index.indices.list.base import SummaryIndex from llama_index.indices.loading import ( load_index_from_storage, load_indices_from_storage, ) from llama_index.indices.service_context import ServiceContext from llama_index.indices.vector_s...
10,438
test get image or proxy url thumbnail
from unittest.mock import MagicMock import graphene import pytest from django.core.files import File from .. import FILE_NAME_MAX_LENGTH, ThumbnailFormat from ..models import Thumbnail from ..utils import ( ProcessedImage, get_filename_from_url, get_image_or_proxy_url, get_thumbnail_size, prepare_...
10,439
test download 9
#coding: utf-8 import os import time import glob from threading import Thread from seaf_op import get_token, urlopen from . import test_util ''' Test add-delete-add sequence. ''' def test_add_delete_add(): test_util.set_test_root('test_add_delete_add') test_util.mkfile(1, 'test/1.txt', 'aaaaaaaa') test_u...
10,440
get database upgrade patch setting
import logging from util import get_credentials_for from util import get_replication_topology_instance from dbaas_credentials.models import CredentialType from physical.models import DatabaseInfra LOG = logging.getLogger(__name__) def get_deploy_settings(class_path): return get_replication_topology_instance(clas...
10,441
test migrations
"""Unit tests for data migrations in the 'stock' app""" from django_test_migrations.contrib.unittest_case import MigratorTestCase from InvenTree import unit_test class TestSerialNumberMigration(MigratorTestCase): """Test data migration which updates serial numbers""" migrate_from = ('stock', '0067_alter_st...
10,442
serialize form history
from django.utils.functional import lazy from jsonfield import JSONField from rest_framework import serializers from corehq.blobs.models import BlobMeta from corehq.form_processor.exceptions import MissingFormXml from corehq.form_processor.models import ( CommCareCaseIndex, CommCareCase, CaseTransaction, XForm...
10,443
handle bad input
#!/usr/bin/env python3 # Copyright 2013-present Barefoot Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
10,444
run
#!/usr/bin/env python3 # Copyright (c) 2018, Niklas Hauser # # This file is part of the modm project. # # 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...
10,445
plot nodesets
#!/usr/bin/env pvpython # -*- Python -*- (syntax highlighting) # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University at Buffalo # # This code was developed as part of the Computational Infr...
10,446
test text no optional data
# -*- coding: utf-8 # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above c...
10,447
get experiment flaky
import contextlib import json import ssl import threading from http.server import HTTPServer, SimpleHTTPRequestHandler from pathlib import Path from typing import Any, Callable, Dict, Iterator, Optional, Tuple import determined from determined.common.api import bindings from determined.common.api.authentication import...
10,448
on screen changed
from typing import TYPE_CHECKING, Dict, Optional import networkx from angr import SIM_PROCEDURES from angr.code_location import ExternalCodeLocation from PySide6.QtCore import QSize from PySide6.QtWidgets import QHBoxLayout from angrmanagement.ui.widgets.qdep_graph import QDependencyGraph from angrmanagement.ui.widge...
10,449
resize image
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
10,450
get unpatched function
""" Monkey patching of distutils. """ import functools import inspect import platform import sys import types from importlib import import_module import distutils.filelist __all__ = [] """ Everything is private. Contact the project team if you think you need this functionality. """ def _get_mro(cls): """ ...
10,451
get parameters
from abc import ABC class Distribution(ABC): def __init__(self, ordered_parameters: list = None, **kwargs: dict): """ A parent class to all :class:`.Distribution` classes. All distributions possess a number of methods to perform basic probabilistic operations. For most of the pre...
10,452
get parent node
from __future__ import absolute_import, division, unicode_literals from six import text_type from collections import OrderedDict from lxml import etree from ..treebuilders.etree import tag_regexp from . import base from .. import _ihatexml def ensure_str(s): if s is None: return None elif isinstan...
10,453
get veff
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
10,454
on chk nightdone
from __future__ import annotations import random import re from typing import Optional from src import channels, users from src.containers import UserSet, UserDict from src.decorators import command from src.dispatcher import MessageDispatcher from src.events import Event, event_listener from src.functions import get...
10,455
test record version
from candidates.tests.auth import TestUserMixin from candidates.tests.factories import MembershipFactory from candidates.tests.uk_examples import UK2015ExamplesMixin from django.test import TestCase from people.tests.factories import PersonFactory from uk_results.models import CandidateResult, ResultSet class TestUKR...
10,456
parse metadata
# -*- coding: utf-8 -*- # Copyright 2007-2023 The HyperSpy developers # # This file is part of RosettaSciIO. # # RosettaSciIO 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...
10,457
extract style from prompts
import csv import os import os.path import re import typing import shutil class PromptStyle(typing.NamedTuple): name: str prompt: str negative_prompt: str def merge_prompts(style_prompt: str, prompt: str) -> str: if "{prompt}" in style_prompt: res = style_prompt.replace("{prompt}", prompt) ...
10,458
test int local pre post conditions
""" SSH integration tests - mostly checking for idempotency on file operations. """ import time import pytest DOCKER_IMAGE = ( "linuxserver/openssh-server@sha256:" "1e33f77de1021dcd2e52a6bbc787082abfb591416a00e6a1422b83b3b426f09d" ) PYINFRA_COMMAND = ( "pyinfra -v localhost " "--ssh-port 2222 " ...
10,459
test
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frederic Rodrigo 2014-2015 ## ## ...
10,460
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 # --------------------------------...
10,461
saved searches group
# Copyright 2021 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...
10,462
test content type
import time from unittest.mock import patch from django.core.cache import cache from django.core.exceptions import ValidationError from django.test import override_settings from django.test.utils import isolate_apps from nautobot.core.models import BaseModel from nautobot.core.models.utils import construct_composite...
10,463
append varint64
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
10,464
pull git for branch
# SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors # # SPDX-License-Identifier: Apache-2.0 import dataclasses import enum from os import path import typing import yaml import git import tempfile from urllib.parse import urlparse, ParseResult import re import logging import ct...
10,465
log image stats
import asyncio import qrcode from qrcode.exceptions import DataOverflowError import math import urllib from PIL import Image, ImageQt from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QRect, QPoint from PyQt5.QtGui import QImage, QColor from PyQt5.QtQuick import QQuickImageProvider from electrum...
10,466
for request
from . import auth_checks from django.db import models from django.contrib.sessions.models import Session from django.contrib.sessions.backends.db import SessionStore from django.contrib.auth.signals import user_logged_in, user_logged_out from django.db.models.signals import post_save from django.utils import timezon...
10,467
dataloader tester
import unittest from typing import Type import pkg_resources import yaml from torch.utils.data import DataLoader, Dataset from super_gradients.training.dataloaders.dataloaders import ( cityscapes_train, cityscapes_val, cityscapes_stdc_seg50_train, cityscapes_stdc_seg50_val, cityscapes_stdc_seg75_v...
10,468
forward
import math import torch import torch.nn.functional as F from .switch_gating import one_hot # from atorch.common.log_utils import default_logger as logger def topk_gating(logits, k=2, capacity=-1, need_l_aux=False, dispatchV2=False): """Implements Top2Gating with prototypes on logits.""" # NOTE(msb) softm...
10,469
test adds meters to latitude
import pytest from geocalc import ( bbox, destination, distance, haversine_distance, vincenty_distance, latitude_add, longitude_add, random_points, ) from ichnaea import constants class TestBbox(object): def test_null(self): lat, lon = (1.0, 1.0) lat1, lon1, lat2, ...
10,470
resize event
# /*########################################################################## # # Copyright (c) 2004-2021 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 deal # in the Sof...
10,471
is dirty
from _typeshed import StrPath, SupportsKeysAndGetItem from collections.abc import Container, Iterable, Iterator, Mapping, MutableMapping, Sequence from typing import TypeVar, overload from typing_extensions import Literal, TypeAlias from uuid import UUID _T = TypeVar("_T") _Token: TypeAlias = ( tuple[Literal["EMP...
10,472
queue url
import json import logging from botocore.exceptions import ClientError from localstack.aws.connect import connect_to from localstack.services.cloudformation.deployment_utils import ( generate_default_name, params_list_to_dict, params_select_attributes, ) from localstack.services.cloudformation.service_mod...
10,473
test simple cue fmt issue
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from collections import namedtuple from textwrap import dedent from typing import Iterable import pytest from pants.backend.cue.goals.fix import CueFmt...
10,474
xml empty tag
############################################################################### # # XMLwriter - A base class for XlsxWriter classes. # # Used in conjunction with XlsxWriter. # # Copyright 2013-2017, John McNamara, jmcnamara@cpan.org # # Standard packages. import re import codecs # Standard packages in Python 2/3 comp...
10,475
compute closest entity
# Copyright (C) 2018-2021 Michal Habera, Garth N. Wells and Jørgen S. Dokken # # This file is part of DOLFINx (https://www.fenicsproject.org) # # SPDX-License-Identifier: LGPL-3.0-or-later """Methods for geometric searches and operations.""" from __future__ import annotations import typing import numpy as np impo...
10,476
st json
import contextlib import copy import filecmp import random import os import shutil import sys from string import printable import tempfile import requests from verta._internal_utils import _utils from hypothesis import strategies as st # Jenkins workers had been getting lost during artifact tests; # we added this ...
10,477
read element date
# -*- coding: utf-8 -*- from ...compat import bytes from ...exceptions import ReadError, SizeError from datetime import datetime, timedelta from io import BytesIO from struct import unpack __all__ = ['read_element_id', 'read_element_size', 'read_element_integer', 'read_element_uinteger', 'read_element_floa...
10,478
get minimum radiance
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016-2019 Satpy developers # # This file is part of satpy. # # satpy 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 Licens...
10,479
test invoice v2
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import pytest import functools from devtools_testutils import recorded_by_proxy from azure.core.exceptions import HttpResponseError from azure.core.crede...
10,480
test find fittest converter read
# -*- coding: utf-8 -*- ''' Created on 1 Aug 2013 @author: Éric Piel Copyright © 2013 Éric Piel, Delmic This file is part of Odemis. Odemis 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. Odemis is ...
10,481
get
# 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 ._en...
10,482
has any corner components
# Copyright 2015 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...
10,483
parse
import sys from typing import ( Any, ClassVar, Iterator, List, Match, Optional, Pattern, Tuple, Type, TypeVar, Union, ) from mistune._types import State, Tokens from mistune.inline_parser import InlineParser, RendererT from mistune.renderers import DataT from mistune.scanner...
10,484
parse config from file
from dataclasses import dataclass from importlib import import_module from pathlib import Path from typing import Dict, List, Optional FALLBACK_LOCALE = "en_US" DEFAULT_SECUREDROP_ROOT = Path(__file__).absolute().parent @dataclass(frozen=True) class _FlaskAppConfig: """Config fields that are common to the Journ...
10,485
get express route circuit authorization
# 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__ ...
10,486
get ledger identity
# 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...
10,487
test read handles examples
# Copyright 2023 OpenC3, Inc. # All Rights Reserved. # # This program is free software; you can modify and/or redistribute it # under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; version 3 with # attribution addendums as found in the LICENSE.txt # # This program is ...
10,488
test context
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2023 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
10,489
prepare environment
''' copyright: Copyright (C) 2015-2022, Wazuh Inc. Created by Wazuh, Inc. <info@wazuh.com>. This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 type: integration brief: Whenever a file is created or deleted from the group directory the merged.mg file ...
10,490
install firmware
#!/usr/bin/env python ######################################################################## # Quanta IX9 # # Name: component.py, version: 1.3 # Module contains an implementation of SONiC Platform Base API and # provides the Components' (e.g., BIOS, CPLD, FPGA, etc.) available in # the platform # ###################...
10,491
load coref
"""Document class is a container for UD trees.""" import io import contextlib import logging import udapi.core.coref from udapi.core.bundle import Bundle from udapi.block.read.conllu import Conllu as ConlluReader from udapi.block.write.conllu import Conllu as ConlluWriter from udapi.block.read.sentences import Sentenc...
10,492
value
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 The Pybricks Authors """Use LEGO® MINDSTORMS® NXT motors and sensors with the EV3 brick.""" from .parameters import Port from ._common import ColorLight, CommonColorSensor from .iodevices import AnalogSensor from typing import Callable, Optional, Tuple cl...
10,493
run simulations dask
import numpy as np import os import pandas as pd import time import math from itertools import chain import bifacial_radiance from dask.distributed import Client from math import sin, cos, radians # Run simulation using the given timestamp def simulate_single(clearance_height=None, xgap=None, tilt...
10,494
test deep copy
"""Unit tests for collections.defaultdict.""" import os import copy import tempfile import unittest from test import test_support from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): d1 = defaultdict() self.assertEqual...
10,495
asset class for instrument
import pandas as pd from syscore.exceptions import missingInstrument from sysdata.sim.sim_data import simData from sysobjects.adjusted_prices import futuresAdjustedPrices from sysobjects.instruments import ( assetClassesAndInstruments, instrumentCosts, futuresInstrumentWithMetaData, ) from sysobjects.mult...
10,496
test that set config creates new sections
import enum import os from contextlib import contextmanager from textwrap import dedent import pytest from _stbt.config import (_config_init, _sponge, ConfigurationError, get_config, set_config) from _stbt.utils import named_temporary_directory, scoped_curdir, to_unicode def test_sponge_th...
10,497
active count
import sys from collections.abc import Callable, Iterable, Mapping from types import TracebackType from typing import Any, List, Optional, Type, TypeVar, Union _T = TypeVar("_T") __all__ = [ "get_ident", "active_count", "Condition", "current_thread", "enumerate", "main_thread", "TIMEOUT_MA...
10,498
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...
10,499
test fetch raster ascombined
# Copyright Cartopy Contributors # # This file is part of Cartopy and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. import numpy as np from numpy.testing import assert_array_equal import pytest import cartopy.crs as ccrs import cartopy...