id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
8,100
nogo
# Copyright 2018 The Bazel 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 la...
8,101
get samples
from typing import Set from django.db import models from django.utils import timezone from data_refinery_common.models.jobs.job_managers import ( FailedJobsManager, HungJobsManager, LostJobsManager, UnqueuedJobsManager, ) from data_refinery_common.models.sample import Sample class ProcessorJob(model...
8,102
dump
import os import base64 import dataclasses from datetime import date, datetime, time # noqa: I251 from typing import Any, Callable, List, Protocol, IO, Union from uuid import UUID from hexbytes import HexBytes try: from pydantic import BaseModel as PydanticBaseModel except ImportError: PydanticBaseModel = Non...
8,103
app
from unittest.mock import call import pytest from botocore.exceptions import ClientError from flask import Flask from METHOD_NAME import create_app from METHOD_NAME.aws.metrics import ( put_batch_saving_bulk_created, put_batch_saving_bulk_processed, put_batch_saving_expiry_metric, put_batch_saving_inf...
8,104
test private thread is not watched
from ..models import WatchedThread from ..threads import ThreadNotifications, watch_new_private_thread def test_private_thread_is_watched_with_email_notifications(user, private_thread): user.watch_new_private_threads_by_other_users = ThreadNotifications.SITE_AND_EMAIL user.save() watched_thread = watch_n...
8,105
cast
# 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...
8,106
test csm finite ratio function
from __future__ import annotations import unittest import numpy as np import pytest from pytest import approx from pymatgen.analysis.chemenv.utils.func_utils import ( CSMFiniteRatioFunction, CSMInfiniteRatioFunction, DeltaCSMRatioFunction, ) __author__ = "waroquiers" class TestFuncUtils(unittest.TestC...
8,107
has one required feature
import logging from django.conf import settings from django.core.signing import SignatureExpired from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.urls import reverse from django.utils.http import urlencode from sentry import features, integrations from sentry.integrations.pipeline i...
8,108
cmdline stacked
''' BlueSky OpenGL line and polygon (areafilter) drawing. ''' import numpy as np import bluesky as bs from bluesky.ui import palette from bluesky.ui.qtgl import console from bluesky.ui.qtgl import glhelpers as glh palette.set_default_colours( polys=(0, 0, 255), previewpoly=(0, 204, 255) ) # Static defines P...
8,109
fname dict
#!/usr/bin/env python # """ This "statsHandler" is a PHANGS-ALMA internal-use object and not intended as a general part of the pipeline. It uses the general handler infrastructure to loop over measurement sets and compile statistics, which are then dumped to JSON files for further analysis. Other users should feel free...
8,110
test read phonopy yaml with stream
"""Tests of PhonopyYaml.""" from io import StringIO from pathlib import Path import numpy as np import yaml from phonopy import Phonopy from phonopy.interface.phonopy_yaml import ( PhonopyYaml, PhonopyYamlLoader, load_phonopy_yaml, read_cell_yaml, read_phonopy_yaml, ) from phonopy.interface.vasp i...
8,111
open in future
""" Models for actual Polling Stations and Polling Districts! """ import urllib.parse from datetime import datetime from itertools import groupby from core.opening_times import OpeningTimes from councils.models import Council from django.contrib.gis.db import models from django.core.exceptions import ObjectDoesNotExis...
8,112
solve
import numpy as np from scipy.sparse import coo_matrix, csc_matrix, csr_matrix, spdiags, eye from fealpy.functionspace import ScaledMonomialSpace2d from fealpy.quadrature import GaussLegendreQuadrature from math import sqrt from fealpy.solver import METHOD_NAME from scipy.sparse.linalg import spsolve from timeit impor...
8,113
evaluate mapping
import sys from typing import Any from typing import Iterator from typing import Tuple from typing import Type from typing import TypeVar from typing import Union from typing_extensions import get_args from typing_extensions import get_origin NONE_TYPE = type(None) try: from types import UnionType # type: igno...
8,114
params
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test of the Process facility independent of Ice. Copyright 2008-2014 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ from builtins import str from builtins import object import os import sys import log...
8,115
translate ui
# 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 ...
8,116
gen data
# Copyright (c) 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
8,117
munge recipe set
# Bob build tool # Copyright (C) 2022 Jan Klötzke # # SPDX-License-Identifier: GPL-3.0-or-later from ...archive import JenkinsArchive from ...intermediate import StepIR, PackageIR, RecipeIR, ToolIR, SandboxIR, RecipeSetIR from ...scm import auditFromData from ...utils import runInEventLoop def getJenkinsVariantId(st...
8,118
size hint
# /*########################################################################## # Copyright (C) 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 deal # in the Software w...
8,119
test antialias
# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
8,120
next header
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path impor...
8,121
kate
""" 'editor' hooks for common editors that work well with ipython They should honor the line number argument, at least. Contributions are *very* welcome. """ from __future__ import print_function import os import pipes import shlex import subprocess import sys from IPython import get_ipython from IPython.core.error...
8,122
translate to collector
# Copyright The OpenTelemetry 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 or agreed to in ...
8,123
fit
# Author: Nikolaos Perrakis <nikos@nannyml.com> # # License: Apache Software License 2.0 """Simple Statistics Average Calculator""" from typing import Any, Dict, Optional import numpy as np import pandas as pd from pandas import MultiIndex from nannyml.base import AbstractCalculator from nannyml.chunk import C...
8,124
chown
import bz2 import gzip import lzma import os import pathlib import shutil import tarfile import zipfile from typing import Union class FixedZipFile(zipfile.ZipFile): """The python zipfile library doesn't do a good job handling unix permissions in zip files. Notably, it drops execute permissions on files.""" ...
8,125
param in optimizer
# Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 import itertools from typing import Mapping, Type, cast from unittest.mock import Mock import pytest import torch from torch import nn from composer.algorithms.blurpool import BlurMaxPool2d from composer.utils import module_surgery from...
8,126
stop
import rospy import threading from math import asin, atan2, pi from nav_msgs.msg import Odometry def quat2Yaw(qw, qx, qy, qz): ''' Translates from Quaternion to Yaw. @param qw,qx,qy,qz: Quaternion values @type qw,qx,qy,qz: float @return Yaw value translated from Quaternion ''' rotateZa...
8,127
test post training quantize
# 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...
8,128
get action
import json from collections import defaultdict, OrderedDict from plover import log class Keymap: def __init__(self, keys, actions): # List of supported actions. self._actions = OrderedDict((action, n) for n, action in enume...
8,129
multi content template color
from enigma import GRADIENT_VERTICAL, RT_HALIGN_LEFT, RT_VALIGN_TOP, eListboxPythonMultiContent from skin import parseColor from Tools.Directories import SCOPE_GUISKIN, resolveFilename from Tools.LoadPixmap import LoadPixmap def __resolveColor(color): if isinstance(color, str): try: return parseColor(color).ar...
8,130
generate engines
## @package generator # Module caffe2.python.docs.generator import argparse import os from caffe2.python import core, workspace from caffe2.python.docs.formatter import Markdown OpSchema = workspace.C.OpSchema class DocUploader: def __init__(self): pass def upload(self, text): pass cla...
8,131
method
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
8,132
test seed
from sqlglot import exp, parse_one from sqlmesh.core.dialect import ( JinjaQuery, JinjaStatement, Model, format_model_expressions, parse, text_diff, ) def test_format_model_expressions(): x = format_model_expressions( parse( """ MODEL( name a.b, kind full, ...
8,133
test diskusage match no percent
""" tests.pytests.unit.beacons.test_diskusage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk usage beacon test cases """ from collections import namedtuple import pytest import salt.beacons.diskusage as diskusage from tests.support.mock import MagicMock, Mock, patch @pytest.fixture def configure_loader...
8,134
test settings cache key includes cache name
import pytest from .. import SETTINGS_CACHE from ..dynamicsettings import DynamicSettings def test_settings_are_loaded_from_database_if_cache_is_not_available( db, mocker, cache_versions, django_assert_num_queries ): mocker.patch("django.core.cache.cache.get", return_value=None) with django_assert_num_qu...
8,135
meta redirect
#! /usr/bin/env python """Connector to doi.org (API)""" from __future__ import annotations import json from sqlite3 import OperationalError from typing import TYPE_CHECKING from urllib.parse import unquote import requests from bs4 import BeautifulSoup import colrev.env.package_manager import colrev.exceptions as col...
8,136
test admin bn15
# Copyright © 2022 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...
8,137
test convert crlf to lf
# test_line_ending.py -- Tests for the line ending functions # Copyright (C) 2018-2019 Boris Feld <boris.feld@comet.ml> # # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU # General Public License as public by the Free Software Foundation; version 2.0 # or (at your option) any later version. ...
8,138
match targets to proposals
import torch from torch.nn import functional as F from maskrcnn_benchmark.modeling.matcher import Matcher from maskrcnn_benchmark.modeling.balanced_positive_negative_sampler import ( BalancedPositiveNegativeSampler, ) from maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou from maskrcnn_benchmark.modeli...
8,139
test init
# Test mock_tk.Text class against tkinter.Text class by running same tests with both. import unittest from test.test_support import requires from _tkinter import TclError class TextTest(object): hw = 'hello\nworld' # usual initial insert after initialization hwn = hw+'\n' # \n present at initialization, be...
8,140
register metric
""" 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...
8,141
get vectorizer
# -*- coding: utf-8 -*- from collections import defaultdict import os import json import _pickle as cPickle import zipfile import urllib.request import logging import tarfile import pathlib import time import re t = time.time() logging.basicConfig( level=logging.INFO, format="%(asctime)s %(module)s %(lineno)d ...
8,142
vander
import numpy import cupy from cupy import _core def diag(v, k=0): """Returns a diagonal or a diagonal array. Args: v (array-like): Array or array-like object. k (int): Index of diagonals. Zero indicates the main diagonal, a positive value an upper diagonal, and a negative value a...
8,143
build arguments schema
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
8,144
etag
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
8,145
condition
# 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...
8,146
print result
import numpy as np import matplotlib.pyplot as plt import matplotlib.contour as ctr import scipy.io from scipy.constants import G import copy from ipywidgets import ( interactive, IntSlider, widget, FloatText, FloatSlider, ToggleButton, VBox, HBox, Output, Layout, ) plotdata = ...
8,147
get rejection reasons
# -*- coding: utf-8 -*- # # This file is part of SENAITE.CORE. # # SENAITE.CORE 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, version 2. # # This program is distributed in the hope that it will be useful, bu...
8,148
main
""" Inverted Pendulum MPC control author: Atsushi Sakai """ import math import time import cvxpy import matplotlib.pyplot as plt import numpy as np # Model parameters l_bar = 2.0 # length of bar M = 1.0 # [kg] m = 0.3 # [kg] g = 9.8 # [m/s^2] nx = 4 # number of state nu = 1 # number of input Q = np.diag([0.0...
8,149
convert rttm text
#!/usr/bin/env python3 import argparse import collections.abc import logging import os import re from pathlib import Path from typing import Union import humanfriendly import numpy as np import soundfile from typeguard import check_argument_types from espnet2.utils.types import str_or_int def METHOD_NAME( path...
8,150
test from cache expired and dns fail
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2019 New Vector 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 ...
8,151
extract
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
8,152
test soft shrink alpha runtime error
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
8,153
build generator
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import Namespace import os import re import unittest from pathlib import Path from tqdm import tqdm from typing import List, Dic...
8,154
module parameters
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from ansible.module_utils.common.parameters import _list_no_log...
8,155
get request header
""" Context object of incoming request """ from typing import Dict, Optional, Tuple class Context(object): """ Context stores model relevant worker information Some fixed during load times and some set by the service """ def __init__( self, model_name, model_dir, ...
8,156
file version info from id and name
###################################################################### # # File: b2sdk/v1/file_version.py # # Copyright 2021 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from __future__ import annota...
8,157
get layer ids
from typing import List, Optional from torch import nn from ..constants import FEATURES, LABEL, LOGITS, NUMERICAL from .mlp import MLP from .numerical_transformer import NumEmbeddings from .utils import init_weights class NumericalMLP(nn.Module): """ MLP for numerical input. """ def __init__( ...
8,158
reverse debugging
# Reverse debugging test # # Copyright (c) 2020 ISP RAS # # Author: # Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. import os import logging from avocado import skipIf from avocado_qemu impo...
8,159
requires member
# !/usr/bin/env python # 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 from functools import wraps from inspect import signature from django.conf import settings from dja...
8,160
run
from tqdm import tqdm from atomate.utils.utils import get_database, get_logger from atomate.vasp.builders.base import AbstractBuilder from atomate.vasp.builders.utils import dbid_to_int, dbid_to_str logger = get_logger(__name__) __author__ = "Alireza Faghanina <albalu@lbl.gov>, Anubhav Jain <ajain@lbl.gov>" class ...
8,161
parse arg start
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Utilities used for the documentation and built-in help.""" import re import sys import inspect import os.path import collections import enum from typing import Any, Callable, MutableMapping,...
8,162
parse subreddit
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# CatUserBot #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# # Copyright (C) 2020-2023 by TgCatUB@Github. # This file is part of: https://github.com/TgCatUB/catuserbot # and is released under the "GNU v3.0 License Agreement". # Please see: https://github.com/TgCatUB/catuserbot/blob/...
8,163
chain passes
# Owner(s): ["module: inductor"] from typing import Any, Callable import torch from torch._inductor.fx_passes.pre_grad import ( linear_permute_fusion, linear_transpose, permute_linear_fusion, permute_matmul_fusion, sink_cat_after_pointwise, transpose_linear, transpose_matmul, ) from torch.f...
8,164
manager from expression
import sys def typename(t): name = type(t).__name__ if sys.version_info < (2,5): if name == 'classobj' and issubclass(t, MyException): name = 'type' elif name == 'instance' and isinstance(t, MyException): name = 'MyException' return "<type '%s'>" % name class MyEx...
8,165
test precond solve
#!/usr/bin/env python3 import unittest import torch from linear_operator.operators import ( AddedDiagLinearOperator, DenseLinearOperator, DiagLinearOperator, RootLinearOperator, ) from linear_operator.test.linear_operator_test_case import LinearOperatorTestCase class TestAddedDiagLinearOperator(Lin...
8,166
get metadata
# -*- coding: utf-8 -*- """ sphinx.websupport.storage ~~~~~~~~~~~~~~~~~~~~~~~~~ Storage for the websupport package. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ class StorageBackend(object): def pre_build(self): """Calle...
8,167
from json
import json from sqlalchemy import Column, Integer, String, Text, Boolean from sqlalchemy.dialects.postgresql import JSONB from superagi.models.base_model import DBBaseModel class AgentWorkflowStepTool(DBBaseModel): """ Step of an agent workflow Attributes: id (int): The unique identifier of th...
8,168
is valid
########################################################################## # # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
8,169
decorated lock
# This class (SessionLockManager) encapsulates fcntl-based locking that works on NFS, AFS and locally. # You can use # python SessionLock.py {1|2} # to run locking tests (run several instances in the same directory, from # different machines) import functools import threading from collections import namedtuple impor...
8,170
parse node timeout configs
# -*- 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...
8,171
app id
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
8,172
set variant
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project from Qt import QtCore, QtWidgets from rezgui.util import create_pane from rezgui.widgets.VariantVersionsTable import VariantVersionsTable from rezgui.widgets.PackageLoadingWidget import PackageLoadingWidget from rezgui.widgets.Changelog...
8,173
reversed
# # Copyright (C) 2012, 2013 Uninett AS # Copyright (C) 2022 Sikt # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # This pr...
8,174
get transform at time
import abc import numpy as np from ..batch_rotations import norm_vectors from ._transform_graph_base import TransformGraphBase from ..transformations import check_transform, transform_from_pq, \ dual_quaternion_from_pq, pq_from_dual_quaternion, dual_quaternion_sclerp class TimeVaryingTransform(abc.ABC): ""...
8,175
test save load pretrained additional features
# Copyright 2021 The HuggingFace Team. 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 applicabl...
8,176
start test
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
8,177
get image boxes
# The implementation is based on mtcnn, available at https://github.com/TropComplique/mtcnn-pytorch import numpy as np from PIL import Image def nms(boxes, overlap_threshold=0.5, mode='union'): """Non-maximum suppression. Arguments: boxes: a float numpy array of shape [n, 5], where each r...
8,178
create file
#!/usr/bin/env python3 # # USAGE: test_usdt3.py # # Copyright 2018 Facebook, Inc # Licensed under the Apache License, Version 2.0 (the "License") from __future__ import print_function from bcc import BPF, USDT from unittest import main, TestCase from subprocess import Popen, PIPE import ctypes as ct import inspect, os...
8,179
test start animation failures
"""Test status bar integration.""" from __future__ import annotations import pytest from mock import AsyncMock from typing import List, Type, Optional from opentrons_hardware.drivers.binary_usb import BinaryMessenger from opentrons_hardware.firmware_bindings.utils import UInt8Field, UInt16Field from opentrons_hardware...
8,180
get short name
# # Copyright 2019 Xilinx 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 applicable law or agreed to in writi...
8,181
create spark session job
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
8,182
to str
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.28 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
8,183
test get evicted pods
import mock from kubernetes.client import V1DeleteOptions from pysensu_yelp import Status from paasta_tools.kubernetes.bin.kubernetes_remove_evicted_pods import ( evicted_pods_per_service, ) from paasta_tools.kubernetes.bin.kubernetes_remove_evicted_pods import EvictedPod from paasta_tools.kubernetes.bin.kubernete...
8,184
context sensitive executable path
"""This module exports the ComposerLinter subclass of Linter.""" import codecs import json import hashlib import os import shutil from .. import linter, util class ComposerLinter(linter.Linter): """ This Linter subclass provides composer-specific functionality. Linters installed with composer should in...
8,185
parse additional values
#!/usr/bin/env python import copy import socket import struct class ProxyProtocol(object): MAGIC = b'\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A' # Header is magic + versioncommand (1) + family (1) + content length (2) HEADER_SIZE = len(MAGIC) + 1 + 1 + 2 PORT_SIZE = 2 def consumed(self): ...
8,186
flag
import os from bs4 import BeautifulSoup from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.urls import reverse from django.utils.html import urlize, escape from notificati...
8,187
register i18n js
from __future__ import annotations import logging import os from pathlib import Path from typing import Any, Dict from flask import Flask from flask_assets import Bundle from flask_assets import Environment as AssetsEnv from abilian.services.security import Anonymous from abilian.web.assets.filters import ClosureJS ...
8,188
extract color
from . import Camera import six import atexit import ctypes import sys if sys.platform == 'win32': memcpy = ctypes.cdll.msvcrt.memcpy elif sys.platform == 'darwin': memcpy = ctypes.CDLL('libSystem.dylib').memcpy else: #linux memcpy = ctypes.CDLL('libc.so.6').memcpy from thorlabs_tsi_sdk import tl_camera s...
8,189
post
from datetime import datetime from django.core.exceptions import ValidationError from django.db.models import Value from django.db.models.functions import Coalesce from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from rest_framework import status from rest_fram...
8,190
list subtitles
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import re import io import codecs from hashlib import sha1 from random import randint from zipfile import ZipFile, is_zipfile from bs4 import BeautifulSoup from requests import Session from guessit import guessit from dogpile.cache.api import...
8,191
recurse f multipar
from itertools import chain, repeat, zip_longest from sverchok.data_structure import levels_of_list_or_np, list_match_func # the class based should be slower but kept until tested class SvZipExhausted(Exception): pass class SvSentinel: def __init__(self, fl, top): self.fl = fl self.top = top ...
8,192
test hover conda yaml conda package
from typing import Iterator import pytest from robocorp_ls_core.protocols import IDocument def get_conda_yaml_doc(datadir, name) -> IDocument: from robocorp_ls_core import uris from robocorp_ls_core.watchdog_wrapper import create_observer from robocorp_ls_core.workspace import Workspace ws = Workspa...
8,193
get matched pattern
# Copyright 2022 The BladeDISC Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or ...
8,194
test operator
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
8,195
get ion insertion wf
""" Define workflow related to battery material simulation --- they all have a working ion """ from typing import List from fireworks import Firework, Workflow from pymatgen.analysis.structure_matcher import StructureMatcher from pymatgen.core import Structure from atomate.common.powerups import powerup_by_kwargs fro...
8,196
test raw sss
#!/usr/bin/env python3 # Copyright 2018-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright ...
8,197
has persistent switch enabled
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2023 PyMeasure Developers # # 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 limit...
8,198
has children
import typing from qtpy.QtCore import ( QAbstractItemModel, QAbstractProxyModel, QModelIndex, QObject, Signal, Slot, ) from ert.gui.model.snapshot import IsEnsembleRole, IsRealizationRole, NodeRole class RealListModel(QAbstractProxyModel): def __init__( self, parent: typi...
8,199
passband ripple to dev
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, filter import sys import math # ---------------------------------------------------------------- # See optfir for an expla...