id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
800
set config
from lake.models.model import Model from lake.models.addr_gen_model import AddrGenModel import math as mt import kratos as kts class OutputAddrCtrlModel(Model): def __init__(self, interconnect_output_ports, mem_depth, num_tiles, banks, ...
801
get keyspace from user profile
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
802
get sentry server rpc addresses
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
803
generate sub configuration description
from lnst.Recipes.ENRT.ConfigMixins.BaseSubConfigMixin import BaseSubConfigMixin class BaseHWConfigMixin(BaseSubConfigMixin): def apply_sub_configuration(self, config): super().apply_sub_configuration(config) self.hw_config(config) def remove_sub_configuration(self, config): self.hw_de...
804
test invalid
import pytest import math from pint.definitions import Definition from pint.errors import DefinitionSyntaxError from pint.facets.nonmultiplicative.definitions import ( LogarithmicConverter, OffsetConverter, ) from pint.facets.plain import ( AliasDefinition, DimensionDefinition, PrefixDefinition, ...
805
test bad indentation
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ## ## Testing ErrorListener ## import unittest from iptest import IronPythonTestCase, skipUnlessIronPython, is...
806
get config description
# -*- coding: utf-8 -*- # # 2015-02-25 Cornelius Kölbel <cornelius@privacyidea.org> # Initial writup # # This code is free software; you can redistribute it and/or # modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE # License as published by the Free Software Foundation; either # version 3...
807
set up
#!/usr/bin/python3 # vim: set makeprg=python3-flake8\ % import dbus import time import abrt_p2_testing from abrt_p2_testing import (BUS_NAME, Problems2Task, get_huge_file_path, wait_for_task_status) class TestTaskNewProblem(abrt_p2_testing.TestCase): def METHOD_NAME(self): ...
808
properties
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
809
check or create
"""Artifact cache.""" import contextlib import errno import hashlib import os import shutil from pathlib import Path from tempfile import NamedTemporaryFile from typing import IO, TYPE_CHECKING, ContextManager, Generator, Optional, Tuple import wandb from wandb import env, util from wandb.errors import term from wandb...
810
search electrode docs
from __future__ import annotations import warnings from collections import defaultdict from emmet.core.electrode import InsertionElectrodeDoc from pymatgen.core.periodic_table import Element from mp_api.client.core import BaseRester from mp_api.client.core.utils import validate_ids class ElectrodeRester(BaseRester...
811
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 # --------------------------------...
812
nll
from typing import Dict, Optional, Tuple import torch import torch.nn.functional as F from typeguard import check_argument_types from espnet2.lm.abs_model import AbsLM from espnet2.torch_utils.device_funcs import force_gatherable from espnet2.train.abs_espnet_model import AbsESPnetModel from espnet.nets.pytorch_backe...
813
test pipenv works with pyscaffold
import json import os import sys from functools import partial from pathlib import Path from subprocess import CalledProcessError import pytest from pyscaffold import __version__ as pyscaffold_version from pyscaffold.api import create_project from pyscaffold.extensions.venv import Venv from .helpers import find_venv...
814
pkt callback
import ptf.packet as scapy # noqa F401 import ptf.dataplane as dataplane # noqa F401 import acs_base_test from ptf.base_tests import BaseTest import scapy.all as scapy2 from time import sleep from threading import Thread class FailingTest(BaseTest): ''' Test designed to fail ''' def runTest(sel...
815
register random
# 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...
816
fqdn
# 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__ ...
817
test restict country
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for running the POI searcher. """ import pytest import nominatim.api as napi from nominatim.api.ty...
818
set sink to use
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
819
delete all locations
from collections import namedtuple from django.test import TestCase from corehq.apps.commtrack.tests.util import bootstrap_domain from corehq.apps.users.models import HqPermissions, UserRole from corehq.util.test_utils import unit_testing_only from ..models import LocationType, SQLLocation, make_location TEST_DOMAI...
820
test dask profile link
import unittest from unittest import mock from tethys_compute.views.dask_dashboard import dask_dashboard class TestDaskDashBoard(unittest.TestCase): def setUp(self): pass def tearDown(self): pass @mock.patch("tethys_compute.views.dask_dashboard.render") @mock.patch("tethys_compute.vi...
821
start aiotest
# FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END """ Async Plugin used for testing purpose """ import asyncio import copy import uuid import logging import async_ingest from fledge.common import logger from fledge.services.south import exceptions from threading import Thread from datetime import d...
822
set up
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from gnuradio import gr, gr_unittest, blocks from gnuradio import fec from gnuradio.fec import extended_decoder from gnuradio.fec.polar.encod...
823
connect socket
import asyncio import threading import zmq import zmq.asyncio from lamden.logger.base import get_logger from lamden.crypto.wallet import Wallet from contracting.db.encoder import encode from typing import Callable ATTRIBUTE_ERROR_TO_ADDRESS_NOT_NONE = "to_address property cannot be none." class Lock: def __init_...
824
test stspa 2d explicit
import unittest import numpy as np import numpy.testing as npt from scipy.ndimage import gaussian_filter import sigpy as sp from sigpy.mri import linop, rf, sim if __name__ == "__main__": unittest.main() class TestPtx(unittest.TestCase): @staticmethod def problem_2d(dim): img_shape = [dim, dim]...
825
helper
import unittest import torch from pytorch_metric_learning.distances import LpDistance from pytorch_metric_learning.losses import NTXentLoss, SupConLoss from pytorch_metric_learning.reducers import AvgNonZeroReducer, PerAnchorReducer from .. import TEST_DEVICE, TEST_DTYPES from ..zzz_testing_utils.testing_utils impor...
826
user plane access interface
# 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...
827
get media type time window path
# -*- coding: utf-8 -*- """ tmdbsimple.base ~~~~~~~~~~~~~~~ This module implements the base class of tmdbsimple. Created by Celia Oakley on 2013-10-31. :copyright: (c) 2013-2022 by Celia Oakley :license: GPLv3, see LICENSE for more details """ import json import requests class APIKeyError(Exception): pass c...
828
causes
from abc import ABC, abstractmethod from collections import defaultdict from enum import Enum from typing import Any, Dict, List, Optional, Sequence, Union class ExpectedType(Enum): MAP = ("map", dict) LIST = ("list", list) STRING = ("string", str) INTEGER = ("integer", int) BOOLEAN = ("boolean", ...
829
set model meta
from typing import List from federatedml.protobuf.generated.boosting_tree_model_param_pb2 import DecisionTreeModelParam from federatedml.transfer_variable.transfer_class.homo_decision_tree_transfer_variable import \ HomoDecisionTreeTransferVariable from federatedml.util import consts from federatedml.ensemble impor...
830
test api create metapackage
# Copyright (C) 2014 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause # This file makes sure that our API has not changed. Doing so can not be accidental. Whenever it # happens, we should bump our major build number, because we may have broken someone. import inspect import sys from inspect import getfullarg...
831
get field errors
# -*- coding: utf-8 -*- import datetime from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.test.testcases import SimpleTestCase from django.utils.six import BytesIO from django.utils.encoding import force_text from dateutil import parser from PIL import Image ...
832
stub disable metrics collection
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Stub functions that are used by the Amazon EC2 Auto Scaling unit tests. """ from test_tools.example_stubber import ExampleStubber class AutoScalingStubber(ExampleStubber): """ A class that implemen...
833
task logs
import functools import re from typing import Any, Callable, Dict, Iterable, Optional, Union import _socket import pytest from determined.cli import command from determined.common import api from determined.common.api import authentication, bindings, certs from tests import config as conf from tests import experiment...
834
prepare draw
import numpy as np from .. import gloo from .visual import Visual _VERTEX_SHADER = """ attribute vec2 a_pos; varying vec4 v_color; void main() { vec4 pos = vec4(a_pos, 0, 1); if($is_vertical==1) { pos.y = $render_to_visual(pos).y; } else { ...
835
main
import copy import os import warnings import dgl import numpy as np import torch from eval_function import ( fit_logistic_regression, fit_logistic_regression_preset_splits, fit_ppi_linear, ) from model import ( BGRL, compute_representations, GCN, GraphSAGE_GCN, MLP_Predictor, ) from to...
836
eas2tas
# Copyright (c) 2018-2020 Uber Technologies, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
837
same function name arn
import json import pytest from tests.e2e.tracer.handlers import async_capture, basic_handler from tests.e2e.utils import data_builder, data_fetcher @pytest.fixture def basic_handler_fn_arn(infrastructure: dict) -> str: return infrastructure.get("BasicHandlerArn", "") @pytest.fixture def basic_handler_fn(infra...
838
get job runner
# SPDX-License-Identifier: Apache-2.0 # Copyright 2022 The HuggingFace Authors. import os from dataclasses import replace from http import HTTPStatus from typing import Callable, Generator from unittest.mock import patch import pyarrow.parquet as pq import pytest from datasets import Dataset from fsspec import Abstra...
839
method to apply changes x
# -*- coding: utf-8 -*- """ Copyright (C) 2014-2020 OSMC (KodeKarnage) This file is part of script.module.osmcsetting.updates SPDX-License-Identifier: GPL-2.0-or-later See LICENSES/GPL-2.0-or-later for more information. """ import os import subprocess from osmccommon import osmc_setting from osmccom...
840
get vms
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright Ansible Project # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import absolute_import, division, print_function __metaclass__ = type ...
841
from flags
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2001-2017 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 copyright notice and this permis...
842
get different messages
import argparse from typing import List """ Takes in one of the po files in resources/i18n/[LANG_CODE]/cura.po and updates it with translations from a new po file without changing the translation ordering. This script should be used when we get a po file that has updated translations but is no longer co...
843
test group deleted from watchlists
""" CLI testing, dawg. """ import json import subprocess import pytest import tempfile import os.path import piker.watchlists as wl pytestmark = pytest.mark.skipif( True, reason="cli tests rely on quote api and questrade symbols" ) def run(cmd, *args): """Run cmd and check for zero return code. """...
844
align reads
from collections import Counter from csv import DictReader, DictWriter # noinspection PyUnresolvedReferences from gotoh import align_it from datetime import datetime from operator import itemgetter import os from matplotlib import pyplot as plt from micall.core.project_config import ProjectConfig from micall.g2p.fas...
845
enabled savers
import os import logging import contextlib import collections import pyblish.api from openpype.pipeline import publish from openpype.hosts.fusion.api import comp_lock_and_undo_chunk from openpype.hosts.fusion.api.lib import get_frame_path, maintained_comp_range log = logging.getLogger(__name__) @contextlib.contextm...
846
delete from table client
# 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. # --------------------------------------------------------------------...
847
test fix ansi codes for github actions
from __future__ import annotations import textwrap from pathlib import PurePath import pytest from cibuildwheel.util import ( find_compatible_wheel, fix_ansi_codes_for_github_actions, format_safe, prepare_command, ) def test_format_safe(): assert format_safe("{wheel}", wheel="filename.whl") == ...
848
draw polygon
# # CanvasRenderVec.py -- for rendering into a vector of drawing operations # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. from .VecHelp import (IMAGE, LINE, CIRCLE, BEZIER, ELLIPSE_BEZIER, POLYGON, PATH, TEXT) from .VecHelp import Pe...
849
test sqrt
#!/usr/bin/env python3 import unittest import torch from linear_operator.operators import DiagLinearOperator from linear_operator.test.linear_operator_test_case import LinearOperatorTestCase class TestDiagLinearOperator(LinearOperatorTestCase, unittest.TestCase): seed = 0 should_test_sample = True shou...
850
test on duplicate key update expression multirow
from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import exc from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.dialects.mysql import insert from sqlalchemy.testing import fixtures from sqlalchemy.testing.asser...
851
test get course runs by course run
import uuid from django.test import TestCase from credentials.apps.catalog.api import ( get_course_runs_by_course_run_keys, get_filtered_programs, get_program_details_by_uuid, ) from credentials.apps.catalog.data import ProgramDetails, ProgramStatus from credentials.apps.catalog.tests.factories import ( ...
852
list organizations
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from ..uac import OrganizationV2_pb2 as uac_dot_OrganizationV2__pb2 from ..uac import UACService_pb2 as uac_dot_UACService__pb2 class OrganizationServiceV2Stub(object): # missing associated documentation comment in .proto file pass...
853
group shuffle split
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Common datamodule utilities.""" import math from collections.abc import Iterable from typing import Any, Optional, Union import numpy as np from torch import Generator from torch.utils.data import Subset, TensorDataset, ...
854
get endpoint prefix name
# Copyright 2019-2020 Amazon.com, Inc. or its 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
855
sanity check
__author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" import os from ...exceptions import * from .. import base from ..cpi import SYNC_CALL, ASYNC_CALL from ..cpi import context as cpi from ... import context as...
856
add arguments
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
857
constraint
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
858
generate index from links
__package__ = 'archivebox.index' from pathlib import Path from datetime import datetime, timezone from collections import defaultdict from typing import List, Optional, Iterator, Mapping from django.utils.html import format_html, mark_safe from django.core.cache import cache from .schema import Link from ..system im...
859
on resize
# -*- coding: utf-8 -*- # vispy: gallery 30 # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -----------------------------------------------------------...
860
keyval
# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2023 by the Nominatim developer community. # For a full list of authors see the git log. """ Streaming JSON encoder. """ from typing import Any, TypeVar, Optional, Callable import io try: import...
861
test sftp download file and delete
import filecmp from pathlib import Path import pytest from jinja2 import Template from .test_sftp_server import TestSFTPFileSystem, TestSFTPServerController @pytest.mark.usefixtures('tmpdir') class TestSftpDownload: _config = """ templates: anchors: _sftp_download: &base_sftp_downl...
862
test stop
#!/usr/bin/env python # # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) # # 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/li...
863
notify
# Licensed under a 3-clause BSD style license - see LICENSE.rst import copy import xmlrpc.client as xmlrpc from .errors import SAMPHubError from .lockfile_helpers import get_main_running_hub from .utils import ServerProxyPool __all__ = ["SAMPHubProxy"] class SAMPHubProxy: """ Proxy class to simplify the c...
864
get base url
import abc import json import math import random from typing import NamedTuple import requests from django.conf import settings from django.contrib.gis.geos import Point class Directions(NamedTuple): time: float # travel time in seconds distance: float # distance in metres mode: str # mode of transpor...
865
retrieve daily summaries
# import_export_open_people/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from datetime import date, timedelta from django.db import models import wevote_functions.admin from wevote_functions.functions import convert_to_int, positive_value_exists logger = wevote_functions.admin.get_logger(_...
866
post operations
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # # Code generated by aaz-dev-tools # --------------------------------...
867
xmlns declaration
# See COPYRIGHT.md for copyright information from lxml import etree from enum import Enum import re XHTML_NS = 'http://www.w3.org/1999/xhtml' XML_NS = 'http://www.w3.org/XML/1998/namespace' class EscapeMode(Enum): DEFAULT = 0 STYLE = 1 class XHTMLSerializer: # From https://www.w3.org/TR/html401/index/e...
868
test save load
# 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...
869
test conv3 d 9
# 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 applic...
870
clear all
from unittest.mock import MagicMock import pytest from UM.Math.AxisAlignedBox import AxisAlignedBox from UM.Math.Vector import Vector from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection from UM.Operations.TranslateOperation import TranslateOperation class TestSelection: @pytest.fix...
871
normalize version
# Copyright (C) 2016-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
872
test cyclically symmetric image
import numpy as np import pytest from aspire.image import Image from aspire.operators import PolarFT from aspire.utils import gaussian_2d, grid_2d from aspire.volume import AsymmetricVolume, CnSymmetricVolume # ========== # Parameters # ========== IMG_SIZES = [ 64, 65, ] DTYPES = [ np.float64, np.flo...
873
filter alpha
# # Copyright 2021-2022 GoPro Inc. # # 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...
874
main
# 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 appl...
875
code appspec
"""IC wrapper module, based on Internet Config 1.3""" from warnings import warnpy3k warnpy3k("In 3.x, the ic module is removed.", stacklevel=2) import icglue import string import sys import os from Carbon import Res import Carbon.File import macostools error=icglue.error # From ictypes.h: icPrefNotFoundErr = -666 ...
876
restart
from __future__ import annotations from http import HTTPStatus import logging from contextlib import suppress from os import getgid, getuid from pathlib import Path import docker import requests from docker.errors import APIError, DockerException from docker.types import Mount from requests.adapters import HTTPAdapte...
877
test install hive and pig
# Copyright 2014 Amazon.com, Inc. or its 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
878
set up
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import unittest from typing import Any from mock import patch from neo4j import GraphDatabase from pyhocon import ConfigFactory from databuilder import Scoped from databuilder.extractor.neo4j_extractor import Neo4jExtractor from ...
879
committer
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
880
test find closure
# coding: utf-8 import pytest from .. import utils import rpy2.rinterface as rinterface rinterface.initr() def _just_pass(x): pass @pytest.fixture(scope='module') def silent_console_print(): with utils.obj_in_module(rinterface.callbacks, 'consolewrite_print', _just_pass): ...
881
has object permission
from django.db.models import BooleanField, Case, Q, Value, When from filingcabinet.api_renderers import RSSRenderer from filingcabinet.api_serializers import ( DocumentCollectionSerializer as FCDocumentCollectionSerializer, ) from filingcabinet.api_serializers import DocumentSerializer as FCDocumentSerializer from...
882
name
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
883
test naughty column name to filename
import os import re import unittest import tempfile import json import numpy as np import pandas as pd import shutil from sklearn import datasets from supervised import AutoML from supervised.preprocessing.eda import EDA class EDATest(unittest.TestCase): automl_dir = "automl_tests" def tearDown(self): ...
884
write registry
# 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...
885
wait on pipeline job
# Copyright 2019 Google 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 writing, ...
886
aws command
import subprocess import os import tempfile import json import glob import traceback import logging import shutil import boto3 import contextlib import asyncio import functools from datetime import datetime from uuid import uuid4 from botocore.config import Config from urllib.request import Request, urlopen from zipfi...
887
query parameters
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
888
time to millis
#!/usr/bin/env python from __future__ import division import sys, os current_line = "" def METHOD_NAME(time_in): time_in.strip() time_in.replace(" ", "") result = "NaN" if "ms" in time_in: result = str(assert_float(time_in.replace("ms", ""))) elif "s" in time_in: result = str(a...
889
check
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
890
get idle activation
""" GNOME implementations """ import logging import re import salt.utils.path try: import pwd HAS_PWD = True except ImportError: HAS_PWD = False try: from gi.repository import Gio, GLib # pylint: disable=W0611 HAS_GLIB = True except ImportError: HAS_GLIB = False log = logging.getLogger...
891
create match method
# 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...
892
test parse tracking response
import unittest from unittest.mock import patch from karrio.core.utils import DP from karrio import Tracking from karrio.core.models import TrackingRequest from .fixture import gateway class TestCarrierTracking(unittest.TestCase): def setUp(self): self.maxDiff = None self.TrackingRequest = Trackin...
893
check
#!/usr/bin/env python import os import sys import json from distutils.version import LooseVersion as V from subprocess import * sys.path.append(os.path.dirname(__file__)) from comp import * class CompFirmware(object): def __init__(self, var): self.versions = {} if var not in os.environ: ...
894
get channel revs
""" A view that handles synchronization of changes from the frontend and deals with processing all the changes to make appropriate bulk creates, updates, and deletes. """ from celery import states from django.db.models import Q from rest_framework.authentication import SessionAuthentication from rest_framework.permissi...
895
system data
# 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...
896
test response not existing
from collections.abc import Callable from typing import TextIO from unittest import mock from unittest.mock import MagicMock from examples.contrib.webscanner_helper.mapping import MappingAddon from examples.contrib.webscanner_helper.mapping import MappingAddonConfig from mitmproxy.test import tflow from mitmproxy.test...
897
prepare request
# 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...
898
gen batches
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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 applicab...
899
test factory
########################################################################## # # Copyright (c) 2011-2014, Image Engine Design Inc. All rights reserved. # Copyright (c) 2011, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...